From nobody Mon Oct 14 05:40: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 4XRmKt4rRsz5ZCdm; Mon, 14 Oct 2024 05:40:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmKt4Hp8z40jx; Mon, 14 Oct 2024 05:40:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sS2yNXYi/OXUWs4eMwSVumP7cT5aEmgcgTXMn2VKAxY=; b=fhChBG05EykHB3ZJrfSHm+qTbZlt1Xrf4WTJces4uNqSALT5aro3wQ7ryvDzktXwcSBPdK euwYiueqLQz175QvQzxwGu3Rq1uGT4p5/RNxpxpW8YV10FFOaLROlmEFEW/TDXHl0guMSK lAKQaFX1TLvzmcocFiLe3CpZQMKHZCfLkOZZP0N5Vp2B+H5bRN1CtUWe+G8N4x2BpibFiJ x3KTkAfhXvJjq9Iww1NQl/SdKmKMiijSfbQ6MMKOc0u5+aZX/jafNboDdmxmz/O/ugXEKw KZjOXWfK91jujRKD6m6bL77kuvT7w5LHvrYjt9V+VTrk6hrAhPTaSQRinZ5L0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sS2yNXYi/OXUWs4eMwSVumP7cT5aEmgcgTXMn2VKAxY=; b=DBtYmzjzfCqE54ljOfAOtDsBineCOw1IIN7asIVS0cdWTeWpj7F6nyHImhoZJGS+yALoPz Akzs0COJlBbwmpDamJpWwGBJ3jzglLht7oEEl7+LesypRIYb3q1rIrzzihNMYqYi3Wj05C qoeetKwjcZ0F8aMpv6XKJ7qhYflYvuvv5kL2c+bkWNHm0lwBDSRwTr6EF6JGh6eqaU0o3f IlZsgcraHU+1JGF5584t9u4KK7k6c9IVbslQZ2ip2RfVjMwnhLaI60mhSESTCCkEQ5I1X/ G3yLh3YCGbUDap86X4h1JXnXN8FfjLrWpyHqn39RETKgKyx1rVea4aqfb2W3pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884450; a=rsa-sha256; cv=none; b=S7rQZbSO2O7+gozqJEzMQcJ4tb5xobiPuOLPOzVWYjI7MhiSZtofbmnz2iT2SgU4r0WPwW 6k6AgCLoZX0ssjl0MU/kzE/tjizPpxOWezWjxXt2kuvSVe1SoX7lBl+SliGhWy9Tdk7GUz AvNnvVfQ9iiPRrZCZV/UKINOL4yIbUyW6Ebi8xm9QP//iQNlP9OA8MylG6T3oVVNFi2yyK i5flzbXbs8Wvf53esVKjRBHxUKSyjgWFnDoNHD103XN0hkO49BwhuWA7lvsaGYWnBsOr5I rpH+vAqxt9RtECJcFn4TYfMfdAt9zlDeivw4M4z6sqgIaq3XOEjzS64FotudqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmKt3mZnzQbH; Mon, 14 Oct 2024 05:40:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5eoVK089255; Mon, 14 Oct 2024 05:40:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5eoU4089252; Mon, 14 Oct 2024 05:40:50 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:50 GMT Message-Id: <202410140540.49E5eoU4089252@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: f03e1a42e92e - main - ciss: Minor formatting nit. 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: f03e1a42e92eff76dcf474655b600db37b04ae2b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f03e1a42e92eff76dcf474655b600db37b04ae2b commit f03e1a42e92eff76dcf474655b600db37b04ae2b Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:22:01 +0000 ciss: Minor formatting nit. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/cissvar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ciss/cissvar.h b/sys/dev/ciss/cissvar.h index 50d154456674..eec11018d279 100644 --- a/sys/dev/ciss/cissvar.h +++ b/sys/dev/ciss/cissvar.h @@ -184,7 +184,7 @@ struct ciss_softc { /* bus connections */ device_t ciss_dev; /* bus attachment */ - struct cdev *ciss_dev_t; /* control device */ + struct cdev *ciss_dev_t; /* control device */ struct resource *ciss_regs_resource; /* register interface window */ int ciss_regs_rid; /* resource ID */ From nobody Mon Oct 14 05:40:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XRmKw0Vq9z5ZCdn; Mon, 14 Oct 2024 05:40:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmKv5CN6z40mP; Mon, 14 Oct 2024 05:40:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gtMbVVLej+S5k22rMXVaUeCaJwQOXWSG7AFvppg8UI=; b=NgI58Bo0iAPQPQsm9Ozu1WDr8JYceWD7AO2QAgGLKxcAkjMNex1dATtc/TqWPXL3yUQGV+ m92vj6Nl8FXd4s8z/7/+rRDHHoZCcmtWI2cWlvH2eCjTXR77MsTfY72C/Vu8DDQj42M4WJ WP8tv2ZO121m4qszfA5UY/IxPdH52GmfqYDNrRExFAqoVIJM6WOBjD2XYsfI85BVv7rCcv zsXavF7r/v7KOpk7e4zHQ7XTfixAkKYIvLdrCFU+C8XqHycIWm4PGBH8OVz0EG9c3Payhy B+U9Dw+/gWrrc7XchXFC24mjohzfylc3v1ZS7TR8WieiEVN271/dGN1gIcjOBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gtMbVVLej+S5k22rMXVaUeCaJwQOXWSG7AFvppg8UI=; b=Jgs2pzxG7vidcR6B0LcJC7bzLapPujxbyuSgzC8bhrC7VdAVHkd61OKCsmXsu3/zy8Uj99 dZt1G33tHmTi9WOSh3fum9J7cd5z6RxxXg7iAWYfjLRbH/126LsZK9RG1V2sMzMZsshY8i Z/a+mjoCbbXU5Z75zHogToEJ4hI74euRVvs2BJuhPg6R7SxoGbsbZOWSQ4BgORvzvgJUjR ZRc16jrkGkXdVtBPO4l9fBQPTfsmccPmdnkpWb7UU769842L/aZcqGDps0Jr27exUhWlnq fw+1EkpVpS2mxYZlYgkp3aQhTU9EwKN6vdo7WM/yxL49ZSvgbv/8AwXKoJJbcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884451; a=rsa-sha256; cv=none; b=rYgMxOANgYYwFBFJQjsktMlb1KDMS//w0/q4PCO53zP4FborE4AunLmVa5qI0UgjQx//3C D7iKNcdS05DWLUXIT5f24UaKD+AlPOiZNRf1Ej02i3hLzlRdIAn6QS1Yds5SRYKU7zv4gS Nq0gudPNs+RDnrS0HdTr1wIbyOMnL9qzRg7N1GBkUXewaaSWcf9CkdXMrK44pbybna7x/S 2DASwnM+irJW12UsAk1X3jLHoZ/jtdC9yVk8JQaVyx6c+S0ZsMNnkveaJq5+sOEgWC0k9a zaLOvf1rVTvz52IIl1Du+ckb/02srQCrkWJ56LXVpS8TV3yR5o81AkjIjSHwQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmKv4n74zQDM; Mon, 14 Oct 2024 05:40:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5eplP089303; Mon, 14 Oct 2024 05:40:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5ep2I089300; Mon, 14 Oct 2024 05:40:51 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:51 GMT Message-Id: <202410140540.49E5ep2I089300@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: cafc839393db - main - ciss: Ignore data over/under run on RECEIVE_DIAGNOSTIC 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: cafc839393db5c5d8000fd086118b3c7b47e95c2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cafc839393db5c5d8000fd086118b3c7b47e95c2 commit cafc839393db5c5d8000fd086118b3c7b47e95c2 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:22:19 +0000 ciss: Ignore data over/under run on RECEIVE_DIAGNOSTIC This appears to be harmless, so ignore data over/under run on diagnostics. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 6723d05e0cfe..866e67766818 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -2299,13 +2299,14 @@ _ciss_report_request(struct ciss_request *cr, int *command_status, int *scsi_sta /* * We don't consider data under/overrun an error for the Report - * Logical/Physical LUNs commands. + * Logical/Physical LUNs, INQUIRY & RECEIVE_DIAGNOSTIC commands. */ if ((cc->header.host_tag & CISS_HDR_HOST_TAG_ERROR) && ((ce->command_status == CISS_CMD_STATUS_DATA_OVERRUN) || (ce->command_status == CISS_CMD_STATUS_DATA_UNDERRUN)) && ((cc->cdb.cdb[0] == CISS_OPCODE_REPORT_LOGICAL_LUNS) || (cc->cdb.cdb[0] == CISS_OPCODE_REPORT_PHYSICAL_LUNS) || + (cc->cdb.cdb[0] == RECEIVE_DIAGNOSTIC) || (cc->cdb.cdb[0] == INQUIRY))) { cc->header.host_tag &= ~CISS_HDR_HOST_TAG_ERROR; debug(2, "ignoring irrelevant under/overrun error"); From nobody Mon Oct 14 05:40:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XRmKx4Mp7z5ZCds; Mon, 14 Oct 2024 05:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmKx0YKBz40y2; Mon, 14 Oct 2024 05:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHPb2vz9NmkXCyOrOW3LmlF1fMB8RixBweo+uBYoPl0=; b=ltbp29bhvNsksHKUuY5oWoHga89eXoiWyfebW9O2Fv74cz5dUjwfkh++CVhzlXn+lM0QMj 6q6pp0Iwu58uSEel7LVXLEimr53eRZA/3uMI7saGu4Pbpx9WME2QN+Hh84uCheM2Ek6exg 2E5gGRQN7NrY1Qtttj/zDLS2mZ7j0XWAmx/VD/fvoI/Dru1Siff2vJlNxTQ69fkgsqv3Sl 1c0sIRlpRArwKFc5FkwfC8eYY1sBF9ek9HXdpUvYTA7GMzt/eoYk+pPKmhAn+JZK9ZSBIt wr6LIdFRW3yFLPMwQc71Rwu1o5vqsk/urz7q2L0gWtflOBAJTzBzmbxnhaLENw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHPb2vz9NmkXCyOrOW3LmlF1fMB8RixBweo+uBYoPl0=; b=WyxI1BL23gg5MiGpcJnrUZBzow9AHtufBNSUCAmktOh+y2qnmKffffAWHwHpEOdYIz0QuH RnKD3he6RKVWM2W11y90t5VWFTo+oQmkFGgCIGnGfRv6U2tosSxGh2E7y+qwfOWfuShK/t O6t4aI1FYBLyHhSkTfFO826gQxoCRFQF/NxySvLxT0IUVbCYCt1QwXKDMBbHzPYcywXPzA JXfAFWhZxPC6ZOI7Vthy29vpsMRl9u0eznOtvH2ttWMRa+6TQr5LZQrY5ARhiSjwUVk6Cn v8nZxpUv0EB83dbDDiKhobtKdlwiy15VH2vTPAwRgdsueYS9r7dhw7vu/7CgMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884453; a=rsa-sha256; cv=none; b=n2MaYSzqSwwy9Pn5+rkKNtwd82ojUU5UVcF8QpIkMw0xtDs2w0zOXXkSEphZqXcQkho9mP svrG5aAZOGOAR33q6h84P/g9XeaRZZZX1rYhNIxxXkDDknpeDz6lALeI2cuXZb76VHQVxv y5RPWMdHvfXwA9cuhG+TmtmXSlRaGUV9odg7ul7TbFVSRskHsZN8Jx7oal8m6KVD5Ftv8Z asmOGrAU1TnanxssbXSNAuw1HhraaUiQTUBrmRgeNxeRL9jvK5mc9c1SaCedKNkEX6Qpnr 2TmD7QGn9iyjZKM+jLu49QiwYv20+ecMwVTEr2QQnbj04HkByy5IRhkOk+xwLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmKw5mn7zQK6; Mon, 14 Oct 2024 05:40:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5eqMY089355; Mon, 14 Oct 2024 05:40:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5eqRR089352; Mon, 14 Oct 2024 05:40:52 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:52 GMT Message-Id: <202410140540.49E5eqRR089352@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: 74575d14284f - main - ciss: Add sysctl/tunable hw.ciss and hw.ciss.base_transfer_speed 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: 74575d14284fde2c7617ad14fd9a8bac897b4427 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=74575d14284fde2c7617ad14fd9a8bac897b4427 commit 74575d14284fde2c7617ad14fd9a8bac897b4427 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:23:08 +0000 ciss: Add sysctl/tunable hw.ciss and hw.ciss.base_transfer_speed Add a sysctl/tuneable to report a different base transfer speed than the default of 132*1024. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 866e67766818..06c7ed5f3318 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -242,6 +242,16 @@ static struct cdevsw ciss_cdevsw = { .d_name = "ciss", }; +SYSCTL_NODE(_hw, OID_AUTO, ciss, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "CISS sysctl tunables"); + +/* + * This tunable can be used to force a specific value for transfer speed. + */ +static int ciss_base_transfer_speed = 132 * 1024; +SYSCTL_INT(_hw_ciss, OID_AUTO, base_transfer_speed, CTLFLAG_RDTUN, + &ciss_base_transfer_speed, 0, + "force a specific base transfer_speed"); + /* * This tunable can be set at boot time and controls whether physical devices * that are marked hidden by the firmware should be exposed anyways. @@ -3029,7 +3039,7 @@ ciss_cam_action(struct cam_sim *sim, union ccb *ccb) strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); - cpi->base_transfer_speed = 132 * 1024; /* XXX what to set this to? */ + cpi->base_transfer_speed = ciss_base_transfer_speed; cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; From nobody Mon Oct 14 05:40: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 4XRmKy1vfXz5ZChh; Mon, 14 Oct 2024 05:40:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmKy0LkFz40k2; Mon, 14 Oct 2024 05:40:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+u9fQZ+XSNQbPJsn6CL6AU0a4w7oAym0hMqBlOgPMo8=; b=ti4yrd/MHdxwe5l8ibaZyV98eeUJSgTG54Z98EQKvjWdcveMmpJSpbJTmlSrvkxniR7zpK bDuGmW5RSeJOqfcEOR79OoMPHPdboolLHCA2n0Ubft7yX2oE1ZK7SyW9XssguQPJmThsbU xiCiCgbVDfe+bA1azEWPuaMX/nB1kbD5gnhC7eXaI/oEbUiu/Mibms3t4QUzQnKviWTCru QVYqyjRaM2KvyQaRnoudUfTYioX6bQ5DZkCHNo4bztA1rDxxZRq2x4Fidm9zFn4GMPxfhr liIg1Vs6YOgpb/HrT4jH+TU5YVZ3fHfGiXoE0s8dSrrVZ4G53p+6sLL7YdifVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+u9fQZ+XSNQbPJsn6CL6AU0a4w7oAym0hMqBlOgPMo8=; b=JMAPBMqMKhHdNgUWTLcYt809N3jSURG4pENE2U6pcg4ORJto1ZUFlBgABA/yFdE2M82jk7 +znGkTVMqgG2r4u6xPfmNXxCyRjIJ7LrNl7EOG8JNsBb+j7f8VNwtbsKcy4ijqOsel/o2k cJOBtERkfB6AZ5G8X0bfeV02xExCeajKG6MtU/n+jIdhCfSRt2WM7QBu4tJpJQjjaBA7PH lXPG3kjSJN5HnoIiksSbLDWh6ApNWd2NbL/rnoD5RjttZA/jF5y2xyV7GyCdI7LKaqX/DX i3JgZpjb1UvHHoRDwOw9aNAer6v9JGpriNie6SbFhIExcvTuJ8AsrqCvEycu6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884454; a=rsa-sha256; cv=none; b=Ey9GnVuK5mQaDIEOp+mKRZ6Y3pE3xuIGuAtzEYYZdNVSgmHwnGJtOvHRXYv/tjeW9lO3wj eh27UHMyGqi9Q7hL1R8zsS+zM2Os+nIrzt63TtCNFposPFBjgBeqdT2oxAIVy1Wkl3mml2 57ZgHIC1KreZyKvf5xFcjmLctwnu8nfTynA8zMWhMoefZXDdG1UdrDufS2yE0n6GPuomCx 3vuxt1juSqyytoK84BMfr/7EVyTkh+APKfnYW64W0t4c4vOxebdOC6LlnusCqVaVOoOKuf RlXoeQGoZyPulPLpoI5xf6m1IyhQMwhKeYD3gzpKZzshTArJoFD5C9xrwqxHrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmKx6f1xzQRP; Mon, 14 Oct 2024 05:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5erpi089399; Mon, 14 Oct 2024 05:40:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5erhl089396; Mon, 14 Oct 2024 05:40:53 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:53 GMT Message-Id: <202410140540.49E5erhl089396@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: f373e6b866b9 - main - ciss: Add sysctl/tunable hw.ciss.verbose 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: f373e6b866b9efafc66ccc5355e1ea0aeeedfb6a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f373e6b866b9efafc66ccc5355e1ea0aeeedfb6a commit f373e6b866b9efafc66ccc5355e1ea0aeeedfb6a Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:23:17 +0000 ciss: Add sysctl/tunable hw.ciss.verbose Add tuneable to turn on/off verbosity for debugging purposes. This is approximately the same as bootverbose, but will print even more information when > 1. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 06c7ed5f3318..168d1892e59d 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -252,6 +252,13 @@ SYSCTL_INT(_hw_ciss, OID_AUTO, base_transfer_speed, CTLFLAG_RDTUN, &ciss_base_transfer_speed, 0, "force a specific base transfer_speed"); +/* + * This tunable can be set to make the driver be more verbose + */ +static int ciss_verbose = 0; +SYSCTL_INT(_hw_ciss, OID_AUTO, verbose, CTLFLAG_RWTUN, &ciss_verbose, 0, + "enable verbose messages"); + /* * This tunable can be set at boot time and controls whether physical devices * that are marked hidden by the firmware should be exposed anyways. @@ -914,7 +921,7 @@ ciss_setup_msix(struct ciss_softc *sc) } sc->ciss_msi = val; - if (bootverbose) + if (bootverbose || ciss_verbose) ciss_printf(sc, "Using %d MSIX interrupt%s\n", val, (val != 1) ? "s" : ""); @@ -1132,7 +1139,7 @@ ciss_init_requests(struct ciss_softc *sc) debug_called(1); - if (bootverbose) + if (bootverbose || ciss_verbose) ciss_printf(sc, "using %d of %d available commands\n", sc->ciss_max_requests, sc->ciss_cfg->max_outstanding_commands); @@ -1264,13 +1271,22 @@ ciss_identify_adapter(struct ciss_softc *sc) if (sc->ciss_cfg->max_physical_supported == 0) sc->ciss_cfg->max_physical_supported = CISS_MAX_PHYSICAL; /* print information */ - if (bootverbose) { + if (bootverbose || ciss_verbose) { ciss_printf(sc, " %d logical drive%s configured\n", sc->ciss_id->configured_logical_drives, (sc->ciss_id->configured_logical_drives == 1) ? "" : "s"); ciss_printf(sc, " firmware %4.4s\n", sc->ciss_id->running_firmware_revision); ciss_printf(sc, " %d SCSI channels\n", sc->ciss_id->scsi_chip_count); + if (ciss_verbose > 1) { + ciss_printf(sc, " %d FC channels\n", sc->ciss_id->fibre_chip_count); + ciss_printf(sc, " %d enclosures\n", sc->ciss_id->bEnclosureCount); + ciss_printf(sc, " %d expanders\n", sc->ciss_id->bExpanderCount); + ciss_printf(sc, " maximum blocks: %d\n", sc->ciss_id->maximum_blocks); + ciss_printf(sc, " controller clock: %d\n", sc->ciss_id->controller_clock); + ciss_printf(sc, " %d MB controller memory\n", sc->ciss_id->total_controller_mem_mb); + } + ciss_printf(sc, " signature '%.4s'\n", sc->ciss_cfg->signature); ciss_printf(sc, " valence %d\n", sc->ciss_cfg->valence); ciss_printf(sc, " supported I/O methods 0x%b\n", @@ -1436,7 +1452,7 @@ ciss_init_logical(struct ciss_softc *sc) /* * Save logical drive information. */ - if (bootverbose) { + if (bootverbose || ciss_verbose) { ciss_printf(sc, "%d logical drive%s\n", ndrives, (ndrives > 1 || ndrives == 0) ? "s" : ""); } @@ -1511,7 +1527,7 @@ ciss_init_physical(struct ciss_softc *sc) nphys = (ntohl(cll->list_size) / sizeof(union ciss_device_address)); - if (bootverbose) { + if (bootverbose || ciss_verbose) { ciss_printf(sc, "%d physical device%s\n", nphys, (nphys > 1 || nphys == 0) ? "s" : ""); } @@ -1779,7 +1795,7 @@ ciss_identify_logical(struct ciss_softc *sc, struct ciss_ldrive *ld) /* * Print the drive's basic characteristics. */ - if (bootverbose) { + if (bootverbose || ciss_verbose) { ciss_printf(sc, "logical drive (b%dt%d): %s, %dMB ", CISS_LUN_TO_BUS(ld->cl_address.logical.lun), CISS_LUN_TO_TARGET(ld->cl_address.logical.lun), From nobody Mon Oct 14 05:40: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 4XRmL04YSwz5ZChk; Mon, 14 Oct 2024 05:40:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmKz2RqKz40dl; Mon, 14 Oct 2024 05:40:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HyqpMOwdia1xf+cdRnVqizig1nan+vaj4UwM80sRipE=; b=QQ4JGmsVG/Ghx67kMu1L1g+dXO+N+mTnR8d8yySuDV5hlICeoDt6Q3/kzpR/6rY55l8zq3 KJCHIlR85AbunTKAbm9UJVEiYO34v3kpbRHuuOsLLBTNTqRNX75tnS1GjASJBb4TETvAJT qw19Nyp5/VmfGMlBDdcDKWmRgXjuYvqIg1zgdhOeWM59pH1XRdsEuzAGVsKBxqRBLHrTiW 6chDX6GuFg4/k4Ld84kAXYsZJEBUPPwDZyYBOfvOEIQVKoJzc8hf0o4OA8XDxYpQLi1JA3 tGKtffuGisnVaiH8OL5gFfHIvuBUx5PSjD6tcYTw3IJPAK9AcuXcbW575tQnSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HyqpMOwdia1xf+cdRnVqizig1nan+vaj4UwM80sRipE=; b=SgK/EuBGi9w6JsWMNwJWRSbHd6FlVLE4ziN7sw8wwX9rFYwZV0uLrxoqyqYJL7G/f2NcUu WcSgPEHncreO35BaFaQinK06FCNdncreCiCfNjid1ZhNe2vH8/98hxRdeMNLjddivrMrRY VjcryHjOpcOujm+QLaueyBQbB3V3sWoqe0c7EzPEbE+rEfFRDymGAYXWCdIgOiNl168+lI GVxTGEJIWxKll1gme9fx8l8+4FTQeNOBUj+ta0E1K6JDC8JmYqWQC6BfPh8kwN6oS0v2Wc NmIIasEW4RQkMPNnQF7UKrxwrrTtv3Ngzr0mxKTzGJ+HazXxERjRT1GRZYaOiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884455; a=rsa-sha256; cv=none; b=rDy3I2oUb5lrbCXSFvsCAeE2nKE+QvEkRt0kIC05+qYHqstcqrrr7KfbUkZM4wZW8/6Ut/ Ao9Qx/VzgO2iP0OZIxyqQV4qnmqOj8k7jgeLfI+52XaVzl96R1MMnEZj06p+5rd9zGwmP8 eFgXJLOiD7n1Sdx0G2eAe1ilLzyW51c536aA0q6sLBdj2G853woZSK7gOpZXTTWzK2dgEy OvEuaZzijND5I49qQUL5fqncvUauRbr9MH4s/fVByx+ZPzTX+dS1RhsSo1u8XECeEay4DS i1PMUOqjELfEOZrhv2j3qXuuEtBPRfEZHkeyqI9ThVx9FkTJkH2CBkAUb7TVrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmKz16NSzQfn; Mon, 14 Oct 2024 05:40:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5esHS089450; Mon, 14 Oct 2024 05:40:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5eslI089447; Mon, 14 Oct 2024 05:40:54 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:54 GMT Message-Id: <202410140540.49E5eslI089447@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: d8b024673bbf - main - ciss: Report more errors at higher ciss_verbose levels 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: d8b024673bbfb32259030db7e54f043f3e471abe Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d8b024673bbfb32259030db7e54f043f3e471abe commit d8b024673bbfb32259030db7e54f043f3e471abe Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:23:25 +0000 ciss: Report more errors at higher ciss_verbose levels Report more information on errors, including the the opcode. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 168d1892e59d..69b3dcb97171 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -2360,10 +2360,13 @@ _ciss_report_request(struct ciss_request *cr, int *command_status, int *scsi_sta *scsi_status = -1; } } - if (bootverbose && ce->command_status != CISS_CMD_STATUS_DATA_UNDERRUN) - ciss_printf(cr->cr_sc, "command status 0x%x (%s) scsi status 0x%x\n", + if ((bootverbose || ciss_verbose > 3 || (ciss_verbose > 2 && ce->scsi_status != 0)) && + (ce->command_status != CISS_CMD_STATUS_DATA_UNDERRUN)) { + ciss_printf(cr->cr_sc, "command status 0x%x (%s) scsi status 0x%x (opcode 0x%02x)\n", ce->command_status, ciss_name_command_status(ce->command_status), - ce->scsi_status); + ce->scsi_status, + cc->cdb.cdb[0]); + } if (ce->command_status == CISS_CMD_STATUS_INVALID_COMMAND) { ciss_printf(cr->cr_sc, "invalid command, offense size %d at %d, value 0x%x, function %s\n", ce->additional_error_info.invalid_command.offense_size, From nobody Mon Oct 14 05:40: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 4XRmL10kd5z5ZCkk; Mon, 14 Oct 2024 05:40:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmL03Xrwz40w0; Mon, 14 Oct 2024 05:40:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jPOMkIVd2ioGWvk631sGM3+9Jd7JAM6AbXMYlold30=; b=JLBJNvvf8y0RUcYTLa+DGT0Sq7xs23Pr/je+f1ehOuHQjsddum/jnZnvgvhJV8UBVJwZOq H1TlpRcpvpGWXhVQQaUQ8Al5aSRqwo3U8p1XTNBK3Dzsz5Alrbr1wE36w7ewIZkhua2WNo QCa+gJ9XQueACnjxlWwz3lkqovYDGUdwDhoFZqIyNA4jIboFbrJGt0moPfzWVNGV7cIuDF SGMEmwGEeN7VuhGPJRYnTvo5hoCUtDEu3K7QkPglACUxXdUO52c8eetmNMaKcl29WEuZmt jRQ/cb2R0iJNCSbUIHIUT9Beb4qfVpLiN55mvl2U7oXt5KAppLDpS9GRtKcm5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jPOMkIVd2ioGWvk631sGM3+9Jd7JAM6AbXMYlold30=; b=XeOtLi1lWdXZkmwbYv9Y459j0KYtqjUYa0YugvQnwpPBuemFHMdf90fodnVpxJ70vsiush AcdzNOBjrU7gp8Et9LAYSw5YKHh30eH+s8qsO3xAuoDDb3bgaicuC5tjlZC2s9wynyCzwW /l/IhXUaiiIes1RZmcHFbkhpfGSQvgg4ITrVGi87SsAiYtZH/4MYC82o1EDH2lJIjdRh32 ti1DYAdtEqQwo7PZaly06Zt53m82tilAT4GlDStg0jetQRD6x2J6UlYNOSdCLe8LwJURsM GPCybxeNBYNuVt5USRm+kBO+fswuHKyXMarjhrUnYqfq1VYdwpfvolTHf4zUiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884456; a=rsa-sha256; cv=none; b=u/CKh1c1zt3NFprqu622AJlF3MyybJafdomj2GWtPPZ72AMP5YaDWwO6cxT/9kOrsu1hCU 7wCTEXT4mc3LbSRvNhzGEm1iDddzvhnPlE6tj0WisFai9FbLVakENPaCK9avPElJcsnXdy HtNx4BvouLNajpsCAFkEKVgaFaps1E3KwHIzLLl7KDwG4pC5Jibofq6o7p+8emrE8+cYKG LAjQS/wypMtojuglaYPLD+Cdh3vKiBgIak6gDanUrqdxCYHJLSNpQNCWcHp+WHqqjTyfug uBRQhm3bCa+SMUllhKXnjDYeclClNlT9eWduSInEDN7UyuU4F/o+h5NGOs6Dlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmL01ysbzQgp; Mon, 14 Oct 2024 05:40:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5eukO089498; Mon, 14 Oct 2024 05:40:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5eutA089495; Mon, 14 Oct 2024 05:40:56 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:56 GMT Message-Id: <202410140540.49E5eutA089495@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: a35564358ac4 - main - ciss: Expose tunable hw.ciss.expose_hidden_physical as sysctl 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: a35564358ac442d5d7a5c9c2dd0544f07b1963e7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a35564358ac442d5d7a5c9c2dd0544f07b1963e7 commit a35564358ac442d5d7a5c9c2dd0544f07b1963e7 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:23:36 +0000 ciss: Expose tunable hw.ciss.expose_hidden_physical as sysctl Expose the hw.ciss.expose_hidden_physical tuneable as a sysctl and make it writeable at runtime. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 69b3dcb97171..1875c056f32d 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -265,6 +265,9 @@ SYSCTL_INT(_hw_ciss, OID_AUTO, verbose, CTLFLAG_RWTUN, &ciss_verbose, 0, */ static unsigned int ciss_expose_hidden_physical = 0; TUNABLE_INT("hw.ciss.expose_hidden_physical", &ciss_expose_hidden_physical); +SYSCTL_INT(_hw_ciss, OID_AUTO, expose_hidden_physical, CTLFLAG_RWTUN, + &ciss_expose_hidden_physical, 0, + "expose hidden physical drives"); static unsigned int ciss_nop_message_heartbeat = 0; TUNABLE_INT("hw.ciss.nop_message_heartbeat", &ciss_nop_message_heartbeat); From nobody Mon Oct 14 05:40:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XRmL31pdPz5ZCf3; Mon, 14 Oct 2024 05:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmL26C6bz40qh; Mon, 14 Oct 2024 05:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xmktO5BQCrKTlJsq34llTP2D+JSU2eB3GnwEKEQIKR8=; b=sNEpu8SpdPnkaEmL5OSX3OfbXqdewxChxRxWGp+K7ElKylq4yunPTa2MeCWxX9T3C5AS7p xfIqGbzK7z7MuMjroqjYtoyGz4msq8dy8mVxxsARsiUYh58VsWGturoPj3sVxi8xWV6oYx iCzYg9cMO9/XEUIXLiyElyb0gWjPDiL1JbeAC0mHPsaplLdPIdzhdwUGPMtXCrtHmdMT7g Oon1nUTkdZJiDYrE1j4Gs9XgFxatTWB8HgTDVo1KwpFxp0Ce1IqBdJko7vWBdrkRZmJth1 KrVfeneuxQMUs7OERUlfJTVQwkcushAgi56JA2x39USN9Ix1//JHYU0/7TwN8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xmktO5BQCrKTlJsq34llTP2D+JSU2eB3GnwEKEQIKR8=; b=JZcPAdMPSyDZGnR16PI3TGsyKd3qa5XQGMuOCz8XHyiZKCLV4cNAD6pJkqNc/dCQSgi4UN LyLxCWK9fXcq++3UyA5xfyHcuRX5xFLvhFiJ2arV3CuxsONwesqe+cj1fvJo69qsZ4IQNv aVQwB4UA/az9JUETV1A5LTPWijdec4fudLur5E5FA9snmLD4WkJM88rjQ7eFRJVNrakcRf r+HoqeVgUouJ3P+IVXmNBjxu51gYmJMPKdz3fIrGjlzO3EGa/n6upwAgfFdD5wEqDbJ3no 4h1W+hssCUsdMt/4NLPJztCFvfx5+gv+OggI/B3CJilhUu+SmBgVGSwb7PXYkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884458; a=rsa-sha256; cv=none; b=a9h17/xXk59tUEBjfuuPXJcsS0TNeg6Qw0rp/7G8eIu1Jxq0m7hKUf51Qr2t+eMremCEJa uUPnoDaPFPBMsBbJ3WRTHjSJ7QWOSWPb+JJHHd4EV+FiUcpQaOc+kRfW3/3Ova5rl/MmW4 Ty5rfny3EE3BIXcE0ESBkThWHbJmBP3MEuedM6hgpCkWm/n7u4N9veJWThaNQmPNQ8X0Wm yvzjJcK1rAcDquB+x+Xb6C1UTp0mQKVdBDF02FGxm6GA9cDXxrTVY4geoQGjhNR5YNG82Y GXyqbVgTsd9YyrhmBF+OF0w9pVAH46bMqS/KlNJ6ZY3Y2ZzlZ4xVUmm5aPN6Pw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmL230q3zQDP; Mon, 14 Oct 2024 05:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5ewlR089594; Mon, 14 Oct 2024 05:40:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5ewlq089591; Mon, 14 Oct 2024 05:40:58 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:58 GMT Message-Id: <202410140540.49E5ewlq089591@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: 77af8c6db25f - main - ciss: Expose tunable hw.ciss.force_transport as sysctl 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: 77af8c6db25ff6154268eb17f54f082a7eb61ea0 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=77af8c6db25ff6154268eb17f54f082a7eb61ea0 commit 77af8c6db25ff6154268eb17f54f082a7eb61ea0 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:23:54 +0000 ciss: Expose tunable hw.ciss.force_transport as sysctl Expose the hw.ciss.force_transport tuneable as a sysctl and make it writeable at runtime. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 67d74ba65526..61f8611e62ec 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -283,6 +283,9 @@ SYSCTL_INT(_hw_ciss, OID_AUTO, nop_message_heartbeat, CTLFLAG_RWTUN, */ static int ciss_force_transport = 0; TUNABLE_INT("hw.ciss.force_transport", &ciss_force_transport); +SYSCTL_INT(_hw_ciss, OID_AUTO, force_transport, CTLFLAG_RDTUN, + &ciss_force_transport, 0, + "use default (0), force simple (1) or force performant (2) transport"); /* * This tunable can force a particular interrupt delivery method to be used: From nobody Mon Oct 14 05:40:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XRmL16Q51z5ZCdw; Mon, 14 Oct 2024 05:40:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmL14Zv3z40n6; Mon, 14 Oct 2024 05:40:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mlEoj2lNf5uFBGj1livGKqz33TCFuhVY7aTh79iiBKs=; b=pXyIE343t2lrN8SDOvsYgpTLr6i7OybHG4Py3aye0DwH6AShZ4EmYNFlWVRydmDDvQGR9t iNBKV5a2o6fPtn0gKosdEQf+XkHSN8f5d9isY0FYzRMz4/thkf1A/3coyptZuLaCaclw39 Q5gMiEX+maGB+hATjSek/fzt4QfBZ1IzSK0c77RQCnJiyl/UqVEJi4jcK5ZdhAAahNfpLB vClP/nxrkn4OzQXLVTZAqJjIBUOtsIyvIDJjzwYFF2iou+Qv/eYnnQHHUvFRwfIzSOmOR1 Vp8Y1xyFBswBMcb6Bx+tP20TzYS5Nci8SK1Etu/FLzBfxITPx3RCtrWadSTaKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mlEoj2lNf5uFBGj1livGKqz33TCFuhVY7aTh79iiBKs=; b=ETD1TtIcX2MbPahLaVCxH5kmqJk/ePFaPdAI5aiIxHAw2kI6loU5Q8sVygxpKSCmAD1mWq XYGV+whHve4h6mg/Vlx2UyP/j3ahoh7gnLKPRpSwmNOC6Hzo6uzIL7oBNe4jY+LqVaBnbZ Af6bBTYKO2s8frQR1lI77/N1AcvPzF3oFBV/XMFbZlJWHqttEMZNq9QRIcVdS5gobnge6Q GpygFi6u//vjjZwLzQALYCSf3cUz1EIGBG8FaUJmCpE0304+8hMc31ldu/1aisCHdgSQ7e nYAHpbtfc5CYr7fySFZFXGbm9J83RDkigwHdK5UiSh0LmbByQo2cJDZmDRGTgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884457; a=rsa-sha256; cv=none; b=TURDtgE33Z/CFQeG7rcmdwNM2OfMOAZgu+GpU9h+ntvt9+n4Tz64qW++edZja1bSP/8kPD +wScx2PE9mPgJhdeyHm5eOZKBA4z8irv0VGnVlyoR16EItapLIyE8fzSBAH20hod/WrVaD E2uTI3+Wvb/aqzkC8+UV33KYRf2jwsc4TN+2D3XV/Ulv28rpTJBnXj/8F17d99j0t5JBSa nTSmN5QF4BQbitKEjcZ+wBRv7ZQkqYBjcv0UWU+W3BeBHPSv+WTkYewSJ07NDEY4iKNZY3 bG29SPmTIwENp7rr/JNvEMxssvxw4Ldw//1rmSGEmLZhaihd3pxdI+Kbsg0Rkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmL12w4ZzQgq; Mon, 14 Oct 2024 05:40:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5evSX089543; Mon, 14 Oct 2024 05:40:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5ev2k089540; Mon, 14 Oct 2024 05:40:57 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:57 GMT Message-Id: <202410140540.49E5ev2k089540@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: cec58bba6425 - main - ciss: Expose tunable hw.ciss.nop_message_heartbeat as sysctl 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: cec58bba6425d4b9cf19a9ede9ca0dc00c1d48e3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cec58bba6425d4b9cf19a9ede9ca0dc00c1d48e3 commit cec58bba6425d4b9cf19a9ede9ca0dc00c1d48e3 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:23:45 +0000 ciss: Expose tunable hw.ciss.nop_message_heartbeat as sysctl Expose the hw.ciss.nop_message_heartbeat tuneable as a sysctl and make it writeable at runtime. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 1875c056f32d..67d74ba65526 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -271,6 +271,9 @@ SYSCTL_INT(_hw_ciss, OID_AUTO, expose_hidden_physical, CTLFLAG_RWTUN, static unsigned int ciss_nop_message_heartbeat = 0; TUNABLE_INT("hw.ciss.nop_message_heartbeat", &ciss_nop_message_heartbeat); +SYSCTL_INT(_hw_ciss, OID_AUTO, nop_message_heartbeat, CTLFLAG_RWTUN, + &ciss_nop_message_heartbeat, 0, + "nop heartbeat messages"); /* * This tunable can force a particular transport to be used: From nobody Mon Oct 14 05:40:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XRmL42hF3z5ZCsK; Mon, 14 Oct 2024 05:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmL34ZQnz4113; Mon, 14 Oct 2024 05:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1wUS1+iejGrNqwWV/Y2OiyhTJH0zICCgZoIS2TH77w=; b=GM3Q2xKyNZeYYwmKDQFGzkzp9VkVT6Eh105yA9Lyr/dAhozP8dobYUvnLYbWTfDlvRVo0m JumM/F+KciHIT2/g1TzTno6VHdZ8nS3/9cdfq0ARgo4iimByF88OB1jbTlmvbkk0k+B5oA rLuyEyo1GlrlKFsfu+aFr/vikpJSveJPjpIIM/7/lwYMu1IDzuOpDP0ZEPp9iBBVsT9uYX jY2pCWyt4TdyfewuFI8V0UgcaT6gbL1GfKpDI2eJGN84WVvLJkhM37kBEqrTkLlNpcco53 9PbEi95nrlPLEUX1ZXV/V5XiiwrFSmrJP5XPQpnlZSuhlUf2dLQ7x/J3ZAjIWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1wUS1+iejGrNqwWV/Y2OiyhTJH0zICCgZoIS2TH77w=; b=IqZafpK02h4IxrpXwmWuzRJ4y+haQlwrcMMqAXT1NptVhSsaxK/qEaTx7Z+Xy6Z6iI9T3N I9L24J2U8nJAO8O3f44uqud7NzDguXjST/WZ1uLryO2iZg0GDg5LPF7wQM2J1atQFpxRp9 TnJSQ7M6b7DWXBiWZG7ahx5/ZTVUAayP/CKWiMNMkDapFZabA0rLKsXiqP1/5tszAPBqAP bPEj7on+QyZ3+I8lPiwH3IyQct7nzGLo1ygQj3buG+Rra2IKRonp9HySALClrIqr0bq6Z0 ZRyOeMsG9zxw8Pyk2/CAl0DXm6pWqCIMH0TzVSRLeyVDfp7L0ZFqNf8wYdgPng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884459; a=rsa-sha256; cv=none; b=aOWOaz60O7J0MDfocoMMzT1IFL/373bOr+tDmrZ2sK2TgZZs+OhMMfiRAwUMQFhAlQxBJL aYXfS/eP2dOCe0Po+Cb4odFQF3vwkg0behdvvL2NbIqKvK8GGfni8HXGOenEXuPdMOl4Ds Pxik7YFGYJub8+I8AY+5x+l87WlSWJ6ytn/opcm8FIlGZ1qc/R6UHzLUEfjUtZ+79wtvkj IADH+iNhRjGVGkoJkrjXaDwMYd28J+7s2cm2DeH4aK+lakegSYFgv8FNrT3J+JleuVnwnu ral1+5OhEhaQv2TNAYauFXkElLDUtdF6ZlFNF89sOy1MFy87ZbZkuDfjEUinwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmL348xpzQfq; Mon, 14 Oct 2024 05:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5exxT089642; Mon, 14 Oct 2024 05:40:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5exaR089639; Mon, 14 Oct 2024 05:40:59 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:59 GMT Message-Id: <202410140540.49E5exaR089639@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: 7c74337e2c3d - main - ciss: Expose tunable hw.ciss.force_interrupt as sysctl 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: 7c74337e2c3d2269d1559f4e5541c0a3f402d814 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7c74337e2c3d2269d1559f4e5541c0a3f402d814 commit 7c74337e2c3d2269d1559f4e5541c0a3f402d814 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:24:06 +0000 ciss: Expose tunable hw.ciss.force_interrupt as sysctl Expose the hw.ciss.force_interrupt tuneable as a sysctl and make it writeable at runtime. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 61f8611e62ec..bb33ad17306f 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -295,6 +295,9 @@ SYSCTL_INT(_hw_ciss, OID_AUTO, force_transport, CTLFLAG_RDTUN, */ static int ciss_force_interrupt = 0; TUNABLE_INT("hw.ciss.force_interrupt", &ciss_force_interrupt); +SYSCTL_INT(_hw_ciss, OID_AUTO, force_interrupt, CTLFLAG_RDTUN, + &ciss_force_interrupt, 0, + "use default (0), force INTx (1) or force MSIx(2) interrupts"); /************************************************************************ * CISS adapters amazingly don't have a defined programming interface From nobody Mon Oct 14 05:41: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 4XRmL65V9Sz5ZCky; Mon, 14 Oct 2024 05:41:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmL62rZYz40tb; Mon, 14 Oct 2024 05:41:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gDx2VEMsUuycjJZuJSVEhw69189jw2SIYepsjURlzXg=; b=ahR0UCW0gvQJYVNgbAgYPdiNLy506IFaQrTi7OvIzwjaArJeJ3xmdWZqOOJ5G/XExYreaX Bi2yzWWazo1N6a7Bp1ZrJaPTxIgplUItDN8WQoQ1uDU+PVN6zSunvjXSTt+B6jZw7DFML7 jn4QLuzCGlqRxl+3LLZxnXgd20URouqfh9OfnZHfDzU2p5KnXtoqGLuRM+OIgjR3yktfOS McgWnBxOrIRRDDlLHQy+AxiDmMMlzwYWvdk1FVbXm1rHShE49154XWVG6+po8pv57Hf2it 25RxI9ZrzThU3iOtfdj8sCInVjwAJez3C1lBdnmS/RrV2dDmE1tzQRsLQ80fZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gDx2VEMsUuycjJZuJSVEhw69189jw2SIYepsjURlzXg=; b=tu3vhOeGcWwlK9FfWaUGqnxl3zCceKFi7hJF/XgLRF9H8GYQ7QRlUhbfe/HaLckCnLv7FN wIxTOfAY3x8B2F4vsKExHOUB60DFzi5ya557E8H656+dGg0gJEj/Q5I451tioHumbqsGML AG8cDaI/IV6G8Hkcc1m21M32RJsx5malAHKUQ9cqeOob3B4SrIz7oQWlh9YxYr8XZNXLsH Dvo+gnHMerHs15GlycWWAkqwoMqbNTpcNo+gGhbYD4E3hYtjzHJvTkMdBA56Dgin6jFGD8 20J4np/ZI3jBbH/LoYRScUQIy184j4EmuDuSh+fBmBrfAUNS+hcDJ9CM2oTCFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884462; a=rsa-sha256; cv=none; b=uuzFVZSy1D24A5+88xzQDkpW9TdoN3wHYvHvvJQ56MGQr7FD1heBEqTjotYzOze/ycmp36 CJvcMB22FbK51w9KCIruVoON/RRvwVCfiR/SHmkcdRFcwtnor4rCbsvI+WkoiuSulA1aZM uRbXKAKs9VFARomQsMSOuK9feb69IWctLpJ5+7q+jcVnMcuTckwooHX3TL0kY654vzhSpf uF48xp8Xj9owgfwWAdwv8AaMyg2vXBMs5dYAFbK7hJcPJRmR3qZ/jMegwH7TuKqZvPymwZ JNizyf8gkDHluPk3+MbxQ+Afb/OFVdZ+Pbp0Y0A5Nay/SYxl2a59u0Y8pYzbcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmL56qdjzQfs; Mon, 14 Oct 2024 05:41:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5f1ZG089742; Mon, 14 Oct 2024 05:41:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5f1Ev089739; Mon, 14 Oct 2024 05:41:01 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:41:01 GMT Message-Id: <202410140541.49E5f1Ev089739@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: fd95966af50b - main - ciss: hw.ciss.initator_id to set the initiator ID 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: fd95966af50bab6229bc5e67fadc7ffd915f77f5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fd95966af50bab6229bc5e67fadc7ffd915f77f5 commit fd95966af50bab6229bc5e67fadc7ffd915f77f5 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:37:46 +0000 ciss: hw.ciss.initator_id to set the initiator ID Add hw.ciss.inititor_id to set the initiator to something other than the default. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index a6071735c87b..d4786302d928 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -245,7 +245,15 @@ static struct cdevsw ciss_cdevsw = { SYSCTL_NODE(_hw, OID_AUTO, ciss, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "CISS sysctl tunables"); /* - * This tunable can be used to force a specific value for transfer speed. + * This tunable can be used to force a specific initiator id + */ +static int ciss_initiator_id = CAM_TARGET_WILDCARD; +SYSCTL_INT(_hw_ciss, OID_AUTO, initiator_id, CTLFLAG_RDTUN, + &ciss_initiator_id, 0, + "force a specific initiator id"); + +/* + * This tunable can be used to force a specific initiator id */ static int ciss_base_transfer_speed = 132 * 1024; SYSCTL_INT(_hw_ciss, OID_AUTO, base_transfer_speed, CTLFLAG_RDTUN, @@ -3073,7 +3081,10 @@ ciss_cam_action(struct cam_sim *sim, union ccb *ccb) cpi->hba_misc = 0; cpi->max_target = MAX(sc->ciss_max_physical_target, sc->ciss_cfg->max_logical_supported); cpi->max_lun = 0; /* 'logical drive' channel only */ - cpi->initiator_id = sc->ciss_cfg->max_logical_supported; + if (ciss_initiator_id != CAM_TARGET_WILDCARD) + cpi->initiator_id = ciss_initiator_id; + else + cpi->initiator_id = sc->ciss_cfg->max_logical_supported; strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strlcpy(cpi->hba_vid, "CISS", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); From nobody Mon Oct 14 05:41:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XRmL53991z5ZCsM; Mon, 14 Oct 2024 05:41:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmL51vBMz411P; Mon, 14 Oct 2024 05:41:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JxvUB/j65dkYt225+PBLM/pDBDq3v0RloeJDbZXITGw=; b=X0QprHF/Z2atOB02hBVp8op6jjljxMs573KR7PBQQBpA1gYQanPKQocD9o+u6zmTMUE5FV mMKp9vyfh0V/Ksr0742HngR6cbRQE3B5qv+WieCYxdXir4QOdpo8TkzNknmj1W6HIHbap5 xNzpEGWRJCdWMwNjbylmcObTTeFSDgfpXpy5kCZ4+q621Rlfeb9TYBQOLG5BCtWuAvEM19 TP5QE9QjR0fLX8Oehnszr6B95Req+dKJazrfx6Xtmds0zjBXYxcDE7wdd4q336ExYUsL3u pGAvO4KpnyUgC6uPG+5uJbvny+a6u4NM5E355gGwD0yD3c5+ieghYLwPGnq8jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JxvUB/j65dkYt225+PBLM/pDBDq3v0RloeJDbZXITGw=; b=iZeZwTae/xmp/18t9PvFMaToh2GV4j2D8iE1tpT5Ug9EhxhTR50mHxDqtCPw/rGYxvkDh3 ShEcIzNsJNbF2KCiAWkTTn6YdxPEi6k4YhrRcHEdhF5bEb/TLQiOwcdq8l3TiYxBz4tJIG ms952C9Q5mGDfiG5vtn2FV29xEcGU2i7ekaS9dF5xfASRgOzisx8OBbaqeL5mhfbaXew8F YI3WTp3fxl483lPy6TzvCRB855a5BXIVKlWPegw/J4nXOzaeejJ7wLRdqa6dZtuVA+cqlf A79fZOuRFdJIHUgGgzcgWdSFlpWiGoAYU2jcqxxB5xUJ50icaNue9cCG86jb0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884461; a=rsa-sha256; cv=none; b=VWpMFNMbubzHNkYtRx7yggiS02Scddd/kcbq23a8tsF9GGh5AUQ6tBS8RuMO1gM/Wnz7w1 4W1HYyJWmI1uWyE6+BL6tLdxtBV9WU7D2Y/UI7KQx9raOm9ImioiIzqBbZie7+zBAnoJwh f7C0uzmo79x97rMzAdgkZuDaAES1YlKHUxTyK0HDbk2L5B+PE64odQUUUHxqbEkU1qKSrx oDQac1mMu8MhZyh6XVywxU4zd5CQsG6DCuIysy1kqe+wWTlytKuYpFQ5MhmVa4F8LHLZab AepJbSG3FtJAThaCG3y3G2G+uJcQIQwEjqORpini4642ChG7cBV7baGwgqixFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmL45p8TzQjW; Mon, 14 Oct 2024 05:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5f0nA089690; Mon, 14 Oct 2024 05:41:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5f0vR089687; Mon, 14 Oct 2024 05:41:00 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:41:00 GMT Message-Id: <202410140541.49E5f0vR089687@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: 45645518ea19 - main - ciss: Add max physical target 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: 45645518ea19ccb4761aee3a525aab2f323d37d4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=45645518ea19ccb4761aee3a525aab2f323d37d4 commit 45645518ea19ccb4761aee3a525aab2f323d37d4 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:24:15 +0000 ciss: Add max physical target Add support for tracking the maximum physical target and using that to override the maximum logical target. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 11 ++++++++++- sys/dev/ciss/cissvar.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index bb33ad17306f..a6071735c87b 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -1544,6 +1544,9 @@ ciss_init_physical(struct ciss_softc *sc) nphys, (nphys > 1 || nphys == 0) ? "s" : ""); } + /* Per-controller highest target number seen */ + sc->ciss_max_physical_target = 0; + /* * Figure out the bus mapping. * Logical buses include both the local logical bus for local arrays and @@ -1626,6 +1629,8 @@ ciss_init_physical(struct ciss_softc *sc) } ciss_filter_physical(sc, cll); + if (bootverbose || ciss_verbose) + ciss_printf(sc, "max physical target id: %d\n", sc->ciss_max_physical_target); out: if (cll != NULL) @@ -1675,6 +1680,10 @@ ciss_filter_physical(struct ciss_softc *sc, struct ciss_lun_report *cll) target = CISS_EXTRA_TARGET2(ea); sc->ciss_physical[bus][target].cp_address = cll->lun[i]; sc->ciss_physical[bus][target].cp_online = 1; + + if ((target > sc->ciss_max_physical_target) && + (cll->lun[i].physical.mode != CISS_HDR_ADDRESS_MODE_MASK_PERIPHERAL)) + sc->ciss_max_physical_target = target; } return (0); @@ -3062,7 +3071,7 @@ ciss_cam_action(struct cam_sim *sim, union ccb *ccb) cpi->hba_inquiry = PI_TAG_ABLE; /* XXX is this correct? */ cpi->target_sprt = 0; cpi->hba_misc = 0; - cpi->max_target = sc->ciss_cfg->max_logical_supported; + cpi->max_target = MAX(sc->ciss_max_physical_target, sc->ciss_cfg->max_logical_supported); cpi->max_lun = 0; /* 'logical drive' channel only */ cpi->initiator_id = sc->ciss_cfg->max_logical_supported; strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); diff --git a/sys/dev/ciss/cissvar.h b/sys/dev/ciss/cissvar.h index eec11018d279..58275f83732c 100644 --- a/sys/dev/ciss/cissvar.h +++ b/sys/dev/ciss/cissvar.h @@ -236,6 +236,7 @@ struct ciss_softc int ciss_max_bus_number; /* maximum bus number */ int ciss_max_logical_bus; int ciss_max_physical_bus; + int ciss_max_physical_target; /* highest physical target number */ struct cam_devq *ciss_cam_devq; struct cam_sim **ciss_cam_sim; From nobody Mon Oct 14 05:41: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 4XRmL75Jklz5ZCw1; Mon, 14 Oct 2024 05:41:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmL72FN2z40ww; Mon, 14 Oct 2024 05:41:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NkN+LiHHiPd5+BkbIsvbp2aWArPAZnVbi+Gp9lgDsRA=; b=PYLplp2JGHEQdhqBdu73hs06LfdqYyPwo3WLss7QeD2oUHs9SxLhQskjB9IKVErIuHvKlX S8WgGfEQN4evuHXYgOpkrGXoTtPNnvhYaBncfRAz8NxiS+2OBL6ld/Sgd5ti1cc05WPytP eNw3VEoZun+N82B8mrGZ1+8HkNTgKjVcGswMdG4vZyMqyCNCWINfA8QF41OzBQV7U+shOc XMV9ypRggzePhdLbY5oH03eQ55GT02HCeHz1bSG2t4HdA8ev0BmAFSeJRCZP6kdsB8EeW7 ZqFS/bBmY/Lan2yb8yPIqfatTXGOLwhaer15//yDA53UeaGCaVH/n+XcGnBbhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NkN+LiHHiPd5+BkbIsvbp2aWArPAZnVbi+Gp9lgDsRA=; b=s+DLwiQxTnYnyx9K625vv6yUQ6ICHks7Um6kFPsR4QbuOxfqDihJDAPvJ58G8E5dkdQMpM Jhfi4jgtMsBVXGLdk+SdB5IyHkMbAcEO760mQAzuZHgMfkTlmOLKBsUumpk238drsBrur2 fjEJHSNpV2qBebis6lGOhlb2UCf//NwqB+/q6EhNYv/r5eFSNFgCyH/2y+QPAqHlb5nsUN sffLBCm1NqRGsiUykXReY2hfRkcn0Tqb1u9/hkJdO2c+sLMJ0VmV7OLVDz0ctNdWbQB2WI xA98jJt0DoJdjL7uRE+Hblx72wNrXSlgIOvWCCKjs36R1TKUP3ycr0hKK0Hy5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884463; a=rsa-sha256; cv=none; b=GHZZhzcYIWSXNclv9Ir06ZIawIKBjcxYwZu+S19JznvdjwHQKpIsWcaP57OeDSR/WmqhW2 3ptZMOilQx0DJ/2ODt3KF5aRHlnR8WOQ6ly4QifIIJ4Fht1SGGriOMqt3830TIeSUnarPA TTYeeylBuZwmIWSC7u1cCVjqJwYUuDi5Bw3SPdiu+AJ5G2QVSpb5N2u04iWLV3yyGpjCt2 L4P8hzmd42wViMRLjfofYA4ZDaJFC4bKdvrqMq5EgrkaMceHF72UuWbWAFCBEZpQSd+LMp 1nr0Pby/XnS3waznLIDxRyv7xlr8cfOX0uM2IUaa8YDg47PNqqXGFHH4gj39Jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmL70T0dzQXJ; Mon, 14 Oct 2024 05:41:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5f2u2089790; Mon, 14 Oct 2024 05:41:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5f22t089787; Mon, 14 Oct 2024 05:41:02 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:41:02 GMT Message-Id: <202410140541.49E5f22t089787@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: b339ab149105 - main - ciss: Don't panic on null CR ciss_dequeue_notify 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: b339ab1491055d89415f85b6d1a03423193178f9 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b339ab1491055d89415f85b6d1a03423193178f9 commit b339ab1491055d89415f85b6d1a03423193178f9 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:37:46 +0000 ciss: Don't panic on null CR ciss_dequeue_notify Apparently, sometimes on hot plug/unplug, a null cr comes back from ciss_dequeue_notify. This is clearly a bug, and by ignoring it we're papering over that bug. We only ever wake the thread after enqueing a notification or setting a bit about killing the thread, so once we check the bit isn't the cause, cr can't be NULL unless something else has dequeued it. Ideally, this would be fixed, rather than papered over, but this makes a very old card somewhat more useable for external enclosures. I suspect it's a race when we set CISS_THREAD_SHUT and another flag (the latter w/o ciss_mtx held), but I don't see it and w/o hardware to reproduce it would be hard to know for sure. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index d4786302d928..d4ede91f6b35 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -4207,8 +4207,20 @@ ciss_notify_thread(void *arg) cr = ciss_dequeue_notify(sc); - if (cr == NULL) - panic("cr null"); + if (cr == NULL) { + /* + * We get a NULL message sometimes when unplugging/replugging + * stuff But this indicates a bug, since we only wake this thread + * when we (a) set the THREAD_SHUT flag, or (b) we have enqueued + * something. Since it's reported around errors, it may be a + * locking bug related to ciss_flags being modified in multiple + * threads some without ciss_mtx held. Or there's some other + * way we either fail to sleep or corrupt the ciss_flags. + */ + ciss_printf(sc, "Driver bug: NULL notify event received\n"); + continue; + } + cn = (struct ciss_notify *)cr->cr_data; switch (cn->class) { From nobody Mon Oct 14 05:41: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 4XRmL85nNlz5ZCl3; Mon, 14 Oct 2024 05:41:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmL8268Pz411t; Mon, 14 Oct 2024 05:41:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLz/CRE/sJ71GdsOxGthmENz0g8Ee99yoEZvHAl/sa0=; b=pwGQFOYzizhWjMt68ILwZsZNrLy7gaR3xgd35mTf2tP+K/boBB9gmnugfoGkcLyzoGx7yL so5Wg9YAkYCzOwan3h6iaVg5B7Vawihzdk1Z12YnF/fxrBZb7GzozC3ioqcu/vSYry4MFK fLrtrm+EF7hMiN6TmbKU/GOEn86pdHfo/sR80zc6ixihA3zLsK9nFD3x7G++DM5Fumx5e+ 5bdV/4sle+/v0k6yxtHr9MCjN4DjzcZKmUVUxxLeND49K6XNTgOAE/ZzdCmEnTXE5xYYuh 8uZvOvNXmB4iAk/kz8Fm0AO0k38DKVvXk1NdwO4mZ7797TfbJ8hc8uApNuSDsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLz/CRE/sJ71GdsOxGthmENz0g8Ee99yoEZvHAl/sa0=; b=FfmK10Opgw0jUzajQX5XgfzL7ynKrXNLJqCMLhwkqpaRVuYlKrSN6btivPBft+r+dE0kb3 2D/q/5ACZIGNbYfxlxAHy21yu3FUc54P7SRrDMeWjzcFdGoZPgGVViu6cYJPqVNii9a4le N8PykiozdODgLh1Vhaf6ZW4XFdAlrR5Ku636exsosCLSdFBSF3yHFT5hm76k/iut20MKL1 3nItisklvz1E3oCRgzfUTOx+v0nhooJQFgOsx1SFjoow7hD3AzZdiWfbqZWEs2HMNeABlt bfrzCYnMYScK2/Yql8/PwB9hxeFBQwvbqoZ89AK7Xi8fWkBP+aZjngJErMI2jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884464; a=rsa-sha256; cv=none; b=ds9VAcQZFcJL17mRFLlAQgTQs3CLMEv3+2LeDA+1zK4RGDL/5Dbbv11SZ0HhZY4FN29PLb DWrseftQFRskcyi1BJ3fp7FG5ccIUh0Rxona8xJRTTFls9m5mzpajbuidMg5GMAqi2XyYw 7BmQjd0S5Zt8yONYm431di9nzEUBiu48a8jDui5bSPUzi/Qmsk63KuQlv+ZH5oTHpXvHUZ mdbp0Usqf6fonB3dVJr5Q6tUyVA431FLEz5irANZpF3yg6rrv1p2vmoZCpcJaCkJbJwFLw 6eY2LQOuPnpJQcSr6p6+MxOeMsLFU85BBtlSJokyPiCrsbAJjfKyjrEp5IuGFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmL81byszQfv; Mon, 14 Oct 2024 05:41:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5f472089850; Mon, 14 Oct 2024 05:41:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5f4oW089847; Mon, 14 Oct 2024 05:41:04 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:41:04 GMT Message-Id: <202410140541.49E5f4oW089847@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: 793c668ec5b8 - main - UPDATING: Note higher-risk than I'd like ciss changes 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: 793c668ec5b879ff660ed87919a9d5946840a878 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=793c668ec5b879ff660ed87919a9d5946840a878 commit 793c668ec5b879ff660ed87919a9d5946840a878 Author: Warner Losh AuthorDate: 2024-10-14 05:21:27 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:37:46 +0000 UPDATING: Note higher-risk than I'd like ciss changes --- UPDATING | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPDATING b/UPDATING index aa5c21d0bf77..c2e7a658c65e 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20241013: + The ciss driver was updated to cope better with hotplug events that + caused it to panic before, and to support more than 48 drives attached + to the card. These changes were made w/o benefit of hardware for testing + and ciss(4) users should be on the lookout for regressions. + 20240729: The build now defaults to WITHOUT_CLEAN - i.e., no automatic clean is performed at the beginning of buildworld or buildkernel. The From nobody Mon Oct 14 08:08:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XRqcr0YxLz5ZPT5; Mon, 14 Oct 2024 08:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRqcq6lJdz4c1j; Mon, 14 Oct 2024 08:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728893340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PJX1eYuUG56Q5cV18ZUs3g3X7V9RUzuPo+4daaOazS0=; b=dsfCwILxf+DYpFnUZbA+s0lWOtsyVuql2FEIWLXKqHoDi+xAzotZ45+U2iEouOZ2ZUx6VX C5HhJRwKZ6/cRN3lYF7jURAxCk+aNa5bGvWZOhXEDnF6i7AObrwWY278Zhv6HZQpaasRsv e6TYAYAEavjdIU97/AXOyoxMo8v6xopFsIf9gKYZugAKeMqzENoYFCKycNLD28yjck6HK1 VO+RiXClojkH5YiTS2QfM63quQpmNyXh/K/UWOuEJXXitQMw/2ewisF3lccMeCGDXSdfER gYfS66uBRjrLyVUyaI2FiSoXCMTY+xSM3lWfQOYMvY3kjRwpx/X+1fU4vtU9oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728893339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PJX1eYuUG56Q5cV18ZUs3g3X7V9RUzuPo+4daaOazS0=; b=WWQPWcZ4Y/d8v86kcMX+RjB5j1+7A4fpVRqWajXkzsv1pnbtg/qmtZpnKMukvsoZ5IusB9 fGTYlVqSUvQ8i1ptq5o/llQLVTFbU+2zLfA+h6gkZjVKtbdk3XnD9i0C+n6Iz/bnB63vLo qlmNMrFILuHpMe5BLSAJeijjV9jl38jZgwHLRLgdL43a1mnCIzzHwqDymrGn5m1FLK7sge 5gTUySzhJPhyYDjyzysRNUa+K1EKspliOJC0fL79aeMQZVMZLto7RRzloZfHxQ4gqy0LNU 7KDKVm8kK7Z/Hce7i1D4OyvCzQjNPYv5hwZR5UUbGIMQDe4RYVndBziQibBbWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728893339; a=rsa-sha256; cv=none; b=fRAPKc5zDDbNN4pRXFk4cI2WYs0wC2MdvInYEtJD73o01uXMmDgkzlllr/4pxXdCZ2qByP vhWN0OUIipVLunvdoI9rrAdC5cSviyQs97ArzkdJyX1P5Rhw1yMOpXFcOh/PGItoX0L0uI tdcttlCqnaVoDb2w1mDJzQ+HfZTx67klsvz+x5EGmPRpBeK4EjSwDp16a97iBwjSghTIrW 7bDyjg3wh59GC8xII6eaUQxX1KTIDreQ7ZpvSw+2/foAwatqCzWDgmCL0xX1vcos0TtGBR luaqW3df9FCJjYzm//FyBUCJOLrqmGLLYMko12Pf7M5Cz69gNEX5Uqo/qnbs9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRqcq6BNgzW8P; Mon, 14 Oct 2024 08:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E88xfq031993; Mon, 14 Oct 2024 08:08:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E88x4H031990; Mon, 14 Oct 2024 08:08:59 GMT (envelope-from git) Date: Mon, 14 Oct 2024 08:08:59 GMT Message-Id: <202410140808.49E88x4H031990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 4bf34c597c44 - main - md(4): always trim the last partial sector 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/main X-Git-Reftype: branch X-Git-Commit: 4bf34c597c44a2393ac5ec483e9cecac128d8202 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4bf34c597c44a2393ac5ec483e9cecac128d8202 commit 4bf34c597c44a2393ac5ec483e9cecac128d8202 Author: Konstantin Belousov AuthorDate: 2024-10-13 21:28:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-14 08:08:21 +0000 md(4): always trim the last partial sector Do it also for the preloaded disk, in addition to the dynamically configured device. This is needed to avoid geom checking alignment and panicing on read of the last sector, e.g. for partition schemes and label tasting. PR: 281978 Reported by: bz Reviewed by: bz, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47102 --- sys/dev/md/md.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index af05373ae1d8..5d4f91d05917 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1297,6 +1297,7 @@ mdinit(struct md_s *sc) { struct g_geom *gp; struct g_provider *pp; + unsigned remn; g_topology_lock(); gp = g_new_geomf(&g_md_class, "md%d", sc->unit); @@ -1305,6 +1306,13 @@ mdinit(struct md_s *sc) devstat_remove_entry(pp->stat); pp->stat = NULL; pp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; + /* Prune off any residual fractional sector. */ + remn = sc->mediasize % sc->sectorsize; + if (remn != 0) { + printf("md%d: truncating fractional last sector by %u bytes\n", + sc->unit, remn); + sc->mediasize -= remn; + } pp->mediasize = sc->mediasize; pp->sectorsize = sc->sectorsize; switch (sc->type) { @@ -1674,7 +1682,7 @@ kern_mdattach_locked(struct thread *td, struct md_req *mdr) { struct md_s *sc; unsigned sectsize; - int error, i; + int error; sx_assert(&md_sx, SA_XLOCKED); @@ -1746,10 +1754,6 @@ err_after_new: return (error); } - /* Prune off any residual fractional sector */ - i = sc->mediasize % sc->sectorsize; - sc->mediasize -= i; - mdinit(sc); return (0); } From nobody Mon Oct 14 08:23: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 4XRqxx5twzz5ZPwc; Mon, 14 Oct 2024 08:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRqxx57Fwz4dKF; Mon, 14 Oct 2024 08:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728894229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZfqrGneGsQnQv6Gsdece9Ksb/QBhNOT1b0+8oTNlaOg=; b=Tel2kfSc6DV7OVrH3+Sxtp2CXKUiZp7u3BFysMwnqmEn6mzDKLo52YEWYj4TkdpSZXYteD y++OoazUXwA0uW/tSq7iyZSfpM0KHyxhb9jmXEV8zz3QdtAHSuwPMExq1SjA8g4iAmBkfN yZAoP8yShg+dHvjQNux9GksgErOgGw4IljZ/X+1tTqSvtskirUexfnOVo4Ud6xMxsSocVu ShagM8PcgD7r4iHSofIMtAaiAQqP3W9cBrqr94/PdELfu4MJrvxH8IjZotpoxKms9Cr0YP jmAJAQpbGyMcOB/CR6iAhxpQFaAaqv4dsmg5ItqothmCt0ZvYlYqZR/0D/TqDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728894229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZfqrGneGsQnQv6Gsdece9Ksb/QBhNOT1b0+8oTNlaOg=; b=dSkROeKzr9UhoxsZP+HFztA0sS/w314MdNbRilybPZ0/ThHCplohqJDSEVmWCH2YzxujdG WCIQsirpMS/ZpHSBCSFMP7xJ+US4Dbl1C/iMvclb+B3Ul6fc/EQLo7kC9WrfgfBdBnL5gb 5Q0JIcVj+8akvsVlSeLhm9jBv8dNXitcuPTg8KucT2rWLT+bSAxyq8YSgyr3HZ2wzO4oUJ /ABTTbdsgJhCrtQUhlmeyiFqAMIzWvtidUvpkVpL5I11SO+12mFVPLAiNYDB5Du9kM8kGC oDKzsX62ogAMW4e6ZsHIujoxc0kZeVGpkETwSA8KjixquOi15ANERd/h1gEC1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728894229; a=rsa-sha256; cv=none; b=Lj4TJ9//yBASVymH4t2KmKcPCH1tfjRUP9M/uXKgRV/UaSi14Pt6YJQoY9I7pYmKrBlegR JbgiFSaEwRm2FBma20Dqg4HvkC0sQeV3wm36/C2YFGsKo3uiq0S/moncuUlbXL7RCofvr/ W8jCWxYfi57zHFu7X7D7IlHiD+jouD04qhSBZX3SlSNTxrszjo3358Y1fUCf0yKRncbt9v 0pxIarhv+ZpqR7p5/lHxYLp8W8KLZK2OKStmuNWuu3ZcX+1MZOMG+Wk3Iv3pz8KG6NbfCk iX5FNO6uux8/jX1DoMcJ3fsljHkHqz9VBBx7gnGD+xkX3+9S/M7yu1xY6L9iuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRqxx4dy7zWvn; Mon, 14 Oct 2024 08:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E8NnjQ064683; Mon, 14 Oct 2024 08:23:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E8Nnar064680; Mon, 14 Oct 2024 08:23:49 GMT (envelope-from git) Date: Mon, 14 Oct 2024 08:23:49 GMT Message-Id: <202410140823.49E8Nnar064680@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hartmut Brandt Subject: git: bc7afab6a1fa - main - Fix compilation of bsnmp 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: harti X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc7afab6a1fa4294df0b8d7d461bd0bdc542fbfe Auto-Submitted: auto-generated The branch main has been updated by harti: URL: https://cgit.FreeBSD.org/src/commit/?id=bc7afab6a1fa4294df0b8d7d461bd0bdc542fbfe commit bc7afab6a1fa4294df0b8d7d461bd0bdc542fbfe Author: Hartmut Brandt AuthorDate: 2024-10-14 08:16:03 +0000 Commit: Hartmut Brandt CommitDate: 2024-10-14 08:23:18 +0000 Fix compilation of bsnmp tests. PR: 277539 Submitted by: John F. Carr --- tools/test/bsnmp/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/test/bsnmp/Makefile b/tools/test/bsnmp/Makefile index c3bcf832ff33..88bfcfd3c069 100644 --- a/tools/test/bsnmp/Makefile +++ b/tools/test/bsnmp/Makefile @@ -5,6 +5,7 @@ PROG_CXX=ctest SRCS= main.cc asn1.cc snmp_parse_server.cc CFLAGS += -I/${CONTRIB}/lib CXXFLAGS+= -std=c++2a +CXXWARNFLAGS += -Wno-missing-variable-declarations LIBADD= bsnmp CFLAGS += -DBOGUS_CVE_2019_5610_FIX From nobody Mon Oct 14 08:44: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 4XRrQ32d60z5ZRQq; Mon, 14 Oct 2024 08:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRrQ327lzz4gF9; Mon, 14 Oct 2024 08:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728895483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4uorrpNnGa0JgfjT2T58OR9j00ibmLShDA1sFeluapE=; b=dWLTG+pTmR9zQb6LLYlBlJfNPtl6NHPHKT9u5d3bv7FVdPXdEgQAVGGAIB5SFbnbazsGaO wOvQXeFuYF6p6IKYaQTzmG+4DJ3BDj+XgSM8bIaSHb9wFUkxvkNuqonhLWfzYXVjSiwrma gwPdTL5qkAy3/fHv9Q42XIxJrYAsQgZecoue+ThIMhy59s70cb+uZ5OCrjCdgavmLmQbsk mIi1g2Nx93Jz5NY1PizZucwb4o3Hq9/37xVxb+qcjk8EkMAHjiJYw7RHkeRnlC3AZOa8JQ IdF8XlQz8Lqzp825wHCAOaF1sRzUW12JWO9PeL1dZWmWzYV1I2xWv+Xc6Fyv1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728895483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4uorrpNnGa0JgfjT2T58OR9j00ibmLShDA1sFeluapE=; b=XH6XyemccoM0glFl8AEnZlgecoOhL5hblR6po8EOAAufQlxuhKVQso6ZZhha5/vNHN8nMI z03vcJh65nSkx2hISbFByA5PH/RmoSuE/0YG8a03eRysZeWsB/XknJNrKQtc7DnP6Hz7fk zNoZG4RXC7SON3NY6VHV6yEtEtkcNw56dvKibkuZI9I4C41EzakyJMF3wTZF/xkWmddVPY mKodowMeeud57uPuUJi1HmnW3Y1coi/y0J1g5LQfoIkCUd6vbXjk68ooBm9/90Zl1tdg6P 7KVSUKvNtfJfCJDr9H1qfurtEIaPzZJYVwDQL4MQyfSDZrEypDTNwOJ9AfO5qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728895483; a=rsa-sha256; cv=none; b=E16w0qXQKmuM5udVFCATlin/H74O5D17RPZA5m0QTi5/xeGcJKBEa4PpNEEY0Skf6CZQFh 6SD0NLkJ9RTOB0EML2nYVxhCZHwRGFJMFe3OqegZF4V7wiD2nF8wNV5QeDYtDuUaoc/g9Z V9o3w+s4RoLqjQBGRLYPowI9hsb5z7BBB5BO8dGni4tuLpibRy6cZ5u09MyFJDPKgJz0fz d1yd3f6H1Q98SOrP+467QyoCGeu3Y7j24hjn6muFnKqoxnCK0YK0zClHl+dVLqPLJehYO6 Uzdt5zllKo9jHrESpMqlG+3McXY7wFSkbfmyCnqiUCvmsp9HDtkp/XqK1aqOhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRrQ31kypzX5m; Mon, 14 Oct 2024 08:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E8ihqe098749; Mon, 14 Oct 2024 08:44:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E8ihGq098746; Mon, 14 Oct 2024 08:44:43 GMT (envelope-from git) Date: Mon, 14 Oct 2024 08:44:43 GMT Message-Id: <202410140844.49E8ihGq098746@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: bd490be57438 - main - w(1): fix libxo output being locale dependant 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: bd490be57438a82c22d1274bc58d51142b63f4a0 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=bd490be57438a82c22d1274bc58d51142b63f4a0 commit bd490be57438a82c22d1274bc58d51142b63f4a0 Author: Baptiste Daroussin AuthorDate: 2024-10-14 07:37:46 +0000 Commit: Baptiste Daroussin CommitDate: 2024-10-14 08:43:38 +0000 w(1): fix libxo output being locale dependant by being locale dependant the json export is invalid in locales where the separator for float is a comma. The Json and the XML are invalid for login-time when days contains contains characters which are not unicode. Forcing locale to be C, makes this json and xml output valid and also identical accross locales, so reliable for parsers PR: 276304 Reported by: Vedran Miletic --- usr.bin/w/w.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 47899d0b38e0..ac1df96077d3 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -135,14 +135,16 @@ main(int argc, char *argv[]) char buf[MAXHOSTNAMELEN], fn[MAXHOSTNAMELEN]; char *dot; - (void)setlocale(LC_ALL, ""); - use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); - use_comma = (*nl_langinfo(RADIXCHAR) != ','); argc = xo_parse_args(argc, argv); if (argc < 0) exit(1); + if (xo_get_style(NULL) == XO_STYLE_TEXT) { + setlocale(LC_ALL, ""); + } + use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); + use_comma = (*nl_langinfo(RADIXCHAR) != ','); /* Are we w(1) or uptime(1)? */ if (strcmp(basename(argv[0]), "uptime") == 0) { wcmd = 0; From nobody Mon Oct 14 08:44: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 4XRrQ45sL8z5ZRLs; Mon, 14 Oct 2024 08:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRrQ45JpDz4gH7; Mon, 14 Oct 2024 08:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728895484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1CnIqMTPNkUpeo8lQ4mzb4IN3glqmfIgqu5DcIskIjE=; b=DHgLtxQVMw5Aw5gHbhu6VMJ/wH8/SEj3pZLnkuKuB8NzbaWcRiYyTsWkvg2s88yy9wQs4F vh+AjvJWyaIUwj7IoGED5jFl8YRjLa1BO7/nNz6THzFZJAsnZBJHQCouTcX0x61/dRgh4s 2co9oL86F+fsdI9dXPjLGwGqgC3OgP2TaZq5+vKj5V9Uc1kuz22WwDcGmQCWWIBZun9Mx+ VqpDHw1h9PzZvtn3TXQsselL2ZcaKAvB0zzZXGEpezegyS8LUUXXf2/tHQmjt/DoezC4lw HVjA4BEeuPI+aabjN7JWhLcaFX240u51zRWRFmQoUt/oB29pe+7hNMdK3yTM/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728895484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1CnIqMTPNkUpeo8lQ4mzb4IN3glqmfIgqu5DcIskIjE=; b=nfTiD+Xx0YnFssNJuZqjyW+mCW/gT9V5UlLRDYAPwqSIOgTKJ6HysFiiP4EacyJku1loI9 TPv2vPaPSBk5+41GA/l/gY9h23uoVlgbZZa3hVzA19aqnru9oQ8bpsgXhEfhpybvFqzCki wEWbL4hj2RI6yaH7toEsV/qs4s4yAenMYumBMEZ/aimH9kb5D53UyDzNelToaQzZNvEciC WMqzzbxL9z4SaxppgH27n5RrrQIsrg3pxsquayU8decffsuW3m6ZE8BSU7BC00sgI2K5JL miA/H9CsNEMoXgmldBxfUihX+7+5RGYx037DoL6BYYANhY2JxqeA+o/1JlavzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728895484; a=rsa-sha256; cv=none; b=kWeDdJ/04BijiG++pbH+WH6Z0agRwpirttzDTFsVoyVKXgasTgrSC+vjZewO8i5HffCc+p cJh3c4uYaHdPqEnLExJ9xaorGlP3VXGc2YNbzKesJVDV60xFI2FYHJr18EGBkAS2+8k8wu CCzkH3u+Uw1ccti1wcOhccQqbvgQiK0AA/j6tsXAesI6cxxGslI50kK8fFBJ8ntmBt/UJr Kd6zftOv4mQ3hsTJGaV+dlI11EWCgNRcV3+cxow78CWpsexoBSjC3qdJjyr3RZBGjsUT/V YrLTeZdkrSmJ3C8RfwQf3025yzs9ys5SMrAVtywhZX2Y2w9O+bRhX+mFGqhOWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRrQ44rHvzX5n; Mon, 14 Oct 2024 08:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E8iiph098807; Mon, 14 Oct 2024 08:44:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E8ii93098804; Mon, 14 Oct 2024 08:44:44 GMT (envelope-from git) Date: Mon, 14 Oct 2024 08:44:44 GMT Message-Id: <202410140844.49E8ii93098804@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: 18626e1f865d - main - Unicode: prepare update to unicode 16 and CLDR 45 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: 18626e1f865d0be288252b791a2465c577163e0c Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=18626e1f865d0be288252b791a2465c577163e0c commit 18626e1f865d0be288252b791a2465c577163e0c Author: Baptiste Daroussin AuthorDate: 2024-10-14 08:41:05 +0000 Commit: Baptiste Daroussin CommitDate: 2024-10-14 08:43:38 +0000 Unicode: prepare update to unicode 16 and CLDR 45 --- tools/tools/locale/Makefile | 4 +- tools/tools/locale/etc/final-maps/map.UTF-8 | 631 ++++++++++++++++++++++++++- tools/tools/locale/etc/final-maps/widths.txt | 629 +++++++++++++++++++++++++- 3 files changed, 1259 insertions(+), 5 deletions(-) diff --git a/tools/tools/locale/Makefile b/tools/tools/locale/Makefile index f3b399b50551..a652815b7930 100644 --- a/tools/tools/locale/Makefile +++ b/tools/tools/locale/Makefile @@ -7,8 +7,8 @@ # Modified by John Marino to suit DragonFly needs # -CLDRVERSION= 43.0 -UCDVERSION= 15.0.0 +CLDRVERSION= 45.0 +UCDVERSION= 16.0.0 .if ${.CURDIR} == ${.OBJDIR} .error Do make obj first. diff --git a/tools/tools/locale/etc/final-maps/map.UTF-8 b/tools/tools/locale/etc/final-maps/map.UTF-8 index 6cf3951aca38..6c3431c99b90 100644 --- a/tools/tools/locale/etc/final-maps/map.UTF-8 +++ b/tools/tools/locale/etc/final-maps/map.UTF-8 @@ -5,9 +5,9 @@ # charset: UTF-8 ###################### ################################################################################################# -# Copyright © 1991-2023 Unicode, Inc. +# Copyright © 1991-2024 Unicode, Inc. # For terms of use, see http://www.unicode.org/copyright.html -# SPDX-License-Identifier: Unicode-DFS-2016 +# SPDX-License-Identifier: Unicode-3.0 # CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/) "UTF-8" @@ -11372,6 +11372,10 @@ CHARMAP \xE2\xBF\xB9 \xE2\xBF\xBA \xE2\xBF\xBB + \xE2\xBF\xBC + \xE2\xBF\xBD + \xE2\xBF\xBE + \xE2\xBF\xBF \xE3\x80\x80 \xE3\x80\x81 \xE3\x80\x82 @@ -11846,6 +11850,7 @@ CHARMAP \xE3\x87\xA1 \xE3\x87\xA2 \xE3\x87\xA3 + \xE3\x87\xAF \xE3\x87\xB0 \xE3\x87\xB1 \xE3\x87\xB2 @@ -145780,6 +145785,628 @@ CHARMAP \xF0\xAE\xAF\x9E \xF0\xAE\xAF\x9F \xF0\xAE\xAF\xA0 + \xF0\xAE\xAF\xB0 + \xF0\xAE\xAF\xB1 + \xF0\xAE\xAF\xB2 + \xF0\xAE\xAF\xB3 + \xF0\xAE\xAF\xB4 + \xF0\xAE\xAF\xB5 + \xF0\xAE\xAF\xB6 + \xF0\xAE\xAF\xB7 + \xF0\xAE\xAF\xB8 + \xF0\xAE\xAF\xB9 + \xF0\xAE\xAF\xBA + \xF0\xAE\xAF\xBB + \xF0\xAE\xAF\xBC + \xF0\xAE\xAF\xBD + \xF0\xAE\xAF\xBE + \xF0\xAE\xAF\xBF + \xF0\xAE\xB0\x80 + \xF0\xAE\xB0\x81 + \xF0\xAE\xB0\x82 + \xF0\xAE\xB0\x83 + \xF0\xAE\xB0\x84 + \xF0\xAE\xB0\x85 + \xF0\xAE\xB0\x86 + \xF0\xAE\xB0\x87 + \xF0\xAE\xB0\x88 + \xF0\xAE\xB0\x89 + \xF0\xAE\xB0\x8A + \xF0\xAE\xB0\x8B + \xF0\xAE\xB0\x8C + \xF0\xAE\xB0\x8D + \xF0\xAE\xB0\x8E + \xF0\xAE\xB0\x8F + \xF0\xAE\xB0\x90 + \xF0\xAE\xB0\x91 + \xF0\xAE\xB0\x92 + \xF0\xAE\xB0\x93 + \xF0\xAE\xB0\x94 + \xF0\xAE\xB0\x95 + \xF0\xAE\xB0\x96 + \xF0\xAE\xB0\x97 + \xF0\xAE\xB0\x98 + \xF0\xAE\xB0\x99 + \xF0\xAE\xB0\x9A + \xF0\xAE\xB0\x9B + \xF0\xAE\xB0\x9C + \xF0\xAE\xB0\x9D + \xF0\xAE\xB0\x9E + \xF0\xAE\xB0\x9F + \xF0\xAE\xB0\xA0 + \xF0\xAE\xB0\xA1 + \xF0\xAE\xB0\xA2 + \xF0\xAE\xB0\xA3 + \xF0\xAE\xB0\xA4 + \xF0\xAE\xB0\xA5 + \xF0\xAE\xB0\xA6 + \xF0\xAE\xB0\xA7 + \xF0\xAE\xB0\xA8 + \xF0\xAE\xB0\xA9 + \xF0\xAE\xB0\xAA + \xF0\xAE\xB0\xAB + \xF0\xAE\xB0\xAC + \xF0\xAE\xB0\xAD + \xF0\xAE\xB0\xAE + \xF0\xAE\xB0\xAF + \xF0\xAE\xB0\xB0 + \xF0\xAE\xB0\xB1 + \xF0\xAE\xB0\xB2 + \xF0\xAE\xB0\xB3 + \xF0\xAE\xB0\xB4 + \xF0\xAE\xB0\xB5 + \xF0\xAE\xB0\xB6 + \xF0\xAE\xB0\xB7 + \xF0\xAE\xB0\xB8 + \xF0\xAE\xB0\xB9 + \xF0\xAE\xB0\xBA + \xF0\xAE\xB0\xBB + \xF0\xAE\xB0\xBC + \xF0\xAE\xB0\xBD + \xF0\xAE\xB0\xBE + \xF0\xAE\xB0\xBF + \xF0\xAE\xB1\x80 + \xF0\xAE\xB1\x81 + \xF0\xAE\xB1\x82 + \xF0\xAE\xB1\x83 + \xF0\xAE\xB1\x84 + \xF0\xAE\xB1\x85 + \xF0\xAE\xB1\x86 + \xF0\xAE\xB1\x87 + \xF0\xAE\xB1\x88 + \xF0\xAE\xB1\x89 + \xF0\xAE\xB1\x8A + \xF0\xAE\xB1\x8B + \xF0\xAE\xB1\x8C + \xF0\xAE\xB1\x8D + \xF0\xAE\xB1\x8E + \xF0\xAE\xB1\x8F + \xF0\xAE\xB1\x90 + \xF0\xAE\xB1\x91 + \xF0\xAE\xB1\x92 + \xF0\xAE\xB1\x93 + \xF0\xAE\xB1\x94 + \xF0\xAE\xB1\x95 + \xF0\xAE\xB1\x96 + \xF0\xAE\xB1\x97 + \xF0\xAE\xB1\x98 + \xF0\xAE\xB1\x99 + \xF0\xAE\xB1\x9A + \xF0\xAE\xB1\x9B + \xF0\xAE\xB1\x9C + \xF0\xAE\xB1\x9D + \xF0\xAE\xB1\x9E + \xF0\xAE\xB1\x9F + \xF0\xAE\xB1\xA0 + \xF0\xAE\xB1\xA1 + \xF0\xAE\xB1\xA2 + \xF0\xAE\xB1\xA3 + \xF0\xAE\xB1\xA4 + \xF0\xAE\xB1\xA5 + \xF0\xAE\xB1\xA6 + \xF0\xAE\xB1\xA7 + \xF0\xAE\xB1\xA8 + \xF0\xAE\xB1\xA9 + \xF0\xAE\xB1\xAA + \xF0\xAE\xB1\xAB + \xF0\xAE\xB1\xAC + \xF0\xAE\xB1\xAD + \xF0\xAE\xB1\xAE + \xF0\xAE\xB1\xAF + \xF0\xAE\xB1\xB0 + \xF0\xAE\xB1\xB1 + \xF0\xAE\xB1\xB2 + \xF0\xAE\xB1\xB3 + \xF0\xAE\xB1\xB4 + \xF0\xAE\xB1\xB5 + \xF0\xAE\xB1\xB6 + \xF0\xAE\xB1\xB7 + \xF0\xAE\xB1\xB8 + \xF0\xAE\xB1\xB9 + \xF0\xAE\xB1\xBA + \xF0\xAE\xB1\xBB + \xF0\xAE\xB1\xBC + \xF0\xAE\xB1\xBD + \xF0\xAE\xB1\xBE + \xF0\xAE\xB1\xBF + \xF0\xAE\xB2\x80 + \xF0\xAE\xB2\x81 + \xF0\xAE\xB2\x82 + \xF0\xAE\xB2\x83 + \xF0\xAE\xB2\x84 + \xF0\xAE\xB2\x85 + \xF0\xAE\xB2\x86 + \xF0\xAE\xB2\x87 + \xF0\xAE\xB2\x88 + \xF0\xAE\xB2\x89 + \xF0\xAE\xB2\x8A + \xF0\xAE\xB2\x8B + \xF0\xAE\xB2\x8C + \xF0\xAE\xB2\x8D + \xF0\xAE\xB2\x8E + \xF0\xAE\xB2\x8F + \xF0\xAE\xB2\x90 + \xF0\xAE\xB2\x91 + \xF0\xAE\xB2\x92 + \xF0\xAE\xB2\x93 + \xF0\xAE\xB2\x94 + \xF0\xAE\xB2\x95 + \xF0\xAE\xB2\x96 + \xF0\xAE\xB2\x97 + \xF0\xAE\xB2\x98 + \xF0\xAE\xB2\x99 + \xF0\xAE\xB2\x9A + \xF0\xAE\xB2\x9B + \xF0\xAE\xB2\x9C + \xF0\xAE\xB2\x9D + \xF0\xAE\xB2\x9E + \xF0\xAE\xB2\x9F + \xF0\xAE\xB2\xA0 + \xF0\xAE\xB2\xA1 + \xF0\xAE\xB2\xA2 + \xF0\xAE\xB2\xA3 + \xF0\xAE\xB2\xA4 + \xF0\xAE\xB2\xA5 + \xF0\xAE\xB2\xA6 + \xF0\xAE\xB2\xA7 + \xF0\xAE\xB2\xA8 + \xF0\xAE\xB2\xA9 + \xF0\xAE\xB2\xAA + \xF0\xAE\xB2\xAB + \xF0\xAE\xB2\xAC + \xF0\xAE\xB2\xAD + \xF0\xAE\xB2\xAE + \xF0\xAE\xB2\xAF + \xF0\xAE\xB2\xB0 + \xF0\xAE\xB2\xB1 + \xF0\xAE\xB2\xB2 + \xF0\xAE\xB2\xB3 + \xF0\xAE\xB2\xB4 + \xF0\xAE\xB2\xB5 + \xF0\xAE\xB2\xB6 + \xF0\xAE\xB2\xB7 + \xF0\xAE\xB2\xB8 + \xF0\xAE\xB2\xB9 + \xF0\xAE\xB2\xBA + \xF0\xAE\xB2\xBB + \xF0\xAE\xB2\xBC + \xF0\xAE\xB2\xBD + \xF0\xAE\xB2\xBE + \xF0\xAE\xB2\xBF + \xF0\xAE\xB3\x80 + \xF0\xAE\xB3\x81 + \xF0\xAE\xB3\x82 + \xF0\xAE\xB3\x83 + \xF0\xAE\xB3\x84 + \xF0\xAE\xB3\x85 + \xF0\xAE\xB3\x86 + \xF0\xAE\xB3\x87 + \xF0\xAE\xB3\x88 + \xF0\xAE\xB3\x89 + \xF0\xAE\xB3\x8A + \xF0\xAE\xB3\x8B + \xF0\xAE\xB3\x8C + \xF0\xAE\xB3\x8D + \xF0\xAE\xB3\x8E + \xF0\xAE\xB3\x8F + \xF0\xAE\xB3\x90 + \xF0\xAE\xB3\x91 + \xF0\xAE\xB3\x92 + \xF0\xAE\xB3\x93 + \xF0\xAE\xB3\x94 + \xF0\xAE\xB3\x95 + \xF0\xAE\xB3\x96 + \xF0\xAE\xB3\x97 + \xF0\xAE\xB3\x98 + \xF0\xAE\xB3\x99 + \xF0\xAE\xB3\x9A + \xF0\xAE\xB3\x9B + \xF0\xAE\xB3\x9C + \xF0\xAE\xB3\x9D + \xF0\xAE\xB3\x9E + \xF0\xAE\xB3\x9F + \xF0\xAE\xB3\xA0 + \xF0\xAE\xB3\xA1 + \xF0\xAE\xB3\xA2 + \xF0\xAE\xB3\xA3 + \xF0\xAE\xB3\xA4 + \xF0\xAE\xB3\xA5 + \xF0\xAE\xB3\xA6 + \xF0\xAE\xB3\xA7 + \xF0\xAE\xB3\xA8 + \xF0\xAE\xB3\xA9 + \xF0\xAE\xB3\xAA + \xF0\xAE\xB3\xAB + \xF0\xAE\xB3\xAC + \xF0\xAE\xB3\xAD + \xF0\xAE\xB3\xAE + \xF0\xAE\xB3\xAF + \xF0\xAE\xB3\xB0 + \xF0\xAE\xB3\xB1 + \xF0\xAE\xB3\xB2 + \xF0\xAE\xB3\xB3 + \xF0\xAE\xB3\xB4 + \xF0\xAE\xB3\xB5 + \xF0\xAE\xB3\xB6 + \xF0\xAE\xB3\xB7 + \xF0\xAE\xB3\xB8 + \xF0\xAE\xB3\xB9 + \xF0\xAE\xB3\xBA + \xF0\xAE\xB3\xBB + \xF0\xAE\xB3\xBC + \xF0\xAE\xB3\xBD + \xF0\xAE\xB3\xBE + \xF0\xAE\xB3\xBF + \xF0\xAE\xB4\x80 + \xF0\xAE\xB4\x81 + \xF0\xAE\xB4\x82 + \xF0\xAE\xB4\x83 + \xF0\xAE\xB4\x84 + \xF0\xAE\xB4\x85 + \xF0\xAE\xB4\x86 + \xF0\xAE\xB4\x87 + \xF0\xAE\xB4\x88 + \xF0\xAE\xB4\x89 + \xF0\xAE\xB4\x8A + \xF0\xAE\xB4\x8B + \xF0\xAE\xB4\x8C + \xF0\xAE\xB4\x8D + \xF0\xAE\xB4\x8E + \xF0\xAE\xB4\x8F + \xF0\xAE\xB4\x90 + \xF0\xAE\xB4\x91 + \xF0\xAE\xB4\x92 + \xF0\xAE\xB4\x93 + \xF0\xAE\xB4\x94 + \xF0\xAE\xB4\x95 + \xF0\xAE\xB4\x96 + \xF0\xAE\xB4\x97 + \xF0\xAE\xB4\x98 + \xF0\xAE\xB4\x99 + \xF0\xAE\xB4\x9A + \xF0\xAE\xB4\x9B + \xF0\xAE\xB4\x9C + \xF0\xAE\xB4\x9D + \xF0\xAE\xB4\x9E + \xF0\xAE\xB4\x9F + \xF0\xAE\xB4\xA0 + \xF0\xAE\xB4\xA1 + \xF0\xAE\xB4\xA2 + \xF0\xAE\xB4\xA3 + \xF0\xAE\xB4\xA4 + \xF0\xAE\xB4\xA5 + \xF0\xAE\xB4\xA6 + \xF0\xAE\xB4\xA7 + \xF0\xAE\xB4\xA8 + \xF0\xAE\xB4\xA9 + \xF0\xAE\xB4\xAA + \xF0\xAE\xB4\xAB + \xF0\xAE\xB4\xAC + \xF0\xAE\xB4\xAD + \xF0\xAE\xB4\xAE + \xF0\xAE\xB4\xAF + \xF0\xAE\xB4\xB0 + \xF0\xAE\xB4\xB1 + \xF0\xAE\xB4\xB2 + \xF0\xAE\xB4\xB3 + \xF0\xAE\xB4\xB4 + \xF0\xAE\xB4\xB5 + \xF0\xAE\xB4\xB6 + \xF0\xAE\xB4\xB7 + \xF0\xAE\xB4\xB8 + \xF0\xAE\xB4\xB9 + \xF0\xAE\xB4\xBA + \xF0\xAE\xB4\xBB + \xF0\xAE\xB4\xBC + \xF0\xAE\xB4\xBD + \xF0\xAE\xB4\xBE + \xF0\xAE\xB4\xBF + \xF0\xAE\xB5\x80 + \xF0\xAE\xB5\x81 + \xF0\xAE\xB5\x82 + \xF0\xAE\xB5\x83 + \xF0\xAE\xB5\x84 + \xF0\xAE\xB5\x85 + \xF0\xAE\xB5\x86 + \xF0\xAE\xB5\x87 + \xF0\xAE\xB5\x88 + \xF0\xAE\xB5\x89 + \xF0\xAE\xB5\x8A + \xF0\xAE\xB5\x8B + \xF0\xAE\xB5\x8C + \xF0\xAE\xB5\x8D + \xF0\xAE\xB5\x8E + \xF0\xAE\xB5\x8F + \xF0\xAE\xB5\x90 + \xF0\xAE\xB5\x91 + \xF0\xAE\xB5\x92 + \xF0\xAE\xB5\x93 + \xF0\xAE\xB5\x94 + \xF0\xAE\xB5\x95 + \xF0\xAE\xB5\x96 + \xF0\xAE\xB5\x97 + \xF0\xAE\xB5\x98 + \xF0\xAE\xB5\x99 + \xF0\xAE\xB5\x9A + \xF0\xAE\xB5\x9B + \xF0\xAE\xB5\x9C + \xF0\xAE\xB5\x9D + \xF0\xAE\xB5\x9E + \xF0\xAE\xB5\x9F + \xF0\xAE\xB5\xA0 + \xF0\xAE\xB5\xA1 + \xF0\xAE\xB5\xA2 + \xF0\xAE\xB5\xA3 + \xF0\xAE\xB5\xA4 + \xF0\xAE\xB5\xA5 + \xF0\xAE\xB5\xA6 + \xF0\xAE\xB5\xA7 + \xF0\xAE\xB5\xA8 + \xF0\xAE\xB5\xA9 + \xF0\xAE\xB5\xAA + \xF0\xAE\xB5\xAB + \xF0\xAE\xB5\xAC + \xF0\xAE\xB5\xAD + \xF0\xAE\xB5\xAE + \xF0\xAE\xB5\xAF + \xF0\xAE\xB5\xB0 + \xF0\xAE\xB5\xB1 + \xF0\xAE\xB5\xB2 + \xF0\xAE\xB5\xB3 + \xF0\xAE\xB5\xB4 + \xF0\xAE\xB5\xB5 + \xF0\xAE\xB5\xB6 + \xF0\xAE\xB5\xB7 + \xF0\xAE\xB5\xB8 + \xF0\xAE\xB5\xB9 + \xF0\xAE\xB5\xBA + \xF0\xAE\xB5\xBB + \xF0\xAE\xB5\xBC + \xF0\xAE\xB5\xBD + \xF0\xAE\xB5\xBE + \xF0\xAE\xB5\xBF + \xF0\xAE\xB6\x80 + \xF0\xAE\xB6\x81 + \xF0\xAE\xB6\x82 + \xF0\xAE\xB6\x83 + \xF0\xAE\xB6\x84 + \xF0\xAE\xB6\x85 + \xF0\xAE\xB6\x86 + \xF0\xAE\xB6\x87 + \xF0\xAE\xB6\x88 + \xF0\xAE\xB6\x89 + \xF0\xAE\xB6\x8A + \xF0\xAE\xB6\x8B + \xF0\xAE\xB6\x8C + \xF0\xAE\xB6\x8D + \xF0\xAE\xB6\x8E + \xF0\xAE\xB6\x8F + \xF0\xAE\xB6\x90 + \xF0\xAE\xB6\x91 + \xF0\xAE\xB6\x92 + \xF0\xAE\xB6\x93 + \xF0\xAE\xB6\x94 + \xF0\xAE\xB6\x95 + \xF0\xAE\xB6\x96 + \xF0\xAE\xB6\x97 + \xF0\xAE\xB6\x98 + \xF0\xAE\xB6\x99 + \xF0\xAE\xB6\x9A + \xF0\xAE\xB6\x9B + \xF0\xAE\xB6\x9C + \xF0\xAE\xB6\x9D + \xF0\xAE\xB6\x9E + \xF0\xAE\xB6\x9F + \xF0\xAE\xB6\xA0 + \xF0\xAE\xB6\xA1 + \xF0\xAE\xB6\xA2 + \xF0\xAE\xB6\xA3 + \xF0\xAE\xB6\xA4 + \xF0\xAE\xB6\xA5 + \xF0\xAE\xB6\xA6 + \xF0\xAE\xB6\xA7 + \xF0\xAE\xB6\xA8 + \xF0\xAE\xB6\xA9 + \xF0\xAE\xB6\xAA + \xF0\xAE\xB6\xAB + \xF0\xAE\xB6\xAC + \xF0\xAE\xB6\xAD + \xF0\xAE\xB6\xAE + \xF0\xAE\xB6\xAF + \xF0\xAE\xB6\xB0 + \xF0\xAE\xB6\xB1 + \xF0\xAE\xB6\xB2 + \xF0\xAE\xB6\xB3 + \xF0\xAE\xB6\xB4 + \xF0\xAE\xB6\xB5 + \xF0\xAE\xB6\xB6 + \xF0\xAE\xB6\xB7 + \xF0\xAE\xB6\xB8 + \xF0\xAE\xB6\xB9 + \xF0\xAE\xB6\xBA + \xF0\xAE\xB6\xBB + \xF0\xAE\xB6\xBC + \xF0\xAE\xB6\xBD + \xF0\xAE\xB6\xBE + \xF0\xAE\xB6\xBF + \xF0\xAE\xB7\x80 + \xF0\xAE\xB7\x81 + \xF0\xAE\xB7\x82 + \xF0\xAE\xB7\x83 + \xF0\xAE\xB7\x84 + \xF0\xAE\xB7\x85 + \xF0\xAE\xB7\x86 + \xF0\xAE\xB7\x87 + \xF0\xAE\xB7\x88 + \xF0\xAE\xB7\x89 + \xF0\xAE\xB7\x8A + \xF0\xAE\xB7\x8B + \xF0\xAE\xB7\x8C + \xF0\xAE\xB7\x8D + \xF0\xAE\xB7\x8E + \xF0\xAE\xB7\x8F + \xF0\xAE\xB7\x90 + \xF0\xAE\xB7\x91 + \xF0\xAE\xB7\x92 + \xF0\xAE\xB7\x93 + \xF0\xAE\xB7\x94 + \xF0\xAE\xB7\x95 + \xF0\xAE\xB7\x96 + \xF0\xAE\xB7\x97 + \xF0\xAE\xB7\x98 + \xF0\xAE\xB7\x99 + \xF0\xAE\xB7\x9A + \xF0\xAE\xB7\x9B + \xF0\xAE\xB7\x9C + \xF0\xAE\xB7\x9D + \xF0\xAE\xB7\x9E + \xF0\xAE\xB7\x9F + \xF0\xAE\xB7\xA0 + \xF0\xAE\xB7\xA1 + \xF0\xAE\xB7\xA2 + \xF0\xAE\xB7\xA3 + \xF0\xAE\xB7\xA4 + \xF0\xAE\xB7\xA5 + \xF0\xAE\xB7\xA6 + \xF0\xAE\xB7\xA7 + \xF0\xAE\xB7\xA8 + \xF0\xAE\xB7\xA9 + \xF0\xAE\xB7\xAA + \xF0\xAE\xB7\xAB + \xF0\xAE\xB7\xAC + \xF0\xAE\xB7\xAD + \xF0\xAE\xB7\xAE + \xF0\xAE\xB7\xAF + \xF0\xAE\xB7\xB0 + \xF0\xAE\xB7\xB1 + \xF0\xAE\xB7\xB2 + \xF0\xAE\xB7\xB3 + \xF0\xAE\xB7\xB4 + \xF0\xAE\xB7\xB5 + \xF0\xAE\xB7\xB6 + \xF0\xAE\xB7\xB7 + \xF0\xAE\xB7\xB8 + \xF0\xAE\xB7\xB9 + \xF0\xAE\xB7\xBA + \xF0\xAE\xB7\xBB + \xF0\xAE\xB7\xBC + \xF0\xAE\xB7\xBD + \xF0\xAE\xB7\xBE + \xF0\xAE\xB7\xBF + \xF0\xAE\xB8\x80 + \xF0\xAE\xB8\x81 + \xF0\xAE\xB8\x82 + \xF0\xAE\xB8\x83 + \xF0\xAE\xB8\x84 + \xF0\xAE\xB8\x85 + \xF0\xAE\xB8\x86 + \xF0\xAE\xB8\x87 + \xF0\xAE\xB8\x88 + \xF0\xAE\xB8\x89 + \xF0\xAE\xB8\x8A + \xF0\xAE\xB8\x8B + \xF0\xAE\xB8\x8C + \xF0\xAE\xB8\x8D + \xF0\xAE\xB8\x8E + \xF0\xAE\xB8\x8F + \xF0\xAE\xB8\x90 + \xF0\xAE\xB8\x91 + \xF0\xAE\xB8\x92 + \xF0\xAE\xB8\x93 + \xF0\xAE\xB8\x94 + \xF0\xAE\xB8\x95 + \xF0\xAE\xB8\x96 + \xF0\xAE\xB8\x97 + \xF0\xAE\xB8\x98 + \xF0\xAE\xB8\x99 + \xF0\xAE\xB8\x9A + \xF0\xAE\xB8\x9B + \xF0\xAE\xB8\x9C + \xF0\xAE\xB8\x9D + \xF0\xAE\xB8\x9E + \xF0\xAE\xB8\x9F + \xF0\xAE\xB8\xA0 + \xF0\xAE\xB8\xA1 + \xF0\xAE\xB8\xA2 + \xF0\xAE\xB8\xA3 + \xF0\xAE\xB8\xA4 + \xF0\xAE\xB8\xA5 + \xF0\xAE\xB8\xA6 + \xF0\xAE\xB8\xA7 + \xF0\xAE\xB8\xA8 + \xF0\xAE\xB8\xA9 + \xF0\xAE\xB8\xAA + \xF0\xAE\xB8\xAB + \xF0\xAE\xB8\xAC + \xF0\xAE\xB8\xAD + \xF0\xAE\xB8\xAE + \xF0\xAE\xB8\xAF + \xF0\xAE\xB8\xB0 + \xF0\xAE\xB8\xB1 + \xF0\xAE\xB8\xB2 + \xF0\xAE\xB8\xB3 + \xF0\xAE\xB8\xB4 + \xF0\xAE\xB8\xB5 + \xF0\xAE\xB8\xB6 + \xF0\xAE\xB8\xB7 + \xF0\xAE\xB8\xB8 + \xF0\xAE\xB8\xB9 + \xF0\xAE\xB8\xBA + \xF0\xAE\xB8\xBB + \xF0\xAE\xB8\xBC + \xF0\xAE\xB8\xBD + \xF0\xAE\xB8\xBE + \xF0\xAE\xB8\xBF + \xF0\xAE\xB9\x80 + \xF0\xAE\xB9\x81 + \xF0\xAE\xB9\x82 + \xF0\xAE\xB9\x83 + \xF0\xAE\xB9\x84 + \xF0\xAE\xB9\x85 + \xF0\xAE\xB9\x86 + \xF0\xAE\xB9\x87 + \xF0\xAE\xB9\x88 + \xF0\xAE\xB9\x89 + \xF0\xAE\xB9\x8A + \xF0\xAE\xB9\x8B + \xF0\xAE\xB9\x8C + \xF0\xAE\xB9\x8D + \xF0\xAE\xB9\x8E + \xF0\xAE\xB9\x8F + \xF0\xAE\xB9\x90 + \xF0\xAE\xB9\x91 + \xF0\xAE\xB9\x92 + \xF0\xAE\xB9\x93 + \xF0\xAE\xB9\x94 + \xF0\xAE\xB9\x95 + \xF0\xAE\xB9\x96 + \xF0\xAE\xB9\x97 + \xF0\xAE\xB9\x98 + \xF0\xAE\xB9\x99 + \xF0\xAE\xB9\x9A + \xF0\xAE\xB9\x9B + \xF0\xAE\xB9\x9C + \xF0\xAE\xB9\x9D \xF0\xAF\xA0\x80 \xF0\xAF\xA0\x81 \xF0\xAF\xA0\x82 diff --git a/tools/tools/locale/etc/final-maps/widths.txt b/tools/tools/locale/etc/final-maps/widths.txt index d8f0ab1888f0..93b2e8d7430b 100644 --- a/tools/tools/locale/etc/final-maps/widths.txt +++ b/tools/tools/locale/etc/final-maps/widths.txt @@ -1,6 +1,6 @@ # Warning: Do not edit. This file is automatically generated from the # tools in /usr/src/tools/tools/locale. The data is obtained from the -# utf8proc 2.8.0. +# utf8proc 2.9.0. # ----------------------------------------------------------------------------- WIDTH 0 @@ -1687,6 +1687,10 @@ WIDTH 2 2 2 + 2 + 2 + 2 + 2 2 2 2 @@ -2160,6 +2164,7 @@ WIDTH 2 2 2 + 2 2 2 2 @@ -114014,6 +114019,628 @@ WIDTH 2 2 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 *** 370 LINES SKIPPED *** From nobody Mon Oct 14 08:44: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 4XRrQ74svNz5ZRjx; Mon, 14 Oct 2024 08:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRrQ71vDMz4gVR; Mon, 14 Oct 2024 08:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728895487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJdC9aEl5IbyhSKmAgsC7RKMVS+c7HcgGQHTbNUsNzE=; b=wTIZlYxy8P8eB9H6Y3Oj/f+p55l7GUFwNfqup6/MJlpzG5D7my8BpshIbHao2M1hGjgvMD 98yIEr+YgL+EDTjWncCtE9/auktCALrE2J7FajeOqyNCQ0fC9ssYvOesyaSKrqXObNHJeG KuIxHRuSapxLHntAsmrsHqWdNlIuI/virgax7gkGhJ70O24AbyXAAa0IXqG7aSjENQy2bF fiUUHoSU5hfFumxjHbcGOScw4SccvDaRgm5rtQrEZkyxc3/mazbOFknNTYiVi7OHE1ydWa zQthN5A2uSzScVxoKD6O4M13GA2S1rjewbTxVqZ4c3mEjRQim57SWhcsypbGSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728895487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJdC9aEl5IbyhSKmAgsC7RKMVS+c7HcgGQHTbNUsNzE=; b=YPQGF8JN3EFWS9Ob3RvNFFaAx74wo9ujHAvtsZ0OzzK774ijH/4Gi9ci7FpxSMJ3nqHcxE ATdGCYIx/rsql4fxSs5pzi9tRzgoMseAgU3ShfbxQ/c+W31DM3RRZNmpz9sHK2eNN362j2 D74A5Dieu2jZP+i0QrPcc1PsfS7lXFbygNSZ27Vu63S0wzn5AqJfCBBdhIULHqxMTut3FO /H77AltVc3xVe5awMwpQRKjj0e9oERU1p6y8n9qVGH1l3wzLGcAS3okUnISSbZak1pDcvg afOORJrYeFnPEpr4lxyNzU8LUZn9R4pg9GLEG8NavGBfqJbNj3rvWNSFB0K7Vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728895487; a=rsa-sha256; cv=none; b=dLW3dgQJQJ/SaZ5AJW5I+dHhnQWWLiHOCzKf4ZzBhqL0xVtbcbNHUmVqwnVJUQE1IypFPt vKzpIYP8VehfATHlLSHyHmmQ3o88Pn0RKKJOm40JSt87CXei7XbNtNk2oYMEXgc9DLNf/a ykR7F21ASQ7Mej/Rp+Xycj9ZImatEMs23j34SOpzcoZQhmaBbdEUNURkcUuoiDxdbzuLkK 5Wk/T1pjBTo/XfSzDmCkwcFusmFBsGacfv7uK8Yltl+HSBR8Km8A46wAumYD9D62tPdHE4 PsR5UexPX8UkdhxmtxSpIQiNA/+OoxKeFevluCVmL0nVsCpUl2kW0mUVp0vICA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRrQ71NqRzWF3; Mon, 14 Oct 2024 08:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E8il4U098871; Mon, 14 Oct 2024 08:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E8ij4T098868; Mon, 14 Oct 2024 08:44:45 GMT (envelope-from git) Date: Mon, 14 Oct 2024 08:44:45 GMT Message-Id: <202410140844.49E8ij4T098868@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: ddfc6f84f242 - main - locales: update unicode version 16 and CLDR to version 45 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: ddfc6f84f24215b418af19260e9156219f6df03e Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=ddfc6f84f24215b418af19260e9156219f6df03e commit ddfc6f84f24215b418af19260e9156219f6df03e Author: Baptiste Daroussin AuthorDate: 2024-10-14 08:43:09 +0000 Commit: Baptiste Daroussin CommitDate: 2024-10-14 08:43:39 +0000 locales: update unicode version 16 and CLDR to version 45 --- share/colldef_unicode/Makefile | 2 +- share/colldef_unicode/fa_AF.UTF-8.src | 6 +- share/colldef_unicode/fa_IR.UTF-8.src | 6 +- share/colldef_unicode/ja_JP.UTF-8.src | 6 +- share/colldef_unicode/lv_LV.UTF-8.src | 168 +- share/colldef_unicode/zh_CN.UTF-8.src | 81865 +++++++++++++++---------------- share/colldef_unicode/zh_TW.UTF-8.src | 4824 +- share/ctypedef/C.UTF-8.src | 8 + share/monetdef_unicode/Makefile | 6 +- share/monetdef_unicode/en_ZA.UTF-8.src | 4 +- share/monetdef_unicode/nb_NO.UTF-8.src | 50 - share/numericdef_unicode/Makefile | 2 +- 12 files changed, 43456 insertions(+), 43491 deletions(-) diff --git a/share/colldef_unicode/Makefile b/share/colldef_unicode/Makefile index d2058baa99be..464f631fe309 100644 --- a/share/colldef_unicode/Makefile +++ b/share/colldef_unicode/Makefile @@ -7,7 +7,7 @@ FILESNAME= LC_COLLATE .SUFFIXES: .src .LC_COLLATE MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps -CLDR_VERSION= "43.0" +CLDR_VERSION= "45.0" .include diff --git a/share/colldef_unicode/fa_AF.UTF-8.src b/share/colldef_unicode/fa_AF.UTF-8.src index f3664efdcee6..006826a3dbd2 100644 --- a/share/colldef_unicode/fa_AF.UTF-8.src +++ b/share/colldef_unicode/fa_AF.UTF-8.src @@ -141,7 +141,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -468,7 +468,7 @@ order_start forward;forward;forward;forward - + @@ -930,7 +930,7 @@ order_start forward;forward;forward;forward "";;""; ;;; ;;; - ;;; + ;;; ;;; ;;; ;;; diff --git a/share/colldef_unicode/fa_IR.UTF-8.src b/share/colldef_unicode/fa_IR.UTF-8.src index 96cb67ff988d..04c1f164b78f 100644 --- a/share/colldef_unicode/fa_IR.UTF-8.src +++ b/share/colldef_unicode/fa_IR.UTF-8.src @@ -139,7 +139,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -465,7 +465,7 @@ order_start forward;forward;forward;forward - + @@ -924,7 +924,7 @@ order_start forward;forward;forward;forward "";;""; ;;; ;;; - ;;; + ;;; ;;; ;;; ;;; diff --git a/share/colldef_unicode/ja_JP.UTF-8.src b/share/colldef_unicode/ja_JP.UTF-8.src index 0885b8852f70..d0b6d0372f60 100644 --- a/share/colldef_unicode/ja_JP.UTF-8.src +++ b/share/colldef_unicode/ja_JP.UTF-8.src @@ -833,7 +833,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -7416,7 +7416,7 @@ order_start forward;forward;forward;forward - + @@ -14039,7 +14039,7 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; + ;;; ;;; ;;; ;;; diff --git a/share/colldef_unicode/lv_LV.UTF-8.src b/share/colldef_unicode/lv_LV.UTF-8.src index 352038b3e828..4286c37e7662 100644 --- a/share/colldef_unicode/lv_LV.UTF-8.src +++ b/share/colldef_unicode/lv_LV.UTF-8.src @@ -23,7 +23,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -120,6 +119,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -145,6 +145,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -153,7 +154,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -168,6 +168,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -200,6 +201,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -212,7 +214,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -224,6 +225,8 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -243,6 +246,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -251,8 +255,8 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -273,7 +277,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -284,6 +287,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -298,8 +302,8 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -348,6 +352,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -376,8 +381,8 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -394,7 +399,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -407,6 +411,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -460,6 +465,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -470,7 +476,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -538,7 +543,6 @@ order_start forward;forward;forward;forward - @@ -635,6 +639,7 @@ order_start forward;forward;forward;forward + @@ -660,6 +665,7 @@ order_start forward;forward;forward;forward + @@ -668,7 +674,6 @@ order_start forward;forward;forward;forward - @@ -683,6 +688,7 @@ order_start forward;forward;forward;forward + @@ -715,6 +721,7 @@ order_start forward;forward;forward;forward + @@ -727,7 +734,6 @@ order_start forward;forward;forward;forward - @@ -739,6 +745,8 @@ order_start forward;forward;forward;forward + + @@ -758,6 +766,7 @@ order_start forward;forward;forward;forward + @@ -766,8 +775,8 @@ order_start forward;forward;forward;forward - + @@ -788,7 +797,6 @@ order_start forward;forward;forward;forward - @@ -799,6 +807,7 @@ order_start forward;forward;forward;forward + @@ -813,8 +822,8 @@ order_start forward;forward;forward;forward - + @@ -863,6 +872,7 @@ order_start forward;forward;forward;forward + @@ -891,8 +901,8 @@ order_start forward;forward;forward;forward - + @@ -909,7 +919,6 @@ order_start forward;forward;forward;forward - @@ -922,6 +931,7 @@ order_start forward;forward;forward;forward + @@ -975,6 +985,7 @@ order_start forward;forward;forward;forward + @@ -985,7 +996,6 @@ order_start forward;forward;forward;forward - @@ -1176,8 +1186,6 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; - ;"";""; - ;"";""; ;"";""; ;"";""; ;"";""; @@ -1212,6 +1220,8 @@ order_start forward;forward;forward;forward "";"";""; "";"";""; "";"";""; + ;;; + ;;; ;;; ;;; ;;; @@ -1279,6 +1289,8 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; + ;;; + ;;; ;;; ;;; ;;; @@ -1294,8 +1306,6 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; ;;; ;;; ;;; @@ -1387,12 +1397,6 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; ;"";""; ;"";""; ;"";""; @@ -1407,6 +1411,12 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; + ;;; + ;;; + ;"";""; + ;"";""; + ;"";""; + ;"";""; ;;; ;;; ;;; @@ -1489,6 +1499,8 @@ order_start forward;forward;forward;forward ;"";""; ;;; ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -1510,8 +1522,6 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; ;;; ;;; ;;; @@ -1582,8 +1592,6 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; - ;"";""; - ;"";""; ;"";""; ;"";""; ;"";""; @@ -1594,27 +1602,6 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; - ;;; - ;;; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; "";"";""; "";"";""; "";"";""; @@ -1625,6 +1612,29 @@ order_start forward;forward;forward;forward "";"";""; "";"";""; "";"";""; + ;;; + ;;; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;;; + ;;; ;;; ;;; ;;; @@ -1683,6 +1693,8 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; + ;;; + ;;; ;;; ;;; ;;; @@ -1697,8 +1709,6 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; ;;; ;;; ;;; @@ -1731,6 +1741,8 @@ order_start forward;forward;forward;forward "";"";""; "";"";""; "";"";""; + ;;; + ;;; ;;; ;;; ;;; @@ -1763,8 +1775,6 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; ;;; ;;; ;;; @@ -1818,6 +1828,8 @@ order_start forward;forward;forward;forward "";"";""; "";"";""; "";"";""; + ;;; + ;;; ;;; ;;; ;;; @@ -1840,8 +1852,6 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; ;;; ;;; ;;; @@ -1894,14 +1904,6 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; ;"";""; ;"";""; ;"";""; @@ -1929,6 +1931,14 @@ order_start forward;forward;forward;forward "";"";""; "";"";""; "";"";""; + ;;; + ;;; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; ;;; ;;; ;;; @@ -2040,6 +2050,8 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -2075,8 +2087,6 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; ;;; ;;; ;;; @@ -2111,6 +2121,10 @@ order_start forward;forward;forward;forward "";"";""; "";"";""; "";"";""; + ;;; + ;;; + ;"";""; + ;"";""; ;;; ;;; ;;; @@ -2134,10 +2148,6 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;"";""; - ;"";""; ;;; ;;; ;;; @@ -2225,10 +2235,6 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; - ;"";""; - ;"";""; - ;"";""; - ;"";""; ;"";""; ;"";""; ;"";""; @@ -2255,6 +2261,10 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; + ;;; + ;;; + ;"";""; + ;"";""; ;;; ;;; ;;; @@ -2407,6 +2417,8 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; "";"";""; + ;;; + ;;; ;;; ;;; ;;; @@ -2425,8 +2437,6 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; ;;; ;;; ;;; diff --git a/share/colldef_unicode/zh_CN.UTF-8.src b/share/colldef_unicode/zh_CN.UTF-8.src index e55962dbf4fd..f78a82208ede 100644 --- a/share/colldef_unicode/zh_CN.UTF-8.src +++ b/share/colldef_unicode/zh_CN.UTF-8.src @@ -383,12 +383,12 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -681,9 +681,9 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -954,8 +954,8 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -1037,24 +1037,23 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -1063,13 +1062,13 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -1079,107 +1078,107 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol *** 109844 LINES SKIPPED *** From nobody Mon Oct 14 08:57: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 4XRrhc64Xsz5ZSPn; Mon, 14 Oct 2024 08:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRrhc5Z9mz4hpZ; Mon, 14 Oct 2024 08:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728896240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1OG91aTsz9DOyqimiNSwN6SOyuvKzDji67qIqcg69bM=; b=qOZhh4TJ+DRvHETots2HyoRrsupR6I1yUYam90tgEpWrxTVNLDhcVRuoavqIK7esVbfkpi Za4TSNVEewPHs/kTCW7rJW6IAlxQqdF35Waof2J405H9QqqUR5KfJ36Q3t708cv5I5yhrQ HPL6/kxyc1TULgrUPHYv7ozzAu7bJBuh53VKe4tSAbQ5yI7rRdZE6hOquBSs849cA/lkjW GgmaR+8UiQgcqB0Vn82vc9c7LMlQSz12WaGefjBU+DllcTr+BriGBMJDk/BimO+2q6kkcQ P2FWHxU6rXfHSoqA0Zsjz2wjAFlAiQJuMiDfHqM/iRXuLSotMN3NUyo54rsoMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728896240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1OG91aTsz9DOyqimiNSwN6SOyuvKzDji67qIqcg69bM=; b=VbazmJUwL+iZg6Ftb4wsphv90PPiWku0fszN5rI/N9hwZNVRhYrd58Kb5GnyXvltHpIUNm Gq7ZHuoU2fBep5j2cLzfCgT/917GgadZnLSWdr+DnpcCq2bCyqJKaDfstOQb919GBMM6QX O1UozBQgtMRDbEN1lqRYJ70KsY7J/zGNUoHXNeMxbzKyAluDHR5FPBq9rCzM7eziL7z5FG XICdOhGYq6BljW7cNV4jv/EDnoQfQk9ZTkCnBVAJtTGsKB5lfohBNqUM/W0gwGF7SjPIo4 qZzQBsFfegqyCs7Vy9U/R/7OYVtuBHUjGdLh+kuH/cATBL2QQVWGBGrUJbLnLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728896240; a=rsa-sha256; cv=none; b=ApRsP+t439Qt8DOq/2iw4L5QqaYe9E+KqtXYW5FXNe6EtENmvzmvM55VayqEzbzN5o5/zH GZbEGh1xAq8DnuXaeeMOMkMVszP9O+ic3X56aVQEc3tb4E3JNKjH1h7hM0Jj3rO1rEk81D d+AZoat0BcIaccHik+1YX+bSZ69Y4yS+O9mZobBX2oZpKAsaQCjhJIcVTmXPSeH7Xbgrkt I0Q2y+cGuP8CMDcB+fBDJrDPwRJUQNBQVL7Aq8MYBd/DKvEd2DKHgJm6B0N6A7KOBUW+CA F49Z3PWxM46EFpWeKxzFn0DnnXCA7baLiqhaw2F7k/MSzRFSAo5/sQFpeLK0LA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRrhc52zrzX6X; Mon, 14 Oct 2024 08:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E8vKRE016197; Mon, 14 Oct 2024 08:57:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E8vK8B016194; Mon, 14 Oct 2024 08:57:20 GMT (envelope-from git) Date: Mon, 14 Oct 2024 08:57:20 GMT Message-Id: <202410140857.49E8vK8B016194@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: e46c4de73e68 - main - RELNOTES: document the disabling of RSA generation for basic cloudinit 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: e46c4de73e68df00011e90b2093a66cd8343f9c7 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=e46c4de73e68df00011e90b2093a66cd8343f9c7 commit e46c4de73e68df00011e90b2093a66cd8343f9c7 Author: Baptiste Daroussin AuthorDate: 2024-10-14 08:56:08 +0000 Commit: Baptiste Daroussin CommitDate: 2024-10-14 08:56:08 +0000 RELNOTES: document the disabling of RSA generation for basic cloudinit --- RELNOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELNOTES b/RELNOTES index a1863a2521fd..2dedfae77e61 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +b22be3bbb2de: + Basic Cloudinit images no longer generate RSA host keys by default for + SSH. + 000000000000: RSA host keys for SSH are deprecated and will no longer be generated by default in FreeBSD 16. From nobody Mon Oct 14 08:57: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 4XRrhf0dqJz5ZSPq; Mon, 14 Oct 2024 08:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRrhd72DQz4j7K; Mon, 14 Oct 2024 08:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728896242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ofg58FzsImQwkkZntsmg29WD5uzi6YQxGsAh9qmoQYA=; b=rriBK7OaHd6M/bhFrh1/4BelagYxl9UlDwoGltA3+iKxb+igcsYiogf7Kl79Mpc+IQfw42 XWLHNRq9lHh7mKRNtgiCfv7hPzJDBeqmOYcFjX//ZVtGA9/o5JRU21ii9nn2r5lpOTc9PU 1fgTGvqscQUhz1p6pQqgLvRKh/wmT+gcdqS5NZSX+qmFWRkNsdRTO0Q+g8dwN+oPsxEcMr 5NvCGrbSBQJh3g7dXKz0D168+vif2J7j0+ge2LYK5VlZErLi11eu0/+9QjloOHBchGdhfu +4tn5bf0/14ivut/CzBDDs6o1BrN5x2KBeN6RtQAAC49pkoVUS7JS8Z/6tS4lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728896242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ofg58FzsImQwkkZntsmg29WD5uzi6YQxGsAh9qmoQYA=; b=SAehH6xowbgN3iyRtaBZryOFszhmgmeU8MkaBUjiFE5U9jyWqZEXoUSqH5z42jCR7WNQJJ RKJtizq973JiiJoXioYhYPKK9reDb1ZIlxjsrDhzXERPvAS69WrWM++eEn4r5wzghpnrbh YiPqRt5bkcgj2LH+7Nfg78M7e3TfoOPAhDeE6a/hd38HDsoTB+5zQ/zPO4XRY94AWwYwVH 8NQ9LfC9GyFi6Wjr8bo3Hx/fR+pN/ceryRUV6O2rfbzAwvjB3t7w+krJHohz1m+KMMJ9JF c1HsMT1gMlxcEiydPIo6j5n2YswrNhOxHnkU0eQ2ziiNxmUkOvKj1LGSFEh/LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728896242; a=rsa-sha256; cv=none; b=goKnA4+HN/w5uzXCRYp3nQ4EaijVU7gYmWpjJr2wzMLPIM5Opt++fZqrLVh/xcehlJtzj7 86BII2dFmJTRt2681ROWwVbou1LAWSkH6pLuy8pYUfY1Dn0dT6pM9n90Z1rnxeeHGKjvPv Q1AxIHONFYMuxf3e7RGknrdqx3Q9heP17xNtscpiFzYfJijtV+EyzpEGger8RVZnYRVRL9 QeuRsp6uLLx+mdCUgMv6CWEg2ELAJld1HBJxJdC9l1M+EqicNqTQiJndB69hbhy4uu9e3n bQuxF5mKrxj0Ch3z37qTs9l4TtAocVyqyxNQJTsWxzU5+VHS34f8jZ01HOEmNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRrhd5kH4zX6Y; Mon, 14 Oct 2024 08:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E8vLWr016245; Mon, 14 Oct 2024 08:57:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E8vL9q016242; Mon, 14 Oct 2024 08:57:21 GMT (envelope-from git) Date: Mon, 14 Oct 2024 08:57:21 GMT Message-Id: <202410140857.49E8vL9q016242@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: 0706fa3787d3 - main - RELNOTES: document update of unicode and cldr 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: 0706fa3787d3d3ad8e31c0d6ce3e95f039bcd360 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=0706fa3787d3d3ad8e31c0d6ce3e95f039bcd360 commit 0706fa3787d3d3ad8e31c0d6ce3e95f039bcd360 Author: Baptiste Daroussin AuthorDate: 2024-10-14 08:57:04 +0000 Commit: Baptiste Daroussin CommitDate: 2024-10-14 08:57:04 +0000 RELNOTES: document update of unicode and cldr --- RELNOTES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELNOTES b/RELNOTES index 2dedfae77e61..a6f27df32d87 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +ddfc6f84f242: + Update unicode to 16.0.0 and CLDR to 45.0.0. + b22be3bbb2de: Basic Cloudinit images no longer generate RSA host keys by default for SSH. From nobody Mon Oct 14 09:01: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 4XRrn00NZNz5ZScy; Mon, 14 Oct 2024 09:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRrmz6zvbz4k7C; Mon, 14 Oct 2024 09:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728896468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nJ6sQz/aaMT60PVnwj3D0fxKvApsFWHh+iYMQOSXsio=; b=V/jkWvwRR4uCjPu+k7uOLWz9lC0GFaKmP6uAUpNYEkQ7CnSXybZkbaFHEuMMf6uw5aLrG0 T894Ebp4eIvJQx7j9xTVNME4L2CrQMiUqxqJnPlxQaOe5Zy+1k2buek1hjnWjXgzCZYEPV Jag7sTa5MSedNwhhaKQM9HQHQ0HlS8BWP9OQhJ3/okV6WIovMyVgj7m94Mgp64KdyjxugA 75JRBP9yN4nB3k541hJT0EiWBgjVu4PKw4ToDKGlwjffb46+I2WJJgYXubTk9ELGQTREqs zRCJV5hEHUyg1lA8Jo0Kegug9KoZ64f/yeBgvilMyqW/LMFHH2tO19Y+Onp/rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728896468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nJ6sQz/aaMT60PVnwj3D0fxKvApsFWHh+iYMQOSXsio=; b=VPUEeNEdz3skDMpdD1KzHNbWpqdYbG/VMeFGqkIV33DE2AT/goHc9nJVnMetR8km7k7QIB dBnA+hYjn+TGkb75Se8Asg0rpS2e+EOYlFPL55Pm81A/xA5pAPPN3ZYzxfgy84phaRDcEQ ibdRq8zZqO7T1YHOhPmenjC4lHEIlaXbEuafdEqYPJXb4jjuydEMA0thsWNA8V8sYCXydK XlFBMlrS75kVPa1d7V574LM5QJvRm1aFCmHDb4LCozn6bMFLLJohF/wslt29FsUv/+1bim VqbUrNFv99K6xgwjOJj22Po/Icuedc4n4ROr21Y9tpB/CmrwTgp9A+ySSg6iTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728896468; a=rsa-sha256; cv=none; b=Ww77J6cbtL5L4G+5nHRumjP0ME0/snMJfAinGiGngXipvsRQGtYNWPSkjcx1Lywyg7hjh+ FrDS3jA289ld3oqpvnKmOGio1kj8M+3xsds18pIcJoUVK4oTztk0eqadk4DvfdSakEqpn/ WpmPnhX6pzbjpHNfyVmTYD6HblU2+QlQ/B8RyCHu+lD+PwqY90pKbMrHB6hVuUzpCCFmeX MNWGNviuauffdS65YHoul3I2SGvuB7RUh6OzIvWZbzCWsYJMzfA1TVNunhME0aLPsAMYA6 aUBpWhKQlBZ6nvQOMJ0e6+SW3JF9h+CJYFON00D/OwefJ4oQoORtF/TM2tDBxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRrmz6TwpzXd7; Mon, 14 Oct 2024 09:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E9172X026801; Mon, 14 Oct 2024 09:01:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E917rV026798; Mon, 14 Oct 2024 09:01:07 GMT (envelope-from git) Date: Mon, 14 Oct 2024 09:01:07 GMT Message-Id: <202410140901.49E917rV026798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: c875e976f608 - main - vt_splash: Remove debug print 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c875e976f60862162680fa2e55a489f5c4785931 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c875e976f60862162680fa2e55a489f5c4785931 commit c875e976f60862162680fa2e55a489f5c4785931 Author: Emmanuel Vadot AuthorDate: 2024-10-14 07:04:32 +0000 Commit: Emmanuel Vadot CommitDate: 2024-10-14 09:01:59 +0000 vt_splash: Remove debug print Sponsored by: Beckhoff Automation GmbH & Co. KG --- sys/dev/vt/vt_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index df97d21745f0..a579183658fa 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -1677,7 +1677,6 @@ vtterm_splash(struct vt_device *vd) } else { if (si->si_depth != 4) return; - printf("SPLASH: width: %d height: %d depth: %d\n", si->si_width, si->si_height, si->si_depth); image = (uintptr_t)si + sizeof(struct splash_info); image = roundup2(image, 8); top = (vd->vd_height - si->si_height) / 2; From nobody Mon Oct 14 09:01: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 4XRrn12WNSz5ZSWx; Mon, 14 Oct 2024 09:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRrn10WnTz4jxH; Mon, 14 Oct 2024 09:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728896469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0SFDn/yzF97PNmEngQA/DvHDWbezonf/pUkbfgZ2nbY=; b=ihIZJ8O+Z4IISDie7gO4xp581M3osCKHbnliOLolOLgCxcoiXGlp7URsMZgcmDEmxik7UQ Py7Wl+UlfKzmiNBxfYlPRwdhZr1a0Ik7H31EQ7p+HTD+P8NxxrbzXMfjGAc2GdBS6rtmSx 7Tj3gTFlBaitJNIgax7ioYescMMG2eQgWU9CPFqawba+Z6JUsALUGVCgtTme/6J+6lCZDX Q7VfAn8ipktzSI/8CXqdHDrbN9NR4W1oh/fsNqg9EcYNZoIaWXrd65P7HeOovDZu3oFUI7 kl6mmfIazAq5O9WFVsqL5Gk2ONIK6UJoHQh8tZdf5us5qmQkrIv5qgCkcsTytA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728896469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0SFDn/yzF97PNmEngQA/DvHDWbezonf/pUkbfgZ2nbY=; b=ri8/VJRtuzc3cvVpM8gYYiQB7fbbD0fiM1c+4YGVWsM1WbmlRbx8kUT7FuUHnsv10dY0O9 MacQBCuQhx6Kbieq8r9aVVQSUvSRa/LYRs1kUWwP4twwSaujehf9S9pDKMASR47e7kBu0k BARrRWKqLfJrXFX4/fVcTbTzeVX5w0ur8ShPf5jJMDTgS2oMH7WpUvBg2rcVHkzRnQpXlb zIvsGIbdCXLkaIWXVmBAq1KymGsFErENdMTsNJCbC+9T8ofjpCe8HaIBe318cnDIw+QRWP uBbZLuqX6duohUtAItvGD5DwKzrTodOqf5oitE7tpJb+ObxPuAiNrYlyVB3O9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728896469; a=rsa-sha256; cv=none; b=pxLnqHdy3IcFtmHtXAabfeOpyCUKkdOtJFOpOUzRwPirK6JXr0YrUjsZKoavfsg1o7H3rn nd1wsaZlbOeZzdCuodUJKcBMkHzQvdeNJinul69D/QGnIBjpPiH/ftwwEUu1L5wUw8iK1/ p7KsPkT1t090BHoBrqEhgvdQ3zRaAsE95gF3fHa2AAKbpro7pCd0bZWVW2Z77xdiKtive4 2Enf2EYuVyRyOa7PMOfQpj1WsfCssjl6wrl+1x6vw82pWG3270YXqRyKMYEZjqOanyH5ra 4CTjY7aYrtngg97KvEamORs2tUut/399K+Q+nxOJPGJuHvLt2RcZz+dbOJ84pQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRrn107KGzX6h; Mon, 14 Oct 2024 09:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E918Z7026855; Mon, 14 Oct 2024 09:01:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E918SW026852; Mon, 14 Oct 2024 09:01:08 GMT (envelope-from git) Date: Mon, 14 Oct 2024 09:01:08 GMT Message-Id: <202410140901.49E918SW026852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 2cb20681e17d - main - splash(4): Note that only rgba png are supported 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2cb20681e17d488f13b53b8e061e79101c93cf21 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2cb20681e17d488f13b53b8e061e79101c93cf21 commit 2cb20681e17d488f13b53b8e061e79101c93cf21 Author: Emmanuel Vadot AuthorDate: 2024-10-14 07:49:02 +0000 Commit: Emmanuel Vadot CommitDate: 2024-10-14 09:02:01 +0000 splash(4): Note that only rgba png are supported While here document that I'm the author for png splash support. Sponsored by: Beckhoff Automation GmbH & Co. KG --- share/man/man4/splash.4 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index 8de18434c52f..0e52d9eb83c4 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -304,10 +304,17 @@ and .Pa warp_saver modules were written by .An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . +.Pa splash +png support for +.Xr vt 4 +was written by +.An Emmanuel Vadot Aq Mt manu@FreeBSD.org . .Sh CAVEATS The screen saver works with .Xr syscons 4 only. +.Pp +For vt splash screen, only RGBA png are supported. .Sh BUGS If you load a screen saver while another screen saver has already been loaded, the first screen saver will not be automatically unloaded From nobody Mon Oct 14 09:26: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 4XRsLd3PRFz5ZV85; Mon, 14 Oct 2024 09:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRsLd2c7yz4m7y; Mon, 14 Oct 2024 09:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728898009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4q0NJs2Oj1DCujn0aOLtJ9ICe0MCTxBftzzjwTxwl0=; b=preBti8T9TlBqJ9dkuwGuhElTFtbXel2bohbd7pe4JX7aSA+upIZgx1edbSmnFiVzX1AeM 40tJj+dkwrwTG2ev79B5SsQwJch2ygJJYUkLpZGUO8HETYm655PvAEVuujlI0O56ybLFSb 6gqBTj5cm343XlNDIrz0pQvfuwx8hFUrUFPLFSKhwH6W0tE4kc6s+ZkSBfS7g9iTQiY8IR RnxwqEeOH1E//+1gzb4Z4NGVRyLGQz7zN4JA7r7/bI6VYTXi2Xh0upl1aRdX6xZeCD7uB+ MV7CZw2lJ2OozWO2AHhiddySCnyxLmSD8gysZ6optwcZx6H4yVpBHKNdoTl8EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728898009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4q0NJs2Oj1DCujn0aOLtJ9ICe0MCTxBftzzjwTxwl0=; b=JEwTqy2MW8nAfclZzVDwJAnugKji3rPVulyWND83e+p3AIW6iMzgReNGPN6WVEAq1OicQ3 CSlVAu4wf83syZx28dEUR1TS73KZwaCtQdUYIWD12ZivhGga3fkjnZXkoamOG0lbvJ385S cyCxSydPRQkIVvbZm06qOqRJVXcPBCs9pXU9gQST+sUWv5ZIhJrOoXGRbv/rnVndsLFgUI vsQ0A5ZI7KcMB+IzPsUaqu8OVIk6LEYYxMn9mrRHOOexypr3CMqfd/4PHHJlD6PIU/NZzT oAGHi/0T+jnTWJiSj9JxMwcrWv92J/u9FpAm/JECzR5N7+KZjOwtMrWj27ToEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728898009; a=rsa-sha256; cv=none; b=WTsnw+M/PShpn4K7Q9Vs17y+3weuJdTSHVkv6zONMjPxj9eMZakx0/wzVH5NRCJecgHRmr HpSDWareany3JHfIfco9HM+RzoFaBfT8PA9XcvkWeAogbR8s46/wd4Js94CrLd64kiIyzU zdAS/ttRNddSnuCZ9+vZHy+A4PHxnR7LezDYMLHKijLoq7MlhXxZv4Eo6AXzc/AuiAa5dL o01Q/sAGP0e2+Hz6MZZG5IufAFBiNuuvAWfACrDXiNVU7Rr4A6iAOiObn4fWquVu+JGBac 77hP1c8K6Ovi98MvxQKdJ79G1eCzImctHHVwAeQ/YIkVbedAzAspWrw/rmbMhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRsLd2CC2zY7r; Mon, 14 Oct 2024 09:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E9QnB9067930; Mon, 14 Oct 2024 09:26:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E9QnZL067927; Mon, 14 Oct 2024 09:26:49 GMT (envelope-from git) Date: Mon, 14 Oct 2024 09:26:49 GMT Message-Id: <202410140926.49E9QnZL067927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 7df3e400ea68 - main - loader: default: Add a default splash screen 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7df3e400ea68722b6263cd71937e43a98585eeda Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=7df3e400ea68722b6263cd71937e43a98585eeda commit 7df3e400ea68722b6263cd71937e43a98585eeda Author: Emmanuel Vadot AuthorDate: 2024-10-14 09:25:57 +0000 Commit: Emmanuel Vadot CommitDate: 2024-10-14 09:27:41 +0000 loader: default: Add a default splash screen Setting boot_mute="YES" currently use the in-kernel black and white logo. Instead default to the color png one. Sponsored by: Beckhoff Automation GmbH & Co. KG --- stand/defaults/loader.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index c3de7cdfb74b..8678c5c50d4f 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -27,6 +27,7 @@ vesa_load="NO" # Set this to YES to load the vesa module bitmap_load="NO" # Set this to YES if you want splash screen! bitmap_name="splash.bmp" # Set this to the name of the file bitmap_type="splash_image_data" # and place it on the module_path +splash="/boot/images/freebsd-logo-rev.png" # Set boot_mute="YES" to load it ### Screen saver modules ################################### # This is best done in rc.conf From nobody Mon Oct 14 09:56: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 4XRt0w0TyQz5ZWxx; Mon, 14 Oct 2024 09:56:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRt0v6jpVz4qjL; Mon, 14 Oct 2024 09:56:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728899791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DyOXyBMt59eAt6q28YxAlqTWl2YZsCS+ZNqdvSfZcGk=; b=RosvnYMSB/n43QPeKFqA/H7WC3PxQU4e8z+m5MMuYgfg1Lko55JK25Bsosa9MYY6gYKyGX Cs3CoCYXe0JTBrVkREIYshtvTr3gUX6p/O1YeM8X1V2ry0II+YqwNL4l0q+7ulzsW7+XEp U4Tz3R5iQts1NY39N84G/T2fCTeamzxjzPikOyo11M387vBvwR0TPECEmrMmPslZxdXfLR S5CxHAi0OicygdS8zSWct0a69WInX5mO1gzJX93hr500IqsNnrX0UecQPPFHsEc2mZw2qS ItU0ZZsjahSXH4cRgCeTW5Kqd58q8nl4owkdrVxRaJ8kN6IG0VJUMw/99ZXXRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728899791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DyOXyBMt59eAt6q28YxAlqTWl2YZsCS+ZNqdvSfZcGk=; b=gu+A5sLRAMoYRIwbqd5kNKArOidQlfVcMN6bnf5j+Ref9Owd05mwuR6HwKW1F9GqbBkBQx 3pqcOxBeZmSEAI2SGs2nX17q4FdIgur98eAOmTME/jYRRP5CaS5NxZ7EIBCwweledGZzly pJtG1ywsmPT8HSK6FJFrfdcxa2HuvnFABUJ8ACeBJROYOabnKY8K0lr2H9EVKxJYhFtphP xf/Zlpa1y4IZ3FbYW10YTIOJOZn4XUDckfT+iuoSnPutpVTkxqsAP8yCarRcmG1LHpQSJU 1J1Qt+FNSJOJggMUrSlEgwZy6e3LaKy7Tkju9LpPy1tkvm1Gb3cgG/BnRMdzgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728899791; a=rsa-sha256; cv=none; b=OThU323QJm3auaCol4c6OKEcvaKMA6bmxZfkVwKAos3uMSehSCuxFoDesa8zDEPiHmVUfL Edws+s8EMYhqvwTVve/OwOsU15k/ywON4QpK+at0q/ZH58po7s7/SFhl57dnEiCk2yEer9 VklEQHcqOLXeOvBguPxVzrWuxeigvTL6jfO9OJNbu3fDpE8DBaUKipWxpfOemx/emL6tpc k3aZzGdVLZYbNPAbjHWB3gBARWBfoWNUevjGV6M2iQ7o06a/hUA9x6tKG4V0MVyujEThFA Sb44RdgQ8QofmCgir4craJW7eYg2Di9kpsTwsDzwuNWJh2iNvxDlCO6vK+Vsow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRt0v6KK9zZCl; Mon, 14 Oct 2024 09:56:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E9uVrq018490; Mon, 14 Oct 2024 09:56:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E9uVLA018487; Mon, 14 Oct 2024 09:56:31 GMT (envelope-from git) Date: Mon, 14 Oct 2024 09:56:31 GMT Message-Id: <202410140956.49E9uVLA018487@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: 7fd3fed642dd - main - locales: add missing af_ZA.UTF8 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: 7fd3fed642ddf99f73a8e57f3b5fa030b405bd91 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=7fd3fed642ddf99f73a8e57f3b5fa030b405bd91 commit 7fd3fed642ddf99f73a8e57f3b5fa030b405bd91 Author: Baptiste Daroussin AuthorDate: 2024-10-14 09:55:52 +0000 Commit: Baptiste Daroussin CommitDate: 2024-10-14 09:56:30 +0000 locales: add missing af_ZA.UTF8 Fix the forgotten git add Fixes: ddfc6f84f24215b418af19260e9156219f6df03e Reported by: manu --- share/monetdef_unicode/af_ZA.UTF-8.src | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/share/monetdef_unicode/af_ZA.UTF-8.src b/share/monetdef_unicode/af_ZA.UTF-8.src new file mode 100644 index 000000000000..e460df01c483 --- /dev/null +++ b/share/monetdef_unicode/af_ZA.UTF-8.src @@ -0,0 +1,50 @@ +# Warning: Do not edit. This file is automatically generated from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# CLDR project, obtained from http://cldr.unicode.org/ +# ----------------------------------------------------------------------------- +# +# int_curr_symbol (last character always SPACE) +ZAR +# +# currency_symbol +R +# +# mon_decimal_point +, +# +# mon_thousands_sep +  +# +# mon_grouping +3 +# +# positive_sign + +# +# negative_sign +- +# +# int_frac_digits +2 +# +# frac_digits +2 +# +# p_cs_precedes +1 +# +# p_sep_by_space +0 +# +# n_cs_precedes +1 +# +# n_sep_by_space +0 +# +# p_sign_posn +1 +# +# n_sign_posn +1 +# EOF From nobody Mon Oct 14 10:19: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 4XRtWY744rz5YKRK; Mon, 14 Oct 2024 10:19:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRtWY6D64z4rZN; Mon, 14 Oct 2024 10:19:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uriNJZlUmRV4Z9PoxS36psLPxsMkjM3nSzWTO5IC/ic=; b=ZFFp1dYZ1fkuDZAcYkrIyyU6dN9IN8UmBW4SGxWB+prhCjW09FU3aNv6XG2a2brUQ/K8Y9 ZUmaqKTTI3/W0zeQgvW7Y1mLWIpLhWWykGmtSdJF7JZRn0/8UC8ukARGXnMV6Bos0NZACh CesWPIx6sCzcHr0xGAWYzusjWxu+eLRLyw10vJC0Uzi6JZZ6JtKpqcoVpDmahtdNpjON1+ bK83zyqEVgqAua6dA+r40EG7zGrQZfxxAUrGhBWFa5bXc8BwQS6ymFflVsXfd0iK614PLp Pj+DiS7diVhoOwyQV5+tUDibWMZumojHDrdmLqAmTdIuzGrFxV9esgEvVIbDHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uriNJZlUmRV4Z9PoxS36psLPxsMkjM3nSzWTO5IC/ic=; b=ZX6eet8QlfrgCR8J8OknqImg11zRHfwHsnm/b5P2486C///IKW5ZSn+Kk1DvBcWwKeekRA W9rNEajljSEjW8QLa1LiAheRAIFHgRSPDBjt1ehbFExoP1IoBs32B+ciLBxAXeFy6PwGxf goG0OsbOggd1CCna3a+0LHsRJ8Nv7jvHovJvZnNED8pqtIr4nPGSl7QU1WfBwCP+ZINaGd YRfxw6LiCGHnnW2biJHwtv3e11Vs7yB71/bUi923RSAuN9Ixxwjz5Ju7w5BxdJPcNfUngS WfXDowR6ZjMpg0LssDqOxkrf485663uKNset1IZ5fkts2f7Hb7Go6uQ2aj0hzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728901177; a=rsa-sha256; cv=none; b=RhrhgAlEm9+AwSkfqoEc3xpDfb0grUFhPEt6tqrH0RjnLwMWCH5+20c3rW2+w56ke+JXEc nUVuF0/XpU1tm9rH4zHHDzSIqSfwIe1LBF3E8cr/UgjkTcxNZi8aD5k+VvJygEAPNQ3V1n 3vlT1s4T2VV7Z7yacePm/3/KolMGlKEkRNwY63TeRHTDM/EuZVU+1kzEQ4BBuTnosxb7RL rWZAgjJR2Scymz9r4v0YLHY7O0A8kipZOCsTUQKbK5yt+DCsaKKZMIORewap6CIyhGBvbz 1PyAvCjMCGWnGBEirFIhy809mDVpgctW4vyF9ALHQHmYsgcV9ygwLa4UzyHlpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRtWY5hZjzYdr; Mon, 14 Oct 2024 10:19:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EAJbIk053578; Mon, 14 Oct 2024 10:19:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EAJbwx053575; Mon, 14 Oct 2024 10:19:37 GMT (envelope-from git) Date: Mon, 14 Oct 2024 10:19:37 GMT Message-Id: <202410141019.49EAJbwx053575@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 4851376de102 - main - rc.conf.5: Fix grammar 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4851376de10210fa37644ced3dc97fe10e2a61a6 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=4851376de10210fa37644ced3dc97fe10e2a61a6 commit 4851376de10210fa37644ced3dc97fe10e2a61a6 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-10-14 10:16:57 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-14 10:18:55 +0000 rc.conf.5: Fix grammar Reported by: markj Fixes: d80d7a8e4643 rc.conf.5: Clarify wording MFC with: d80d7a8e4643 --- share/man/man5/rc.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 62707e7f13d6..a66477ae4510 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 11, 2024 +.Dd October 14, 2024 .Dt RC.CONF 5 .Os .Sh NAME @@ -103,7 +103,7 @@ and will be loaded. If .Ao Ar dir Ac Ns Pa /rc.conf.d/ Ns Ao Ar name Ac -is a directory then all of files in the directory will be loaded. +is a directory then all of the files in the directory will be loaded. See also the .Va rc_conf_files variable below. From nobody Mon Oct 14 10:23: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 4XRtcQ1HlBz5YKVS; Mon, 14 Oct 2024 10:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRtcQ071Sz4sH7; Mon, 14 Oct 2024 10:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kRcou48fpNwyobDs3thOXJ1KnXljTlJn/dzTo4IZO2k=; b=yFZsSv+0sC2Tb1PEXztywIPByoMs6ByXvkrlf5Q+7FsTj7nPKcwDtUXAher3Z1331zwj8c 8kljZ+15taHdTGoTXxRLL3O1pwNh4A0REQPabcLuOkTZcZMAZg238kU1VK3qrD7/9r7tYz PxX0abRSUT4Ze0x1I7z5B/a0dXYls4sgIg/kfXYSz8wCwYG7QZRKC4HwOp/OPRcFV6/hu/ NXPSG5TqQn0kGiVZY+JwF4lC+QYs4OrHXuXW4AYmu+jxkM4nIqGNz8bLpA9tlaZ80H5Luy /ftqtbgl+WwPIb4PUqYraQZDBQGq+i8yqG/NPS8fA0uVX5DltCo97cA04/23yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kRcou48fpNwyobDs3thOXJ1KnXljTlJn/dzTo4IZO2k=; b=HFov6K5D2XA65tOPeSgMkqOHiYliH77NhulVAvqhBmhJyPlzIJAw5EGh/wHBP3g9q362CM mzqiFV+oj8z5BZ1bBcqRtdE1FpGuiIneVOvy8bwaV1wMqDYypY8PLfzL2JCH/axkH5iHMd AjSsLNJ3K9d58hxZ+4bopsxoFcLBvEqHIYcMKO6nuVsqqK7ELEhiU/wazoCXtXI9GrQNf2 omZVj8YiXeYFrmrV/zKD3Y8FPSz9n9ZYw0QcA27jawZIZ6YpdrPSdb2h7N8u7bgwY0DaNd CTYx2Mfp0KzHlaXKHFNmNZacCzchuCKjhFXkLFgbDCIDbDxwaCq9rQeXPg6bpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728901430; a=rsa-sha256; cv=none; b=cBDUdQSQvX+U+XPWlwFcJas9uzmBz40YP5LWK5aABOGPOUahIQiOmseTacOvkfKKUe3Rx0 oKIUI1X4mZ64ykEpbnqfd3bzFPmK3hTdr2OY8+bgoJE/QzW3HIS1QzKZ+OC/fLQEG+sTdD S94vk6vdXAu0POO6up9OaoMxu9ZhcEzsHibB9VDrZWOdrBbhXVoZDU4JphStMGHM+S/FCu sbjZuVOHthgvlvosgedltPa/TtpDPHbH40Mux2Q8Y75hWmVbvf36VbNMzYAe7hxzaaRGcb ChttyyE/5MaYp4BJQWmu0DVnn53Zftfm5H1iySit9jdyXsZNPqHx1cPqRRgBLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRtcP6q9VzZby; Mon, 14 Oct 2024 10:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EANnce069701; Mon, 14 Oct 2024 10:23:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EANnVY069698; Mon, 14 Oct 2024 10:23:49 GMT (envelope-from git) Date: Mon, 14 Oct 2024 10:23:49 GMT Message-Id: <202410141023.49EANnVY069698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 4fc260561e84 - stable/13 - rc.d/sendmail: Fix stopping service during shutdown 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4fc260561e84edf5df13d4ba3aa829e5750c9f6e Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=4fc260561e84edf5df13d4ba3aa829e5750c9f6e commit 4fc260561e84edf5df13d4ba3aa829e5750c9f6e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-10-04 12:26:45 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-14 10:23:44 +0000 rc.d/sendmail: Fix stopping service during shutdown The sendmail service script needs to be stopped during shutdown to ensure a clean shutdown of active SMTP connections (and writing any in memory queue files). rcorder(8) requires the rcorder block to be an uninterrupted sequence of REQUIRE, PROVIDE, BEFORE, and KEYWORD lines. Having a comment in between REQUIRE and KEYWORD makes rcorder stop parsing the block when it reaches the comment. Fix that by moving the comment out from the rcorder block. Reviewed by: bnovkov, christos, gshapiro, markj Approved by: bnovkov (mentor), christos (mentor), markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46924 (cherry picked from commit 8751fbe36ff02ed695f02132ee6eac723d2bbe3f) --- libexec/rc/rc.d/sendmail | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/sendmail b/libexec/rc/rc.d/sendmail index 68803a957952..ea97503890f9 100755 --- a/libexec/rc/rc.d/sendmail +++ b/libexec/rc/rc.d/sendmail @@ -4,9 +4,10 @@ # PROVIDE: mail # REQUIRE: LOGIN FILESYSTEMS -# we make mail start late, so that things like .forward's are not -# processed until the system is fully operational # KEYWORD: shutdown +# +# We make mail start late, so that things like .forward's are not processed +# until the system is fully operational. # XXX - Get together with sendmail mantainer to figure out how to # better handle SENDMAIL_ENABLE and 3rd party MTAs. From nobody Mon Oct 14 10:24: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 4XRtch5ZcVz5YKSc; Mon, 14 Oct 2024 10:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRtch55L6z4ssp; Mon, 14 Oct 2024 10:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UHTlQBuv6wPjC0lU1ZOOpoCK9MfQOymuIo+MiuQFudA=; b=tdUM3DDqphRkAeVqoekAsSP4a1wHFSbRpP4xIqbFDb+KJmW69qP/R5t/2Cyt/pBdzkaYyy +Xpnjxc3oyaqkYv9v5gHAGlqpMWu3bpfr+t8V5KwZCRlmc+8zI4pdyHhMSoiRZdF+KlWSb Jgiy3MwL2QrdYkfzLPhbk1tGWr6LpoRcOsQYyq1vMOsLX+QMNDKq/L/YJu9sRbG2vwCLa1 S6tZYvFEzPAHzX4Mm4EfqJ4CbmWTjDlc0LXsPPwLwk2zJlbHLu2hkVHjLBAAlNhpnPh/pU hBKcMteOHMiSc6znyE1pNMYTHmxIfMfhib7LPUQcfYwMBEHO7yYfuz5GX0y72w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UHTlQBuv6wPjC0lU1ZOOpoCK9MfQOymuIo+MiuQFudA=; b=xW0Q9dOuQkQkvZoosRIC1Sk1hbvtXKtZRXN4tMC5iW1p44c4lmSC07aDHEVU5fuFoVWIBL 6Sd1yllPvQQXqOD2YaKMwwZsjyVK/SEEvfJVyRJiXgQmk4rzhnCUHGFc2kt1FTRF2Nyk42 km5fjiFFX8dpN+XgcKwYPdlV/wBEYZJ5+1LvuGK+r8EiXB2cpP4R366OEU6N8XmDP295hE AyZEGta6CT2XGIs6oG3VB2wBHmuYD8fX4CgULirzGJH0pzLVw4qqH9vjQo2GuWp3Fv4uGs ykrQOAL4cKmeVFmLS0IsUsMAKy02ETPmnvBYLkg1xUuWMg2qyU0GhGS6My5/jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728901444; a=rsa-sha256; cv=none; b=pYexmSyQ7nlF10UIPJ3HaqeHBTb8+Q/w9eil8A+HrCowL6Q2dJJ+gdctCUWz0yPyFuKfN2 faIOQjAc23pjNzS6pTJRWX5Mqc3HbIan7P7TPI8369NmfAzJ7gHEPp2hjXXIQEXdjNngzk CkgV3wZR4NLBL1kpRvqMu6YeuB/kSprO+Aiw2eJK0GkKczL3WqT7ObrZZuk7K6QUAHF1ND GxHph0hBCWJzmbwwDCajomPLzZzKjQrUXjPtgku7xNe42Yk4wkeRlxp9gA/scecfUfq2Sd afBN2cMPr40Zm8ZGMCgp2ZUc5guFSO/8yvyed/vYMQv1f2ZY1z1DTHsHT9eByQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRtch4hg3zZlB; Mon, 14 Oct 2024 10:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EAO4WC069929; Mon, 14 Oct 2024 10:24:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EAO4Yf069926; Mon, 14 Oct 2024 10:24:04 GMT (envelope-from git) Date: Mon, 14 Oct 2024 10:24:04 GMT Message-Id: <202410141024.49EAO4Yf069926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: ddefa76a69d5 - stable/14 - rc.conf.5: Clarify wording 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ddefa76a69d55161c5211bcbbfc71028ef1fd971 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=ddefa76a69d55161c5211bcbbfc71028ef1fd971 commit ddefa76a69d55161c5211bcbbfc71028ef1fd971 Author: Andrew Stevenson AuthorDate: 2024-10-11 09:49:42 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-14 10:23:45 +0000 rc.conf.5: Clarify wording PR: 196736 MFC after: 3 days (cherry picked from commit d80d7a8e46433b90dc5e7ae69144664b9a6e35df) --- share/man/man5/rc.conf.5 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 0576d26ce059..a13bbab0743f 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 18, 2024 +.Dd October 11, 2024 .Dt RC.CONF 5 .Os .Sh NAME @@ -103,9 +103,8 @@ and will be loaded. If .Ao Ar dir Ac Ns Pa /rc.conf.d/ Ns Ao Ar name Ac -is a directory, -all of the files in the directory will be loaded. -Also see the +is a directory then all of files in the directory will be loaded. +See also the .Va rc_conf_files variable below. .Pp From nobody Mon Oct 14 10:24: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 4XRtck0lMzz5YKlk; Mon, 14 Oct 2024 10:24:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRtcj5cVCz4sjg; Mon, 14 Oct 2024 10:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VUaE1SViZqvkK37J+iW/8RrelKTRkOC/j7EQSq0fdXo=; b=Z8HGoTHveh6kztB59nL5GPQWRuYSPj6nAIKDQqPJIxSNJcDK8koaGRZefJBjkb/pilhnFJ Ssk0OjPRZFJPSU7IpOvcvxTm/f+2/56EHYmQAcHkqU4IssGb62THeegF3abi3/sV8Q/nIh 673J9GwITkFFoz7vM2pjYlAee5v9GRi29wfFpCaCKKrphpe+RYf9gQgWoiDgFEGVi1DFn3 bbdH8zZ1h5mSunVw2gJvmFiIS7r7afTpE5RagXzQCA/5mgj7pOwBHQ6UTkSDrHAy1D0ALv kn4Kpkggt7PmtF1j0sZNhpq0dxd0G5pXI27NlGv5kapHJUWE0hRKBhu3ha9dqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VUaE1SViZqvkK37J+iW/8RrelKTRkOC/j7EQSq0fdXo=; b=XcTbgVPLblwiO3hMsNGq1CIyls994kA4eTL2X87IyjsJ9l8ZCf0Y+t/VQ1a3m2/yyVeVMm WO5cVw1+oLyAQPll3RYH5JuKg63107Kbd6FOaR15pl1p/L7+G7qm+qxp9n9PfYUcYPUUaX j+Q/Y0SoOmBhB3clNSsG74tInJO0nrnPk3jR8hbuXSXYzN0yyzgN4L0rhgbwm78RDZSrgi Q4RJosBjaeOoR7h+023jUlsKDFPeqNSIHrRxTLz6Ng5BAMnBH05LK3xOWxCADEDWbi5Mko MdmU/OXdbTil5Jb+kF09U6kfBEb60T1qB1Ve7gzGvSL9WPWd5G2bwZTBB0ANVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728901445; a=rsa-sha256; cv=none; b=yJZxvnd/xaWte2xyDgC79JyMGT6XBGs9+Fm72PJ7aKsvm/6m6Ex9+pqSgkb/ydIfOTqr3X N0tY4gud6/DlmceCxiFHQuVpkDAL/mZ5Zkch6qiE39+50kwT0kF6nRtsQ1t/tvbXhHSNwr OuRbDHf6ZD+0V+f+UyZwzzngWDFKriX9pwerPe9ioheJMNXjExl1KKEw+Ugqi0eL3CLY/3 YArs1WBWsvL7EM8n8SgLQJtSJhsQnzyVf5CTpjBjxJKLcofRzOyiv56CWA2kyfe0cn05xz s7Hwj8Wy1uNawZLnQr7112Aop3Bxlsf5Q59izhBR461/nD6JQo4oPyMEXOsGvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRtcj5DlDzZ37; Mon, 14 Oct 2024 10:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EAO5fQ069965; Mon, 14 Oct 2024 10:24:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EAO5oL069962; Mon, 14 Oct 2024 10:24:05 GMT (envelope-from git) Date: Mon, 14 Oct 2024 10:24:05 GMT Message-Id: <202410141024.49EAO5oL069962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: f6d6d260a38d - stable/14 - rc.conf.5: Fix grammar 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f6d6d260a38da7e87e511c64e0a49eb196ca2ff9 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=f6d6d260a38da7e87e511c64e0a49eb196ca2ff9 commit f6d6d260a38da7e87e511c64e0a49eb196ca2ff9 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-10-14 10:16:57 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-14 10:23:46 +0000 rc.conf.5: Fix grammar Reported by: markj Fixes: d80d7a8e4643 rc.conf.5: Clarify wording MFC with: d80d7a8e4643 (cherry picked from commit 4851376de10210fa37644ced3dc97fe10e2a61a6) --- share/man/man5/rc.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index a13bbab0743f..fb010c20af26 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 11, 2024 +.Dd October 14, 2024 .Dt RC.CONF 5 .Os .Sh NAME @@ -103,7 +103,7 @@ and will be loaded. If .Ao Ar dir Ac Ns Pa /rc.conf.d/ Ns Ao Ar name Ac -is a directory then all of files in the directory will be loaded. +is a directory then all of the files in the directory will be loaded. See also the .Va rc_conf_files variable below. From nobody Mon Oct 14 10:24: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 4XRtcl16YRz5YKSf; Mon, 14 Oct 2024 10:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRtck71jBz4sd4; Mon, 14 Oct 2024 10:24:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jA02FxEfrEzYSONxmdTouqklfVMXND3hMQ3HsRQfj+g=; b=cKOG6ULTiE+odd4dWZKK1H2gSMlFY4RyGKuhLnujTvG+1Nd/bhw5fIA7/11kO4qFxFEK3G et6k1iVvASdcsZd6sYzqte7OenLNyIY+4VwDAtC06phiBTci0/91387cXzWGwHxm+DWd1Y VGeLWbt1fBZLkYR3+bz+Eb+ujdBrnisWUCcIuS5TUO81mIt0uVfsfAqVBQtmrHgNoSBxY9 bTrmwrlx0akRI4u/rothGRAVALwGu3urgTsbGE/NX6RyvFDlg0GG+goJgTXUK3Lct2E/CX TTCcR1VXBWrVnczIyJevaHxbZG0ZeLWADYGCOy71vds2keHftciFqwNaM6t7/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jA02FxEfrEzYSONxmdTouqklfVMXND3hMQ3HsRQfj+g=; b=iTv6OZEoqxUP7iIzzY5jcYYKA/R/PSYEDY9vAxFgTE91ECHm/7mU8Mr6AMduFFLLBc/NBd aBnfzbpXWcoHGBlGZt5m8J7xKj2evXj7UKSGxiBkBsQZxF6YKG71oWdY6BrrGnbpM6qI04 g7NdYVijh4X7+ZD+r7MHHD/qTjrJid7DXZ6qz1wHeS+HShsVOsAfK3EBtLj++QXHgmEeut moM5m9Wxa1qRLeKf4Ygv32IKI5ye56it0ibWmcN3JVCEiad4hup/iA5oWWdgp+GzSbWh3s BU9lEWuwtjFE0LrP1J5Sykz5+s+Htu5EsqCfA0Ga+p/gp9uYPYVM61o0rVK29Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728901447; a=rsa-sha256; cv=none; b=Bdu1fMSPt7XA0PJ9e6cta+UAt6u2iM9uOYRBHeOHItjcIy8X9wNxCxfE4SWG+IillLlrOQ XXlpybAaPhkYDdRat9vleai0InnoGmdJqHTo1niA1EaBWm4iF6wMqxSMh9IkEW1ysWLrR6 dsq/9hfOGRBKrgU2qh3Ja/9KdEwRZivNZ2fcuUf3v0H9efXzjQS6i5//ybWSJu7vJQWvHK wVYaNl7kdaQ62T8V88zJuEv1HIsL29ZNgjjSEnI/xtcuAnOucdXDy155Srx33MoaD9t/we ak5gVbLzhHnzcsXkqjjKYR6uR3QqBV5qMoELISCxCmEsGr1EhDCO0ytpRezpHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRtck5y54zZTv; Mon, 14 Oct 2024 10:24:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EAO6Ag070010; Mon, 14 Oct 2024 10:24:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EAO6KH070007; Mon, 14 Oct 2024 10:24:06 GMT (envelope-from git) Date: Mon, 14 Oct 2024 10:24:06 GMT Message-Id: <202410141024.49EAO6KH070007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: f94127e3ee91 - stable/14 - rc.d/sendmail: Fix stopping service during shutdown 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f94127e3ee9181f60576c823ecee6c85625b96e1 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=f94127e3ee9181f60576c823ecee6c85625b96e1 commit f94127e3ee9181f60576c823ecee6c85625b96e1 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-10-04 12:26:45 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-14 10:23:46 +0000 rc.d/sendmail: Fix stopping service during shutdown The sendmail service script needs to be stopped during shutdown to ensure a clean shutdown of active SMTP connections (and writing any in memory queue files). rcorder(8) requires the rcorder block to be an uninterrupted sequence of REQUIRE, PROVIDE, BEFORE, and KEYWORD lines. Having a comment in between REQUIRE and KEYWORD makes rcorder stop parsing the block when it reaches the comment. Fix that by moving the comment out from the rcorder block. Reviewed by: bnovkov, christos, gshapiro, markj Approved by: bnovkov (mentor), christos (mentor), markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46924 (cherry picked from commit 8751fbe36ff02ed695f02132ee6eac723d2bbe3f) --- libexec/rc/rc.d/sendmail | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/sendmail b/libexec/rc/rc.d/sendmail index 68803a957952..ea97503890f9 100755 --- a/libexec/rc/rc.d/sendmail +++ b/libexec/rc/rc.d/sendmail @@ -4,9 +4,10 @@ # PROVIDE: mail # REQUIRE: LOGIN FILESYSTEMS -# we make mail start late, so that things like .forward's are not -# processed until the system is fully operational # KEYWORD: shutdown +# +# We make mail start late, so that things like .forward's are not processed +# until the system is fully operational. # XXX - Get together with sendmail mantainer to figure out how to # better handle SENDMAIL_ENABLE and 3rd party MTAs. From nobody Mon Oct 14 10:31: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 4XRtmr1Pdnz5YKxs; Mon, 14 Oct 2024 10:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRtmq6932z4tnJ; Mon, 14 Oct 2024 10:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZnDZMW0OcavhWvjSRAsoEmaMStdzUhh/4UA5vhjzMhM=; b=OPo5x6BLNR0AJpks3LLko/PS6mNkp6vQuBwxeXBuoD+fkSthj0KX2rV6frve71h1hsKoAk d85PO0Wf3A6bpUxvvseQ/f2FZ0ITv5PS45zkifRZXNWNKAVTumsX9cWYT3AUp5A1QPeFQq htsEiNhdU41doV3lxBRrZo8r0E/uhTfs8UEENFKKkSam5ZyNMffknhHl7jX0EUHp3vBZar MAJYVFhxScy5+u5RCayHJFEMi9t0KwObOQemltfdOLs+QdaivmKdzwo6jbwnGLYbOD+JIx mrsJ1PPfkWLXX5Ltu2K2oQnwzuNAh6TBp0aH3lZoqln89V5uYkdWoJCY6iTouA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZnDZMW0OcavhWvjSRAsoEmaMStdzUhh/4UA5vhjzMhM=; b=UXHvbdqsgWB7CiAenRrwZGDaT1+XqAjWgJkH0CTaVuwclgbTf5d5+ujmXO1GjG6Q7s450C tc+SkQCjY23XE/b0rkwIJJisarT3SbVQO51s4BO8m9LOp85ZoKkjsJD2yWNTjM6BfJ3TXD K2lrknrsr8txsee5ZvTU/dVEqjIHum8MNas19jZ5CvxjWh9BbtJje62Lhh73mlH17PXW4n 8awKBF/6l9hEYHqpj3epPuxXhILmksX2QLDj6JSwyu3LcUYULu6Pu8RXB85FOrlugQKvp+ vczrpbe7o0QSMIs1dRRdM3CZcEYtxzy5+d+qAKYeTGjRnolj+rA1sHZb4hS91A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728901867; a=rsa-sha256; cv=none; b=e7rgS5/lA8YdIGPtnH5GxFYDXtEb+DCPODFqou+uxNOf07ORn6KFhXe3g+dnKUPJETXDjo BOqYWiKr+JdhUv7OrZNzjCR+Iu8wRdIr/XUeNfwjCzO90PLwaLWvaXaTlWJNAad93ZJCrh 9jhLV/h3GHLP211QhAOkzoiWdA/VTZyvq8BkXoVamFYdSxcNRAe9bGQ8GtgQMhmfg/7rGx q7v0QiR8DuD3zPjaRJw2QTQ4OYLcuC9xf0fd2iY2NxYfCEqW5chPo91qHPPLupEavIEHkz 1WFOUYH52P74FHpBQzy60Iyw9+QvEPHuhzFL5JO7TxC++yNRXGxmlMDLyuD3Qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRtmq5mVKzb5S; Mon, 14 Oct 2024 10:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EAV78e079692; Mon, 14 Oct 2024 10:31:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EAV77u079689; Mon, 14 Oct 2024 10:31:07 GMT (envelope-from git) Date: Mon, 14 Oct 2024 10:31:07 GMT Message-Id: <202410141031.49EAV77u079689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: e01826567938 - main - vnode.9: Document vnode_if.awk and vnode_if.src 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e018265679389cfcebe172d4bf61aa4fe4f58b0a Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=e018265679389cfcebe172d4bf61aa4fe4f58b0a commit e018265679389cfcebe172d4bf61aa4fe4f58b0a Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-10-09 10:04:36 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-14 10:25:58 +0000 vnode.9: Document vnode_if.awk and vnode_if.src Discussed with: bjk, imp Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27196 --- share/man/man9/vnode.9 | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/share/man/man9/vnode.9 b/share/man/man9/vnode.9 index 3d34b48c2ee0..5dd087725e92 100644 --- a/share/man/man9/vnode.9 +++ b/share/man/man9/vnode.9 @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 12, 2014 +.Dd October 9, 2024 .Dt VNODE 9 .Os .Sh NAME @@ -104,9 +104,21 @@ the vnode. The .Va v_op field is used by the -.Dv VOP_* -macros to call functions in the file system which implement the vnode's +.Fn VOP_* +functions to call functions in the file system which implement the vnode's functionality. +.Pp +The +.Fn VOP_* +function declarations and definitions are generated from +.Pa sys/kern/vnode_if.src +by the +.Pa sys/tools/vndoe_if.awk +script. +The interfaces are documented in their respective manual pages like +.Xr VOP_READ 9 +and +.Xr VOP_WRITE 9 . .Sh VNODE TYPES .Bl -tag -width VSOCK .It Dv VNON @@ -154,6 +166,16 @@ when holding a .Nm interlock, will cause a LOR (Lock Order Reversal) due to the intertwining of VM Objects and Vnodes. +.Sh FILES +.Bl -tag -width "sys/tools/vnode_if.awk" -compact +.It Pa sys/kern/vnode_if.src +The input file for +.Pa sys/tools/vnode_if.awk . +.It Pa sys/tools/vnode_if.awk +The script generating the source code of the +.Fn VOP_* +functions. +.El .Sh SEE ALSO .Xr malloc 9 , .Xr VFS 9 , From nobody Mon Oct 14 10:31: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 4XRtms1CrHz5YLNR; Mon, 14 Oct 2024 10:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRtms09wjz4thk; Mon, 14 Oct 2024 10:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w9CW3p9eXgn90QLJ+Wv7fOfsmP5Chn7MmDej+hIafB4=; b=D6h7c5cmNHZ+9/z7WcsrriExRWL53OC497HnDp7BAvCe/+1TVhRtlhkj58vhqs6mJPvL0G 4DnYUu4pEIWXQtHttoQPDF3lWttr9XCQmW5cdAl43Hxdn/dtyUo0QAK9BlDV8OtmvHQhTc KtfZ0OfjuKmph3/o0gQv5nGdGQB7cF0L+ICTLaywA4jZo+4r/OJP0iNE5jjPWtOXAPBruD 23K6vN40lrqqRXfugectLf0Ii7YQ6X6vRIUIaNthUZiiJcatvXptpvC6Bx0sIHCLn/0UAr uJlg84t3YxHXX8pGJXNwEkL6rSoWseeI8nDJL3kzFwKuw1jMKQEz3qTjFl03iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w9CW3p9eXgn90QLJ+Wv7fOfsmP5Chn7MmDej+hIafB4=; b=CH2+RosCLoovozRyGaLP0dmnLduI9NHVop3hSiBTd4PvbaIg2plPlbMQ+vQLIvLZvsrN4r 6s+phg4XPUzO5cSYgkTM6cuhPjh3F+NnWsYn+mHlctI224cY5oeb7hqL+QUhodhXOpmG2Z s/Sl5ZqxfBLvZS+ICaencR5YTa3GLd2o7wT+xLIF+GUtdvmwk1vageosO6jxG1WB5MVJa4 pOP9hrQujKAUfUr0WnT+LBU2aCh+8Yy4VGejl0CtjFIoEhQ3mEw3vrZpvb9xmPkUv+8dXU jgsCUFiT7J8S2ZnYnOUaJbyRg1eN6ZwJ/guDihbnwSdoZKlNM8uU3sDqKNn8Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728901869; a=rsa-sha256; cv=none; b=ufpdaqsSjFz4Alj94rdc4LBVVjZMGjZ9lvobVvKzIe59TmMC+wbwBMs7eBoMdZKBvwiWtR KvmNbKxjPukppRozqw6ruDnXrNNHqlWwxssgI/2b4Ur0F78ARJN/5m1AyV8Kv7Ekc4ygOv yQdCDj1fusdguU5LyWXlLe0pVFq9F06+vag1oZ/OZO6GPGzywIMhLmPGgNCFgoV7bf1ID6 I/GFuVHB6ZNs08H3Xvmi9MWuotMZIqqW4f+QaYqyHwisHBAQZsvRxBIqEYqSLHl12gSsnP 7UPixCKPbvGnFHIfpCxrtWMpjK0Kxiif2U+LJbOZFYZmgDuf8CjpSpIjEqDl/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 4XRtmr6ss1zb5T; Mon, 14 Oct 2024 10:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EAV8hZ079740; Mon, 14 Oct 2024 10:31:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EAV8Xg079737; Mon, 14 Oct 2024 10:31:08 GMT (envelope-from git) Date: Mon, 14 Oct 2024 10:31:08 GMT Message-Id: <202410141031.49EAV8Xg079737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 6fa42b91ca3f - main - rc/tests: Skip oomprotect tests in a jail 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fa42b91ca3f481912af98c4d49c44507eb1b8e1 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=6fa42b91ca3f481912af98c4d49c44507eb1b8e1 commit 6fa42b91ca3f481912af98c4d49c44507eb1b8e1 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-10-14 10:28:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-14 10:30:23 +0000 rc/tests: Skip oomprotect tests in a jail oomprotect cannot be used in a jail. Reviewed by: bnovkov, christos, markj Approved by: bnovkov (mentor), christos (mentor), markj (mentor) MFC after: 1 week --- libexec/rc/tests/rc_subr_test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libexec/rc/tests/rc_subr_test.sh b/libexec/rc/tests/rc_subr_test.sh index 90306de9a8a7..f004354fe52e 100644 --- a/libexec/rc/tests/rc_subr_test.sh +++ b/libexec/rc/tests/rc_subr_test.sh @@ -35,6 +35,10 @@ oomprotect_all_head() oomprotect_all_body() { + if [ "$(sysctl -n security.jail.jailed)" != 0 ]; then + atf_skip "protect(1) cannot be used in a jail" + fi + __name="$(atf_get ident)" __pidfile="$(mktemp -t "${__name}.pid")" __childpidfile="$(mktemp -t "${__name}.childpid")" @@ -72,6 +76,10 @@ oomprotect_yes_head() oomprotect_yes_body() { + if [ "$(sysctl -n security.jail.jailed)" != 0 ]; then + atf_skip "protect(1) cannot be used in a jail" + fi + __name="$(atf_get ident)" __pidfile="$(mktemp -t "${__name}.pid")" __script=$(mktemp -t "${__name}.script") From nobody Mon Oct 14 12:57: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 4XRy1B4BQ1z5YX5M; Mon, 14 Oct 2024 12:57:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRy1B3jk1z47JH; Mon, 14 Oct 2024 12:57:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728910622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q+RDBbOi2oNGAOHUKmhfsiSDAs09Yo1cOVVXgxodEi4=; b=uReToCpZFzdNI4UfosM/Fg1uJYfFY05Rn8VLdNsY7wAYzIbKOITqFGz1YeRWVBgrLrP1oT Xq8XAOnfMIq6XjJdTywfXq6HNxGyCFuLCYl8YO721A1/yb1hq7NwgepAB0/fgCcweyuArH ARVxes+4awSb+cdSItoyzr61CwQ/ittvJuwys14cfS29j6y4fYTcCEComYiASTXTmfTuo+ cKzxFEeLqC5Elmvp6rWRoNGOHSrUkwxbWg7BeQSwGwh6WHzN6jxZit47oly6XnxkN7jdl/ 2BoGK7BlLaiEX3n4bpgpIhorPbPmdQRltW4vWK/WhdMF0YPxOtOc2jgQn8EO/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728910622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q+RDBbOi2oNGAOHUKmhfsiSDAs09Yo1cOVVXgxodEi4=; b=QLVvLcvfQ4YeQqzW6uNNMQajfJ/DbPLa73NkJAxQwRy+5aKpB5d2IVjygVCMw0xIBe7Hvd dao7k1THxKVgsVSePK7AHVWBFH342NqJhTH4lPWowELGLqwgskd+n1bSBLvsHe20uMRXJc +w65KqZAbPUKMTBczueIkoiMYSVSyC4O7Oujd+mXSkcw+OCRtIA6Cnr9M2HaDklc3nLY25 ZKlyHoHbqCGeDC+BY/zLTzssOggPE326zrKa5VAXtbLM5bBDG/4JiBPF8CYdFEIY+6/EJ1 5M0t4zLbi6jfFd17srWtveqtzgTjVHR0yDZUzM9jZK7+IddVmujT8e812ARgdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728910622; a=rsa-sha256; cv=none; b=P6cy0CQ0XTT1EH7a66OVx2+w2erhcfjV/P7uV6W9nCD//vpqhDzNMhKM4hIGARdNSouKwp 9r2rYB2aMROcwLO+cbQShpOEbs7Jr7D52d/alPnsMLozhzc5FG5ewgkkA5F+d2Wh+Xn10e V1JGc56S627XZmkB2Or6iGWmGeM6XMMUpxUx7qFwS7LqCTEvLFBREYHuFiMQhOuY9NKR6t XX2kUWDZXbjK1UV14Xs2FLURkegWXJ04Z+0DiKsTPuqGjnLL39L1IkuIp3Cw+Rdd6XQ6ku 29LMbTox/iFdnhCMp9y8uWvOCRHEzvhcuJIWD4l4N2GpncHywEMemHU2dGbIKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRy1B31CLzds5; Mon, 14 Oct 2024 12:57:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49ECv2Oe023633; Mon, 14 Oct 2024 12:57:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49ECv2o2023630; Mon, 14 Oct 2024 12:57:02 GMT (envelope-from git) Date: Mon, 14 Oct 2024 12:57:02 GMT Message-Id: <202410141257.49ECv2o2023630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 68b1f5dc5936 - main - igc: Add sysctl for DMA Coalesce 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68b1f5dc59368ce5175e3300bf95476ea5a560bc Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=68b1f5dc59368ce5175e3300bf95476ea5a560bc commit 68b1f5dc59368ce5175e3300bf95476ea5a560bc Author: Kevin Bowling AuthorDate: 2024-10-14 12:55:18 +0000 Commit: Kevin Bowling CommitDate: 2024-10-14 12:56:39 +0000 igc: Add sysctl for DMA Coalesce This feature can increase efficiency at the expense of latency It does not work well with the default interrupt delay, but expose the otherwise unconnected code in the driver in case people want to experiment. See https://www.intel.com/content/dam/support/us/en/documents/network/adapter/pro100/sb/466827_intel_r__dma_coalescing_white_paper_v003.pdf MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/igc/if_igc.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index d964fbe4cf91..da897d636cfe 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -141,6 +141,7 @@ static int igc_msix_link(void *); static void igc_handle_link(void *context); static int igc_set_flowcntl(SYSCTL_HANDLER_ARGS); +static int igc_sysctl_dmac(SYSCTL_HANDLER_ARGS); static int igc_sysctl_eee(SYSCTL_HANDLER_ARGS); static int igc_get_regs(SYSCTL_HANDLER_ARGS); @@ -490,6 +491,12 @@ igc_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, igc_get_rs, "I", "Dump RS indexes"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "dmac", + CTLTYPE_INT | CTLFLAG_RW, adapter, 0, + igc_sysctl_dmac, "I", "DMA Coalesce"); + /* Determine hardware and mac info */ igc_identify_hardware(ctx); @@ -3030,6 +3037,55 @@ igc_set_flowcntl(SYSCTL_HANDLER_ARGS) return (error); } +/* + * Manage DMA Coalesce: + * Control values: + * 0/1 - off/on + * Legal timer values are: + * 250,500,1000-10000 in thousands + */ +static int +igc_sysctl_dmac(SYSCTL_HANDLER_ARGS) +{ + struct igc_adapter *sc = (struct igc_adapter *) arg1; + int error; + + error = sysctl_handle_int(oidp, &sc->dmac, 0, req); + + if ((error) || (req->newptr == NULL)) + return (error); + + switch (sc->dmac) { + case 0: + /* Disabling */ + break; + case 1: /* Just enable and use default */ + sc->dmac = 1000; + break; + case 250: + case 500: + case 1000: + case 2000: + case 3000: + case 4000: + case 5000: + case 6000: + case 7000: + case 8000: + case 9000: + case 10000: + /* Legal values - allow */ + break; + default: + /* Do nothing, illegal value */ + sc->dmac = 0; + return (EINVAL); + } + /* Reinit the interface */ + igc_if_init(sc->ctx); + return (error); +} + /* * Manage Energy Efficient Ethernet: * Control values: From nobody Mon Oct 14 13:08:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XRyGH15bmz5YXpj; Mon, 14 Oct 2024 13:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRyGH0Zd9z483c; Mon, 14 Oct 2024 13:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728911303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EePlnJPOAnUduAQK2uNoGr+J/hEdfDfH+7J5oAdkkIE=; b=mAp/ijS4eUBmluLTOcLKwSmMRrMQ8U5stEND88IAZaNrXMfj57qx5EKqVZmDD85Nynj2Hd oJQHW+To6BfBDoug7y/9Ju2ibQ3Sdkjw2OA7ShwHfKzh9/dMNIln3oIqUIKVLo3xwTlReM JqBMZrbv5liysvp+PQYHTH7cVMXFCasJ1B2d+/4XU7AWJeGlrCSfmNC9LJFaPUOQ4RfwrC +2p47KBlfYKxbycXszA5SWU7fnygTcT0yhw2rSFYtQkYiIxwnw7MDNCRAv4cZRutBH04ew TEeItQJZCSUzBAIwvCx0cBZLnraVctHNWpklGRPRHjC7A6Sk8t6spUBA/+JvQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728911303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EePlnJPOAnUduAQK2uNoGr+J/hEdfDfH+7J5oAdkkIE=; b=VDFDJdlm9ysn8c2AWlOu4mYr1HcxHM3zs4dipDEwpicbI5xBGHPAs9FcVz9b4yrwFWTjQG rEKmSctEAzF6Zld9q+8/N69qe4nRYmqjrYyx7vvY9R7+0ZHulQM9vAf/7yuV2AORlY6VHb +tWoreRTUBxiwpH+guCtpEtp8QupJlrN/1KF1alZ6gk/tUxu+Gk5TqOtCsWMQAHVzvJUSe CqzwYidho7+F4B1Tb27j327vhFD21g0V0Yh8ceRfP/aTkD8Tt8raSN6/p2PbxRiGX427co +uidOSOwNiD/v0VpyyzsfRov7MtYgu/tinVB2JzWUutFfYvMBYXKVnxFYybH4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728911303; a=rsa-sha256; cv=none; b=BrlRRNQDmRaGNQiBAaXDhe3ChaAWLuKaONpT1+L6PO76l5HZcVpWjZUvP+WfCy/rzl9JUO Ag82W2t37Zs49gRnnJ+BglaWejqtc9H81L/HgXyOkj1dy/M3fhnSj2vDZik66p3SVOecae IWQ0RjlgH079HPIeN9MvDjluq3kD2zbIK1PiNDuJ9UpNdX/UWvGN8sCc1jjSveqPiyym6B c7bqXuJzzo8hCFNKQGr4lhNb46BQ9obBoV2VnqtylctQHzd0AdOW6+mw+g89/fvjJRRUSD CxYzE1oGxay+uLjfNg7oM4KrvajcgBin5MWOGdU8e+hCFeOISXgs+FZeJH9xQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRyGH05wyzdwG; Mon, 14 Oct 2024 13:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49ED8MZ3041275; Mon, 14 Oct 2024 13:08:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49ED8Mv3041272; Mon, 14 Oct 2024 13:08:22 GMT (envelope-from git) Date: Mon, 14 Oct 2024 13:08:22 GMT Message-Id: <202410141308.49ED8Mv3041272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 09526a771afc - main - igc: Add sysctls for some missing MAC stats 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09526a771afc411e641a3d04c905824fe8afc627 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=09526a771afc411e641a3d04c905824fe8afc627 commit 09526a771afc411e641a3d04c905824fe8afc627 Author: Kevin Bowling AuthorDate: 2024-10-14 13:07:41 +0000 Commit: Kevin Bowling CommitDate: 2024-10-14 13:07:41 +0000 igc: Add sysctls for some missing MAC stats MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/igc/if_igc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index da897d636cfe..b927b9e3b260 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -2491,6 +2491,10 @@ igc_update_stats_counters(struct igc_adapter *adapter) adapter->stats.roc += IGC_READ_REG(&adapter->hw, IGC_ROC); adapter->stats.rjc += IGC_READ_REG(&adapter->hw, IGC_RJC); + adapter->stats.mgprc += IGC_READ_REG(&adapter->hw, IGC_MGTPRC); + adapter->stats.mgpdc += IGC_READ_REG(&adapter->hw, IGC_MGTPDC); + adapter->stats.mgptc += IGC_READ_REG(&adapter->hw, IGC_MGTPTC); + adapter->stats.tor += IGC_READ_REG(&adapter->hw, IGC_TORH); adapter->stats.tot += IGC_READ_REG(&adapter->hw, IGC_TOTH); @@ -2731,6 +2735,9 @@ igc_add_hw_stats(struct igc_adapter *adapter) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", CTLFLAG_RD, &adapter->stats.mpc, "Missed Packets"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_length_errors", + CTLFLAG_RD, &adapter->stats.rlec, + "Receive Length Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", CTLFLAG_RD, &adapter->stats.rnbc, "Receive No Buffers"); @@ -2767,6 +2774,18 @@ igc_add_hw_stats(struct igc_adapter *adapter) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", CTLFLAG_RD, &adapter->stats.xofftxc, "XOFF Transmitted"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "unsupported_fc_recvd", + CTLFLAG_RD, &adapter->stats.fcruc, + "Unsupported Flow Control Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_recvd", + CTLFLAG_RD, &adapter->stats.mgprc, + "Management Packets Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_drop", + CTLFLAG_RD, &adapter->stats.mgpdc, + "Management Packets Dropped"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_txd", + CTLFLAG_RD, &adapter->stats.mgptc, + "Management Packets Transmitted"); /* Packet Reception Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", From nobody Mon Oct 14 13:15: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 4XRyQ94cr3z5YYJm; Mon, 14 Oct 2024 13:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRyQ93lP5z49dJ; Mon, 14 Oct 2024 13:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728911713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S1MijJDbRcvUnT9gJWDPb+OEyrLqF33kcdctiuoUI/I=; b=HnCKoDieKW/mbaJitLFwZn6BCc0+FVt6szIyW25MCTzrxwhAi+Umy+HQDV6ZlKnzEPS3dA qGXAqBYRFAomNs6VfbiBC8WMVa8Uhp2z22YWNDD3L7IGhjc8Xn03QHb+CbDt56b+3F9ewV VFsAT72WYTzGT/EQZKW8IMv1dbc0BZLzjO0fLYM21io5LCWzIQX3qfy2m61sPU7cRtRY30 1C/6uv3dBK/YrxIeAeU1nmTrhTdIAR5rK/ixkYrGL8By4YBRiB5YF2ojuG5HcfFpDHBSnY CDy4XwGrnlF3Ag880jbECgNFQofYzrZvIFNM7qWmWcFySppXt/Prtqn6Gh/VjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728911713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S1MijJDbRcvUnT9gJWDPb+OEyrLqF33kcdctiuoUI/I=; b=lhf5f4EbjOesfplBRqz2i5ZndP+OXjzVEmejib4keVBtSm+NtSqC7kae4YlXJfPVRtwv8j 7yOXWFxGAReoJg5d+DOzdzwNNtPwKixT6KpOOkCRzreO96bOWlarFcQqUAXqYlxidy1kE9 UrN29Kqa3NGnATw/W10XlZwgzWV48hPSpyvzBpUyaakdk9GJq/i4WVEckcThNJrhC/Qgak /cOAEguuhxkEbtUK6zYJVXtlTyWPR5ReY4D0Y2Tmnl8+fstZpm07iA78UUe1wVEKdbd9fp WFG2z92UFjCmXrWT7GNml4BeszJPUjiqlvha88AH/zLaEeljXjGOmZDbvcVr7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728911713; a=rsa-sha256; cv=none; b=s5+99MyEF3l7fJnU26TFg5JlHJtl25Ov79RsoBeW5JQPGTIxpEYhkJGuJcknrY9v1XdmZs T0QgMs5BlXhwwsXjrhsJgudofLE+Nl2ljyJ2Z7G0aVdxHSXLp6FjHIbY8AhQUj+ZFboi3O DktWlSWI2mqI2ezMC7WXd+CXcyv8zv+eq05baoLb4gbtMWzI9IZ9YQkYoBWSyevXzkHErT kbKGAut6iXvTu9lSuchzYOtMCwBOL30acxpaUM32blAjtelgOBhH7OfUVYzD0XCAPqDF12 HXXzC3EmT/SM4Qy8tmzmlkeAaya+ufk5k2ARz+FKaxc3+1l/edxRSDtMJYXI2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRyQ93Lkfzg2Y; Mon, 14 Oct 2024 13:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EDFDS3057727; Mon, 14 Oct 2024 13:15:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EDFDLA057724; Mon, 14 Oct 2024 13:15:13 GMT (envelope-from git) Date: Mon, 14 Oct 2024 13:15:13 GMT Message-Id: <202410141315.49EDFDLA057724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4e15366c6a69 - main - makefs: Record a larger TXG number in the uberblock 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/main X-Git-Reftype: branch X-Git-Commit: 4e15366c6a6907bcd0e2c28885ba5878ed4280d2 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4e15366c6a6907bcd0e2c28885ba5878ed4280d2 commit 4e15366c6a6907bcd0e2c28885ba5878ed4280d2 Author: Mark Johnston AuthorDate: 2024-10-14 13:08:09 +0000 Commit: Mark Johnston CommitDate: 2024-10-14 13:14:37 +0000 makefs: Record a larger TXG number in the uberblock By default, OpenZFS will perform metadata verification of the most recent TXGs, but this can be very slow since all data in a pool generated by makefs was logically written in a single transaction. Avoid triggering this verification by default, but add an option to restore the previous behaviour and enable it in regression test cases. Reported by: cperciva Tested by: cperciva (previous version) MFC after: 2 weeks --- usr.sbin/makefs/makefs.8 | 3 +++ usr.sbin/makefs/tests/makefs_zfs_tests.sh | 2 +- usr.sbin/makefs/zfs.c | 13 +++++++++++++ usr.sbin/makefs/zfs/zfs.h | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index fdcb94cc4dd0..823334d1b3dc 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -532,6 +532,9 @@ By default, allocates large (up to 512MB) metaslabs with the expectation that the image will be auto-expanded upon first use. This option allows the default heuristic to be overridden. +.It verify-txgs +Prompt OpenZFS to verify pool metadata during import. +This is disabled by default as it may significantly increase import times. .It poolname The name of the ZFS pool. This option must be specified. diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 7040cf9fd736..aeda889d9a5c 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -28,7 +28,7 @@ # SUCH DAMAGE. # -MAKEFS="makefs -t zfs" +MAKEFS="makefs -t zfs -o verify-txgs=true" ZFS_POOL_NAME="makefstest$$" TEST_ZFS_POOL_NAME="$TMPDIR/poolname" diff --git a/usr.sbin/makefs/zfs.c b/usr.sbin/makefs/zfs.c index a0c81f9654ab..66e7f8dafc9c 100644 --- a/usr.sbin/makefs/zfs.c +++ b/usr.sbin/makefs/zfs.c @@ -91,6 +91,8 @@ zfs_prep_opts(fsinfo_t *fsopts) 0, 0, "Prefix for all dataset mount points" }, { '\0', "ashift", &zfs->ashift, OPT_INT32, MINBLOCKSHIFT, MAXBLOCKSHIFT, "ZFS pool ashift" }, + { '\0', "verify-txgs", &zfs->verify_txgs, OPT_BOOL, + 0, 0, "Make OpenZFS verify data upon import" }, { '\0', "nowarn", &zfs->nowarn, OPT_BOOL, 0, 0, "Provided for backwards compatibility, ignored" }, { .name = NULL } @@ -594,7 +596,18 @@ pool_labels_write(zfs_opt_t *zfs) ub = (uberblock_t *)(&label->vl_uberblock[0] + uoff); ub->ub_magic = UBERBLOCK_MAGIC; ub->ub_version = SPA_VERSION; + + /* + * Upon import, OpenZFS will perform metadata verification of + * the last TXG by default. If all data is written in the same + * TXG, it'll all get verified, which can be painfully slow in + * some cases, e.g., initial boot in a cloud environment with + * slow storage. So, fabricate additional TXGs to avoid this + * overhead, unless the user requests otherwise. + */ ub->ub_txg = TXG; + if (!zfs->verify_txgs) + ub->ub_txg += TXG_SIZE; ub->ub_guid_sum = zfs->poolguid + zfs->vdevguid; ub->ub_timestamp = 0; diff --git a/usr.sbin/makefs/zfs/zfs.h b/usr.sbin/makefs/zfs/zfs.h index 5c47b7c3156b..33694e2bdbee 100644 --- a/usr.sbin/makefs/zfs/zfs.h +++ b/usr.sbin/makefs/zfs/zfs.h @@ -55,6 +55,7 @@ _Static_assert(MINBLOCKSIZE == SPA_MINBLOCKSIZE, ""); /* All data was written in this transaction group. */ #define TXG 4 +#define TXG_SIZE 4 typedef struct zfs_dsl_dataset zfs_dsl_dataset_t; typedef struct zfs_dsl_dir zfs_dsl_dir_t; @@ -82,6 +83,7 @@ typedef struct { int ashift; /* vdev block size */ uint64_t mssize; /* metaslab size */ STAILQ_HEAD(, dataset_desc) datasetdescs; /* non-root dataset descrs */ + bool verify_txgs; /* verify data upon import */ /* Pool state. */ uint64_t poolguid; /* pool and root vdev GUID */ From nobody Mon Oct 14 13:33: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 4XRyqY3fCmz5YZMc; Mon, 14 Oct 2024 13:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRyqY376gz4CpG; Mon, 14 Oct 2024 13:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728912825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpShbIWEzMPf151Uw8BdTplXBsFOaKMOeeAD5jCYMEk=; b=m1Bq5Vm4fgCHsfoVxX5gFb1/TcE3k9OQeBjxivaDcx0nfsf4oWOKpc/uPoAxzmgTo8UF1w 9z31tYZUBtw/sn7VUvS2fDX4DNAB8lA6hmx8pzi/N10sfoEDMJzJgMB9WTLarEmm6zyRxW wa1vvqUNUjdRZS5fW7PAdvzyNmVylllOZkFULfAWe01YiBdint/hAqchYfYu29fxGni8qs U6b3CGQBJ7LXV9LKBoXjZHwpWUYeJVKPw3594XBmNOwxsO+/Cm2idHOYzmvOZRp8Y/j0S+ gLUVw4A1rGk7PCmFlIXig/SiwLo3bOzy9oOSldMdBvLrEn75t+gZBimjUuuu1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728912825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpShbIWEzMPf151Uw8BdTplXBsFOaKMOeeAD5jCYMEk=; b=CGRArRV4tmdE5Hx9o62WZHUIDwdTzqu+CrRm5mH+2MuNysHiK0IUf1GpVjIXxjnbQmC2f2 9YT63daiDwY7cq6uzmBj05W8IXJj4YAOIZruC0Aq/1/lIcMDA6q91EF+UMmpSl+ESGZTrU Jtpj2/dZumlJU7q2sBpUE89IuAQyo/hrVXF0vJNVdhR8IGqjhuqjn7J71hNvHvFDXKclFH BOt7N8EKWYIEA9cgmsEM3tdulx3r4utsxK2XRiGGShIHQzlUXbobVB/AH0FN63KYhsIsf+ oHXavwz2ysSBFQm/od9Lwbk/zXrvgMhWjUzhQQSFChsisNZgQ/PtasFG8iwEeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728912825; a=rsa-sha256; cv=none; b=VPn7SXOuuD+dRx6KLsEsZPLWDYkqHBOWYZo/nug/oBjS8YQyf+PlcrDhQm34ZYeBRSZ/3K ow7qP0qWDWvFYNIVPyHPg5eELRz7pfhftKgSR4IcWe07bAtLN5VlejrJTXB5rZR2rGUO/v 3yhvGkcqhiRe89encxRab4iuW3xAGyUj2D66S2YvXVXt4vYqcsT3rG7uh2gaJDYcBKZeu9 LbZIkseN2A0LOo2aYMoYhahSfy/QhogL8bbWANSMrjJ4Xps2obXJ4Cbn7F9egZefRXgbzv +RZLrKJi85myVX57zj5uIQxK/rwvs4n9yMePP0h+R2mfT1r+FRa+RwbgZdcpZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRyqY2l82zgNk; Mon, 14 Oct 2024 13:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EDXjFD091352; Mon, 14 Oct 2024 13:33:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EDXj0x091349; Mon, 14 Oct 2024 13:33:45 GMT (envelope-from git) Date: Mon, 14 Oct 2024 13:33:45 GMT Message-Id: <202410141333.49EDXj0x091349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1bae9dc58427 - main - netmap: Make memory pools NUMA-aware 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/main X-Git-Reftype: branch X-Git-Commit: 1bae9dc584272dd75dc4e04cb5d73be0e9fb562a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1bae9dc584272dd75dc4e04cb5d73be0e9fb562a commit 1bae9dc584272dd75dc4e04cb5d73be0e9fb562a Author: Mark Johnston AuthorDate: 2024-10-14 13:30:09 +0000 Commit: Mark Johnston CommitDate: 2024-10-14 13:33:33 +0000 netmap: Make memory pools NUMA-aware Each netmap adapter associated with a physical adapter is attached to a netmap memory pool. contigmalloc() is used to allocate physically contiguous memory for the pool, but ideally we would ensure that all such memory is allocated from the NUMA domain local to the adapter. Augment netmap's memory pools with a NUMA domain ID, similar to how IOMMU groups are handled in the Linux port. That is, when attaching to a physical adapter, ensure that the associated memory pools are local to the adapter's associated memory domain, creating new pools as needed. Some types of ifnets do not have any defined NUMA affinity; in this case the domain ID in question is the sentinel value -1. Add a sysctl, dev.netmap.port_numa_affinity, which can be used to enable the new behaviour. Keep it disabled by now to avoid surprises in case netmap applications are relying on zero-copy optimizations to forward packets between ports belonging to different NUMA domains. Reviewed by: vmaffione MFC after: 2 weeks Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D46666 --- share/man/man4/netmap.4 | 12 +++++++++- sys/dev/netmap/netmap.c | 4 ++-- sys/dev/netmap/netmap_kern.h | 27 +++++++++++++++++++--- sys/dev/netmap/netmap_mem2.c | 54 +++++++++++++++++++++++++++++--------------- sys/dev/netmap/netmap_mem2.h | 2 +- 5 files changed, 74 insertions(+), 25 deletions(-) diff --git a/share/man/man4/netmap.4 b/share/man/man4/netmap.4 index fd713f3c384b..e258b60e11f6 100644 --- a/share/man/man4/netmap.4 +++ b/share/man/man4/netmap.4 @@ -25,7 +25,7 @@ .\" This document is derived in part from the enet man page (enet.4) .\" distributed with 4.3BSD Unix. .\" -.Dd March 6, 2022 +.Dd October 10, 2024 .Dt NETMAP 4 .Os .Sh NAME @@ -938,6 +938,16 @@ switches that can be created. This tunable can be specified at loader time. .It Va dev.netmap.ptnet_vnet_hdr: 1 Allow ptnet devices to use virtio-net headers +.It Va dev.netmap.port_numa_affinity: 0 +On +.Xr numa 4 +systems, allocate memory for netmap ports from the local NUMA domain when +possible. +This can improve performance by reducing the number of remote memory accesses. +However, when forwarding packets between ports attached to different NUMA +domains, this will prevent zero-copy forwarding optimizations and thus may hurt +performance. +Note that this setting must be specified as a loader tunable at boot time. .El .Sh SYSTEM CALLS .Nm diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index 832d0ecc0c6e..f531151fb656 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -4010,8 +4010,8 @@ netmap_attach_common(struct netmap_adapter *na) na->active_fds = 0; if (na->nm_mem == NULL) { - /* use iommu or global allocator */ - na->nm_mem = netmap_mem_get_iommu(na); + /* select an allocator based on IOMMU and NUMA affinity */ + na->nm_mem = netmap_mem_get_allocator(na); } if (na->nm_bdg_attach == NULL) /* no special nm_bdg_attach callback. On VALE diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h index dd736b46ae70..931bf7cd332b 100644 --- a/sys/dev/netmap/netmap_kern.h +++ b/sys/dev/netmap/netmap_kern.h @@ -81,6 +81,7 @@ #if defined(__FreeBSD__) #include +#include #define likely(x) __builtin_expect((long)!!(x), 1L) #define unlikely(x) __builtin_expect((long)!!(x), 0L) @@ -1727,10 +1728,30 @@ extern int netmap_generic_txqdisc; #define NM_IS_NATIVE(ifp) (NM_NA_VALID(ifp) && NA(ifp)->nm_dtor == netmap_hw_dtor) #if defined(__FreeBSD__) +extern int netmap_port_numa_affinity; -/* Assigns the device IOMMU domain to an allocator. - * Returns -ENOMEM in case the domain is different */ -#define nm_iommu_group_id(dev) (-1) +static inline int +nm_iommu_group_id(struct netmap_adapter *na) +{ + return (-1); +} + +static inline int +nm_numa_domain(struct netmap_adapter *na) +{ + int domain; + + /* + * If the system has only one NUMA domain, don't bother distinguishing + * between IF_NODOM and domain 0. + */ + if (vm_ndomains == 1 || netmap_port_numa_affinity == 0) + return (-1); + domain = if_getnumadomain(na->ifp); + if (domain == IF_NODOM) + domain = -1; + return (domain); +} /* Callback invoked by the dma machinery after a successful dmamap_load */ static void netmap_dmamap_cb(__unused void *arg, diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index 3cd3422b10ce..d69e9305f6f0 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -37,8 +37,8 @@ #endif /* __APPLE__ */ #ifdef __FreeBSD__ -#include /* prerequisite */ #include +#include #include #include /* MALLOC_DEFINE */ #include @@ -174,7 +174,8 @@ struct netmap_mem_d { struct netmap_obj_pool pools[NETMAP_POOLS_NR]; nm_memid_t nm_id; /* allocator identifier */ - int nm_grp; /* iommu group id */ + int nm_grp; /* iommu group id */ + int nm_numa_domain; /* local NUMA domain */ /* list of all existing allocators, sorted by nm_id */ struct netmap_mem_d *prev, *next; @@ -310,7 +311,7 @@ netmap_mem_rings_delete(struct netmap_adapter *na) static int netmap_mem_map(struct netmap_obj_pool *, struct netmap_adapter *); static int netmap_mem_unmap(struct netmap_obj_pool *, struct netmap_adapter *); -static int nm_mem_check_group(struct netmap_mem_d *, bus_dma_tag_t); +static int nm_mem_check_group(struct netmap_mem_d *, void *); static void nm_mem_release_id(struct netmap_mem_d *); nm_memid_t @@ -576,6 +577,7 @@ struct netmap_mem_d nm_mem = { /* Our memory allocator. */ .nm_id = 1, .nm_grp = -1, + .nm_numa_domain = -1, .prev = &nm_mem, .next = &nm_mem, @@ -615,6 +617,7 @@ static const struct netmap_mem_d nm_blueprint = { }, .nm_grp = -1, + .nm_numa_domain = -1, .flags = NETMAP_MEM_PRIVATE, @@ -625,7 +628,6 @@ static const struct netmap_mem_d nm_blueprint = { #define STRINGIFY(x) #x - #define DECLARE_SYSCTLS(id, name) \ SYSBEGIN(mem2_ ## name); \ SYSCTL_INT(_dev_netmap, OID_AUTO, name##_size, \ @@ -649,9 +651,14 @@ DECLARE_SYSCTLS(NETMAP_IF_POOL, if); DECLARE_SYSCTLS(NETMAP_RING_POOL, ring); DECLARE_SYSCTLS(NETMAP_BUF_POOL, buf); +int netmap_port_numa_affinity = 0; +SYSCTL_INT(_dev_netmap, OID_AUTO, port_numa_affinity, + CTLFLAG_RDTUN, &netmap_port_numa_affinity, 0, + "Use NUMA-local memory for memory pools when possible"); + /* call with nm_mem_list_lock held */ static int -nm_mem_assign_id_locked(struct netmap_mem_d *nmd, int grp_id) +nm_mem_assign_id_locked(struct netmap_mem_d *nmd, int grp_id, int domain) { nm_memid_t id; struct netmap_mem_d *scan = netmap_last_mem_d; @@ -666,6 +673,7 @@ nm_mem_assign_id_locked(struct netmap_mem_d *nmd, int grp_id) if (id != scan->nm_id) { nmd->nm_id = id; nmd->nm_grp = grp_id; + nmd->nm_numa_domain = domain; nmd->prev = scan->prev; nmd->next = scan; scan->prev->next = nmd; @@ -688,7 +696,7 @@ nm_mem_assign_id(struct netmap_mem_d *nmd, int grp_id) int ret; NM_MTX_LOCK(nm_mem_list_lock); - ret = nm_mem_assign_id_locked(nmd, grp_id); + ret = nm_mem_assign_id_locked(nmd, grp_id, -1); NM_MTX_UNLOCK(nm_mem_list_lock); return ret; @@ -728,7 +736,7 @@ netmap_mem_find(nm_memid_t id) } static int -nm_mem_check_group(struct netmap_mem_d *nmd, bus_dma_tag_t dev) +nm_mem_check_group(struct netmap_mem_d *nmd, void *dev) { int err = 0, id; @@ -1399,7 +1407,7 @@ netmap_config_obj_allocator(struct netmap_obj_pool *p, u_int objtotal, u_int obj /* call with NMA_LOCK held */ static int -netmap_finalize_obj_allocator(struct netmap_obj_pool *p) +netmap_finalize_obj_allocator(struct netmap_mem_d *nmd, struct netmap_obj_pool *p) { int i; /* must be signed */ @@ -1440,8 +1448,16 @@ netmap_finalize_obj_allocator(struct netmap_obj_pool *p) * can live with standard malloc, because the hardware will not * access the pages directly. */ - clust = contigmalloc(p->_clustsize, M_NETMAP, M_NOWAIT | M_ZERO, - (size_t)0, -1UL, PAGE_SIZE, 0); + if (nmd->nm_numa_domain == -1) { + clust = contigmalloc(p->_clustsize, M_NETMAP, + M_NOWAIT | M_ZERO, (size_t)0, -1UL, PAGE_SIZE, 0); + } else { + struct domainset *ds; + + ds = DOMAINSET_PREF(nmd->nm_numa_domain); + clust = contigmalloc_domainset(p->_clustsize, M_NETMAP, + ds, M_NOWAIT | M_ZERO, (size_t)0, -1UL, PAGE_SIZE, 0); + } if (clust == NULL) { /* * If we get here, there is a severe memory shortage, @@ -1634,7 +1650,7 @@ netmap_mem_finalize_all(struct netmap_mem_d *nmd) nmd->lasterr = 0; nmd->nm_totalsize = 0; for (i = 0; i < NETMAP_POOLS_NR; i++) { - nmd->lasterr = netmap_finalize_obj_allocator(&nmd->pools[i]); + nmd->lasterr = netmap_finalize_obj_allocator(nmd, &nmd->pools[i]); if (nmd->lasterr) goto error; nmd->nm_totalsize += nmd->pools[i].memtotal; @@ -1802,24 +1818,26 @@ netmap_mem_private_new(u_int txr, u_int txd, u_int rxr, u_int rxd, return d; } -/* Reference iommu allocator - find existing or create new, - * for not hw addapeters fallback to global allocator. +/* Reference IOMMU and NUMA local allocator - find existing or create new, + * for non-hw adapters, fall back to global allocator. */ struct netmap_mem_d * -netmap_mem_get_iommu(struct netmap_adapter *na) +netmap_mem_get_allocator(struct netmap_adapter *na) { - int i, err, grp_id; + int i, domain, err, grp_id; struct netmap_mem_d *nmd; if (na == NULL || na->pdev == NULL) return netmap_mem_get(&nm_mem); + domain = nm_numa_domain(na->pdev); grp_id = nm_iommu_group_id(na->pdev); NM_MTX_LOCK(nm_mem_list_lock); nmd = netmap_last_mem_d; do { - if (!(nmd->flags & NETMAP_MEM_HIDDEN) && nmd->nm_grp == grp_id) { + if (!(nmd->flags & NETMAP_MEM_HIDDEN) && + nmd->nm_grp == grp_id && nmd->nm_numa_domain == domain) { nmd->refcount++; NM_DBG_REFC(nmd, __FUNCTION__, __LINE__); NM_MTX_UNLOCK(nm_mem_list_lock); @@ -1834,7 +1852,7 @@ netmap_mem_get_iommu(struct netmap_adapter *na) *nmd = nm_mem_blueprint; - err = nm_mem_assign_id_locked(nmd, grp_id); + err = nm_mem_assign_id_locked(nmd, grp_id, domain); if (err) goto error_free; @@ -2878,7 +2896,7 @@ netmap_mem_pt_guest_create(nm_memid_t mem_id) ptnmd->pt_ifs = NULL; /* Assign new id in the guest (We have the lock) */ - err = nm_mem_assign_id_locked(&ptnmd->up, -1); + err = nm_mem_assign_id_locked(&ptnmd->up, -1, -1); if (err) goto error; diff --git a/sys/dev/netmap/netmap_mem2.h b/sys/dev/netmap/netmap_mem2.h index 1681d5c7721f..0123b010e944 100644 --- a/sys/dev/netmap/netmap_mem2.h +++ b/sys/dev/netmap/netmap_mem2.h @@ -146,7 +146,7 @@ struct netmap_mem_d* netmap_mem_private_new( u_int txr, u_int txd, u_int rxr, u_ #define netmap_mem_get(d) __netmap_mem_get(d, __FUNCTION__, __LINE__) #define netmap_mem_put(d) __netmap_mem_put(d, __FUNCTION__, __LINE__) struct netmap_mem_d* __netmap_mem_get(struct netmap_mem_d *, const char *, int); -struct netmap_mem_d* netmap_mem_get_iommu(struct netmap_adapter *); +struct netmap_mem_d* netmap_mem_get_allocator(struct netmap_adapter *); void __netmap_mem_put(struct netmap_mem_d *, const char *, int); struct netmap_mem_d* netmap_mem_find(nm_memid_t); unsigned netmap_mem_bufsize(struct netmap_mem_d *nmd); From nobody Mon Oct 14 13: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 4XRzGl0J2Nz5Ybsd; Mon, 14 Oct 2024 13:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRzGl03f6z4F0r; Mon, 14 Oct 2024 13:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728914031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NaHojH6n907y7+kk+6rAJl3aGUKiV8CdKnLL+04/Uk0=; b=RHXkmezOgTl2X+A8Iy05JyMei856PL5+Vaa0wlf2HU7DQq1sctHbKqFekT+Wl1zOvVGqDW MdnwkKQOX59BdZ2YyknMqi48J0mT/2B0k3Llo/O8T71SY4knutu7MIVgxexLaO7wG/I2fG PtseDxLGQdRq1/lv0xD93KPPSzqpEsEHl2A5ym7da+vCrvSTM0K9vFPfwkEq8/FTBUaNQ1 BR/668GwS57JoQ8t5dezRB92RSv2B1hDZZl5WwixnT1mOOWySTM7eKrpH5UGkgGq6vM9AW cy9sOjEylZ6dr8WnATgu9jxHunO3F7PfVl0d0MWK58wZchsm5xVblzzNULrtYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728914031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NaHojH6n907y7+kk+6rAJl3aGUKiV8CdKnLL+04/Uk0=; b=B7nCG7MjfxDu5wOf0sZxETpIjoqpaobX22BVu1OqHCcrn1xUcoj9hWme28e0rTADhPHRcU 2urDmo0P2GLNlxdYZCQLy2AGWWYq7aQiFwvM2yZMJSc7bzu3UiBH6soyv2XlSbDqt/NFlt uAyxhLipixtwhA1bhl6gIFsWWBHTBcRcMrknpwtu8vcy7eLKhCD5yp7BrDwZmJbXph+MUi NMusBut8+jaKprRPqcoCRK0FumKjWpvkfZBdUjuK+ZlTt2DgKXpajoL6sSumgpYItLyDo6 ixXPjtOCECyVyBKIv0K527/nYGvXsYNXJBeI/tKcGMi+Itv88mL7Wh0ilRHKFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728914031; a=rsa-sha256; cv=none; b=XSIQbWs1ikkBqFYykWv9CROogyKPWFLK6oN6QMhpkPMU2YW6sm4OY1jBHza3y5xVWqLvUf KnSQyCPWbEklKPtqEwV2qTjJXtHAG+GKzrZtnXMvpV63PQzFQCHB6pGYMRIdFuvCXgsp8z tfV/TkbfnG6IMPYPRate//1zeG1E9r5rvNLiSkfgGliuzrO52BN1ptYeqngX/scqpJhrsp pDXt1xo4D82tgscU1HQ4DyKbU5wuct8b9ecD9W/wNp/wIVJua3vI2c3a8LgGYs8F3VFArt 3AqbA9d+jStYO6SuM6X5lqRgZ/jsYW2b4UFCPFP7NmjtJAUqLblMPgB1sPtW6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRzGk6msfzgvd; Mon, 14 Oct 2024 13:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EDrocT024527; Mon, 14 Oct 2024 13:53:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EDroZg024524; Mon, 14 Oct 2024 13:53:50 GMT (envelope-from git) Date: Mon, 14 Oct 2024 13:53:50 GMT Message-Id: <202410141353.49EDroZg024524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 542f5d56317e - main - igc: Rename 'struct adapter' to 'struct igc_softc' 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 542f5d56317e94676cf19cb9d66207bf9a6b6758 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=542f5d56317e94676cf19cb9d66207bf9a6b6758 commit 542f5d56317e94676cf19cb9d66207bf9a6b6758 Author: Kevin Bowling AuthorDate: 2024-10-14 13:29:55 +0000 Commit: Kevin Bowling CommitDate: 2024-10-14 13:52:31 +0000 igc: Rename 'struct adapter' to 'struct igc_softc' Rename the 'struct adapter' to 'struct igc_softc' to avoid type ambiguity in things like kgdb and make sharing code with e1000 and ixgbe easier. MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/igc/if_igc.c | 970 ++++++++++++++++++++++++------------------------- sys/dev/igc/if_igc.h | 28 +- sys/dev/igc/igc_txrx.c | 36 +- 3 files changed, 517 insertions(+), 517 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index b927b9e3b260..a55d8b6cbc9c 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -111,25 +111,25 @@ static int igc_if_tx_queue_intr_enable(if_ctx_t ctx, uint16_t txqid); static void igc_if_multi_set(if_ctx_t ctx); static void igc_if_update_admin_status(if_ctx_t ctx); static void igc_if_debug(if_ctx_t ctx); -static void igc_update_stats_counters(struct igc_adapter *); -static void igc_add_hw_stats(struct igc_adapter *adapter); +static void igc_update_stats_counters(struct igc_softc *); +static void igc_add_hw_stats(struct igc_softc *sc); static int igc_if_set_promisc(if_ctx_t ctx, int flags); static void igc_setup_vlan_hw_support(if_ctx_t ctx); -static void igc_fw_version(struct igc_adapter *); +static void igc_fw_version(struct igc_softc *); static void igc_sbuf_fw_version(struct igc_fw_version *, struct sbuf *); -static void igc_print_fw_version(struct igc_adapter *); +static void igc_print_fw_version(struct igc_softc *); static int igc_sysctl_print_fw_version(SYSCTL_HANDLER_ARGS); static int igc_sysctl_nvm_info(SYSCTL_HANDLER_ARGS); -static void igc_print_nvm_info(struct igc_adapter *); +static void igc_print_nvm_info(struct igc_softc *); static int igc_sysctl_debug_info(SYSCTL_HANDLER_ARGS); static int igc_get_rs(SYSCTL_HANDLER_ARGS); -static void igc_print_debug_info(struct igc_adapter *); +static void igc_print_debug_info(struct igc_softc *); static int igc_is_valid_ether_addr(u8 *); -static void igc_neweitr(struct igc_adapter *, struct igc_rx_queue *, +static void igc_neweitr(struct igc_softc *, struct igc_rx_queue *, struct tx_ring *, struct rx_ring *); /* Management and WOL Support */ -static void igc_get_hw_control(struct igc_adapter *); -static void igc_release_hw_control(struct igc_adapter *); +static void igc_get_hw_control(struct igc_softc *); +static void igc_release_hw_control(struct igc_softc *); static void igc_get_wakeup(if_ctx_t ctx); static void igc_enable_wakeup(if_ctx_t ctx); @@ -146,7 +146,7 @@ static int igc_sysctl_eee(SYSCTL_HANDLER_ARGS); static int igc_get_regs(SYSCTL_HANDLER_ARGS); -static void igc_configure_queues(struct igc_adapter *adapter); +static void igc_configure_queues(struct igc_softc *sc); /********************************************************************* @@ -165,7 +165,7 @@ static device_method_t igc_methods[] = { }; static driver_t igc_driver = { - "igc", igc_methods, sizeof(struct igc_adapter), + "igc", igc_methods, sizeof(struct igc_softc), }; DRIVER_MODULE(igc, pci, igc_driver, 0, 0); @@ -208,7 +208,7 @@ static device_method_t igc_if_methods[] = { }; static driver_t igc_if_driver = { - "igc_if", igc_if_methods, sizeof(struct igc_adapter) + "igc_if", igc_if_methods, sizeof(struct igc_softc) }; /********************************************************************* @@ -295,8 +295,8 @@ static struct if_shared_ctx igc_sctx_init = { static int igc_get_regs(SYSCTL_HANDLER_ARGS) { - struct igc_adapter *adapter = (struct igc_adapter *)arg1; - struct igc_hw *hw = &adapter->hw; + struct igc_softc *sc = (struct igc_softc *)arg1; + struct igc_hw *hw = &sc->hw; struct sbuf *sb; u32 *regs_buff; int rc; @@ -372,7 +372,7 @@ static int igc_get_regs(SYSCTL_HANDLER_ARGS) #ifdef DUMP_DESCS { - if_softc_ctx_t scctx = adapter->shared; + if_softc_ctx_t scctx = sc->shared; struct rx_ring *rxr = &rx_que->rxr; struct tx_ring *txr = &tx_que->txr; int ntxd = scctx->isc_ntxd[0]; @@ -434,7 +434,7 @@ igc_set_num_queues(if_ctx_t ctx) static int igc_if_attach_pre(if_ctx_t ctx) { - struct igc_adapter *adapter; + struct igc_softc *sc; if_softc_ctx_t scctx; device_t dev; struct igc_hw *hw; @@ -442,59 +442,59 @@ igc_if_attach_pre(if_ctx_t ctx) INIT_DEBUGOUT("igc_if_attach_pre: begin"); dev = iflib_get_dev(ctx); - adapter = iflib_get_softc(ctx); + sc = iflib_get_softc(ctx); - adapter->ctx = adapter->osdep.ctx = ctx; - adapter->dev = adapter->osdep.dev = dev; - scctx = adapter->shared = iflib_get_softc_ctx(ctx); - adapter->media = iflib_get_media(ctx); - hw = &adapter->hw; + sc->ctx = sc->osdep.ctx = ctx; + sc->dev = sc->osdep.dev = dev; + scctx = sc->shared = iflib_get_softc_ctx(ctx); + sc->media = iflib_get_media(ctx); + hw = &sc->hw; /* SYSCTL stuff */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "nvm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - adapter, 0, igc_sysctl_nvm_info, "I", "NVM Information"); + sc, 0, igc_sysctl_nvm_info, "I", "NVM Information"); - adapter->enable_aim = igc_enable_aim; + sc->enable_aim = igc_enable_aim; SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "enable_aim", CTLFLAG_RW, - &adapter->enable_aim, 0, + &sc->enable_aim, 0, "Interrupt Moderation (1=normal, 2=lowlatency)"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, - adapter, 0, igc_sysctl_print_fw_version, "A", + sc, 0, igc_sysctl_print_fw_version, "A", "Prints FW/NVM Versions"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "debug", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - adapter, 0, igc_sysctl_debug_info, "I", "Debug Information"); + sc, 0, igc_sysctl_debug_info, "I", "Debug Information"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - adapter, 0, igc_set_flowcntl, "I", "Flow Control"); + sc, 0, igc_set_flowcntl, "I", "Flow Control"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "reg_dump", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, 0, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, igc_get_regs, "A", "Dump Registers"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rs_dump", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, igc_get_rs, "I", "Dump RS indexes"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "dmac", - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, igc_sysctl_dmac, "I", "DMA Coalesce"); /* Determine hardware and mac info */ @@ -559,13 +559,13 @@ igc_if_attach_pre(if_ctx_t ctx) * Set the frame limits assuming * standard ethernet sized frames. */ - scctx->isc_max_frame_size = adapter->hw.mac.max_frame_size = + scctx->isc_max_frame_size = sc->hw.mac.max_frame_size = ETHERMTU + ETHER_HDR_LEN + ETHERNET_FCS_SIZE; /* Allocate multicast array memory. */ - adapter->mta = malloc(sizeof(u8) * ETHER_ADDR_LEN * + sc->mta = malloc(sizeof(u8) * ETHER_ADDR_LEN * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); - if (adapter->mta == NULL) { + if (sc->mta == NULL) { device_printf(dev, "Can not allocate multicast setup array\n"); error = ENOMEM; goto err_late; @@ -577,12 +577,12 @@ igc_if_attach_pre(if_ctx_t ctx) " due to SOL/IDER session.\n"); /* Sysctl for setting Energy Efficient Ethernet */ - adapter->hw.dev_spec._i225.eee_disable = igc_eee_setting; + sc->hw.dev_spec._i225.eee_disable = igc_eee_setting; SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "eee_control", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - adapter, 0, igc_sysctl_eee, "I", + sc, 0, igc_sysctl_eee, "I", "Disable Energy Efficient Ethernet"); /* @@ -622,9 +622,9 @@ igc_if_attach_pre(if_ctx_t ctx) } /* Save the EEPROM/NVM versions */ - igc_fw_version(adapter); + igc_fw_version(sc); - igc_print_fw_version(adapter); + igc_print_fw_version(sc); /* * Get Wake-on-Lan and Management info for later use @@ -633,7 +633,7 @@ igc_if_attach_pre(if_ctx_t ctx) /* Enable only WOL MAGIC by default */ scctx->isc_capenable &= ~IFCAP_WOL; - if (adapter->wol != 0) + if (sc->wol != 0) scctx->isc_capenable |= IFCAP_WOL_MAGIC; iflib_set_mac(ctx, hw->mac.addr); @@ -641,10 +641,10 @@ igc_if_attach_pre(if_ctx_t ctx) return (0); err_late: - igc_release_hw_control(adapter); + igc_release_hw_control(sc); err_pci: igc_free_pci_resources(ctx); - free(adapter->mta, M_DEVBUF); + free(sc->mta, M_DEVBUF); return (error); } @@ -652,8 +652,8 @@ err_pci: static int igc_if_attach_post(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); - struct igc_hw *hw = &adapter->hw; + struct igc_softc *sc = iflib_get_softc(ctx); + struct igc_hw *hw = &sc->hw; int error = 0; /* Setup OS specific network interface */ @@ -665,23 +665,23 @@ igc_if_attach_post(if_ctx_t ctx) igc_reset(ctx); /* Initialize statistics */ - igc_update_stats_counters(adapter); + igc_update_stats_counters(sc); hw->mac.get_link_status = true; igc_if_update_admin_status(ctx); - igc_add_hw_stats(adapter); + igc_add_hw_stats(sc); /* the driver can now take control from firmware */ - igc_get_hw_control(adapter); + igc_get_hw_control(sc); INIT_DEBUGOUT("igc_if_attach_post: end"); return (error); err_late: - igc_release_hw_control(adapter); + igc_release_hw_control(sc); igc_free_pci_resources(ctx); igc_if_queues_free(ctx); - free(adapter->mta, M_DEVBUF); + free(sc->mta, M_DEVBUF); return (error); } @@ -698,13 +698,13 @@ err_late: static int igc_if_detach(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); INIT_DEBUGOUT("igc_if_detach: begin"); - igc_phy_hw_reset(&adapter->hw); + igc_phy_hw_reset(&sc->hw); - igc_release_hw_control(adapter); + igc_release_hw_control(sc); igc_free_pci_resources(ctx); return (0); @@ -728,9 +728,9 @@ igc_if_shutdown(if_ctx_t ctx) static int igc_if_suspend(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); - igc_release_hw_control(adapter); + igc_release_hw_control(sc); igc_enable_wakeup(ctx); return (0); } @@ -747,7 +747,7 @@ static int igc_if_mtu_set(if_ctx_t ctx, uint32_t mtu) { int max_frame_size; - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx); IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); @@ -759,7 +759,7 @@ igc_if_mtu_set(if_ctx_t ctx, uint32_t mtu) return (EINVAL); } - scctx->isc_max_frame_size = adapter->hw.mac.max_frame_size = + scctx->isc_max_frame_size = sc->hw.mac.max_frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; return (0); } @@ -776,8 +776,8 @@ igc_if_mtu_set(if_ctx_t ctx, uint32_t mtu) static void igc_if_init(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); - if_softc_ctx_t scctx = adapter->shared; + struct igc_softc *sc = iflib_get_softc(ctx); + if_softc_ctx_t scctx = sc->shared; if_t ifp = iflib_get_ifp(ctx); struct igc_tx_queue *tx_que; int i; @@ -785,17 +785,17 @@ igc_if_init(if_ctx_t ctx) INIT_DEBUGOUT("igc_if_init: begin"); /* Get the latest mac address, User can use a LAA */ - bcopy(if_getlladdr(ifp), adapter->hw.mac.addr, + bcopy(if_getlladdr(ifp), sc->hw.mac.addr, ETHER_ADDR_LEN); /* Put the address into the Receive Address Array */ - igc_rar_set(&adapter->hw, adapter->hw.mac.addr, 0); + igc_rar_set(&sc->hw, sc->hw.mac.addr, 0); /* Initialize the hardware */ igc_reset(ctx); igc_if_update_admin_status(ctx); - for (i = 0, tx_que = adapter->tx_queues; i < adapter->tx_num_queues; i++, tx_que++) { + for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; txr->tx_rs_cidx = txr->tx_rs_pidx; @@ -809,7 +809,7 @@ igc_if_init(if_ctx_t ctx) } /* Setup VLAN support, basic and offload if available */ - IGC_WRITE_REG(&adapter->hw, IGC_VET, ETHERTYPE_VLAN); + IGC_WRITE_REG(&sc->hw, IGC_VET, ETHERTYPE_VLAN); /* Prepare transmit descriptors and buffers */ igc_initialize_transmit_unit(ctx); @@ -817,7 +817,7 @@ igc_if_init(if_ctx_t ctx) /* Setup Multicast table */ igc_if_multi_set(ctx); - adapter->rx_mbuf_sz = iflib_get_rx_mbuf_sz(ctx); + sc->rx_mbuf_sz = iflib_get_rx_mbuf_sz(ctx); igc_initialize_receive_unit(ctx); /* Set up VLAN support */ @@ -825,20 +825,20 @@ igc_if_init(if_ctx_t ctx) /* Don't lose promiscuous settings */ igc_if_set_promisc(ctx, if_getflags(ifp)); - igc_clear_hw_cntrs_base_generic(&adapter->hw); + igc_clear_hw_cntrs_base_generic(&sc->hw); - if (adapter->intr_type == IFLIB_INTR_MSIX) /* Set up queue routing */ - igc_configure_queues(adapter); + if (sc->intr_type == IFLIB_INTR_MSIX) /* Set up queue routing */ + igc_configure_queues(sc); /* this clears any pending interrupts */ - IGC_READ_REG(&adapter->hw, IGC_ICR); - IGC_WRITE_REG(&adapter->hw, IGC_ICS, IGC_ICS_LSC); + IGC_READ_REG(&sc->hw, IGC_ICR); + IGC_WRITE_REG(&sc->hw, IGC_ICS, IGC_ICS_LSC); /* the driver can now take control from firmware */ - igc_get_hw_control(adapter); + igc_get_hw_control(sc); /* Set Energy Efficient Ethernet */ - igc_set_eee_i225(&adapter->hw, true, true, true); + igc_set_eee_i225(&sc->hw, true, true, true); } enum eitr_latency_target { @@ -853,7 +853,7 @@ enum eitr_latency_target { * *********************************************************************/ static void -igc_neweitr(struct igc_adapter *sc, struct igc_rx_queue *que, +igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, struct tx_ring *txr, struct rx_ring *rxr) { struct igc_hw *hw = &sc->hw; @@ -985,12 +985,12 @@ igc_set_next_eitr: int igc_intr(void *arg) { - struct igc_adapter *adapter = arg; - struct igc_hw *hw = &adapter->hw; - struct igc_rx_queue *que = &adapter->rx_queues[0]; - struct tx_ring *txr = &adapter->tx_queues[0].txr; + struct igc_softc *sc = arg; + struct igc_hw *hw = &sc->hw; + struct igc_rx_queue *que = &sc->rx_queues[0]; + struct tx_ring *txr = &sc->tx_queues[0].txr; struct rx_ring *rxr = &que->rxr; - if_ctx_t ctx = adapter->ctx; + if_ctx_t ctx = sc->ctx; u32 reg_icr; reg_icr = IGC_READ_REG(hw, IGC_ICR); @@ -1019,9 +1019,9 @@ igc_intr(void *arg) igc_handle_link(ctx); if (reg_icr & IGC_ICR_RXO) - adapter->rx_overruns++; + sc->rx_overruns++; - igc_neweitr(adapter, que, txr, rxr); + igc_neweitr(sc, que, txr, rxr); /* Reset state */ txr->tx_bytes = 0; @@ -1035,20 +1035,20 @@ igc_intr(void *arg) static int igc_if_rx_queue_intr_enable(if_ctx_t ctx, uint16_t rxqid) { - struct igc_adapter *adapter = iflib_get_softc(ctx); - struct igc_rx_queue *rxq = &adapter->rx_queues[rxqid]; + struct igc_softc *sc = iflib_get_softc(ctx); + struct igc_rx_queue *rxq = &sc->rx_queues[rxqid]; - IGC_WRITE_REG(&adapter->hw, IGC_EIMS, rxq->eims); + IGC_WRITE_REG(&sc->hw, IGC_EIMS, rxq->eims); return (0); } static int igc_if_tx_queue_intr_enable(if_ctx_t ctx, uint16_t txqid) { - struct igc_adapter *adapter = iflib_get_softc(ctx); - struct igc_tx_queue *txq = &adapter->tx_queues[txqid]; + struct igc_softc *sc = iflib_get_softc(ctx); + struct igc_tx_queue *txq = &sc->tx_queues[txqid]; - IGC_WRITE_REG(&adapter->hw, IGC_EIMS, txq->eims); + IGC_WRITE_REG(&sc->hw, IGC_EIMS, txq->eims); return (0); } @@ -1061,7 +1061,7 @@ static int igc_msix_que(void *arg) { struct igc_rx_queue *que = arg; - struct igc_adapter *sc = que->adapter; + struct igc_softc *sc = que->sc; struct tx_ring *txr = &sc->tx_queues[que->msix].txr; struct rx_ring *rxr = &que->rxr; @@ -1086,22 +1086,22 @@ igc_msix_que(void *arg) static int igc_msix_link(void *arg) { - struct igc_adapter *adapter = arg; + struct igc_softc *sc = arg; u32 reg_icr; - ++adapter->link_irq; - MPASS(adapter->hw.back != NULL); - reg_icr = IGC_READ_REG(&adapter->hw, IGC_ICR); + ++sc->link_irq; + MPASS(sc->hw.back != NULL); + reg_icr = IGC_READ_REG(&sc->hw, IGC_ICR); if (reg_icr & IGC_ICR_RXO) - adapter->rx_overruns++; + sc->rx_overruns++; if (reg_icr & (IGC_ICR_RXSEQ | IGC_ICR_LSC)) { - igc_handle_link(adapter->ctx); + igc_handle_link(sc->ctx); } - IGC_WRITE_REG(&adapter->hw, IGC_IMS, IGC_IMS_LSC); - IGC_WRITE_REG(&adapter->hw, IGC_EIMS, adapter->link_mask); + IGC_WRITE_REG(&sc->hw, IGC_IMS, IGC_IMS_LSC); + IGC_WRITE_REG(&sc->hw, IGC_EIMS, sc->link_mask); return (FILTER_HANDLED); } @@ -1110,9 +1110,9 @@ static void igc_handle_link(void *context) { if_ctx_t ctx = context; - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); - adapter->hw.mac.get_link_status = true; + sc->hw.mac.get_link_status = true; iflib_admin_intr_deferred(ctx); } @@ -1127,7 +1127,7 @@ igc_handle_link(void *context) static void igc_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) { - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); INIT_DEBUGOUT("igc_if_media_status: begin"); @@ -1136,13 +1136,13 @@ igc_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; - if (!adapter->link_active) { + if (!sc->link_active) { return; } ifmr->ifm_status |= IFM_ACTIVE; - switch (adapter->link_speed) { + switch (sc->link_speed) { case 10: ifmr->ifm_active |= IFM_10_T; break; @@ -1157,7 +1157,7 @@ igc_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) break; } - if (adapter->link_duplex == FULL_DUPLEX) + if (sc->link_duplex == FULL_DUPLEX) ifmr->ifm_active |= IFM_FDX; else ifmr->ifm_active |= IFM_HDX; @@ -1174,7 +1174,7 @@ igc_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) static int igc_if_media_change(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); struct ifmedia *ifm = iflib_get_media(ctx); INIT_DEBUGOUT("igc_if_media_change: begin"); @@ -1182,32 +1182,32 @@ igc_if_media_change(if_ctx_t ctx) if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) return (EINVAL); - adapter->hw.mac.autoneg = DO_AUTO_NEG; + sc->hw.mac.autoneg = DO_AUTO_NEG; switch (IFM_SUBTYPE(ifm->ifm_media)) { case IFM_AUTO: - adapter->hw.phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; + sc->hw.phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; break; case IFM_2500_T: - adapter->hw.phy.autoneg_advertised = ADVERTISE_2500_FULL; + sc->hw.phy.autoneg_advertised = ADVERTISE_2500_FULL; break; case IFM_1000_T: - adapter->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; + sc->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; break; case IFM_100_TX: if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) - adapter->hw.phy.autoneg_advertised = ADVERTISE_100_FULL; + sc->hw.phy.autoneg_advertised = ADVERTISE_100_FULL; else - adapter->hw.phy.autoneg_advertised = ADVERTISE_100_HALF; + sc->hw.phy.autoneg_advertised = ADVERTISE_100_HALF; break; case IFM_10_T: if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) - adapter->hw.phy.autoneg_advertised = ADVERTISE_10_FULL; + sc->hw.phy.autoneg_advertised = ADVERTISE_10_FULL; else - adapter->hw.phy.autoneg_advertised = ADVERTISE_10_HALF; + sc->hw.phy.autoneg_advertised = ADVERTISE_10_HALF; break; default: - device_printf(adapter->dev, "Unsupported media type\n"); + device_printf(sc->dev, "Unsupported media type\n"); } igc_if_init(ctx); @@ -1218,12 +1218,12 @@ igc_if_media_change(if_ctx_t ctx) static int igc_if_set_promisc(if_ctx_t ctx, int flags) { - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); if_t ifp = iflib_get_ifp(ctx); u32 reg_rctl; int mcnt = 0; - reg_rctl = IGC_READ_REG(&adapter->hw, IGC_RCTL); + reg_rctl = IGC_READ_REG(&sc->hw, IGC_RCTL); reg_rctl &= ~(IGC_RCTL_SBP | IGC_RCTL_UPE); if (flags & IFF_ALLMULTI) mcnt = MAX_NUM_MULTICAST_ADDRESSES; @@ -1233,18 +1233,18 @@ igc_if_set_promisc(if_ctx_t ctx, int flags) /* Don't disable if in MAX groups */ if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) reg_rctl &= (~IGC_RCTL_MPE); - IGC_WRITE_REG(&adapter->hw, IGC_RCTL, reg_rctl); + IGC_WRITE_REG(&sc->hw, IGC_RCTL, reg_rctl); if (flags & IFF_PROMISC) { reg_rctl |= (IGC_RCTL_UPE | IGC_RCTL_MPE); /* Turn this on if you want to see bad packets */ if (igc_debug_sbp) reg_rctl |= IGC_RCTL_SBP; - IGC_WRITE_REG(&adapter->hw, IGC_RCTL, reg_rctl); + IGC_WRITE_REG(&sc->hw, IGC_RCTL, reg_rctl); } else if (flags & IFF_ALLMULTI) { reg_rctl |= IGC_RCTL_MPE; reg_rctl &= ~IGC_RCTL_UPE; - IGC_WRITE_REG(&adapter->hw, IGC_RCTL, reg_rctl); + IGC_WRITE_REG(&sc->hw, IGC_RCTL, reg_rctl); } return (0); } @@ -1272,7 +1272,7 @@ igc_copy_maddr(void *arg, struct sockaddr_dl *sdl, u_int idx) static void igc_if_multi_set(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); if_t ifp = iflib_get_ifp(ctx); u8 *mta; /* Multicast array memory */ u32 reg_rctl = 0; @@ -1280,12 +1280,12 @@ igc_if_multi_set(if_ctx_t ctx) IOCTL_DEBUGOUT("igc_set_multi: begin"); - mta = adapter->mta; + mta = sc->mta; bzero(mta, sizeof(u8) * ETHER_ADDR_LEN * MAX_NUM_MULTICAST_ADDRESSES); mcnt = if_foreach_llmaddr(ifp, igc_copy_maddr, mta); - reg_rctl = IGC_READ_REG(&adapter->hw, IGC_RCTL); + reg_rctl = IGC_READ_REG(&sc->hw, IGC_RCTL); if (if_getflags(ifp) & IFF_PROMISC) { reg_rctl |= (IGC_RCTL_UPE | IGC_RCTL_MPE); @@ -1300,9 +1300,9 @@ igc_if_multi_set(if_ctx_t ctx) reg_rctl &= ~(IGC_RCTL_UPE | IGC_RCTL_MPE); if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) - igc_update_mc_addr_list(&adapter->hw, mta, mcnt); + igc_update_mc_addr_list(&sc->hw, mta, mcnt); - IGC_WRITE_REG(&adapter->hw, IGC_RCTL, reg_rctl); + IGC_WRITE_REG(&sc->hw, IGC_RCTL, reg_rctl); } /********************************************************************* @@ -1326,8 +1326,8 @@ igc_if_timer(if_ctx_t ctx, uint16_t qid) static void igc_if_update_admin_status(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); - struct igc_hw *hw = &adapter->hw; + struct igc_softc *sc = iflib_get_softc(ctx); + struct igc_hw *hw = &sc->hw; device_t dev = iflib_get_dev(ctx); u32 link_check, thstat, ctrl; @@ -1351,36 +1351,36 @@ igc_if_update_admin_status(if_ctx_t ctx) } /* Now check for a transition */ - if (link_check && (adapter->link_active == 0)) { - igc_get_speed_and_duplex(hw, &adapter->link_speed, - &adapter->link_duplex); + if (link_check && (sc->link_active == 0)) { + igc_get_speed_and_duplex(hw, &sc->link_speed, + &sc->link_duplex); if (bootverbose) device_printf(dev, "Link is up %d Mbps %s\n", - adapter->link_speed, - ((adapter->link_duplex == FULL_DUPLEX) ? + sc->link_speed, + ((sc->link_duplex == FULL_DUPLEX) ? "Full Duplex" : "Half Duplex")); - adapter->link_active = 1; + sc->link_active = 1; iflib_link_state_change(ctx, LINK_STATE_UP, - IF_Mbps(adapter->link_speed)); - } else if (!link_check && (adapter->link_active == 1)) { - adapter->link_speed = 0; - adapter->link_duplex = 0; - adapter->link_active = 0; + IF_Mbps(sc->link_speed)); + } else if (!link_check && (sc->link_active == 1)) { + sc->link_speed = 0; + sc->link_duplex = 0; + sc->link_active = 0; iflib_link_state_change(ctx, LINK_STATE_DOWN, 0); } - igc_update_stats_counters(adapter); + igc_update_stats_counters(sc); } static void igc_if_watchdog_reset(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); /* * Just count the event; iflib(4) will already trigger a * sufficient reset of the controller. */ - adapter->watchdog_events++; + sc->watchdog_events++; } /********************************************************************* @@ -1392,12 +1392,12 @@ igc_if_watchdog_reset(if_ctx_t ctx) static void igc_if_stop(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); INIT_DEBUGOUT("igc_if_stop: begin"); - igc_reset_hw(&adapter->hw); - IGC_WRITE_REG(&adapter->hw, IGC_WUC, 0); + igc_reset_hw(&sc->hw); + IGC_WRITE_REG(&sc->hw, IGC_WUC, 0); } /********************************************************************* @@ -1409,22 +1409,22 @@ static void igc_identify_hardware(if_ctx_t ctx) { device_t dev = iflib_get_dev(ctx); - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); /* Make sure our PCI config space has the necessary stuff set */ - adapter->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); + sc->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); /* Save off the information about this board */ - adapter->hw.vendor_id = pci_get_vendor(dev); - adapter->hw.device_id = pci_get_device(dev); - adapter->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1); - adapter->hw.subsystem_vendor_id = + sc->hw.vendor_id = pci_get_vendor(dev); + sc->hw.device_id = pci_get_device(dev); + sc->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1); + sc->hw.subsystem_vendor_id = pci_read_config(dev, PCIR_SUBVEND_0, 2); - adapter->hw.subsystem_device_id = + sc->hw.subsystem_device_id = pci_read_config(dev, PCIR_SUBDEV_0, 2); /* Do Shared Code Init and Setup */ - if (igc_set_mac_type(&adapter->hw)) { + if (igc_set_mac_type(&sc->hw)) { device_printf(dev, "Setup init failure\n"); return; } @@ -1433,23 +1433,23 @@ igc_identify_hardware(if_ctx_t ctx) static int igc_allocate_pci_resources(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); + struct igc_softc *sc = iflib_get_softc(ctx); device_t dev = iflib_get_dev(ctx); int rid; rid = PCIR_BAR(0); - adapter->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + sc->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (adapter->memory == NULL) { + if (sc->memory == NULL) { device_printf(dev, "Unable to allocate bus resource: memory\n"); return (ENXIO); } - adapter->osdep.mem_bus_space_tag = rman_get_bustag(adapter->memory); - adapter->osdep.mem_bus_space_handle = - rman_get_bushandle(adapter->memory); - adapter->hw.hw_addr = (u8 *)&adapter->osdep.mem_bus_space_handle; + sc->osdep.mem_bus_space_tag = rman_get_bustag(sc->memory); + sc->osdep.mem_bus_space_handle = + rman_get_bushandle(sc->memory); + sc->hw.hw_addr = (u8 *)&sc->osdep.mem_bus_space_handle; - adapter->hw.back = &adapter->osdep; + sc->hw.back = &sc->osdep; return (0); } @@ -1462,20 +1462,20 @@ igc_allocate_pci_resources(if_ctx_t ctx) static int igc_if_msix_intr_assign(if_ctx_t ctx, int msix) { - struct igc_adapter *adapter = iflib_get_softc(ctx); - struct igc_rx_queue *rx_que = adapter->rx_queues; - struct igc_tx_queue *tx_que = adapter->tx_queues; + struct igc_softc *sc = iflib_get_softc(ctx); + struct igc_rx_queue *rx_que = sc->rx_queues; + struct igc_tx_queue *tx_que = sc->tx_queues; int error, rid, i, vector = 0, rx_vectors; char buf[16]; /* First set up ring resources */ - for (i = 0; i < adapter->rx_num_queues; i++, rx_que++, vector++) { + for (i = 0; i < sc->rx_num_queues; i++, rx_que++, vector++) { rid = vector + 1; snprintf(buf, sizeof(buf), "rxq%d", i); error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, IFLIB_INTR_RXTX, igc_msix_que, rx_que, rx_que->me, buf); if (error) { device_printf(iflib_get_dev(ctx), "Failed to allocate que int %d err: %d", i, error); - adapter->rx_num_queues = i + 1; + sc->rx_num_queues = i + 1; goto fail; } @@ -1492,14 +1492,14 @@ igc_if_msix_intr_assign(if_ctx_t ctx, int msix) rx_vectors = vector; vector = 0; - for (i = 0; i < adapter->tx_num_queues; i++, tx_que++, vector++) { + for (i = 0; i < sc->tx_num_queues; i++, tx_que++, vector++) { snprintf(buf, sizeof(buf), "txq%d", i); - tx_que = &adapter->tx_queues[i]; + tx_que = &sc->tx_queues[i]; iflib_softirq_alloc_generic(ctx, - &adapter->rx_queues[i % adapter->rx_num_queues].que_irq, + &sc->rx_queues[i % sc->rx_num_queues].que_irq, IFLIB_INTR_TX, tx_que, tx_que->me, buf); - tx_que->msix = (vector % adapter->rx_num_queues); + tx_que->msix = (vector % sc->rx_num_queues); /* * Set the bit to enable interrupt @@ -1512,26 +1512,26 @@ igc_if_msix_intr_assign(if_ctx_t ctx, int msix) /* Link interrupt */ rid = rx_vectors + 1; - error = iflib_irq_alloc_generic(ctx, &adapter->irq, rid, IFLIB_INTR_ADMIN, igc_msix_link, adapter, 0, "aq"); + error = iflib_irq_alloc_generic(ctx, &sc->irq, rid, IFLIB_INTR_ADMIN, igc_msix_link, sc, 0, "aq"); if (error) { device_printf(iflib_get_dev(ctx), "Failed to register admin handler"); goto fail; } - adapter->linkvec = rx_vectors; + sc->linkvec = rx_vectors; return (0); fail: - iflib_irq_free(ctx, &adapter->irq); - rx_que = adapter->rx_queues; - for (int i = 0; i < adapter->rx_num_queues; i++, rx_que++) + iflib_irq_free(ctx, &sc->irq); + rx_que = sc->rx_queues; + for (int i = 0; i < sc->rx_num_queues; i++, rx_que++) iflib_irq_free(ctx, &rx_que->que_irq); return (error); } static void -igc_configure_queues(struct igc_adapter *adapter) +igc_configure_queues(struct igc_softc *sc) { - struct igc_hw *hw = &adapter->hw; + struct igc_hw *hw = &sc->hw; struct igc_rx_queue *rx_que; struct igc_tx_queue *tx_que; u32 ivar = 0, newitr = 0; @@ -1543,10 +1543,10 @@ igc_configure_queues(struct igc_adapter *adapter) /* Turn on MSI-X */ /* RX entries */ - for (int i = 0; i < adapter->rx_num_queues; i++) { + for (int i = 0; i < sc->rx_num_queues; i++) { u32 index = i >> 1; ivar = IGC_READ_REG_ARRAY(hw, IGC_IVAR0, index); - rx_que = &adapter->rx_queues[i]; + rx_que = &sc->rx_queues[i]; if (i & 1) { ivar &= 0xFF00FFFF; ivar |= (rx_que->msix | IGC_IVAR_VALID) << 16; @@ -1557,10 +1557,10 @@ igc_configure_queues(struct igc_adapter *adapter) IGC_WRITE_REG_ARRAY(hw, IGC_IVAR0, index, ivar); } /* TX entries */ - for (int i = 0; i < adapter->tx_num_queues; i++) { + for (int i = 0; i < sc->tx_num_queues; i++) { u32 index = i >> 1; ivar = IGC_READ_REG_ARRAY(hw, IGC_IVAR0, index); - tx_que = &adapter->tx_queues[i]; + tx_que = &sc->tx_queues[i]; if (i & 1) { ivar &= 0x00FFFFFF; ivar |= (tx_que->msix | IGC_IVAR_VALID) << 24; @@ -1569,12 +1569,12 @@ igc_configure_queues(struct igc_adapter *adapter) ivar |= (tx_que->msix | IGC_IVAR_VALID) << 8; } IGC_WRITE_REG_ARRAY(hw, IGC_IVAR0, index, ivar); - adapter->que_mask |= tx_que->eims; + sc->que_mask |= tx_que->eims; } /* And for the link interrupt */ - ivar = (adapter->linkvec | IGC_IVAR_VALID) << 8; - adapter->link_mask = 1 << adapter->linkvec; + ivar = (sc->linkvec | IGC_IVAR_VALID) << 8; + sc->link_mask = 1 << sc->linkvec; IGC_WRITE_REG(hw, IGC_IVAR_MISC, ivar); /* Set the starting interrupt rate */ @@ -1583,8 +1583,8 @@ igc_configure_queues(struct igc_adapter *adapter) newitr |= IGC_EITR_CNT_IGNR; - for (int i = 0; i < adapter->rx_num_queues; i++) { - rx_que = &adapter->rx_queues[i]; + for (int i = 0; i < sc->rx_num_queues; i++) { + rx_que = &sc->rx_queues[i]; IGC_WRITE_REG(hw, IGC_EITR(rx_que->msix), newitr); } @@ -1594,34 +1594,34 @@ igc_configure_queues(struct igc_adapter *adapter) static void igc_free_pci_resources(if_ctx_t ctx) { - struct igc_adapter *adapter = iflib_get_softc(ctx); - struct igc_rx_queue *que = adapter->rx_queues; + struct igc_softc *sc = iflib_get_softc(ctx); + struct igc_rx_queue *que = sc->rx_queues; device_t dev = iflib_get_dev(ctx); /* Release all MSI-X queue resources */ - if (adapter->intr_type == IFLIB_INTR_MSIX) *** 1507 LINES SKIPPED *** From nobody Mon Oct 14 13:53:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XRzGm28Ycz5YbRk; Mon, 14 Oct 2024 13:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRzGm15CYz4FKG; Mon, 14 Oct 2024 13:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728914032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CON6okxM+E7xMCYVbzRl62/biF3fr7kdJvJ0TjJJQEU=; b=AUbbLZs3KYUjzvsSxyjjNoQSwmt2PJioitzbVjXiPCHXaXW/az7HlRJEmUAS8C0ACSVGWU c+TSssysfeVUuIFVMAl7QztjX+1mzWGd3TcuOYM1e3mndFOBYniCRp8o/WxRl+nAdTkZC9 EP2SHW2ryadb6SlF2DvMRO1beeHFtNDOhqwKIeT5ZOJzr8+MOp4drI8dIVozjAm0c3NWFt bNSuysmghXerOSzffzjJTi/cAGtkVgnSMRlx4Ey4On0zX+gGQ83jGdoBF57ryjbEPmKmad LD5k1Sp9v+hhZFlyOWiwh1UtH51MbgU/svwgeHH8ODj+d7XOpAL+W/eGnjv3bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728914032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CON6okxM+E7xMCYVbzRl62/biF3fr7kdJvJ0TjJJQEU=; b=XxlUm30a64cvhU/ftoTDnYcsUp5MBTU2r7AvWigrAFb2NpLBNSephJ6LqpL82CMHP646Ay O+3itxhnURourwZBgZXCpemDmNWTc78WayHKuW/iU0M8rF485OuOyX6lWMQH2HH0zInfN0 YNoIfRuztovKmXpoxOyT3DCdPEScikq+2USB4jaTNuUKGAobCvwxDoceK9GfRmyVNaiSeq COjxWTdb8fmxU4KPSrcEa2HUAp5CzJzH2FBSgZByiibRQZDFyIiqabS/rfFHcqEk8Dst2n ZVUqYpifnWt4mPznDWOQHJB/nGMpXpnw0riAQys65+Wp+OaCSJEmXQ/zXxdtjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728914032; a=rsa-sha256; cv=none; b=m0phsYCP/8tv72tC8Y8RhHAvC6AgkehOp+CTCUzM+QHLZB5rOyKLs9Bf/V503I6Km04aGD ToZvaSE91Pq1XWJ2o96bSJgnvXO8aLOqzxWdR8paM+fgf2ttomU/16gwFrz2zFMInyPpCo /jVfRiOUpHg/8Dh8qh8eaX04R+Ie28Af/93HtCnViXngIHBgqzrMOlK88uIsqxaem2Nk3W m1+RBlCqXZxu6S03IAbRlvj23XkXKMOlNsVWj1gCYjvQkAMUepecCCfcUL6oI7F79BAXlA oo21nRfCtXjlCdDdYjCtzA67YV8MnfqZBUKjRBlB0aASKTiR+9YPg3YiEZcSQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRzGm0dBrzgmb; Mon, 14 Oct 2024 13:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EDrpp6024573; Mon, 14 Oct 2024 13:53:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EDrp2E024570; Mon, 14 Oct 2024 13:53:51 GMT (envelope-from git) Date: Mon, 14 Oct 2024 13:53:51 GMT Message-Id: <202410141353.49EDrp2E024570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 1b0e41ddffbf - main - igc: Function prototype cleanup 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b0e41ddffbf0ac84c88019df84dfd50ce9f7788 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1b0e41ddffbf0ac84c88019df84dfd50ce9f7788 commit 1b0e41ddffbf0ac84c88019df84dfd50ce9f7788 Author: Kevin Bowling AuthorDate: 2024-10-14 13:49:19 +0000 Commit: Kevin Bowling CommitDate: 2024-10-14 13:52:31 +0000 igc: Function prototype cleanup Drop variable names of function prototypes since the file is mixed in listing them or not and they fall out of sync. MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/igc/if_igc.c | 86 ++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index a55d8b6cbc9c..dd89b27e134c 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -72,49 +72,49 @@ static const pci_vendor_info_t igc_vendor_info_array[] = /********************************************************************* * Function prototypes *********************************************************************/ -static void *igc_register(device_t dev); -static int igc_if_attach_pre(if_ctx_t ctx); -static int igc_if_attach_post(if_ctx_t ctx); -static int igc_if_detach(if_ctx_t ctx); -static int igc_if_shutdown(if_ctx_t ctx); -static int igc_if_suspend(if_ctx_t ctx); -static int igc_if_resume(if_ctx_t ctx); - -static int igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxqs, int ntxqsets); -static int igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxqs, int nrxqsets); -static void igc_if_queues_free(if_ctx_t ctx); +static void *igc_register(device_t); +static int igc_if_attach_pre(if_ctx_t); +static int igc_if_attach_post(if_ctx_t); +static int igc_if_detach(if_ctx_t); +static int igc_if_shutdown(if_ctx_t); +static int igc_if_suspend(if_ctx_t); +static int igc_if_resume(if_ctx_t); + +static int igc_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static int igc_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static void igc_if_queues_free(if_ctx_t); static uint64_t igc_if_get_counter(if_ctx_t, ift_counter); -static void igc_if_init(if_ctx_t ctx); -static void igc_if_stop(if_ctx_t ctx); +static void igc_if_init(if_ctx_t); +static void igc_if_stop(if_ctx_t); static void igc_if_media_status(if_ctx_t, struct ifmediareq *); -static int igc_if_media_change(if_ctx_t ctx); -static int igc_if_mtu_set(if_ctx_t ctx, uint32_t mtu); -static void igc_if_timer(if_ctx_t ctx, uint16_t qid); -static void igc_if_watchdog_reset(if_ctx_t ctx); -static bool igc_if_needs_restart(if_ctx_t ctx, enum iflib_restart_event event); - -static void igc_identify_hardware(if_ctx_t ctx); -static int igc_allocate_pci_resources(if_ctx_t ctx); -static void igc_free_pci_resources(if_ctx_t ctx); -static void igc_reset(if_ctx_t ctx); -static int igc_setup_interface(if_ctx_t ctx); -static int igc_setup_msix(if_ctx_t ctx); - -static void igc_initialize_transmit_unit(if_ctx_t ctx); -static void igc_initialize_receive_unit(if_ctx_t ctx); - -static void igc_if_intr_enable(if_ctx_t ctx); -static void igc_if_intr_disable(if_ctx_t ctx); -static int igc_if_rx_queue_intr_enable(if_ctx_t ctx, uint16_t rxqid); -static int igc_if_tx_queue_intr_enable(if_ctx_t ctx, uint16_t txqid); -static void igc_if_multi_set(if_ctx_t ctx); -static void igc_if_update_admin_status(if_ctx_t ctx); -static void igc_if_debug(if_ctx_t ctx); +static int igc_if_media_change(if_ctx_t); +static int igc_if_mtu_set(if_ctx_t, uint32_t); +static void igc_if_timer(if_ctx_t, uint16_t); +static void igc_if_watchdog_reset(if_ctx_t); +static bool igc_if_needs_restart(if_ctx_t, enum iflib_restart_event); + +static void igc_identify_hardware(if_ctx_t); +static int igc_allocate_pci_resources(if_ctx_t); +static void igc_free_pci_resources(if_ctx_t); +static void igc_reset(if_ctx_t); +static int igc_setup_interface(if_ctx_t); +static int igc_setup_msix(if_ctx_t); + +static void igc_initialize_transmit_unit(if_ctx_t); +static void igc_initialize_receive_unit(if_ctx_t); + +static void igc_if_intr_enable(if_ctx_t); +static void igc_if_intr_disable(if_ctx_t); +static int igc_if_rx_queue_intr_enable(if_ctx_t, uint16_t); +static int igc_if_tx_queue_intr_enable(if_ctx_t, uint16_t); +static void igc_if_multi_set(if_ctx_t); +static void igc_if_update_admin_status(if_ctx_t); +static void igc_if_debug(if_ctx_t); static void igc_update_stats_counters(struct igc_softc *); -static void igc_add_hw_stats(struct igc_softc *sc); -static int igc_if_set_promisc(if_ctx_t ctx, int flags); -static void igc_setup_vlan_hw_support(if_ctx_t ctx); +static void igc_add_hw_stats(struct igc_softc *); +static int igc_if_set_promisc(if_ctx_t, int); +static void igc_setup_vlan_hw_support(if_ctx_t); static void igc_fw_version(struct igc_softc *); static void igc_sbuf_fw_version(struct igc_fw_version *, struct sbuf *); static void igc_print_fw_version(struct igc_softc *); @@ -130,10 +130,10 @@ static void igc_neweitr(struct igc_softc *, struct igc_rx_queue *, /* Management and WOL Support */ static void igc_get_hw_control(struct igc_softc *); static void igc_release_hw_control(struct igc_softc *); -static void igc_get_wakeup(if_ctx_t ctx); -static void igc_enable_wakeup(if_ctx_t ctx); +static void igc_get_wakeup(if_ctx_t); +static void igc_enable_wakeup(if_ctx_t); -int igc_intr(void *arg); +int igc_intr(void *); /* MSI-X handlers */ static int igc_if_msix_intr_assign(if_ctx_t, int); @@ -146,7 +146,7 @@ static int igc_sysctl_eee(SYSCTL_HANDLER_ARGS); static int igc_get_regs(SYSCTL_HANDLER_ARGS); -static void igc_configure_queues(struct igc_softc *sc); +static void igc_configure_queues(struct igc_softc *); /********************************************************************* From nobody Mon Oct 14 15:55:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XS1yj2wHKz5YlMw; Mon, 14 Oct 2024 15:55:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS1yj2Cqzz4TQy; Mon, 14 Oct 2024 15:55:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728921309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3kKNpSnar2INFtgM/t/khDCxRXEv4Rx5M8L8g7xus60=; b=LRDGL+taydus+0DcyULmfYSbDmh0UeTSQ//r6y89pwAwTbimeqeN5UueVOkF41BZNEjVWO 4khiPQKo6v77wL79bM6yhCtdxXShzhUEE7+a3/9n9CPharlQMlMVbpfDZ2MZsZIgqADBiW uFZlRNzNZhrqgfuQOK693cQ1x3ap9+tIEQ/19ylVaQBD9Don7Yo9z6HPf947qizpCB0zGF jzaX79aYsyhRhX1/o+3w5+q5Gf5fLYWKVkR8vNeb9vi0KsmAkpmSxobs2cjv91Fzz9A8Su qSySLcbWH333fBI6i8rurZqew5oxp5ntagkDsB4IGAueEtO7vHnyM+HBQ7V7Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728921309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3kKNpSnar2INFtgM/t/khDCxRXEv4Rx5M8L8g7xus60=; b=G+Jg8ed6efXgfnBo7mMNGXzK/M1QXDEEwSZmRPYiqC/1KXnkK8MGRpdVHZxj7kLPt0BnLl dFTgJAX6JKuKEFuZW8P7BOVzcyboG4wsTexgsqMyQS3KPnozv5lfiqzZdzXKt+QDBD1HS5 +dZTnYQacXGimi8JBSqvrLuj8R3RqrAbfaLv/W58hOXYlrmJXW9th7emAh9wBSGaxJJ6Yn WOtkXVYXfRPYblUAkYey4KJ/QPDxpQsdZhds3Ap/SqrU8x8tcbPxywTJcM7WlC3hPw+sqO q56WDti2c7NoGXXwOZVdKZy7xsEslPnv5lBK9YEB1L1m0Cb3YPS2AByZxU2c4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728921309; a=rsa-sha256; cv=none; b=wNaW76TcSqF2iICfq8iblkzwf5wS1Un4P5ovNlXUmMA/J45lBrN7VqiZKFOCd3/T/tywNJ PGoLj6GNVsgFXV0pP/XiWntiH6ZdGzI943tvI1UF3LUgTwz2c561L3UNjjmuJaOWLgZ25d 36EgMMkEx5HwtWs0I1K3fXq/QNuLC/deOQH9vBDRjA5o1eu64wkFY+5x8jO4gxQcgmBJhp ZuhN/HAcNaUbsNX2p7NnQEI0t+3GkKUsQJe4cecBSIIDRQh2DVwVejkORM5clyF+clX2aE r/2cATYthDPuInZR6q/20SOkoC+Mpw6X11chFQLecXxcJovAKZZkBpzR81IhCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS1yj1q8Lzks4; Mon, 14 Oct 2024 15:55:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EFt9ZV028826; Mon, 14 Oct 2024 15:55:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EFt9tB028823; Mon, 14 Oct 2024 15:55:09 GMT (envelope-from git) Date: Mon, 14 Oct 2024 15:55:09 GMT Message-Id: <202410141555.49EFt9tB028823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 6b8096fa5f6f - main - netpfil tests: skip checksum verification in pft_ping.py List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b8096fa5f6f81e2959cbb2ca857c4e134273da2 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6b8096fa5f6f81e2959cbb2ca857c4e134273da2 commit 6b8096fa5f6f81e2959cbb2ca857c4e134273da2 Author: Kristof Provost AuthorDate: 2024-10-14 12:57:49 +0000 Commit: Kristof Provost CommitDate: 2024-10-14 15:54:49 +0000 netpfil tests: skip checksum verification in pft_ping.py From scapy 2.6.0 it now removes (sets to None) the IP checksum in its defrag code. We typically ask for IPv4 or IPv6 defragmentation, which causes check function failures. Just skip the checksum verificiation here, because we're going to notice incorrect checksums even if the tests don't directly verify it. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/common/pft_ping.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/sys/netpfil/common/pft_ping.py b/tests/sys/netpfil/common/pft_ping.py index 1caa26abe5f6..0d1134a22dda 100644 --- a/tests/sys/netpfil/common/pft_ping.py +++ b/tests/sys/netpfil/common/pft_ping.py @@ -205,12 +205,6 @@ def check_ipv4(expect_params, packet): if dst_address and ip.dst != dst_address: LOGGER.debug(f'Wrong IPv4 destination {ip.dst}, expected {dst_address}') return False - chksum = ip.chksum - ip.chksum = None - new_chksum = sp.IP(sp.raw(ip)).chksum - if chksum != new_chksum: - LOGGER.debug(f'Wrong IPv4 checksum {chksum}, expected {new_chksum}') - return False if flags and ip.flags != flags: LOGGER.debug(f'Wrong IP flags value {ip.flags}, expected {flags}') return False From nobody Mon Oct 14 15:59: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 4XS23y3R3Vz5Ym2b; Mon, 14 Oct 2024 15:59:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS23y1dtpz4TsC; Mon, 14 Oct 2024 15:59:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728921582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AbXh+6psF4DnzEjaubjBVbiWPHql1VUdZoHvqwTJLqg=; b=k3UxPlsXATLC96vtVSTX3zly0bRtiuLC6upU+d4kUoy7NQEu77pvaGvRpiQATppRjNziN1 WX5OzKAdFC4J7T1caa6cu25ix1s6WQn0c7GJCcJOFI5juD4pV7mB43AQX+PWswwQcPwYIA k+8KarcWVzmQCoEjM/IQ4tIGc3XtSbnL+1h0RG1jRxhUm81G4zbefOOW8IdVzqj95navFD ZD+k7YHblQTaeaR53hR27/vtpGOsyf57/NO4sfK4kGUYcNYXqtL3FZ3z2ZyJbOcg2voWPT 2jkHu0kJtlghwFvpdPDfeJyuzK9LtaNVKqJ1iJHwaOKxsOSevJra/Nt2+dulCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728921582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AbXh+6psF4DnzEjaubjBVbiWPHql1VUdZoHvqwTJLqg=; b=g6dWRcdaMR3WMt8SEUVQbFElhs2BY/kTQBGyzt0iW3sVAV3dhVc3g3cTI/nvaJlczeutpZ Mqc4Pb7JSqMxuZbv8nMYwn580/TRfgpw0keYEol1cF+xcOMIfh+5ZMShKPGsbc5g1/CWFZ 2eabw7i8Bwj+FlhdpDPthWa/XMCsgd4eOnNVP9uoqP4o/N8oucQr9lqLi2xDWavS1tXrTK RSZmpNfgrPuPWV4ZjvMupzT59v/rfZ9nxRtPO4kSfY/9xN/YHJxSY57p2vYmKxALtxqzow IXN/zR6dhxr2KrvlEyM8SDQ77xFN+jRFlF9Ei+BWP8r/iOHY8Mmsr+k8LK6/lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728921582; a=rsa-sha256; cv=none; b=g2+0Bqy84BUwxqr+5iuniDHV7KcCbwGseNpZLYsR7thEuofHOI17cIR1JPBGUNuG096JJw cyxUslGpFuKptn1Y8gnH9rbz/PKXJTTbp2z+2e8GdZE7fh7wObXBVubtBWrSsgjWsaQsQ0 Fxdg8JJtBfj+MuVWEnfHzPJ2o3UxVaoVHW/wuQMsIODRwlSIf2EHjgbZgZPrnjprE/AU7z c3/oRS4WkwWF4Ah26vWmA83yXU2KXP1hRSgxqd6L8M2wMcBukp0xwOBYFZzl58m3H0QkWI j4Q0EjaC5Kpf9q1/zLUKnu4oyOK2/+TzffWeZtK1G6PKniC7/3fzScwOtjUzxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS23y17sPzl6s; Mon, 14 Oct 2024 15:59:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EFxga8029602; Mon, 14 Oct 2024 15:59:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EFxggp029599; Mon, 14 Oct 2024 15:59:42 GMT (envelope-from git) Date: Mon, 14 Oct 2024 15:59:42 GMT Message-Id: <202410141559.49EFxggp029599@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: c5dee7636849 - main - unicode: revert to 15, more work is needed for 16 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: c5dee76368499b08f04ad55176170217a499541e Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=c5dee76368499b08f04ad55176170217a499541e commit c5dee76368499b08f04ad55176170217a499541e Author: Baptiste Daroussin AuthorDate: 2024-10-14 15:57:17 +0000 Commit: Baptiste Daroussin CommitDate: 2024-10-14 15:59:39 +0000 unicode: revert to 15, more work is needed for 16 --- tools/tools/locale/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/locale/Makefile b/tools/tools/locale/Makefile index a652815b7930..b49c90e691be 100644 --- a/tools/tools/locale/Makefile +++ b/tools/tools/locale/Makefile @@ -8,7 +8,7 @@ # CLDRVERSION= 45.0 -UCDVERSION= 16.0.0 +UCDVERSION= 15.0.0 .if ${.CURDIR} == ${.OBJDIR} .error Do make obj first. From nobody Mon Oct 14 15:59: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 4XS23z4jRqz5Ym2c; Mon, 14 Oct 2024 15:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS23z323Tz4Txd; Mon, 14 Oct 2024 15:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728921583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IWy3COs1O/a7Mp5Cb5/TqyPpiPb+KeZA+tdCulrfU0o=; b=NXYX/x1S4UyyegpTZvnBbKD1tSmUOJNMu4AhD4nB66yeYZoSIDLCarBkOio2bfZP0/cpE1 bJOWQfTCsbtGUFZew9TteaV75FkY7rdN9NVNAeWYKu2OzFQpRzfCe4L4/uNtdpRrxegCJm h/HfLns9d9TOn61jlUqa7qV2rwoeeI4jaYvBvMNQF84R3K5DZUSLu/C4pnImVSDawhrJwA O6q5FdmSY5TmzJ1T/YrIThVZPkgMnFxjAsSv05vINAN+JxxYpOGWNKRPZWZKxk0exy51+k /jyUhqtHP0eV69ZUgWj0EuiNd1K42MePleShtH+D79XgOQyxSxkHhQAt8G5AYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728921583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IWy3COs1O/a7Mp5Cb5/TqyPpiPb+KeZA+tdCulrfU0o=; b=aXFhbQKfFHhH2ts9IWaw/e3Dqy3Lu18qIdSn8hsMPyI5CBMoLuvMvBlGJ1Cvvn7gfU8CZX CSPxGcQ949LxUgmAB8bMKc7LOMcxAERFI6R/19UeDXxc+DpuO0tgV0wYYYB17sHa/fRElC a/kRje49YC5GCASW+AabYLKslxhuNAFlqNcnQYhX9LvQ21iBwQ86BDLzQ7YMI0C0R9mwGL AnwiDuIJN6wQH82qLoTDJzeKzN6VsNob6TC8TnOYyOMojrX9hCrSDfyC3MIx5wqUd/q6bv pZnN+1tCQbjB/niXY0y+RDGkfoDDgIBy9XxaDgBLQU+athr4Z5JlynuUWiCJ3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728921583; a=rsa-sha256; cv=none; b=THaK6SMsnICr/l5HMOd0Q8QT17v1I2eGuV0bywEU2ja4StjGvolWSQlc+NEu83anFpWk5l 8vKJKvLMr12EvKc42uzJN7+0Lj+EUntOvWDI/TBOfm7u5DKlFiFKjonf3JOgN6R+LD+lYj bAwyKkduc5jBJBPZIVKwF2Efb6BEcN74Fu5oclHGQNT3688dy8sTGBWtIO/S6zy/WlF/Of ixyyKLc+lbPoSsxv+UK978FtNLp+fGlXLeJmhEpve3LBK6qMvHj4CqZ0CxJ+UmhCkaUIu3 vZTf2vBTUE48DEShT1fTm92EtPspUfZ1O0CqrCnbblaanK3QhzhS576x5yOouQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS23z2L8wzl6t; Mon, 14 Oct 2024 15:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EFxh2l029644; Mon, 14 Oct 2024 15:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EFxhVU029641; Mon, 14 Oct 2024 15:59:43 GMT (envelope-from git) Date: Mon, 14 Oct 2024 15:59:43 GMT Message-Id: <202410141559.49EFxhVU029641@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: 1aeedde11da2 - main - Unicode: revert to unicode 15.0.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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1aeedde11da26889bbd75ac6beac391810d6cab6 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=1aeedde11da26889bbd75ac6beac391810d6cab6 commit 1aeedde11da26889bbd75ac6beac391810d6cab6 Author: Baptiste Daroussin AuthorDate: 2024-10-14 15:58:18 +0000 Commit: Baptiste Daroussin CommitDate: 2024-10-14 15:59:39 +0000 Unicode: revert to unicode 15.0.0 Unicode the generation of UTF-8 ctype is somehow broken for now for unicode 16, so for now revert to unicode 15 --- share/ctypedef/C.UTF-8.src | 8 -------- 1 file changed, 8 deletions(-) diff --git a/share/ctypedef/C.UTF-8.src b/share/ctypedef/C.UTF-8.src index 573535fc16cf..5e65a3ba5358 100644 --- a/share/ctypedef/C.UTF-8.src +++ b/share/ctypedef/C.UTF-8.src @@ -17152,7 +17152,6 @@ alpha ;/ ;...;;/ ;...;;/ ;...;;/ - ;...;;/ ;/ ;/ ;/ @@ -23134,10 +23133,6 @@ graph ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ ;/ ;/ ;/ @@ -23221,7 +23216,6 @@ graph ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -34643,7 +34637,6 @@ toupper (,);/ (,);/ (,);/ (,);/ - (,);/ (,);/ (,);/ (,);/ @@ -34734,7 +34727,6 @@ toupper (,);/ (,);/ (,);/ (,);/ - (,);/ (,);/ (,);/ (,);/ From nobody Mon Oct 14 16:11:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XS2KB3Txqz5Ymg5; Mon, 14 Oct 2024 16:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS2KB2x0Tz4WND; Mon, 14 Oct 2024 16:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728922270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xV89QG4kEx1EbARYh4779oYI8vcV+TCzmYWN0BujMyQ=; b=uAzUZ2JWbqHf9qyb0/zDryP5iv6nqSh3hmJ5lc9ajp/6vTKHm9PESilGWVB/RkZ+ezFJbb zIs86alpuHZzsECWbqXQCNGzYSJ5lpp+JQ6VBUocYvdtMUa04PGyDjP6kZqM8/uZB56I+0 DmvKr4WxxcgvW16A3GkT71dMZ1a/GGXUh3k5/q0/OuwG9dP250ONMGRPKqHB+Tsr+pWucM frwfz5FUkrDCDtf8NBRLmlxBuPkU0LtcYaBKRfr3mCsZ3QX87Y2qrjHFPg8B10t93M2XkD +mDm+4RMMO+hbHpoBPxlQvJigsqKY7FjUPVCIDeY4wutF/YhfT7Va6zMt2mjQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728922270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xV89QG4kEx1EbARYh4779oYI8vcV+TCzmYWN0BujMyQ=; b=rcIBcVptFCVXV5cNd+bE4MoEvgkHpwywsm6Oc1zmjABRzSzH6OfAaPWeAXlV8DNtQBCYk3 utSQ7gBITrcqRYFc0jli1+rFRB5Zu+1Wyona4nJtHJnYq9tQu5f3eLuBmK7srifj8RPt91 CAYuL/JSj8Y+WWQpbab+z87IsuOy8Uef6152BDKKWnXS5evuwGJZsP8h9WuN2kSdU9PRwR SgSiCedUDcsPVx7oojcAOsiWH2t7IiRXNMOkpSv5wASqEN+YR07dlGAvWa2ZIrZCEzt7Jm ZpPheoy1q3qV6DKbjBB1vCfMVKSD4KM6z/tPmaXrUH/YX69d+fy16pKqqrtBQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728922270; a=rsa-sha256; cv=none; b=hVablzR7QWOMP7zaklKpLmwYu1nGnH0mgZDZQSTIR0CEZ4TcSmhfuOV1ENllxxTE/bj/1y MRS7d7FYxQEPVqlnY66lsLrZDhfvJWK5Sj8W9bWO98DmA2Wv0OtJJ5X9ncD5LjOA0MyY2D 45OSmLOP/3lZ2FB6KbQJeq27Tj3DAgIUxYwk1YrOQ4pgN8CZRLicANazd9IqSW9lqn7t64 eXVjVnyFd1Q+AoyzNpBMFzk15xeEnu+6Ct3ekNLdt4xLWZr9zch7Gs7FsyI7bihPrjzLk8 JUjVzlZBjlhvMv7FbqEKZwXPNjEnV+WNfCH99M34YaOKxbA4wGpEeMEwyFBbIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS2KB2XHKzl7l; Mon, 14 Oct 2024 16:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EGBALo057604; Mon, 14 Oct 2024 16:11:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EGBAVd057601; Mon, 14 Oct 2024 16:11:10 GMT (envelope-from git) Date: Mon, 14 Oct 2024 16:11:10 GMT Message-Id: <202410141611.49EGBAVd057601@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 9dc452b983f0 - main - e1000: txrx function prototype cleanup 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9dc452b983f042aa9d2a2562517d44c1928ff42a Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=9dc452b983f042aa9d2a2562517d44c1928ff42a commit 9dc452b983f042aa9d2a2562517d44c1928ff42a Author: Kevin Bowling AuthorDate: 2024-10-14 16:07:29 +0000 Commit: Kevin Bowling CommitDate: 2024-10-14 16:10:59 +0000 e1000: txrx function prototype cleanup Drop variable names of function prototypes since the file is mixed in listing them or not and they fall out of sync. MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/e1000/em_txrx.c | 39 ++++++++++++++++++--------------------- sys/dev/e1000/igb_txrx.c | 30 ++++++++++++++---------------- 2 files changed, 32 insertions(+), 37 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 6e8fff07cd82..65ffcdfd67f6 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -43,29 +43,26 @@ /********************************************************************* * Local Function prototypes *********************************************************************/ -static int em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, - uint32_t *txd_upper, uint32_t *txd_lower); -static int em_transmit_checksum_setup(struct e1000_softc *sc, - if_pkt_info_t pi, uint32_t *txd_upper, uint32_t *txd_lower); -static int em_isc_txd_encap(void *arg, if_pkt_info_t pi); -static void em_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx); -static int em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear); -static void em_isc_rxd_refill(void *arg, if_rxd_update_t iru); -static void em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, - qidx_t pidx); -static int em_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, - qidx_t budget); -static int em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); - -static void lem_isc_rxd_refill(void *arg, if_rxd_update_t iru); - -static int lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, - qidx_t budget); -static int lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); +static int em_tso_setup(struct e1000_softc *, if_pkt_info_t, uint32_t *, + uint32_t *); +static int em_transmit_checksum_setup(struct e1000_softc *, if_pkt_info_t, + uint32_t *, uint32_t *); +static int em_isc_txd_encap(void *, if_pkt_info_t); +static void em_isc_txd_flush(void *, uint16_t, qidx_t); +static int em_isc_txd_credits_update(void *, uint16_t, bool); +static void em_isc_rxd_refill(void *, if_rxd_update_t); +static void em_isc_rxd_flush(void *, uint16_t, uint8_t, qidx_t); +static int em_isc_rxd_available(void *, uint16_t, qidx_t, qidx_t); +static int em_isc_rxd_pkt_get(void *, if_rxd_info_t); + +static void lem_isc_rxd_refill(void *, if_rxd_update_t); + +static int lem_isc_rxd_available(void *, uint16_t, qidx_t, qidx_t); +static int lem_isc_rxd_pkt_get(void *, if_rxd_info_t); static void em_receive_checksum(uint16_t, uint8_t, if_rxd_info_t); -static int em_determine_rsstype(uint32_t pkt_info); -extern int em_intr(void *arg); +static int em_determine_rsstype(uint32_t); +extern int em_intr(void *); struct if_txrx em_txrx = { .ift_txd_encap = em_isc_txd_encap, diff --git a/sys/dev/e1000/igb_txrx.c b/sys/dev/e1000/igb_txrx.c index 82cbb37ce4cd..8b663d7e6d3e 100644 --- a/sys/dev/e1000/igb_txrx.c +++ b/sys/dev/e1000/igb_txrx.c @@ -42,29 +42,27 @@ /********************************************************************* * Local Function prototypes *********************************************************************/ -static int igb_isc_txd_encap(void *arg, if_pkt_info_t pi); -static void igb_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx); -static int igb_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear); +static int igb_isc_txd_encap(void *, if_pkt_info_t); +static void igb_isc_txd_flush(void *, uint16_t, qidx_t); +static int igb_isc_txd_credits_update(void *, uint16_t, bool); -static void igb_isc_rxd_refill(void *arg, if_rxd_update_t iru); +static void igb_isc_rxd_refill(void *, if_rxd_update_t); -static void igb_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, - qidx_t pidx); -static int igb_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, - qidx_t budget); +static void igb_isc_rxd_flush(void *, uint16_t, uint8_t, qidx_t); +static int igb_isc_rxd_available(void *, uint16_t, qidx_t, qidx_t); static int igb_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); -static int igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, - uint32_t *cmd_type_len, uint32_t *olinfo_status); -static int igb_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, - uint32_t *cmd_type_len, uint32_t *olinfo_status); +static int igb_tx_ctx_setup(struct tx_ring *, if_pkt_info_t, uint32_t *, + uint32_t *); +static int igb_tso_setup(struct tx_ring *, if_pkt_info_t, uint32_t *, + uint32_t *); -static void igb_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype); -static int igb_determine_rsstype(uint16_t pkt_info); +static void igb_rx_checksum(uint32_t, if_rxd_info_t, uint32_t); +static int igb_determine_rsstype(uint16_t); -extern void igb_if_enable_intr(if_ctx_t ctx); -extern int em_intr(void *arg); +extern void igb_if_enable_intr(if_ctx_t); +extern int em_intr(void *); struct if_txrx igb_txrx = { .ift_txd_encap = igb_isc_txd_encap, From nobody Mon Oct 14 16:11: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 4XS2KC4Lhrz5YmkN; Mon, 14 Oct 2024 16:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS2KC3qq1z4Vty; Mon, 14 Oct 2024 16:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728922271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/exAlDbFDFoFxNcnN3Xekk3bYAx5AaopHXmq80/RtWw=; b=bhD5r76GTDyy+oKjtIbtisUpiy+kbwnCX5+NFW0LKk5zZ8xJ1WF0WoLwbxBV222v7PbAAI siOZyzcO0Txhy3h+awNlAopufx9qQGgnCPTwcpsApiU6a6u5NJul1GvSB8ZBHidtAIoF7O zK52v7Su8pNC6CHnhUEGaO3TxO3Uc/xOEYh0qXEPcdpOsx7U7xgAFK5cwmqjhEl03G5YSf mvdeebJz9pCAPgSSXBldKLE9DctZok+IrQ/H+pGnnWNdu6m9aLddrN1z4VSoVHVbcrZCLU mGhA/RIYxbYd6S0BqXwb60vk4ftlbWVU0ObGQfvJ7RonGyCP80bIe+9G0900ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728922271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/exAlDbFDFoFxNcnN3Xekk3bYAx5AaopHXmq80/RtWw=; b=RCiKy6Md7R4ifhl/TyWYUKaoHWUdcsi2O0aauFCrU/4h5crbmrAGxcVpNloNLFUTJCL3Un QktHJRb30ZVf8fV1vWtql3gF8AAlRYiKEE4MJCRHEjmcihWo96LaNv8I8xt4JjA06m7vzw 2UP1LPee9mME9QkdezehfCQcsadrWwS/W/axc4eAR3p3WHrvLU5i5WiN6uxpH2CE494tEi sDv9BEG7kHGRvQup7RBuoR0QwuIUGUPVdYTEMiu9upk8K6WvPbLqPgxwHEHikLNcVG9j50 VG67hCLKlIfmPL7IV+ENiIVtvAkuDr8+W6WdUa/CWWHcjVlAOVv3TT/WSX2fzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728922271; a=rsa-sha256; cv=none; b=VJUNx0gd1jTKy4qkn8t5voESb/uWHBFFgR5DdfdpwKgXkpAaXoF0Dls61gurXJvePAdqrv 8I964ovrQQ2UrVu0jrABcuMrfmDYFLptQ5IcIqOm+oERqgDUsuv9zx+QPhKQOPr/JAmID5 W/k8DwVSrb6mzT8QysrtQCcw4Tx3RP4yhwi5VugPssyEqLpMhuekWBrM/PzM5rt5OW6vDg DNiG4xJSxKt2a+OoTKBWb95XXVcmpzpT2X4sIcl+Uiogrsj52ksh8O93rz/NQvfsqwfGM1 +MeDRzNZzQlQjKM8Qq3c8wFe0GCZt8g+SM/H2DzZn4Hmx8q5/rOw9HohueSiiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS2KC38Lbzl9Y; Mon, 14 Oct 2024 16:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EGBB99057646; Mon, 14 Oct 2024 16:11:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EGBBHD057643; Mon, 14 Oct 2024 16:11:11 GMT (envelope-from git) Date: Mon, 14 Oct 2024 16:11:11 GMT Message-Id: <202410141611.49EGBBHD057643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 7763b194d8de - main - igc: txrx function prototype cleanup 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7763b194d8de6fe8034f754064449a7510ca16b9 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=7763b194d8de6fe8034f754064449a7510ca16b9 commit 7763b194d8de6fe8034f754064449a7510ca16b9 Author: Kevin Bowling AuthorDate: 2024-10-14 16:10:10 +0000 Commit: Kevin Bowling CommitDate: 2024-10-14 16:10:59 +0000 igc: txrx function prototype cleanup Drop variable names of function prototypes since the file is mixed in listing them or not and they fall out of sync. MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/igc/igc_txrx.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/sys/dev/igc/igc_txrx.c b/sys/dev/igc/igc_txrx.c index a95b34702e24..59f4725388ee 100644 --- a/sys/dev/igc/igc_txrx.c +++ b/sys/dev/igc/igc_txrx.c @@ -44,29 +44,27 @@ /********************************************************************* * Local Function prototypes *********************************************************************/ -static int igc_isc_txd_encap(void *arg, if_pkt_info_t pi); -static void igc_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx); -static int igc_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear); +static int igc_isc_txd_encap(void *, if_pkt_info_t); +static void igc_isc_txd_flush(void *, uint16_t, qidx_t); +static int igc_isc_txd_credits_update(void *, uint16_t, bool); -static void igc_isc_rxd_refill(void *arg, if_rxd_update_t iru); +static void igc_isc_rxd_refill(void *, if_rxd_update_t); -static void igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, - qidx_t pidx); -static int igc_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, - qidx_t budget); +static void igc_isc_rxd_flush(void *, uint16_t, uint8_t, qidx_t); +static int igc_isc_rxd_available(void *, uint16_t, qidx_t, qidx_t); -static int igc_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); +static int igc_isc_rxd_pkt_get(void *, if_rxd_info_t); -static int igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, - uint32_t *cmd_type_len, uint32_t *olinfo_status); -static int igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, - uint32_t *cmd_type_len, uint32_t *olinfo_status); +static int igc_tx_ctx_setup(struct tx_ring *, if_pkt_info_t, uint32_t *, + uint32_t *); +static int igc_tso_setup(struct tx_ring *, if_pkt_info_t, uint32_t *, + uint32_t *); -static void igc_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype); -static int igc_determine_rsstype(uint16_t pkt_info); +static void igc_rx_checksum(uint32_t, if_rxd_info_t, uint32_t); +static int igc_determine_rsstype(uint16_t); -extern void igc_if_enable_intr(if_ctx_t ctx); -extern int igc_intr(void *arg); +extern void igc_if_enable_intr(if_ctx_t); +extern int igc_intr(void *); struct if_txrx igc_txrx = { .ift_txd_encap = igc_isc_txd_encap, From nobody Mon Oct 14 17:12:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XS3gn4QTzz5Ys6k; Mon, 14 Oct 2024 17:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS3gn3v7Zz4c5r; Mon, 14 Oct 2024 17:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728925941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vsat7//Eu0EOsx/DKRx7WYYFpcFXrhoZ+kRorlIFnpc=; b=cHj5lBlmd3E5txNHRLQd8RWRx62n1kIsTYkSDBTmUexYVqSmBS9MYhNjLkMu6IwLa0OJPi cYBvop+Y2QOXCmyX1oZiQdCfz1CNiHsC5LU1+8mVeXeeDSU/RnpZduVsPZPChV6TF22WSK ASM6FBpH73fkQCHGwY2iYkCgL5opP5c9F0HhLpj3rfGl1zzG4hX5haQ6U1LWDwNtzUlqNZ qWZ1sQA1/aoheDi/n4adUGoA9+b12cxFMP3iVG0bRjJ/qnrEYkLnCKbCRIb9EhdM1eO6Cq a7RfM70mOC+cFX6XkHu0vpJEzKqx917xrJsRF4KbPTVmZiEPRJ6DDSiZ/OIyIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728925941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vsat7//Eu0EOsx/DKRx7WYYFpcFXrhoZ+kRorlIFnpc=; b=sjKV4JDIG3OCFmwAW2W9CSD3OzmmVHsWktHaTR7lLUoI9VCi5S9JrX5wEWqd8gDtfeeRwG 4SDj6HV0gokEhTQn7FmKL8zWIuy8uVrZBP6cJFq3WV4O2aVmLDRahOk6kyxCr2b6jYRe5H B2YMGh1jBXAGw3kvEtvShwBapvr+hPEJhH7FB49tG1gYf96qZNzLSEPRp01FXYUrKw/azi Oy1iXL1sRNJHQlAEZD4JwQIFOICsZciZ58jgkZz0mpHq9sOLBy6jaPxRi3PemowOujT2xW YDEJ8bhU93pXHLWeCailL4dNqH5WesDsFlgr+cjOWEjqMpGn/PO9HqLgCXNrfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728925941; a=rsa-sha256; cv=none; b=h3PVgFIvwXKLyXK4bLhP3EbKJPXZ4r9AAACdRSb4PsvZ+lG5dSQKYHOlETAlanzcHGFcxO ezvrVcAhDVl8Hesp5aTJyVKbXjZ2HNMJCFgkzDAwD4i8xKv2si4xsIQZa9guwDhXqyLdve ovvNFrBaZN9krtpEVVuO8NfCevOU1vrd1LKuAYmTY+bhSRUxNA7sSfDWrK+SAVfVSnjCVC dZmZ3swV7iw85F8xSn2Nf9q/jMw7YLLwj7iH8QkdBsh1g8iU1ECdsw9CZ1Dky8MvBUcCu8 285GpGFrsx+qmD4nU866hDYla1g2N24s7f2wZXFUw6fhr9uBEQgOFaNg7YRq6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS3gn3VcgzmN9; Mon, 14 Oct 2024 17:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EHCL63064274; Mon, 14 Oct 2024 17:12:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EHCL6e064271; Mon, 14 Oct 2024 17:12:21 GMT (envelope-from git) Date: Mon, 14 Oct 2024 17:12:21 GMT Message-Id: <202410141712.49EHCL6e064271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 2c8caa4b3925 - main - vfs_subr: optimize inval_buf_range 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c8caa4b3925aa73350d687cd13876c275f35889 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=2c8caa4b3925aa73350d687cd13876c275f35889 commit 2c8caa4b3925aa73350d687cd13876c275f35889 Author: Doug Moore AuthorDate: 2024-10-14 17:07:59 +0000 Commit: Doug Moore CommitDate: 2024-10-14 17:07:59 +0000 vfs_subr: optimize inval_buf_range Use a pctrie_lookup to avoid walking over low out-of-range buf list entries, and an early break to avoid the high out-of-range entries. Avoid writing almost identical loops for the dirty and clean lists. Because pctries are built for unsigned keys, and these are signed values, handle the wraparound problem the same way that bnoreuselist() does. Reviewed by: kib Tested by: pho Differential Revision: https://reviews.freebsd.org/D46963 --- sys/kern/vfs_subr.c | 50 ++++++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f192c6798858..ff18c50546dd 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2616,17 +2616,25 @@ static int v_inval_buf_range_locked(struct vnode *vp, struct bufobj *bo, daddr_t startlbn, daddr_t endlbn) { + struct bufv *bv; struct buf *bp, *nbp; - bool anyfreed; + uint8_t anyfreed; + bool clean; ASSERT_VOP_LOCKED(vp, "v_inval_buf_range_locked"); ASSERT_BO_LOCKED(bo); + anyfreed = 1; + clean = true; do { - anyfreed = false; - TAILQ_FOREACH_SAFE(bp, &bo->bo_clean.bv_hd, b_bobufs, nbp) { - if (bp->b_lblkno < startlbn || bp->b_lblkno >= endlbn) - continue; + bv = clean ? &bo->bo_clean : &bo->bo_dirty; + bp = BUF_PCTRIE_LOOKUP_GE(&bv->bv_root, startlbn); + if (bp == NULL || bp->b_lblkno >= endlbn || + bp->b_lblkno < startlbn) + continue; + TAILQ_FOREACH_FROM_SAFE(bp, &bv->bv_hd, b_bobufs, nbp) { + if (bp->b_lblkno >= endlbn) + break; if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK, BO_LOCKPTR(bo)) == ENOLCK) { @@ -2638,39 +2646,17 @@ v_inval_buf_range_locked(struct vnode *vp, struct bufobj *bo, bp->b_flags |= B_INVAL | B_RELBUF; bp->b_flags &= ~B_ASYNC; brelse(bp); - anyfreed = true; + anyfreed = 2; BO_LOCK(bo); if (nbp != NULL && - (((nbp->b_xflags & BX_VNCLEAN) == 0) || + (((nbp->b_xflags & + (clean ? BX_VNCLEAN : BX_VNDIRTY)) == 0) || nbp->b_vp != vp || - (nbp->b_flags & B_DELWRI) != 0)) - return (EAGAIN); - } - - TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) { - if (bp->b_lblkno < startlbn || bp->b_lblkno >= endlbn) - continue; - if (BUF_LOCK(bp, - LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK, - BO_LOCKPTR(bo)) == ENOLCK) { - BO_LOCK(bo); - return (EAGAIN); - } - bremfree(bp); - bp->b_flags |= B_INVAL | B_RELBUF; - bp->b_flags &= ~B_ASYNC; - brelse(bp); - anyfreed = true; - - BO_LOCK(bo); - if (nbp != NULL && - (((nbp->b_xflags & BX_VNDIRTY) == 0) || - (nbp->b_vp != vp) || - (nbp->b_flags & B_DELWRI) == 0)) + (nbp->b_flags & B_DELWRI) == (clean? B_DELWRI: 0))) return (EAGAIN); } - } while (anyfreed); + } while (clean = !clean, anyfreed-- > 0); return (0); } From nobody Mon Oct 14 17: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 4XS41R2LhFz5YsTS; Mon, 14 Oct 2024 17: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS41R20jtz4cxt; Mon, 14 Oct 2024 17: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=1728926859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bNQCr+/IecrLEyRAnG/va1gvQjzGtEYRP9lDSB/fXn8=; b=RO7HTdPrr9TjFgdIc4k0HYZSQq/As/8jrJ3+AmxfAptKYrS6pzkjvWltgYdBP/rHteEXuJ dlEegKZh8cMI24CXm4fe/DFfnRbjV36IQ20t/Kq+HaUQA/BXibMVLiBRP2WON1cRzNptDe Xih7eX+JyFCaR7h2A1TEufCFjKQmjDRmT0iQnO9qwEQ3UUr7nWarG47z5/7tu68pmZCFA9 oX9jL724adr7cAv2L9HsxA5EvNd7igUgshIX/2KmYJQWim8o6FF0QmGImWzWWiKt2299GY b4oNq5EeMaiGKz7lEknhzq2/74fw3X0gKJABuO85b1YfRirgj38ITMUDCv2rQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728926859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bNQCr+/IecrLEyRAnG/va1gvQjzGtEYRP9lDSB/fXn8=; b=jgGTe+BGgMatpzgxvBbw320XtVN9w7cuCND0Y9A6VJrF3RAkGwnb/11pwHGNbSD/S6KCNF PozZ2WcbjLnxxn8sNFtPXFg5+oh9LpRCG2o/wHIyL6q0bUCsZryh45V3PWeBfz3r7HVN2O y7Rfr3Ug4XOyAYhZtT1K9Zj0IotnLDILt844raTrZjxNkhQ26FTW2AjKZiiYw9Xq7t/491 r/RR+VJ5KUbXYnsI1CD3FLdEUVHXab0cw8SuxjZrCRwYO/cjtv8lVZQNBioMPP02mph2wo DI4g/bG+nYBaDj4HDHNjThkYfYE37mJreBuB5HHwRN3delDU2eSSL+8qgJ4VhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728926859; a=rsa-sha256; cv=none; b=wWIROg/OIENfemE3oAiCPDSCTrBn8TgtwjpTat/1VIkclqkN4zUJrYzsPKslqarY5Q6BWe myG5fhPcbrMGUqMQbnUOWFpQ1Yk6Th2ZaoxDf0Vbml7kw70+Yyf8dyndtfiyASt0MGmUd3 zWdoW3uIYckYgsVvy+QfB9qFAW8iHLFDKKdcc4Q3U+a7s2JbH6HATJQAlo7kXCBiT+9iAL 0ZMNt8qqBcIW9S0tGbCTb92EwpA4HP2Yiv++vwcAezN2uFKeLmIP14Cp3ddXg3VbdynyfJ q4o3s/KiRHVR+VdwxUYWt3KGPkOzdvJK982Qo4gQh6KY+asOyR1SPUow+fggbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS41R1VW3znKF; Mon, 14 Oct 2024 17:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EHRdwp082168; Mon, 14 Oct 2024 17:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EHRd6a082165; Mon, 14 Oct 2024 17:27:39 GMT (envelope-from git) Date: Mon, 14 Oct 2024 17:27:39 GMT Message-Id: <202410141727.49EHRd6a082165@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: a64729f5077d - main - Update Makefile.depend files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a64729f5077d77e13b9497cb33ecb3c82e606ee8 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a64729f5077d77e13b9497cb33ecb3c82e606ee8 commit a64729f5077d77e13b9497cb33ecb3c82e606ee8 Author: Simon J. Gerraty AuthorDate: 2024-10-14 17:24:54 +0000 Commit: Simon J. Gerraty CommitDate: 2024-10-14 17:26:17 +0000 Update Makefile.depend files After building packages we have a number of new and updated Makefile.depend files Reviewed by: stevek --- bin/nproc/Makefile.depend | 14 ++++++++++ bin/pkill/tests/Makefile.depend | 3 ++ bin/sh/Makefile.depend | 1 - bin/sleep/Makefile.depend | 1 + include/Makefile.depend | 2 -- include/ssp/Makefile.depend | 10 +++++++ lib/atf/libatf-c++/tests/Makefile.depend | 1 - lib/atf/libatf-c/tests/Makefile.depend | 1 - lib/geom/union/Makefile.depend | 2 -- lib/libbe/tests/Makefile.depend | 17 ++++++++++++ lib/libbsddialog/Makefile.depend | 1 - lib/libc++experimental/Makefile.depend | 3 -- lib/libc/Makefile.depend | 1 - lib/libcbor/Makefile.depend | 16 +++++++++++ lib/libdl/Makefile.depend | 1 + lib/libedit/Makefile.depend | 1 - lib/libfido2/Makefile.depend | 17 ++++++++++++ lib/libgcc_s/Makefile.depend | 1 - lib/libipt/Makefile.depend | 15 ++++++++++ lib/liblzma/Makefile.depend | 1 - lib/libmagic/Makefile.depend | 1 + lib/libnetmap/Makefile.depend | 15 ++++++++++ lib/libnvmf/Makefile.depend | 12 ++++++++ lib/libregex/Makefile.depend | 1 - lib/librt/Makefile.depend | 1 + lib/libsmutil/Makefile.depend | 1 + lib/libssp/Makefile.depend | 2 ++ lib/libsys/Makefile.depend | 1 - lib/libthr/Makefile.depend | 1 - lib/libxo/encoder/csv/Makefile.depend | 2 ++ lib/libxo/tests/Makefile.depend | 5 +--- lib/libxo/tests/encoder/Makefile.depend | 4 +-- lib/libz/Makefile.depend | 1 - lib/msun/Makefile.depend | 1 - lib/ncurses/form/Makefile.depend | 1 + lib/ncurses/ncurses/Makefile.depend | 1 - lib/ncurses/panel/Makefile.depend | 1 - lib/ncurses/tinfo/Makefile.depend | 1 - lib/ofed/libirdma/Makefile.depend | 18 ++++++++++++ libexec/atf/atf-pytest-wrapper/Makefile.depend | 18 ++++++++++++ libexec/nuageinit/Makefile.depend | 10 +++++++ libexec/nuageinit/tests/Makefile.depend | 10 +++++++ libexec/rtld-elf/Makefile.depend | 1 + sbin/bectl/Makefile.depend | 13 +-------- sbin/bectl/tests/Makefile.depend | 10 +++++++ sbin/camcontrol/Makefile.depend | 1 + sbin/geom/Makefile.depend | 2 -- sbin/md5/Makefile.depend | 1 + sbin/md5/tests/Makefile.depend | 10 +++++++ sbin/nvmecontrol/Makefile.depend | 1 + sbin/nvmecontrol/tests/Makefile.depend | 10 +++++++ sbin/pfctl/tests/Makefile.depend | 2 -- sbin/pflowctl/Makefile.depend | 15 ++++++++++ sbin/ping/tests/Makefile.depend | 15 ++++++++++ sbin/route/Makefile.depend | 1 + sbin/route/tests/Makefile.depend | 10 +++++++ secure/lib/libssl/Makefile.depend | 1 - targets/pseudo/bootstrap-packages/Makefile.depend | 5 ++++ usr.bin/asa/tests/Makefile.depend | 10 +++++++ usr.bin/awk/tests/bugs-fixed/Makefile.depend | 10 +++++++ usr.bin/awk/tests/netbsd/Makefile.depend | 10 +++++++ usr.bin/bsdcat/tests/Makefile.depend | 9 ------ usr.bin/caesar/Makefile.depend | 1 - usr.bin/clang/clang-tblgen/Makefile.depend.host | 1 + usr.bin/clang/lldb-server/Makefile.depend | 32 ++++++++++++++++++++++ usr.bin/clang/llvm-min-tblgen/Makefile.depend.host | 1 + usr.bin/clang/llvm-tblgen/Makefile.depend.host | 1 + usr.bin/cpio/tests/Makefile.depend | 9 ------ usr.bin/dc/tests/Makefile.depend | 10 +++++++ usr.bin/du/Makefile.depend | 1 + usr.bin/env/tests/Makefile.depend | 10 +++++++ usr.bin/file/tests/Makefile.depend | 10 +++++++ usr.bin/gh-bc/tests/Makefile.depend | 10 +++++++ usr.bin/grdc/Makefile.depend | 4 +-- usr.bin/head/tests/Makefile.depend | 10 +++++++ usr.bin/kyua/Makefile.depend | 23 ++++++++++++++++ usr.bin/locale/tests/Makefile.depend | 10 +++++++ usr.bin/lockf/tests/Makefile.depend | 10 +++++++ usr.bin/lorder/tests/Makefile.depend | 10 +++++++ usr.bin/mktemp/tests/Makefile.depend | 10 +++++++ usr.bin/ncurses/Makefile.depend | 17 ++++++++++++ usr.bin/objcopy/Makefile.depend | 7 ----- usr.bin/ofed/librdmacm/mckey/Makefile.depend | 24 ++++++++++++++++ usr.bin/ofed/librdmacm/rping/Makefile.depend | 23 ++++++++++++++++ usr.bin/ofed/librdmacm/ucmatose/Makefile.depend | 23 ++++++++++++++++ usr.bin/ofed/librdmacm/udaddy/Makefile.depend | 23 ++++++++++++++++ usr.bin/patch/tests/Makefile.depend | 10 +++++++ usr.bin/pom/Makefile.depend | 2 +- usr.bin/printenv/tests/Makefile.depend | 10 +++++++ usr.bin/seq/tests/Makefile.depend | 10 +++++++ usr.bin/sort/tests/Makefile.depend | 10 +++++++ usr.bin/split/tests/Makefile.depend | 10 +++++++ usr.bin/tar/tests/Makefile.depend | 9 ------ usr.bin/tftp/tests/Makefile.depend | 10 +++++++ usr.bin/touch/tests/Makefile.depend | 10 +++++++ usr.bin/tsort/tests/Makefile.depend | 10 +++++++ usr.bin/unifdef/tests/Makefile.depend | 10 +++++++ usr.bin/unzip/tests/Makefile.depend | 9 ------ usr.bin/vmstat/tests/Makefile.depend | 10 +++++++ usr.bin/wc/tests/Makefile.depend | 10 +++++++ usr.sbin/apmd/Makefile.depend | 2 ++ usr.sbin/bhyve/gdb/Makefile.depend | 10 +++++++ usr.sbin/bhyveload/Makefile.depend | 2 ++ .../bluetooth/bluetooth-config/Makefile.depend | 10 +++++++ usr.sbin/bsdinstall/distextract/Makefile.depend | 2 +- usr.sbin/bsdinstall/distfetch/Makefile.depend | 2 +- usr.sbin/bsdinstall/partedit/Makefile.depend | 2 +- usr.sbin/bsdinstall/runconsoles/Makefile.depend | 15 ++++++++++ usr.sbin/certctl/Makefile.depend | 10 +++++++ usr.sbin/ctladm/tests/Makefile.depend | 10 +++++++ usr.sbin/daemon/tests/Makefile.depend | 10 +++++++ usr.sbin/efibootmgr/Makefile.depend | 17 ++++++++++++ usr.sbin/efitable/Makefile.depend | 16 +++++++++++ usr.sbin/efiwake/Makefile.depend | 15 ++++++++++ usr.sbin/fwget/Makefile.depend | 10 +++++++ usr.sbin/fwget/pci/Makefile.depend | 10 +++++++ usr.sbin/gssd/Makefile.depend | 1 + usr.sbin/jail/tests/Makefile.depend | 10 +++++++ usr.sbin/kldxref/Makefile.depend | 1 + usr.sbin/ntp/libntp/Makefile.depend | 1 + usr.sbin/ntp/libntpevent/Makefile.depend | 1 + usr.sbin/ntp/libparse/Makefile.depend | 1 + usr.sbin/nvmfd/Makefile.depend | 20 ++++++++++++++ usr.sbin/pnfsdscopymr/Makefile.depend | 16 +++++++++++ usr.sbin/pnfsdsfile/Makefile.depend | 15 ++++++++++ usr.sbin/pnfsdskill/Makefile.depend | 15 ++++++++++ usr.sbin/pw/tests/Makefile.depend | 2 -- usr.sbin/valectl/Makefile.depend | 16 +++++++++++ usr.sbin/wpa/src/crypto/Makefile.depend | 1 + 129 files changed, 909 insertions(+), 98 deletions(-) diff --git a/bin/nproc/Makefile.depend b/bin/nproc/Makefile.depend new file mode 100644 index 000000000000..93249906da4f --- /dev/null +++ b/bin/nproc/Makefile.depend @@ -0,0 +1,14 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/bin/pkill/tests/Makefile.depend b/bin/pkill/tests/Makefile.depend index 11aba52f82cf..8e1db63914e6 100644 --- a/bin/pkill/tests/Makefile.depend +++ b/bin/pkill/tests/Makefile.depend @@ -1,6 +1,9 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ .include diff --git a/bin/sh/Makefile.depend b/bin/sh/Makefile.depend index 17be3d459f0c..9c93cdde3624 100644 --- a/bin/sh/Makefile.depend +++ b/bin/sh/Makefile.depend @@ -8,7 +8,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libedit \ - usr.bin/awk.host \ .include diff --git a/bin/sleep/Makefile.depend b/bin/sleep/Makefile.depend index 38d979787478..866f7ef5d25b 100644 --- a/bin/sleep/Makefile.depend +++ b/bin/sleep/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ lib/libcapsicum \ lib/libcasper/libcasper \ lib/libcompiler_rt \ + lib/msun \ .include diff --git a/include/Makefile.depend b/include/Makefile.depend index 346d718d8511..d04576c4c409 100644 --- a/include/Makefile.depend +++ b/include/Makefile.depend @@ -2,8 +2,6 @@ DIRDEPS = \ bin/sh.host \ - usr.bin/awk.host \ - usr.bin/xinstall.host \ .include diff --git a/include/ssp/Makefile.depend b/include/ssp/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/include/ssp/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/lib/atf/libatf-c++/tests/Makefile.depend b/lib/atf/libatf-c++/tests/Makefile.depend index e9c46a0b722a..7886e7624456 100644 --- a/lib/atf/libatf-c++/tests/Makefile.depend +++ b/lib/atf/libatf-c++/tests/Makefile.depend @@ -1,7 +1,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ diff --git a/lib/atf/libatf-c/tests/Makefile.depend b/lib/atf/libatf-c/tests/Makefile.depend index 1af0c88e099c..462a1562f495 100644 --- a/lib/atf/libatf-c/tests/Makefile.depend +++ b/lib/atf/libatf-c/tests/Makefile.depend @@ -1,7 +1,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ diff --git a/lib/geom/union/Makefile.depend b/lib/geom/union/Makefile.depend index d07a313ea118..0dd05cace3c0 100644 --- a/lib/geom/union/Makefile.depend +++ b/lib/geom/union/Makefile.depend @@ -1,14 +1,12 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ lib/libgeom \ - sbin/geom/core \ .include diff --git a/lib/libbe/tests/Makefile.depend b/lib/libbe/tests/Makefile.depend new file mode 100644 index 000000000000..670634e1722a --- /dev/null +++ b/lib/libbe/tests/Makefile.depend @@ -0,0 +1,17 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + cddl/lib/libnvpair \ + cddl/lib/libspl \ + cddl/lib/libzfs \ + lib/${CSU_DIR} \ + lib/libbe \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/lib/libbsddialog/Makefile.depend b/lib/libbsddialog/Makefile.depend index e61d93449db1..04dbb4f44313 100644 --- a/lib/libbsddialog/Makefile.depend +++ b/lib/libbsddialog/Makefile.depend @@ -6,7 +6,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/ncurses/form \ lib/ncurses/ncurses \ lib/ncurses/tinfo \ diff --git a/lib/libc++experimental/Makefile.depend b/lib/libc++experimental/Makefile.depend index ecc8fe860f5e..11aba52f82cf 100644 --- a/lib/libc++experimental/Makefile.depend +++ b/lib/libc++experimental/Makefile.depend @@ -1,9 +1,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - include \ - include/xlocale \ - lib/msun \ .include diff --git a/lib/libc/Makefile.depend b/lib/libc/Makefile.depend index fc708c6794b9..d2cb630c1bc2 100644 --- a/lib/libc/Makefile.depend +++ b/lib/libc/Makefile.depend @@ -7,7 +7,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libcompiler_rt \ lib/libsys \ - usr.bin/awk.host \ usr.bin/yacc.host \ diff --git a/lib/libcbor/Makefile.depend b/lib/libcbor/Makefile.depend new file mode 100644 index 000000000000..9add648af17b --- /dev/null +++ b/lib/libcbor/Makefile.depend @@ -0,0 +1,16 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/lib/libdl/Makefile.depend b/lib/libdl/Makefile.depend index 6ef78fac5cbf..e0d18fcef3a4 100644 --- a/lib/libdl/Makefile.depend +++ b/lib/libdl/Makefile.depend @@ -6,6 +6,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libsys \ .include diff --git a/lib/libedit/Makefile.depend b/lib/libedit/Makefile.depend index b9e2f5783b84..c6788a7857d3 100644 --- a/lib/libedit/Makefile.depend +++ b/lib/libedit/Makefile.depend @@ -8,7 +8,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/ncurses/tinfo \ - usr.bin/awk.host \ .include diff --git a/lib/libfido2/Makefile.depend b/lib/libfido2/Makefile.depend new file mode 100644 index 000000000000..3c28a8a51e2d --- /dev/null +++ b/lib/libfido2/Makefile.depend @@ -0,0 +1,17 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libz \ + secure/lib/libcrypto \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/lib/libgcc_s/Makefile.depend b/lib/libgcc_s/Makefile.depend index ae1125555d77..77f8f90c31c3 100644 --- a/lib/libgcc_s/Makefile.depend +++ b/lib/libgcc_s/Makefile.depend @@ -5,7 +5,6 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - usr.bin/awk.host \ .include diff --git a/lib/libipt/Makefile.depend b/lib/libipt/Makefile.depend new file mode 100644 index 000000000000..6ef78fac5cbf --- /dev/null +++ b/lib/libipt/Makefile.depend @@ -0,0 +1,15 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/lib/liblzma/Makefile.depend b/lib/liblzma/Makefile.depend index b5c5616d53c7..c6f50333f539 100644 --- a/lib/liblzma/Makefile.depend +++ b/lib/liblzma/Makefile.depend @@ -8,7 +8,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libmd \ lib/libthr \ - usr.bin/awk.host \ .include diff --git a/lib/libmagic/Makefile.depend b/lib/libmagic/Makefile.depend index 23d04fd83cf1..7bd9e2ca9bef 100644 --- a/lib/libmagic/Makefile.depend +++ b/lib/libmagic/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libmagic.host \ lib/libz \ + lib/msun \ .include diff --git a/lib/libnetmap/Makefile.depend b/lib/libnetmap/Makefile.depend new file mode 100644 index 000000000000..6ef78fac5cbf --- /dev/null +++ b/lib/libnetmap/Makefile.depend @@ -0,0 +1,15 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/lib/libnvmf/Makefile.depend b/lib/libnvmf/Makefile.depend new file mode 100644 index 000000000000..15a1f9c07f7c --- /dev/null +++ b/lib/libnvmf/Makefile.depend @@ -0,0 +1,12 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/lib/libregex/Makefile.depend b/lib/libregex/Makefile.depend index 40575a605e97..6ef78fac5cbf 100644 --- a/lib/libregex/Makefile.depend +++ b/lib/libregex/Makefile.depend @@ -6,7 +6,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/awk.host \ .include diff --git a/lib/librt/Makefile.depend b/lib/librt/Makefile.depend index 577dc5747f1e..9ae14bd71d4f 100644 --- a/lib/librt/Makefile.depend +++ b/lib/librt/Makefile.depend @@ -6,6 +6,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libsys \ lib/libthr \ diff --git a/lib/libsmutil/Makefile.depend b/lib/libsmutil/Makefile.depend index f2b0559818dd..f527c2585bed 100644 --- a/lib/libsmutil/Makefile.depend +++ b/lib/libsmutil/Makefile.depend @@ -4,6 +4,7 @@ DIRDEPS = \ include \ include/arpa \ include/xlocale \ + secure/lib/libcrypto \ .include diff --git a/lib/libssp/Makefile.depend b/lib/libssp/Makefile.depend index 6ef78fac5cbf..9e22de8ed182 100644 --- a/lib/libssp/Makefile.depend +++ b/lib/libssp/Makefile.depend @@ -2,10 +2,12 @@ DIRDEPS = \ include \ + include/ssp \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libsys \ .include diff --git a/lib/libsys/Makefile.depend b/lib/libsys/Makefile.depend index b623a86fc1ce..fcba9c64f270 100644 --- a/lib/libsys/Makefile.depend +++ b/lib/libsys/Makefile.depend @@ -5,7 +5,6 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libcompiler_rt \ - usr.bin/awk.host \ .include diff --git a/lib/libthr/Makefile.depend b/lib/libthr/Makefile.depend index 2f0697372a4a..e0d18fcef3a4 100644 --- a/lib/libthr/Makefile.depend +++ b/lib/libthr/Makefile.depend @@ -7,7 +7,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libsys \ - usr.bin/awk.host \ .include diff --git a/lib/libxo/encoder/csv/Makefile.depend b/lib/libxo/encoder/csv/Makefile.depend index 6ef78fac5cbf..b915f0b12d3b 100644 --- a/lib/libxo/encoder/csv/Makefile.depend +++ b/lib/libxo/encoder/csv/Makefile.depend @@ -6,6 +6,8 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libutil \ + lib/libxo/libxo \ .include diff --git a/lib/libxo/tests/Makefile.depend b/lib/libxo/tests/Makefile.depend index 1032566579a2..5d2f1f63e4fc 100644 --- a/lib/libxo/tests/Makefile.depend +++ b/lib/libxo/tests/Makefile.depend @@ -1,14 +1,11 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ lib/libutil \ - lib/libxo \ + lib/libxo/libxo \ .include diff --git a/lib/libxo/tests/encoder/Makefile.depend b/lib/libxo/tests/encoder/Makefile.depend index 07e2f00360c2..b95024e29443 100644 --- a/lib/libxo/tests/encoder/Makefile.depend +++ b/lib/libxo/tests/encoder/Makefile.depend @@ -1,12 +1,12 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ + include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libxo \ + lib/libxo/libxo \ .include diff --git a/lib/libz/Makefile.depend b/lib/libz/Makefile.depend index 40575a605e97..6ef78fac5cbf 100644 --- a/lib/libz/Makefile.depend +++ b/lib/libz/Makefile.depend @@ -6,7 +6,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/awk.host \ .include diff --git a/lib/msun/Makefile.depend b/lib/msun/Makefile.depend index 40575a605e97..6ef78fac5cbf 100644 --- a/lib/msun/Makefile.depend +++ b/lib/msun/Makefile.depend @@ -6,7 +6,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/awk.host \ .include diff --git a/lib/ncurses/form/Makefile.depend b/lib/ncurses/form/Makefile.depend index 04dbb4f44313..534afd77673d 100644 --- a/lib/ncurses/form/Makefile.depend +++ b/lib/ncurses/form/Makefile.depend @@ -1,6 +1,7 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + bin/sh.host \ include \ include/xlocale \ lib/${CSU_DIR} \ diff --git a/lib/ncurses/ncurses/Makefile.depend b/lib/ncurses/ncurses/Makefile.depend index b9e2f5783b84..c6788a7857d3 100644 --- a/lib/ncurses/ncurses/Makefile.depend +++ b/lib/ncurses/ncurses/Makefile.depend @@ -8,7 +8,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/ncurses/tinfo \ - usr.bin/awk.host \ .include diff --git a/lib/ncurses/panel/Makefile.depend b/lib/ncurses/panel/Makefile.depend index bafa0452da91..534afd77673d 100644 --- a/lib/ncurses/panel/Makefile.depend +++ b/lib/ncurses/panel/Makefile.depend @@ -9,7 +9,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/ncurses/ncurses \ lib/ncurses/tinfo \ - usr.bin/awk.host \ .include diff --git a/lib/ncurses/tinfo/Makefile.depend b/lib/ncurses/tinfo/Makefile.depend index 2be5fb18fb00..996a149f6041 100644 --- a/lib/ncurses/tinfo/Makefile.depend +++ b/lib/ncurses/tinfo/Makefile.depend @@ -8,7 +8,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/ncurses/tinfo.host \ - usr.bin/awk.host \ .include diff --git a/lib/ofed/libirdma/Makefile.depend b/lib/ofed/libirdma/Makefile.depend new file mode 100644 index 000000000000..a13ef992ecf9 --- /dev/null +++ b/lib/ofed/libirdma/Makefile.depend @@ -0,0 +1,18 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libthr \ + lib/ofed/include \ + lib/ofed/libibverbs \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/libexec/atf/atf-pytest-wrapper/Makefile.depend b/libexec/atf/atf-pytest-wrapper/Makefile.depend new file mode 100644 index 000000000000..76a8d2cdc8ca --- /dev/null +++ b/libexec/atf/atf-pytest-wrapper/Makefile.depend @@ -0,0 +1,18 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libc++ \ + lib/libcompiler_rt \ + lib/libcxxrt \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/libexec/nuageinit/Makefile.depend b/libexec/nuageinit/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/libexec/nuageinit/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/libexec/nuageinit/tests/Makefile.depend b/libexec/nuageinit/tests/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/libexec/nuageinit/tests/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/libexec/rtld-elf/Makefile.depend b/libexec/rtld-elf/Makefile.depend index af61cd6d0584..bcfe960e8abe 100644 --- a/libexec/rtld-elf/Makefile.depend +++ b/libexec/rtld-elf/Makefile.depend @@ -2,6 +2,7 @@ DIRDEPS = \ include \ + include/ssp \ include/xlocale \ lib/libc \ lib/libcompiler_rt \ diff --git a/sbin/bectl/Makefile.depend b/sbin/bectl/Makefile.depend index f04ca630e059..bcc4f32f88da 100644 --- a/sbin/bectl/Makefile.depend +++ b/sbin/bectl/Makefile.depend @@ -1,28 +1,17 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - cddl/lib/libavl \ cddl/lib/libnvpair \ cddl/lib/libspl \ - cddl/lib/libumem \ - cddl/lib/libuutil \ - cddl/lib/libzfs \ - cddl/lib/libzfs_core \ + cddl/lib/libzfsbootenv \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libbe \ lib/libc \ lib/libcompiler_rt \ - lib/libexpat \ - lib/libgeom \ lib/libjail \ - lib/libmd \ - lib/libsbuf \ - lib/libthr \ lib/libutil \ - lib/libz \ - lib/msun \ .include diff --git a/sbin/bectl/tests/Makefile.depend b/sbin/bectl/tests/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/sbin/bectl/tests/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/sbin/camcontrol/Makefile.depend b/sbin/camcontrol/Makefile.depend index 0ef6390836dd..bef65a3c03d5 100644 --- a/sbin/camcontrol/Makefile.depend +++ b/sbin/camcontrol/Makefile.depend @@ -7,6 +7,7 @@ DIRDEPS = \ lib/libc \ lib/libcam \ lib/libcompiler_rt \ + lib/libnvmf \ lib/libsbuf \ lib/libutil \ diff --git a/sbin/geom/Makefile.depend b/sbin/geom/Makefile.depend index 082d59a0b0f6..08cfc713d335 100644 --- a/sbin/geom/Makefile.depend +++ b/sbin/geom/Makefile.depend @@ -6,9 +6,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libexpat \ lib/libgeom \ - lib/libsbuf \ lib/libutil \ diff --git a/sbin/md5/Makefile.depend b/sbin/md5/Makefile.depend index e442dca35596..61733f6b057b 100644 --- a/sbin/md5/Makefile.depend +++ b/sbin/md5/Makefile.depend @@ -7,6 +7,7 @@ DIRDEPS = \ lib/libc \ lib/libcapsicum \ lib/libcasper/libcasper \ + lib/libcasper/services/cap_fileargs \ lib/libcompiler_rt \ lib/libmd \ diff --git a/sbin/md5/tests/Makefile.depend b/sbin/md5/tests/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/sbin/md5/tests/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/sbin/nvmecontrol/Makefile.depend b/sbin/nvmecontrol/Makefile.depend index 678747db6f2c..4eaed14a78cc 100644 --- a/sbin/nvmecontrol/Makefile.depend +++ b/sbin/nvmecontrol/Makefile.depend @@ -6,6 +6,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libnvmf \ lib/libutil \ diff --git a/sbin/nvmecontrol/tests/Makefile.depend b/sbin/nvmecontrol/tests/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/sbin/nvmecontrol/tests/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/sbin/pfctl/tests/Makefile.depend b/sbin/pfctl/tests/Makefile.depend index 74196cedd525..a59dba5bf1aa 100644 --- a/sbin/pfctl/tests/Makefile.depend +++ b/sbin/pfctl/tests/Makefile.depend @@ -1,8 +1,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - include \ - include/xlocale \ lib/${CSU_DIR} \ lib/atf/libatf-c \ lib/libc \ diff --git a/sbin/pflowctl/Makefile.depend b/sbin/pflowctl/Makefile.depend new file mode 100644 index 000000000000..6ef78fac5cbf --- /dev/null +++ b/sbin/pflowctl/Makefile.depend @@ -0,0 +1,15 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/sbin/ping/tests/Makefile.depend b/sbin/ping/tests/Makefile.depend new file mode 100644 index 000000000000..b372e6d58e9f --- /dev/null +++ b/sbin/ping/tests/Makefile.depend @@ -0,0 +1,15 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + lib/${CSU_DIR} \ + lib/atf/libatf-c \ + lib/libc \ + lib/libcompiler_rt \ + sbin/ping \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/sbin/route/Makefile.depend b/sbin/route/Makefile.depend index 344a5d0e9310..672ec75190c6 100644 --- a/sbin/route/Makefile.depend *** 1319 LINES SKIPPED *** From nobody Mon Oct 14 17:31:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XS45k54FHz5Yt14; Mon, 14 Oct 2024 17:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS45k2YXrz4dQK; Mon, 14 Oct 2024 17:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728927082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AJ9BFbbKWhDzs4V2BRmPZzYu8Uj6R1w+OI2iWZZQcqU=; b=E8JZ59D3jx8uUAEDO6m+ervVWoBZuK1SC3JnpDFc9n4B6xxb9gBPQgzlz02bzL6udsm+ma X86qB1/2e7tRpn8BKAljf2wJq0fOWIWC2XkZ+0TzpCbLs+MyDlzUnIWpzIcFSYSjizcnZ2 A1EFBfWxgFdkFHs351opyDb4JZsZVTZw3QJH2X8/hBnN9dMY4OGjtpxf/yTq2ESvrpms4a QJmoe68LUczf+CbdrHjzRsHVgxRRhS4VCgJ9Vas1FKtk5VNTUJm4B1u/MAmGdm1Gqm0cYI GdlGB9mlN3DyiCF21E0DEU1UG2vfujDIJMEzBaOFq+yXHSeHSRk4gGspLPXiQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728927082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AJ9BFbbKWhDzs4V2BRmPZzYu8Uj6R1w+OI2iWZZQcqU=; b=dQs+Z6X/4atT41Zo0xv3ptDTTQiAJpsjmpRXbWXG3dM/j7BiX7QYyO2WrsrxJ7kOFXBByg lcmVYR+evKJZ6qEJe2i7X6J6Nlq8HNVH/mh77GfPD0FPuzaUxAkvR0cUuLHPRq211Zc6Ds cyT4VkS6d0P4F2yS9kBVX9PMZhAn1DIbP1Sy7MRwzemHKX3bgytzVKxw+7VLYLZJq3KTNq QzEFGhsmRcLIQNvrF7txKqJLTJE7ORAU8gnqiv/2wKghyS6KRUma7Yh7/8WJ1AFcVcnoEL YUzHbVrWJvpcQpwfR5Yq8lrEaDbB9oo162g+q/1HKjElvfs6R5IKxbMMwlfMww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728927082; a=rsa-sha256; cv=none; b=pByb4OVaHdByGuUdU7tDwm09UzqjWpZYaRB0HDUMjQXlih1MaL7KRBdmkGS1BKIFK0lFQb 2VXjWdGoZX/ohgWEH/sxmpOt139gxPMytgbBfce/m9Rmk5i4vAS1K5Fmgo2NL/3Q2x2G4D aWSuquvagn7KGPkRUTHCGOSwaFK/T7w/SdtxygEP9ON3UICF9b/tilwsCnm4oRVcRr2nmi FJjrW2XbqKmK+LqDQkBxCO7gYPf+wtR+mXTXZ5qxSScW13+OZ78R65wcMW8/WiBZ+XdJ1a jS9H8Mntai8ARYs17D/jrKyxoypwj+Pwkx6zU0DUg+Zuus0cLbL1v5mVcwIPwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS45k29nczmpm; Mon, 14 Oct 2024 17:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EHVMED093097; Mon, 14 Oct 2024 17:31:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EHVMmU093094; Mon, 14 Oct 2024 17:31:22 GMT (envelope-from git) Date: Mon, 14 Oct 2024 17:31:22 GMT Message-Id: <202410141731.49EHVMmU093094@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 498dac0ace44 - main - Update dirdeps.mk for better debug output List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 498dac0ace44a3ba9eec36ac3a872d5047811a31 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=498dac0ace44a3ba9eec36ac3a872d5047811a31 commit 498dac0ace44a3ba9eec36ac3a872d5047811a31 Author: Simon J. Gerraty AuthorDate: 2024-10-14 17:30:39 +0000 Commit: Simon J. Gerraty CommitDate: 2024-10-14 17:30:39 +0000 Update dirdeps.mk for better debug output Latest dirdeps.mk provides better clue as to which makefile is being read for a given DIRDEP. Reviewed by: stevek --- share/mk/dirdeps.mk | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk index 2a9d2ac92102..80720a7ca225 100644 --- a/share/mk/dirdeps.mk +++ b/share/mk/dirdeps.mk @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.170 2024/06/24 02:21:00 sjg Exp $ +# $Id: dirdeps.mk,v 1.171 2024/09/30 21:21:25 sjg Exp $ # SPDX-License-Identifier: BSD-2-Clause # @@ -887,16 +887,13 @@ _m := ${.MAKE.DEPENDFILE_PREFERENCE:T:S;${TARGET_SPEC}$;${d:E};:C;${MACHINE}((,. .if !empty(_m) # M_dep_qual_fixes isn't geared to Makefile.depend _qm := ${_m:C;(\.depend)$;\1.${d:E};:${M_dep_qual_fixes.${d:E}:U${M_dep_qual_fixes}:ts:}} -.if ${_debug_search} -.info Looking for ${_qm} -.endif # set this "just in case" # we can skip :tA since we computed the path above DEP_RELDIR := ${_m:H:S,^${SRCTOP}/,,} # and reset this DIRDEPS = -.if ${_debug_reldir} && ${_qm} != ${_m} -.info loading ${_m:S,${SRCTOP}/,,} for ${_dr} +.if ${_debug_search} || ${_debug_reldir} +.info Loading ${_m:S,${SRCTOP}/,,} for ${_dr} .endif .include <${_m}> .else From nobody Mon Oct 14 17:44: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 4XS4P02Hhcz5Ytyq; Mon, 14 Oct 2024 17:44:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS4P01lcvz4hT2; Mon, 14 Oct 2024 17:44:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728927876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//KLNHnRH0OA6D81UWGAvTPbQG7eAKsj6ab2nPR7UcI=; b=H77JHGUOIULA7pHvvwzyJnxhdtPn32muzWFGXqrtXdR97E3WQ0jkBUJC+8sdO/1fAOxJaN TNRSTc8slhqb1IzwIGJG4YOHQ2nu38tz4NnS7OnmHXTwSO3snGBIaxFaUxOY2ArD0H+VYa Tuzbe3zr09BXa3c8UT7tmhpCOpHnBBFGoiKR93UKN+5D42r8M72Ww7ziE6arkLr/lKBjMU dJ5eQz0fGAOVELNzEiLwfdLiRok0BlxFR3k9v7ZE7LlISPu8xCBKjga0bcATELYRTE5vtM fYkl7fNW5tncJWwpDVCaCythjPuIsPmoANBWmdaXkfCrY7GX2bWCKB19CMy4pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728927876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//KLNHnRH0OA6D81UWGAvTPbQG7eAKsj6ab2nPR7UcI=; b=Zd4zYZQBGeWyFDdVbUpeT2E4UFU6hIu59rJc+CY2Vkeo6Qwtjunmq0hInIYaTQqys8og2B U3X1kvtKlN5vlpy79MFAp8aFvUGSzmMSAZmXomM6bkr6o8u5QmZooQ4/ixnKIa0CUE8SPZ IefjdG3GmCxL3Ipxx/vxzIYphW6QtJff/Te5uFsr3hyQPfcGvaCBYLlNYi6vHmIxa4X0VJ FvdtRmER6GUJUmEEEaH5OQF3fjLYZCWQorHl34OuQkLh998C7nE6raSDl329Ub5575uevQ V3bBmdhUGmyHe8rbdivntN1ZhIcjfe1PzhXo/2GoBFfqA1ERVp8U/5gqtFHssw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728927876; a=rsa-sha256; cv=none; b=MhfcjxJhv85eFPxrXNXk4jbuzlfDETKAHCX/yRhtUZbQ3zNN6rqoOjOyHdjiqDTtMElAcT vr2lNB/MtC+8ASNzaAkUlcO2i/i89EoW/k82MwBS6WC9+88C8o7tHORe/nJ8EeLwOhj6Zb 5Zzdb89A2i5t24A7uQ/JKihWRlqi7xeQEQWFps6ENofXTiYSMPAZgbCAcr12r51AVzEHml hxA+nmo1S7kyVDgV0f8XoGCLw4/Wrf8ZSgnIpChuQplDKWSDsZEr9pz8YlHjPV2xdKwLGN yOCxX9wluKmJIJNXZlHTi19qOizw7TmP5qCtqyij7jYG8P4NIwm3/gddrdlwEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS4P01Mthzncv; Mon, 14 Oct 2024 17:44:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EHiaLW015572; Mon, 14 Oct 2024 17:44:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EHia8n015569; Mon, 14 Oct 2024 17:44:36 GMT (envelope-from git) Date: Mon, 14 Oct 2024 17:44:36 GMT Message-Id: <202410141744.49EHia8n015569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e69e172d4058 - main - dpaa2: allow tapping of tx packets in dpni List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e69e172d40585cfbcfdb28433cec523ca4867cf1 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e69e172d40585cfbcfdb28433cec523ca4867cf1 commit e69e172d40585cfbcfdb28433cec523ca4867cf1 Author: Bjoern A. Zeeb AuthorDate: 2024-10-13 23:14:35 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-14 17:41:35 +0000 dpaa2: allow tapping of tx packets in dpni Packet capturing on dpni is only half-working given the BPF_MTAP call in the TX path is missing. Add it to see packets in both directions. MFC after: 3 days Reviewed by: dsl Differential Revision: https://reviews.freebsd.org/D47103 --- sys/dev/dpaa2/dpaa2_ni.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 622e63626bfe..698b440376e3 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -2936,6 +2936,8 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, KASSERT(btx->fq->chan == ch, ("%s: unexpected channel", __func__)); #endif /* INVARIANTS */ + BPF_MTAP(sc->ifp, m); + error = bus_dmamap_load_mbuf_sg(buf->dmat, buf->dmap, m, segs, &nsegs, BUS_DMA_NOWAIT); if (__predict_false(error != 0)) { From nobody Mon Oct 14 17:46:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XS4Rc0WvHz5YvGX; Mon, 14 Oct 2024 17:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS4Rb6V1Cz4jDN; Mon, 14 Oct 2024 17:46:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728928011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DwzxzRp8MsoalLz+UBkb6NqKUSQ0K0WmDWn0AxzUUis=; b=gVEEpjOZ/7BU1cnXPWa5aDt9uu2WdFA3EZ51wJFGUJUAEnHOLYyvYi/i0tFHmhIXnq/oeR FMl/0UIu1gZdv+IfB94I9pWrS2UkSPNDaPdJQS0AJWKrqDnBopEkWlk/UZTaJoEfDoCcxI u1BUGThkhInYrJKG+BubPRoj7/gaDbwVrLuuFMsr4WiEo/YLBVYH+EUskqoPUt9ytlpfpx TExRiwQUvBKW+yR13VD/zxkMxrPUkG2HxZxPbzrkHTptcnSe9OcleYiqIA+UQnkHK5Cbpt tkX5hi9+V+6Pz5hf5QQYnLKz+VvvLj7qzCGOVG3KweuVjZkNg/orYxcq/RvHtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728928011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DwzxzRp8MsoalLz+UBkb6NqKUSQ0K0WmDWn0AxzUUis=; b=JtawnA7BAzHDhvhcrTjmlADDiM8rMT5cpS86x3MGWAAkWA6JxyGLtVO8L78gUQuVujPpAj lK1hohWtWDbV0VswJqbYQxSBE9rGoKZ2BLq5SL4mZyGZdstHUZzZZpj8vXP65IkPL03M9+ +OpCGB082QrcsJqSJopA7siCFlQwmwmQCQp2rmuR/NjcAWhcVugF/K+zhgGB3UBpDEK+3/ ysGhntCMZUpBVMMp2HOK7Sv35fHb9gji/2d91z70u++aRxztNASH7nA9UNJWvRxy2nXmWQ Rz9GFM752pgFIGcs5nG03/jriweOU+6yaJtXYQreAPnGi3wfxgTQizLUQuGeXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728928011; a=rsa-sha256; cv=none; b=aEeuFyG2dH3PQuN4WAgrKAIkHTwsWh9Z6Y49xLD/ovIrc8Wca6nJZvWq+AcRONo//A2VgF 125GVnm34bPWediEjHkdYBrZVH0nbflHUS0SIq5d9fsQDqEeLm9+CX8Y9k8BekZTDIlZLP yeqHikJhlpiogH84aAmll3VXJROUdIuzmqXaSt1raK/aXobmY0lCHwXBwkcykwMGL5Z6uB 0FepvkxulZB/9eiSlcG79I5KADOuZoUyw98i7qWWfc+/FL4h2RB6VGCkcvXesFDbuJZaL6 AlF7MP53K3L3c9XELU2kkgMTMWxJe3KWgpTtEvy4T+lesvsf8fBnT65fbeyS8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS4Rb65cpznKw; Mon, 14 Oct 2024 17:46:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EHkpjm016150; Mon, 14 Oct 2024 17:46:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EHkpQD016147; Mon, 14 Oct 2024 17:46:51 GMT (envelope-from git) Date: Mon, 14 Oct 2024 17:46:51 GMT Message-Id: <202410141746.49EHkpQD016147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: fa81baa307da - main - LinuxKPI: add cleanup.h for guard DEFINE_GUARD/guard. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa81baa307da9a0055d7d08f6d141ea310f067ed Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fa81baa307da9a0055d7d08f6d141ea310f067ed commit fa81baa307da9a0055d7d08f6d141ea310f067ed Author: Bjoern A. Zeeb AuthorDate: 2024-09-28 22:38:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-14 17:45:42 +0000 LinuxKPI: add cleanup.h for guard DEFINE_GUARD/guard. iwlwifi v6.11 started to use guard(). _T in the implementation needs to be exposed to the driver which uses it in DEFINE_GUARD(). Given this is the first instance of attribute(cleanup) in the tree: - gcc has support for it since at least 2003-06-04 (0bfa5f65bfb186f10d43304946fd7fcd69988732) - llvm gained support on 2009-01-31 (d277d790e0f6f23043397ba919619b5c3e157ff3, llvm-svn 63462). Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46843 --- sys/compat/linuxkpi/common/include/linux/cleanup.h | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/cleanup.h b/sys/compat/linuxkpi/common/include/linux/cleanup.h new file mode 100644 index 000000000000..01f234f0cbe7 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/cleanup.h @@ -0,0 +1,46 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software was developed by Björn Zeeb under sponsorship from + * the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_CLEANUP_H +#define _LINUXKPI_LINUX_CLEANUP_H + +#define __cleanup(_f) __attribute__((__cleanup__(_f))) + +/* + * Note: "_T" are special as they are exposed into common code for + * statements. Extra care should be taken when changing the code. + */ +#define DEFINE_GUARD(_n, _dt, _lock, _unlock) \ + \ + typedef _dt guard_ ## _n ## _t; \ + \ + static inline _dt \ + guard_ ## _n ## _create( _dt _T) \ + { \ + _dt c; \ + \ + c = ({ _lock; _T; }); \ + return (c); \ + } \ + \ + static inline void \ + guard_ ## _n ## _destroy(_dt *t) \ + { \ + _dt _T; \ + \ + _T = *t; \ + if (_T) { _unlock; }; \ + } + +/* We need to keep these calls unique. */ +#define guard(_n) \ + guard_ ## _n ## _t guard_ ## _n ## _ ## __COUNTER__ \ + __cleanup(guard_ ## _n ## _destroy) = guard_ ## _n ## _create + +#endif /* _LINUXKPI_LINUX_CLEANUP_H */ From nobody Mon Oct 14 18:35: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 4XS5Wx5JB9z5Yxly; Mon, 14 Oct 2024 18:35:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS5Wx4mqrz4n1g; Mon, 14 Oct 2024 18:35:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728930941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iHBtoMKE0UkItOowlCAyZ7uQ9pbj8gJ1HQ2x4cN2+ag=; b=HI7M2iJhD4CRpuMEciNE768pOrBrhS+hdWADHyzJn3NlZKAZna2uLWFlbAlsfrb7gTQmpj l/QT6TdHDW+capQXyQPmFaUy+oG4HcbsrIGN+V1z8+V1sMNmfJJxYZc2Rujz/yOd0gM1gL 8zCI46YVFrmuNyAKreZieX6nM96Qf/HyLtI3+McWSqzcn0+55rK+Qi2+w+cZn+7Zy8k1/r ozaEhObcMgN/Q/I2uY8s4EGr1fWS+ycA1/FxlNEGZcTD46b9vXFfHehNPJXIo4nQQL5rDS yAHmlbYNfrtGihrLyozj6uWk4BfjYn6QliFGh3aQflBf/xiyj0d7zuLhfaEUfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728930941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iHBtoMKE0UkItOowlCAyZ7uQ9pbj8gJ1HQ2x4cN2+ag=; b=dklwYEJfsNwI5Zfv9K8DPmLpf/ZJ1okXV8iLjVZ4ytvkJ057ktm/uUeglV8o8/H5zAz/rN qH9Z/5Y/uIP/051dW4LL/GMQAEYaAelzYnNybE+pG061vX61a3P0floDRU4DjUKHCdaWBH 4xrHVtdeGVTeiXedCJpQ1rVxhEADbHu5PsRZZp3RQoY2tvaPhGnEuUWrGmWYeapG9EDHKM LCigwMCevirJB3gC+UVD+8LPsUu486VAm4ULfh06Ct3r8Cor0hfDBzau2FGC+CXpiGRifo rgh7qL5VU8mzS7MQ8/nkaIYaSIhNnpw3UK7iTyVGoKl0/QW1uCrJutFMm/fRoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728930941; a=rsa-sha256; cv=none; b=rv9t3IOeMeB3jfpWr1swT7PbJHEFjTFA6K1Q+0PT2jQdg1OzdvbjGbvmIFt2zIR8nZGtAX Mbyx09k+P7HEwIWi3jObMyGTEYzt/RT9b2ZLgrtdZcLFfYHB/acmjdYLlUyxiT8N4DfJ1I MukQ4s8C0GCy+WS12h6yk/bCOVceM7foqtQIl2UTXpX2UXP8SUhsHuXayaYIiCWF1x8z3r 0uc2Tr1kmh67l1G8qxd0XtoUKWniJDi5tM4tsYTd3AWwShck+VtZ5mTZ9gE+xBll3X5RVO I3ghutG7jfZ7/D00s9EwAs1pq8m33fXrYMQhTYtEbbVlCMYo1fcmFdXo3BMNIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS5Wx4NPczq3T; Mon, 14 Oct 2024 18:35:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EIZfeZ001111; Mon, 14 Oct 2024 18:35:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EIZf87001108; Mon, 14 Oct 2024 18:35:41 GMT (envelope-from git) Date: Mon, 14 Oct 2024 18:35:41 GMT Message-Id: <202410141835.49EIZf87001108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 6b135dd60753 - main - local.gendirdeps.mk skip awk and xinstall for host List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b135dd607534ff082c64ecb5bab9512e3b274f3 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6b135dd607534ff082c64ecb5bab9512e3b274f3 commit 6b135dd607534ff082c64ecb5bab9512e3b274f3 Author: Simon J. Gerraty AuthorDate: 2024-10-14 18:09:25 +0000 Commit: Simon J. Gerraty CommitDate: 2024-10-14 18:34:55 +0000 local.gendirdeps.mk skip awk and xinstall for host Do not record DIRDEPS for awk.host or xinstall.host if we ever need them they can be dealt with specially. Reviewed by: stevek --- share/mk/local.gendirdeps.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/mk/local.gendirdeps.mk b/share/mk/local.gendirdeps.mk index fcfbb24f7311..1bf2292f00b2 100644 --- a/share/mk/local.gendirdeps.mk +++ b/share/mk/local.gendirdeps.mk @@ -10,6 +10,8 @@ GENDIRDEPS_FILTER+= \ Nlib/libgcc_s \ Nstand/libsa/* \ Nstand/libsa32/* \ + Nusr.bin/awk.host \ + Nusr.bin/xinstall.host \ Ntargets/pseudo/stage* \ Ntools/* From nobody Mon Oct 14 18:35: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 4XS5Wy6cbSz5Yy11; Mon, 14 Oct 2024 18:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS5Wy60ymz4n1l; Mon, 14 Oct 2024 18:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728930942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6drLnAocvs6FixmLpAsrmWglhP6AQG7dJPGPUFesac=; b=czNx4bRkbWF+m1wMe4fWANVxnBO186hDRLKItrEqEaq+5x02uV5K1q2xpKI8iAQhYht3P/ 4M7QBhkZHxo1mp70t0hIKvB3Nz6+Ynw2kYsNCC20gH9H2i55+X+buTnO37/2UVWWyvvRV0 yMIOgNb3hSyg//uGcB1h9cPrehIVGydAhntP0JAKPclY4JSrArUZge5NXy+wAn4BValo/P y+nORJsICkAX1Tr/TzH5SQGE38GhNHERMiBUAbsNftHkTQTw5upEOLqjipb5Xo6yk3p4j/ s+Be1/EaCchMcIuqSp7tZlVUuWZ6B+beUdccHeARObeJD2mMHLGSvPKH/OjgLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728930942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6drLnAocvs6FixmLpAsrmWglhP6AQG7dJPGPUFesac=; b=kNe7MxIiMQ+GtGh4pMw/2Nclx2pjxk6Sdnc4SUFJgqQrtAZFRpfEr0p6AgsB+MjhHJ6zAS PB6b7HGuyW0ibemMA7BuGy5IokhAovvPG2sqJSNZrCIponcIcbpqB12h99kHyTGehel0pO aSw9eSX1zSmI7IJ9wwAu8mNummiWKz6yibCnWf26BIpjE2GFj+vMYi9pFMn5dC1fLVGvr2 1fUDJJI6oeKIBNWubWAHqUFS7Tj+K9X4FDn48/RBpoEqiFm6EDVE86wr8n/gcoB1ndYdug fcZsniNT/7OC8hPYWZJ3H8N7G9L5QoqqKr0UOmG1Er/WMNy5uyRZ+3b/IRfRKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728930942; a=rsa-sha256; cv=none; b=KcDSjHivP+sr7YPjxtR2hMoUjW963BXWnKCFba3yIe6MC3jhfwaLgOCtUVR8jt4QjH4LMQ mB33S7Xq1YGiTJUfgja5xuQlVhPRnw64xaaE7vwj8V6qPCpQGwBttuS9nM+vobRLpdKXqt kjUNPqHswi25Qj3KqWvIxCDvaEzlI30VxjHYz+tnnHXzQ043Y1qYbP2gcd4qwzZBbCK+A/ e3PLIUyxFOWfmclggITNU7T9oP6hXNBe32tK4Z1Svru32DxjL0ufq9Ig6SQOBnSld2hshx u3me2lxKEwKQnHZKfmlLaTanZnQKbCkv+gIdQyGOoIy93XqMx769iTcixLFdBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS5Wy5cC9zpxy; Mon, 14 Oct 2024 18:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EIZgQT001157; Mon, 14 Oct 2024 18:35:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EIZg2a001154; Mon, 14 Oct 2024 18:35:42 GMT (envelope-from git) Date: Mon, 14 Oct 2024 18:35:42 GMT Message-Id: <202410141835.49EIZg2a001154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: ad34c4d8826d - main - targets/Makefile.inc skip updates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad34c4d8826d37a81fa7789a7b2d039db6198572 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ad34c4d8826d37a81fa7789a7b2d039db6198572 commit ad34c4d8826d37a81fa7789a7b2d039db6198572 Author: Simon J. Gerraty AuthorDate: 2024-10-14 18:09:51 +0000 Commit: Simon J. Gerraty CommitDate: 2024-10-14 18:34:55 +0000 targets/Makefile.inc skip updates When PKG_METHOD is "no" or "none" we should *not* attempt to update Makefile.depend. Reviewed by: stevek --- targets/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/Makefile.inc b/targets/Makefile.inc index 6a30d2e35e89..ae147b647baf 100644 --- a/targets/Makefile.inc +++ b/targets/Makefile.inc @@ -34,7 +34,7 @@ PKG_METHOD = no .endif .endif -.if ${PKG_METHOD:Mno*} != "" +.if ${PKG_METHOD:Nno*} != "" all: ${PKG_METHOD} # set this to "no" for manual control From nobody Mon Oct 14 18:35: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 4XS5X01snZz5Yy12; Mon, 14 Oct 2024 18:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS5X000Kfz4mwk; Mon, 14 Oct 2024 18:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728930944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/AH9wq+gHUG4JE/PUEyl/sf0q9iraKOdc+fUr9tiSiM=; b=SUNLF48CkatkkoM0le8S9s6dm5o9PHRJjLdQkE4gjNxfI9MNdOjsY2sJjDFTI+Wz/R5Gon gCsdlyjqBUoMQsCiNhGUw926+VnGJVP2dj03nUQFpoeE0RujzhwLfGIK4U/F8bbSFUkBpb EeLL/Dsjhafj+VPbgWZlJYLMCaoZVnIIbvD5Q55G9hvOmtDaaO1krmv+vLnKMKtbJSHMdM j8N1YhIARmp/iAQEUojkd2eHc917TSbvxy0vb5YwTDASRvD4xIoGA9P5QqiI5pxCKRjw1s iejYtddGDqKyIxeThPEm31Ogt6W4JMs54IzdSrnuK8dE9HU2iVxrdWkY89OwXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728930944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/AH9wq+gHUG4JE/PUEyl/sf0q9iraKOdc+fUr9tiSiM=; b=FqzYIzKAfhBHKX6cyypIKYXcIS6XwTiav9G61LVnnVbvGPHH4vn8YiKtjQWqmbJwcbdVm8 8xVRZ3hhh9JbaeRjTwi9wuHN5xSSGc5pstu5lSx/g4/za13k1a3F3Q1T4LSVyzkKUqFiuE MIKtwuWQHwKemrWqROFHEG6MrlbVcFb+y86e5HvbsritJYWugEY9qETvNkunf/jMqRb6jQ fuKj+JxH6CQBZMHkyvesf3reQX5yKDibkBZokABF0b+Tj+UCeBv7JbircBojoRSAgbhwXC WNedXHDJKW1NyyFesl+YJe3eEp0trvN6MuCQNQfB+NqKwECTjikM2NHZRt7tqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728930944; a=rsa-sha256; cv=none; b=Ecvdbuerx5SVm9q+417n8S2/wTaeLjdqRiDhldjJAYSURWN/FWoalGwZcj+zNY92oIqW80 JiVLvhPFF+Hhsd2NanfxSmrVkfx4lk/o4vK1jLsYHFpV+QZu/kMjo0yahL/ez7iH/8ulfJ n3F41sSU5g2d0heqc7RrkTcSasHInP5B6Pq38OZ94ukyM/bfxF2M90HpWhJIpjl6AodNBo PIIIATdGzJJNsF38xjQgveTDHpBsBmqwWFuOjJPgswfEXVtn/gOS7P4u2GTr5+ibLydv/G 1QOe+N83xKOd3w8eeJvObUAaCrMTSiVe5yoAmBz//TYR5Yhh7EcT3HklDOFKog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS5Wz6d05zq3V; Mon, 14 Oct 2024 18:35:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EIZh0U001203; Mon, 14 Oct 2024 18:35:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EIZhal001200; Mon, 14 Oct 2024 18:35:43 GMT (envelope-from git) Date: Mon, 14 Oct 2024 18:35:43 GMT Message-Id: <202410141835.49EIZhal001200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: ec7e7ee86847 - main - local.dirdeps-targets.mk include src.opts.mk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec7e7ee868476e39980facdb0a69d9ae15e9b466 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ec7e7ee868476e39980facdb0a69d9ae15e9b466 commit ec7e7ee868476e39980facdb0a69d9ae15e9b466 Author: Simon J. Gerraty AuthorDate: 2024-10-14 18:10:41 +0000 Commit: Simon J. Gerraty CommitDate: 2024-10-14 18:34:55 +0000 local.dirdeps-targets.mk include src.opts.mk Include src.opts.mk to ensure we have options defined for when assessing dirdeps-options. Reviewed by: stevek --- share/mk/local.dirdeps-targets.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/mk/local.dirdeps-targets.mk b/share/mk/local.dirdeps-targets.mk index 00346cddeeee..d5dfc2e8a954 100644 --- a/share/mk/local.dirdeps-targets.mk +++ b/share/mk/local.dirdeps-targets.mk @@ -1,3 +1,7 @@ +.if !defined(MK_CLANG) +.include "${SRCTOP}/share/mk/src.opts.mk" +.endif + .-include <${.PARSEFILE:S/local/site/}> DIRDEPS_TARGETS_DIRS ?= targets targets/pseudo targets/packages From nobody Mon Oct 14 21:58:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSB2W63Zqz5ZDj1; Mon, 14 Oct 2024 21:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSB2W5RzXz58HT; Mon, 14 Oct 2024 21:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728943139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VKxm8pZsNj94taCTcDVdsXMUf2p0r0oJdiKNt6p3DEM=; b=KjTmXgt+vggbhTW/4rTXDFvF69b9epRBpF5oyR3jdFGE8pzwkE5PGdSMJGEEuGyvfyAk1z I3lMBIbDS41mr6xpzr0sgEmizvcbrkm6JgrGhvUMc0S6062PnFvz3ebMF6tAg6lRea12zd ZWV8NqUqvvxMMd/kAHbBQncfjFSoaw0E8SeH8aWt6l6bArV1GKrtnt6jGBzCCWnCg5wlDr z26QkZgSKzJYsdfR8Iaa+ufW9cCIYnfZH1JiZA+gjb9/kNgtXpdFFqE0NHCY8QYA+B6Ty1 NjrnfI8BtQjvsDqHCx8c4bZHBLZLss9OIsIStD9Qg1S4VzcC5PLqfkwb9WiVAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728943139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VKxm8pZsNj94taCTcDVdsXMUf2p0r0oJdiKNt6p3DEM=; b=bEgdmQLqvl1SYm22dghCmmZc4SGcx5V7Ld7BE2AzKmdbISqlB9PaNlp8a4KBd+iD6gWplP eYlrKGOxYAEaUYV54eVeIjPeEqMJIJynhwkLgUIftzbefSnp4wslAM9NLgvmRWXBR2bA5v fM7/5T6fXqQ1Mic0r6x8fy6jvoyQuBKlbYhrEZyw8TJk6LwTrY5sN6EyXT4XgXEYUgxI+w 9Y+/OS6BM3+xjMkZD1RxFon3Wye0AsdQ9sYnTCdjxUEis/QVV4ZpDQHyFYQmV3GjpcyN2H NE7Zz3D/+QJR8wT7gUp0yFyIhiAxgEkijMbu46pXS8LPLY6YG0AkaEVZgt1kxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728943139; a=rsa-sha256; cv=none; b=u3kMLmBBQfAG1d0+7ta/mhRzbV6Lbvd9FMfTGQnFF/SqErzZp5+lXae79J/6wnDPAC7fU0 OAsWyp7u0cUJYGvDImyhGtfn+a8GVZKObcwHZtH9BbI/lJE1fdF4fId1IVXoIdV3N7jwYQ w16ADzY5yPd/GCx6vw0pjhDsa7Awn0zpEsOZOsdwOoBnQA9rb/jSwADJEUcDicCYymft+U ERKxUoHqAKg26xaawKS00Bpxn2WJi93hj5pI76pnzdLHKhmJHqkZIDly2YfFdCZFdGwYJX gDH+iMhLQ+YdAFRQ8LIN3DVY/DDwlQ1yyp6f86z6H86neSiNRY2RqNdqqqQh4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSB2W4xCFzvj8; Mon, 14 Oct 2024 21:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49ELwx8a040687; Mon, 14 Oct 2024 21:58:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49ELwxpR040684; Mon, 14 Oct 2024 21:58:59 GMT (envelope-from git) Date: Mon, 14 Oct 2024 21:58:59 GMT Message-Id: <202410142158.49ELwxpR040684@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 2bdd404abe2c - main - bootstrap-packages handle optional DIRDEPS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2bdd404abe2cdf9f52ddc45202afbde637f97292 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2bdd404abe2cdf9f52ddc45202afbde637f97292 commit 2bdd404abe2cdf9f52ddc45202afbde637f97292 Author: Simon J. Gerraty AuthorDate: 2024-10-14 21:58:12 +0000 Commit: Simon J. Gerraty CommitDate: 2024-10-14 21:58:12 +0000 bootstrap-packages handle optional DIRDEPS Add logic to bootstrap-packages.sh to handle constructs like: SUBDIR.${MK_OPT}+= sub and: .if ${MK_OPT} == "yes" SUBDIR+= sub .endif there are other methods used in various makefiles so this will be better than nothing, but not complete coverage. In either case a reldir will be added to targets/packages/$package/Makefile.depend.options rather than targets/packages/$package/Makefile.depend It does not matter that in many cases the Makefile.depend will end up with no DIRDEPS. Also check that parent Makefile does not have a subdir commented out, before including it. If BOOTSTRAP_PACKAGES_FLAGS is -v we report each Makefile.depend[.options] we create. Reviewed by: stevek --- targets/pseudo/bootstrap-packages/Makefile | 3 +- .../bootstrap-packages/bootstrap-packages.sh | 134 +++++++++++++++++++-- 2 files changed, 125 insertions(+), 12 deletions(-) diff --git a/targets/pseudo/bootstrap-packages/Makefile b/targets/pseudo/bootstrap-packages/Makefile index 6523e88f84db..d3385fb1e7e0 100644 --- a/targets/pseudo/bootstrap-packages/Makefile +++ b/targets/pseudo/bootstrap-packages/Makefile @@ -13,7 +13,8 @@ all: packages PACKAGES?= ${.CURDIR:H:H}/packages packages: package-makefile.list - @${.CURDIR}/bootstrap-packages.sh PACKAGES=${PACKAGES} ${.ALLSRC} + @${.CURDIR}/bootstrap-packages.sh ${BOOTSTRAP_PACKAGES_FLAGS} \ + PACKAGES=${PACKAGES} ${.ALLSRC} package-makefile.list: @(cd ${SRCTOP} && \ diff --git a/targets/pseudo/bootstrap-packages/bootstrap-packages.sh b/targets/pseudo/bootstrap-packages/bootstrap-packages.sh index a2fe250d68a3..58b2843a9422 100755 --- a/targets/pseudo/bootstrap-packages/bootstrap-packages.sh +++ b/targets/pseudo/bootstrap-packages/bootstrap-packages.sh @@ -24,16 +24,33 @@ # and $PACKAGES/Makefile.depend to make it easier to keep # Makefile.depend files throughout the tree up-to-date. # -# The result is not ideal, as we do not (yet) take into account all -# the MK_* knobs that can impact DIRDEPS. +# We attempt to handle MK_* knobs that impact DIRDEPS, by +# identifying the intermediate *bin and *lib Makefiles and +# checking if they had a subdir for the current reldir via a construct +# like: +# +# SUBDIR.${MK_OPT}+= sub +# +# in which case we extract the option OPT and add the reldir +# to a Makefile.depend.options file in targets/packages/sub/ +# +# Of course the above is only *one* way optional SUBDIRs are handled +# in the tree. We also attempt to handle: +# +# .if ${MK_OPT} == "yes" +# SUBDIR+= sub +# .endif # Mydir=`dirname $0` +SKIP_LOG=return + while : do case "$1" in *=*) eval "$1"; shift;; + -v) SKIP_LOG=:; shift;; *) break;; esac done @@ -43,6 +60,9 @@ to_reldir() { } SRCTOP=${SRCTOP:-$(realpath $Mydir/../../..)} +. ${SRCTOP}/libexec/rc/debug.sh +DebugOn bootstrap-packages + PACKAGES=${PACKAGES:-$(realpath $Mydir/../..)} case "$PACKAGES" in /*) ;; @@ -51,9 +71,15 @@ esac script_name=$(realpath $0 | to_reldir) +log() { + $SKIP_LOG 0 + echo $1 | to_reldir >&2 +} + start_depend() { depfile=$1 + log $1 mkdir -p ${depfile%/*} cat < $depfile # Generated by $script_name @@ -63,33 +89,119 @@ EOF } end_depend() { - depfile=$1 - - cat <> $depfile + end_options $1.options + cat <> $1 .include EOF } +start_options() { + ofile=$1 + + log $1 + mkdir -p ${ofile%/*} + opts=$opt + eq== + cat < $ofile +# Generated by $script_name + +DIRDEPS_OPTIONS= $opt +EOF +} + +end_options() { + test -s $1 || return + cat <> $1 + +.include +EOF +} + +find_opt() { + mf=$1 + sub=$2 + shift 2 + case "$sub" in + *+*) sub=`echo "$sub" | sed 's,+,\\\\+,g'`;; + esac + egrep "$@" "^[^#].*[[:space:]]$sub([[:space:]]|\$)" $mf | + tr '{' '\n' | + sed -n 's,^MK_\([^}]*\).*,\1,p' | + tr '\n' ' ' +} + start_depend $PACKAGES/Makefile.depend || exit 1 sort -t= -k2 "$@" | sed 's,/Makefile:PACKAGE=, ,' | ( lpackage= while read reldir package do - case "$package" in \ - lib?{LIB}) package=${reldir##*/};; - lib?{LIB:tl}) package=`echo ${reldir##*/} | tr 'A-Z' 'a-z'`;; + # use these below + dname=${reldir%/*} + bname=${reldir##*/} + # check parent does not have it commented out + # otherwise we should ignore it. + pmf=$SRCTOP/$dname/Makefile + egrep -q "^[^#].*[[:space:]]$bname([[:space:]]|\$)" $pmf || continue + : reldir=$reldir + case "$reldir" in + *lib/*) sub=${reldir#*lib/};; + *bin/*) sub=${reldir#*bin/};; + *libexec/*) sub=${reldir#*libexec/};; + *) opt= sub=;; + esac + if [ -n "$sub" ]; then + smf=${SRCTOP}/${reldir%/$sub}/Makefile + # now we need just the immediate subdir + sub=${sub%%/*} + # SUBDIR.${MK_OPT}+= sub + opt=`find_opt $smf $sub` + # .if ${MK_OPT} == "yes" + # SUBDIR+= sub + opt=${opt:-`find_opt $smf $sub -B2`} + fi + case "$reldir" in + */tests|*/tests/*) opt=${opt:-TESTS};; + esac + # PACKAGES is set to either a simple string like 'runtime' + # or for some libraries 'lib${LIB}' + # or even 'lib${LIB:tl}' when LIB contains upper case + # the majority of libs in FreeBSD use lib${LIB} for their dirname + # but we allow for just ${LIB} too. + : package=$package + case "$package" in \ + lib?{LIB*) package=`echo lib${bname#lib} | tr 'A-Z' 'a-z'`;; esac if test "$package" != "$lpackage"; then \ test -z "$lpackage" || end_depend $ddeps target=$PACKAGES/$package - ddeps=$target/Makefile.depend - start_depend $ddeps + ddeps=$target/Makefile.depend + odeps=$ddeps.options + rm -f $odeps + start_depend $ddeps lpackage=$package echo " $target \\" fi - echo " $reldir \\" >> $ddeps + if [ -n "$opt" ]; then + [ -s $odeps ] || start_options $odeps + { + case " $opts " in + *" $opt "*) ;; + *) echo DIRDEPS_OPTIONS+= $opt + opts="$opts $opt" + eq== + ;; + esac + for o in $opt + do + echo DIRDEPS.$o.yes$eq $reldir + done + eq=+= + } >> $odeps + else + echo " $reldir \\" >> $ddeps + fi done end_depend $ddeps ) | to_reldir >> $PACKAGES/Makefile.depend From nobody Mon Oct 14 22:17: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 4XSBRv0Tm6z5ZFY6; Mon, 14 Oct 2024 22:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSBRt73bbz3x5F; Mon, 14 Oct 2024 22:17:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H61B2XWT2qhZIM/7YuGL3ogf2F8qr2dFpaEePxrL/BI=; b=ZI9HxphYH+T1aKNFL47sTyrp0pET4c9Lu+t8t/4zQt87F1Lle761eks54hgC7VtQ1q0jTE 9bMzfGZgnHWIoTRwLaJljKXqKMaz+wvbS1eJG03M+RKSrYWRrE7v4UyEdM5iMljjxevYJi EDuSfk46wJsbLjl1hwzd/THVFnxVAdC5KbFRV+/Go4pAO44YYk+OLIuX90N8VZoPz33jSb SJ5wArmtGaE+b9GzCo5UOIquxhI4Y+8KM5XhYxzQ8hN2phpdgJUxGg1d/ztMF2EMrmLKqK KPsv99SMODr3Mfp9cK0GdT+N8qFtdsrO/QEYsMqzQw63i7h5XtgXUSo6oFppXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H61B2XWT2qhZIM/7YuGL3ogf2F8qr2dFpaEePxrL/BI=; b=DwJiS9RC8dqm5Su9yT+7QzR5p6LvFMvgX0uciN668FI6SHvVnnbmV2G7pgSZPPi9k+eTpT 1HKC3Mp3NXZI61deLVhgROd1sjf7YoND5sCpt6TgAbb2RP2aiKyRlegx28S/XkY/5sMwa8 YAIM76ZcZm64K8gdlT43AYIKCJWWxqPFn/hL/3MPm/s+QexTWNvOQPIE6XMawsng3/4KGy 3kftBTp3FUdK9vLtC2SZdKIPBjZJsUw31POfQtMW3d5AGIYVnje6sUeKIISt5jIn9PBBGb GmOOSW2Ibmnqqsih/xUCayGfAPrKy9bNd47BTLFyIih+E/O3dIaSEoaQEm8LCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728944251; a=rsa-sha256; cv=none; b=TSf8jFY+Jv0OV+EPUXeYo5xZIjjGzm3FIKUl4d7pCs9TEoMdYtI5ovWFdqEDdhgaH1vxdD kT2d8RqQ0IbA8RYCCk2LlX3DFz7GgN55NKD6cqAnus6siR/fjAS63qBp0BTEAIwaO0hWG8 LzveY3K3ANLb5ga32aiogmCFkIjCIbZKHrZDsqZetHu6l6RsG+nnbygmz1J4SnhM0JsUtk 482iZ9ZhgNlqV44/UkBm/5n4ZYGwJAgLLAoXWslEMgpL3zpjQp/CsNSo9iOBYRdAWY5n9O 7qcpZzoTZp2N+lg9K1VlU7BERyvVGHmp1R/C6YuKRFOjsWHxlSbrYUU8UgWUZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSBRt6SzjzwBB; Mon, 14 Oct 2024 22:17:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EMHUcj074612; Mon, 14 Oct 2024 22:17:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EMHULp074609; Mon, 14 Oct 2024 22:17:30 GMT (envelope-from git) Date: Mon, 14 Oct 2024 22:17:30 GMT Message-Id: <202410142217.49EMHULp074609@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: fa93443af9fb - main - uart: Prefer rclk passed in over rclk in the class 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: fa93443af9fb05989dc069ea37932be1b760e7f3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fa93443af9fb05989dc069ea37932be1b760e7f3 commit fa93443af9fb05989dc069ea37932be1b760e7f3 Author: Warner Losh AuthorDate: 2024-10-14 21:57:09 +0000 Commit: Warner Losh CommitDate: 2024-10-14 22:03:58 +0000 uart: Prefer rclk passed in over rclk in the class If rclk is set in sysdev, then it was set during the boot process and is intended to override the defaults. By prefering the sysdev one over the class, xo=XXXX in hw.uart.console can give the user a usable console for non-traditional UARTs, especially on !x86 platforms. The default rclk generally only is good for I/O mapped UARTS or PCI ones that we can do a table lookup on. Other times, it can be hard to know what a good default is without more information. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D47069 --- sys/dev/uart/uart_core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index c2bc818a6fc2..71f39e4c71e7 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -559,8 +559,14 @@ uart_bus_probe(device_t dev, int regshft, int regiowidth, int rclk, int rid, int uart_cpu_eqres(&sc->sc_bas, &sysdev->bas)) { /* XXX check if ops matches class. */ sc->sc_sysdev = sysdev; - sysdev->bas.rclk = sc->sc_bas.rclk; - } + if (sysdev->bas.rclk != 0) { + /* Let the boot sequence control */ + sc->sc_bas.rclk = sysdev->bas.rclk; + } else { + /* Boot didn't set it, use use class */ + sysdev->bas.rclk = sc->sc_bas.rclk; + } + } } error = UART_PROBE(sc); From nobody Mon Oct 14 22:17: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 4XSBRw0pNlz5ZG6x; Mon, 14 Oct 2024 22:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSBRv73kDz3wtg; Mon, 14 Oct 2024 22:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q5r37DPmF6ZhDabiBYXGWKVX79Go3qQFHcw/cqJ4C7M=; b=J0zkH7C+0PGR02UAxwrMf59ilbTEr0wLAWLzSd6x9Tnk6p21xMcRvWWNlkL9LhhZ8uEVBC EnH5bY15XSa0sVc/4Rz/2ZxEyas11yJI0BJpGy00FCHjrsLnvM2p7sbpug554AK4zZFaIb ILiQN/lacIL3IFq8/9c5U8r3PRqmHhRGmbcqIN3Ifvk2LY7TtlyEbcEdEnYsmJsfB2hsWP tCsxc0Pf+KHakEC/ZpuDB01hCf7Dn7MheoXw21CupqTDUo8DxOIvLtexfyXigaViN3NzM1 j+HdEpfhnt4fkfTUuYmXeIlHGJplNbxDZsNV0+N4je4lc34G57ETdEjX3JwPKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q5r37DPmF6ZhDabiBYXGWKVX79Go3qQFHcw/cqJ4C7M=; b=FMLC1z/epfS/RHnjBFzLaZ/vXjBdJ94UkVcfsPyxMkMPnC5goU9Rg7Bb9LBGsybhfk0gHT JfGN6O4af2o65F9jb0fnqGyS7jokIoPOefHhXo9DAGzmCx7iQO4u8AkrF7iei06HcTlTFs LS+ystL6wpsoid1hotTbRk9+Ef0aBTsLIt+BnWVFUZS1sKDyGUHpelyGYbPoF8zYoVcVM6 ham5u3W2/hwUSKY0APDg/uLLXP11q28OQe5KT/3iUr4Jo7Zq8LitEYAAC0Y+Pt6bMZLRCP OBgnU+ctaY7Gi74dYjn2ibiSJK3AYEAdGRgvbPkNJRz0IgMYWmNX8kLeZ/y4oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728944252; a=rsa-sha256; cv=none; b=TzVkeMfY7LSzlLb3HYKWWsSbifCpoPQKBRGLbSMCn3X3a9ac8eZ22ukfVyStP9SQ9EBZsk RmIsH7UNv9Dp2uZPDREQviLY4PUI3z4bDQypzvs5qCyu/VGGfrO/xrWyYwdlVN1MADOG0S jhAKO9teTwfb5rj0nBvX/6vwrvr9j2RVadbsgduJghUIEzo9PjUzXYfg8DFNoCHVZrQjvn uc2Ky03Uls/zMnLJujcYhf4e9ybKrVXsWwIieQHDGk3yr7n7MfSutCme5PUvW8tWVDb2oR jtFKURwUvZ5UKaWAqv7T+gke+yaPNi8NIio2oUAWdp3aXKFGPqkShtghLcw71Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSBRv6gglzwRv; Mon, 14 Oct 2024 22:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EMHVJg074666; Mon, 14 Oct 2024 22:17:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EMHVw4074663; Mon, 14 Oct 2024 22:17:31 GMT (envelope-from git) Date: Mon, 14 Oct 2024 22:17:31 GMT Message-Id: <202410142217.49EMHVw4074663@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: cc7854e10903 - main - uart: export rclk via sysctl 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: cc7854e10903cd4726a4da6610ebf4dcf69de352 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cc7854e10903cd4726a4da6610ebf4dcf69de352 commit cc7854e10903cd4726a4da6610ebf4dcf69de352 Author: Warner Losh AuthorDate: 2024-10-14 21:57:16 +0000 Commit: Warner Losh CommitDate: 2024-10-14 22:03:58 +0000 uart: export rclk via sysctl To help debugging, export the rclk a uart is using as dev.uart.X.rclk. It can be opaque when it is wrong since any error messages printed to the system console using the wrong rclk aren't informative. Sponsored by: Netflix Reviewed by: andrew, markj Differential Revision: https://reviews.freebsd.org/D47070 --- sys/dev/uart/uart_core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index 71f39e4c71e7..d0c4a54c8038 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -752,6 +752,11 @@ uart_bus_attach(device_t dev) "rx_overruns", CTLFLAG_RD, &sc->sc_rxoverruns, 0, "Receive overruns"); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "rclk", CTLFLAG_RD, &sc->sc_bas.rclk, 0, + "Baud clock for device"); + return (0); fail: From nobody Mon Oct 14 22:17: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 4XSBRx4RHdz5ZG5B; Mon, 14 Oct 2024 22:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSBRx1V3rz3xNw; Mon, 14 Oct 2024 22:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DEYYQjT2sQ6qvukPZOK3p59XFivj8Y8fKKthXquLnHs=; b=Ro69RfSgRSnrjx0f0Id0SgiIpP+vJZl3joiJMGDXGZKJWOQnXjTi4joCsLuuIlYpjPEUDO BmyUgY4XF6k8xNHsNDneV65Xjtq+wzcAe47LMwsoF9Q7zOztJOs6vAc4bhvXiE6P6MOlmJ wCqTqJgoVk8p+nNPQnfTseXyHzwyL5PkEf2E6c4IsA89MvXm6tdJ567DZSdFoHKfBlpGJi 7gTOpKqsTBX9MMdtCspgPUwmkfcJHeZ/tNnVziZqE770RvvVfz6X+xhcYw7WtOnocu54/c T9FMm5Xxn3/MoMnp+o78hMW5upUAKHSZwl1sDx4vjD8qeTBnksRy1CJ6M+B4WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DEYYQjT2sQ6qvukPZOK3p59XFivj8Y8fKKthXquLnHs=; b=nP71BDhAojBVOWnSLCBAMGWKK+Ba/DkH84Q1tap7I5WGf2P0CzJuOr7O/KMC5R6aN0EGcK dG+brrqOxGs4rDoM9HsrpmKrAcPHdcEDmZyzemWDUuPOHTR4KdYbfbaDpiRGYhgFRMM1ck Uj4s5gSjM+am+o0SfCynRSWlmK4tsLHMRueACP5+s6h2yx0zPlSW/lA6kSryUAz65ZNEgm HBR2tgz6Krt6Xu6beq/5Uc6u8UwUVtPjU1DfkZUE+crZCGgSZLTnsRyx+TcxSMDnxhF4U4 NwonFbot21goiZvkIaO0drCNq03JWYSqxrWqv+tDyZVj5qYVTIAC0AJyxnGktw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728944253; a=rsa-sha256; cv=none; b=TI9NFxZyy7OdtsN+DARHVZHtL9ohmsA0/1u5bh7GW3CGF4cHNiQ76LdBtO0PgT3xvdZw6a c/j9ZF7esewkOhJ2zrej7DmrqBzb/7xjSc2vZMeP14HNq2zFM3ngMXkYpQDqrHa59uxwC5 loGDcsAHj5HJivGscgyFrErgZavp8d084fN32kcpmXOXR0hAahi7XXjXqxac4HwVJazUGZ nmj7yWetke0bi7pUKUU4c21QIfSXf2VR0DS1M3x7mC6J4jhEg8WEYUgrHkT17um/gzp1ve NBNJwjeT4fWxMlQ3bu+ikoWb07aZjhsxQQgAy4sNRwJKhdW9tFlWCA5VI6ZriQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSBRx0sTgzwPB; Mon, 14 Oct 2024 22:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EMHX59074711; Mon, 14 Oct 2024 22:17:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EMHXXT074708; Mon, 14 Oct 2024 22:17:33 GMT (envelope-from git) Date: Mon, 14 Oct 2024 22:17:33 GMT Message-Id: <202410142217.49EMHXXT074708@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: 2be228603754 - main - uart: Document the hw.uart.console string format. 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: 2be22860375440641f6e57b03724fe38b87b0dd1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2be22860375440641f6e57b03724fe38b87b0dd1 commit 2be22860375440641f6e57b03724fe38b87b0dd1 Author: Warner Losh AuthorDate: 2024-10-14 21:57:20 +0000 Commit: Warner Losh CommitDate: 2024-10-14 22:03:58 +0000 uart: Document the hw.uart.console string format. Sponsored by: Netflix Reviewed by: adrian, andrew Differential Revision: https://reviews.freebsd.org/D47071 --- share/man/man4/uart.4 | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/share/man/man4/uart.4 b/share/man/man4/uart.4 index 90ab2fd4cb57..c7950e86ddc9 100644 --- a/share/man/man4/uart.4 +++ b/share/man/man4/uart.4 @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 11, 2020 +.Dd October 11, 2024 .Dt UART 4 .Os .Sh NAME @@ -269,6 +269,89 @@ be locked for devices that support more than one setting. The CLOCAL flag on callin ports should be locked off for logins to avoid certain security holes, but this needs to be done by getty if the callin port is used for anything else. +.Sh Console Tuneable +The +.Nm +driver can be designated as a system console. +.Bl -tag -width indent +.It Va hw.uart.console +Contains a number of +.Pa /etc/remote +like tag:value pairs, separated by commas. +.Bl -tag -width indent +.It Cm \&bd +Busy Detect. +Enable the so-called +.Dq Busy Detect +quirk for the device. +For NS 16550-compatible devices, this will use heuristics to ensure that the +UART is no longer busy before manipulating line control. +DesignWare-based UARTs need this due to a design flaw in the UART. +.It Cm \&br +Baudrate. +The data rate (bits per second) used for communications on the serial port. +When the device clock rate (see below) is set to 0, then the baud rate will be +used with the divisor to compute the device clock rate the first time the device +is initialized. +Only the traditional baud rates are allowed. +Rates larger than 19200 must be a multiple of 19200. +Baud rates between 1200 and 19200 must be a multiple of 1200. +Otherwise the baud rate must be a multiple of 75. +A value of '0' instructs the +.Nm +driver to not program the baud rate divisor and use the hardware as-is. +.It Cm \&ch +Channel. +Defaults to 0. +Has no effect on UARTs with only one channel. +.It Cm \&db +Data bits. +Defaults to 8. +.It Cm \&dt +Device type. +Specify the uart class to use for this device. +.Bl -tag -width indent +.It ns8250 +Traditional PC UART National Semiconductor 16550 and compatible devices. +.It pl011 +Common ARM UART, based on ARM Limited designs. +.El +.It Cm \&io +I/O port address. +Specifies the address of a UART in an Intel processor's I/O space. +Mutually exclusive with +.Sq mm . +.It Cm \&mm +Memory mapped I/O address. +Specifies the physical address of a memory-mapped UART. +Mutually exclusive with +.Sq io . +.It Cm \&pa +Parity. +The type of parity to use when sending data +to the host. +This may be one of ``even'', +``odd'', ``none'', ``zero'' (always set bit 8 to zero), +``one'' (always set bit 8 to 1). +The default is even parity. +.It Cm \&rs +Register shift. +Number of bits to shift left the base register offset. +.It Cm \&rw +Register width. +Size of operations to read and write the registers of the device. +.It Cm \&sb +Stopbits. +Defaults to 1. +.It Cm \&xo +Device clock (xtal oscillator). +Base frequency of the oscillator to use for the device. +When set to 0, and the baud rate is also set, the UART's initialization +code will compute this the first time and use that after. +Automatically computed values can be as large as 5% when the base +frequency is a poor match to the traditional baud rates. +.El +.El .Sh FILES .Bl -tag -width "/dev/ttyu?.init" -compact .It Pa /dev/ttyu? @@ -283,6 +366,11 @@ for callout ports .It Pa /dev/cuau?.lock corresponding callout initial-state and lock-state devices .El +.Sh EXAMPLES +.Dl hw.uart.console="io:0x2f8,br=115200" +.Pp +When the kernel is using a serial console port, it should use +COM2 instead of COM1 and set the baud rate to 115200. .Sh SEE ALSO .Xr cu 1 , .Xr puc 4 , From nobody Mon Oct 14 22:17: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 4XSBRz12Psz5ZFtl; Mon, 14 Oct 2024 22:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSBRy3sRNz3xRK; Mon, 14 Oct 2024 22:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CooC9QO4VpLSd2ZxMc+GiZoLE6hHSolROUHNzYHSozE=; b=ruhGkWDMbeQSiTPNIdFihQm1EuO5aVjV8CPiEOG84i/xcnmO2N5EDJaCXy9LsWTwMoGlkd /622F0T1pOPeI2o956P7Kn8ukj7xuTWL92z9B/fjpFZOerOcueEQF2bZHW0Aa2mImRO0D/ VF36RRIFWsOgie5IV5fNm8+aAMwQ49oAe8tT5G+Wl3akkvqCaE7nNLD8E5P2/R56RvV/G+ nNhFaMC2PmEVsM3EN5j5kwobzuWea7dWqNnn+wsV91AQEft7SQU/AUpo6+IbzLJcPVCK3A KQpBv8zbFcmuyka02HM2hk7Z0QEDBw2XJn+QW9XQ83lqKeodbSDgAkW5V1Lc1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CooC9QO4VpLSd2ZxMc+GiZoLE6hHSolROUHNzYHSozE=; b=JEdCWjBdc++HelMVahVGDbxD9w0NjZWDuksXx6+ux2mdQqNwzOzKjXg0z6NhK6CyOPw+II nLcDkwppUHEo6NIhA29SUUAkLmHMoPp7qSkkzkVHF/3TYjiPRqs/x8UsQLvbHiF+1FovSh wpaPPfBKv0uWklbwvzsSEBTbxkenT8iZaSgSeO/gOP0PT5jKj5+FCY/taJqo5Qv+0yzbf8 rLXNK+5VBHdBYWc3ksajvQ9HL8W7DT2T0a6JhuY0ofr5yr2BATPyOhcc7QBYYn/Mby+N/I rkGxjAkNDuGEGKFieBfxneJZzT7puVjuUJhOiNYEM4ZsHGcKScrcwTF63o1MTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728944254; a=rsa-sha256; cv=none; b=cLPXpU/OYE4ShbsFcdYBGEirfnA0M7Ccf++AEJY5zv0d9MErDj6bBNQDrrq5OC6V7iKtDr rEvIQkkL71PyvNJV54X/LKKZuSNcuqBE57V5Z5ODOqUdYAwa8EwtT9XCkRzxInFkmQUJVN 6HYugnPyxtLwWdQS79+QMqk3i+rC351RkqF12GmBj7jIskV88cMtQXn2I2lc6IsKXd2MlA LAlIcJYWf6acWikqUZFunoc3YUPhfkxfkejnlNS/ojbdtvIgtboXkX7ZflO1QgmUxj8xyC 3KxgJsrWPuT/6y+guyJgIdbkNYLr9LdbCkiHhRYVPWzY335bTzjT2l4yVTKPlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSBRy1yrWzwBC; Mon, 14 Oct 2024 22:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EMHYcx074765; Mon, 14 Oct 2024 22:17:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EMHYJm074762; Mon, 14 Oct 2024 22:17:34 GMT (envelope-from git) Date: Mon, 14 Oct 2024 22:17:34 GMT Message-Id: <202410142217.49EMHYJm074762@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: b2fd259edd18 - main - uart: Add a signal to compute rclk from baudrate 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: b2fd259edd18af1fe35912bdb602bbe907dbbbcb Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b2fd259edd18af1fe35912bdb602bbe907dbbbcb commit b2fd259edd18af1fe35912bdb602bbe907dbbbcb Author: Warner Losh AuthorDate: 2024-10-14 21:57:25 +0000 Commit: Warner Losh CommitDate: 2024-10-14 22:03:58 +0000 uart: Add a signal to compute rclk from baudrate With newer, more diverse hardware designs, the rclk can be unknown. Currently deployed systems have no standard way to discover the baud-clock generator frequency. However, sometimes we have a fairly good idea that the firmware programmed the UART to be the baud rate that it's telling us it's at. Create a way to instruct the uart class drivers to compute the baud clock frequency the first time their init routines are called. Usually the 'divisors' are relatively small, meaning we will likely have a fairly large error (goes as 1 / (divisor + 1). However, we also know that the baud-generator clock needs to be divided down to the baud-rate +/- about 5% (so while the error could be large for an arbitrary baud-clock, standard baud rates generally will give an error of 5% or less). Often, the console speed and the getty-configured speed are the same, so this heuristic allows boot messages and login sessions to work. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D47072 --- sys/dev/uart/uart.h | 1 + sys/dev/uart/uart_cpu_acpi.c | 8 ++++++++ sys/dev/uart/uart_subr.c | 2 ++ 3 files changed, 11 insertions(+) diff --git a/sys/dev/uart/uart.h b/sys/dev/uart/uart.h index 4cdec00c9829..9b80f0148dc2 100644 --- a/sys/dev/uart/uart.h +++ b/sys/dev/uart/uart.h @@ -45,6 +45,7 @@ struct uart_bas { u_int regshft; u_int regiowidth; u_int busy_detect; + u_int rclk_guess;/* if rclk == 0, use baud + divisor to compute rclk */ }; #define uart_regofs(bas, reg) ((reg) << (bas)->regshft) diff --git a/sys/dev/uart/uart_cpu_acpi.c b/sys/dev/uart/uart_cpu_acpi.c index ae22a9822aa6..816738ec31d5 100644 --- a/sys/dev/uart/uart_cpu_acpi.c +++ b/sys/dev/uart/uart_cpu_acpi.c @@ -189,6 +189,14 @@ uart_cpu_acpi_spcr(int devtype, struct uart_devinfo *di) (int)spcr->BaudRate); goto out; } + /* + * If no rclk is set, then we will assume the BIOS has configured the + * hardware at the stated baudrate, so we can use it to guess the rclk + * relatively accurately, so make a note for later. + */ + if (di->bas.rclk == 0) + di->bas.rclk_guess = 1; + if (spcr->PciVendorId != PCIV_INVALID && spcr->PciDeviceId != PCIV_INVALID) { di->pci_info.vendor = spcr->PciVendorId; diff --git a/sys/dev/uart/uart_subr.c b/sys/dev/uart/uart_subr.c index 49a046f019bb..070ae80d9aff 100644 --- a/sys/dev/uart/uart_subr.c +++ b/sys/dev/uart/uart_subr.c @@ -279,6 +279,8 @@ uart_getenv(int devtype, struct uart_devinfo *di, struct uart_class *class) break; case UART_TAG_XO: di->bas.rclk = uart_parse_long(&spec); + if (di->bas.rclk == 0) + di->bas.rclk_guess = 1; break; default: goto inval; From nobody Mon Oct 14 22:17: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 4XSBRz4jN5z5ZG2p; Mon, 14 Oct 2024 22:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSBRz32yZz3xPN; Mon, 14 Oct 2024 22:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7vakyaG4j+g7voK7RzjHqUmvXaIy4ADjfhENj+q69Z4=; b=YVzhzWDoXyXd8CUcCiesL0UC8LBrLdNoy3nAmavBPbrmtt7xmYQeaE5ZThasVChBsm3EY/ BdXxaxK89ugnmq2xY1ePvnfIhGUHSO+iwoc+6UP0N9UhtKtCx/9E/IIFpc9GmS3KtyDeBF TEHcU1iKA+i3uktLJ44FqVcd2QF2Wpo+XGFssY/uuKCOyVmpKNcEEObBn864KYCsvkkXUa ml3V2r4O5q0+g52pGSbRhkCa5aCIjx4pBTPBAgm8pdC82b95fbPwh3HPUxYnzAxHROFjW0 vc63NvAaY1JajsIsKR/UgoYnWlK6L57mGKCVCICcl3HT1lUYoAcueEjVGYVsGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7vakyaG4j+g7voK7RzjHqUmvXaIy4ADjfhENj+q69Z4=; b=ScIsTTSwaJyhoQnrxlJtkkoYrRP+6NlW3Pvu7om2FVuHQINqiUQk+bEZ9lbH/KQKfh2z5T B8MsIuTSraVXzZpWCVSVvQjAcuD39bij7NKQIdkCn48wDNMOHAN3Ecv+3MiuSoQRmy3szS RpCWsvMuVa++LBQ9t+RG+omEmOrzdKBIjv5dVUGBUNcuO77vK9JJfYicIfuGOC2fSIaHz0 ActDtyKZDMIMBCyyGByHO45pukgzaLn2NwGswnTZBWZ7YXRzN8W4plAMw0Plq/36PlxAvu y/xueU6jZHDguRzi5wlbP4DI5ZoSx1QHloXv7U/dAjjQ+lrlO5uvgmLcVPbadg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728944255; a=rsa-sha256; cv=none; b=WRrg7b1RM9arHTvlcewco3+ABaGu35AXjaOn8SbotzGx8x6bBmI0pIurG04Zm7Z/L1sYRc rUnoDa0xu9L/QDlrkG6ttulfA/S+JzR7sVA90HmJl+2tMYRgJTNG2GatbQO5KJxPT/4exE ARTr0S5gSsDq8NptxVMNewebxF8ug5WBzYa3+nkfAQEg2ENRdI+uy6QTY4gRq+KijybXWU qrlQ8xDuk32rxpC6j9DF6WdJHHijFruKOeIZfxen35q0QrGEICRvkJk+L+DBYyTcuq3gK2 RHjrV2to5p0wBTo/UfhqFLkNnzpGDZSJs/KPVpctrjJrfkLB/OsV9Mw4oDvwZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSBRz2d1Qzw3Y; Mon, 14 Oct 2024 22:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EMHZr0074819; Mon, 14 Oct 2024 22:17:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EMHZLK074816; Mon, 14 Oct 2024 22:17:35 GMT (envelope-from git) Date: Mon, 14 Oct 2024 22:17:35 GMT Message-Id: <202410142217.49EMHZLK074816@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: db4a3bae6e2d - main - uart/ns8250: Tweak printfs to always prefix messages with uart: 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: db4a3bae6e2d00cfa64fc9aed5f76e128ab0386a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=db4a3bae6e2d00cfa64fc9aed5f76e128ab0386a commit db4a3bae6e2d00cfa64fc9aed5f76e128ab0386a Author: Warner Losh AuthorDate: 2024-10-14 21:57:38 +0000 Commit: Warner Losh CommitDate: 2024-10-14 22:03:58 +0000 uart/ns8250: Tweak printfs to always prefix messages with uart: It can be confusing when the ns8250 driver prints error messages with just ns8250 as the prefix. Add uart: to the live and commented out printfs. Sponsored by: Netflix Reviewed by: andrew, markj Differential Revision: https://reviews.freebsd.org/D47073 --- sys/dev/uart/uart_dev_ns8250.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 7aef4df97e12..9f88a43f462a 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -187,7 +187,7 @@ ns8250_drain(struct uart_bas *bas, int what) while ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0 && --limit) DELAY(delay); if (limit == 0) { - /* printf("ns8250: transmitter appears stuck... "); */ + /* printf("uart: ns8250: transmitter appears stuck... "); */ return (EIO); } } @@ -215,7 +215,7 @@ ns8250_drain(struct uart_bas *bas, int what) DELAY(delay << 2); } if (limit == 0) { - /* printf("ns8250: receiver appears broken... "); */ + /* printf("uart: ns8250: receiver appears broken... "); */ return (EIO); } } @@ -255,7 +255,7 @@ ns8250_flush(struct uart_bas *bas, int what) if ((lsr & LSR_RXRDY) && (what & UART_FLUSH_RECEIVER)) drain |= UART_DRAIN_RECEIVER; if (drain != 0) { - printf("ns8250: UART FCR is broken\n"); + printf("uart: ns8250: UART FCR is broken\n"); ns8250_drain(bas, drain); } } From nobody Mon Oct 14 22:17: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 4XSBS05xzbz5ZG5C; Mon, 14 Oct 2024 22:17:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSBS04634z3xLC; Mon, 14 Oct 2024 22:17:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bDhlXS3rjx8mJATT0xhWYZfouBSGfdALGY101NUUISM=; b=GfCuieNDsJ0HWDfzvQ5m7mnPOZHjUL52jUrwV7CyJJUyfCDiottGE2wvvdJuHj3GAt3NAo oIdtSwyGlW3slgIOgW1+BoftIEbuCajF/AvyY1sdHYb5t31Er2i9Pzy0NYntez2dOy7I+f njQTzaP9B3Xo3SO+cSsEICO4GB+w3w3ZeDdOvYTJzcHFrPOQoNzpVmPbIce3bxx9ULmwJ6 tJu8q9MJT4CAN+9wUBVABC5kT378Okj7B2pJnoPJJvgoCWgjYUF8Blg1GuBUaZ35/JARVc ze/yHjQXYqh0npc0mO+0Sx8TWetREMY/L+wdW7AopU3J62oK96eFia6/gNdUaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bDhlXS3rjx8mJATT0xhWYZfouBSGfdALGY101NUUISM=; b=Cn9aeaZiq5W6wloeKp36atY2SpucEy7iynutPe2u/O9Jj4oxXcFxKCUKKl1yZHK1H6x1yW pELfFGlvInUjbSriVtWTiSgy5naIy7ARJUHkiz8nKOwq7AvCaqfSQwQFwjDhn6XeKmHJrm AW6NZnD3kzdpg292nttIrsEOnIu3Hl5zoKuGw11FpUICgNtrZ/iSqsdbHld82uCa5jehu/ BXCrh/ohH85oDd/8g+cjZ1M5Nrhnp1fgCYJuT8y+grlDeZpnS3hvQT1PqtrnYftsftQNlG hqid9UGNjkWQO53rM1ZvsMmyUZuYF41WBXcyMGKqV8ukA6d1smyUne+d6RMMNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728944256; a=rsa-sha256; cv=none; b=MWJ2E1FXe/dieo+1uXUslUK++ieZRO4jN5e5c5CHVzdNPwr6ZFtSV1BSZHJhx+7SH1MhI1 bYX2SuQXidz2TuBjRxqBpEBCZm0LYXnCKjMzLkpfRjFcJ1tRgtLTl0qSDi/v7mjKXJEPMV EAfExcBhIwoFE/RahUinzAwpEoucYXhO8fehjyQ8l2kjzPXpZvDBDrPLFREt+7F2M4/RiD 9Sbeeen0rKY4IlcUa11+1Bgb5/v/7RCpHiQFxpfJnTf68q+wxz0i50gy1MKpPO7NAAoJK4 pVmOkG7jVGpq3I6QTPCn1XrKTKZtB8D4MjOViShHdfOBuzpolz+bogCTNOftBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSBS03jqhzwK2; Mon, 14 Oct 2024 22:17:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EMHaCa074867; Mon, 14 Oct 2024 22:17:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EMHa43074864; Mon, 14 Oct 2024 22:17:36 GMT (envelope-from git) Date: Mon, 14 Oct 2024 22:17:36 GMT Message-Id: <202410142217.49EMHa43074864@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: 4097cd06ca49 - main - uart/ns8250: Factor out reading the divisor 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: 4097cd06ca49a4a212c25177007509838c7d04a9 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4097cd06ca49a4a212c25177007509838c7d04a9 commit 4097cd06ca49a4a212c25177007509838c7d04a9 Author: Warner Losh AuthorDate: 2024-10-14 21:57:44 +0000 Commit: Warner Losh CommitDate: 2024-10-14 22:03:58 +0000 uart/ns8250: Factor out reading the divisor We have two copies (soon to be three) of reading the divisor. Since it's a complicated tricky process, abstract it to its own routine. Sponsored by: Netflix Reviewed by: andrew, markj Differential Revision: https://reviews.freebsd.org/D47074 --- sys/dev/uart/uart_dev_ns8250.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 9f88a43f462a..d43a48f319e4 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -126,11 +126,11 @@ ns8250_clrint(struct uart_bas *bas) } } -static int -ns8250_delay(struct uart_bas *bas) +static uint32_t +ns8250_get_divisor(struct uart_bas *bas) { - int divisor; - u_char lcr; + uint32_t divisor; + uint8_t lcr; lcr = uart_getreg(bas, REG_LCR); uart_setreg(bas, REG_LCR, lcr | LCR_DLAB); @@ -140,6 +140,16 @@ ns8250_delay(struct uart_bas *bas) uart_setreg(bas, REG_LCR, lcr); uart_barrier(bas); + return (divisor); +} + +static int +ns8250_delay(struct uart_bas *bas) +{ + int divisor; + + divisor = ns8250_get_divisor(bas); + /* 1/10th the time to transmit 1 character (estimate). */ if (divisor <= 134) return (16000000 * divisor / bas->rclk); @@ -727,14 +737,7 @@ ns8250_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) uart_barrier(bas); break; case UART_IOCTL_BAUD: - lcr = uart_getreg(bas, REG_LCR); - uart_setreg(bas, REG_LCR, lcr | LCR_DLAB); - uart_barrier(bas); - divisor = uart_getreg(bas, REG_DLL) | - (uart_getreg(bas, REG_DLH) << 8); - uart_barrier(bas); - uart_setreg(bas, REG_LCR, lcr); - uart_barrier(bas); + divisor = ns8250_get_divisor(bas); baudrate = (divisor > 0) ? bas->rclk / divisor / 16 : 0; if (baudrate > 0) *(int*)data = baudrate; From nobody Mon Oct 14 22:17: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 4XSBS16bT2z5ZG0H; Mon, 14 Oct 2024 22:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSBS14zsJz3xbB; Mon, 14 Oct 2024 22:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FC2sWayuuYOseX9jF9Jr54lvMhS1p5JTKV+WrvzC0+M=; b=R+1ZyHtRUJLHMvbmmkQjJJK+XKHOz/EuSvh9Pbjl+THjHAY37ZUHvUF+M0E2p3ywPnIQ+A y1zyMVHyat2j22NfxrdIFzTOyToSDVUwE6XbktLB2bF9tJQZkvHMC0kL2dYCkmEtpWG4gu I3q7UJXSoygP0fV6nxYlb7wI4vHUiSDeGDStJD85m6D+iWzphfLbL5zDPLC3D/bLDrO+1R vrgpaXyhZsJcS5ZKMnKLCVzomN4w6cBaDSACOfZHUbvxhleZEGyMuUBUTEVo/9cAmtbWCW pHC09ernlJb8b737x4hnwDIJMzhCvGf6W3JrfN9AfgA0dIeopzTKD5Pcneq9Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FC2sWayuuYOseX9jF9Jr54lvMhS1p5JTKV+WrvzC0+M=; b=kvnfME41fIIx9jYoQOZQxmasH9LiaROHCyV99V10yLHadcIGrWbP0WxJErDqmmFx+3OX9J MzPaQ3leykQznhF1rOjlRX3dVdiYRsgi17GObXtKtSjRXJjxBHGN7lpcvIf5kTmfhUhFwg U0Ly6lYS9cwS1h/Sp1J2+98Ae4Vi2sQfak6PjpMH0SLRlwJsXRyntAHscaQxJmlHpN0gH+ wKweWBwwOZzEFf9L0kwG2qpPTyepYQPOhTKqQKKmXVSygAID3LxtrkLvUFjUFUVB3fVptf MgX2pC/KtL0QYfatBi1fo61fG5HZxsgopP+g59SkGlyREab9ctnTOuV8rLhybA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728944257; a=rsa-sha256; cv=none; b=sEqjWFWKc7kjxvXi3DibU3rLAVWT4rSjh4etMkytM8y+Z/OaqhvIJ9BScceVWadiayeQid nfde3BqmH0d5MXCZl2u1mxVo25++1aI6QBDe4zXgoFH8SLR2Tjv1g5t6I2LnkO6CvMXMit fvkMxYW4HGOF9i7ZaMtrEBMaZu7iFbAaai0xX3JTM/8yeCMz3oiUn+ColOXjg+SakHp/DZ RKFVjGpbzVX5QLh6Iyh3LLOTT/zKxkgmjmC59NbTkBc5/D6ecvZwJFEVpbDrkJAqdWtERe i3sCmIS82SqqL/HUM3bFHwDmDN25NBpCt6blQSsjcYlDhzcINRPs9xFqNNcTKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSBS14bvyzwK3; Mon, 14 Oct 2024 22:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EMHbTw074912; Mon, 14 Oct 2024 22:17:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EMHbG7074909; Mon, 14 Oct 2024 22:17:37 GMT (envelope-from git) Date: Mon, 14 Oct 2024 22:17:37 GMT Message-Id: <202410142217.49EMHbG7074909@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: 56139f727f6d - main - uart/ns8250: Disable interrupts sooner 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: 56139f727f6d0d0a6d2f120b67f8c1d70e8c18d4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=56139f727f6d0d0a6d2f120b67f8c1d70e8c18d4 commit 56139f727f6d0d0a6d2f120b67f8c1d70e8c18d4 Author: Warner Losh AuthorDate: 2024-10-14 21:57:54 +0000 Commit: Warner Losh CommitDate: 2024-10-14 22:03:58 +0000 uart/ns8250: Disable interrupts sooner Disable interrupts before we set the parameters for the UART. Usually, it makes no difference, but it's possible that setting the baud rate, etc could create problems if there's data pending, so move the interrupt disabling ealier. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D47075 --- sys/dev/uart/uart_dev_ns8250.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index d43a48f319e4..f59f5fa80e9c 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -359,10 +359,6 @@ ns8250_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, { u_char ier; - if (bas->rclk == 0) - bas->rclk = DEFAULT_RCLK; - ns8250_param(bas, baudrate, databits, stopbits, parity); - /* Disable all interrupt sources. */ /* * We use 0xe0 instead of 0xf0 as the mask because the XScale PXA @@ -373,6 +369,10 @@ ns8250_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, uart_setreg(bas, REG_IER, ier); uart_barrier(bas); + if (bas->rclk == 0) + bas->rclk = DEFAULT_RCLK; + ns8250_param(bas, baudrate, databits, stopbits, parity); + /* Disable the FIFO (if present). */ uart_setreg(bas, REG_FCR, 0); uart_barrier(bas); From nobody Mon Oct 14 22:17: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 4XSBS31vWwz5ZG77; Mon, 14 Oct 2024 22:17:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSBS26WdDz3xQ2; Mon, 14 Oct 2024 22:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oqI96qoy0Uf/W+5Ko5pDKhp3Py5KpqbYJ1qT2tUB/LY=; b=eMPYyBf54aWe6FQLoIndXO0CiO0dDDejSln/qhNot+ncTO4UTFE506ICPgqmu1EEaTI0lr AOYw99TPnc/KgClrbH8OKREIkwXzn06fiE/KHAFxUW4h4R1VdQwzaflwBeBp2Stq8aU7Xn 9K73J5ESaKck/4Y6xZvzrMvdQQjhX+kgsApCn09l54XS99k1SV8uEpj6yvgkE/7baxsFLr 7hsoVQ1HUPMIISoX8JlK/GYpkKBmjBu1dH0wvJMvNT4jJPQ47s11ME3b1BxcgXOmeInN8+ RYZrXQPmZuiMog+PKeJQzQoiWkVDixshLmveL5pmXVz66/6Y3fGdBKLDGsHTvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oqI96qoy0Uf/W+5Ko5pDKhp3Py5KpqbYJ1qT2tUB/LY=; b=NQ7wh4ZGQxPusS61mHg6ZplkvKqWFMFttumdEzD4iZLMXuYEYBE58WGwPXugV7/awe5gOV Rfne55Dn/ughZmDD5igVdnH5g686k16zRuaHJFX9beWlTbGnHxR/1Li9NK0SJt+ToLee15 MSAV4/0xdO+hVdxrrQIAZJ6rX5unHBDE26ceQI5Z8yFeTodhU3uGSqKaW26VRNfsZTzImx jbZHNw+KRcLP3LMT19MBvXA8zwMKtU5QmWOK0e29QCx5DmFcIoiH5u6fGgd+oW8bUuensM kIp/6+snYon7YjDexUAvex7VFQW4NtyPYPO1Npkjq0TyXkC1RJXXAKraDhuK7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728944258; a=rsa-sha256; cv=none; b=T2jf9FBDHrxG7CCc+xIGnEp9mWAw8x63JWJrUL9VmCWHtSTSzpqMNsVqbzVLVXVp5f1dWf xz5dSHOEWGiISgZOuNMuTzxLT3AEJu4Euq0kBixgVAkFk4YReV45Dvc/6F1qiH0KS/0gTQ c2RaVBg/ZCMsdQoB66XIg4wKCWQf1UkPyaGgD3jbMiUF0qBohKfksEB9P4n+YIWgD+YDLb JrDSK+/3MRDYrOZTStr1DEA6vB7nMziQuhWE2F9HLPwOPMJrAAp98zRLHNCGo2sah64B0i T9+JSl9ZghnJcpbCj5qkxOqWWT775j8UH0fA14FfF7KOXvBmlxnVHJJ6KJi0Bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSBS25g1CzwBD; Mon, 14 Oct 2024 22:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EMHcFB074960; Mon, 14 Oct 2024 22:17:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EMHc5a074957; Mon, 14 Oct 2024 22:17:38 GMT (envelope-from git) Date: Mon, 14 Oct 2024 22:17:38 GMT Message-Id: <202410142217.49EMHc5a074957@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: 8190dfbb1d58 - main - uart/ns8250: Add support for computing rclk 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: 8190dfbb1d58a1c52f73992d84ae00c4fff35890 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8190dfbb1d58a1c52f73992d84ae00c4fff35890 commit 8190dfbb1d58a1c52f73992d84ae00c4fff35890 Author: Warner Losh AuthorDate: 2024-10-14 21:58:01 +0000 Commit: Warner Losh CommitDate: 2024-10-14 22:03:59 +0000 uart/ns8250: Add support for computing rclk When instructed to do so, compute the rclk (baud rate generator clock) based on the currently programmed divisor and the communicated baud rate. We only do this once and only for consoles that tell us the configured rate and flag we can likely safely compute rclk. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D47076 --- sys/dev/uart/uart_dev_ns8250.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index f59f5fa80e9c..3da2e8b8c758 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -294,8 +294,8 @@ ns8250_param(struct uart_bas *bas, int baudrate, int databits, int stopbits, lcr |= LCR_STOPB; lcr |= parity << 3; - /* Set baudrate. */ - if (baudrate > 0) { + /* Set baudrate if we know a rclk and both are not 0. */ + if (baudrate > 0 && bas->rclk > 0) { divisor = ns8250_divisor(bas->rclk, baudrate); if (divisor == 0) return (EINVAL); @@ -369,8 +369,28 @@ ns8250_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, uart_setreg(bas, REG_IER, ier); uart_barrier(bas); - if (bas->rclk == 0) + /* + * Loader tells us to infer the rclk when it sets xo to 0 in + * hw.uart.console. We know the baudrate was set by the firmware, so + * calculate rclk from baudrate and the divisor register. If 'div' is + * actually 0, the resulting 0 value will have us fall back to other + * rclk methods. + */ + if (bas->rclk_guess && bas->rclk == 0 && baudrate != 0) { + uint32_t div; + + div = ns8250_get_divisor(bas); + bas->rclk = baudrate * div * 16; + } + + /* + * Pick a default because we just don't know. This likely needs future + * refinement, but that's hard outside of consoles to know what to use. + * But defer as long as possible if there's no defined baud rate. + */ + if (bas->rclk == 0 && baudrate != 0) bas->rclk = DEFAULT_RCLK; + ns8250_param(bas, baudrate, databits, stopbits, parity); /* Disable the FIFO (if present). */ From nobody Mon Oct 14 22:17: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 4XSBS44lnZz5ZFYM; Mon, 14 Oct 2024 22:17:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSBS41XFMz3xYW; Mon, 14 Oct 2024 22:17:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QR01sU+PP6dnGQszIb6M+g76qWrZolDITLSo14dsuB0=; b=WNHVK0nyDDAtaUWbqEEFT6aKWPFB6z8VM4ZRvyrZ4Mt095ONZyLAVRfP3rzYMrJ03uO69W t5jT9AS1x4EvApe7eUP4TyuznUpkfPqJ2pKSMKvPLA6KZ4kP9Vgq09HMmZhPdXocvMsxUv PWorFa2gZ9bU9Z6TUkRoKNwyBUgzogYQifsd13M8aqCdhgE7e3s+bXxLToSDlXEFtTDDYt wp22/Mu2QVUi3C94hZyD3getZh4E3iTBvACQW4pSapKZYdrPL8nJh5DVhTCdTQkIYoaJ67 ylWAGTOoOzXnlkt8+34OIrBuRw2nc1DkPEMDPkc+H661bW9GQy8wqaAjXEoDDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QR01sU+PP6dnGQszIb6M+g76qWrZolDITLSo14dsuB0=; b=floxsA/ENGyG9FwMOAeqnsdDzgNdLpm78BH/9P3X3Xz/tHxfc7J/9IodSX6Usx5Z1SLzW2 xTBd3+IJkIGGWn3uf+znpiDzPQGfABuS+Bo3So5Ct5VdQyWJjTM/W/utTwmLyOEX+GLYtl h6YIAih6awQU4u1mnirxVKLXfj1imVTkdM5ZuyB/pcbN9ipib5oXURmSoTl6Bk5w2hPIh8 kgOjlUhp5xljDlfQVWyETHrR3qTW5Y3qDcFZ3LaAXElTzM+yYFqi1ZL89nuSD2qqkFdcGX TSs4/jJbdhoyC6DqXWS/Nxh0mNtJ0FTcrLXumBE9dZmH14ZXnuFTICp00geAnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728944260; a=rsa-sha256; cv=none; b=SBzPF8tiTjLR95sn6WZhis5XLy9udFVnUmB7oloxjEI9Bi242jtDZBNfOCav0OZR9egWPR JveCdsEsuEZtNmu6OlIhFpG5JU9cCrFM/JGjn/2BOflP7iPKCgqhtaa3FulfOwXJ/yNOlS pUoNTMzIAAx1bhygV6TE7ewCNo+ELEjqQR1YjhfR3SYR4rJa06gNbemLe7aJ3hnGilC+s7 BFn1pkEwnrAqfYPGtu4ScVWyJMQrICf65/+ZttL1fTQdcV+T+answnbNFdhivWhz/ENBxm Ys7Ewi5sA5ZMDj/zBj7zJIZSU6+KYgTpAnFyz44dC10JV+rjRA3FLFWuEKH3Vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSBS36msLzvxL; Mon, 14 Oct 2024 22:17:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EMHdPn075014; Mon, 14 Oct 2024 22:17:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EMHd7g075011; Mon, 14 Oct 2024 22:17:39 GMT (envelope-from git) Date: Mon, 14 Oct 2024 22:17:39 GMT Message-Id: <202410142217.49EMHd7g075011@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: c87b3f0006be - main - uart: uart_getenv: check for NULL class last, not first 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: c87b3f0006be9ac5813f1ff636f18c9b4a41b08e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c87b3f0006be9ac5813f1ff636f18c9b4a41b08e commit c87b3f0006be9ac5813f1ff636f18c9b4a41b08e Author: Warner Losh AuthorDate: 2024-10-14 21:58:10 +0000 Commit: Warner Losh CommitDate: 2024-10-14 22:03:59 +0000 uart: uart_getenv: check for NULL class last, not first This allows one to specify dt:XXXX when the default class isn't compiled into the kernel. It's not an error to not have a class until we're done parsing the spec, so defer checking until then. Sponsored by: Netflix Reviewed by: adrian, andrew, markj Differential Revision: https://reviews.freebsd.org/D47078 --- sys/dev/uart/uart_subr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/uart/uart_subr.c b/sys/dev/uart/uart_subr.c index 070ae80d9aff..ca127b3a956e 100644 --- a/sys/dev/uart/uart_subr.c +++ b/sys/dev/uart/uart_subr.c @@ -200,13 +200,6 @@ uart_getenv(int devtype, struct uart_devinfo *di, struct uart_class *class) bus_addr_t addr = ~0U; int error; - /* - * All uart_class references are weak. Make sure the default - * device class has been compiled-in. - */ - if (class == NULL) - return (ENXIO); - /* * Check the environment variables "hw.uart.console" and * "hw.uart.dbgport". These variables, when present, specify @@ -300,6 +293,13 @@ uart_getenv(int devtype, struct uart_devinfo *di, struct uart_class *class) goto inval; freeenv(cp); + /* + * The default uart_class reference is weak. Make sure the default + * device class has been compiled-in or we've set one with dt=. + */ + if (class == NULL) + return (ENXIO); + /* * Accept only the well-known baudrates. Any invalid baudrate * is silently replaced with a 0-valued baudrate. The 0 baudrate From nobody Tue Oct 15 04:36:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSLsh1GcZz5NsSm; Tue, 15 Oct 2024 04:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSLsh0kMkz4dSB; Tue, 15 Oct 2024 04:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728967016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/0DUzIR+eipIksUTsIc7CzjLCqKNCV1GV6kXgs/hOA0=; b=mklHitMNTUGTjk3pqREAxMBZIEyQRJe7X5ZSEi6n6z44dYTppbwfc/N44Njhs7e5HoHLcn 0OciQyM7Q1kMTmnt4GPMV9albBexlPbJKLbxif4m6N8kq+PWgxwbH65lr5OXZQhe8qplwJ L/Mwmmqit16tswtB/N2eBL2xkHrXAVvHhmf3BQoAqEroS0chZy6voiHU8ePeL4+81di+xL E/YAeuGSfASTi2FIEWtzohGV9DgZDeqPQYk8KGfEcKTSb696EYLsAqvEYSUIKlhYYJxaR/ fJgIZse1lHP9Q4FMDUIeoN9PAPM9yfjpNauVHSRZaMntCFkRjQ0yEEYA5hG+Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728967016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/0DUzIR+eipIksUTsIc7CzjLCqKNCV1GV6kXgs/hOA0=; b=uK4qECXGT/DpYL2NtyCH8tMlCnOzJYCFDlLaG5OwexC17B1LEI/CHOaIUjrYmCjtm6QgOO gO0Evig9ELTnG/zPhUGMgXsFoXwWvLeJ3FKbXi97sW40Ybbwh8eqphk6RWHJWmWjL9Ot/I ZpuwmwQ/31cla9caym2mm1Vh5GqWhEXSX0YCCdy1J2NpTjsHoi1g0QHCQQdVGVyL2brLhK BNvTukJgFjFLYJ9lyw9VH6spifmszg+O3gGECYyVhEivNbrf/ZdDqdobDOW1PehNLjimDk UFTQg/tZ6So6Cab1fUnjzrlno2EtkYnhG5siYnLTNt+gYjx5d/oQLBQ096gHnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728967016; a=rsa-sha256; cv=none; b=H9ULZp6eGx/88+mrMzs2x/7x21B/vy9+CfWoSlw7zlfBgGJDlFVU8/4ZvIeOom1nWLKwIT EWiiV3EyQC/1wGBIRBvngtwQTgLXsFKHrKsMxgmgF02UIfMQgc2ut6uLpLCdxuqukGUyZz Towu2WgFCjbLuLlZ9i75dtVTQx7O4zomBeTYo0x3CGtczO+f8K+IpUHOfwRNUMvjf32omV Vau0lzIBBrMR9NTP4rJFHAMEc0szcpbwUqW749fJ7WD6Qem4Bol48RG2PymshhRARhN/j7 EhezWfdRFMOmxYJ2MO4bh2q3K4skUpfKUI1EfmLpghTl/7JPtjmWhn7RL+oKZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSLsh0KGVz178x; Tue, 15 Oct 2024 04:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49F4atIO018703; Tue, 15 Oct 2024 04:36:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49F4atSu018700; Tue, 15 Oct 2024 04:36:55 GMT (envelope-from git) Date: Tue, 15 Oct 2024 04:36:55 GMT Message-Id: <202410150436.49F4atSu018700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 4a983f05d98b - main - vm_page: move tailq validation to grab_pages 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a983f05d98ba1c5eebe65d29dd061dc3eab7594 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=4a983f05d98ba1c5eebe65d29dd061dc3eab7594 commit 4a983f05d98ba1c5eebe65d29dd061dc3eab7594 Author: Doug Moore AuthorDate: 2024-10-15 04:33:43 +0000 Commit: Doug Moore CommitDate: 2024-10-15 04:33:43 +0000 vm_page: move tailq validation to grab_pages Function vm_page_acquire_unlocked both looks up pages and validates them. Much of it serves the needs of only one caller, vm_page_grab_pages_unlocked, by checking the validity of checking tailq links. Extract from that function the parts that serve only vm_page_grab_pages_unlocked, and move them into that function. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D47001 --- sys/vm/vm_page.c | 111 ++++++++++++++++++++++++++----------------------------- 1 file changed, 53 insertions(+), 58 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 1f0b364dbde2..f2b3baf419a0 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1774,7 +1774,7 @@ vm_page_relookup(vm_object_t object, vm_pindex_t pindex) { vm_page_t m; - m = vm_radix_lookup_unlocked(&object->rtree, pindex); + m = vm_page_lookup_unlocked(object, pindex); KASSERT(m != NULL && (vm_page_busied(m) || vm_page_wired(m)) && m->object == object && m->pindex == pindex, ("vm_page_relookup: Invalid page %p", m)); @@ -4795,53 +4795,33 @@ out: } /* - * Locklessly attempt to acquire a page given a (object, pindex) tuple - * and an optional previous page to avoid the radix lookup. The resulting - * page will be validated against the identity tuple and busied or wired - * as requested. A NULL *mp return guarantees that the page was not in - * radix at the time of the call but callers must perform higher level - * synchronization or retry the operation under a lock if they require - * an atomic answer. This is the only lock free validation routine, - * other routines can depend on the resulting page state. - * - * The return value indicates whether the operation failed due to caller - * flags. The return is tri-state with mp: - * - * (true, *mp != NULL) - The operation was successful. - * (true, *mp == NULL) - The page was not found in tree. - * (false, *mp == NULL) - WAITFAIL or NOWAIT prevented acquisition. + * Attempt to validate a page, locklessly acquiring it if necessary, given a + * (object, pindex) tuple and either an invalided page or NULL. The resulting + * page will be validated against the identity tuple, and busied or wired as + * requested. A NULL page returned guarantees that the page was not in radix at + * the time of the call but callers must perform higher level synchronization or + * retry the operation under a lock if they require an atomic answer. This is + * the only lock free validation routine, other routines can depend on the + * resulting page state. + * + * The return value PAGE_NOT_ACQUIRED indicates that the operation failed due to + * caller flags. */ -static bool -vm_page_acquire_unlocked(vm_object_t object, vm_pindex_t pindex, - vm_page_t prev, vm_page_t *mp, int allocflags) +#define PAGE_NOT_ACQUIRED ((vm_page_t)1) +static vm_page_t +vm_page_acquire_unlocked(vm_object_t object, vm_pindex_t pindex, vm_page_t m, + int allocflags) { - vm_page_t m; - - vm_page_grab_check(allocflags); - MPASS(prev == NULL || vm_page_busied(prev) || vm_page_wired(prev)); - - *mp = NULL; - for (;;) { - /* - * We may see a false NULL here because the previous page - * has been removed or just inserted and the list is loaded - * without barriers. Switch to radix to verify. - */ - if (prev == NULL || (m = TAILQ_NEXT(prev, listq)) == NULL || - QMD_IS_TRASHED(m) || m->pindex != pindex || - atomic_load_ptr(&m->object) != object) { - prev = NULL; - /* - * This guarantees the result is instantaneously - * correct. - */ - m = vm_radix_lookup_unlocked(&object->rtree, pindex); - } - if (m == NULL) - return (true); + if (m == NULL) + m = vm_page_lookup_unlocked(object, pindex); + for (; m != NULL; m = vm_page_lookup_unlocked(object, pindex)) { if (vm_page_trybusy(m, allocflags)) { - if (m->object == object && m->pindex == pindex) + if (m->object == object && m->pindex == pindex) { + if ((allocflags & VM_ALLOC_WIRED) != 0) + vm_page_wire(m); + vm_page_grab_release(m, allocflags); break; + } /* relookup. */ vm_page_busy_release(m); cpu_spinwait(); @@ -4849,13 +4829,9 @@ vm_page_acquire_unlocked(vm_object_t object, vm_pindex_t pindex, } if (!vm_page_grab_sleep(object, m, pindex, "pgnslp", allocflags, false)) - return (false); + return (PAGE_NOT_ACQUIRED); } - if ((allocflags & VM_ALLOC_WIRED) != 0) - vm_page_wire(m); - vm_page_grab_release(m, allocflags); - *mp = m; - return (true); + return (m); } /* @@ -4868,8 +4844,8 @@ vm_page_grab_unlocked(vm_object_t object, vm_pindex_t pindex, int allocflags) vm_page_t m; vm_page_grab_check(allocflags); - - if (!vm_page_acquire_unlocked(object, pindex, NULL, &m, allocflags)) + m = vm_page_acquire_unlocked(object, pindex, NULL, allocflags); + if (m == PAGE_NOT_ACQUIRED) return (NULL); if (m != NULL) return (m); @@ -5028,13 +5004,16 @@ vm_page_grab_valid_unlocked(vm_page_t *mp, vm_object_t object, * before we can inspect the valid field and return a wired page. */ flags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_WIRED); - if (!vm_page_acquire_unlocked(object, pindex, NULL, mp, flags)) + vm_page_grab_check(flags); + m = vm_page_acquire_unlocked(object, pindex, NULL, flags); + if (m == PAGE_NOT_ACQUIRED) return (VM_PAGER_FAIL); - if ((m = *mp) != NULL) { + if (m != NULL) { if (vm_page_all_valid(m)) { if ((allocflags & VM_ALLOC_WIRED) != 0) vm_page_wire(m); vm_page_grab_release(m, allocflags); + *mp = m; return (VM_PAGER_OK); } vm_page_busy_release(m); @@ -5141,7 +5120,7 @@ int vm_page_grab_pages_unlocked(vm_object_t object, vm_pindex_t pindex, int allocflags, vm_page_t *ma, int count) { - vm_page_t m, pred; + vm_page_t m; int flags; int i; @@ -5154,9 +5133,24 @@ vm_page_grab_pages_unlocked(vm_object_t object, vm_pindex_t pindex, * set it valid if necessary. */ flags = allocflags & ~VM_ALLOC_NOBUSY; - pred = NULL; + vm_page_grab_check(flags); + m = NULL; for (i = 0; i < count; i++, pindex++) { - if (!vm_page_acquire_unlocked(object, pindex, pred, &m, flags)) + /* + * We may see a false NULL here because the previous page has + * been removed or just inserted and the list is loaded without + * barriers. Switch to radix to verify. + */ + if (m == NULL || QMD_IS_TRASHED(m) || m->pindex != pindex || + atomic_load_ptr(&m->object) != object) { + /* + * This guarantees the result is instantaneously + * correct. + */ + m = NULL; + } + m = vm_page_acquire_unlocked(object, pindex, m, flags); + if (m == PAGE_NOT_ACQUIRED) return (i); if (m == NULL) break; @@ -5167,7 +5161,8 @@ vm_page_grab_pages_unlocked(vm_object_t object, vm_pindex_t pindex, } /* m will still be wired or busy according to flags. */ vm_page_grab_release(m, allocflags); - pred = ma[i] = m; + ma[i] = m; + m = TAILQ_NEXT(m, listq); } if (i == count || (allocflags & VM_ALLOC_NOCREAT) != 0) return (i); From nobody Tue Oct 15 04:39: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 4XSLwp0mgjz5Nsl8; Tue, 15 Oct 2024 04:39:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSLwn6F5lz4fBq; Tue, 15 Oct 2024 04:39:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728967177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XHUJZffpOvjIVSlM1v5O13Cxjl9XTK1aGurHBQKMdJo=; b=syoKx69dE88uf6x6h2yIegz+NBNoTAGFZCwgleK8neYzV0JZoGTZxdl12SjiMKaSSSprn5 5kyegniTTWqz2GGFEeIouVz+5A+utrYj2dNHQSdcXxomfo/KbtVFeaKeFWt7K6ddLtMobO +c6Hw+isaboJs1mRM7aHlFTEe/966rXaE/9ufVmQEeqE3Y8np1Vicb7bKQu27y9P6+oJgx giKlUnmSTOmOF1QDbGUxQOBK2D15qLYIYdJuYBNXPiwPYCeO2XG7bFrPZcPf7E4BRwzzal 1F/YEFGCYtrPiJ0Pz1/oCRDXaWbn9bWetrtF+t73oEfhHO99BwRABG/m5QOQPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728967177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XHUJZffpOvjIVSlM1v5O13Cxjl9XTK1aGurHBQKMdJo=; b=JLEj+PyRqCHmkv5vteFcQmrZGAqoc02dT4UU/yKgWm77/eFvCLrxxRMw3Lslo3U4HSntMA oIVLUmrIazfRKaakXuyRrYRetCHD2Mrt3Ad+iG39g2xyx7QmK+b+y4cSdSbfCzOD50ME5S ejr9yP6hY8GFEMeP278sq1qrbwAQftEwOE/WtOHyo1vewnxGihNkB6mXGUPgybkBr/uywB Zj4PW/PI+/sJbqm1or8BsTKGBR7dMIdjaX/smAUVvAaghuA9US+9KNPvmhjsMFqIarMCao zcrOEh7SgnakzWCghsgY+pJXyOfGqZh5u3XYSnFBZ6j3pd96f7V5kBG1vvF9lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728967177; a=rsa-sha256; cv=none; b=uyjQDlH6YewuPmQg+Rvee5n2M49G0H2OGuo7wh977wJpzvxzgUVrR9MIkle5o/yAT+NrQe Ikfz8NoXjZlHEnj514etHLkOTrKyuQg56YNK8muAK3HQVqa1k3SB3x9qOijsCpr1VBvNll BeoGqGrDPMa0JiVpdSJIu9zN2DCk3LijA1p63kb+VbAc0MFkNh1ThSWri8sA13BVpsPCzi UBmt5UDC8tgMcjuXsWjTHy2E/tgKWgZQADfF/BCfxH2za5fyUS/l2aM4FQR8eE64jLDWPq yNd5F31TCFoUOOtc6NPhalwAH4ppURmykBeMIhL9LPVFNHpEJQmWtFCiReGNeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSLwn5s0rz16vj; Tue, 15 Oct 2024 04:39:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49F4dbdw019194; Tue, 15 Oct 2024 04:39:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49F4dbcW019191; Tue, 15 Oct 2024 04:39:37 GMT (envelope-from git) Date: Tue, 15 Oct 2024 04:39:37 GMT Message-Id: <202410150439.49F4dbcW019191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f1587b9c7844 - stable/14 - iflib: Make iflib_stop() static 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/stable/14 X-Git-Reftype: branch X-Git-Commit: f1587b9c784426396189eafd8781bd5568493447 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f1587b9c784426396189eafd8781bd5568493447 commit f1587b9c784426396189eafd8781bd5568493447 Author: Zhenlei Huang AuthorDate: 2024-10-07 14:19:02 +0000 Commit: Zhenlei Huang CommitDate: 2024-10-15 04:39:06 +0000 iflib: Make iflib_stop() static It is declared as static. Make the definition consistent with the declaration. This follows 7ff9ae90f0bd and partially reverts 09f6ff4f1a47. Reviewed by: erj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46185 (cherry picked from commit 8161000892830ee52bc8048be91b40cdad25fea8) --- sys/net/iflib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index a2e2c3efa1ad..997da7ca5b00 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2585,7 +2585,7 @@ iflib_media_status(if_t ifp, struct ifmediareq *ifmr) CTX_UNLOCK(ctx); } -void +static void iflib_stop(if_ctx_t ctx) { iflib_txq_t txq = ctx->ifc_txqs; From nobody Tue Oct 15 05:18: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 4XSMnh3yyWz5YKkP; Tue, 15 Oct 2024 05:18:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSMnh33CGz4jgL; Tue, 15 Oct 2024 05:18:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728969512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ubsdwHZlkMMKuutiJnD0HQmMt9kT7yde0h+oJBlikok=; b=QDHX5RqbwWGqq5PMfKQqo66cpVJHzuN4ID1B0ldOnuiliZGWwqpVKVZkOHJwTVjYDtrOog h9dJQd0JMYowgTvB5oSKIbDdvjt8O2E9QEUa4yWuWPIQtIp0ss4FiH+vwM2A90GPgeR6py /1VgEIM0pkTe1kkdcRsN5+LEHJlEM88tbxCLDfSiNgObSzcR7FBHywG/fZY+urw7ilWl9J uzlLdi/wp74ZZfCh5vBTUC60sdHDblAIvE72LLUovVXznMFxIHrbgWoNQVoXctDMNVl/1a 4AbnTWQXg5tm2m087tyw7BC9Wz0b7Mn5WGKLfAYHnirQBG3+u4v6KHCPeCI1gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728969512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ubsdwHZlkMMKuutiJnD0HQmMt9kT7yde0h+oJBlikok=; b=INFsJl86+I4hQKIU8+8NpyFSbKrrWOpzWSfjHg8oV3tuPST46oHvXaWZnbEXamolQokqVq 4WcYZrcp4xK0l7xrH0FVDRbSM23AiPuuo+H90b3lgD+/FIWMrjG4oMxTdtnJ4o6NH9PYUO 9EoiexV+3XhcU+Xa8AqRyTQMtXSC7eVSawKZXcNhUhjMKIvXkkw5QVYMmn5Nt1Hlm/ji7M sNEcAdcgLw0/XKQsyIoPJ+3tHMqW4E2L2wfsXtolowJ/Ko/ouBQlTFf1JndyoguE4eYpL4 DPNQdpwuxP9JVDKlRXMqAzN2CW0F9+RM6YP6u56a3+oIyPIZ55BeqfgAF5NRFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728969512; a=rsa-sha256; cv=none; b=CcQ8wnPXsvru+jhYdL783Wg+yJFmsm2ePKb97Hih/tgId9SjHQXTQzNyJK5LIX3esVmrR0 1ho8Pc8OuQE7LjytVshq7CpHxzje1/fnW66V1drTxwI3oOinRvTO+VYGR/miDsa4QCzQS+ 2btGwxmXNybxPBmnGDohZaVnlYGGStEmxOLKeqZMX1gjn2HXlXdUVDEjmQBpPLjFh4rjEE OpjjPry7p0y7t7md0Yy0/zYF+MaW36A/GBmkEAT8oMw3T/71ugV5JqTrPToMuQjeYjPl48 5m0n4Wd4qTgU+/OB3kAMkUFun8TDqpE/8bBvQ+7IzWuZKrnw9DavqhkQYsjQXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSMnh2X87z1885; Tue, 15 Oct 2024 05:18:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49F5IWTO087368; Tue, 15 Oct 2024 05:18:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49F5IWwN087365; Tue, 15 Oct 2024 05:18:32 GMT (envelope-from git) Date: Tue, 15 Oct 2024 05:18:32 GMT Message-Id: <202410150518.49F5IWwN087365@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: 76c656bd97b7 - stable/14 - sysctl.8: fix format 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/14 X-Git-Reftype: branch X-Git-Commit: 76c656bd97b7cbcd55df7301b5e387b3cb1b9a7f Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=76c656bd97b7cbcd55df7301b5e387b3cb1b9a7f commit 76c656bd97b7cbcd55df7301b5e387b3cb1b9a7f Author: Igor Ostapenko AuthorDate: 2024-01-23 14:34:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-15 05:18:07 +0000 sysctl.8: fix format typo Signed-off-by: Igor Ostapenko (cherry picked from commit 380b7eb309478e1aac1609a3dfe1c28436add1c4) --- sbin/sysctl/sysctl.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index fef7d3842c49..70115fa54318 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -326,7 +326,7 @@ option has been deprecated and is silently ignored. .Xr sysctl 3 , .Xr loader.conf 5 , .Xr sysctl.conf 5 , -.Xr security 7, +.Xr security 7 , .Xr loader 8 .Sh HISTORY A From nobody Tue Oct 15 05:18: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 4XSMp32638z5YKmg; Tue, 15 Oct 2024 05:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSMp312Ctz4jhg; Tue, 15 Oct 2024 05:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728969531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKTZTJGTFUmMBogXyev0AZ1RCO/pEHEAnTcT/r7ESME=; b=UjNHfTZirwZgORPGh6JwprlwEaVV4apkZrXA85YajQjB17WdFfLk6/PuGiUnZ868oLLCQT Hlz1wyuqIZZgoBgU6Tq9kA3+UTr5owiQ6zlULc2BbWnZoURlB8IN7pf0RqRMOBr4bPSAE/ vJAbM2F8FOSGG19+tD4mU3V/Inqul7AGvnRERJtgNcGOpwxpNbCIFRV+yXj4jXvGvoaRxu 5zdhDGpjrcf/Mw9BEa5OAXC3/SQxulyBZzlazX2zOYq171WZWZN8lFQ7dWfjXKcAvrthsT +sRtwussrkWu/k3a8oubi5JcF5LvivnnYXcPZJ1+F/40x0imtbb6Uc3mpUqFGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728969531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKTZTJGTFUmMBogXyev0AZ1RCO/pEHEAnTcT/r7ESME=; b=akvV7KFMsKnSXJpOp1iojTXbu2yRodwt926UKQwPMr8O4+ifmbgDB7ZBsb2Tx6LeTVhzO4 WiHEzTPCcv7rvmdofoT5HjaogYMH6NYI4Bz4axhsVv+Ndy9gs1qIf9A/Kb56/K5eQwLCNn IbLH6WyvWLSXyVaLDY27/eaH1mq7E/ECfbhU+Mm59XR2z8QTXLKVT+vw4CeCPkm3L+ckgb qrRICQ9AfBTWKg9URQMtvT0hm3RCBB8eAVxOnOblTZZbG3H0K58kx3IdQBeaSAVK4GF2Jb Cv0FdOtdypKK4Tw9HSwC+H1tssTQjm5F1d1gcOfqZDLdUMz6oY4R/mUu896eyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728969531; a=rsa-sha256; cv=none; b=N1DH3JCDJJpJ0cvQGHmehvY3JnbglOc5YUjDB5QPXvYHB8ycN6hE37Hf9P/dvViJ8D4IyY GG60/IDXChsGarrInNKeO4GI3vCK8Ld5rdJlyWfMwVXKjWPPBokHziSLvTBTfp/jM6ttM/ UJAYwei+WlZAii6NMd2JaF1RSEblivRun9RomtYWG0Q/rleCUyOdGMRUg4R2DsFXwGJkNM 0oYrTd+Zwgh1wTgpYA/uIBy2nZ1s8J+84IVn9On8Yun40D3oWikmFr/RXI+XQv6x8tCmRi oJSa8N+M/g5jiKtutUwxuagD/R2kGS1umuDBZYhIf9HYMEw34jWZB0aKKOEEqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSMp30Ljtz1886; Tue, 15 Oct 2024 05:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49F5Iojb087548; Tue, 15 Oct 2024 05:18:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49F5IoCg087545; Tue, 15 Oct 2024 05:18:50 GMT (envelope-from git) Date: Tue, 15 Oct 2024 05:18:50 GMT Message-Id: <202410150518.49F5IoCg087545@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: 54cb2f5b8b89 - stable/13 - sysctl.8: fix format 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: 54cb2f5b8b89e57f20068f26f00466e22a6b9057 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=54cb2f5b8b89e57f20068f26f00466e22a6b9057 commit 54cb2f5b8b89e57f20068f26f00466e22a6b9057 Author: Igor Ostapenko AuthorDate: 2024-01-23 14:34:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-15 05:18:39 +0000 sysctl.8: fix format typo Signed-off-by: Igor Ostapenko (cherry picked from commit 380b7eb309478e1aac1609a3dfe1c28436add1c4) --- sbin/sysctl/sysctl.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 11ed75270e28..ee3f8579882f 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -315,7 +315,7 @@ option has been deprecated and is silently ignored. .Xr sysctl 3 , .Xr loader.conf 5 , .Xr sysctl.conf 5 , -.Xr security 7, +.Xr security 7 , .Xr loader 8 .Sh HISTORY A From nobody Tue Oct 15 06:30: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 4XSPNf1DTvz5YQYk; Tue, 15 Oct 2024 06:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSPNf0W0Gz4tZ0; Tue, 15 Oct 2024 06:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728973826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z1xIOFF4GH1zUqHVeP3TFbTj/3FseQJLqSVbUT++B4Y=; b=huSVTu6TG5VVET4OHPWtiUILcuKFqiUjAnKND7EL/POf1Tb+OpcHjmJN+FeAG2oD0HpylZ l/QDNGZwvmubjQ2FElSNmqB2PmqaOzwE+1VNFZY+Km7Ks80dPE3ekn9CSOqHFMzE1IpbQv IT4DnwlVTl/ZT4acqkSM0x6ZGIAXRAZuzTgNBczeKBRbEucw+dKxCBJ0+uYQLC+5F6DXRE qwd2j8KXZ3l8wsV3pDfM1xQXjYZb1Djvdl/k8LH3CrZ+QGQtKlcLf8mhgtjp7qG3hZIp4k Bhj/k0wXRFiXlan6QNCyLn6plCbSkG5DFidSvl65eQE8xNE4tUhZKfq12okcGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728973826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z1xIOFF4GH1zUqHVeP3TFbTj/3FseQJLqSVbUT++B4Y=; b=FHy5mn9Qf8MrMuKBxvw9KjlfF4dkagTLMKdSRGaN+X4dabRnNHOA/eYzwtizY2GFrDYcJY iatRpBKQg6IW24VVyJ262Pp2TOYBu2Xl+ri5GUIC+JtzcsVLDJmxZXnDNS7bdOHbF6ZLey 31BFDgW5161qb87G5H7vlF5ZmQP/MeJYylC7UastXMDz9t+XWq9V8Z8CI24q3Pc2+aOFq/ g/yXCKVQo8h72vey4dmvvdl+THN8eiRnl7c+9iSmtwkojKDAH1BylYU6kbwqUvBB/XEVs/ YrkntDcgtm/XjSqKwZIIS+uc9QQgZ0KaLEW7DGUUgvDEsWrvILzkAxdgt6IQLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728973826; a=rsa-sha256; cv=none; b=hdhxHRJTJbfr6QUVeLUuAgyXB96TJWmpXAOc7iJV/nmg40Q0VCyhJqqULJshOJyejAlyim C8mDDr6ATPth0GcmFMC9CQYsvfSMBWorMoSbQrjIYCBfZtzDxXjZNHQIxiStAe5a22v3Qz u0ZswPcvXSE7DBeHcbCYtwjGhyClIgHdhoZTyj7G+3aDaR4ZtS2GermJEVNlOKgqXUQvQP JV9ECyTLs7sptQWNQxoeimyeZ9K+UGTHUSOAujTn3im84J4sSpegQvOtSN5Hm1aVXU82VG UgEhC5oIc+s0hX4X32xNnh7gEzdEI/xw87lyeJQLHcDGSC8rmk2KzWTKV4QLbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSPNd6Z41z19gG; Tue, 15 Oct 2024 06:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49F6UP8r015961; Tue, 15 Oct 2024 06:30:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49F6UP25015958; Tue, 15 Oct 2024 06:30:25 GMT (envelope-from git) Date: Tue, 15 Oct 2024 06:30:25 GMT Message-Id: <202410150630.49F6UP25015958@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: 08e8554c4a39 - stable/14 - env: Add a handful of test cases. 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: 08e8554c4a39352da36f63794ef7d2b441a37238 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=08e8554c4a39352da36f63794ef7d2b441a37238 commit 08e8554c4a39352da36f63794ef7d2b441a37238 Author: Dag-Erling Smørgrav AuthorDate: 2024-10-07 21:00:17 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-15 05:25:15 +0000 env: Add a handful of test cases. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46996 (cherry picked from commit 334af5e4131b21c658203635bf713d6a59846585) env: Improve documentation. * The `env` utility's inability to run a command whose name contains an equal sign is a feature, not a bug, so move that paragraph up from the BUGS section to the DESCRIPTION section. * Mention that this can be worked around by prefixing the command name with `command`, and add an example of this to the EXAMPLE section. * Add a test case which verifies that `env` does not run a command with an equal sign in its name even if it exists, and also demonstrates the workaround. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46997 (cherry picked from commit a0dfb0668b45506de97beb4c7acbe3fd1ba69fc8) env: Add an option to change the directory. This mirrors the equivalent option in GNU coreutils env, but does not add support for long options. MFC after: 3 days Relnotes: yes Sponsored by: Klara, Inc. Reviewed by: 0mp, bcr Differential Revision: https://reviews.freebsd.org/D47008 (cherry picked from commit 6f6166e49c78f6460732c02bbbba6fcc218221cf) env: Check the status of stdout. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47009 (cherry picked from commit c2d93a803acef634bd0eede6673aeea59e90c277) --- etc/mtree/BSD.tests.dist | 2 + usr.bin/env/Makefile | 4 ++ usr.bin/env/env.1 | 41 ++++++++--- usr.bin/env/env.c | 24 +++++-- usr.bin/env/tests/Makefile | 6 ++ usr.bin/env/tests/env_test.sh | 160 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 222 insertions(+), 15 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 95328d6d293f..a756236fd534 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1057,6 +1057,8 @@ .. du .. + env + .. factor .. file2c diff --git a/usr.bin/env/Makefile b/usr.bin/env/Makefile index af2e65dd5fc1..d7a34fce92aa 100644 --- a/usr.bin/env/Makefile +++ b/usr.bin/env/Makefile @@ -1,4 +1,5 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 +.include PACKAGE= runtime PROG= env @@ -6,4 +7,7 @@ SRCS= env.c envopts.c LIBADD= util +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests + .include diff --git a/usr.bin/env/env.1 b/usr.bin/env/env.1 index 8aa78e110505..4badea716143 100644 --- a/usr.bin/env/env.1 +++ b/usr.bin/env/env.1 @@ -30,7 +30,7 @@ .\" From @(#)printenv.1 8.1 (Berkeley) 6/6/93 .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" -.Dd March 3, 2021 +.Dd October 8, 2024 .Dt ENV 1 .Os .Sh NAME @@ -44,6 +44,7 @@ .Op Ar name Ns = Ns Ar value ... .Nm .Op Fl iv +.Op Fl C Ar altwd .Op Fl L Ns | Ns Fl U Ar user Ns Op / Ns Ar class .Op Fl P Ar altpath .Op Fl S Ar string @@ -81,6 +82,12 @@ The environment inherited by .Nm is ignored completely. +.\" -C +.It Fl C Ar altwd +Change to the specified alternate working directory before executing +the specified +.Ar utility +program. .\" -L | -U .It Fl L | Fl U Ar user Ns Op / Ns Ar class Add the environment variable definitions from @@ -173,6 +180,19 @@ Both and .Ar utility may not be specified together. +.Pp +The +.Nm +utility does not handle values of +.Ar utility +which have an equals sign +.Pq Ql = +in their name, for obvious reasons. +This can easily be worked around by interposing the +.Xr command 1 +utility, which simply executes its arguments; see +.Sx EXAMPLES +below. .\" .Ss Details of -S (split-string) processing The processing of the @@ -471,6 +491,11 @@ and options: .Pp .Dl "#!/usr/bin/env -S-P/usr/local/bin:/usr/bin:${PATH} perl" +.Pp +To execute a utility with an equal sign in its name: +.Bd -literal -offset indent +env name=value ... command foo=bar arg ... +.Ed .Sh COMPATIBILITY The .Nm @@ -490,7 +515,7 @@ The utility conforms to .St -p1003.1-2001 . The -.Fl 0 , L , P , S , U , u +.Fl 0 , C , L , P , S , U , u and .Fl v options are non-standard extensions supported by @@ -513,15 +538,11 @@ and .Fl U options were added in .Fx 13.0 . -.Sh BUGS The -.Nm -utility does not handle values of -.Ar utility -which have an equals sign -.Pq Ql = -in their name, for obvious reasons. -.Pp +.Fl C +option was added in +.Fx 14.2 . +.Sh BUGS The .Nm utility does not take multibyte characters into account when diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c index 784caa76063e..724a17d8be4f 100644 --- a/usr.bin/env/env.c +++ b/usr.bin/env/env.c @@ -72,7 +72,7 @@ static void usage(void) __dead2; int main(int argc, char **argv) { - char *altpath, **ep, *p, **parg, term; + char *altpath, *altwd, **ep, *p, **parg, term; char *cleanenv[1]; char *login_class, *login_name; struct passwd *pw; @@ -83,6 +83,7 @@ main(int argc, char **argv) int rtrn; altpath = NULL; + altwd = NULL; login_class = NULL; login_name = NULL; pw = NULL; @@ -90,7 +91,7 @@ main(int argc, char **argv) login_as_user = false; want_clear = 0; term = '\n'; - while ((ch = getopt(argc, argv, "-0iL:P:S:U:u:v")) != -1) + while ((ch = getopt(argc, argv, "-0C:iL:P:S:U:u:v")) != -1) switch(ch) { case '-': case 'i': @@ -99,6 +100,9 @@ main(int argc, char **argv) case '0': term = '\0'; break; + case 'C': + altwd = optarg; + break; case 'U': login_as_user = true; /* FALLTHROUGH */ @@ -106,7 +110,7 @@ main(int argc, char **argv) login_name = optarg; break; case 'P': - altpath = strdup(optarg); + altpath = optarg; break; case 'S': /* @@ -199,6 +203,9 @@ main(int argc, char **argv) if (*argv) { if (term == '\0') errx(EXIT_CANCELED, "cannot specify command with -0"); + if (altwd && chdir(altwd) != 0) + err(EXIT_CANCELED, "cannot change directory to '%s'", + altwd); if (altpath) search_paths(altpath, argv); if (env_verbosity) { @@ -212,9 +219,16 @@ main(int argc, char **argv) execvp(*argv, argv); err(errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE, "%s", *argv); + } else { + if (altwd) + errx(EXIT_CANCELED, "must specify command with -C"); + if (altpath) + errx(EXIT_CANCELED, "must specify command with -P"); } for (ep = environ; *ep; ep++) (void)printf("%s%c", *ep, term); + if (fflush(stdout) != 0) + err(1, "stdout"); exit(0); } @@ -222,7 +236,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: env [-0iv] [-L|-U user[/class]] [-P utilpath] [-S string] [-u name]\n" - " [name=value ...] [utility [argument ...]]\n"); + "usage: env [-0iv] [-C workdir] [-L|-U user[/class]] [-P utilpath] [-S string]\n" + " [-u name] [name=value ...] [utility [argument ...]]\n"); exit(1); } diff --git a/usr.bin/env/tests/Makefile b/usr.bin/env/tests/Makefile new file mode 100644 index 000000000000..3d2f77b34b67 --- /dev/null +++ b/usr.bin/env/tests/Makefile @@ -0,0 +1,6 @@ +PACKAGE= tests + +ATF_TESTS_SH= env_test +BINDIR= ${TESTSDIR} + +.include diff --git a/usr.bin/env/tests/env_test.sh b/usr.bin/env/tests/env_test.sh new file mode 100644 index 000000000000..2dc8f1a4c911 --- /dev/null +++ b/usr.bin/env/tests/env_test.sh @@ -0,0 +1,160 @@ +# +# Copyright (c) 2024 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +magic_words="Squeamish $$ Ossifrage" + +atf_test_case basic +basic_head() +{ + atf_set "descr" "Basic test case" +} +basic_body() +{ + atf_check -o match:"^magic_words=${magic_words}\$" \ + env magic_words="${magic_words}" + export MAGIC_WORDS="${magic_words}" + atf_check -o match:"^MAGIC_WORDS=${magic_words}\$" \ + env + unset MAGIC_WORDS +} + +atf_test_case unset +unset_head() +{ + atf_set "descr" "Unset a variable" +} +unset_body() +{ + export MAGIC_WORDS="${magic_words}" + atf_check -o not-match:"^MAGIC_WORDS=" \ + env -u MAGIC_WORDS + unset MAGIC_WORDS +} + +atf_test_case empty +empty_head() +{ + atf_set "descr" "Empty environment" +} +empty_body() +{ + atf_check env -i +} + +atf_test_case true +true_head() +{ + atf_set "descr" "Run true" +} +true_body() +{ + atf_check env true +} + +atf_test_case false +false_head() +{ + atf_set "descr" "Run false" +} +false_body() +{ + atf_check -s exit:1 env false +} + +atf_test_case false +false_head() +{ + atf_set "descr" "Run false" +} +false_body() +{ + atf_check -s exit:1 env false +} + +atf_test_case altpath +altpath_head() +{ + atf_set "descr" "Use alternate path" +} +altpath_body() +{ + echo "echo ${magic_words}" >magic_words + chmod 0755 magic_words + atf_check -s exit:125 -e match:"must specify command" \ + env -P "${PWD}" + atf_check -s exit:127 -e match:"No such file" \ + env magic_words + atf_check -o inline:"${magic_words}\n" \ + env -P "${PWD}" magic_words +} + +atf_test_case equal +equal_head() +{ + atf_set "descr" "Command name contains equal sign" +} +equal_body() +{ + echo "echo ${magic_words}" >"magic=words" + chmod 0755 "magic=words" + atf_check -o match:"^${PWD}/magic=words$" \ + env "${PWD}/magic=words" + atf_check -s exit:125 -e match:"must specify command" \ + env -P "${PATH}:${PWD}" "magic=words" + atf_check -o inline:"${magic_words}\n" \ + env command "${PWD}/magic=words" + atf_check -o inline:"${magic_words}\n" \ + env PATH="${PATH}:${PWD}" command "magic=words" +} + +atf_test_case chdir +chdir_head() +{ + atf_set "descr" "Change working directory" +} +chdir_body() +{ + local subdir="dir.$$" + atf_check -o inline:"${PWD}\n" \ + env pwd + atf_check -s exit:125 -e match:"must specify command" \ + env -C "${subdir}" + atf_check -s exit:125 \ + -e match:"cannot change directory to '${subdir}':" \ + env -C "${subdir}" pwd + atf_check mkdir "${subdir}" + atf_check -o inline:"${PWD}/${subdir}\n" \ + env -C "${subdir}" pwd +} + +atf_test_case stdout +stdout_head() +{ + atf_set descr "Failure to write to stdout" +} +stdout_body() +{ + ( + trap "" PIPE + env 2>stderr + echo $? >result + ) | true + atf_check -o inline:"1\n" cat result + atf_check -o match:"stdout" cat stderr +} + +atf_init_test_cases() +{ + atf_add_test_case basic + atf_add_test_case unset + atf_add_test_case empty + atf_add_test_case true + atf_add_test_case false + atf_add_test_case altpath + atf_add_test_case equal + atf_add_test_case chdir + atf_add_test_case stdout +} From nobody Tue Oct 15 06:30:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSPNg1Zy5z5YQQq; Tue, 15 Oct 2024 06:30:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSPNf6wt2z4tZ1; Tue, 15 Oct 2024 06:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728973827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gy2FxaztARHxATR2lweXEnOjtnsTnCDxIc7wsSIcmqw=; b=ie1tLT5A4erfsZt8DPBiu7yMIrtP+qqXlNLa6l6Ek8F9Ez2oUw41wQj4FZl/45bLOUto/C 3YdtbTg29UnBrjSQnai5f+mAUxV0drtNjwxXYUpX2i96UB40jmN3jBp0651ozFzJQeTkA7 yqG0+H6kI12qf4YYtbXx+sEc8hITv28yhXv5+focGEowSwwkql//R+FepoA39XUbhD/LB/ 2yXR94rhYHi3kGmZ9NeILqu8kGpqXT0uaAmDyh+GwlQ0KFB5eHHmh4JUUeFOzCB5kNfCRn ak7+MMaBgyhNVQfzTcakyjQVlnfawcdw6Je8ZSPjc39c+z7KFM4m9VrfXNy50Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728973827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gy2FxaztARHxATR2lweXEnOjtnsTnCDxIc7wsSIcmqw=; b=mbvDWR46GCOpg4zQnygU4bCvdzKfxOQ95zvyaRnDoAj4EKNUAeO9gUB/GhBZEapVs5NyTD zGXiLHKe0Gx3TzcO98vxQ06LakE8kTe9G+rXqesA1PCPrpMwoIt6O6sXv0VybDEl/v8NvR tXclQeB2j36FTvwunZTrfuOPKas1rA1jDHMtCOwNUpJTKAUHmvwH/kQ53r0/VTvcttZFXr n/vtJe8i3OuovRsed9gk1BHyxD4mvavc2v5zn4yRjboxwApQmmtOWNRIIYjVIIi4bAk3oq la3+dbAVsilRot+wuXyJT1dPlJAaBs1mq4f9JEA2NmB2xjIKoa9gE5HyWo653w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728973827; a=rsa-sha256; cv=none; b=sv40hUewcslj6Ijs9lBdljf1M2hRyrmGydaOcqs9R454hS8XGuGBZr6nxuHYzqhiNp7beX pZOAdWncGkq5C4BpL35xXx7XTrqWbLtBGY86hSANA4tG779/Dt73nq9C2Z3McAh8V0Appm hgilDYJ8RXlNfgnVbrFMHKvK2Y5ZqZl1OqSsCkoZP6pnUWbSSm4Ju/j/tuRAN1r/9f1BRZ 1gA+ixeVwg5aPnJlb3z6YQ4jg/AEorJv4UjVOIvB/uxN4w4PGZLpQe67/xMFjIKUpaaZu9 3h3KMMdNav5fT+l79nTv3z7kFrzjFnToMob5DkSTjeE15KPg7KK924UanCEA6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSPNf6W78z19vG; Tue, 15 Oct 2024 06:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49F6UQBa016013; Tue, 15 Oct 2024 06:30:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49F6UQUV016010; Tue, 15 Oct 2024 06:30:26 GMT (envelope-from git) Date: Tue, 15 Oct 2024 06:30:26 GMT Message-Id: <202410150630.49F6UQUV016010@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: 02a8a4e4eb25 - stable/14 - cmp: Style and type issues. 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: 02a8a4e4eb25cb51d244ef835146108f01bc249e Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=02a8a4e4eb25cb51d244ef835146108f01bc249e commit 02a8a4e4eb25cb51d244ef835146108f01bc249e Author: Dag-Erling Smørgrav AuthorDate: 2024-10-09 12:08:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-15 05:25:17 +0000 cmp: Style and type issues. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D47019 (cherry picked from commit d350e8d795d53dbc58ea428f76355cf5e28f6116) cmp: Check the status of stdout. POSIX requires us to print an error message and exit non-zero if writing to stdout fails. This can only happen if sflag is unset. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47020 (cherry picked from commit 3c37828ee1874754e1c5e96268016113c1e02ba2) --- usr.bin/cmp/cmp.c | 29 +++++++++++++++----------- usr.bin/cmp/extern.h | 6 +++--- usr.bin/cmp/link.c | 18 ++++++++++------- usr.bin/cmp/misc.c | 10 +++------ usr.bin/cmp/regular.c | 36 ++++++++++++++++++--------------- usr.bin/cmp/special.c | 19 ++++++++++------- usr.bin/cmp/tests/cmp_test2.sh | 46 ++++++++++++++++++++++++++++++++++-------- 7 files changed, 104 insertions(+), 60 deletions(-) diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index 56775e73ffa2..d6eb53620126 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -51,6 +51,7 @@ static char sccsid[] = "@(#)cmp.c 8.3 (Berkeley) 4/2/94"; #include #include #include +#include #include #include #include @@ -79,7 +80,6 @@ volatile sig_atomic_t info; static void siginfo(int signo) { - info = signo; } #endif @@ -113,8 +113,9 @@ main(int argc, char *argv[]) int ch, fd1, fd2, oflag; bool special; const char *file1, *file2; + int ret; - limit = skip1 = skip2 = 0; + limit = skip1 = skip2 = ret = 0; oflag = O_RDONLY; while ((ch = getopt_long(argc, argv, "+bhi:ln:sxz", long_opts, NULL)) != -1) switch (ch) { @@ -212,8 +213,8 @@ main(int argc, char *argv[]) if (fd1 == -1) { if (fd2 == -1) { - c_link(file1, skip1, file2, skip2, limit); - exit(0); + ret = c_link(file1, skip1, file2, skip2, limit); + goto end; } else if (!sflag) errx(ERR_EXIT, "%s: Not a symbolic link", file2); else @@ -252,19 +253,23 @@ main(int argc, char *argv[]) #ifdef SIGINFO (void)signal(SIGINFO, siginfo); #endif - if (special) - c_special(fd1, file1, skip1, fd2, file2, skip2, limit); - else { + if (special) { + ret = c_special(fd1, file1, skip1, fd2, file2, skip2, limit); + } else { if (zflag && sb1.st_size != sb2.st_size) { if (!sflag) - (void) printf("%s %s differ: size\n", + (void)printf("%s %s differ: size\n", file1, file2); - exit(DIFF_EXIT); + ret = DIFF_EXIT; + } else { + ret = c_regular(fd1, file1, skip1, sb1.st_size, + fd2, file2, skip2, sb2.st_size, limit); } - c_regular(fd1, file1, skip1, sb1.st_size, - fd2, file2, skip2, sb2.st_size, limit); } - exit(0); +end: + if (!sflag && fflush(stdout) != 0) + err(ERR_EXIT, "stdout"); + exit(ret); } static void diff --git a/usr.bin/cmp/extern.h b/usr.bin/cmp/extern.h index e1327df949c3..bca82eab2ac4 100644 --- a/usr.bin/cmp/extern.h +++ b/usr.bin/cmp/extern.h @@ -36,10 +36,10 @@ #define DIFF_EXIT 1 #define ERR_EXIT 2 /* error exit code */ -void c_link(const char *, off_t, const char *, off_t, off_t); -void c_regular(int, const char *, off_t, off_t, int, const char *, off_t, +int c_link(const char *, off_t, const char *, off_t, off_t); +int c_regular(int, const char *, off_t, off_t, int, const char *, off_t, off_t, off_t); -void c_special(int, const char *, off_t, int, const char *, off_t, off_t); +int c_special(int, const char *, off_t, int, const char *, off_t, off_t); void diffmsg(const char *, const char *, off_t, off_t, int, int); void eofmsg(const char *); diff --git a/usr.bin/cmp/link.c b/usr.bin/cmp/link.c index 550273cb471a..070f52986d50 100644 --- a/usr.bin/cmp/link.c +++ b/usr.bin/cmp/link.c @@ -28,6 +28,7 @@ #include #include + #include #include #include @@ -37,13 +38,14 @@ #include "extern.h" -void +int c_link(const char *file1, off_t skip1, const char *file2, off_t skip2, off_t limit) { char buf1[PATH_MAX], *p1; char buf2[PATH_MAX], *p2; - int dfound, len1, len2; + ssize_t len1, len2; + int dfound; off_t byte; u_char ch; @@ -86,15 +88,17 @@ c_link(const char *file1, off_t skip1, const char *file2, off_t skip2, else (void)printf("%6lld %3o %3o\n", (long long)byte, ch, *p2); - } else + } else { diffmsg(file1, file2, byte, 1, ch, *p2); - /* NOTREACHED */ + return (DIFF_EXIT); + } } byte++; } - if (*p1 || *p2) + if (*p1 || *p2) { eofmsg (*p1 ? file2 : file1); - if (dfound) - exit(DIFF_EXIT); + return (DIFF_EXIT); + } + return (dfound ? DIFF_EXIT : 0); } diff --git a/usr.bin/cmp/misc.c b/usr.bin/cmp/misc.c index 1924025a3a5d..d96654c57074 100644 --- a/usr.bin/cmp/misc.c +++ b/usr.bin/cmp/misc.c @@ -50,17 +50,15 @@ eofmsg(const char *file) { if (!sflag) warnx("EOF on %s", file); - exit(DIFF_EXIT); } void diffmsg(const char *file1, const char *file2, off_t byte, off_t line, int b1, int b2) { - if (sflag) - goto out; - - if (bflag) { + if (sflag) { + /* nothing */ + } else if (bflag) { (void)printf("%s %s differ: char %lld, line %lld is %3o %c %3o %c\n", file1, file2, (long long)byte, (long long)line, b1, b1, b2, b2); @@ -68,6 +66,4 @@ diffmsg(const char *file1, const char *file2, off_t byte, off_t line, (void)printf("%s %s differ: char %lld, line %lld\n", file1, file2, (long long)byte, (long long)line); } -out: - exit(DIFF_EXIT); } diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c index fbe62bb75602..7f7afc5862dd 100644 --- a/usr.bin/cmp/regular.c +++ b/usr.bin/cmp/regular.c @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)regular.c 8.3 (Berkeley) 4/2/94"; #include #include #include +#include #include #include #include @@ -56,7 +57,7 @@ static void segv_handler(int); #define ROUNDPAGE(i) ((i) & ~pagemask) -void +int c_regular(int fd1, const char *file1, off_t skip1, off_t len1, int fd2, const char *file2, off_t skip2, off_t len2, off_t limit) { @@ -68,15 +69,19 @@ c_regular(int fd1, const char *file1, off_t skip1, off_t len1, size_t pagesize; int dfound; - if (skip1 > len1) + if (skip1 > len1) { eofmsg(file1); + return (DIFF_EXIT); + } len1 -= skip1; - if (skip2 > len2) + if (skip2 > len2) { eofmsg(file2); + return (DIFF_EXIT); + } len2 -= skip2; if (sflag && len1 != len2) - exit(DIFF_EXIT); + return (DIFF_EXIT); pagesize = getpagesize(); pagemask = (off_t)pagesize - 1; @@ -88,14 +93,12 @@ c_regular(int fd1, const char *file1, off_t skip1, off_t len1, length = MIN(length, limit); if ((m1 = remmap(NULL, fd1, off1)) == NULL) { - c_special(fd1, file1, skip1, fd2, file2, skip2, limit); - return; + return (c_special(fd1, file1, skip1, fd2, file2, skip2, limit)); } if ((m2 = remmap(NULL, fd2, off2)) == NULL) { munmap(m1, MMAP_CHUNK); - c_special(fd1, file1, skip1, fd2, file2, skip2, limit); - return; + return (c_special(fd1, file1, skip1, fd2, file2, skip2, limit)); } if (caph_rights_limit(fd1, cap_rights_init(&rights, CAP_MMAP_R)) < 0) @@ -126,21 +129,21 @@ c_regular(int fd1, const char *file1, off_t skip1, off_t len1, } #endif if ((ch = *p1) != *p2) { + dfound = 1; if (xflag) { - dfound = 1; (void)printf("%08llx %02x %02x\n", (long long)byte - 1, ch, *p2); } else if (lflag) { - dfound = 1; if (bflag) (void)printf("%6lld %3o %c %3o %c\n", (long long)byte, ch, ch, *p2, *p2); else (void)printf("%6lld %3o %3o\n", (long long)byte, ch, *p2); - } else + } else { diffmsg(file1, file2, byte, line, ch, *p2); - /* NOTREACHED */ + return (DIFF_EXIT); + } } if (ch == '\n') ++line; @@ -167,10 +170,11 @@ c_regular(int fd1, const char *file1, off_t skip1, off_t len1, if (sigaction(SIGSEGV, &oact, NULL)) err(ERR_EXIT, "sigaction()"); - if (len1 != len2) - eofmsg (len1 > len2 ? file2 : file1); - if (dfound) - exit(DIFF_EXIT); + if (len1 != len2) { + eofmsg(len1 > len2 ? file2 : file1); + return (DIFF_EXIT); + } + return (dfound ? DIFF_EXIT : 0); } static u_char * diff --git a/usr.bin/cmp/special.c b/usr.bin/cmp/special.c index 3da54fde24e4..98d18c019d88 100644 --- a/usr.bin/cmp/special.c +++ b/usr.bin/cmp/special.c @@ -40,12 +40,13 @@ static char sccsid[] = "@(#)special.c 8.3 (Berkeley) 4/2/94"; #include #include +#include #include #include #include "extern.h" -void +int c_special(int fd1, const char *file1, off_t skip1, int fd2, const char *file2, off_t skip2, off_t limit) { @@ -104,7 +105,7 @@ c_special(int fd1, const char *file1, off_t skip1, (long long)byte, ch1, ch2); } else { diffmsg(file1, file2, byte, line, ch1, ch2); - /* NOTREACHED */ + return (DIFF_EXIT); } } if (ch1 == '\n') @@ -116,13 +117,17 @@ eof: if (ferror(fp1)) if (ferror(fp2)) err(ERR_EXIT, "%s", file2); if (feof(fp1)) { - if (!feof(fp2)) + if (!feof(fp2)) { eofmsg(file1); - } else - if (feof(fp2)) + return (DIFF_EXIT); + } + } else { + if (feof(fp2)) { eofmsg(file2); + return (DIFF_EXIT); + } + } fclose(fp2); fclose(fp1); - if (dfound) - exit(DIFF_EXIT); + return (dfound ? DIFF_EXIT : 0); } diff --git a/usr.bin/cmp/tests/cmp_test2.sh b/usr.bin/cmp/tests/cmp_test2.sh index ca4f6d7cf848..2ec6071851d3 100755 --- a/usr.bin/cmp/tests/cmp_test2.sh +++ b/usr.bin/cmp/tests/cmp_test2.sh @@ -31,12 +31,12 @@ special_head() { special_body() { echo 0123456789abcdef > a echo 0123456789abcdeg > b - atf_check -s exit:0 -o empty -e empty -x "cat a | cmp a -" - atf_check -s exit:0 -o empty -e empty -x "cat a | cmp - a" - atf_check -s exit:1 -o not-empty -e empty -x "cat b | cmp a -" - atf_check -s exit:1 -o not-empty -e empty -x "cat b | cmp - a" + atf_check -s exit:0 -o empty -e empty cmp a - stderr + echo $? >result + ) | true + atf_check -o inline:"2\n" cat result + atf_check -o match:"stdout" cat stderr +} + +atf_test_case stdout +stdout_head() +{ + atf_set descr "Failure to write to stdout" +} +stdout_body() +{ + echo a >a + echo b >b + atf_check_stdout a b + atf_check_stdout - b 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: 80c9caa46b1e - stable/13 - env: Add a handful of test cases. 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: 80c9caa46b1ec89cca4138a9c8da4fb6b54fbbf7 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=80c9caa46b1ec89cca4138a9c8da4fb6b54fbbf7 commit 80c9caa46b1ec89cca4138a9c8da4fb6b54fbbf7 Author: Dag-Erling Smørgrav AuthorDate: 2024-10-07 21:00:17 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-15 05:26:12 +0000 env: Add a handful of test cases. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46996 (cherry picked from commit 334af5e4131b21c658203635bf713d6a59846585) env: Improve documentation. * The `env` utility's inability to run a command whose name contains an equal sign is a feature, not a bug, so move that paragraph up from the BUGS section to the DESCRIPTION section. * Mention that this can be worked around by prefixing the command name with `command`, and add an example of this to the EXAMPLE section. * Add a test case which verifies that `env` does not run a command with an equal sign in its name even if it exists, and also demonstrates the workaround. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46997 (cherry picked from commit a0dfb0668b45506de97beb4c7acbe3fd1ba69fc8) env: Check the status of stdout. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47009 (cherry picked from commit c2d93a803acef634bd0eede6673aeea59e90c277) --- etc/mtree/BSD.tests.dist | 2 + usr.bin/env/Makefile | 4 ++ usr.bin/env/env.1 | 28 ++++++--- usr.bin/env/env.c | 2 + usr.bin/env/tests/Makefile | 6 ++ usr.bin/env/tests/env_test.sh | 137 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 170 insertions(+), 9 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index f4b70e543d7b..c2d99ae33e30 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1029,6 +1029,8 @@ .. du .. + env + .. file2c .. file diff --git a/usr.bin/env/Makefile b/usr.bin/env/Makefile index af2e65dd5fc1..d7a34fce92aa 100644 --- a/usr.bin/env/Makefile +++ b/usr.bin/env/Makefile @@ -1,4 +1,5 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 +.include PACKAGE= runtime PROG= env @@ -6,4 +7,7 @@ SRCS= env.c envopts.c LIBADD= util +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests + .include diff --git a/usr.bin/env/env.1 b/usr.bin/env/env.1 index 8aa78e110505..6858a6465b97 100644 --- a/usr.bin/env/env.1 +++ b/usr.bin/env/env.1 @@ -30,7 +30,7 @@ .\" From @(#)printenv.1 8.1 (Berkeley) 6/6/93 .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" -.Dd March 3, 2021 +.Dd October 7, 2024 .Dt ENV 1 .Os .Sh NAME @@ -173,6 +173,19 @@ Both and .Ar utility may not be specified together. +.Pp +The +.Nm +utility does not handle values of +.Ar utility +which have an equals sign +.Pq Ql = +in their name, for obvious reasons. +This can easily be worked around by interposing the +.Xr command 1 +utility, which simply executes its arguments; see +.Sx EXAMPLES +below. .\" .Ss Details of -S (split-string) processing The processing of the @@ -471,6 +484,11 @@ and options: .Pp .Dl "#!/usr/bin/env -S-P/usr/local/bin:/usr/bin:${PATH} perl" +.Pp +To execute a utility with an equal sign in its name: +.Bd -literal -offset indent +env name=value ... command foo=bar arg ... +.Ed .Sh COMPATIBILITY The .Nm @@ -516,14 +534,6 @@ options were added in .Sh BUGS The .Nm -utility does not handle values of -.Ar utility -which have an equals sign -.Pq Ql = -in their name, for obvious reasons. -.Pp -The -.Nm utility does not take multibyte characters into account when processing the .Fl S diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c index 8f2f0369c56b..3b7627e534e4 100644 --- a/usr.bin/env/env.c +++ b/usr.bin/env/env.c @@ -215,6 +215,8 @@ main(int argc, char **argv) } for (ep = environ; *ep; ep++) (void)printf("%s%c", *ep, term); + if (fflush(stdout) != 0) + err(1, "stdout"); exit(0); } diff --git a/usr.bin/env/tests/Makefile b/usr.bin/env/tests/Makefile new file mode 100644 index 000000000000..3d2f77b34b67 --- /dev/null +++ b/usr.bin/env/tests/Makefile @@ -0,0 +1,6 @@ +PACKAGE= tests + +ATF_TESTS_SH= env_test +BINDIR= ${TESTSDIR} + +.include diff --git a/usr.bin/env/tests/env_test.sh b/usr.bin/env/tests/env_test.sh new file mode 100644 index 000000000000..a3e05c050216 --- /dev/null +++ b/usr.bin/env/tests/env_test.sh @@ -0,0 +1,137 @@ +# +# Copyright (c) 2024 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +magic_words="Squeamish $$ Ossifrage" + +atf_test_case basic +basic_head() +{ + atf_set "descr" "Basic test case" +} +basic_body() +{ + atf_check -o match:"^magic_words=${magic_words}\$" \ + env magic_words="${magic_words}" + export MAGIC_WORDS="${magic_words}" + atf_check -o match:"^MAGIC_WORDS=${magic_words}\$" \ + env + unset MAGIC_WORDS +} + +atf_test_case unset +unset_head() +{ + atf_set "descr" "Unset a variable" +} +unset_body() +{ + export MAGIC_WORDS="${magic_words}" + atf_check -o not-match:"^MAGIC_WORDS=" \ + env -u MAGIC_WORDS + unset MAGIC_WORDS +} + +atf_test_case empty +empty_head() +{ + atf_set "descr" "Empty environment" +} +empty_body() +{ + atf_check env -i +} + +atf_test_case true +true_head() +{ + atf_set "descr" "Run true" +} +true_body() +{ + atf_check env true +} + +atf_test_case false +false_head() +{ + atf_set "descr" "Run false" +} +false_body() +{ + atf_check -s exit:1 env false +} + +atf_test_case false +false_head() +{ + atf_set "descr" "Run false" +} +false_body() +{ + atf_check -s exit:1 env false +} + +atf_test_case altpath +altpath_head() +{ + atf_set "descr" "Use alternate path" +} +altpath_body() +{ + echo "echo ${magic_words}" >magic_words + chmod 0755 magic_words + atf_check -s exit:127 -e match:"No such file" \ + env magic_words + atf_check -o inline:"${magic_words}\n" \ + env -P "${PWD}" magic_words +} + +atf_test_case equal +equal_head() +{ + atf_set "descr" "Command name contains equal sign" +} +equal_body() +{ + echo "echo ${magic_words}" >"magic=words" + chmod 0755 "magic=words" + atf_check -o match:"^${PWD}/magic=words$" \ + env "${PWD}/magic=words" + atf_check -o match:"^magic=words$" \ + env -P "${PATH}:${PWD}" "magic=words" + atf_check -o inline:"${magic_words}\n" \ + env command "${PWD}/magic=words" + atf_check -o inline:"${magic_words}\n" \ + env PATH="${PATH}:${PWD}" command "magic=words" +} + +atf_test_case stdout +stdout_head() +{ + atf_set descr "Failure to write to stdout" +} +stdout_body() +{ + ( + trap "" PIPE + env 2>stderr + echo $? >result + ) | true + atf_check -o inline:"1\n" cat result + atf_check -o match:"stdout" cat stderr +} + +atf_init_test_cases() +{ + atf_add_test_case basic + atf_add_test_case unset + atf_add_test_case empty + atf_add_test_case true + atf_add_test_case false + atf_add_test_case altpath + atf_add_test_case equal + atf_add_test_case stdout +} From nobody Tue Oct 15 06:30:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSPNj4n1gz5YQYm; Tue, 15 Oct 2024 06:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSPNj1yJSz4tLk; Tue, 15 Oct 2024 06:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728973829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GvZ0gbcKo0h8Y/aR1c4iIoyQ2IFZP9zW0QSroPKxgpY=; b=lRWVINDgc5UnpV2LNs/9nzKE4o92N5AAuzIdyKhLMXIN+AFKM4qx0NvIYKRMuYRC78QWUg b4vTh3E79HXOJyNiR0KcY8lnVZ1E2FIGWmOI8nA1yzalFx9WP20iUjZ4OD3vNo9HJBhJnE bBVVWd3HL9GhqiTBWc/cXG7sonXkGGDzmXueTNXCl9nzkrLOW9LUOtUQaPVTpvYGQ/f9Md ZWgnlb4agw9TceG11C+wUNJTGSKztKboQAD7KvDciq1kZ64mvpFBnX1PU2m2EVOPQddx3c mhqwM7fFgLBviYJde93S/aYqP90tpRUIH9JKlU6ql4ktJUKCmWtiMhPLfYx04w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728973829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GvZ0gbcKo0h8Y/aR1c4iIoyQ2IFZP9zW0QSroPKxgpY=; b=CD3fd17kVh7BTYxtKDpOkaIb9fiYymyLYs+Mn5ETUJd6gNwu+2vrNdVkt8qqnZ5VxgGvrB izBYf6h3GxpCWf8BBVDN72eoC2MriJ8VRtWkkoNa/zVcPR3pJsAKNsIIhYleMlbHSYIgGz d5cr18035qfNw/i6Zw30Q9WhVCq3DNVribuNCd3i8XBS1SFOZ0rvlVZtXJMOrg1vr+8k6u ZdHH5lIYJ6lK4EkxlJSGYCU5jLE/hJmQDb17scN3CAwyWto5GCyd9J85ZG+T8g/wqhW67+ ZxlCpAak1copmMJ71K+dX7YOx9jMe6kqSITvjJzQl7NcuVNpDAkL8XGA+26tTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728973829; a=rsa-sha256; cv=none; b=KDdG5xOV5kmQsN0W6W26OwUOqsXdMJvMTXlmgbvTTpdX3lx8waKkRvBz3u4KkG8JxoAioJ LYbNVv9bjmuBX7LYwI+OntXWNIQKWSJUK5s1QJFGHa87LuPYePpY/iAOkpka8Nt+okP9z8 /ek4XVgCXv7QX5LnpTGrjpfVXiTtxPSmujFUER9c05oqZ3OGahczbq8zcNQxMc/xtF11L0 /Ud+5dbrWFyxw7A1vTnFE/GHc+PMl6IccNq3zuBQrch/lAm+CwYAKA6sY1cSnSWwHpWIL8 wrA0xL20WT4VLx9ohThf7F2nZcfogsaBQqMYjuaTBYPyI2XdLjx5rtHsGWb+aA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSPNj1W9vz19ts; Tue, 15 Oct 2024 06:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49F6UT6R016207; Tue, 15 Oct 2024 06:30:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49F6UTiW016204; Tue, 15 Oct 2024 06:30:29 GMT (envelope-from git) Date: Tue, 15 Oct 2024 06:30:29 GMT Message-Id: <202410150630.49F6UTiW016204@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: 11b0b75a9fba - stable/13 - cmp: Style and type issues. 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: 11b0b75a9fba14d8f051c8d5bf30827ed9d8d580 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=11b0b75a9fba14d8f051c8d5bf30827ed9d8d580 commit 11b0b75a9fba14d8f051c8d5bf30827ed9d8d580 Author: Dag-Erling Smørgrav AuthorDate: 2024-10-09 12:08:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-15 05:26:24 +0000 cmp: Style and type issues. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D47019 (cherry picked from commit d350e8d795d53dbc58ea428f76355cf5e28f6116) cmp: Check the status of stdout. POSIX requires us to print an error message and exit non-zero if writing to stdout fails. This can only happen if sflag is unset. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47020 (cherry picked from commit 3c37828ee1874754e1c5e96268016113c1e02ba2) --- usr.bin/cmp/cmp.c | 29 +++++++++++++++----------- usr.bin/cmp/extern.h | 6 +++--- usr.bin/cmp/link.c | 18 ++++++++++------- usr.bin/cmp/misc.c | 10 +++------ usr.bin/cmp/regular.c | 36 ++++++++++++++++++--------------- usr.bin/cmp/special.c | 19 ++++++++++------- usr.bin/cmp/tests/cmp_test2.sh | 46 ++++++++++++++++++++++++++++++++++-------- 7 files changed, 104 insertions(+), 60 deletions(-) diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index 01ff26b2b8bc..53e21474da59 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -51,6 +51,7 @@ static char sccsid[] = "@(#)cmp.c 8.3 (Berkeley) 4/2/94"; #include #include #include +#include #include #include #include @@ -79,7 +80,6 @@ volatile sig_atomic_t info; static void siginfo(int signo) { - info = signo; } #endif @@ -113,8 +113,9 @@ main(int argc, char *argv[]) int ch, fd1, fd2, oflag; bool special; const char *file1, *file2; + int ret; - limit = skip1 = skip2 = 0; + limit = skip1 = skip2 = ret = 0; oflag = O_RDONLY; while ((ch = getopt_long(argc, argv, "+bhi:ln:sxz", long_opts, NULL)) != -1) switch (ch) { @@ -212,8 +213,8 @@ main(int argc, char *argv[]) if (fd1 == -1) { if (fd2 == -1) { - c_link(file1, skip1, file2, skip2, limit); - exit(0); + ret = c_link(file1, skip1, file2, skip2, limit); + goto end; } else if (!sflag) errx(ERR_EXIT, "%s: Not a symbolic link", file2); else @@ -252,19 +253,23 @@ main(int argc, char *argv[]) #ifdef SIGINFO (void)signal(SIGINFO, siginfo); #endif - if (special) - c_special(fd1, file1, skip1, fd2, file2, skip2, limit); - else { + if (special) { + ret = c_special(fd1, file1, skip1, fd2, file2, skip2, limit); + } else { if (zflag && sb1.st_size != sb2.st_size) { if (!sflag) - (void) printf("%s %s differ: size\n", + (void)printf("%s %s differ: size\n", file1, file2); - exit(DIFF_EXIT); + ret = DIFF_EXIT; + } else { + ret = c_regular(fd1, file1, skip1, sb1.st_size, + fd2, file2, skip2, sb2.st_size, limit); } - c_regular(fd1, file1, skip1, sb1.st_size, - fd2, file2, skip2, sb2.st_size, limit); } - exit(0); +end: + if (!sflag && fflush(stdout) != 0) + err(ERR_EXIT, "stdout"); + exit(ret); } static void diff --git a/usr.bin/cmp/extern.h b/usr.bin/cmp/extern.h index e1327df949c3..bca82eab2ac4 100644 --- a/usr.bin/cmp/extern.h +++ b/usr.bin/cmp/extern.h @@ -36,10 +36,10 @@ #define DIFF_EXIT 1 #define ERR_EXIT 2 /* error exit code */ -void c_link(const char *, off_t, const char *, off_t, off_t); -void c_regular(int, const char *, off_t, off_t, int, const char *, off_t, +int c_link(const char *, off_t, const char *, off_t, off_t); +int c_regular(int, const char *, off_t, off_t, int, const char *, off_t, off_t, off_t); -void c_special(int, const char *, off_t, int, const char *, off_t, off_t); +int c_special(int, const char *, off_t, int, const char *, off_t, off_t); void diffmsg(const char *, const char *, off_t, off_t, int, int); void eofmsg(const char *); diff --git a/usr.bin/cmp/link.c b/usr.bin/cmp/link.c index 550273cb471a..070f52986d50 100644 --- a/usr.bin/cmp/link.c +++ b/usr.bin/cmp/link.c @@ -28,6 +28,7 @@ #include #include + #include #include #include @@ -37,13 +38,14 @@ #include "extern.h" -void +int c_link(const char *file1, off_t skip1, const char *file2, off_t skip2, off_t limit) { char buf1[PATH_MAX], *p1; char buf2[PATH_MAX], *p2; - int dfound, len1, len2; + ssize_t len1, len2; + int dfound; off_t byte; u_char ch; @@ -86,15 +88,17 @@ c_link(const char *file1, off_t skip1, const char *file2, off_t skip2, else (void)printf("%6lld %3o %3o\n", (long long)byte, ch, *p2); - } else + } else { diffmsg(file1, file2, byte, 1, ch, *p2); - /* NOTREACHED */ + return (DIFF_EXIT); + } } byte++; } - if (*p1 || *p2) + if (*p1 || *p2) { eofmsg (*p1 ? file2 : file1); - if (dfound) - exit(DIFF_EXIT); + return (DIFF_EXIT); + } + return (dfound ? DIFF_EXIT : 0); } diff --git a/usr.bin/cmp/misc.c b/usr.bin/cmp/misc.c index 1924025a3a5d..d96654c57074 100644 --- a/usr.bin/cmp/misc.c +++ b/usr.bin/cmp/misc.c @@ -50,17 +50,15 @@ eofmsg(const char *file) { if (!sflag) warnx("EOF on %s", file); - exit(DIFF_EXIT); } void diffmsg(const char *file1, const char *file2, off_t byte, off_t line, int b1, int b2) { - if (sflag) - goto out; - - if (bflag) { + if (sflag) { + /* nothing */ + } else if (bflag) { (void)printf("%s %s differ: char %lld, line %lld is %3o %c %3o %c\n", file1, file2, (long long)byte, (long long)line, b1, b1, b2, b2); @@ -68,6 +66,4 @@ diffmsg(const char *file1, const char *file2, off_t byte, off_t line, (void)printf("%s %s differ: char %lld, line %lld\n", file1, file2, (long long)byte, (long long)line); } -out: - exit(DIFF_EXIT); } diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c index fbe62bb75602..7f7afc5862dd 100644 --- a/usr.bin/cmp/regular.c +++ b/usr.bin/cmp/regular.c @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)regular.c 8.3 (Berkeley) 4/2/94"; #include #include #include +#include #include #include #include @@ -56,7 +57,7 @@ static void segv_handler(int); #define ROUNDPAGE(i) ((i) & ~pagemask) -void +int c_regular(int fd1, const char *file1, off_t skip1, off_t len1, int fd2, const char *file2, off_t skip2, off_t len2, off_t limit) { @@ -68,15 +69,19 @@ c_regular(int fd1, const char *file1, off_t skip1, off_t len1, size_t pagesize; int dfound; - if (skip1 > len1) + if (skip1 > len1) { eofmsg(file1); + return (DIFF_EXIT); + } len1 -= skip1; - if (skip2 > len2) + if (skip2 > len2) { eofmsg(file2); + return (DIFF_EXIT); + } len2 -= skip2; if (sflag && len1 != len2) - exit(DIFF_EXIT); + return (DIFF_EXIT); pagesize = getpagesize(); pagemask = (off_t)pagesize - 1; @@ -88,14 +93,12 @@ c_regular(int fd1, const char *file1, off_t skip1, off_t len1, length = MIN(length, limit); if ((m1 = remmap(NULL, fd1, off1)) == NULL) { - c_special(fd1, file1, skip1, fd2, file2, skip2, limit); - return; + return (c_special(fd1, file1, skip1, fd2, file2, skip2, limit)); } if ((m2 = remmap(NULL, fd2, off2)) == NULL) { munmap(m1, MMAP_CHUNK); - c_special(fd1, file1, skip1, fd2, file2, skip2, limit); - return; + return (c_special(fd1, file1, skip1, fd2, file2, skip2, limit)); } if (caph_rights_limit(fd1, cap_rights_init(&rights, CAP_MMAP_R)) < 0) @@ -126,21 +129,21 @@ c_regular(int fd1, const char *file1, off_t skip1, off_t len1, } #endif if ((ch = *p1) != *p2) { + dfound = 1; if (xflag) { - dfound = 1; (void)printf("%08llx %02x %02x\n", (long long)byte - 1, ch, *p2); } else if (lflag) { - dfound = 1; if (bflag) (void)printf("%6lld %3o %c %3o %c\n", (long long)byte, ch, ch, *p2, *p2); else (void)printf("%6lld %3o %3o\n", (long long)byte, ch, *p2); - } else + } else { diffmsg(file1, file2, byte, line, ch, *p2); - /* NOTREACHED */ + return (DIFF_EXIT); + } } if (ch == '\n') ++line; @@ -167,10 +170,11 @@ c_regular(int fd1, const char *file1, off_t skip1, off_t len1, if (sigaction(SIGSEGV, &oact, NULL)) err(ERR_EXIT, "sigaction()"); - if (len1 != len2) - eofmsg (len1 > len2 ? file2 : file1); - if (dfound) - exit(DIFF_EXIT); + if (len1 != len2) { + eofmsg(len1 > len2 ? file2 : file1); + return (DIFF_EXIT); + } + return (dfound ? DIFF_EXIT : 0); } static u_char * diff --git a/usr.bin/cmp/special.c b/usr.bin/cmp/special.c index 3da54fde24e4..98d18c019d88 100644 --- a/usr.bin/cmp/special.c +++ b/usr.bin/cmp/special.c @@ -40,12 +40,13 @@ static char sccsid[] = "@(#)special.c 8.3 (Berkeley) 4/2/94"; #include #include +#include #include #include #include "extern.h" -void +int c_special(int fd1, const char *file1, off_t skip1, int fd2, const char *file2, off_t skip2, off_t limit) { @@ -104,7 +105,7 @@ c_special(int fd1, const char *file1, off_t skip1, (long long)byte, ch1, ch2); } else { diffmsg(file1, file2, byte, line, ch1, ch2); - /* NOTREACHED */ + return (DIFF_EXIT); } } if (ch1 == '\n') @@ -116,13 +117,17 @@ eof: if (ferror(fp1)) if (ferror(fp2)) err(ERR_EXIT, "%s", file2); if (feof(fp1)) { - if (!feof(fp2)) + if (!feof(fp2)) { eofmsg(file1); - } else - if (feof(fp2)) + return (DIFF_EXIT); + } + } else { + if (feof(fp2)) { eofmsg(file2); + return (DIFF_EXIT); + } + } fclose(fp2); fclose(fp1); - if (dfound) - exit(DIFF_EXIT); + return (dfound ? DIFF_EXIT : 0); } diff --git a/usr.bin/cmp/tests/cmp_test2.sh b/usr.bin/cmp/tests/cmp_test2.sh index ca4f6d7cf848..2ec6071851d3 100755 --- a/usr.bin/cmp/tests/cmp_test2.sh +++ b/usr.bin/cmp/tests/cmp_test2.sh @@ -31,12 +31,12 @@ special_head() { special_body() { echo 0123456789abcdef > a echo 0123456789abcdeg > b - atf_check -s exit:0 -o empty -e empty -x "cat a | cmp a -" - atf_check -s exit:0 -o empty -e empty -x "cat a | cmp - a" - atf_check -s exit:1 -o not-empty -e empty -x "cat b | cmp a -" - atf_check -s exit:1 -o not-empty -e empty -x "cat b | cmp - a" + atf_check -s exit:0 -o empty -e empty cmp a - stderr + echo $? >result + ) | true + atf_check -o inline:"2\n" cat result + atf_check -o match:"stdout" cat stderr +} + +atf_test_case stdout +stdout_head() +{ + atf_set descr "Failure to write to stdout" +} +stdout_body() +{ + echo a >a + echo b >b + atf_check_stdout a b + atf_check_stdout - b To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 11432d8f0765 - stable/14 - xen/blk{front,back}: fix usage of sector sizes different than 512b 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: royger X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 11432d8f076579adbfad6363f0440ebafc5971e5 Auto-Submitted: auto-generated The branch stable/14 has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=11432d8f076579adbfad6363f0440ebafc5971e5 commit 11432d8f076579adbfad6363f0440ebafc5971e5 Author: Roger Pau Monné AuthorDate: 2024-08-26 11:57:36 +0000 Commit: Roger Pau Monné CommitDate: 2024-10-15 08:12:19 +0000 xen/blk{front,back}: fix usage of sector sizes different than 512b The units of the size reported in the 'sectors' xenbus node is always 512b, regardless of the value of the 'sector-size' node. The sector offsets in the ring requests are also always based on 512b sectors, regardless of the 'sector-size' reported in xenbus. Fix both blkfront and blkback to assume 512b sectors in the required fields. The blkif.h public header has been recently updated in upstream Xen repository to fix the regressions in the specification introduced by later modifications, and clarify the base units of xenstore and shared ring fields. PR: 280884 Reported by: Christian Kujau MFC after: 1 week Sponsored by: Cloud Software Group Reviewed by: markj Differential revision: https://reviews.freebsd.org/D46756 (cherry picked from commit e7fe85643735ffdcf18ebef81343eaac9b8d2584) --- sys/dev/xen/blkback/blkback.c | 22 ++++++++++++++------- sys/dev/xen/blkfront/blkfront.c | 43 ++++++++++++++++++++++++++++++----------- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c index 43d2134ca5b3..8711bf0b08f5 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -145,6 +145,8 @@ static MALLOC_DEFINE(M_XENBLOCKBACK, "xbbd", "Xen Block Back Driver Data"); */ #define XBB_MAX_SEGMENTS_PER_REQLIST XBB_MAX_SEGMENTS_PER_REQUEST +#define XBD_SECTOR_SHFT 9 + /*--------------------------- Forward Declarations ---------------------------*/ struct xbb_softc; struct xbb_xen_req; @@ -1150,7 +1152,9 @@ xbb_get_resources(struct xbb_softc *xbb, struct xbb_xen_reqlist **reqlist, if (*reqlist == NULL) { *reqlist = nreqlist; nreqlist->operation = ring_req->operation; - nreqlist->starting_sector_number = ring_req->sector_number; + nreqlist->starting_sector_number = + (ring_req->sector_number << XBD_SECTOR_SHFT) >> + xbb->sector_size_shift; STAILQ_INSERT_TAIL(&xbb->reqlist_pending_stailq, nreqlist, links); } @@ -2476,13 +2480,13 @@ xbb_open_file(struct xbb_softc *xbb) xbb->sector_size = 512; /* - * Sanity check. The media size has to be at least one - * sector long. + * Sanity check. The media size must be a multiple of the sector + * size. */ - if (xbb->media_size < xbb->sector_size) { + if ((xbb->media_size % xbb->sector_size) != 0) { error = EINVAL; xenbus_dev_fatal(xbb->dev, error, - "file %s size %ju < block size %u", + "file %s size %ju not multiple of block size %u", xbb->dev_name, (uintmax_t)xbb->media_size, xbb->sector_size); @@ -3086,9 +3090,13 @@ xbb_publish_backend_info(struct xbb_softc *xbb) return (error); } + /* + * The 'sectors' node is special and always contains the size + * in units of 512b, regardless of the value in 'sector-size'. + */ leaf = "sectors"; - error = xs_printf(xst, our_path, leaf, - "%"PRIu64, xbb->media_num_sectors); + error = xs_printf(xst, our_path, leaf, "%ju", + (uintmax_t)(xbb->media_size >> XBD_SECTOR_SHFT)); if (error != 0) break; diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c index c7ce7eaa5d8e..a0e6e18ef8bf 100644 --- a/sys/dev/xen/blkfront/blkfront.c +++ b/sys/dev/xen/blkfront/blkfront.c @@ -159,7 +159,8 @@ xbd_free_command(struct xbd_command *cm) static void xbd_mksegarray(bus_dma_segment_t *segs, int nsegs, grant_ref_t * gref_head, int otherend_id, int readonly, - grant_ref_t * sg_ref, struct blkif_request_segment *sg) + grant_ref_t * sg_ref, struct blkif_request_segment *sg, + unsigned int sector_size) { struct blkif_request_segment *last_block_sg = sg + nsegs; vm_paddr_t buffer_ma; @@ -167,9 +168,9 @@ xbd_mksegarray(bus_dma_segment_t *segs, int nsegs, int ref; while (sg < last_block_sg) { - KASSERT(segs->ds_addr % (1 << XBD_SECTOR_SHFT) == 0, + KASSERT((segs->ds_addr & (sector_size - 1)) == 0, ("XEN disk driver I/O must be sector aligned")); - KASSERT(segs->ds_len % (1 << XBD_SECTOR_SHFT) == 0, + KASSERT((segs->ds_len & (sector_size - 1)) == 0, ("XEN disk driver I/Os must be a multiple of " "the sector length")); buffer_ma = segs->ds_addr; @@ -242,7 +243,8 @@ xbd_queue_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) xbd_mksegarray(segs, nsegs, &cm->cm_gref_head, xenbus_get_otherend_id(sc->xbd_dev), cm->cm_operation == BLKIF_OP_WRITE, - cm->cm_sg_refs, ring_req->seg); + cm->cm_sg_refs, ring_req->seg, + sc->xbd_disk->d_sectorsize); } else { blkif_request_indirect_t *ring_req; @@ -260,7 +262,8 @@ xbd_queue_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) xbd_mksegarray(segs, nsegs, &cm->cm_gref_head, xenbus_get_otherend_id(sc->xbd_dev), cm->cm_operation == BLKIF_OP_WRITE, - cm->cm_sg_refs, cm->cm_indirectionpages); + cm->cm_sg_refs, cm->cm_indirectionpages, + sc->xbd_disk->d_sectorsize); memcpy(ring_req->indirect_grefs, &cm->cm_indirectionrefs, sizeof(grant_ref_t) * sc->xbd_max_request_indirectpages); } @@ -360,7 +363,9 @@ xbd_bio_command(struct xbd_softc *sc) } cm->cm_bp = bp; - cm->cm_sector_number = (blkif_sector_t)bp->bio_pblkno; + cm->cm_sector_number = + ((blkif_sector_t)bp->bio_pblkno * sc->xbd_disk->d_sectorsize) >> + XBD_SECTOR_SHFT; switch (bp->bio_cmd) { case BIO_READ: @@ -632,7 +637,7 @@ xbd_dump(void *arg, void *virtual, off_t offset, size_t length) cm->cm_data = virtual; cm->cm_datalen = chunk; cm->cm_operation = BLKIF_OP_WRITE; - cm->cm_sector_number = offset / dp->d_sectorsize; + cm->cm_sector_number = offset >> XBD_SECTOR_SHFT; cm->cm_complete = xbd_dump_complete; xbd_enqueue_cm(cm, XBD_Q_READY); @@ -1026,7 +1031,19 @@ xbd_instance_create(struct xbd_softc *sc, blkif_sector_t sectors, sc->xbd_disk->d_stripesize = phys_sector_size; sc->xbd_disk->d_stripeoffset = 0; - sc->xbd_disk->d_mediasize = sectors * sector_size; + /* + * The 'sectors' xenbus node is always in units of 512b, regardless of + * the 'sector-size' xenbus node value. + */ + sc->xbd_disk->d_mediasize = sectors << XBD_SECTOR_SHFT; + if ((sc->xbd_disk->d_mediasize % sc->xbd_disk->d_sectorsize) != 0) { + error = EINVAL; + xenbus_dev_fatal(sc->xbd_dev, error, + "Disk size (%ju) not a multiple of sector size (%ju)", + (uintmax_t)sc->xbd_disk->d_mediasize, + (uintmax_t)sc->xbd_disk->d_sectorsize); + return (error); + } sc->xbd_disk->d_maxsize = sc->xbd_max_request_size; sc->xbd_disk->d_flags = DISKFLAG_UNMAPPED_BIO; if ((sc->xbd_flags & (XBDF_FLUSH|XBDF_BARRIER)) != 0) { @@ -1313,7 +1330,7 @@ xbd_connect(struct xbd_softc *sc) /* Allocate datastructures based on negotiated values. */ err = bus_dma_tag_create( bus_get_dma_tag(sc->xbd_dev), /* parent */ - 512, PAGE_SIZE, /* algnmnt, boundary */ + sector_size, PAGE_SIZE, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -1385,13 +1402,17 @@ xbd_connect(struct xbd_softc *sc) if (sc->xbd_disk == NULL) { device_printf(dev, "%juMB <%s> at %s", - (uintmax_t) sectors / (1048576 / sector_size), + (uintmax_t)((sectors << XBD_SECTOR_SHFT) / 1048576), device_get_desc(dev), xenbus_get_node(dev)); bus_print_child_footer(device_get_parent(dev), dev); - xbd_instance_create(sc, sectors, sc->xbd_vdevice, binfo, + err = xbd_instance_create(sc, sectors, sc->xbd_vdevice, binfo, sector_size, phys_sector_size); + if (err != 0) { + xenbus_dev_fatal(dev, err, "Unable to create instance"); + return; + } } (void)xenbus_set_state(dev, XenbusStateConnected); From nobody Tue Oct 15 08:26: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 4XSRyh4bwyz5YZ8M; Tue, 15 Oct 2024 08:26:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSRyh31Mbz46Xq; Tue, 15 Oct 2024 08:26:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728980796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BzcfwuX0t41zjTqIznuh3sUVkuXpIQeMVedXIx3TUj4=; b=brlu4gxe26RyhYdtwWNysl7iBjET095Ag4KR8XfCY202JRhYycAqNJOgnf/LJQEODqJH4A pwJx2hl/8Px2NFszJ6PxmDvSiaKTaGvzSK+LU09LGiVddOelIsWvuFitFiQf+EIrGPD0cR gTkq78NmQ0hxnneJ5/gbjb/aSXh1YHMQDvUtPijlxnezJ2hNXSxOb2s8yQ+Cefw18l19gS SUqteOAQi0NJYaGHw3Dai+DaOvbbikJtLPl5UVxx4If0ovp9sYrHH+Bw6O2o+JxA9Lv5d+ AaMT8aN/psDEb6NjM0bqXcZTfazgenQPPle4g8E9hcit0gDSZxc3LNg0TNEFNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728980796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BzcfwuX0t41zjTqIznuh3sUVkuXpIQeMVedXIx3TUj4=; b=OcDkMqPq0f9RyVgRf3xAvoLgL6FDXfhqdPDrdaI600LMZVkprlwImT24XFd298CtPtj7X1 NP58dZOz7pVZn4ZhhiPjyG/xzhuMYPowbPpyGWwK3LNcWRwxdIVZuoKWGnj+sYEkKIUgNQ wH5H5SLoFXqx7tq7SukEaZ6RqIl3F6nhDxL8FLbiazI5LBtyryKdMgpF3xVTCgiqbOU3eK NMwna/ndP+upjRzzkZ8JTxMH95YGh3h0XNGeQdKBWc99OQCuePqY7CbJNNpvO9nt1crzA/ rpKRLSCxyqZ+EfUyr1R+v60sJCmib0F4dZomYndrITchKhwF780W7Zb6vVaSXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728980796; a=rsa-sha256; cv=none; b=AbzPgXrQNILlUUnrB4HRLg/8ofDygH8hGHnyUB1STF3UcWN8Ona2wNy7uDbL2MJaR7japy bsou1LfOgkWIN7n3lrZFUjuRdwI+cQBcxDhSKCeRE+YSZu2T4RAVNfxMNz+wb/ID4+i/1e MHp0xAh9nQI3p6+8u8gYbR7A3lZBlSMkTatiPz5K74CLp1mQ6+LBPbVlK6uf5V/i1vavuT p7KIYkIyimBLHo/gt4sydxEoq1cqxzpGCl0Kta2+SjsDSxACsrEzYycVM3LVE3dharZ+ee MlFjoqbTiS+yUgT3BH3DSPIk+Pt0HfR9OohG8bJAHjzKmBlmzRRgUX9CrbrxTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSRyh1qx4zFYk; Tue, 15 Oct 2024 08:26:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49F8QaNQ009679; Tue, 15 Oct 2024 08:26:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49F8QaXu009676; Tue, 15 Oct 2024 08:26:36 GMT (envelope-from git) Date: Tue, 15 Oct 2024 08:26:36 GMT Message-Id: <202410150826.49F8QaXu009676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 9da7b206f9d6 - stable/13 - xen/blk{front,back}: fix usage of sector sizes different than 512b 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: royger X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9da7b206f9d673a81574d6d08ec430ab49599735 Auto-Submitted: auto-generated The branch stable/13 has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=9da7b206f9d673a81574d6d08ec430ab49599735 commit 9da7b206f9d673a81574d6d08ec430ab49599735 Author: Roger Pau Monné AuthorDate: 2024-08-26 11:57:36 +0000 Commit: Roger Pau Monné CommitDate: 2024-10-15 08:14:59 +0000 xen/blk{front,back}: fix usage of sector sizes different than 512b The units of the size reported in the 'sectors' xenbus node is always 512b, regardless of the value of the 'sector-size' node. The sector offsets in the ring requests are also always based on 512b sectors, regardless of the 'sector-size' reported in xenbus. Fix both blkfront and blkback to assume 512b sectors in the required fields. The blkif.h public header has been recently updated in upstream Xen repository to fix the regressions in the specification introduced by later modifications, and clarify the base units of xenstore and shared ring fields. PR: 280884 Reported by: Christian Kujau MFC after: 1 week Sponsored by: Cloud Software Group Reviewed by: markj Differential revision: https://reviews.freebsd.org/D46756 (cherry picked from commit e7fe85643735ffdcf18ebef81343eaac9b8d2584) --- sys/dev/xen/blkback/blkback.c | 22 ++++++++++++++------- sys/dev/xen/blkfront/blkfront.c | 43 ++++++++++++++++++++++++++++++----------- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c index a0ac8e13ec71..c58af5e9c90f 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -166,6 +166,8 @@ static MALLOC_DEFINE(M_XENBLOCKBACK, "xbbd", "Xen Block Back Driver Data"); */ #define XBB_MAX_SEGMENTS_PER_REQLIST XBB_MAX_SEGMENTS_PER_REQUEST +#define XBD_SECTOR_SHFT 9 + /*--------------------------- Forward Declarations ---------------------------*/ struct xbb_softc; struct xbb_xen_req; @@ -1226,7 +1228,9 @@ xbb_get_resources(struct xbb_softc *xbb, struct xbb_xen_reqlist **reqlist, if (*reqlist == NULL) { *reqlist = nreqlist; nreqlist->operation = ring_req->operation; - nreqlist->starting_sector_number = ring_req->sector_number; + nreqlist->starting_sector_number = + (ring_req->sector_number << XBD_SECTOR_SHFT) >> + xbb->sector_size_shift; STAILQ_INSERT_TAIL(&xbb->reqlist_pending_stailq, nreqlist, links); } @@ -2633,13 +2637,13 @@ xbb_open_file(struct xbb_softc *xbb) xbb->sector_size = 512; /* - * Sanity check. The media size has to be at least one - * sector long. + * Sanity check. The media size must be a multiple of the sector + * size. */ - if (xbb->media_size < xbb->sector_size) { + if ((xbb->media_size % xbb->sector_size) != 0) { error = EINVAL; xenbus_dev_fatal(xbb->dev, error, - "file %s size %ju < block size %u", + "file %s size %ju not multiple of block size %u", xbb->dev_name, (uintmax_t)xbb->media_size, xbb->sector_size); @@ -3260,9 +3264,13 @@ xbb_publish_backend_info(struct xbb_softc *xbb) return (error); } + /* + * The 'sectors' node is special and always contains the size + * in units of 512b, regardless of the value in 'sector-size'. + */ leaf = "sectors"; - error = xs_printf(xst, our_path, leaf, - "%"PRIu64, xbb->media_num_sectors); + error = xs_printf(xst, our_path, leaf, "%ju", + (uintmax_t)(xbb->media_size >> XBD_SECTOR_SHFT)); if (error != 0) break; diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c index 90b5130273b4..e1fcf378316d 100644 --- a/sys/dev/xen/blkfront/blkfront.c +++ b/sys/dev/xen/blkfront/blkfront.c @@ -160,7 +160,8 @@ xbd_free_command(struct xbd_command *cm) static void xbd_mksegarray(bus_dma_segment_t *segs, int nsegs, grant_ref_t * gref_head, int otherend_id, int readonly, - grant_ref_t * sg_ref, struct blkif_request_segment *sg) + grant_ref_t * sg_ref, struct blkif_request_segment *sg, + unsigned int sector_size) { struct blkif_request_segment *last_block_sg = sg + nsegs; vm_paddr_t buffer_ma; @@ -168,9 +169,9 @@ xbd_mksegarray(bus_dma_segment_t *segs, int nsegs, int ref; while (sg < last_block_sg) { - KASSERT(segs->ds_addr % (1 << XBD_SECTOR_SHFT) == 0, + KASSERT((segs->ds_addr & (sector_size - 1)) == 0, ("XEN disk driver I/O must be sector aligned")); - KASSERT(segs->ds_len % (1 << XBD_SECTOR_SHFT) == 0, + KASSERT((segs->ds_len & (sector_size - 1)) == 0, ("XEN disk driver I/Os must be a multiple of " "the sector length")); buffer_ma = segs->ds_addr; @@ -243,7 +244,8 @@ xbd_queue_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) xbd_mksegarray(segs, nsegs, &cm->cm_gref_head, xenbus_get_otherend_id(sc->xbd_dev), cm->cm_operation == BLKIF_OP_WRITE, - cm->cm_sg_refs, ring_req->seg); + cm->cm_sg_refs, ring_req->seg, + sc->xbd_disk->d_sectorsize); } else { blkif_request_indirect_t *ring_req; @@ -261,7 +263,8 @@ xbd_queue_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) xbd_mksegarray(segs, nsegs, &cm->cm_gref_head, xenbus_get_otherend_id(sc->xbd_dev), cm->cm_operation == BLKIF_OP_WRITE, - cm->cm_sg_refs, cm->cm_indirectionpages); + cm->cm_sg_refs, cm->cm_indirectionpages, + sc->xbd_disk->d_sectorsize); memcpy(ring_req->indirect_grefs, &cm->cm_indirectionrefs, sizeof(grant_ref_t) * sc->xbd_max_request_indirectpages); } @@ -361,7 +364,9 @@ xbd_bio_command(struct xbd_softc *sc) } cm->cm_bp = bp; - cm->cm_sector_number = (blkif_sector_t)bp->bio_pblkno; + cm->cm_sector_number = + ((blkif_sector_t)bp->bio_pblkno * sc->xbd_disk->d_sectorsize) >> + XBD_SECTOR_SHFT; switch (bp->bio_cmd) { case BIO_READ: @@ -633,7 +638,7 @@ xbd_dump(void *arg, void *virtual, off_t offset, size_t length) cm->cm_data = virtual; cm->cm_datalen = chunk; cm->cm_operation = BLKIF_OP_WRITE; - cm->cm_sector_number = offset / dp->d_sectorsize; + cm->cm_sector_number = offset >> XBD_SECTOR_SHFT; cm->cm_complete = xbd_dump_complete; xbd_enqueue_cm(cm, XBD_Q_READY); @@ -1027,7 +1032,19 @@ xbd_instance_create(struct xbd_softc *sc, blkif_sector_t sectors, sc->xbd_disk->d_stripesize = phys_sector_size; sc->xbd_disk->d_stripeoffset = 0; - sc->xbd_disk->d_mediasize = sectors * sector_size; + /* + * The 'sectors' xenbus node is always in units of 512b, regardless of + * the 'sector-size' xenbus node value. + */ + sc->xbd_disk->d_mediasize = sectors << XBD_SECTOR_SHFT; + if ((sc->xbd_disk->d_mediasize % sc->xbd_disk->d_sectorsize) != 0) { + error = EINVAL; + xenbus_dev_fatal(sc->xbd_dev, error, + "Disk size (%ju) not a multiple of sector size (%ju)", + (uintmax_t)sc->xbd_disk->d_mediasize, + (uintmax_t)sc->xbd_disk->d_sectorsize); + return (error); + } sc->xbd_disk->d_maxsize = sc->xbd_max_request_size; sc->xbd_disk->d_flags = DISKFLAG_UNMAPPED_BIO; if ((sc->xbd_flags & (XBDF_FLUSH|XBDF_BARRIER)) != 0) { @@ -1314,7 +1331,7 @@ xbd_connect(struct xbd_softc *sc) /* Allocate datastructures based on negotiated values. */ err = bus_dma_tag_create( bus_get_dma_tag(sc->xbd_dev), /* parent */ - 512, PAGE_SIZE, /* algnmnt, boundary */ + sector_size, PAGE_SIZE, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -1386,13 +1403,17 @@ xbd_connect(struct xbd_softc *sc) if (sc->xbd_disk == NULL) { device_printf(dev, "%juMB <%s> at %s", - (uintmax_t) sectors / (1048576 / sector_size), + (uintmax_t)((sectors << XBD_SECTOR_SHFT) / 1048576), device_get_desc(dev), xenbus_get_node(dev)); bus_print_child_footer(device_get_parent(dev), dev); - xbd_instance_create(sc, sectors, sc->xbd_vdevice, binfo, + err = xbd_instance_create(sc, sectors, sc->xbd_vdevice, binfo, sector_size, phys_sector_size); + if (err != 0) { + xenbus_dev_fatal(dev, err, "Unable to create instance"); + return; + } } (void)xenbus_set_state(dev, XenbusStateConnected); From nobody Tue Oct 15 09:28: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 4XSTLL2cd9z5Yf2q; Tue, 15 Oct 2024 09:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSTLL2724z4HbS; Tue, 15 Oct 2024 09:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728984522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WxH7SnDH7pPpYhGU4rclXcMkKgAawPdDaaEDkdpS85M=; b=VIbkNuzKXnS2UxndRCacOfcU9HIcugP9AF3uqfj3DXnrY103iTBtyIMR4NZpduk/U7v9LF 7/13ZQGHcRO0FCdWGCbrED1YNpsPuY+phrX3xK7PcS6/j3f/fOPppOo7KjHOHqU7lRsX1y a8yavn6n9OqD9Z017O/0AcNdN7SajPM5F3DmS3cQICT6fU+wpsm8puC2sqadHLyqCzJwOo n9GDPa2PTFhQopuS+LDzfucA6DxI1Otyw34O+jvaaAAAiw/ypMqCISefjpHQ/50yDa7t0b cASy8crgyrdztGZlbHnXiG5SPD2XJ10+X1ZgwIPnMWfp1/87vtGvz1jKlqT57g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728984522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WxH7SnDH7pPpYhGU4rclXcMkKgAawPdDaaEDkdpS85M=; b=d/ASnX1NbH33ZTobZ58tm71jZoeSTmQAz4gHxFBw8z1QCX0btl9YTTiE1+C286hrPK8PoR YvIyirGzDT7Dj67O4NaUIFUvxvx1M2DCJhtn3hOWHU1Yp2Zg6XyKJPfaI+XqbTVM5DBlnk Zz7aDxk523cGgIczoADE6sWLQbwd5Yg5gBK6VXHXqe9UG6fgt2JhuUCmX+R1535vay8HeC gxW50JG5hxeO+LSsSamGR40JsgVXfKurROU6Jc8wCZUCMxPQbUgI29Fl8IMQUKGuLKub8C HZUkxmFNRuePbclIrxEkPuKg8F1XbORDwctf1pBCq4Rz5UKRYcWdtVxXc3wQhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728984522; a=rsa-sha256; cv=none; b=kujpDwdzrLYXb9WWmvhNqV/9rd5iEB8R89pPrWsXYzhGQ5CYEW//Tv2y8WJ1MGtKyQ8iqB URC3U120NMUNSYMUHl5XHuvKD+s5Zz9puVvS2bB1eItH+qnmTSLq+riVjNCH+wuoR5aodY EexBZc0i8gR7+74zREfGQ0fluvetT+e5l2zjEb+gYEhYzheRWqcDITHwhLkD8WDV6SUi8k C3o3t7OAHh+qytHZngRdCCThsT1TldMDQI+/YfpwcMj1xZHQF1+tr68rBmve9rWbQqf83n 516H6nu5ZEmh3uCNbzWTqiV3D9YfsGncren4OaXeHurhi75Oisz/qcVstpC01w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSTLL1kBMzGyV; Tue, 15 Oct 2024 09:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49F9SgeO011692; Tue, 15 Oct 2024 09:28:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49F9SgNc011689; Tue, 15 Oct 2024 09:28:42 GMT (envelope-from git) Date: Tue, 15 Oct 2024 09:28:42 GMT Message-Id: <202410150928.49F9SgNc011689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dave Cottlehuber Subject: git: 1be84d745bcc - main - release: move OCI to ORACLE 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: dch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1be84d745bcc11b766ac1fa03afd2c8ea8771737 Auto-Submitted: auto-generated The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/src/commit/?id=1be84d745bcc11b766ac1fa03afd2c8ea8771737 commit 1be84d745bcc11b766ac1fa03afd2c8ea8771737 Author: Dave Cottlehuber AuthorDate: 2024-10-15 09:28:12 +0000 Commit: Dave Cottlehuber CommitDate: 2024-10-15 09:28:12 +0000 release: move OCI to ORACLE This allows future releng tooling to use OCI for the industry standard Open Container Initiative tooling, reducing potential for confusion. Approved by: cperciva Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46975 MFC after: 3 days Sponsored by: SkunkWerks, GmbH --- release/Makefile.vm | 8 ++++---- release/release.conf.sample | 2 +- release/tools/{oci.conf => oracle.conf} | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index b4fe6e23ffcd..a78a5f33a285 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -26,7 +26,7 @@ CLOUDWARE_TYPES?= AZURE \ BASIC-CLOUDINIT \ EC2 \ GCE \ - OCI \ + ORACLE \ VAGRANT AZURE_FORMAT= vhdf AZURE_FSLIST?= ufs zfs @@ -46,9 +46,9 @@ EC2-SMALL_DESC= Amazon EC2 small image GCE_FORMAT= raw GCE_FSLIST?= ufs zfs GCE_DESC= Google Compute Engine image -OCI_FORMAT= qcow2 -OCI_FSLIST?= ufs -OCI_DESC= Oracle Cloud Infrastructure image +ORACLE_FORMAT= qcow2 +ORACLE_FSLIST?= ufs +ORACLE_DESC= Oracle Cloud Infrastructure image OPENSTACK_FORMAT=qcow2 OPENSTACK_FSLIST?= ufs OPENSTACK_DESC= OpenStack platform image diff --git a/release/release.conf.sample b/release/release.conf.sample index 40f8457e8f89..c306efb13b65 100644 --- a/release/release.conf.sample +++ b/release/release.conf.sample @@ -113,4 +113,4 @@ PORTBRANCH="main" ## If WITH_CLOUDWARE is set to a non-empty value, this is a list of providers ## to create disk images. -#CLOUDWARE="EC2 GCE OCI VAGRANT-VIRTUALBOX VAGRANT-VMWARE" +#CLOUDWARE="EC2 GCE ORACLE VAGRANT-VIRTUALBOX VAGRANT-VMWARE" diff --git a/release/tools/oci.conf b/release/tools/oracle.conf similarity index 94% rename from release/tools/oci.conf rename to release/tools/oracle.conf index a4fe54ad3031..d3b4eb351107 100644 --- a/release/tools/oci.conf +++ b/release/tools/oracle.conf @@ -68,15 +68,15 @@ EOF # S14 Root user login must be disabled on serial-over-ssh console pw -R ${DESTDIR} usermod root -w no - # OCI requirements override the default FreeBSD cloud-init settings - cat <<-'EOF' >> ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_oci.cfg + # Oracle requirements override the default FreeBSD cloud-init settings + cat <<-'EOF' >> ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_oracle.cfg disable_root: true system_info: distro: freebsd default_user: name: freebsd lock_passwd: True - gecos: "OCI Default User" + gecos: "Oracle Cloud Default User" groups: [wheel] sudo: ["ALL=(ALL) NOPASSWD:ALL"] shell: /bin/sh From nobody Tue Oct 15 10:39:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSVwY34xkz5YkVZ; Tue, 15 Oct 2024 10:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSVwY2Vn1z4V2R; Tue, 15 Oct 2024 10:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728988797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5E46ffMv/ilOZb0mu1hxeTI0kSXl1V6ojSlRVQ6d2S8=; b=GYUgN4btvv2q9zvuEjN6Ywp2XmaRdkZYaVVMCzKqCx/9Mn+h5yM/1DFu/ROWu5sIJpYmM/ vhSYmJq0wZF4vbrIbDeSP/yk/auhdXZExGrU3GL5XzOEwLm7aRZu6dsTBmFUc01xoA9ETk ByP1GjaY5zQghyUYwRQIpdziIL31fUFYOFaAe0WQVtitQFOuXPLgOyFed3bDUVzWWFxOYt MfI+tT6UhdgLe4ee96Zpua+gX6MNokET116GcfV1Yc04AYkRbSxb+x0uodZYXaGxVYbTiT 7wTyO4DTLKMOfZcB0lnas2dzLYZe8vXyrjQekj+DV1Yl8KHc1bD9nySzuTX2bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728988797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5E46ffMv/ilOZb0mu1hxeTI0kSXl1V6ojSlRVQ6d2S8=; b=asf+VKLAqTEo5ZtjPNawE/sDdjp9aT/7BoojXtkt0KoW0F0n3MPafaEhsMJmqqU4efOMD4 ax44cZNTeqg/j6i5VAPfG7i9qcMhPFDGtjqXt0P4XwuV44ebLVgDIHo5K/4ZkWkd8sk8Fr 3VE9Sh9r1NsH3CxzbwuwHodv3UowVcZFqcRrq8+/6d+xUKOkY8v9/H5/b4Us0+T4KkfFmb MEmdOQE/rwNO3MNlsh87/QEhsIdbPXbgSC/nVzbVNbYAyh3n7SFkcvDDWh6zg/dPNbRMXY M0zAW9fR/B5R3lMEOXAR4pBcjaGQVs7gEeY1GONC4vtX2A2gawzk9YpTFHAi/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728988797; a=rsa-sha256; cv=none; b=DQkp40kgSYWnGb97scxHQ3As+lbm16tgHjb36O7jfhn1yPXkAHM201tNpmQfIGKsSZsb/N nRkn154xEDEwdRR03Z2ic81zOhbfpvR0tv/gVCN70i3+zXXneKtT9hqJvLKQI8quXq1CxB 1t/N2+eLMCC68/hrzD/CB9fuZTp+TzFvzdLJ39Vh8FqtS9BTmx47fH+91qROY9P0mIa/IF DkNJvefvuEc4xOxqo8ALmXg8AzP8VrAODFWalUWPAi54dEWalgGT0sFDSMaxFTrmQ+fNls VIo28cF/ovecSDEppyjp+ByllABGA29Rf0agoFwTux8GhpeiABxHN12wS0wL0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSVwY25trzJTY; Tue, 15 Oct 2024 10:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FAdvQf030091; Tue, 15 Oct 2024 10:39:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FAdvJG030088; Tue, 15 Oct 2024 10:39:57 GMT (envelope-from git) Date: Tue, 15 Oct 2024 10:39:57 GMT Message-Id: <202410151039.49FAdvJG030088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 6abd77142153 - main - ctypedef: Remove `|| true` from localedef command to reveal error sooner 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6abd77142153cc0f5ce49f3ffb38bc91f3444fae Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=6abd77142153cc0f5ce49f3ffb38bc91f3444fae commit 6abd77142153cc0f5ce49f3ffb38bc91f3444fae Author: Li-Wen Hsu AuthorDate: 2024-10-15 10:39:31 +0000 Commit: Li-Wen Hsu CommitDate: 2024-10-15 10:39:31 +0000 ctypedef: Remove `|| true` from localedef command to reveal error sooner Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47111 --- share/ctypedef/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/ctypedef/Makefile b/share/ctypedef/Makefile index cf3335267446..5583f7b74cf3 100644 --- a/share/ctypedef/Makefile +++ b/share/ctypedef/Makefile @@ -13,7 +13,7 @@ MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps .src.LC_CTYPE: localedef ${LOCALEDEF_ENDIAN} -D -U -c -w ${MAPLOC}/widths.txt \ -f ${MAPLOC}/map.${.IMPSRC:T:R:E} \ - -i ${.IMPSRC} ${.OBJDIR}/${.IMPSRC:T:R} || true + -i ${.IMPSRC} ${.OBJDIR}/${.IMPSRC:T:R} LOCALES+= C.UTF-8 .if ${MK_LOCALES} != no @@ -254,7 +254,7 @@ SYMPAIRS+= be_BY.CP1131.src ru_RU.KOI8-R.src ${t:S/src$/LC_CTYPE/}: $s localedef ${LOCALEDEF_ENDIAN} -D -U -c -w ${MAPLOC}/widths.txt \ -f ${MAPLOC}/map.${.TARGET:T:R:C/^.*\.//} \ - -i ${.ALLSRC} ${.OBJDIR}/${.TARGET:T:R} || true + -i ${.ALLSRC} ${.OBJDIR}/${.TARGET:T:R} .endfor .include From nobody Tue Oct 15 10:50: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 4XSW8z0CVfz5YlF6; Tue, 15 Oct 2024 10:50:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSW8y6m23z4W73; Tue, 15 Oct 2024 10:50:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728989442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=udGXI61t0LMa/f+VHu8iKazvsgtISSBqsLMiNiKxKi0=; b=DtLSf1402PrkkBRUE3J7aoVSLlhoYOqsdBnMZJZVNkD4wugZKmwROgBgNWDfxQAt+X0YgZ eMAarXXUV1znEQq3VTvirFUUI2lGjMP1SXXSC/99OZ4VKtx9akKi+rRiTkSnvXgQ9+Nl1p 6FDI2THYgGoOwQkY0E/txIxSWmvT9vUP0gvyx9YfJs47IpVPL2UCChAluZvb+2nKjkgQiH ByJZt2ZkZpKcUpa1UcVNUFxAHxs3lvsIQbmdnjxKnfon5jz/8KWXzFs6QuCf9scuJpe8UK q/V9vqAdsg5zcqr85ICHWvVZApFAS6l8eSJeD0DkWt1BjnvNXs2nqLAXo0Gjqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728989442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=udGXI61t0LMa/f+VHu8iKazvsgtISSBqsLMiNiKxKi0=; b=bfnYKC4gSgkjusSEQLANyBU0EwV4QuHvbn9DJSmDxFOCeSGuN5mV/gExPfcbpFdFsSo2dF +Zo7uNkm0lf7BfDhHIYYgGhL1cOalLhLSsSmT0jimkeorPtl9dwfgcy6Bd53HfQ3/tKhp2 HKyEx+tZE+2cnyNSaWO9lThJk78WWTjSTU3bBRO+9Iw7kP9XRHdj/owTRt9V3bhumheyUR tep31cqZok4J9XQkWWc9sLQLWeCgggyV+tJj+pCFlI+CLwhzqzbo/Runwm8f9tCKpruGts 5BILCebgew1kPSwrtgUsUy2Jl7ydubzh1nUxL0UIs4Cx/wVU8Ht6DmJ1XhI2sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728989442; a=rsa-sha256; cv=none; b=YFVi9DZi+hwdTHaDZIqUiAPHqV0LfKOg/RfMd9nGItJV9TOBuWDPdZv06ZgFXahfTIimQT qVgqRen5pi29NsJG43m+Pc6vTbvNRX3DKXWWTgMlW3xyxgQS9F/wL6r/dBvGLGAuTmDh4x vKabbWGBnc7/R7v3xnT5KA8Lb9Rvz/pPGjgM7h7+G87tHl2WkicB2B9Bqjyoeleib9H37g MRHEeU56//NOwzbFbGTkl8Rk+6unwJwAOhEEnmjQQQhRcOiObnSDLJAfAgIRrpMHRbUCyp wgTcdtbhjh6FFv1uYTWe+NOWBZZP+EQAE/j4q3cyA+Pcb0uKRYZhpVjZXZKc2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSW8y6DZDzJmG; Tue, 15 Oct 2024 10:50:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FAog5f055249; Tue, 15 Oct 2024 10:50:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FAogFa055246; Tue, 15 Oct 2024 10:50:42 GMT (envelope-from git) Date: Tue, 15 Oct 2024 10:50:42 GMT Message-Id: <202410151050.49FAogFa055246@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: 481d5a489164 - main - linux.h: don't redefine lower_32_bits if already defined 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: 481d5a4891648f0a6979a48689cc16fca80d4ab6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=481d5a4891648f0a6979a48689cc16fca80d4ab6 commit 481d5a4891648f0a6979a48689cc16fca80d4ab6 Author: Warner Losh AuthorDate: 2024-10-15 04:53:55 +0000 Commit: Warner Losh CommitDate: 2024-10-15 10:50:44 +0000 linux.h: don't redefine lower_32_bits if already defined systrace.c fails to build if we're using a common compiler.h for both openzfs and linuxkpi. The issue is easy enough to fix: don't redefined lower_32_bits if it's already defined in linux.h, since it's the least 'standardized'. This will allow systrace.c to build using an equivalent macro. MFC After: 3 days Sponsored by: Netflix --- sys/compat/linux/linux.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index 5a0d6e0b68c5..6d276b8a69f4 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -350,7 +350,9 @@ struct l_statx { #define LINUX_ST_RELATIME 0x1000 /* No native analogue */ #define LINUX_ST_NOSYMFOLLOW 0x2000 +#ifndef lower_32_bits #define lower_32_bits(n) ((uint32_t)((n) & 0xffffffff)) +#endif #ifdef KTRACE #define linux_ktrsigset(s, l) \ From nobody Tue Oct 15 11:01: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 4XSWP85gCrz5YlKm; Tue, 15 Oct 2024 11:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWP84RKjz4X9V; Tue, 15 Oct 2024 11:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JSfkxuLwj1vwQwA9d01TEQcrGkiRljouvPJen2bkZMM=; b=toHEpCJKWClU77OsSoE0Fku2jLbZIHgtPup+UV/xq8V7byRnhWy+B8arxJrdeC94FBhBdY k+Shgn30gW7fmBVWTzbtKLjXrvhEMxNFrr+Bi54HOhxM2ZWz+Uzgmk2sR6NZY6KX5rO4jU 9e/MUMuthi6SHyxKu0d/dnQ6OUg/8xTCkulitG9SdnA1cUO7a5jgm9MzW0utYK64K1gzCG /qzfRBaHRGawDxabYasN1ZI/HR7yPDE/VF15zNnwtS4lXHwynNgBSjfUzPSg+FM5aqU65O Hc+t0Vs410nl5vflk3RxgV5K8wbOMKsALmaUJLW1VBvlsKZNDIZsosnwxVfKMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JSfkxuLwj1vwQwA9d01TEQcrGkiRljouvPJen2bkZMM=; b=Bend8XxapYUo+P/vACjhS+m0vWUKzbBX0zIR/haZ0LmBJFFUEmWAn4JpC+7pPf2ix+2jN8 de5vYldYQpswhq36VxjDoSrqsR/4eQJOpqm2qpUZsCCNdKTZcAGnWzgoGkI+VFYw4zpNUn ICA6VKpICAX3kYwdOGN6WTJyz1Cr/g5EP3wi2N+LfjTqce7p0ojA2qN2OioOxFXSNU11Ui oYj5vhig86GwomHUpjYmz+Xa2WncmilqiKIGqRZinNLdob+SKLyvUeKcY9gPm/EfAK5d5U BghQfd6504Gv1QMPQGVwOfOGmrL+6aLG4rXFTxpbEJVzDQ/w9WSC3bmwxPEpEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990076; a=rsa-sha256; cv=none; b=nHfo88bI1xPMU986NWzqUhrtINBqT6lvsSMLbD9wiKpudA3SW01YC2uNntCVoJPz1Rqg71 4YNsxe6e4I6X0OQtXqfXIAi8gZ4jfm+vfUDfUlMwRnaVjnVdHVaWhyb6EaWsFAPhWa+X4a J0K0ycNmKhWPCLr3nW2k8bZwunC13DynuWdDn/e6RXaHjzdS6t3DMqItaUAiN4OMaaEy0Q dMLDLlES8IioVriamfIbefWL27YRE8N69dHr+rRA9Wa74dVq7SY/9H7/GJV6HXhTAtbBHy 9ZSNB8AJcRrGFdkTs/tmNA0C2n86Z7zqWuvb1r8giV7EaaUq83hIWWxwJeqmoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSWP842mgzJnX; Tue, 15 Oct 2024 11:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FB1GEx077364; Tue, 15 Oct 2024 11:01:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FB1Gxc077361; Tue, 15 Oct 2024 11:01:16 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:01:16 GMT Message-Id: <202410151101.49FB1Gxc077361@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: 28ce46d8625d - main - uart/pl011: Add support for computing rclk 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: 28ce46d8625d127a60dd4bb4fb721e5cbbd4096c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=28ce46d8625d127a60dd4bb4fb721e5cbbd4096c commit 28ce46d8625d127a60dd4bb4fb721e5cbbd4096c Author: Warner Losh AuthorDate: 2024-10-15 10:58:49 +0000 Commit: Warner Losh CommitDate: 2024-10-15 10:58:49 +0000 uart/pl011: Add support for computing rclk When instructed to do so, compute the rclk (baud rate generator clock) based on the currently programmed divisor and the communicated baud rate. We only do this once and only for consoles that tell us the configured rate and flag we can likely safely compute rclk. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D47077 --- sys/dev/uart/uart_dev_pl011.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c index daba9d19704c..4f946f7c5f36 100644 --- a/sys/dev/uart/uart_dev_pl011.c +++ b/sys/dev/uart/uart_dev_pl011.c @@ -231,6 +231,24 @@ uart_pl011_param(struct uart_bas *bas, int baudrate, int databits, int stopbits, __uart_setreg(bas, UART_IFLS, FIFO_IFLS_BITS); __uart_setreg(bas, UART_CR, ctrl); + + /* + * Loader tells us to infer the rclk when it sets xo to 0 in + * hw.uart.console. The APCI SPCR code does likewise. We know the + * baudrate was set by the firmware, so calculate rclk from baudrate and + * the divisor register. If 'div' is actually 0, the resulting 0 value + * will have us fall back to other rclk methods. This method should be + * good to 5% or better because the error in baud rates needs to be + * below this for devices to communicate. + */ + if (bas->rclk == 0 && baudrate > 0 && bas->rclk_guess) { + uint32_t div; + + div = ((__uart_getreg(bas, UART_IBRD) & IBRD_BDIVINT) << 6) | + (__uart_getreg(bas, UART_FBRD) & FBRD_BDIVFRAC); + bas->rclk = (div * baudrate) / 4; + } + } static void From nobody Tue Oct 15 11:01: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 4XSWPB0KbGz5YlSC; Tue, 15 Oct 2024 11:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWP95SBNz4X9W; Tue, 15 Oct 2024 11:01:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M8Yk518vrXUtuqXn7KOPQBMLiJA+tblBnaHoEqDI/x0=; b=pkwKBAX7i6GDlvlVdB4yv7GeLKq8PPfE7gn7qdtT/ZT2zM9jQVRoeSJuKDa3A2VwnndGIJ jCY1hTYhga1r+buoS4XWieeL3IhQYEQZsvIUwxWJ49PaCcKx/l9bPkgfWL/VAnNlFMCvwY l8spkACOaBsAImvbevWkVnEm3lv+1ROTyAyWNpCekk4OcmoCzDiI1D91LdCIlB5V55vEiT M31G0NUi6VO/eDctIgc3mrXmFakoCDZNRyXkod3YRLvVV9ZEn2FsH7SWaJPnSkn688o8UY g/cKcIMiwOikFQpcNOI51kRwM5LCPBVc5jt5FEMVrBoQs/lfwaW2aksCUaseIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M8Yk518vrXUtuqXn7KOPQBMLiJA+tblBnaHoEqDI/x0=; b=TrDaqm3if23iA6HgQQqePLrZoWO6ppRMiAVE0m1zgEnMjkopvMRubQA4JLTXuN7YFnnBcL yHRdL/nFj5HOjg7VSzCm3iVRArF+JpU01W+3UWZ3zjw1etc0G25Kpe5EehVGOVFjdF1OS9 HCDxWbQOJwnryeOiykGbTyyXdYoHqprT+UzhhVecvcW6B256+QwNOBXQHtPEshHEaWJbuy BSa0rR0M+vRTtERVb25gaBhmL/ytHsNXyPn87EZbTXnGV8RZDxCiPgsd4RHkoL4cp0G7M8 FFcBATBlOH1ElcrE+hc/70kuvVSMbHUgL1vwdmM5BM4kJPjgsgUDNZZS6KKPQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990077; a=rsa-sha256; cv=none; b=YRHk0MzQdYXdZRnopbSeduWhB97w2ecTZF1IkEbLzLX6ZQZ1K5B7vfvzUMNYwg0fPVP2lI 4AUgt9Bcm44BEqzkYEyVC+MpB1jwhDciaPG3ridsKvjqSW12EnxSsH+aC3f5yz0qeyj9CY un8blFG2shYhg13C/8Bc/vZHdqR96aWcMSqagmZn8nfjn58OC/U4IR6MoXNGJzvrRWv9ho er7xFnhV+cSg3aPpNLLqyiy0OZ9OsEJrGxPqJwLaW5DnDV6FFEMuLL+ShlESEwpBw52VNe KiRrcMERJmsktbIoIDjhlyt5xFGjBNS1q/eJU01uBJoQ7s9O2HntSRaqBYnnww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSWP954FfzJnY; Tue, 15 Oct 2024 11:01:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FB1HRj077424; Tue, 15 Oct 2024 11:01:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FB1HA5077421; Tue, 15 Oct 2024 11:01:17 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:01:17 GMT Message-Id: <202410151101.49FB1HA5077421@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: 76bfa33f2598 - main - uart: Go back to returning '0' when we've probed the device. 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: 76bfa33f259891a8b9108e20141bd18e2c8d312f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=76bfa33f259891a8b9108e20141bd18e2c8d312f commit 76bfa33f259891a8b9108e20141bd18e2c8d312f Author: Warner Losh AuthorDate: 2024-10-15 10:59:29 +0000 Commit: Warner Losh CommitDate: 2024-10-15 10:59:29 +0000 uart: Go back to returning '0' when we've probed the device. Two reasons for this: we know it's a uart after we call probe and it returns successfully. Second, uart passes data between probe and attach with softc. As it is now, we call probe twice, once in the bidding process and once after bidding id done. However, the probe process for uart isn't completely idempotent (we change state of the uart sometimes). The second call can result in odd behavior (though so far only in buggy version of other code I've not committed). The bigger problem is the softc: newbus creates it, we populate it, then frees it when we don't return 0 to claim the device. It then calls us again, we repopulate it, and this time it doesn't free it before calling attach. Returning 0 avoids both of these issues. The justification for doing it in the commit that changed it was 'while I'm here', so there doesn't seem to be a use case for it. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D47095 --- sys/dev/uart/uart_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index d0c4a54c8038..e608d6c95ead 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -571,7 +571,7 @@ uart_bus_probe(device_t dev, int regshft, int regiowidth, int rclk, int rid, int error = UART_PROBE(sc); bus_release_resource(dev, sc->sc_rtype, sc->sc_rrid, sc->sc_rres); - return ((error) ? error : BUS_PROBE_DEFAULT); + return ((error) ? error : 0); } int From nobody Tue Oct 15 11:01: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 4XSWPC0wJbz5Ylhb; Tue, 15 Oct 2024 11:01:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWPB6Mhxz4Wy8; Tue, 15 Oct 2024 11:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1BEJakSBML6Sc9KYPFEQjY0Cdl9VjGg2uayeBn1QMTI=; b=tWHW5rse8ZEH6L/9oUMGmzVbTIKZonf20OupHmfCpT8/FWaAL0jefoMJbJdL9e4MKvKLRm Ng4O2V6xVJgCBB6ZhFfp3anW9doEhEllg1HdnaylKkdRi+t7sWEsSKEWk21s7JEaao3CZu U/uGjzAQ3LtvpK1g9uAeX5GH9fEXZ5ahM7DLM4anwdrNVDyZIc/OToQ3sqoudO3JMPGM6d NEYQbQRn86w1t9w6rleRRdmvcx0ttBfSCkhUKoegJZtiNq4LYJNe6DOSC5HM4NdJCcJx1R Z0clqiOPhuYiT5DiulCNqSZOigYvboRjiA5MnvBJm6nZIjhkYf13fGS9JIXg+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1BEJakSBML6Sc9KYPFEQjY0Cdl9VjGg2uayeBn1QMTI=; b=KEJyH7MRpAi9W9ewZzDZbfkXxif2dVU0/1EIu8UTx/qPn8QD6UItdA2nN4L070ryLu1AOv pvRRtyqmFKlIe9oqyFczfP1oZ79JXokQyNC3T58dtUmwDGRcfcKgCcLnSeUUbPyv3b0xUn sZF/QphCMdwCofNDsuC9k1PK97v4aIwA9s3O0XAeAWJz3YQwzIvDWRWZm/SsATGDCsFAxS wzhG4C3SZCf3WBOm12ZdjUrOc3w2J1CHdEpGe1xOoxiCymJlVQYHNp/wYWi6OX8/CZDSZ7 zsASS7GwC7A19pAn6qgUrW020Fcx18thKevrV2W7eNA+rvp/CHcIu7MuGfnmNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990078; a=rsa-sha256; cv=none; b=UrDt/VNqLVI4Hplvjxpm5zzD3rX7Px/IabtWSUaJjNHKQC1zOXjjo97j0K5tgu6vYoBI// q9OgS8mQbZwTa9+YupZ+HurC6/n3Vs3nOmhqAvKQ/0daBCqDbNRRgOl+nsnTpwmoa4kOdy ygX1YSeIXSUHccjAcvMZr2usNpODFI28eHWDd4/07+qlwSGQ5xy/nO3Vs4mQlwSmufdKU5 mytphEmCxcjpAYzuySuxGF3mtKsSwyUEzm3xLL+q5D3p/5MPfHiDygDtAg4EOugSP+rii+ gAWqSpMm/C8oRIinlKpvRYSzjsF5q/CmMloInlVpUPM0ABdPTX2wUMTHmJljlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSWPB5hpRzKS4; Tue, 15 Oct 2024 11:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FB1ItO077486; Tue, 15 Oct 2024 11:01:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FB1ICj077483; Tue, 15 Oct 2024 11:01:18 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:01:18 GMT Message-Id: <202410151101.49FB1ICj077483@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: 987dc68e66b7 - main - uart: Implement SPCR rev 3 and 4 for PreciseBaudrate and UartClkFreq 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: 987dc68e66b747815c7a78e3c3e2b5f64e885791 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=987dc68e66b747815c7a78e3c3e2b5f64e885791 commit 987dc68e66b747815c7a78e3c3e2b5f64e885791 Author: Warner Losh AuthorDate: 2024-10-15 11:00:11 +0000 Commit: Warner Losh CommitDate: 2024-10-15 11:00:11 +0000 uart: Implement SPCR rev 3 and 4 for PreciseBaudrate and UartClkFreq If we have a new enough SPCR, then use it when it provides a PreciseBaudrate and/or a UartClkFreq. Sponsored by: Netflix Reviewed by: andrew,adrian Differential Revision: https://reviews.freebsd.org/D47097 --- sys/dev/uart/uart_cpu_acpi.c | 60 ++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/sys/dev/uart/uart_cpu_acpi.c b/sys/dev/uart/uart_cpu_acpi.c index 816738ec31d5..ce00a09fee33 100644 --- a/sys/dev/uart/uart_cpu_acpi.c +++ b/sys/dev/uart/uart_cpu_acpi.c @@ -167,28 +167,46 @@ uart_cpu_acpi_spcr(int devtype, struct uart_devinfo *di) if (error != 0) goto out; - switch (spcr->BaudRate) { - case 0: - /* Special value; means "keep current value unchanged". */ - di->baudrate = 0; - break; - case 3: - di->baudrate = 9600; - break; - case 4: - di->baudrate = 19200; - break; - case 6: - di->baudrate = 57600; - break; - case 7: - di->baudrate = 115200; - break; - default: - printf("SPCR has reserved BaudRate value: %d!\n", - (int)spcr->BaudRate); - goto out; + /* + * SPCR Rev 4 and newer allow a precise baudrate to be passed in for + * things like 1.5M or 2.0M. If we have that, then use that value, + * otherwise try to decode the older enumeration. + */ + if (spcr->Header.Revision >= 4 && spcr->PreciseBaudrate != 0) { + di->baudrate = spcr->PreciseBaudrate; + } else { + switch (spcr->BaudRate) { + case 0: + /* Special value; means "keep current value unchanged". */ + di->baudrate = 0; + break; + case 3: + di->baudrate = 9600; + break; + case 4: + di->baudrate = 19200; + break; + case 6: + di->baudrate = 57600; + break; + case 7: + di->baudrate = 115200; + break; + default: + printf("SPCR has reserved BaudRate value: %d!\n", + (int)spcr->BaudRate); + goto out; + } } + + /* + * Rev 3 and newer can specify a rclk, use it if it's there. It's + * defined to be 0 when it's not known, and we've initialized rclk to 0 + * in uart_cpu_acpi_init_devinfo, so we don't have to test for it. + */ + if (spcr->Header.Revision >= 3) + di->bas.rclk = spcr->UartClkFreq; + /* * If no rclk is set, then we will assume the BIOS has configured the * hardware at the stated baudrate, so we can use it to guess the rclk From nobody Tue Oct 15 11:13:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSWgp2Qx4z5Ymrv; Tue, 15 Oct 2024 11:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWgp1vPpz4ZBy; Tue, 15 Oct 2024 11:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JFE3u4t9R8XHTrcPu0FeDoPUgXZMYNwT3IhRDUkyFb4=; b=eKIsIEv+NtjHEuqqK8bRp/d4XSboL2r9LZ93PjMpxyYDymZo/s+HcdS9ZASjjdterZO+rN 3LGyRjJTY6aN2nv7EllLKCeItilbLta0H3Z1R/QgWYAwX+Teo8EOGIXDonjgaW6VsBqvmq OOm59SnGA69Rvas8oM5APWRv5U2dcERURshVesAHphEQwGhRMiUhpYZl2pS4Gf6ZfxL41a h+4LFxDP1pbBUWszd+9qKWT14U/6qda+7ngB70fSxe7qINIJTL/UHdHCytUFHATqP74Tlw ZFdljSPVh86PFej9+31ZCc0rNi2+TSZ75uAOU2Eve2fsPX/VWrRioGFaE47enA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JFE3u4t9R8XHTrcPu0FeDoPUgXZMYNwT3IhRDUkyFb4=; b=XsT6zOqQSBJ/qUreq1URaD4D3bY+1UN6i/IqblhkaLupoq0Me4TaiIMkhQs0lP3Jpam4bQ lnKDI0UnEaM4/pZ9PGZylJRMgVqJe8Y2zA8GvcsyHoaDOQ4xlVkiGdc5yaX990yleLqv+v cSMJ0z9ChSe9gB+7okeJXt89mYXrQ0JzqhOjI4UQZ4YuCLF3vkKdWRl3qtsacjC28POToG H8UXBI7sXBXhUwvYAF7CPxJNnxCBx8j/g1D7hi4kgFvGlOPwzqvPUaU0hRshyHExx95VyP 4dP1iRjPHQo7Gd2Upiaikc/jHXloWAttN/cHsV5kakpEoCHyftE0qZZkjUQExg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990838; a=rsa-sha256; cv=none; b=QmuF+weejWNE6Bg2iJgveBVBDngFswzUxz/T1a00CJit9FhXiXzy3xWRMsliqLZ8Fdoxby Z+jUiUPU4alv2dJndsz8qhtdqGm8L6nYsmhCv8yKVj0oimonkthC+KwGwVntnY/Ieb3nyH pAuqxw/1DJQ6433nh2C6E986NG1kkqt/GmXYfv8wUk7qgMFsu4/CqI833a1PHx/daa4rhI N0rTyPdLsZfkZzo9VXKZTxaXltSDH/7sJLXqpTgaCOe3DNYuvpCEt08NzbXDxULw0J22Ua 8gffipo3Sqf3rWPB/ZzmSRpLHnMX+BKGZ2u7P18Uu+yI1CHew5jbL35kBUVEMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSWgp1VswzKTS; Tue, 15 Oct 2024 11:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBDwHZ097717; Tue, 15 Oct 2024 11:13:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBDwXk097714; Tue, 15 Oct 2024 11:13:58 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:13:58 GMT Message-Id: <202410151113.49FBDwXk097714@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: 5d3fb72667e5 - main - acpidump: Move to acpi.rsdp 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: 5d3fb72667e5794bf16756e00a87338f4acb7f90 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5d3fb72667e5794bf16756e00a87338f4acb7f90 commit 5d3fb72667e5794bf16756e00a87338f4acb7f90 Author: Warner Losh AuthorDate: 2024-10-15 11:05:07 +0000 Commit: Warner Losh CommitDate: 2024-10-15 11:05:07 +0000 acpidump: Move to acpi.rsdp Switch from the long obsolete hint.0.acpi.rsdp to acpi.rsdp to get the root of the ACPI tables. MFC After: 1 week Sponsored by: Netflix Reviewed by: andrew, markj Differential Revision: https://reviews.freebsd.org/D47079 --- usr.sbin/acpi/acpidump/acpi_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi_user.c b/usr.sbin/acpi/acpidump/acpi_user.c index 4b9209e53507..daa4118089cf 100644 --- a/usr.sbin/acpi/acpidump/acpi_user.c +++ b/usr.sbin/acpi/acpidump/acpi_user.c @@ -42,7 +42,7 @@ #include "acpidump.h" -static char hint_acpi_0_rsdp[] = "hint.acpi.0.rsdp"; +static char acpi_rsdp[] = "acpi.rsdp"; static char machdep_acpi_root[] = "machdep.acpi_root"; static int acpi_mem_fd = -1; @@ -172,7 +172,7 @@ acpi_find_rsd_ptr(void) addr = 0; /* Attempt to use kenv or sysctl to find RSD PTR record. */ - if (kenv(KENV_GET, hint_acpi_0_rsdp, buf, 20) > 0) + if (kenv(KENV_GET, acpi_rsdp, buf, 20) > 0) addr = strtoul(buf, NULL, 0); if (addr == 0) { len = sizeof(addr); From nobody Tue Oct 15 11:13:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSWgq2rGtz5Ymhb; Tue, 15 Oct 2024 11:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWgq29QKz4Z7N; Tue, 15 Oct 2024 11:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uce91dpUhaxLmK4VmHePvqpruyTd2N+yE7+cVXJKFdI=; b=F+JMdf4JSLVn1lZO2ssvsT1a0/kWEDy3kWP0lYWpRLn+cELu/4AYgtoeYgQy6/Zus+IKJ4 hCHYfLMDN/Zdc0C9qMJftM5S5+t4QWDchk133tdeIa1j10Qf1YgOtwnQiNIFk1LEJLjHYt B1N3laDug84XfVoiYXj8Mf5rEZ0gD3x5mChEU7nC4y8a5xioKuTLmejO1HYbNyCXg0g1W7 Ut9N8sVJZL3dkzNynm6oTLBqCifDf+XBl6PLZOd2cZojiCpDn2XghYaxxtgNEOj4wWGmAL LJjbQwc8u6bPJjHTmSJNzdyCtDT0JKvifydQ7UJY6jCcj6yYyfHZQhRdiIP3rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uce91dpUhaxLmK4VmHePvqpruyTd2N+yE7+cVXJKFdI=; b=JRWJlCK2JCrvepGWH4GN9vnIDlhb16EcT9uUP0mxlfojw+taEcyXBsCzIpYcZap4awarAX uOjCgH933pky4BbmHU2X4yrsUUr3DETLfXjFCz0sXIW9I81RwTLziL88sLRhDYT+knDGaY fIdg1I7TYT+KPzzUOsRNMaR4wtVbLWkpqorbklvpZU87fUmYXxctYciGp1ujVw3JC0P0i2 nf89bb82/MSuL9G6R4I4H87UF6u3k6eXZwmsEXPNpCkcHFJ4MohIRVfYhYXfRGgKfkoPqX qjVhB2cdWhCj9+rn/YgVA0fBHe2IAdL+nDaiFGbbC7isKnUhlBhz+a9gnH8WlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990839; a=rsa-sha256; cv=none; b=g8jiqY1Eer8bvvzH0uNn6mDQgfydke38E0c44wPyA7vUbPWmQ31Qg3/+647wrHczEmvIUG zgc3c2OROhci9RvJGWsQtkHvoVF0ZkDNPl/i4kD4EZEBK9HE8w3SfhsibrX/k2fbwJVxkQ pzkqFzBvUGbG4ApCwq1xTjbEYEyd7mW3Pp4CKt/5lsWJkNTbKALWWqbmPQuYHq8qAV/1B2 DKzcmuBKo24laKpjSCiiyM7tK/Tmi2KBVrYQIpfwCOTmOQEZmYQwMLIwSDm54K5Z7H2WbP Oc7k0/PxJ97WfbgcbFN/YXeKIfr98j5YGWVIVeP5gge6IUsLQo6FKsi5IThA/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 4XSWgq1ngVzKRx; Tue, 15 Oct 2024 11:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBDx5I097762; Tue, 15 Oct 2024 11:13:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBDxpO097759; Tue, 15 Oct 2024 11:13:59 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:13:59 GMT Message-Id: <202410151113.49FBDxpO097759@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: 19dd881177fc - main - acpidump: Use ACPI_NAMESEG_SIZE instead of 4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19dd881177fcd38c63c26bc4b2d1328311fefec8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=19dd881177fcd38c63c26bc4b2d1328311fefec8 commit 19dd881177fcd38c63c26bc4b2d1328311fefec8 Author: Warner Losh AuthorDate: 2024-10-15 11:07:30 +0000 Commit: Warner Losh CommitDate: 2024-10-15 11:07:30 +0000 acpidump: Use ACPI_NAMESEG_SIZE instead of 4 In a couple of places, we use 4 instead of ACPI_NAMESEG_SIZE. Use the Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47109 --- usr.sbin/acpi/acpidump/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index 4eb361a6f479..746db4a5583c 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -2631,13 +2631,13 @@ sdt_load_devmem(void) acpi_print_rsd_ptr(rp); if (rp->Revision < 2) { rsdp = (ACPI_TABLE_HEADER *)acpi_map_sdt(rp->RsdtPhysicalAddress); - if (memcmp(rsdp->Signature, "RSDT", 4) != 0 || + if (memcmp(rsdp->Signature, "RSDT", ACPI_NAMESEG_SIZE) != 0 || acpi_checksum(rsdp, rsdp->Length) != 0) errx(1, "RSDT is corrupted"); addr_size = sizeof(uint32_t); } else { rsdp = (ACPI_TABLE_HEADER *)acpi_map_sdt(rp->XsdtPhysicalAddress); - if (memcmp(rsdp->Signature, "XSDT", 4) != 0 || + if (memcmp(rsdp->Signature, "XSDT", ACPI_NAMESEG_SIZE) != 0 || acpi_checksum(rsdp, rsdp->Length) != 0) errx(1, "XSDT is corrupted"); addr_size = sizeof(uint64_t); From nobody Tue Oct 15 11:14:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSWgr6Gdxz5Ymhf; Tue, 15 Oct 2024 11:14:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWgr46kyz4ZFr; Tue, 15 Oct 2024 11:14:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1Ic4H0CTZXgojx9XZB7PLw+xG1ICBjEvRt3MsNfNJM=; b=lmD6H9UpQEzcK2YG1wVoNbXMNGkqQaA5Qd25r/HAZxE1ayUyThfxDEYzaiRp1cghHZDWk/ jkf49CueysIAjAeO1PG+XFMDYqtoEL8K3YoohDyCMpZRfLFF3NPKSlwDlHUMGVrM3g8n/m mNXO6IrNCARdNXDBa4EupIKIBpqMgWGuTd/5MzMisaTE3KFjmCv0pCcCBeoIh7pzRrivHc /CMDn/HHoZlX55STgOOYwQBmSNy3eKgW4INA4ylDI4QmYHDw0+DVE/Z1eE5Ir1jjvppI7S MaHoSU4eKqPcbXozrN8R5sbkFwdqFbSxU6noFsnN391ftIMjsUsYg59g14aBQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1Ic4H0CTZXgojx9XZB7PLw+xG1ICBjEvRt3MsNfNJM=; b=R4C9flZOmC3jl6joQISUqmF3Sp9OtYbt1ACkQDlw4pCzPkHRBI2qGTnD18DhUJVz1qBOD9 hhrtt4onSELAmm5XkgJAIV76vYfUIEfmtyEd+WIRP4WvT2nJAOdXw7rBAoBITgLWia6Tat nvdKA+UGKGKk5dzaBtH9uUD7S1nhKk4g9V1X3sMZOS5SJtWYqtajg4X02XKaii7AyE3rGO Al9YzyU/Ryln6H5kmpVMkvbTLvKRMdCbFk41ws0nzfgJaMSDZEeslbulv+jzn/dPDz7xcR Wqc1AsjOia3P9NVeWnVCMXVlpbdFbSO44XEOfrtRpoy1dgyphQp/UYzP6GIVdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990840; a=rsa-sha256; cv=none; b=RLIB7RSSwTNImC1DrDVvDTjJzgtX05SkJVZFQQ200G+3gmZQaS8CG4XtXM4qtxq0AUNk+u CzmaZvtS8vCT1Gnp92GmaeUZjgJmKU9IGzdqZsOyxbyOo6KC1WivTZjm/e7dIQ8YtO+3SR +LJBW8HXHCXEHUQCQLfoNaJW48SBiRX9GiBgBRhSKZp6pxBHuv/CAZbHYq62ZFhsNDNfkN vG0FBxZrFvmbczYDJQhsOyD9o717Im8+JHmc0dHfBH9X1RFJSOpYzzu1INdNF4lc6UpnMu +iLkU/ymQju8+zsTAeutNNOWkzeOpqThsbYprUE0t6eAqsAyp+Jrqk0ZAbO22g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSWgr2qjzzK57; Tue, 15 Oct 2024 11:14:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBE05g097826; Tue, 15 Oct 2024 11:14:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBE02D097823; Tue, 15 Oct 2024 11:14:00 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:14:00 GMT Message-Id: <202410151114.49FBE02D097823@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: bbfd734823f4 - main - acpidump: Document the alphabit soup of ACPI Table names 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: bbfd734823f43e7964f66390df3e1c350bffd991 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bbfd734823f43e7964f66390df3e1c350bffd991 commit bbfd734823f43e7964f66390df3e1c350bffd991 Author: Warner Losh AuthorDate: 2024-10-15 11:08:24 +0000 Commit: Warner Losh CommitDate: 2024-10-15 11:08:24 +0000 acpidump: Document the alphabit soup of ACPI Table names Clarify what's reported with -t (it's all the fixed acpi tables, not just the listed ones). The listed tables are more fully decoded, while all other tables just have their headers decoded. Sponsored by: Netflix Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D47080 --- usr.sbin/acpi/acpidump/acpidump.8 | 91 +++++++++++++++++++++++++++------------ 1 file changed, 64 insertions(+), 27 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpidump.8 b/usr.sbin/acpi/acpidump/acpidump.8 index f193b9a3511a..98e0a4d9f524 100644 --- a/usr.sbin/acpi/acpidump/acpidump.8 +++ b/usr.sbin/acpi/acpidump/acpidump.8 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 29, 2020 +.Dd October 5, 2024 .Dt ACPIDUMP 8 .Os .Sh NAME @@ -36,11 +36,11 @@ .Sh SYNOPSIS .Nm .Op Fl d -.Op Fl t -.Op Fl h -.Op Fl v .Op Fl f Ar dsdt_input +.Op Fl h .Op Fl o Ar dsdt_output +.Op Fl t +.Op Fl v .Sh DESCRIPTION The .Nm @@ -88,38 +88,75 @@ called SDTs and their header has a common format which consists of items such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID, OEM Revision, Creator ID and Creator Revision. +.Pp When invoked with the .Fl t flag, the .Nm -utility dumps contents of the following tables: +utility dumps contents of all the ACPI tables, except the DSDT and SSDT. +The following SDTs are reported in detail, while the remainder will only report +the common header information: .Pp .Bl -tag -offset indent -width 12345 -compact -.It BERT -.It DMAR -.It DSDT -.It ECDT -.It EINJ -.It ERST -.It FACS -.It FADT -.It HEST -.It HPET -.It LPIT -.It MADT -.It MCFG -.It NFIT +.It BERT Boot Error Record Table +Reports any previous boot errors. +.It DMAR DMA Remapping Table +Contains information about the DMA remapping necessary for the system +for I/O virtualization on Intel CPUS. +.It DSDT Differentiated System Description Table +Contains the main AML for the system. +.It ECDT Embedded Controller Boot Resources Table +Contains information about accessing the embedded controller +prior to the OS decoding the DSDT for all its details. +.It EINJ Error Injection Table +Use to inject hardware errors to the error reporting mechanisms. +.It ERST Error Record Serialization Table +Information to retrieve and manage errors reported from the hardware. +.It FACS Firmware ACPI Control Structure +Information for the OS to interact with the firmware for things +like suspend / resume and prevent mutual access to resources +shared between the OS and the firmware. +.It FACP Fixed ACPI Description Table (FADT) +Information related to power management, and other CPU related data. +.It HEST Hardware Error Source Table +Describes the possible sources of hardware errors to the OS. +.It HPET High Precision Event Timer Table +Describes the high precision timers in the system. +.It IVRS I/O Virtualization Reporting Structure +Information for hypvervisors to use to share I/O resources on AMD +processors. +.It LPIT Low Power Idle Table +Power management information for reducing power usage of the system. +.It MADT Multiple APIC Description Table +Describes all the Advanced Programmable Interrupt Controllers and +Intel Streamlined Advanced Programmable Interrupt Controller present +in the system. +.It MCFG PCI Express Memory-mapped Configuration +PCI config space base address register. +.It NFIT NVDIMM Firmware Interface Table +NVDIMM information in the system. .It RSD PTR -.It RSDT -.It SLIT -.It SRAT -.It TCPA -.It TPM2 -.It WDDT +Pointer to the RSDT. +.It RSDT Root System Description Table +An array of physical pointers to other system description tables, +the FACP (Fixed ACPI Description Table). +.It SLIT System Locality Distance Information Table +Provides information about the cost of communicating between different +parts of the system (NUMA). +.It SPCR Serial Port Console Redirection +Contains informatiom about any serial port that the firmware used as +a reporting console. +.It SRAT System Resource Affinity Table +Defines the domains of locality in the system for processors, memory +and generic initiators (eg PCIe root complexes). +.It TCPA Trusted Computing Platform Alliance +Information about the TPM elements of the system. +.It TPM2 Trusted Platform Module 2 +Additional information about newer TPM hardware. +.It WDDT Watchdog Timer Description Table +Information about how to manage watchdog timers in the system. .El .Pp -The RSDT contains a pointer to the physical memory address of the FACP -(Fixed ACPI Description Table). The FACP defines static system information about power management support (ACPI Hardware Register Implementation) such as interrupt mode (INT_MODEL), From nobody Tue Oct 15 11:14: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 4XSWgs73kvz5YmLn; Tue, 15 Oct 2024 11:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWgs4DqZz4ZNq; Tue, 15 Oct 2024 11:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1FbnzCB/ibdm91fFEk+vlkkhfEgYe47NICGrwhLuzW4=; b=Xu0ad1gm0u7NnL8px1Mqe3RTQvOeK+N6UZOVSf/v2DP3u+c/M7epn84hk/usRj3a6iUr/z 0BMfqUcw0Im4KPB4Qp7HqNGntZilsD8ksPN20A0mF8Z9wkMVF/o6JVHibmcSkuxi4ZWNhT PWH3bSLHGRWetLSqmZ8o3MxCbtVNFZFWeE315VcGIaYGkwZkENn66qF94sNGsjZIP8CRjQ x5M8EAD6RMc1PzG+on3PLdzJLjO6FDXXXRu9nRpYvZoWm7Tg+uMZ385xvmy+k6W0EmoXLN qNIf1f+SjnapiiPGv0dCagFpC6ssb6eTH/w1ANXF7/h123BPADZMtQFFm+hftQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1FbnzCB/ibdm91fFEk+vlkkhfEgYe47NICGrwhLuzW4=; b=Jw4xakmoxJWPoPPvCmaNtdj75fAJY50tRvJOGafUjL1RncY5yqnZ2OU67/1UDCdHaVhbFH UYdUjpob2upsyqnF07Lb0pGBAFFLHF/a4BuZnsip94zB7zjwXeXrrEVNfABNPG9rtbki25 jgHQ84OT7ACe29zU6lb2huCkNiRszbAjdSFZEGkO0Ll/kg5yqSRZfH93sSbZLW1enmDuAN 5vl7SVKMbeHI/BB5zBISpV3zgG3TDXAm4+XT3y5HSO0TbKD2WvPyxH53Bzon6SDyGdRXcw yAqffYGioqtGhon/9pePpAaTuI7QFa0pJXvksySLM0jJWnOTQiuCc2bScBkHnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990841; a=rsa-sha256; cv=none; b=NAqYtQodY44ORIBvPEMbdqW++r8jKb0iFV0vQzP8oA9dcgcjRBLYhPDZHUngXD3i+HPVYQ Jl0MFWL0Gw0lcwKRAbmEorpW6gon8//81BdHcD5vqApT2oDE56thbXcm4cUZAUQdEMF6kJ 9R5MErFeDhFYwfvhndGNrHDVDtG5GyBoiUniJD34j8tNUQopWhDnZS0eVwMnqKbieztynq mqieNO9lnHwvarbXtHh0mx9gMGkSIrioeVXtQVEf0MqOIaZEsjxL4yxkNsK7G5l2z4OUkS BmXZPdWuTpg0UQkVM8nN4P2bTewwB8YcBqqa/9ck9BYoFXVCWKJ1BP1zIw3DJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSWgs3q7fzKWM; Tue, 15 Oct 2024 11:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBE1tX097885; Tue, 15 Oct 2024 11:14:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBE1s1097882; Tue, 15 Oct 2024 11:14:01 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:14:01 GMT Message-Id: <202410151114.49FBE1s1097882@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: e9ab827df94f - main - acpidump: Sort signature ifs alphabetically and make table driven 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: e9ab827df94fed8f129ca4f7756e23ce77d8a655 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e9ab827df94fed8f129ca4f7756e23ce77d8a655 commit e9ab827df94fed8f129ca4f7756e23ce77d8a655 Author: Warner Losh AuthorDate: 2024-10-15 11:09:45 +0000 Commit: Warner Losh CommitDate: 2024-10-15 11:09:45 +0000 acpidump: Sort signature ifs alphabetically and make table driven Sort the ACPI signatures alphabetically and move it into a table we can iterate through Sponsored by: Netflix Reviewed by: andrew, markj Differential Revision: https://reviews.freebsd.org/D47081 --- usr.sbin/acpi/acpidump/acpi.c | 87 ++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index 746db4a5583c..04097e7a5318 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -2545,6 +2545,49 @@ acpi_print_rsd_ptr(ACPI_TABLE_RSDP *rp) printf(END_COMMENT); } +static struct { + const char *sig; + void (*fnp)(ACPI_TABLE_HEADER *); +} known[] = { + { ACPI_SIG_BERT, acpi_handle_bert }, + { ACPI_SIG_DMAR, acpi_handle_dmar }, + { ACPI_SIG_ECDT, acpi_handle_ecdt }, + { ACPI_SIG_EINJ, acpi_handle_einj }, + { ACPI_SIG_ERST, acpi_handle_erst }, + { ACPI_SIG_FADT, acpi_handle_fadt }, + { ACPI_SIG_HEST, acpi_handle_hest }, + { ACPI_SIG_HPET, acpi_handle_hpet }, + { ACPI_SIG_IVRS, acpi_handle_ivrs }, + { ACPI_SIG_LPIT, acpi_handle_lpit }, + { ACPI_SIG_MADT, acpi_handle_madt }, + { ACPI_SIG_MCFG, acpi_handle_mcfg }, + { ACPI_SIG_NFIT, acpi_handle_nfit }, + { ACPI_SIG_SLIT, acpi_handle_slit }, + { ACPI_SIG_SPCR, acpi_handle_spcr }, + { ACPI_SIG_SRAT, acpi_handle_srat }, + { ACPI_SIG_TCPA, acpi_handle_tcpa }, + { ACPI_SIG_TPM2, acpi_handle_tpm2 }, + { ACPI_SIG_WDDT, acpi_handle_wddt }, +}; + +static void +acpi_report_sdp(ACPI_TABLE_HEADER *sdp) +{ + for (u_int i = 0; i < nitems(known); i++) { + if (memcmp(sdp->Signature, known[i].sig, ACPI_NAMESEG_SIZE) != 0) { + known[i].fnp(sdp); + return; + } + } + + /* + * Otherwise, do a generic thing. + */ + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + printf(END_COMMENT); +} + static void acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp) { @@ -2571,49 +2614,7 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp) sdp->Signature); continue; } - if (!memcmp(sdp->Signature, ACPI_SIG_BERT, 4)) - acpi_handle_bert(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_EINJ, 4)) - acpi_handle_einj(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_ERST, 4)) - acpi_handle_erst(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_FADT, 4)) - acpi_handle_fadt(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_MADT, 4)) - acpi_handle_madt(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_HEST, 4)) - acpi_handle_hest(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_HPET, 4)) - acpi_handle_hpet(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_ECDT, 4)) - acpi_handle_ecdt(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_MCFG, 4)) - acpi_handle_mcfg(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_SLIT, 4)) - acpi_handle_slit(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_SRAT, 4)) - acpi_handle_srat(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_TCPA, 4)) - acpi_handle_tcpa(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_DMAR, 4)) - acpi_handle_dmar(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_IVRS, 4)) - acpi_handle_ivrs(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_NFIT, 4)) - acpi_handle_nfit(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_WDDT, 4)) - acpi_handle_wddt(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_LPIT, 4)) - acpi_handle_lpit(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_TPM2, 4)) - acpi_handle_tpm2(sdp); - else if (!memcmp(sdp->Signature, ACPI_SIG_SPCR, 4)) - acpi_handle_spcr(sdp); - else { - printf(BEGIN_COMMENT); - acpi_print_sdt(sdp); - printf(END_COMMENT); - } + acpi_report_sdp(sdp); } } From nobody Tue Oct 15 11:14: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 4XSWgv0l18z5YmLp; Tue, 15 Oct 2024 11:14:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWgt5YPzz4ZGW; Tue, 15 Oct 2024 11:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GudyjN4Nl4y1OMNWn+34q59SQ3jzrKI+qBBZAQnMrsI=; b=TUm6AvPtEudqvjQOnVQGzYgf76d1a26jyWWYCJbzBDdB3ZJjBUxgnKZ+2emkBYrn2854Kv KbwTPGFsfWAfGD0u8qoo+3SiITpLAUSOMZ8iof0kN8TicqhRgxflW5FxgueeLkoZovgEMm kY9iEeDqKfPTt5kk6fbZhXqCYqzpKPnfWiEjW7UCyc34LqJ3tQ92jylrrI/wlos7Ah7Tdv /g260dZl4yCFJ9kYUxvw2l7MOebdxhJfcIGcH2EFnJHi0qbDBcHLKge6rHeLkruIoT2mBs OWwx9u6wcZAx+i6exHw+yVar9Ch645qkKxljYPtCJ60lqBrdDi1hXZKwgb/CWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GudyjN4Nl4y1OMNWn+34q59SQ3jzrKI+qBBZAQnMrsI=; b=vK001Ry6oxSza+fSJY6JKtIarln/XvkGSMXyYcVl9oS1VkbeRsusK/TVqUTOKj03qozFe1 kgGoyLeC6viUFXZnGUvUZBLdmuD/xVOsQ+8jQ6qx2J03jyidlKEbGtgtguY75Z3E0hV2zY k6Rq3KfdvQHkE6LulVtbC7ukEx/0GYvzqw9Ng+qqOhARTmhV6VtW0VRrgcyuJrmn/fYQPD wScESdumsnXuiZo/Bwkn1FmeBaXrtqkG7ZYSiKYCivhl6bnREgGWd4w71UtMssYusqLzIP nvEL+VLPucE2OeKlBVv7IBrVPKF0t0xNVlJwHevKmmlbgicdXjBG3hHKW5vtzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990842; a=rsa-sha256; cv=none; b=lZliXUChL02gqG8DOUdA+ZVVjFP5AMJl8b480FkyCbn+wYgr5COpmuwYaIe6OlJ2ZVZhOm OilSpokPGIvIvN1aPmbC/z4pmbPFm3XiWtKI9w83NjE88iSXy3YKyjIKKOQHK9TdaSKzES t6vTLkU4YoqdvFbvbIVcBTTc77ziimGSgACmiNq/XsVa2n+OKy1e/jA8kZJkOJxjmdfg1g GU9BYPju6lfyH5epDtIEvpEAasQ4kffbwYsBxYw9q5GNIAKKXlzv3Cfef1EgRANl8wJXMd tFxwfJzOxUmBNEFL8N989GbiGS28vNnWjyeZq/e2OSJ0UYMZVNSHAOslEx/o/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 4XSWgt59FLzKc2; Tue, 15 Oct 2024 11:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBE2BM097945; Tue, 15 Oct 2024 11:14:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBE2Kh097942; Tue, 15 Oct 2024 11:14:02 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:14:02 GMT Message-Id: <202410151114.49FBE2Kh097942@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: 3ff9ea7dc2c5 - main - acpidump: Add -T TBLN to print a specific ACPI fixed table 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: 3ff9ea7dc2c52fcb67b7f6234cd351c3e2fbfafd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3ff9ea7dc2c52fcb67b7f6234cd351c3e2fbfafd commit 3ff9ea7dc2c52fcb67b7f6234cd351c3e2fbfafd Author: Warner Losh AuthorDate: 2024-10-15 11:10:06 +0000 Commit: Warner Losh CommitDate: 2024-10-15 11:10:06 +0000 acpidump: Add -T TBLN to print a specific ACPI fixed table Add the ability to dump a specific ACPI table rather than all of them. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D47082 --- usr.sbin/acpi/acpidump/acpi.c | 21 +++++++++++++++------ usr.sbin/acpi/acpidump/acpidump.8 | 4 ++++ usr.sbin/acpi/acpidump/acpidump.c | 16 ++++++++++++---- usr.sbin/acpi/acpidump/acpidump.h | 2 +- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index 04097e7a5318..18a0ae486387 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -87,7 +87,7 @@ static void acpi_print_facs(ACPI_TABLE_FACS *facs); static void acpi_print_dsdt(ACPI_TABLE_HEADER *dsdp); static ACPI_TABLE_HEADER *acpi_map_sdt(vm_offset_t pa); static void acpi_print_rsd_ptr(ACPI_TABLE_RSDP *rp); -static void acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp); +static void acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp, const char *elm); static void acpi_walk_subtables(ACPI_TABLE_HEADER *table, void *first, void (*action)(ACPI_SUBTABLE_HEADER *)); static void acpi_walk_nfit(ACPI_TABLE_HEADER *table, void *first, @@ -275,7 +275,7 @@ acpi_handle_fadt(ACPI_TABLE_HEADER *sdp) if (addr != 0) { facs = (ACPI_TABLE_FACS *)acpi_map_sdt(addr); - if (memcmp(facs->Signature, ACPI_SIG_FACS, 4) != 0 || + if (memcmp(facs->Signature, ACPI_SIG_FACS, ACPI_NAMESEG_SIZE) != 0 || facs->Length < 64) errx(1, "FACS is corrupt"); acpi_print_facs(facs); @@ -2589,7 +2589,7 @@ acpi_report_sdp(ACPI_TABLE_HEADER *sdp) } static void -acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp) +acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp, const char *tbl) { ACPI_TABLE_HEADER *sdp; ACPI_TABLE_RSDT *rsdt; @@ -2597,7 +2597,14 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp) vm_offset_t addr; int entries, i; - acpi_print_rsdt(rsdp); + if (tbl == NULL) { + acpi_print_rsdt(rsdp); + } else { + if (memcmp(tbl, rsdp->Signature, ACPI_NAMESEG_SIZE) == 0) { + acpi_print_rsdt(rsdp); + return; + } + } rsdt = (ACPI_TABLE_RSDT *)rsdp; xsdt = (ACPI_TABLE_XSDT *)rsdp; entries = (rsdp->Length - sizeof(ACPI_TABLE_HEADER)) / addr_size; @@ -2614,6 +2621,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp) sdp->Signature); continue; } + if (tbl != NULL && memcmp(sdp->Signature, tbl, ACPI_NAMESEG_SIZE) != 0) + continue; acpi_report_sdp(sdp); } } @@ -2802,9 +2811,9 @@ aml_disassemble_separate(ACPI_TABLE_HEADER *rsdt, ACPI_TABLE_HEADER *dsdp) } void -sdt_print_all(ACPI_TABLE_HEADER *rsdp) +sdt_print_all(ACPI_TABLE_HEADER *rsdp, const char *tbl) { - acpi_handle_rsdt(rsdp); + acpi_handle_rsdt(rsdp, tbl); } /* Fetch a table matching the given signature via the RSDT. */ diff --git a/usr.sbin/acpi/acpidump/acpidump.8 b/usr.sbin/acpi/acpidump/acpidump.8 index 98e0a4d9f524..70a53b479fc4 100644 --- a/usr.sbin/acpi/acpidump/acpidump.8 +++ b/usr.sbin/acpi/acpidump/acpidump.8 @@ -40,6 +40,7 @@ .Op Fl h .Op Fl o Ar dsdt_output .Op Fl t +.Op Fl T Ar table_name .Op Fl v .Sh DESCRIPTION The @@ -175,6 +176,9 @@ Concatenate the DSDT and the SSDT's into single image and disassemble the image and print the results to stdout. .It Fl t Dump the contents of the various fixed tables listed above. +.It Fl T ar table_name +Dump the contents of the specific table. +All ACPI tables are exactly 4 characters long. .It Fl h Displays usage and exit. .It Fl s diff --git a/usr.sbin/acpi/acpidump/acpidump.c b/usr.sbin/acpi/acpidump/acpidump.c index 0fad7e68ef47..477b56958d1f 100644 --- a/usr.sbin/acpi/acpidump/acpidump.c +++ b/usr.sbin/acpi/acpidump/acpidump.c @@ -45,7 +45,7 @@ usage(const char *progname) { fprintf(stderr, "usage: %s [-d] [-t] [-h] [-v] [-f dsdt_input] " - "[-o dsdt_output]\n", progname); + "[-o dsdt_output] [-T table_name]\n", progname); fprintf(stderr, "To send ASL:\n\t%s -dt | gzip -c9 > foo.asl.gz\n", progname); exit(1); @@ -58,6 +58,7 @@ main(int argc, char *argv[]) int c; char *progname; char *dsdt_input_file, *dsdt_output_file; + char *tbl = NULL; dsdt_input_file = dsdt_output_file = NULL; progname = argv[0]; @@ -65,11 +66,18 @@ main(int argc, char *argv[]) if (argc < 2) usage(progname); - while ((c = getopt(argc, argv, "dhtvsf:o:")) != -1) { + while ((c = getopt(argc, argv, "df:ho:tT:vs")) != -1) { switch (c) { case 'd': dflag = 1; break; + case 'T': + tbl = optarg; + if (strlen(tbl) != 4) { + warnx("Illegal table name %s", tbl); + usage(progname); + } + break; case 't': tflag = 1; break; @@ -113,10 +121,10 @@ main(int argc, char *argv[]) } /* Display misc. SDT tables (only available when using /dev/mem) */ - if (tflag) { + if (tflag || tbl != NULL) { if (vflag) warnx("printing various SDT tables"); - sdt_print_all(rsdt); + sdt_print_all(rsdt, tbl); } /* Translate RSDT to DSDT pointer */ diff --git a/usr.sbin/acpi/acpidump/acpidump.h b/usr.sbin/acpi/acpidump/acpidump.h index 872facbad59d..8755a96dd8af 100644 --- a/usr.sbin/acpi/acpidump/acpidump.h +++ b/usr.sbin/acpi/acpidump/acpidump.h @@ -140,7 +140,7 @@ ACPI_TABLE_HEADER *dsdt_load_file(char *); void dsdt_save_file(char *, ACPI_TABLE_HEADER *, ACPI_TABLE_HEADER *); /* Print out as many fixed tables as possible, given the RSD PTR */ -void sdt_print_all(ACPI_TABLE_HEADER *); +void sdt_print_all(ACPI_TABLE_HEADER *, const char *); /* Disassemble the AML in the DSDT */ void aml_disassemble(ACPI_TABLE_HEADER *, ACPI_TABLE_HEADER *); From nobody Tue Oct 15 11:14: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 4XSWgw1mDtz5YmRg; Tue, 15 Oct 2024 11:14:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWgv6G0rz4ZMb; Tue, 15 Oct 2024 11:14:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xJkiip/U6dsB3Unj2yvZL9PvDFgM7OMXKggWuNwxx+Q=; b=Q9PVxiddHsRYLHrvVPXfNuBL1t/QnRA5kDPgV/6DnR8U66OouNs6cWvV9gaDp3NtowWRIc bBFWB+UDKMFp3JRrya4qA3T3NWYq+Hq2wywNUyKxnx3IkoqC39VQ2aECQhDYvBmT3vu2rU I0DXHK9+bRmoCSW6ZDZh3NjMGsxF+RW689Cgj8rcIN/MAVvUBIE7zHDEW6WqmaOrTne9gL 3/M2uFWskAnTFlL6v3+F6RyuqCsBgYtS6RSYHV3rnE+b9A5WAgdSNJkYOqgJMlbBaIFB7Q zHhFJEhyee9z5tobwyxbjzNwNlZRJW7J7BzEX93fhvIblasi9QMJ2OHwd1+kuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xJkiip/U6dsB3Unj2yvZL9PvDFgM7OMXKggWuNwxx+Q=; b=S50qYBzRhDUH5JzgJkbs4x5EA2Bzm5hNVzRAK4RD7jTF/hQoabEQdyVDgk0ukioBisSq8X HP8ZNpiQApdEqHehuOOgrLVioNqXWkZRNWCFnr5bMPexNp4bPg6Z/k7HxJfVbXF1zB6ZcN zS5YYu0I9Shp5gVZ1oCPme4oDlIyt4W3+tJCUtGOBxJGVqnaQ0sQWceWhgMX8KFjdvgEqp HfB22xsdQihCHIFEADoEq1xCGPpM8Mj7tMkN36AmaFA3zr3EAOqG/aMkHO76biI3NBYM+K 0tgKd7+eBDxTDJAwb/SR3cyG0k4CgRsV3RXu5PWM0jbHTholAeCSBaAgF0v5+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990843; a=rsa-sha256; cv=none; b=vF1xdwWFpbyY1XWdzHNNMoQno/WUfZKJMnAPhktX7Tflg+eNv+80MyYvyBbiTtYqXeb9bh k/8i9Ap1QoeoWbPFZdQGKmpdb24DDDPS9VcYFnz6tTT///SXtvIe+2ewqMRztRvlHCovE2 cjbRQvClPc0bpbZbDeeAeH388P6+jbXDp1CaZFwT83Q96pFqcYqtokChiXwQ7UE2elJT7a 7hgQYGxjZXaHTB9K0TuJRv2OlyllHKgeCTMspWIvwWjNHmBPeM60EiPOiWaoPRY3/0CTek 40m0NJaaSp8WTYBdKRWmuCRS3mNWy9gT6sJRuA8qSHDQhnZPbJ0gawtCRgDsoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSWgv5sJ3zKYX; Tue, 15 Oct 2024 11:14:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBE3RV097988; Tue, 15 Oct 2024 11:14:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBE3Q0097985; Tue, 15 Oct 2024 11:14:03 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:14:03 GMT Message-Id: <202410151114.49FBE3Q0097985@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: c5f3a7f62217 - main - loader.efi: Make rsdp global 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: c5f3a7f62217f20f0c7b2c4fc3fb2646336b0802 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c5f3a7f62217f20f0c7b2c4fc3fb2646336b0802 commit c5f3a7f62217f20f0c7b2c4fc3fb2646336b0802 Author: Warner Losh AuthorDate: 2024-10-15 11:10:27 +0000 Commit: Warner Losh CommitDate: 2024-10-15 11:10:27 +0000 loader.efi: Make rsdp global Make rsdp pointer to the RSDP global so we can look up other tables. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D47083 --- stand/efi/loader/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 508e7ad2db36..400d46965c61 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -110,6 +110,11 @@ UINT16 boot_current; */ EFI_LOADED_IMAGE *boot_img; +/* + * RSDP base table. + */ +ACPI_TABLE_RSDP *rsdp; + static bool has_keyboard(void) { @@ -915,7 +920,6 @@ ptov(uintptr_t x) static void acpi_detect(void) { - ACPI_TABLE_RSDP *rsdp; char buf[24]; int revision; From nobody Tue Oct 15 11:14: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 4XSWgx22kfz5Ymt5; Tue, 15 Oct 2024 11:14:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWgx09gBz4ZJj; Tue, 15 Oct 2024 11:14:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zVEe79QSKb2MpnUhqyE8mhAwmeqk3TtfsNrKttdwESI=; b=qEEXj7MlpS4E8b+HBl0IPRAqJ/tGMQPVfK/Tu8diFcXrINU2SvkQBA5ca5cvF090oMlXRD L35WgPPLSCEkTaeS+sGqUjF0Deot49Z9o0viuzg6F5YgyoyTuQFeOcHGHVrzwgrW4RaUqU suj80XO9Rx+4KM38iMpenuW0woa6vv91Oyb62QqLp2ZPuGU45CD6JLPNt6k0wVFpuDD71Z 6quYdrOWiaMSx3j2JrIV7k8rJyimZxX+0Q/LUWklmf6NaycUrm6jKSc3Lc1e2O6FRlcMM3 dj8O5T7ROZp/eAb1v60YztLIdrGfyLpEQbOz9x+aR0TXs7/3Qo3ReqbmH5MziQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zVEe79QSKb2MpnUhqyE8mhAwmeqk3TtfsNrKttdwESI=; b=IG+dFr20gcMyXJJUACXLngprj1HIfZ6kv8K7mVancqykpANX/DBm616wMc1CNLCpbVschc SLVqsbVFCYYe9YoY3tGZyAObpSsWvC6tIi0IKbdKcZ+NCQu0RoJ2MKKaRYfDae5YzZ5w+8 qA4YBkukrQUF6Ia34veoPh+RFK+MSmT9n5mDfa79hOQ+adJV6pFi+T1k6beGLr8kr6JUnE mFZAcrVZIM907Hs3dH+W/NXwOuFWdxPCWFPGy/+PHsH0jcISqcHJAv8QU2sDMu0YmdUW1l LaFdGiYXNEy55K6O0Nkoedfrgaq+5gGmrRAcS7I7BYGaMBaP13xYU6gOtom+Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990845; a=rsa-sha256; cv=none; b=EUuU8OkrwHWME9F6X3tntHCXYlLBgi3AYevfEgb9agi63lJrPbiL8n6EFvcB9j2BffgLVu b623rukNfnOPFmVNhYcb9rPx0uOeuFgh0p3ddzz0K0ZiRVDZN2qzTcwJzWqnFRdv4cG9Ss KjUYqzCqcEl/08yQ0qsLW7OGENPNotG180tDIaUMJbu39FdUHo5Yp4Zpy/eGyTAO1e195k 4kSTVpNoOBbeC8u+P27GKwdIFQH80gxtle2L9tMNKGDK6yDIJhLoVm+yNMY19KTEFY8LP1 /QFotGyY1Mzyy80mMGABr8UUDOpS1q+7msO0fUyArpSmz3qtpF3MZHc/T/lGdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSWgw6tv3zKWP; Tue, 15 Oct 2024 11:14:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBE4FS098033; Tue, 15 Oct 2024 11:14:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBE478098030; Tue, 15 Oct 2024 11:14:04 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:14:04 GMT Message-Id: <202410151114.49FBE478098030@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: 94164106c0a7 - main - loader.efi: |= the boot flags how 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: 94164106c0a7e18b5ac7a1508fed179b6e6939f9 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=94164106c0a7e18b5ac7a1508fed179b6e6939f9 commit 94164106c0a7e18b5ac7a1508fed179b6e6939f9 Author: Warner Losh AuthorDate: 2024-10-15 11:11:02 +0000 Commit: Warner Losh CommitDate: 2024-10-15 11:11:02 +0000 loader.efi: |= the boot flags how how is assumed to be 0, so we directly assign to it. It might not always be 0, so or-in these bits. Sponsored by: Netflix Reviewed by: bz, andrew Differential Revision: https://reviews.freebsd.org/D47084 --- stand/efi/loader/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 400d46965c61..13ef90795d4b 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -767,9 +767,9 @@ parse_uefi_con_out(void) * all the other more common cases). */ if (efi_has_gop()) - how = RB_MULTIPLE; + how |= RB_MULTIPLE; else - how = RB_MULTIPLE | RB_SERIAL; + how |= RB_MULTIPLE | RB_SERIAL; setenv("console", "efi,comconsole", 1); goto out; } From nobody Tue Oct 15 11:14: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 4XSWgy2X4Lz5YmvP; Tue, 15 Oct 2024 11:14:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWgy17mKz4ZJx; Tue, 15 Oct 2024 11:14:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TBKRpMIdp/FE+Ul+tbA5PDcxL++stTH4gYyiRDfpu/4=; b=FtnbT/pYj2UItDi4ACwgKRYOPwqhhvP7wjX0Z4HzznAILae2mlzGRexRMl4gWYHc6gM2Ls JAFTLWakWihwWyP8taWXEV/wcghoNqESHtbZG8Ogn3dChQY/x/A29v5kyLLk03mDrZGr0E bpJ6/C34QyhbS9PRUXq/PvVrrD77TGwVQ72maY8o67FdCPUghntrWBmPCnxjrCbUHtXIlA l6PvNvzMjWvljvp0cmzCdEL45tlNci3nZJaAbI5/8KqzMJNoWXlOubr4iQ4qbqdxtepAO1 +ROnD1buPQwSe7miFw1TmX5hQwXWyNIhn+FpfLXuod/PR5foUCl58aA4ljIA4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TBKRpMIdp/FE+Ul+tbA5PDcxL++stTH4gYyiRDfpu/4=; b=YYyUntjrgEoc1B/8LE0PXiesXjvhC3uf4x7RtQeRjVkitrq2dMUWIE6ggpckeV7eVfcBM7 0bHRJJndG1pRoDxNQ6o33Qf5g7bYcl0Lk73UH+RHpnFJRfu3NU3I3kSzhru3lx2NMBEZ5M oO3vTUa/UhoY9a+DVwu+DOob5YYT7MkgQS5iAdVrWXnrBZ4M7nMsCSZ6nza8ghOXQ0Fudn geIRZvVzFfMzyfL5HJeMBadjE7v8zThXSdJ6wE8mnmXxuRiJgG4Zw8mCPXa04bF1CNKbjq qJlqln7OC4klEewYasUKqWcPSe4r8USuRLxkBxptAmW1C+CrI8LDlqEW2ZBzCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990846; a=rsa-sha256; cv=none; b=mPS2qnId80bPSMfiKFqgd4z0rjbbswVTKy4UkuKUUsQ/jORHhBWoEgTLTtoWq2JLACo86h k/nQ9e2S3D9Wp/EphibAEi6aGvtbZlFN5aWUq4IqU9IeikmI08YTk6CO4BTLHwc2Fl1i9F O0Qz7fpH/k4qv18lb2nzjRMMwsYh7yM106dImYQkArBp4mvxAstLejZ/zuOdkBvOqYgVbx M8PPXXNUDq+A7H3DCLyreqqmXH5/qDo9BEAL9W3cHb9I8ZimSRJSAcmFMexd9vMED8sLar riIbfP5OA+n7jUpvV61kCvk7tbyj4puh5wcUp/LZv6eUx32+xxoQKeNr5xCLjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSWgy0jkczKl2; Tue, 15 Oct 2024 11:14:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBE5pk098085; Tue, 15 Oct 2024 11:14:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBE5F7098082; Tue, 15 Oct 2024 11:14:05 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:14:05 GMT Message-Id: <202410151114.49FBE5F7098082@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: 70253b538f68 - main - loader.efi: Parse SPCR table entry in ACPI tables 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: 70253b538f68f2787d5913702337eb600799a3c3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=70253b538f68f2787d5913702337eb600799a3c3 commit 70253b538f68f2787d5913702337eb600799a3c3 Author: Warner Losh AuthorDate: 2024-10-15 11:12:16 +0000 Commit: Warner Losh CommitDate: 2024-10-15 11:12:16 +0000 loader.efi: Parse SPCR table entry in ACPI tables If there's a SPCR, then use it to create and pass the right values to the uart. We pass xo=0 in to calcuate the xo from the baud rate. We try to be smart about what we set. We either set io or mm or pv/pd. Old kernels will still work, despite pb/pd not being supported, because we'll fall back to the SPCR parsing in the kernel. We don't support Rev3 or Rev4 SPCR yet. It's too new to be in real hardware yet. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47085 --- stand/efi/loader/main.c | 220 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 205 insertions(+), 15 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 13ef90795d4b..e8db72bf4c8a 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -728,14 +728,199 @@ setenv_int(const char *key, int val) setenv(key, buf, 1); } +static void * +acpi_map_sdt(vm_offset_t addr) +{ + /* PA == VA */ + return ((void *)addr); +} + +static int +acpi_checksum(void *p, size_t length) +{ + uint8_t *bp; + uint8_t sum; + + bp = p; + sum = 0; + while (length--) + sum += *bp++; + + return (sum); +} + +static void * +acpi_find_table(uint8_t *sig) +{ + int entries, i, addr_size; + ACPI_TABLE_HEADER *sdp; + ACPI_TABLE_RSDT *rsdt; + ACPI_TABLE_XSDT *xsdt; + vm_offset_t addr; + + if (rsdp == NULL) + return (NULL); + + rsdt = (ACPI_TABLE_RSDT *)(uintptr_t)rsdp->RsdtPhysicalAddress; + xsdt = (ACPI_TABLE_XSDT *)(uintptr_t)rsdp->XsdtPhysicalAddress; + if (rsdp->Revision < 2) { + sdp = (ACPI_TABLE_HEADER *)rsdt; + addr_size = sizeof(uint32_t); + } else { + sdp = (ACPI_TABLE_HEADER *)xsdt; + addr_size = sizeof(uint64_t); + } + entries = (sdp->Length - sizeof(ACPI_TABLE_HEADER)) / addr_size; + for (i = 0; i < entries; i++) { + if (addr_size == 4) + addr = le32toh(rsdt->TableOffsetEntry[i]); + else + addr = le64toh(xsdt->TableOffsetEntry[i]); + if (addr == 0) + continue; + sdp = (ACPI_TABLE_HEADER *)acpi_map_sdt(addr); + if (acpi_checksum(sdp, sdp->Length)) { + printf("RSDT entry %d (sig %.4s) is corrupt", i, + sdp->Signature); + continue; + } + if (memcmp(sig, sdp->Signature, 4) == 0) + return (sdp); + } + return (NULL); +} + +/* + * Convert the InterfaceType in the SPCR. These are encoded the same for DBG2 + * tables as well (though we don't parse those here). + */ +static const char * +acpi_uart_type(UINT8 t) +{ + static const char *types[] = { + [0] = "ns8250", /* Full 16550 */ + [1] = "ns8250", /* DBGP Rev 1 16550 subset */ + [3] = "pl011", /* Arm PL011 */ + [5] = "ns8250", /* Nvidia 16550 */ + [0x12] = "ns8250", /* 16550 defined in SerialPort */ + }; + + if (t >= nitems(types)) + return (NULL); + return (types[t]); +} + +static int +acpi_uart_baud(UINT8 b) +{ + static int baud[] = { 0, -1, -1, 9600, 19200, -1, 57600, 115200 }; + + if (b > 7) + return (-1); + return (baud[b]); +} + +static int +acpi_uart_regionwidth(UINT8 rw) +{ + if (rw == 0) + return (1); + if (rw > 4) + return (-1); + return (1 << (rw - 1)); +} + +static const char * +acpi_uart_parity(UINT8 p) +{ + /* Some of these SPCR entires get this wrong, hard wire none */ + return ("none"); +} + /* - * Parse ConOut (the list of consoles active) and see if we can find a - * serial port and/or a video port. It would be nice to also walk the - * ACPI name space to map the UID for the serial port to a port. The - * latter is especially hard. Also check for ConIn as well. This will - * be enough to determine if we have serial, and if we don't, we default - * to video. If there's a dual-console situation with ConIn, this will - * currently fail. + * See if we can find a SPCR ACPI table in the static tables. If so, then it + * describes the serial console that's been redirected to, so we know that at + * least there's a serial console. this is most important for embedded systems + * that don't have traidtional PC serial ports. + * + * All the two letter variables in this function correspond to their usage in + * the uart(4) console string. We use io == -1 to select between I/O ports and + * memory mapped addresses. Set both hw.uart.console and hw.uart.consol.extra + * to communicate settings from SPCR to the kernel. + */ +static int +check_acpi_spcr(void) +{ + ACPI_TABLE_SPCR *spcr; + int br, db, io, rs, rw, sb, xo, pv, pd; + uintmax_t mm; + const char *dt, *pa; + char *val = NULL; + + spcr = acpi_find_table(ACPI_SIG_SPCR); + if (spcr == NULL) + return (0); + dt = acpi_uart_type(spcr->InterfaceType); + if (dt == NULL) { /* Kernel can't use unknown types */ + printf("UART Type %d not known\n", spcr->InterfaceType); + return (0); + } + + /* I/O vs Memory mapped vs PCI device */ + io = -1; + pv = spcr->PciVendorId; + pd = spcr->PciDeviceId; + if (pv == 0xffff && pd == 0xffff) { + if (spcr->SerialPort.SpaceId == 1) + io = spcr->SerialPort.Address; + else { + mm = spcr->SerialPort.Address; + rs = ffs(spcr->SerialPort.BitWidth) - 4; + rw = acpi_uart_regionwidth(spcr->SerialPort.AccessWidth); + } + } else { + /* XXX todo: bus:device:function + flags and segment */ + } + + /* Uart settings */ + pa = acpi_uart_parity(spcr->Parity); + sb = spcr->StopBits; + db = 8; + + /* + * Note: We don't support SPCR Rev3 or Rev4 so use Rev2 values, if we + * did we wouldn't have to do this weird dances with baud or xtal rates. + * Rev 3 and 4 are too new to have seen any deployment, and aren't in + * the system's actblX.h files yet. This will fail for newer high-speed + * consoles until acpica catches up with Microsoft's new definitions. + */ + xo = 0; + br = acpi_uart_baud(spcr->BaudRate); + + if (io != -1) { + asprintf(&val, "db:%d,dt:%s,io:%#x,pa:%s,br:%d,xo=%d", + db, dt, io, pa, br, xo); + } else if (pv != 0xffff && pd != 0xffff) { + asprintf(&val, "db:%d,dt:%s,pv:%#x,pd:%#x,pa:%s,br:%d,xo=%d", + db, dt, pv, pd, pa, br, xo); + } else { + asprintf(&val, "db:%d,dt:%s,mm:%#jx,rs:%d,rw:%d,pa:%s,br:%d,xo=%d", + db, dt, mm, rs, rw, pa, br, xo); + } + env_setenv("hw.uart.console", EV_VOLATILE, val, NULL, NULL); + free(val); + + return (RB_SERIAL); +} + + +/* + * Parse ConOut (the list of consoles active) and see if we can find a serial + * port and/or a video port. It would be nice to also walk the ACPI DSDT to map + * the UID for the serial port to a port since there's no standard mapping. Also + * check for ConIn as well. This will be enough to determine if we have serial, + * and if we don't, we default to video. If there's a dual-console situation + * with only ConIn defined, this will currently fail. */ int parse_uefi_con_out(void) @@ -749,7 +934,12 @@ parse_uefi_con_out(void) UART_DEVICE_PATH *uart; bool pci_pending; - how = 0; + /* + * A SPCR in the ACPI fixed tables documents a serial port used for the + * console. It may mirror a video console, or may be stand alone. If it + * is present, we return RB_SERIAL and will use it for the kernel. + */ + how = check_acpi_spcr(); sz = sizeof(buf); rv = efi_global_getenv("ConOut", buf, &sz); if (rv != EFI_SUCCESS) @@ -758,13 +948,13 @@ parse_uefi_con_out(void) rv = efi_global_getenv("ConIn", buf, &sz); if (rv != EFI_SUCCESS) { /* - * If we don't have any ConOut default to both. If we have GOP - * make video primary, otherwise just make serial primary. In - * either case, try to use both the 'efi' console which will use - * the GOP, if present and serial. If there's an EFI BIOS that - * omits this, but has a serial port redirect, we'll - * unavioidably get doubled characters (but we'll be right in - * all the other more common cases). + * If we don't have any Con* variable use both. If we have GOP + * make video primary, otherwise set serial primary. In either + * case, try to use both the 'efi' console which will use the + * GOP, if present and serial. If there's an EFI BIOS that omits + * this, but has a serial port redirect, we'll unavioidably get + * doubled characters, but we'll be right in all the other more + * common cases. */ if (efi_has_gop()) how |= RB_MULTIPLE; From nobody Tue Oct 15 11:14: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 4XSWgz5cmfz5Ymtb; Tue, 15 Oct 2024 11:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSWgz27M6z4ZPy; Tue, 15 Oct 2024 11:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+O2ANFWKf8OQX81EQzbzxcK/ZikvdJ2qYJisYze+V2M=; b=kmKT/pFLvEEphZljtJ2/bruoBG5jIkHDRPPhyykRo4SORNjfH57WTCa+1d2U8eY0YFYfmM NABqKrODjmei/QFHRQbblPNHSjOh79mmY5FmFyzZJ5VgE6KuJM2ILW6uKvw19/yF2ZmEIH S8USdc1xeKl0kfOQBTL+ZEaS/iS+O9uE25zBH1SU+U8OgCLZABE5mfCyllcvbzGrnqTk7t AyEhdZjc1ohSWwNkX/0mcP44iafwY7g1uhmorkLzBOwGRjb9YpxJIiEiESs5iW3MvuLe6Z CxwGLvWs0F1n4cz7uP9EFnrQOOvfX07YgiG0hLApj+/VYvUpchXetOjH79x2qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728990847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+O2ANFWKf8OQX81EQzbzxcK/ZikvdJ2qYJisYze+V2M=; b=FRgzHTvjSSQH8UQfYmNJN2hEJ+NOlawhaPVGBPIm97tF1A0DHg0vd5djTCaK/DKLdSYUaD sq01elr2PGUq1jXAsyqwJQu+bDnalynEoUGlDi/zw6sOfZPZ92Q//59GtR/2CEDfz+6P4q SRJCgd9FFqqrPOEx9GrBnDUFh+A9+rFid5eUsJYCC5D/VheDOWvshKcKPdnneBUqTxYxfi tC/GZfMh8UmW+llYaJrupyb8z/Wq72PXuB3R1upGg8KogoHyzQ3YVjuonYM2ooO71omMN3 n11lMTzQS/5hdTu7+t2XvjpLaOESoq7bZHf6inavjD9oJHa+p8UKaU4kJBgAeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728990847; a=rsa-sha256; cv=none; b=VeE0I3jtKm999xoO8qN4L499AvSg2kbWtGUBW/iZTqS8pn64TSC8BpOVQ7eM7nZgGBXlq4 Gu7oZJqVoSyg2xLgu4ckjjrpKtwK5RAsAiz3QmrcWUH8MyXTrI42A6NUj3L7DF8B8h/OCA XLb990x20K9A1f9QrQSWvUesdhT9bPjFU+tB2ZQhG8N/d/ChVdeGvs2NrRoBmb8Rp0h9Et 1J59+YzT4L/+6RXCV72hoD/+PAg8QzJcj/TL7+zSrP/QuoO50l+0iAI3aXMizVWublX1Po OE4T16CGNe5g6d1yOlIC2u//KGOOqXvWdDYsjmCYrA28mmqz/RK/cAWccawUmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSWgz1lCYzKTT; Tue, 15 Oct 2024 11:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBE7kv098136; Tue, 15 Oct 2024 11:14:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBE7Jv098133; Tue, 15 Oct 2024 11:14:07 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:14:07 GMT Message-Id: <202410151114.49FBE7Jv098133@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: 501983e62e75 - main - loader.efi: Parse SPCR v3 and v4 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: 501983e62e754d0b260c0dfe7f23042c89acd9f1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=501983e62e754d0b260c0dfe7f23042c89acd9f1 commit 501983e62e754d0b260c0dfe7f23042c89acd9f1 Author: Warner Losh AuthorDate: 2024-10-15 11:12:59 +0000 Commit: Warner Losh CommitDate: 2024-10-15 11:12:59 +0000 loader.efi: Parse SPCR v3 and v4 We can get the UART clock from v3 SPCR, and a precise baudrate from v4. Some precise baudrates will currently be rejected by the kernel. Sponsored by: Netflix Reviewed by: adrian, andrew Differential Revision: https://reviews.freebsd.org/D47096 --- stand/efi/loader/main.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index e8db72bf4c8a..0e2c580d1a8a 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -888,14 +888,24 @@ check_acpi_spcr(void) db = 8; /* - * Note: We don't support SPCR Rev3 or Rev4 so use Rev2 values, if we - * did we wouldn't have to do this weird dances with baud or xtal rates. - * Rev 3 and 4 are too new to have seen any deployment, and aren't in - * the system's actblX.h files yet. This will fail for newer high-speed - * consoles until acpica catches up with Microsoft's new definitions. + * UartClkFreq is 3 and newer. We always use it then (it's only valid if + * it isn't 0, but if it is 0, we want to use 0 to have the kernel + * guess). */ - xo = 0; - br = acpi_uart_baud(spcr->BaudRate); + if (spcr->Header.Revision <= 2) + xo = 0; + else + xo = spcr->UartClkFreq; + + /* + * PreciseBaudrate, when non-zero, is to be preferred. It's only valid, + * though, for rev 4 and newer. So when it's 0 or the version is too + * old, we do the old-style table lookup. Otherwise we believe it. + */ + if (spcr->Header.Revision <= 3 || spcr->PreciseBaudrate == 0) + br = acpi_uart_baud(spcr->BaudRate); + else + br = spcr->PreciseBaudrate; if (io != -1) { asprintf(&val, "db:%d,dt:%s,io:%#x,pa:%s,br:%d,xo=%d", From nobody Tue Oct 15 11:40:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSXGy1VdZz5YpZC; Tue, 15 Oct 2024 11:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSXGy0my8z4fpy; Tue, 15 Oct 2024 11:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728992458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MDXv3mzQegL+Z3ktMHNY+Ocy10H4n7hVdbpSSc41Zlc=; b=jfhOFKj8qLHNhusEf/JE8f/AHETbW61oByB/8RI7LobEnjJIDCOXJCyLvgeVKOcAHJb0pK SYtPFUpzO4pv/i6Unx9J5evVrw/kJlBVADWpo6Uv+i5DOf/s5mgqLSip0s8KXdPZ1UANc9 nmkk+2KZlIuO2uB1XLcRYp4FsihzNryhHdkzMD9pCFdF0zxWfloiBU3tjhicl/AiviXGYi 8rdBv7MsHIzgZUMMIryuiqdVrKaCgwuIbtvm1qxW12Lj3g8Krw0LOAkxFL9koEGH6h4RYe RRqjPCqpDbAwHcgBPKtWtsRfDnFWEOMqhQEKw/N+7Eu+UVRA0z+MAKH+SY0cIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728992458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MDXv3mzQegL+Z3ktMHNY+Ocy10H4n7hVdbpSSc41Zlc=; b=POWsJ3yVaqU0ztnsm13UibyB6VWwhjlQ2FbgMpwfjzx3EFWWnd046wJ/tZMqW+CRP+rCrp bVti3JMt/XaDLhEUdsnHnwr3NKgKhUV4FGesdj5RgStiQsoM+eM7xPcKGpGng6NnDq6lbI FRx7YP8y9Rskd+KGfVWEk8Gq0n8+nPwqRV9NJrp/eCGxTaGsuE+v5u8gVIUOeHVYXU+ECi rt41fU0Jj1qoz0PtQlWTMqoKTONfJZ3EVrVr1Qvcn9ZK4W8piR3GgKEFTtr9wbziHJclSW rv52mZtetnYzeOVLSF9BNGdRqLmBmtusdu7d7YdvVz10D4vY4cYKONE2MqZQug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728992458; a=rsa-sha256; cv=none; b=SIz3sGIyzpaZEKdQx2spGEwep8rDEnfyvlVLyE7SHiy8MB0J753FkkD/YUj/BdPke41YS5 pAsvZQja/lQSOpEBZHLrGatkGn7TKsXGJWvx+ku2r5BGjvJunTKS+3/+okLCiudS1l41/L Y/PL/ULw+kFdxKt7jlzbzxSrVfYNgRlyU5Doute2hjlBX0Nd+IX50h1pIjFAO88LZvQcv8 r2Sbikwh1GOQPFlEpYAy1oXOR/uujfk7iKbD9A/FN+I3z8BVKbzmoi9wn0bRPGa1cgxnXC fjVBATQPGJJxT0kyGcEl93SBE1CnwF2hnkPjZcoZP3Z6y9qeonxx4VjT8ssjJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSXGy0NT2zLCD; Tue, 15 Oct 2024 11:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBevuM043305; Tue, 15 Oct 2024 11:40:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBevlw043302; Tue, 15 Oct 2024 11:40:57 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:40:57 GMT Message-Id: <202410151140.49FBevlw043302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 18b226ea08fb - main - lib/geom: remove redundant libraries and objects 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: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18b226ea08fb3a27ab05a2d6b6295e54487cc246 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=18b226ea08fb3a27ab05a2d6b6295e54487cc246 commit 18b226ea08fb3a27ab05a2d6b6295e54487cc246 Author: Robert Clausecker AuthorDate: 2024-10-11 14:48:02 +0000 Commit: Robert Clausecker CommitDate: 2024-10-15 11:34:45 +0000 lib/geom: remove redundant libraries and objects Do not link lib/geom/raid with libmd, it is not required for the module. Do not include the sha256/sha512 code in lib/geom/eli, it is provided by libmd. Remove ${.CURDIR:H:H}/misc from .PATH for all modules. This path has stopped being valid when the GEOM modules were moved from sbin/geom to lib/geom. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D47061 --- lib/geom/cache/Makefile | 1 - lib/geom/concat/Makefile | 1 - lib/geom/eli/Makefile | 4 +--- lib/geom/journal/Makefile | 1 - lib/geom/label/Makefile | 1 - lib/geom/mirror/Makefile | 1 - lib/geom/mountver/Makefile | 1 - lib/geom/multipath/Makefile | 1 - lib/geom/nop/Makefile | 1 - lib/geom/part/Makefile | 1 - lib/geom/raid/Makefile | 3 --- lib/geom/raid3/Makefile | 1 - lib/geom/shsec/Makefile | 1 - lib/geom/stripe/Makefile | 1 - lib/geom/union/Makefile | 1 - lib/geom/virstor/Makefile | 2 +- 16 files changed, 2 insertions(+), 20 deletions(-) diff --git a/lib/geom/cache/Makefile b/lib/geom/cache/Makefile index 850a237d6827..e307351c1de5 100644 --- a/lib/geom/cache/Makefile +++ b/lib/geom/cache/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= cache diff --git a/lib/geom/concat/Makefile b/lib/geom/concat/Makefile index e30eeb247569..c9f9d0e38c75 100644 --- a/lib/geom/concat/Makefile +++ b/lib/geom/concat/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= concat diff --git a/lib/geom/eli/Makefile b/lib/geom/eli/Makefile index f4a0e6f5ad9f..a22eacb9d7e8 100644 --- a/lib/geom/eli/Makefile +++ b/lib/geom/eli/Makefile @@ -1,13 +1,11 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc ${SRCTOP}/sys/geom/eli ${SRCTOP}/sys/crypto/sha2 +.PATH: ${SRCTOP}/sys/geom/eli GEOM_CLASS= eli SRCS= g_eli_crypto.c SRCS+= g_eli_hmac.c SRCS+= g_eli_key.c SRCS+= pkcs5v2.c -SRCS+= sha256c.c -SRCS+= sha512c.c LIBADD= md crypto diff --git a/lib/geom/journal/Makefile b/lib/geom/journal/Makefile index 7d5282ff762a..b87e8283225b 100644 --- a/lib/geom/journal/Makefile +++ b/lib/geom/journal/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= journal SRCS+= geom_journal_ufs.c diff --git a/lib/geom/label/Makefile b/lib/geom/label/Makefile index ed35777cf479..823d5816be64 100644 --- a/lib/geom/label/Makefile +++ b/lib/geom/label/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= label diff --git a/lib/geom/mirror/Makefile b/lib/geom/mirror/Makefile index 2e86b099fea8..cf0174ee0766 100644 --- a/lib/geom/mirror/Makefile +++ b/lib/geom/mirror/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= mirror diff --git a/lib/geom/mountver/Makefile b/lib/geom/mountver/Makefile index b60e355bed65..6ea3705261c2 100644 --- a/lib/geom/mountver/Makefile +++ b/lib/geom/mountver/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= mountver diff --git a/lib/geom/multipath/Makefile b/lib/geom/multipath/Makefile index 805ac93dfcbd..1c7341145017 100644 --- a/lib/geom/multipath/Makefile +++ b/lib/geom/multipath/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= multipath diff --git a/lib/geom/nop/Makefile b/lib/geom/nop/Makefile index d7d1329697ba..294eeb4e7002 100644 --- a/lib/geom/nop/Makefile +++ b/lib/geom/nop/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= nop diff --git a/lib/geom/part/Makefile b/lib/geom/part/Makefile index a8f0c6ac5f7f..58390e299d6f 100644 --- a/lib/geom/part/Makefile +++ b/lib/geom/part/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= part diff --git a/lib/geom/raid/Makefile b/lib/geom/raid/Makefile index 338a305b7ab9..b84121126ca1 100644 --- a/lib/geom/raid/Makefile +++ b/lib/geom/raid/Makefile @@ -1,8 +1,5 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= raid -LIBADD= md - .include diff --git a/lib/geom/raid3/Makefile b/lib/geom/raid3/Makefile index f6e5e5ef92fa..f2d9a9233c16 100644 --- a/lib/geom/raid3/Makefile +++ b/lib/geom/raid3/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= raid3 diff --git a/lib/geom/shsec/Makefile b/lib/geom/shsec/Makefile index 47981da7df9d..493ea5d15acd 100644 --- a/lib/geom/shsec/Makefile +++ b/lib/geom/shsec/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= shsec diff --git a/lib/geom/stripe/Makefile b/lib/geom/stripe/Makefile index a63568ae35ef..762df5f3c872 100644 --- a/lib/geom/stripe/Makefile +++ b/lib/geom/stripe/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= stripe diff --git a/lib/geom/union/Makefile b/lib/geom/union/Makefile index 7dfe3be205ae..e2027125c6d1 100644 --- a/lib/geom/union/Makefile +++ b/lib/geom/union/Makefile @@ -1,5 +1,4 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= union diff --git a/lib/geom/virstor/Makefile b/lib/geom/virstor/Makefile index e596e83ec186..63ea8e5ad31c 100644 --- a/lib/geom/virstor/Makefile +++ b/lib/geom/virstor/Makefile @@ -1,5 +1,5 @@ PACKAGE=geom -.PATH: ${.CURDIR:H:H}/misc ${SRCTOP}/sys/geom/virstor +.PATH: ${SRCTOP}/sys/geom/virstor GEOM_CLASS= virstor From nobody Tue Oct 15 11:40:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSXGz4mvRz5YpZG; Tue, 15 Oct 2024 11:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSXGz2QpWz4fkk; Tue, 15 Oct 2024 11:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728992459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YCT5RySDgx5OLrq1jvLPOUv6tufDAZNx00cQIUNcFe4=; b=EK90bhofuFz3Sqxc/3QTvyjC0xcAEM+yfpjQ4UOI9VxOqp4jorgbVKK/3rS65e5wvQnP0M 0SD9aoEWOooexHtqZhQGaYisyePKZoc8aiXeujTmdQeifbEnK8zLeyL3SEec8B+x84gFVf LEuBafdT1UldGq1UM4njCUq7B1E7yL37xsAnUR/BK9o+jNjqj2RCxY6hErpU/ImS2jBm+8 sXIufrCvq4GS4sz4l7bfnQy+I/ep5mN8/tKZWtmdCFojeQtFQc0sxPLbIr3xvi2hHpyQw9 HhC8D4ODjmbZ1j/B1w6ui5NPPGpV9c8FNF3iZA6e84fx39kLJWBbYZHexWRaUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728992459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YCT5RySDgx5OLrq1jvLPOUv6tufDAZNx00cQIUNcFe4=; b=n/gfWK0WcvhoxxeS4F8IekwdtbljH/bK0z5NkzLvjNVgJlaZ5czJ91qC/KIcfe6s91LqpA vIMxTWP3TLEuJTFlcqYKn7qSLhFcc4/W33w4G4UHctsi60clE9qp2xTg0Sa2/KpIMqvsI/ foy+QM/z/Bgy9y8ihMzmdBsZJIEZF+TBk+WKjvHwPVoZR1cdnITtjkUelCiEZeqlYTSqGc 5sieW3O3XxS3TpX6GJCZxPgIoO0CMRlDoK+qx+CGOd4lrsEE37+pTMjWZrMt1xTMmvbTrw /TIBIfwPMnhpr6xQcds35oVU+JYCXCJrWO3x4dCo1Fh5s2kkXeDfjXMikT2NfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728992459; a=rsa-sha256; cv=none; b=iuFiqDq/oJpmHe8hMN8CHAH6cJetTHkTPwIxuDKsfKy7pt8Gy47CYbSMy7ZDZ+U4WFFYOn SlneOgs5R88q23cmt/7SJFfDiIR2hupK+DvJbdtVJ9kaZH+0AmYE2o0T1Eq9XWcZDDd7FX pi6fK8edEkAhTy/CtKu2pdzTggum6HxpWyyjbQeDTI6H+ob+dopPq+prXPpBws2G1Nf5vu u13LwB63GvXLzLLqaSKqdxQ9axkD/2UqV8hqWQ88qeb8B0Ap1FkrExaNyP3uTDmB+19aBx Gou/OmJGsK4Oi0LpISRrW8a21RVKmCcP6uAs5+9C2BLQxeENu0JmmDxIOTKUvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSXGz21ytzLCF; Tue, 15 Oct 2024 11:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FBexK3043348; Tue, 15 Oct 2024 11:40:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FBexw7043345; Tue, 15 Oct 2024 11:40:59 GMT (envelope-from git) Date: Tue, 15 Oct 2024 11:40:59 GMT Message-Id: <202410151140.49FBexw7043345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 7bedae81adaf - main - lib/libc/tests/string: add test for strnlen() 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: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bedae81adaff4b4d291ba1f650b5b915ce207bf Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=7bedae81adaff4b4d291ba1f650b5b915ce207bf commit 7bedae81adaff4b4d291ba1f650b5b915ce207bf Author: Strahinja Stanišić AuthorDate: 2024-10-14 21:09:28 +0000 Commit: Robert Clausecker CommitDate: 2024-10-15 11:34:45 +0000 lib/libc/tests/string: add test for strnlen() Tests for strnlen, checks alignments from up to 16 and buffer sizes up to 64, also checks that passing SIZE_MAX as maxlen works, because it can cause a wraparound error if strnlen is incorrect. Reviewed by: fuz, emaste (GSoC mentors), kib Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D46275 --- lib/libc/tests/string/Makefile | 1 + lib/libc/tests/string/strnlen_test.c | 141 +++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) diff --git a/lib/libc/tests/string/Makefile b/lib/libc/tests/string/Makefile index f46076619352..a019939c30af 100644 --- a/lib/libc/tests/string/Makefile +++ b/lib/libc/tests/string/Makefile @@ -15,6 +15,7 @@ ATF_TESTS_C+= memset2_test ATF_TESTS_C+= memset_s_test ATF_TESTS_C+= strncmp_test ATF_TESTS_C+= stpncpy_test +ATF_TESTS_C+= strnlen_test ATF_TESTS_C+= strcmp2_test ATF_TESTS_C+= strcspn_test ATF_TESTS_C+= strerror2_test diff --git a/lib/libc/tests/string/strnlen_test.c b/lib/libc/tests/string/strnlen_test.c new file mode 100644 index 000000000000..31c2384bb30f --- /dev/null +++ b/lib/libc/tests/string/strnlen_test.c @@ -0,0 +1,141 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Strahinja Stanisic + */ + +#include +#include +#include +#include +#include +#include + +#include + +ATF_TC(strnlen_alignments); +ATF_TC_HEAD(strnlen_alignments, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test strnlen(3) with different alignments"); +} + +ATF_TC_BODY(strnlen_alignments, tc) +{ + size_t (*strnlen_fn)(const char*, size_t) = strnlen; + char alignas(16) buffer[1 + 16 + 64 + 1 + 1]; + + memset(buffer, '/', sizeof(buffer)); + + for (int align = 1; align < 1 + 16; align++) { + char *s = buffer + align; + + for (size_t maxlen = 0; maxlen <= 64; maxlen++) { + for (size_t len = 0; len <= maxlen; len++) { + /* returns length */ + + /* without sentinels */ + s[len] = '\0'; + size_t val = strnlen_fn(s, maxlen); + if (val != len) { + fprintf(stderr, "align = %d, maxlen = %zu, len = %zu", + align, maxlen, len); + atf_tc_fail("returned incorrect len"); + } + + /* with sentinels */ + s[-1] = '\0'; + s[maxlen + 1] = '\0'; + val = strnlen_fn(s, maxlen); + if (val != len) { + fprintf(stderr, "align = %d, maxlen = %zu, len = %zu", + align, maxlen, len); + atf_tc_fail("returned incorrect len (sentinels)"); + } + + /* cleanup */ + s[-1] = '/'; + s[len] = '/'; + s[maxlen + 1] = '/'; + + } + + /* returns maxlen */ + + /* without sentinels */ + size_t val = strnlen_fn(s, maxlen); + if (val != maxlen) { + fprintf(stderr, "align = %d, maxlen = %zu", + align, maxlen); + atf_tc_fail("should return maxlen"); + } + + /* with sentinels */ + s[-1] = '\0'; + s[maxlen + 1] = '\0'; + val = strnlen_fn(s, maxlen); + if (val != maxlen) { + fprintf(stderr, "align = %d, maxlen = %zu", + align, maxlen); + atf_tc_fail("should return maxlen (sentinels)"); + } + + /* cleanup */ + s[-1] = '/'; + s[maxlen + 1] = '/'; + } + } +} + +ATF_TC(strnlen_size_max); +ATF_TC_HEAD(strnlen_size_max, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test strnlen(3) with maxlen=SIZE_MAX"); +} + +ATF_TC_BODY(strnlen_size_max, tc) +{ + size_t (*strnlen_fn)(const char*, size_t) = strnlen; + char alignas(16) buffer[1 + 16 + 64 + 1 + 1]; + + memset(buffer, '/', sizeof(buffer)); + + for (int align = 1; align < 1 + 16; align++) { + char* s = buffer + align; + + for (size_t len = 0; len <= 64; len++) { + /* returns length */ + + /* without sentinels */ + s[len] = '\0'; + size_t val = strnlen_fn(s, SIZE_MAX); + if (val != len) { + fprintf(stderr, "align = %d, maxlen = %zu, len = %zu", + align, SIZE_MAX, len); + atf_tc_fail("returned incorrect len (SIZE_MAX)"); + } + + /* with sentinels */ + s[-1] = '\0'; + val = strnlen_fn(s, SIZE_MAX); + if (val != len) { + fprintf(stderr, "align = %d, maxlen = %zu, len = %zu", + align, SIZE_MAX, len); + atf_tc_fail("returned incorrect len (sentinels) (SIZE_MAX)"); + } + + /* cleanup */ + s[-1] = '/'; + s[len] = '/'; + } + } +} + + + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, strnlen_alignments); + ATF_TP_ADD_TC(tp, strnlen_size_max); + + return atf_no_error(); +} From nobody Tue Oct 15 13:36: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 4XSZqq2M0Bz5Yxjp; Tue, 15 Oct 2024 13:36:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSZqq1nZzz4s1n; Tue, 15 Oct 2024 13:36:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728999367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LupGm9GgiWlQL2Vs3Wiyna3GKY81SmV92EX1dJwFm+E=; b=bfLjIyIehuHSWPlRBTnfv6HF6IZBBdcrxtoe9cFutvhaohnkDPOgAgelXasavs36vJba0f kjsTF3LWzC9+uRJm0Aivs4xQbvZBSmxnVk/CclovwTVj8wHjd5buByV8uXye4WmB2OcpWO DJ0RT0SHmG8D4N5nSCGKMxjfJTvcvjV4tzCGdm67YLIzLyEx/DKxC84NH7JC/Us696C7Fp cxb92zmCrtYZedmuSAmyyDgygv5I2kY148mpE9wz2OUFVMtjxXrmkzne2DToMD/ZzEYxZQ Pyf2XbvCGTE+E5OYQxvhCYs6eibpaacNKPDIgHXQPl556f38Z+bGy+cKiJz1aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728999367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LupGm9GgiWlQL2Vs3Wiyna3GKY81SmV92EX1dJwFm+E=; b=atA8NFWSvnEDk2jh5WjWr8gs7nD0zWLCRy4t/sNsz67WKXA+5BIr/NcxjS1EWrXfw9JfIz qUIWMBEaWWn2y3NaJmoeFFxoAozh3u7+FZCtOdl3hEvq0mhA1S9kbA1BY1srKGG37kIDUv zbUkQLRmc66BpdqqtEliM5aQWN/pV+oJP45qXnCejrpMkAMKYOuHO3LQNTrwkGb9RC3Bpj FNQmtVGq0ne0X/1XWGM1HibQe0rHAwIIxHeZfRLvi8sDPL6AESWLXxGcVN1DGDbfrdX1GB WtweX5Ve6o+KPobuZIUfblUN4rGAkUG9R/O/B9Hm3EMKchDqOyZPflfLhS4HxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728999367; a=rsa-sha256; cv=none; b=KwiDoPdgsPt/HVWAJ8zdaMTcQ82fTAyWV6rve8PddJpT0aYp4brGzRpxZ3VA3JL4LdJUHb mlFFhl3Qac8gEMawEaG1gYqHawpwG6DcqsFqlQ8jn0XoK/mJ6WqmWdmliaETg+n7eTaEcP 0uhsuyvY+g++fM+AAEv1igFibQ2r8AiX/WSh/LtQGMu//FJu8R2dBMLyVK/4slInIB9UbV JhcTREm7mCkBJg3q/sKqalQbIHs7o+CMOjhhq8EQonUdirHAJX3JtsWLciU3lS/6g0sD+O z5ui49EWJtItTjeiOrPLDYMr5C8sqC3ZVk68F2U9j9N7UtqL+nIg8BYEJtEwdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSZqq1N5dzPRK; Tue, 15 Oct 2024 13:36:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FDa7Bw035217; Tue, 15 Oct 2024 13:36:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FDa70n035214; Tue, 15 Oct 2024 13:36:07 GMT (envelope-from git) Date: Tue, 15 Oct 2024 13:36:07 GMT Message-Id: <202410151336.49FDa70n035214@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: 94e5ec7f869e - stable/14 - vm_page: Use atomic loads for cmpset 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 94e5ec7f869e244afa174af2f8a61e4355a2cb73 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=94e5ec7f869e244afa174af2f8a61e4355a2cb73 commit 94e5ec7f869e244afa174af2f8a61e4355a2cb73 Author: Mark Johnston AuthorDate: 2024-10-07 20:50:36 +0000 Commit: Mark Johnston CommitDate: 2024-10-15 12:39:44 +0000 vm_page: Use atomic loads for cmpset loops Make sure that the compiler loads the initial value value only once. Because atomic_fcmpset is used to load the value for subsequent iterations, this is probably not needed, but we should not rely on that. I verified that code generated for an amd64 GENERIC kernel does not change. Reviewed by: dougm, alc, kib Tested by: pho MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46943 (cherry picked from commit d8b32da2354d2fd72ae017fd63affa3684786e1f) --- sys/vm/vm_page.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index fe104e1e87af..7c3083de42de 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1972,7 +1972,7 @@ _vm_domain_allocate(struct vm_domain *vmd, int req_class, int npages) * Attempt to reserve the pages. Fail if we're below the limit. */ limit += npages; - old = vmd->vmd_free_count; + old = atomic_load_int(&vmd->vmd_free_count); do { if (old < limit) return (0); @@ -4054,7 +4054,7 @@ vm_page_wire_mapped(vm_page_t m) { u_int old; - old = m->ref_count; + old = atomic_load_int(&m->ref_count); do { KASSERT(old > 0, ("vm_page_wire_mapped: wiring unreferenced page %p", m)); @@ -4088,7 +4088,7 @@ vm_page_unwire_managed(vm_page_t m, uint8_t nqueue, bool noreuse) * Use a release store when updating the reference count to * synchronize with vm_page_free_prep(). */ - old = m->ref_count; + old = atomic_load_int(&m->ref_count); do { KASSERT(VPRC_WIRE_COUNT(old) > 0, ("vm_page_unwire: wire count underflow for page %p", m)); @@ -4383,7 +4383,7 @@ vm_page_try_blocked_op(vm_page_t m, void (*op)(vm_page_t)) ("vm_page_try_blocked_op: page %p is not busy", m)); VM_OBJECT_ASSERT_LOCKED(m->object); - old = m->ref_count; + old = atomic_load_int(&m->ref_count); do { KASSERT(old != 0, ("vm_page_try_blocked_op: page %p has no references", m)); From nobody Tue Oct 15 13:36: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 4XSZqr3Y7gz5YxdF; Tue, 15 Oct 2024 13:36:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSZqr2lSvz4rqw; Tue, 15 Oct 2024 13:36:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728999368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WPWqDX9JFSgyWHklxwki6UgKK41wJ4yAU2BbNXVyOY8=; b=AEDOFbyduEupHGXou1XMdCg5LN1ZopBovpf2rn2jo/TB0TxKY+OAojHDsXy76yrZEEVlJ0 gcJYTp+MVB3XQLpqWlQbjh+Ils71zwNCv+KCN2w7n3raAPmQIrdp27Afnikx+pq/lqoyJn OIrlopx8JfIgLmoimGLwndA3GQ4AhJ0mPclY4QfeNO4UycUfbqWCzKyeTr9AjKVKM9Jxj6 SKiYnm9dgsuzl9yQRolC2IwwvucstQxc23wZvyLAlLhUJcsQMbVF0u0gh281Yur7GpGQ8c zpdkXgFMAAaOWYFZBRkgJB2ttn/ByRY4z8bOJRBHLu7hs3zpHM2Y0DHwp+fx4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728999368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WPWqDX9JFSgyWHklxwki6UgKK41wJ4yAU2BbNXVyOY8=; b=nzJSGsnRfQGVsQG7qsh2h+7LESWjp2fJa0XNXnesLAo3R0x2FGR/z+5TGJPqk6lArO1NTy +dxWvX0EyIlvSvlLrjZoY2aPdqfs7bfGh0onICMkjHvpDUQ5f/1H+KtyJMv0IKrn4zWciy weav8aRYqbO9BTIhbuiqk3iG/ioI+TGvnA+Rs/xAbJyfozoRgFJopd4LAlenOkfQ772LpQ 4EkYkWcCbDQj9Gw+A3Bf3ko1sKy18dYfFdDjLSLFQRwn+2cVJGUpKEpKZhhAvPEF6GzgSk 3LbekpnQuxnMVZ+3iChr6l7Ht8/lpYzpQVl59NH2KuY6Sv6lxGAPEt///hr8SA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728999368; a=rsa-sha256; cv=none; b=ogmQ2pTT1+tyTaEEps8IHt18/tpAk9vVIlSX4IiJ6ZKUxDBY5qXSRJfVHGWGvmZFqPltxl jMgBn4FCBIwEH1q53Luj6g2T1g9H2HzQdnUsaUi8lL7FHrNY4YkOacDzq2iY848dKv3GeO D0UAKPnLNrg8CGei790idrVGP+ePvi+XxtrANa5eWZvzAs3VO6gJ3gcjrKQQopSAl8enHZ 411RrLaR9MT4pz51n19lO6a46AC7qmcFisGF1ca46BFvISoU7xgXL/3NljbT96pIQU7C3u ZLZqTVHYPXJ7Aj5NKixJCBcIxy7ngafASSfQ63Lo3tmpwfMkXh1pm1P2LaP+Xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSZqr2N9ZzPC1; Tue, 15 Oct 2024 13:36:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FDa8IJ035265; Tue, 15 Oct 2024 13:36:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FDa8ZI035262; Tue, 15 Oct 2024 13:36:08 GMT (envelope-from git) Date: Tue, 15 Oct 2024 13:36:08 GMT Message-Id: <202410151336.49FDa8ZI035262@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: 81da8e39f789 - stable/14 - geli tests: Work around a missing MFC 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: 81da8e39f78956441a27eb6bb55ac16170a21a14 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=81da8e39f78956441a27eb6bb55ac16170a21a14 commit 81da8e39f78956441a27eb6bb55ac16170a21a14 Author: Mark Johnston AuthorDate: 2024-10-15 13:35:03 +0000 Commit: Mark Johnston CommitDate: 2024-10-15 13:35:59 +0000 geli tests: Work around a missing MFC The test assumes commit 96950419f15510287080c557174e0d8409f06956, but that was never MFCed to stable branches, resulting in a broken test. This is a direct commit to stable/14. --- tests/sys/geom/class/eli/attach_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/geom/class/eli/attach_test.sh b/tests/sys/geom/class/eli/attach_test.sh index 8803fa9f1a40..e4aa3a6cd618 100644 --- a/tests/sys/geom/class/eli/attach_test.sh +++ b/tests/sys/geom/class/eli/attach_test.sh @@ -50,7 +50,7 @@ attach_multiple_fails_body() geli_test_setup sectors=1000 - attach_md md -t malloc -s `expr $sectors + 1` + md=$(attach_md -t malloc -s `expr $sectors + 1`) atf_check dd if=/dev/random of=keyfile bs=512 count=16 status=none atf_check geli init -B none -P -K keyfile ${md} From nobody Tue Oct 15 13:51: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 4XSb9L69xpz5YyNr; Tue, 15 Oct 2024 13:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSb9L5kv9z4vp4; Tue, 15 Oct 2024 13:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729000278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QYvKP84u15ClRfG0dwRERkoX9eQ3szLu+TT2g0j86zA=; b=ZKr7I/hR/3JjtWdVEuslsuntCWd1F2KAwvFi+QZMupTcrHqzNSd60EdHF5305E2LVZiERS tn2IIMxOc3ulqnGbjXJd3xZao0KtJKLyOvHcd9ucOjHiALipCRomQ6mYD74/ttHUcURVVD Y30Bn8HqixskWb2bMHFo2XRm52KjOD5vHM5TQOSNFNSWv+R1yipKHtjficpH5kCseDAAih X7sOSjsmIHcXlo6+zHAtiBstsrizd7uHs9W4C069sx4sI8k9udqp3JkYUxPoY/lk670igB cbuOXznWA2Xb7iO1PIih4lkSmZt7OKv8Zkp/a1QgotltYiHV8pj9jLFiJiettw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729000278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QYvKP84u15ClRfG0dwRERkoX9eQ3szLu+TT2g0j86zA=; b=RVWAs4l3KmUcuWqFgn1vCTeXOU4YshN9YuHM7gxmOgRCAwrG7C9vF4SYd9kocOR3+M+fb4 G3a9HlvIT4V7Vf+kI8FrpdS2IGZqCutdO6EpfepUZHFpMjH6X7dvytJLvgUjjnwtKJvaEB /vQFzKRhKVqUrF6+NDlgEgAlQYxDLvFozgBl+KjaWfMpCkc2bMT4yDJDcFUGQXASH+wMrq SKwlCFEbk16tcm80Q2V6/KsmJUEnfNL8zFQNePtey6P17Jgd8zqBwD6i73UM8lyyPx3L3H 9IQSEA2b4/jZkA74rFGIRkDK8JCLYbL2dAR9aCyb2npM+GbPZJoa45WTbDRxNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729000278; a=rsa-sha256; cv=none; b=rIDZjoHgNcWRZU+IuhFRezGT6acL+xO7wGkNd/2PK8OmYhUdtrcZiA2fYWQmOaAvUIlmc+ nEb8ChBCIKGNl47cx584A2uzsmRAGld/3PloAygwo1U9acNfI7hnwgCGrXS860IO3jy2Je CuA21RywxhfqSlCbIgqsdOO7KP7EcU8zCOlrJcMlXv+qCqeEERvPu4YiQAbDwmKbjBmtB4 pa8MX8oHwbrFd74rck+rfn7bfkY1PE4LZYr3DPFiKDolfav4CoVcV0JHHcbHJ7W5jgvHI3 jdFVSPoRDHFJLIl8iJIMCRRXGABhwIKbp2azlv0ZM1BgBi24J/8Hs+qlBzizjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSb9L5L07zPVr; Tue, 15 Oct 2024 13:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FDpI3e060860; Tue, 15 Oct 2024 13:51:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FDpIj1060857; Tue, 15 Oct 2024 13:51:18 GMT (envelope-from git) Date: Tue, 15 Oct 2024 13:51:18 GMT Message-Id: <202410151351.49FDpIj1060857@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: 8a5a9dbf389e - stable/14 - vm_object: Widen the flags field 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: 8a5a9dbf389e86d278764ababf2f1eb8ee276680 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8a5a9dbf389e86d278764ababf2f1eb8ee276680 commit 8a5a9dbf389e86d278764ababf2f1eb8ee276680 Author: Mark Johnston AuthorDate: 2024-10-06 13:07:31 +0000 Commit: Mark Johnston CommitDate: 2024-10-15 13:45:28 +0000 vm_object: Widen the flags field Take advantage of a nearby 2-byte hole to avoid growing the struct. This way, only the offsets of "flags" and "pg_color" change. Bump __FreeBSD_version since some out-of-tree kernel modules may access these fields, though I haven't found any examples so far. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35905 (cherry picked from commit 9d52823bf1dfac237e58b5208299aaa5e2df42e9) --- sys/sys/param.h | 2 +- sys/vm/vm_object.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 697a96cca916..a900131fe8ec 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -75,7 +75,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1401502 +#define __FreeBSD_version 1401503 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 3e82a5dc7430..1d00bee603f6 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -110,8 +110,8 @@ struct vm_object { int shadow_count; /* how many objects that this is a shadow for */ vm_memattr_t memattr; /* default memory attribute for pages */ objtype_t type; /* type of pager */ - u_short flags; /* see below */ u_short pg_color; /* (c) color of first page in obj */ + u_int flags; /* see below */ blockcount_t paging_in_progress; /* (a) Paging (in or out) so don't collapse or destroy */ blockcount_t busy; /* (a) object is busy, disallow page busy. */ int resident_page_count; /* number of resident pages */ From nobody Tue Oct 15 13:51: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 4XSb9N09SRz5YyDL; Tue, 15 Oct 2024 13:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSb9M6k24z4vjC; Tue, 15 Oct 2024 13:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729000279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6EEC9TezWZCdq12BBX+1TvY/YNiczI2ZS2DqzusHQIE=; b=JaTpv7dkh7Q7vGDvCitK41xMpXkxlypVlDsTmcGdNoCsA1OkTDxWuuylY5IfT0ttPBpUoo zv0CSvLATOx/zd2gN9vOtii7LhuJ5FZFKVPX5K4bxFpDGdEp+XBpb7FYK54GtwZhepi/i5 uk3VUltSGt9DRKfcXzAcqVSKFOJr/CUBT7fSedoawhe57yaruq7azM4HBhvZo3DnWALih5 K1rQrFn1ehog8cGjmSx2e179Cg5To+kPUcXwFTtSOBtprm4sOQp4MtDe1VKB4pTFqLksB3 3S5j2wO97uPCb3QlHMg+Rgfv4s1AH00r8JeKBbm9TRWQtg6Hm66nUBY4slnInQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729000279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6EEC9TezWZCdq12BBX+1TvY/YNiczI2ZS2DqzusHQIE=; b=kLDmg2qse/egpEbGOc+eEQfpTOXTpW8Fhb8bBOtr6x21j7/thd8GbVfUMgIbueEkX8m1cJ oMrrdOTZnspky/HnyFvg4xiaEGHU/uFUsh3MylG3QcnBSzjOftqoDttN4NzimYPPJi7J5j 96zTMe4lR5jfR1pyslLSuoymOBoPqWpgi7OGgoX0ln52OUPWEWvZesMdmmV0jEHcgzxRvt vH760szcgqYIejnAlZpYjRFvfOdP4HOXxFC+9XJZo5q2FuYo1B1BD8E7+uLfYZpBg8jDKo xKQc671KUSuKy8iSjSgGAese6MVamyHRK0N5BC5RvRn8/jPb+iILTNhClMhviA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729000279; a=rsa-sha256; cv=none; b=iWe2xr7l/akUkzdaxl1ImDwWdUodRQc1BhOjFmem3hOh/BblptrmkbwRVOPBiLCIMYVhAN y4xNevaI2YPh3YhE1sTXaq+x0s/+zp+K7CpNrwve41fhSLOcNGuddgVuQezdS2tvOiauMO tyi7giubMiwba1HK4Q4qYI3slF77WodOTA/HSGRhssLbIpK/gwu0MGfVyLgMUTTNShZwjC +mdYmasBm8lWDwmTqb3WzmeuOw3LQOe4TzGESznY/KN4UjvtdGV8WqTIjIsM7kByXi7xyE bYxqF2E7YMR2E4OcRrRuaSh1NU3bOQS58PR8mKh+sjNn6ZSDWv31BUxJ2jvh8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSb9M6JWrzPB5; Tue, 15 Oct 2024 13:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FDpJ99060908; Tue, 15 Oct 2024 13:51:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FDpJgC060905; Tue, 15 Oct 2024 13:51:19 GMT (envelope-from git) Date: Tue, 15 Oct 2024 13:51:19 GMT Message-Id: <202410151351.49FDpJgC060905@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: 3464b209d61c - stable/14 - vm_object: Fix the argument type to vm_object_set_flag() 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: 3464b209d61ca1512f01bee36008fd5a331de791 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3464b209d61ca1512f01bee36008fd5a331de791 commit 3464b209d61ca1512f01bee36008fd5a331de791 Author: Mark Johnston AuthorDate: 2024-10-06 22:54:13 +0000 Commit: Mark Johnston CommitDate: 2024-10-15 13:45:42 +0000 vm_object: Fix the argument type to vm_object_set_flag() Reported by: kib Fixes: 9d52823bf1df ("vm_object: Widen the flags field") (cherry picked from commit 7f1dfd6c33dbbb6c1136e987de554c5c5a7d014d) --- sys/vm/vm_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 1d00bee603f6..a532d07f6674 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -285,7 +285,7 @@ struct vnode; * The object must be locked or thread private. */ static __inline void -vm_object_set_flag(vm_object_t object, u_short bits) +vm_object_set_flag(vm_object_t object, u_int bits) { object->flags |= bits; From nobody Tue Oct 15 14:29: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 4XSc1R75hjz5Z1jy; Tue, 15 Oct 2024 14:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSc1R6ccPz41P9; Tue, 15 Oct 2024 14:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729002571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OmEcmdISaiCuDbwI3Bg019ulJstmoU10Yp1D7riOrV4=; b=Z0OPqJV4ReISnwTRQ94fv4GBJXR1Jg1hrmfHh/IlN1cQrDe+atAhYl6luZVng3ZQ4thnTD nai1zKJTdLS/Mre9+J0IwPvJ9UJsl2VLOMk36DfClX5zl/krUKBAYSDXzottEqxzXPh1PD g4ub2qq0yE/Rz0RBSbgqeLhzVJZEHaoTfDv4NKYVA0/LvIhdHZE7FUEaWywmBq9B2zaxxf 93d+7IVkmPc4ExtnDi/za3z1yBa5uwitFCTrRMQQ9aurUowmprz2MnbocW75FXsmN6Aatl TLpp64Ig0wF3nH0+J2Qew8ki22SDQbaoJI5ngyTXV1cBEXmEchOHcwaTnOx8zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729002571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OmEcmdISaiCuDbwI3Bg019ulJstmoU10Yp1D7riOrV4=; b=lXhpYTkLf0JZx/uqs3u3Y5er9dYCekAQqWGkHZrgzin2smsAmVW/kK/i9HwKPF+zJrQaXb +2XA4rqBecwrQgYGsUaOwq5Ck8W6N2gbF1od3qDzKf3NLm7447wd1zpBGbB6dlkk5WOB/5 O/eYOO+7MzHLj4K/LsHfd8M3wgSwCeTUrUagGkFKDMbActIls25patjcISQDZ6aFg7UPt2 Ha6xoPhD+LZJORf/SVHxR+IVrBFi2FISIcv/ZoGeNk3VLddjXEuZAeRhZvjwnXCNa9hvFH RZ9hD5XSRWs7S/j0+5ctzBslZlTDx1RQ6D2JHBiSIC54G4uMiV6f/gdNpG0j0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729002571; a=rsa-sha256; cv=none; b=dhYTBV6IVuDOO8rgYsBkm0Qx6CYvhVC30JgFUSyIVt01lFDT8T2500Z1khAJCeeeFj0cpK Pj+V0f7I2ZCTORXu1fTdIRtZi7FU5afPmdN3zRIKYU6IiYArqmwkYmWlLJkBVmxJMdr9TP z+TSyB8kNNKMmKM/IH/79rSLR83YWxHBSIycD8UxaZOpDVQua3bwQooprOlset7rCx+zJx HPTkVv78D5bpPNo0MQjdI5HMF9MoHgndIbJ5cq/YFKf1v7MFmgd4AF759rMExr0Y5QCsVv 4A4UOh3gMv0u1OhnGjBFqP2GCEnJlEBRf/ZFhYfqRdIzVIXv4AqM/hovmzuwZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSc1R6ChzzQFl; Tue, 15 Oct 2024 14:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FETVMr020494; Tue, 15 Oct 2024 14:29:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FETVkZ020491; Tue, 15 Oct 2024 14:29:31 GMT (envelope-from git) Date: Tue, 15 Oct 2024 14:29:31 GMT Message-Id: <202410151429.49FETVkZ020491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 96f1dfc1be9c - main - acpi_sbl_wmi: add a driver to trigger SBL firmware updates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96f1dfc1be9cf5525152941d06f07c6889e60071 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=96f1dfc1be9cf5525152941d06f07c6889e60071 commit 96f1dfc1be9cf5525152941d06f07c6889e60071 Author: Kristof Provost AuthorDate: 2024-10-08 12:04:42 +0000 Commit: Kristof Provost CommitDate: 2024-10-15 14:29:11 +0000 acpi_sbl_wmi: add a driver to trigger SBL firmware updates Expose a sysctl knob to inform the SBL bootloader that a firmware update is available and should be applied on the next reboot. See also: https://slimbootloader.github.io/security/firmware-update.html#triggering-firmware-update Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47035 --- sys/conf/files | 1 + sys/dev/acpi_support/acpi_sbl_wmi.c | 193 +++++++++++++++++++++++++++++++++ sys/modules/acpi/Makefile | 4 +- sys/modules/acpi/acpi_sbl_wmi/Makefile | 7 ++ sys/x86/conf/NOTES | 3 + 5 files changed, 206 insertions(+), 2 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index c554efa490fc..7c3392fc7320 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -758,6 +758,7 @@ dev/acpi_support/acpi_fujitsu.c optional acpi_fujitsu acpi dev/acpi_support/acpi_hp.c optional acpi_hp acpi dev/acpi_support/acpi_ibm.c optional acpi_ibm acpi dev/acpi_support/acpi_panasonic.c optional acpi_panasonic acpi +dev/acpi_support/acpi_sbl_wmi.c optional acpi_sbl_wmi acpi dev/acpi_support/acpi_sony.c optional acpi_sony acpi dev/acpi_support/acpi_toshiba.c optional acpi_toshiba acpi dev/acpi_support/atk0110.c optional aibs acpi diff --git a/sys/dev/acpi_support/acpi_sbl_wmi.c b/sys/dev/acpi_support/acpi_sbl_wmi.c new file mode 100644 index 000000000000..7f8bbeb88317 --- /dev/null +++ b/sys/dev/acpi_support/acpi_sbl_wmi.c @@ -0,0 +1,193 @@ +/*- + * Copyright (c) 2024 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include "opt_acpi.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include "acpi_wmi_if.h" + +#define _COMPONENT ACPI_OEM +ACPI_MODULE_NAME("SBL-FW-UPDATE-WMI") +ACPI_SERIAL_DECL(sbl_wmi, "SBL WMI device"); + +#define ACPI_SBL_FW_UPDATE_WMI_GUID "44FADEB1-B204-40F2-8581-394BBDC1B651" + +struct acpi_sbl_wmi_softc { + device_t dev; + device_t wmi_dev; +}; + +static void +acpi_sbl_wmi_identify(driver_t *driver, device_t parent) +{ + /* Don't do anything if driver is disabled. */ + if (acpi_disabled("sbl_wmi")) + return; + + /* Add only a single device instance. */ + if (device_find_child(parent, "acpi_sbl_wmi", -1) != NULL) + return; + + /* Check management GUID to see whether system is compatible. */ + if (!ACPI_WMI_PROVIDES_GUID_STRING(parent, + ACPI_SBL_FW_UPDATE_WMI_GUID)) + return; + + if (BUS_ADD_CHILD(parent, 0, "acpi_sbl_wmi", -1) == NULL) + device_printf(parent, "add acpi_sbl_wmi child failed\n"); +} + +static int +acpi_sbl_wmi_probe(device_t dev) +{ + if (!ACPI_WMI_PROVIDES_GUID_STRING(device_get_parent(dev), + ACPI_SBL_FW_UPDATE_WMI_GUID)) + return (EINVAL); + device_set_desc(dev, "SBL Firmware Update WMI device"); + return (0); +} + +static int +acpi_sbl_wmi_sysctl_get(struct acpi_sbl_wmi_softc *sc, int *val) +{ + ACPI_OBJECT *obj; + ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; + int error = 0; + + if (ACPI_FAILURE(ACPI_WMI_GET_BLOCK(sc->wmi_dev, + ACPI_SBL_FW_UPDATE_WMI_GUID, 0, &out))) { + error = EINVAL; + goto out; + } + + obj = out.Pointer; + if (obj->Type != ACPI_TYPE_INTEGER) { + error = EINVAL; + goto out; + } + + *val = obj->Integer.Value; + +out: + if (out.Pointer) + AcpiOsFree(out.Pointer); + + return (error); +} + +static int +acpi_sbl_wmi_sysctl_set(struct acpi_sbl_wmi_softc *sc, int in) +{ + ACPI_BUFFER input = { ACPI_ALLOCATE_BUFFER, NULL }; + uint32_t val; + + val = in; + input.Length = sizeof(val); + input.Pointer = &val; + + if (ACPI_FAILURE(ACPI_WMI_SET_BLOCK(sc->wmi_dev, + ACPI_SBL_FW_UPDATE_WMI_GUID, 0, &input))) + return (ENODEV); + + return (0); +} + +static int +acpi_sbl_wmi_fw_upgrade_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct acpi_sbl_wmi_softc *sc; + int arg; + int error = 0; + + ACPI_SERIAL_BEGIN(sbl_wmi); + + sc = (struct acpi_sbl_wmi_softc *)oidp->oid_arg1; + error = acpi_sbl_wmi_sysctl_get(sc, &arg); + if (error != 0) + goto out; + + error = sysctl_handle_int(oidp, &arg, 0, req); + if (! error && req->newptr != NULL) + error = acpi_sbl_wmi_sysctl_set(sc, arg); + +out: + ACPI_SERIAL_END(sbl_wmi); + + return (error); +} + +static int +acpi_sbl_wmi_attach(device_t dev) +{ + struct acpi_sbl_wmi_softc *sc; + struct sysctl_ctx_list *sysctl_ctx; + struct sysctl_oid *sysctl_tree; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->wmi_dev = device_get_parent(dev); + + sysctl_ctx = device_get_sysctl_ctx(dev); + sysctl_tree = device_get_sysctl_tree(dev); + + SYSCTL_ADD_PROC(sysctl_ctx, + SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, + "firmware_update_request", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + sc, 0, acpi_sbl_wmi_fw_upgrade_sysctl, "I", + "Signal SBL that a firmware update is available"); + + return (0); +} + +static device_method_t acpi_sbl_wmi_methods[] = { + DEVMETHOD(device_identify, acpi_sbl_wmi_identify), + DEVMETHOD(device_probe, acpi_sbl_wmi_probe), + DEVMETHOD(device_attach, acpi_sbl_wmi_attach), + + DEVMETHOD_END +}; + +static driver_t acpi_sbl_wmi_driver = { + "acpi_sbl_wmi", + acpi_sbl_wmi_methods, + sizeof(struct acpi_sbl_wmi_softc), +}; + +DRIVER_MODULE(acpi_sbl_wmi, acpi_wmi, acpi_sbl_wmi_driver, 0, 0); +MODULE_DEPEND(acpi_sbl_wmi, acpi_wmi, 1, 1, 1); +MODULE_DEPEND(acpi_sbl_wmi, acpi, 1, 1, 1); diff --git a/sys/modules/acpi/Makefile b/sys/modules/acpi/Makefile index 918f5128e5c4..f646589c9fa4 100644 --- a/sys/modules/acpi/Makefile +++ b/sys/modules/acpi/Makefile @@ -1,5 +1,5 @@ SUBDIR= acpi_asus acpi_asus_wmi acpi_dock acpi_fujitsu acpi_hp \ - acpi_ged acpi_ibm acpi_panasonic acpi_sony acpi_toshiba \ - acpi_video acpi_wmi aibs + acpi_ged acpi_ibm acpi_panasonic acpi_sbl_wmi acpi_sony \ + acpi_toshiba acpi_video acpi_wmi aibs .include diff --git a/sys/modules/acpi/acpi_sbl_wmi/Makefile b/sys/modules/acpi/acpi_sbl_wmi/Makefile new file mode 100644 index 000000000000..66fa87da3547 --- /dev/null +++ b/sys/modules/acpi/acpi_sbl_wmi/Makefile @@ -0,0 +1,7 @@ +.PATH: ${SRCTOP}/sys/dev/acpi_support + +KMOD= acpi_sbl_wmi +CFLAGS+=-I${SRCTOP}/sys/dev/acpi_support +SRCS= acpi_sbl_wmi.c opt_acpi.h acpi_if.h acpi_wmi_if.h device_if.h bus_if.h + +.include diff --git a/sys/x86/conf/NOTES b/sys/x86/conf/NOTES index 87a8f8924d12..ffd90c06b516 100644 --- a/sys/x86/conf/NOTES +++ b/sys/x86/conf/NOTES @@ -172,6 +172,9 @@ device acpi_ibm # ACPI Panasonic Extras (LCD backlight/brightness, video output, etc.) device acpi_panasonic +# ACPI SBL Firmware Update +device acpi_sbl_wmi + # ACPI Sony extra (LCD brightness) device acpi_sony From nobody Tue Oct 15 14:29: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 4XSc1T2CgJz5Z1gY; Tue, 15 Oct 2024 14:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSc1T0lZFz40tZ; Tue, 15 Oct 2024 14:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729002573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UIcckdRFcZ84HFcsAYutmHCvW0wwA8DejHhb/3D6sFs=; b=e+N/6P1Iw+GWkXKFuohifd8xiat8wnixUaIvhhZq0lzRw8CmU0c6DsdUr7+NJ1k0P+Qez+ XdMKBvFbIKMDfA46ZH6Mjf9sVgT4y7Flcxlx4ur0bA5s2EtUdgEmO/EEZwUZQ15q0CQvgQ lYV6IBu3+oc8K4Hrw+PTQRDC2l+K7Xb67zfTyEIvjHAmqBvYJhaM7HRF+lMprrYFzha5LG 09bcpFF8TevDspTn79OWB/d7qHq2i8y1a6umMqh80LZat6AHyfCVf+5f3osCI+3A7DYXpU Ymi//rspEb7W9bLWmJvihRj9J+FlWm/01P44pwMI+iZqMmfSEAG7ijaHVk7Qjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729002573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UIcckdRFcZ84HFcsAYutmHCvW0wwA8DejHhb/3D6sFs=; b=R0hzRsSaYN0cBZyRcqZGExeDkDvBqh07kEessfPWDhTRtGhh5t8PlXs8PAS+J6Ip80t5Qe 1T+p1b8rrKmKeXdSYtGDj0me9+vDLpFDGs6JBBD8yU7NW41GLjN4Lb05h/NVUdtMEUfIrS TYUWfUx62J2UJe1Is1jhOcuRsqrEuXhfo/br+MRsegDbWc6N5WzkfXbQM1oqQhTyMDSGSM tR2pmmNl5TfTQ5flKH3/6qKNpcXjozauAuAMmjkOtCzSMFgmr+/kf1M/S7lIYvtv5j7ven QT/BEuMvacGcVLufisqaRsVnBMO7+D7Xb+JCqzZ/lEh5/7o3EoeZE6QSv5youg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729002573; a=rsa-sha256; cv=none; b=Acrectf6enw7G+Bx6qvj9EO7El/N/MlS0ZK8EbDlPrNaduz0ICjtnGjfF83C+pbQ1+qTeh OVomhR2dNxmwVLpL3k3q8OwiZPz2REkHxHcC6Li9o1Gychb4F0r+YyiOvR/FXjL4lovLHg rBgdwiz96eyTugx4qZz1BIiG2no451xgnCwScdC7P3T+7MT5T3snphHcIWE6j6rwlbb+Pe VxrDKlgbP9xTI5UFurgGZQly8un+vBvdZc+wkL+7m56OdNiGkipCxWtxfGAMwgK686fZ8B mBwv9IX6ypvAEwB5ZcPGnRi4aEnrrxVWk/FhpsIieB3Rbdwm90mA6wSgk/8adg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSc1T04VvzQFm; Tue, 15 Oct 2024 14:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FETWZV020536; Tue, 15 Oct 2024 14:29:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FETWuw020533; Tue, 15 Oct 2024 14:29:32 GMT (envelope-from git) Date: Tue, 15 Oct 2024 14:29:32 GMT Message-Id: <202410151429.49FETWuw020533@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 9c125336727b - main - pf: convert DIOCGETSRCNODES to netlink List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c125336727b48c576bf3598d7d2c52daa5909d7 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9c125336727b48c576bf3598d7d2c52daa5909d7 commit 9c125336727b48c576bf3598d7d2c52daa5909d7 Author: Kristof Provost AuthorDate: 2024-10-11 09:02:27 +0000 Commit: Kristof Provost CommitDate: 2024-10-15 14:29:11 +0000 pf: convert DIOCGETSRCNODES to netlink Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 68 +++++++++++++++++++++++++++++++++++++++++ lib/libpfctl/libpfctl.h | 24 +++++++++++++++ sbin/pfctl/pfctl.c | 56 +++++++++++----------------------- sbin/pfctl/pfctl_parser.c | 29 ++++++++---------- sbin/pfctl/pfctl_parser.h | 2 +- sys/netpfil/pf/pf_nl.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++ sys/netpfil/pf/pf_nl.h | 27 ++++++++++++++++ 7 files changed, 229 insertions(+), 55 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index e0d93041c551..4634fa99cb19 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -2998,3 +2998,71 @@ pfctl_get_ruleset(struct pfctl_handle *h, const char *path, uint32_t nr, struct return (e.error); } +#define _OUT(_field) offsetof(struct pfctl_threshold, _field) +static const struct snl_attr_parser ap_pfctl_threshold[] = { + { .type = PF_TH_LIMIT, .off = _OUT(limit), .cb = snl_attr_get_uint32 }, + { .type = PF_TH_SECONDS, .off = _OUT(seconds), .cb = snl_attr_get_uint32 }, + { .type = PF_TH_COUNT, .off = _OUT(count), .cb = snl_attr_get_uint32 }, + { .type = PF_TH_LAST, .off = _OUT(last), .cb = snl_attr_get_uint32 }, +}; +SNL_DECLARE_ATTR_PARSER(pfctl_threshold_parser, ap_pfctl_threshold); +#undef _OUT + +#define _OUT(_field) offsetof(struct pfctl_src_node, _field) +static struct snl_attr_parser ap_srcnode[] = { + { .type = PF_SN_ADDR, .off = _OUT(addr), .cb = snl_attr_get_in6_addr }, + { .type = PF_SN_RADDR, .off = _OUT(raddr), .cb = snl_attr_get_in6_addr }, + { .type = PF_SN_RULE_NR, .off = _OUT(rule), .cb = snl_attr_get_uint32 }, + { .type = PF_SN_BYTES_IN, .off = _OUT(bytes[0]), .cb = snl_attr_get_uint64 }, + { .type = PF_SN_BYTES_OUT, .off = _OUT(bytes[1]), .cb = snl_attr_get_uint64 }, + { .type = PF_SN_PACKETS_IN, .off = _OUT(packets[0]), .cb = snl_attr_get_uint64 }, + { .type = PF_SN_PACKETS_OUT, .off = _OUT(packets[1]), .cb = snl_attr_get_uint64 }, + { .type = PF_SN_STATES, .off = _OUT(states), .cb = snl_attr_get_uint32 }, + { .type = PF_SN_CONNECTIONS, .off = _OUT(conn), .cb = snl_attr_get_uint32 }, + { .type = PF_SN_AF, .off = _OUT(af), .cb = snl_attr_get_uint8 }, + { .type = PF_SN_RULE_TYPE, .off = _OUT(ruletype), .cb = snl_attr_get_uint8 }, + { .type = PF_SN_CREATION, .off = _OUT(creation), .cb = snl_attr_get_uint64 }, + { .type = PF_SN_EXPIRE, .off = _OUT(expire), .cb = snl_attr_get_uint64 }, + { .type = PF_SN_CONNECTION_RATE, .off = _OUT(conn_rate), .arg = &pfctl_threshold_parser, .cb = snl_attr_get_nested }, +}; +static struct snl_field_parser fp_srcnode[] = {}; +#undef _OUT +SNL_DECLARE_PARSER(srcnode_parser, struct genlmsghdr, fp_srcnode, ap_srcnode); + +int +pfctl_get_srcnodes(struct pfctl_handle *h, pfctl_get_srcnode_fn fn, void *arg) +{ + struct snl_writer nw; + struct pfctl_src_node sn; + struct snl_errmsg_data e = {}; + struct nlmsghdr *hdr; + uint32_t seq_id; + int family_id; + int ret; + + family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME); + if (family_id == 0) + return (ENOTSUP); + + snl_init_writer(&h->ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_GET_SRCNODES); + + if ((hdr = snl_finalize_msg(&nw)) == NULL) + return (ENXIO); + + seq_id = hdr->nlmsg_seq; + + if (!snl_send_message(&h->ss, hdr)) + return (ENXIO); + + while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { + if (!snl_parse_nlmsg(&h->ss, hdr, &srcnode_parser, &sn)) + continue; + + ret = fn(&sn, arg); + if (ret != 0) + return (ret); + } + + return (e.error); +} diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 4da21774a958..5c3f1376960c 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -386,6 +386,28 @@ struct pfctl_syncookies { uint32_t halfopen_states; }; +struct pfctl_threshold { + uint32_t limit; + uint32_t seconds; + uint32_t count; + uint32_t last; +}; + +struct pfctl_src_node { + struct pf_addr addr; + struct pf_addr raddr; + int rule; + uint64_t bytes[2]; + uint64_t packets[2]; + uint32_t states; + uint32_t conn; + sa_family_t af; + uint8_t ruletype; + uint64_t creation; + uint64_t expire; + struct pfctl_threshold conn_rate; +}; + #define PF_DEVICE "/dev/pf" struct pfctl_handle; @@ -506,5 +528,7 @@ int pfctl_get_addr(struct pfctl_handle *h, uint32_t ticket, uint32_t r_num, uint8_t r_action, const char *anchor, uint32_t nr, struct pfioc_pooladdr *pa); int pfctl_get_rulesets(struct pfctl_handle *h, const char *path, uint32_t *nr); int pfctl_get_ruleset(struct pfctl_handle *h, const char *path, uint32_t nr, struct pfioc_ruleset *rs); +typedef int (*pfctl_get_srcnode_fn)(struct pfctl_src_node*, void *); +int pfctl_get_srcnodes(struct pfctl_handle *h, pfctl_get_srcnode_fn fn, void *arg); #endif diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 4ca77f6c5f4a..555c5181eac8 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1519,51 +1519,31 @@ pfctl_show_nat(int dev, char *path, int opts, char *anchorname, int depth, return (0); } -int -pfctl_show_src_nodes(int dev, int opts) +static int +pfctl_print_src_node(struct pfctl_src_node *sn, void *arg) { - struct pfioc_src_nodes psn; - struct pf_src_node *p; - char *inbuf = NULL, *newinbuf = NULL; - unsigned int len = 0; - int i; + int *opts = (int *)arg; - memset(&psn, 0, sizeof(psn)); - for (;;) { - psn.psn_len = len; - if (len) { - newinbuf = realloc(inbuf, len); - if (newinbuf == NULL) - err(1, "realloc"); - psn.psn_buf = inbuf = newinbuf; - } - if (ioctl(dev, DIOCGETSRCNODES, &psn) < 0) { - warn("DIOCGETSRCNODES"); - free(inbuf); - return (-1); - } - if (psn.psn_len + sizeof(struct pfioc_src_nodes) < len) - break; - if (len == 0 && psn.psn_len == 0) - goto done; - if (len == 0 && psn.psn_len != 0) - len = psn.psn_len; - if (psn.psn_len == 0) - goto done; /* no src_nodes */ - len *= 2; - } - p = psn.psn_src_nodes; - if (psn.psn_len > 0 && (opts & PF_OPT_SHOWALL)) + if (*opts & PF_OPT_SHOWALL) { pfctl_print_title("SOURCE TRACKING NODES:"); - for (i = 0; i < psn.psn_len; i += sizeof(*p)) { - print_src_node(p, opts); - p++; + *opts &= ~PF_OPT_SHOWALL; } -done: - free(inbuf); + + print_src_node(sn, *opts); + return (0); } +int +pfctl_show_src_nodes(int dev, int opts) +{ + int error; + + error = pfctl_get_srcnodes(pfh, pfctl_print_src_node, &opts); + + return (error); +} + struct pfctl_show_state_arg { int opts; int dotitle; diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 70c2ad42ca55..c25e96e645fb 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -58,6 +58,7 @@ #include #include #include +#include #include #include "pfctl_parser.h" @@ -648,10 +649,10 @@ print_running(struct pfctl_status *status) } void -print_src_node(struct pf_src_node *sn, int opts) +print_src_node(struct pfctl_src_node *sn, int opts) { struct pf_addr_wrap aw; - int min, sec; + uint64_t min, sec; memset(&aw, 0, sizeof(aw)); if (sn->af == AF_INET) @@ -672,36 +673,32 @@ print_src_node(struct pf_src_node *sn, int opts) sn->creation /= 60; min = sn->creation % 60; sn->creation /= 60; - printf(" age %.2u:%.2u:%.2u", sn->creation, min, sec); + printf(" age %.2" PRIu64 ":%.2" PRIu64 ":%.2" PRIu64, + sn->creation, min, sec); if (sn->states == 0) { sec = sn->expire % 60; sn->expire /= 60; min = sn->expire % 60; sn->expire /= 60; - printf(", expires in %.2u:%.2u:%.2u", + printf(", expires in %.2" PRIu64 ":%.2" PRIu64 ":%.2" PRIu64, sn->expire, min, sec); } - printf(", %llu pkts, %llu bytes", -#ifdef __FreeBSD__ - (unsigned long long)(sn->packets[0] + sn->packets[1]), - (unsigned long long)(sn->bytes[0] + sn->bytes[1])); -#else + printf(", %" PRIu64 " pkts, %" PRIu64 " bytes", sn->packets[0] + sn->packets[1], sn->bytes[0] + sn->bytes[1]); -#endif switch (sn->ruletype) { case PF_NAT: - if (sn->rule.nr != -1) - printf(", nat rule %u", sn->rule.nr); + if (sn->rule != -1) + printf(", nat rule %u", sn->rule); break; case PF_RDR: - if (sn->rule.nr != -1) - printf(", rdr rule %u", sn->rule.nr); + if (sn->rule != -1) + printf(", rdr rule %u", sn->rule); break; case PF_PASS: case PF_MATCH: - if (sn->rule.nr != -1) - printf(", filter rule %u", sn->rule.nr); + if (sn->rule != -1) + printf(", filter rule %u", sn->rule); break; } printf("\n"); diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h index 550005508f40..e6959e0b95a7 100644 --- a/sbin/pfctl/pfctl_parser.h +++ b/sbin/pfctl/pfctl_parser.h @@ -302,7 +302,7 @@ int parse_flags(char *); int pfctl_load_anchors(int, struct pfctl *, struct pfr_buffer *); void print_pool(struct pfctl_pool *, u_int16_t, u_int16_t, sa_family_t, int); -void print_src_node(struct pf_src_node *, int); +void print_src_node(struct pfctl_src_node *, int); void print_eth_rule(struct pfctl_eth_rule *, const char *, int); void print_rule(struct pfctl_rule *, const char *, int, int); void print_tabledef(const char *, int, int, struct node_tinithead *); diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index c75af9091d08..67047a319fb8 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -1713,6 +1713,77 @@ pf_handle_get_ruleset(struct nlmsghdr *hdr, struct nl_pstate *npt) return (0); } +static bool +nlattr_add_pf_threshold(struct nl_writer *nw, int attrtype, struct pf_threshold *t) +{ + int off = nlattr_add_nested(nw, attrtype); + + nlattr_add_u32(nw, PF_TH_LIMIT, t->limit); + nlattr_add_u32(nw, PF_TH_SECONDS, t->seconds); + nlattr_add_u32(nw, PF_TH_COUNT, t->count); + nlattr_add_u32(nw, PF_TH_LAST, t->last); + + nlattr_set_len(nw, off); + + return (true); +} + +static int +pf_handle_get_srcnodes(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + struct nl_writer *nw = npt->nw; + struct genlmsghdr *ghdr_new; + struct pf_ksrc_node *n; + struct pf_srchash *sh; + int i; + + hdr->nlmsg_flags |= NLM_F_MULTI; + + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; + i++, sh++) { + /* Avoid locking empty rows. */ + if (LIST_EMPTY(&sh->nodes)) + continue; + + PF_HASHROW_LOCK(sh); + LIST_FOREACH(n, &sh->nodes, entry) { + if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) { + nlmsg_abort(nw); + return (ENOMEM); + } + + ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); + ghdr_new->cmd = PFNL_CMD_GET_SRCNODES; + ghdr_new->version = 0; + ghdr_new->reserved = 0; + + nlattr_add_in6_addr(nw, PF_SN_ADDR, &n->addr.v6); + nlattr_add_in6_addr(nw, PF_SN_RADDR, &n->raddr.v6); + nlattr_add_u32(nw, PF_SN_RULE_NR, n->rule->nr); + nlattr_add_u64(nw, PF_SN_BYTES_IN, counter_u64_fetch(n->bytes[0])); + nlattr_add_u64(nw, PF_SN_BYTES_OUT, counter_u64_fetch(n->bytes[1])); + nlattr_add_u64(nw, PF_SN_PACKETS_IN, counter_u64_fetch(n->packets[0])); + nlattr_add_u64(nw, PF_SN_PACKETS_OUT, counter_u64_fetch(n->packets[1])); + nlattr_add_u32(nw, PF_SN_STATES, n->states); + nlattr_add_u32(nw, PF_SN_CONNECTIONS, n->conn); + nlattr_add_u8(nw, PF_SN_AF, n->af); + nlattr_add_u8(nw, PF_SN_RULE_TYPE, n->ruletype); + nlattr_add_u64(nw, PF_SN_CREATION, n->creation); + nlattr_add_u64(nw, PF_SN_EXPIRE, n->expire); + nlattr_add_pf_threshold(nw, PF_SN_CONNECTION_RATE, &n->conn_rate); + + if (!nlmsg_end(nw)) { + PF_HASHROW_UNLOCK(sh); + nlmsg_abort(nw); + return (ENOMEM); + } + } + PF_HASHROW_UNLOCK(sh); + } + + return (0); +} + static const struct nlhdr_parser *all_parsers[] = { &state_parser, &addrule_parser, @@ -1899,6 +1970,13 @@ static const struct genl_cmd pf_cmds[] = { .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, }, + { + .cmd_num = PFNL_CMD_GET_SRCNODES, + .cmd_name = "GET_SRCNODES", + .cmd_cb = pf_handle_get_srcnodes, + .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, + .cmd_priv = PRIV_NETINET_PF, + }, }; void diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index 0ec68658dcf3..e0b8989ab255 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -60,6 +60,7 @@ enum { PFNL_CMD_GET_ADDR = 22, PFNL_CMD_GET_RULESETS = 23, PFNL_CMD_GET_RULESET = 24, + PFNL_CMD_GET_SRCNODES = 25, __PFNL_CMD_MAX, }; #define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) @@ -389,6 +390,32 @@ enum pf_get_rulesets_types_t { PF_RS_NAME = 3, /* string */ }; +enum pf_threshold_types_t { + PF_TH_UNSPEC, + PF_TH_LIMIT = 1, /* u32 */ + PF_TH_SECONDS = 2, /* u32 */ + PF_TH_COUNT = 3, /* u32 */ + PF_TH_LAST = 4, /* u32 */ +}; + +enum pf_srcnodes_types_t { + PF_SN_UNSPEC, + PF_SN_ADDR = 1, /* nested, pf_addr */ + PF_SN_RADDR = 2, /* nested, pf_addr */ + PF_SN_RULE_NR = 3, /* u32 */ + PF_SN_BYTES_IN = 4, /* u64 */ + PF_SN_BYTES_OUT = 5, /* u64 */ + PF_SN_PACKETS_IN = 6, /* u64 */ + PF_SN_PACKETS_OUT = 7, /* u64 */ + PF_SN_STATES = 8, /* u32 */ + PF_SN_CONNECTIONS = 9, /* u32 */ + PF_SN_AF = 10, /* u8 */ + PF_SN_RULE_TYPE = 11, /* u8 */ + PF_SN_CREATION = 12, /* u64 */ + PF_SN_EXPIRE = 13, /* u64 */ + PF_SN_CONNECTION_RATE = 14, /* nested, pf_threshold */ +}; + #ifdef _KERNEL void pf_nl_register(void); From nobody Tue Oct 15 14:29: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 4XSc1V3T9Sz5Z1d3; Tue, 15 Oct 2024 14:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSc1V1jtmz41Lk; Tue, 15 Oct 2024 14:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729002574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0GCTChaIKZM3teP9sqPLhXC7ZXMdW4S7RowdnNQfgw4=; b=DXBZGOVXOu+XcGsjIaAfhsuXyYfn/k6Rn4WV9KG67cq17QWKXWfCWzOJilL9uBAjYZVBXW T+VPj6+uw4oGADWP9zEKKDIbW8CXDRQQvJOYw9DSZnDnqiXBVNAnl9i5Cab2UJbA3gUHoN eFwduk/uZ82IjTMTX11+ufIrp93Z6GVWD32aR4a868VuovX9aGu3mAp3oHCfIY5lkPV3yj ASjpzn1qdKn5dVWAUqXnbtpCieSSzwTXz66id9pggY/ZeAYjS8vGS6QYs7K/uXvEy3hpFM ADmzUDzbvd8yvfOyGGXyNX5yj5tNkFh5ZkmJVvwB5H+riGAgxybxA6MF/syfCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729002574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0GCTChaIKZM3teP9sqPLhXC7ZXMdW4S7RowdnNQfgw4=; b=QaQFLEp+bQUineOLh41aNpNdlA7tp00kkWZp+Lw8NRWbWWJfWLP+8kmMeGMSQchcpyBcsr d7CWMtR5qH1zKXCM0bcNJpW6b8j7qxNkL1BBeSbiQtEthuYsjdkFRJI2rF9612Um29bMHD VwJGXrf2DK2R9smj+VX2I8OE34hrsIc7FV75DFpg2HKe0lkxVxwmnohAjjuu2O48jiAbW3 FEbh8+g5AF7Q2HySCAbRNVA2Ls+hOT4iZL6Y7eoz1JgMsekp50lDcDS0SmaX1NyHZzh2x3 Aqzfw2hsUstZeR0qXbfkUYyINpneKqr/kAVdsNGvDznayArzgoMxrrrdzpI3Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729002574; a=rsa-sha256; cv=none; b=BzRPNZvjlUbP+kq0SS7B4VQS5RU37gFbbiRWHfaJapmRL78aWLE34t4vNLQadoQPTa9aPj kr1CFcNIjbGcozZq7C9qB7vLtf/TT91S69haaEIRFTlOaJfDEkbahO2ExqvyOreu/ZpAlV HXAPiVV1z8GkisOk+w0wYp8DD1yiQ0I2JobGiful2/BeL8Z0OvBjWhqQOqCKc8NG4ydi1q xv/ROVjLOrbDqLG46NQwV9lCj0TZhOrm6KbVqiZNc3hRGd7BFSyAgVN2OoNAHDVpCnHnbL gbHVQlh0tdu/T9WeDETMH1rhzkPTIKV0vDr2PXM1oRgH8LmSJvT4JXe3BGFowg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSc1V15HnzQVF; Tue, 15 Oct 2024 14:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FETYun020584; Tue, 15 Oct 2024 14:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FETYNM020581; Tue, 15 Oct 2024 14:29:34 GMT (envelope-from git) Date: Tue, 15 Oct 2024 14:29:34 GMT Message-Id: <202410151429.49FETYNM020581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 2e13459e2aa4 - main - pf tests: fix plfow:v6 after scapy-2.6.0 update List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e13459e2aa43506069f14e026ff2d7629c0d8e8 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2e13459e2aa43506069f14e026ff2d7629c0d8e8 commit 2e13459e2aa43506069f14e026ff2d7629c0d8e8 Author: Kristof Provost AuthorDate: 2024-10-15 09:08:09 +0000 Commit: Kristof Provost CommitDate: 2024-10-15 14:29:11 +0000 pf tests: fix plfow:v6 after scapy-2.6.0 update Avoid receiving ICMPv6 destination unreachable packets, because scapy will attempt to parse the pflow information from those (partial) packets as well, and then get confused. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/pft_read_ipfix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/pft_read_ipfix.py b/tests/sys/netpfil/pf/pft_read_ipfix.py index 2c11bdfd130c..02ef2ca5ab06 100644 --- a/tests/sys/netpfil/pf/pft_read_ipfix.py +++ b/tests/sys/netpfil/pf/pft_read_ipfix.py @@ -60,7 +60,7 @@ def parse_ipfix(p): c = datafl.payload def receive(recvif, recvport): - pkts = sp.sniff(iface=recvif, timeout=65) + pkts = sp.sniff(iface=recvif, timeout=65, filter="udp port 2055") if len(pkts) == 0: print("No data") From nobody Tue Oct 15 15:05: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 4XScpm60G8z5YYbL; Tue, 15 Oct 2024 15:05:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpm5TnNz462J; Tue, 15 Oct 2024 15:05:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mDiObVG0c58UEQhXZ5J93K9wTuw4SrqrXdQDNj9mfcA=; b=YQlmhvBOdfQr4IJpvDw2Xbl/hi3orxP9/6bXZeO1R7JDN3ZeHE+aCiP2SdmYLgJLV53cVT INE8gSoUY2O6HAhhPCgFs9Gmd6xngzlEwNcokMljlGgvI8SxdlpTG9oN1NZ5d5SrXtODu5 ZfxRt2FpW0AUqTWWF0eBsSxRvOh6lNBDGnqkcPghdonds04Lui4J1s5I3Y7nBwz12dAS9X FpfId7I/luQFG9cIXFZ5x2juJuixTz0MWr0xlx3skNQ89sncRjvndv8xC8qPSKTF98b58F 0ikI+fbgREKrCPrAN7xAYJhb0AwS738SKvuEhzWWzGrWemdlSYIJSU/kZRFkRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mDiObVG0c58UEQhXZ5J93K9wTuw4SrqrXdQDNj9mfcA=; b=W0hQ8q6VXxZYyBjtJv1vJxYSg4dA+JPvEVIa38jUdByekEI1mqReIAep7521KLKj9q5JWm x4s9HhbeUrOJIFC/VrGX92xzZokKxaKzEzrFsYaKIYWzZGgtC8LmSfaS1cNUphh+6MKmYu tAeITxxoW7p0nkrSjqTkuQ60wqAEu2EgZUat+5ZQ+ZWZwnBhQQjvqFQTunnGb3FE2EBAzO IsJxkkvaPzYC2wfc2p6dhRMsaZFQgU+Jbq7CrvDVCHVPRZIUJxxeaIAkW2BRQOvxwjdDJW w417QCNp7X/2TqVjHt4CreQkyBAJKDrxRb6dnYmKnvJmthsf1p/nA63c0JNG7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004720; a=rsa-sha256; cv=none; b=OGHvJ2A4s/DWtzWBTt5Rt/8U7v3XSXuPKqMPIL1x9ZqmM9PayAwzSQImX0iRsYZ+KoeTTQ 1Le9VgZhBbwJpWdGT/70RKgBYmYWN0HAReLzgR8YFykylOR9HuXKthyzbWg9SAcVz1XLrl LPLZgmHDY5//X9CvjQtB1NoNNYDLc5/C6nWGoMdGySaxCJVW9OCIZKDKk+sCpf3h0i7A5O +1T36SH3UKqnB7J+2ItAXVv2fOEO4q/mVGvk1GP4LwUBNl3tbuohsJd/pr4XL4tcGhp0mK ycEHHIttwrlw5sUybo2D24brBSBrHsLPV1SV9J6vj59IGPQYJcly4y0SmvaySw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpm55BGzRXM; Tue, 15 Oct 2024 15:05:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5KrG089003; Tue, 15 Oct 2024 15:05:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5K5W089000; Tue, 15 Oct 2024 15:05:20 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:20 GMT Message-Id: <202410151505.49FF5K5W089000@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: 2bb9d4f758ec - stable/14 - sysv_ipc: remove sys/cdefs.h include 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: 2bb9d4f758ec05324825d106fce248e17c776fda Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2bb9d4f758ec05324825d106fce248e17c776fda commit 2bb9d4f758ec05324825d106fce248e17c776fda Author: Konstantin Belousov AuthorDate: 2024-10-05 09:08:03 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:15 +0000 sysv_ipc: remove sys/cdefs.h include (cherry picked from commit 8771dc950a463b35d5cdafd71c86dd5a2dbb9096) --- sys/kern/sysv_ipc.c | 1 - sys/kern/sysv_msg.c | 1 - sys/kern/sysv_sem.c | 1 - sys/kern/sysv_shm.c | 1 - 4 files changed, 4 deletions(-) diff --git a/sys/kern/sysv_ipc.c b/sys/kern/sysv_ipc.c index b812739958df..dc7cac13fdd8 100644 --- a/sys/kern/sysv_ipc.c +++ b/sys/kern/sysv_ipc.c @@ -36,7 +36,6 @@ * $NetBSD: sysv_ipc.c,v 1.9 1995/06/02 19:04:22 mycroft Exp $ */ -#include #include "opt_sysvipc.h" #include diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index 0620fbd175af..1e84d151b4af 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -55,7 +55,6 @@ * SUCH DAMAGE. */ -#include #include "opt_sysvipc.h" #include diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index d8c10f837105..ad4243464a96 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -44,7 +44,6 @@ * SUCH DAMAGE. */ -#include #include "opt_sysvipc.h" #include diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 835b44ab332a..90b95c7db8e7 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -68,7 +68,6 @@ * SUCH DAMAGE. */ -#include #include "opt_sysvipc.h" #include From nobody Tue Oct 15 15:05: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 4XScpp0Bjqz5YYW3; Tue, 15 Oct 2024 15:05:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpn6pjSz45tT; Tue, 15 Oct 2024 15:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hzc9+z9lzhIejvz9BOWb/R137rjRZAjBDg/ioOQd67E=; b=fFv9ArbykbdOUbhaY3LsYnPlkyAW2SjkswJJgV71J+pvhwIVrCqtaB80FWI2Al2DTvAcf8 fqeu1IUdlfEOy2Km0iVLJHkJeshsrO6E7184QM0S6jggStp7FLp4kYeoyiq547HWQweIzF HKb6edgVDSzl5wO7juM4kGgmfrv4TBKPZl4SpxRWYLzPkrG6hDpeu+ffMW95uXj+1VFfJ8 oqU/BeYO/FgMgWe02bJU3T1OQUXdWMOriAk7hsT/SBsnG2cfA7K1sen8F/mrAFUK8EXggM CczDkxwsi/12xsTtER0/N5HmzRA02poFSgtuuv4jfjGEUhPjgcEuCXkn6dQj+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hzc9+z9lzhIejvz9BOWb/R137rjRZAjBDg/ioOQd67E=; b=HalbwfWPCZd2k0HIdMuDVPUCEFpWrbAiEkNUYpZnJaNFzE3T3d8d7pVE2tdj4oWovrOdIV ZONaPLlA50NJbIIrnye7HHvMn7Xxmlx+kOZPoKY6RaSpIFkhwpWMsC5ndtYGWL6CsXRylK 7nF00wiw9PqnQrSMH2MgirC3JOz9jT60bcws+ox+wViA3DX0xH1vvrOxWTvlNDDjJJHh0Q kU1trZtcfAZYdw+/6nt8wqsTMHGu4QXwxXe0YXPQswRyu2KEp9UGm3sHqNKbFgVZRCBaib wSEAPEorEBemnS983xP5mkkzZCJd+osQcr7TCBmYoIVjd5FnU9whKi65TzQj0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004722; a=rsa-sha256; cv=none; b=s9lupNJDaUR9osS6GJ0uQC3rBOrRAHu3W6InZK7U5J+IM9eJO0tnqL3axdiKQGQpTuBLW3 RCG3nRMg3DnXrnRuz8XO1s6suC0i1PblyGJpKaVYA7fvSXl3VgeiC67wTIpR85eQfLXByW 3P7L1G4xVFtc8P7tGlRyNGR5GihqUzeQ0ZPGfg9iX4VQGuv1pEuLc1Ef+RUHS4rcfYIgCj k+Tcv0ZQgz37lu6OOyxbeFHpfy38w3/WoCgDKMfpNvETq4eApGHtq2X2TpSkBbFrmG3TJt pYkut+mTpe7mrP5YGL/K0GKqwImfpB2i0o/hMGvMRegvHFzFzXCnZCOfnyE10w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpn66fpzRRM; Tue, 15 Oct 2024 15:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5LZe089042; Tue, 15 Oct 2024 15:05:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5Lit089039; Tue, 15 Oct 2024 15:05:21 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:21 GMT Message-Id: <202410151505.49FF5Lit089039@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: 891664589bd1 - stable/14 - vm_object: reformat flags definitions 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: 891664589bd1bbfd9eb0f6a0218208995678961c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=891664589bd1bbfd9eb0f6a0218208995678961c commit 891664589bd1bbfd9eb0f6a0218208995678961c Author: Konstantin Belousov AuthorDate: 2024-10-06 20:54:30 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:15 +0000 vm_object: reformat flags definitions (cherry picked from commit 34935a6b3723422ef27ce4eb80fbe52c3dab12fc) --- sys/vm/vm_object.h | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index a532d07f6674..0a6b8de6574c 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -184,23 +184,25 @@ struct vm_object { /* * Flags */ -#define OBJ_FICTITIOUS 0x0001 /* (c) contains fictitious pages */ -#define OBJ_UNMANAGED 0x0002 /* (c) contains unmanaged pages */ -#define OBJ_POPULATE 0x0004 /* pager implements populate() */ -#define OBJ_DEAD 0x0008 /* dead objects (during rundown) */ -#define OBJ_ANON 0x0010 /* (c) contains anonymous memory */ -#define OBJ_UMTXDEAD 0x0020 /* umtx pshared was terminated */ -#define OBJ_SIZEVNLOCK 0x0040 /* lock vnode to check obj size */ -#define OBJ_PG_DTOR 0x0080 /* dont reset object, leave that for dtor */ -#define OBJ_SHADOWLIST 0x0100 /* Object is on the shadow list. */ -#define OBJ_SWAP 0x0200 /* object swaps, type will be OBJT_SWAP +#define OBJ_FICTITIOUS 0x00000001 /* (c) contains fictitious pages */ +#define OBJ_UNMANAGED 0x00000002 /* (c) contains unmanaged pages */ +#define OBJ_POPULATE 0x00000004 /* pager implements populate() */ +#define OBJ_DEAD 0x00000008 /* dead objects (during rundown) */ +#define OBJ_ANON 0x00000010 /* (c) contains anonymous memory */ +#define OBJ_UMTXDEAD 0x00000020 /* umtx pshared was terminated */ +#define OBJ_SIZEVNLOCK 0x00000040 /* lock vnode to check obj size */ +#define OBJ_PG_DTOR 0x00000080 /* do not reset object, leave that + for dtor */ +#define OBJ_SHADOWLIST 0x00000100 /* Object is on the shadow list. */ +#define OBJ_SWAP 0x00000200 /* object swaps, type will be OBJT_SWAP or dynamically registered */ -#define OBJ_SPLIT 0x0400 /* object is being split */ -#define OBJ_COLLAPSING 0x0800 /* Parent of collapse. */ -#define OBJ_COLORED 0x1000 /* pg_color is defined */ -#define OBJ_ONEMAPPING 0x2000 /* One USE (a single, non-forked) mapping flag */ -#define OBJ_PAGERPRIV1 0x4000 /* Pager private */ -#define OBJ_PAGERPRIV2 0x8000 /* Pager private */ +#define OBJ_SPLIT 0x00000400 /* object is being split */ +#define OBJ_COLLAPSING 0x00000800 /* Parent of collapse. */ +#define OBJ_COLORED 0x00001000 /* pg_color is defined */ +#define OBJ_ONEMAPPING 0x00002000 /* One USE (a single, non-forked) + mapping flag */ +#define OBJ_PAGERPRIV1 0x00004000 /* Pager private */ +#define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ /* * Helpers to perform conversion between vm_object page indexes and offsets. From nobody Tue Oct 15 15:05:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XScpq11b5z5YYbM; Tue, 15 Oct 2024 15:05:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpq0DYFz45x8; Tue, 15 Oct 2024 15:05:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8DWzIZ0NEcZiXvIiYbE3ySqQCq0wKQ03zRNZ6HpdbI=; b=iAOwjXwXCmXqSDxHzXLUVWLOI4H1TgjhczO7dLO0L0STB6YDfzIIzuBZmiRNLnod/WAqSV nrIuCXX7MhHDEVbXSJqsisd/2xHlploAdcRxs/B6TdP1yl5Mj9Bvq4SHfkycUm79nl+JQl EDAFKm4AY4QjtyJqV/yVhdvPo7tjlSoluxJAEQVtSO/6YTocXMY4BTYNxdigm8Lybpnx2d SPCHTYWZMqQWQD6CM5LSAr+v9voV/iKq/XKPoVvM7ICD35o/QonOl9W+zkOT/8djvkj7zt zESfIJSQymS8zNWvsz4VGDddKYIfc1/744OtTDa4mvfPC6zvg1XL3jDR60CRIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8DWzIZ0NEcZiXvIiYbE3ySqQCq0wKQ03zRNZ6HpdbI=; b=qbtHK0tjSRUL6eLjZqIcHlQ8aZYs2Izu2b2dCViWLTC50Oi6kcukprCEDdMiZsUxIQEFc0 pNDr2xUqx5Hop9djs/0nsm57H+D2MhtcqNFaVdr9jDrhUtzd0eKPZ1EBw2dLPfC7Y6J8Y8 IYzqrGxPRkDGMC5Cuyg80WfUV2C5/8262wYBq0XTQDVrPDZsvJdOcTGKjcUUBfr2l3ZCdR 7VOmUS6YTZdd5amQfbMGJKEj7ws02SnyktWwWs1VfVZjGevb6A0/mcbCQ/Wuy4yqtln6hM EWYy4RCOXybsdiniJxBTkgCOMrA3n6MZYZuupTsRVqISWJ7UbOLjlFgz9/8A1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004723; a=rsa-sha256; cv=none; b=xOzfnPM9B3e0Uxkkcxt4ksO/UvF+CuFGQAoe5kYOjsPMH7Rq7ZzKACUm+tRpKoQAy87HN1 a+Uf7spn5oBuZ+jsJKpmW5tpG5ByPLuWMCyETfsLmgcmAIUmAj+f8gZbPxIjKaAFZIJ7IW Gpf2rjMr6ccqwqD43q/oUwHYhWjWybzhvUW7XZXLBJe1Wlzi//h95V2xo/+jAdROr3pE9R 9sHUQzY7DqfqLDnoVurvDAx+VXGLtMHlh1Vk53KPzg5cNTg5NJj48R4hXk/pcSO5wWnGss vsU5balZUoCeuu7P4+OvMyTrbELFar8SqNTFvhrsbYplJYrFVn/XbiosxtQxvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpp6rSbzRbP; Tue, 15 Oct 2024 15:05:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5M2W089099; Tue, 15 Oct 2024 15:05:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5Mo5089096; Tue, 15 Oct 2024 15:05:22 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:22 GMT Message-Id: <202410151505.49FF5Mo5089096@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: 1ef669ae413e - stable/14 - vm_object: add OBJ_SYSVSHM flag to indicate SysV shm backing object 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: 1ef669ae413eaf5517e9cbdd53ff2fe20bb3044c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1ef669ae413eaf5517e9cbdd53ff2fe20bb3044c commit 1ef669ae413eaf5517e9cbdd53ff2fe20bb3044c Author: Konstantin Belousov AuthorDate: 2024-10-05 09:08:51 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 vm_object: add OBJ_SYSVSHM flag to indicate SysV shm backing object (cherry picked from commit f186252e0d6ef970a23c6af12ec34003df56055d) --- sys/kern/sysv_shm.c | 4 ++++ sys/vm/vm_object.h | 1 + 2 files changed, 5 insertions(+) diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 90b95c7db8e7..4dbe77f19b07 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -742,6 +742,10 @@ shmget_allocate_segment(struct thread *td, key_t key, size_t size, int mode) return (ENOMEM); } + VM_OBJECT_WLOCK(shm_object); + vm_object_set_flag(shm_object, OBJ_SYSVSHM); + VM_OBJECT_WUNLOCK(shm_object); + shmseg->object = shm_object; shmseg->u.shm_perm.cuid = shmseg->u.shm_perm.uid = cred->cr_uid; shmseg->u.shm_perm.cgid = shmseg->u.shm_perm.gid = cred->cr_gid; diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 0a6b8de6574c..c63a52260baf 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -203,6 +203,7 @@ struct vm_object { mapping flag */ #define OBJ_PAGERPRIV1 0x00004000 /* Pager private */ #define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ +#define OBJ_SYSVSHM 0x00010000 /* SysV SHM */ /* * Helpers to perform conversion between vm_object page indexes and offsets. From nobody Tue Oct 15 15:05: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 4XScpr3W1bz5YYbR; Tue, 15 Oct 2024 15:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpr1B0wz45xW; Tue, 15 Oct 2024 15:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W+tbEINcGT5kjupsqHFRqB1l0DQK6Z4ovxop8srTYks=; b=vPYi0ZN4Z3v+UomkroRLnBZNhDcOGrMSi259Xrmov1ip+JOIIEjvMlbSqPEmlqNcmXCjoq KRKNMvctGUdO2NGZ97ZcfnFvgjXTFLByPHD8AHHs7My3wpNyAGLXww0MvxZ5uG4iYSTn16 ixRRqGJXV/ojpQV85zulZ06FmQ4EKwZGC1gAC40+jFWMRa60CQ5dKO272WYHkUT55vDDWA yWKnhrH2rLk6Q8Hk+eKq0ANBns7UDttQ/dGMIo6x1xJVvGN6Jn11/qknyC5VS2bytgak56 WkFoOJp1wjUfO/vNEclLc2c78ZSb4BccPzcYIGY/Qv5nCs1KZ030namxEG4kHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W+tbEINcGT5kjupsqHFRqB1l0DQK6Z4ovxop8srTYks=; b=ypc6W2ageynoUc6QZdkXEZjwJk8SCqbwQPgxDnEZJHPGMtYzdeiPg07vERgdcZgCLuiOCr icyZMQ+KPMdxuapkU9xLBaCr/C5AY2drZTRdCUbIpq3Dpi/DRQI7Y1BlCjp+rB8yGaincF Rkvaw+QIaBIn+4M8GMSztkq/PdlMl8bYQjRtAEJXuj+TX8YZG4C6mY9Dp0CTrzo9+AMytJ 33KsBL0fkhiHecTUpMq9LyAIEIoCFtnkj3pk6OtWm3WOHZY3Kelm1y4U0ABRJkbwgf7Ha6 1psL6pG++IhZknFmmJNT3VM92LgKQFCdFvlO5wxoYksca6Caz79AgWreZ3td4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004724; a=rsa-sha256; cv=none; b=d+8/CqjC/3KZJpuhkPFIyQO/izscLzYOkkM7N/uYXjMQWT63C7mpxcvXH/epeihm/e16RW c1D2H30xQ3+GO/yF0XGD1jKaD0sj3DTS+PWX2VwR9iApds5gzdk/hwsIiZi4ISnaH36GaC vko/poLsixVmOb+DQ3D8Y6iLSGHPCYEQOHjyklHvrz9OVXPPHVLBanufawDz6F+/MqXBbQ 8jPAlEZEf3r4HkMglcnHblvN8nQ0QjQIoKDVVSO7k1YSChxSxhC0c0Izz0GBGrguulrnCZ 3gsMJsDfIkmPUcv5iOE7A6W3G+2szwUypnlh1dgBknk3+nHlGDCauL7iPXUj2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpr0nSXzRT4; Tue, 15 Oct 2024 15:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5OZe089172; Tue, 15 Oct 2024 15:05:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5ODQ089169; Tue, 15 Oct 2024 15:05:24 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:24 GMT Message-Id: <202410151505.49FF5ODQ089169@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: 30a5ba9ded03 - stable/14 - sysvshm: add shmobjinfo() function to find key/seq of the segment backed by obj 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: 30a5ba9ded0321410345cb52cfe8ad0301f7a199 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=30a5ba9ded0321410345cb52cfe8ad0301f7a199 commit 30a5ba9ded0321410345cb52cfe8ad0301f7a199 Author: Konstantin Belousov AuthorDate: 2024-10-05 09:14:15 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 sysvshm: add shmobjinfo() function to find key/seq of the segment backed by obj (cherry picked from commit b72029589e64e04b8f9714ad8535b723276e2e02) --- sys/kern/sysv_ipc.c | 11 +++++++++++ sys/kern/sysv_shm.c | 27 +++++++++++++++++++++++++++ sys/sys/ipc.h | 3 +++ sys/sys/shm.h | 2 ++ 4 files changed, 43 insertions(+) diff --git a/sys/kern/sysv_ipc.c b/sys/kern/sysv_ipc.c index dc7cac13fdd8..7240d7cd7150 100644 --- a/sys/kern/sysv_ipc.c +++ b/sys/kern/sysv_ipc.c @@ -50,6 +50,8 @@ #ifndef SYSVSHM void (*shmfork_hook)(struct proc *, struct proc *) = NULL; void (*shmexit_hook)(struct vmspace *) = NULL; +void (*shmobjinfo_hook)(struct vm_object *, key_t *key, + unsigned short *seq) = NULL; /* called from kern_fork.c */ void @@ -66,6 +68,15 @@ shmexit(struct vmspace *vm) if (shmexit_hook != NULL) shmexit_hook(vm); } + +void +shmobjinfo(struct vm_object *obj, key_t *key, unsigned short *seq) +{ + *key = 0; /* For non-present sysvshm.ko */ + *seq = 0; + if (shmobjinfo_hook != NULL) + shmobjinfo_hook(obj, key, seq); +} #endif /* diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 4dbe77f19b07..60e3fe92a4b7 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -133,6 +133,8 @@ static int shmunload(void); #ifndef SYSVSHM static void shmexit_myhook(struct vmspace *vm); static void shmfork_myhook(struct proc *p1, struct proc *p2); +static void shmobjinfo_myhook(vm_object_t obj, key_t *key, + unsigned short *seq); #endif static int sysctl_shmsegs(SYSCTL_HANDLER_ARGS); static void shm_remove(struct shmid_kernel *, int); @@ -856,6 +858,29 @@ shmexit_myhook(struct vmspace *vm) } } +#ifdef SYSVSHM +void +shmobjinfo(vm_object_t obj, key_t *key, unsigned short *seq) +#else +static void +shmobjinfo_myhook(vm_object_t obj, key_t *key, unsigned short *seq) +#endif +{ + int i; + + *key = 0; /* For statically compiled-in sysv_shm.c */ + *seq = 0; + SYSVSHM_LOCK(); + for (i = 0; i < shmalloced; i++) { + if (shmsegs[i].object == obj) { + *key = shmsegs[i].u.shm_perm.key; + *seq = shmsegs[i].u.shm_perm.seq; + break; + } + } + SYSVSHM_UNLOCK(); +} + static void shmrealloc(void) { @@ -962,6 +987,7 @@ shminit(void) #ifndef SYSVSHM shmexit_hook = &shmexit_myhook; shmfork_hook = &shmfork_myhook; + shmobjinfo_hook = &shmobjinfo_myhook; #endif /* Set current prisons according to their allow.sysvipc. */ @@ -1029,6 +1055,7 @@ shmunload(void) #ifndef SYSVSHM shmexit_hook = NULL; shmfork_hook = NULL; + shmobjinfo_hook = NULL; #endif sx_destroy(&sysvshmsx); return (0); diff --git a/sys/sys/ipc.h b/sys/sys/ipc.h index 95a01be20eec..ce0f550900fb 100644 --- a/sys/sys/ipc.h +++ b/sys/sys/ipc.h @@ -129,6 +129,7 @@ struct ipc_perm { struct thread; struct proc; struct vmspace; +struct vm_object; #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) @@ -139,6 +140,8 @@ void ipcperm_new2old(struct ipc_perm *, struct ipc_perm_old *); int ipcperm(struct thread *, struct ipc_perm *, int); extern void (*shmfork_hook)(struct proc *, struct proc *); extern void (*shmexit_hook)(struct vmspace *); +extern void (*shmobjinfo_hook)(struct vm_object *obj, key_t *key, + unsigned short *seq); #else /* ! _KERNEL */ diff --git a/sys/sys/shm.h b/sys/sys/shm.h index a1aa6ca54c60..15d08becc072 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -149,6 +149,7 @@ struct shm_info { #ifdef _KERNEL struct proc; struct vmspace; +struct vm_object; extern struct shminfo shminfo; @@ -158,6 +159,7 @@ extern struct shminfo shminfo; void shmexit(struct vmspace *); void shmfork(struct proc *, struct proc *); +void shmobjinfo(struct vm_object *obj, key_t *key, unsigned short *seq); int kern_get_shmsegs(struct thread *td, struct shmid_kernel **res, size_t *sz); From nobody Tue Oct 15 15:05: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 4XScps4xzxz5YYW7; Tue, 15 Oct 2024 15:05:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScps2RzNz45vC; Tue, 15 Oct 2024 15:05:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EuxssdT1mhZMsRWY21G+ptHUTABELNwQNsmUWvirGiE=; b=yDjACx3FgOxQm1WG0T+it4i3oP1Axg086QE9I3MrePcGSxOKMRGEqzEiVv7KGOsAPL5r4C XiDvqw4qt0wdv8ZwO8B8c6WZIstqH+c7Pm93qwL7xsOSppApEmhrnFY4doZ81sPFRLYhaz 2FDDIKGCB9Eww/YHfYQo87Zx9xgpRKKJ62tMpDNIfzodMrkuPRJOu5kJt4VcHFz9DJhDjC Bi5Xej0s2atXPbkxXO/SPgB4tx0nZXMl6kMuUh9fl85V5rVFqvy5Es41UFrAHGRM/Ktv2C ZFIhphP0wX7NVwKfbqvEyaXY4HgfGxW0YF5QoLhwNicAQGDEjX0HSXHqTEjubw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EuxssdT1mhZMsRWY21G+ptHUTABELNwQNsmUWvirGiE=; b=NBPOT+1xYExjowjugZGERlNSKEGbC/24V4o2Ekj+nW+nYFEqHjNz3zeiuKf65Y87nExJvw tOFcL7yJoEfXOA0YnWtmDKVMfXn2waaX0x/+AhhkWvNtzR3dR9FGcsr0IWhIKoNJ7MzCZF kw26FTgGvj26gxW6HaZzhkO/+3OySGQjD2hYYpaR4kh2lOcfdCL+R3JZAiAfupokhkYO4V 2tRG3FcoAjl+FnJjbH+atOS3d0wTzmBRD+4z/26fzDfcEKOvG1CE1nFatFLjW7zUpAh/VV B37fp2GXjFRw3NbKrmJe2UMoLfhf6UbJIN5gq2FClWf09YyI4luv8Rp7dFht/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004725; a=rsa-sha256; cv=none; b=N0SQlypp4CQNvnBUq8m/XTXWibgmwWCFds5aNeWbdFNGvl73Y0IfOt42v/qDh1SXiw72RK 3MGbC3qgDllWIDOAVm48UMWtNbd8efKSTZnit7OYegwOX/f7UfaboWCzSK+7RG90wr7GU0 q1nGmHSK8veyV7tirB+y9wh7U6Pc6TvlAMNubUxPyMqeEPVBLxpPAfRSkHj1We2EPTIyi2 FMYKJv65Bokafj3NXLxOxKjZE5nEPfgDVTswrOVmKWEt4C6lagEDTuq2mkBQXro8VSnQfC UuPXN2bfmuuMIYi42miNp5V7QZGfgj0iaQILGUWyHr030c+b8RXjbSlN20mBsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScps1nPmzRfb; Tue, 15 Oct 2024 15:05:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5PBw089223; Tue, 15 Oct 2024 15:05:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5Pbt089220; Tue, 15 Oct 2024 15:05:25 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:25 GMT Message-Id: <202410151505.49FF5Pbt089220@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: ba8062dc2280 - stable/14 - kinfo_vmentry: report mappings of the SysV shm segments 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: ba8062dc22805089e69a8b47e0a15c50ae35f007 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ba8062dc22805089e69a8b47e0a15c50ae35f007 commit ba8062dc22805089e69a8b47e0a15c50ae35f007 Author: Konstantin Belousov AuthorDate: 2024-10-05 09:15:12 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 kinfo_vmentry: report mappings of the SysV shm segments (cherry picked from commit d3dd6bd4039573eb74cd77da5b92e68b04296888) --- sys/kern/kern_proc.c | 10 ++++++++++ sys/sys/user.h | 1 + 2 files changed, 11 insertions(+) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index b52455f140b2..d20fc0ac4e9a 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -62,6 +63,7 @@ #include #include #include +#include #include #include #include @@ -2616,6 +2618,8 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) vm_offset_t addr; unsigned int last_timestamp; int error; + key_t key; + unsigned short seq; bool guard, super; PROC_LOCK_ASSERT(p, MA_OWNED); @@ -2706,6 +2710,12 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_ref_count = obj->ref_count; kve->kve_shadow_count = obj->shadow_count; VM_OBJECT_RUNLOCK(obj); + if ((lobj->flags & OBJ_SYSVSHM) != 0) { + kve->kve_flags |= KVME_FLAG_SYSVSHM; + shmobjinfo(lobj, &key, &seq); + kve->kve_vn_fileid = key; + kve->kve_vn_fsid_freebsd11 = seq; + } if (vp != NULL) { vn_fullpath(vp, &fullpath, &freepath); kve->kve_vn_type = vntype_to_kinfo(vp->v_type); diff --git a/sys/sys/user.h b/sys/sys/user.h index bd460d452bcc..70592eb44668 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -516,6 +516,7 @@ struct kinfo_lockf { #define KVME_FLAG_GROWS_UP 0x00000010 #define KVME_FLAG_GROWS_DOWN 0x00000020 #define KVME_FLAG_USER_WIRED 0x00000040 +#define KVME_FLAG_SYSVSHM 0x00000080 #if defined(__amd64__) #define KINFO_OVMENTRY_SIZE 1168 From nobody Tue Oct 15 15:05:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XScpt505Tz5Z3HX; Tue, 15 Oct 2024 15:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpt3KfTz465c; Tue, 15 Oct 2024 15:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vx7d34CyM5nq8/K9TE/bSIFytrLSmNJFtbiljEiZ/JQ=; b=tu0hvcoSCEKVRwgUcHIbtDX5C1hB8Ygw+XVTpm3AtRzYeuBK80Tg6C1TydFExhk6nWHj4t bMFy1SI5r6Zb/gWNpTIUjyAvbpd6pRZrxrZjoM1ESc2VRB9bp8+w3hoxrZCWgZ/v4hGhp3 RLByXxMthbJArpwn+LXm715pO9bEkoVo/326YNFcUiDRowU5kKF75yXYVUgS+Q7Vh+QD7L BPuY/4vWrXmunCH3WvOO3cRjC8h1NuLcE5EA86KW1R1V1/SiQwhr/uq8Vk+oCtnhfqJgrU 8vFUB1Z3gbAKDkVYW2sr/1ivsFHlZuDjS3QtI19SMitnxrZkOvjkTbZ2LX0PCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vx7d34CyM5nq8/K9TE/bSIFytrLSmNJFtbiljEiZ/JQ=; b=kzc6ttJOl+NSbgd2s884SAo8LNds/8COA//s19XVJk94+qn8jRbJ2XzcVY4FCEx4UigBJb Acyufzr9QzbEX/7CYKzWLLJmeir77sjQ/qB7lkIRhW+B5jcR/G9mwUkiY2gGLWo4/D4q2C JYHvbyegFiMx8x4D1sfFWciz3pE6shcQ7q2hTBCFK1X72cK/k2QtTRpUW5otGHPbc3DM/Z 3Uo/oHQtZzaarkDrmMNEpzSLvoikD4cCSvaooRSY3kLFSoRrLlGAaEOpIPYEFvAcLz2QCy Ad4/b2YNpmqGydYBK+dIzGjgCzb9zpfDSxqnmJzJxV6C80HeVe19jhf+iVoUWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004726; a=rsa-sha256; cv=none; b=Wm0yOe5azs0wBPmMyKv3UK/bEJAEXQ2ZJweE2AvW/r2tVn00u/vKUs5mVapkkY6m/QBfve v1s0bgevoZmjhFjvIJQJH289rVgTxqRflpeKyV2eZJQexWfHlHnGCT1OrCc6WFookYOB1R wgFsXGyjQvWqKrTiwINjPXAmrkB9aySP1J8LjGQSbM1zwdKryuKBh/6XAfXvOMUWbqwXoE 70SEHYB1GOGB5uZtQVnQ0SQQYyXATHoeVdrOi9AoYB4K4JQYgl9BXt2IMf+xQ9riTeGDvX PcXTCdRqZ7lE356QehslvB2JyXBEi0s4NjtXNlbFpLmdeuYWs1foj6KPqjQV2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpt2SrZzRXN; Tue, 15 Oct 2024 15:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5Qd0089277; Tue, 15 Oct 2024 15:05:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5Qa7089274; Tue, 15 Oct 2024 15:05:26 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:26 GMT Message-Id: <202410151505.49FF5Qa7089274@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: 4d5f771c439d - stable/14 - kinfo_vmobject: report backing object of the SysV shm segments 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: 4d5f771c439df34d3c205acbd13eb1250095eeb0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4d5f771c439df34d3c205acbd13eb1250095eeb0 commit 4d5f771c439df34d3c205acbd13eb1250095eeb0 Author: Konstantin Belousov AuthorDate: 2024-10-05 09:20:21 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 kinfo_vmobject: report backing object of the SysV shm segments (cherry picked from commit 6a3fbdc7e9c8323a1c13c4afcc65f89cb47911e6) --- sys/sys/user.h | 5 ++++- sys/vm/vm_object.c | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/sys/user.h b/sys/sys/user.h index 70592eb44668..47f2984b1eff 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -579,6 +579,8 @@ struct kinfo_vmentry { #define kve_vn_fsid kve_type_spec._kve_vn_fsid #define kve_obj kve_type_spec._kve_obj +#define KVMO_FLAG_SYSVSHM 0x0001 + /* * The "vm.objects" sysctl provides a list of all VM objects in the system * via an array of these entries. @@ -602,7 +604,8 @@ struct kinfo_vmobject { uint64_t kvo_me; /* Uniq handle for anon obj */ uint64_t _kvo_qspare[6]; uint32_t kvo_swapped; /* Number of swapped pages */ - uint32_t _kvo_ispare[7]; + uint32_t kvo_flags; + uint32_t _kvo_ispare[6]; char kvo_path[PATH_MAX]; /* Pathname, if any. */ }; #define kvo_vn_fsid kvo_type_spec._kvo_vn_fsid diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 76ae6118a756..a8821f0f2a8b 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -69,6 +69,7 @@ #include #include #include +#include #include #include #include @@ -79,6 +80,7 @@ #include #include #include +#include #include #include #include @@ -2517,6 +2519,8 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) vm_page_t m; u_long sp; int count, error; + key_t key; + unsigned short seq; bool want_path; if (req->oldptr == NULL) { @@ -2564,6 +2568,7 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) kvo->kvo_memattr = obj->memattr; kvo->kvo_active = 0; kvo->kvo_inactive = 0; + kvo->kvo_flags = 0; if (!swap_only) { TAILQ_FOREACH(m, &obj->memq, listq) { /* @@ -2601,6 +2606,12 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) kvo->kvo_swapped = sp > UINT32_MAX ? UINT32_MAX : sp; } VM_OBJECT_RUNLOCK(obj); + if ((obj->flags & OBJ_SYSVSHM) != 0) { + kvo->kvo_flags |= KVMO_FLAG_SYSVSHM; + shmobjinfo(obj, &key, &seq); + kvo->kvo_vn_fileid = key; + kvo->kvo_vn_fsid_freebsd11 = seq; + } if (vp != NULL) { vn_fullpath(vp, &fullpath, &freepath); vn_lock(vp, LK_SHARED | LK_RETRY); From nobody Tue Oct 15 15:05: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 4XScpv5hzzz5Z3Hb; Tue, 15 Oct 2024 15:05:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpv3XGFz45yH; Tue, 15 Oct 2024 15:05:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UkPmK0fVL31Kkr+9L9dLMMP3a9ORiJBWK+LwpEP8eps=; b=xhXVxd57bhGYOImDoXpV6x3jG93GxkyDAepYEWESku1vwDb/QpAVLTjXNh2KD7wwf3q0ZS j2MUj6KQ6E8VzyaZK5ZerMFiiciCgbSfksGgAd0Cwgzjj4XtqEcalP6RuO203uJIYxjAns F2bxfno/VxCyFFFHfAKsfGnSc2SDED3rYnrTXrfWK8+oFxG0sJ+ltjbnxFFyyn+PhveE7n xWzIjbbKKc/Ks/FXyi1O8g7qK8u/TTqVOh8usMZB79u0Qo7jEEs70XuaCvBI8NEksfUZUz v3eccszPd53kDmEwzItc+rYzDHSFMWCdm++ah/cWUYRWn2MhGuOaBn4JXc7ujw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UkPmK0fVL31Kkr+9L9dLMMP3a9ORiJBWK+LwpEP8eps=; b=SAfYWk4aGWUfFk/Ou6g3FxEp/asoLnwBSkRk6+2wC0TQ0UwHzzVBUx7WrRHkzx91llXmZi mk8CSG1SV5X7lFUaKHMeb20rP9UVXXV8bSjf222lyHe24wJ3HICJJvAOsbKvkBx2jDzZ83 kz8B9KvzaDDsgxacHF/QVV8j/zKE1aoD6qopVRLJdlQhEYVEmbe3PuekoSdd32yzojxEA3 WR6NHBFDRwmzLwmn+CXtgic/iwRFJSghqqfwLw9+7KoRHCr8mW4n2mzOcHR+it6C0Gfyds 4oYRLsC1NZgdBNlvLswUgWvwjAiPPb+oWqxbVSPfaVtydfsO0vz1Wih0/NcaIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004727; a=rsa-sha256; cv=none; b=TeLk9eH8pPuggkAF+0Kexzh3++pGjM44E3E3nG6+dHyirmDRgqCE4lgQZAtD9lVf34ViAh Jb0sNz8TNxYyh5OguIhB9DIwwBHLPOXxL9xV0poQ3zDdoCiwE78DdRxZVekHShVMjZTUKU XEtcsbkwsTfhyqjSyIfS6JeOA3ksBghPBvHf3Or1Pjn8ff7NHLK27lGqkSyCBsyEKvUQJy yVPafMidASKK5y+hFpB3KQeKJfSPtAwtS29NoVTspaYTgwOnpOvia+evgGK1y+ksdiM1Qy ql8pXqoVf5QWRHC2ohWQChx8KdNvZMKw1gCSE9sEHpbC/pxbL+xefY8ybpxDYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpv381dzRT5; Tue, 15 Oct 2024 15:05:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5RcV089325; Tue, 15 Oct 2024 15:05:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5RXI089322; Tue, 15 Oct 2024 15:05:27 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:27 GMT Message-Id: <202410151505.49FF5RXI089322@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: cde459e2206c - stable/14 - procstat vm: report SysV shm segment mapping 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: cde459e2206c834a8b11ca7a257fadab10c4cac1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cde459e2206c834a8b11ca7a257fadab10c4cac1 commit cde459e2206c834a8b11ca7a257fadab10c4cac1 Author: Konstantin Belousov AuthorDate: 2024-10-05 09:34:59 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 procstat vm: report SysV shm segment mapping (cherry picked from commit 65b832eb6ff76464a65cbf6ba730a54364a5fdc2) --- usr.bin/procstat/procstat_vm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.bin/procstat/procstat_vm.c b/usr.bin/procstat/procstat_vm.c index 26a8fee57d1c..4f69aa3c3244 100644 --- a/usr.bin/procstat/procstat_vm.c +++ b/usr.bin/procstat/procstat_vm.c @@ -115,6 +115,8 @@ procstat_vm(struct procstat *procstat, struct kinfo_proc *kipp) KVME_FLAG_GROWS_DOWN ? "true" : "false"); xo_emit("{en:wired/%s}", kve->kve_flags & KVME_FLAG_USER_WIRED ? "true" : "false"); + xo_emit("{en:sysvshm/%s}", kve->kve_flags & + KVME_FLAG_SYSVSHM ? "true" : "false"); xo_close_container("kve_flags"); switch (kve->kve_type) { case KVME_TYPE_NONE: @@ -165,6 +167,10 @@ procstat_vm(struct procstat *procstat, struct kinfo_proc *kipp) } xo_emit("{d:kve_type/%-2s} ", str); xo_emit("{e:kve_type/%s}", lstr); + if ((kve->kve_flags & KVME_FLAG_SYSVSHM) != 0) + xo_emit(" {:sysvipc:/sysvshm(%ju:%u)/%ju:%u}", + (uintmax_t)kve->kve_vn_fileid, + kve->kve_vn_fsid_freebsd11); xo_emit("{:kve_path/%-s/%s}\n", kve->kve_path); xo_close_instance("vm"); } From nobody Tue Oct 15 15:05: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 4XScpw6YT7z5YYSP; Tue, 15 Oct 2024 15:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpw50Ynz4685; Tue, 15 Oct 2024 15:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LE29BjsiffyHMZo+4z7JajHuSHEjrpBp78B3eJyEROM=; b=lLr3MonCRN//FJQp8UfyF8AP3RkRucjUeMS0LvRVZoxMF800pxfFD02YqOHQCGzkuSUW/G OJSTj7CUcDQbFrfYiJ4o4DJd9cNLHG8YkTK0KMK6K2EXsswh+mxVMNbJbeFse7ZdvRfa9D 5/Fg7pLgO7YQ1oHaDwEd+XB43BK15SGKbXkg6zHOL5qUjCEAoAsJ614kjIuluqj0MKGLrf mN9VVwW9C/5beEmxHycVcDildHaNGZiAtux2LHMnvIYgsQI6O3Fv+xmbnU5CsvgrbaEX/Q bDJs9DIQ+9JEHUGuo7UTVTUqoZBuU76fygOZCkN6uR/NKmnKnvQeygEROcM48Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LE29BjsiffyHMZo+4z7JajHuSHEjrpBp78B3eJyEROM=; b=MN93AHaw4QoLXDdnS5zR2Oc+ici46RLdXcDMhsMaPimJzNzhcPZJVlZIqE/36aGdl5UpXb wVFjV0p6Em+HEPxA6jwN9r+DQp9hq3GSv2NfbxqMPYdtBv/VOSnqDtY5MvF6ES8skAUZqp Ecc6Q/NSExgzDmOOQEdAHRum8ecOMhl833Sx79YFQ3VE5R03qwPrP4wVhOWcliFcGSjING boPoPo2moZIculax5qpyEBDM1gCxs5j5OI5t/L1yzOmRl/wvI0BpDqhaPv4g4DDYjUtluW ilRuMa43/GETih26jQTArdxL9o7ODRj/B4EcccHKjy8sx8+mGWUnfmH9lma8xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004728; a=rsa-sha256; cv=none; b=UvXsRTMgsKAKutlcHLpCpXQ1CH5uyi/8dlNCR9QBw9aLi2mFVeFA5HB8uX/KwDHr/bgXEl 4E3mS4VojOUye8TJcTGZ9SI9M5R5QU6enRV9x5ZGqON30f6Y+JNLyCX/wwli/jT9RGNgPd nAIAzIYjqHUZ+YzK2c637QFj6gKWlD11z0toUBbAeWfIY++TCurDoLHxABxuXo3YCX03H+ GYX63IvkTC/0ocMlIfQrJL+z1oSc7FDpzfMIfqbtCcPAa5yaoBv+2pRnWnp0UA5oPdnLC0 DQbRILfcsCzJSrMS1YAok0077sa1kZmsjDf/RG85LM/hqbUxp7Sjf3He42yPyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpw4XnMzRRN; Tue, 15 Oct 2024 15:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5SEi089377; Tue, 15 Oct 2024 15:05:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5SYO089374; Tue, 15 Oct 2024 15:05:28 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:28 GMT Message-Id: <202410151505.49FF5SYO089374@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: cd8f8d34c9fd - stable/14 - vmstat -o: report objects backing SysV shm segments 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: cd8f8d34c9fde023fb9821c5063abeea66e394ba Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cd8f8d34c9fde023fb9821c5063abeea66e394ba commit cd8f8d34c9fde023fb9821c5063abeea66e394ba Author: Konstantin Belousov AuthorDate: 2024-10-05 09:43:25 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 vmstat -o: report objects backing SysV shm segments (cherry picked from commit 2d84f79c4e451cac179c7b2111a7f6cba60960b3) --- usr.bin/vmstat/vmstat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index c86c335087f5..203c34451874 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1552,6 +1552,9 @@ display_object(struct kinfo_vmobject *kvo) break; } xo_emit("{:type/%-2s} ", str); + if ((kvo->kvo_flags & KVMO_FLAG_SYSVSHM) != 0) + xo_emit("{:sysvshm/sysvshm(%ju:%u)} ", + (uintmax_t)kvo->kvo_vn_fileid, kvo->kvo_vn_fsid_freebsd11); xo_emit("{:path/%-s}\n", kvo->kvo_path); xo_close_instance("object"); } From nobody Tue Oct 15 15:05:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XScpy17S4z5YYSS; Tue, 15 Oct 2024 15:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpx62nnz463l; Tue, 15 Oct 2024 15:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l9L1zWuIOtr6/uJp/YEvAs2GP4I1uOR8adR1NSwJ5qQ=; b=hhJBIm1FkwCmg4skTxjyIbRGlQLvxk0DcZEUs6BrM692WuXrawG4MLzMO2qPCcd4THdFqq xi0ydY3h7UTywcvwC3jw+ZvSBvcc9LSZbctM6bZ2mPOOOHJJvEAzk9FsDcmhztFw0UX7t1 dZTSlWUFUjPTNxUsFeiGp21njC+2T/1y/vak5HY6Gb3RDS+/VkMiIYJrIRURtYxRZniHvA veaG/5srXExp0QmTZ8pPoDLLYLKRq+1ilsEF/wgBEOMhdZkvzUYjHc7ylpHuELCRb24FQJ IzQWzO04JHTP5UeRXqQYsylC6Vrrx3q9KAumOIYQfyPoAFwMQGpaaNLiipTtug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l9L1zWuIOtr6/uJp/YEvAs2GP4I1uOR8adR1NSwJ5qQ=; b=RxW5FvX1AHmC1POmNXGkF/K11EcPTZJ8gHWwpCZtjDrtMpbaQq9yPYIMOW8fljvskMS5Qo CcgEuxXlNBb6To9MOrtIgDWkFAr61v3VtE5TWB9KjIscl6hS74KSJ92t+FxIVftgJa3Ni/ jKo6UH9+YPorkDsKxc5EbsEHdT3zgViENwQy3mmCU1AfHe261sbkId2wDRvxuKN/Uyt3Ut QCR99+dHmQDKSOXQjsNjY55v/qNw8XBGWROV0f1NUa7+zBDDyVho9XCTlw7B5QNwEKpmFN fntzgZ92HmCVZGUfKNA2EZc1hDV45brgL7Xgzd9tka4QifunQFfkA7tfe7zENQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004729; a=rsa-sha256; cv=none; b=gPI5BfVh7zVnSYYN8vRLt7GC89TVHAJygEzR4FCuY1QMpEOLox+zl+bBXD0bM6WwHwPnwg FFjXDpPPicV9dYIQhymlmZQ7Hwgq1tZHscGUY6uahVpOKn7pbS7xsFM3nrXzdbAexhHWAF WWOb+bXd/sV8+Xk7t2zRxBnkbjN0KOod4bIn3KyHngdKXMY6ROLeKdQuX+mPYkc/4O7YbE pyf8GiHCaV6qhmQ7uanyID22AFdzX801XjF86MSmSD50NNg0kq11ll27ENKpUd9oq26usn ZGGhRLCJq7+HOUdjr69nScoPyPC/33eaJBAmHwYFxeoA/0eiXX4yPj8/BsUJ0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpx5byDzRfc; Tue, 15 Oct 2024 15:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5TBn089422; Tue, 15 Oct 2024 15:05:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5Tt7089419; Tue, 15 Oct 2024 15:05:29 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:29 GMT Message-Id: <202410151505.49FF5Tt7089419@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: a1ae801880ef - stable/14 - kinfo_vmentry: report max protection 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: a1ae801880ef64e2c2fd7ca51744ff86611df313 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a1ae801880ef64e2c2fd7ca51744ff86611df313 commit a1ae801880ef64e2c2fd7ca51744ff86611df313 Author: Konstantin Belousov AuthorDate: 2024-10-07 07:49:43 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 kinfo_vmentry: report max protection (cherry picked from commit 409c2fa385aa34baf7dd86bed2e86fbff16ad86d) --- sys/kern/kern_proc.c | 6 ++++++ sys/sys/user.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index d20fc0ac4e9a..17d002a29c77 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2679,6 +2679,12 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_protection |= KVME_PROT_WRITE; if (entry->protection & VM_PROT_EXECUTE) kve->kve_protection |= KVME_PROT_EXEC; + if (entry->max_protection & VM_PROT_READ) + kve->kve_protection |= KVME_MAX_PROT_READ; + if (entry->max_protection & VM_PROT_WRITE) + kve->kve_protection |= KVME_MAX_PROT_WRITE; + if (entry->max_protection & VM_PROT_EXECUTE) + kve->kve_protection |= KVME_MAX_PROT_EXEC; if (entry->eflags & MAP_ENTRY_COW) kve->kve_flags |= KVME_FLAG_COW; diff --git a/sys/sys/user.h b/sys/sys/user.h index 47f2984b1eff..4ca80741ad5a 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -508,6 +508,9 @@ struct kinfo_lockf { #define KVME_PROT_READ 0x00000001 #define KVME_PROT_WRITE 0x00000002 #define KVME_PROT_EXEC 0x00000004 +#define KVME_MAX_PROT_READ 0x00010000 +#define KVME_MAX_PROT_WRITE 0x00020000 +#define KVME_MAX_PROT_EXEC 0x00040000 #define KVME_FLAG_COW 0x00000001 #define KVME_FLAG_NEEDS_COPY 0x00000002 From nobody Tue Oct 15 15:05: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 4XScpz1dqqz5YYbc; Tue, 15 Oct 2024 15:05:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpy6dQrz46H5; Tue, 15 Oct 2024 15:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ySIck+XowaQlgBv8td/efe5P8qI7GbkzHFr6WDtnzYA=; b=ktDsKWgx8QiHqj+xjAtpOgsbL6ZtLGZyEarYi59TOO+5AVOXseizKP7IvI8zQvdJB9dZGQ O1FKG5xxKQV5yfvj/WFZ9ATtI3YuaQjbjqgA0wRrZVLDlR/A5at/8M2JI9R+uufbdTNVy0 lygo9TSwE9kQuiLmHo9CcyehUpCRUsshN/JyhIpfNDt5jbI34DuNepEPsGUa1qvQjNQZg1 KNjhbAOy3LINYTGVxv/dbU/MML9FSrjL6+kw7ke0XQleoMCHWPS10dg1y9+k2KxinKZ4KR IR3e0sIJ2zQe/7iDY2wiXE2dpSt/Sadg9mR6tt2sk4r32Q6Y3hzwLHQQRWOh+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ySIck+XowaQlgBv8td/efe5P8qI7GbkzHFr6WDtnzYA=; b=AuSeZx3UMS7y6UqhR2FxuSgVnK7lZ3oKL5+TfLbnZfcziFgIzxcqVOepuRHMaysSnBKx9m TCLghw3hAhqwdofaE7CjS6P3rVqBusc4xAjVxDRLlndXvhpLks7Kz14pkr2/evIjHcQJFM tAABJ8tJfl+snvhKDDdGnI8rMtrx21XmsouEo44UsLhFicuClGDeNRNV4ACt40McCz5r9O XwFYOIfjLMdC8UXjeikJ17Sf0pGrBek7NOv5aWmtaUrDoKKSVsumy32X+kl70ASuN3cnt8 ej8U7g81HJfzQUDbzTJ+oi1L8C11R9WP8yfB8x/J4Fat3trRNpOD9HcwVjcd4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004730; a=rsa-sha256; cv=none; b=PCmKTX2fd7n6yllv1bVk1Iqpqwfja7poT/h+DG0rv5vHKSHLJKAh4rCnbLVhAxX7I4YS24 1BbcpC165/IESv73tQexZX9C4HO1Hd5OyImXOsste2N/ucWw5cns8uc/jHMoDjB0Ot5Kau n3qB9uEy7kjykbR7DCzYfL4tFRGX7FsHCkY3Lpg5aJNG5uPx19gSt3vPamqijQ+EE6AGLn afoZMrjjw+6gB2xWkg7SlcImdH0k7L+ifNkfx+Jsngvz0BwDBACeXWXqo3K3aQgRmcJ8NN smm1bgszIztorPqrmkJEA/dFzeTD3B7BFYdjcEk9pA++eu646UP+qIbVvqxP5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpy6CJhzR8Y; Tue, 15 Oct 2024 15:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5U1O089461; Tue, 15 Oct 2024 15:05:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5Uv0089458; Tue, 15 Oct 2024 15:05:30 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:30 GMT Message-Id: <202410151505.49FF5Uv0089458@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: 32b3b01083ce - stable/14 - ptrace(PT_VM_ENTRY): report max protection 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: 32b3b01083ce4e7d8df4200ecb2ef21e4a2763b7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=32b3b01083ce4e7d8df4200ecb2ef21e4a2763b7 commit 32b3b01083ce4e7d8df4200ecb2ef21e4a2763b7 Author: Konstantin Belousov AuthorDate: 2024-10-07 07:53:18 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 ptrace(PT_VM_ENTRY): report max protection (cherry picked from commit e90b2b7d6c173e27dccdb894bb4e34ad30273e22) --- sys/kern/sys_process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 647487f86b02..a45d5b065382 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -517,7 +518,8 @@ ptrace_vm_entry(struct thread *td, struct proc *p, struct ptrace_vm_entry *pve) pve->pve_start = entry->start; pve->pve_end = entry->end - 1; pve->pve_offset = entry->offset; - pve->pve_prot = entry->protection; + pve->pve_prot = entry->protection | + PROT_MAX(entry->max_protection); /* Backing object's path needed? */ if (pve->pve_pathlen == 0) From nobody Tue Oct 15 15:05: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 4XScq02Pwhz5Z3KW; Tue, 15 Oct 2024 15:05:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScq00FhGz46Cc; Tue, 15 Oct 2024 15:05:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CRU1C658/uil6mfw0v56XTQZcRaTE2h34ba1Qs9VHfg=; b=X5PHDSnYVlapL6Y5pm6hmSFHZND8s7LyN4snsj/b95b1E9TF42HyVYsErPGBAGvSxoVEwW rsbDpFNT26y/HR2gkaEwxQV+WRbmzjdDVGid1m7CHtQe6NpOAZGxs2K6QzVkwHL6EHGEYB ZfFi16j7y1Q/O3WtAAd02nLe1XMdvcofB2VTv7dUgB9PLV9xFASWS3D2Gbwamfg+Wrqegy vJfnNUT2Ob50qyGaO6DCIyyvH1uzotnzltZxHTiCu1ekh9V6gw/TC1Qji1Hmosc8ItS1q/ qO+QOsHHPrjHuYRKCozpWrNBSo+4+o71yUgPJIOovhddBS5pt7ktVI7ySjv0Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CRU1C658/uil6mfw0v56XTQZcRaTE2h34ba1Qs9VHfg=; b=eCAt5/Majvi2eJi/1UMbbIauZHoQnhRH6ftLEvpdDwcVf6jrPZ2dSvMdCE4Hqnz4wqmXMR BZbCnCVcUttczs7TTaaia9KMlqqGS2dzlknSJ5kEymHfO6bDS6vIQwmHnVK/7VeWEuMjNL PTY4VurydLNnrFHFJgOCT2wCBScvQ9wtXJoGuc3LNDvbs/WEy/qaG35z+qhc9hHHN7MTO3 TvMnhZLUSJ1VbsA2ZGeo4ApjNPupH1RUxfnYewtnkFHPDpmTpCvCuerPqntHsyxWJYlnTh mWcxpp/5fguntIgvGKHKJsBQrPp48gFYrTtWkBmurQZq3XbXArdEQQjd4x8jUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004732; a=rsa-sha256; cv=none; b=Sbs1a4ZT9mWwttyaoqPTuRD/HMPL6Ng1w3ijL00pKDK1UDibTBkFtxqY4IgdwR3DKkaFGM IkjfX80kmsJnN0YXul0Te5QBQF6+05TGvXxKG/aK3wlBdYSGeA71c5FJ7lPlCLVyaDs1tq TgkGi2Exg0FoJYdvrgTxzN1Dul80I++SMZIeyOkpPX6rHRQshP6qI0zJp+KuYjIVexXSGd 704BUlQP1vGqQdrLLmAH90O49k9zy34nuPFKaTCtxdCZojHQbglPEa2pF7Nr21A9GNrwLV GwGZRjeTU4I8kHSex+Pesx+pmVECM/QAPCrn3nScw5SWYdm/kBLhwixMuM8Fmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpz6g3TzRRP; Tue, 15 Oct 2024 15:05:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5Va8089518; Tue, 15 Oct 2024 15:05:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5VuK089515; Tue, 15 Oct 2024 15:05:31 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:31 GMT Message-Id: <202410151505.49FF5VuK089515@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: 987c8e9afa1a - stable/14 - kinfo_{vmobject,vmentry}: move copy of pathes into the vnode handling scope 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: 987c8e9afa1a198d7cf9fc304e4855a0d9dcb738 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=987c8e9afa1a198d7cf9fc304e4855a0d9dcb738 commit 987c8e9afa1a198d7cf9fc304e4855a0d9dcb738 Author: Konstantin Belousov AuthorDate: 2024-10-07 07:36:51 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 kinfo_{vmobject,vmentry}: move copy of pathes into the vnode handling scope (cherry picked from commit 71a66883b58f796baf2bf79a43a91c16a71673b3) --- sys/kern/kern_proc.c | 7 +++---- sys/vm/vm_object.c | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 17d002a29c77..8f5ffeea71d3 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2741,6 +2741,9 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_status = KF_ATTR_VALID; } vput(vp); + strlcpy(kve->kve_path, fullpath, sizeof( + kve->kve_path)); + free(freepath, M_TEMP); } } else { kve->kve_type = guard ? KVME_TYPE_GUARD : @@ -2749,10 +2752,6 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_shadow_count = 0; } - strlcpy(kve->kve_path, fullpath, sizeof(kve->kve_path)); - if (freepath != NULL) - free(freepath, M_TEMP); - /* Pack record size down */ if ((flags & KERN_VMMAP_PACK_KINFO) != 0) kve->kve_structsize = diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index a8821f0f2a8b..1dbebf139683 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2622,11 +2622,10 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) /* truncate */ } vput(vp); + strlcpy(kvo->kvo_path, fullpath, sizeof(kvo->kvo_path)); + free(freepath, M_TEMP); } - strlcpy(kvo->kvo_path, fullpath, sizeof(kvo->kvo_path)); - free(freepath, M_TEMP); - /* Pack record size down */ kvo->kvo_structsize = offsetof(struct kinfo_vmobject, kvo_path) + strlen(kvo->kvo_path) + 1; From nobody Tue Oct 15 15:05: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 4XScq151P7z5YYbk; Tue, 15 Oct 2024 15:05:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScq11N5fz46Ks; Tue, 15 Oct 2024 15:05:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n00/AHV/zXNQKRwmnLZUY64j5ezF+iSj/zKSgIwGtx8=; b=ipCOoE3dYKjYgy3ySrJBL1sDtWphRpjn0KOPP5uD07uwXmO20kPlkK9ve+1ByAu7sgPqLm BBEzsUCjOS2EnVmClnc+GNeJuntIh7fsN90TLZzhoNXLG8bW7nqFt3Oj95dN02ZefYqs79 1LoMw826mqGhLoFS0ulSDGIZsxPNR8dQXRCZweeK8FLmEeusJXIVqz1ynCS2xYkhHd+5WI Zujj/bIzqteyEDNlocUW54Ze+CVyqalgq/Pz/9Kdwi3Jozdp+oo4jOz6nl07OzWAlpUva7 i/3mP/0rXUqW/vCixhzgtMBZGqnmoPkWD6iMPiMPDjJ5Ep3iz0udnimQJ9s1Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n00/AHV/zXNQKRwmnLZUY64j5ezF+iSj/zKSgIwGtx8=; b=Z7fvK1dNoEKez27pISdDwpOzNzo/RCspSKoszKmuXNURC8WQU3PXwAjijy88yoN7kLNvof IpT9el/VnKzIEJFmyOgST+yPk/1RHIAdQKq8shtgIFu5FAm7c+/TTrkMAmuU6IBs/J7xOA y/RgwlbIc850oX0GEYnzGylT/MwO6ndfEpUFILxL6CAScvhFfH95vSxmQvK0Rq2M56RHQf Vd1pHuAqUnVKepBUWgc6DZcynIyQMZG4GfxV4DxBw+18Cv8HcbG1iTcsOmZ2mivN/2cs3+ bYjhNmB8NKamKweyPmYplo56QNSsCl+X4BDMCNmMDwx+MOyHuAyqWPubkH6qsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004733; a=rsa-sha256; cv=none; b=KnQ4rMxosOU9Pb5IQWzIEhOy072dHCvkqYChDhRWg9iS/WJIUAVFsYJJffzd5zaJSuYHkG YjvIA3+y2eW3D1ew1Q0XVOSoNPxVWeYDuQLn0eugLSipmA1E8EHNg0EOzzecOHgt8RdRNU qar0ZRz6J5qDo5L2yjgy9NfJTYia8BgEAAzJUnRDgez+T6obwgEd2ugAuczBQONLCyJ3sg k+g+nfiVNQMQzOHxtiZ8FE2Od0Pm/ihIQS310DhIOKR8tG0W7BLQmxqjre4dZoN4mfFiK8 t18epuaYLNTzIwhyoAhlSiVhrwK/IbTOLscvtW0sI4sMmCBEvMVZlScgE++Esw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScq10ywyzRT6; Tue, 15 Oct 2024 15:05:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5X8c089569; Tue, 15 Oct 2024 15:05:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5XcJ089566; Tue, 15 Oct 2024 15:05:33 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:33 GMT Message-Id: <202410151505.49FF5XcJ089566@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: ec35a9c65d2d - stable/14 - posix shm: mark backing objects with SHM_POSIXSHM flag 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: ec35a9c65d2dc27f10097f08ee4ad3c2bf598471 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ec35a9c65d2dc27f10097f08ee4ad3c2bf598471 commit ec35a9c65d2dc27f10097f08ee4ad3c2bf598471 Author: Konstantin Belousov AuthorDate: 2024-10-07 01:26:38 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:17 +0000 posix shm: mark backing objects with SHM_POSIXSHM flag (cherry picked from commit a10870ecea813042db7c41e906e1a5c5693f8a34) --- sys/kern/uipc_shm.c | 16 +++++++++++----- sys/vm/vm_object.h | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 20dbe59e2a96..52a569931b01 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -944,15 +944,20 @@ shm_alloc(struct ucred *ucred, mode_t mode, bool largepage) shmfd->shm_gid = ucred->cr_gid; shmfd->shm_mode = mode; if (largepage) { - shmfd->shm_object = phys_pager_allocate(NULL, + obj = shmfd->shm_object = phys_pager_allocate(NULL, &shm_largepage_phys_ops, NULL, shmfd->shm_size, VM_PROT_DEFAULT, 0, ucred); + VM_OBJECT_WLOCK(shmfd->shm_object); + obj->un_pager.phys.phys_priv = shmfd; + vm_object_set_flag(obj, OBJ_POSIXSHM); + VM_OBJECT_WUNLOCK(shmfd->shm_object); shmfd->shm_lp_alloc_policy = SHM_LARGEPAGE_ALLOC_DEFAULT; } else { obj = vm_pager_allocate(shmfd_pager_type, NULL, shmfd->shm_size, VM_PROT_DEFAULT, 0, ucred); VM_OBJECT_WLOCK(obj); obj->un_pager.swp.swp_priv = shmfd; + vm_object_set_flag(obj, OBJ_POSIXSHM); VM_OBJECT_WUNLOCK(obj); shmfd->shm_object = obj; } @@ -992,11 +997,12 @@ shm_drop(struct shmfd *shmfd) rangelock_destroy(&shmfd->shm_rl); mtx_destroy(&shmfd->shm_mtx); obj = shmfd->shm_object; - if (!shm_largepage(shmfd)) { - VM_OBJECT_WLOCK(obj); + VM_OBJECT_WLOCK(obj); + if (shm_largepage(shmfd)) + obj->un_pager.phys.phys_priv = NULL; + else obj->un_pager.swp.swp_priv = NULL; - VM_OBJECT_WUNLOCK(obj); - } + VM_OBJECT_WUNLOCK(obj); vm_object_deallocate(obj); free(shmfd, M_SHMFD); } diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index c63a52260baf..9921f1130e8c 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -174,6 +174,7 @@ struct vm_object { void *data_ptr; uintptr_t data_val; }; + void *phys_priv; } phys; } un_pager; struct ucred *cred; @@ -204,6 +205,7 @@ struct vm_object { #define OBJ_PAGERPRIV1 0x00004000 /* Pager private */ #define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ #define OBJ_SYSVSHM 0x00010000 /* SysV SHM */ +#define OBJ_POSIXSHM 0x00020000 /* Posix SHM */ /* * Helpers to perform conversion between vm_object page indexes and offsets. From nobody Tue Oct 15 15:05: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 4XScq25RFdz5YYWX; Tue, 15 Oct 2024 15:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScq22KHYz46Hm; Tue, 15 Oct 2024 15:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BMLy7BbQ5X7ECMnMXjNOQnoGpvb5AS/gHdUbNthL6do=; b=yrxe407d7l2OW3+mbFEuzpZPxo0i8VKBvc0QmI8721YONgigiKdFP5kS17TQy/Xwwtve+j 5O9/pbjEj7I1wKPsj7X+Zbz4NxPb0B+mOBKEHS1SOoV8YP01c2YiGPzrsvTSYA96vzNCLj Vyo5f7JfgZqLXHC2y/Ck5A+x+mrpxxdzGmhLsW+Xd3b5ZNsbw6bs+GynQKqiy45nt7oN6z HuOaVcbkTOzeXEF6BppTkod+n5xmaLKKrAyX1nfYzeRZcEFgs4tQCKoAD0jrPbPAm4wjMQ +5mcw9sEyr/oGFznlJ9/tIqmemN5eX8587w3W3rWgYYU4cI2N3PqyUi7CkruCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BMLy7BbQ5X7ECMnMXjNOQnoGpvb5AS/gHdUbNthL6do=; b=ZOrvbfMxjB8wFT29EqqjLwo6aK1YXrdcJ5t4XPgzdpshFfztZn2je406lbZ4AAgGvvyndK IT1NJUR1tyb6CyOX6gbGe8CAhoZPbOwitSONML8jAfOCijTLk3z0OxPi610+eSKoIMSCNO ZqPtpzESw4ASeqdVNG58WfE1g9t0lrLDs6eLw46MO5ypFp0MwDSgbRLJfsv+B+Sm1k0nVb tCD4cUeCTMK+kkzSlJF5lucZgMN449M1iE6sTJxu2xAG2R5E8+wWnqE4P5eNMBHxlX5sfw xBlRVm5aCqw5VeReW2VcoFjXxGDfK01WdKePXukRPQ/sz7qP23bqTyejYlaQgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004734; a=rsa-sha256; cv=none; b=IXPHZ70EdC2KzpduCMjHf+aasaMVsVYNBw13lJ/+KSd3/2F7PdMJJyT9h02nSgAUqeS7Ze C7WqCtzCg6DyZF/S3TdS9rTd+acVqxRR11ujsPEz64F4S3QcIR5HX7nT337E2orr7DH7dT oeAvx0qDHTUCdWD1qhJ4on78Tcv8SV6IUlGAOoAn7GVjkm/ihZrIjucXkTZ+IPr4qWDsNA nPK2KaE5qVFtGxYQZAbX5KxSVuKw3qTCnWv5dwnauRnCVry7SpFcaDtGKUK9Fs3ED7wniU sM9rpxY9YAKe7YGWSjgmaI8myWoGL6U0AqDk8dXVV//xdQqIx8MHNxnwGWWnNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScq21xSwzR8Z; Tue, 15 Oct 2024 15:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5YB2089609; Tue, 15 Oct 2024 15:05:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5YsC089606; Tue, 15 Oct 2024 15:05:34 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:34 GMT Message-Id: <202410151505.49FF5YsC089606@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: 64de7b789b3d - stable/14 - posix shm: add shm_get_path(9) 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: 64de7b789b3d9fb03dfac93fa8c3ba6fa27bcd82 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=64de7b789b3d9fb03dfac93fa8c3ba6fa27bcd82 commit 64de7b789b3d9fb03dfac93fa8c3ba6fa27bcd82 Author: Konstantin Belousov AuthorDate: 2024-10-07 01:44:49 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:17 +0000 posix shm: add shm_get_path(9) (cherry picked from commit bda73e441f2576de5ad00856d758354c299a3f75) --- sys/kern/uipc_shm.c | 31 +++++++++++++++++++++++++++++++ sys/sys/mman.h | 1 + 2 files changed, 32 insertions(+) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 52a569931b01..8334d7eb3264 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -2196,3 +2196,34 @@ sys_shm_open2(struct thread *td, struct shm_open2_args *uap) return (kern_shm_open2(td, uap->path, uap->flags, uap->mode, uap->shmflags, NULL, uap->name)); } + +int +shm_get_path(struct vm_object *obj, char *path, size_t sz) +{ + struct shmfd *shmfd; + int error; + + error = 0; + shmfd = NULL; + sx_slock(&shm_dict_lock); + VM_OBJECT_RLOCK(obj); + if ((obj->flags & OBJ_POSIXSHM) == 0) { + error = EINVAL; + } else { + if (obj->type == shmfd_pager_type) + shmfd = obj->un_pager.swp.swp_priv; + else if (obj->type == OBJT_PHYS) + shmfd = obj->un_pager.phys.phys_priv; + if (shmfd == NULL) { + error = ENXIO; + } else { + strlcpy(path, shmfd->shm_path == NULL ? "anon" : + shmfd->shm_path, sz); + } + } + if (error != 0) + path[0] = '\0'; + VM_OBJECT_RUNLOCK(obj); + sx_sunlock(&shm_dict_lock); + return (error); +} diff --git a/sys/sys/mman.h b/sys/sys/mman.h index 7eb38a5f59d0..36973b941e61 100644 --- a/sys/sys/mman.h +++ b/sys/sys/mman.h @@ -310,6 +310,7 @@ void shm_drop(struct shmfd *shmfd); int shm_dotruncate(struct shmfd *shmfd, off_t length); bool shm_largepage(struct shmfd *shmfd); void shm_remove_prison(struct prison *pr); +int shm_get_path(struct vm_object *obj, char *path, size_t sz); extern struct fileops shm_ops; From nobody Tue Oct 15 15:05: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 4XScq36s7mz5Z3Kd; Tue, 15 Oct 2024 15:05:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScq32z80z46LS; Tue, 15 Oct 2024 15:05:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=11tBcYNp7JUQv2I+0Dgvw09aRDYw58StLVdDAM5yKdA=; b=F0Sa7974KAUIFd3a1MWrcLKjTgfDQRmHH6xpXBzrWgChuYBH82wtDlmJE/MITYeQhpiWmj zYOaMwSXpXLF4qlHlsfFSGAYl1QPnUoqSZWJx/m0oFDWc6Vm4mwPR7AQoCNimxzTTR13I+ qPdLEraUeQeVircULmdwmoA5sJ5C2sztxTvbx6sosF0gYqVDkKpQyizPUSfr9yXd1T0x7M 5ROVmbzj05msz0pwNGkRtmhk9xVQU/ljYITwWBnoTkznUqbc7LiHBH3fTeb3opcm7BK+cK c1M93GBzcIjsYjuErXuIjVxaUK510v3ioGcIkek7MWO1SmXtgsRyAGeenO70eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=11tBcYNp7JUQv2I+0Dgvw09aRDYw58StLVdDAM5yKdA=; b=maR3509tsfPY7ZR6BvX4KJutNO13seDyTBqs28eB9QnbiVZHhXVuYHVLFm15iADb4pwb92 n/zkP6KAWFROQLvmY/IyFChJZIoq9acQdHa6h+H/OpL6s2+liLu5G3ANwKe3ILyUwIeTpW 6PT2r+CHMCekBEruc+zZTXlVZez5oN+6eVOsWqES5Lsh20l7L4jSqRSQfBk8Fk7KcabmYq B9D1Pg62YzMT+5+n79CWXkpxCEhe6h4GTW0Qovjona39zdqWetzWiTvm6XyBrd61/2+/b1 Gh9fcXFULVvOxsYL8ZY+1kTHQF41621ma4jAGIM+fGJZDRzZi3pvYsuwrpJqIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004735; a=rsa-sha256; cv=none; b=v2/N1I/GnuKugCgYHNSyKQOz6HPLvhIfqhhUZ/mZpCvdDPgTFb/ZXgsvymUfdXdUm9V/fM +p3WWtgMDRoqadARYRJk1cpB2EvhVDXhJQdpIDGcOwecg2ATtvXVsIfvFDkd1NBFtLp6/9 D56a6lU6ANzt3DgFfmBpjQphinRk7J1/7GGE/0S3Hhnva46eNTS4nbB+bbBWFDxFQZtIYL 9TvZQo4MLT/zTJ56L8NhfKZiwB481B6TGoJG4BIC16Rqn2AbZ75k1w05sYp5cljKu9Z0cN treROVFIWy7SF+aYdJocFIvDDjeRuiPJNHy40Cd6YKTO2YPQY7GKlsn9PDQzMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScq32WQRzRT7; Tue, 15 Oct 2024 15:05:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5Zx6089660; Tue, 15 Oct 2024 15:05:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5Zuk089657; Tue, 15 Oct 2024 15:05:35 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:35 GMT Message-Id: <202410151505.49FF5Zuk089657@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: 5dc4245028c0 - stable/14 - sys/user.h: report posix shm mappings 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: 5dc4245028c05fe37ae79f183ad42d2f0ae6aa0c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5dc4245028c05fe37ae79f183ad42d2f0ae6aa0c commit 5dc4245028c05fe37ae79f183ad42d2f0ae6aa0c Author: Konstantin Belousov AuthorDate: 2024-10-07 01:49:51 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:17 +0000 sys/user.h: report posix shm mappings (cherry picked from commit a8c641bbcba7badad2d00206245cbfaf73a762b7) --- sys/kern/kern_proc.c | 5 +++++ sys/sys/user.h | 1 + 2 files changed, 6 insertions(+) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 8f5ffeea71d3..f89ffde8b5be 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2722,6 +2722,11 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_vn_fileid = key; kve->kve_vn_fsid_freebsd11 = seq; } + if ((lobj->flags & OBJ_POSIXSHM) != 0) { + kve->kve_flags |= KVME_FLAG_POSIXSHM; + shm_get_path(lobj, kve->kve_path, + sizeof(kve->kve_path)); + } if (vp != NULL) { vn_fullpath(vp, &fullpath, &freepath); kve->kve_vn_type = vntype_to_kinfo(vp->v_type); diff --git a/sys/sys/user.h b/sys/sys/user.h index 4ca80741ad5a..7ae0779278a4 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -520,6 +520,7 @@ struct kinfo_lockf { #define KVME_FLAG_GROWS_DOWN 0x00000020 #define KVME_FLAG_USER_WIRED 0x00000040 #define KVME_FLAG_SYSVSHM 0x00000080 +#define KVME_FLAG_POSIXSHM 0x00000100 #if defined(__amd64__) #define KINFO_OVMENTRY_SIZE 1168 From nobody Tue Oct 15 15:05: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 4XScq504YWz5YYWc; Tue, 15 Oct 2024 15:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScq44Rwcz46Yp; Tue, 15 Oct 2024 15:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z8Tai0L7piEueI/cy9P7grBJPBkr7JgXWHtL28NNs38=; b=CdoOVbYfXPsD6hN9d/eW67fVX1lOGGbjGequwObKZ1cI59KAhc5XCAzID0tpCQ0z59EtEs 7PS1MG6lB2Z6RPo3UOVdSQSoUEsomU/Qp/Fols4qVLe1lx2JU0vkg6NNzHkmWjkCf/3m/Y zrskHcyxfv4gEXZZVp0u4tmkd6KZz94VqzifqeDzgIIx6H5wGD2hm0M+IBw+FX9aU6Zm+P wSEqSdu3Qh8QybyWeWe9CzxfhoT2uxvLiZrT4dF8PZt7FdkzPpIwoYUl47vmTLmgBTt1OC mFwYa2V0K9nB6eiwrm+jGZWn9BD0aiUihZGQBUZvVebfFxzasK1QloPmw+M4Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z8Tai0L7piEueI/cy9P7grBJPBkr7JgXWHtL28NNs38=; b=WM5Axbh6sYr+z7mc7f/94FHv5z0dU2Ws4j/SDiDnKT/QnINmvQpuY9kbVG64SoihOXTNNQ /HfEVTlMraxQK1POjaRbOlylruTaOaFx294+chT+RVm7lZOH2H9lQduwz36ZYFZngOX3RO fRFbICr6rYLdg/YTew4MILISEaqxQCLO/BGf0unFfbMS+qlpdUjuyrRhT6txTNh+AUMZ/1 wZZm4goP8I1obGsxufiR3geB4O4xLQOENV+qdFa31QCrN99REn40P77qTwIlEXCJc6W7FU ji6VwY+ZprJVLSfc7V5Rjm2PKAKvrvTAg3rOghSogJv85TICc+LTF15bG+duug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004736; a=rsa-sha256; cv=none; b=r+Ado88ps9JBHi7FgNvghCSy2xCKYG0mhJwM7HBM9r0EqxrIDBGOvi8u8bjfVZgDkCFYPY cOvQ/DC+lekwwF/Wt86xXweDw8qNYLtt1SUvTFY2lRC+HotV8TGKnJfHMl+TO03gHN6U9/ 7inwG82H8ObwMNWaeesxz6gulsa8L6qcfXMKi3XBeT5qzr2KOAomWA955As9AFMzmlsArP DuPe+FfufyR0eCGdEiKC6eCf+CFTmrqVgfBhtaKpx0HJz5gJsWDwR128O6WQpttkoxjeMd kgm/FK4CK0ep+9tKQhyUzcX4We6mU/QT8Hxci9WaI/rQ2CLTQ17EbcfNj4HCaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScq43gYPzRhm; Tue, 15 Oct 2024 15:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5aS6089716; Tue, 15 Oct 2024 15:05:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5aJH089713; Tue, 15 Oct 2024 15:05:36 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:36 GMT Message-Id: <202410151505.49FF5aJH089713@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: dd7b4456983b - stable/14 - sysctl vm.objects: report objects backing posix shm segments 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: dd7b4456983be8a7630aa23b0637b0954579abf0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dd7b4456983be8a7630aa23b0637b0954579abf0 commit dd7b4456983be8a7630aa23b0637b0954579abf0 Author: Konstantin Belousov AuthorDate: 2024-10-07 01:55:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:17 +0000 sysctl vm.objects: report objects backing posix shm segments (cherry picked from commit b0b18b57a55b429cf3f625883da5dcb541b14960) --- sys/sys/user.h | 1 + sys/vm/vm_object.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/sys/sys/user.h b/sys/sys/user.h index 7ae0779278a4..945a51f6c3de 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -584,6 +584,7 @@ struct kinfo_vmentry { #define kve_obj kve_type_spec._kve_obj #define KVMO_FLAG_SYSVSHM 0x0001 +#define KVMO_FLAG_POSIXSHM 0x0002 /* * The "vm.objects" sysctl provides a list of all VM objects in the system diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 1dbebf139683..d0f367815469 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2612,6 +2612,11 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) kvo->kvo_vn_fileid = key; kvo->kvo_vn_fsid_freebsd11 = seq; } + if ((obj->flags & OBJ_POSIXSHM) != 0) { + kvo->kvo_flags |= KVMO_FLAG_POSIXSHM; + shm_get_path(obj, kvo->kvo_path, + sizeof(kvo->kvo_path)); + } if (vp != NULL) { vn_fullpath(vp, &fullpath, &freepath); vn_lock(vp, LK_SHARED | LK_RETRY); From nobody Tue Oct 15 15:05: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 4XScq565bGz5YYfD; Tue, 15 Oct 2024 15:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScq54wWmz46Td; Tue, 15 Oct 2024 15:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cCWPa6gFsJzIEcZbrRclj7xPADAok0qcijcycCbHu6Y=; b=oIVMcJaUrFnCWZAp6mcpzE/lD+nnOWMjkzv1oEkIDROm2aT01HT5zG3ynrymiy5u7S4b1Z GOINwqY+HwuQkr4CXwVparlxRzxich3iPUf4yAo5/Wjfpdd9zu8RsEdU2K3AZkwG6Yow9+ ompzPzGyFaNhdZ1G11c6fZJVDRgLDsMTIqwjpLfQ8p53nAqsw+aEowMslSbjNDxu6my5i5 mJJ7+ZmG73AaryULtWiAV+LP1IimLfVRVf4RT3comao6QLblJXC9wOLl3cwlDArXz9H8t2 It+xP8qCwy2CXm5uoJG87Q7oO415Igvy3/WhI02sQhut81bDCnM0megQwmpWxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cCWPa6gFsJzIEcZbrRclj7xPADAok0qcijcycCbHu6Y=; b=QJRSZfkOaGLx8Klv9wL+BNI9HL36Ewjh3C8odvgRojcFgGvMmaEO63QwBk96vUQPweIDL0 sYmdcikhMe9i1bY4s+Gj0lGmlnNxKfzFrvIUajoXXBTGnhPFhCjlSPTfth84SMpnPiY9sB rOvOcCECwprqrg5xwvZ/F01DENTw3t7n0hV9Xr6QZ7pmVKXV+mP74+SbKXnNe8kmwpF7jy TLmArMv363bo0upmSScvHKJZudJ/rty57F9KM+3tE9BGmfd5Uho0WXMYoLrvJTlVPGP0+k rPtqyGf0mnjrWGv6uxyjCkpuNbptx6Y6BuU1MXFvbvAI95M4kVTHiWi772UpiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004737; a=rsa-sha256; cv=none; b=hnWly/nXMw9f30xEbZ5RQ9bybTDCHmcZujh/AmR3nLDtaSBuy6/pXErYZrwiCMgPF9OiZY 10L49ds0jxeehdpGk1dxs6CKW6MgV8Bh59fyPQqokrVKTYH3AYuoCeQg/LjUOTKx7kdmvB FBIiMz+mka+WnNVeEAoy6O+v9Ds3g9naSrWqEkjFl/KskCQjKWfHSaNUnuUZZRmf4wXoDo 81LxhQDVo70stSfdgM14ngQwlILFiGY5NKImaATSor5ZpDO/Kt2AKsY6ihj1rTpSmbskja GardkbVH0q6gmylN97mXfbfbnCzPyAe+45GQ5Jt6bgieFCl9tdenAxelRk9B0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScq54WBDzRXP; Tue, 15 Oct 2024 15:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5bww089764; Tue, 15 Oct 2024 15:05:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5b1f089761; Tue, 15 Oct 2024 15:05:37 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:37 GMT Message-Id: <202410151505.49FF5b1f089761@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: a6188cd25039 - stable/14 - procstat vm: report posix shm segment mapping 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: a6188cd25039b77571ad3212a1fc0c914d55f48a Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a6188cd25039b77571ad3212a1fc0c914d55f48a commit a6188cd25039b77571ad3212a1fc0c914d55f48a Author: Konstantin Belousov AuthorDate: 2024-10-07 01:59:53 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:17 +0000 procstat vm: report posix shm segment mapping (cherry picked from commit a1258191d5e21736e25010c85eb01b5f995cc1d2) --- usr.bin/procstat/procstat_vm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/procstat/procstat_vm.c b/usr.bin/procstat/procstat_vm.c index 4f69aa3c3244..4fc3a1b5f556 100644 --- a/usr.bin/procstat/procstat_vm.c +++ b/usr.bin/procstat/procstat_vm.c @@ -171,6 +171,8 @@ procstat_vm(struct procstat *procstat, struct kinfo_proc *kipp) xo_emit(" {:sysvipc:/sysvshm(%ju:%u)/%ju:%u}", (uintmax_t)kve->kve_vn_fileid, kve->kve_vn_fsid_freebsd11); + if ((kve->kve_flags & KVME_FLAG_POSIXSHM) != 0) + xo_emit(" {:posixshm:/posixshm@/posixshm}"); xo_emit("{:kve_path/%-s/%s}\n", kve->kve_path); xo_close_instance("vm"); } From nobody Tue Oct 15 15:05: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 4XScq715gsz5YYWh; Tue, 15 Oct 2024 15:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScq65xy7z46cm; Tue, 15 Oct 2024 15:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CnpUaj7ME088AXl0BlvrmCPhpaqCWa06zK8/1ItvSEA=; b=jntCwddyWSa9+sLoGTzt0xQzBiLgl19GGQsgviKSH7cAlZLgOaZOYnPhnbUqf5yE0y0Xre 4cebzDZ2emlVQrAK3w+6fpG0ZWyiLMV5uZK9n8UQru/7zgAgRFH9EjrdlLJ9y6XeQEpKQc HBdHY4ZP/1VJbIxH058jGtlBh2b9AJF0k0gHoDaXWw2adHl/ytgvYu5Y54pAgvQqF9xqsr 4FX9v7XHDcWnY1NXwFmXxBPU5S+WqeWZEuK9P1LcLrSY3iNKWz9pR45bO7tnprSJK3U7Xn EgZ8aq8rK+vNWUrIl/cIe07zc4qhb0B+rIRKGV8dj0Cmr8qKQ32UgZ/Z4znYJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CnpUaj7ME088AXl0BlvrmCPhpaqCWa06zK8/1ItvSEA=; b=F1ZrCo2Ym3uKDgGKMORV2hXOyH9V2DnIWM43Hc6isOikiI7hBa7EjQXdWELMhTwDWwawFi Gb48g7zJ3OFirm5UiBacD+JdJW5mXFNHG6rofw8LWQ1v8bi769f82ptwWTLGvG7HlLq86D Ge8+d/PFRUfv4hCJfU8oo9pCw46HNnlW+6UUbzmQz11kNsj7k70RMEk4Zagyhr8vPiBFnd WBxAY06f6MPg+qV5nt/EWwG0a6+x2jX0TYB4xGIalHp2788Ymq6qSu70e4MJHuinTq4vD8 w0WQ6pYTe0YXRY0/cEqUXbfWOjwKY1st2kU616RJDBgv8NRmfunH9pvyijiUrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004738; a=rsa-sha256; cv=none; b=t+eiKtwrruDkrdvvEM0YQSo74JX5nVO2jYRg5sFLSGLs0oOoCT1gyVry6hkQO4zU1l3VCq yGgCC1wNNR2enu/2QPgO37+Rb81UHtYopdSR1cgAgfNhHyRVNiysKkfVuZC5G/iHkaWbeD UTN943fGSWDnpnHiQL5ZO4sx1/bILZW8sNdoht4b5svPKnYghSbtNTk1WuYF2J96e1Umek DyJqh9N+muuiqtIRmgFqFWMdicDyl2SZu2Genl5j/xfyp6hvMATluUT/yKz5ZN9mXuoT0f 3KdW0AlHpwHCq0mLY/OkGgkkWcuhrN2ymA/lX7/geIkOBNv4jPBgWV2mCmg7bA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScq65Z2qzRcG; Tue, 15 Oct 2024 15:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5c6H089815; Tue, 15 Oct 2024 15:05:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5cAv089812; Tue, 15 Oct 2024 15:05:38 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:38 GMT Message-Id: <202410151505.49FF5cAv089812@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: a8ff05830f63 - stable/14 - vmstat -o: report objects backing posix shm segments 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: a8ff05830f63328a22fa9eccd7a6d9b525b364b8 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a8ff05830f63328a22fa9eccd7a6d9b525b364b8 commit a8ff05830f63328a22fa9eccd7a6d9b525b364b8 Author: Konstantin Belousov AuthorDate: 2024-10-07 02:01:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:17 +0000 vmstat -o: report objects backing posix shm segments (cherry picked from commit ba40b2b89962b799ade3b92cdd710e36cccc8810) --- usr.bin/vmstat/vmstat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 203c34451874..ecffdc894e2e 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1555,6 +1555,8 @@ display_object(struct kinfo_vmobject *kvo) if ((kvo->kvo_flags & KVMO_FLAG_SYSVSHM) != 0) xo_emit("{:sysvshm/sysvshm(%ju:%u)} ", (uintmax_t)kvo->kvo_vn_fileid, kvo->kvo_vn_fsid_freebsd11); + if ((kvo->kvo_flags & KVMO_FLAG_POSIXSHM) != 0) + xo_emit("{:posixshm/posixshm@/posixshm}"); xo_emit("{:path/%-s}\n", kvo->kvo_path); xo_close_instance("object"); } From nobody Tue Oct 15 15:05: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 4XScq82Ny3z5YYbv; Tue, 15 Oct 2024 15:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScq771gPz46XX; Tue, 15 Oct 2024 15:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fLnBD65C4jnHoNm1TbAaLM2mH/MhEmq+h/UESa+Ps9o=; b=g7A8pDDiqniDu7eakZDWYRQnUjJ9ikzeWBN0ZlUrADvIjVz0rso2Yim78fo2JuFnGx8wqL bhyoSYMJEJvT+H0QvMen0pvahUYFlHTmiRGVXwB/El680D8mHakxFn9EyeWxn4kVsGFGbQ PMdRn7m/t+ARJAeDyYkJknPR/u5Tq5c7V3inH67MptBAY6VbxkvBkFE29nNu7PXLIy5ahq Fze9r/qQPUsNuV9I/YSH9x28b6/4P+9ueFe8A77aanD35/7AiCt7NSdwwnLXeDTgJTCZS4 XK/INB3cLHtBgh+AL9n3uSXMhVpVt+htWo3KKrM17cZRpWy0hS8ykrXxZMj63g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fLnBD65C4jnHoNm1TbAaLM2mH/MhEmq+h/UESa+Ps9o=; b=C1JuBZWfAolQUtPBzmQLwsZtXv5I6Z3ziks94E0URhO9qF4t/LKXWODtesTxAntvE12Z4/ YLfRswsIorY2OBNhCAWh+a5j6AsJvwcApIuwU93bUvObRs0wxUNGgCkqGOmuR6CZ8CqEXe pFx1201rNq3xpXT7gT+uCBnQwBdB+21Z/3bM7NgIIAwdSFHhNSTvwkO/twbcRx0O5ZWhSk N/MjJV6JmzKQx/d6ZA+LU3YPDiJCzi7vj5V/A+wFpHRnlg8J+8LXhhFVC6MpGQSWTDyVL8 MtJAOzM4lKFME+q0wgCgIhnPExqtaknDLTahKzaFD75cpgwhTdiUwacrKfa6jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004740; a=rsa-sha256; cv=none; b=KIydkRXigXhno0jXaQNtfIVKC7RBwuPtpDG1xUrU7mbTlHqGmmz/StoX5L4D8CjGC3VeJF 8Wwc+R0cSsgc6vuYAYLII9G1HicoTSaWG1dIx6l9yHP075GaU6Xhu5RIcxFtNL4GPKf0zZ sV8b03WqTFTBL2/h+4Ap8NKgXTJoGHcF6G/eaXUemKQjHgouNH31AuAYON+6ngCi5LROfX gzTwbbSjMRKgMosfznnLa/XnEm/Lt/RrwaU3gX/ITwXBhrO+lQRXz9e3JwjD3IFyO6hPJk sMXI7wLNJInQFYwiC0czXY427hhaeOVxA2/6O7RKdqalQHGh/dIrhIJWRdJWtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScq76b0jzR8b; Tue, 15 Oct 2024 15:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5du0089848; Tue, 15 Oct 2024 15:05:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5d4l089845; Tue, 15 Oct 2024 15:05:39 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:39 GMT Message-Id: <202410151505.49FF5d4l089845@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: 1e2317b3bf1b - stable/14 - shm_alloc(): cleanup 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: 1e2317b3bf1b33dd820d19cb2c1740818b176916 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1e2317b3bf1b33dd820d19cb2c1740818b176916 commit 1e2317b3bf1b33dd820d19cb2c1740818b176916 Author: Konstantin Belousov AuthorDate: 2024-10-08 17:43:38 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:17 +0000 shm_alloc(): cleanup (cherry picked from commit e578fd853a251c04d1eeb55c3aa499f8d0cb7480) --- sys/kern/uipc_shm.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 8334d7eb3264..8a533428790a 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -944,24 +944,20 @@ shm_alloc(struct ucred *ucred, mode_t mode, bool largepage) shmfd->shm_gid = ucred->cr_gid; shmfd->shm_mode = mode; if (largepage) { - obj = shmfd->shm_object = phys_pager_allocate(NULL, - &shm_largepage_phys_ops, NULL, shmfd->shm_size, - VM_PROT_DEFAULT, 0, ucred); - VM_OBJECT_WLOCK(shmfd->shm_object); + obj = phys_pager_allocate(NULL, &shm_largepage_phys_ops, + NULL, shmfd->shm_size, VM_PROT_DEFAULT, 0, ucred); obj->un_pager.phys.phys_priv = shmfd; - vm_object_set_flag(obj, OBJ_POSIXSHM); - VM_OBJECT_WUNLOCK(shmfd->shm_object); shmfd->shm_lp_alloc_policy = SHM_LARGEPAGE_ALLOC_DEFAULT; } else { obj = vm_pager_allocate(shmfd_pager_type, NULL, shmfd->shm_size, VM_PROT_DEFAULT, 0, ucred); - VM_OBJECT_WLOCK(obj); obj->un_pager.swp.swp_priv = shmfd; - vm_object_set_flag(obj, OBJ_POSIXSHM); - VM_OBJECT_WUNLOCK(obj); - shmfd->shm_object = obj; } - KASSERT(shmfd->shm_object != NULL, ("shm_create: vm_pager_allocate")); + KASSERT(obj != NULL, ("shm_create: vm_pager_allocate")); + VM_OBJECT_WLOCK(obj); + vm_object_set_flag(obj, OBJ_POSIXSHM); + VM_OBJECT_WUNLOCK(obj); + shmfd->shm_object = obj; vfs_timestamp(&shmfd->shm_birthtime); shmfd->shm_atime = shmfd->shm_mtime = shmfd->shm_ctime = shmfd->shm_birthtime; From nobody Tue Oct 15 15:05:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XScq92McVz5YYc1; Tue, 15 Oct 2024 15:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScq90sJMz46Xg; Tue, 15 Oct 2024 15:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q1sGuckltPoOq4U1AgAr3NR0d7SJ1cHP6yGWVhavNbE=; b=c0m5EvN5m0CwHsZr2pKDnqAwNwgZ8BenTREv1utskD0wyLAEdAcX8FV9jgxlp+rKDH4+wV OdCuPDFZwYWEpl5uk10oHJqlNNYrB1/MxeY7AuKRMnPglmY/HVVQe+pgX3b/z1fyxhgNpl +gLN5k6tIgfFVKUzs7rqT+ePEsMKEJJ8qynn50fHCCMftQuMmSe8q5VYVpPIuxrckO6KoC 86/gb5Tt9Nh+AcnKKU2vMMM3NAtoIrHHSbphXzkg3encCtEFkmDNh7TtFvpzM6HzoXxOUj fLrsm88gKA3K+yymkjdsv59h9u9t9cpawl1OZ49jf3Pkg25Xj0E/fSXXr3STZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q1sGuckltPoOq4U1AgAr3NR0d7SJ1cHP6yGWVhavNbE=; b=VOsladVc3qTezEJqT0hGwI5wn6SXGYYtSqiIzmO06X2Z6yppWhR/7X5FdZgyMablPTq9Dd /B3i1K/9y3+uD8j9VywSdwxLMkogE1xce2qsgkqb0VznM5QIQEkJ9b0W96VoaogntJYGdJ KKGKzaOpMemCvuRsb6JgBmKtcB/SgbWEUOjQF+7Hxs0cJMPe6aulvu8mlyPclfOQNdIN34 Vf1FZOzJc+TGFp0BEf0y47/wc6BakHXHRPNddKtCa3SZgnGAK6ysgd4XEU3yJ2+qe8JWr+ 4tuGQICfb8/WxqB/9rg5cV5CnJqh8O2kgrXhMHCDOVTzPn8bNqXEERdedJURHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004741; a=rsa-sha256; cv=none; b=Pn7O2BZMRU2HNhh5ocOXqpndFWngTVDtQybE0VnGLCrsjIENACuINWCWFjrnEFn32UJf7H VdOYHBG8wKfFKdNTIuqt7Y8ezAKgQv6u5lVRzpwDcTI0ZpQ+XDzuAIBvxnsNOhl/Tw0Rmq D0RFn9UeJ9ZI++GsmjmcdEoHGLQ3XffhNdUo1i/aMX52tYzckLaAadPL6BroZdum4bpuJ6 TKKZc/qp/JsWc7onbX/jqaJtfvzeUB6rG8s0dnEHaJKrQsKfEI7mtA//ywS7BJDs4Q+tNm sWjSTZILOYpe5tdyullPwQy1mn4uqOXL8pGOisTnALtAsUZsVQMFDMtfLbrOyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScq90DmpzRcH; Tue, 15 Oct 2024 15:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5eeA089900; Tue, 15 Oct 2024 15:05:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5eWf089897; Tue, 15 Oct 2024 15:05:40 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:40 GMT Message-Id: <202410151505.49FF5eWf089897@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: cdc72c496065 - stable/14 - kinfo_vmentry: report cdev name for device mappings 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: cdc72c4960656d581fd566425de7bfa50b3ef654 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cdc72c4960656d581fd566425de7bfa50b3ef654 commit cdc72c4960656d581fd566425de7bfa50b3ef654 Author: Konstantin Belousov AuthorDate: 2024-10-10 09:31:37 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 15:03:59 +0000 kinfo_vmentry: report cdev name for device mappings (cherry picked from commit ac9b565b1aa1adc359a5b0a0d83d0aea63643d62) --- sys/kern/kern_proc.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index f89ffde8b5be..b8bc1a7e5dfe 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -2615,9 +2616,11 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) struct ucred *cred; struct vnode *vp; struct vmspace *vm; + struct cdev *cdev; + struct cdevsw *csw; vm_offset_t addr; unsigned int last_timestamp; - int error; + int error, ref; key_t key; unsigned short seq; bool guard, super; @@ -2715,6 +2718,19 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_ref_count = obj->ref_count; kve->kve_shadow_count = obj->shadow_count; + if (obj->type == OBJT_DEVICE || + obj->type == OBJT_MGTDEVICE) { + cdev = obj->un_pager.devp.dev; + if (cdev != NULL) { + csw = dev_refthread(cdev, &ref); + if (csw != NULL) { + strlcpy(kve->kve_path, + cdev->si_name, sizeof( + kve->kve_path)); + dev_relthread(cdev, ref); + } + } + } VM_OBJECT_RUNLOCK(obj); if ((lobj->flags & OBJ_SYSVSHM) != 0) { kve->kve_flags |= KVME_FLAG_SYSVSHM; From nobody Tue Oct 15 15:05: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 4XScqB3m47z5YYSh; Tue, 15 Oct 2024 15:05:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScqB1cM4z46jb; Tue, 15 Oct 2024 15:05:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZGVlnukS3u8MznP0roWIxsRuYIr6EY1veT5J/Tr1kos=; b=LOuHl7Q6pu+uKFqNR5LICDHA2rEIHdN5zQuw7ZUEwaLupRyfPZ388CyVqjyTMC2lpwgqTE e8++fr/cOzLYJw0HDSF7O7WPSvVlDYovkhp5THZ3aR8m91BB2zhhjp5wCX59/UsQJpxzjM WqgrrWNTql93To4uAoez3qyhEdjRmSeb3LXEJX/aGGa9qz5y74J/BdiNpK2GThu1cQT0ly KCkPqkcPqpuI+zxVARNObrDtBtfzBfEC6ArfWHDZHOuJh7TKx0kLEubrTkPN+uoq9EbG+P dBhLNZ0uAh0Cpw6QeWu0pIvl0qGqXtzrAgoRG3zHVfZbg+lDzoen/9+cwepQvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZGVlnukS3u8MznP0roWIxsRuYIr6EY1veT5J/Tr1kos=; b=f/LuEmgX66qAewTdlJFF7L/dCxp1Waf8Fwt8nsg23WHLBrRBX7VP7nAiifbtNVUcQXeQxl 4ing1PEdtucFSgfClSIVFJzdVDPBPFssyuz5pBe+evwpuhG3lsz6y1wOkvg0IXclufrhT9 n7rBrYJaHpg3YQyS3F5z3CaL95QjwXVVxwlXpEEcFKNFofTT5kf+rjSTMu/Jyzc+XWb3aS deHkTy40XFph1N7Cu0qLKNJy66bkNW3kamHfutdW0if+qQ5mNbCRPa9ka70xG9Ye7hGn4r cRz2nOCAh6G5ApV26GiyYRAP+Nc81cdAXaD2Wt8Fdyq+SOcXx12z75WoVMFArw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004742; a=rsa-sha256; cv=none; b=UuVEEn6pNLuGo1aqjUhAJx2EYMZQlorWYO0Fs2yt5R3c1JlSxJogFKmVTvD406LOQ//LuM z6rp5XI95+O4iqXmeUqHLOxWvdiJTQpYGiWnxjFPurpCIg9j6RtColBPk1TvmVJ0IfKnQD Z9BMLOGikGF3SJRR5G2Aj+Y9r/lF+RWxFsD3AUcAX8Zbq/A8e2kLiTAI7iGHtBtQrCBxre jrNedsHUu9mKS2mLXCieuUWUjwkl7ysC2R6Q6hRvIMDnaTvNgTIu98FTUBunPfnRcAcglk reb892axWx/EDh4QGjNg2sl8O0kGlbUUWSVLuGWSE4RBaUOFiyF+5IGbSTLe8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScqB1DmhzRT8; Tue, 15 Oct 2024 15:05:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5gPQ089953; Tue, 15 Oct 2024 15:05:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5gFS089950; Tue, 15 Oct 2024 15:05:42 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:42 GMT Message-Id: <202410151505.49FF5gFS089950@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: dfe83ae4da34 - stable/14 - sysctl vm.vm_objects: report cdev name for device-backed objects 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: dfe83ae4da34798a7bd0e6c7607b548ead4a1869 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dfe83ae4da34798a7bd0e6c7607b548ead4a1869 commit dfe83ae4da34798a7bd0e6c7607b548ead4a1869 Author: Konstantin Belousov AuthorDate: 2024-10-10 09:37:19 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 15:03:59 +0000 sysctl vm.vm_objects: report cdev name for device-backed objects (cherry picked from commit d9daa28c364d0b1189ab616d8d697b4c9f748038) --- sys/vm/vm_object.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index d0f367815469..d2ac8f696634 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -68,6 +68,7 @@ #include #include +#include #include #include #include @@ -2517,8 +2518,10 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) struct vattr va; vm_object_t obj; vm_page_t m; + struct cdev *cdev; + struct cdevsw *csw; u_long sp; - int count, error; + int count, error, ref; key_t key; unsigned short seq; bool want_path; @@ -2605,6 +2608,17 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) sp = swap_pager_swapped_pages(obj); kvo->kvo_swapped = sp > UINT32_MAX ? UINT32_MAX : sp; } + if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) { + cdev = obj->un_pager.devp.dev; + if (cdev != NULL) { + csw = dev_refthread(cdev, &ref); + if (csw != NULL) { + strlcpy(kvo->kvo_path, cdev->si_name, + sizeof(kvo->kvo_path)); + dev_relthread(cdev, ref); + } + } + } VM_OBJECT_RUNLOCK(obj); if ((obj->flags & OBJ_SYSVSHM) != 0) { kvo->kvo_flags |= KVMO_FLAG_SYSVSHM; From nobody Tue Oct 15 15:05: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 4XScqC39yfz5YYSj; Tue, 15 Oct 2024 15:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScqC2Vvbz46js; Tue, 15 Oct 2024 15:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=usUgUxtFM8TdrMxWkYs1XtDUXNL7zDh2DNm18V89D4w=; b=gaINb0LfZ+lAEc28auPwkBTgJtgUbUb9mGOK2RmM+mqZjepFz47PGAApS47hsub+GiXo3/ l6i/h9zfeP9CX6XIvaIsuymnvVKAXMOfftrOlGbu4phYpyi4tSPBNCTAIWFfYluuYC7o6m HsGjjR1/RdxBixJWrYxE12S956D3Yyv3xxY8jhZT8iQQoXcYLWd3pMiePoFer0EWd2+Av2 I+9p5FqSojm02TCTNgAkW+2DmlTZtedTD/7I//kHNWrcNi2lb8S/e761/hFoKYaSpGOjyd L2a2Rl5vMTJxgoZCA7/xZ15YD4MHCZ0Sz/z7yX0rkdjfaGqb0oi60bOP7mN9Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=usUgUxtFM8TdrMxWkYs1XtDUXNL7zDh2DNm18V89D4w=; b=Zv1y4bAMiC1Osoyt25mRH3KQ6Zg5OdsATg1NDnct67Dbms7pCYOMzb61tcnwyPAPMH6n06 qdh2d8P7kaCw5IPQ9X8kvKvsbHDHrkifjACH8x4+8tJK1Es8qPrmzn2cbrZ/auKaUqqHle 67NwQsoEmmUcU7yuswOpuAv5+7L13v6jidXUmuUyWaNOt9NbuOKdC4xcwFqYbK9lBLtSNk W6RvJ71OC1i9jPylQSZ9l7pMTpT4x9xojFRW0wSBtFP+HGW2efUv7/71SIZTAymOPr+3CD xk3E1RTCLc4nIpNyavwJpHgeZdtI9LV25EQoYP7MPYblIZlHeTi9II2s5i5W1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004743; a=rsa-sha256; cv=none; b=ehWb/JcDTk6Wb468TbSY97EcOl93sv/FkOWVn7COQiVFo2qoPtyvoAUfCEgoneIXmodOcf WOP8E962nvmjVo6HmvtibXp6gVAhDzcy8fzd1lk89k3R09TnKJXIu0LbP//yGz0E490NEN NXAzSfOCthHNRFvm0pygxKiPlGA0wC6UDZ//NfaHVTAZVqDfuMHVAWp/zbq/noSxOwTooI pavHLOuyXyuQdR8DZNgdQo4H6mydgwehgaIDq8hk9on4kPiuqI4dj77X6dMaVJGp2bP2AZ ZRfY56Mzy8gc1RNjj/581++L86xTIyp+g0LZYt4+0ilIF7h6RtbI8L/uHlNY6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScqC27KWzR8c; Tue, 15 Oct 2024 15:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5hRk090001; Tue, 15 Oct 2024 15:05:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5hsk089998; Tue, 15 Oct 2024 15:05:43 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:43 GMT Message-Id: <202410151505.49FF5hsk089998@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: 7b8de6a84b30 - stable/14 - vnode.h: add comment line about VIRF_ flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7b8de6a84b309a393ab347679f167ff06800175e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7b8de6a84b309a393ab347679f167ff06800175e commit 7b8de6a84b309a393ab347679f167ff06800175e Author: Konstantin Belousov AuthorDate: 2024-09-20 04:53:02 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 15:03:59 +0000 vnode.h: add comment line about VIRF_ flags (cherry picked from commit f50a0944d034519c300be1cd1c9518d259a17337) --- sys/sys/vnode.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 2667b77d7c52..0cd48ea44747 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -233,6 +233,7 @@ _Static_assert(sizeof(struct vnode) <= 448, "vnode size crosses 448 bytes"); /* * Vnode flags. * VI flags are protected by interlock and live in v_iflag + * VIRF flags are protected by interlock and live in v_irflag * VV flags are protected by the vnode lock and live in v_vflag * * VIRF_DOOMED is doubly protected by the interlock and vnode lock. Both From nobody Tue Oct 15 15:07:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XScrs6p5dz5YYhr; Tue, 15 Oct 2024 15:07:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScrs6JJJz4Dwf; Tue, 15 Oct 2024 15:07:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SKDzS7Kbi2AAJx+V8l2v8+1VnMleOsKSbM+bgkfGrQs=; b=NC3Q6rxVrBWcuXujAQlEPzPujnR+XyOpHiENeh0aLmk8iBeRuxGht0YBAqQDs8AqhmmaJo s74qtfOWYD+SKmkzZ9nS5BSMVHM9tKJi0s8DYJNEDbdIayzJGEu15Xtx4Q/yQkssO4aqMX nVG+BYjK6HgLA8prV2FQBQ9kxX1IUUz+tba1wU9g0H2ScEDuiVclAtr8dq0vHMIWsr4FuN Xf6RFlObHnQp4gi3DTMCRsN6VYN9vN5JRbV6P8zpVdX6kzBzjCMhRcq1638YWvZNMOKISY NIuREI6rhF7cifLIPmD7IUOxKLIo7ZJHphvAHjhmO51hmw2Dezk3RWn/Ml7t7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SKDzS7Kbi2AAJx+V8l2v8+1VnMleOsKSbM+bgkfGrQs=; b=JRS8hxnEHdITWWYk8+zYWtO1JE9T7fPmqNa5265mi8ovQBpr8yl2wm2W9rILfgHIntD42u h6WR/RTRJbUyCQIjFlSf6blIy8rmLdxqyAiAtqB/3hDKcAAIca2MIBr3+OcsTwYat0bIPq g/tPTRP7QZQ/I2pI1woTPWYBTdmwRdTZ4HZwXDM/L19oECTmI8p+7Zi5d88Gd4laJoP56S /ijWz4ZPWbDM6Pv3Ptx1SxK0HqC+JsN6GDiXuKj2l/8qzvxxRCipX5ouTrz47R0mBQdBDF tjcgwGX1BvATDtmrSKzj4TLeLE//Vnu9RfCZiv4cV+z65tzytWe20uVbl0yv0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004829; a=rsa-sha256; cv=none; b=ozxWKGIMrdQUjulgSJA5+U9xJIKsbp+Scsgwyy3nnh4ie9OOLKTw1WTXG1QK2fPUVWH+cm Qlo2x7I422yeaf821IhI4c2+or9OJXmm5om+BY38GwYOAn/o426Svpzb0RCPVyg4+qGAGo 7ykfiHLMtIWKl1qUOoiWrqeWvbhEHDv2QtAKb19J00DJLCu0XsGmFumspfjylaf1urnmFI 4S/FPGuD3eNKeQKGrSucr8Pj14abGK8Brljyp/v2SJa0sgn9mMg2Y+aUVB5vyXZVH5ex+p QZjAZY8Q/E0hnKJrp6GaIwWtCY6K1v87ydi/JyLCBplpkLRkMlWXbETJ1QWgGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScrs5jJGzRhn; Tue, 15 Oct 2024 15:07:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF79KK090441; Tue, 15 Oct 2024 15:07:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF790k090438; Tue, 15 Oct 2024 15:07:09 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:07:09 GMT Message-Id: <202410151507.49FF790k090438@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: b90d68c9b28b - stable/14 - jemalloc: set LG_VADDR to 64 on amd64 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: b90d68c9b28b0a458bdf4a963397817974ed0f90 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b90d68c9b28b0a458bdf4a963397817974ed0f90 commit b90d68c9b28b0a458bdf4a963397817974ed0f90 Author: Konstantin Belousov AuthorDate: 2024-09-16 21:09:03 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 15:06:44 +0000 jemalloc: set LG_VADDR to 64 on amd64 (cherry picked from commit eade2001aa9d91440886de8359a4dec9edcde2a9) --- contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h | 4 ++++ lib/libc/stdlib/malloc/jemalloc/Makefile.inc | 3 +++ share/mk/src.opts.mk | 1 + tools/build/options/WITHOUT_JEMALLOC_LG_VADDR_WIDE | 5 +++++ 4 files changed, 13 insertions(+) diff --git a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h index ea8e8d42b14e..493300157a70 100644 --- a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h +++ b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h @@ -39,7 +39,11 @@ # define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) #endif #ifdef __amd64__ +#ifdef _USE_LG_VADDR_WIDE +# define LG_VADDR 64 +#else # define LG_VADDR 48 +#endif # define LG_SIZEOF_PTR 3 # define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) #endif diff --git a/lib/libc/stdlib/malloc/jemalloc/Makefile.inc b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc index 1ba7725fe8a8..d916d69f471f 100644 --- a/lib/libc/stdlib/malloc/jemalloc/Makefile.inc +++ b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc @@ -5,6 +5,9 @@ JEMALLOCSRCS:= jemalloc.c arena.c background_thread.c base.c bin.c bitmap.c \ test_hooks.c ticker.c tsd.c witness.c CFLAGS+=-I${SRCTOP}/contrib/jemalloc/include +.if ${MK_JEMALLOC_LG_VADDR_WIDE} != no +CFLAGS+=-D_USE_LG_VADDR_WIDE +.endif .for src in ${JEMALLOCSRCS} MISRCS+=jemalloc_${src} diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 600daa9ef61b..774b6fffd3df 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -118,6 +118,7 @@ __DEFAULT_YES_OPTIONS = \ IPFW \ ISCSI \ JAIL \ + JEMALLOC_LG_VADDR_WIDE \ KDUMP \ KVM \ LDNS \ diff --git a/tools/build/options/WITHOUT_JEMALLOC_LG_VADDR_WIDE b/tools/build/options/WITHOUT_JEMALLOC_LG_VADDR_WIDE new file mode 100644 index 000000000000..9efc4022e9cf --- /dev/null +++ b/tools/build/options/WITHOUT_JEMALLOC_LG_VADDR_WIDE @@ -0,0 +1,5 @@ +Disallow programs to use more than 48 address bits on amd64. +Incompatible with LA57 mode. +Enabling this option might result in a slight reduction in memory +consumption for jemalloc metadata, but also requires disabling LA57 +(if hardware supports it). From nobody Tue Oct 15 15:32: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 4XSdQL0vnbz5Yb9k; Tue, 15 Oct 2024 15:32:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSdQL0L71z4Hpw; Tue, 15 Oct 2024 15:32:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729006362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dYTQExoz/rC+yLOBtIX5D/ViLVY+CxCc3Gap3TaPPp0=; b=tyRjIp334apVTGEBlGZbOt5+oNN1lmXTbUV+IG8fRXCvIBB37+SRO2xfoi6vOJAs9V1H+/ qwDzx7MNWMMYzHzrI5LccQMHg3D0y13T8H51naalEBc9mVzeVqhxGuLBKSsTJ+PBfAS/m8 /pFprFu+RCpNL/r7oG+qEE6HOZYImR6a3MKGE2JDlqf72z8BO/Po/BiTGMS5+ddkVP9xdd Tjg9bbjx8UEJnQ9bvDd3Q0FyQ029eipEg/YN+auC3G/CenrflOy+rtA6PuFKwNNYSp9wMZ aTVPYc6KaXyPdvVkDFFSHjJ4CtDU+9z5M6dybg1E1OjS08pYtW6vXTxUMqHuwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729006362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dYTQExoz/rC+yLOBtIX5D/ViLVY+CxCc3Gap3TaPPp0=; b=SVDKSXNmgFiqXEGcCnr9fBxNuM1mmKN9jp5xJabQBCFChzxKCT3by3YGgzL6taWfL4Vx3E KplN0bWfJQQQfTMT61B+tl291CEhp7hq2ZpJm+NscZ99/esqlnruQIg4oI+b0ba8l4GSPP o2lGhLODclkELPdrEhdTXzHjkxxJ7qgT9juAKd+/s6fWM3GV4b4jVi0Wap0QKham3WMDln wM/56EdMdK5krTFwJb9tIUIJbxg+mg3Do/055BXm0s6/VBVCrYF4b9SXRkofuQl5xsX1e+ 7e/QgQQ7KyUKxz16hH2kawwnZtnEzmPh0gbzTW0gCrBMhjUWzIIPA5hsw1rpTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729006362; a=rsa-sha256; cv=none; b=jpz81x+Dht1G4gu0/HOvblD5Af+l6U6qgJmWcj5Nw9vK8+g8IfqOJGwFNWB0AdDROzeMJO heLrQVoeNSA11MsjF08gSd+oKhHMRI4OoBS45gktClT3XxJ1V5EbTX67o9ZGbS/UTjA3q8 Mta2quvKMg2rL4aHNoD6aYwikGt28oq/wQ5sqz3XocQWtAIM9N5PjF/SPI8erS213QjmqY XdPD0VTwsKfP/28nMdTLEr8bMfRZ3nwZgv2zAUt2sR1r+nDgOgd0maqpppGXM1rVYB1isI M2bI0UPi2BgkOUo65KOfJVpFgebsqU0ZDxAPfHbTDQCFMsw6QcscXjcZo7MYqw== Received: from [IPV6:2601:5c0:4200:b830:6065:7bd2:5db8:bc5f] (unknown [IPv6:2601:5c0:4200:b830:6065:7bd2:5db8:bc5f]) (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 4XSdQK5fftzhLG; Tue, 15 Oct 2024 15:32:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 15 Oct 2024 11:32:40 -0400 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: 76bfa33f2598 - main - uart: Go back to returning '0' when we've probed the device. Content-Language: en-US To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202410151101.49FB1HA5077421@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202410151101.49FB1HA5077421@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/15/24 04:01, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=76bfa33f259891a8b9108e20141bd18e2c8d312f > > commit 76bfa33f259891a8b9108e20141bd18e2c8d312f > Author: Warner Losh > AuthorDate: 2024-10-15 10:59:29 +0000 > Commit: Warner Losh > CommitDate: 2024-10-15 10:59:29 +0000 > > uart: Go back to returning '0' when we've probed the device. > > Two reasons for this: we know it's a uart after we call probe and it > returns successfully. Second, uart passes data between probe and attach > with softc. As it is now, we call probe twice, once in the bidding > process and once after bidding id done. However, the probe process for > uart isn't completely idempotent (we change state of the uart > sometimes). The second call can result in odd behavior (though so far > only in buggy version of other code I've not committed). The bigger > problem is the softc: newbus creates it, we populate it, then frees it > when we don't return 0 to claim the device. It then calls us again, we > repopulate it, and this time it doesn't free it before calling attach. > Returning 0 avoids both of these issues. The justification for doing it > in the commit that changed it was 'while I'm here', so there doesn't > seem to be a use case for it. Hmm, I think it was changed in this commit which wasn't a "while I'm here": commit b923a71020ae338f723d9aa01b5365c90aae2fec Author: Marcel Moolenaar Date: Fri Oct 28 06:30:39 2005 +0000 In uart_bus_probe() return BUS_PROBE_DEFAULT when the probe is successful. Notes: svn path=/head/; revision=151792 diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index 7b068187e565..b2ff203d0b2a 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -282,7 +282,7 @@ uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan) error = UART_PROBE(sc); bus_release_resource(dev, sc->sc_rtype, sc->sc_rrid, sc->sc_rres); - return (error); + return ((error) ? error : BUS_PROBE_DEFAULT); } int It really is a bug to be depending on passing softc state from probe to attach and it would be ideal to fix that, but going back to returning 0 is ok for now. Maybe instead of '0' though use BUS_PROBE_SPECIFIC? -- John Baldwin From nobody Tue Oct 15 15:39: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 4XSdZ82Lm1z5YbcM; Tue, 15 Oct 2024 15:39:28 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSdZ81pD2z4Jln; Tue, 15 Oct 2024 15:39:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729006768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ct9m7yF+pa2R/srwXsVTp5QmOap8yHzZz3neFXjaN/c=; b=X1qy5WJN8Ulp+ktXMCu/X7+7KDpQ3iZtZX4rmOj/XgiXDxoUhFEUbioJSWcMvw/X01zJGt zoDtwS8SMWe6TBkrai4wXYvdzi75ZDRSWv7RU1zl1lfv/z76VhChZoTdmH0BX7ztHKcF2S XyTLtT7TAeuhblH+X/NpiUir5mV785RmQ/LSuMLAMfoeaacWOLIS/vyWZNoA6CDCUnrqDS TleSje8akn5Qv+0fKLJnE1hPRWk3McffL8zmtgwghnhEAATjicWMJWUtBGRdn7kRw7iTQE B5/zd+4iFEBzTlNBk5i6X19rTt7U3Q1sngJB1gDA+5bkjqfLD8pg2LQNW5/SYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729006768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ct9m7yF+pa2R/srwXsVTp5QmOap8yHzZz3neFXjaN/c=; b=dZE7Vfo1BHuKYLTJ6TBjW3n5n6qSUdd9pHOipNq28C6QcLeYK5QDSLatmb9yAzTxHgWgO8 auKCB8a5JtRqNxJMOLbktuNI8bQ2M/t8ayVp9VNjMoOatSVoaLn3op57iejKJvQGF8ox28 KKq5uvDXEk7HlZHUyaz4w/zyCoAzpjoHPoB59S+Pmyq3fv1RpCuDW5ikmKfKjrXTWvR0uV aPxc2khvcn61h7KS0wpESCxR8627gcwo4uIHKMiN4o77T/TWT7Dr8XflVJflPgWlMKbI4H dZX6mszFOi+pvzTM/K0MUfCMQEQlqv5uOSw4kgLFLD3IrVdhrNy+Wn/x+uXjDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729006768; a=rsa-sha256; cv=none; b=JKT/6s8Oz2EkaMlrF8n70qH2UVBlsaNpC5ilfHhFlAODafiEDIV3kLROrMy8Hg1sBitX8j 1FV+s3jdAq6l6XkRlmhC2Bnpa+XdyboywPRIAp7oZ9QLKjVuGHqxJJt+PBm3IRlqjC/Uax iakl2ZKBgx/9yQH9iCbS1TGtL1BTW/gjSazXeF4wsFYu6HSaIy2pk09t+z+TflcmdSLfW/ dQ4HGlYYGzejt7Jfp63UvMH8nrh7U3Jkmzheu7WscooVCchqih4SVQw3wMZC2bHGllv4ht fOgwop313NQ+F67+elaGlIxDcxE5hbLfP5HIoDZFQPGYuR1CUJNI0LMQPIhJUQ== Received: from [IPV6:2601:5c0:4200:b830:6065:7bd2:5db8:bc5f] (unknown [IPv6:2601:5c0:4200:b830:6065:7bd2:5db8:bc5f]) (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 4XSdZ775k2zjjx; Tue, 15 Oct 2024 15:39:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <4f8da12e-1482-4cc9-b2fe-4d304bb87519@FreeBSD.org> Date: Tue, 15 Oct 2024 11:39:27 -0400 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: ba40b2b89962 - main - vmstat -o: report objects backing posix shm segments Content-Language: en-US To: Konstantin Belousov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202410081239.498CdTKs013126@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202410081239.498CdTKs013126@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/8/24 05:39, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ba40b2b89962b799ade3b92cdd710e36cccc8810 > > commit ba40b2b89962b799ade3b92cdd710e36cccc8810 > Author: Konstantin Belousov > AuthorDate: 2024-10-07 02:01:48 +0000 > Commit: Konstantin Belousov > CommitDate: 2024-10-08 12:38:29 +0000 > > vmstat -o: report objects backing posix shm segments > > Reviewed by: markj > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D46970 Thanks for all of these fixes to export more info for memory mappings. These are all really useful. -- John Baldwin From nobody Tue Oct 15 15:44: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 4XSdgp06VLz5Yc8V; Tue, 15 Oct 2024 15:44:22 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSdgn6JRPz4Kst; Tue, 15 Oct 2024 15:44:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729007061; 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=aCBnc+6rwnZHGULX7eT1oJm4fRF4VG0si91Lgmwrktk=; b=Oor4zCVXLD4WL50u1nlP0w0TVyFNZmgcbqpP3BkYDqjXx/TPWH3jLvs52etPEwEo86pL0e 5fwJWxrHZDZqAMCH7i4u7Kr3vmIFtvCYZlNFvyN6iXEM3OVz+EwprsrOASAi0gbIVIfO40 2BzL4u6sZv7GoDbmPfHAS3xRxC044a5hRhmAziQaWZ2UIhDXi+Sq/pvUrk7rZFTIMAIcBj C82hRRa78Ry4IHw831xb2RYyggmVyCW/1LXLW1MZpcZQNOojNoTWPML1OFyaohusURoZEH S0/wMLok14GR8/fDOQ4MDDIhOymylFmfFrnc1TN1UvKsS/XcMS40EOwuCIojRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729007061; 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=aCBnc+6rwnZHGULX7eT1oJm4fRF4VG0si91Lgmwrktk=; b=BBy6Sj2PrKht4Bv5oTglSGWWAcEYBWBn59rk4cLY0ZaIup3MpC5968nhsbIICSL7Jnsr5f 67jKeqgjoGSIuRou07CLYA6iF6OF75tIh5OxAkcYqtkr1WwSaDQVfXVu6uxY3wrTb2IPfX auu2eoghLswKi9LbUThAXTkTatN/npryEMg5FQ81mvIplHMMM9xDlqiKssakR8VCEBzHdz cztpvClGPRn2NJml9yT5ERJL99Efcl8huGNhyRSkI3zEaXAvB1SrIluuHHTyyJ+0+zgdjF KLjNev/bW8WVseG6gk+TAEz2VyZaLoLqMF9GESasiXUzI9ZuJctPioqemVYDTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729007061; a=rsa-sha256; cv=none; b=CF574fE+3H3S20ftDwZD1fYCpUM7evFPtMbVOt5TokjtlcV9BRRHVku+ODLJsGgafbH7op 5v129UOgAeR3FQ+8VHbHaaL/yOp42/MXXxgG+30PN5IzyaIrveopn8NdA1F+UT+QZiVIse anBloh+KWjIW8eOcvxtwmdYoqIVDD8QQl6ZkK7tSvvPvmPtJOxB1+YVC6amEsx7qrpU/q6 ns7C9+RwevPt4WILF1FlZ8sY2hcI1OfMwzJccAXfYsN0mi1kdfqEPejIhRwABPm1l3w3F9 yfIhSqft7rHXD0ZzL8HXhhwRK50slaIkHMYJfoNXZmAml0RWAj6l4HExccPR9g== Received: from [IPV6:2601:5c0:4200:b830:6065:7bd2:5db8:bc5f] (unknown [IPv6:2601:5c0:4200:b830:6065:7bd2:5db8:bc5f]) (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 4XSdgn3WX1zjG9; Tue, 15 Oct 2024 15:44:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <1d8771ba-319f-419d-a567-200d538bc704@FreeBSD.org> Date: Tue, 15 Oct 2024 11:44:20 -0400 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: 50c64df2a173 - main - Revert "libkldelf: add a private library for kernel/kld-related ELF parsing" Content-Language: en-US To: Ka Ho Ng , Cy Schubert Cc: Dmitry Morozovsky , Shawn Webb , Ka Ho Ng , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202410081940.498JeV5t035958@gitrepo.freebsd.org> <20241008201627.4EE5719D@slippy.cwsent.com> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/8/24 15:16, Ka Ho Ng wrote: > On Tue, Oct 8, 2024 at 4:16 PM Cy Schubert > wrote: > >> In message , Dmitry >> Morozo >> vsky writes: >>> On Tue, 8 Oct 2024, Shawn Webb wrote: >>> >>>> On Tue, Oct 08, 2024 at 07:40:31PM UTC, Ka Ho Ng wrote: >>>>> The branch main has been updated by khng: >>>>> >>>>> URL: >> https://cgit.FreeBSD.org/src/commit/?id=50c64df2a1739dca84c0e3bc795b >>> 70e5991b7010 >>>>> >>>>> commit 50c64df2a1739dca84c0e3bc795b70e5991b7010 >>>>> Author: Ka Ho Ng >>>>> AuthorDate: 2024-10-08 19:40:20 +0000 >>>>> Commit: Ka Ho Ng >>>>> CommitDate: 2024-10-08 19:40:20 +0000 >>>>> >>>>> Revert "libkldelf: add a private library for kernel/kld-related >> ELF p >>> arsing" >>>>> >>>>> This reverts commit 0a2cfd653e86ac41c4e6e32a449d133c0ee6d677. >>>> >>>> Could you please explain why? >>> >>> bapt@: Since this set of commits, incremental building of packages >> fail! >> >> Hmm. I didn't experience this in my poudriere here. >> >> >> -- >> Cheers, >> Cy Schubert >> FreeBSD UNIX: Web: https://FreeBSD.org >> NTP: Web: https://nwtime.org >> >> e^(i*pi)+1=0 >> >> >> It affects pkgbase users mainly, and the reason is rather due to the > linkage issue between the separated privatelib and kldxref resulting in > empty LINKER_SETs in the privatelib. I will recommit this once it's fixed. One thing I would still like to understand, btw, is your use case for having the separate library? I think you plan to teach libkvm about kernel modules so it can resolve symbols defined in kernel modules when examining a vmcore? However, I'm curious why you need that functionality in libkvm itself? That is, many of the problems you have to solve (e.g. finding the separate debug files for kernel modules in /usr/lib/debug so that you can parse the symbol table) are already handled in existing debuggers like gdb and lldb. It's not clear to me that teaching libkvm about kernel modules in crashdumps is the right way to solve the problem you are solving vs using a debugger directly? -- John Baldwin From nobody Tue Oct 15 16:58: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 4XSgKT1x8Lz5YjH0 for ; Tue, 15 Oct 2024 16:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgKT1J5tz4QLt; Tue, 15 Oct 2024 16:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729011517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GSNRgFU0Li+7b1wS8jUXJmvKmgz4dijUNn9Q9MFpLIg=; b=K79e74yduUx4jb/dU52YgITcEKc3ssJGPD/YNo0KpAyXHaDeeDYp6RPNo61DzuTjHpRIwo 1CQscemOJbn5+K5v7lV+o7WNUNiqkVMm7YYUYmP5bvBkC9bWY8tswYedTZl6tX/ObCMzis loLjxS7PspaecVx1aAJNfZ6o1msH0PqzXUkym57B4BlRvbCa3DcVQTLd/vCZWpXTe+OV0r 4DbqYQR0+GkoW78QOgEsIeOAhQofDNvWar+VpLycoN1lUwJ1qQBz4gukDpMDOOiNYlAZhT pgq/1nqbdC5yO8XgZxGiDqhYGkbeBIEeE3R/qF7kpgkcC7PmsAYNwQys4fHBJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729011517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GSNRgFU0Li+7b1wS8jUXJmvKmgz4dijUNn9Q9MFpLIg=; b=EsrVQAG+raUmdiveSfN6Kfa9Y8oJnmfBmT9pG8iwzzpXA5r2Sy/ip3p/g8p2HMBgYffAHt XwoFkgLrIxo8OAYJvQtlI2z4X+8ap2OTDjhyplGtgRDx5lYMuvVMczVx7jpj6gjSi+M6G9 QAg8QFPPVIayivxKWtcdzPgUvLQ0GDXoAgMuzXvS2spBiQnlROD8A9CqJuj6qMAtY5bZAI oiaZvx0axjZGwqwFXDdvl2mG+33qNO3o/EHdqbHp7zhKU+B7s8HXu8VLLd2LRgjt318XDt gVFI6QXqFWrodj0Mq+91aDNoHjZtJ4YohnEHsVZ4AUcgbtFNLXXDl7NFcvpn0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729011517; a=rsa-sha256; cv=none; b=ZK64t4EvUhW4fYN8pwlzWUJBgxfuTRXZ+8yUpknr8tVqIIfB9lt4kaUJVdlviOdRs2wXq1 /HIdrrWLmQ2b/aTcIVPPL8zSSjLX5x7hhuSZ8XPoDbi5sL8tNXbPnPGTZ1VuPHwvJHx2HT c29vh6UA2ftaeGfrWGls9tP7vDGM+gHNFv8z378P53KG1RYaRPucrggoCEe36O/3slBU6O RJLT48maeLkjwosnFjf2Q7nkS/gaisNXQEIOdsC2cGi5VcUmEePLDGzN8hpVNumlH1xx2T CA+3FLdMWj3+BX4Re1J33BCSd2CesdOOFajC4xmJQZRH9SKUNIsir9e9Tn6SiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgKT0kfHzV8j; Tue, 15 Oct 2024 16:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FGwaY6076123; Tue, 15 Oct 2024 16:58:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FGwavL076122; Tue, 15 Oct 2024 16:58:36 GMT (envelope-from git) Date: Tue, 15 Oct 2024 16:58:36 GMT Message-Id: <202410151658.49FGwavL076122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Osama Abboud Subject: git: 04cf7cee5ae0..0fd934a2fd12 - vendor/ena-com - vendor branch updated 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/vendor/ena-com X-Git-Reftype: branch X-Git-Commit: 0fd934a2fd12fa74ae409d3de1313e449be5d97e X-Git-Oldrev: 04cf7cee5ae0c6bb29eb21ce85bab7ca7386a95f X-Git-Newrev: 0fd934a2fd12fa74ae409d3de1313e449be5d97e Auto-Submitted: auto-generated The branch vendor/ena-com has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/log/?id=04cf7cee5ae0..0fd934a2fd12 f473873e7687 ena: Support LLQ entry size recommendation from device a3b938b9999f ena: Add macros which represent LLQ header size in bytes a20a329b107f ena: Add rx_overruns to keep alive desc and admin stats 9db2d4a3b222 ena: Extend support to 256 reset reasons 0e025f8caad6 ena: Add configuration notifications interface support 12bd8f5c7b97 ena: exponential backoff exp limit 532a548fb1c9 ena: Add TX IPv6 csum offload to driver_supported_features 8a519b3db5b4 ena: Add pci bus parmater to ENA_MEMCPY_TO_DEVICE_64 a6d34c1b85c6 ena: RX ring submission queue optimization ca44b821e4f7 ena: Rename fields to MBZ in completion descriptors 528cfb636608 ena: Add ENA_ADMIN_CDESC_MBZ capability 56c50c4babb9 ena: Use correct READ_ONCE on u8 field a7a1d9eadb27 ena: Add completion descriptor corruption check ba39831fba2f ena: Add a new reset reason for malformed TX descriptors 15441c801ad9 ena: Remove unused ena_gen_info.h 26ce6c06126c ena: PHC error bound/flags support 6389866e547a ena: Update default PHC expiration timeout 938dc07c7bf4 ena: PHC destroy race 47a7c79e1db3 ena: Adjust PHC for multiple devices 06e8a547b616 ena: PHC activation check point e00234fa34eb ena: Fix crash when interrupt arrives after admin command timeout 9bf46e20b0ef ena: Add unlikely to error checks 265a14922dca ena: Add reset reason for missing admin interrupt 5f134219270a ena: Support max wide LLQ depth from device 0486b8582bed ena: Add a check for existing keep alive notification in aenq 259e904afa23 ena: Fix memory barrier comment 1afe0b56512b ena: RX ring submission queue optimization 577d2864c117 ena: Remove enum ena_admin_os_type 3f2906c2257a ena: Handle ENA_CMD_ABORTED case on admin queue interrupt mode 0fd934a2fd12 ena: Add support for reset request over AENQ From nobody Tue Oct 15 16:58: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 4XSgKT20Ftz5YhrY for ; Tue, 15 Oct 2024 16:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgKT1YjFz4QgG; Tue, 15 Oct 2024 16:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729011517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tu+0HINGf17Dhp6gM6GNED6uCLlWP3ZkOtlRUV25v5o=; b=CVX4IPITCyP/tKrq5+CsGC6NRbhqDQojJnq1ryhVPJLZNjBjdff0n1D2wFdAbEGTexDZKL jMzIOcErINw7ktA/xhKg9JuCiQztqptZp/kd4wU6Yr63p5jfKmP/MkRR5RI2Nk+ZYCmezo NSOc3bYFXfNcC224/SyTjHj/X8Hz1SO6uAf6uJh/7no/Q1mk6TeGG7g1SkZ3jmVHuo8mUt eo6XbRnQpGua2Rgh4Z0NyIf+hR/7pYt+vLigL/wadYx+FlNp5xH4QR36VclR5z8ymldK2o vK2vBfVGYR5joCtYcotSX3o5EwxeQUncoPGL7NPQXC3J36atIdJR3/BiaIXBQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729011517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tu+0HINGf17Dhp6gM6GNED6uCLlWP3ZkOtlRUV25v5o=; b=dWBfhqV9Pp+1ckVIYFtXqX427Ubv089DsKOCZdqTG5EeXvs8Y/8l8PWIL1nFYBFgHNrSdS EP7p6EtkyVnck0Vyz/j0pNR4k4sKdasEuXn+kJ+SvCn0zyv6uje2Gq1fs+n0CPrgJnxjmA m+HMV/pmAEqyLXTTYyE2rFHnUnyeoJUBCwyCfUvxqcRwegSA9odXtcpY8yoCsI0XrGszGl qTTx9N75G37KMMrxKhyWFRzWG9qYPLqZLPMeqWHfTn6YDXRyr/c4C1ExLI2Yj4dbEhpuD8 fgmOYu7Ta4vu5rlWc3BV8u7sfp7L1/LsEjqCixMvfWJef8cIrJa3ycBpSaSY2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729011517; a=rsa-sha256; cv=none; b=TheqetLoy83jmL2eBBfAwA1h52ht3LxS5R/csJqAFBi+EdIfeBUhLrEJvp1RMtP/cHVVb9 CENsgy4z4BOWkGuGFWwVXG7C/OF27OVDnrkzHakn9Ca/EPTBsCRDqv9NOccXmIH8m3yPJp MCvzCLgA62VVFHW9CQXLTlbV8gLWe+XKjvHMSTTEVpIeMV87wqy1ZJ0NV0wFFT1it9uSLJ ysABCTrGtVoD9yBmKKbhe9DNQJ6rdvfTURHQfqX99MhlNGmW7zowf6FLGsqi6ph3waOIiE aYkATc7sI099bvJe1g7eWP3WAB8XoFuFUD54vvuGVGi+DPoz3KqN8hcKu+9qvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgKT18b8zV8k; Tue, 15 Oct 2024 16:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FGwbXZ076142; Tue, 15 Oct 2024 16:58:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FGwbEf076141; Tue, 15 Oct 2024 16:58:37 GMT (envelope-from git) Date: Tue, 15 Oct 2024 16:58:37 GMT Message-Id: <202410151658.49FGwbEf076141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Osama Abboud Subject: git: 6dd773527dd3 - Create tag vendor/ena-com/2.8.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: osamaabb X-Git-Repository: src X-Git-Refname: refs/tags/vendor/ena-com/2.8.0 X-Git-Reftype: annotated tag X-Git-Commit: 6dd773527dd39d6f81ea1165f89dccdea6018434 Auto-Submitted: auto-generated The annotated tag vendor/ena-com/2.8.0 has been created by osamaabb: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/ena-com/2.8.0 tag vendor/ena-com/2.8.0 Tagger: Osama Abboud TaggerDate: 2024-10-15 16:55:01 +0000 Upgrade ENA HAL to v2.8.0 Sponsored by: Amazon, Inc. commit 0fd934a2fd12fa74ae409d3de1313e449be5d97e Author: Osama Abboud AuthorDate: 2024-08-07 06:24:17 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 16:54:28 +0000 ena: Add support for reset request over AENQ In order to support reset request message from the device to the driver, over AENQ, which in turn should cause the driver to trigger reset, the following was added: 1. New AENQ group - ENA_ADMIN_DEVICE_REQUEST_RESET, to support the new message from the device sent via the AENQ to the driver. 2. New reset reason - ENA_REGS_RESET_DEVICE_REQUEST, which is used in order to indicate that the reset was triggered by the driver following the device request. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. From nobody Tue Oct 15 17:05: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 4XSgSx371Pz5YjR8; Tue, 15 Oct 2024 17:05:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgSx23T1z4S4w; Tue, 15 Oct 2024 17:05:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729011905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L54pCbK+fymP4bfkHmr2cY7XtWtBTL0/PuPuzsd2pGA=; b=dEaAbGnLRiG0J8R3zi2MDBE2+fejREpsMxrdVJsEBovTapgLajs23c18z+5dzjN/c+JPYt qXPC4tk++OCzWonrZYwtM1WHk+klzAE893BODBDvIw5VH/QmQ7tgWPPpYhRBo3Cxeh7leo Bzfphs7TzbfxUxICBNYbBvh8o3CS+EsjLKvLQQVAB3KAzUjzXM9O5KA2F6hZICNCQOw8Lj arFvLqM5AwGa+q6j86JnXuvpqC0j0WlzqcM4RTJLNyn5rABAuAIamtV8NARVzpG2b3MbvE B+UT8nE5L24cPlAwDKqHnidtvyiKXPGxBJWC8Vbrou5aMTa36/YST3X86555AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729011905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L54pCbK+fymP4bfkHmr2cY7XtWtBTL0/PuPuzsd2pGA=; b=yBSK5YlOzO2rv10X1nPsYFCkuSRaxN45EC0NxzogpPznyPGzdZGVnqvsYwHoD95XEV6Ts8 40ItYHmJZ7sX0hjakmrQpVo11/nYUUNb7Zk2do2GghfRNtHLL2Gkxdfgo7noxO8+94FbxR uApaOCQyQR5qHoG6BVyB+JBEmCkY/rtZIkB0yLwPkeJuRToQRzKwWwMaRQSBQbarmHu/CN wZMh5dxePjZZ29OsDPYsxfwO4yz9tRS2CHQC4iFheD3NEq/1XyHPZY+2/zj+vv3NZcSRnR DfSRfYyZN85WRgwW1Im7iYQyX9ZNtzhYBCajVKpv4Pv77xxCozoEwupXugqyAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729011905; a=rsa-sha256; cv=none; b=ScjF6zmvEQNQbJJKGTa8YY+pcxOdAKGfoKfGs+/lxTjeTsMzH7cp929PAbcF4eRg/nFkIh SAWlrkv7TxLl75hOnRSSMZAMJQcyIS6nqONuDZKoF2K67Nj56cZJp9Nj8w7Zw9I+pQiEXd UVoEy2a2jCZLrbvenvg8dZ34foaD0hOVuqbuAipx/PhLMj0KnCFLwqRHObANePSQ7R0wLN WeKTEacq4ArWIw8B4AYljl+r8KNd7YthM+dzl8tOo0wOph/3peDiBI1rh+IIaE3QfpSaLE 7Ozw2OMu36qvUIRVnW4sYEkjianFGEfaVLJ7UnfiL07BmQy6pC6NTcUIeGZG5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgSx1fNgzWvX; Tue, 15 Oct 2024 17:05:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FH55Iu093903; Tue, 15 Oct 2024 17:05:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FH55Ch093900; Tue, 15 Oct 2024 17:05:05 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:05:05 GMT Message-Id: <202410151705.49FH55Ch093900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: f5f8d7c9cdf0 - main - ena: Upgrade ena-com to freebsd v2.8.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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5f8d7c9cdf0341f7c5fdb3a7c3358ec0ed67a0c Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=f5f8d7c9cdf0341f7c5fdb3a7c3358ec0ed67a0c commit f5f8d7c9cdf0341f7c5fdb3a7c3358ec0ed67a0c Merge: 2e13459e2aa4 0fd934a2fd12 Author: Osama Abboud AuthorDate: 2024-10-15 17:02:26 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:02:26 +0000 ena: Upgrade ena-com to freebsd v2.8.0 Merge commit '0fd934a2fd12fa74ae409d3de1313e449be5d97e' Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. sys/contrib/ena-com/ena_com.c | 257 ++++++++++++++++++------- sys/contrib/ena-com/ena_com.h | 61 +++++- sys/contrib/ena-com/ena_defs/ena_admin_defs.h | 112 ++++++++--- sys/contrib/ena-com/ena_defs/ena_eth_io_defs.h | 43 ++++- sys/contrib/ena-com/ena_defs/ena_gen_info.h | 34 ---- sys/contrib/ena-com/ena_defs/ena_regs_defs.h | 5 + sys/contrib/ena-com/ena_eth_com.c | 38 ++-- sys/contrib/ena-com/ena_eth_com.h | 19 +- sys/contrib/ena-com/ena_plat.h | 7 +- 9 files changed, 425 insertions(+), 151 deletions(-) From nobody Tue Oct 15 17:10:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSgZq1WGwz5YjyB; Tue, 15 Oct 2024 17:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgZq12Fnz4SGJ; Tue, 15 Oct 2024 17:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729012211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/7H9MxiMP3jkTAnaX7cOsq9dsKXnZ29G6N7IWd9sgMI=; b=vDh6IKbBB8+ImsbPHfdYiTxvt7iU/VDf5agoIA7Q0J7C6rvuaK3EJvivIvDyY/0bE40yEZ FQeUEBF5JGdfEV6D/sgQOBYW1u13F7rszHywfN6Lb8V+JIQnyGzdYHJQ0zaC7y05wO0KuT 275NRu/BAvZWzksdMG3Rh2XKQ5koc01qxPfH7Xxi/3mK7M7a0KlUssyyA+rjnQxRvyz8+I 1lPgs719G4493SpDMdCwCLHH+m5/a9Obe5+OOvwgcuPK0rl6zpqea+ZjkrWKQI81XSF0BT U5LcxnsAGuc98Q08hNjkSmSIeS+WkEWQSFK2BEKlGV7mns816q55DEuXvRlbyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729012211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/7H9MxiMP3jkTAnaX7cOsq9dsKXnZ29G6N7IWd9sgMI=; b=Bxk7V6LSAs/ftu5gOk4VzAPziJhbX+14LQKhO7YnrFr7tR8tmux1DEcv+Qd5TRtBUMJOm1 4jHwKGjrqHfqPrOl21WAXjlE85bamfCy/GzuaTufeB8mAjmnOLsI/0S73U3Xq94fDmwpOY qtgo1P00yzVgJP4U1nSXDRYd9F5cYmkN6PNP05pUdo76R8KPs1B9e80uBHz/7CB0I/6a0y K8vVIaFnKKC+yiBL18h4QhmpbaYCibWw/LCdreVVWCl6cFoC6jy/qYvPsfXTwGAn9H7wgK 7NwQFez3GqDAACZfWjv2uk79meDCbGx2oBFQcLFuCARWLer5izzhmmahv/QdVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729012211; a=rsa-sha256; cv=none; b=t7TiYZvDHLGvynU3mb25xkWwz1b2x8eZdbwql2A7/ssuWv4mZEbdEKhzbkDeKGPOgNkqtz jVzPY8oo6rXDOa/Rq0tGmq15xWZIxR2IjVS5dN4YmoAfbT/7n6XVE0pp215WWkBip0uMb7 uBvqEpAumgpRjxqWYayoP2UHz7jxP6HdukRzmP5/vBNhDcvtRz7AQUZ16EaNUyj3hrsEIA 6bOhxGgvJFYTn3IAYIQCGQ+2qs1d/QAQlT9QXN8jYvuXNpvM/fKWuRoXpwKaX1Vl2gzLV/ NZPt9CBwfz63n3FJYO+xrt8AEdScqbD//zo8DSCe5W2bU6TLTcoqRniN3GdFEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgZq0dHjzWl9; Tue, 15 Oct 2024 17:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHAAPi099509; Tue, 15 Oct 2024 17:10:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHAA6a099497; Tue, 15 Oct 2024 17:10:10 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:10:10 GMT Message-Id: <202410151710.49FHAA6a099497@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Igor Ostapenko Subject: git: 9b86b272bfdb - main - tests: Move netpfil/pf/divapp to netpfil/common/ 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b86b272bfdb1fead5bf65d301c5df784c3165af Auto-Submitted: auto-generated The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=9b86b272bfdb1fead5bf65d301c5df784c3165af commit 9b86b272bfdb1fead5bf65d301c5df784c3165af Author: Igor Ostapenko AuthorDate: 2024-10-15 17:03:42 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-15 17:08:01 +0000 tests: Move netpfil/pf/divapp to netpfil/common/ It's intended to be used by both ipfw and pf. Reviewed by: kp, markj Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D47110 --- ObsoleteFiles.inc | 3 +++ tests/sys/netpfil/common/Makefile | 3 +++ tests/sys/netpfil/{pf => common}/divapp.c | 2 +- tests/sys/netpfil/pf/Makefile | 3 --- tests/sys/netpfil/pf/divert-to.sh | 20 ++++++++++---------- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 01f2609353cd..aa4dedbc9265 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20241014: move divapp to netpfil/common/ +OLD_FILES+=usr/tests/sys/netpfil/pf/divapp + # 20240930: libmd bumped to version 7 OLD_LIBS+=lib/libmd.so.6 diff --git a/tests/sys/netpfil/common/Makefile b/tests/sys/netpfil/common/Makefile index 4cd3f1a8a156..0938bd9d9c7e 100644 --- a/tests/sys/netpfil/common/Makefile +++ b/tests/sys/netpfil/common/Makefile @@ -1,6 +1,7 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netpfil/common +BINDIR= ${TESTSDIR} ATF_TESTS_SH+= \ @@ -16,6 +17,8 @@ ATF_TESTS_SH+= \ TEST_METADATA+= execenv="jail" TEST_METADATA+= execenv_jail_params="vnet allow.raw_sockets" +PROGS= divapp + ${PACKAGE}FILES+= \ utils.subr \ runner.subr \ diff --git a/tests/sys/netpfil/pf/divapp.c b/tests/sys/netpfil/common/divapp.c similarity index 99% rename from tests/sys/netpfil/pf/divapp.c rename to tests/sys/netpfil/common/divapp.c index 908c41eaa67f..f3e41f010fef 100644 --- a/tests/sys/netpfil/pf/divapp.c +++ b/tests/sys/netpfil/common/divapp.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. */ -/* Used by tests like divert-to.sh */ +/* Used by divert(4) related tests */ #include #include diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 38548336377a..7e701cb09c50 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -1,7 +1,6 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netpfil/pf -BINDIR= ${TESTSDIR} TESTS_SUBDIRS+= ioctl ATF_TESTS_SH+= altq \ @@ -62,8 +61,6 @@ ATF_TESTS_PYTEST+= sctp.py TEST_METADATA+= execenv="jail" TEST_METADATA+= execenv_jail_params="vnet allow.raw_sockets" -PROGS= divapp - ${PACKAGE}FILES+= CVE-2019-5597.py \ CVE-2019-5598.py \ daytime_inetd.conf \ diff --git a/tests/sys/netpfil/pf/divert-to.sh b/tests/sys/netpfil/pf/divert-to.sh index b27d321d7825..ae44cd5d51af 100644 --- a/tests/sys/netpfil/pf/divert-to.sh +++ b/tests/sys/netpfil/pf/divert-to.sh @@ -98,7 +98,7 @@ in_div_body() "pass all" \ "pass in inet proto icmp icmp-type echoreq divert-to 127.0.0.1 port 2000" - jexec div $(atf_get_srcdir)/divapp 2000 & + jexec div $(atf_get_srcdir)/../common/divapp 2000 & divapp_pid=$! # Wait for the divapp to be ready sleep 1 @@ -137,7 +137,7 @@ in_div_in_body() "pass all" \ "pass in inet proto icmp icmp-type echoreq divert-to 127.0.0.1 port 2000 no state" - jexec div $(atf_get_srcdir)/divapp 2000 divert-back & + jexec div $(atf_get_srcdir)/../common/divapp 2000 divert-back & divapp_pid=$! # Wait for the divapp to be ready sleep 1 @@ -177,7 +177,7 @@ out_div_body() "pass in inet proto icmp icmp-type echoreq no state" \ "pass out inet proto icmp icmp-type echorep divert-to 127.0.0.1 port 2000 no state" - jexec div $(atf_get_srcdir)/divapp 2000 & + jexec div $(atf_get_srcdir)/../common/divapp 2000 & divapp_pid=$! # Wait for the divapp to be ready sleep 1 @@ -217,7 +217,7 @@ out_div_out_body() "pass in inet proto icmp icmp-type echoreq no state" \ "pass out inet proto icmp icmp-type echorep divert-to 127.0.0.1 port 2000 no state" - jexec div $(atf_get_srcdir)/divapp 2000 divert-back & + jexec div $(atf_get_srcdir)/../common/divapp 2000 divert-back & divapp_pid=$! # Wait for the divapp to be ready sleep 1 @@ -271,9 +271,9 @@ in_div_in_fwd_out_div_out_body() "pass in inet proto icmp icmp-type echoreq divert-to 127.0.0.1 port 2001 no state" \ "pass out inet proto icmp icmp-type echoreq divert-to 127.0.0.1 port 2002 no state" - jexec router $(atf_get_srcdir)/divapp 2001 divert-back & + jexec router $(atf_get_srcdir)/../common/divapp 2001 divert-back & indivapp_pid=$! - jexec router $(atf_get_srcdir)/divapp 2002 divert-back & + jexec router $(atf_get_srcdir)/../common/divapp 2002 divert-back & outdivapp_pid=$! # Wait for the divappS to be ready sleep 1 @@ -322,9 +322,9 @@ in_dn_in_div_in_out_div_out_dn_out_body() "pass in inet proto icmp icmp-type echoreq divert-to 127.0.0.1 port 1001 no state" \ "pass out inet proto icmp icmp-type echorep divert-to 127.0.0.1 port 1002 no state" - jexec alcatraz $(atf_get_srcdir)/divapp 1001 divert-back & + jexec alcatraz $(atf_get_srcdir)/../common/divapp 1001 divert-back & indivapp_pid=$! - jexec alcatraz $(atf_get_srcdir)/divapp 1002 divert-back & + jexec alcatraz $(atf_get_srcdir)/../common/divapp 1002 divert-back & outdivapp_pid=$! # Wait for the divappS to be ready sleep 1 @@ -351,9 +351,9 @@ in_dn_in_div_in_out_div_out_dn_out_body() "pass in inet proto icmp icmp-type echoreq divert-to 127.0.0.1 port 2001 no state" \ "pass out inet proto icmp icmp-type echorep divert-to 127.0.0.1 port 2002 no state" - jexec alcatraz $(atf_get_srcdir)/divapp 2001 divert-back & + jexec alcatraz $(atf_get_srcdir)/../common/divapp 2001 divert-back & indivapp_pid=$! - jexec alcatraz $(atf_get_srcdir)/divapp 2002 divert-back & + jexec alcatraz $(atf_get_srcdir)/../common/divapp 2002 divert-back & outdivapp_pid=$! # Wait for the divappS to be ready sleep 1 From nobody Tue Oct 15 17:25: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 4XSgw45cnfz5YkJM; Tue, 15 Oct 2024 17:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgw44lTrz4Tpm; Tue, 15 Oct 2024 17:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mbb+wFd71pDmQDslR4LGds3OoNrED/tf6oU+3bgTY48=; b=gqJsx6N38cYVab0SGyIm4/bC0CS50bE9ot4YD1bLxft50kBUTLKhzr87KjMLTr00ANp6du 02M3KNR2Mf7/BBFo0sa1N0KeS7s2XxtjuvpGoo1wcrK3diFVTsadPuza3IavhS4tXm/GFl eGt0MNgONJTiEjpk9jxfXs11w2R9dV9Fe1hucPyUFkMQ+JyIf169gH7w8+Y6GMuS2sY0z4 G+rOlpUU9BR4MsBSw+npIHWNrppaqgN9FHV7bN6Q0lIMK1PB0u4w5Urd+wIFVPsHN3Zngt rcgttqW6j/cbnB0RhAc2sppyMzGqq5gLXJMDq3PiIoG1eUuiyOIhaKuYJyyTWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mbb+wFd71pDmQDslR4LGds3OoNrED/tf6oU+3bgTY48=; b=ozqc7Y8zefWkgKtnlyx9Ddpw/RtJ5w/ptu2LEdLqyusYvKrbpWZY/4e0lGganqPbPT+GSM iMEJ/oMK1JqYTlbQktqvmIL9N37ER7ZDIR+b9WzB7dULn/ztrLrRLrS+lo3xM7fwnbUNjR Cl/BdevBWc79K3oSvbhtW/fbHkS3wqY6Q1jZzo7tBwSBgEQ5uPCtC+scsfCDlDGg8EHl+H h/s3VUXnNQmQqTiKp3Ukn8QmLEjH0GMAGM4dTbaa+OsJgcY1HAlpgH9wOj2/FMSkahmDPy 2611DspVXcjoTV8qgdHR4S4wBrFZKaGDr+NJuDMYW2ZVfhAOZ0rsf7GRwW25xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729013108; a=rsa-sha256; cv=none; b=j9nTChie7WWDu2lcePZU7r2Jk+Hd7IlMJZLkoDB1ploxvM6gG/Hyg1wD8IlIblLBcXNu6T 2NhmTzTGm84roGBLvNrN2QMZfGUFtCvbqBgRal8wb5DCf46wdU77rsWetP309bu55QR57P 5WaxAeu7FbdfRpsdUpFS1T6v9AeoRWSQf4P5YLXma82HSzo3ot6HdPkvHNEK53uDqyBT6L DzruZP93fhR8KjQXyzPYLtKrGv03Cc7lZR+BNZuVQLJz7gmxAiI/eAoI2V2BabkLK7XbTB MIgksbOjoBr/c97WYqIuNNJZ/rVmd4aM0sa6xFvLm6feXbmyMlxWrvMrrRFH/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 4XSgw44LSDzX8C; Tue, 15 Oct 2024 17:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHP8tw027743; Tue, 15 Oct 2024 17:25:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHP8qs027740; Tue, 15 Oct 2024 17:25:08 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:25:08 GMT Message-Id: <202410151725.49FHP8qs027740@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: e1d2967ba630 - main - sys/conf: Support building kasan with gcc on arm64 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1d2967ba6309bba5a3d73ad637f43d0e33f71ec Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e1d2967ba6309bba5a3d73ad637f43d0e33f71ec commit e1d2967ba6309bba5a3d73ad637f43d0e33f71ec Author: Andrew Turner AuthorDate: 2024-09-27 15:23:57 +0000 Commit: Andrew Turner CommitDate: 2024-10-15 17:24:41 +0000 sys/conf: Support building kasan with gcc on arm64 - Remove -mllvm flags that don't exist in gcc - Set the shadow offset with -fasan-shadow-offset - Remove this when kasan is disabled as it's an error to use this when not building for kasan under gcc This allows the arm64 GENERIC-KASAN kernel to build with gcc13. Reviewed by: brooks Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45300 --- sys/conf/kern.pre.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 50a81a29d18d..d0a66ceceae2 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -95,13 +95,15 @@ COMPAT_FREEBSD32_ENABLED!= grep COMPAT_FREEBSD32 opt_global.h || true ; echo KASAN_ENABLED!= grep KASAN opt_global.h || true ; echo .if !empty(KASAN_ENABLED) SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kasan \ - -fsanitize=kernel-address \ - -mllvm -asan-stack=true \ + -fsanitize=kernel-address +.if ${COMPILER_TYPE} == "clang" +SAN_CFLAGS+= -mllvm -asan-stack=true \ -mllvm -asan-instrument-dynamic-allocas=true \ -mllvm -asan-globals=true \ -mllvm -asan-use-after-scope=true \ -mllvm -asan-instrumentation-with-call-threshold=0 \ -mllvm -asan-instrument-byval=false +.endif .if ${MACHINE_CPUARCH} == "aarch64" # KASAN/ARM64 TODO: -asan-mapping-offset is calculated from: @@ -111,7 +113,11 @@ SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kasan \ # KASAN_MIN_ADDRESS, and this offset value should eventually be # upstreamed similar to: https://reviews.llvm.org/D98285 # +.if ${COMPILER_TYPE} == "clang" SAN_CFLAGS+= -mllvm -asan-mapping-offset=0xdfff208000000000 +.else +SAN_CFLAGS+= -fasan-shadow-offset=0xdfff208000000000 +.endif .elif ${MACHINE_CPUARCH} == "amd64" && \ ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 180000 # Work around https://github.com/llvm/llvm-project/issues/87923, which leads to From nobody Tue Oct 15 17:25:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSgw567qDz5Ykn5; Tue, 15 Oct 2024 17:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgw55YcRz4Tpn; Tue, 15 Oct 2024 17:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1imtH5SHZUqkSNPsE9yircsV+auGrr7kwQ1y8O2cATA=; b=wEgGsEvoN008vcYnNA5tR7piOnsTo52DUbkM8vqrxzr+G+F7jY11M9CVcMI1zf3KH7ErkX wcHn0ZwTeRM26q1Ccm71vZlrmHqYruFpsTYTJCoyimmn3AmnMUXrC8hwwdboLuSdu3cArT CcWguZj5hRoWQi04v//YRc8wzSLl05OSSGIBGUywImZCShH+sGxaZ8MF5LUKxjWsXQKZuh 6v7l2X4UHfT5oEk6JIYkFRFQfo9uZ254RyxaQLuJz7U8FVEhd1MZ94QOEdIweoGDLnXW8a c23Lo6/tvEsEQezVTOWToW40ywezVrAa1dF4VjiCuIhrsCHn/eLNe4FAveRHIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1imtH5SHZUqkSNPsE9yircsV+auGrr7kwQ1y8O2cATA=; b=DvnTjmoa+6UaBp7Hm1lG0wOQMO0d0ra88ozPbonircnPwxhDns4Xrds7qEh9p8Mqy2FJrD Ra6gznyRFR/Uot7gWNkqN1oeqQjclcApwrhBsMio8WTky9vdXkNd6GEEicaihfPXnj01Nr ZFzmKe3swZUgUXNmXfhP04DXGZSHkjDqq2NJYQTKjm6g0XDl0uoEMU0jIAb796qXbfhJj7 nK4cwjHf3bN7R0UwX/tt9qi3noAxGsXTKW128bvVBfg9Wsanc7kjNZR26LWxqboVaqFKFH B4WdMDBdu8t+GKeBK1JhUf/weSSXRchBg4s/5lFcQ9/Zpua4g5cfahqSjn1GRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729013109; a=rsa-sha256; cv=none; b=N0uTywmdy4qJbciEjQNNHl+4JWFXuLeS8e+VVhFtEOqLbfsxdSHcs10Fj/8aDQX+95nKIP TlwT+7SngXpzplJUr2QXBWDlT1KmXV+8HMtDAyfpNIvIZfSYmIvd57S5Nzyh7nRqvcnQpK wfQbsxUql4eP45YVEjs5iUGx8UhkRV17cVkXGWxNu6HyiExIR27E2FJ1XcPP/uUuxfXiVJ t40w+osarCc9sdMwzideEYwYL1AkWbfj4PJ2fzUAoCCAW81pyTJwU4U0NLoOKAvWtXotAT 5x/7ZuXkO6Gffv9iHGYszCr8F4LIiLrp/3oZ1tbupQ4O0U/j83blTSuYUnkg5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgw559F1zWR3; Tue, 15 Oct 2024 17:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHP9mT027811; Tue, 15 Oct 2024 17:25:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHP95j027808; Tue, 15 Oct 2024 17:25:09 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:25:09 GMT Message-Id: <202410151725.49FHP95j027808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: e4c3536138f4 - main - dev/psci: Create macros to simplify calling SMCCC 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4c3536138f4a314dc26331b0a1488faae09aaf4 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e4c3536138f4a314dc26331b0a1488faae09aaf4 commit e4c3536138f4a314dc26331b0a1488faae09aaf4 Author: Andrew Turner AuthorDate: 2024-10-14 14:33:44 +0000 Commit: Andrew Turner CommitDate: 2024-10-15 17:24:41 +0000 dev/psci: Create macros to simplify calling SMCCC When calling into SMCCC functions we often only need a few arguments. As the current function needs all 8 possible arguments to be set the unused values will be zero. Create a macro to pass in the used values, followed by enough zeros, then the result pointer. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D46986 --- sys/dev/psci/smccc.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/sys/dev/psci/smccc.h b/sys/dev/psci/smccc.h index 96527f037d78..dd10fb8018ae 100644 --- a/sys/dev/psci/smccc.h +++ b/sys/dev/psci/smccc.h @@ -91,6 +91,38 @@ int arm_smccc_smc(register_t, register_t, register_t, register_t, register_t, int arm_smccc_hvc(register_t, register_t, register_t, register_t, register_t, register_t, register_t, register_t, struct arm_smccc_res *res); +#define arm_smccc_invoke_1(func, a0, res) \ + func(a0, 0, 0, 0, 0, 0, 0, 0, res) +#define arm_smccc_invoke_2(func, a0, a1, res) \ + func(a0, a1, 0, 0, 0, 0, 0, 0, res) +#define arm_smccc_invoke_3(func, a0, a1, a2, res) \ + func(a0, a1, a2, 0, 0, 0, 0, 0, res) +#define arm_smccc_invoke_4(func, a0, a1, a2, a3, res) \ + func(a0, a1, a2, a3, 0, 0, 0, 0, res) +#define arm_smccc_invoke_5(func, a0, a1, a2, a3, a4, res) \ + func(a0, a1, a2, a3, a4, 0, 0, 0, res) +#define arm_smccc_invoke_6(func, a0, a1, a2, a3, a4, a5, res) \ + func(a0, a1, a2, a3, a4, a5, 0, 0, res) +#define arm_smccc_invoke_7(func, a0, a1, a2, a3, a4, a5, a6, res) \ + func(a0, a1, a2, a3, a4, a5, a6, 0, res) +#define arm_smccc_invoke_8(func, a0, a1, a2, a3, a4, a5, a6, a7, res) \ + func(a0, a1, a2, a3, a4, a5, a6, a7, res) + +#define _arm_smccc_invoke_macro(_1, _2, _3, _4, _5, _6, _7, _8, NAME, ...) \ + NAME +#define _arm_smccc_invoke(func, a0, ...) \ + _arm_smccc_invoke_macro(__VA_ARGS__, arm_smccc_invoke_8, \ + arm_smccc_invoke_7, arm_smccc_invoke_6, arm_smccc_invoke_5, \ + arm_smccc_invoke_4, arm_smccc_invoke_3, arm_smccc_invoke_2, \ + arm_smccc_invoke_1)(func, a0, __VA_ARGS__) + +#define arm_smccc_invoke_hvc(a0, ...) \ + _arm_smccc_invoke(arm_smccc_hvc, a0, __VA_ARGS__) +#define arm_smccc_invoke_smc(a0, ...) \ + _arm_smccc_invoke(arm_smccc_smc, a0, __VA_ARGS__) +#define arm_smccc_invoke(a0, ...) \ + _arm_smccc_invoke(psci_callfn, a0, __VA_ARGS__) + struct arm_smccc_1_2_regs { register_t a0; register_t a1; From nobody Tue Oct 15 17:25:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSgw70FMqz5Ykn7; Tue, 15 Oct 2024 17:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgw66H0pz4V13; Tue, 15 Oct 2024 17:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=20TeoGnRuWmbRwje+YZ7BYPy0uR9hdK+/BlK8gnWLpQ=; b=N9dtuns8RDUFp9Vg9SRhTkcGobbokrdwj31J70JzZGf2uXq7sR66nbbsxoU3uxWoi6F2YI pzRbsh4q3sC/QCOBUQP7RycH/BTmkd9MvRPAt3Mjxwxnbd8XQ/2Ulpmz/LqbxUdWP0n0OB nsWiyJOhYgNIDbMoz6ZVIhSQa6D2liFdPrbff6wCYWHnwVO8N85CttWJP3I0XxdXMPSzSm ukUlJKCaiuvK4p7GhAZoeq/o6rFmeAboe1G7eyzDjXz7DRCH/6cMJrcbCXdmC3GOHdl1Qz 90sqZqcbrXTxVQL4lNLjRwI1f9hGuc7JV+ruH+aITz5sJdSwaic8qOE7kuphug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=20TeoGnRuWmbRwje+YZ7BYPy0uR9hdK+/BlK8gnWLpQ=; b=O2rUxzWpY1KM+c5+gZow78jhhUrJaRsu/qSBDOB2xMsIJaXErMOvFzEEvyv0iJdM996Yp6 X9uFQXIman9OPPVj9vtqppCu55mf2wsg3+aopiW2MZ/8f7eoG/+5kXeJMAs8F3jCXkxCWh KSyVhBld09YTqGK8Ne+1XAtDeN0fX/2sC4WwN1u6LfqibaqHgzHtYrFq2DbiufrDGaG6o4 1DAGVtnl40r/KKtwBB/qNusaqD5DWL1rRLctigXeoMvocy3j00A7NYy/UYcBt/lbvNydeo n8NHgGt6A3FSncwfqPKjHhnBu2N6sZswvSub2tdNrJtgWZ4QRBP0qJ/nh1mn1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729013110; a=rsa-sha256; cv=none; b=hG7cH5QwsE8ac/ZqfccN2GF64MuntBkbN2eD/X4pVHp+tSMi9hAS5vEeonJOc25YMG1EgN XCYEcb7QqG4MMVSgiF9EbvKTMcyxqOgku5hEgxrebb4gy/BJsneCwtgXKUPkg4FC+QlsLs HMdDjLc4U2O9RFrCAkZHSY2WBbMAnNXqUnt2UpSTwkshmo78nSEu6zYoa9nrbRqEPX3Sit UooQ88rXhp3tH1LLdHG1UcJSGVKWF1QjyTgJzT4FRIodzM3O+HXaLCKFoiJiVfHaGBxV6Y DI7zrvf0AnRuVHt0t4LOcTDDszVIkz4vwcyummFs185TTitBfWyDEgEL6NN+uQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgw65tnKzWLN; Tue, 15 Oct 2024 17:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHPACL027858; Tue, 15 Oct 2024 17:25:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHPArt027855; Tue, 15 Oct 2024 17:25:10 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:25:10 GMT Message-Id: <202410151725.49FHPArt027855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: b9cd72b06d79 - main - sys: Use the new arm_smccc_invoke macros 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9cd72b06d795a8c7b39df1f520e866ad7f11aa8 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b9cd72b06d795a8c7b39df1f520e866ad7f11aa8 commit b9cd72b06d795a8c7b39df1f520e866ad7f11aa8 Author: Andrew Turner AuthorDate: 2024-10-14 14:33:51 +0000 Commit: Andrew Turner CommitDate: 2024-10-15 17:24:41 +0000 sys: Use the new arm_smccc_invoke macros Simplify the calls into the SMCCC firmware with the new arm_smccc_invoke* macros. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D46987 --- sys/arm/qualcomm/qcom_scm_legacy.c | 4 ++-- sys/arm64/nvidia/tegra210/tegra210_pmc.c | 4 ++-- sys/dev/firmware/arm/scmi_smc.c | 2 +- sys/dev/firmware/xilinx/zynqmp_firmware.c | 2 +- sys/dev/hyperv/vmbus/aarch64/hyperv_machdep.c | 7 +++---- sys/dev/pci/pci_host_generic_den0115.c | 14 ++++++-------- sys/dev/psci/smccc.c | 6 +++--- 7 files changed, 18 insertions(+), 21 deletions(-) diff --git a/sys/arm/qualcomm/qcom_scm_legacy.c b/sys/arm/qualcomm/qcom_scm_legacy.c index f1566264f00c..b614843b1ce8 100644 --- a/sys/arm/qualcomm/qcom_scm_legacy.c +++ b/sys/arm/qualcomm/qcom_scm_legacy.c @@ -73,8 +73,8 @@ qcom_scm_legacy_mp_set_cold_boot_address(vm_offset_t mp_entry_func) | QCOM_SCM_FLAG_COLDBOOT_CPU3; uint32_t scm_arg2 = pmap_kextract((vm_offset_t)mp_entry_func); - ret = arm_smccc_smc(scm_arg0, (uint32_t) &context_id, scm_arg1, - scm_arg2, 0, 0, 0, 0, &res); + ret = arm_smccc_invoke_smc(scm_arg0, (uint32_t) &context_id, scm_arg1, + scm_arg2, &res); if (ret == 0 && res.a0 == 0) return (0); diff --git a/sys/arm64/nvidia/tegra210/tegra210_pmc.c b/sys/arm64/nvidia/tegra210/tegra210_pmc.c index 0f0343a317ce..b8b95ca32c40 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_pmc.c +++ b/sys/arm64/nvidia/tegra210/tegra210_pmc.c @@ -190,7 +190,7 @@ WR4(struct tegra210_pmc_softc *sc, bus_size_t r, uint32_t v) struct arm_smccc_res res; if (sc->secure_access) { - arm_smccc_smc(PMC_SMC, PMC_SMC_WRITE, r, v, 0, 0, 0, 0, &res); + arm_smccc_invoke_smc(PMC_SMC, PMC_SMC_WRITE, r, v, &res); if (res.a0 != 0) device_printf(sc->dev," PMC SMC write failed: %lu\n", res.a0); @@ -205,7 +205,7 @@ RD4(struct tegra210_pmc_softc *sc, bus_size_t r) struct arm_smccc_res res; if (sc->secure_access) { - arm_smccc_smc(PMC_SMC, PMC_SMC_READ, r, 0, 0, 0, 0, 0, &res); + arm_smccc_invoke_smc(PMC_SMC, PMC_SMC_READ, r, &res); if (res.a0 != 0) device_printf(sc->dev," PMC SMC write failed: %lu\n", res.a0); diff --git a/sys/dev/firmware/arm/scmi_smc.c b/sys/dev/firmware/arm/scmi_smc.c index a1621ccffa86..9f0d899233fa 100644 --- a/sys/dev/firmware/arm/scmi_smc.c +++ b/sys/dev/firmware/arm/scmi_smc.c @@ -106,7 +106,7 @@ scmi_smc_xfer_msg(device_t dev, struct scmi_msg *msg) if (ret != 0) return (ret); - arm_smccc_smc(sc->smc_id, 0, 0, 0, 0, 0, 0, 0, NULL); + arm_smccc_invoke_smc(sc->smc_id, NULL); return (0); } diff --git a/sys/dev/firmware/xilinx/zynqmp_firmware.c b/sys/dev/firmware/xilinx/zynqmp_firmware.c index 8ee6c9a21377..a6b55a3528a1 100644 --- a/sys/dev/firmware/xilinx/zynqmp_firmware.c +++ b/sys/dev/firmware/xilinx/zynqmp_firmware.c @@ -105,7 +105,7 @@ zynqmp_call_smc(uint32_t id, uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, args[0] = id | PM_SIP_SVC; args[1] = ((uint64_t)a1 << 32) | a0; args[2] = ((uint64_t)a3 << 32) | a2; - arm_smccc_smc(args[0], args[1], args[2], 0, 0, 0, 0, 0, &res); + arm_smccc_invoke_smc(args[0], args[1], args[2], &res); if (payload != NULL) { payload[0] = res.a0 & 0xFFFFFFFF; payload[1] = res.a0 >> 32; diff --git a/sys/dev/hyperv/vmbus/aarch64/hyperv_machdep.c b/sys/dev/hyperv/vmbus/aarch64/hyperv_machdep.c index dbb6aac2de31..e808cc081535 100644 --- a/sys/dev/hyperv/vmbus/aarch64/hyperv_machdep.c +++ b/sys/dev/hyperv/vmbus/aarch64/hyperv_machdep.c @@ -50,10 +50,10 @@ void arm_hv_set_vreg(u32 msr, u64 value) { - arm_smccc_hvc(HV_FUNC_ID, + arm_smccc_invoke_hvc(HV_FUNC_ID, HVCALL_SET_VP_REGISTERS | HV_HYPERCALL_FAST_BIT | HV_HYPERCALL_REP_COMP_1, - HV_PARTITION_ID_SELF, HV_VP_INDEX_SELF, msr, 0, value, 0, NULL); + HV_PARTITION_ID_SELF, HV_VP_INDEX_SELF, msr, 0, value, NULL); } void @@ -95,8 +95,7 @@ hypercall_md(volatile void *hc_addr, uint64_t in_val, uint64_t in_paddr, { struct arm_smccc_res res; - arm_smccc_hvc(HV_FUNC_ID, in_val, in_paddr, out_paddr, 0, 0, 0, 0, - &res); + arm_smccc_invoke_hvc(HV_FUNC_ID, in_val, in_paddr, out_paddr, &res); return (res.a0); } diff --git a/sys/dev/pci/pci_host_generic_den0115.c b/sys/dev/pci/pci_host_generic_den0115.c index cfef34824965..a14fe84039fe 100644 --- a/sys/dev/pci/pci_host_generic_den0115.c +++ b/sys/dev/pci/pci_host_generic_den0115.c @@ -124,8 +124,7 @@ pci_host_acpi_smccc_has_feature(uint32_t pci_func_id) { struct arm_smccc_res result; - if (psci_callfn(SMCCC_PCI_FEATURES, pci_func_id, 0, 0, 0, 0, 0, 0, - &result) < 0) { + if (arm_smccc_invoke(SMCCC_PCI_FEATURES, pci_func_id, &result) < 0) { return (false); } @@ -137,7 +136,7 @@ pci_host_acpi_smccc_pci_version(uint32_t *versionp) { struct arm_smccc_res result; - if (psci_callfn(SMCCC_PCI_VERSION, 0, 0, 0, 0, 0, 0, 0, &result) < 0) { + if (arm_smccc_invoke(SMCCC_PCI_VERSION, &result) < 0) { return (false); } @@ -185,8 +184,8 @@ pci_host_acpi_smccc_attach(device_t dev) return (error); if (pci_host_acpi_smccc_has_feature(SMCCC_PCI_GET_SEG_INFO) && - psci_callfn(SMCCC_PCI_GET_SEG_INFO, sc->base.ecam, 0, 0, 0, 0, 0, - 0, &result) == SMCCC_RET_SUCCESS) { + arm_smccc_invoke(SMCCC_PCI_GET_SEG_INFO, sc->base.ecam, + &result) == SMCCC_RET_SUCCESS) { start = SMCCC_PCI_SEG_START(result.a1); end = SMCCC_PCI_SEG_END(result.a1); @@ -215,8 +214,7 @@ pci_host_acpi_smccc_read_config(device_t dev, u_int bus, u_int slot, return (~0U); addr = (sc->base.ecam << 16) | (bus << 8) | (slot << 3) | (func << 0); - if (psci_callfn(SMCCC_PCI_READ, addr, reg, bytes, 0, 0, 0, 0, - &result) < 0) { + if (arm_smccc_invoke(SMCCC_PCI_READ, addr, reg, bytes, &result) < 0) { return (~0U); } @@ -240,7 +238,7 @@ pci_host_acpi_smccc_write_config(device_t dev, u_int bus, u_int slot, return; addr = (sc->base.ecam << 16) | (bus << 8) | (slot << 3) | (func << 0); - psci_callfn(SMCCC_PCI_WRITE, addr, reg, bytes, val, 0, 0, 0, &result); + arm_smccc_invoke(SMCCC_PCI_WRITE, addr, reg, bytes, val, &result); } static device_method_t generic_pcie_acpi_smccc_methods[] = { diff --git a/sys/dev/psci/smccc.c b/sys/dev/psci/smccc.c index 08ad6d84fc3c..21a6bd54e650 100644 --- a/sys/dev/psci/smccc.c +++ b/sys/dev/psci/smccc.c @@ -81,7 +81,7 @@ smccc_arch_features(uint32_t smccc_func_id) if (smccc_version == SMCCC_VERSION_1_0) return (PSCI_RETVAL_NOT_SUPPORTED); - return (psci_call(SMCCC_ARCH_FEATURES, smccc_func_id, 0, 0)); + return (arm_smccc_invoke(SMCCC_ARCH_FEATURES, smccc_func_id, NULL)); } /* @@ -95,7 +95,7 @@ smccc_arch_workaround_1(void) MPASS(smccc_version != 0); KASSERT(smccc_version != SMCCC_VERSION_1_0, ("SMCCC arch workaround 1 called with an invalid SMCCC interface")); - return (psci_call(SMCCC_ARCH_WORKAROUND_1, 0, 0, 0)); + return (arm_smccc_invoke(SMCCC_ARCH_WORKAROUND_1, NULL)); } int @@ -105,5 +105,5 @@ smccc_arch_workaround_2(int enable) MPASS(smccc_version != 0); KASSERT(smccc_version != SMCCC_VERSION_1_0, ("SMCCC arch workaround 2 called with an invalid SMCCC interface")); - return (psci_call(SMCCC_ARCH_WORKAROUND_2, enable, 0, 0)); + return (arm_smccc_invoke(SMCCC_ARCH_WORKAROUND_2, enable, NULL)); } From nobody Tue Oct 15 17:25:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSgw82LzDz5YknB; Tue, 15 Oct 2024 17:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgw80C68z4TqB; Tue, 15 Oct 2024 17:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bzVuSntQMEj2aA/qo/H6QpqjOHaj1S/lq8xXRkAAIMQ=; b=SGEO4Uu9Sir+92MZe2rzBbJtrgag6Xa4vq+79hJnoNtIAPR7fyPB/j11BzI9wNeVEaHffx D2r0Sro/gTd7VI/rJzqu6Moce1Lx64nwKz8sVg2AcmuxvH5j9CCqG0U2sM+AKnr45hPEZF zsfJkfd7VX65HojmLGHRQ8RZbbq0E8kJ2/1RahiTZ7FGvbeuSdNNSzVaaXP1Y/WSHyVoNw 6EvLCcU+2YQJ56GhX+jGUSAO0L5DYrGqjIPeZN3eTTByg1FIGOlqUFU+3vuS+MjZsUQvHL c+SIHjtk8XQakdZREy4Q4+emI1jzWtO6Qt8a1V+pwZiX4CxvVZmkVt0+ukWZlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bzVuSntQMEj2aA/qo/H6QpqjOHaj1S/lq8xXRkAAIMQ=; b=rV1Qr9knfzZ0DU1uqhGgFT4w99kgR7pBwMGp9nqTLFka22gVcbvz36V+aHM4VqcB3prU9y j3iMUrGnDIr0xlimPsl0kz5Sa/nLpYnPHW0wnBhZgiaVNS+pcocjLlRl4FM0zkvVi9oqUf +J+7siVR8mtbDnpXsved8KGzHXIj9lerQYO5r39UKfyWVCtqW/zv++yg/OmtGnVlxwfv9M GsUFtKtsSC/G7JgQPPuHyaxHLsmATduYRw4ehpZBJNqGNVVW3z+Va1h1vEr5N4EdzpMwiW G+dOdqlLtRu3uhdtu1IsjXFgIBvEEFneXriYPUNxr7ll5/QGtzy25+fH6Paokw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729013112; a=rsa-sha256; cv=none; b=D7+90bu1NBh04Vn7oJmpkjs06uv7LYsObb2FkYcEbgCBfReXvZ6XqkecF+luLsqQw5g2W6 /2oDyg3T4414bDanavtTkezz/JfN4jcJzo1VKxuqK3lfD3aS+hpy2ObGHE4r1u8bevO2lM OVarYbRizHMCsxvmz5xKmXCiOR5jgf3X71SeLMZW8RCEQhTBtcU+fbTwQt03Xdq0P9giTv n4w3TM1GeZbB9P9Zybr95DQOwrcmc+BuGtu6PSRRvtj3aQKnXJRAevg7keBrqp33kOR+69 HjOdz9YU+Z/uRXQQPvKuKhk3uN2nNik0Yq4yESNyBAJEP4S51tf9ccFcPzQjKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgw76xmHzW5X; Tue, 15 Oct 2024 17:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHPBkj027909; Tue, 15 Oct 2024 17:25:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHPBK8027906; Tue, 15 Oct 2024 17:25:11 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:25:11 GMT Message-Id: <202410151725.49FHPBK8027906@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 3e19edca9eb1 - main - dev/psci: Make SMCCC into a real 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e19edca9eb1402afe330cb1d9d562dedca2d95a Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=3e19edca9eb1402afe330cb1d9d562dedca2d95a commit 3e19edca9eb1402afe330cb1d9d562dedca2d95a Author: Andrew Turner AuthorDate: 2024-10-14 14:33:59 +0000 Commit: Andrew Turner CommitDate: 2024-10-15 17:24:42 +0000 dev/psci: Make SMCCC into a real driver This will be used by other drivers that manage SMCCC firmware services to use as an attachment point. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D46988 --- sys/dev/psci/psci.c | 10 ++++++++-- sys/dev/psci/smccc.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/sys/dev/psci/psci.c b/sys/dev/psci/psci.c index 3211c331ed6e..e445e90956ac 100644 --- a/sys/dev/psci/psci.c +++ b/sys/dev/psci/psci.c @@ -71,6 +71,7 @@ struct psci_softc { device_t dev; + device_t smccc_dev; uint32_t psci_version; uint32_t psci_fnids[PSCI_FN_MAX]; @@ -341,11 +342,16 @@ psci_attach(device_t dev, psci_initfn_t psci_init, int default_version) if (psci_init(dev, default_version)) return (ENXIO); + psci_softc = sc; + #ifdef __aarch64__ smccc_init(); -#endif + sc->smccc_dev = device_add_child(dev, "smccc", DEVICE_UNIT_ANY); + if (sc->smccc_dev == NULL) + device_printf(dev, "Unable to add SMCCC device\n"); - psci_softc = sc; + bus_generic_attach(dev); +#endif return (0); } diff --git a/sys/dev/psci/smccc.c b/sys/dev/psci/smccc.c index 21a6bd54e650..0cd3255fc911 100644 --- a/sys/dev/psci/smccc.c +++ b/sys/dev/psci/smccc.c @@ -34,7 +34,9 @@ #include #include +#include #include +#include #include #include @@ -66,6 +68,32 @@ smccc_init(void) } } +static int +smccc_probe(device_t dev) +{ + int32_t version; + + /* + * If the version is not implemented then we treat it as SMCCC 1.0 + */ + if (psci_features(SMCCC_VERSION) == PSCI_RETVAL_NOT_SUPPORTED || + (version = arm_smccc_invoke(SMCCC_VERSION, NULL)) <= 0) { + device_set_desc(dev, "ARM SMCCC v1.0"); + return (0); + } + + device_set_descf(dev, "ARM SMCCC v%d.%d", SMCCC_VERSION_MAJOR(version), + SMCCC_VERSION_MINOR(version)); + + return (0); +} + +static int +smccc_attach(device_t dev) +{ + return (bus_generic_attach(dev)); +} + uint32_t smccc_get_version(void) { @@ -107,3 +135,21 @@ smccc_arch_workaround_2(int enable) ("SMCCC arch workaround 2 called with an invalid SMCCC interface")); return (arm_smccc_invoke(SMCCC_ARCH_WORKAROUND_2, enable, NULL)); } + +static device_method_t smccc_methods[] = { + DEVMETHOD(device_probe, smccc_probe), + DEVMETHOD(device_attach, smccc_attach), + + DEVMETHOD(bus_add_child, bus_generic_add_child), + + DEVMETHOD_END +}; + +static driver_t smccc_driver = { + "smccc", + smccc_methods, + 0, +}; + +EARLY_DRIVER_MODULE(smccc, psci, smccc_driver, 0, 0, + BUS_PASS_CPU + BUS_PASS_ORDER_FIRST); From nobody Tue Oct 15 17:25:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSgw95FW4z5YkxH; Tue, 15 Oct 2024 17:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgw921Kcz4V3y; Tue, 15 Oct 2024 17:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cyhI2cft2wUS0I3cY8g5QcE0NOTT+cu5xOj88ERbFQc=; b=iGjntkDQcuDTcFTcKseijBIzMD9Vaz/Ij1kgiV1iWAsm9qz2nOrdIj+yzjxZQCa4+3nX+3 CU6x+xTGUsXgun90LwECUM9rF8CIW3STg0UCWLq56OT1O42HQ+zdSEEkoX75DxtuaoMuQC dGyw7uuL8KfmUgiZkZepadk0MMUhQW0v9hih5b6qKALKfaHMZl+oLCzy7BpDwbfu56j45p BOixxkoN8USlgykvVvQbJJh9v76VEsK7Sc+JngTzDnxFvp87gzEvPHfVtANz2W8Od//vBl QzswA+Fu5XTgoRFXkDJmUrIFnnlxBkgIO0YGihwNL83wku2XxMJZ0vDiiKt9XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cyhI2cft2wUS0I3cY8g5QcE0NOTT+cu5xOj88ERbFQc=; b=WYnH/5Jmlru6HefWr75CYMPrJ3FrfGnVAWKHHlGqoWuotsFJtwo0J3tu3d4espb1Sj35SS r0S1MxWN8DiF2ToskG+ay1PL1fWt8yRdQWncAeAlS9UXABriipsPflIFiYWLXUTdwBGk/Y HdPytOFdHU4ryM2Db9ayChq9yVSznbO0GgEt673h0ywAKqOUMk1UYrZiR3LxYygYJrTnGF 3lB+8hF4o4e8wpogaBRmvtSMdzgMpJErEUk7h7P+IHeur5Vv+SjYxmCZN5gCpJ1iKMUKvk bQLxRHxj3ilLsz4UQfMZPyMq8gC3xOYDu7oHqXNaH+v+MqF9SdWCi8c3eUmNKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729013113; a=rsa-sha256; cv=none; b=pt4NrwqwI0ikEo2N9yT6umB4NOkDfu/D2g+wQgM4ursqpOG7enK/dSCtw9Tk7EYN6N9uGU 1qUfY2zbgr4/3IuFbHbp7xjS79jFfKRymcTpQ0Yh2Szv1plHzF01c48UgDi2/Y1u0w5Xdj qe3tNX4OlussbCcHc1FjfkxrSaVL0SFKC+8IzFe79SJxDQ6vThAqhk0fIwWYu/Fb5w6olA prYw8mNBXOKAduwWjEbqGXCao8oi505EjQtL9RPzL77mxV7Ip0pyqtsH7yCQdqNyEWKMqY fCYdMlxzWRuRZn48g0ZjVN1kUzVNhzK7CsFyXZDal1JdyS4KxDQviyfmuZUcIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgw90ftyzWR4; Tue, 15 Oct 2024 17:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHPCGm027945; Tue, 15 Oct 2024 17:25:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHPCvV027942; Tue, 15 Oct 2024 17:25:12 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:25:12 GMT Message-Id: <202410151725.49FHPCvV027942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 511ae023fb33 - main - dev/psci: Add SMCCC_MAKE_VERSION 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 511ae023fb33f9e354b5e57b8db7c9c93a43be6b Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=511ae023fb33f9e354b5e57b8db7c9c93a43be6b commit 511ae023fb33f9e354b5e57b8db7c9c93a43be6b Author: Andrew Turner AuthorDate: 2024-10-14 14:34:06 +0000 Commit: Andrew Turner CommitDate: 2024-10-15 17:24:42 +0000 dev/psci: Add SMCCC_MAKE_VERSION This will be used to create an integer with a given version. It can then be used to check if the SMCCC version is late enough for a driver. Sponsored by: Arm Ltd --- sys/dev/psci/smccc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/psci/smccc.h b/sys/dev/psci/smccc.h index dd10fb8018ae..b9e878d7c8ea 100644 --- a/sys/dev/psci/smccc.h +++ b/sys/dev/psci/smccc.h @@ -32,6 +32,7 @@ #ifndef _PSCI_SMCCC_H_ #define _PSCI_SMCCC_H_ +#define SMCCC_MAKE_VERSION(maj, min) ((maj) << 16 | (min)) #define SMCCC_VERSION_MAJOR(ver) (((ver) >> 16) & 0x7fff) #define SMCCC_VERSION_MINOR(ver) ((ver) & 0xffff) From nobody Tue Oct 15 17:25:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSgwB3pJBz5YkrD; Tue, 15 Oct 2024 17:25:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgwB1ltDz4V69; Tue, 15 Oct 2024 17:25:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZUWUCiH31no82qCxI3gw3Llej3Ae9/QgXVhQLa2lB60=; b=WHWWZYmfqfUoOvWH4Uqo8ZDS52Q/i21bewhVFNMQGftd05dT/s0599ohbZGG7ZC/vG1uuw LW7kfmeoyZ+PMTnAu6BTj9mzHJaSaK0fdo8jMtggruLI5pXp5MqR8+DpHL/tL0CYBkacTe GsK/eOM50/FBdebdpGVCILHBWYoUvxajSUX00WL++00c/fX6m4XVgOzJRzy1eFYtC4Yv1F p0x7i/xdgQdU3EdyNgeAEVeXJBN4u5D4pVgz5gneR99fx+3qIkxk3B8lGaNP1EVOfDcLut Tj/pnEMBGArwayDkJbbZhNAPv3YuF/TaOcKhDHuDnNzGuQTVgIIdFDXUFcq0IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZUWUCiH31no82qCxI3gw3Llej3Ae9/QgXVhQLa2lB60=; b=EJtH7Mk1PowxkZEwbYz6SYpd4V7J6Gi6WJQvow/lXVmX93ir+Fz8tVhomcSJB1y3sq5H5z x67prxj80o36l/gopfPseWY8+vfTjvs6Y+J3oiidpCCQqcInSHoo+cZjVMKzOsGxFsbk6g k4U9yd/30H7QNcwC6Ixh1pmGC/RTa8CecJkzqO7QJMeuy5VmzgglGXwewihyaWqXN5ZlHj Gb0G70tIteJfJasLg1TMP8N34E3S2hUsmwB7p/4GUnYSByGoFmv8fDXQvp2x5I/BrpM2RP RAR2HlIgVuvTgSsNaZNrKwRxEftmA3lsK8/E1l6nKIj0RdYuln02EwZVIGecBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729013114; a=rsa-sha256; cv=none; b=SE0MkekI+1V9gOjZfOfDI88ymQien6DFGKeZcmtAlHtLgnr5iMfigNoN99Jdoq/zxhl0o/ XHoAUL4s9ZZ9eUENM+ewZEeWqAsgt140OSVtlxOI6RFyN9RLiGlVCg0BHjFYNSOxeCR+pc tAIIjfHxahG9q0z/kVv8RDuyM/xZ89lDqjodcRCzukO5TQwZ8bV6Z80GYFsyPREIaEge/x DYASMqOB8KcFPkyzD4GAoo8qW1g6M6tnkD8JFNmaxzojvOMKduMipgySg1FBM3GHUzmVsD bwRoTOKJ5ZwwR5mLR7bFWxPz5MiobJiacpYZSKSiAO5wgk8uVVPhumieVCUo7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgwB1NKGzW5Y; Tue, 15 Oct 2024 17:25:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHPEaa027996; Tue, 15 Oct 2024 17:25:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHPEB5027993; Tue, 15 Oct 2024 17:25:14 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:25:14 GMT Message-Id: <202410151725.49FHPEB5027993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: b2f8b2dc8736 - main - sys: Add an SMCCC Random Number Generator 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2f8b2dc87368d3f0a99865b2df13f5ad79f763a Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b2f8b2dc87368d3f0a99865b2df13f5ad79f763a commit b2f8b2dc87368d3f0a99865b2df13f5ad79f763a Author: Andrew Turner AuthorDate: 2024-10-14 14:34:13 +0000 Commit: Andrew Turner CommitDate: 2024-10-15 17:24:42 +0000 sys: Add an SMCCC Random Number Generator driver The Arm True Random Number Generator Firmware Interface provides a way to query the SMCCC firmware for up to 192 bits of entropy. Use it to provide another source of randomness to the kernel. Reviewed by: cem, markm Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D46989 --- sys/conf/files.arm64 | 1 + sys/dev/psci/smccc_trng.c | 143 +++++++++++++++++++++++++++++++++++++++ sys/dev/random/random_harvestq.c | 1 + sys/sys/random.h | 1 + 4 files changed, 146 insertions(+) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 9c435405e1e9..16d70e1addb6 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -418,6 +418,7 @@ dev/pci/pci_dw_if.m optional pci fdt dev/psci/psci.c standard dev/psci/smccc_arm64.S standard +dev/psci/smccc_trng.c standard dev/psci/smccc.c standard dev/pwm/controller/allwinner/aw_pwm.c optional fdt aw_pwm diff --git a/sys/dev/psci/smccc_trng.c b/sys/dev/psci/smccc_trng.c new file mode 100644 index 000000000000..67939f3422fa --- /dev/null +++ b/sys/dev/psci/smccc_trng.c @@ -0,0 +1,143 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Arm Ltd + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * A driver for the Arm True Random Number Generator Firmware Interface. + * This queries into the SMCCC firmware for random numbers using the + * interface documented in den0098 [1]. + * + * [1] https://developer.arm.com/documentation/den0098/latest + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#define TRNG_VERSION SMCCC_FUNC_ID(SMCCC_FAST_CALL, \ + SMCCC_32BIT_CALL, SMCCC_STD_SECURE_SERVICE_CALLS, 0x50) +#define TRNG_VERSION_MIN 0x10000L +#define TRNG_RND64 SMCCC_FUNC_ID(SMCCC_FAST_CALL, \ + SMCCC_64BIT_CALL, SMCCC_STD_SECURE_SERVICE_CALLS, 0x53) + +static device_identify_t trng_identify; +static device_probe_t trng_probe; +static device_attach_t trng_attach; + +static unsigned trng_read(void *, unsigned); + +static struct random_source random_trng = { + .rs_ident = "Arm SMCCC TRNG", + .rs_source = RANDOM_PURE_ARM_TRNG, + .rs_read = trng_read, +}; + +static void +trng_identify(driver_t *driver, device_t parent) +{ + int32_t version; + + /* TRNG depends on SMCCC 1.1 (per the spec) */ + if (smccc_get_version() < SMCCC_MAKE_VERSION(1, 1)) + return; + + /* Check we have TRNG 1.0 or later */ + version = psci_call(TRNG_VERSION, 0, 0, 0); + if (version < TRNG_VERSION_MIN) + return; + + if (BUS_ADD_CHILD(parent, 0, "trng", -1) == NULL) + device_printf(parent, "add TRNG child failed\n"); +} + +static int +trng_probe(device_t dev) +{ + device_set_desc(dev, "Arm SMCCC TRNG"); + return (BUS_PROBE_NOWILDCARD); +} + +static int +trng_attach(device_t dev) +{ + struct arm_smccc_res res; + int32_t ret; + + ret = arm_smccc_invoke(TRNG_RND64, 192, &res); + if (ret < 0) { + device_printf(dev, "Failed to read fron TRNG\n"); + } else { + random_source_register(&random_trng); + } + + return (0); +} + +static unsigned +trng_read(void *buf, unsigned usz) +{ + struct arm_smccc_res res; + register_t len; + int32_t ret; + + len = usz; + if (len > sizeof(uint64_t)) + len = sizeof(uint64_t); + if (len == 0) + return (0); + + ret = arm_smccc_invoke(TRNG_RND64, len * 8, &res); + if (ret < 0) + return (0); + + memcpy(buf, &res.a0, len); + return (len); +} + +static device_method_t trng_methods[] = { + DEVMETHOD(device_identify, trng_identify), + DEVMETHOD(device_probe, trng_probe), + DEVMETHOD(device_attach, trng_attach), + + DEVMETHOD_END +}; + +static driver_t trng_driver = { + "trng", + trng_methods, + 0 +}; + +DRIVER_MODULE(trng, smccc, trng_driver, 0, 0); diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c index a8ccabd1a902..379b64ac15f1 100644 --- a/sys/dev/random/random_harvestq.c +++ b/sys/dev/random/random_harvestq.c @@ -386,6 +386,7 @@ static const char *random_source_descr[ENTROPYSOURCE] = { [RANDOM_PURE_VMGENID] = "PURE_VMGENID", [RANDOM_PURE_QUALCOMM] = "PURE_QUALCOMM", [RANDOM_PURE_ARMV8] = "PURE_ARMV8", + [RANDOM_PURE_ARM_TRNG] = "PURE_ARM_TRNG", /* "ENTROPYSOURCE" */ }; diff --git a/sys/sys/random.h b/sys/sys/random.h index 31071d356714..67aae93630b5 100644 --- a/sys/sys/random.h +++ b/sys/sys/random.h @@ -103,6 +103,7 @@ enum random_entropy_source { RANDOM_PURE_VMGENID, RANDOM_PURE_QUALCOMM, RANDOM_PURE_ARMV8, + RANDOM_PURE_ARM_TRNG, ENTROPYSOURCE }; _Static_assert(ENTROPYSOURCE <= 32, From nobody Tue Oct 15 17:25: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 4XSgwC5HqNz5YkxN; Tue, 15 Oct 2024 17:25:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgwC3GlHz4V4Z; Tue, 15 Oct 2024 17:25:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SCaG2//T4UQTAQyeeUjVF+yK5mn/pLbRpPbT/VnPFoQ=; b=lxNU5pCPXnlUjOYU0jlcn+ggJN7No/PAD1h6nnlrOfS9be0TQgmibzld1NIbBXTbZkU/lF 53Oe4XxF9mxMztIVbOA6/lY6Qo/jJ+4OYqm4WACXb9IZlap0ycRXsZc1zt459m3J30XK0/ GY/LRmINpSE+6Ac6uvphRvWTYz22PmSLdCjU6XQo8P145UhQWVUwj9Fy6CxY6LGemPeSmI /OTelPvxG7/yQ04H7q8f7q+5jxLaItrhBsgFlRgTZ67W71D+VaTa4rxvDx+oz+jm8zBBNX 2T6ybPc+CVNUwsKkBzCgU5w/6uP9I9yh0l3nB/a8m3pTcWRtcZ3uL7/80Wuviw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SCaG2//T4UQTAQyeeUjVF+yK5mn/pLbRpPbT/VnPFoQ=; b=YfpHYKE7xTskFdGHX1LlO9nhEpHTq6ioSXVxIBwvfVMIRQKt+TlunXLnp3SDQDq7or9jVy BSnzwmyvE7uxbDZMGHddVsaqkQ7CIh/9DyDLjIbszcMmZlYwo+oHEUv9R7lf5DR0s4PEVq DsoUejCxCWvLlRknVy9fdEsaibJw0iNbU9WhvkVXA2RxPGeTe6jLt7J32qfWtkOlFFkD6X FmZCAZogevgwXyWL0eZizlrLuFyKlKLwngRkdUH0KkfOz4iJyZm+niG42Sa2Tj5HBpknBJ 7OUqgHopcx5RPtS19sonZDXLfegTSti7HEvL76z0KPYUDaWFd090vQ6oa0KkbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729013115; a=rsa-sha256; cv=none; b=NYNfuXPr1OLZFhFwvIgmus9VU+uJjrndQIy5TSf+T8p67nyQ5ETt1qInawS3+0BrdWEO3g 2Ogta343dxCSBuuGVfhkN4fanbq1utWpmdenMhRMiiX0lXTnoEErU+GLJGX8F5d52b1bSn 8HbXnHSUVmPYxONqwdIGkc1Pn61zeYrRLLFiHkUSxgRGNH6oP4XB9FSSvS7hPq7Ug7fV/+ aARCUPJ2Qr9eHvRCqi2SLMmZ036sC7HmK7AMf0mTfirEmSWyVgGI+An64JSvUzbjydtLjM 4R4oYsLU9S9IGoSsxEWGK+0z/VXepU3/2ApOneSNUj5tOlKW/PPkmMBWwwl8ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgwC2sK7zW5Z; Tue, 15 Oct 2024 17:25:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHPFUt028056; Tue, 15 Oct 2024 17:25:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHPFLo028053; Tue, 15 Oct 2024 17:25:15 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:25:15 GMT Message-Id: <202410151725.49FHPFLo028053@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 54f23b015aa6 - main - arm64: Support pmap_fault with a locked pmap 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54f23b015aa6b913fd51c1b5c16e09cc3778fcb8 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=54f23b015aa6b913fd51c1b5c16e09cc3778fcb8 commit 54f23b015aa6b913fd51c1b5c16e09cc3778fcb8 Author: Andrew Turner AuthorDate: 2024-10-14 14:35:56 +0000 Commit: Andrew Turner CommitDate: 2024-10-15 17:24:42 +0000 arm64: Support pmap_fault with a locked pmap When we get a data abort in an EFI runtime service the userspace pmap will be locked by the current thread. Skip trying to lock it again as it will be in a critical section and the lock may sleep. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D46813 --- sys/arm64/arm64/pmap.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 2c8f8b416a9e..10aa7f6bfb5c 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -9178,12 +9178,23 @@ pmap_fault(pmap_t pmap, uint64_t esr, uint64_t far) if (pmap_klookup(far, NULL)) rv = KERN_SUCCESS; } else { - PMAP_LOCK(pmap); + bool owned; + + /* + * In the EFIRT driver we lock the pmap before + * calling into the runtime service. As the lock + * is already owned by the current thread skip + * locking it again. + */ + owned = PMAP_OWNED(pmap); + if (!owned) + PMAP_LOCK(pmap); /* Ask the MMU to check the address. */ intr = intr_disable(); par = arm64_address_translate_s1e0r(far); intr_restore(intr); - PMAP_UNLOCK(pmap); + if (!owned) + PMAP_UNLOCK(pmap); /* * If the translation was successful, then we can From nobody Tue Oct 15 17:25: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 4XSgwF0Txmz5YkpM; Tue, 15 Oct 2024 17:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgwD4FhVz4Tqp; Tue, 15 Oct 2024 17:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uGuyH1kyaSVFYf/CDOOhDb5NAMEvwJZGYodeK6urDZY=; b=TcpRtKo4WFiJG5mOfz2kORZzba2sMyKMQ248+hErFZNsPE3lfcls+n6FG7+YYm7slC/eRI EOXQL4s0g2bqDvX6zyu1Xu+/PAZRZOsMU0t1N65UoxL8sMciuvwQIDPQYywa0/c4B8u7Kw sTIMhDc1SRSM6aAUjz2kS58flLkZTzSXwpnUoVpsWDc/xm59IW2OkZsjiW1DnbYNlotaeC dk1t7An8JbSIMW6mRlhebSm5f9jceH1wwZBy3zMQSihov6OYtrsChmhokvxpGLeNLvfqm/ uX4GuGofmX7i6Zofy2pugjaaWQizT5NXUv5rUNDdARTVZUTzRPsICCskHlD5Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uGuyH1kyaSVFYf/CDOOhDb5NAMEvwJZGYodeK6urDZY=; b=rHcKGiCnb32IBzPuo1livJ72cbePbS4raF7JERArLKpz10cCnXqA3Ps+mbPa1s4amJ4MN4 JT+xy5I98AegLiZ1L/J007kDeeCzNbYSPjf/6rMc3xuSeAJacADcW4WPCutH8Pbv0P0hYW FBEixMqhjo6sec7Lpx1+58DSxiz1VmwBmCQd1hFqekTVnavVDE6lLdTI90S69JmFjVbcNu DjxTPaYwd3C6OzJ/s7h4a97lR8P7RBqK4qxUO9esw4GtdAakr47EP5tJOqGd8KwYOzyHFX g/qVqFSa7Hmg2tFSPAb+AGi7tMHpO/FEwPcBibdHo7nt+5K980EAV9b9J1KSLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729013116; a=rsa-sha256; cv=none; b=kCEo4+hHSwByLsTGuFNXGUOMhQ4+jNEaKA3eY0gdk563I0KO83l4etZTnNiruoywQOQa/O H4TNFiZ4Cte9Ujl2qrjtcK39huLL2JVhQfuYRmn83YYyylQNbghditkofJsBrbCmFKFigS H8cy6Rb2RmNWUmPLic8SYMh3SyELIP9EQF4XeLAF4YS8dvCcPmDXLR/efOAukh5iM8apE2 cAKSe0Ayp4Be5JTd7tf5fkJiJe6R9HM5XPgkQH7wvWYpCxrageWHaDgFGTl5VuDDYDjCxN lZz4rbOlyApdaPJ4d+zJUL/WfUC4vXdk1O8p9zVzsZDqH0xl2wppsr911PmgLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgwD3t4fzWR5; Tue, 15 Oct 2024 17:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHPGcO028112; Tue, 15 Oct 2024 17:25:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHPGa4028109; Tue, 15 Oct 2024 17:25:16 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:25:16 GMT Message-Id: <202410151725.49FHPGa4028109@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 8803e789393c - main - arm64: Stop setting x0 for pcb_onfault handlers 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8803e789393c504cafedb478a1619aab363c2aa5 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8803e789393c504cafedb478a1619aab363c2aa5 commit 8803e789393c504cafedb478a1619aab363c2aa5 Author: Andrew Turner AuthorDate: 2024-10-14 14:36:05 +0000 Commit: Andrew Turner CommitDate: 2024-10-15 17:24:42 +0000 arm64: Stop setting x0 for pcb_onfault handlers All handlers set x0 before returning, there is no need to also do so in the data abort exception handler. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D46814 --- sys/arm64/arm64/trap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index fa0b46111a34..fa1132305067 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -375,7 +375,6 @@ data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, bad_far: if (td->td_intr_nesting_level == 0 && pcb->pcb_onfault != 0) { - frame->tf_x[0] = error; frame->tf_elr = pcb->pcb_onfault; return; } From nobody Tue Oct 15 17:25: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 4XSgwF71rwz5YkrN; Tue, 15 Oct 2024 17:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgwF5LfTz4V5f; Tue, 15 Oct 2024 17:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x59PuM2zEow1N0VOTP9PTnDFunDagsQH6oMBGJvjydM=; b=QksZYrFmdV3gw5j0TzXG1UYO25z50v5gYP48nXNqPtDwx9enzMnztbZZgRPo04VB0vErC4 gJGcftSXkndQneqj6/3NAa8wu0txBwS3zhkqjiCAgtbGtLxTliliSAsBPw8lkgUVgdnFSk HKEYBpW2VhyEQue2tROzDplVdhsMpYxSHO5l+NSi8ix7XHbsfnmBnBeY9mp5PMk7rRN4Cy TZ20MEgjGxzjtnMDqhYHirDCT6mWwW2XAaYBqhN7/k7+yOW2+dgfFhiHz3fJpwZfpsnxGr vF+gWmE9IzutCoq10tacl4IGXdYzvwU/vx2i/1gpCnYvY8uE8GOAqU7P7o83mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x59PuM2zEow1N0VOTP9PTnDFunDagsQH6oMBGJvjydM=; b=to/IPpFVYZ5Ip7sNnfzxhaihCXmD1xNca6/HffMRCXRRTes5l/gD1ZORkULRFGsr+0WYJO Dbs7N8b713u0U/EKGAoFHmZE2PESYIFUSusG+GXVODVV9pNkwhpsFed9qF7MUeMQ46ojKV VMyGTgi05R7AFsKbeLPhP6w4B7x7zHTtHMa4c9aQL/PnjPv56RXABSziRzXhIxz8w+ELLI S2Ukd2bjEDMk3yDkac2HR/9u0ykTjmoLRDy2+jIrAhVtToUuM9ky3cyY7KWNiLA1JtckGu yI2fExAn5uCaRs/ZaY84YeonIzita2X+n1knzMMkDYcmFO+V3URgXkP9R7SBwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729013117; a=rsa-sha256; cv=none; b=q//wXxp7Xx++rk6nIBeefmlI5X0h11Zs2JiR5lHsa0AYiVNqV9udTZeKZG4tjcXxjvyiDN QsrYHS+tKA+PBoaHqktJ8U0FXwx80ZXn78d2d6T65Ic5IxxMsjuoAiY1DP7xh1JE/FOMVu MBgMd8fI3iMicQ8gjLg7IAtWM2b+/RI6ZD2SLxRhGYWE8TZcIRy43Lts94psjrqAsrM0rm HMV7xpyr7ghmz4o+eEqui7uT9pv2kx/a0HIWknzTTEbXB0+ITI5bg+RVc8gPeVUKze8FoW NiXqgqIICKn78ncoaToMkiQ59u061PEa0+RqAJ02FRYI7kX0xnuwfAi7haeq8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgwF4yrZzWLP; Tue, 15 Oct 2024 17:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHPHaU028153; Tue, 15 Oct 2024 17:25:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHPHtu028150; Tue, 15 Oct 2024 17:25:17 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:25:17 GMT Message-Id: <202410151725.49FHPHtu028150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: e51ed89897da - main - bhyve/aarch64: Handle unknown exceptions 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e51ed89897da9b940bb4399427aec398dae96fba Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e51ed89897da9b940bb4399427aec398dae96fba commit e51ed89897da9b940bb4399427aec398dae96fba Author: Andrew Turner AuthorDate: 2024-10-14 14:39:29 +0000 Commit: Andrew Turner CommitDate: 2024-10-15 17:24:42 +0000 bhyve/aarch64: Handle unknown exceptions When an exception class is unhandled by the kernel we handle it in userspace by exiting the process. Rather than exiting raise an unknown reason exception in the guest. The guest can then handle the exception as it wishes. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D46511 --- usr.sbin/bhyve/aarch64/vmexit.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bhyve/aarch64/vmexit.c b/usr.sbin/bhyve/aarch64/vmexit.c index e1a9509d5d12..9ecf25c04e41 100644 --- a/usr.sbin/bhyve/aarch64/vmexit.c +++ b/usr.sbin/bhyve/aarch64/vmexit.c @@ -263,15 +263,15 @@ vmexit_smccc(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) } static int -vmexit_hyp(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, - struct vm_run *vmrun) +vmexit_hyp(struct vmctx *ctx __unused, struct vcpu *vcpu, struct vm_run *vmrun) { - struct vm_exit *vme; + /* Raise an unknown reason exception */ + if (vm_inject_exception(vcpu, + (EXCP_UNKNOWN << ESR_ELx_EC_SHIFT) | ESR_ELx_IL, + vmrun->vm_exit->u.hyp.far_el2) != 0) + return (VMEXIT_ABORT); - vme = vmrun->vm_exit; - printf("unhandled exception: esr %#lx, far %#lx\n", - vme->u.hyp.esr_el2, vme->u.hyp.far_el2); - return (VMEXIT_ABORT); + return (VMEXIT_CONTINUE); } static int From nobody Tue Oct 15 17:25: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 4XSgwH2Kkcz5YkJf; Tue, 15 Oct 2024 17: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSgwG6Q1zz4TxF; Tue, 15 Oct 2024 17:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3WKWDYHviyGDldkxABpDeISFoZMeKCe0CJhfzWvRd0E=; b=hpiPAt35Nkvzrb/nZS9DG39DncgY5Q77SO3y/KMR/tsNJJRN01dL+wRcaTAhiMKO1T5nwc BBCYVJJp0jaJvzsallcmHEr57BPwfGCdAGJ80aJpQYvTy9WDvSkjnOWbb3JeNmTGLYl8Wb M2/h/EXsuRV9GKBkVmieZ0DTTFfGSDAi2eNKUiKHDfCJwU9eEPdHkE88xQshI5oLpqH8zp UxKUmHPd0UD1hO9Q6uo6lIi5c+X11upOFvdMF2Hj5nrDkIAHB0HHoSUWSroGWSxvJF8EqZ 2E5+zq9iOLhii/l8LhTwg1hE0a2UajXo068HtlaXomRAafUqtnwEKOHYAuFDRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729013118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3WKWDYHviyGDldkxABpDeISFoZMeKCe0CJhfzWvRd0E=; b=UgAjQUYH/bCjkB3id0+Hn4S4zsIuVDu0kik73L6kEQtA/pKmbzCN73w7igkjTUGoBxWY/n t7NCWCUorYecI63rGa/zugDVZkZIup4A98SxXoLJIF4pU75pEr2KNASVORhlxGJWYyTlrO SSAjwIuIMK2rbHhV0QYF4tqfHuVNBDqk1b33bhK1XnRSFtbZ7IHnx2cqBg2QjY0sNPyZTU VdDPWBNpexj7DNAFzSRExzYYxx1xeCLDM+q52n6D1UJbe9DYxdernV1v7VXuBPEtfYyV53 wxZrVO3DRigqfx+HelG1+4A+4y/kK9TnjlYHdfy1WfAPmmdakndiONQDsecQxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729013118; a=rsa-sha256; cv=none; b=Tkj5Ih5sManKQ5LgfUxfELzSqG8yV2hS3jllRumSejiiNFNhRny47+0xfF9B4oZSlaAel7 F2Ep/Pr5P/J4fwbVydqbqYhwpy4oovfj03V0WBByVuG6i+rOc3g+BH4xJnOzxi8KlTiHxl Fzud8cm7J3msadIqWNFUN0Z1Sw+gZS/InJq8+Mg3px7ND3Ar67PEaF6pAfrXKXi/7pEzl0 FuHXtGKBbE4WE17Vd+13c0UnUrOIuosM8KH0MCrswt+HR5SWBW7ME87TZ3GS/wxwDZox/o /0QKb2bLdWYyA0+mvCR9Lm5ceBiQtBac+lenLas8V4w2oa/Jr+3NNQYIb+G2pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSgwG5zryzWLQ; Tue, 15 Oct 2024 17:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHPInL028199; Tue, 15 Oct 2024 17:25:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHPIZh028196; Tue, 15 Oct 2024 17:25:18 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:25:18 GMT Message-Id: <202410151725.49FHPIZh028196@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a7c5c88cb29f - main - arm64: Stop trashing x28 in savectx 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7c5c88cb29ff512467a6599f1b4d8e2b8817480 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a7c5c88cb29ff512467a6599f1b4d8e2b8817480 commit a7c5c88cb29ff512467a6599f1b4d8e2b8817480 Author: Andrew Turner AuthorDate: 2024-10-15 08:30:17 +0000 Commit: Andrew Turner CommitDate: 2024-10-15 17:24:42 +0000 arm64: Stop trashing x28 in savectx While here make it return void, we don't set any useful return value and nothing checks for it. Sponsored by: Arm Ltd --- sys/arm64/arm64/swtch.S | 10 ++++------ sys/arm64/include/pcb.h | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S index 6af70ca839a0..c683a7e25314 100644 --- a/sys/arm64/arm64/swtch.S +++ b/sys/arm64/arm64/swtch.S @@ -267,14 +267,12 @@ ENTRY(savectx) mrs x6, tpidr_el0 stp x5, x6, [x0, #PCB_SP] - /* Store the VFP registers */ #ifdef VFP - mov x28, lr - bl vfp_save_state_savectx - mov lr, x28 -#endif - + /* Store the VFP registers */ + b vfp_save_state_savectx +#else ret +#endif END(savectx) GNU_PROPERTY_AARCH64_FEATURE_1_NOTE(GNU_PROPERTY_AARCH64_FEATURE_1_VAL) diff --git a/sys/arm64/include/pcb.h b/sys/arm64/include/pcb.h index 273b53cdc6cf..c0feb1149cf5 100644 --- a/sys/arm64/include/pcb.h +++ b/sys/arm64/include/pcb.h @@ -85,7 +85,7 @@ struct pcb { #ifdef _KERNEL void makectx(struct trapframe *tf, struct pcb *pcb); -int savectx(struct pcb *pcb) __returns_twice; +void savectx(struct pcb *pcb) __returns_twice; #endif #endif /* !LOCORE */ From nobody Tue Oct 15 17:43:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XShJh69FCz5Ym23; Tue, 15 Oct 2024 17:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJh5TXRz4YpV; Tue, 15 Oct 2024 17:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UnzB0PLegsHLh0NInv2KXlpBt9leQvVlnT+owfS6Wrs=; b=CAJ4NQzAk3WkG7qKc+/Gc/Ro9qwSVRHB/S2Bi2IrydIU4JbwRxdX92K1BDvd8o92+FAe7A 0LjYzG1H3EiAXDHWQwWxpQqZNkD/MoKyUGap9rGH5WetTVN8fz7Gq2z7jgXgTiXBGn+csl vxqdrnx4HmWlWp8SOrv6J3ZIy0mxZcROcKEh/av/h8WF8vwL3DaYu+BLQJlk9uCN9cTr3x 5yAAUaBMbsc/Su26kLOD/8BuFEa8+mMfKzTU2HmiR28mxLq8tuf0QJHC7gwYubiBwh7sZH bScwIVF3VQF2x9tvFGabgC6/pkaONuka71Y4g1iScTyqg6BVaSHCNFf3XOzJOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UnzB0PLegsHLh0NInv2KXlpBt9leQvVlnT+owfS6Wrs=; b=Bb59vtbpz7b2YxcolV3tVxNW88nt0YDdYcxQHZTT1Y1gHFKypPgPrKOAnvP0ANPB8GcfBo NMUxs+PBh3CY4+gMkSEmEFZPPRj2EvYOotHe8zZPCuspYzcuV0wW+ltyOMtf4l6XBe631r cncommOd4559dcTV8HI3ehbrVlzRJciLUP/oyRJEbBi31U6TFkKauwrRVyszR5Twwr5p0w VpGHpvp8hzYU+SucRbMB6SwPnlGDOj0Ax2IbYIS1aEfNJJt5o6bFVXA/yUVARLdv1k10qB +ymZsvafb2ulxqYuooHVcvz4EalJ8WFAPEfNzuhx73zXL6UwZ1LhwYuB2e8L7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014180; a=rsa-sha256; cv=none; b=gFPyX6jBq4nwIrOIGpiEdNTCPFQi8so3gnfWWiga1DT2h06SnbYByJtK+AokVgIvjk0uI6 GVAMn1hMWtFIVlxXj9N0znCHvsdAlYLUaRq4unO2CHzLUwczxfCmqlyWXhzg0EJ9uOAc14 +WfUCgJkTJd3NYBTZRkpJR3uIxV3CMwyOLmPRe6rtSMQi8xrnK7iBTEeIjzz+9+iWyjdev rQEmctSDpNt7vwkf7+E2Krv2t1q2XPH3V0LJ4GYQVZ4gypwucWszeD2dlzbyPRiWv/bqSZ sEgJrhy3CzQIYFtF/Q8C9DKcjbQ5B80QH9zW1v1888rE7xR4cuDVzRTBYfUDEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJh554xzXLw; Tue, 15 Oct 2024 17:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHh0hB061835; Tue, 15 Oct 2024 17:43:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHh0CP061832; Tue, 15 Oct 2024 17:43:00 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:00 GMT Message-Id: <202410151743.49FHh0CP061832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 5517ca8486bf - main - ena: Fix customer metrics deallocation statement place 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5517ca8486bfbf4d0cd369898f3e4d10cd614a9a Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=5517ca8486bfbf4d0cd369898f3e4d10cd614a9a commit 5517ca8486bfbf4d0cd369898f3e4d10cd614a9a Author: Osama Abboud AuthorDate: 2024-08-07 06:24:22 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:31 +0000 ena: Fix customer metrics deallocation statement place Upstream commit [1] made if_alloc_domain() never fail, then also do the wrappers if_alloc(), if_alloc_dev(), and if_gethandle(). Upstream commit [2] removed the NULL check conducted by the driver. This commit also removes err_customer_metrics_alloc goto label. Commit [2] leaves behind a floating free() statement that deallocates customer_metrics_array. This commit places the deallocation statement where it belongs. [1] commit 4787572d0580 ("ifnet: make if_alloc_domain() never fail") [2] commit aa3860851b9f ("net: Remove unneeded NULL check for the allocated ifnet") Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 47d066a2e4f1..9d047cc89b30 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3841,8 +3841,8 @@ ena_attach(device_t pdev) #ifdef DEV_NETMAP err_detach: ether_ifdetach(adapter->ifp); -#endif /* DEV_NETMAP */ free(adapter->customer_metrics_array, M_DEVBUF); +#endif /* DEV_NETMAP */ err_metrics_buffer_destroy: ena_com_delete_customer_metrics_buffer(ena_dev); err_msix_free: From nobody Tue Oct 15 17:43: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 4XShJk1JXBz5YlWF; Tue, 15 Oct 2024 17:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJj74qQz4Ys5; Tue, 15 Oct 2024 17:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iB/CBLn7IPKgSenGlTfsQoyhnKyEUGYBDmf6NVi1yFU=; b=n1kjNqDv5x9BLY3bGSz70Yd6UtPlNcPTJH0rZULaCRJIwBAsz75/wYMZTLvMu8lc/qAkGN KS0r0Tu4UBiuU1GuDGUOX+Ji189Hk8n7Sxc7CSexlyy3PxOoxloMkgllsatppl1MZin+R7 tQBxEJbwh39ecGUCOSGgjAUefnDhKZ4vL+V74KXsWxoOVNCKPbTqef4GHL2uEIlhzGIh41 4csWrpu69X3asCl2zN9Yv3igOLrHykuj6GreriMK2o2ccKX7PVl7FQ6I8drKu3ZcnCC3F+ jAVC97eClpDRo/RwFiHX50fxnXA+3+fT4xqClXu1GBlvrWcIx9/NLTgMABg+Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iB/CBLn7IPKgSenGlTfsQoyhnKyEUGYBDmf6NVi1yFU=; b=caEq9BcYlFwlq44T4U+qvSqZYAuRcIjYUmgHsDUXqUUZTqgSI+/snioe7fIHMdeUpssH06 OSsVTD+MNWvdS8zrh6V+yDcJNSJY2N65ZD6f8cDJvsEazagfapkWKu9uJ/pxWpYp9iRova NRYYM4Opt6nRSsa4OcidRJtse6Hw4wSL8tWyXHmBhKfxyRb7TQBJFZNFqcpTNdCcOl2w3O P3WWbbuBbOeWUGUzrckJuVMrUy+uq9SM9E1WWgrlU1sjveFRQLZDjgMkY2PQ9h+klQwtiD wVD2duG1hdtPXGkZkGZ31cmHFu8WnHgdX3ATwuNoSZtLCspa+LXRRa2cxzEImg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014182; a=rsa-sha256; cv=none; b=Z123SkPF7gkwEMZY7c+PzQ7z+xqG72ahRH/MUFvAYMkvbH/zddAdhsYWgENgAxVfmsNsli xS5JTh+k8ofuTTbyn1JHjzptxy82eVnKLM9So/6vqWIf82XvLl1uMz7OSHHbcnrQNmw8mF 8uAoZuBBdwJ5fWkcOZ6hqNQwUWRXR6IGcP7DWkC5PDUJ5HNuQoNqRLn1LC++WLZ4Y0MD2X YSj+rJVpmm59e2bHUVqyqUlnZm9ivRdte/BC/tMz1FV0y3CC9Ym2EI4iIlIkYp0JmpgR0l qA3viJa3SNadVRamvFKcc5cGzdlMiWu5qtRL6EkjGLek2Z/JW8GHzvAtJaRElw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJj6N4PzXQ8; Tue, 15 Oct 2024 17:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHh1Wb061892; Tue, 15 Oct 2024 17:43:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHh1ZS061889; Tue, 15 Oct 2024 17:43:01 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:01 GMT Message-Id: <202410151743.49FHh1ZS061889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 1f67704e2cd8 - main - ena: Count all currently missing TX completions in check 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f67704e2cd85a507776312b52dc63d8690b9260 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=1f67704e2cd85a507776312b52dc63d8690b9260 commit 1f67704e2cd85a507776312b52dc63d8690b9260 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:18 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:31 +0000 ena: Count all currently missing TX completions in check Currently we count all of the newly added and already existing missing tx completions in each iteration of check_missing_comp_in_tx_queue() causing duplicate counts to missing_tx_comp stat. This commit adds a new counter new_missed_tx within the relevant function which only counts the newly added missing tx completions in each iteration of check_missing_comp_in_tx_queue(). This will allow us to update missing_tx_comp stat accurately without counting duplicates. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 9d047cc89b30..6c1cbb6701de 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3058,13 +3058,13 @@ static int check_missing_comp_in_tx_queue(struct ena_adapter *adapter, struct ena_ring *tx_ring) { + uint32_t missed_tx = 0, new_missed_tx = 0; device_t pdev = adapter->pdev; struct bintime curtime, time; struct ena_tx_buffer *tx_buf; int time_since_last_cleanup; int missing_tx_comp_to; sbintime_t time_offset; - uint32_t missed_tx = 0; int i, rc = 0; getbinuptime(&curtime); @@ -3107,13 +3107,15 @@ check_missing_comp_in_tx_queue(struct ena_adapter *adapter, "%d msecs have passed since last cleanup. Missing Tx timeout value %d msecs.\n", tx_ring->qid, i, time_since_last_cleanup, missing_tx_comp_to); + /* Add new TX completions which are missed */ + new_missed_tx++; } tx_buf->print_once = false; missed_tx++; } } - + /* Checking if this TX ring missing TX completions have passed the threshold */ if (unlikely(missed_tx > adapter->missing_tx_threshold)) { ena_log(pdev, ERR, "The number of lost tx completion is above the threshold " @@ -3122,8 +3124,8 @@ check_missing_comp_in_tx_queue(struct ena_adapter *adapter, ena_trigger_reset(adapter, ENA_REGS_RESET_MISS_TX_CMPL); rc = EIO; } - - counter_u64_add(tx_ring->tx_stats.missing_tx_comp, missed_tx); + /* Add the newly discovered missing TX completions */ + counter_u64_add(tx_ring->tx_stats.missing_tx_comp, new_missed_tx); return (rc); } From nobody Tue Oct 15 17:43: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 4XShJl48YLz5YlYC; Tue, 15 Oct 2024 17:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJl2BFpz4Z6V; Tue, 15 Oct 2024 17:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=47OJSYhNiNWPfkiR9sJWv2NUerhlLjLRownBqbCaaf8=; b=x/2KSd/4VtjS3yEgv/Q3EgJ+0UqrRU2YSeQR2i+hZ7nCejYHtI7/3HzB/7L4BYIp7EvhMP 9qACDFOsoPhgvmaR31RugY06cb0WPD5VOrEgShixhUihlt31RJHLas4QKVGV/d+0SfsaPx l9zPeFyYVInFQmoapLr3OFfPu/MXtJ6m10GV88eG5aWkWUDwxXl3c31W7iUFYDBI4Sr8ao NrUaIZmqC0nBPWQh/dueizMu4zLshgugQ+vvqWgAIUdcvuegNLJjQJziRNVf0PP9Ixdu2Z bx3a5dC7ODEBelOZdhfa11jbtCTKt9kTE1kl3j/MiUEpCUDReDeq09s8js6j8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=47OJSYhNiNWPfkiR9sJWv2NUerhlLjLRownBqbCaaf8=; b=EyOuF3RxWR9r5FM0cuhKc/ZSmZe/jtLmG13MZzKNoPY4jKYR4+HyoxCUghwUfFdG6l4XsX WZIUczncq/Rn0CHdBzYmbBlEHQN0/fbIUlIstFqBFSk7LHFsllxhnfl50s694hazl2pSVo lCSaocpafuxMOoVSuhQzBYTvHEP9mIvepZsiVuzlhMLyKCwcPGquNfH2OdaF+ykeLzxULk kJJFig0aCt6XOvbV1LvpmBkrPBYpljARXNhT8JE+5OIBToqpxAMIJywnp4RVmqK35tdI+6 Ti3o84nONeymPiv3uC0v59UgP627EW8JNqKxqTSW7Rh0IKZcUizGIZ4ZzI+fSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014183; a=rsa-sha256; cv=none; b=HGn2zTrrJi5tBMyNgGfqJFVlC+BIEaRn4+fvWO0B4ZHc7oWOcKcUE9LdP7l8wTTk6zjeCM 3DWyfPqNDAky9QpgCOogRbkq2ROoAlEfIjHxYyVcHZucriXfLZSTRkAJr0Fvx2ivxMMv6Q 2zjo5SiDHEWLhCLLWGIAORBjrumG1hV3/PiKFdf8NP/z9dEu7GZQI+N1J8Z/o3zDsyqw82 0FqdiGlcK2DCwqnXY9w/HT9VuYD9ZkKqJsvDbMjS7vbJhFqCj4qgNQ24MkvyMVq068lZB6 JrLVeWnbfcDHpqZFyXHjJwexoTiOvuA6zNm1RRfwScCY8+xBTupUb0f4RL4VTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJl0HwfzX9R; Tue, 15 Oct 2024 17:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHh2u4061940; Tue, 15 Oct 2024 17:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHh2uq061937; Tue, 15 Oct 2024 17:43:02 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:02 GMT Message-Id: <202410151743.49FHh2uq061937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 8cd86b51be4a - main - ena: Add configuration notifications interface 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cd86b51be4ab0fe70bad4830e608d56db5c850f Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=8cd86b51be4ab0fe70bad4830e608d56db5c850f commit 8cd86b51be4ab0fe70bad4830e608d56db5c850f Author: Osama Abboud AuthorDate: 2024-08-07 06:24:18 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:31 +0000 ena: Add configuration notifications interface support This commit is part of the effort of notifying the user of non-optimal or performance impacting practices. A new interface is serving as a communication channel between the device and the driver. One of the goals of this channel is to create a new mechanism of notifying the driver and user in case of sub-optimal configuration using a bitmap. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 6c1cbb6701de..3f2b9c1fb138 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -2911,7 +2911,8 @@ ena_device_init(struct ena_adapter *adapter, device_t pdev, BIT(ENA_ADMIN_FATAL_ERROR) | BIT(ENA_ADMIN_WARNING) | BIT(ENA_ADMIN_NOTIFICATION) | - BIT(ENA_ADMIN_KEEP_ALIVE); + BIT(ENA_ADMIN_KEEP_ALIVE) | + BIT(ENA_ADMIN_CONF_NOTIFICATIONS); aenq_groups &= get_feat_ctx->aenq.supported_groups; rc = ena_com_set_aenq_config(ena_dev, aenq_groups); @@ -4041,11 +4042,38 @@ unimplemented_aenq_handler(void *adapter_data, "Unknown event was received or event with unimplemented handler\n"); } +static void ena_conf_notification(void *adapter_data, + struct ena_admin_aenq_entry *aenq_e) +{ + struct ena_adapter *adapter = (struct ena_adapter *)adapter_data; + struct ena_admin_aenq_conf_notifications_desc *desc; + u64 bitmap, bit; + + desc = (struct ena_admin_aenq_conf_notifications_desc *)aenq_e; + bitmap = desc->notifications_bitmap; + + if (bitmap == 0) { + ena_log(adapter->pdev, INFO, + "Empty configuration notification bitmap\n"); + return; + } + + for (bit = ffsll(bitmap); bit != 0; bit = ffsll(bitmap)) { + bit--; + ena_log(adapter->pdev, INFO, + "Sub-optimal configuration notification code: %" PRIu64 " Refer to AWS ENA documentation for additional details and mitigation options.\n", + bit + 1); + // Clear the processed bit + bitmap &= ~(1UL << bit); + } +} + static struct ena_aenq_handlers aenq_handlers = { .handlers = { [ENA_ADMIN_LINK_CHANGE] = ena_update_on_link_change, [ENA_ADMIN_NOTIFICATION] = ena_notification, [ENA_ADMIN_KEEP_ALIVE] = ena_keep_alive_wd, + [ENA_ADMIN_CONF_NOTIFICATIONS] = ena_conf_notification, }, .unimplemented_handler = unimplemented_aenq_handler }; From nobody Tue Oct 15 17:43: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 4XShJm3gt9z5Ylhh; Tue, 15 Oct 2024 17:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJm1b99z4Z6p; Tue, 15 Oct 2024 17:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ftM/y+hS/pBskgFhd9dyIrWsenkwF37/OC6RdRo7CIc=; b=oxSmPXO2VluuwXYswzQ6FLu8w14OpQPezxXlrZE7Td61Y2RLziHlmlgVel6f5LQCRotGYg mphC7NAom1m5g6jFG++j0M6tgewWvw3V92s/aRTNTpjbZ+zySF9dOaa5GJWW2NYhMHNtLF zP1wplNiP0iZ6AybN/DfdZVtRMeDfYWJ5M8C03IxrZF3dp2rL9ja1LfQkwqbx2BtsnnIPj b3JihCCVf79APBOalPybUvx6tflzwtDY9YRcVzAuTeO+bwGYlM0YCsyAsBjZB8KKhNSvD3 NvzhOSn0jq3Hvubro62V7sI1CrAPb89vDBWrCizZyvjlWd4NbMQrL8K8SjeBOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ftM/y+hS/pBskgFhd9dyIrWsenkwF37/OC6RdRo7CIc=; b=fUQRuP2GLRWAHk5rFMStddqzSHCcg6LVUImSXvXUOEe7Pbl3yeAd6GBNC/qtdygEags45x wM3V/efprd4Zkn/owWXfOABKKti3It7kwjQ5pBX4j7yxgys99K+5Qm3eVQiseyjUtaPvsh qJ49YAfjf1SXVNGZ5/1m0Yh2VOIqhN0Y7Z3elfJ/tvv4ZB+hatcxXHZmo93OTbJeh0lbO4 l6RYeNlLrzHf4k2qdqxTUUT3XbyXGzhZzrVz8cEZqKPK2R1hWoGE6zNBPIheDUjODVPg4k TxryWoGXNsnGdykLK/K74trj1R8J2nfxEPONqudqx2YN1ANQJsrdDDLQGd4VRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014184; a=rsa-sha256; cv=none; b=e7V4SLEzV4lRL1Xalk0k14RJk1qckxZEXlPQEUx5xbvTckwkqpJmzC1K5oVf+Xhs+KjfAo 9yFbDU0f3xT0lOS99YGrR5DmNT8IdHyE9MDciahyhsmo/x4mMgI/fpG6b2+cYs8ir1QMiC T4Fbv2kNtMXN+IhL/aK4kBNz32gKOGKdTaLASYby+29bt5i8yzvFHDau1ZMVn3R0i7Vw9r 7vK6rptqawbUjul3yNVDXtL4qb5XUOE+LsQFM2KtE4wI3dvsdKzhP48V/p/yIGlWpgM5K0 dLFOZG/vmSmUGzqRdkfZsutVeUSyoFUCrfXhrv8RefUOovshty9NocaFUqOMUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJm16NczXQ9; Tue, 15 Oct 2024 17:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHh46E061987; Tue, 15 Oct 2024 17:43:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHh45o061984; Tue, 15 Oct 2024 17:43:04 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:04 GMT Message-Id: <202410151743.49FHh45o061984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 8d6806cd08c0 - main - ena: Update license signatures to 2024 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d6806cd08c093fc001db1f94cf122368b8d1549 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=8d6806cd08c093fc001db1f94cf122368b8d1549 commit 8d6806cd08c093fc001db1f94cf122368b8d1549 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:18 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:31 +0000 ena: Update license signatures to 2024 This commit updates all the license signatures to 2024. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- share/man/man4/ena.4 | 2 +- sys/dev/ena/ena.c | 2 +- sys/dev/ena/ena.h | 2 +- sys/dev/ena/ena_datapath.c | 2 +- sys/dev/ena/ena_datapath.h | 2 +- sys/dev/ena/ena_netmap.c | 2 +- sys/dev/ena/ena_netmap.h | 2 +- sys/dev/ena/ena_rss.c | 2 +- sys/dev/ena/ena_rss.h | 2 +- sys/dev/ena/ena_sysctl.c | 2 +- sys/dev/ena/ena_sysctl.h | 2 +- sys/modules/ena/Makefile | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/share/man/man4/ena.4 b/share/man/man4/ena.4 index 50a180871627..0fbe0819978c 100644 --- a/share/man/man4/ena.4 +++ b/share/man/man4/ena.4 @@ -1,6 +1,6 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. +.\" Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 3f2b9c1fb138..fd92b5046f84 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 3e42568ba8a9..be55f63bdb7b 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 66a93bbe7a6c..0691444f5357 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_datapath.h b/sys/dev/ena/ena_datapath.h index 43292b5abbe9..9edf54fe502a 100644 --- a/sys/dev/ena/ena_datapath.h +++ b/sys/dev/ena/ena_datapath.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index d95f48f7380c..ae2140d1217c 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_netmap.h b/sys/dev/ena/ena_netmap.h index 598fcf1f08b2..4ee8338e4009 100644 --- a/sys/dev/ena/ena_netmap.h +++ b/sys/dev/ena/ena_netmap.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_rss.c b/sys/dev/ena/ena_rss.c index 41fa9c62f94a..b7706e33065d 100644 --- a/sys/dev/ena/ena_rss.c +++ b/sys/dev/ena/ena_rss.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_rss.h b/sys/dev/ena/ena_rss.h index 1c1c89261b35..64dd41851fec 100644 --- a/sys/dev/ena/ena_rss.h +++ b/sys/dev/ena/ena_rss.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index 5eaa3c3e76c3..9f49db9a2f41 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_sysctl.h b/sys/dev/ena/ena_sysctl.h index 4f5834214005..df9cc8cb592f 100644 --- a/sys/dev/ena/ena_sysctl.h +++ b/sys/dev/ena/ena_sysctl.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/modules/ena/Makefile b/sys/modules/ena/Makefile index f8b71588afa1..bfa4cf6da430 100644 --- a/sys/modules/ena/Makefile +++ b/sys/modules/ena/Makefile @@ -1,7 +1,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. +# Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. # All rights reserved. # # Redistribution and use in source and binary forms, with or without From nobody Tue Oct 15 17:43: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 4XShJn3TNYz5Ylc6; Tue, 15 Oct 2024 17:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJn2CsFz4Z8Q; Tue, 15 Oct 2024 17:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RLY5Ro9D6PL9vDHAKYSeybSGOae+gySqJnNjMKsyASs=; b=eNM044GerMo9uAcj2eT+KcrIgAiKRvOJKLvQiu7Yg0/CWwdXutp1DGHwbfKtbLAx9MfuSg zpHVhlpMl5xBC5Jwi38lfuvKgU3Lj9Khd/hPkhQFcWg58E/VXEabMnY2DRBScHj9JXSgQK eNOOCdPP7QKY5fT5d9OE33NWnk2K+4BhXWb+jyvTThNuH3husL6L/Mb2YZcRNg/biLhIF+ WacVPIEMmlx+IcBqsvmwdWta7ZisCI+GYkleJEhGZPa3yQ5y5cj+Z6vjC5iaeRIOc9qR7q q/ytIwkDdmz5G9mIOZuJ+U+LY3h3yVfdvlcAwcVjdDnGTApsYbrvMscrxfnOYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RLY5Ro9D6PL9vDHAKYSeybSGOae+gySqJnNjMKsyASs=; b=Ga1J5Kl/9tfFNjHaeaCUQw6VzKkAtqQdgS/NJJAEmMqjfjqQ+5aHX/gXSKfMbomDLVVw7b p3SImeRKyBzYsiAJEvyIag859AWRZAhtcfb1oxAQ8/6iQ1Ng2pBUceaIYUC/8CHzWQhPxC MAfg9AbDVWk/IP1pCab6NEcgq7ZwbGIh4Fp0oqsz8Xumw2+WvB46e00HHaW0YuleKpJzH4 AVpadsRuCVBbNBp8XvFgpTtb8SzuTWzJK4FtC1rih/PMZW0oMNUYpJJFpAGQTukUKTsswQ 4TUbSc8lnhe1JsXGNXT9GDSuImo9SJfNINo7St1VMm14q9tnQahaUPGxYsfovg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014185; a=rsa-sha256; cv=none; b=WYICB+dyDEs4y5LqmUEn8kQStekS+IqODJ+QNSYUSV0Y/dDaKZNHSPTAlRoeivVQvIIq/W EOSmkH7UsBzKg1oA4HF3eVNCc5v2p/9OgzpPGO7wwRlUyCQrnXlaexDRgX5oY7ZRObaXB4 M2KflREIMzFuvhoGIuB86y8CKXjIsJnZE832R619rAVwrIdMc0rfGXIryTcsah0RaalU98 J/n89hwOxZf20AoglHwSG8lfL1+b8cT/5Kf7nb0aZNZ8FZ+u8lrrvyfaQqNIsvB2M7NHWA WTfUofxzN6FWrp1gVnvD38MGmjOKFtUrPAZ1OECw3tEhpcyV3IqflmDB7Vwigg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJn1qXMzXdC; Tue, 15 Oct 2024 17:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHh5qw062030; Tue, 15 Oct 2024 17:43:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHh5rm062027; Tue, 15 Oct 2024 17:43:05 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:05 GMT Message-Id: <202410151743.49FHh5rm062027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 89ce3f6314f6 - main - ena: Improve reset reason statistics 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89ce3f6314f6feba0e6626be51832d44df611218 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=89ce3f6314f6feba0e6626be51832d44df611218 commit 89ce3f6314f6feba0e6626be51832d44df611218 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:19 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:31 +0000 ena: Improve reset reason statistics The driver uses different reset reasons. Some of them are counted and presented in the driver statistics. There are cases where statistics are counted on a ring level, but these are zeroed after a reset procedure takes place. This commit makes the following changes: 1. Add statistics for the unrepresented reset reasons. 2. Add reset reasons which are counted on a ring level, to be also global for better tracking. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 2 -- sys/dev/ena/ena.h | 42 ++++++++++++++++++++++++++++++++++++++++++ sys/dev/ena/ena_sysctl.c | 16 ++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index fd92b5046f84..7c86c0594daf 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3014,7 +3014,6 @@ check_for_missing_keep_alive(struct ena_adapter *adapter) time = getsbinuptime() - timestamp; if (unlikely(time > adapter->keep_alive_timeout)) { ena_log(adapter->pdev, ERR, "Keep alive watchdog timeout.\n"); - counter_u64_add(adapter->dev_stats.wd_expired, 1); ena_trigger_reset(adapter, ENA_REGS_RESET_KEEP_ALIVE_TO); } } @@ -3026,7 +3025,6 @@ check_for_admin_com_state(struct ena_adapter *adapter) if (unlikely(ena_com_get_admin_running_state(adapter->ena_dev) == false)) { ena_log(adapter->pdev, ERR, "ENA admin queue is not in running state!\n"); - counter_u64_add(adapter->dev_stats.admin_q_pause, 1); ena_trigger_reset(adapter, ENA_REGS_RESET_ADMIN_TO); } } diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index be55f63bdb7b..4ac79edd0016 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -381,6 +381,14 @@ struct ena_stats_dev { counter_u64_t interface_up; counter_u64_t interface_down; counter_u64_t admin_q_pause; + counter_u64_t total_resets; + counter_u64_t os_trigger; + counter_u64_t missing_tx_cmpl; + counter_u64_t bad_rx_req_id; + counter_u64_t bad_tx_req_id; + counter_u64_t bad_rx_desc_num; + counter_u64_t invalid_state; + counter_u64_t missing_intr; }; struct ena_hw_stats { @@ -519,6 +527,29 @@ struct ena_adapter { extern struct sx ena_global_lock; +#define ENA_RESET_STATS_ENTRY(reset_reason, stat) \ + [reset_reason] = { \ + .stat_offset = offsetof(struct ena_stats_dev, stat) / sizeof(u64), \ + .has_counter = true \ +} + +struct ena_reset_stats_offset { + int stat_offset; + bool has_counter; +}; + +static const struct ena_reset_stats_offset resets_to_stats_offset_map[ENA_REGS_RESET_LAST] = { + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_KEEP_ALIVE_TO, wd_expired), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_ADMIN_TO, admin_q_pause), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_OS_TRIGGER, os_trigger), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_MISS_TX_CMPL, missing_tx_cmpl), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_INV_RX_REQ_ID, bad_rx_req_id), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_INV_TX_REQ_ID, bad_tx_req_id), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_TOO_MANY_RX_DESCS, bad_rx_desc_num), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_DRIVER_INVALID_STATE, invalid_state), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_MISS_INTERRUPT, missing_intr), +}; + int ena_up(struct ena_adapter *adapter); void ena_down(struct ena_adapter *adapter); int ena_restore_device(struct ena_adapter *adapter); @@ -547,6 +578,17 @@ ena_trigger_reset(struct ena_adapter *adapter, enum ena_regs_reset_reason_types reset_reason) { if (likely(!ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter))) { + const struct ena_reset_stats_offset *ena_reset_stats_offset = + &resets_to_stats_offset_map[reset_reason]; + + if (ena_reset_stats_offset->has_counter) { + uint64_t *stat_ptr = (uint64_t *)&adapter->dev_stats + + ena_reset_stats_offset->stat_offset; + + counter_u64_add((counter_u64_t)(*stat_ptr), 1); + } + + counter_u64_add(adapter->dev_stats.total_resets, 1); adapter->reset_reason = reset_reason; ENA_FLAG_SET_ATOMIC(ENA_FLAG_TRIGGER_RESET, adapter); } diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index 9f49db9a2f41..1298e03b35a4 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -280,6 +280,22 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) "Network interface down count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "admin_q_pause", CTLFLAG_RD, &dev_stats->admin_q_pause, "Admin queue pauses"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "os_trigger", CTLFLAG_RD, + &dev_stats->os_trigger, "OS trigger count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "missing_tx_cmpl", CTLFLAG_RD, + &dev_stats->missing_tx_cmpl, "Missing TX completions resets count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "bad_rx_req_id", CTLFLAG_RD, + &dev_stats->bad_rx_req_id, "Bad RX req id count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "bad_tx_req_id", CTLFLAG_RD, + &dev_stats->bad_tx_req_id, "Bad TX req id count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "bad_rx_desc_num", CTLFLAG_RD, + &dev_stats->bad_rx_desc_num, "Bad RX descriptors number count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "invalid_state", CTLFLAG_RD, + &dev_stats->invalid_state, "Driver invalid state count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "missing_intr", CTLFLAG_RD, + &dev_stats->missing_intr, "Missing interrupt count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "total_resets", CTLFLAG_RD, + &dev_stats->total_resets, "Total resets count"); for (i = 0; i < adapter->num_io_queues; ++i, ++tx_ring, ++rx_ring) { snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i); From nobody Tue Oct 15 17:43: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 4XShJp5FkZz5YlWK; Tue, 15 Oct 2024 17:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJp3V1kz4Z8l; Tue, 15 Oct 2024 17:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6D6rGj2WgbtNDUXll5o1jWUQIocTxddnChNf6iiBzH0=; b=N6+1g5t+zx38zfGAEsE2SnzyaXRNwPKkhf6AlOnx9i3KLcRzwxlnLpFLnc+dFKa1DudTc1 rsM97sNJ4VHZAm+Z2odyFF9zSaR92Qae487QvzU2QcLX5b2WaQ8bi+/ciCqrwXqIm9eUqJ jyb2U2/tNJdls8wE2Jw6nUWKIPTNt3vz3b/PXl4La5GHgLVvFAghMTdvN8eZMtHWAeU0jV B4Xib1alyA4lpiY+YdWyuajiuNHyX9iQC+6S7/9u9Qfm83mym+/UtLXULZeJpogsJhuWod TGeY7BKhCz54D8TvvUCMXGcG+AYAAGs8NWvR+99b3i6NKxzvbhsVdfkGWSdyVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6D6rGj2WgbtNDUXll5o1jWUQIocTxddnChNf6iiBzH0=; b=HwqYVBnKF6U/QLNgJZJybEKVzArpA9tX2ZguEYf8kdib85mkNljLM7kwbg7dZBlDvU4orp N0BB8Dc16SWb6989TeBsId50YL7XiSPjdlD4GWUhtnuovKprehAWfEFXViXxcw2z+yFjnI 6/6xkaVsaedPupK2WbSS1kAY9drMDsuXhbCW1EOzHgv/pgqZq7uIU9JIXDWQk6aNnQpiM2 8alywSb68aDZ6xD0S+TIiPjOoeZi26gkfvLhvJUGu8tVqyuZmvQCtZMbCtZABIN+OOAeII 133t2A1GeX5shQdQDLSkEUqjtC+uAPmpcNZm/8BPuQW+i5n0laJNBuKAlOCMsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014186; a=rsa-sha256; cv=none; b=TvcNt1CDX7S53+B+vyug0IfHHAsORHazcFJuz2dctEc5kRcQPp3VnriDYpkpA5upp78+gn UmMWdPPxE+0oVGW2ycLSrJqxtvEHeGd3bwQ8k5ZR742a+iM9duYKDPDhqjI64GTKwPvdhG ogFpLRUABy8xsinNGHh7Bb6Sy/DGTbpS/+sRqstn0BDRQmqoGAVyPYL/qKlyrc0timUsOK HX/065QiQlV6UlhD4eM/WM5WH7jfiQ9tlDjvqLqQgkjkQXNoAlJSMUhB6bIx64FjZHHEHO UBxpi0htNC8ch71HFkPexKBfVbvngarXRudJ9JD7pT6ICkkC0mo3hcJFVeFkiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJp2s4nzXLx; Tue, 15 Oct 2024 17:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHh6jg062081; Tue, 15 Oct 2024 17:43:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHh6PP062078; Tue, 15 Oct 2024 17:43:06 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:06 GMT Message-Id: <202410151743.49FHh6PP062078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 387272184600 - main - ena: Add reset reason for corrupted TX cdescs 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38727218460008a500fbc18f08c90082ed678895 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=38727218460008a500fbc18f08c90082ed678895 commit 38727218460008a500fbc18f08c90082ed678895 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:19 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:31 +0000 ena: Add reset reason for corrupted TX cdescs TX completion descriptors may sometimes contain errors due to corruption. Upon identifying such a case, the driver will trigger a reset with an explicit reset reason ENA_REGS_RESET_TX_DESCRIPTOR_MALFORMED. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 26 ++++++++++++++++++++++++++ sys/dev/ena/ena.h | 3 +++ sys/dev/ena/ena_datapath.c | 27 ++++++++++----------------- sys/dev/ena/ena_netmap.c | 38 ++++++++++++++------------------------ sys/dev/ena/ena_sysctl.c | 2 ++ 5 files changed, 55 insertions(+), 41 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 7c86c0594daf..3f3a4946ccca 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -560,6 +560,32 @@ ena_free_rx_dma_tag(struct ena_adapter *adapter) return (ret); } +int +validate_tx_req_id(struct ena_ring *tx_ring, uint16_t req_id, int tx_req_id_rc) +{ + struct ena_adapter *adapter = tx_ring->adapter; + enum ena_regs_reset_reason_types reset_reason = ENA_REGS_RESET_INV_TX_REQ_ID; + + if (unlikely(tx_req_id_rc != 0)) { + if (tx_req_id_rc == ENA_COM_FAULT) { + reset_reason = ENA_REGS_RESET_TX_DESCRIPTOR_MALFORMED; + ena_log(adapter->pdev, ERR, + "TX descriptor malformed. req_id %hu qid %hu\n", + req_id, tx_ring->qid); + } else if (tx_req_id_rc == ENA_COM_INVAL) { + ena_log_nm(adapter->pdev, WARN, + "Invalid req_id %hu in qid %hu\n", + req_id, tx_ring->qid); + counter_u64_add(tx_ring->tx_stats.bad_req_id, 1); + } + + ena_trigger_reset(adapter, reset_reason); + return (EFAULT); + } + + return (0); +} + static void ena_release_all_tx_dmamap(struct ena_ring *tx_ring) { diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 4ac79edd0016..22c42a9346f7 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -389,6 +389,7 @@ struct ena_stats_dev { counter_u64_t bad_rx_desc_num; counter_u64_t invalid_state; counter_u64_t missing_intr; + counter_u64_t tx_desc_malformed; }; struct ena_hw_stats { @@ -548,6 +549,7 @@ static const struct ena_reset_stats_offset resets_to_stats_offset_map[ENA_REGS_R ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_TOO_MANY_RX_DESCS, bad_rx_desc_num), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_DRIVER_INVALID_STATE, invalid_state), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_MISS_INTERRUPT, missing_intr), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_TX_DESCRIPTOR_MALFORMED, tx_desc_malformed), }; int ena_up(struct ena_adapter *adapter); @@ -562,6 +564,7 @@ int ena_update_queue_size(struct ena_adapter *adapter, uint32_t new_tx_size, int ena_update_io_queue_nb(struct ena_adapter *adapter, uint32_t new_num); int ena_update_base_cpu(struct ena_adapter *adapter, int new_num); int ena_update_cpu_stride(struct ena_adapter *adapter, uint32_t new_num); +int validate_tx_req_id(struct ena_ring *tx_ring, uint16_t req_id, int tx_req_id_rc); static inline int ena_mbuf_count(struct mbuf *mbuf) { diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 0691444f5357..c63a8914f9c2 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -200,29 +200,22 @@ ena_get_tx_req_id(struct ena_ring *tx_ring, struct ena_com_io_cq *io_cq, uint16_t *req_id) { struct ena_adapter *adapter = tx_ring->adapter; - int rc; + int rc = ena_com_tx_comp_req_id_get(io_cq, req_id); - rc = ena_com_tx_comp_req_id_get(io_cq, req_id); - if (rc == ENA_COM_TRY_AGAIN) + if (unlikely(rc == ENA_COM_TRY_AGAIN)) return (EAGAIN); - if (unlikely(rc != 0)) { - ena_log(adapter->pdev, ERR, "Invalid req_id %hu in qid %hu\n", + rc = validate_tx_req_id(tx_ring, *req_id, rc); + + if (unlikely(tx_ring->tx_buffer_info[*req_id].mbuf == NULL)) { + ena_log(adapter->pdev, ERR, + "tx_info doesn't have valid mbuf. req_id %hu qid %hu\n", *req_id, tx_ring->qid); - counter_u64_add(tx_ring->tx_stats.bad_req_id, 1); - goto err; + ena_trigger_reset(adapter, ENA_REGS_RESET_INV_TX_REQ_ID); + rc = EFAULT; } - if (tx_ring->tx_buffer_info[*req_id].mbuf != NULL) - return (0); - - ena_log(adapter->pdev, ERR, - "tx_info doesn't have valid mbuf. req_id %hu qid %hu\n", - *req_id, tx_ring->qid); -err: - ena_trigger_reset(adapter, ENA_REGS_RESET_INV_TX_REQ_ID); - - return (EFAULT); + return (rc); } /** diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index ae2140d1217c..618d25a07f67 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -71,7 +71,6 @@ static void ena_netmap_unmap_last_socket_chain(struct ena_netmap_ctx *, struct ena_tx_buffer *); static void ena_netmap_tx_cleanup(struct ena_netmap_ctx *); static uint16_t ena_netmap_tx_clean_one(struct ena_netmap_ctx *, uint16_t); -static inline int validate_tx_req_id(struct ena_ring *, uint16_t); static int ena_netmap_rx_frames(struct ena_netmap_ctx *); static int ena_netmap_rx_frame(struct ena_netmap_ctx *); static int ena_netmap_rx_load_desc(struct ena_netmap_ctx *, uint16_t, int *); @@ -795,25 +794,33 @@ ena_netmap_unmap_last_socket_chain(struct ena_netmap_ctx *ctx, static void ena_netmap_tx_cleanup(struct ena_netmap_ctx *ctx) { + struct ena_ring *tx_ring = ctx->ring; + int rc; uint16_t req_id; uint16_t total_tx_descs = 0; ctx->nm_i = ctx->kring->nr_hwtail; - ctx->nt = ctx->ring->next_to_clean; + ctx->nt = tx_ring->next_to_clean; /* Reclaim buffers for completed transmissions */ - while (ena_com_tx_comp_req_id_get(ctx->io_cq, &req_id) >= 0) { - if (validate_tx_req_id(ctx->ring, req_id) != 0) + do { + rc = ena_com_tx_comp_req_id_get(ctx->io_cq, &req_id); + if(unlikely(rc == ENA_COM_TRY_AGAIN)) break; + + rc = validate_tx_req_id(tx_ring, req_id, rc); + if(unlikely(rc != 0)) + break; + total_tx_descs += ena_netmap_tx_clean_one(ctx, req_id); - } + } while (1); ctx->kring->nr_hwtail = ctx->nm_i; if (total_tx_descs > 0) { /* acknowledge completion of sent packets */ - ctx->ring->next_to_clean = ctx->nt; - ena_com_comp_ack(ctx->ring->ena_com_io_sq, total_tx_descs); + tx_ring->next_to_clean = ctx->nt; + ena_com_comp_ack(tx_ring->ena_com_io_sq, total_tx_descs); } } @@ -856,23 +863,6 @@ ena_netmap_tx_clean_one(struct ena_netmap_ctx *ctx, uint16_t req_id) return tx_info->tx_descs; } -static inline int -validate_tx_req_id(struct ena_ring *tx_ring, uint16_t req_id) -{ - struct ena_adapter *adapter = tx_ring->adapter; - - if (likely(req_id < tx_ring->ring_size)) - return (0); - - ena_log_nm(adapter->pdev, WARN, "Invalid req_id %hu in qid %hu\n", - req_id, tx_ring->qid); - counter_u64_add(tx_ring->tx_stats.bad_req_id, 1); - - ena_trigger_reset(adapter, ENA_REGS_RESET_INV_TX_REQ_ID); - - return (EFAULT); -} - static int ena_netmap_rxsync(struct netmap_kring *kring, int flags) { diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index 1298e03b35a4..f6f9f68e6334 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -294,6 +294,8 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) &dev_stats->invalid_state, "Driver invalid state count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "missing_intr", CTLFLAG_RD, &dev_stats->missing_intr, "Missing interrupt count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "tx_desc_malformed", CTLFLAG_RD, + &dev_stats->tx_desc_malformed, "TX descriptors malformed count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "total_resets", CTLFLAG_RD, &dev_stats->total_resets, "Total resets count"); From nobody Tue Oct 15 17:43: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 4XShJr2Nqnz5Ylyk; Tue, 15 Oct 2024 17:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJq4Gshz4Z7Z; Tue, 15 Oct 2024 17:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+XvrOdqqdnbVCCJlHdfz0DjP2EFdEJw6mffb2zoSz5w=; b=rTxzDdg4llqezcFXdRDX2g9w4LIlyQxSqXGe3YCaie9g9YcoIiZipzoCRJdBHAKVP4kSp3 y/6vHldHTUYZHpe2BXG/RpQBoGRZihO51GlErZKg0g+78PTpCTl1WeVI4ajw4Wr0B5pkMn O+VkVJv+vPi3m6jbioB0zTOzv7EtUpGh9hmyFAatdWURo9L6UweDdR+Ld23seAH+m6cLqt BfSAVI/T826F/vDWMXc2J7ObKJ0yTc7BO2mE6DPO3PzHNwfoojhAoAtmeby6LE9cS9W/Zt uQjUi7rO9+T/wDtPsX1KuGNIQL59nlvjl05XWQ0UcbxbDFUF+e4FwvOGt8ytHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+XvrOdqqdnbVCCJlHdfz0DjP2EFdEJw6mffb2zoSz5w=; b=uq7KPPtul9WJx55/D6a0PYYPOCTMIcFHQ2M8orpTw2ZGBIChsGE5TmP3L5xr6OgLrl0zAy Vd2n79UEs3LXH7mCxkg+w8Vz/S/K59TBnKrhRiykuE3wTRpjRt/OtXKDkJRHzIZKOiKDrS 6vl3+Qi0hBMHs5Ukgz5INfst8D+/ep7iMz6QAsJFG1nZwwGHDu4QCypftGEh1BcaxGF6vo cPGZoVp9WAVnb5lqBXSFsiaFi/Vo3CbzqPN5Fyq+i5SmS8K4hXWaRu5OXOmKxGEd0y8mIt jV+FOYfKkUbCSLziX7ZhV4AqhHZ8cBCnh9xl7cyISOcFLnGa+GA8sznUxG/MCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014187; a=rsa-sha256; cv=none; b=VJDgsocZETUbR3bIkK3nwFq+JjRRCcJaw/wCYR908eGfQsxMQBR+crDZM6/rzVEF6DuF3a u9L6iEPITgujOWUl4Gxe2KB7G2855/kGImUKszmd3dr0VJavcIzDTrxsUbhSDLVlsm4d97 bmBmIvm7rQddy6TnxzBnlRaYQjyFhgi2bmo0rcMChdsuWkvBzQr5lCAT65wYwHK5+PgVqd mbH8paGb+D5zh9tXFldHsQ6LAaLrsskfxm+Qzo7tXTAoavVBxrSWeZZ/zO3IV4Y7r85KHf B3mNJTuEyoTGFBSsupfBqEVyueeXAZ8JUJCgKCceUD/mehlNwCLy8pRMdbCkAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJq3vFRzX9S; Tue, 15 Oct 2024 17:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHh7QC062138; Tue, 15 Oct 2024 17:43:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHh7QV062135; Tue, 15 Oct 2024 17:43:07 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:07 GMT Message-Id: <202410151743.49FHh7QV062135@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 4af71159db3c - main - ena: Add reset reason for corrupted RX cdescs 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4af71159db3cd4a37055b2b3d982ec53703c5c3d Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=4af71159db3cd4a37055b2b3d982ec53703c5c3d commit 4af71159db3cd4a37055b2b3d982ec53703c5c3d Author: Osama Abboud AuthorDate: 2024-08-07 06:24:19 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:31 +0000 ena: Add reset reason for corrupted RX cdescs RX completion descriptors may sometimes contain errors due to corruption. Upon identifying such a case, the driver will trigger a reset with an explicit reset reason ENA_REGS_RESET_RX_DESCRIPTOR_MALFORMED. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.h | 2 ++ sys/dev/ena/ena_datapath.c | 2 ++ sys/dev/ena/ena_netmap.c | 2 ++ sys/dev/ena/ena_sysctl.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 22c42a9346f7..b747736224d8 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -390,6 +390,7 @@ struct ena_stats_dev { counter_u64_t invalid_state; counter_u64_t missing_intr; counter_u64_t tx_desc_malformed; + counter_u64_t rx_desc_malformed; }; struct ena_hw_stats { @@ -550,6 +551,7 @@ static const struct ena_reset_stats_offset resets_to_stats_offset_map[ENA_REGS_R ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_DRIVER_INVALID_STATE, invalid_state), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_MISS_INTERRUPT, missing_intr), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_TX_DESCRIPTOR_MALFORMED, tx_desc_malformed), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_RX_DESCRIPTOR_MALFORMED, rx_desc_malformed), }; int ena_up(struct ena_adapter *adapter); diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index c63a8914f9c2..6cbe46cead3e 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -599,6 +599,8 @@ ena_rx_cleanup(struct ena_ring *rx_ring) counter_u64_add(rx_ring->rx_stats.bad_desc_num, 1); reset_reason = ENA_REGS_RESET_TOO_MANY_RX_DESCS; + } else if (rc == ENA_COM_FAULT) { + reset_reason = ENA_REGS_RESET_RX_DESCRIPTOR_MALFORMED; } else { counter_u64_add(rx_ring->rx_stats.bad_req_id, 1); diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index 618d25a07f67..0666d7deb827 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -938,6 +938,8 @@ ena_netmap_rx_frame(struct ena_netmap_ctx *ctx) if (rc == ENA_COM_NO_SPACE) { counter_u64_add(ctx->ring->rx_stats.bad_desc_num, 1); reset_reason = ENA_REGS_RESET_TOO_MANY_RX_DESCS; + } else if (rc == ENA_COM_FAULT) { + reset_reason = ENA_REGS_RESET_RX_DESCRIPTOR_MALFORMED; } else { counter_u64_add(ctx->ring->rx_stats.bad_req_id, 1); reset_reason = ENA_REGS_RESET_INV_RX_REQ_ID; diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index f6f9f68e6334..79c167221a0f 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -296,6 +296,8 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) &dev_stats->missing_intr, "Missing interrupt count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "tx_desc_malformed", CTLFLAG_RD, &dev_stats->tx_desc_malformed, "TX descriptors malformed count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "rx_desc_malformed", CTLFLAG_RD, + &dev_stats->rx_desc_malformed, "RX descriptors malformed count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "total_resets", CTLFLAG_RD, &dev_stats->total_resets, "Total resets count"); From nobody Tue Oct 15 17:43: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 4XShJs19BWz5Ym27; Tue, 15 Oct 2024 17:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJr56ssz4YwM; Tue, 15 Oct 2024 17:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCxhOlH8rE0msnn0sWpfjPVk5Sj0/egbYfKzHmvagp0=; b=dTEW9q3/Mnf25w9KrelTHWbw13T5g8wdJGqLKp8zwY48f7SCWcfJggRws/9TeBk8lSDqYI TYfECHdL4oBMjrTEA1RYECexMSPvRWK+noq1KgWUsaALr8S8VJ3BodFdAHjwqOYcHcFgec B/4aD5BEx3xUuixhhPiRdSqdHeuv28OkdZeEdXeanvrU4R8Xvu/7xR4APxCCBkumreAxzm 7lkkRIjcGt3EamU2SFM0Qdm+Bq2pbez/1kTlxSVVK5x1wYHndqky/CAgEgLZuWdbsJRQto 7oNXvSPhWT2g7b537ZFLGgE5fQRBOTi9aXuQ3t8p4nhkC9yjauWJ7qyArFVUcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCxhOlH8rE0msnn0sWpfjPVk5Sj0/egbYfKzHmvagp0=; b=j//7B7pl/0n4mcgXW4iC0+zoUUAgsSdWHo2iHycfgk28kn4/h2pGIfYm3/KbR/Ixsod9EJ Z0elolB4+G33zMZTXupGV6ZvJCBCoEg35LoUt2NOkB37aIa+aHV2BKXEzNwZtpaWoybNuz arLq4iPlm176bEeiykRbEmxq14cQJIsY+WZQfGniEw1uUR/kBd4zAsXDzybjY6cbkQRP2+ BYjqXGnFLe4SNxzvK4OSuZszWTaJ1IdZlDtuSLXyGThyqJBcV12TyA8mMw6uLorel7dAEZ 0QFtMgBmiMM1z3iESYjmC9gRf80K24J9sUA+M3SUG71mFV1HaDuImdqrjtQNsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014188; a=rsa-sha256; cv=none; b=fSpfdvC3EYEmghv4/lUo0Xhr2hn/iwNBRSqNiiCtT2kKqwBK6FaaQi67nEb9KYUmS71nTD svbqpx2toelvT1DoVD6bfiOzD+3agq1fLVV1GjnHSJTwCHI+2c5LW/1PEMWvAwDv5SFQmP XcHXVZmgQC2vWjco4X4Lv1QTw0oZA0ezXfYW18EykDVx4PaOPyD1fO1ZeB9csAvs+lrpwA 9D3MRb/sCb6HuvrJOXWI8GZsnNhOgyABqWY//ka3jdFk9r6n1Pry4rrmGNX32cH4k2Qqtp HAOF9wEc8pqjbteonP/DP19EGrysC2ddo+wUZSA+JiItH08VcIWF9K5ROBJ1UQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJr4kzlzX54; Tue, 15 Oct 2024 17:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHh8CQ062191; Tue, 15 Oct 2024 17:43:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHh88G062188; Tue, 15 Oct 2024 17:43:08 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:08 GMT Message-Id: <202410151743.49FHh88G062188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 274319acb484 - main - ena: Add reset reason for missing admin interrupt 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 274319acb48424958242d55e1b0c7d4528da7f70 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=274319acb48424958242d55e1b0c7d4528da7f70 commit 274319acb48424958242d55e1b0c7d4528da7f70 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:19 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:31 +0000 ena: Add reset reason for missing admin interrupt There can be cases when we trigger reset if an admin interrupt is missing. In order to identify this use-case specifically, this commit adds a new reset reason. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 13 +++++++++++-- sys/dev/ena/ena.h | 5 ++++- sys/dev/ena/ena_sysctl.c | 4 ++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 3f3a4946ccca..36e9ac15e8ff 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3029,6 +3029,7 @@ static void check_for_missing_keep_alive(struct ena_adapter *adapter) { sbintime_t timestamp, time; + enum ena_regs_reset_reason_types reset_reason = ENA_REGS_RESET_KEEP_ALIVE_TO; if (adapter->wd_active == 0) return; @@ -3040,7 +3041,10 @@ check_for_missing_keep_alive(struct ena_adapter *adapter) time = getsbinuptime() - timestamp; if (unlikely(time > adapter->keep_alive_timeout)) { ena_log(adapter->pdev, ERR, "Keep alive watchdog timeout.\n"); - ena_trigger_reset(adapter, ENA_REGS_RESET_KEEP_ALIVE_TO); + if (ena_com_aenq_has_keep_alive(adapter->ena_dev)) + reset_reason = ENA_REGS_RESET_MISSING_ADMIN_INTERRUPT; + + ena_trigger_reset(adapter, reset_reason); } } @@ -3048,10 +3052,15 @@ check_for_missing_keep_alive(struct ena_adapter *adapter) static void check_for_admin_com_state(struct ena_adapter *adapter) { + enum ena_regs_reset_reason_types reset_reason = ENA_REGS_RESET_ADMIN_TO; if (unlikely(ena_com_get_admin_running_state(adapter->ena_dev) == false)) { ena_log(adapter->pdev, ERR, "ENA admin queue is not in running state!\n"); - ena_trigger_reset(adapter, ENA_REGS_RESET_ADMIN_TO); + counter_u64_add(adapter->dev_stats.admin_q_pause, 1); + if (ena_com_get_missing_admin_interrupt(adapter->ena_dev)) + reset_reason = ENA_REGS_RESET_MISSING_ADMIN_INTERRUPT; + + ena_trigger_reset(adapter, reset_reason); } } diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index b747736224d8..1a436a702ba1 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -391,6 +391,8 @@ struct ena_stats_dev { counter_u64_t missing_intr; counter_u64_t tx_desc_malformed; counter_u64_t rx_desc_malformed; + counter_u64_t missing_admin_interrupt; + counter_u64_t admin_to; }; struct ena_hw_stats { @@ -542,7 +544,7 @@ struct ena_reset_stats_offset { static const struct ena_reset_stats_offset resets_to_stats_offset_map[ENA_REGS_RESET_LAST] = { ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_KEEP_ALIVE_TO, wd_expired), - ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_ADMIN_TO, admin_q_pause), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_ADMIN_TO, admin_to), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_OS_TRIGGER, os_trigger), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_MISS_TX_CMPL, missing_tx_cmpl), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_INV_RX_REQ_ID, bad_rx_req_id), @@ -552,6 +554,7 @@ static const struct ena_reset_stats_offset resets_to_stats_offset_map[ENA_REGS_R ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_MISS_INTERRUPT, missing_intr), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_TX_DESCRIPTOR_MALFORMED, tx_desc_malformed), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_RX_DESCRIPTOR_MALFORMED, rx_desc_malformed), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_MISSING_ADMIN_INTERRUPT, missing_admin_interrupt), }; int ena_up(struct ena_adapter *adapter); diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index 79c167221a0f..b9c880e2e8e4 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -298,6 +298,10 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) &dev_stats->tx_desc_malformed, "TX descriptors malformed count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "rx_desc_malformed", CTLFLAG_RD, &dev_stats->rx_desc_malformed, "RX descriptors malformed count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "missing_admin_interrupt", CTLFLAG_RD, + &dev_stats->missing_admin_interrupt, "Missing admin interrupts count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "admin_to", CTLFLAG_RD, + &dev_stats->admin_to, "Admin queue timeouts count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "total_resets", CTLFLAG_RD, &dev_stats->total_resets, "Total resets count"); From nobody Tue Oct 15 17:43:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XShJt12Gfz5Ym29; Tue, 15 Oct 2024 17:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJs62lDz4ZL5; Tue, 15 Oct 2024 17:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sm8AcdA4FQli73LdnsJH5FBYGj1Em4gT5mmdNXxdOqg=; b=FYR2eS/UJQl4HyxYtajrMRB+pAF6Qjg9x2BQvYCN8hMQEi+/f5yyaGyq6HdqSKWHT694BK Xdq9Gf9uAf5rD+bh/qZvo2A+jiuVnP5kve6jBGfnjYl5wSKdqjMyUFIsuhrJ+Eik7dVDvq MreIJeslG2WV3qhxkZOpIR9uakZpNaTU3nNvTEIR/OwFwJDF3P0ZD45OjuseSaieiyTumm NVl1UQyVQbwEq7VAsjKlXwtyJiDqTcMiEoy+gtfYoT3XhNHr3Z24cfsqCWlcHcSbvLZEdp 8MfQELjSoutS8+T5faH51RsTURQNQjwufeMoPznDQT9wkJfUy9Zjt+BcGlhoLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sm8AcdA4FQli73LdnsJH5FBYGj1Em4gT5mmdNXxdOqg=; b=TUr1swbBvuUd5VnHq7kRwmLKh81GUdGIHT/tjDLDgxLLiSapnT2JUg3F4VA4nXuka8pADs k1Hjl+mBSbmxypERVlXP6eAJ1kaWoKpvKw+Bq5bFGuAN4kJlYaRmY5u/IsXOBb1Z86tRUT 4vF2WcWfQe4FUVFjl2xZ2jbLV+GYm9Q4Dx0idwKVVoq9svxKJRkZd69AfV0pyhxelufZOq /AOv0XDp/BcZqUelzl5uXwMm/NgrqSetroOl7DdchRJn/m/i3a3kQaYBI5ZdhcDSxVkUBi 7XM6WV4wYU7+s8FJ3wwAnjpgz0lLURaeVHUOrRRByGqo4hzxdZm68HQ58dRbGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014189; a=rsa-sha256; cv=none; b=L0zJmgPeL/A2GehlUUFWOj53C5NU+Dd88lJmEDdqcwKKQIeXg+BN1h1rGasQl718dsd1Ad Riz6XKjMaZSgGVv/m19K87Q8H2G6GVa97ZAV1EnYB2XLXd9k7WJkH3e1JZx7psEg4NySrL 6VHK65UMWqC+mr96wKygaLEmcE0Q3iWRS8RsnfjELDsdvLfzshNx4bHAVcFNnKNIEb8ni5 tZ+ZzCNzh5xpd4BZL1m/RSDPeUrk8Mc1lT5KTBxFlW7ozkYZm3fHBiPCa4mgF9ZJJ/5wEZ RmfuOPf2VGGBbFVt7hFigwxee8AXROBiZPwypJ96rTdIoNxGHRgzPlhJ0itgIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJs5cZqzXQB; Tue, 15 Oct 2024 17:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHh93R062233; Tue, 15 Oct 2024 17:43:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHh9Bm062230; Tue, 15 Oct 2024 17:43:09 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:09 GMT Message-Id: <202410151743.49FHh9Bm062230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 637ff00f2f9b - main - ena: Set ena_min_poll_delay_us default 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 637ff00f2f9bd6c8509d0e2ac8959c7a23f09650 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=637ff00f2f9bd6c8509d0e2ac8959c7a23f09650 commit 637ff00f2f9bd6c8509d0e2ac8959c7a23f09650 Author: osamaabb AuthorDate: 2024-09-23 08:06:41 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:31 +0000 ena: Set ena_min_poll_delay_us default value This commit sets the default value for ena_min_poll_delay_us to 100. This commit does not change the behavior of the driver, the delay is calculated as MAX(ENA_MIN_ADMIN_POLL_US, delay_us), where the first field is already defined as 100. The second parameter, delay_us is taken from ena_min_poll_delay_us which is currently unset - 0. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 2 ++ sys/dev/ena/ena.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 36e9ac15e8ff..8c20596d3d23 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3736,6 +3736,8 @@ ena_attach(device_t pdev) goto err_bus_free; } + ena_dev->ena_min_poll_delay_us = ENA_ADMIN_POLL_DELAY_US; + /* Initially clear all the flags */ ENA_FLAG_ZERO(adapter); diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 1a436a702ba1..876c3cd258aa 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -146,6 +146,8 @@ /* Max number of timeouted packets before device reset */ #define ENA_DEFAULT_TX_CMP_THRESHOLD (128) +#define ENA_ADMIN_POLL_DELAY_US 100 + /* * Supported PCI vendor and devices IDs */ From nobody Tue Oct 15 17:43:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XShJv3cYLz5Ylks; Tue, 15 Oct 2024 17:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJv02wpz4ZTC; Tue, 15 Oct 2024 17:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzZrw+HKt8IcJsIxeKg5j2uT5ggwQUQiPgZPYyfxOvM=; b=agPAvkTBIj9JLRyPvJ8XKhLcBtTO6MIYifd/zxvAYULLXVQKL/gIEfEdBltwfo1ZBp2GT/ 0NSFdtr8ViZ21uAFUr/uTN+0dRgd8rtkxd3nIN1L9MakyOUKm0TW7uKDRth6NcVPckodn1 ur0pxPTvlcMGpWpOg21kbC0GZnig3hsQxY6pmKt5a9U6s8aBUan3+WaBNML1kkKLF7kIew yf3VFAfrAcLoPYrxL8V2+GWgtX3dtwku0VwI6+3rqEOsjnI17jOo+tlwTZQ5yKIqz/7Z1v MktKtcr74/CMPFe2X8LAUKpOMi9W0oNlEszr/ApGwNu9J0EQ8Y5NmPgJ0BTvkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzZrw+HKt8IcJsIxeKg5j2uT5ggwQUQiPgZPYyfxOvM=; b=w9XFPaXEB6esL6qhQdiYQ75UfT9+zMlbuxwxijQ1HVLCC/Xhgwad7W2wcOND7c/gMMU/AN QRW1mSTmmpSpD/eCuO+eLUwrTRHN76egLZPkzS+4hyzT9eksM02J+umVCmw6nKFt1/VJjT 5CVWJTwZEuIMmwn/3stJma7j1E8NNWOhk5KvCO3dgx7G16vba8U3D2V/FCBjuLa88b5zrT svh+JkrWZ7pTIlSKvcVBptY9O53wYZLMxn7asXCZSo0DVefJ/Ri4Nf6Q6l3sk8YXuX4GhP htSpkcCZT1XYdux4niDSs2IieTntumlfuJ37RH4YgVD7i+aNtmzIR/g6CnRXSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014191; a=rsa-sha256; cv=none; b=vv3RBWsp/cKCL9hDiQneTilgaIiGSdwxXrqJPj/mWBhYNjFR3GQtPOmim2ox9NYpJ7BICU H5KCDtNbWf2nX1iEfNWSC0qKBH+g4gtAo2y/fqQ+aufZ9X6pQqG7J47urKpp5zogTbl5c6 j9ddkqlUgiJhxDhFg6z4BXOuyxmsPzDkIibsEu2r7V/TXdm8G6NJdMVvIoshcE2/eVDB19 KGN2Ux/7FNFei6vs70cXfcdRXEAgqKJ2IihwmsqEfVJdsTi1m+DQVFwYRrMnU33bE/CHHh xkrBDHPATMW3pJsAnqnnxQp0C9r+Cr3YC6hbV3JDpJ3Ko/gOuedfSKCfRWGH7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJt6kNJzXLy; Tue, 15 Oct 2024 17:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhAj8062284; Tue, 15 Oct 2024 17:43:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhAVx062281; Tue, 15 Oct 2024 17:43:10 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:10 GMT Message-Id: <202410151743.49FHhAVx062281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: a33ec635d1f6 - main - ena: Add differentiation for missing TX completions reset 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a33ec635d1f6d574d54e6f6d74766d070183be4c Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=a33ec635d1f6d574d54e6f6d74766d070183be4c commit a33ec635d1f6d574d54e6f6d74766d070183be4c Author: Osama Abboud AuthorDate: 2024-08-07 06:24:19 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:31 +0000 ena: Add differentiation for missing TX completions reset This commit adds differentiation for a reset caused by missing tx completions, by verifying if the driver didn't receive tx completions caused by missing interrupts. The cleanup_running field was added to ena_ring because cleanup_task.ta_pending is zeroed before ena_cleanup() runs. Also ena_increment_reset_counter() API was added in order to support only incrementing the reset counter. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- sys/dev/ena/ena.h | 29 ++++++++++++++++++----------- sys/dev/ena/ena_datapath.c | 21 +++++++++++++++------ 3 files changed, 77 insertions(+), 18 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 8c20596d3d23..bbc857004671 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -169,6 +169,9 @@ static int ena_copy_eni_metrics(struct ena_adapter *); static int ena_copy_srd_metrics(struct ena_adapter *); static int ena_copy_customer_metrics(struct ena_adapter *); static void ena_timer_service(void *); +static enum ena_regs_reset_reason_types check_cdesc_in_tx_cq(struct ena_adapter *, + struct ena_ring *); + static char ena_version[] = ENA_DEVICE_NAME ENA_DRV_MODULE_NAME " v" ENA_DRV_MODULE_VERSION; @@ -3088,6 +3091,31 @@ check_for_rx_interrupt_queue(struct ena_adapter *adapter, return (0); } +static enum ena_regs_reset_reason_types +check_cdesc_in_tx_cq(struct ena_adapter *adapter, + struct ena_ring *tx_ring) +{ + device_t pdev = adapter->pdev; + int rc; + u16 req_id; + + rc = ena_com_tx_comp_req_id_get(tx_ring->ena_com_io_cq, &req_id); + /* TX CQ is empty */ + if (rc == ENA_COM_TRY_AGAIN) { + ena_log(pdev, ERR, + "No completion descriptors found in CQ %d\n", + tx_ring->qid); + return ENA_REGS_RESET_MISS_TX_CMPL; + } + + /* TX CQ has cdescs */ + ena_log(pdev, ERR, + "Completion descriptors found in CQ %d", + tx_ring->qid); + + return ENA_REGS_RESET_MISS_INTERRUPT; +} + static int check_missing_comp_in_tx_queue(struct ena_adapter *adapter, struct ena_ring *tx_ring) @@ -3100,6 +3128,8 @@ check_missing_comp_in_tx_queue(struct ena_adapter *adapter, int missing_tx_comp_to; sbintime_t time_offset; int i, rc = 0; + enum ena_regs_reset_reason_types reset_reason = ENA_REGS_RESET_MISS_TX_CMPL; + bool cleanup_scheduled, cleanup_running; getbinuptime(&curtime); @@ -3155,7 +3185,19 @@ check_missing_comp_in_tx_queue(struct ena_adapter *adapter, "The number of lost tx completion is above the threshold " "(%d > %d). Reset the device\n", missed_tx, adapter->missing_tx_threshold); - ena_trigger_reset(adapter, ENA_REGS_RESET_MISS_TX_CMPL); + /* Set the reset flag to prevent ena_cleanup() from running */ + ENA_FLAG_SET_ATOMIC(ENA_FLAG_TRIGGER_RESET, adapter); + /* Need to make sure that ENA_FLAG_TRIGGER_RESET is visible to ena_cleanup() and + * that cleanup_running is visible to check_missing_comp_in_tx_queue() to + * prevent the case of accessing CQ concurrently with check_cdesc_in_tx_cq() + */ + mb(); + cleanup_scheduled = !!(atomic_load_16(&tx_ring->que->cleanup_task.ta_pending)); + cleanup_running = !!(atomic_load_8((&tx_ring->cleanup_running))); + if (!(cleanup_scheduled || cleanup_running)) + reset_reason = check_cdesc_in_tx_cq(adapter, tx_ring); + + adapter->reset_reason = reset_reason; rc = EIO; } /* Add the newly discovered missing TX completions */ @@ -3618,6 +3660,7 @@ ena_reset_task(void *arg, int pending) ENA_LOCK_LOCK(); if (likely(ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter))) { + ena_increment_reset_counter(adapter); ena_destroy_device(adapter, false); ena_restore_device(adapter); diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 876c3cd258aa..c9eb9e8c43d3 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -327,6 +327,7 @@ struct ena_ring { }; uint8_t first_interrupt; + uint8_t cleanup_running; uint16_t no_interrupt_event_cnt; struct ena_com_rx_buf_info ena_bufs[ENA_PKT_MAX_BUFS]; @@ -584,21 +585,27 @@ ena_mbuf_count(struct mbuf *mbuf) } static inline void -ena_trigger_reset(struct ena_adapter *adapter, - enum ena_regs_reset_reason_types reset_reason) +ena_increment_reset_counter(struct ena_adapter *adapter) { - if (likely(!ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter))) { - const struct ena_reset_stats_offset *ena_reset_stats_offset = - &resets_to_stats_offset_map[reset_reason]; + enum ena_regs_reset_reason_types reset_reason = adapter->reset_reason; + const struct ena_reset_stats_offset *ena_reset_stats_offset = + &resets_to_stats_offset_map[reset_reason]; - if (ena_reset_stats_offset->has_counter) { - uint64_t *stat_ptr = (uint64_t *)&adapter->dev_stats + - ena_reset_stats_offset->stat_offset; + if (ena_reset_stats_offset->has_counter) { + uint64_t *stat_ptr = (uint64_t *)&adapter->dev_stats + + ena_reset_stats_offset->stat_offset; - counter_u64_add((counter_u64_t)(*stat_ptr), 1); - } + counter_u64_add((counter_u64_t)(*stat_ptr), 1); + } + + counter_u64_add(adapter->dev_stats.total_resets, 1); +} - counter_u64_add(adapter->dev_stats.total_resets, 1); +static inline void +ena_trigger_reset(struct ena_adapter *adapter, + enum ena_regs_reset_reason_types reset_reason) +{ + if (likely(!ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter))) { adapter->reset_reason = reset_reason; ENA_FLAG_SET_ATOMIC(ENA_FLAG_TRIGGER_RESET, adapter); } diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 6cbe46cead3e..20864d0d2df6 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -77,17 +77,24 @@ ena_cleanup(void *arg, int pending) int qid, ena_qid; int txc, rxc, i; - if (unlikely((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0)) - return; - - ena_log_io(adapter->pdev, DBG, "MSI-X TX/RX routine\n"); - tx_ring = que->tx_ring; rx_ring = que->rx_ring; qid = que->id; ena_qid = ENA_IO_TXQ_IDX(qid); io_cq = &adapter->ena_dev->io_cq_queues[ena_qid]; + atomic_store_8(&tx_ring->cleanup_running, 1); + /* Need to make sure that ENA_FLAG_TRIGGER_RESET is visible to ena_cleanup() and + * that cleanup_running is visible to check_missing_comp_in_tx_queue() to + * prevent the case of accessing CQ concurrently with check_cdesc_in_tx_cq() + */ + mb(); + if (unlikely(((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) || + (ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter)))) + return; + + ena_log_io(adapter->pdev, DBG, "MSI-X TX/RX routine\n"); + atomic_store_8(&tx_ring->first_interrupt, 1); atomic_store_8(&rx_ring->first_interrupt, 1); @@ -95,7 +102,8 @@ ena_cleanup(void *arg, int pending) rxc = ena_rx_cleanup(rx_ring); txc = ena_tx_cleanup(tx_ring); - if (unlikely((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0)) + if (unlikely(((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) || + (ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter)))) return; if ((txc != ENA_TX_BUDGET) && (rxc != ENA_RX_BUDGET)) @@ -107,6 +115,7 @@ ena_cleanup(void *arg, int pending) ENA_TX_IRQ_INTERVAL, true, false); counter_u64_add(tx_ring->tx_stats.unmask_interrupt_num, 1); ena_com_unmask_intr(io_cq, &intr_reg); + atomic_store_8(&tx_ring->cleanup_running, 0); } void From nobody Tue Oct 15 17:43: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 4XShJw4RJKz5YlcL; Tue, 15 Oct 2024 17:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJw16Prz4ZGp; Tue, 15 Oct 2024 17:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a8HFHvQL6CaYAKrD9JZaOw+47tnC4QBecfrz5scraR4=; b=gufmZDdsRH1K+aewz9oghw5nVqJlU70idRE/e4Tesov1aREy5o5RU7a5pHSpaU4Sb9Xy6+ i6/hPwBx6Dp9vVLA7TE3jLIGxdYzPuAnBF/6QWiCtDTr24I6RF6e6bAba1m2oco6r7d7+g u0cx92R4T17uL+sF4bQOqmQWDAv0Ya7LV94D7Djq2r6h5+Yr4WuXcDQgPAEZRuHDXPGyU/ btH7qFBO063YlXUdXgp97cXxsxu4NdY+0YP7wbsyp+ee39OhGwBhLCFX2RvDoeLxVHREwK Uqh2rf3ma4hyV37imcYHXwSWev2bfR4l8xlKKWw95XQlxlcirnogmSnz/5OISQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a8HFHvQL6CaYAKrD9JZaOw+47tnC4QBecfrz5scraR4=; b=sQaxPQF/d1QrEiQUXfMteQ4Yp8DfB11w89io1YU8YZeBc6Fw9FngCxZxEMrOz84dxwI1Q4 7B5TgOUtLZicsC8OQ3NdaOAeNARwdQSrWcEQDr3yRUzupLbgdiigF6kvlEVNP/OLLBBu6i SYpO2nO1cd6oJERYu/pTsqwhIFqnvCMIwd34IPJdfeDw5O+ZvKeplYm0hEOhqf2pJ+VazX nRYwAzFqnAoMaSKOwBiGi5QiJL4kvIodk8+k0vr/p+1pmpOHrE+gjKWXjFRcTwGLBeXpJg OIIH1IREjehnbPsW7ykAcL6+AYSiz0s3fm1iWtPW6TIyR6DupdcT7iCHNpPo+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014192; a=rsa-sha256; cv=none; b=rULw7v/z9D7XV9AQ+LgR8HCwMPevt6nrSUDnU3l9GMlGehL0MKgnLHsqZr0JBZtml/0WEl Ftdm6OKKP7WICQMMZIFKBw2Ce5vOU65ro9eRbIrrEJYUhiT+sKc91zui9arvL04V8q8LZq 9PamnxMEgsCFdJPjxHrpwkU5qKQHB2kYNTs8IEWoEq+A7A7uCIDbt284OTVhUQ41RkiqZM TeGCBI0zBy62Sa/yRa8pt/4gaaLXVRAhvUuJtEwN8zJaxq/CkqBj2Mk3m/ikKMlq47UT7f pEgWtVhLwLw5Y6qAbWLN8qF9zCXHQ42t8+Gimlw0su+WPsPuc+E7xvXDtef5RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJw0kkHzX9T; Tue, 15 Oct 2024 17:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhBcA062338; Tue, 15 Oct 2024 17:43:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhBEx062335; Tue, 15 Oct 2024 17:43:11 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:11 GMT Message-Id: <202410151743.49FHhBEx062335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: da73e3a7d08c - main - ena: Trigger reset when mbuf is NULL error happens 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da73e3a7d08c215a5d8530fea9a9730f8ac3709f Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=da73e3a7d08c215a5d8530fea9a9730f8ac3709f commit da73e3a7d08c215a5d8530fea9a9730f8ac3709f Author: Osama Abboud AuthorDate: 2024-08-07 06:24:20 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +0000 ena: Trigger reset when mbuf is NULL error happens The mbuf is NULL issue happens when the device sends the driver a completion with a wrong request id. Trigger a reset whenever this happens. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena_datapath.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 20864d0d2df6..ab082fa1810f 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -434,7 +434,9 @@ ena_rx_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_buf_info *ena_bufs, req_id = ena_bufs[buf].req_id; rx_info = &rx_ring->rx_buffer_info[req_id]; if (unlikely(rx_info->mbuf == NULL)) { - ena_log(pdev, ERR, "NULL mbuf in rx_info"); + ena_log(pdev, ERR, "NULL mbuf in rx_info. qid %u req_id %u\n", + rx_ring->qid, req_id); + ena_trigger_reset(adapter, ENA_REGS_RESET_INV_RX_REQ_ID); return (NULL); } @@ -476,7 +478,8 @@ ena_rx_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_buf_info *ena_bufs, rx_info = &rx_ring->rx_buffer_info[req_id]; if (unlikely(rx_info->mbuf == NULL)) { - ena_log(pdev, ERR, "NULL mbuf in rx_info"); + ena_log(pdev, ERR, "NULL mbuf in rx_info. qid %u req_id %u\n", + rx_ring->qid, req_id); /* * If one of the required mbufs was not allocated yet, * we can break there. @@ -488,6 +491,7 @@ ena_rx_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_buf_info *ena_bufs, * with hw ring. */ m_freem(mbuf); + ena_trigger_reset(adapter, ENA_REGS_RESET_INV_RX_REQ_ID); return (NULL); } From nobody Tue Oct 15 17:43:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XShJy4ff6z5YlcV; Tue, 15 Oct 2024 17:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJy3Crcz4ZX0; Tue, 15 Oct 2024 17:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6X9jxEW1J6IDmwArQcol5pV/9j6leDHeQAXSUSNTC8=; b=iPxcg6ctd9FebC48Sd2CQcE3kPbMvkCP7ASoWizkhUGqoFhTx+fYVkDYejp9JLHQT0agzd Fj0YZBLk8/Li+3Z2DjZ50Gf7YDRJT/ArX14lsdwOsLvLb0w2PM9YA9Oyg9tfEcoOmIq1/8 E7VlHsidIdj7sfiyMZQ4Q8zuzkJ0Vw2se/ijLm7y9k5Szc9SJViuJBZrprjxk93H9SegwF n0JCzmc6rJA5QApF3Rojm+V4GBcdQ3/AUryDFVyn1Pl/4YZ+gNjkW9KjfwYO77eUoeZg1i p55wxZTImhF5PEVuerKP7+DnMxoaC1M5ztYDRJMZqQfnm0QhZx0HRQ3nF4EFDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6X9jxEW1J6IDmwArQcol5pV/9j6leDHeQAXSUSNTC8=; b=s3YII4sjexAigOG/AvGdGOTdUg8zP2R2td9oS7nilT0LUsm9dKLXVxVY836xTGrEcupWBe 1PS2RNsooRt3K0selue3SO/C0LDu5ScMxmL91aaFW60Q7yZs46eOMqLGyHp6OYdxEL1sF7 Yt1mz+i7ab0RTlPA8q9lilboVDXKf3rbLHX+EKeQ0xz2CetlKpXZ9CTfKgOxWpJSGzk6kw QYkrNI3/gCl1AOG9lYqXb6gFhc2GobWZ6cXg3tpAoP7Qy9jI+F9gy5XoCe1uskEkhK5FoC YR0pB19Pf1QtrRN8eoBdObEC6QQNGVGRKYeM8xjmYejJXkSrH07F/kndlsKdnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014194; a=rsa-sha256; cv=none; b=X3WwF5N1RuOq1Dv62TtPLodYKoVFncWZqwFOYpse3yBtsZIAmLXA52xo8tmvjTIDZ3vXmF Azrg3AwugWaJWhRe6gSOj7ZUx4krGGCrywd3BWLDhaCNW9HiDpOsYdlLK0UPcMtDJw3kwW +4oszeivESvqTUytTeM+dzNLO1Zqc/vP7Oy2gNoWT1qMWtTYgBBpwv5oNkiL10nqfQl7vg VULZayBQ+XzTszmp5Dwyjcx6BqReyIMiPfltAhIMM/iLCTIFFbi6zlkPoPgJZhhNQM+CTd Gq5l9uNvAvOCPTbvifSKbEYsCvbmUBCQlyg3Y/+AiHdSl1NsJH7QRe+Tb1097g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJy2r4hzX9V; Tue, 15 Oct 2024 17:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhEFw062447; Tue, 15 Oct 2024 17:43:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhEMf062444; Tue, 15 Oct 2024 17:43:14 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:14 GMT Message-Id: <202410151743.49FHhEMf062444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: f236e544a2ff - main - ena: Properly unmap last socket chain in netmap 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f236e544a2ff685ae151f3232e3785a6a9aab035 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=f236e544a2ff685ae151f3232e3785a6a9aab035 commit f236e544a2ff685ae151f3232e3785a6a9aab035 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:20 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +0000 ena: Properly unmap last socket chain in netmap In case ena_com_prepare_tx() fails within the netmap tx flow, the driver will unmap the last socket chain. Currently, the driver unmaps the wrong socket within ena_netmap_unmap_last_socket_chain(). Illustration of the flow: 1- ena_netmap_tx_frames() 2- ena_netmap_tx_frame() 3- ena_netmap_tx_map_slots() 3.1- Map slot 3.2- Advance to the next socket 4- ena_com_prepare_tx() 4.1- ena_com_prepare_tx() fails 5- ena_netmap_unmap_last_socket_chain() In step 5, where the driver unmaps the socket, the netmap index already points at the next entry, meaning we're unmapping the wrong socket in case ena_com_prepare_tx() fails. In order to fix that, the driver should first update the netmap index to point at the previous entry and only then update the socket parameters. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena_netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index 0666d7deb827..f14a4a9539d1 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -783,10 +783,10 @@ ena_netmap_unmap_last_socket_chain(struct ena_netmap_ctx *ctx, /* Next, retain the sockets back to the userspace */ n = nm_info->sockets_used; while (n--) { + ctx->nm_i = nm_prev(ctx->nm_i, ctx->lim); ctx->slots[ctx->nm_i].buf_idx = nm_info->socket_buf_idx[n]; ctx->slots[ctx->nm_i].flags = NS_BUF_CHANGED; nm_info->socket_buf_idx[n] = 0; - ctx->nm_i = nm_prev(ctx->nm_i, ctx->lim); } nm_info->sockets_used = 0; } From nobody Tue Oct 15 17:43: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 4XShJx6Q7Jz5Ylkx; Tue, 15 Oct 2024 17:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJx26XFz4ZH6; Tue, 15 Oct 2024 17:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iOrKK3TTW5zmu6b3yyfKGqIE9INh4r1Iv5TtSqpdjgE=; b=eB28SF+ohW4kNzg96pSe53UC5Ine8iYfpw0dMhPOoVX3eqltzuWTPrCjSsgEzW3swt+W5G 7GKmWGEpwKokJD3QCVD6lMYl0SfKRyJ8e13A8RdR0UYskX4KI2G1ID0ECWwuwTzJhS7IjD 1sQiOQ5bmU+Q0lZmD9Hqz0/LqEWyKa2TR8UkJh3IdaeqdI7t4jRiftBXXSAtW5FSq47gMw V039CCbnsBt5NzyUv+7HGCG8IGhzmcuJmQIDZ5y6cxGwGN3gAndpYNr8vhAyko6W1NmxrT 4C54s7km47DPtE6kxV9KaqQFIDTA8nH0eJF9YPuYWQUWcjelwzZY3komwvIs0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iOrKK3TTW5zmu6b3yyfKGqIE9INh4r1Iv5TtSqpdjgE=; b=cwHm13jATgMjN540xTzyabjABgIl/217BEW6u5BIPULG6DRT7EwEe09kfYY9F1pCP47TAc u3I1U2crl4wjl4OHU2MWhBhJmfbl/aOPxB9uI5xGvkAQQGSgit8vU23QYsY46FZiagT0pG uzRO7zEsQS+FI/EEKaWs1s34g1FIcQ9NDOw8gXHUmV4fv0h2MGTamn/32nCPyQ+CTThISh BY4ITpBc5Vmou42x+qO58TY3hV/3Nqh8n/vU6qVqD81SHYvhDPq7ZGwH2jfalI0DHStLQt 3JYPfzJbXxHVqzuJNHBfilQERNVSqkhU7R6P21wSm58hvyuLjZ3BgxGK524Pxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014193; a=rsa-sha256; cv=none; b=hEYtiUId5lnMYUjbFGxRcP1ewrZDXr2DYKE0pjqjPGfke265o7qcZ8q2qDP51MFVZ2OxOk xf9mfeoCUU4yAiLCbx0HKPaohxCgdC0hUEUDtkKFi3RUGSsGRnD0/6JEyEX1BaIiCH/RF4 lStygrq4T+qLASnold+e19a8dOLKfR0kIRQTUK5XdHdMlNe2o70zc5dx2pzXbjdR8A6EN0 TvbykQ3VWOsx/V3fTRu9RCGbuwUZgh+Qv7VBnzbMsn98vYKA+UsTY95uxSTsw0M5FUINeX 8K228MsXFHTrqGUiCAvgVJK1dK8qeZoils81U8uLUUKlmy5YJnUaZBLRSbm0yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJx1hxgzXZr; Tue, 15 Oct 2024 17:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhD34062394; Tue, 15 Oct 2024 17:43:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhDYZ062391; Tue, 15 Oct 2024 17:43:13 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:13 GMT Message-Id: <202410151743.49FHhDYZ062391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 90953d2f829a - main - ena: Make global counters style unified 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90953d2f829a45669b0c88a6a03da481f2d54e46 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=90953d2f829a45669b0c88a6a03da481f2d54e46 commit 90953d2f829a45669b0c88a6a03da481f2d54e46 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:20 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +0000 ena: Make global counters style unified This commit changes the code so all global counters will have the same line break. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena_sysctl.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index b9c880e2e8e4..32fde58c610c 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -275,11 +275,10 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) &dev_stats->wd_expired, "Watchdog expiry count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "interface_up", CTLFLAG_RD, &dev_stats->interface_up, "Network interface up count"); - SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "interface_down", - CTLFLAG_RD, &dev_stats->interface_down, - "Network interface down count"); - SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "admin_q_pause", - CTLFLAG_RD, &dev_stats->admin_q_pause, "Admin queue pauses"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "interface_down", CTLFLAG_RD, + &dev_stats->interface_down, "Network interface down count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "admin_q_pause", CTLFLAG_RD, + &dev_stats->admin_q_pause, "Admin queue pauses"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "os_trigger", CTLFLAG_RD, &dev_stats->os_trigger, "OS trigger count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "missing_tx_cmpl", CTLFLAG_RD, From nobody Tue Oct 15 17:43: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 4XShK015CXz5Ylj6; Tue, 15 Oct 2024 17:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJz3qWQz4ZS3; Tue, 15 Oct 2024 17:43:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tznwAbFnHYqEPzZeqkbVB6SPY8JPsYmEnxIw5CfnYAI=; b=L2roir4JGr1xrwvDe7s2kbhiNRtpcpM4QWJf8T5bFGtOdPEL39rVv1A02JLdsswNti/5GL O1tRnIw6jBAJcOJHHlbQ2gL67BTPrBtA1tvbBmVvOqg7IOEPHEBsf62J8C0RrYO+6xWoVk WTs9JN0TJoq3Pg9LoZciumWXL2ngnLPgLchGisAoc+vfS1s4fNzyUe3K6QB6JI2+6bAfE0 WJbC4PVLCaIzKxpNQhupinMsWJ9Ynq0mfplLrHKT+2ZOVIBOnPlZegZ9NtCMXebUMRzhOz iB1zDFk3U0ux0s9iTLL2XKGzyreywCFFMj/6XCg7U/WH58q1TJ6K5GPQfwELVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tznwAbFnHYqEPzZeqkbVB6SPY8JPsYmEnxIw5CfnYAI=; b=DINe8M/K6WGCEYUPJsLFPW1rJe//wWdeosdX9l/Zb33xZEptTo0OJbgnXFVOjZyD1rIh8f NmKAo4u3iKWiy5GH/Y4EMx3437JWJWKX9bCFbHv5B/aigllsumMssc8FRf3F9zpMYRWC2Q +tYNXHPRCafc7XpFTVroiYEIEqrue58Pbme2WsPLvwoz+mEk0/dYDGDvlk/LUuIp4rYkNT P0ggiYRM7byVsq3xxs9tKu2EKkjMeNURND7da1fgUAB87LBA4ZfXH5lPi6OHCGLIVBz5Kp 1qsMOhkA6shqlFoU6CeS0whigJRy21AbTpxkYle78V/9koe5OxasX5G4odypiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014195; a=rsa-sha256; cv=none; b=n5M9OorliRkt9xO3CVyCggwlqfqy7tVXd7JGw4FFVNLeYiwJDoRm9fG86bi25EChGeRvTB 98AEeaej8c5nRCUJl3D1qyArN9Oky/jSNShu1L0kxCfdTkgh41aSTXw25cNMPT5vK+vv3w 00+tMESD2OYUQt0JG1Hz4ac2lLnqlsMMjUy1vP4KwVZkSLlZkUt9mfnBayv7LtcLzhFPZM a+JT7T93cRtB/I1sQ3/JmRnO8oCEbLaXsoZZGqQ4qKSk7m4ZVtXL6tQh6Ki4xXgSE6T09+ pLa5V+xQENsRrZEuuM5QlJCIw4ouaO3ovdttykSWdYEloHflAyjUangDF6gf6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShJz3Rs8zXM0; Tue, 15 Oct 2024 17:43:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhFTL062498; Tue, 15 Oct 2024 17:43:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhFog062495; Tue, 15 Oct 2024 17:43:15 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:15 GMT Message-Id: <202410151743.49FHhFog062495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: ce20b51cb71b - main - ena: Handle wrap around for prefetch in netmap 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce20b51cb71bfb548fcaafc4bacb8290460f03d5 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=ce20b51cb71bfb548fcaafc4bacb8290460f03d5 commit ce20b51cb71bfb548fcaafc4bacb8290460f03d5 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:20 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +0000 ena: Handle wrap around for prefetch in netmap Netmap index wraps around based on the number of netmap kernel ring slots. Currently the driver prefetches the next slot using nm_i + 1 which may be wrong since it does not handle wrap around. This patch fixes that by using the kernel API for fetching the next netmap index. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena_netmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index f14a4a9539d1..eef8021b8569 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -577,7 +577,7 @@ ena_netmap_tx_map_slots(struct ena_netmap_ctx *ctx, remaining_len = *packet_len; delta = 0; - __builtin_prefetch(&ctx->slots[ctx->nm_i + 1]); + __builtin_prefetch(&ctx->slots[nm_next(ctx->nm_i, ctx->lim)]); if (tx_ring->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV) { /* * When the device is in LLQ mode, the driver will copy @@ -664,7 +664,7 @@ ena_netmap_tx_map_slots(struct ena_netmap_ctx *ctx, * The first segment is already counted in. */ while (delta > 0) { - __builtin_prefetch(&ctx->slots[ctx->nm_i + 1]); + __builtin_prefetch(&ctx->slots[nm_next(ctx->nm_i, ctx->lim)]); frag_len = slot->len; /* @@ -722,7 +722,7 @@ ena_netmap_tx_map_slots(struct ena_netmap_ctx *ctx, /* Map all remaining data (regular routine for non-LLQ mode) */ while (remaining_len > 0) { - __builtin_prefetch(&ctx->slots[ctx->nm_i + 1]); + __builtin_prefetch(&ctx->slots[nm_next(ctx->nm_i, ctx->lim)]); rc = ena_netmap_map_single_slot(ctx->na, slot, adapter->tx_buf_tag, *nm_maps, &vaddr, &paddr); From nobody Tue Oct 15 17:43: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 4XShK22L7Lz5Yll8; Tue, 15 Oct 2024 17:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShK16L2mz4ZMN; Tue, 15 Oct 2024 17:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ylkX1bVMWnL2DPOUpeN/KEY8n/p/UJmtURcOtNWq7ck=; b=G7yS35fN/FTXYW32z7Stiy5zAQ+cijgOfierybvXQmSAZRnBw43DSv7QqSUlz5Dsaw/5xx TUNZAZ78fEOX+6zq4r+E2p356drX8KBFtSJD+F5zg8ZkeOPjLl5GXBYaBcif6EiUq8sf8f HGkuIkTGFItQZxwIWwKaEBYQmkuqc9k9+m5qirpjdlz71CfnuPms8h8lfUXR7n4gADlLtq M5hlMjLr1lMGCw/cvubJ0BbgnaQFOiuB0QbUdUt9QFd+cmD0MTJHGTBQyugkhV6DkdhN+w 0qvdVEH24ap/K3Suv+dHVjH9u8qGe7imiT81KVEHSkAVSoz3RyYUZe4irUR1Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ylkX1bVMWnL2DPOUpeN/KEY8n/p/UJmtURcOtNWq7ck=; b=PLL5LKp6OBO9HMSHb6zDLe4MyaevWZMME72Rx5seNHGBZvrjV9wDH3bZXsp+8VrUrDxbvY jC3H0mfAbfNxzopbXeoerZmg0Gi1dKvQY+jCNktNUeJDv50uGD78IP6pjoehzJ8BtmQIUi 0x5e5jyBsEUJqrNnf9qhWNz8/C0ZTNuUbJEneJy0WrwZGddXJ9KO4ybsugtmSrJQwo+xM6 GidGIF/KD0ydW267oR5z5BL+QPvAltgiohtEgV6Vju6rDI/AbkJMWHsMdgTUqPouGJnb5a v8n9Lz25YL1ZwckV5dseyyabz2/9UjIvgfY8tGdYcO0JOhhsmNWHA2uvcp4Rfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014197; a=rsa-sha256; cv=none; b=Ee7wNf3H8LztKt7zcXWKzmP7pbJI5JjJXMuTXNpaVZw43pYjwHTzEk1muKDkltkrr86kKI cpz3J3IlxB9bdM+lmTbKxduQ8C19WYRs4yPvrxoWfge2oqVjn3Dp8eV2WiNo9dX9dhnKcG diuU28I2o8X1cJkC6PeC20NDfDHDeQM3KNVnWNIgiagHu9ZlVpQKRttAu6aw+Kj2/Ia5NM QrsmKvKdc8fWRXDlvVX1WkvSj0oIzECUhfzNt9P9RuZSUGFA5S6xRr1be80haF6FlQO5rJ iapCl5cOIVl/q3TN9iJzjDxD9fKa12ddLDsBiOccAxVr+rqSlsj9JbM2RLBTQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShK15xcdzXdF; Tue, 15 Oct 2024 17:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhH79062602; Tue, 15 Oct 2024 17:43:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhHdF062599; Tue, 15 Oct 2024 17:43:17 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:17 GMT Message-Id: <202410151743.49FHhHdF062599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: f9c9c01de87e - main - ena: Reinit netmap adapter struct upon sysctl changes 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9c9c01de87e0440380b939c684d9939d48ce175 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=f9c9c01de87e0440380b939c684d9939d48ce175 commit f9c9c01de87e0440380b939c684d9939d48ce175 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:21 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +0000 ena: Reinit netmap adapter struct upon sysctl changes When attaching ENA driver, ena_netmap_attach() is invoked which, in turn calls netmap_attach which, initializes a struct netmap_adapter, allocating the struct's netmap_ring and the struct selinfo. When we change the interface number of queues we need to reinit the netmap adapter struct as well, so we need to detach it in order to free the memory allocated by netmap_attach and allocate new memory based on the new parameters like number of rings, ring size etc... Without detaching and attaching the netmap interface, if we're to change the number of queues from 8 to 2 for example and try to enable netmap, the kernel will panic since the original netmap struct within the kernel's possession still thinks that the driver has 8 queues which will eventually cause a non-allocated virtual address access fault. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index bbc857004671..bfde950cb2b1 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -171,7 +171,9 @@ static int ena_copy_customer_metrics(struct ena_adapter *); static void ena_timer_service(void *); static enum ena_regs_reset_reason_types check_cdesc_in_tx_cq(struct ena_adapter *, struct ena_ring *); - +#ifdef DEV_NETMAP +static int ena_reinit_netmap(struct ena_adapter *adapter); +#endif static char ena_version[] = ENA_DEVICE_NAME ENA_DRV_MODULE_NAME " v" ENA_DRV_MODULE_VERSION; @@ -1162,6 +1164,21 @@ ena_refill_rx_bufs(struct ena_ring *rx_ring, uint32_t num) return (i); } +#ifdef DEV_NETMAP +static int +ena_reinit_netmap(struct ena_adapter *adapter) +{ + int rc; + + netmap_detach(adapter->ifp); + rc = ena_netmap_attach(adapter); + if (rc != 0) + ena_log(adapter->pdev, ERR, "netmap attach failed: %d\n", rc); + + return rc; +} + +#endif /* DEV_NETMAP */ int ena_update_buf_ring_size(struct ena_adapter *adapter, uint32_t new_buf_ring_size) @@ -1179,6 +1196,12 @@ ena_update_buf_ring_size(struct ena_adapter *adapter, /* Reconfigure buf ring for all Tx rings. */ ena_free_all_io_rings_resources(adapter); ena_init_io_rings_advanced(adapter); +#ifdef DEV_NETMAP + rc = ena_reinit_netmap(adapter); + if (rc != 0) + return rc; + +#endif /* DEV_NETMAP */ if (dev_was_up) { /* * If ena_up() fails, it's not because of recent buf_ring size @@ -1196,7 +1219,12 @@ ena_update_buf_ring_size(struct ena_adapter *adapter, adapter->buf_ring_size = old_buf_ring_size; ena_free_all_io_rings_resources(adapter); ena_init_io_rings_advanced(adapter); +#ifdef DEV_NETMAP + rc = ena_reinit_netmap(adapter); + if (rc != 0) + return rc; +#endif /* DEV_NETMAP */ ENA_FLAG_SET_ATOMIC(ENA_FLAG_DEV_UP_BEFORE_RESET, adapter); ena_trigger_reset(adapter, ENA_REGS_RESET_OS_TRIGGER); @@ -1224,6 +1252,12 @@ ena_update_queue_size(struct ena_adapter *adapter, uint32_t new_tx_size, /* Configure queues with new size. */ ena_init_io_rings_basic(adapter); +#ifdef DEV_NETMAP + rc = ena_reinit_netmap(adapter); + if (rc != 0) + return rc; + +#endif /* DEV_NETMAP */ if (dev_was_up) { rc = ena_up(adapter); if (unlikely(rc != 0)) { @@ -1235,7 +1269,12 @@ ena_update_queue_size(struct ena_adapter *adapter, uint32_t new_tx_size, adapter->requested_tx_ring_size = old_tx_size; adapter->requested_rx_ring_size = old_rx_size; ena_init_io_rings_basic(adapter); +#ifdef DEV_NETMAP + rc = ena_reinit_netmap(adapter); + if (rc != 0) + return rc; +#endif /* DEV_NETMAP */ /* And try again. */ rc = ena_up(adapter); if (unlikely(rc != 0)) { @@ -1359,7 +1398,12 @@ ena_update_io_queue_nb(struct ena_adapter *adapter, uint32_t new_num) ena_down(adapter); ena_update_io_rings(adapter, new_num); +#ifdef DEV_NETMAP + rc = ena_reinit_netmap(adapter); + if (rc != 0) + return rc; +#endif /* DEV_NETMAP */ if (dev_was_up) { rc = ena_up(adapter); if (unlikely(rc != 0)) { @@ -1369,7 +1413,12 @@ ena_update_io_queue_nb(struct ena_adapter *adapter, uint32_t new_num) new_num, old_num); ena_update_io_rings(adapter, old_num); +#ifdef DEV_NETMAP + rc = ena_reinit_netmap(adapter); + if (rc != 0) + return rc; +#endif /* DEV_NETMAP */ rc = ena_up(adapter); if (unlikely(rc != 0)) { ena_log(adapter->pdev, ERR, From nobody Tue Oct 15 17:43: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 4XShK33sHwz5YlYj; Tue, 15 Oct 2024 17:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShK30DdJz4ZSf; Tue, 15 Oct 2024 17:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jz2yvjnLH6er26D0OoP/tYL3s53OMufdYSYtLWlNsXM=; b=vc1tdnIgaOCQJeNCw2uoS/qSzs1/VvjstNYozS4MkPgoqJvhQYFBJzoEEiTTmwLKbXeM6j oScUV/+wYBZo2QbweY7EPfkQ7Zbzv72JMxkDDt36LA17+ccpYpItZjvFhD4Cz8K3bZg2Nt DTzZ10B9bCoFCcMb2pRctG1CdpkEkYYAsZdEbUrTa5r98uE0lWGpbrL00oOcWEb3MR1WTv z6YeTGZDEeXhxodfbEWPtw10xUSae/AvDHr9Yzw/IPpkbTNKnCXYSBTwHxRVwk8TQ64z22 1+jLoLP0OYesUzJCItoSXztb7/ro9/ggKOlQEnkLR9tOvLY6CjNHBxcNcwYUwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jz2yvjnLH6er26D0OoP/tYL3s53OMufdYSYtLWlNsXM=; b=JllEr3xODGmTwflMMx3q3WtHJAZ6xaixINFg1swcz40Bbr2KoGf2a4/zw+orzvMx+039mJ rwrmNZ/KlqSbGP9qaBPZ9qK3jsktXCoUNg64P2OzIPmGNtzOTxjs/u0VE7pI7xoU/bIUO/ POPsT9eQi5FxVtHo1kt3xddp61jxScrY23NULGPNHYLzkF4UyfYZItFYenQPruDndbzRUZ rC8m0iVoSzVKvbHEhfeXSkCuAIscV35WtD3bFw4A83xTiyAasfYP0J4BIQGFDP2ZC+0nE2 VfeJlN7LneB1Cf1yyCcARYvEuekks66QXI92+c/7iQuwd4iScyOXoL8933xDmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014199; a=rsa-sha256; cv=none; b=I2mQ+w2QkA+l0u9aoT2NXZ8r4PsCC9Zq0jFjVxH5RxeosBe4p47mG/3lf+qZ5zyfOtP3fR Wds5sCxNgpFLT9hOivf0znlUDz68VykpPG+pi8kX+h/BncjCj+F7Q4hmFRrnEyFPT5X9Es 3v4vQXRqzaftVc3so9pjyKKIOVxclbkJS7HgDfMtrOhKkhsKqr4rJN9qO77id7drJnU3K7 AOnnIqqRr09vGiUG7wQf6PyDf0SAAUI5v/vk6FBxRmx/8xOTj84oU4j4cqxkBoquM+QGEm kErrSfinNXxgypf4YROzUGvSj6jpn69DW3u682mdPSKxMwbQEiEWInElGL8kTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShK26yk0zXM1; Tue, 15 Oct 2024 17:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhIhq062665; Tue, 15 Oct 2024 17:43:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhIId062662; Tue, 15 Oct 2024 17:43:18 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:18 GMT Message-Id: <202410151743.49FHhIId062662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 705879424bc7 - main - ena: Add support for device request reset message over AENQ 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 705879424bc76fcc925e78eb7643dbf4bd9a11eb Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=705879424bc76fcc925e78eb7643dbf4bd9a11eb commit 705879424bc76fcc925e78eb7643dbf4bd9a11eb Author: Osama Abboud AuthorDate: 2024-08-07 06:24:21 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +0000 ena: Add support for device request reset message over AENQ This commit adds a handler for the new aenq message ENA_ADMIN_DEVICE_REQUEST_RESET, which in turn causes the driver to trigger reset of a new type: ENA_REGS_RESET_DEVICE_REQUEST. Also adds counting of such occurrences in a new statistic for it. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 13 ++++++++++++- sys/dev/ena/ena.h | 2 ++ sys/dev/ena/ena_sysctl.c | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index bfde950cb2b1..2c96f8def20a 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -2990,7 +2990,8 @@ ena_device_init(struct ena_adapter *adapter, device_t pdev, BIT(ENA_ADMIN_WARNING) | BIT(ENA_ADMIN_NOTIFICATION) | BIT(ENA_ADMIN_KEEP_ALIVE) | - BIT(ENA_ADMIN_CONF_NOTIFICATIONS); + BIT(ENA_ADMIN_CONF_NOTIFICATIONS) | + BIT(ENA_ADMIN_DEVICE_REQUEST_RESET); aenq_groups &= get_feat_ctx->aenq.supported_groups; rc = ena_com_set_aenq_config(ena_dev, aenq_groups); @@ -4195,12 +4196,22 @@ static void ena_conf_notification(void *adapter_data, } } +static void ena_admin_device_request_reset(void *adapter_data, + struct ena_admin_aenq_entry *aenq_e) +{ + struct ena_adapter *adapter = (struct ena_adapter *)adapter_data; + ena_log(adapter->pdev, WARN, + "The device has detected an unhealthy state, reset is requested\n"); + ena_trigger_reset(adapter, ENA_REGS_RESET_DEVICE_REQUEST); +} + static struct ena_aenq_handlers aenq_handlers = { .handlers = { [ENA_ADMIN_LINK_CHANGE] = ena_update_on_link_change, [ENA_ADMIN_NOTIFICATION] = ena_notification, [ENA_ADMIN_KEEP_ALIVE] = ena_keep_alive_wd, [ENA_ADMIN_CONF_NOTIFICATIONS] = ena_conf_notification, + [ENA_ADMIN_DEVICE_REQUEST_RESET] = ena_admin_device_request_reset, }, .unimplemented_handler = unimplemented_aenq_handler }; diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index c9eb9e8c43d3..7ec470638859 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -396,6 +396,7 @@ struct ena_stats_dev { counter_u64_t rx_desc_malformed; counter_u64_t missing_admin_interrupt; counter_u64_t admin_to; + counter_u64_t device_request_reset; }; struct ena_hw_stats { @@ -558,6 +559,7 @@ static const struct ena_reset_stats_offset resets_to_stats_offset_map[ENA_REGS_R ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_TX_DESCRIPTOR_MALFORMED, tx_desc_malformed), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_RX_DESCRIPTOR_MALFORMED, rx_desc_malformed), ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_MISSING_ADMIN_INTERRUPT, missing_admin_interrupt), + ENA_RESET_STATS_ENTRY(ENA_REGS_RESET_DEVICE_REQUEST, device_request_reset), }; int ena_up(struct ena_adapter *adapter); diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index 32fde58c610c..9c3c47186b4e 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -301,6 +301,8 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) &dev_stats->missing_admin_interrupt, "Missing admin interrupts count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "admin_to", CTLFLAG_RD, &dev_stats->admin_to, "Admin queue timeouts count"); + SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "device_request_reset", CTLFLAG_RD, + &dev_stats->device_request_reset, "Device reset requests count"); SYSCTL_ADD_COUNTER_U64(ctx, child, OID_AUTO, "total_resets", CTLFLAG_RD, &dev_stats->total_resets, "Total resets count"); From nobody Tue Oct 15 17:43: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 4XShK51DNRz5YllD; Tue, 15 Oct 2024 17:43:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShK4144Yz4ZdF; Tue, 15 Oct 2024 17:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LtLsl3l43JZ7YVCae8VfL3Lvnb47FufDigxBlltJo8s=; b=OFaEJFKt9Q1IX+MATgm3zbU+0ONHuPoB3PNzBxlEYbeMekWmGu8MMfwnAYY6uom8xst8vP GFgzUKjd51O98S7h8OPKhZ49PT0fT6G+oJcWfTsr+tosMwjdjErWdzBsS/HI/wtgq0OPa+ uDrF6CHlYNhB7R0Ilh6sVTfNZpgdCaRHenBV8b+gndNWRpBv2ww8i5KzfkgVKoDHekxpI6 y0Iw7bzidcWB/lse9JO5wjS1MqKNjrV9MSH5SRvBVLEMYx65/8V/pf6pQnEWrYUe8RJNAt c4wxG05nyQdkbWlk+kMT6X6KT2hKdop6BYMFDk+1/hMK9rvYp2nuAAuGrYZpzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LtLsl3l43JZ7YVCae8VfL3Lvnb47FufDigxBlltJo8s=; b=oteWXaVVmAe8oIVqa3jRZjxxiKSxcqBsIPP809xfLr701l7B2AFcQ/lQfS48KaOKOOE8/T aqE6NFzpFxLi+WnXWty5Y27XhO/e85qBxcV3l+esCNNOax266fRr1l2X58pmg0EIUFs+b/ RSU3/13nX7ibHDPNXBrycBABdurS5qMvpfvcxOOEFq4B0vtc/LkypKY+uYhGXm4XPykk41 imPb3a8aWuPj4VdNQmSmnyyzuFkzjVXVJlW1kdlokMXZuDDxzdIiXYycWy7PgjDPNc5raI rdW1NW5Wvu7OuGdnWwxyf4WL2NN8VKMrHf4hWc7qgzl8Gf7+yETB9KQ5m4144Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014200; a=rsa-sha256; cv=none; b=YvPcJA7vPfe8LJCTC8FCWH2PUyOAtpJvbeuWq+7/3iR78nXGdAY3k6kJ0PWLOJ7mas1JjB 1wrcyTx8jGfv6DEe9GJ7/ndEhdd3GLTu4M4pYnC53aZ3YZ8padmO+xBjWk2+N+JR3HFUf/ BTipLruAt30FWLN55Bnz5XTHIL9Mpk/qt8UAvTNvCPphIos+5Orgj2Xp+7hMPRYJ/IRxRv khkMrkqGplJDMZMf1OCg5VUUGuTmNmjtAcOHNZijVSgoMkb5c2ZpmXSwTPEHISm4/Snv+a C0UX6vPpHEUJo3cobgxjDHPs132uSh+UPaDsR3zU9autlIQkPB7FgMubyjBF1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShK40dxczXsF; Tue, 15 Oct 2024 17:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhKMI062717; Tue, 15 Oct 2024 17:43:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhKTo062714; Tue, 15 Oct 2024 17:43:20 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:20 GMT Message-Id: <202410151743.49FHhKTo062714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: b1c38df05d79 - main - ena: Support LLQ entry size recommendation from device 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b1c38df05d79c81ee1e9fd0942774820a4ffcb63 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=b1c38df05d79c81ee1e9fd0942774820a4ffcb63 commit b1c38df05d79c81ee1e9fd0942774820a4ffcb63 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:21 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +0000 ena: Support LLQ entry size recommendation from device This commit adds support for receiving LLQ entry size recommendation from the device. The driver will use the recommended entry size, unless the user specifically chooses to use regular or large LLQ entry. Also added enum ena_llq_header_size_policy_t and llq_plociy field in order to support the new feature. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- share/man/man4/ena.4 | 14 +++++++------- sys/dev/ena/ena.c | 39 +++++++++++++++++++++------------------ sys/dev/ena/ena.h | 11 +++++++++++ sys/dev/ena/ena_sysctl.c | 14 +++++++------- sys/dev/ena/ena_sysctl.h | 2 +- 5 files changed, 47 insertions(+), 33 deletions(-) diff --git a/share/man/man4/ena.4 b/share/man/man4/ena.4 index 0fbe0819978c..a3cb9ef5b37a 100644 --- a/share/man/man4/ena.4 +++ b/share/man/man4/ena.4 @@ -133,17 +133,17 @@ This can further lead to OS instability, together with ENA driver reset and NVMe timeouts. If network performance is critical and memory capacity is sufficient, the 9k mbufs can be used. -.It Va hw.ena.force_large_llq_headers -Force the driver to use large LLQ headers (224 bytes). -The default is 0. +.It Va hw.ena.force_large_llq_header +Force the driver to use large (224 bytes) or regular (96 bytes) LLQ header size. +The default value is 2 and the recommended LLQ header size will be used. If the node value is set to 0, the regular size LLQ header will be used, which is 96B. In some cases, the packet header can be bigger than this (for example - IPv6 with multiple extensions). -In such a situation, the large LLQ headers should be used by setting this node -value to 1. -This will take effect only if the device supports both LLQ and large LLQ -headers. +In such a situation, the large LLQ header size which is 224B should be used, +and can be forced by setting this node value to 1. +Using large LLQ header size will take effect only if the device supports +both LLQ and large LLQ headers. Otherwise, it will fallback to the no LLQ mode or regular header size. .Pp Increasing LLQ header size reduces the size of the Tx queue by half, so it may diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 2c96f8def20a..fadba819652b 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -156,7 +156,7 @@ static int ena_set_queues_placement_policy(device_t, struct ena_com_dev *, static int ena_map_llq_mem_bar(device_t, struct ena_com_dev *); static uint32_t ena_calc_max_io_queue_num(device_t, struct ena_com_dev *, struct ena_com_dev_get_features_ctx *); -static int ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *); +static int ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *, struct ena_adapter *); static void ena_config_host_info(struct ena_com_dev *, device_t); static int ena_attach(device_t); static int ena_detach(device_t); @@ -2756,27 +2756,32 @@ ena_map_llq_mem_bar(device_t pdev, struct ena_com_dev *ena_dev) } static inline void -set_default_llq_configurations(struct ena_llq_configurations *llq_config, - struct ena_admin_feature_llq_desc *llq) +ena_set_llq_configurations(struct ena_llq_configurations *llq_config, + struct ena_admin_feature_llq_desc *llq, struct ena_adapter *adapter) { llq_config->llq_header_location = ENA_ADMIN_INLINE_HEADER; llq_config->llq_stride_ctrl = ENA_ADMIN_MULTIPLE_DESCS_PER_ENTRY; llq_config->llq_num_decs_before_header = ENA_ADMIN_LLQ_NUM_DESCS_BEFORE_HEADER_2; - if ((llq->entry_size_ctrl_supported & ENA_ADMIN_LIST_ENTRY_SIZE_256B) != - 0 && ena_force_large_llq_header) { - llq_config->llq_ring_entry_size = - ENA_ADMIN_LIST_ENTRY_SIZE_256B; - llq_config->llq_ring_entry_size_value = 256; + if ((llq->entry_size_ctrl_supported & ENA_ADMIN_LIST_ENTRY_SIZE_256B) != 0) { + if ((ena_force_large_llq_header == ENA_LLQ_HEADER_SIZE_POLICY_LARGE) || + (ena_force_large_llq_header == ENA_LLQ_HEADER_SIZE_POLICY_DEFAULT && + llq->entry_size_recommended == ENA_ADMIN_LIST_ENTRY_SIZE_256B)) { + llq_config->llq_ring_entry_size = + ENA_ADMIN_LIST_ENTRY_SIZE_256B; + llq_config->llq_ring_entry_size_value = 256; + adapter->llq_policy = ENA_ADMIN_LIST_ENTRY_SIZE_256B; + } } else { llq_config->llq_ring_entry_size = ENA_ADMIN_LIST_ENTRY_SIZE_128B; llq_config->llq_ring_entry_size_value = 128; + adapter->llq_policy = ENA_ADMIN_LIST_ENTRY_SIZE_128B; } } static int -ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx) +ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx, struct ena_adapter *adapter) { struct ena_admin_feature_llq_desc *llq = &ctx->get_feat_ctx->llq; struct ena_com_dev *ena_dev = ctx->ena_dev; @@ -2831,22 +2836,20 @@ ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx) max_rx_queue_size = 1 << (flsl(max_rx_queue_size) - 1); /* - * When forcing large headers, we multiply the entry size by 2, + * When using large headers, we multiply the entry size by 2, * and therefore divide the queue size by 2, leaving the amount * of memory used by the queues unchanged. */ - if (ena_force_large_llq_header) { - if ((llq->entry_size_ctrl_supported & - ENA_ADMIN_LIST_ENTRY_SIZE_256B) != 0 && - ena_dev->tx_mem_queue_type == + if (adapter->llq_policy == ENA_ADMIN_LIST_ENTRY_SIZE_256B) { + if (ena_dev->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV) { max_tx_queue_size /= 2; ena_log(ctx->pdev, INFO, - "Forcing large headers and decreasing maximum Tx queue size to %d\n", + "Using large headers and decreasing maximum Tx queue size to %d\n", max_tx_queue_size); } else { ena_log(ctx->pdev, WARN, - "Forcing large headers failed: LLQ is disabled or device does not support large headers\n"); + "Using large headers failed: LLQ is disabled or device does not support large headers\n"); } } @@ -3002,7 +3005,7 @@ ena_device_init(struct ena_adapter *adapter, device_t pdev, *wd_active = !!(aenq_groups & BIT(ENA_ADMIN_KEEP_ALIVE)); - set_default_llq_configurations(&llq_config, &get_feat_ctx->llq); + ena_set_llq_configurations(&llq_config, &get_feat_ctx->llq, adapter); rc = ena_set_queues_placement_policy(pdev, ena_dev, &get_feat_ctx->llq, &llq_config); @@ -3861,7 +3864,7 @@ ena_attach(device_t pdev) /* Calculate initial and maximum IO queue number and size */ max_num_io_queues = ena_calc_max_io_queue_num(pdev, ena_dev, &get_feat_ctx); - rc = ena_calc_io_queue_size(&calc_queue_ctx); + rc = ena_calc_io_queue_size(&calc_queue_ctx, adapter); if (unlikely((rc != 0) || (max_num_io_queues <= 0))) { rc = EFAULT; goto err_com_free; diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 7ec470638859..132d8882f12c 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -173,6 +173,15 @@ enum ena_flags_t { ENA_FLAGS_NUMBER = ENA_FLAG_RSS_ACTIVE }; +enum ena_llq_header_size_policy_t { + /* Policy for Regular LLQ entry size (128B) */ + ENA_LLQ_HEADER_SIZE_POLICY_REGULAR, + /* Policy for Large LLQ entry size (256B) */ + ENA_LLQ_HEADER_SIZE_POLICY_LARGE, + /* Policy for device recommended LLQ entry size */ + ENA_LLQ_HEADER_SIZE_POLICY_DEFAULT +}; + BITSET_DEFINE(_ena_state, ENA_FLAGS_NUMBER); typedef struct _ena_state ena_state_t; @@ -459,6 +468,8 @@ struct ena_adapter { uint8_t mac_addr[ETHER_ADDR_LEN]; /* mdio and phy*/ + uint8_t llq_policy; + ena_state_t flags; /* IRQ CPU affinity */ diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index 9c3c47186b4e..c1520a963853 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -148,17 +148,17 @@ SYSCTL_INT(_hw_ena, OID_AUTO, enable_9k_mbufs, CTLFLAG_RDTUN, &ena_enable_9k_mbufs, 0, "Use 9 kB mbufs for Rx descriptors"); /* - * Force the driver to use large LLQ (Low Latency Queue) header. Defaults to - * false. This option may be important for platforms, which often handle packet - * headers on Tx with total header size greater than 96B, as it may - * reduce the latency. + * Force the driver to use large or regular LLQ (Low Latency Queue) header size. + * Defaults to ENA_LLQ_HEADER_SIZE_POLICY_DEFAULT. This option may be + * important for platforms, which often handle packet headers on Tx with total + * header size greater than 96B, as it may reduce the latency. * It also reduces the maximum Tx queue size by half, so it may cause more Tx * packet drops. */ -bool ena_force_large_llq_header = false; -SYSCTL_BOOL(_hw_ena, OID_AUTO, force_large_llq_header, CTLFLAG_RDTUN, +int ena_force_large_llq_header = ENA_LLQ_HEADER_SIZE_POLICY_DEFAULT; +SYSCTL_INT(_hw_ena, OID_AUTO, force_large_llq_header, CTLFLAG_RDTUN, &ena_force_large_llq_header, 0, - "Increases maximum supported header size in LLQ mode to 224 bytes, while reducing the maximum Tx queue size by half.\n"); + "Change default LLQ entry size received from the device\n"); int ena_rss_table_size = ENA_RX_RSS_TABLE_SIZE; diff --git a/sys/dev/ena/ena_sysctl.h b/sys/dev/ena/ena_sysctl.h index df9cc8cb592f..9dcfa311d73e 100644 --- a/sys/dev/ena/ena_sysctl.h +++ b/sys/dev/ena/ena_sysctl.h @@ -46,6 +46,6 @@ extern int ena_enable_9k_mbufs; #define ena_mbuf_sz (ena_enable_9k_mbufs ? MJUM9BYTES : MJUMPAGESIZE) /* Force the driver to use large LLQ (Low Latency Queue) headers. */ -extern bool ena_force_large_llq_header; +extern int ena_force_large_llq_header; #endif /* !(ENA_SYSCTL_H) */ From nobody Tue Oct 15 17:43: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 4XShK54dwJz5YlYp; Tue, 15 Oct 2024 17:43:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShK52JVzz4ZYC; Tue, 15 Oct 2024 17:43:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eESH7wp7mMDP2njfi0h9KWquvgO2b23hwnzXzpJUgfo=; b=IqBZ4m0i2FOT3VTnfSWXoiQDMLsk2u6fUktodRNoQF4rbHudRIcy4lv/M6hnr9qPqIgGHu SpXNwteG4jckC5BRyYwmWKBU6PUvYXMHhPjsEdcTwRFAaIySv1dK3UkfJ0y3Qo5HXCJUHL sw4dVVbg8TvDR4ZwH4Ub7lJyGI7pjMwqSQJw1wxPskJNxyW9Ib1dU9cipUSvI2G4Xqc4hG ZQn/rZ91q6b3aX63anxgXtFqAthSfc8TdZQsVc74ABjLG6x/7ZtRvTxk635DcQt0yxX2/+ Fhr13Pb8P5XU1exNvKQg7erH0qvBW1yWI01vBe4hnC8/UeO1f72x8vPTNV8Fag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eESH7wp7mMDP2njfi0h9KWquvgO2b23hwnzXzpJUgfo=; b=yAnEmSy2cFHEky1QiKhVoOUSzzEKKUqkvR0n519MlcReJOkNFyeIEw/CT1nLPdHfjZdIFo CwO20msNnmpscVtIQomALMPbyA3Oj6hBSkHkiWvjtsKXm4L+fY+ntGH1XRkH/BgQ0j3zgG XbpoMdvdXUZYYNddqxh0urhVewpTXL8NVk+OyIEA7Q9n0IjPE3EC30RHa+cXs4nKWiXEC6 VC2d5WUu+kC9sIGeanKdNFUifjyFrUnQbSfTsEhUQ6dYgkLzflJlfuyueWHxhNAxL3TlvI bbbY2bY13uKCrFshCj7eYG4+7utchz7YpIPiRg/xNK4WV5LohFb4kGXHDeVlaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014201; a=rsa-sha256; cv=none; b=CGQOjLD8HDzX7I9YWE/uUeie7iJ0ZQPkWNtbM00avOBKQxvnd234zgpG/HWq4S6QOuV9H3 BWmJ7+c4w5gSbX1xMGR6ssNqd3HE3zRm465gmJ3lNmcnQKOTUKF9MRVvlqU7PCMT2L22Cn CrW4QBY/QUL892H/m2c+ddZLfASuSieDC69Noi+pUemTa3XaautoIl88bAhPyJQ/Z+T3YW 4KTnvUDkaFYkbtr7YFqfiLbQ2IT5ZBR1Myr/dP7RpXVQcS3sAVU7jfAqUph9cf9+DK+jbu cgmxlMstHfnQV6QAy2N/lvpycDC/KBvUwTpgBh8tCnrPlhSbSZsyzNtkYvTXrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShK51vb6zXQC; Tue, 15 Oct 2024 17:43:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhL37062771; Tue, 15 Oct 2024 17:43:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhLes062768; Tue, 15 Oct 2024 17:43:21 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:21 GMT Message-Id: <202410151743.49FHhLes062768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: d0419551d96c - main - ena: Support max large LLQ depth from the device 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0419551d96c8f995bdf6388a8e69684be33f9b5 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=d0419551d96c8f995bdf6388a8e69684be33f9b5 commit d0419551d96c8f995bdf6388a8e69684be33f9b5 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:22 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +0000 ena: Support max large LLQ depth from the device Large LLQ depth size is currently calculated by dividing the maximum possible size of LLQ by 2. In newer paltforms, starting from r8g the size of BAR2, which contains LLQ, will be increased, and the maximum depth of wide LLQ will be set according to a value set by the device, instead of hardcoded division by 2. The new value will be stored by the device in max_wide_llq_depth field for drivers that expose ENA_ADMIN_LLQ_FEATURE_VERSION_1 or higher to the device. There is an assumption that max_llq_depth >= max_wide_llq_depth, since they both use the same bar, and if it is possible to have a wide LLQ of size max_wide_llq_depth, it is possible to have a normal LLQ of the same size, since it will occupy half of the space. Also moved the large LLQ case calculation of max_tx_queue_size before its rounddown. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index fadba819652b..28a4d7842306 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -2831,28 +2831,34 @@ ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx, struct ena_adapter * max_queues->max_packet_rx_descs); } - /* round down to the nearest power of 2 */ - max_tx_queue_size = 1 << (flsl(max_tx_queue_size) - 1); - max_rx_queue_size = 1 << (flsl(max_rx_queue_size) - 1); - - /* - * When using large headers, we multiply the entry size by 2, - * and therefore divide the queue size by 2, leaving the amount - * of memory used by the queues unchanged. - */ if (adapter->llq_policy == ENA_ADMIN_LIST_ENTRY_SIZE_256B) { - if (ena_dev->tx_mem_queue_type == - ENA_ADMIN_PLACEMENT_POLICY_DEV) { - max_tx_queue_size /= 2; - ena_log(ctx->pdev, INFO, - "Using large headers and decreasing maximum Tx queue size to %d\n", - max_tx_queue_size); + if (ena_dev->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV) { + if (llq->max_wide_llq_depth != max_tx_queue_size) { + if (llq->max_wide_llq_depth == 0) { + /* if there is no large llq max depth from device, we divide + * the queue size by 2, leaving the amount of memory + * used by the queues unchanged. + */ + max_tx_queue_size /= 2; + } else { + max_tx_queue_size = llq->max_wide_llq_depth; + } + ena_log(ctx->pdev, INFO, + "Using large LLQ headers and decreasing maximum Tx queue size to %d\n", + max_tx_queue_size); + } else { + ena_log(ctx->pdev, INFO, "Using large LLQ headers\n"); + } } else { ena_log(ctx->pdev, WARN, "Using large headers failed: LLQ is disabled or device does not support large headers\n"); } } + /* round down to the nearest power of 2 */ + max_tx_queue_size = 1 << (flsl(max_tx_queue_size) - 1); + max_rx_queue_size = 1 << (flsl(max_rx_queue_size) - 1); + tx_queue_size = clamp_val(tx_queue_size, ENA_MIN_RING_SIZE, max_tx_queue_size); rx_queue_size = clamp_val(rx_queue_size, ENA_MIN_RING_SIZE, From nobody Tue Oct 15 17:43:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XShK66vjXz5Ylyv; Tue, 15 Oct 2024 17:43:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShK637fpz4ZmX; Tue, 15 Oct 2024 17:43:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkhFDXHctWnWjkAOWhNwLO8W0LN3Le96Rnmx2M1F+lk=; b=MGpuQ856kjvZmnnYx2vfLbfv75HI3noBbM+9AOpIUyr2CuLIeabzwUbuGjh/kleiAlFko7 EkPGHwZfV8GeAK1QUW1lMyGpn+W725XmcGV3BFYdYKJknVwOK5NnrBJdUH/XtFTnH8mu9y zZ+yxbuHVN3uPPfn3weghPoWOEiLE23Sm42tPaYwzQA8AZ6zO9TYutZaIMRe/KDxTXM9BX OY+tyZK5sf1Txl3SE0U7RFc7UM1cWHsC1UZscfMeIN7jhZOkBnr2kzVC5h7rQFbtUvMjrj EdPPOAZO/XrsngL3Gacsm3u5syZlhe7YRpBmUv31xXTPknWXHCHFpedNblF3aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkhFDXHctWnWjkAOWhNwLO8W0LN3Le96Rnmx2M1F+lk=; b=r8p1SHqETHucsichervHx8rGp3gVqbv6tv8t+mnf/YP7V3kBp7a11LEyaUW9UYwDkcV+lZ pkGRGNAQAoKKurc1bga2wKUwWZbYOu/zhiIkuc9C26UIBT6SURe01j8FQr9FRUH1EH7y+R L+WInLFZ39hV9GUIEZ2qX42uKwcemFhu8uT/mK4CQtw6g/bo+CsKMZ7NWBMx+rpHrZmpDA rW5Xo/oH/JCADanAWCqobjcISK/UdAUKhHEMkrbJWjLPSR9SBMFT2parsGAV3M0cCJgu4z +0ycg7qM4F3hgvBxQ21Wuo9S0Ppk5SFqeHXnwAtMUGkz0MdS/g2r91uYOKQ1jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014202; a=rsa-sha256; cv=none; b=R+OD69MO8674LxHTX25Vd2Lj34/N3RnOSlyFm0TkFnpQgW8jnlnN6gWgqPiICZzGRGg+H/ Pl4EVB+GF2F+8lJqcreqWIwAjksunhzcIMT8TgyJBNkHvkpvZt/FR6nR3Wz4lwOpxpie2h 4ZcyYunUoupk9ezFpHcS5Rib0XWUbMrjFiLa7oGYJ+IR/uQRSOHk5JuOl9Ai0ee0d1kkBY jwQe/o5yDGifKwRdpB4GDRnQdUW6PE3+5onLoE2TYP3vajf51RAhW5pbTUsrLTOWpFOLDW e/eP+kifUhXkdepZRQh2MX38DvLxs5X3Q4GST++y62R619hjEtImm7tnxdfrcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShK62ggczXXZ; Tue, 15 Oct 2024 17:43:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhMWL062820; Tue, 15 Oct 2024 17:43:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhMDw062817; Tue, 15 Oct 2024 17:43:22 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:22 GMT Message-Id: <202410151743.49FHhMDw062817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 449496eb28da - main - ena: Fix leaking ifmedia resources on detach 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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 449496eb28daec8d5b852fa4be1e337c2957345c Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=449496eb28daec8d5b852fa4be1e337c2957345c commit 449496eb28daec8d5b852fa4be1e337c2957345c Author: Osama Abboud AuthorDate: 2024-08-07 06:24:22 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +0000 ena: Fix leaking ifmedia resources on detach ifmedia_add() allocates an ifmedia_entry during ena_attach. Current code doesn't release this memory during ena_detach() This commit calls ifmedia_removeall() to properly free the allocated memory during ena_detach(). Also, in case ena_attach fails, we need to detach ifmedia which was allocated within ena_setup_ifnet(). This bug was first described in: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278100 Reviewed by: zlei Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 28a4d7842306..e9d4530e9085 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3981,6 +3981,7 @@ ena_attach(device_t pdev) #ifdef DEV_NETMAP err_detach: ether_ifdetach(adapter->ifp); + ifmedia_removeall(&adapter->media); free(adapter->customer_metrics_array, M_DEVBUF); #endif /* DEV_NETMAP */ err_metrics_buffer_destroy: @@ -4031,6 +4032,8 @@ ena_detach(device_t pdev) ether_ifdetach(adapter->ifp); + ifmedia_removeall(&adapter->media); + /* Stop timer service */ ENA_LOCK_LOCK(); ENA_TIMER_DRAIN(adapter); From nobody Tue Oct 15 17:43:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XShK81N5bz5YlWq; Tue, 15 Oct 2024 17:43:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShK7490Dz4ZhG; Tue, 15 Oct 2024 17:43:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XukxVvbP2W3ClaSbwhIoSUjVVzaOPl9aTB2T2LKW3Nc=; b=dKIyOYz8/HTo4Txbvs2Jj7SQPv1egiLlq6ldJMzzTdmLYlJ4PeVasHTyRZ+8RGCwo8Fi5b 8d6feL0q04FxX1wAC2CmGxhEFc1pri9wYz1GYB4y7lQKHRZopRUzTtrCOdg/aW7tAO9bNZ sJV8UqKfLskeEKnVX1NLYYpCy1mkOZe0wW+6EAxrHgOpGJKVo2F4i697BFRjTQQHStgKv2 lQlrC1p8yjDA9LrQp/2yfNNwMkLMWePUCaNXpfPs+p490CtA+P7ZwiDXbbEZ7ZbvW2I1Dz VEMmE9j8exDsBZiQydpwyv+U+tlRSsC+zaRacIkxHQt3WRwzvNQV5h4ZPNLlIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XukxVvbP2W3ClaSbwhIoSUjVVzaOPl9aTB2T2LKW3Nc=; b=F1K9grlcZOZjgXD8lsBWkZTxu+0UfOycaQsl/c5PEpQBMLBj6ughYs0f171OqUI6da7Zdf HpBJRo5XLF2oK94lwIfNWa7BsCGtPw2HcSXGq+7NYT6lgsPCCCuBhucxpbStOWgG7rZm/Z 4eCCk9xnX40JHqi9sxJeI8c6qfIsX0nstWCWEWC3QAXFBxpa3qEnxH84H9298ZKO2kd0Ch KzLBqAVCc67+ctaQznY0zynQCZJGNH5Nnf1qYqZABFt8WpXg0rwGBJ8F0Z7DKNC5UeHNMY wHFno4Puv/2m0sQ72QO5bSmlMpveoT994ZzG966085TNhAg10PQ2L7QJ2tNwgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014203; a=rsa-sha256; cv=none; b=pA8QraA9zIvPCbo4xQvGGudskAFj1sLqEKc0RHuC9mjC61hsFgh/wrAZWOxB3KRs3kAl0e RKu6eCG8qmq9UeDi5+gm3dbaSP7IqUfZtNhSjRFrXO+AwRb2PIcGYuPkdSObwTFVEGdlu7 EaTrBxE9HcwfF8UzCQz9OlCQ1Sol4l0yXNAneLbCLJJmWCd0qCwVmUgNplinMFCY1DeItc oJeo+b3CMk27P3CkxtQWvZk6456P+IQsZodR9pYQH2VvqDLEGJRjRZtj3KK2MtCqT4KaQb gOx/3Y3+Lgedo0WvZcWVsnYc3n0TO+sWnWQtPKbUJk9V9yP7HTBT0ns6pM6rEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShK73klQzXQD; Tue, 15 Oct 2024 17:43:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FHhNKV062867; Tue, 15 Oct 2024 17:43:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhNeB062864; Tue, 15 Oct 2024 17:43:23 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:23 GMT Message-Id: <202410151743.49FHhNeB062864@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: ce4cc746bb41 - main - ena: Update driver version to v2.8.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: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce4cc746bb4171a131ab9099947a500c0de18ff4 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=ce4cc746bb4171a131ab9099947a500c0de18ff4 commit ce4cc746bb4171a131ab9099947a500c0de18ff4 Author: osamaabb AuthorDate: 2024-08-07 08:06:49 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:33 +0000 ena: Update driver version to v2.8.0 Features: * Add support for device request reset message over AENQ * Support LLQ entry size recommendation from device * Support max large LLQ depth from the device * Expand PHC infrastructures * Configuration notification support Bug Fixes: * Fix leaking ifmedia resources on detach * Fix netmap socket chain unmapping issue * Properly reinit netmap structs upon sysctl changes * Correctly count missing TX completions Minor Changes: * Add reset reason for corrupted TX/RX completion descriptors * Add reset reason for missing admin interrupts * Improve reset reason statistics * Update licenses Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 132d8882f12c..06bdfad97ed4 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -38,7 +38,7 @@ #include "ena-com/ena_eth_com.h" #define ENA_DRV_MODULE_VER_MAJOR 2 -#define ENA_DRV_MODULE_VER_MINOR 7 +#define ENA_DRV_MODULE_VER_MINOR 8 #define ENA_DRV_MODULE_VER_SUBMINOR 0 #define ENA_DRV_MODULE_NAME "ena" From nobody Tue Oct 15 18:32: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 4XSjPZ47qDz5YpqG; Tue, 15 Oct 2024 18:32:18 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSjPZ3bM4z4mLZ; Tue, 15 Oct 2024 18:32:18 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729017138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fRIMm5ZnWwzuU6Pcl/w8AvnpWx0LBEUywRL7872p7RU=; b=TYkd40i2+KVq4ZgDmghX3O3tp8KSak4vHT1Iww/RddASoq/Mkbj1eY23YhmIh3lKjj7JlK l9kRDn1PsgCOMMVKfC7fVw8AF0dMWLgKa7km/PhVqjINRmgUlfYTkpQDF8TuugozaZGYOu m596AJOJCTsO0M6wk5CJqc+NLnkVupVZssLuxVD/vHTpFSto+VzZ5TeJYRNbXxOJzVsj3o HEu08Hr3Ci0wKgZELnX4K25uro0/W7Rc/6e9Ey8X90nDsaFQQ006Hq2ZShyoJqSjAq/ISf iiystBdUoM1kCVXwkbcIxTqdWX3LuCG2XEJkBRtaeWGDSnofhTDuPJ4mix2qFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729017138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fRIMm5ZnWwzuU6Pcl/w8AvnpWx0LBEUywRL7872p7RU=; b=U2y8UEn2qiDarZ5fV0Dv3jKR1xCibKqQQKoU6ugBpK2pQxT+ngvrcBLrtk74s7G7E9dxGr 3+o4Gae5Emgclrr1oo0p4ppdmoN/2bKrADMke4RZOq+fDGMUE3CYiUWOSNpK0e7Gky2N9S qq+a/kEgXqxRP62wgoVCsiBKlrUVjsz/UJRdumtv2xsOzeRP3ohPa74ctmjtSvIIzdXa0d tWzjPklm+1fJ3gH2Z+UAqNT0vb5yzmmMKKI/COOqi5emcz1lgcW52JbuMBv74lAidLw7Os cIioWYbOuxlRtoar7BGpkB7Gc1qt1E/cBFsXR+iVbxko5vUnUKqTYWdnM61gcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729017138; a=rsa-sha256; cv=none; b=HqxgMWXEnHuO4NF2yHiz68u9E40QrM8YdXGdH+y0fhV1OYAPueWOdsHXjEXC9WNH1/G0+7 8umTi4sJXoZQrS5Tg8oYrwh7ivF4s4jMTr9VW2klXK5FK9tlN0gMM6K9NylekusJz0Kg4T deQH9uUt3CLluyfsZBNW2XEQJoWxqLBhhWMhT2fYeHMIUDYaNkdlSVBz2sFtmiU9jWIVJd /v9CA2QGhlAbqxlvh2QJ+BLYeX95prKmMbF3IFxSJhHfsht85AboBFC3ulXykHeYKCgOt9 n6orDGcVqgqxDRzF8YFHgl/3MXh1LCKWd5Rf09BPgj/fY0GBQaUBHu9zOwLoEA== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XSjPY6nN9z134X; Tue, 15 Oct 2024 18:32:17 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 15 Oct 2024 11:32:12 -0700 From: Gleb Smirnoff To: Kevin Bowling Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 542f5d56317e - main - igc: Rename 'struct adapter' to 'struct igc_softc' Message-ID: References: <202410141353.49EDroZg024524@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202410141353.49EDroZg024524@gitrepo.freebsd.org> Kevin, On Mon, Oct 14, 2024 at 01:53:50PM +0000, Kevin Bowling wrote: K> commit 542f5d56317e94676cf19cb9d66207bf9a6b6758 K> Author: Kevin Bowling K> AuthorDate: 2024-10-14 13:29:55 +0000 K> Commit: Kevin Bowling K> CommitDate: 2024-10-14 13:52:31 +0000 K> K> igc: Rename 'struct adapter' to 'struct igc_softc' K> K> Rename the 'struct adapter' to 'struct igc_softc' to avoid type K> ambiguity in things like kgdb and make sharing code with e1000 and K> ixgbe easier. You gonna like these two :) eb0ec0898261dbc58c328c818adcd8e8fe66bf17 219de4f9d87bbac127ef370ab702e54b7f8d4522 -- Gleb Smirnoff From nobody Tue Oct 15 18:48: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 4XSjmT44Bzz5YqSK for ; Tue, 15 Oct 2024 18:48:41 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSjmT188Sz4p1Z for ; Tue, 15 Oct 2024 18:48:41 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-4605674e9cdso35740381cf.2 for ; Tue, 15 Oct 2024 11:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; t=1729018120; x=1729622920; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TXEHbHqHgFyJ5M7Auib80u9ghOWX8Edl2dfyLJuapPA=; b=EaF8wh1NOCp3osP2rPFkpg9MREYFc+44y6Rp4UWTIH+itGNJqyH2zvTvUhdIwDOYnW Ng1/a6MaE8XBJD5NLkkYW7juGTUfkPv3UTUYCrbTFdQyIk3fgJmHijwsvb+JEowXgrea avRNK5N+dsDMQHBpR5QakNAwhXz7VU2rGvc+w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729018120; x=1729622920; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TXEHbHqHgFyJ5M7Auib80u9ghOWX8Edl2dfyLJuapPA=; b=JgCleuyvlFOV+nfszt0aV74NDGd6Uy+GW3pmoTmXTzqPGi6lQvZiztWy/a9yHM608n a0RAh4Cd6iS5qTKY6eocenNAOH6j20rxFy4Pixgg7sVNaxMGT0TjO8NwIuwZBSk5mz2x 92xjEi0BnNz2Z/ZaGIzvIBXD1I9UCYFfkKNWh7cK/Qt3Sw+OqF0cITsdHcUzdEUcP3+7 Htynwr8tq9IKz/QSvY3OZQHRf1Rq4iGeQLMTstemwaC3sQVEsaU28P4k0d1n1tmWX8uA uw2Iry1B3s7tFBxm1f+2syrSPYk78EpCOBrImsXTywePN7qStCy5/knZUyxoeLHvNrn/ GQlw== X-Forwarded-Encrypted: i=1; AJvYcCU2GwP7mL20K3Yxu01C7GeQwXV/droK1cUNn/qZ5RxWwPNkniNVW4+CeIdcblINqlac1+Ge0WmdSViunHqAp/+IynQb@freebsd.org X-Gm-Message-State: AOJu0Yzjhwin/k7qyh31hG1Abk9WTzgDUAlO0BAKFGpLLZBIvhZvRj+o QJ1Y+Oy94+6eLmTQfw9KrlsKd4sF+mfM2IcaViJtl/xAuwxDHp18CweHV0xfD/lNV6AWy2Bklj7 Vf4ImT/pVEjDAozlGTc8qoydkN77kzvR/Pq/K X-Google-Smtp-Source: AGHT+IHGOtgL1xBewtv1DL0N95cIKuyMlmUUXXstJ7X5Mg73Km12Z5Le9D/ahvazVhBfN5TBR6K6no8xBGCZa8lJwNM= X-Received: by 2002:a05:622a:1f1a:b0:45f:788:b1ad with SMTP id d75a77b69052e-4605846c5bemr238151501cf.27.1729018120354; Tue, 15 Oct 2024 11:48:40 -0700 (PDT) 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 References: <202410141353.49EDroZg024524@gitrepo.freebsd.org> In-Reply-To: From: Kevin Bowling Date: Tue, 15 Oct 2024 11:48:28 -0700 Message-ID: Subject: Re: git: 542f5d56317e - main - igc: Rename 'struct adapter' to 'struct igc_softc' To: Gleb Smirnoff Cc: Kevin Bowling , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XSjmT188Sz4p1Z X-Spamd-Bar: ---- On Tue, Oct 15, 2024 at 11:32=E2=80=AFAM Gleb Smirnoff wrote: > > Kevin, > > On Mon, Oct 14, 2024 at 01:53:50PM +0000, Kevin Bowling wrote: > K> commit 542f5d56317e94676cf19cb9d66207bf9a6b6758 > K> Author: Kevin Bowling > K> AuthorDate: 2024-10-14 13:29:55 +0000 > K> Commit: Kevin Bowling > K> CommitDate: 2024-10-14 13:52:31 +0000 > K> > K> igc: Rename 'struct adapter' to 'struct igc_softc' > K> > K> Rename the 'struct adapter' to 'struct igc_softc' to avoid type > K> ambiguity in things like kgdb and make sharing code with e1000 and > K> ixgbe easier. > > You gonna like these two :) > > eb0ec0898261dbc58c328c818adcd8e8fe66bf17 > 219de4f9d87bbac127ef370ab702e54b7f8d4522 Ha! Well the change stuck to e1000 and ixgbe through the oldest supported branches so I guess we are safe this time around. > -- > Gleb Smirnoff From nobody Tue Oct 15 20:21:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSlqS0LCmz5YxBn; Tue, 15 Oct 2024 20:21:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSlqR5k2pz4vjM; Tue, 15 Oct 2024 20:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfrNhmHVMg0h0qZNqS4q7ye69xN8lkjbmUhwxV2gi8I=; b=gj5nPuq4Le52WJbn6RU26lEudUPMvKkdn7o83/MbZ06Zz1iJYTq5Aot2jPCe/2vVRJdIxP ks9odGwKQPPJVhZpmrAGOOe8y7WRAjCLRNJum0A8yqwpKmzTE0xum39PI9Yf6GWe0UVYFu c3HKEQ6XuZCuEltDhCakY62u0I79++C8WX6snNZvCJwKiTJBiqSgMH1kNZeJxHIg4BJJmb QX6G3OXQRbmxkKzh8d5f4SDiho4IM8IEpELjnfMDi2NNgzLOI07uI/AydhYlRPH0kWeIGR kyVcrVauaNtP0Vl27EQKjudw1LfGs9C4Uo3WKCeNsaCbki4iFebsjPF5oRTPCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfrNhmHVMg0h0qZNqS4q7ye69xN8lkjbmUhwxV2gi8I=; b=DgcZheELs1IE6hjBqYXWpki8EBYmslJkWA/kfzMa0fDGv1pNW/uX6eOtCGbJS8ailn4/zz Dj3lMT1wo6xNgbcDjLJYm95z/Z9rOi72cn9bEJrulI4gnagImr+/8Nma+Tt+xa/TmK9LTN SIZq/15RmJQGWpSfKWqJ+zqx8fcSNraZtjbMUq6h5FAse25GCEVxVu7oGYWK3jObZkxDuk BJ31ORrFNP4j9PSrmUmcnmfh9163/+fNYqVdwmC5xbcmpYfpShTQTpxc2H2So1T833ehAZ ywbtRjFe/hIyt5Wh+JoU043xYEA2vImQfsmeOoY2yOeNuRjv7+pdAHItFDNERQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729023683; a=rsa-sha256; cv=none; b=Ib+8nMTUQFfBLb4hkBZ9CdUsHr1rtSxhoHxr/3KTt5XM2yAtGlnWx0GVSl+YS4XQJ4hTzh idt7W2h8Ev7YDXUPlN2fcinScWK3OdZyhT7CfO1x379E906YoSbej185/TE/dKMBSJgeRU ZFXpmW2FkLnVYEi3ZHTI4PSqp15HlDjzr8wUtZoIgdkRAxkMdkUlZCgnfJzYrHJ+90A1DA 2B9k35lQATFdMDKhxs10EcDeIY1OoZhYoAAyNXJYluAivvE7ifChMUxpMn14lQG+chI/GI +2tZWUVoNDjt78WoJb5o5+omVF54dvtb+vn83omUSMqOJVsKqCUfjR9O8R5UyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSlqR54wkzcL9; Tue, 15 Oct 2024 20:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FKLNus028148; Tue, 15 Oct 2024 20:21:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FKLNh5028145; Tue, 15 Oct 2024 20:21:23 GMT (envelope-from git) Date: Tue, 15 Oct 2024 20:21:23 GMT Message-Id: <202410152021.49FKLNh5028145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 5c59e40bc419 - main - wpa_supplicant: xref relevant wpa_passphrase(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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c59e40bc419870659946156b45a390cabd69c02 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5c59e40bc419870659946156b45a390cabd69c02 commit 5c59e40bc419870659946156b45a390cabd69c02 Author: Alexander Ziaee AuthorDate: 2024-10-12 15:41:03 +0000 Commit: Mitchell Horne CommitDate: 2024-10-15 20:18:02 +0000 wpa_supplicant: xref relevant wpa_passphrase(8) Reviewed by: mhorne MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/1461 --- usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 b/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 index 9b51c3d8688c..cba5ce0228d6 100644 --- a/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 +++ b/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 @@ -160,7 +160,8 @@ Wait for a control interface monitor before starting. .Xr wpa_supplicant.conf 5 , .Xr devd 8 , .Xr ifconfig 8 , -.Xr wpa_cli 8 +.Xr wpa_cli 8 , +.Xr wpa_passphrase 8 .Sh HISTORY The .Nm From nobody Tue Oct 15 20:21: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 4XSlqT0gTcz5Yx4N; Tue, 15 Oct 2024 20:21:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSlqS6Y6Qz4vbR; Tue, 15 Oct 2024 20:21:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uFRWv1r+6rbPkR6d6+TExAnxcMkKqObETyW8NxpH7cE=; b=rPUac4phm9XXfVcPUgyfnjoyCdl2ZFUnsDXsOheEWywECTZtoP5JwNucsUG9nvLbbwvjLL nIfzOH/fZKOUhwm1MkG8/AJ76Rt/DII03m3WsYjuZ5dELwWWsE8EcTCE8EAcStyUWixygu mV/erdhZ9x93E+s61BymIpqH6moKvVV5cbrvcsj7hCJkAM4TaFHJnWJSl1wfUzIEcukG2j lt4Ul0cPz5hSJGCO3D6/aP1S0Na6QsXg3rvnxHcU3lUPkn6d/X2wPOuZ6wEikm0E67DqPG BVl2xRCJoqEYcaIrfdllUYghL9hzrH6gxLXGjWyTnzKPne21o/5Q1zXLXkl/HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uFRWv1r+6rbPkR6d6+TExAnxcMkKqObETyW8NxpH7cE=; b=fK+TGZAQ12YmFQtgdTck711gZrY4OgsjiDw97EwVhtxP1lzV34x3DEhbnroyljciraukcT qifsh/5IVUFZ+jbO9S56faUGIYwTlErwlgqZV9s60GeMVRfvMjMggj+Kz8/wbkxs+dPjZU ReVhKHgda6HW6crEl3gOF8ti77hS3mWZEwV9LNLkwuKxNki2oWeDiNWf75LlF8KwjTsa/z 06l3c1b+Y6blSOUb18Z+ur3Xr8StxIB2aIhEvOX/lAg9ihf+2l0n7XONZQmGJwZ4kWXbli 0D0pAVLFISr7noJlr3an0PNbFIxZfe9tyFklEt2jp0WsQmg95C3al7Xwq4acgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729023684; a=rsa-sha256; cv=none; b=VLN2Q/OrvI6a+yywwBZyVZGDb3n8+SRQH6Ayftxbyd1gO/DKfGPtwrWFT0OghgS+m3ONOV V/tuhJFJe5RbHM0GeTbsENx/hNVvkW4h9pjffoi+Fv7y8I7JLo2kaq56OE2DOAsKZsoV/e Hk5A+PPIfhxoGhAeXE4wU3du/qJ9zQzB4HT3lGvESS/OpC1Eg1I3PdURm2RPddXPOwBdrw jc2TuaGpNtwabUjXRzysDcS1u2sjZtSR995cs5Yu8mZeTfjh7s89en5meiPVDAEC64G2qL 4az2IXXuWx9vnpgyDtq+8eZ8eLxdOH1SKMELSkbTkrHcpbEji/859U+yJ8MCIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSlqS696Xzc3d; Tue, 15 Oct 2024 20:21:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FKLO52028194; Tue, 15 Oct 2024 20:21:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FKLOd1028191; Tue, 15 Oct 2024 20:21:24 GMT (envelope-from git) Date: Tue, 15 Oct 2024 20:21:24 GMT Message-Id: <202410152021.49FKLOd1028191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 22fb46af90d6 - main - mitigations.7: markup functions with Fn macro 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22fb46af90d62d8177bfa0f1a8e4d89efa0b1905 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=22fb46af90d62d8177bfa0f1a8e4d89efa0b1905 commit 22fb46af90d62d8177bfa0f1a8e4d89efa0b1905 Author: Alexander Ziaee AuthorDate: 2024-09-21 17:47:53 +0000 Commit: Mitchell Horne CommitDate: 2024-10-15 20:18:13 +0000 mitigations.7: markup functions with Fn macro + include this page in `apropos Fn=memcpy` Reviewed by: emaste MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/1428 --- share/man/man7/mitigations.7 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/share/man/man7/mitigations.7 b/share/man/man7/mitigations.7 index fceaa21a67ea..61fd8641cf4e 100644 --- a/share/man/man7/mitigations.7 +++ b/share/man/man7/mitigations.7 @@ -290,11 +290,11 @@ When enabled, enables extra bounds checking in various functions that accept buffers to be written into. These functions currently have extra bounds checking support: -.Bl -column -offset indent "snprintf" "memmove" "strncpy" "vsnprintf" "readlink" -.It bcopy Ta bzero Ta fgets Ta getcwd Ta gets -.It memcpy Ta memmove Ta memset Ta read Ta readlink -.It snprintf Ta sprintf Ta stpcpy Ta stpncpy Ta strcat -.It strcpy Ta strncat Ta strncpy Ta vsnprintf Ta vsprintf +.Bl -column -offset indent "snprintf()" "memmove()" "strncpy()" "vsnprintf()" "readlink()" +.It Fn bcopy Ta Fn bzero Ta Fn fgets Ta Fn getcwd Ta Fn gets +.It Fn memcpy Ta Fn memmove Ta Fn memset Ta Fn read Ta Fn readlink +.It Fn snprintf Ta Fn sprintf Ta Fn stpcpy Ta Fn stpncpy Ta Fn strcat +.It Fn strcpy Ta Fn strncat Ta Fn strncpy Ta Fn vsnprintf Ta Fn vsprintf .El .Pp .Dq FORTIFY_SOURCE From nobody Tue Oct 15 20:21: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 4XSlqV1rgBz5YxHw; Tue, 15 Oct 2024 20:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSlqV0p5Sz4vfp; Tue, 15 Oct 2024 20:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O8FMDhkncuKrkUU475UIagEJIzjvrVkzJh5wGHjN0Vc=; b=ih3qq5aT6UzjxwjQXI4o4Mwx0t6+V2LvETp00jZmSE87YSRcnUAS2cYoEps5PQWJS1Qsqa meQMBqD5XLMxOp0ZkereTwAC7onTd7CuHP9BAxJe2JFLRuCSwRCR0puf2odW7Tl+DtUaFJ ccKiRpn35iN6pGGNlFAzk5OQGbzhG5OsKrl+GDQhI7YEd+jkv/A2od7AQKJGTKrQtGRFlE 2Ox2jACQBS24tof68hbfYd6CFdXdCSOYmx1n7CoGplCKqsFp72Nd0K/GaSAhbNoabUq8CX xbnx+ey0gBLAxjCS+XAc/YDgKnoMTjQQIwmMXZJ0pHoec/4SltY2sAidt1z9dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O8FMDhkncuKrkUU475UIagEJIzjvrVkzJh5wGHjN0Vc=; b=OzoKniEFrQ9MfcgpIfLNgqaFkU371oS2IYBXSV5DOmDt0uuTMGG3lKCGBadSBMZXQkYwAY SxS9gVVrRuFMxLLqu9S994poC0hZewwEJ7NlxVAdZTGIxSHvCpiXdo5iOVyexRKPfB407j R+5CLyqvjo9pkpN/qvbBwLkgsP5EBU/8iXuk0baobBytRdOjeBg0LyecnvgsAV6vIevW/K 14t9e4URCc70y0QID+5zb/O74ygePWTA3VhbdBT2HfSwSZilElckIZMlbjEMnB56rOHr8u e7stiugICCvFE/s4DY65y/cVNINwOc28bgsdA/OGm2X3yruxazSA5f3MHQRZsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729023686; a=rsa-sha256; cv=none; b=nq5BwkWF7h9uQbK1Xxduq1Jv6pg8j/fNz7GWJvrtTV97vzE/k2YEkcbhitMBc3orHugk5O uj9+3C0Y7cJ5qjZY9LQ+Pp7icO1r+FxgwjUnvTqLu826W1jle/vA/Ge+7uQz00nIbyGQZ8 ok4DCdPEKJNKrof7xg9FyQWUG6XZgeIt90FTUDGTg/O69DNLvcBcrVQdT4mnxYUQjZY5b5 kI9hc8kQWXzd2wCJcJf7SWLSx0pAv937qHTjEankoteL7+H9kpahaUa+zibrsQ+IBbeYCf UTBz/TyeWHVPMud3DQWaEjWRpp73x4yGtE5SwkR9C9MdNtHjViitpGEdvn7hfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSlqV00qGzc3f; Tue, 15 Oct 2024 20:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FKLPGS028931; Tue, 15 Oct 2024 20:21:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FKLPkp028928; Tue, 15 Oct 2024 20:21:25 GMT (envelope-from git) Date: Tue, 15 Oct 2024 20:21:25 GMT Message-Id: <202410152021.49FKLPkp028928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: c3294033e024 - main - mitigations.7: minor cleanup (linter errors) 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3294033e024620874ecfc219174347989378a3b Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c3294033e024620874ecfc219174347989378a3b commit c3294033e024620874ecfc219174347989378a3b Author: Alexander Ziaee AuthorDate: 2024-09-21 18:03:57 +0000 Commit: Mitchell Horne CommitDate: 2024-10-15 20:18:14 +0000 mitigations.7: minor cleanup (linter errors) Reviewed by: emaste MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/1428 --- share/man/man7/mitigations.7 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/share/man/man7/mitigations.7 b/share/man/man7/mitigations.7 index 61fd8641cf4e..c487e4e1000b 100644 --- a/share/man/man7/mitigations.7 +++ b/share/man/man7/mitigations.7 @@ -154,7 +154,7 @@ proccontrol .Ss Position Independent Executable (PIE) PIE binaries are executable files that do not have a fixed load address. They can be loaded at an arbitrary memory address by the -.Xr rtld +.Xr rtld 1 run-time linker. With ASLR they are loaded at a random address on each execution. .\" @@ -185,17 +185,19 @@ Allow 64-bit processes to map pages simultaneously writable and executable. .\" .Ss PROT_MAX .Dv PROT_MAX -is a FreeBSD-specific extension to +is a +.Fx Ns +-specific extension to .Xr mmap 2 . .Dv PROT_MAX provides the ability to set the maximum protection of a region allocated by -.Xr mmap +.Xr mmap 2 and later altered by -.Xr mprotect . +.Xr mprotect 2 . For example, memory allocated originally with an mmap prot argument of PROT_MAX(PROT_READ | PROT_WRITE) | PROT_READ may be made writable by a future -.Xr mprotect +.Xr mprotect 2 call, but may not be made executable. .\" .Ss Relocation Read-Only (RELRO) From nobody Tue Oct 15 20:21: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 4XSlqW2qgRz5YxNK; Tue, 15 Oct 2024 20:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSlqW1gWwz4vjk; Tue, 15 Oct 2024 20:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2AaF7YimbyH5Hfqa6I1n2NNO/p+XSbQgqeCa3PNcbw=; b=FRsfoPEJTb9CJ2o7fIw6ZJQDlzbRMTHQJliiFwaV+YOyVmnxB482+06qItwsD2ovctT3C4 I1s6/dFuJFohE/uxq+GLo0/q4Ug3BoH823xakkU/2jf5YBNFhG8x6Om4riV3tTnTKQ0yAS QRQJsC18uTlXFYVXJNvIkD/j4n68jRVu2gL8bG0PgmqVDgvhYWf4wFc5uku3WbArfmXiRi db1xfY0KJIv/K5aVs/cHGi5e7wn17CNK/uaZy834klUGUt6G6KE9hOxGqoQYeFdVxafHOm fQtuiwUubeDVr8ItnhS7+zUn88b70c0BNhpqbtoFE8jKfSXXUR2M/M2Z9RtO4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2AaF7YimbyH5Hfqa6I1n2NNO/p+XSbQgqeCa3PNcbw=; b=F8w60JcPfojPFEFSxDqgmWN3pASzrPcpaojokHgLFyfvBOMGzsqTqVEpO1189GxKuWUl7J 15JhWsjMMBzrOxATfEA5IdvmE4TUoLMkras5sQ+wpe8hk/Ui/Qa+/7aaO/5Nchkck8TsGz dJL3hJhRQn9CvdFcwFgf89bFSh0ke/2owUNQtK/MHrfVyn4bmVw9DAH+4eOrnv9jvezbhB 4UGoikGI5xKF7V0SC35wu1LXo1Qkh3UTup/NCy0nhYVR7FpxBhvklGV3XidLxAiAYhhyq1 O12kV6mGlqMNTfvecMZflV9wqAuUwi2kO7x7OiSnVjC9vvdbl4QALUr6mLbxeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729023687; a=rsa-sha256; cv=none; b=KZWLAN3XaxhF9JepYCJTDwzKSchGlLcvWM8sRJjz53rNBo4CKSa5H1D0Jj25tHgShHNSK9 dJZuwaAolBOx2Tnv6w2R3IeS7t9XlJYd2MFHsFRG3mGHmzPaO7SRvnha2I8yjWnFvHAipT uFglfneS9rxx8We4wsLkotRVjodhCuWZQR1CND0eZkeMkRdsEQ31Ua0Rjfi7vOtvGcFalq nADx5rOsVLX2omXrLPaSipApMMnPe2qorIX+04EC2AzodyHyMeM7HmaO76HPOYr7vdl7Lo /CU/oMAhhHu/4kmEIKVMlT9x88vvLtxX/dDqKtm0TlJXsu3f3Lj5UM7Kz148DQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSlqW0vTRzc3g; Tue, 15 Oct 2024 20:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FKLRQc029555; Tue, 15 Oct 2024 20:21:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FKLRQn029552; Tue, 15 Oct 2024 20:21:27 GMT (envelope-from git) Date: Tue, 15 Oct 2024 20:21:27 GMT Message-Id: <202410152021.49FKLRQn029552@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 6e1fc0118033 - main - manuals: Fix "unusual .Xr" warnings with a script 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e1fc0118033f42b7c0d3623c8f67a89ebecabb2 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=6e1fc0118033f42b7c0d3623c8f67a89ebecabb2 commit 6e1fc0118033f42b7c0d3623c8f67a89ebecabb2 Author: Graham Percival AuthorDate: 2024-10-15 15:44:42 +0000 Commit: Mitchell Horne CommitDate: 2024-10-15 20:18:14 +0000 manuals: Fix "unusual .Xr" warnings with a script These were reported by `mandoc -T lint ...` as warnings: - unusual Xr order - unusual Xr punctuation Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts Signed-off-by: Graham Percival Reviewed by: mhorne, Alexander Ziaee Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1464 --- bin/rmdir/rmdir.1 | 2 +- lib/libc/gen/posix_spawn.3 | 4 ++-- lib/libc/gen/setproctitle.3 | 4 ++-- lib/libc/stdlib/memory.3 | 2 +- lib/libc/string/bstring.3 | 1 - lib/libjail/jail.3 | 2 +- lib/libpam/modules/pam_chroot/pam_chroot.8 | 4 ++-- lib/libpam/modules/pam_deny/pam_deny.8 | 4 ++-- lib/libpam/modules/pam_echo/pam_echo.8 | 4 ++-- lib/libpam/modules/pam_exec/pam_exec.8 | 6 +++--- lib/libpam/modules/pam_ftpusers/pam_ftpusers.8 | 4 ++-- lib/libpam/modules/pam_group/pam_group.8 | 4 ++-- lib/libpam/modules/pam_guest/pam_guest.8 | 4 ++-- lib/libpam/modules/pam_krb5/pam_krb5.8 | 4 ++-- lib/libpam/modules/pam_ksu/pam_ksu.8 | 4 ++-- lib/libpam/modules/pam_lastlog/pam_lastlog.8 | 4 ++-- lib/libpam/modules/pam_nologin/pam_nologin.8 | 4 ++-- lib/libpam/modules/pam_passwdqc/pam_passwdqc.8 | 4 ++-- lib/libpam/modules/pam_permit/pam_permit.8 | 4 ++-- lib/libpam/modules/pam_radius/pam_radius.8 | 4 ++-- lib/libpam/modules/pam_rhosts/pam_rhosts.8 | 4 ++-- lib/libpam/modules/pam_rootok/pam_rootok.8 | 4 ++-- lib/libpam/modules/pam_securetty/pam_securetty.8 | 4 ++-- lib/libpam/modules/pam_self/pam_self.8 | 4 ++-- lib/libpam/modules/pam_ssh/pam_ssh.8 | 4 ++-- lib/libpam/modules/pam_unix/pam_unix.8 | 2 +- lib/libsys/fhreadlink.2 | 2 +- lib/libsys/getrlimitusage.2 | 2 +- lib/libsys/socket.2 | 6 +++--- lib/libsys/thr_kill.2 | 2 +- lib/libsys/x86/pkru.3 | 2 +- lib/libsysdecode/sysdecode_sctp_sinfo_flags.3 | 2 +- lib/libthr/libthr.3 | 4 ++-- lib/libveriexec/veriexec.3 | 2 +- sbin/comcontrol/comcontrol.8 | 2 +- sbin/newfs/newfs.8 | 2 +- sbin/umount/umount.8 | 4 ++-- share/man/man4/atopcase.4 | 4 ++-- share/man/man4/cd.4 | 2 +- share/man/man4/cdce.4 | 4 ++-- share/man/man4/dummynet.4 | 4 ++-- share/man/man4/ftgpio.4 | 2 +- share/man/man4/ipfirewall.4 | 2 +- share/man/man4/ipsec.4 | 2 +- share/man/man4/lindebugfs.4 | 4 ++-- share/man/man4/mac_do.4 | 4 ++-- share/man/man4/man4.aarch64/rk_gpio.4 | 2 +- share/man/man4/man4.aarch64/rk_i2c.4 | 2 +- share/man/man4/man4.aarch64/rk_pinctrl.4 | 2 +- share/man/man4/man4.arm/imx6_ahci.4 | 2 +- share/man/man4/mpi3mr.4 | 2 +- share/man/man4/netmap.4 | 4 ++-- share/man/man4/ng_nat.4 | 4 ++-- share/man/man4/ng_pppoe.4 | 4 ++-- share/man/man4/procdesc.4 | 2 +- share/man/man4/virtio_gpu.4 | 2 +- share/man/man5/pf.conf.5 | 2 +- share/man/man8/rc.subr.8 | 2 +- share/man/man8/uefi.8 | 2 +- share/man/man9/VOP_SETLABEL.9 | 8 ++++---- share/man/man9/cr_bsd_visible.9 | 8 ++++---- share/man/man9/cr_cansee.9 | 6 +++--- share/man/man9/cr_canseeothergids.9 | 4 ++-- share/man/man9/groupmember.9 | 2 +- share/man/man9/p_candebug.9 | 8 ++++---- share/man/man9/p_cansee.9 | 4 ++-- share/man/man9/rtentry.9 | 2 +- tools/tools/ether_reflect/ether_reflect.1 | 2 +- usr.bin/beep/beep.1 | 2 +- usr.bin/gzip/gzip.1 | 2 +- usr.bin/mdo/mdo.1 | 2 +- usr.bin/msgs/msgs.1 | 2 +- usr.bin/posixmqcontrol/posixmqcontrol.1 | 2 +- usr.sbin/efibootmgr/efibootmgr.8 | 2 +- usr.sbin/i2c/i2c.8 | 2 +- usr.sbin/jail/jail.8 | 2 +- usr.sbin/lastlogin/lastlogin.8 | 4 ++-- usr.sbin/mailwrapper/mailwrapper.8 | 2 +- usr.sbin/rpc.tlsclntd/rpc.tlsclntd.8 | 2 +- 79 files changed, 126 insertions(+), 127 deletions(-) diff --git a/bin/rmdir/rmdir.1 b/bin/rmdir/rmdir.1 index eb23c605050c..b43328110960 100644 --- a/bin/rmdir/rmdir.1 +++ b/bin/rmdir/rmdir.1 @@ -96,7 +96,7 @@ stopping at the first non-empty directory (if any): .Pp .Dl $ rmdir -p cow/horse/monkey .Sh SEE ALSO -.Xr rm 1 +.Xr rm 1 , .Xr rmdir 2 .Sh STANDARDS The diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index 55559ae7222b..278fee88463a 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -446,12 +446,12 @@ action. .Xr sched_setscheduler 2 , .Xr setpgid 2 , .Xr vfork 2 , +.Xr posix_spawn_file_actions_addchdir_np 3 , .Xr posix_spawn_file_actions_addclose 3 , .Xr posix_spawn_file_actions_addclosefrom_np 3 , .Xr posix_spawn_file_actions_adddup2 3 , -.Xr posix_spawn_file_actions_addopen 3 , -.Xr posix_spawn_file_actions_addchdir_np 3 , .Xr posix_spawn_file_actions_addfchdir_np 3 , +.Xr posix_spawn_file_actions_addopen 3 , .Xr posix_spawn_file_actions_destroy 3 , .Xr posix_spawn_file_actions_init 3 , .Xr posix_spawnattr_destroy 3 , diff --git a/lib/libc/gen/setproctitle.3 b/lib/libc/gen/setproctitle.3 index 15bafa23a982..087cbe4b84e9 100644 --- a/lib/libc/gen/setproctitle.3 +++ b/lib/libc/gen/setproctitle.3 @@ -74,10 +74,10 @@ setproctitle("talking to %s", inet_ntoa(addr)); .Sh SEE ALSO .Xr ps 1 , .Xr w 1 , -.Xr setprogname 3 , .Xr kvm 3 , .Xr kvm_getargv 3 , -.Xr printf 3 +.Xr printf 3 , +.Xr setprogname 3 .Sh STANDARDS The .Fn setproctitle diff --git a/lib/libc/stdlib/memory.3 b/lib/libc/stdlib/memory.3 index 3e0d2bf8e304..b7703cf44bd5 100644 --- a/lib/libc/stdlib/memory.3 +++ b/lib/libc/stdlib/memory.3 @@ -83,7 +83,7 @@ individual manual pages. .Xr posix_memalign 3 , .Xr realloc 3 , .Xr reallocf 3 , -.Xr valloc 3 , +.Xr valloc 3 .Sh STANDARDS The .Fn calloc , diff --git a/lib/libc/string/bstring.3 b/lib/libc/string/bstring.3 index 91603fe6dbac..dd89af44fc4a 100644 --- a/lib/libc/string/bstring.3 +++ b/lib/libc/string/bstring.3 @@ -83,7 +83,6 @@ See the specific manual pages for more information. .Xr memccpy 3 , .Xr memchr 3 , .Xr memcmp 3 , -.Xr memccpy 3 , .Xr memcpy 3 , .Xr memmove 3 , .Xr memset 3 diff --git a/lib/libjail/jail.3 b/lib/libjail/jail.3 index 3c3c24d75dc4..820e378eb625 100644 --- a/lib/libjail/jail.3 +++ b/lib/libjail/jail.3 @@ -270,8 +270,8 @@ A parameter is of an unknown type. .El .Sh SEE ALSO .Xr jail 2 , -.Xr jail 3lua , .Xr sysctl 3 , +.Xr jail 3lua , .Xr jail 8 .Sh HISTORY The diff --git a/lib/libpam/modules/pam_chroot/pam_chroot.8 b/lib/libpam/modules/pam_chroot/pam_chroot.8 index e65c513b7b77..1f614264ba8e 100644 --- a/lib/libpam/modules/pam_chroot/pam_chroot.8 +++ b/lib/libpam/modules/pam_chroot/pam_chroot.8 @@ -78,8 +78,8 @@ Specify the chroot directory to use if one could not be derived from the user's home directory. .El .Sh SEE ALSO -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam 3 , +.Xr pam.conf 5 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_deny/pam_deny.8 b/lib/libpam/modules/pam_deny/pam_deny.8 index 530bae05c1f3..5d70bde200d9 100644 --- a/lib/libpam/modules/pam_deny/pam_deny.8 +++ b/lib/libpam/modules/pam_deny/pam_deny.8 @@ -73,6 +73,6 @@ reasons why the user's authentication attempt was declined. .El .Sh SEE ALSO +.Xr pam 3 , .Xr syslog 3 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam.conf 5 diff --git a/lib/libpam/modules/pam_echo/pam_echo.8 b/lib/libpam/modules/pam_echo/pam_echo.8 index c38d4d8cee55..19c083917bbf 100644 --- a/lib/libpam/modules/pam_echo/pam_echo.8 +++ b/lib/libpam/modules/pam_echo/pam_echo.8 @@ -77,8 +77,8 @@ expands to the character following the .Cm % character. .Sh SEE ALSO -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam 3 , +.Xr pam.conf 5 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_exec/pam_exec.8 b/lib/libpam/modules/pam_exec/pam_exec.8 index c77162955730..be5666003557 100644 --- a/lib/libpam/modules/pam_exec/pam_exec.8 +++ b/lib/libpam/modules/pam_exec/pam_exec.8 @@ -148,15 +148,15 @@ Each valid codes numerical value is available as an environment variable etc). This is useful in shell scripts for instance. .Sh SEE ALSO -.Xr pam_get_item 3 , -.Xr pam.conf 5 , .Xr pam 3 , +.Xr pam_get_item 3 , .Xr pam_sm_acct_mgmt 3 , .Xr pam_sm_authenticate 3 , .Xr pam_sm_chauthtok 3 , .Xr pam_sm_close_session 3 , .Xr pam_sm_open_session 3 , -.Xr pam_sm_setcred 3 +.Xr pam_sm_setcred 3 , +.Xr pam.conf 5 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_ftpusers/pam_ftpusers.8 b/lib/libpam/modules/pam_ftpusers/pam_ftpusers.8 index a5c810fd2de5..d5a0f0f1fd2e 100644 --- a/lib/libpam/modules/pam_ftpusers/pam_ftpusers.8 +++ b/lib/libpam/modules/pam_ftpusers/pam_ftpusers.8 @@ -82,9 +82,9 @@ will succeed if and only if the user is not listed in .Pa /etc/ftpusers . .El .Sh SEE ALSO +.Xr pam 3 , .Xr ftpusers 5 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam.conf 5 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_group/pam_group.8 b/lib/libpam/modules/pam_group/pam_group.8 index ed96d45db503..315aaa6cc267 100644 --- a/lib/libpam/modules/pam_group/pam_group.8 +++ b/lib/libpam/modules/pam_group/pam_group.8 @@ -86,8 +86,8 @@ options are mutually exclusive, and that .Nm will fail if both are specified. .Sh SEE ALSO -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam 3 , +.Xr pam.conf 5 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_guest/pam_guest.8 b/lib/libpam/modules/pam_guest/pam_guest.8 index 541fd299ba8b..c626187d5b19 100644 --- a/lib/libpam/modules/pam_guest/pam_guest.8 +++ b/lib/libpam/modules/pam_guest/pam_guest.8 @@ -80,10 +80,10 @@ password. Requires the guest user to type in the guest account name as password. .El .Sh SEE ALSO +.Xr pam 3 , .Xr pam_get_item 3 , .Xr pam_getenv 3 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam.conf 5 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.8 b/lib/libpam/modules/pam_krb5/pam_krb5.8 index b59fdbdee9c4..7c1770961272 100644 --- a/lib/libpam/modules/pam_krb5/pam_krb5.8 +++ b/lib/libpam/modules/pam_krb5/pam_krb5.8 @@ -222,9 +222,9 @@ file containing Kerberos principals that are allowed access. .Sh SEE ALSO .Xr kdestroy 1 , .Xr passwd 1 , +.Xr pam 3 , .Xr syslog 3 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam.conf 5 .Sh NOTES Applications should not call .Fn pam_authenticate diff --git a/lib/libpam/modules/pam_ksu/pam_ksu.8 b/lib/libpam/modules/pam_ksu/pam_ksu.8 index 36d6936423b1..ace570ea5b5b 100644 --- a/lib/libpam/modules/pam_ksu/pam_ksu.8 +++ b/lib/libpam/modules/pam_ksu/pam_ksu.8 @@ -115,6 +115,6 @@ the user is prompted for another password. .El .Sh SEE ALSO .Xr su 1 , +.Xr pam 3 , .Xr syslog 3 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam.conf 5 diff --git a/lib/libpam/modules/pam_lastlog/pam_lastlog.8 b/lib/libpam/modules/pam_lastlog/pam_lastlog.8 index 6e5ba8770ada..e924016151fa 100644 --- a/lib/libpam/modules/pam_lastlog/pam_lastlog.8 +++ b/lib/libpam/modules/pam_lastlog/pam_lastlog.8 @@ -84,11 +84,11 @@ Ignore I/O failures. .Xr last 1 , .Xr w 1 , .Xr getutxent 3 , +.Xr pam 3 , .Xr ulog_login 3 , .Xr ulog_logout 3 , .Xr pam.conf 5 , -.Xr lastlogin 8 , -.Xr pam 3 +.Xr lastlogin 8 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_nologin/pam_nologin.8 b/lib/libpam/modules/pam_nologin/pam_nologin.8 index 30f87a65b63e..ff49749e50f1 100644 --- a/lib/libpam/modules/pam_nologin/pam_nologin.8 +++ b/lib/libpam/modules/pam_nologin/pam_nologin.8 @@ -81,8 +81,8 @@ reasons why the user's login attempt was declined. .El .Sh SEE ALSO +.Xr pam 3 , .Xr syslog 3 , .Xr login.conf 5 , .Xr nologin 5 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam.conf 5 diff --git a/lib/libpam/modules/pam_passwdqc/pam_passwdqc.8 b/lib/libpam/modules/pam_passwdqc/pam_passwdqc.8 index f2ec1747d1f8..755e93520427 100644 --- a/lib/libpam/modules/pam_passwdqc/pam_passwdqc.8 +++ b/lib/libpam/modules/pam_passwdqc/pam_passwdqc.8 @@ -248,8 +248,8 @@ is that the former is incompatible with .El .Sh SEE ALSO .Xr getpwnam 3 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam 3 , +.Xr pam.conf 5 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_permit/pam_permit.8 b/lib/libpam/modules/pam_permit/pam_permit.8 index f0b2f5527066..270eaee8361d 100644 --- a/lib/libpam/modules/pam_permit/pam_permit.8 +++ b/lib/libpam/modules/pam_permit/pam_permit.8 @@ -68,6 +68,6 @@ debugging information at level. .El .Sh SEE ALSO +.Xr pam 3 , .Xr syslog 3 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam.conf 5 diff --git a/lib/libpam/modules/pam_radius/pam_radius.8 b/lib/libpam/modules/pam_radius/pam_radius.8 index 6b2d1ef1fa55..abc916dcfff6 100644 --- a/lib/libpam/modules/pam_radius/pam_radius.8 +++ b/lib/libpam/modules/pam_radius/pam_radius.8 @@ -123,9 +123,9 @@ The standard RADIUS client configuration file for .Nm .El .Sh SEE ALSO +.Xr pam 3 , .Xr passwd 5 , -.Xr radius.conf 5 , -.Xr pam 3 +.Xr radius.conf 5 .Sh HISTORY The .Nm diff --git a/lib/libpam/modules/pam_rhosts/pam_rhosts.8 b/lib/libpam/modules/pam_rhosts/pam_rhosts.8 index ea005738840c..1f9716b9a0ca 100644 --- a/lib/libpam/modules/pam_rhosts/pam_rhosts.8 +++ b/lib/libpam/modules/pam_rhosts/pam_rhosts.8 @@ -78,9 +78,9 @@ was declined. do not automatically fail if the target user's UID is 0. .El .Sh SEE ALSO +.Xr pam 3 , .Xr hosts.equiv 5 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam.conf 5 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_rootok/pam_rootok.8 b/lib/libpam/modules/pam_rootok/pam_rootok.8 index d1ab8226e2ca..fd0a6dd3791f 100644 --- a/lib/libpam/modules/pam_rootok/pam_rootok.8 +++ b/lib/libpam/modules/pam_rootok/pam_rootok.8 @@ -69,5 +69,5 @@ authentication attempt was declined. .El .Sh SEE ALSO .Xr getuid 2 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam 3 , +.Xr pam.conf 5 diff --git a/lib/libpam/modules/pam_securetty/pam_securetty.8 b/lib/libpam/modules/pam_securetty/pam_securetty.8 index b19979000978..582389cf101d 100644 --- a/lib/libpam/modules/pam_securetty/pam_securetty.8 +++ b/lib/libpam/modules/pam_securetty/pam_securetty.8 @@ -84,7 +84,7 @@ authentication attempt was declined. .El .Sh SEE ALSO .Xr getttynam 3 , +.Xr pam 3 , .Xr syslog 3 , .Xr pam.conf 5 , -.Xr ttys 5 , -.Xr pam 3 +.Xr ttys 5 diff --git a/lib/libpam/modules/pam_self/pam_self.8 b/lib/libpam/modules/pam_self/pam_self.8 index c3623998f0be..f875d671286b 100644 --- a/lib/libpam/modules/pam_self/pam_self.8 +++ b/lib/libpam/modules/pam_self/pam_self.8 @@ -80,8 +80,8 @@ do not automatically fail if the current real user ID is 0. .El .Sh SEE ALSO .Xr getuid 2 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam 3 , +.Xr pam.conf 5 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_ssh/pam_ssh.8 b/lib/libpam/modules/pam_ssh/pam_ssh.8 index e63930eb5340..3ef44d8b687b 100644 --- a/lib/libpam/modules/pam_ssh/pam_ssh.8 +++ b/lib/libpam/modules/pam_ssh/pam_ssh.8 @@ -138,8 +138,8 @@ SSH2 Ed25519 key .El .Sh SEE ALSO .Xr ssh-agent 1 , -.Xr pam.conf 5 , -.Xr pam 3 +.Xr pam 3 , +.Xr pam.conf 5 .Sh AUTHORS The .Nm diff --git a/lib/libpam/modules/pam_unix/pam_unix.8 b/lib/libpam/modules/pam_unix/pam_unix.8 index 170cf65f34db..5c2ae5cf52e2 100644 --- a/lib/libpam/modules/pam_unix/pam_unix.8 +++ b/lib/libpam/modules/pam_unix/pam_unix.8 @@ -201,10 +201,10 @@ password database. .Xr getlogin 2 , .Xr crypt 3 , .Xr getpwent 3 , +.Xr pam 3 , .Xr syslog 3 , .Xr nsswitch.conf 5 , .Xr passwd 5 , -.Xr pam 3 , .Xr pw 8 , .Xr yp 8 .Sh BUGS diff --git a/lib/libsys/fhreadlink.2 b/lib/libsys/fhreadlink.2 index 222142de223e..2d8db95685da 100644 --- a/lib/libsys/fhreadlink.2 +++ b/lib/libsys/fhreadlink.2 @@ -86,8 +86,8 @@ The file handle is no longer valid .El .Sh SEE ALSO -.Xr fhstat 2 , .Xr fhlink 2 , +.Xr fhstat 2 .Sh HISTORY The .Fn fhreadlink diff --git a/lib/libsys/getrlimitusage.2 b/lib/libsys/getrlimitusage.2 index 2e3dc744ab23..e82e7b4443fd 100644 --- a/lib/libsys/getrlimitusage.2 +++ b/lib/libsys/getrlimitusage.2 @@ -92,7 +92,7 @@ and .Sh SEE ALSO .Xr procstat 1 , .Xr getrlimit 2 , -.Xr setrlimit 2 . +.Xr setrlimit 2 .Sh HISTORY The .Fn getrlimitusage diff --git a/lib/libsys/socket.2 b/lib/libsys/socket.2 index b2305df6f9fe..a383cbcc4d80 100644 --- a/lib/libsys/socket.2 +++ b/lib/libsys/socket.2 @@ -282,13 +282,10 @@ The socket type is not supported by the protocol. .Xr accept 2 , .Xr bind 2 , .Xr connect 2 , -.Xr divert 4 , .Xr getpeername 2 , .Xr getsockname 2 , .Xr getsockopt 2 , .Xr ioctl 2 , -.Xr ip 4 , -.Xr ip6 4 , .Xr listen 2 , .Xr read 2 , .Xr recv 2 , @@ -299,6 +296,9 @@ The socket type is not supported by the protocol. .Xr write 2 , .Xr CMSG_DATA 3 , .Xr getprotoent 3 , +.Xr divert 4 , +.Xr ip 4 , +.Xr ip6 4 , .Xr netgraph 4 , .Xr protocols 5 .Rs diff --git a/lib/libsys/thr_kill.2 b/lib/libsys/thr_kill.2 index a18e53e61008..3252de13ed8c 100644 --- a/lib/libsys/thr_kill.2 +++ b/lib/libsys/thr_kill.2 @@ -109,12 +109,12 @@ The current process does not have sufficient privilege to check existence or send a signal to the specified process. .El .Sh SEE ALSO +.Xr _umtx_op 2 , .Xr kill 2 , .Xr thr_exit 2 , .Xr thr_new 2 , .Xr thr_self 2 , .Xr thr_set_name 2 , -.Xr _umtx_op 2 , .Xr pthread_kill 3 , .Xr signal 3 .Sh STANDARDS diff --git a/lib/libsys/x86/pkru.3 b/lib/libsys/x86/pkru.3 index 2bcb6a64baaa..7b5ceb025d62 100644 --- a/lib/libsys/x86/pkru.3 +++ b/lib/libsys/x86/pkru.3 @@ -195,7 +195,7 @@ and the range already has defined protection keys. .Xr mmap 2 , .Xr mprotect 2 , .Xr munmap 2 , -.Xr sysarch 2 . +.Xr sysarch 2 .Sh STANDARDS The .Nm diff --git a/lib/libsysdecode/sysdecode_sctp_sinfo_flags.3 b/lib/libsysdecode/sysdecode_sctp_sinfo_flags.3 index e5995bff8329..4eb25187f0d0 100644 --- a/lib/libsysdecode/sysdecode_sctp_sinfo_flags.3 +++ b/lib/libsysdecode/sysdecode_sctp_sinfo_flags.3 @@ -46,5 +46,5 @@ to the stream .Fa fp . In particular, the embedded PR-SCTP policies are handled. .Sh SEE ALSO -.Xr sysdecode 3 +.Xr sysdecode 3 , .Xr sysdecode_sctp_pr_policy 3 diff --git a/lib/libthr/libthr.3 b/lib/libthr/libthr.3 index 7d0c7669654a..6d33f4c378ce 100644 --- a/lib/libthr/libthr.3 +++ b/lib/libthr/libthr.3 @@ -325,15 +325,15 @@ anyway. .Sh SEE ALSO .Xr ktrace 1 , .Xr ld-elf.so.1 1 , -.Xr getrlimit 2 , +.Xr _umtx_op 2 , .Xr errno 2 , +.Xr getrlimit 2 , .Xr thr_exit 2 , .Xr thr_kill 2 , .Xr thr_kill2 2 , .Xr thr_new 2 , .Xr thr_self 2 , .Xr thr_set_name 2 , -.Xr _umtx_op 2 , .Xr dlclose 3 , .Xr dlopen 3 , .Xr getenv 3 , diff --git a/lib/libveriexec/veriexec.3 b/lib/libveriexec/veriexec.3 index 8fd5822c8067..b367fc5ea40f 100644 --- a/lib/libveriexec/veriexec.3 +++ b/lib/libveriexec/veriexec.3 @@ -59,5 +59,5 @@ If the signature does not match, .Va errno is set to the reason for the mismatch. .Sh SEE ALSO -.Xr mac_veriexec 4 +.Xr mac_veriexec 4 , .Xr veriexec 4 diff --git a/sbin/comcontrol/comcontrol.8 b/sbin/comcontrol/comcontrol.8 index c5fdb52992dc..bee0fdab102b 100644 --- a/sbin/comcontrol/comcontrol.8 +++ b/sbin/comcontrol/comcontrol.8 @@ -52,7 +52,7 @@ dialin devices, hardwired terminals dialout devices .El .Sh SEE ALSO -.Xr stty 1 , +.Xr stty 1 .Sh HISTORY Originally part of cgd's com package patches, version 0.2.1, to .Bx 386 0.1 . diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index a7f792635aa9..5be4b5d03f74 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -350,13 +350,13 @@ than the historical defaults This large fragment size may lead to much wasted space on file systems that contain many small files. .Sh SEE ALSO -.Xr fdformat 8 , .Xr geom 4 , .Xr disktab 5 , .Xr fs 5 , .Xr camcontrol 8 , .Xr dump 8 , .Xr dumpfs 8 , +.Xr fdformat 8 , .Xr fsck 8 , .Xr gjournal 8 , .Xr gpart 8 , diff --git a/sbin/umount/umount.8 b/sbin/umount/umount.8 index 086980151d60..2c26ca868dae 100644 --- a/sbin/umount/umount.8 +++ b/sbin/umount/umount.8 @@ -187,8 +187,8 @@ file system table .Xr unmount 2 , .Xr fstab 5 , .Xr autounmountd 8 , -.Xr mount 8 , -.Xr mdconfig 8 +.Xr mdconfig 8 , +.Xr mount 8 .Sh HISTORY A .Nm diff --git a/share/man/man4/atopcase.4 b/share/man/man4/atopcase.4 index 33e47ec64ee8..a0c95a9e218f 100644 --- a/share/man/man4/atopcase.4 +++ b/share/man/man4/atopcase.4 @@ -101,9 +101,9 @@ device node. .El .Sh SEE ALSO .Xr acpi 4 , +.Xr loader.conf 5 , .Xr backlight 8 , -.Xr loader 8 , -.Xr loader.conf 5 . +.Xr loader 8 .Sh HISTORY The .Nm diff --git a/share/man/man4/cd.4 b/share/man/man4/cd.4 index b05e486af6b6..02bf96dbfc97 100644 --- a/share/man/man4/cd.4 +++ b/share/man/man4/cd.4 @@ -335,8 +335,8 @@ devices .Sh DIAGNOSTICS None. .Sh SEE ALSO -.Xr cd9660 4 , .Xr cam 4 , +.Xr cd9660 4 , .Xr da 4 , .Xr disklabel 8 , .Xr cd 9 diff --git a/share/man/man4/cdce.4 b/share/man/man4/cdce.4 index 9d842e475d85..87a6f5da4b08 100644 --- a/share/man/man4/cdce.4 +++ b/share/man/man4/cdce.4 @@ -140,10 +140,10 @@ is running low on mbufs. .Xr intro 4 , .Xr ipheth 4 , .Xr netintro 4 , +.Xr u3g 4 , +.Xr ucom 4 , .Xr urndis 4 , .Xr usb 4 , -.Xr ucom 4 , -.Xr u3g 4 , .Xr ifconfig 8 .Rs .%T "Universal Serial Bus Class Definitions for Communication Devices" diff --git a/share/man/man4/dummynet.4 b/share/man/man4/dummynet.4 index 81b1b33efb6e..ad82cb80011d 100644 --- a/share/man/man4/dummynet.4 +++ b/share/man/man4/dummynet.4 @@ -59,9 +59,9 @@ pipes. .Xr setsockopt 2 , .Xr if_bridge 4 , .Xr ip 4 , -.Xr ipfw 8 , -.Xr dnctl 8 , .Xr pf.conf 5 , +.Xr dnctl 8 , +.Xr ipfw 8 , .Xr sysctl 8 .Sh HISTORY The diff --git a/share/man/man4/ftgpio.4 b/share/man/man4/ftgpio.4 index e31457673fa5..7a5562841732 100644 --- a/share/man/man4/ftgpio.4 +++ b/share/man/man4/ftgpio.4 @@ -40,8 +40,8 @@ is a driver for the GPIO controller found on Fintek Super I/O chips. .Xr gpio 3 , .Xr gpio 4 , .Xr gpioled 4 , -.Xr gpioctl 8 .Xr superio 4 , +.Xr gpioctl 8 .Sh HISTORY The .Nm diff --git a/share/man/man4/ipfirewall.4 b/share/man/man4/ipfirewall.4 index bfc571bcb595..691ed3d331c0 100644 --- a/share/man/man4/ipfirewall.4 +++ b/share/man/man4/ipfirewall.4 @@ -149,11 +149,11 @@ man page for a complete description of the capabilities and how to use it. .Sh SEE ALSO .Xr setsockopt 2 , +.Xr libalias 3 , .Xr divert 4 , .Xr ip 4 , .Xr ip6 4 , .Xr ipfw 8 , -.Xr libalias 3 , .Xr natd 8 , .Xr sysctl 8 , .Xr syslogd 8 , diff --git a/share/man/man4/ipsec.4 b/share/man/man4/ipsec.4 index c5c9ed863385..2f0e13a2ad29 100644 --- a/share/man/man4/ipsec.4 +++ b/share/man/man4/ipsec.4 @@ -333,8 +333,8 @@ routines from looking into the IP payload. .Xr ipsec_set_policy 3 , .Xr crypto 4 , .Xr enc 4 , -.Xr if_ipsec 4 , .Xr icmp6 4 , +.Xr if_ipsec 4 , .Xr intro 4 , .Xr ip6 4 , .Xr setkey 8 , diff --git a/share/man/man4/lindebugfs.4 b/share/man/man4/lindebugfs.4 index 25a398a93f22..34a196007086 100644 --- a/share/man/man4/lindebugfs.4 +++ b/share/man/man4/lindebugfs.4 @@ -77,11 +77,11 @@ file system on .Pp .Dl "mount -t lindebugfs lindebugfs /sys/kernel/debug" .Sh SEE ALSO +.Xr mount 1 , .Xr linprocfs 4 , .Xr linsysfs 4 , -.Xr pseudofs 9 , .Xr linux 4 , -.Xr mount 1 +.Xr pseudofs 9 .Sh HISTORY The .Nm diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 index ce9f8cf25a4a..aa84a71b4953 100644 --- a/share/man/man4/mac_do.4 +++ b/share/man/man4/mac_do.4 @@ -74,5 +74,5 @@ The following rule: means the user with the uid 1001 can execute processes as user with uid 80, all the users which belongs to the group gid 0 can execute processes as any user. .Sh SEE ALSO -.Xr mac 4 , -.Xr mdo 1 +.Xr mdo 1 , +.Xr mac 4 diff --git a/share/man/man4/man4.aarch64/rk_gpio.4 b/share/man/man4/man4.aarch64/rk_gpio.4 index 69bcb1671f85..b5648662cf5e 100644 --- a/share/man/man4/man4.aarch64/rk_gpio.4 +++ b/share/man/man4/man4.aarch64/rk_gpio.4 @@ -47,7 +47,7 @@ rockchip,gpio-bank .El .Sh SEE ALSO .Xr gpiobus 4 , -.Xr gpioctl 8 , +.Xr gpioctl 8 .Sh HISTORY The .Nm diff --git a/share/man/man4/man4.aarch64/rk_i2c.4 b/share/man/man4/man4.aarch64/rk_i2c.4 index f30b510e7655..be1a0fab943e 100644 --- a/share/man/man4/man4.aarch64/rk_i2c.4 +++ b/share/man/man4/man4.aarch64/rk_i2c.4 @@ -49,7 +49,7 @@ rockchip,rk3328-i2c .El .Sh SEE ALSO .Xr iic 4 , -.Xr iicbus 4 , +.Xr iicbus 4 .Sh HISTORY The .Nm diff --git a/share/man/man4/man4.aarch64/rk_pinctrl.4 b/share/man/man4/man4.aarch64/rk_pinctrl.4 index c196c00d52b7..519b3e793cd1 100644 --- a/share/man/man4/man4.aarch64/rk_pinctrl.4 +++ b/share/man/man4/man4.aarch64/rk_pinctrl.4 @@ -46,7 +46,7 @@ compatible strings : rockchip,rk3328-pinctrl .El .Sh SEE ALSO -.Xr fdt_pinctrl 4 , +.Xr fdt_pinctrl 4 .Sh HISTORY The .Nm diff --git a/share/man/man4/man4.arm/imx6_ahci.4 b/share/man/man4/man4.arm/imx6_ahci.4 index cfe8a87deb6f..9979cef50d79 100644 --- a/share/man/man4/man4.arm/imx6_ahci.4 +++ b/share/man/man4/man4.arm/imx6_ahci.4 @@ -55,7 +55,7 @@ data and marshall resources for the standard driver. .Sh SEE ALSO .Xr ahci 4 , -.Xr fdt 4 , +.Xr fdt 4 .Sh HISTORY The .Nm diff --git a/share/man/man4/mpi3mr.4 b/share/man/man4/mpi3mr.4 index 981979e37187..f07ce13d2f23 100644 --- a/share/man/man4/mpi3mr.4 +++ b/share/man/man4/mpi3mr.4 @@ -64,7 +64,7 @@ Broadcom Ltd. 9600-8i8e 24G PCIe 4.0 Tri-Mode RAID Adapters .Xr mpr 4 , .Xr pci 4 , .Xr sa 4 , -.Xr scsi 4 . +.Xr scsi 4 .Sh HISTORY The .Nm diff --git a/share/man/man4/netmap.4 b/share/man/man4/netmap.4 index e258b60e11f6..6c5737c9b1a0 100644 --- a/share/man/man4/netmap.4 +++ b/share/man/man4/netmap.4 @@ -1123,10 +1123,10 @@ with the network card or the host. .Sh SEE ALSO .Xr vale 4 , .Xr bridge 8 , -.Xr valectl 8 , .Xr lb 8 , .Xr nmreplay 8 , -.Xr pkt-gen 8 +.Xr pkt-gen 8 , +.Xr valectl 8 .Pp .Pa http://info.iet.unipi.it/~luigi/netmap/ .Pp diff --git a/share/man/man4/ng_nat.4 b/share/man/man4/ng_nat.4 index 10615b3b387d..53cd841a7392 100644 --- a/share/man/man4/ng_nat.4 +++ b/share/man/man4/ng_nat.4 @@ -396,8 +396,8 @@ SEQ .Xr libalias 3 , .Xr ng_ipfw 4 , .Xr natd 8 , -.Xr ngctl 8 , -.Xr ng_ether 8 +.Xr ng_ether 8 , +.Xr ngctl 8 .Sh HISTORY The .Nm diff --git a/share/man/man4/ng_pppoe.4 b/share/man/man4/ng_pppoe.4 index 346b2bfbe279..5b5f0dd64de2 100644 --- a/share/man/man4/ng_pppoe.4 +++ b/share/man/man4/ng_pppoe.4 @@ -565,9 +565,9 @@ setup(char *ethername, char *service, char *sessname, .Xr ng_ether 4 , .Xr ng_ppp 4 , .Xr ng_socket 4 , +.Xr vlan 4 , .Xr ngctl 8 , -.Xr ppp 8 , -.Xr vlan 4 +.Xr ppp 8 .Rs .%A L. Mamakos .%A K. Lidl diff --git a/share/man/man4/procdesc.4 b/share/man/man4/procdesc.4 index d0b99e5cbe07..f1f3757aa836 100644 --- a/share/man/man4/procdesc.4 +++ b/share/man/man4/procdesc.4 @@ -58,10 +58,10 @@ Given a process descriptor, it is possible to query its conventional PID using .Sh SEE ALSO .Xr fork 2 , .Xr kill 2 , +.Xr kqueue 2 , .Xr pdfork 2 , .Xr pdgetpid 2 , .Xr pdkill 2 , -.Xr kqueue 2 , .Xr wait4 2 , .Xr capsicum 4 .Sh HISTORY diff --git a/share/man/man4/virtio_gpu.4 b/share/man/man4/virtio_gpu.4 index bb34ec419df6..f8d48faa05f0 100644 --- a/share/man/man4/virtio_gpu.4 +++ b/share/man/man4/virtio_gpu.4 @@ -46,7 +46,7 @@ device driver provides support for VirtIO gpu devices to create a .Xr vt 4 console. .Sh SEE ALSO -.Xr virtio 4 +.Xr virtio 4 , .Xr vt 4 .Sh HISTORY The diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 2edc7b1fb280..e461d9ac63b6 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -3438,8 +3438,8 @@ Service name database. .Xr pf 4 , .Xr pflow 4 , .Xr pfsync 4 , -.Xr tcp 4 , .Xr sctp 4 , +.Xr tcp 4 , .Xr udp 4 , .Xr hosts 5 , .Xr pf.os 5 , diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index 7dda3e8dae3f..36d7d4543e52 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -1180,8 +1180,8 @@ file resides in .Pa /etc . .El .Sh SEE ALSO -.Xr debug.sh 8 , .Xr rc.conf 5 , +.Xr debug.sh 8 , .Xr rc 8 .Sh HISTORY The diff --git a/share/man/man8/uefi.8 b/share/man/man8/uefi.8 *** 308 LINES SKIPPED *** From nobody Tue Oct 15 20:21: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 4XSlqX43vZz5YxFN; Tue, 15 Oct 2024 20:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSlqX2mBCz4vpN; Tue, 15 Oct 2024 20:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8zVCjPbzmGHmYc9qBK/7XO+bVxxx0B5NnnFaH3pVESY=; b=KchDRp4o8qCH8rpUKUM6AkHv7jM8+YdubVvbN84rNmZk4pE58ps0UiuKiOOucHfl5Y/T2s Ck2VHzf2IBevY0JeRNHmrDqAzisOv72vjs8t2Ue89+auWiFg/VddG2lCztyHZmzkCJvev0 FSIXgqiysv69o0cnIx7Xau2/n77OrlDhg6HpH5Oe1VETIpE9aaracu2Iti++0vdIEPjKPp ukyHIOU1D6oi4RgdxEccvLGkdOJ5yCww1LGXFSWuObSvfN3EtWO8Iw1TyuZm7Ru4r8jVST 9uN/hK0b73nPm9i9EBTD2NFdqv8/YCr6IDQ4yhjTKDJpRibm0cW8GwIefxyT8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8zVCjPbzmGHmYc9qBK/7XO+bVxxx0B5NnnFaH3pVESY=; b=ooVZSOb1J0XNfAYRHrN4mvcXsqRWjgbG0lkq50f0V/eeEiybHXinCKjxB6IBmtUQTWrLJN 9qF2ous5m1UpWifW+0pvx1RwYfhQSQ4yXZqCOZmcOJPbvxV9zBEMXnoqSubTLl968BYFMk ZUV+aM+j4c8SjO3cJbDh6ltGVT/i9Rdsk56bIhaYd6hBNHAEB4QesF2GWEFUL3wTZkRoST 91FptWTh2T2bP8tM8Gj5MRa6DqviL0/C7lYuy9Vd/UmU4zu9FSMp7hqm87Iod23lBUfsPU Su6qi59Yv6mF4e7WDp0UPyJsWnmNB3Fc96hcrOroki1onMLE36JfIbHIcO2wuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729023688; a=rsa-sha256; cv=none; b=OaNoz2J3yKs4o0rFakbWcsfEIM8b/IqBNNHfHb3+jQkIe+/Pq4cx7fYEspsefGCahsCIuv fYTWNJtwr1T4NXWZz8WqhlavSa4SA+15PU+Hez5wr1kSqyX7/dRa56HHLtatkhEpmY5Otr 8JNvxjt/KVqI50LmI8r4noMHsiJxfJbSFAGMBLiv/x2oEGZjYJ4m5R0iFgrKBQqWRM+GPE o5qOYse/lI6P+uRqDkhOdmbWwp9gUdlwG+mXKhKVrHu64ENKimIWizvlDqXXfmyb0Bt3p/ Ivn9mRUiYGOnRWkJ0sP/NGKQvLfORkspALA/UyH7YAuysYUpFvy7i6H5CPVaFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSlqX1blXzcRJ; Tue, 15 Oct 2024 20:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FKLSRK029602; Tue, 15 Oct 2024 20:21:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FKLSra029599; Tue, 15 Oct 2024 20:21:28 GMT (envelope-from git) Date: Tue, 15 Oct 2024 20:21:28 GMT Message-Id: <202410152021.49FKLSra029599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 229381deb270 - main - manuals: Misc syntax fixes 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 229381deb270e8e240d20b572c63234a61cbd977 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=229381deb270e8e240d20b572c63234a61cbd977 commit 229381deb270e8e240d20b572c63234a61cbd977 Author: Graham Percival AuthorDate: 2024-10-11 17:18:56 +0000 Commit: Mitchell Horne CommitDate: 2024-10-15 20:20:47 +0000 manuals: Misc syntax fixes These were reported by `mandoc -T lint ...` as errors. The rendered output (in ascii and html) is not affected by this commit. Signed-off-by: Graham Percival Reviewed by: mhorne MFC after: 3 days Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1459 --- share/man/man4/hidraw.4 | 2 +- share/man/man4/pfsync.4 | 2 -- share/man/man9/cdefs.9 | 1 + stand/lua/menu.lua.8 | 1 + usr.sbin/bhyve/bhyve_config.5 | 4 ++-- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/share/man/man4/hidraw.4 b/share/man/man4/hidraw.4 index 4631e253c1ef..f8eb9a21e9d7 100644 --- a/share/man/man4/hidraw.4 +++ b/share/man/man4/hidraw.4 @@ -198,7 +198,7 @@ specified by .Va buf . .It Dv HIDIOCGRAWPHYS(len) Pq Vt "char[] buf" Get the newbus path to the device. -.\For Bluetooth devices, it returns the hardware (MAC) address of the device. +.\"For Bluetooth devices, it returns the hardware (MAC) address of the device. Copies a maximum of .Va len bytes of the newbus device path diff --git a/share/man/man4/pfsync.4 b/share/man/man4/pfsync.4 index 96f498c7a7cb..472a1c05ec5a 100644 --- a/share/man/man4/pfsync.4 +++ b/share/man/man4/pfsync.4 @@ -147,7 +147,6 @@ E.g.: # ifconfig pfsync0 version 1301 .Ed .Pp -.Bd Currently the following versions are supported: .Bl -tag -width indent .It Cm 1301 @@ -156,7 +155,6 @@ Compatibility with FreeBSD 13.1 has been verified. .It Cm 1400 FreeBSD release 14.0. .El -.Ed .Pp .Nm has the following diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index d949c67b8f9a..8c127694ab6e 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -47,6 +47,7 @@ Due to testing constraints, tcc and pcc may not always work. .Pp Please note: Not every single minor versions of these compilers will work or are supported. +.El .Sh Macros and Magic for Programming Environment .Nm defines (or refrains from defining) a number of macros to increase portability diff --git a/stand/lua/menu.lua.8 b/stand/lua/menu.lua.8 index 6faffbe64d2e..e2a0ff09ffd9 100644 --- a/stand/lua/menu.lua.8 +++ b/stand/lua/menu.lua.8 @@ -281,6 +281,7 @@ stock_options[#stock_options + 1] = { end, alias= {"l", "L"} } +.Ed .Sh SEE ALSO .Xr loader.conf 5 , .Xr core.lua 8 , diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index 7b99737c3baa..51c0751f0f10 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -275,7 +275,7 @@ All PCI device nodes must contain a configuration variable named .Dq device which specifies the device model to use. The following PCI device models are supported: -.Bl -tag -indent +.Bl -tag -width indent .It Li hostbridge Provide a simple PCI-Host bridge device. This is usually configured at pci0:0:0 and is required by most guest @@ -330,7 +330,7 @@ All USB device nodes must contain a configuration variable named .Dq device which specifies the device model to use. The following USB device models are supported: -.Bl -tag -indent +.Bl -tag -width indent .It Li tablet A USB tablet device which provides precise cursor synchronization when using VNC. From nobody Tue Oct 15 20:21:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSlqY59zhz5YxFT; Tue, 15 Oct 2024 20:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSlqY3KWkz4vgR; Tue, 15 Oct 2024 20:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzjlJbcC1K8KJPEIJwLSMmHlkz+7CCyCrwnBzDBjzSA=; b=QLbrVQfagNXvRTgFxjmoDO0XIrGqSAyTEyGwbHnZlIZhuo18DFafinEP9hoSaoTu6mdC+X 186EzVJAuVCrDJaxyy4EidFWAFSan3MmZqYeoH5VzQoAhKbwVKVdjpBmaAWOONQja7n4/u pbPdHr1Ea7PC2Hc6zehhxB2LI5+aDlgUGA84XQWMzWmDxYHgqB2H9au/0uDkWIig7y2/41 WSRnA+caW+6ctpSM/1eXGMTcYjbgNcta89xZ8iPtDlsWVDXaib8ZZzbD6irJRkiuZr2/MM IuXLwS+/Xz+cMLMhibhqUdOJXZ9ryIekQozKuAz+4MgILF2jYyIfRt6prqr82A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzjlJbcC1K8KJPEIJwLSMmHlkz+7CCyCrwnBzDBjzSA=; b=X+A8YAPrH3f5SuRSyupsduAaDK3MYDy1aDHGwn7wtVBfgtGS0MVaGB5NlKWfn44RHgnVDX Y/BnE9PppX/Nxn3UVJAjYy0/61QCiIu2po3na+zNbYykHm7hPciPJrDuZR+sUKNhBTms5W /Tao0ZbQZO2H8WBkSo/23xKdSPxJSb7QlYDOzm6/caTDqcKuDtVfbRqzS7/68JCOQNjqVN rAsC3tOhp45OgbZUaTSKxXndzZRUPmPqlwpnVWZ20sSo21h41zDbSRLf+DI276YXLXVEt3 aW6YOhzpH7pTWVyeWpyMw37GSd1AqHZO4vCdK49HaR3oLqZ7HRjM9RGHjFh/fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729023689; a=rsa-sha256; cv=none; b=jbz8HcHBaWDF58+e+nufwX5fZKsNy3NnE5iMdHNpPgwVSsMRKGPL7RvGXSJCfQfJYziLQ4 vBtaMgP/NuiUUxSUqyrax8zLk+Df24WKLr0jG228eWDKdDXBw6TY/8qtJDB8Ohv2LZAbae Iyy/QUzvln4aptL/ti7vYGsi03h8MMd39I7sGszXBbEVn4wPvK8zMV1HduXdYvhhVP+ctc hVLYfoDERwVnBofonwpTkPOtyFRHHeMHaD/19XyGmB/Pkd9t3iEEMts3ty7Rg2lHi8cMj8 jKCqq0eNZZienSoDXipuf2R+jZ7vYhrrES9sipIWY6UF6w94cw+ZTauvyIC/9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSlqY2fsRzc8H; Tue, 15 Oct 2024 20:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FKLT5R029665; Tue, 15 Oct 2024 20:21:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FKLTNr029662; Tue, 15 Oct 2024 20:21:29 GMT (envelope-from git) Date: Tue, 15 Oct 2024 20:21:29 GMT Message-Id: <202410152021.49FKLTNr029662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: a51584a2d2fb - main - manuals: Fix some "missing section argument" 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a51584a2d2fb3731a68eaf93b59e14227e572427 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a51584a2d2fb3731a68eaf93b59e14227e572427 commit a51584a2d2fb3731a68eaf93b59e14227e572427 Author: Graham Percival AuthorDate: 2024-10-14 02:24:00 +0000 Commit: Mitchell Horne CommitDate: 2024-10-15 20:20:55 +0000 manuals: Fix some "missing section argument" These were reported by `mandoc -T lint ...` as warnings. Signed-off-by: Graham Percival Reviewed by: mhorne, Alexander Ziaee Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1467 --- lib/libdevctl/devctl.3 | 2 +- lib/libthr/libthr.3 | 2 +- share/man/man4/disk.4 | 2 +- share/man/man4/ng_iface.4 | 4 ++-- share/man/man4/ng_nat.4 | 2 +- share/man/man4/qat.4 | 2 +- share/man/man4/watchdog.4 | 8 ++++---- share/man/man9/VOP_ADVISE.9 | 2 +- share/man/man9/VOP_ALLOCATE.9 | 2 +- share/man/man9/contigmalloc.9 | 2 +- share/man/man9/osd.9 | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/libdevctl/devctl.3 b/lib/libdevctl/devctl.3 index a6823a0b3c6a..c8a4704825c2 100644 --- a/lib/libdevctl/devctl.3 +++ b/lib/libdevctl/devctl.3 @@ -209,7 +209,7 @@ method to construct the path. The .Fa buffer pointer is updated with an allocated buffer that must be freed with -.Xr free . +.Xr free 3 . .Pp The .Fn devctl_freeze diff --git a/lib/libthr/libthr.3 b/lib/libthr/libthr.3 index 6d33f4c378ce..35a7467eec14 100644 --- a/lib/libthr/libthr.3 +++ b/lib/libthr/libthr.3 @@ -217,7 +217,7 @@ recycle it at any moment, making this sysctl less useful than it sounds. .It Dv kern.ipc.umtx_max_robust The maximal number of robust mutexes allowed for one thread. The kernel will not unlock more mutexes than specified, see -.Xr _umtx_op +.Xr _umtx_op 2 for more details. The default value is large enough for most useful applications. .It Dv debug.umtx.robust_faults_verbose diff --git a/share/man/man4/disk.4 b/share/man/man4/disk.4 index a6316d3fd268..97eeb9b718d4 100644 --- a/share/man/man4/disk.4 +++ b/share/man/man4/disk.4 @@ -57,7 +57,7 @@ Operations to block devices such as .Xr lseek 2 , .Xr read 2 , and -.Xr write +.Xr write 2 may only be performed at file offsets that are integral multiple of this size. .It Dv DIOCGMEDIASIZE diff --git a/share/man/man4/ng_iface.4 b/share/man/man4/ng_iface.4 index 0579028b4c74..e2dee22b67b9 100644 --- a/share/man/man4/ng_iface.4 +++ b/share/man/man4/ng_iface.4 @@ -153,8 +153,8 @@ to the desired level of nesting. .Xr netgraph 4 , .Xr ng_cisco 4 , .Xr ifconfig 8 , -.Xr ngctl 8 -.Xr sysctl +.Xr ngctl 8 , +.Xr sysctl 8 .Sh HISTORY The .Nm iface diff --git a/share/man/man4/ng_nat.4 b/share/man/man4/ng_nat.4 index 53cd841a7392..bf9ec4052733 100644 --- a/share/man/man4/ng_nat.4 +++ b/share/man/man4/ng_nat.4 @@ -265,7 +265,7 @@ In case of .Nm failed to retrieve a certain counter from its -.Xr libalias +.Xr libalias 3 instance, the corresponding field is returned as .Va UINT32_MAX . .It Dv NGM_NAT_SET_DLT Pq Ic setdlt diff --git a/share/man/man4/qat.4 b/share/man/man4/qat.4 index 02be0837ce54..3d8c0cd32664 100644 --- a/share/man/man4/qat.4 +++ b/share/man/man4/qat.4 @@ -105,7 +105,7 @@ Following variables may be used to reconfigure the QAT device.\& For configuration persistence those variables may be set before loading the driver, either via .Xr kenv 1 or -.Xr loader.conf(5). +.Xr loader.conf 5 . The device specific configuration options are prefixed with .Va dev.qat.X\&. where X is the device number. diff --git a/share/man/man4/watchdog.4 b/share/man/man4/watchdog.4 index 2cd66bb8ba85..b74640de8469 100644 --- a/share/man/man4/watchdog.4 +++ b/share/man/man4/watchdog.4 @@ -42,7 +42,7 @@ supports several optional .Xr ioctl 2 calls for configuration, and responds to a single operational -.Xr ioctl +.Xr ioctl 2 call, .Dv WDIOCPATPAT . It takes a single argument which represents a timeout value specified as a @@ -84,7 +84,7 @@ The watchdog might still be armed! .Pp The optional configuration -.Xr ioctl +.Xr ioctl 2 commands are listed here, along with the type of the parameter used. Examples of their use can be found in .Xr watchdogd 8 . @@ -127,7 +127,7 @@ printf(9) .Sh RETURN VALUES The .Dv WDIOCPATPAT -.Xr ioctl +.Xr ioctl 2 returns zero on success and non-zero on failure. .Bl -tag -width Er .It Bq Er EOPNOTSUPP @@ -141,7 +141,7 @@ Invalid flag combination passed. .El .Pp The configuration -.Xr ioctl +.Xr ioctl 2 operations return zero on success and non-zero on failure. .Sh EXAMPLES .Bd -literal -offset indent diff --git a/share/man/man9/VOP_ADVISE.9 b/share/man/man9/VOP_ADVISE.9 index 3decc0c2eac8..c6e8791615ce 100644 --- a/share/man/man9/VOP_ADVISE.9 +++ b/share/man/man9/VOP_ADVISE.9 @@ -39,7 +39,7 @@ .Sh DESCRIPTION This call applies advice for a range of a file's data. It is used to implement the -.Xr posix_fadvise +.Xr posix_fadvise 2 system call. .Pp Its arguments are: diff --git a/share/man/man9/VOP_ALLOCATE.9 b/share/man/man9/VOP_ALLOCATE.9 index fce2ea183273..4fcbe773f236 100644 --- a/share/man/man9/VOP_ALLOCATE.9 +++ b/share/man/man9/VOP_ALLOCATE.9 @@ -45,7 +45,7 @@ .Sh DESCRIPTION This call allocates storage for a range of offsets in a file. It is used to implement the -.Xr posix_fallocate +.Xr posix_fallocate 2 system call. .Pp Its arguments are: diff --git a/share/man/man9/contigmalloc.9 b/share/man/man9/contigmalloc.9 index edbcb1d60942..2e5d55ae8ba1 100644 --- a/share/man/man9/contigmalloc.9 +++ b/share/man/man9/contigmalloc.9 @@ -105,7 +105,7 @@ The .Fn contigfree function is deprecated. Use -.Xr free(9) +.Xr free 9 instead. .Sh IMPLEMENTATION NOTES The diff --git a/share/man/man9/osd.9 b/share/man/man9/osd.9 index 82f279ef17f4..95547f5211c2 100644 --- a/share/man/man9/osd.9 +++ b/share/man/man9/osd.9 @@ -396,7 +396,7 @@ API. .Pp .Fn osd_get only acquires an -.Xr rmlock +.Xr rmlock 9 in read mode, therefore making it safe to use in the majority of contexts within the kernel including most fast paths. .Sh RETURN VALUES From nobody Tue Oct 15 20:21: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 4XSlqg0XtGz5Yx4h for ; Tue, 15 Oct 2024 20:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSlqf715Dz4vw1; Tue, 15 Oct 2024 20:21:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hsLlYqHyEidjYlOKRRx2PPY5E2lK9AXKWUfqWJjCipU=; b=ryoIECIajQiAdS+0Y7a8qbbafrhKEowA+vKylNZ+sEsUlALDmlbu+R7uxhiQl/waklQAwH 3RDv/EAN1Pu/G81lMmtGbqr0exch8mHDukFw45IANuSyqUDLOIU9zwV/z7nqyzKZTGJnZs aac/FpoDjh6HnXY50hedI9Glw2tUonkuMXdwgEESEgwpla5x48Udxu/ML8qAZomF3xz3Xz e2RBTOugo/ylWvZoAWbDYr2GzPAZ4T1+eJCtSLVyaW7vnZ0c+CBxDrNXm8p2EsHU/NITd7 Hw70IG864c/DZGcMA0xYA0xjkCsls+EgbTbdNpAhFjlWsZlP4fKG2UpsCr3GWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729023695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hsLlYqHyEidjYlOKRRx2PPY5E2lK9AXKWUfqWJjCipU=; b=JNfIahynJUE08aqSpzXhILgjWPP56pwg8vf53hibfni63mhzxgkaqgorGbFzzBdHzbh7Ar xgcC9E73Y/bxVjOi4BtuQSKHP8EkWEXsvVFmFZZtlOWMptBGT6NruNkRASr9a85zO3WLWB unEFgYDq/yh5/pkA0UzZCSGWabrWn85rhm8sTQLFAO8eMtABErnoZ7mQNrIdwgzdWkHaZV cx7DbVRYURctGgKyyMDWNXuA4kAo6zwYOtydn3VXSNxLTIG8D1DENwWuOCMTtnhUWdLQTQ XArL9CDOtiTH1a3ctfROWkkO8ppknuv2GfiqOYYGZcaIw94F4lqdgaVxeQQY+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729023695; a=rsa-sha256; cv=none; b=UJ3YCB6GX6KdQ6lWNmDk458oaYZctl2yy0Hog4ssxqCXJ5s1mLGgfjF2QJ7P8+16Wpr0zD HVp2AeMwnWYmCdifPdHuRyLSV44wCGiYcI6vSQpbCHJ8U+ep6MDw9inwM38Vk9EW9OD7sP gHGhtBHlwICd5wx+USIdJADiJqjSy1hWxIdw7UysiPt+C4ebKp38J0j2nGwPHoNErmjeqD lhFNkOV60fRB7pxBazBuyB9YrkG6N8gUFUoOcztuq/Q+G/9MI52khMDYRArVNWD0/99NVU 3xxy4Y82WRjiUZLVosGA4LN+kAy5RWSQd49x1lJQzXrDyBoWXO7JXDiNs6pR7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSlqf6JjHzcLF; Tue, 15 Oct 2024 20:21:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FKLYiq029826; Tue, 15 Oct 2024 20:21:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FKLY5C029823; Tue, 15 Oct 2024 20:21:34 GMT (envelope-from git) Date: Tue, 15 Oct 2024 20:21:34 GMT Message-Id: <202410152021.49FKLY5C029823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Mark Johnston Subject: git: 85d4dddd82c0 - internal/admin - Add Kevin Bowling (kbowling) 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: 85d4dddd82c03ae114429744f00e448c331addf5 Auto-Submitted: auto-generated The branch internal/admin has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=85d4dddd82c03ae114429744f00e448c331addf5 commit 85d4dddd82c03ae114429744f00e448c331addf5 Author: Mark Johnston AuthorDate: 2024-10-15 20:19:29 +0000 Commit: Mark Johnston CommitDate: 2024-10-15 20:19:29 +0000 Add Kevin Bowling (kbowling) He has already been improving the Intel NIC drivers for quite some time and plans to continue working on network drivers. Approved by: srcmgr --- access | 1 + 1 file changed, 1 insertion(+) diff --git a/access b/access index e525668a5779..a78ac76c5a0d 100644 --- a/access +++ b/access @@ -88,6 +88,7 @@ joerg freebsd-devel@uriah.heep.sax.de jrtc27 jtl kaktus +kbowling kd ken kevans From nobody Tue Oct 15 20:45: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 4XSmLq6Y4fz5YyHk; Tue, 15 Oct 2024 20:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSmLq63srz50D1; Tue, 15 Oct 2024 20:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729025107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q92z0cZo9+i8wDDODQRUOpEBAj4c5NDn+SOJ0YDpMH4=; b=DU7TbywGFEWZJkczRB/3MuQpDzXUkxqdZI6ms8GoaoUa+mvwa4zjPUfbmFBm5spuBNUMKU qP4RFr3YUzjL1jUEQQJ8t52tj/FR6eEsgjGDeQlNcUZyqJ6PIxn6C3e/Guyyg8DTt38JY8 k9xyvvKCqPetReQJvs9f3733r10J8Z8vHKnGH2Ump5xT8pSgJLC0I/KWm/+711ACI+mLDw WZTnrK99NkfDbtTFvZ9zm6BVGbdiYHe0vzm3aG4BcbfItzBRzQ/NDjaMDM259UIxYIX2xN KkjZcyX7R+NhAXiWHZXQnwvC66gxTZpcL3I4IiQloWBLgO0qPI4zaGvkpoHXuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729025107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q92z0cZo9+i8wDDODQRUOpEBAj4c5NDn+SOJ0YDpMH4=; b=pYZij3h+/mrE/30NPpqfZRxdoYizF2aOZr4trYxg8KcaiYZvGuBPAF5QddwC7vQXh+LsVi sPQejJrUAkzeUAhDBAlM6yZScN6leKY+WSm8DY7DRjBBb7kDH76mc0lLS+88IoJbkSPtIG BsiVUfKKJH3/sg9jlQdzabOVDJDxOM7hIwOwPct7mteu6p/9JK0MZ+Qx6fxh8bHdh5jaI0 vFixi61owLNZKqUcE4OcS+XqgFGJ2sXZJ8gBQ0EfIbFSUxD72t8KCrTdkXe2kXsPA5HYC9 sV+f0K+c+hXyDOS9aV9zjh3SLQVNoyKc4fWitzEFA1xTPLVqw65qXFOq+V02JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729025107; a=rsa-sha256; cv=none; b=FL7fEFGQkCHKXOzlPSh3//Yif5da4Q6CTmddTPanVLSoreYQvfJVpibgQl6qI/sEhnixEw UjTtuqplrPe8J29ajgzq86GZEJ3rnzcjKVrhsMDoqxSUbL71gqwAVhlG2Ise0SoeLGSmQu n4+IC9ghABu2XU5kSL5TPvmE8ccCKdiYtyIRb+4aE40UkdUEg6UvNroa+fPVQvORXBtfbS 338T/uiXPGAXlF3qVmFduefHgneO63PGLtWdtSCQ3ywFDY78vuSN+y+6gqwg37+23ixTJ9 Q4TeG0mNhbUu9Oerocz0QQv6iAuXCnei36JH/qNtNhvzKqMZHAOJjlwyXgxpHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSmLq5g6Rzctn; Tue, 15 Oct 2024 20:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FKj7Fa068978; Tue, 15 Oct 2024 20:45:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FKj7sI068975; Tue, 15 Oct 2024 20:45:07 GMT (envelope-from git) Date: Tue, 15 Oct 2024 20:45:07 GMT Message-Id: <202410152045.49FKj7sI068975@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 23cb03d14529 - main - thr_kill(2): fix title 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23cb03d145292d7a3e6165b4ca74837d497bd3db Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=23cb03d145292d7a3e6165b4ca74837d497bd3db commit 23cb03d145292d7a3e6165b4ca74837d497bd3db Author: Mitchell Horne AuthorDate: 2024-10-15 14:11:28 +0000 Commit: Mitchell Horne CommitDate: 2024-10-15 20:44:52 +0000 thr_kill(2): fix title Mandoc emits a STYLE warning due to the lowercase letters. --- lib/libsys/thr_kill.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libsys/thr_kill.2 b/lib/libsys/thr_kill.2 index 3252de13ed8c..63a6e40ef6fc 100644 --- a/lib/libsys/thr_kill.2 +++ b/lib/libsys/thr_kill.2 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .Dd May 5, 2020 -.Dt THR_kill 2 +.Dt THR_KILL 2 .Os .Sh NAME .Nm thr_kill From nobody Tue Oct 15 20:55:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSmZD4YsPz5YyyJ; Tue, 15 Oct 2024 20:55:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSmZD3rPpz51Jm; Tue, 15 Oct 2024 20:55:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729025700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aKwEwKt6eKnxsE8B+C8LXnXayL0oQoz8iqny3PSVxLU=; b=r+EoAu3q95cAAZrodflfWhkx2pcwuU0SGvvl2AGpCb5Xgp67GWy9LXLxaV18gepadF2MU/ ivAzyamAZUPL4tnvkRjggcwn87jP0gae1/mxKnL2QGpNMpBpHBSPsXSvUDnm3vBIOaa9yW GoJgrWYR/ksoE+H8RobdeuGYrC58UIBrIk4KAf8i1Ebn/RE/ij37X7l2jnFSGQWEVuCkE4 V3EfVd9xMriaQTLjJh89fqetqglLsqwMWRTLgQd77S9GWU/GX2x37UNju7BNq8XWbDQrbW gBBA3SFcUT3uxv4Az8yB/GttgVb8e7CING7ed3SoyjCMk4Fk4tuWb8do7olNJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729025700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aKwEwKt6eKnxsE8B+C8LXnXayL0oQoz8iqny3PSVxLU=; b=HpAjCanwFzNSdV3c3ABoSzvuY000JHjsrAPjxebNIfqDhNubD8J66QcaKyGiF7Ycdf75YE AyvHCjItnM2hl+00+OAxGueZNjz4b2QNRmQ+8bFktsXUauGIjVLESVewuW/iBM7MPN3eYi NPM1pU6VvdZD6oFI7Jxin2UZvk2TztumM8kJuxnwJXSGMxVV9XBiH12tNREtSUHYiDx2/C VcdLFi1rH/3ogqR0Hdm2pul+7phcs24WvQhCWxnsPX+B21hF/vhzpmkIoqzS/xNBTNmqnK 2/A0itGGVQW+lM9SEkBoHvOp61RuN8+/mvQMvCV6nz4iKq9DU8UcvwVWG7XHYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729025700; a=rsa-sha256; cv=none; b=oazdjXViqVBZgC4/p5CUJpVvGW4xuT/PEtGXrgQNGvDQcaFtsrAjyEX+/OzLRHsd+f05It e4BZsOvX7lAb1fGO0bUlTyE+PJFl2T6v9VUESxf0WXYiHf8gWJR4SPLKOB7oVf46MTmNGr zVWc5WbPfh22judAhcXZySVMw/XI1kJx5AkugTYNjWG7J4t1Rsn96GU0G75h+LbYUKiGMO vz2k7vn5A8iWJTumlLecvnwah/7qgJLn5WUkDJ9eN+MNCQiqUq2cWSqdNufAYBYqBTwfh8 dWvYCDUVba2fQ8m1M0B7vMeEXZLXSJIjO9ReiywQIl/DMdaVAFxs5n+Tga5B6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSmZD3KXyzdVF; Tue, 15 Oct 2024 20:55:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FKt0iH086058; Tue, 15 Oct 2024 20:55:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FKt0gI086055; Tue, 15 Oct 2024 20:55:00 GMT (envelope-from git) Date: Tue, 15 Oct 2024 20:55:00 GMT Message-Id: <202410152055.49FKt0gI086055@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: b34a4edefb0a - main - bhyve: avoid buffer overflow in pci_vtcon_control_send 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: b34a4edefb0a40ced9b17ffd640f52fe55edc1f5 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b34a4edefb0a40ced9b17ffd640f52fe55edc1f5 commit b34a4edefb0a40ced9b17ffd640f52fe55edc1f5 Author: Pierre Pronchery AuthorDate: 2024-10-02 21:44:37 +0000 Commit: Ed Maste CommitDate: 2024-10-15 20:54:19 +0000 bhyve: avoid buffer overflow in pci_vtcon_control_send This is a follow-up to the fix for HYP-19, addressing another condition where an overflow might still occur. (Spotted by jhb@, thanks!) Reported by: Synacktiv Reviewed by: markj Security: HYP-19 Sponsored by: Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46882 --- usr.sbin/bhyve/pci_virtio_console.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/pci_virtio_console.c b/usr.sbin/bhyve/pci_virtio_console.c index 4b957322b395..2950c2276942 100644 --- a/usr.sbin/bhyve/pci_virtio_console.c +++ b/usr.sbin/bhyve/pci_virtio_console.c @@ -572,6 +572,9 @@ pci_vtcon_control_send(struct pci_vtcon_softc *sc, struct iovec iov; int n; + if (len > SIZE_T_MAX - sizeof(struct pci_vtcon_control)) + return; + vq = pci_vtcon_port_to_vq(&sc->vsc_control_port, true); if (!vq_has_descs(vq)) @@ -580,11 +583,11 @@ pci_vtcon_control_send(struct pci_vtcon_softc *sc, n = vq_getchain(vq, &iov, 1, &req); assert(n == 1); - if (iov.iov_len < sizeof(struct pci_vtcon_control)) + if (iov.iov_len < sizeof(struct pci_vtcon_control) + len) goto out; memcpy(iov.iov_base, ctrl, sizeof(struct pci_vtcon_control)); - if (payload != NULL && len > 0) + if (len > 0) memcpy((uint8_t *)iov.iov_base + sizeof(struct pci_vtcon_control), payload, len); From nobody Tue Oct 15 21:18: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 4XSn4t0R6Mz5Z1q2; Tue, 15 Oct 2024 21:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSn4s73JYz54wB; Tue, 15 Oct 2024 21:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729027086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQOkHRK48YceP9ksbpYNm5g5PUhXhZYfVlCOujVWLv0=; b=qgevh0XwqN6U9SDwqRnDcpuiSk7QgV5WxWUQo/O+w7oc2yWINuH5oJIJhc2Y6Q6hwuw0AY M8ccT6K5VwvC7pOQCc2cKbMN+QhuD1xt6BJqgipFS+/Bkhvkw5KoRlWk8GpY6hbHkpMZUT tILsBw6YoU/zib3WRY+sc3GuKOF/5HKteQ+KLz1VyhAtDfQJ/X5FkPtd6lLmPfz3oJuRvo ulS4pzts1U+PXJ2ps8i49s5gycyKzHo9oPwmwp7AD0x4S8dHPC9ItSbMkVTidagUbYyh7B QZalV3Qrlifwl0XbtokP66g1mzERo8myYW+0MqZFt5Km3PtnLI9B6V4fcu/3IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729027086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQOkHRK48YceP9ksbpYNm5g5PUhXhZYfVlCOujVWLv0=; b=IzeMDgXRK562h4orqozUIbaVTRRnNIUjgrvvVWtCAiDPNau2cc5iXQno/2Q5XfFNIFemM1 dKbxo6JVtgjC2YNin8YPElcZkKu0yoL6/3DkO8zWyQ2xywL2xLA7cHqbptacnONv3l6L5I aAGHPReVUHbCNB8NCVog6MhD57Rkj1qF+R752ZPBu0Jd/0z8Db6r9iQ8nSt3zPMVREvR3V JuqZ6q5VepF2AJoU52Lgr6kM05QfRBrc5LfuU+kNGXycYjDENT/yggKlZGdFEbx3R9grsd KJBXMA7LzlpeVpWvlG2ce6K4otHvgNYGuHkH9klswfZm0uJbmO5Te3eF0jHitA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729027086; a=rsa-sha256; cv=none; b=ANJb76RuhVIBqDFokYpsQgh/nJqOGgmXq2YSj683jods5wuvOGXzlnPD9EHwLDuwYuCGSm FK8svz8kUW7QyirUtU98P1ol3ys/EgLl9zrsSbqLRYMg32AuAFOtwIdKOXz6DFQqj1zvWt AQ1O5qoEpobSxsaL4E52DUyUDvomWedzkqXlOykeCNfweDBGd/BYUD0RqzPgzJQ5T77Uk0 KoaP6NfafHxonmyBKXIjvVxM82UY7zloCtKGqL0/ZA/Pr8CWQxDO1SkLILy+hEe6mwaZcn ZRr9KeYSYYf/DvGflDrxMFUmredok8EH/qRLfgySAyhIu5sTOO9TeWsewSVodQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSn4s6fTRzf34; Tue, 15 Oct 2024 21:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FLI5ss021604; Tue, 15 Oct 2024 21:18:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FLI5Or021601; Tue, 15 Oct 2024 21:18:05 GMT (envelope-from git) Date: Tue, 15 Oct 2024 21:18:05 GMT Message-Id: <202410152118.49FLI5Or021601@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: b487b1f50289 - main - openzfs/freebsd: Use compiler.h from FreeBSD's base's linuxkpi 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: b487b1f502899530951bd3923b3927c067d13ffb Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b487b1f502899530951bd3923b3927c067d13ffb commit b487b1f502899530951bd3923b3927c067d13ffb Author: Warner Losh AuthorDate: 2024-10-15 19:49:42 +0000 Commit: Warner Losh CommitDate: 2024-10-15 21:05:49 +0000 openzfs/freebsd: Use compiler.h from FreeBSD's base's linuxkpi The FreeBSD linux/compiler.h in OpenZFS was copied from a very old version of FreeBSD's linuxkpi's linux/compiler.h. There's no need for this duplication. Use FreeBSD's linuxkpi version instead, and provide zfs_fallthrough to augment it (it's all that's needed). Use #pragma once to avoid naming issues for guard variables. Since this is a complete rewrite, use my copyright here (the original code in FreeBSD still credits everybody). Remove extra copies of macros that were defined elsewhere, but are now properly defined in LinuxKPI so are redundant. This is currently pull request #16650 upstream. Committing now to get wider testing (make universe works, but historically doesn't catch all errors). Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D47131 --- .../openzfs/include/os/freebsd/linux/compiler.h | 83 +++------------------- .../openzfs/include/os/freebsd/spl/sys/ccompat.h | 9 --- .../openzfs/include/os/freebsd/spl/sys/debug.h | 4 -- 3 files changed, 8 insertions(+), 88 deletions(-) diff --git a/sys/contrib/openzfs/include/os/freebsd/linux/compiler.h b/sys/contrib/openzfs/include/os/freebsd/linux/compiler.h index b408b77c746d..24f09c722158 100644 --- a/sys/contrib/openzfs/include/os/freebsd/linux/compiler.h +++ b/sys/contrib/openzfs/include/os/freebsd/linux/compiler.h @@ -1,10 +1,5 @@ /* - * Copyright (c) 2010 Isilon Systems, Inc. - * Copyright (c) 2010 iXsystems, Inc. - * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. - * Copyright (c) 2015 François Tigeot - * All rights reserved. + * Copyright (c) 2024 Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,76 +21,14 @@ * 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. - * - * $FreeBSD$ */ -#ifndef _LINUX_COMPILER_H_ -#define _LINUX_COMPILER_H_ - -#include - -#define __user -#define __kernel -#define __safe -#define __force -#define __nocast -#define __iomem -#define __chk_user_ptr(x) ((void)0) -#define __chk_io_ptr(x) ((void)0) -#define __builtin_warning(x, y...) (1) -#define __acquires(x) -#define __releases(x) -#define __acquire(x) do { } while (0) -#define __release(x) do { } while (0) -#define __cond_lock(x, c) (c) -#define __bitwise -#define __devinitdata -#define __deprecated -#define __init -#define __initconst -#define __devinit -#define __devexit -#define __exit -#define __rcu -#define __percpu -#define __weak __weak_symbol -#define __malloc -#define ___stringify(...) #__VA_ARGS__ -#define __stringify(...) ___stringify(__VA_ARGS__) -#define __attribute_const__ __attribute__((__const__)) -#undef __always_inline -#define __always_inline inline -#define noinline __noinline -#define ____cacheline_aligned __aligned(CACHE_LINE_SIZE) -#define zfs_fallthrough __attribute__((__fallthrough__)) - -#if !defined(_KERNEL) && !defined(_STANDALONE) -#define likely(x) __builtin_expect(!!(x), 1) -#define unlikely(x) __builtin_expect(!!(x), 0) -#endif -#define typeof(x) __typeof(x) - -#define uninitialized_var(x) x = x -#define __maybe_unused __unused -#define __always_unused __unused -#define __must_check __result_use_check - -#define __printf(a, b) __printflike(a, b) -#define barrier() __asm__ __volatile__("": : :"memory") -#define ___PASTE(a, b) a##b -#define __PASTE(a, b) ___PASTE(a, b) - -#define ACCESS_ONCE(x) (*(volatile __typeof(x) *)&(x)) - -#define WRITE_ONCE(x, v) do { \ - barrier(); \ - ACCESS_ONCE(x) = (v); \ - barrier(); \ -} while (0) - -#define lockless_dereference(p) READ_ONCE(p) +/* + * FreeBSD's LinuxKPI compiler.h as far back as FreeBSD 12 has what we need, + * except zfs_fallthrough. + */ +#pragma once -#define _AT(T, X) ((T)(X)) +#include -#endif /* _LINUX_COMPILER_H_ */ +#define zfs_fallthrough __attribute__((__fallthrough__)) diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompat.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompat.h index 48749fb8eea2..07b3515ad964 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompat.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompat.h @@ -70,15 +70,6 @@ hlist_del(struct hlist_node *n) n->next->pprev = n->pprev; } /* BEGIN CSTYLED */ -#define READ_ONCE(x) ({ \ - __typeof(x) __var = ({ \ - barrier(); \ - ACCESS_ONCE(x); \ - }); \ - barrier(); \ - __var; \ -}) - #define HLIST_HEAD_INIT { } #define HLIST_HEAD(name) struct hlist_head name = HLIST_HEAD_INIT #define INIT_HLIST_HEAD(head) (head)->first = NULL diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/debug.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/debug.h index f041dde34fc8..9eb424dd0373 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/debug.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/debug.h @@ -95,10 +95,6 @@ spl_assert(const char *buf, const char *file, const char *func, int line) #ifndef expect #define expect(expr, value) (__builtin_expect((expr), (value))) #endif -#ifndef __linux__ -#define likely(expr) expect((expr) != 0, 1) -#define unlikely(expr) expect((expr) != 0, 0) -#endif #define PANIC(fmt, a...) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) From nobody Tue Oct 15 21:18: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 4XSn4v2W9Hz5Z1hL; Tue, 15 Oct 2024 21:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSn4v0sF1z54sg; Tue, 15 Oct 2024 21:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729027087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tjXdPEXruTIbJy1sq/Or3JiMZ6F90ExMgf+kQ8IT6mo=; b=VSD/xXDK54FmS//yEVwPMyIOysc4kcU6UvSOZ8DOGH+/oronT2q1Ez/vtwRoH2SQ3EhLVt jQ6a48t9K5nDVNoJTYP78OX8IZjF1XzSq/FMyjHOgGUYjXy1X8JiwAnp1P6210++lOYHgW tElc9DhifEUUnl9vmMErnHLq0/Lo1dy9vguk1Wo1FdEc25c5wA8lU0jZCVQ9b+6+RMO2KE kbDvnEet7RoxMh4w86Bxe4tPG0gRs9CzoxZxk1lLVGD28kgINALXieQDu1d8DJ9WGheGU+ HmTlj9IinaYZx5KElpA+MPvEVTc+hZmi3J1ZTrfkMwx7GYEZPSuNP8MksjlAcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729027087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tjXdPEXruTIbJy1sq/Or3JiMZ6F90ExMgf+kQ8IT6mo=; b=BTkNfRyMvQE1KGvHv+R1JuyKO7wsPKcpuVYVeoi5sNjXiyQ7B5mZoUZYefTYmKh9WbVy5U x+vHvHpABISA1s6zPGxjoJmRd0ev2qv/5bEMywwSnLlZYqHxhobZyUbPqWccR8D1D4FRRn sIYhBlItJb4fAAyTnpU/xP+0vLeJfFpFO7Lp2K5jYTHlfIbLbPFL6TohiRWgZABZPSjZbQ KBzxxt6M7UWOJVKdfi2yN2mw0sXMN5do8xRsNXw8dSkpr7iQVMJmjQdt+sxPARXjjpPkUR i+I8n1/OqMtXeteXZlXuNlXsuB3pu2szj6mIkfxsB7vC0jO6fF6miJK8sEO0JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729027087; a=rsa-sha256; cv=none; b=eUal1JsMo9WgKCgqaYwAdlMZKv6IIoWPtIe9ANTgcj3fsYNhiWiVTSi0uT0E41RtB7gB+p hab+7Y3NuhVA/HM3kDHCDhZ7w5UdpdVixN24qoAWOmzXlGGHYZvd3i1QAjsxKWt4TIOVbz cNMSJy3MYx13G6Jzk4O3jtGJkUIPRLVCeTRQBmUSDCjf+odKyiXlfGZYe4hjOzem1NE2m1 F4Aa08EoKOZRTGi1aZLld9S6wYxdsLiC08A8Sa5gbOyyvG8qh8DWkfnEhgnJ8J0ohzr/BG eR/sgbnxRxnko+jYI8F7EBAOA7ZBVwQ/oqJ9qC2V+en+hvz1gOSK/RnkrXsuCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSn4v0SZPzdZ2; Tue, 15 Oct 2024 21:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FLI68Q021658; Tue, 15 Oct 2024 21:18:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FLI6iR021655; Tue, 15 Oct 2024 21:18:06 GMT (envelope-from git) Date: Tue, 15 Oct 2024 21:18:06 GMT Message-Id: <202410152118.49FLI6iR021655@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: 16672453f125 - main - cdefs: Add __deprecated 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: 16672453f12586703f1c51d909bd1900691bf884 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=16672453f12586703f1c51d909bd1900691bf884 commit 16672453f12586703f1c51d909bd1900691bf884 Author: Warner Losh AuthorDate: 2024-10-15 19:49:53 +0000 Commit: Warner Losh CommitDate: 2024-10-15 21:05:49 +0000 cdefs: Add __deprecated Add __deprecated decorator. This is for a deprecated interface. copystr is tagged with this today in copy(9), but don't actually provide it or use it. copystr is a #define so adding it will have to wait. LinuxKPI was defining this away completely in compiler.h. Since this is shared between Linux KPI consumers and OpenZFS, if it's already defined, use the FreeBSD sys/cdefs.h version, otherwise define it away. For OpenZFS this will retain it, while for Linux KPI it will tend to drop it (I think always, but I didn't look at everything). Sponsored by: Netflix Reviewed by: jhb, emaste Differential Revision: https://reviews.freebsd.org/D46137 --- share/man/man9/cdefs.9 | 6 +++++- sys/compat/linuxkpi/common/include/linux/compiler.h | 2 ++ sys/sys/cdefs.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index 8c127694ab6e..3d1f6159bc60 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -85,8 +85,12 @@ linkage. .It Sy __weak_symbol Ta Declare the symbol to be a weak symbol .It Sy __dead2 Ta Function will not return .It Sy __pure2 Ta Function has no side effects -.It Sy __unused Ta To Variable may be unused (usually arguments), so do not warn about it +.It Sy __unused Ta To Variable may be unused (usually arguments), so do not +warn about it .It Sy __used Ta Function really is used, so emit it even if it appears unused. +.It Sy __deprecated Ta Function interface has been deprecated, and clients +should migrate to a new interface. +A warning will be issued for clients of this interface. .It Sy __packed Ta \&Do not have space between structure elements for natural alignment. Used when communicating with external protocols. .It Sy __aligned(x) Ta Specify in bytes the minimum alignment for the specified field, structure or variable diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index c82b9acd53fb..fb5ad3bf4fe4 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -48,7 +48,9 @@ #define __cond_lock(x,c) (c) #define __bitwise #define __devinitdata +#ifndef __deprecated #define __deprecated +#endif #define __init #define __initconst #define __devinit diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 9c4c8e0a324a..353090db6995 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -154,6 +154,7 @@ #define __pure2 __attribute__((__const__)) #define __unused __attribute__((__unused__)) #define __used __attribute__((__used__)) +#define __deprecated __attribute__((__deprecated__)) #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) From nobody Tue Oct 15 22:21:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSpVY2HjXz5Z5Cw; Tue, 15 Oct 2024 22:21:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSpVY1chFz3wgh; Tue, 15 Oct 2024 22:21:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729030917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m+em0Is6PmS11EUmaLz5ti/Rt1iZcJNUpTzSHpCbG2c=; b=o+AH/No7Ydy9CeF6eJG6I5rzLlrBS85Gi3ou1mi0EizyxGtzcr4zb5krAnZhbjZwxn7xYy JlJwq88mrS8IuDTEeYqTvO1qJ/jYO6HIu820WpvxYihCChoNz15dVvNxSe5LNq4XPAZbdV RWF811xeiQyWxRpdpnEoVfrYSIrn08TbH09dXPRUeGVuvVsPC6fWW39h+k4cDO8nx1hxFG ObXpvS8fh6kzqvmFmXoxZIbxFI6DME32qm4VjUvlACDbI5gq2EE8aYzzmBldm7Jmn5572H 0jP4lrnzzz3Nz137JJvOPuXO55L3EgSKtjwVmXDt3uChcx6BKfSU2D+hvMTnxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729030917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m+em0Is6PmS11EUmaLz5ti/Rt1iZcJNUpTzSHpCbG2c=; b=inGwSo86Tcw9pHtjsSdGlLctsDyAlrUFcW+G2h1lg+SUU0vxXPci4nJQHRipOgyxaVffK0 Khxwjw7+usbA43v2Iac+xQpo+dkNJCZwCZiEAUTAkD0olu1Fdx4WRxL8CGrw+yxDzhpoc1 TwGfREUDndLj9BzA6vjoyBrEu/cyEzdtqroov4F3HfQ6ltXFN1fhglkbu6KWXuoihBnj0U Ro47cnbgzvKlw4YCwS7OqeHHGCnV5N26R9Pf9k7vh3pBIfaRvxqY/dkISUY8AUxF4rKxNY O89WQXlNXZI8eNvFZENfr8UYUB0JzrhzhRwmPlYJeIvuWI/WluD8F0GHbUK7aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729030917; a=rsa-sha256; cv=none; b=dRzFbjFfx5GDLsnjw2uugWZWqJBhxRz2RVTI/LSa4s4A9sOCw4WRQvKv7HF/A+WOVS5qGu p5UFrGXQso/PN5JXJNB+C41Sb5BSox5zoSUpVQsSBu3wacYQOZnPcWALiHhqlqv3IdZfav 7u0Auleax4fFXfZUC24KW8BASHJGmoMnlNB+dMUaz6jkzLjjaG1EVBfvOBh+6Alp9QD2F8 WHozmUX9BWbu6qKUFd4nEtEU4ckNR4JuoLj7qoaXVXNXS34f94+kHeSca9q2NAXtxf3alT 2zC266+53hB8Z98CGiOSxuBjs4RdELgGDMt5SBSZMrSJZDBGCykBkpTleOEdBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSpVY1D1BzgNH; Tue, 15 Oct 2024 22:21:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FMLv42038501; Tue, 15 Oct 2024 22:21:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FMLvET038498; Tue, 15 Oct 2024 22:21:57 GMT (envelope-from git) Date: Tue, 15 Oct 2024 22:21:57 GMT Message-Id: <202410152221.49FMLvET038498@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: 82c96fef52c1 - main - nvme: Export recovery state 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: 82c96fef52c11b50c3effaa5d3bbe78a692dfd27 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=82c96fef52c11b50c3effaa5d3bbe78a692dfd27 commit 82c96fef52c11b50c3effaa5d3bbe78a692dfd27 Author: Warner Losh AuthorDate: 2024-10-15 22:19:30 +0000 Commit: Warner Losh CommitDate: 2024-10-15 22:19:30 +0000 nvme: Export recovery state Export recovery state as a sysctl. This helps, sometimes, diagnose what's going on. Sponsored by: Netflix --- sys/dev/nvme/nvme_sysctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index c66f1ed51c9c..edd1f3e40997 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -333,6 +333,10 @@ nvme_sysctl_initialize_queue(struct nvme_qpair *qpair, CTLFLAG_RD, &qpair->num_recovery_nolock, "Number of times that we failed to lock recovery in the ISR"); + SYSCTL_ADD_UINT(ctrlr_ctx, que_list, OID_AUTO, "recovery", + CTLFLAG_RW, &qpair->recovery_state, 0, + "Current recovery state of the queue"); + SYSCTL_ADD_PROC(ctrlr_ctx, que_list, OID_AUTO, "dump_debug", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, qpair, 0, nvme_sysctl_dump_debug, "IU", "Dump debug data"); From nobody Tue Oct 15 22:21:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSpVZ4Kwtz5Z4pQ; Tue, 15 Oct 2024 22:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSpVZ2sBlz3wbQ; Tue, 15 Oct 2024 22:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729030918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qXYC6vKTUXL0nTmInXVUz7Akn9JZfVZwKJebqjVMCFk=; b=cOpbuokepNCpakrEv5LqjaDKg0npgntcxIuE+DYq8tvoXpssgCDDEWsrYJRMvTK8ozFWsg wF2PXDlJUTdv4tY2805applKdvMZYhEAA0ozOFEJ+GMo8OycH+AH/tC9+61AX4z/Mvpw1f ypR4YZZklR+KNvcwkjhML4rYnEX7mQbzDXIQexbcgr3xzbq5L4nrllfSP4ej4gt1NsvIfR vlx/0ywWvyMXdXEZFiLXdLrA3wZ60obNMGIXK8zXWnT7g+lFml7KYI7x8TAlulYQ0g8SPQ w23BFG8VCKidwbsxGYmN4FqrzX1QB96XlCG9lGGWg5SMe2lRgGpgpMCr9XsuTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729030918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qXYC6vKTUXL0nTmInXVUz7Akn9JZfVZwKJebqjVMCFk=; b=EpUSW6xeC8wZOT3Bfm+Ty2PFvoXR+UqHM9iA3pAtjRMXCCSaLKzlgR+V3K49FIKt0WW4ms D3FC1CdqZ4/BLgGmwJGqKyNEXiDR0rrIFrvnhmZMtclmyzC6FPDbnMK347vQncjSAhXlw9 RznQi5LUYzyan5KtClcFFLDUfC3ijwVhr8Mlrzmp7GPK9cpofzvq/OzSBoyTearwnGW3Dk E+/QZopuiwR91lc8F/RMGIwV/qhsvFmL94OgadNyW9S4vaYX8fjRYaVuN2MkmgV36l3fnM C37+Bg7NacP9+P05hEMBFvlUOiI+mRGegABxpcPPdBJCYtfamyYEFnzzCMcjhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729030918; a=rsa-sha256; cv=none; b=Gf/XGKf/Kq1uGm6hPtFtG9GkXACtpJs87dqOBga6TgfXNGz3Hdc/UPziWeCzu/2HDvU6kn COPf4qlebdMCQ12ea3/olWXMjGYF+JYTTj0xDsEacYzZ/iawEfxPNjjthtAxD3eiOzD8Ou TSLWcBku9WdPoW4B0LqwWz9PSH5MEUAKB5yRKMA5kRyItiBpZlMH5vLyJTKy3HApWp56wu lZUsEe9oH4eSMXEKP99tMz8kZC67HtEhPDvHHNdsIDiGbaUvZ//CVXflQjqXTleA5ROr5p wk4D6207JCVPXvvT4kAE8DaPzm32twSy0zYY8Wf/pnmMJiB5mrAvsmP3UFTq0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSpVZ2TgxzgQw; Tue, 15 Oct 2024 22:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FMLwjV038548; Tue, 15 Oct 2024 22:21:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FMLwo9038545; Tue, 15 Oct 2024 22:21:58 GMT (envelope-from git) Date: Tue, 15 Oct 2024 22:21:58 GMT Message-Id: <202410152221.49FMLwo9038545@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: 9dbff03c3478 - main - nvme: Inject artificial failure on reset 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: 9dbff03c3478dc25013ec380ef8632670c014d6a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9dbff03c3478dc25013ec380ef8632670c014d6a commit 9dbff03c3478dc25013ec380ef8632670c014d6a Author: Warner Losh AuthorDate: 2024-10-15 22:20:32 +0000 Commit: Warner Losh CommitDate: 2024-10-15 22:20:58 +0000 nvme: Inject artificial failure on reset Add a sysctl to artificially fail the reset to test the failure to reset hardware code path. While there are many ways that reset can fail, this provides an adequate way that similates enough of the failures well enough to shake out this failure path. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28584 --- sys/dev/nvme/nvme_ctrlr.c | 2 +- sys/dev/nvme/nvme_private.h | 1 + sys/dev/nvme/nvme_sysctl.c | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 4c1a3830aac0..d8ad12fc9982 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1152,7 +1152,7 @@ nvme_ctrlr_start_config_hook(void *arg) TSENTER(); - if (nvme_ctrlr_hw_reset(ctrlr) != 0) { + if (nvme_ctrlr_hw_reset(ctrlr) != 0 || ctrlr->fail_on_reset != 0) { nvme_ctrlr_fail(ctrlr, true); config_intrhook_disestablish(&ctrlr->config_hook); return; diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 029c2ff97bff..dd7a849b6782 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -299,6 +299,7 @@ struct nvme_controller { uint32_t is_resetting; uint32_t notification_sent; + u_int fail_on_reset; bool is_failed; bool is_failed_admin; diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index edd1f3e40997..f3566e75225d 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -426,6 +426,10 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr) CTLFLAG_RD, &ctrlr->cap_hi, 0, "Hi 32-bits of capacities for the drive"); + SYSCTL_ADD_UINT(ctrlr_ctx, ctrlr_list, OID_AUTO, "fail_on_reset", + CTLFLAG_RD, &ctrlr->fail_on_reset, 0, + "Pretend the next reset fails and fail the controller"); + que_tree = SYSCTL_ADD_NODE(ctrlr_ctx, ctrlr_list, OID_AUTO, "adminq", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Admin Queue"); From nobody Tue Oct 15 23:15: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 4XSqh51N8pz5Z89K; Tue, 15 Oct 2024 23:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSqh50YVbz42Th; Tue, 15 Oct 2024 23:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729034117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZoLaSOib5ye1oi1P4syDxNr3yTxAWavk+rvd7XbPQs=; b=VEOjLrw0ZTF6eXxQXz6/OuVTunl8XdIPXbqjXdIT5+DrUxGomqmILt5JWc3uldYyflAtVD N4ZspE3uv+7EqZS0UmWzJO409NcILnprqFw7Anm+8YJ1sJbRnK2kvZZXmaaKBpwtcD+8Wo 5jz3f7lRvXLFiGSBMrzpFEf8JGjOiCeOSdjqdDq5Gyhku28lz4WYdbn4YOMkvTnioW7sZV F8lUSYCTEHzxjUaN/oYKtDGGN3JrMSNMotLAOJoNZWfTXaOXEh+BgPlQ5X1tT2MsMx0kvS xzAJns1KpnZGk9GrK4NiqbQGBKPR/l5rXpRNcAiCD65K+Tb9M1xowyqOtqjdkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729034117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZoLaSOib5ye1oi1P4syDxNr3yTxAWavk+rvd7XbPQs=; b=ONdixphr5fze06L5y7P1LRKyU7OQMAXjSIlQESyuv++pCmBcBFe0uKOCARiq9iKKpHuUB/ KPeeoC8qYFYJvIU5m2TDGCOfz/mWysNa05DqSr95d8wJ9aIvQ1uASuO4LUg2zz0iPxDeRu fqCf/E+T42U8FRVaYJiqpZlzcuYy4vC8ql+IIol7itEcsb/RZQBYjWJCegiE/RGU0vm7dC /g6OF0QZieF8JtJNVc0uCquYhgF/jVV6yFOhjhQM1tk+ImB1vXyq6uSOkVlHshyyEGsg0W JFfyv752FDnmQ09p9HIp+R67w4qUT9G2jjOdxvkWT3K0HfoVWsh4/ghtPDuqmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729034117; a=rsa-sha256; cv=none; b=VvNBIYUixMtpglqYHXWiNbvaNt1mnqjS6EUY/UNh+nfm6O5BHYam5NJaxiEkmiz6klev/C CHUhBT2JWAfLdDWqrgYy+d55XjJFTxKHj3TuwX40rkZg39RxNET14gx+j+aOAU8EnSNty5 c50MLRBxhIiqQv/Wg6D8cV1eWSzJ6jh8syh0/TaDYdgf/6Yqd5OQfym4PEBbDJ8BUpT+tW 1YhgQt6mRRaM6brpWYOYOtPGYD/yBNLEtD16J6r+2URxdMqb+MbU3DxIwLSeUn4Ux3YxGK B3uy8/+TWOWoOtimmt9XYZXXYdxAhzzCg+k2raaomm4qvE5m/LuyccGhIABcaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSqh46yH3zhrD; Tue, 15 Oct 2024 23:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FNFG9T024703; Tue, 15 Oct 2024 23:15:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FNFGER024700; Tue, 15 Oct 2024 23:15:16 GMT (envelope-from git) Date: Tue, 15 Oct 2024 23:15:16 GMT Message-Id: <202410152315.49FNFGER024700@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: ac77b2621508 - main - tests: Test endian.h, byteswap.h, sys/endian.h and both endian.h and byteswap.h together 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: ac77b2621508c6a50ab01d07fe8d43795d908f05 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ac77b2621508c6a50ab01d07fe8d43795d908f05 commit ac77b2621508c6a50ab01d07fe8d43795d908f05 Author: Warner Losh AuthorDate: 2024-10-15 23:14:42 +0000 Commit: Warner Losh CommitDate: 2024-10-15 23:14:42 +0000 tests: Test endian.h, byteswap.h, sys/endian.h and both endian.h and byteswap.h together What's required and not required to be defined is complicated. Write tests to enshrine it: endian.h and sys/endian.h: [bl]e{16,32,64}toh hto[bl]e{16,32,64} byteswap.h: {__,}bswap_{16,32,64} sys/endian.h: {__,}bswap{16,32,64} _BYTE_ORDER _BIG_ENDIAN _LITTLE_ENDIAN _PDP_ENDIAN endian.h: __BYTE_ORDER __BIG_ENDIAN __LITTLE_ENDIAN __PDP_ENDIAN __FLOAT_WORD_ORDER We also ensure that the sys/endian.h conditions hold true when we include both endian.h and sys/endian.h in either order. NOT TESTED: deprecated symbols, internal to glibc symbols Sponsored by: Netflix Discussed with: markj (made the changes he requested) Differential Revision: https://reviews.freebsd.org/D32052 --- tests/include/Makefile | 6 ++ tests/include/byteswap_endian_test.c | 9 +++ tests/include/byteswap_test.c | 76 ++++++++++++++++++ tests/include/endian_sys_endian_test.c | 13 +++ tests/include/endian_test.c | 139 +++++++++++++++++++++++++++++++++ tests/include/sys_endian_endian_test.c | 12 +++ tests/include/sys_endian_test.c | 136 ++++++++++++++++++++++++++++++++ 7 files changed, 391 insertions(+) diff --git a/tests/include/Makefile b/tests/include/Makefile index e98d08da1f2b..0f6ef88f9e35 100644 --- a/tests/include/Makefile +++ b/tests/include/Makefile @@ -2,6 +2,12 @@ TESTSDIR= ${TESTSBASE}/include +ATF_TESTS_C+= byteswap_test +ATF_TESTS_C+= byteswap_endian_test +ATF_TESTS_C+= endian_test +ATF_TESTS_C+= endian_sys_endian_test ATF_TESTS_C+= stdckdint_test +ATF_TESTS_C+= sys_endian_test +ATF_TESTS_C+= sys_endian_endian_test .include diff --git a/tests/include/byteswap_endian_test.c b/tests/include/byteswap_endian_test.c new file mode 100644 index 000000000000..012c1b5c447e --- /dev/null +++ b/tests/include/byteswap_endian_test.c @@ -0,0 +1,9 @@ +/*- + * Copyright (c) 2021 M. Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* Make sure this still passes if both endian.h and byteswap.h included */ +#include +#include "byteswap_test.c" diff --git a/tests/include/byteswap_test.c b/tests/include/byteswap_test.c new file mode 100644 index 000000000000..ed23351e689b --- /dev/null +++ b/tests/include/byteswap_test.c @@ -0,0 +1,76 @@ +/*- + * Copyright (c) 2021 M. Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include + +ATF_TC(byteswap); +ATF_TC_HEAD(byteswap, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test swapping macros in "); +} + +ATF_TC_BODY(byteswap, tc) +{ + uint16_t ui16; + uint32_t ui32; + uint64_t ui64; + + /* glibc defines the {__,}bswap_{16,32,64} */ +#ifndef __bswap_16 + atf_tc_fail_nonfatal("__bswap_16 not defined"); +#endif +#ifndef bswap_16 + atf_tc_fail_nonfatal("bswap_16 not defined"); +#endif +#ifndef __bswap_32 + atf_tc_fail_nonfatal("__bswap_32 not defined"); +#endif +#ifndef bswap_32 + atf_tc_fail_nonfatal("bswap_32 not defined"); +#endif +#ifndef __bswap_64 + atf_tc_fail_nonfatal("__bswap_64 not defined"); +#endif +#ifndef bswap_64 + atf_tc_fail_nonfatal("bswap_64 not defined"); +#endif + + /* glibc does not define bswap{16,32,64} */ +#ifdef bswap16 + atf_tc_fail_nonfatal("bswap16 improperly defined"); +#endif +#ifdef bswap32 + atf_tc_fail_nonfatal("bswap32 improperly defined"); +#endif +#ifdef bswap64 + atf_tc_fail_nonfatal("bswap64 improperly defined"); +#endif + + ui16 = 0x1234; + ATF_REQUIRE_MSG(0x3412 == bswap_16(ui16), + "bswap16(%#x) != 0x3412 instead %#x\n", ui16, bswap_16(ui16)); + + ui32 = 0x12345678ul; + ATF_REQUIRE_MSG(0x78563412ul == bswap_32(ui32), + "bswap32(%#lx) != 0x78563412 instead %#lx\n", + (unsigned long)ui32, (unsigned long)bswap_32(ui32)); + + ui64 = 0x123456789abcdef0ull; + ATF_REQUIRE_MSG(0xf0debc9a78563412ull == bswap_64(ui64), + "bswap64(%#llx) != 0x3412 instead %#llx\n", + (unsigned long long)ui64, (unsigned long long)bswap_64(ui64)); + +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, byteswap); + + return atf_no_error(); +} diff --git a/tests/include/endian_sys_endian_test.c b/tests/include/endian_sys_endian_test.c new file mode 100644 index 000000000000..9c7829c94b1f --- /dev/null +++ b/tests/include/endian_sys_endian_test.c @@ -0,0 +1,13 @@ +/*- + * Copyright (c) 2021 M. Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * Make sure this still passes if both endian.h and sys/endian.h are included + * with sys/endian.h first + */ +#include +#include +#include "sys_endian_test.c" diff --git a/tests/include/endian_test.c b/tests/include/endian_test.c new file mode 100644 index 000000000000..2431b54535a2 --- /dev/null +++ b/tests/include/endian_test.c @@ -0,0 +1,139 @@ +/*- + * Copyright (c) 2021 M. Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include + +ATF_TC(endian); +ATF_TC_HEAD(endian, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test swapping macros in "); +} + +ATF_TC_BODY(endian, tc) +{ + /* glibc doesn't define the {__,}bswap_{16,32,64} */ +#ifdef __bswap_16 + atf_tc_fail_nonfatal("__bswap_16 improperly defined"); +#endif +#ifdef bswap_16 + atf_tc_fail_nonfatal("bswap_16 improperly defined"); +#endif +#ifdef __bswap_32 + atf_tc_fail_nonfatal("__bswap_32 improperly defined"); +#endif +#ifdef bswap_32 + atf_tc_fail_nonfatal("bswap_32 improperly defined"); +#endif +#ifdef __bswap_64 + atf_tc_fail_nonfatal("__bswap_64 improperly defined"); +#endif +#ifdef bswap_64 + atf_tc_fail_nonfatal("bswap_64 improperly defined"); +#endif + + /* glibc doesn't define bswap{16,32,64} */ +#ifdef bswap16 + atf_tc_fail_nonfatal("bswap16 improperly defined"); +#endif +#ifdef bswap32 + atf_tc_fail_nonfatal("bswap32 improperly defined"); +#endif +#ifdef bswap64 + atf_tc_fail_nonfatal("bswap64 improperly defined"); +#endif + + /* + * glibc defines with two underscores. We don't test for only one since + * that doesn't interfere. + */ +#ifndef __BIG_ENDIAN + atf_tc_fail_nonfatal("__BIG_ENDIAN not defined"); +#endif +#ifndef __LITTLE_ENDIAN + atf_tc_fail_nonfatal("__LITTLE_ENDIAN not defined"); +#endif +#ifndef __PDP_ENDIAN + atf_tc_fail_nonfatal("__PDP_ENDIAN not defined"); +#endif +#ifndef __FLOAT_WORD_ORDER + atf_tc_fail_nonfatal("__FLOAT_WORD_ORDER not defined"); +#endif +#ifndef __BYTE_ORDER + atf_tc_fail_nonfatal("__BYTE_ORDER not defined"); +#endif + + /* order to host */ +#ifdef __BYTE_ORDER +#if __BYTE_ORDER == __BIG_ENDIAN +#define H16(x) be16toh(x) +#define H32(x) be32toh(x) +#define H64(x) be64toh(x) +#define O16(x) le16toh(x) +#define O32(x) le32toh(x) +#define O64(x) le64toh(x) +#else +#define H16(x) le16toh(x) +#define H32(x) le32toh(x) +#define H64(x) le64toh(x) +#define O16(x) be16toh(x) +#define O32(x) be32toh(x) +#define O64(x) be64toh(x) +#endif +#endif + ATF_REQUIRE(H16(0x1234) == 0x1234); + ATF_REQUIRE(H32(0x12345678ul) == 0x12345678ul); + ATF_REQUIRE(H64(0x123456789abcdef0ull) == 0x123456789abcdef0ull); + ATF_REQUIRE(O16(0x1234) == __bswap16(0x1234)); + ATF_REQUIRE(O32(0x12345678ul) == __bswap32(0x12345678ul)); + ATF_REQUIRE(O64(0x123456789abcdef0ull) == __bswap64(0x123456789abcdef0ull)); +#undef H16 +#undef H32 +#undef H64 +#undef O16 +#undef O32 +#undef O64 + + /* host to order */ +#ifdef __BYTE_ORDER +#if __BYTE_ORDER == __BIG_ENDIAN +#define H16(x) htobe16(x) +#define H32(x) htobe32(x) +#define H64(x) htobe64(x) +#define O16(x) htole16(x) +#define O32(x) htole32(x) +#define O64(x) htole64(x) +#else +#define H16(x) htole16(x) +#define H32(x) htole32(x) +#define H64(x) htole64(x) +#define O16(x) htobe16(x) +#define O32(x) htobe32(x) +#define O64(x) htobe64(x) +#endif +#endif + ATF_REQUIRE(H16(0x1234) == 0x1234); + ATF_REQUIRE(H32(0x12345678ul) == 0x12345678ul); + ATF_REQUIRE(H64(0x123456789abcdef0ull) == 0x123456789abcdef0ull); + ATF_REQUIRE(O16(0x1234) == __bswap16(0x1234)); + ATF_REQUIRE(O32(0x12345678ul) == __bswap32(0x12345678ul)); + ATF_REQUIRE(O64(0x123456789abcdef0ull) == __bswap64(0x123456789abcdef0ull)); +#undef H16 +#undef H32 +#undef H64 +#undef O16 +#undef O32 +#undef O64 +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, endian); + + return atf_no_error(); +} diff --git a/tests/include/sys_endian_endian_test.c b/tests/include/sys_endian_endian_test.c new file mode 100644 index 000000000000..4d668f8d5625 --- /dev/null +++ b/tests/include/sys_endian_endian_test.c @@ -0,0 +1,12 @@ +/*- + * Copyright (c) 2021 M. Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * Make sure this still passes if both endian.h and sys/endian.h are included + * with endian.h first. + */ +#include +#include "sys_endian_test.c" diff --git a/tests/include/sys_endian_test.c b/tests/include/sys_endian_test.c new file mode 100644 index 000000000000..5a5f77526832 --- /dev/null +++ b/tests/include/sys_endian_test.c @@ -0,0 +1,136 @@ +/*- + * Copyright (c) 2021 M. Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include + +ATF_TC(sys_endian); +ATF_TC_HEAD(sys_endian, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test swapping macros in "); +} + +ATF_TC_BODY(sys_endian, tc) +{ + /* FreeBSD sys/endian.h doesn't define the {__,}bswap_{16,32,64} */ +#ifdef __bswap_16 + atf_tc_fail_nonfatal("__bswap_16 defined"); +#endif +#ifdef bswap_16 + atf_tc_fail_nonfatal("bswap_16 defined"); +#endif +#ifdef __bswap_32 + atf_tc_fail_nonfatal("__bswap_32 defined"); +#endif +#ifdef bswap_32 + atf_tc_fail_nonfatal("bswap_32 defined"); +#endif +#ifdef __bswap_64 + atf_tc_fail_nonfatal("__bswap_64 defined"); +#endif +#ifdef bswap_64 + atf_tc_fail_nonfatal("bswap_64 defined"); +#endif + + /* FreeBSD sys/endian.h does define bswap{16,32,64} */ +#ifndef bswap16 + atf_tc_fail_nonfatal("bswap16 not defined"); +#endif +#ifndef bswap32 + atf_tc_fail_nonfatal("bswap32 not defined"); +#endif +#ifndef bswap64 + atf_tc_fail_nonfatal("bswap64 not defined"); +#endif + + /* + * FreeBSD defines with one underscore + * We don't test for two since that doesn't interfere + */ +#ifndef _BIG_ENDIAN + atf_tc_fail_nonfatal("_BIG_ENDIAN not defined"); +#endif +#ifndef _LITTLE_ENDIAN + atf_tc_fail_nonfatal("_LITTLE_ENDIAN not defined"); +#endif +#ifndef _PDP_ENDIAN + atf_tc_fail_nonfatal("_PDP_ENDIAN not defined"); +#endif +#ifndef _BYTE_ORDER + atf_tc_fail_nonfatal("_BYTE_ORDER not defined"); +#endif + + /* order to host */ +#ifdef _BYTE_ORDER +#if _BYTE_ORDER == _BIG_ENDIAN +#define H16(x) be16toh(x) +#define H32(x) be32toh(x) +#define H64(x) be64toh(x) +#define O16(x) le16toh(x) +#define O32(x) le32toh(x) +#define O64(x) le64toh(x) +#else +#define H16(x) le16toh(x) +#define H32(x) le32toh(x) +#define H64(x) le64toh(x) +#define O16(x) be16toh(x) +#define O32(x) be32toh(x) +#define O64(x) be64toh(x) +#endif +#endif + ATF_REQUIRE(H16(0x1234) == 0x1234); + ATF_REQUIRE(H32(0x12345678ul) == 0x12345678ul); + ATF_REQUIRE(H64(0x123456789abcdef0ull) == 0x123456789abcdef0ull); + ATF_REQUIRE(O16(0x1234) == __bswap16(0x1234)); + ATF_REQUIRE(O32(0x12345678ul) == __bswap32(0x12345678ul)); + ATF_REQUIRE(O64(0x123456789abcdef0ull) == __bswap64(0x123456789abcdef0ull)); +#undef H16 +#undef H32 +#undef H64 +#undef O16 +#undef O32 +#undef O64 + + /* host to order */ +#ifdef _BYTE_ORDER +#if _BYTE_ORDER == _BIG_ENDIAN +#define H16(x) htobe16(x) +#define H32(x) htobe32(x) +#define H64(x) htobe64(x) +#define O16(x) htole16(x) +#define O32(x) htole32(x) +#define O64(x) htole64(x) +#else +#define H16(x) htole16(x) +#define H32(x) htole32(x) +#define H64(x) htole64(x) +#define O16(x) htobe16(x) +#define O32(x) htobe32(x) +#define O64(x) htobe64(x) +#endif +#endif + ATF_REQUIRE(H16(0x1234) == 0x1234); + ATF_REQUIRE(H32(0x12345678ul) == 0x12345678ul); + ATF_REQUIRE(H64(0x123456789abcdef0ull) == 0x123456789abcdef0ull); + ATF_REQUIRE(O16(0x1234) == __bswap16(0x1234)); + ATF_REQUIRE(O32(0x12345678ul) == __bswap32(0x12345678ul)); + ATF_REQUIRE(O64(0x123456789abcdef0ull) == __bswap64(0x123456789abcdef0ull)); +#undef H16 +#undef H32 +#undef H64 +#undef O16 +#undef O32 +#undef O64 +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, sys_endian); + + return atf_no_error(); +} From nobody Tue Oct 15 23:15: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 4XSqh63JHkz5Z82t; Tue, 15 Oct 2024 23:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSqh61FmQz42Z9; Tue, 15 Oct 2024 23:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729034118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAQpBxZyy5YQ9VmmcfWvL2X8+ATE6Axy958qxXPiML0=; b=v6kAgygoBAP8R5e8kaXw1zNASa3+YTlEb07l6xMO7lxLekH+XZVVLH7TS1etyRYt8wJE0p aow1UpqLfLhmfAi3H66g1k0a3fAsED16VsnHc/IUto5EqXUZm/a1wr0GfbAddCHY5jDX2C Y4CBOL9Aidl4WLMHvoCJ89ruEcpL48F9F5g2UE7eIW63sE04cEvlpfsqbRCF/Dj0nlqa2N JD3HrOpT2ZpPda45YRa+a2LFoSvbl/At20/AWENGjAa5zobOJmcZ67a89tz6UE4dS9+dT5 xeIuPY9MvpIs+35fuRu+Ly6GDVXDxbt2irg973AtIUhvq5An2QlFjhZe4dq2FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729034118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAQpBxZyy5YQ9VmmcfWvL2X8+ATE6Axy958qxXPiML0=; b=UV8VWrZD4EvKGD7LdkjuSigTLbmpLlAqV+jJJ3JzZiAUcLjiuX8P0JN5LxsmmvjpBfOE0P 8y9M5nkuwcH3dGghyCB5Zb7Nz2lHdCCK4GmaW7upJLhEHfQTx/0mEbN0kzC6zmLbw01nUd QQL4IyFnQEerOqmxNE4xCdlcgqBo4SiUHUdYGXQOj33EuH4VsZ3kcINm2KlqNAZulyA8hN jMjBfBogu1lOPM6O73hxFa+RjwsCrLkFbb9Bpc9NegyiBed3RgMYISH/almVOBrnQUgiTi 5iYNILzGUJKSzAiq34I3c0Cb9GgHCofDV8OfTCrX1C+lNWydPl3Hmz6aVah1uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729034118; a=rsa-sha256; cv=none; b=BxdSsRilUFP2eLfrVG88+UGUdlzA4SU8DP/pDGHDiLC/Sr5uESrbwP0x7WHmLuoEiSZMR8 MMwkJt7P3LrYQ30w5/dj77+oa/XwqdYgJ6uMU5IB6Y5Nw9oi7U4ZQ5e13EVqdVT5+LLYnL nPqUrgxpKi1JWBGCjyIL9jfJ2Nbq/xyqoWCVxMboOt/xW2yCk+OuOG00Nb23vPvZf/wl9t V0aHmMv5sNS29N8orgNFBz3FXaAOZKQH8eYn0hlPeQe5uqAHgLjl4Tad21zeYzN1uKZrWD ZVkdNm7v/5R4Ru07kn6E/4+bnVOUfLpfJgND523oHcxiyHj1wyl9+Qf36TazPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSqh60s3bzhNS; Tue, 15 Oct 2024 23:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FNFIOa024748; Tue, 15 Oct 2024 23:15:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FNFIYD024745; Tue, 15 Oct 2024 23:15:18 GMT (envelope-from git) Date: Tue, 15 Oct 2024 23:15:18 GMT Message-Id: <202410152315.49FNFIYD024745@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: 09c999b1557a - main - gpart: More nuance for GPT 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09c999b1557a8031d2b60435d71a0a5ed4f0f016 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=09c999b1557a8031d2b60435d71a0a5ed4f0f016 commit 09c999b1557a8031d2b60435d71a0a5ed4f0f016 Author: Warner Losh AuthorDate: 2024-10-15 23:15:17 +0000 Commit: Warner Losh CommitDate: 2024-10-15 23:15:17 +0000 gpart: More nuance for GPT support A careful reading of the GPT standard shows that one may have fewer than 128 entries in your GPT table. While the standard requires that we reserve enough space (32 512-byte-LBAs or 4 4096-byte-LBAs), it also explicitly allows one to specify fewer actual partitions (since that controls what is in the CRC). It requires that the first LBA to be 32 (512 sectors) or 6 (4k sectors) or larger. That requirement is not enforced (it's not listed as one of validation criteria for the GPT). We should likely do so in the future. To that end, allow a default number of entries to use (defent) on creation to be different (larger) than the minimum number of legal entries. For gpt, these numbers work out to 128 and 1 respectively. For all the others, make minent == defent so this is a nop for those partitioning schemes. Sponsored by: Netflix Reviewed by: zlei, emaste Differential Revision: https://reviews.freebsd.org/D42246 --- sys/geom/part/g_part.c | 2 +- sys/geom/part/g_part.h | 5 +++-- sys/geom/part/g_part_apm.c | 1 + sys/geom/part/g_part_bsd.c | 1 + sys/geom/part/g_part_bsd64.c | 1 + sys/geom/part/g_part_ebr.c | 1 + sys/geom/part/g_part_gpt.c | 3 ++- sys/geom/part/g_part_mbr.c | 1 + 8 files changed, 11 insertions(+), 4 deletions(-) diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index d72efa09c46d..41125f6478ac 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -1005,7 +1005,7 @@ g_part_ctl_create(struct gctl_req *req, struct g_part_parms *gpp) table->gpt_gp = gp; table->gpt_scheme = gpp->gpp_scheme; table->gpt_entries = (gpp->gpp_parms & G_PART_PARM_ENTRIES) ? - gpp->gpp_entries : scheme->gps_minent; + gpp->gpp_entries : scheme->gps_defent; LIST_INIT(&table->gpt_entry); if (null == NULL) { cp = g_new_consumer(gp); diff --git a/sys/geom/part/g_part.h b/sys/geom/part/g_part.h index 13bbb1e4126a..575d97623e9b 100644 --- a/sys/geom/part/g_part.h +++ b/sys/geom/part/g_part.h @@ -118,8 +118,9 @@ const char *g_part_alias_name(enum g_part_alias); struct g_part_scheme { KOBJ_CLASS_FIELDS; size_t gps_entrysz; - int gps_minent; - int gps_maxent; + int gps_minent; /* Minimum number of entries possible */ + int gps_defent; /* Default number of entries to create */ + int gps_maxent; /* Maximum number of entries possible */ int gps_bootcodesz; TAILQ_ENTRY(g_part_scheme) scheme_list; }; diff --git a/sys/geom/part/g_part_apm.c b/sys/geom/part/g_part_apm.c index 9c0bb189cc69..c6e40495509c 100644 --- a/sys/geom/part/g_part_apm.c +++ b/sys/geom/part/g_part_apm.c @@ -101,6 +101,7 @@ static struct g_part_scheme g_part_apm_scheme = { sizeof(struct g_part_apm_table), .gps_entrysz = sizeof(struct g_part_apm_entry), .gps_minent = 16, + .gps_defent = 16, .gps_maxent = 4096, }; G_PART_SCHEME_DECLARE(g_part_apm); diff --git a/sys/geom/part/g_part_bsd.c b/sys/geom/part/g_part_bsd.c index 2ff8566103d8..d6d1b7346d9b 100644 --- a/sys/geom/part/g_part_bsd.c +++ b/sys/geom/part/g_part_bsd.c @@ -106,6 +106,7 @@ static struct g_part_scheme g_part_bsd_scheme = { sizeof(struct g_part_bsd_table), .gps_entrysz = sizeof(struct g_part_bsd_entry), .gps_minent = 8, + .gps_defent = 8, .gps_maxent = 20, /* Only 22 entries fit in 512 byte sectors */ .gps_bootcodesz = BBSIZE, }; diff --git a/sys/geom/part/g_part_bsd64.c b/sys/geom/part/g_part_bsd64.c index 74e370243c3c..4339a988b4ba 100644 --- a/sys/geom/part/g_part_bsd64.c +++ b/sys/geom/part/g_part_bsd64.c @@ -160,6 +160,7 @@ static struct g_part_scheme g_part_bsd64_scheme = { sizeof(struct g_part_bsd64_table), .gps_entrysz = sizeof(struct g_part_bsd64_entry), .gps_minent = MAXPARTITIONS64, + .gps_defent = MAXPARTITIONS64, .gps_maxent = MAXPARTITIONS64 }; G_PART_SCHEME_DECLARE(g_part_bsd64); diff --git a/sys/geom/part/g_part_ebr.c b/sys/geom/part/g_part_ebr.c index 82411e60dcd4..01819636fe8a 100644 --- a/sys/geom/part/g_part_ebr.c +++ b/sys/geom/part/g_part_ebr.c @@ -124,6 +124,7 @@ static struct g_part_scheme g_part_ebr_scheme = { sizeof(struct g_part_ebr_table), .gps_entrysz = sizeof(struct g_part_ebr_entry), .gps_minent = 1, + .gps_defent = 1, .gps_maxent = INT_MAX, }; G_PART_SCHEME_DECLARE(g_part_ebr); diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c index a856a34f99d9..022337bd6575 100644 --- a/sys/geom/part/g_part_gpt.c +++ b/sys/geom/part/g_part_gpt.c @@ -154,7 +154,8 @@ static struct g_part_scheme g_part_gpt_scheme = { g_part_gpt_methods, sizeof(struct g_part_gpt_table), .gps_entrysz = sizeof(struct g_part_gpt_entry), - .gps_minent = 128, + .gps_minent = 1, + .gps_defent = 128, .gps_maxent = 4096, .gps_bootcodesz = MBRSIZE, }; diff --git a/sys/geom/part/g_part_mbr.c b/sys/geom/part/g_part_mbr.c index dfd55dae139f..7d44b9e03c8d 100644 --- a/sys/geom/part/g_part_mbr.c +++ b/sys/geom/part/g_part_mbr.c @@ -115,6 +115,7 @@ static struct g_part_scheme g_part_mbr_scheme = { sizeof(struct g_part_mbr_table), .gps_entrysz = sizeof(struct g_part_mbr_entry), .gps_minent = NDOSPART, + .gps_defent = NDOSPART, .gps_maxent = NDOSPART, .gps_bootcodesz = MBRSIZE, }; From nobody Tue Oct 15 23:39:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSrD123TXz5Z9JG; Tue, 15 Oct 2024 23:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSrD11HZwz443g; Tue, 15 Oct 2024 23:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729035569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YM8y6wCqRADKi/tIl2gzDdsCgPntohOqGSe9QlyT8wk=; b=wuxJauBogAyghLJmEeUKLalUnU8aFa8XXdJnjY9GoPfYiNAAVd7qoevlqmlBWoSsf/Zf0a VIn2xqgQwsm1+YwGjFXZIx5YhtVyAmGj+kWwOmd4vPw4tUblC7YP8LN+FIyAJAO6sEO0hj DFUfK2MMQN9muC0pcGKG+BvEceY9WtnsI5F9TuFcXogt81eZDU/HQtJOEPFOC/BO0z4s3x iI76qNal/r+eTOQGg6FU94505z3a2a2IKUmddL2OkLEOf3JpuX8681IVxqyKt2V+B1NFdO oOaTSULa5y5bHM3fQ+Jb57cjnc2N/4BifvTYum7NH7U0pcXu9Q4FWCrks8DiZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729035569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YM8y6wCqRADKi/tIl2gzDdsCgPntohOqGSe9QlyT8wk=; b=tDqCfXpP/UmkIy5b7+w7N+4fYk7ZHqFaVRdNaQH6F9vSTBmAeKPkv826rS/NyJB5yJv7Rs +QXg8TCQ6Ogz1Gis9SMMsON8e97tLdg4aRdNetdzYqIDyGa2fxSY2blSdbq2dEYmqJ06wK /8uYtk3iQU3eTDTHh/wVQc6RjWOSFQqPy8/g5e24WEP3WQlZGFqMQkgtUHOCS7kZiBvgou DaeFlrfVQtZuGJzX2euI+R3LNE37ibZEMPqE0T2OjlvE3tSyGYCuynYq61P9bop7N3KXDG NL0jm4Smu9LANU3YInPbabmc+k/A2x0KKPj3U0Z0q7nDjL1DkvIdwXrt2JE8LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729035569; a=rsa-sha256; cv=none; b=olnnIaOkacI+PbF66JDISS/RlgNVNqadSBd9lO/DjfF6/xaa/Y6gKnjcsW23XMu7wj0zjw RwzJRR3lID2KBtALD5ov0C+rBttit7JP58vOboOT1WbKKDc3Eh2U3hX+EqJrRkQ5urNdyX 8avGEzYhNevh2q9scI1mMVeavwVhYJjZZcLaq8WbO6etUPtufW5gIPnD0PF+l2jWR3A4d0 dy+0a7aFSSZlHiSdV0tVbhyVNWwoKXtp1fskg/UEb3k7nAdPZzTdYrgXsyZpT627KwfAR6 jf95TgVvEfs5wjV1mzy/8a8UD9UANrCG3ov03lhs/kW42X/UOHP72FAoVTOM4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSrD10mG3zj8V; Tue, 15 Oct 2024 23:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FNdTu3058389; Tue, 15 Oct 2024 23:39:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FNdTcC058386; Tue, 15 Oct 2024 23:39:29 GMT (envelope-from git) Date: Tue, 15 Oct 2024 23:39:29 GMT Message-Id: <202410152339.49FNdTcC058386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: a24dacde6362 - main - committers-src: Add myself 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a24dacde636220f61b8e56dc42235ef66bd0c8d7 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a24dacde636220f61b8e56dc42235ef66bd0c8d7 commit a24dacde636220f61b8e56dc42235ef66bd0c8d7 Author: Kevin Bowling AuthorDate: 2024-10-15 23:38:18 +0000 Commit: Kevin Bowling CommitDate: 2024-10-15 23:38:18 +0000 committers-src: Add myself Approved by: srcmgr --- share/misc/committers-src.dot | 1 + 1 file changed, 1 insertion(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 500dc3b0687d..ee1bb79b3c0f 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -243,6 +243,7 @@ kaiw [label="Kai Wang\nkaiw@FreeBSD.org\n2007/09/26"] kaktus [label="Pawel Biernacki\nkaktus@FreeBSD.org\n2019/09/26"] kan [label="Alexander Kabaev\nkan@FreeBSD.org\n2002/07/21"] karels [label="Mike Karels\nkarels@FreeBSD.org\n2016/06/09"] +kbowling [label="Kevin Bowling\nkbowling@FreeBSD.org\n2024/10/15"] kd [label="Kornel Dulęba\nkd@FreeBSD.org\n2022/06/22"] ken [label="Ken Merry\nken@FreeBSD.org\n1998/09/08"] kensmith [label="Ken Smith\nkensmith@FreeBSD.org\n2004/01/23"] From nobody Wed Oct 16 00:14: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 4XSs0b10JBz5ZCQJ; Wed, 16 Oct 2024 00:14:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSs0b0Tzcz46Rv; Wed, 16 Oct 2024 00:14:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729037679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8qGKoslB5SnCY6C2IYMTCLo6QVfJdPaiSI3USVB+rg=; b=FYR4T0gO1XwHGEAoiQ1wL/mWD1I0L0V3HtK4Rv0sksB2iFGgdhRVhW0PVpVTnA7KThcRwZ p0dJHME8+jRepPxsySVGoXfQ9ACfBDb2IGGC09SPUjPu8mZYfUzFf7GhnmKRPg/squ2+Im IkHJKObbMD/vPhwRmzBLDXZ9qe0idGKPtXXW7oa+3SPv3LJjvwIZCM2scx1WZtQBwz/ApX ukqUTNyqT+FTom3JG7RMJnCu5aaYEmg5L75a4GGIDqMVJ4CQ40ZpNKdhGx++99tB6zWuu2 7pxXmuh25nUTL4J/ezkgNLyd40w2w6kPE0LQ7GcnIDTvnWTUc4OGL1Vl8yxgkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729037679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8qGKoslB5SnCY6C2IYMTCLo6QVfJdPaiSI3USVB+rg=; b=L82faY6SRC4Q0kVrEIkP/PHMwqriHnfBZMtp8J3HgjPcgwUQtszObz8IHEJUZ9OPOqnR7r TBfGLo008pYfJT/uM2swf9H0bqC4UsHcoPNA9JWikRu/xlOfV5O1tALqiqoWo6Hd2xcizD 0OVm04FqNP+9+/GGVtl6gcjxZ1Cg/eL4yBoC92V1D9bgPng8qywzVEmnfzZo9ttWQKSx9E hexORWC8DfqRx6F0QVCFJ3b3Fd8YYJ+X6tdG0qzBVAN+GepWdK0U3l34EUi3Y9SvC5+0CQ G/t/79m52CiSPcWU6dbMrwGDNSjHFucMQ596V7aJotwxXJpjsfUNNqqJ+oPJPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729037679; a=rsa-sha256; cv=none; b=b9W1h13kfHJoiRkwBwZhaeahYJ8aY1Du6PJPW14CAGspaavE+BHu0+5ebmrR4aUI6330nl 2ckBIYGt4wzWmez7FhLv8D1XrEO8pE2HkQUEEB4dlO0v8KOVxHwoWHq1f7qpgP5UsWgwev fKmCoQuIxR2EXAWfVpuzxkl4noDhz5Lre4SiVqOf61Hm3sLwWGEIhry6Gr3Hb0XaI9erte mpu2KyEfjFiXNB+MdstB37YDTK9mjx8XMpy0KwIR5Yz1EiF+U3IqYU2A+W9qHrflNrp4Yq 8oqEMeG9EIzsbYT6VSYR1IHjIlDnKB5Et9A+f3IBwsjgGal9oz0Aknda7dc57A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSs0b04xczj0D; Wed, 16 Oct 2024 00:14:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49G0EcCl026167; Wed, 16 Oct 2024 00:14:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49G0EcW3026164; Wed, 16 Oct 2024 00:14:38 GMT (envelope-from git) Date: Wed, 16 Oct 2024 00:14:38 GMT Message-Id: <202410160014.49G0EcW3026164@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: 2cbda736cea8 - main - gpart: Add warning when the start sector is too low. 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: 2cbda736cea8f82cfc5caab0f6099f0fbfe28537 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2cbda736cea8f82cfc5caab0f6099f0fbfe28537 commit 2cbda736cea8f82cfc5caab0f6099f0fbfe28537 Author: Warner Losh AuthorDate: 2024-10-16 00:03:03 +0000 Commit: Warner Losh CommitDate: 2024-10-16 00:15:16 +0000 gpart: Add warning when the start sector is too low. Add a warning if the starting sector is too low. The standard requires that at least 16k is reserved for the GPT Partition Array, but some tools produce GPT images with fewer than the required number of reserved sectors. PR: 274312 Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42247 --- sys/geom/part/g_part_gpt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c index 022337bd6575..4733631c4b20 100644 --- a/sys/geom/part/g_part_gpt.c +++ b/sys/geom/part/g_part_gpt.c @@ -1045,6 +1045,20 @@ g_part_gpt_read(struct g_part_table *basetable, struct g_consumer *cp) g_free(sectbl); } + /* + * The reserved area preceeds the valid area for partitions. Warn when + * the lba_start doesn't meet the standard's minimum size for the gpt + * entry array. UEFI 2.10 section 5.3 specifies that the LBA must be 32 + * (for 512 byte sectors) or 6 (4k sectors) or larger. This is different + * than the number of valid entries in the GPT entry array, which can be + * smaller. + */ + if (table->hdr->hdr_lba_start < GPT_MIN_RESERVED / pp->sectorsize + 2) { + printf("GEOM: warning: %s lba_start %llu < required min %d\n", + pp->name, (unsigned long long)table->hdr->hdr_lba_start, + GPT_MIN_RESERVED / pp->sectorsize + 2); + } + basetable->gpt_first = table->hdr->hdr_lba_start; basetable->gpt_last = table->hdr->hdr_lba_end; basetable->gpt_entries = table->hdr->hdr_entries; From nobody Wed Oct 16 00:53: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 4XSssV1454z5ZFgV; Wed, 16 Oct 2024 00:53:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSssV0VMjz4BGM; Wed, 16 Oct 2024 00:53:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729040014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2KLT+KYuCXxc436xlgrpTsuIbJfpPYu9vVDeM2YA2uA=; b=KyalAuTnrZB9OeOTzv+MSwXBlubb/FejT1DQPtx++RUBiZOlBmmRd/WiZI6Ee+M7XG6cWO t0u5HaNo7sTn1iDJsmAn8CNp7DNUfVADDDzEMfxZAdsFPPnTS9/lhHKRPZGzrI6ltCrfq4 ThbX6u3QmpXke7CkCPhDPfUq01TZoG3e6lmJr5iB783IYrkSV6bBKQ2Kp/cb0dGCDK+0FM 5rLs7C+RW2mTR6MI1BSmXS7It6VY2N96HJnERjp9fDXp9l4DkkbqVrQD+Qkf7KJH7/YVlr b11k7laBTnwwXJ76xt4XOta7s3zylJ7oWXr1X32Wa2m9oY0/KJN20yHaMUV1zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729040014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2KLT+KYuCXxc436xlgrpTsuIbJfpPYu9vVDeM2YA2uA=; b=gqpv16pf8HBzz9lIBf4kRTMLHIaQ8znNzyjD8a7SMWBR36CL96TF9vD+2P+0zHu1RYyM2l Sg+WDPWvUSanBZuEcdSbTgxQbUyeGEHW2GsbKq7S2Vay2GWj8NTh0lCoi8KfMfDB2ctV04 BngafEHMsvxXQdz34Eg9fz6nHCbtEKeLqwamQe7vZWtyRRBWsCpLAdUskxCK4gQifsUPWf CHcRv87iPUJBbYaiAvoyo0BbFMXOlMmYgFUMYpDHuIfZvjNMksAHpu9doa4uAP/m3mdZ1O 7L38dcu66NbPqbFveqDW6zGhvQ2Lz4Hbjf55sNwP8K05dbtex4WyDY8EicIwog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729040014; a=rsa-sha256; cv=none; b=uXsdPMpNNEWmadzpM1etNGzWxw+s8IoogT/zXJquwXNTpL6j8SbZtwcETbUgQ2h8dfiHxe fEnni/x7JEEQ/BhELq7FLOTqyBfB7+UM5Gth58zPQs5oe2jg2J3ExFxNqfAxkFkIwPftDF wHJHDKxDiIBRNSFsLafLz5QGKnG1ocu2bvTZDAklEYt46fvQYYFxTWkVWSO9SeGsgc2amn AYl5Hrgeb61gCP5Wsl6r5+eGX5FDGm0MffHEQdILIXIopm3fY5vHWSphJkyrwh0gk3aN1A 5OLwWmCW+XmfEROeVA3gr0HjY6032zS4Uq9FalJpcneg9FU3Zeak+1UZ2mWjpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSssV06PBzl97; Wed, 16 Oct 2024 00:53:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49G0rXNq094188; Wed, 16 Oct 2024 00:53:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49G0rXmX094185; Wed, 16 Oct 2024 00:53:33 GMT (envelope-from git) Date: Wed, 16 Oct 2024 00:53:33 GMT Message-Id: <202410160053.49G0rXmX094185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Sergey A. Osokin" Subject: git: bdbf50660c51 - main - bsd-family-tree: add macOS 15 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: osa X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bdbf50660c51534d7a25569349bcdf2d4e460f50 Auto-Submitted: auto-generated The branch main has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=bdbf50660c51534d7a25569349bcdf2d4e460f50 commit bdbf50660c51534d7a25569349bcdf2d4e460f50 Author: Sergey A. Osokin AuthorDate: 2024-10-16 00:52:01 +0000 Commit: Sergey A. Osokin CommitDate: 2024-10-16 00:52:01 +0000 bsd-family-tree: add macOS 15 While I'm here fix whitespaces for recent OpenBSD releases. --- share/misc/bsd-family-tree | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 7cc017c6d47d..98f49d3989db 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -465,6 +465,8 @@ FreeBSD 5.2 | | | | | | | | | 8.3 | | | FreeBSD | | | | | | 14.1 | | | | | + | | macOS | | | + | | 15 | | | | FreeBSD | | | | | 13.4 | | OpenBSD 7.6 | | | | | | @@ -898,12 +900,13 @@ OpenBSD 7.4 2023-10-16 [OBD] FreeBSD 14.0 2023-11-20 [FBD] FreeBSD 13.3 2024-03-05 [FBD] NetBSD 10.0 2024-03-28 [NBD] -OpenBSD 7.5 2024-04-05 [OBD] +OpenBSD 7.5 2024-04-05 [OBD] NetBSD 9.4 2024-04-20 [NBD] NetBSD 8.3 2024-05-04 [NBD] FreeBSD 14.1 2024-06-04 [FBD] +macOS 15 2024-09-16 [APL] FreeBSD 13.4 2024-09-17 [FBD] -OpenBSD 7.6 2024-10-08 [OBD] +OpenBSD 7.6 2024-10-08 [OBD] Bibliography ------------------------ From nobody Wed Oct 16 01:06:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSt8s1GmPz5ZGN0; Wed, 16 Oct 2024 01: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSt8s0glmz4CtT; Wed, 16 Oct 2024 01: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=1729040813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b28/A/jFirZ7OOhzxFnKZBhYhx6w8nEZvURs4XDMkno=; b=iUBkvitlgw0dxJPFWXv/5UShg4OKPhMTWHkBrnrHtmFxlQYYQjiMoWqHkB8N4IkjnBJi8q vt7oa2Z0rxQWfxuKHxcknt/6jwY7duSgnqGBjxWPC+XePlIXjnS/8l5rbHIuap3RWfy5XQ X5+hM9oioY+Q+dCulDzroII66YFL9wJSZKD1b5HRcVqiVQqI59BKlWlQjSqRS1JuIwQ1uO NsAL54xQ3ZBihu/DCPw+j/OdDcJIpVYe8gkkGJei5+SOGwb9+lldn5CNQpKXu4gQbGA/y7 rk23jPVeKHkIoa7JXeXfimCh51vV4AR2tfahdhui4NVvrNxNuSDbYKCL+ylTSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729040813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b28/A/jFirZ7OOhzxFnKZBhYhx6w8nEZvURs4XDMkno=; b=RE2QnQb3viWqBgVEdp38bFfcCiAJ7bLfBTKV5Y+geWdm7dDsdE0O6rWHXppEmnijaO48tr 0W48+aWWIXkhKkPsEtPqKL1teYRlNOfQPCbJ0t1B8rjcbSWZ2FC3fYi2iESEt2V/80lxbj w5Hut1G/3XTyX8ARGzxXjLHAI4xrEzkAdCsEV9X1kFvInmGVX5xOFboSdjdcQCydrfPeB9 /W5PqFo5iHPmGaW5W6BO23Bd65qGB1XuBcuWkkqzGCXj2zg57tpYEwdPujZtpZeGvtdkhF n3nFNBwr1IDCr6Dja01V5Z0u/6++Zl+r9nRB60/dghZEcCFXyXakuZpmIAzfXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729040813; a=rsa-sha256; cv=none; b=hbwzmPA3TYH0yJvBZFYkLtbZLIZ57Ey2P+l2m48e3X2qtyPKlJ6n0W/tT2lBtF/7gN0y5x F8csAzURDNRD6/Vj/FiiqXOujPZzZ4ZZ2PWI9Km1V9pCs7Ib5ObKOJrL2dRjPQCaXNqxo3 +08+DmgnKa1wOJ8cojXYRF9mzc7+R2Fj0ScOmLgSbD4sBdccxo+7sVqHDh0aZUUgZ6f+oX luAGJGOyyQBotAS+Z+j+vEirEo/veG4MRe62K5+EpPjdXL3wPvtJeyDZpzKyFss5xgIDia zchhC+r0ndX+ApC/B3DHBDfC6575MWetZtPBsZ3CG50kZrTlDyFgsrFRqeTUYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSt8s0H0GzlYD; Wed, 16 Oct 2024 01:06:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49G16qpn012342; Wed, 16 Oct 2024 01:06:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49G16qS7012339; Wed, 16 Oct 2024 01:06:52 GMT (envelope-from git) Date: Wed, 16 Oct 2024 01:06:52 GMT Message-Id: <202410160106.49G16qS7012339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Pedro F. Giffuni" Subject: git: 80a5b26871e9 - main - sbin/ping: allow normal users to specify larger packets 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: pfg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80a5b26871e90a0ad99d95bd129343471a7a36e3 Auto-Submitted: auto-generated The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=80a5b26871e90a0ad99d95bd129343471a7a36e3 commit 80a5b26871e90a0ad99d95bd129343471a7a36e3 Author: Pedro F. Giffuni AuthorDate: 2024-10-15 20:50:04 +0000 Commit: Pedro F. Giffuni CommitDate: 2024-10-16 01:05:50 +0000 sbin/ping: allow normal users to specify larger packets Only super-user could specify a packet size larger than the default 56 bytes. This restriction was added by Matt Dillon in 1998 during the BEST days [0]. This restriction doesn't exist in ping IPV6 or on NetBSD, OpenBSD and Linux. UMS [1] uses this feature to estimate the client's bandwidth to optimize the streaming experience. [0] DFGit 526f06b278d9252add168aa18b60242c08771165 [1] UMS: https://github.com/UniversalMediaServer/UniversalMediaServer Obtained from: DragonFlyBSD Differential Revision: https://reviews.freebsd.org/D45774 --- sbin/ping/ping.8 | 3 +-- sbin/ping/ping.c | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sbin/ping/ping.8 b/sbin/ping/ping.8 index 0eaec196e1e3..951049d0f252 100644 --- a/sbin/ping/ping.8 +++ b/sbin/ping/ping.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 15, 2023 +.Dd October 15, 2024 .Dt PING 8 .Os .Sh NAME @@ -312,7 +312,6 @@ with the 8 bytes of ICMP header data. .Pp -For IPv4, only the super-user may specify values more than default. This option cannot be used with ping sweeps. .Pp For IPv6, you may need to specify diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index d9d544bc75c8..e6b1247af497 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -96,8 +96,8 @@ #define DEFDATALEN 56 /* default data length */ #define FLOOD_BACKOFF 20000 /* usecs to back off if F_FLOOD mode */ /* runs out of buffer space */ -#define MAXIPLEN (sizeof(struct ip) + MAX_IPOPTLEN) -#define MAXICMPLEN (ICMP_ADVLENMIN + MAX_IPOPTLEN) +#define MAXIPLEN ((int)sizeof(struct ip) + MAX_IPOPTLEN) +#define MAXPAYLOAD (IP_MAXPACKET - MAXIPLEN - ICMP_MINLEN) #define MAXWAIT 10000 /* max ms to wait for response */ #define MAXALARM (60 * 60) /* max seconds for alarm timeout */ #define MAXTOS 255 @@ -458,11 +458,10 @@ ping(int argc, char *const *argv) errx(EX_USAGE, "invalid packet size: `%s'", optarg); datalen = (int)ltmp; - if (uid != 0 && datalen > DEFDATALEN) { - errno = EPERM; - err(EX_NOPERM, + if (datalen > MAXPAYLOAD) { + errx(EX_USAGE, "packet size too large: %d > %u", - datalen, DEFDATALEN); + datalen, MAXPAYLOAD); } break; case 'T': /* multicast TTL */ From nobody Wed Oct 16 02:42: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 4XSwHc4327z5ZMLH; Wed, 16 Oct 2024 02:42:52 +0000 (UTC) (envelope-from maxim@freebsd.org) Received: from maxim.int.ru (maxim.int.ru [167.71.75.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "maxim.int.ru", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSwHb5kRHz4JqS; Wed, 16 Oct 2024 02:42:51 +0000 (UTC) (envelope-from maxim@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from localhost (maxim@localhost [127.0.0.1]) by maxim.int.ru (8.17.1/8.17.1) with ESMTPS id 49G2gjgE025981 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 16 Oct 2024 02:42:45 GMT (envelope-from maxim@freebsd.org) Date: Wed, 16 Oct 2024 02:42:45 +0000 (UTC) From: maxim@freebsd.org To: "Pedro F. Giffuni" cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 80a5b26871e9 - main - sbin/ping: allow normal users to specify larger packets In-Reply-To: <202410160106.49G16qS7012339@gitrepo.freebsd.org> Message-ID: <4c41b78e-b560-08ef-0070-017f21d4c8eb@maxim.int.ru> References: <202410160106.49G16qS7012339@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:14061, ipnet:167.71.64.0/20, country:US] X-Rspamd-Queue-Id: 4XSwHb5kRHz4JqS X-Spamd-Bar: ---- Hi Pedro, > index d9d544bc75c8..e6b1247af497 100644 > --- a/sbin/ping/ping.c > +++ b/sbin/ping/ping.c > @@ -96,8 +96,8 @@ > #define DEFDATALEN 56 /* default data length */ > #define FLOOD_BACKOFF 20000 /* usecs to back off if F_FLOOD mode */ > /* runs out of buffer space */ > -#define MAXIPLEN (sizeof(struct ip) + MAX_IPOPTLEN) > -#define MAXICMPLEN (ICMP_ADVLENMIN + MAX_IPOPTLEN) > +#define MAXIPLEN ((int)sizeof(struct ip) + MAX_IPOPTLEN) > +#define MAXPAYLOAD (IP_MAXPACKET - MAXIPLEN - ICMP_MINLEN) This doesn't look right. Before: # ping -s 65507 -c 1 127.0.0.1 ING 127.0.0.1 (127.0.0.1): 65507 data bytes 65515 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.194 ms .. Now: # /usr/obj/usr/home/maxim/fbsd/src/amd64.amd64/sbin/ping/ping -s 65507 -c 1 127.0.0.1 ping: packet size too large: 65507 > 65467 Not sure if the tests catch this. Maxim -- Maxim Konovalov From nobody Wed Oct 16 03:18:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSx5G1hJMz5ZNcC; Wed, 16 Oct 2024 03:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSx5G0yzcz4Mc5; Wed, 16 Oct 2024 03:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729048738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EhVb+LOc0MzdIu+tzLMhCV9WPdF6YKiTAC9LUnBaHZE=; b=ihZofiMMm6aGJB/3B5GJ6FGo2Bc8+tj+IBTr4ZPuV1FUdf0oQlWNPAc1M8aG6L+oR7RBNw fB+meihh90dmOQKeu9PqJyyUs6toieIrsEu0sWgNhGtwoXLty1oZ85791Ys3dr7sr89j/N pi01XLAkZNGN/MUrB1FuTx4+NnL0KEKO0Unhyy1UhY1EFOBT6UhiFtq5jwhE40ACjXTk65 Pd0+RAgCBacwHSAn/hXAz4n/mp/zvQxxP6Co+EpyRRq0qc5yzrDQlYULdcHBHuxg1OrmNS DiIkw+f/oqIChhpGJrMWoQazpm3Xe+LymVlkvh216wDSeqPxEaCvr0RTTrOnkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729048738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EhVb+LOc0MzdIu+tzLMhCV9WPdF6YKiTAC9LUnBaHZE=; b=CUt5wRnn1X8RHMKOYIQ4ANIirucsLZd7CKGGKFBcoL7uy6jtrh/jaHzoYdnLosDwVlQz7d 2dA7P3YFwyK6jFFw4DoobqIDK65FmMnT7Lh/ibDwmrIMWcJEttdwwJbO5OiFscHmzBXXtW Hor6YPWO9OA5YpU+VsBmJjJWbYYvJCXOQNGD1KNtAa7wKS658NP+DSAp4fVpBaLOM1QEBM 6ljWggtwokoxFa6WH6ABWclk/VdI0XjViTIE9X0ymlyPAppUzkvtWuF9QA/onyhPiycjXZ 4zvRHAbYrhAr2ZVVL4hV8QzbPkSBgVBE/4V9S7MJjKDqXfoIjPdUgqPs9qZW3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729048738; a=rsa-sha256; cv=none; b=DT5SwF+hFfqWq/7CjbSyPtbCStqejC8soxqLevBCT8wKkSeIaelN83W8b1kgqTzHsrXmkJ hVB96AIrhBv/0Fj3faMSOY93Gm1Fb4hW4Jbunf11pLxT85s2wNboVEB5GBQcerE2nV+j3K m6MaNLN+SHFMuirqo0tuEAHC3GdOxB9qcZaP4QeRKmPkoJ5O1vsUI1tdUG528XfiBjiVKB Zm7ARU8RmNST5m3VB5O1JtovbYpO4G5tH0Xjs7X8GF5NPbauZGgqPSIwSD0KAgU9aiB11E fl9oPIByKvrRXvxmjdJ4AtXi5e8BCLZLl6pb8K7LOoEOl9hPhosRfvAFzHjXzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSx5G0ZBTzpKl; Wed, 16 Oct 2024 03:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49G3IvWv034287; Wed, 16 Oct 2024 03:18:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49G3IvgV034284; Wed, 16 Oct 2024 03:18:57 GMT (envelope-from git) Date: Wed, 16 Oct 2024 03:18:57 GMT Message-Id: <202410160318.49G3IvgV034284@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: 42b7e9c4a9c5 - main - newbus: Remove redundant check for 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42b7e9c4a9c53f3d51926cf57858a17887363662 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=42b7e9c4a9c53f3d51926cf57858a17887363662 commit 42b7e9c4a9c53f3d51926cf57858a17887363662 Author: Warner Losh AuthorDate: 2024-10-16 03:19:11 +0000 Commit: Warner Losh CommitDate: 2024-10-16 03:19:27 +0000 newbus: Remove redundant check for 0 We already checked to see if the return code is 0 above. This code is redundant. However, it's here so we can break out two layers, which a simple goto fixes. A subsequent change makes the pri < 0 condition no longer hold. This allows us to simplify a few things. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D44269 --- sys/kern/subr_bus.c | 57 +++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index d0c41b59dbb6..ef71588f7157 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -1662,13 +1662,13 @@ device_probe_child(device_t dev, device_t child) result = DEVICE_PROBE(child); /* - * If the driver returns SUCCESS, there can be - * no higher match for this device. + * If probe returns 0, this is the driver that wins this + * device. */ if (result == 0) { best = dl; pri = 0; - break; + goto exact_match; /* C doesn't have break 2 */ } /* Reset flags and devclass before the next probe. */ @@ -1712,12 +1712,6 @@ device_probe_child(device_t dev, device_t child) continue; } } - /* - * If we have an unambiguous match in this devclass, - * don't look in the parent. - */ - if (best && pri == 0) - break; } if (best == NULL) @@ -1725,35 +1719,34 @@ device_probe_child(device_t dev, device_t child) /* * If we found a driver, change state and initialise the devclass. + * Set the winning driver, devclass, and flags. */ - if (pri < 0) { - /* Set the winning driver, devclass, and flags. */ - result = device_set_driver(child, best->driver); - if (result != 0) - return (result); - if (!child->devclass) { - result = device_set_devclass(child, best->driver->name); - if (result != 0) { - (void)device_set_driver(child, NULL); - return (result); - } - } - resource_int_value(best->driver->name, child->unit, - "flags", &child->devflags); - - /* - * A bit bogus. Call the probe method again to make sure - * that we have the right description. - */ - result = DEVICE_PROBE(child); - if (result > 0) { - if (!hasclass) - (void)device_set_devclass(child, NULL); + result = device_set_driver(child, best->driver); + if (result != 0) + return (result); + if (!child->devclass) { + result = device_set_devclass(child, best->driver->name); + if (result != 0) { (void)device_set_driver(child, NULL); return (result); } } + resource_int_value(best->driver->name, child->unit, + "flags", &child->devflags); + + /* + * A bit bogus. Call the probe method again to make sure that we have + * the right description for the device. + */ + result = DEVICE_PROBE(child); + if (result > 0) { + if (!hasclass) + (void)device_set_devclass(child, NULL); + (void)device_set_driver(child, NULL); + return (result); + } +exact_match: child->state = DS_ALIVE; bus_data_generation_update(); return (0); From nobody Wed Oct 16 04:16: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 4XSyMr3gXlz5ZRvy; Wed, 16 Oct 2024 04:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSyMr37ptz4RlS; Wed, 16 Oct 2024 04:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729052200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sIv3la/M3cBfk4sdLWi0tsUctOX0KnP/zzvu9ZaeP20=; b=JdNo0x+Hj03jGeUoibHuy22r4C7UdB1NHh2BjqDuxbWJl9CS5ziWrvUmxVUNA0CkxDhKJT 4KFMSYUewaWaAWt68hVI/+5EENjwHTdzRpRC4/3856ORcuUI5ZrDzZDenE4mDXWjpKlQSA KqP26hIcEWofNWe9rYlA8n8WeMT/yFzW8cQVVvjkuzN8lj/u9bEtHApgRe17+H2BrGoKBC 3EolDy7Pr+pPSoGckiCV/Fea+8Sd1I7h1Pedk+EPwduo9NRFntmM4QmjiKVOUok0rV1J7J 6L8qsRk1K6m5AA4FUFyArOLlv5DPx58IYSDsp8XggyV0gj5SaWGgjpVstOpNUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729052200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sIv3la/M3cBfk4sdLWi0tsUctOX0KnP/zzvu9ZaeP20=; b=yjey0MbjZVXbboW9zY+iG6xBoNw6iuxocv7iVLFr1uSVPqJjdZ1wRZJUpUcw/VR++wR+za Dg0XTmQNtTvnYnjQv0OXjpUcTD5cLH9oZTuEcljuY8xF07q02AlRWK7n2ALZ0/ASqdJqC4 TD4mKzTHZa2v5dHDiebGYIeKHaZMa1F3ya5gmlXMxicD0uCCB2G4BLIw2R0tTw/E7CmfLv GWzrAjnIrmy8yByv327Bys8PtWKCCZPeoTDvEBJviD7473mS22TxknOjOYwaJf0xgcxkgy DBj7hobGDvDExJvG7HlFSMKLoIvdr30SpOoOwqNCWetAlmi5U2JSqYu8a1lHDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729052200; a=rsa-sha256; cv=none; b=btIC4suTrT+ZUmpO2XvUYRCkQEXnV0etpXgHJDoqXo8ai1ehALv1Z99SEHL+1lwAZkI67y pXrvk7zNEsl4kRuu4X+urYLXnw42rYytJtOYjfRKIDkl0BI5x/RJvmkZ5RXzILkSD9U3X/ vHr5Ol4xa4YY8YfGuuKxj1HG/IjSDk2W4QpAn2/r8YQt3+XfFHUChwd/AsrbZwzoRpIITR JUSuSkGr4hwwIF9e/C3tEQT/j7uR6dATkCnohYfdsLx2h52Iro2Nv79LF9EDqsBpwxntEO A9L9ehVUAw4L/cEzVEdxnJ5hNfBC/YPjpGQpNBZe6jREY1u7PrLBaRofjdzCKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSyMr2d8VzrQs; Wed, 16 Oct 2024 04:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49G4GeIr036255; Wed, 16 Oct 2024 04:16:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49G4GewC036251; Wed, 16 Oct 2024 04:16:40 GMT (envelope-from git) Date: Wed, 16 Oct 2024 04:16:40 GMT Message-Id: <202410160416.49G4GewC036251@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 277ed435d478 - stable/13 - release: Bump default VM size for riscv64 to 6 GB 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 277ed435d478e59851d394f033efe99bc988e94a Auto-Submitted: auto-generated The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=277ed435d478e59851d394f033efe99bc988e94a commit 277ed435d478e59851d394f033efe99bc988e94a Author: Colin Percival AuthorDate: 2024-06-28 22:47:11 +0000 Commit: Colin Percival CommitDate: 2024-10-16 04:15:15 +0000 release: Bump default VM size for riscv64 to 6 GB Due to issues with the riscv64 toolchain, some binaries end up significantly larger on riscv64 than they should be. This results in riscv64 VM images -- and at present *only* riscv64 images -- not fitting within the default 5 GB filesystem size. Bump the default size for riscv64 to 6 GB until the toolchain issues can be resolved. MFC after: 1 week Sponsored by: Amazon (cherry picked from commit 59c21ed6e811c753f7806766ba45a5bfa71ae2ed) --- release/Makefile.vm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/Makefile.vm b/release/Makefile.vm index 520f47ab3ca6..4d301672836d 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -6,7 +6,11 @@ VMTARGETS= vm-image VMFORMATS?= vhd vmdk qcow2 raw +.if ${TARGET_ARCH} == riscv64 +VMSIZE?= 6144m +.else VMSIZE?= 5120m +.endif SWAPSIZE?= 1g VMBASE?= vm From nobody Wed Oct 16 04:16: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 4XSyMs4xShz5ZRw1; Wed, 16 Oct 2024 04:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSyMs4Hf2z4RnC; Wed, 16 Oct 2024 04:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729052201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vjIcKxX3nyT1yrw4oxzCVDd2a2+S5NUZ4otBWyPupjM=; b=gMZO6W+BB46n5tLPoAA6errusKpTQEiqWIXJXurptmoBUlAsvqgaMYHbIZRmTPZuTet5v8 W/57+eHJ12nEoiqj6qHQ1zCwNPtjwkDl5Ei3N90iPh4Q97Q63zY6801skLxAZV8DN9yJri Es1/A1ZfIiGRXbxHRaTD7XuGMebwMt1dxGViaTlAHh7CcrLZxhpFiCmlNPNAC0CYIujWjO QwtaNK7uNoqOwnopJUvj9ukns4ZqfJ0NndwAZjQAAJw4zeJiMBTCopwxtAb7y0ggh/648l qQUlbE38H6d9X7vcWzcpmLNZBB1yfNm6HvrjqB/bvuvaRwz4BobbMHcYVXCyxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729052201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vjIcKxX3nyT1yrw4oxzCVDd2a2+S5NUZ4otBWyPupjM=; b=Dbk8o5uS3N4Ru09YxcqgNd0KNX7IhjV7quF6EouPYbP38DubO9eyd4EjdAhEnv15YdqJpR CvHfDnpXnUjJBzFCWsGrymsMwMmSI8k+ooIsihbk4MuQCixdhJ41QrO4lJzj4hb5X00kqf updAFXACox73lQX34dADP6cUYB1cdrYTjNnvkOG7BwSLjM2aV76SVnzNMIrPx7E7TEoBXw 6g9kcRIrVzTDN0kSKDF7TyapHCYqTahiO3S2qFjwBXaC1sOkyrPXnHmyVPRTaFaOiL53MD sQQ6tp1DdMmKFj2Dekc1MDwptwECNEvi/rIRUrg+8tB6BNIQQnqL8k9UPD9GZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729052201; a=rsa-sha256; cv=none; b=fb6ETdpsVNVMoJo1Pr7cBS9b/JAqizEax7XMr2UCTujv1YLOUVwEOrlGwi4xUYhDZaQUI5 Xt3dHtb6LXVcWEOTX++Jhqq2nK0PkD7akUTfGL4+bsPrqgNpvB9WVhjpPHvbH9CZk7R7Gq d89vA35NcPYPYHQS6LwON3R0gpitRngCAEp+TqxOwyW2f5LQjBs4hKDdP8ptxc9yt/0qLq 3RTBtO3KHQ27oLBh0gh5cBYpfPYOWZFo0Ji+8npBs9QwZlCbWbEeu6Xynar4BNmTkflP2D i7M8xtCBTlYpjwRC5CjZCRn3+u3RKwpquY+kA3UiSHfFudh/f4A39bdP7dhKCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSyMs3Bz8zrF7; Wed, 16 Oct 2024 04:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49G4GfYE036303; Wed, 16 Oct 2024 04:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49G4GfSZ036300; Wed, 16 Oct 2024 04:16:41 GMT (envelope-from git) Date: Wed, 16 Oct 2024 04:16:41 GMT Message-Id: <202410160416.49G4GfSZ036300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 024b595495f2 - stable/13 - release.sh: Pass ARCH_FLAGS when setting VMSIZE 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 024b595495f240625ef2096efd6969084770855b Auto-Submitted: auto-generated The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=024b595495f240625ef2096efd6969084770855b commit 024b595495f240625ef2096efd6969084770855b Author: Colin Percival AuthorDate: 2024-07-06 17:15:22 +0000 Commit: Colin Percival CommitDate: 2024-10-16 04:16:18 +0000 release.sh: Pass ARCH_FLAGS when setting VMSIZE The default VM size may depend on the architecture. In particular, it is currently larged on riscv64 due to a toolchain issue which results in bloated binaries. MFC after: 3 days Fixes: 59c21ed6e811 "release: Bump default VM size for riscv64 to 6 GB" Sponsored by: Amazon (cherry picked from commit ed807f7bcaecbf32b0b81a7d18cee489a3666157) --- release/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/release.sh b/release/release.sh index c9d0203debd4..8e22af254d69 100755 --- a/release/release.sh +++ b/release/release.sh @@ -335,7 +335,7 @@ chroot_build_release() { fi if [ -z "${VMSIZE}" ]; then VMSIZE="$(eval chroot ${CHROOTDIR} \ - make -C /usr/src/release -V VMSIZE)" + make -C /usr/src/release ${ARCH_FLAGS} -V VMSIZE)" fi RELEASE_RMAKEFLAGS="${RELEASE_RMAKEFLAGS} \ VMFORMATS=\"${VMFORMATS}\" VMSIZE=${VMSIZE}" From nobody Wed Oct 16 05:18: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 4XSzlW6bxTz5ZW79 for ; Wed, 16 Oct 2024 05:18:47 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from sonic317-34.consmr.mail.ne1.yahoo.com (sonic317-34.consmr.mail.ne1.yahoo.com [66.163.184.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSzlW5C2sz4WSL for ; Wed, 16 Oct 2024 05:18:47 +0000 (UTC) (envelope-from pfg@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1729055925; bh=ZhJ1vQgpJq/N0RObTvO2mjyPgV2v2vUPBcrLXFOhFgY=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=LVTwPJ2ocS1bLpfy9g83Xu8fr7rZHvNyYBt2F4uvM0gDtlGm0HR9PchxUpK4C+e8bY8s0GEs3V/pQQU+AtvZW8uIe/ZFLWq4jxv1jx4qmYH/aQsR3Hm377zBWFl0fSE7Fc5w+7E7BUvzznEl7JNcToqInx3FezrFSxyOJr8W+zrOOU0WncFLhE5NOwtUFlIufQjNoOc/XxS+qwNYUYMFSddDUk9BITxdIWrUoadzO4p5eOYRa/FBqfwNGeAdFn+ezm4lLloI0727vEaQ8LxeAxyDWWAPI0U6tP0x6/961PGQ4ZSqVzyp1NlLtfPMqLX2f7upoFuu/ZwlX57sQFA+5g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1729055925; bh=RXmCcrrDkPDx0L2c5/IB33m7IXdDLYaJtoOlQbx2VYy=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=pPRwtKAZL+7OM7kBGgzHVDor6i8YDyfbadLvWXQLRA6BiFwU98M7dHPRn7B5BKvTor5iT75PMijAHJOE7K4qPkcEGE0YzpmF7c312pfSaEgKeEzaFr+VYtpN5dUCEP3duGV2MQIPyBWuhFF/WHOLU3YeK7wj9VY9JGpIyHUblGWxs2pr6rFKTgX5XcyWaGh7ejNVzQ8p26zeQuzSONVbkPrmSxjRcPzsvFJYHHJxpqlsHbxi47lncGnRh1V1yOwPxeBcf67bb5uGWn/dllZM7puyVi08wTM+4TNwacSlPeCsRjrB/IOYyBLr69eKEmevopPFmLXYbOHOBcHokMD0LQ== X-YMail-OSG: 8IfAQMkVM1mXyWPJ1gn76VHsulWiqOO8wi0qeiutSknrKejNfEiK4BXpevgIfy_ 0vEhlcE.QwWtKXSO9wp5R58TV3aoiLKjZ58Lq4uzhyRNB1SP0sTpCyJUB1_dZ8GlRSvZgaIJ4bJf X_0QcaJenPKsuVQORO31gAb0YyQXmQpwpu.E6diOKWArQtowmPRSr9B.E5CQAaAioYhqTjtF9_GF z3VGRWm6wO5Uj4a7kOIoa4KUmtckn5UawIxM8s4TYOa83m4tIjdY5bsZ4WPxoXe374ftzx6ZcaJa qfsnioeNk8Ck1NtHz9qbyfCvaYeU8Bjk0HMZqfgsfe.sxGeJcCwRViL0AHoY099mbjOqnxoJtdv0 W1bKPTTsZ_xZkcYP0qkwDwZ6hj8NeEm.oy.EtxdGmSRgoBdxPvwyGPn4.fkvhxSYB.pU_i8PZryN QOmxgmYWnID.o5DfehlB5.p7EQWha9X7sVNZf06NdNG_hgBKtOsqeOONu.GEUMhzcIaYO0Cf.VYv Owa_siebQ3B8W2hDcXwBagXqOpZ9OwgXmPPvgKMNtQZgOars1czbXzOglrHEF8VfAM.YpNGPEHSC K05pQeM_MjXg.gx2sDFrP0UrbkF.h4xxdsoTEeSRHjAog.ADU78RIAbZFuhP7KJa0_KUv6fOHkH1 xG9mPZJ0F3WVH17SG8azU9xeyY9UBa5u0d0Poc47NawzpZQMELgqrRKr0pFKQciGAq6ANIYEkuBb dRoYYPOiBJZ_lTEjIjV9xGs0hJ5hRVEVS8EQRMKwTmXkylCWSoyZkS5z.2Owm0nwIccIPAQMqgqc V6EgJFBbUxa.jMSq_x4qXalX._qFPNpvPvVo9KlLuH5TmT5lSCPHqT5oV33Q4xHPcx3WtZbesFUr QoRWHxXtgz3aRH2t7PO48FAN2V_Hbi4m081GxWHg2f4WZ1QrpoXFEFdZrIQ7kaf8E0NSBLvcihNd pywAUVv0.P8O7u5p1KBiMUzhZSK1mwEEIMUB58AhWoSbdurYksgxuNkxDDF1P8bSELB0qqeCfaGW akFbDvrIzG45_FE_BJmkByaBlF7ULozMrU5ahWzqyFnIgOHDpETcC.6X7vkQd4fEkv.fgB5kSbI_ bpAB2Xau1.Lqvi.KkHsp1TuK455Yf8j8M_lGPP_j9erz8U6vWAoMvCpHymkB95t4QOFmm0bronOX bVtZRjZV7Cf3LbV9kPxB8L2rIyEZCDtXA2LpkD10Lk.nINLpWJOXCC1oJ4Jx5o2EsRaWabHk6DDo OcMZLymg6QV_ksyGxj3zaw4GdhqhETcWwaggodl0I_9FcwGqlcvWMT6WHpAJkice6wve4KNY0tdK BeX6zqAoR7EQgt0SfmmKzDk2bVxdXMC..CDBazfyMwQQwONW1dBTcjynOmvW4vhgDtZ7jo._WXCD x04sH3Zt804wNWq0Io.JtXpUcEwYoSqqWAhaddmdDi9oFRraBTWvEwlEgVOG1h1LJ3QDSdY6DaBr O6XpSBUdVgwocQjGLucVz5Zg64T_pdaFPzOogCJmehJCYviC83tTa3nOynSkwHgsz5EL6fl7C0Ff .C7I1qkkI07NzW9vAXr0b2.CISPT0bEntVLTv3qC1JGjLg1bz8hIJRZqY_KubMAmQzLBia3I0_Wa .quANnqCU_EaXrg61OBpeElh2j_l37Ytd.6EuLyYVlwIZy0z67_5HQis2RtAGrJA.IGIIe4k8Iqf kbAoq52ibg_4rEXn2cFQXKJ_22h7RaHjiMxkPxMiclCZL9tfH9B7WJL8Da8_8HH1GDlJ5EgOXKrG nWy03nDdYyKYGte9IexjSjUaG_mb1yph7zTngygyWL9a3ThVYqKPa8ZKNg6rPXBPw_L2VwQIcbkY NgWozSpy1oKoFNUaJ1JXvHEDvetoWtlZxjuBrKgoLz4vMGP7Y7Rq7A7hjsZkanI4.1w81KtzWP6e nZ03zct5akVfrLc3Zj_oQjUYqVdv9NZZ3R_lMky.quEFI3Aresl80P1nJAQGxsTwYnqnACuCt7yT fw74dA6D_a4FkLTryromqDeiI.6MQQMX.7tE3epmWxgjEY3I_HWHDInWa7_KDWjq29522cpFQdZf J_SaywBUah3e0y3IMTfU0IHQ3oyiCGbtX4d78s3ngYwDJ3cdrYrPO.0MeTM2BbkN3R5ZTGpnOwRK jtNxGFIvfpwogm8Eu0m99zo08LrgIE2UyjVrGtHZFIvRZ2IOpWnRRBxevj08Pi1Zv17Sen3gHHzL eF.7UiJrfnw4ajOy4 X-Sonic-MF: X-Sonic-ID: dcca5fcf-a550-4118-ba46-7977c74c5da2 Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Wed, 16 Oct 2024 05:18:45 +0000 Date: Wed, 16 Oct 2024 05:18:42 +0000 (UTC) From: Pedro Giffuni To: "maxim@freebsd.org" Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-ID: <1108313894.2410377.1729055922813@mail.yahoo.com> In-Reply-To: <4c41b78e-b560-08ef-0070-017f21d4c8eb@maxim.int.ru> References: <202410160106.49G16qS7012339@gitrepo.freebsd.org> <4c41b78e-b560-08ef-0070-017f21d4c8eb@maxim.int.ru> Subject: Re: git: 80a5b26871e9 - main - sbin/ping: allow normal users to specify larger packets 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: multipart/alternative; boundary="----=_Part_2410376_1281775549.1729055922812" X-Mailer: WebService/1.1.22806 YMailNorrin X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US] X-Rspamd-Queue-Id: 4XSzlW5C2sz4WSL X-Spamd-Bar: ---- ------=_Part_2410376_1281775549.1729055922812 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi; Yes sorry .. I will be reverting the commit. Pedro. On Tuesday, October 15, 2024 at 09:43:00 PM GMT-5, = wrote: =20 =20 Hi Pedro, > index d9d544bc75c8..e6b1247af497 100644 > --- a/sbin/ping/ping.c > +++ b/sbin/ping/ping.c > @@ -96,8 +96,8 @@ >=C2=A0 #define=C2=A0=C2=A0=C2=A0 DEFDATALEN=C2=A0=C2=A0=C2=A0 56=C2=A0=C2= =A0=C2=A0 =C2=A0=C2=A0=C2=A0 /* default data length */ >=C2=A0 #define=C2=A0=C2=A0=C2=A0 FLOOD_BACKOFF=C2=A0=C2=A0=C2=A0 20000=C2= =A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 /* usecs to back off if F_FLOOD mode */ >=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2= =A0=C2=A0 =C2=A0=C2=A0=C2=A0 /* runs out of buffer space */ > -#define=C2=A0=C2=A0=C2=A0 MAXIPLEN=C2=A0=C2=A0=C2=A0 (sizeof(struct ip) = + MAX_IPOPTLEN) > -#define=C2=A0=C2=A0=C2=A0 MAXICMPLEN=C2=A0=C2=A0=C2=A0 (ICMP_ADVLENMIN += MAX_IPOPTLEN) > +#define=C2=A0=C2=A0=C2=A0 MAXIPLEN=C2=A0=C2=A0=C2=A0 ((int)sizeof(struct= ip) + MAX_IPOPTLEN) > +#define=C2=A0=C2=A0=C2=A0 MAXPAYLOAD=C2=A0=C2=A0=C2=A0 (IP_MAXPACKET - M= AXIPLEN - ICMP_MINLEN) This doesn't look right. Before: # ping -s 65507 -c 1 127.0.0.1 ING 127.0.0.1 (127.0.0.1): 65507 data bytes 65515 bytes from 127.0.0.1: icmp_seq=3D0 ttl=3D64 time=3D0.194 ms .. Now: # /usr/obj/usr/home/maxim/fbsd/src/amd64.amd64/sbin/ping/ping -s 65507 -c 1 127.0.0.1 ping: packet size too large: 65507 > 65467 Not sure if the tests catch this. Maxim --=20 Maxim Konovalov =20 ------=_Part_2410376_1281775549.1729055922812 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi;

Yes so= rry .. I will be reverting the commit.

Pedro.
<= br>
=20
=20
On Tuesday, October 15, 2024 at 09:43:00 PM GMT-5, = <maxim@freebsd.org> wrote:


=20 =20
Hi Pedro,


> index d9d544bc75c8..e6b1247af497 100644
> ---= a/sbin/ping/ping.c
> +++ b/sbin/ping/ping.c
> @@ -96,8 +96,8 @@
>  #define =    DEFDATALEN    56      =   /* default data length */
>  #define =    FLOOD_BACKOFF    20000     =    /* usecs to back off if F_FLOOD mode */
>=                 = ;      /* runs out of buffer space */
> -#define    MAXIPLEN    (sizeof(struct = ip) + MAX_IPOPTLEN)
> -#define    MAXIC= MPLEN    (ICMP_ADVLENMIN + MAX_IPOPTLEN)
&= gt; +#define    MAXIPLEN    ((int)sizeof(stru= ct ip) + MAX_IPOPTLEN)
> +#define    MA= XPAYLOAD    (IP_MAXPACKET - MAXIPLEN - ICMP_MINLEN)

This doesn't look right.

Before:

# ping -= s 65507 -c 1 127.0.0.1
ING 127.0.0.1 (127.0.0.1): 65507 d= ata bytes
65515 bytes from 127.0.0.1: icmp_seq=3D0 ttl=3D= 64 time=3D0.194 ms
..

Now:

# /usr/obj/usr/home/maxim/fbsd/= src/amd64.amd64/sbin/ping/ping -s 65507
-c 1 127.0.0.1ping: packet size too large: 65507 > 65467

Not sure if the tests catch this.

Maxim

--
Maxim Konovalov

------=_Part_2410376_1281775549.1729055922812-- From nobody Wed Oct 16 05:24:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSzsv0TYxz5ZWbg; Wed, 16 Oct 2024 05:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSzst74RFz4Z0Q; Wed, 16 Oct 2024 05:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729056259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3jGwcfIN18puJUDtry0FmQheCMziNgL/Phg4RU2qKGo=; b=ienRossI5naeORiKbdvvMnqWVWoeVcOuuFLheY9+h5+6aHnwom6JI/PoUmW45zDHxbGIPf OhpU+dVxrZiaBiQN3/5KT7LLgr9sxR3/mOs59npZmpJL76uJbyMq05oKGXO4vGFTY87/Q6 aFkRaZcOHu+mIA1HjzFIhfBhCB7B4qZQyRb0d3wYrfRtkByrKjpW6RjxQ0SjS2O34v+Q9W zuygok5+h+MsxDL7ap2MEUl+LcPSciqhuW7Ku9m1zWSuCmxxF16WW3PjCUSRuYUwi4t1ja KF+JE3DWS1x9OHL4CQkj3vZ5ooD1AD+lqr2QPozMKYm2tR29PAMYntTEnyYNLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729056259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3jGwcfIN18puJUDtry0FmQheCMziNgL/Phg4RU2qKGo=; b=FHbUZcUU5vfNKy9nRgEa/1UGxTb6QgXhzTW5coKpz1UHJxlTCUp4GzVuaHbhCdu+JbDH2y O6q+Egu5gtB3Rs6+2dkp1oNL0SXYRd9gLmB1XXUGf6bxuRLFapvc13Xo37POGIX26+ViBG R+YJE+A++KOidf9mqhsD+dRzpDecCL7bLXYhY8drrQwsZZ9bE9YVBy9TGfkh63nIDHX6Qb Uj0HuvY9omxxtfmwy9QKTZdAkFCSfhyZpR/ENeJo8U5Nwx4gj8ZTiY0/tjnUh8X/BJaeAz Idl7oT1LBxvEaFGZcDuXs89o8We9sVBh726Ls/1OcHE+DkEgKO6JP69HELjtQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729056259; a=rsa-sha256; cv=none; b=ZPY9y8OnbRtSQgP6xyiDJEQSGBmvvnf7Dk5MQmb2AL2k60OCBkanhFkNbW0C4qseLbdBR0 oJfYVmsF8vrvGjdeehlTn2dbgFNoiJet64fMWbkzWjFAALY+lGQ5uNWO1V3sFXpYzsBwKl sDd2mcSBZYhEKL/JpYmEjTOpGIgSidlInV1+Bb/JL5wFPRH2ZwliZlO0ipy4U44WsZ6aY7 R4xMwUTDQyQyuil8Lgybwx3tmqDF6aPnCNsUWZIl2p6NO/zkb1fqeQOnoS5H2VUN0KnAB/ D6vIXUWJjBFmwzqyQTGcHN3hDCSsUza84osOrs3j5KuzFlme+1nGFiJVSncOog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XSzst67cGzsdG; Wed, 16 Oct 2024 05:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49G5OICg056790; Wed, 16 Oct 2024 05:24:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49G5OIGr056787; Wed, 16 Oct 2024 05:24:18 GMT (envelope-from git) Date: Wed, 16 Oct 2024 05:24:18 GMT Message-Id: <202410160524.49G5OIGr056787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Pedro F. Giffuni" Subject: git: 7bc0cb91a2df - main - Revert "sbin/ping: allow normal users to specify larger packets" It is causing test failures. 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: pfg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bc0cb91a2dfc7e23d96efd0fb7866ee2a23ba88 Auto-Submitted: auto-generated The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=7bc0cb91a2dfc7e23d96efd0fb7866ee2a23ba88 commit 7bc0cb91a2dfc7e23d96efd0fb7866ee2a23ba88 Author: Pedro F. Giffuni AuthorDate: 2024-10-16 05:21:30 +0000 Commit: Pedro F. Giffuni CommitDate: 2024-10-16 05:23:58 +0000 Revert "sbin/ping: allow normal users to specify larger packets" It is causing test failures. This reverts commit 80a5b26871e90a0ad99d95bd129343471a7a36e3. --- sbin/ping/ping.8 | 3 ++- sbin/ping/ping.c | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sbin/ping/ping.8 b/sbin/ping/ping.8 index 951049d0f252..0eaec196e1e3 100644 --- a/sbin/ping/ping.8 +++ b/sbin/ping/ping.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2024 +.Dd September 15, 2023 .Dt PING 8 .Os .Sh NAME @@ -312,6 +312,7 @@ with the 8 bytes of ICMP header data. .Pp +For IPv4, only the super-user may specify values more than default. This option cannot be used with ping sweeps. .Pp For IPv6, you may need to specify diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index e6b1247af497..d9d544bc75c8 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -96,8 +96,8 @@ #define DEFDATALEN 56 /* default data length */ #define FLOOD_BACKOFF 20000 /* usecs to back off if F_FLOOD mode */ /* runs out of buffer space */ -#define MAXIPLEN ((int)sizeof(struct ip) + MAX_IPOPTLEN) -#define MAXPAYLOAD (IP_MAXPACKET - MAXIPLEN - ICMP_MINLEN) +#define MAXIPLEN (sizeof(struct ip) + MAX_IPOPTLEN) +#define MAXICMPLEN (ICMP_ADVLENMIN + MAX_IPOPTLEN) #define MAXWAIT 10000 /* max ms to wait for response */ #define MAXALARM (60 * 60) /* max seconds for alarm timeout */ #define MAXTOS 255 @@ -458,10 +458,11 @@ ping(int argc, char *const *argv) errx(EX_USAGE, "invalid packet size: `%s'", optarg); datalen = (int)ltmp; - if (datalen > MAXPAYLOAD) { - errx(EX_USAGE, + if (uid != 0 && datalen > DEFDATALEN) { + errno = EPERM; + err(EX_NOPERM, "packet size too large: %d > %u", - datalen, MAXPAYLOAD); + datalen, DEFDATALEN); } break; case 'T': /* multicast TTL */ From nobody Wed Oct 16 07:23: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 4XT2Wc3SxSz5ZcbC; Wed, 16 Oct 2024 07:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XT2Wc2fY6z4hrS; Wed, 16 Oct 2024 07:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729063420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7gFdcAB1FhPtmvgj3h1EazFr8xfsjKCIwSrJYEAF5fU=; b=rGvdfB/OapuALQzDTLSTa4d18EOheQwpfWgp43jqxDg99jt0niPASYgZMjT0bk0DwOvsVf xjjGbSO5L6yDML+heTzTrw3VdeVx+ejVTkvyjOOELf6Z/2LygBeKgdHC2xHpBknHF5De14 V4in7Ir43iWZpgIQ093K/JHZK6sHfKUzZHh6XpYl111eNQyDOASlH2RP5/wnCCgBsfZ01W KFz18koNaKs3WEMO9taCAc5FYixCe8dxDdMsBNVTVH1V6Lw8HNlvA/9byz1/E/XxyLteyv eNIH7g6rMffZ8BcdmOimx92CSkEkJUIxrsdOGnZ4b1lP/5r7GBFa4pwx4TJmMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729063420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7gFdcAB1FhPtmvgj3h1EazFr8xfsjKCIwSrJYEAF5fU=; b=xe1G/K9TfB4U83FItIwHWwVuyLvf39hdmB50iKgYlmwM5ua5AfsU/LTyQQckWgJNFXHMEz HGTyfEw5N5IeZ+EuulQNmy71yp669iZjbpeOonW+049u3TpjXS/uXcbJoQt5OkBuw8ve/C qCMxC7NX0r3R4TJ68qHXpH4P56eE3XjTkN+9b4wLCx0uzipgjR784TAUmj7SxjzIZ+MWRw 77cU8p6efdTTDW2ZB1Ta+Cwu8vc4sABtiF1Cn9pOXODZuvbD1wgz873fimnnYij2gBThmS OXYz31EoVD1fCc2aKEqlE39sh0/IuB4ppVdGQHIKQ3r+GBUiShlzdmhvc2W75A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729063420; a=rsa-sha256; cv=none; b=LF1k4BA+V9pyK+85PFc2+JEvzmj9jxFMwtfxrlGfeX/lv5H1d4bYkE4ugFkISrMd5wRxri XSNuRoO47Gsmmb1I1KK6k/4v25zmGWmle0coJUk7EyGavgPrK53AAbJ4H6MjMLECEnNHNa U0MzSfiWZ93ZNUkH5HIOykakgy6V1+q6eGnkjnBLkdQqnGci7sYeVLGlLvnIev/VVWLt5r N2BnzkRMmyQsUjA3i5fu/eCzcDdnVU4DsWKomED670W8t5EnMXRe9bp7ogR9jixP5F1whe 2zelFs3XWYzaT7NtHv9LZ+aO4i9d08eKc2LzaHyCCFoE/RBCNB2+LGptIJotmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XT2Wc2GFdzwL5; Wed, 16 Oct 2024 07:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49G7NeFC059997; Wed, 16 Oct 2024 07:23:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49G7NeGE059994; Wed, 16 Oct 2024 07:23:40 GMT (envelope-from git) Date: Wed, 16 Oct 2024 07:23:40 GMT Message-Id: <202410160723.49G7NeGE059994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Jeremy Subject: git: bf8d4cfe347b - main - eqos: Fix group address filtering. 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: peterj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf8d4cfe347b34a9ca21e2cdab5f9bba09be73bf Auto-Submitted: auto-generated The branch main has been updated by peterj: URL: https://cgit.FreeBSD.org/src/commit/?id=bf8d4cfe347b34a9ca21e2cdab5f9bba09be73bf commit bf8d4cfe347b34a9ca21e2cdab5f9bba09be73bf Author: Peter Jeremy AuthorDate: 2024-10-16 07:20:30 +0000 Commit: Peter Jeremy CommitDate: 2024-10-16 07:20:30 +0000 eqos: Fix group address filtering. The hash filter table order in the GMAC matches the order of the top bit of the hashed destination address. See the description of GMAC_MAC_Hash_table_Reg0 in RK3568 TRM part 2, section 20.4.2. PR: 282074 Reviewed by: manu MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D47115 --- sys/dev/eqos/if_eqos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/eqos/if_eqos.c b/sys/dev/eqos/if_eqos.c index 566f6ffd0a42..6f58c96a10b7 100644 --- a/sys/dev/eqos/if_eqos.c +++ b/sys/dev/eqos/if_eqos.c @@ -442,8 +442,8 @@ eqos_setup_rxfilter(struct eqos_softc *sc) WR4(sc, GMAC_MAC_ADDRESS0_LOW, val); /* Multicast hash filters */ - WR4(sc, GMAC_MAC_HASH_TABLE_REG0, hash[1]); - WR4(sc, GMAC_MAC_HASH_TABLE_REG1, hash[0]); + WR4(sc, GMAC_MAC_HASH_TABLE_REG0, hash[0]); + WR4(sc, GMAC_MAC_HASH_TABLE_REG1, hash[1]); /* Packet filter config */ WR4(sc, GMAC_MAC_PACKET_FILTER, pfil); From nobody Wed Oct 16 12:15: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 4XT9050fqcz5YQsG; Wed, 16 Oct 2024 12:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XT90506mWz4CcN; Wed, 16 Oct 2024 12:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729080917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hIyR8fMzdsnWBJIOzlgbi0G2zq33tnbaY6pabgwkOcU=; b=Baaid0Wnl8RQ2GNmY/5cq094rmqpoa53MYGhhAPhPKXF52H783pwZCCwcazW5rfoTafjAh peg5FWTskDZjyoG+LIXLfsiD73vS5UZ1CS6aW5qOiQeQCbUr3kIr4ujZ65bzybjJP4Zlzu HRvaFGqo3LwZCLwtcemaDgDTTC69hqgm5geUlb4bFfVwgvFaEFXcWjrRY4NEzNO5tlmg3D 3HreTzxvGVAz0/fRpdve1O1tY3ITDhbGRNTTj4yLQ2tRfmzIeMCVZRYNehJoGEcXHa0FEL ARy8W7S8HnYXQcTYiPlgHgzZcAk+k1ljFlhUWM2ZHEm7r9ctEXZAV0G8or3gWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729080917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hIyR8fMzdsnWBJIOzlgbi0G2zq33tnbaY6pabgwkOcU=; b=tYo9/D9Pit+9o/LM78kAWLQOghQat0ZItywOmtXvegd0EfxL3VcDU4NXQPzKNO60O1GaJn hZ/DX/BE0UQ4yZ/ft+wc33caa9BA+JUma58HGIJpvUmjKSuYrPrRwrxf8dFRNtJoihuYL/ IsRPBEU7T/Ei8nTUJO+7wkRK+Wg8tND4P6jXVV8s2wA7HrBuw24eU19lHYAaBZHQdvjEOu fHKaSUXVtV74y1gKQbz4h1UB8pAaxzBTvmFOOx5Vlv7unih1PJyPCWYsNebpH5p6YDmnma N0wf/q0rkv+f864XYxrWSuFtaed4P1JCVfrXAmmKsokVTSkFDWt61lLbiWG8Yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729080917; a=rsa-sha256; cv=none; b=xuAcCupgnHsGsyYoyIIHoOgz0XYSu0UWyEDYjvJZD5IlOPKxpZwsn3+cACsx0mC2uSeW29 Iap0Vga6selzFMo9Xc6E+sM7Xu3uTfD73YTUeZtq4hrvN49sfG5lZ596uVP4pi1gJwKsIl L8rFaBqQOkUOKLSUoppfN55zrCVfqYEs01sZv2D7v/ajAMtWYc9buH8f0ly9sxp6/7/pK2 tpamOCh9p4vj3FJtnGjG6w4yYur7ndrNUEpMnvqnwRhpFuPIxOAN0rQMAVnaeMN1X+ejTm Mlyr0fxyxTAVDxbp7WWm+q1gFO3FlNKpL0xlOHk+lMSgyUMNJ/Dxiv0cF0s5hQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XT9046jDPz14vj; Wed, 16 Oct 2024 12:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GCFGEQ053005; Wed, 16 Oct 2024 12:15:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GCFGb0053002; Wed, 16 Oct 2024 12:15:16 GMT (envelope-from git) Date: Wed, 16 Oct 2024 12:15:16 GMT Message-Id: <202410161215.49GCFGb0053002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 3f0d6925ef38 - stable/14 - membarrier.h: fix 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3f0d6925ef38d3cc8793a21e5045b9b96f2b7cee Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3f0d6925ef38d3cc8793a21e5045b9b96f2b7cee commit 3f0d6925ef38d3cc8793a21e5045b9b96f2b7cee Author: Ed Maste AuthorDate: 2024-10-06 17:21:49 +0000 Commit: Ed Maste CommitDate: 2024-10-16 12:15:04 +0000 membarrier.h: fix typo Sponsored by: The FreeBSD Foundation (cherry picked from commit 357185a966c10397c971ef23525943ebc47d58d9) --- sys/sys/membarrier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/membarrier.h b/sys/sys/membarrier.h index 958b769da23e..31a605634ddb 100644 --- a/sys/sys/membarrier.h +++ b/sys/sys/membarrier.h @@ -50,7 +50,7 @@ enum membarrier_cmd { /* * RSEQ constants are defined for source compatibility but are - * not yes supported, MEMBARRIER_CMD_QUERY does not return + * not yet supported, MEMBARRIER_CMD_QUERY does not return * them in the mask. */ MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ = 0x00000080, From nobody Wed Oct 16 12:16: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 4XT91P32Kkz5YRRs; Wed, 16 Oct 2024 12:16:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XT91P2SbNz4D7c; Wed, 16 Oct 2024 12:16:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729080985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YRo4IeHx4ThcXt0ow3pWF/up+TMIVQphYDw8WF2dJBM=; b=wTLyLGFTCn9gMPiKvPce9n9bCi71FD+FXD352ob2zON2vjb5V/z0NrkPBh13P+D8X0nrMf UMTL+sfRtgKF6/G8kd7EQDSdH37+2F1PAKHZ1BO/3wQQKSdme7NCCT0dG4n3XqJo0UM1ZG Oo2eem4sm/99p0FoB9VF19JqPvPbE0ruma++u/9Tf7zGtb/kQdbhEZYdF/6kIcVg6sf6/0 maNmRxMgT9HxfXEvpbNHBoC/PlfYKJUkJyn/PGEgTdidk6KPmVDuVv1atR8LMrr0VUo4Ef 9Wt8IsFBjWx49gIDNue++QW5porylnu9FN9wP3KpHaXqw49SjWke7sJbQdsRPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729080985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YRo4IeHx4ThcXt0ow3pWF/up+TMIVQphYDw8WF2dJBM=; b=K1w0ibvi5x96CuZcx0nmK2p592ShjnLMDMlfuNaekcGMj+LoLJ7EUdbeJcVHQXPO/FRDTz hNyvcoqWxAVZXuKOEf7YcGIUzAYOJCxC3fIAfiDh+c9AdmlrsmcjhkMFZ1p11N+DSSI15K UoNwquImC7hWJG72LTQqLvYIPdl4uHHL7fcPnthALUVGCd9RBY7U5qgEWmzXmuQdHfuaph EZdiO5Bi+f8/A07Hug9xwZXQ8yEKGLGg1CbJhv1eTg7II3g/I+RLTX3fIaeG0VSyJVYJvP A6AlPHbQU1lUG5ayhLqTm1p+PM2uaZnksYcrOsTIPw1OzgxA9xPwHxDbNcOvjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729080985; a=rsa-sha256; cv=none; b=GFil2E+Gz1DcRK371nURrw8rIUHMNe46rrH21KguV/sRp2JlWui+E33n2TWR7C79PDOjxM 2Q+hB8LFamrNaP/RaoFhrTN6r6sbQ/RDcxnpg0xwFfchCh+HAA3nngLc/vythv+xdz/9zx AhsRBkK4M7N2kw8Sf07a+ffa6i29JxyIFTrpmpyGtVumeY0O5ZcUK2qkooeGYHhysZ1jcH c1/lEF9ZAuYbd8D4QGSUmB/pilFJ7l6Rm9bMOCRcRx6u9lOkYPY4tCo86fk6Uqqb91glLD 52kchSOXEPS0jRYB5Gtnv0OLE8t+j/SCXwlGBY2TOy82WKrQgkdPFavtjcbIrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XT91P20Lmz15Bx; Wed, 16 Oct 2024 12:16:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GCGPPV053263; Wed, 16 Oct 2024 12:16:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GCGPvZ053260; Wed, 16 Oct 2024 12:16:25 GMT (envelope-from git) Date: Wed, 16 Oct 2024 12:16:25 GMT Message-Id: <202410161216.49GCGPvZ053260@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9cfc5a27742f - stable/13 - membarrier.h: fix 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9cfc5a27742f665738d37ea37af19b71dd55b133 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9cfc5a27742f665738d37ea37af19b71dd55b133 commit 9cfc5a27742f665738d37ea37af19b71dd55b133 Author: Ed Maste AuthorDate: 2024-10-06 17:21:49 +0000 Commit: Ed Maste CommitDate: 2024-10-16 12:16:07 +0000 membarrier.h: fix typo Sponsored by: The FreeBSD Foundation (cherry picked from commit 357185a966c10397c971ef23525943ebc47d58d9) (cherry picked from commit 3f0d6925ef38d3cc8793a21e5045b9b96f2b7cee) --- sys/sys/membarrier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/membarrier.h b/sys/sys/membarrier.h index 958b769da23e..31a605634ddb 100644 --- a/sys/sys/membarrier.h +++ b/sys/sys/membarrier.h @@ -50,7 +50,7 @@ enum membarrier_cmd { /* * RSEQ constants are defined for source compatibility but are - * not yes supported, MEMBARRIER_CMD_QUERY does not return + * not yet supported, MEMBARRIER_CMD_QUERY does not return * them in the mask. */ MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ = 0x00000080, From nobody Wed Oct 16 14: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 4XTCVz0kL6z5YZB0; Wed, 16 Oct 2024 14:08:43 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTCVz0Hp1z4Nyx; Wed, 16 Oct 2024 14:08:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729087723; 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=ITqBfJhC1I8XsPl7qfwCNxk7R65DGiTbfT6eWHKqJ04=; b=FaYK1ckymMoEpExsHxKGoPNr5Pv+NWiofcHI3B9c8wmKZ5eKsCZ7YkGvuykwsb7bUdS4Ql sTii+GPetgJ9zk0xA0BpVJoP6S38e9yJCrLo5j0mD08CsXgdvw+p/aw4+p1ePo4UH0g3Gk gfL/SHTNHduqC8ai5KvhsL9UUQ1pOsjWRNQqFgbVCoWZwBtqYivrIXTBwNBucvP9G9L5He YJ8HMibF8n1ix0Act6IJ5jgc9UybCxzAb/dtHdmh73zzBhQ1d5HTjTNBEjWR7sH9Yxk2a5 Baku491+NDKtvSPhaOFxLDdOQaO+KSlI/t3Jna7F7J4ZsIrPbwTw2AwUD7GzRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729087723; 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=ITqBfJhC1I8XsPl7qfwCNxk7R65DGiTbfT6eWHKqJ04=; b=vOwO9SUe9zGZG7Mxb/pwXZBlM60aLnIIjItDzBC9f58dU/sj6dRO1YwCutsmNgF/bDSoeF YlGFgo2FeAfbA1Km1a2yY4D3gIeGY12gF9zxIkfOG2kWOGdX0m+cq4iMvAuT76pRqibIAv IUC35Eup1oOXrtIaGPHt0jG9nWqdd60SBxcm3AL1hO3srnFSP14gaqSc8bMowUIlja9zrj EZXLA5PssPfXxaCl3lI5IyiP1EdocxKonJxZyMhekO/S0tLmsXdTpgvMvTZJuShWcqVcyy Ldh5WliCzp8Lh7Xt0347ztmm1saPUUuDSjbB09Waagq0V+d6i0oxF1/ucjE6Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729087723; a=rsa-sha256; cv=none; b=ucN630iLzZTlaLVSgGrg5vZqJOjDXJiu1v36OXOjWb4wjFmmNGpC59EOBTvs8VVNp4yIH6 X5H5GelgW9G8hc1NRWALu6TBcVb2naXrExzj5mW5/9Ekbs25tuhenD0243KdZdB5KCH+VM VV3yTeOKaBlLLJUzfYcwqfjmy8zjHhF8viLafgScY33PXUeNTaBAuJqfqN33SqgOtNZXXi kQeE+A9ScxSypU5WWIGJogdCJYQMTuL7WL2yjsgoVeUzJDEC5yn6kNU494ajMyYErYVb+V k+DdjiOr7Umpyzgd3ZPOUKF+v7xQIdz2lfQDeDCL0FHTa3nzwe27pYNPBLEhzg== Received: from [IPV6:2601:5c0:4200:b830:6065:7bd2:5db8:bc5f] (unknown [IPv6:2601:5c0:4200:b830:6065:7bd2:5db8:bc5f]) (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 4XTCVy4wXFz1RXk; Wed, 16 Oct 2024 14:08:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Wed, 16 Oct 2024 10:08:41 -0400 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: 542f5d56317e - main - igc: Rename 'struct adapter' to 'struct igc_softc' To: Kevin Bowling , Gleb Smirnoff Cc: Kevin Bowling , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202410141353.49EDroZg024524@gitrepo.freebsd.org> Content-Language: en-US From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/15/24 14:48, Kevin Bowling wrote: > On Tue, Oct 15, 2024 at 11:32 AM Gleb Smirnoff wrote: >> >> Kevin, >> >> On Mon, Oct 14, 2024 at 01:53:50PM +0000, Kevin Bowling wrote: >> K> commit 542f5d56317e94676cf19cb9d66207bf9a6b6758 >> K> Author: Kevin Bowling >> K> AuthorDate: 2024-10-14 13:29:55 +0000 >> K> Commit: Kevin Bowling >> K> CommitDate: 2024-10-14 13:52:31 +0000 >> K> >> K> igc: Rename 'struct adapter' to 'struct igc_softc' >> K> >> K> Rename the 'struct adapter' to 'struct igc_softc' to avoid type >> K> ambiguity in things like kgdb and make sharing code with e1000 and >> K> ixgbe easier. >> >> You gonna like these two :) >> >> eb0ec0898261dbc58c328c818adcd8e8fe66bf17 >> 219de4f9d87bbac127ef370ab702e54b7f8d4522 > > Ha! Well the change stuck to e1000 and ixgbe through the oldest > supported branches so I guess we are safe this time around. I still appreciate the change as cxgbe is stuck with 'struct adapter' since it's used in code shared with the Linux chelsio driver (so can't easily be renamed) so disambiguating is helpful regardless. -- John Baldwin From nobody Wed Oct 16 14:32:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTD1v3xNSz5YbQM; Wed, 16 Oct 2024 14:32:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTD1v3Sjpz4Rqp; Wed, 16 Oct 2024 14:32:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GgDGzcFyPvM2WE+onfaKQYV85Sd97CfvTkQsk+nmZKA=; b=Fq7l3l7hQ3pgjTs2+8Fw1oHI0I2mdUAIVvm8TgnZRRIcC3cvG+xvcWwT08cOe25kGOXtQ8 OPLBlmYdY0dBP6hzNgVWrK99ngX859DOuSvvA9hyLU5hN8EIjbHnh5CqRB/gdkUvkydECn t0euQxB6ixNAaM+cE41Nu/WT5UEF3yZqTIGlI12a2onCFyViWZ94ReBDCTOlMKRf8B7NF9 pJWm7FiernGzBh8/K6YXkGjH5yDVDKEIxP0zJFT3D7hZ8nYFega/oPb6EE/pXswPhF7V0F MSX6gru0u87guseB6E08McGWUGdeSnc47Q2yAaSfC9CC+IcWwXchr3xhoGfrPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GgDGzcFyPvM2WE+onfaKQYV85Sd97CfvTkQsk+nmZKA=; b=dZwotaZIzLUNAHAI4J5VlqhsHiYoi2vXTZ9Reh/ULjL815mloK1h+FeuqBRkWT5ruXY4Pn pQ90xpfodvb2tHWWIZD+11/04LFT+adaK6UWpcyB/wMIePQLqo6Zgc0OHJyxD4LEPM/n4s f/yTXKz4AJtSV0JQ6EtO3SX5L6LiIqRQLd+YmGKgYoente66b75JIw/qdq3f5sUcVwyJog 4RGkK9pvsiL32FTq5p2RLu7g91C84KcccPtHrGbn3otmlqeysYm/3WNcuzvB9F2SnDzmzq e16oPirvwrCZw4wjfhIzAMCM0kJMu7/3v3GbUVNfk07Wh5IeC3xOsZrgwJ2m+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729089123; a=rsa-sha256; cv=none; b=Od1+f/Ykj7GB6w84UwVyW8bLH0PJAYA+BQS8CKPIlTIEC3Nl/F3BdHnRKeV0N49bLhRdPg XtBED4C2vCT8LN2icZtp0Dq+l6/1tl72fEROKf4p1vh32l+2woBB5YbXpcc3IJC1u5IS1/ G/eSQrkODnuvmIk2jqFT54MbMh1/DyQSrq7VsUCVbTB8QN5Ap8cexh4g111WdlpDUuFXhK 34cQ9GO9BSoZIQn7OouSXsp+ZWyqnhwM2YEd22KYmbBeVJJMISe+SxRaNFBvw0BYR2Dt0F /p/y7Wd0EUh/tpHaAaOFJDDDtnwWR2x42mCYPi5AE01D09e5/h7EtNdJBdzRzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTD1v331Gz18fp; Wed, 16 Oct 2024 14:32:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GEW3a3089571; Wed, 16 Oct 2024 14:32:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GEW3L4089568; Wed, 16 Oct 2024 14:32:03 GMT (envelope-from git) Date: Wed, 16 Oct 2024 14:32:03 GMT Message-Id: <202410161432.49GEW3L4089568@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: b57229a80465 - stable/14 - mps/mpr: Add workaround for firmware not responding to IOC_FACTS or IOC_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/stable/14 X-Git-Reftype: branch X-Git-Commit: b57229a80465b390a31fb30b3127c4cb93d8987f Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b57229a80465b390a31fb30b3127c4cb93d8987f commit b57229a80465b390a31fb30b3127c4cb93d8987f Author: prateek sethi AuthorDate: 2024-10-13 18:38:54 +0000 Commit: Warner Losh CommitDate: 2024-10-16 14:19:21 +0000 mps/mpr: Add workaround for firmware not responding to IOC_FACTS or IOC_INIT Sometimes, especially with older firmware, mps(4) would have trouble initializing the card in one of these two steps. Add in a retry after a short delay. Sean Bruno and Stephen McConnell thought this was OK in the bug discussions, but never committed it. Steve indicated the delay might not be necessary, but the OP clearly needed to make it longer to make things work. I've kept the delay, and added the suggested comment. Ported the iocfacts part to mpr as well, since we see similar errors about once every month or two over a few thousand controllers at work. We've not seen it with IOC_INIT as far back as I can query the error log database, so I didn't port that forward. We'll see if this helps, but won't know for sure until next year (so I'm committing it now since it won't hurt and might help). We usually see this failure in connection with complicated recovery operations with a drive that's failing, though, at least in the last year's worth of failures. It's not clear this is the same as OP or not. PR: 212841 Sponsored by: Netflix Co-authored-by: imp (cherry picked from commit c0e0e530ced057502f51d7a6086857305e08fae0) --- sys/dev/mpr/mpr.c | 23 ++++++++++++++++++----- sys/dev/mps/mps.c | 38 ++++++++++++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index d5c02f9608ca..d1c572e40669 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -1195,7 +1195,7 @@ mpr_get_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) { MPI2_DEFAULT_REPLY *reply; MPI2_IOC_FACTS_REQUEST request; - int error, req_sz, reply_sz; + int error, req_sz, reply_sz, retry = 0; MPR_FUNCTRACE(sc); mpr_dprint(sc, MPR_INIT, "%s entered\n", __func__); @@ -1204,13 +1204,26 @@ mpr_get_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) reply_sz = sizeof(MPI2_IOC_FACTS_REPLY); reply = (MPI2_DEFAULT_REPLY *)facts; + /* + * Retry sending the initialization sequence. Sometimes, especially with + * older firmware, the initialization process fails. Retrying allows the + * error to clear in the firmware. + */ bzero(&request, req_sz); request.Function = MPI2_FUNCTION_IOC_FACTS; - error = mpr_request_sync(sc, &request, reply, req_sz, reply_sz, 5); - - adjust_iocfacts_endianness(facts); - mpr_dprint(sc, MPR_TRACE, "facts->IOCCapabilities 0x%x\n", facts->IOCCapabilities); + while (retry < 5) { + error = mpr_request_sync(sc, &request, reply, req_sz, reply_sz, 5); + if (error == 0) + break; + mpr_dprint(sc, MPR_FAULT, "%s failed retry %d\n", __func__, retry); + DELAY(1000); + retry++; + } + if (error == 0) { + adjust_iocfacts_endianness(facts); + mpr_dprint(sc, MPR_TRACE, "facts->IOCCapabilities 0x%x\n", facts->IOCCapabilities); + } mpr_dprint(sc, MPR_INIT, "%s exit, error= %d\n", __func__, error); return (error); } diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index adad2450a3d4..9dfa0471ac0a 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -1127,7 +1127,7 @@ mps_get_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) { MPI2_DEFAULT_REPLY *reply; MPI2_IOC_FACTS_REQUEST request; - int error, req_sz, reply_sz; + int error, req_sz, reply_sz, retry = 0; MPS_FUNCTRACE(sc); mps_dprint(sc, MPS_INIT, "%s entered\n", __func__); @@ -1136,10 +1136,21 @@ mps_get_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) reply_sz = sizeof(MPI2_IOC_FACTS_REPLY); reply = (MPI2_DEFAULT_REPLY *)facts; + /* + * Retry sending the initialization sequence. Sometimes, especially with + * older firmware, the initialization process fails. Retrying allows the + * error to clear in the firmware. + */ bzero(&request, req_sz); request.Function = MPI2_FUNCTION_IOC_FACTS; - error = mps_request_sync(sc, &request, reply, req_sz, reply_sz, 5); - mps_dprint(sc, MPS_INIT, "%s exit error= %d\n", __func__, error); + while (retry < 5) { + error = mps_request_sync(sc, &request, reply, req_sz, reply_sz, 5); + if (error == 0) + break; + mps_dprint(sc, MPS_FAULT, "%s failed retry %d\n", __func__, retry); + DELAY(1000); + retry++; + } return (error); } @@ -1149,7 +1160,7 @@ mps_send_iocinit(struct mps_softc *sc) { MPI2_IOC_INIT_REQUEST init; MPI2_DEFAULT_REPLY reply; - int req_sz, reply_sz, error; + int req_sz, reply_sz, error, retry = 0; struct timeval now; uint64_t time_in_msec; @@ -1193,10 +1204,21 @@ mps_send_iocinit(struct mps_softc *sc) time_in_msec = (now.tv_sec * 1000 + now.tv_usec/1000); init.TimeStamp.High = htole32((time_in_msec >> 32) & 0xFFFFFFFF); init.TimeStamp.Low = htole32(time_in_msec & 0xFFFFFFFF); - - error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); - if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) - error = ENXIO; + /* + * Retry sending the initialization sequence. Sometimes, especially with + * older firmware, the initialization process fails. Retrying allows the + * error to clear in the firmware. + */ + while (retry < 5) { + error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); + if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) + error = ENXIO; + if (error == 0) + break; + mps_dprint(sc, MPS_FAULT, "%s failed retry %d\n", __func__, retry); + DELAY(1000); + retry++; + } mps_dprint(sc, MPS_INIT, "IOCInit status= 0x%x\n", reply.IOCStatus); mps_dprint(sc, MPS_INIT, "%s exit\n", __func__); From nobody Wed Oct 16 14:32: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 4XTD1x0P6qz5Yb60; Wed, 16 Oct 2024 14:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTD1w5SC2z4Rcb; Wed, 16 Oct 2024 14:32:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k2Af6E+q6S/KytSmEtRqpUPTTws9PyCAJ0mejUkiZ8g=; b=o822jgxG8isNmFRledo+23pVbdQhMEKcA30jiQ02rGLRDLP0kfzkRtTjGF16/ZMBVSF51C qEj2E3BujDNLxQnRwrTStoOh0F2aMFreQcMomI1IovF4WlQLMXO/zCWzKDUI8JkrI2+Whu mdWPJ6wRLZWnR4JgDbsWOJ9mZu2EvBEFqFASr+0wshtq84WM7TebsBWJhtwHI5bD7JFqJW dvyoDO5gjZVKcfkt06kQovLGqGIWD+XJGcAvCF3rHYSJtogUQLjCwvyJxPVYH04c9ZK1CT CWhxulU7tpf0J+tAIcMBenC80sgBZrEtIqAqia3qDc25y3j3dVBDskybyeyF5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k2Af6E+q6S/KytSmEtRqpUPTTws9PyCAJ0mejUkiZ8g=; b=htl82ddoem1M+j419g4ZcoiAarRXKOR6xd/SY45KmzooDChBULZrU0dXx1eK2kFjk8Slrw d52qDr9g4VcUIaEXGRrbZOX7ZrlrnpghNlAGhw3lkBO7w0D9F4GuZmb1XCVHqKerFn6JKR 1H16URupLRBUFO1tBFQdiSrN0Ugk2ZzckqZRWc/7OF70/BNjsrJEx7pgH8xDxsPzjdPe0D 4C2SgmimE19zdkP80a7w4ssL1KVcLSjpJhjlasCArd66Z5MQNwummLs6DzfR0JCI2/ANP7 1CQ+VzOUAuFTq1dN5i0W+NDHq9KDwwGdxXyU4/oLXtOS/bzk+ysNiL2eP9rzRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729089124; a=rsa-sha256; cv=none; b=DrmogBpkXhrGKIh4w+i7sab/eA2Aw/XqmwCGw3lbPwzKIgBiYBq9Q9z6cWViaNevjaioH7 0yVMINSxKcVVQe/8crJYL1Z9JGmOAHKrzl8zMlMDnKGLJvZMrG3wUDOfBji11VSYpBmm6i VEIkSLVoNUq+yZ9kxkIRpSYICsh/4b+6Ec/2jw2EQCQMhX5H3NBpA2u8Bt2vhAOKLAJc9z zMdiKYVKdXa77UnhveAnxHu3Omelj7LAAi9bLQSAc38Y7lf9/QipeJgBD58fo3X7gQ8jRz 9sXrI3mnEzokO/ZDHpaUZGobmtD2ngxZPUmgwHQViswknBSMiMoPRYVbEfAB5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTD1w40W1z18Pv; Wed, 16 Oct 2024 14:32:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GEW4gR089608; Wed, 16 Oct 2024 14:32:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GEW4Q5089605; Wed, 16 Oct 2024 14:32:04 GMT (envelope-from git) Date: Wed, 16 Oct 2024 14:32:04 GMT Message-Id: <202410161432.49GEW4Q5089605@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: dfd6b1ee5b83 - stable/14 - subr_firmware: Sort includes 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: dfd6b1ee5b83f8616b8538a63f493558cf3477ba Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dfd6b1ee5b83f8616b8538a63f493558cf3477ba commit dfd6b1ee5b83f8616b8538a63f493558cf3477ba Author: Warner Losh AuthorDate: 2024-02-05 03:12:37 +0000 Commit: Warner Losh CommitDate: 2024-10-16 14:19:21 +0000 subr_firmware: Sort includes Sponsored by: Netflix (cherry picked from commit 4b62b42a8dbd3be7c5e9e107fbba2c9adfa49673) --- sys/kern/subr_firmware.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c index 00b084bd0a07..6947bcb110e4 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -28,20 +28,20 @@ #include #include +#include +#include +#include #include -#include -#include -#include -#include +#include #include +#include +#include #include -#include -#include -#include #include #include -#include -#include +#include +#include +#include #include #include From nobody Wed Oct 16 14:32:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTD1y0ZK7z5Yb3H; Wed, 16 Oct 2024 14:32:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTD1x6B0Sz4RKg; Wed, 16 Oct 2024 14:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V+6b7ARLGLYLedIXChYsNzUpfp2sOD1FZuAInOKiSpI=; b=sPVJD232vffaeWh90XTbe1WdAtb5tdPxUnzewWXJZSfGjMRSYFBNXQjm+nWJf48KHZD/gB CvT7UhXCh+x0BEo9tRhcG3oQIeDC/YyT6Ai6MNNZUyojbw9UJTu0Ycdx/4Wou8aJwAWTb4 k0IF249Cwh/GQ6VIw1Jr71tNtfh5lOMHZG18apqJe5I+7P+07gbGfbKC1EhGlkYIRF8JKF UB15B1zaopk8yk6x2cmpXAPvR3t6GleqlqqJifLUvhQpmJnom5gnS4CDANIrC4ITG+X2OH LWJplmxaOC8lR2ybNnnXNmftmBn//+Ywr9K2YM18iJzvouusWtSNnYrnEqyPjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V+6b7ARLGLYLedIXChYsNzUpfp2sOD1FZuAInOKiSpI=; b=srYHGGBcgcI7MDLxiZWnOPdQS3uk6vbLtQjHr+A3gFwXclonUUUFIfbNEyIrHrOcqmRv9M 0yj9dBoryizmIR0HlTFwUwFRS9Zncjuba/ynIIgZYPkOvLyCpq9he4o6orxEDW2DFjTElO Vi3kGSfTdrJ3K1SkheFrQpVCaftcud/ETSFgCV7mDRxRVEaiR4YkiPszek+BY8JZGSa3MM FDe8SxdwPmyJtzVKkG2axW9Q9WiBP2KLed/qW/0E8I+uLJxiy2unubVwU+CxRUsrOwxKNc tMcZPkFd0+BEkryaNKYUflV3RMUuH/bieZOrhPj+2rBnq6MDmI9B+R7QPsi37w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729089125; a=rsa-sha256; cv=none; b=YanM1dazo8Kzffz2HeQsa+rtClVJ4A7clqJl+x3x3MbSwjWNUKNI0COulr9z8+dWDpOwni qUxfGpXa1B0OyNSM3od6Wo+yxAwkC62dPtJNHvi7kh0+qzMYdcaHJzw8FbrQOfPLnpZ2Ag 4TvscxqVv9I1vQtw2mDLkIMS1vzH1PPKNoCi57a08Tu1UvRej13WgtCIX1NzeiT5Ta1ll7 3U77JiJBcyavff5/d7GFbvHL1XlvCFbWjQ6YVPqTUv8LmW3931bZmr2Wts8R+AMM9fi29+ ugNgk7mbcSnvpFkc7peH5akTeA7b1BpMDMxk3Ie8D3tVKBXOCjVdwka5yadJPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTD1x51FKz187l; Wed, 16 Oct 2024 14:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GEW5Ns089650; Wed, 16 Oct 2024 14:32:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GEW5JC089647; Wed, 16 Oct 2024 14:32:05 GMT (envelope-from git) Date: Wed, 16 Oct 2024 14:32:05 GMT Message-Id: <202410161432.49GEW5JC089647@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: 2ca7b03d6275 - stable/14 - firmware: load binary firmware files 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: 2ca7b03d62750bc29d35b4b58dadf7f7a9520a01 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2ca7b03d62750bc29d35b4b58dadf7f7a9520a01 commit 2ca7b03d62750bc29d35b4b58dadf7f7a9520a01 Author: Warner Losh AuthorDate: 2024-02-29 16:36:20 +0000 Commit: Warner Losh CommitDate: 2024-10-16 14:19:21 +0000 firmware: load binary firmware files When we can't find a .ko module to satisfy the firmware request, try harder by looking for a file to read in directly. We compose this file's name by appending the imagename parameter to the firmware path (currently hard-wired to be /boot/firmware, future plans are for a path). Allow this file to be unloaded when firmware_put() releases the last reference, but we don't need to do the indirection and dance we need to do when unloading the .ko that will unregister the firmware. Sponsored by: Netflix Reviewed by: manu, jhb Differential Revision: https://reviews.freebsd.org/D43555 (cherry picked from commit c7b1e980ae16c094e64f318ad2feb98e17bd8f2f) --- sys/kern/subr_firmware.c | 122 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 114 insertions(+), 8 deletions(-) diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c index 6947bcb110e4..138eb6a7fcd8 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -37,9 +38,12 @@ #include #include #include +#include #include #include #include +#include +#include #include #include @@ -86,8 +90,9 @@ struct priv_fw { */ struct priv_fw *parent; - int flags; /* record FIRMWARE_UNLOAD requests */ -#define FW_UNLOAD 0x100 + int flags; +#define FW_BINARY 0x080 /* Firmware directly loaded, file == NULL */ +#define FW_UNLOAD 0x100 /* record FIRMWARE_UNLOAD requests */ /* * 'file' is private info managed by the autoload/unload code. @@ -121,7 +126,8 @@ static LIST_HEAD(, priv_fw) firmware_table; /* * Firmware module operations are handled in a separate task as they - * might sleep and they require directory context to do i/o. + * might sleep and they require directory context to do i/o. We also + * use this when loading binaries directly. */ static struct taskqueue *firmware_tq; static struct task firmware_unload_task; @@ -134,6 +140,11 @@ MTX_SYSINIT(firmware, &firmware_mtx, "firmware table", MTX_DEF); static MALLOC_DEFINE(M_FIRMWARE, "firmware", "device firmware images"); +static uint64_t firmware_max_size = 8u << 20; /* Default to 8MB cap */ +SYSCTL_U64(_debug, OID_AUTO, firmware_max_size, + CTLFLAG_RWTUN, &firmware_max_size, 0, + "Max size permitted for a firmware file."); + /* * Helper function to lookup a name. * As a side effect, it sets the pointer to a free slot, if any. @@ -241,6 +252,85 @@ struct fw_loadimage { uint32_t flags; }; +static const char *fw_path = "/boot/firmware/"; + +static void +try_binary_file(const char *imagename, uint32_t flags) +{ + struct nameidata nd; + struct thread *td = curthread; + struct ucred *cred = td ? td->td_ucred : NULL; + struct sbuf *sb; + struct priv_fw *fp; + const char *fn; + struct vattr vattr; + void *data = NULL; + const struct firmware *fw; + int flags; + size_t resid; + int error; + bool warn = flags & FIRMWARE_GET_NOWARN; + + /* + * XXX TODO: Loop over some path instead of a single element path. + * and fetch this path from the 'firmware_path' kenv the loader sets. + */ + sb = sbuf_new_auto(); + sbuf_printf(sb, "%s%s", fw_path, imagename); + sbuf_finish(sb); + fn = sbuf_data(sb); + if (bootverbose) + printf("Trying to load binary firmware from %s\n", fn); + + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, fn); + flags = FREAD; + error = vn_open(&nd, &flags, 0, NULL); + if (error) + goto err; + NDFREE_PNBUF(&nd); + if (nd.ni_vp->v_type != VREG) + goto err2; + error = VOP_GETATTR(nd.ni_vp, &vattr, cred); + if (error) + goto err2; + + /* + * Limit this to something sane, 8MB by default. + */ + if (vattr.va_size > firmware_max_size) { + printf("Firmware %s is too big: %ld bytes, %ld bytes max.\n", + fn, vattr.va_size, firmware_max_size); + goto err2; + } + data = malloc(vattr.va_size, M_FIRMWARE, M_WAITOK); + error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)data, vattr.va_size, 0, + UIO_SYSSPACE, IO_NODELOCKED, cred, NOCRED, &resid, td); + /* XXX make data read only? */ + VOP_UNLOCK(nd.ni_vp); + vn_close(nd.ni_vp, FREAD, cred, td); + nd.ni_vp = NULL; + if (error != 0 || resid != 0) + goto err; + fw = firmware_register(fn, data, vattr.va_size, 0, NULL); + if (fw == NULL) + goto err; + fp = PRIV_FW(fw); + fp->flags |= FW_BINARY; + if (bootverbose) + printf("%s: Loaded binary firmware using %s\n", imagename, fn); + sbuf_delete(sb); + return; + +err2: /* cleanup in vn_open through vn_close */ + VOP_UNLOCK(nd.ni_vp); + vn_close(nd.ni_vp, FREAD, cred, td); +err: + free(data, M_FIRMWARE); + if (bootverbose || warn) + printf("%s: could not load binary firmware %s either\n", imagename, fn); + sbuf_delete(sb); +} + static void loadimage(void *arg, int npending __unused) { @@ -254,6 +344,7 @@ loadimage(void *arg, int npending __unused) if (bootverbose || (fwli->flags & FIRMWARE_GET_NOWARN) == 0) printf("%s: could not load firmware image, error %d\n", fwli->imagename, error); + try_binary_file(fwli->imagename, fwli->flags); mtx_lock(&firmware_mtx); goto done; } @@ -409,17 +500,32 @@ EVENTHANDLER_DEFINE(mountroot, firmware_mountroot, NULL, 0); static void unloadentry(void *unused1, int unused2) { - struct priv_fw *fp; + struct priv_fw *fp, *tmp; mtx_lock(&firmware_mtx); restart: - LIST_FOREACH(fp, &firmware_table, link) { - if (fp->file == NULL || fp->refcnt != 0 || - (fp->flags & FW_UNLOAD) == 0) + LIST_FOREACH_SAFE(fp, &firmware_table, link, tmp) { + if (((fp->flags & FW_BINARY) == 0 && fp->file == NULL) || + fp->refcnt != 0 || (fp->flags & FW_UNLOAD) == 0) + continue; + + /* + * If we directly loaded the firmware, then we just need to + * remove the entry from the list and free the entry and go to + * the next one. There's no need for the indirection of the kld + * module case, we free memory and go to the next one. + */ + if ((fp->flags & FW_BINARY) != 0) { + LIST_REMOVE(fp, link); + free(__DECONST(char *, fp->fw.data), M_FIRMWARE); + free(__DECONST(char *, fp->fw.name), M_FIRMWARE); + free(fp, M_FIRMWARE); continue; + } /* - * Found an entry. Now: + * Found an entry. This is the kld case, so we have a more + * complex dance. Now: * 1. make sure we scan the table again * 2. clear FW_UNLOAD so we don't try this entry again. * 3. release the lock while trying to unload the module. From nobody Wed Oct 16 14:32:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTD1z0RNwz5YbcH; Wed, 16 Oct 2024 14:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTD1y6KQwz4Rch; Wed, 16 Oct 2024 14:32:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvVesz/kp6DO+yz24j2LIZRhvxir/hhwIq3xF5w1lX8=; b=ndQPhcNkjBUY03uPpxn1iB65i9wQJYRxXIAwvPJuuj42WXk10xo2zauge9veAE7z8M/Z0V KzFkpfuWmaWI2xC1yCh+5HejHJkJ01c2NiF+mBJz3L+y82jrnQcAJ4dFs1Y2sFw4FcbLgH P929/GNLucPP7uZIySMzBQFW8PScRXKz4ScgSrSu2duDyXFLOZlMfBvn4thmOMVQVbLVfm YPItdRYDWzQuMZsQ5gWCf/wAsHBl5Bu9PnzUlfRe/jlbcPGX0INRDabBWfCQLmX885n8Ip uH10KoAP6my4jId/zoycFS0min4ZJJGm/QUVAUIZhlrjjWCoUiOcea5fZiy+oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvVesz/kp6DO+yz24j2LIZRhvxir/hhwIq3xF5w1lX8=; b=N7KRsAPR6vDE1nEqOpvEqyrQjpsp/s3V47Pq5DB8Xln775+CQJe3UZ/+ZNlKCHYNrbpD7b YibPujrRymJVGPer4L+RG9Mm6pCx5GaWNAOYI89XNElhueQaipNiwNGOcbofrge6/rjRFy 1YjeMiGhWDiLTLRY3exujUjVZpKkttoSMgBsfD7U1p75zCSpqfaoN3pmNvVeAlWr6f8hSn e6qHFdKvYhWGpOduJmpR2scafiv9Ip1L6YNQJtdH5d2wJNQHHnK+d6OkI+4gaaTMBnYTq0 6xoqNpnavkuYkWKJ2tu/MdbPjtsjcYWUuDLFdCtvULz904ppquT+n9BHWXQM7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729089126; a=rsa-sha256; cv=none; b=Hf+DhwKtatTYQGHw3RN5AKGrbmNZ5XInuRATuaAbtQU2PiZ57iBbcWHEG8g0hs0bvaviom WaLXSKfQfc4gp/0jZAtzo0qPpKdIPaR/71KvhKhS9TKAGAg+QcKSDtRcV03MADyMyLFg6q yO+FNcm/cwiq2AG35l5pZFcmsvLasPVIB3S9PoxX5/LfjuUc8mk1QT00Z+j5RiKgBxLSmv 4yICPTphijI1VbKV0q1AOKoF67Q0+owiN4gvZgXZrG3v12vFrbeWq4348xF+5OyqcLwMOj WoBvDCSTHEhu5O6FqwkAU3+j7Au4bPQYzT4DN5QqZwDh5N4dlaKka7aO6tH7Mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTD1y5Ymqz18Pw; Wed, 16 Oct 2024 14:32:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GEW6WM089714; Wed, 16 Oct 2024 14:32:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GEW6Su089711; Wed, 16 Oct 2024 14:32:06 GMT (envelope-from git) Date: Wed, 16 Oct 2024 14:32:06 GMT Message-Id: <202410161432.49GEW6Su089711@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: 903ddc7f14bc - stable/14 - firmware: Allow binary files to be loaded by /boot/loader 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: 903ddc7f14bc2f9977cec22e3f9f2f6c510b9538 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=903ddc7f14bc2f9977cec22e3f9f2f6c510b9538 commit 903ddc7f14bc2f9977cec22e3f9f2f6c510b9538 Author: Warner Losh AuthorDate: 2024-02-29 16:36:31 +0000 Commit: Warner Losh CommitDate: 2024-10-16 14:19:21 +0000 firmware: Allow binary files to be loaded by /boot/loader Files loaded "-t firmware" (or module_type="firmware"). They are registered with the firmware system using the full path to the file. There's only one firmware per file, and it is the entire file. We do an extra firmware_get() on any firmware we find here to prevent them from ever being unloaded (we can't handle that case sanely). Sponsored by: Netflix Reviewed by: tsoome, jhb Differential Revision: https://reviews.freebsd.org/D43522 (cherry picked from commit 479905a1ed26c54ef29cdff65cf25f7feade654b) --- sys/kern/subr_firmware.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c index 138eb6a7fcd8..94538670e38c 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -162,6 +162,19 @@ lookup(const char *name) LIST_FOREACH(fp, &firmware_table, link) { if (fp->fw.name != NULL && strcasecmp(name, fp->fw.name) == 0) break; + + /* + * If the name looks like an absolute path, also try to match + * the last part of the string to the requested firmware if it + * matches the trailing components. This allows us to load + * /boot/firmware/abc/bca2233_fw.bin and match it against + * requests for bca2233_fw.bin or abc/bca2233_fw.bin. + */ + if (*fp->fw.name == '/' && strlen(fp->fw.name) > strlen(name)) { + const char *p = fp->fw.name + strlen(fp->fw.name) - strlen(name); + if (p[-1] == '/' && strcasecmp(name, p) == 0) + break; + } } return (fp); } @@ -549,6 +562,42 @@ restart: mtx_unlock(&firmware_mtx); } +/* + * Find all the binary firmware that was loaded in the boot loader via load -t + * firmware foo. There is only one firmware per file, it's the whole file, and + * there's no meaningful version passed in, so pass 0 for that. If version is + * needed by the consumer (and not just arbitrarily defined), the .ko version + * must be used instead. + */ +static void +firmware_binary_files(void) +{ + caddr_t file; + char *name; + const char *type; + const void *addr; + size_t size; + unsigned int version = 0; + const struct firmware *fw; + struct priv_fw *fp; + + file = 0; + for (;;) { + file = preload_search_next_name(file); + if (file == 0) + break; + type = (const char *)preload_search_info(file, MODINFO_TYPE); + if (type == NULL || strcmp(type, "firmware") != 0) + continue; + name = preload_search_info(file, MODINFO_NAME); + addr = preload_fetch_addr(file); + size = preload_fetch_size(file); + fw = firmware_register(name, addr, size, version, NULL); + fp = PRIV_FW(fw); + fp->refcnt++; /* Hold an extra reference so we never unload */ + } +} + /* * Module glue. */ @@ -567,6 +616,7 @@ firmware_modevent(module_t mod, int type, void *unused) /* NB: use our own loop routine that sets up context */ (void) taskqueue_start_threads(&firmware_tq, 1, PWAIT, "firmware taskq"); + firmware_binary_files(); if (rootvnode != NULL) { /* * Root is already mounted so we won't get an event; From nobody Wed Oct 16 14:32:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTD2070pzz5YbQS; Wed, 16 Oct 2024 14:32:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTD201xlfz4Rhv; Wed, 16 Oct 2024 14:32:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uJL+BLJKkG6FGqxfIsTys+NPT2cuVJkRFhRfwfiJru4=; b=YyLMChvXBkWuRI+LQQNzhzEe9N4K7fryHvDp/l9mmSPR0QPopMFzgEIG17KXpcgRN7TjcX vVEG0MW+Ox+9k1fnh6yjEcTYSoOacqmjFn+YvjKDFM30X/iVugCMDMTLB/3E8QMEEm74Nb SoaAXE0DgZt2CJFQsw2dXYfqkLo73NZBXhrjAItKO85/Zhp4U4itPgT6XjJ0qYiHB8SuKK FPZ89Uqz4E79FGYOEsRB/ul29i6rYs1DUHp+etHNpM7RLlQogpjjXJxL3GAQmDYeASLXr/ cfSp53QVjiEWthWTx9uCyPqqePug3WFUKlUjr+fFCfjxz2l+PU2ExDqAG9GQ5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uJL+BLJKkG6FGqxfIsTys+NPT2cuVJkRFhRfwfiJru4=; b=rSmbTLkdw0UgkojYoPlbSVyf/6RErUgukrqRdfviSbvNQ6L9Cn5Y02/qDm5nMJ69ImmhsF /71W4+LLpbXnpLaJfLu4+f3UZ9nVcnM0hujoRL4Badg5JZlkHkgTY2iitt+ss0FdgpqEDJ ZEQAacsqQlxKZ7G5GwcSEBtFldg642gzab1itEYPd1jl2FiODLK0eMjB+HTTvZFpF+Vwyv j5oeJnikPpeU6ClC48FCYzY5sxRW2frGZlqZZ5k5i5m5YN/VGV9Dwk8hgNN63ekAkXh7FE 96cYU7rlwwMmVPHB/HgIYvAl59ZHEuIUux5XT99EHk8XpSMZBAzZWX63UXgU/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729089128; a=rsa-sha256; cv=none; b=NvLduTPBH++oVP7jOSJBVzYuHHlCofOlYh91Oq5X7XLk75xg9VSbKA58xO0Zun6mR804+T 4QCbwgptMNvK3Z4mpE5cw0iFy886od4OOxH+6aVZ7zOpvYo31tq/BI0PlS5Y/M4sxIEJJO 26mA+wEICwD01KxxZQX9q4IoIsLiTpHKSpA4jJ97/FrgZds0zEKxYZmp93BstZP4Qvsain tN1C3AYqPfkUkSvd1TVO5ehEL915e8dbaay/FUAmm1cEIUH4j2sQG57MOKDvvV8RZqogwt XZlHHADQEO+uC/qbPihK06lsL0tdH0WmBjdDrAghCi0Br+4zUD9rtsaGaTQLqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTD1z6XXPz1895; Wed, 16 Oct 2024 14:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GEW7lM089750; Wed, 16 Oct 2024 14:32:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GEW7PE089747; Wed, 16 Oct 2024 14:32:07 GMT (envelope-from git) Date: Wed, 16 Oct 2024 14:32:07 GMT Message-Id: <202410161432.49GEW7PE089747@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: d36ba3989ca9 - stable/14 - firmware: unbreak armv7 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: d36ba3989ca9fb684f51a300714fadbe82cb59d6 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d36ba3989ca9fb684f51a300714fadbe82cb59d6 commit d36ba3989ca9fb684f51a300714fadbe82cb59d6 Author: Warner Losh AuthorDate: 2024-02-29 17:53:05 +0000 Commit: Warner Losh CommitDate: 2024-10-16 14:19:21 +0000 firmware: unbreak armv7 Use proper format specifiers (with casts) and don't redefine flags. Fixes: c7b1e980ae16 Sponsored by: Netflix (cherry picked from commit 3a3afbec3860b0eb4178b63713ca12bd223b585a) --- sys/kern/subr_firmware.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c index 94538670e38c..e8f9493decc0 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -279,7 +279,7 @@ try_binary_file(const char *imagename, uint32_t flags) struct vattr vattr; void *data = NULL; const struct firmware *fw; - int flags; + int oflags; size_t resid; int error; bool warn = flags & FIRMWARE_GET_NOWARN; @@ -296,8 +296,8 @@ try_binary_file(const char *imagename, uint32_t flags) printf("Trying to load binary firmware from %s\n", fn); NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, fn); - flags = FREAD; - error = vn_open(&nd, &flags, 0, NULL); + oflags = FREAD; + error = vn_open(&nd, &oflags, 0, NULL); if (error) goto err; NDFREE_PNBUF(&nd); @@ -311,8 +311,8 @@ try_binary_file(const char *imagename, uint32_t flags) * Limit this to something sane, 8MB by default. */ if (vattr.va_size > firmware_max_size) { - printf("Firmware %s is too big: %ld bytes, %ld bytes max.\n", - fn, vattr.va_size, firmware_max_size); + printf("Firmware %s is too big: %lld bytes, %ld bytes max.\n", + fn, (long long)vattr.va_size, (long)firmware_max_size); goto err2; } data = malloc(vattr.va_size, M_FIRMWARE, M_WAITOK); From nobody Wed Oct 16 14:44: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 4XTDHw3H1pz5Yc63; Wed, 16 Oct 2024 14:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTDHw2Q7qz4VcV; Wed, 16 Oct 2024 14:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwbnqU2/xr/jSYfJRcCFsnUTkFp6UyD0bNp7NfkkeVM=; b=iZDAIzqY8uU130XDrHW/2nS0wYOXE2kNBCBv1ObC2XWHXLiTLnD3RLSDcm2fdScuuPdWxN 8oRsuZfwii3UL1Qn0i+42h+QUSr1hjCEvTcZiILYxeZXzO5aCfk9B+VaBq9w8KGrwppMdy ZZZQBWkj24APBe3coXmv3EorUm7nFJUmha8TvrpEGazCkABxoWVnkUiu8wKZg513M6Aluq xFSJO+jG2h8NB0ML2RuPyEkrCXgLNOhBtrDiLCntNVW2H7o8ID5Ys+5UDh23hIU+/1zh9L jWgQE+ls1ytWiC+Goh7HbAuYbZiQk+Ht7hSWRcoIDNf8mK5/9pcFbFCeZZENTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729089852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwbnqU2/xr/jSYfJRcCFsnUTkFp6UyD0bNp7NfkkeVM=; b=HQxOfVhu5o0cKpxAVfFZcpL83L2PmjXPrWhPxUlEQUOi5aRTBjVWtBM0tSgsyTywJDEjrg 0wd1irp3P/cnS+CrfCIqUW48rdXiYUVwbEqfG7T3pPr8hZXDFK/ndEWWSZMKJ8U+yRVy4S qf8Nk2LPX4zSBvylI0r8c+ZLHO9Qfc/+R4TVsEr8qJ85BUCUFBemJcCI752fQqI1JJNe8K 1KkTb/QXR6eTW8ud8k8FxbARIqy3OL3LCLwyQh8VmxLHkT/B18GU6dkFp12AqazggmII/c 61foWfcuhXkRfn33ZuAuUXJD6VrXz2o2QFiYaHXUT8h3C4hOrnvDovNu+oIGhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729089852; a=rsa-sha256; cv=none; b=e6i/UtBLp8H5ENblihj7hO9qDWb18/BU/I6RWbOD9lrRVNkax1JGmHQGPfYYu74KkAG4Ij BbJIaK6+mNF8E1OCOMCuqQoVzZjR8ErBzWLq9d+sTOTd4+gthrw5e3Jv+p5XAjrq0uTHzo Ufd9UNJlEckIGh7oOCUvnUYErvE+1xTZF8W6ja0HjpDknt3Nar7P1rZ2zV29fFGQaaOfrY ip62hWCJmEyAqxr4uBIhhz1osM93vvMZpmw5UXzlZjkhTv8ntHQKAmwqhnwQjD4wqBsjlD xzTYGL+Oe0FnxgK+kPV4sAs1RyU7GnOKTVpB8B2iYCe+F7GD1MAGGGlwlG2niQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTDHw20vcz199d; Wed, 16 Oct 2024 14:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GEiC5I007142; Wed, 16 Oct 2024 14:44:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GEiCa1007139; Wed, 16 Oct 2024 14:44:12 GMT (envelope-from git) Date: Wed, 16 Oct 2024 14:44:12 GMT Message-Id: <202410161444.49GEiCa1007139@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: e360f8c8fecc - stable/13 - mps/mpr: Add workaround for firmware not responding to IOC_FACTS or IOC_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/stable/13 X-Git-Reftype: branch X-Git-Commit: e360f8c8fecc78d8f2aa2aee46940ec5eca86c87 Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e360f8c8fecc78d8f2aa2aee46940ec5eca86c87 commit e360f8c8fecc78d8f2aa2aee46940ec5eca86c87 Author: prateek sethi AuthorDate: 2024-10-13 18:38:54 +0000 Commit: Warner Losh CommitDate: 2024-10-16 14:33:33 +0000 mps/mpr: Add workaround for firmware not responding to IOC_FACTS or IOC_INIT Sometimes, especially with older firmware, mps(4) would have trouble initializing the card in one of these two steps. Add in a retry after a short delay. Sean Bruno and Stephen McConnell thought this was OK in the bug discussions, but never committed it. Steve indicated the delay might not be necessary, but the OP clearly needed to make it longer to make things work. I've kept the delay, and added the suggested comment. Ported the iocfacts part to mpr as well, since we see similar errors about once every month or two over a few thousand controllers at work. We've not seen it with IOC_INIT as far back as I can query the error log database, so I didn't port that forward. We'll see if this helps, but won't know for sure until next year (so I'm committing it now since it won't hurt and might help). We usually see this failure in connection with complicated recovery operations with a drive that's failing, though, at least in the last year's worth of failures. It's not clear this is the same as OP or not. PR: 212841 Sponsored by: Netflix Co-authored-by: imp (cherry picked from commit c0e0e530ced057502f51d7a6086857305e08fae0) --- sys/dev/mpr/mpr.c | 23 ++++++++++++++++++----- sys/dev/mps/mps.c | 38 ++++++++++++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index f042f71825b5..f87b55c3dba5 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -1195,7 +1195,7 @@ mpr_get_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) { MPI2_DEFAULT_REPLY *reply; MPI2_IOC_FACTS_REQUEST request; - int error, req_sz, reply_sz; + int error, req_sz, reply_sz, retry = 0; MPR_FUNCTRACE(sc); mpr_dprint(sc, MPR_INIT, "%s entered\n", __func__); @@ -1204,13 +1204,26 @@ mpr_get_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) reply_sz = sizeof(MPI2_IOC_FACTS_REPLY); reply = (MPI2_DEFAULT_REPLY *)facts; + /* + * Retry sending the initialization sequence. Sometimes, especially with + * older firmware, the initialization process fails. Retrying allows the + * error to clear in the firmware. + */ bzero(&request, req_sz); request.Function = MPI2_FUNCTION_IOC_FACTS; - error = mpr_request_sync(sc, &request, reply, req_sz, reply_sz, 5); - - adjust_iocfacts_endianness(facts); - mpr_dprint(sc, MPR_TRACE, "facts->IOCCapabilities 0x%x\n", facts->IOCCapabilities); + while (retry < 5) { + error = mpr_request_sync(sc, &request, reply, req_sz, reply_sz, 5); + if (error == 0) + break; + mpr_dprint(sc, MPR_FAULT, "%s failed retry %d\n", __func__, retry); + DELAY(1000); + retry++; + } + if (error == 0) { + adjust_iocfacts_endianness(facts); + mpr_dprint(sc, MPR_TRACE, "facts->IOCCapabilities 0x%x\n", facts->IOCCapabilities); + } mpr_dprint(sc, MPR_INIT, "%s exit, error= %d\n", __func__, error); return (error); } diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index ca037071c298..33b64fe7f9cf 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -1127,7 +1127,7 @@ mps_get_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) { MPI2_DEFAULT_REPLY *reply; MPI2_IOC_FACTS_REQUEST request; - int error, req_sz, reply_sz; + int error, req_sz, reply_sz, retry = 0; MPS_FUNCTRACE(sc); mps_dprint(sc, MPS_INIT, "%s entered\n", __func__); @@ -1136,10 +1136,21 @@ mps_get_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) reply_sz = sizeof(MPI2_IOC_FACTS_REPLY); reply = (MPI2_DEFAULT_REPLY *)facts; + /* + * Retry sending the initialization sequence. Sometimes, especially with + * older firmware, the initialization process fails. Retrying allows the + * error to clear in the firmware. + */ bzero(&request, req_sz); request.Function = MPI2_FUNCTION_IOC_FACTS; - error = mps_request_sync(sc, &request, reply, req_sz, reply_sz, 5); - mps_dprint(sc, MPS_INIT, "%s exit error= %d\n", __func__, error); + while (retry < 5) { + error = mps_request_sync(sc, &request, reply, req_sz, reply_sz, 5); + if (error == 0) + break; + mps_dprint(sc, MPS_FAULT, "%s failed retry %d\n", __func__, retry); + DELAY(1000); + retry++; + } return (error); } @@ -1149,7 +1160,7 @@ mps_send_iocinit(struct mps_softc *sc) { MPI2_IOC_INIT_REQUEST init; MPI2_DEFAULT_REPLY reply; - int req_sz, reply_sz, error; + int req_sz, reply_sz, error, retry = 0; struct timeval now; uint64_t time_in_msec; @@ -1193,10 +1204,21 @@ mps_send_iocinit(struct mps_softc *sc) time_in_msec = (now.tv_sec * 1000 + now.tv_usec/1000); init.TimeStamp.High = htole32((time_in_msec >> 32) & 0xFFFFFFFF); init.TimeStamp.Low = htole32(time_in_msec & 0xFFFFFFFF); - - error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); - if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) - error = ENXIO; + /* + * Retry sending the initialization sequence. Sometimes, especially with + * older firmware, the initialization process fails. Retrying allows the + * error to clear in the firmware. + */ + while (retry < 5) { + error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); + if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) + error = ENXIO; + if (error == 0) + break; + mps_dprint(sc, MPS_FAULT, "%s failed retry %d\n", __func__, retry); + DELAY(1000); + retry++; + } mps_dprint(sc, MPS_INIT, "IOCInit status= 0x%x\n", reply.IOCStatus); mps_dprint(sc, MPS_INIT, "%s exit\n", __func__); From nobody Wed Oct 16 15:31:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTFLZ3j4pz5Yf8y; Wed, 16 Oct 2024 15:31:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTFLZ1jvpz4bGv; Wed, 16 Oct 2024 15:31:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729092694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DMimX+Z8V5GGA8gPDKInoJ6y4Psc8iqCBSgSveRX92k=; b=vKBVJdU5JehAiNja9Q8wex4BKRstV8YJe16miLctHi4Ke6FXazy8K0LMArEWxiL50m+lE1 a7+ErHY6IsmydayHG5+imCz5Bsdb4ibsoP2Afw01je7w1FIt20pVUOfhq9FmOOfwQjSxP2 gpJB39KghX6ufCVQGGVElvKMMj78VpUbsGU00JIWVzBnxc4zyDgmU1+MpLX4Wvn+J+w543 4GHzozc519HlhZEhQchaq2M8EgUGdnTz7CRzrHb6Rsy2PlibV1g0CCfDs/hsjDWSAZBI2d NL/gSVXKUmKNNSkL3IoApRgH1iIORPgF8pFeM3nhWkR+iCzHUFQdXHbhRqlcIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729092694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DMimX+Z8V5GGA8gPDKInoJ6y4Psc8iqCBSgSveRX92k=; b=wlEUzZHnn+iB0liEN/OWtKHBfuW0V7Vf8GnuFlELweCFezIGzkRkhprHL2khAEpO1Ec3Qp TXi5OgjDu7qPQ+5enyVbSMzCOzGQ5/c1caygWVAwjmvgqc5ipYXEOcncaWQTJr22IteSeK T8cI9ukpPwDTQQoSm8u+dhVnjB7adXaneOGbYkXpCCcYFup4kWelMi/H8HxbbnavPucuaG SoiaRnHXyXMvbAwqvMMQWCzWEzCF3834dJN/J0vbSBWNKwUJt0+sz/lb1w8cnPksbHZ7oL xbfEMl6TxB84EKdsvXfFZm1mmfAp/LHyeEbn8mmwU96Qw7c7hb8QSJXyInepfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729092694; a=rsa-sha256; cv=none; b=G99YrO3rwXP6DzdjS6K/fO757wHrjpJ0cMuWCNaX65uhbNqjzo/+JEpOlM5hymXFsMs3dO kHGerTW1OQJRJG6Zr6IWloM0YUjvbnEBBX1l0QVx7cej6VEN+nLo4HcyGXVpF6KwmPJPtq lP0DQiv4Aykdn3qJ2Fi6/g3hvCT1a0X9sb4ImskzlVux5+FmErbOcjFJS3J8d9sSeVqPoS 34ahLbrKtn7lCMyjKss2TwIEG+oDwu8fFN6jRc82s+hgWENogTwCeTIv0TrgqntaMsDLlk 01Vi3WCf6HaV0/vQ3QdEGlQQaclVbBFpii7Atihl8QkJL3ZlOvheUk3pHZFm6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTFLZ1Jysz19tC; Wed, 16 Oct 2024 15:31:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GFVYVk086860; Wed, 16 Oct 2024 15:31:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GFVYEO086857; Wed, 16 Oct 2024 15:31:34 GMT (envelope-from git) Date: Wed, 16 Oct 2024 15:31:34 GMT Message-Id: <202410161531.49GFVYEO086857@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 2926c2594249 - main - ping tests: fix for scapy-2.6.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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2926c2594249f64fecbbdcb0b0b9a3591931ab04 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2926c2594249f64fecbbdcb0b0b9a3591931ab04 commit 2926c2594249f64fecbbdcb0b0b9a3591931ab04 Author: Kristof Provost AuthorDate: 2024-10-16 07:57:06 +0000 Commit: Kristof Provost CommitDate: 2024-10-16 15:25:57 +0000 ping tests: fix for scapy-2.6.0 Scapy 2.6.0 now appears to parse the IPOption during construction, and it then gets confused at a single-byte option. IP Options typically contain at least a 1 byte type and 1 byte length. Avoid this by just returning the raw bytes, rather than an IPOption object. MFC after: 1 week Reviewed by: Jose Luis Duran Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47151 --- sbin/ping/tests/test_ping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 3c66e6c54c4d..8ec0f3dc74dc 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -113,7 +113,7 @@ def generate_ip_options(opts): options = sc.IPOption_SSRR(length=3, routers=routers_zero) elif opts == "unk": ToolsHelper.set_sysctl("net.inet.ip.process_options", 0) - options = sc.IPOption(b"\x9f") + options = b"\x9f" elif opts == "unk-40": ToolsHelper.set_sysctl("net.inet.ip.process_options", 0) options = sc.IPOption(b"\x9f" * 40) From nobody Wed Oct 16 16:25:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTGYM28GLz5YjVC; Wed, 16 Oct 2024 16:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTGYM1SmLz4hCh; Wed, 16 Oct 2024 16:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729095959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z15YWkR7dBz1iqhIgRVAq8vTlozFYZ9xzGzL/fTGhik=; b=bBHBIwiPoFM3imuQnb7t2I3cCMkgPBnR/hzYiLD/lXvWmiWXWOJ4u4ZnLXMyhaT6ugN8yV y7rfDANequP4/DmEAGAhKxQ21pBezmwwMyr6QO0J31m2kgAbPu0RKnfsxf2xHvHvP8KwUr KOVhMCBkTmwF8n3sejwMUiLsZQ8tK3dsSekPn3B5gzIADgASHMNT4T5lCw+udGfi9+Ob7X Sq4fs1/aQlwh+wo1nfBxRnbqwZosY/sMg2bJNGSlTeU1sX70vAlqFA2Pk4Q6y8E0SWFbqK NmvBT6S0/dJZj8co7+Xv+qh2GqW4cXuO42HuKg97gbUQPMveNSepEODexfDN6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729095959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z15YWkR7dBz1iqhIgRVAq8vTlozFYZ9xzGzL/fTGhik=; b=DTRqwNlnrJpHIffzC9W10PiuY0S62dDPKbq5EmtiloQ9DF3qcu/OF3H+NEQVCzEAtNNy1I 3+fZFzhbXNPUz9jEjiwMvR1CN+McDwwxrclDtMR6gPnSStFWN2oebSqIRq1P78ptxJF9YO WBcc4wn9Laft1TCoRUGUGeSQa7gShkoaGopMSVgPoNQFG48EVUEPk3PsifkA42qn3r+FyM +8V7rUuFSYHWCAN/cKz5uWP4wBCp/7jEXArUD8SHtsIx5liwT8658jBnv9Wrp8Vodp4lmY KNuDrOXNer1TlPiav5C8Az9lWNbms2x3ShzJMV+yVp2fhI4i5KHZ2g9jXGnKLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729095959; a=rsa-sha256; cv=none; b=MZnVmruThMp2nf6KgsjFU6G74QlftyC9Qpw8IdxHdnTD6+LYX4e7dIIciOqkzERFMZs5e9 TPnXW3TMiZ0hqA9w24MtE1e4vMvhQ39MGaLg1/Qutj9nSqnGMmnzmvmLF+sJ9m4yXFYzzl a2J+Ql/DMplRXG+XWCM6wcoMZSXd6Y9EPJhfUcuZQtjZ8nViGbB0mAFM4xdKw9oLswJPpJ Ap0OP8a0mt7UdkcTo/jlmdkhjR/rrIC7iPW/AZFTVhZNbo5DSrV7wpuE6Iin4wcLxKP7m6 MnW62mr5JyQgRPfqfnN1nJf+zJBm+gWFjvG7RLM81tFISIBu/ccVWlgUJnWe4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTGYM0xgDz1Bvt; Wed, 16 Oct 2024 16:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GGPxfu076810; Wed, 16 Oct 2024 16:25:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GGPx6u076807; Wed, 16 Oct 2024 16:25:59 GMT (envelope-from git) Date: Wed, 16 Oct 2024 16:25:59 GMT Message-Id: <202410161625.49GGPx6u076807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Igor Ostapenko Subject: git: b3e7d4b67ce6 - main - tests: Fix style of netpfil/common/divapp.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: igoro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3e7d4b67ce653bcdd9ec671cfdcdfed58a0ea50 Auto-Submitted: auto-generated The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=b3e7d4b67ce653bcdd9ec671cfdcdfed58a0ea50 commit b3e7d4b67ce653bcdd9ec671cfdcdfed58a0ea50 Author: Igor Ostapenko AuthorDate: 2024-10-16 16:24:54 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-16 16:24:54 +0000 tests: Fix style of netpfil/common/divapp.c No functional change intended. Reviewed by: markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D47132 --- tests/sys/netpfil/common/divapp.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/sys/netpfil/common/divapp.c b/tests/sys/netpfil/common/divapp.c index f3e41f010fef..d0f4b345b14c 100644 --- a/tests/sys/netpfil/common/divapp.c +++ b/tests/sys/netpfil/common/divapp.c @@ -83,8 +83,8 @@ recv_pkt(struct context *c) s = select(c->fd + 1, &readfds, 0, 0, &timeout); if (s == -1) errx(EX_IOERR, "recv_pkt: select() errors."); - if (s != 1) // timeout - return -1; + if (s != 1) /* timeout */ + return (-1); c->pkt_n = recvfrom(c->fd, c->pkt, sizeof(c->pkt), 0, (struct sockaddr *) &c->sin, &c->sin_len); @@ -98,14 +98,11 @@ static void send_pkt(struct context *c) { ssize_t n; - char errstr[32]; n = sendto(c->fd, c->pkt, c->pkt_n, 0, (struct sockaddr *) &c->sin, c->sin_len); - if (n == -1) { - strerror_r(errno, errstr, sizeof(errstr)); - errx(EX_IOERR, "send_pkt: sendto() errors: %d %s.", errno, errstr); - } + if (n == -1) + err(EX_IOERR, "send_pkt: sendto() errors"); if (n != c->pkt_n) errx(EX_IOERR, "send_pkt: sendto() sent %zd of %zd bytes.", n, c->pkt_n); @@ -145,5 +142,5 @@ main(int argc, char *argv[]) if (npkt != 1) errx(EXIT_FAILURE, "%d: npkt=%d.", c.divert_port, npkt); - return EXIT_SUCCESS; + return (EXIT_SUCCESS); } From nobody Wed Oct 16 16:27: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 4XTGZm4sKWz5YjvQ; Wed, 16 Oct 2024 16:27:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTGZm2prPz4hTY; Wed, 16 Oct 2024 16:27:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729096032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hqqrkCnmh4T5PdZ7hfPcboIl3IKcMF6We9eP3++RFvc=; b=b0w0SHkalKR8kvUbD8wdT/SfNoE/RGzGNG+nAWpJEWuKGK2nvTh3Z0ZBtjfCFk/vRDUJid BYdluPj+ij/nv+EmCuKzS1pfxZ2bP+L/k9uZh7jGnHskH+dbGsdqobtAazGMWQ+Rw7SEUF w4+nAw81xc7nf3tUTefvhBjUy9pQ8yr5YuSxJocL93veHO2buao0+I2kJMKKhe9v2f6oko ESwhn/CWD3QBcxlAMILlwsBefmRxvfRZ3lZEIDMCu97ohQY9D/HagyM46yuw1XJM2xKY5V dUZ7unASQXcpWhxJMqhzyiTXFkYA5Yrd58t0mVDeroEb4iXjsUg6Yim09BsQ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729096032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hqqrkCnmh4T5PdZ7hfPcboIl3IKcMF6We9eP3++RFvc=; b=lDhDizDhcVzeMv/jAIHeNuGGF+sPfmlBj8LUIhBPYg4qIsFLgPYSadtyazQ11m7J//j+jw DWMkBItpt3vEscekFFZsDe/dqabprwHPqdbqUoXfkLgBJvCnvwYLRdcxYxsKkGN3Pt83Gw qogPiOF7TvxEg51So8s9XAcGdhsR7iVc3nH9fBiy9OoiqEJ3255gWiyvwl8UN9HiJl0rp4 n/4AtYDHNH6zzFkhVqEj2tT8eM+FvgyjUgtSW1wzFzGI65BE2GCocfyJg5Uu7GQZ+72U+V vkiRYY09XBVCFZxrVls5AD5t64/LJJLWZzpMySEFHTDKRwGL+LcfQnVNDXSXWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729096032; a=rsa-sha256; cv=none; b=l1rL8mx+FufOZn0EbfC/miHVWvYi3dX3OMWilpI89/OSb2we88lemevc7bPWF3U/hHnWQR F73VRUpobuvSvGguUTmQ1b8WphHJntUYLKkKyiVSkPiQ937R7F8QW50SD6rd8q/SkL86EN Vyexel/OrCXD0EFXuRRA/Scso+OawaNl1xBYjw24nBQcE5ke1Tj1v7Mkd2V64QztXfM8vH ScmccuqL2yHobfrc0OHpDYy2ifVgyU3SsAlaCDZ4VdVOWluu1pyXKE7ESB2ARPn9DYjQXS 92+AR5dwL93fMVRwMyyAH/gG8Y9qomOWggfUHHaG3KvA5GVRakItlxyEzZFbKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTGZm2QGCz1Cdp; Wed, 16 Oct 2024 16:27:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GGRCvs077109; Wed, 16 Oct 2024 16:27:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GGRCnL077106; Wed, 16 Oct 2024 16:27:12 GMT (envelope-from git) Date: Wed, 16 Oct 2024 16:27:12 GMT Message-Id: <202410161627.49GGRCnL077106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 45fe5580cdab - main - Updated and new Makefile.depend files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45fe5580cdabc58c4f9392e72c02d1aefa542fb6 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=45fe5580cdabc58c4f9392e72c02d1aefa542fb6 commit 45fe5580cdabc58c4f9392e72c02d1aefa542fb6 Author: Simon J. Gerraty AuthorDate: 2024-10-16 16:22:17 +0000 Commit: Simon J. Gerraty CommitDate: 2024-10-16 16:26:29 +0000 Updated and new Makefile.depend files Reviewd by: stevek --- lib/liblutok/Makefile.depend | 14 ++++++++++++++ usr.bin/clang/lldb-server/Makefile.depend | 6 +++--- usr.bin/kyua/Makefile.depend | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/liblutok/Makefile.depend b/lib/liblutok/Makefile.depend new file mode 100644 index 000000000000..1cb182ef8ce1 --- /dev/null +++ b/lib/liblutok/Makefile.depend @@ -0,0 +1,14 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/libc++ \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.bin/clang/lldb-server/Makefile.depend b/usr.bin/clang/lldb-server/Makefile.depend index 07b6ab854d37..16db985d2ae3 100644 --- a/usr.bin/clang/lldb-server/Makefile.depend +++ b/usr.bin/clang/lldb-server/Makefile.depend @@ -4,9 +4,9 @@ DIRDEPS = \ include \ include/xlocale \ lib/${CSU_DIR} \ - lib/clang/libclang.amd64 \ - lib/clang/liblldb.amd64 \ - lib/clang/libllvm.amd64 \ + lib/clang/libclang \ + lib/clang/liblldb \ + lib/clang/libllvm \ lib/libc \ lib/libc++ \ lib/libcompiler_rt \ diff --git a/usr.bin/kyua/Makefile.depend b/usr.bin/kyua/Makefile.depend index 6e6d14b76ecd..d6bfbeef15c5 100644 --- a/usr.bin/kyua/Makefile.depend +++ b/usr.bin/kyua/Makefile.depend @@ -11,7 +11,7 @@ DIRDEPS = \ lib/libcxxrt \ lib/libjail \ lib/liblua \ - lib/liblutok.amd64 \ + lib/liblutok \ lib/libsqlite3 \ lib/msun \ From nobody Wed Oct 16 16:27:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTGZn4YDdz5YjnB; Wed, 16 Oct 2024 16:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTGZn3nkSz4hLd; Wed, 16 Oct 2024 16:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729096033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JxAby9raU4ix8IxrZ4OvflMLoY9D9JQYcPYQef6V9bc=; b=gKTmrhCcMzouvBodBdWCVyYR7dVnQSpOKVJMpHnhlF8s9v6/cjkXxSEvdZFXASL69MKIxA oN6bZCttzl7VNpaK2R02i072gRCENvvpIAA7KnH6lTyC0RKSO+ct0tkK/CwFitB+HrWX7I +LpVJ//mIuhyT1uoJVvAuOdHrRZrIuNIerqgZPxl6frXqC1UNv9iY2QZnQx5WT508vhU0q kQyazEFVIC6Jsb3Or6cfRS8KEMZXpEGR+6hiBjVp96sTfelhVz9UPclvGXP85ev9KIjkDz gdL4uc2se7Oq2XLAaOROlhd7ZXDWmmkvy5jTQ5kmI9bSk9yw89PmS8aBGCqdXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729096033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JxAby9raU4ix8IxrZ4OvflMLoY9D9JQYcPYQef6V9bc=; b=YW3lmK4r0F8d9aB5w+cTLhzwPxPGxib5r0gzWoMHY4yv7tXiHKRJicsnpMjjJznm4jAvru 62VoYccwA4L+O9XYbYljROM9esIyazpIVHtwdXXK/WxO/2cW3vDdt22U7KMbDg4OllWSfv mwAtjZWZ7RlzC5UCQi+g9k0O+ggzrSyfm0aR1AYx3bbyswRyedF5OUAruvBZkS5KaNY3uS DW/9lw8A/Y6ImhEmPS+PVbeE0WLxMj9naWYdBegFQHbKLQS5YpqUSKFreXMI2xsk1zVqfb uSMPIu6Wg9WkDIRC7HuiUa8nkpqNBWzrW422N6dUCuWr1eBjAz3W77l/ZwStAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729096033; a=rsa-sha256; cv=none; b=dwxIMLudcoDPFaRdXOgRhpyD8Pcw+ukey8wjNb0saoPU1ko4DHiFoPK+X52qU3uFUD5tyh H2hgHKWs9IrKCWj68CiLIM6TQlWh3bc6TGp0/4rQYcbJ6RFL49iYilXLDpNsQI1gl7uulN AZ9whhdEBqdPbPKZk6JIo9PD+JlkoT5lMEqtS54mINH4C1QZC9mfu+I3G/IfctAaLm4Apl csSOD7fTMpl5DIJh2OluJdvljGh/0DqlAme2jJzBWLCwX+QgyxGRvRkTfegTLHsCbE/z2B pZcITpytxMs64DeF7QHEKBBCw5IGYdb2BbtQ+56VNjGVQGZTlA9XbC6iOkcRRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTGZn3P29z1Cdq; Wed, 16 Oct 2024 16:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GGRDcp077148; Wed, 16 Oct 2024 16:27:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GGRD8B077145; Wed, 16 Oct 2024 16:27:13 GMT (envelope-from git) Date: Wed, 16 Oct 2024 16:27:13 GMT Message-Id: <202410161627.49GGRD8B077145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: c5c0e79bb0ad - main - Add local.meta.stage.mk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5c0e79bb0ad0a1b9b9688aaf919826c4c386411 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c5c0e79bb0ad0a1b9b9688aaf919826c4c386411 commit c5c0e79bb0ad0a1b9b9688aaf919826c4c386411 Author: Simon J. Gerraty AuthorDate: 2024-10-16 16:25:16 +0000 Commit: Simon J. Gerraty CommitDate: 2024-10-16 16:26:29 +0000 Add local.meta.stage.mk We need to undo NO_OBJ if we are staging as it causes us to drop the stage* target cookies in src tree which is bad, and may break doing the same targets for multiple architectures. Reviewed by: stevek --- share/mk/local.meta.stage.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/mk/local.meta.stage.mk b/share/mk/local.meta.stage.mk new file mode 100644 index 000000000000..8a59631e57ae --- /dev/null +++ b/share/mk/local.meta.stage.mk @@ -0,0 +1,6 @@ +.if defined(NO_OBJ) && ${__objdir:U${.CURDIR}} != ${.CURDIR} +# NO_OBJ would cause us to dribble stage* into .CURDIR +# which will prevent the targets being done for multiple MACHINES +.undef NO_OBJ +.OBJDIR: ${__objdir} +.endif From nobody Wed Oct 16 16:27:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTGZp68jJz5YjVf; Wed, 16 Oct 2024 16:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTGZp5Bydz4hZV; Wed, 16 Oct 2024 16:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729096034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hItj/5PbTWL5lvOfNCLSGVcVWMil6RzQKDCc7wdBdbA=; b=WwFKP/qN9xj7xzBVXnLu0aPb97prT/uuyzw99n/84iMddz4OTnyEbLhce5VaLvJc+lDeHj YXYutyqn2Q8AU8uotWK6M91XtVp5EFfyzRI5a5bpJQs2UZIz+j1Q3Q+G89mNfxt61tAkdd 3guIk86q8dBeTeFjxVJza8qGv82n6JC8x8Z4vvKY3MlB+S30oRPA45UsJ6MaljYILofVUG z2iXbp0BgmmSfrR4clSqaZV4m5KJmEZopwvQTr9yEF0d3cFQpCmqmfNJK5Cn1U6PXdkP/0 PUcdDIcvwlBvrDAnkD1mM4WN4zaDpAEGmGqjrCYPg2ZqnPbqhAQ+Ge6jtv9oMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729096034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hItj/5PbTWL5lvOfNCLSGVcVWMil6RzQKDCc7wdBdbA=; b=fJBBhRiHXJbjnWJtumX8KpSwCw+3BpmYyjIL9Ymmtglx6U8QA+AGNwHMoFABdYXux9VlEZ xu1tUX8NmrvlgnIHdUCbIlz0hgpnrt4BwGtWz9m67ugdE5n3RyjL0ZBB+lX4EHUM4nW9E4 RTrP1B+6XgMe3FNI4do9+8nPIc52IXKi+3BwcQfrhvjp/lri/sQKoMjtMJg9M/8Ta9G02X MjFdwNDekL3Hw4SRDHadx/iV5x6qNOUzPUYIzEZ+3Si7mleV6HrbdBISxiT9f3kYnK6AFM etBgIIVEj2EzbtAeWZZ0MwR5OiaLhKmAxftt/dNT98MCqYckeoozUm2bAKgYOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729096034; a=rsa-sha256; cv=none; b=NQ5iSVG7pI5WEopqnIB40JO1obDXpMsgUwxDTfWfCvyAk7RMmR9QnUHAndomnhnmcI/BNj OwIDAp7S65CBID8vIgD71y2KKMCxiK8YH/L3GV8NGs4xKnuhS6HrSU8/xE9A+FzWhHDIdN V9WlV5P/syKV9MnW5ocGj6qWYSYsPBbQQQBE5dVqSi971R11DDDITG/MgKzrIlYsiZLGW5 BYnw55NewaqoYVJqWP1Y7ZX4v/SuLJEXlRh4YrOI5Wf7JCfhC3f/KQBbDNQBqBErp3dJSN U4dVXEQjnzKuSb+cTxi6WYp7xyBFJJmWBoKPm8hjb0u//KsUwY9j8J2rTAD+Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTGZp3lx9z1Cdr; Wed, 16 Oct 2024 16:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GGREcj077191; Wed, 16 Oct 2024 16:27:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GGREPJ077188; Wed, 16 Oct 2024 16:27:14 GMT (envelope-from git) Date: Wed, 16 Oct 2024 16:27:14 GMT Message-Id: <202410161627.49GGREPJ077188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 0aa4a9fc859f - main - bootstrap-packages.sh escape ++ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0aa4a9fc859fd43343e2d7b5094a50d1ca0948eb Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0aa4a9fc859fd43343e2d7b5094a50d1ca0948eb commit 0aa4a9fc859fd43343e2d7b5094a50d1ca0948eb Author: Simon J. Gerraty AuthorDate: 2024-10-16 16:26:19 +0000 Commit: Simon J. Gerraty CommitDate: 2024-10-16 16:26:29 +0000 bootstrap-packages.sh escape ++ We need to escape + when egreping parent makefile too. Reviewed by: stevek --- targets/pseudo/bootstrap-packages/bootstrap-packages.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/targets/pseudo/bootstrap-packages/bootstrap-packages.sh b/targets/pseudo/bootstrap-packages/bootstrap-packages.sh index 58b2843a9422..fa87b069f6da 100755 --- a/targets/pseudo/bootstrap-packages/bootstrap-packages.sh +++ b/targets/pseudo/bootstrap-packages/bootstrap-packages.sh @@ -118,13 +118,17 @@ end_options() { EOF } +no_plus() { + case "$1" in + *+*) echo "$1" | sed 's,+,\\\\+,g';; + *) echo "$1";; + esac +} + find_opt() { mf=$1 - sub=$2 + sub="`no_plus $2`" shift 2 - case "$sub" in - *+*) sub=`echo "$sub" | sed 's,+,\\\\+,g'`;; - esac egrep "$@" "^[^#].*[[:space:]]$sub([[:space:]]|\$)" $mf | tr '{' '\n' | sed -n 's,^MK_\([^}]*\).*,\1,p' | @@ -142,8 +146,9 @@ sort -t= -k2 "$@" | sed 's,/Makefile:PACKAGE=, ,' | bname=${reldir##*/} # check parent does not have it commented out # otherwise we should ignore it. + # if the parent makefile does not exist, we will skip it. pmf=$SRCTOP/$dname/Makefile - egrep -q "^[^#].*[[:space:]]$bname([[:space:]]|\$)" $pmf || continue + egrep -q "^[^#].*[[:space:]]`no_plus $bname`([[:space:]]|\$)" $pmf 2> /dev/null || continue : reldir=$reldir case "$reldir" in *lib/*) sub=${reldir#*lib/};; From nobody Wed Oct 16 17:51:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTJRf1hRtz5YnZM; Wed, 16 Oct 2024 17:51:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTJRf14G7z4pYJ; Wed, 16 Oct 2024 17:51:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729101070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kgb9JRLbZbiTJuLP2DF0B0DPFmK120+qp9kAGDWw00k=; b=v3+BbQVupT6JeHxC2MxGxEZ6FAJkI0kRwOQ+Zy9MO3etkV2HuGi6OIwmTOZ/JKlwf3wuTb AQ2zuYK+EMI3VM70jxea75tbxlmFqgBORCqai4Is+XxrRVtQHKqxgkx7QUhcU9r2sKS+sX ZEFBeLSpZqoYfhOjm/Qd6uhs3MErD4JX22fDR36g/bw2xUv7bxHfT394zDdUz55rq8MJQx V80xodtc0f562gV13CvPiBOOjwHVExXsbFUKszQbx7Xxr0Jtkk8/cJEXFnJjo5RI7D2POl SE6qkIiX5p73/LigAQm4OsM/nt7RGw5cVwAuP7c4+ysl4akoeyu1w4YOeIg/mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729101070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kgb9JRLbZbiTJuLP2DF0B0DPFmK120+qp9kAGDWw00k=; b=kCmFv59Bk2RQIFxddVkimVf+EDpE2l0P4eKKG6wJsE7xPqYEtmc0szPSil8DB2RcJ3tfeu 2sMXgOeSWlXS3TirWX0RH4qvxxifd7zSuckBQ/pjsAUiW46szKbpo/oDYyhbtRcmqzvI+c LTILbyXf/4CgdDUgFqZOV0JzatuDskJ1JmNDF5WWcfEww3jvLOsBmtndNIsju80RtwQ2hY Lj59Ah+Hmpimk3L21w/ZaGOBcHRlyG8QrqBJTz4y3MKV/B1AE1UnexkLpdYjUvN9uFlln4 v+OeKx98A/CNTaX1bvIeK+K24Hi5MLDys1KFwy0I7MoXupCwa3fLroR3DmDNHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729101070; a=rsa-sha256; cv=none; b=VSvm2v/YdP0RkNFYmuArR9idyOZnqOVd6KlcmfjgYJRewpW3TQhtD9V85Go+2RzbcFFN+B vftz/GztYBYSckeyPNiBYetlmd6hatOhmM3UoU00rt6JqAx2PWrYcenbRK/QRvet6z9jGJ Ejtlst6b2vpeNvwDeYOoE94SIFQLxnfOXiiAi6b/QzuXO7B117ZehBF84YEfQZDQwmz3uj 7fEHY/nC0M9GPVRG/OtaDM25lGJWO3OEYvSoAU9xGCC5xPn/yS5JwWmX1A1IBSTAKbz5Z2 wLfyzOYy2czk7o0iiDpeW70rTErnT9Yt2LnQFXm4DQTeWe4fCzWkLAk4f7eN4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTJRf0hSbzFYV; Wed, 16 Oct 2024 17:51:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GHp9Ca024528; Wed, 16 Oct 2024 17:51:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GHp9AP024525; Wed, 16 Oct 2024 17:51:09 GMT (envelope-from git) Date: Wed, 16 Oct 2024 17:51:09 GMT Message-Id: <202410161751.49GHp9AP024525@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: 47f49dd4bbb4 - main - sdt: Tear down probes in kernel modules during kldunload 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: 47f49dd4bbb4a72e53d31046964ce3c111ee0d12 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=47f49dd4bbb4a72e53d31046964ce3c111ee0d12 commit 47f49dd4bbb4a72e53d31046964ce3c111ee0d12 Author: John Baldwin AuthorDate: 2024-10-16 17:50:37 +0000 Commit: John Baldwin CommitDate: 2024-10-16 17:50:37 +0000 sdt: Tear down probes in kernel modules during kldunload Previously only providers in kernel modules were removed leaving dangling pointers to tracepoints, etc. in unloaded kernel modules. PR: 281825 Reported by: Sony Arpita Das Reviewed by: markj Fixes: ddf0ed09bd8f sdt: Implement SDT probes using hot-patching Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46890 --- sys/cddl/dev/sdt/sdt.c | 111 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 102 insertions(+), 9 deletions(-) diff --git a/sys/cddl/dev/sdt/sdt.c b/sys/cddl/dev/sdt/sdt.c index 88ceb390876b..a8da618204af 100644 --- a/sys/cddl/dev/sdt/sdt.c +++ b/sys/cddl/dev/sdt/sdt.c @@ -429,18 +429,15 @@ sdt_kld_load(void *arg __unused, struct linker_file *lf) sdt_kld_load_probes(lf); } -static void -sdt_kld_unload_try(void *arg __unused, struct linker_file *lf, int *error) +static bool +sdt_kld_unload_providers(struct linker_file *lf) { struct sdt_provider *prov, **curr, **begin, **end, *tmp; - if (*error != 0) - /* We already have an error, so don't do anything. */ - return; - else if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, + if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, NULL)) /* No DTrace providers are declared in this file. */ - return; + return (true); /* * Go through all the providers declared in this linker file and @@ -453,8 +450,7 @@ sdt_kld_unload_try(void *arg __unused, struct linker_file *lf, int *error) if (prov->sdt_refs == 1) { if (dtrace_unregister(prov->id) != 0) { - *error = 1; - return; + return (false); } TAILQ_REMOVE(&sdt_prov_list, prov, prov_entry); free(prov->name, M_SDT); @@ -464,6 +460,103 @@ sdt_kld_unload_try(void *arg __unused, struct linker_file *lf, int *error) break; } } + + return (true); +} + +static bool +sdt_kld_unload_probes(struct linker_file *lf) +{ + struct sdt_probe **p_begin, **p_end; + struct sdt_argtype **a_begin, **a_end; + struct sdt_tracepoint *tp_begin, *tp_end; + + if (linker_file_lookup_set(lf, __XSTRING(_SDT_TRACEPOINT_SET), + &tp_begin, &tp_end, NULL) == 0) { + for (struct sdt_tracepoint *tp = tp_begin; tp < tp_end; tp++) { + struct sdt_tracepoint *tp2; + + if (!sdt_tracepoint_valid(tp->patchpoint, tp->target)) + continue; + + /* Only remove the entry if it is in the list. */ + tp2 = STAILQ_FIRST(&tp->probe->tracepoint_list); + if (tp2 == tp) { + STAILQ_REMOVE_HEAD(&tp->probe->tracepoint_list, + tracepoint_entry); + } else if (tp2 != NULL) { + struct sdt_tracepoint *tp3; + + for (;;) { + tp3 = STAILQ_NEXT(tp2, + tracepoint_entry); + if (tp3 == NULL) + break; + if (tp3 == tp) { + STAILQ_REMOVE_AFTER( + &tp->probe->tracepoint_list, + tp2, tracepoint_entry); + break; + } + tp2 = tp3; + } + } + } + } + + if (linker_file_lookup_set(lf, "sdt_argtypes_set", &a_begin, &a_end, + NULL) == 0) { + for (struct sdt_argtype **argtype = a_begin; argtype < a_end; + argtype++) { + struct sdt_argtype *argtype2; + + /* Only remove the entry if it is in the list. */ + TAILQ_FOREACH(argtype2, + &(*argtype)->probe->argtype_list, argtype_entry) { + if (argtype2 == *argtype) { + (*argtype)->probe->n_args--; + TAILQ_REMOVE( + &(*argtype)->probe->argtype_list, + *argtype, argtype_entry); + break; + } + } + } + } + + if (linker_file_lookup_set(lf, "sdt_probes_set", &p_begin, &p_end, + NULL) == 0) { + for (struct sdt_probe **probe = p_begin; probe < p_end; + probe++) { + if ((*probe)->sdtp_lf == lf) { + if (!TAILQ_EMPTY(&(*probe)->argtype_list)) + return (false); + if (!STAILQ_EMPTY(&(*probe)->tracepoint_list)) + return (false); + + /* + * Don't destroy the probe as there + * might be multiple instances of the + * same probe in different modules. + */ + } + } + } + + return (true); +} + +static void +sdt_kld_unload_try(void *arg __unused, struct linker_file *lf, int *error) +{ + if (*error != 0) + /* We already have an error, so don't do anything. */ + return; + + if (!sdt_kld_unload_probes(lf)) + *error = 1; + else if (!sdt_kld_unload_providers(lf)) + *error = 1; } static int From nobody Wed Oct 16 18:09:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTJrX532zz5Yq97; Wed, 16 Oct 2024 18:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTJrX4VKnz4qj0; Wed, 16 Oct 2024 18:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729102156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4cd0G/pg5nnj31ZSi552Cr7ypjm2VGn8tBGS+qybUZc=; b=o/aWZ6U5EoIt5ZRU9B3QtC/lrlpjgPpXUSgAIWFLWKTl1tlveJynuhaIrSPjbftGypVb4I Ve4b5W+7PEXnNcxYEw6x44e0zvpFqDwo4uooj2H/DLcZTcMI4A9nI9XTxQyfnhYKjZ/q+r QOfiOEiG+7nTiYXaafr/ENH4SDk3fQhEG2xSNLl2thR4gxP3exxXz9eXsZ7+OJSEV5GIqE afEFSlwFxnDRng/q6kRghzaePV1n8SagsyXYcDZCR5LxCgUbiq/fPBar3bH9gDkN3KAaxC qz0KLjasCi9n5DzVEHofAWeEeAmILJNlG8Wgr4W4tIH3OpDb3Bh5cHp/v7zPow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729102156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4cd0G/pg5nnj31ZSi552Cr7ypjm2VGn8tBGS+qybUZc=; b=IjMIkXG3h4RnaM42YqhH8NrDo095lwOHHtsF8CXbM8VeywnwNO8LmNaYXbet5k7nn8JSKh 0QhiZtKXbPE4vrc0bUaSzr4UkdJpnvU1UV9LyNwZ4aNw5h/gJMcCOV2UsabqzRppPdU+0+ /+G3imKQiIASDie9KQKyk53farpy+FWvINquRnG2hfSuuAx8UdaPBHKa6WZUyFTT2kQlAG C9o9R7imNiqZVHPLum6XKcsyw9yppxyIsZ/S430VUvcg7zyWWGkZGRGChVEipb4/fH3DdK x7Wh00+/pneIXA20acCekTAtxykbyOSiw1wlH4X1TqLo5i8miyPxF0ElacDChg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729102156; a=rsa-sha256; cv=none; b=hDTx84uhvBia1sDa64SyyBbyxxSbtknl7A79YOM5hHRF5nqHnVuYnBzHbHJIpEsMgRBTf3 VPS0bDcugFdAh7PoStvo2VKu1k6iQNO6fOaBx6OcMv+5tC1YT8qlHELsb1471jtIK9jJKL bFcpNlzeWqmEg7ekfHtSc4O2B9xcYpsZZcxY7TQrgIoNhwSEE/a3ug5AZ6PcecHvmu/f0Q MvIABqBPRROm+j2aPOLzBIGDP6ufaQqKzUfFhZpnJjzebDOl4WfOGcPdWmi3WPe1FBp1iw Hfbd4vS6eLsOxzvSFWV7CWVqVaeAVUV7PG8b76YK78H5Ch42z00cc+3sIl5rMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTJrX45bhzGF8; Wed, 16 Oct 2024 18:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GI9GPt046298; Wed, 16 Oct 2024 18:09:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GI9GiN046295; Wed, 16 Oct 2024 18:09:16 GMT (envelope-from git) Date: Wed, 16 Oct 2024 18:09:16 GMT Message-Id: <202410161809.49GI9GiN046295@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: 1ad335196656 - main - device_delete_child: Update comments 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: 1ad3351966563b71b9e45803abd5c3e12af3b65a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1ad3351966563b71b9e45803abd5c3e12af3b65a commit 1ad3351966563b71b9e45803abd5c3e12af3b65a Author: John Baldwin AuthorDate: 2024-10-16 18:08:24 +0000 Commit: John Baldwin CommitDate: 2024-10-16 18:08:24 +0000 device_delete_child: Update comments This better matches the variable names and the function comment as well as clarifying the reason for the order of operations. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47154 --- sys/kern/subr_bus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index ef71588f7157..f41884d576a8 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -1477,11 +1477,14 @@ device_delete_child(device_t dev, device_t child) PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev))); - /* detach parent before deleting children, if any */ + /* + * Detach child. Ideally this cleans up any grandchild + * devices. + */ if ((error = device_detach(child)) != 0) return (error); - /* remove children second */ + /* Delete any grandchildren left after detach. */ while ((grandchild = TAILQ_FIRST(&child->children)) != NULL) { error = device_delete_child(child, grandchild); if (error) From nobody Wed Oct 16 18:09:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTJrZ10Hhz5YqN5; Wed, 16 Oct 2024 18:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTJrY6Dkvz4r4m; Wed, 16 Oct 2024 18:09:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729102157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8FOnZrnieeaoMrbQY55VcDBCUkgY0AQHkiMkJp8RBqo=; b=VT6SYgPZwwrcBol2cfVcVdAx8ZVTNtKYgl4zKs4Z8vYCi1A6MysXIr3+IKp3eJAZoidEtI uFmM69KcS1JFdhnYUprfK7jQXfCqkGda/IOTUlF3ZshaimLq3pHGE76jyI8uVuRYqHU3l0 5zVMlSKkPHa+pvlLWEYTBF4DI5NkJfGPwGaamLKCu6DE2GlNbLzcEYnqk1I0gsxtEDaOd4 F1g3cqDUQQ6iHPbVrQNLMxQ3qSKAfOytVj02Ac+Z8rSmIgX/viIispmV9CfHnTLIcmaOuh hcaLL4zP42/mZV2RxPI1XSMqGmvYQB0FSgtjdVeoLg5lyeyBhDMUDtTzZh4UOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729102157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8FOnZrnieeaoMrbQY55VcDBCUkgY0AQHkiMkJp8RBqo=; b=our+2pynFBgKbVPXEo6taoUDMoHIOxwQhJm68ZDdO3nqWB6SUkRA6kSAj+G8PVy1N3o+vn J8SMIOhxrnfDrlGgXiuN9dd3p/Dqh8CTDwkk/k+VcubBBVOMQt52GcCZBwZYTwytWNfaIy sdYgfzrxGq8trBRYZKc2PuhwLqLoXE1EwhwbM+dVoFngYJ3dBfrkRfSML4QI2xwRdLBTgI yql6nadsEIjxOgqMaEocMHA0AfU7NToW8MObND4AAeH6/qQH9iMs8lAp22cAuMHBiKdAQW g0Dwp83FXxgVbn2+xJpqOQCvC8HU9c4CAc5WUdo5aKMBxQj3+wNRXxVjIUIpwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729102157; a=rsa-sha256; cv=none; b=O+dybtDFxH5YPULWT65D7m2lfLr+UZ0Aq9L/8Rt9I0jFH5fuRR56gz/kJPcQmC7hao8LTg +brsPF531LZ6g3UA1EqQN7wtOyiaMY0qhVaLFZTszCJJuCFsghqrjmcnHoR+RiJIcOCBKW ZmXBSD6d4e8KLrh+8pYypyD48uyqhuxHfOC0EP/ti5FxPOI1PQj8pv4tzjy1CDiDrtRG4V CKiIx0YaH8Li//Hkq4HoQC6BJJmpZDM2SQmUuDboqI+SkhSjhgMYe2ojzy6nfWnLVCLR0q sUN5XT1jYlSfB3ZwWF2BZ+zHP93FhNP8F0comcjnSL2xrfqlMeRPuqLci4nDiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTJrY54WWzGgr; Wed, 16 Oct 2024 18:09:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GI9H38046357; Wed, 16 Oct 2024 18:09:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GI9Hfk046354; Wed, 16 Oct 2024 18:09:17 GMT (envelope-from git) Date: Wed, 16 Oct 2024 18:09:17 GMT Message-Id: <202410161809.49GI9Hfk046354@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: 42078dfb0f72 - main - device_attach: Invoke BUS_CHILD_DETACHED if an attach routine fails 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: 42078dfb0f72edbf83217cc8c997c0a54d951990 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=42078dfb0f72edbf83217cc8c997c0a54d951990 commit 42078dfb0f72edbf83217cc8c997c0a54d951990 Author: John Baldwin AuthorDate: 2024-10-16 18:08:35 +0000 Commit: John Baldwin CommitDate: 2024-10-16 18:08:35 +0000 device_attach: Invoke BUS_CHILD_DETACHED if an attach routine fails This gives the parent bus driver the opportunity to cleanup any allocated resources, etc. left behind by a failed attach attempt. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47155 --- sys/kern/subr_bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index f41884d576a8..7140ca007b71 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2544,6 +2544,7 @@ device_attach(device_t dev) if ((error = DEVICE_ATTACH(dev)) != 0) { printf("device_attach: %s%d attach returned %d\n", dev->driver->name, dev->unit, error); + BUS_CHILD_DETACHED(dev->parent, dev); if (disable_failed_devs) { /* * When the user has asked to disable failed devices, we From nobody Wed Oct 16 18:09:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTJrb44v3z5YqFs; Wed, 16 Oct 2024 18:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTJrZ6c5Mz4r4r; Wed, 16 Oct 2024 18:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729102158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prM1F9AXVMTttV8aJ/nki/+lrqVrnN/LScDcXC1ryy0=; b=NzfYykyVeeNUJedIaNCsuWnT6Py32yuQDUImJVnGN0GQ3AVP+Nrp0E6cKy9AYTvbgao/3O f/qtoRF7dC+VWD2w7qMPC3ayLYUsfrBMFjLDGxpaEuQRl6/b3X62iTT1lyzFk5qHWgU0MM F3ZngrebWGDo1zhwDZGgJYA/eSCwb0EVaqjz/JS+PavmcVQbQG8073sjixWRO/pxSHEva+ JDIyNAYfBFpaVDVD2FDX8X1QwrZoIW/d8dMLc/7tZNbLCfO8LQHq3sy5ilKZnkkJzWbaY+ l4emj3J1TgOV81/f63g3GN6B5rZTJRqamivnRNQ9mOzz+loW7XyJin+4rbIc4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729102158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prM1F9AXVMTttV8aJ/nki/+lrqVrnN/LScDcXC1ryy0=; b=h5aostGddalhaj4eTRIYKHA/wtAOnlXwoRzflgoHYouTxhl+NijEaro8qPjNnHPoXTfAZR 9hvVMZ5TnDB86ADlXcWM9zGv/beAPDHqFlLjBIkLtCMH4DgJ4qZcOFFRuEeUG6q4dJgR0x W14KP5YUZX5i09dB95pJ4eDq4EmcgQGFDojl08dFKIPnbJkrFK2ivc7Cju6UCfkH7vJiGU Bb2wsPOqVvagNSxzeew/W+PPwIboga8aBcfWTAhrsMaseRpqQhyo4+iDlQPSlWtPbuMU1u AJyrjlXoENBQUu8aFmRKNJ6gqpRjt9LGA6JkfAy848DmXsrJwi9C67suXhGjFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729102158; a=rsa-sha256; cv=none; b=dtfWSo7pa/Wc1GL73LqQvdoRo3TJuMl9iN9KjllX3RiVK5dU4uRG9H2N/b1olTscQoVGcI th//wlmd0r8gI9pmDPD2RklwC2CyjvPQPtovgRHz90gW+VPUSbjAD9jVKwCVdI7vi7k7fa R+JZRZkP7BEWBFJwSsBHLoo27boOhNuwsII+eorowPaPKTS6zJvayH8Fo1RUzorHQao3C+ 3WTMqB7eBgyXquLhiyIt/Wptuml7VUXVN7dnHPIoH56xI8T+okzsVb1wD1ueF7obEo10G0 lkFlIa6nv4yFLmU0LaCWt2yhB2RR2k5O5a3lDXOVVlaCNUuwO8tCe2flkXYLrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTJrZ67BwzGWW; Wed, 16 Oct 2024 18:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GI9IHe046396; Wed, 16 Oct 2024 18:09:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GI9IC4046393; Wed, 16 Oct 2024 18:09:18 GMT (envelope-from git) Date: Wed, 16 Oct 2024 18:09:18 GMT Message-Id: <202410161809.49GI9IC4046393@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: 3342afcbaf42 - main - bus_generic_detach: Remove redundant check 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: 3342afcbaf42c2e6a4604c84e267901411e790ca Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3342afcbaf42c2e6a4604c84e267901411e790ca commit 3342afcbaf42c2e6a4604c84e267901411e790ca Author: John Baldwin AuthorDate: 2024-10-16 18:08:49 +0000 Commit: John Baldwin CommitDate: 2024-10-16 18:08:49 +0000 bus_generic_detach: Remove redundant check device_detach() checks the device state and only calls a driver's DEVICE_DETACH method if the device is attached but not busy. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47156 --- sys/kern/subr_bus.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 7140ca007b71..7c21325f8684 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3405,9 +3405,6 @@ bus_generic_detach(device_t dev) device_t child; int error; - if (dev->state != DS_ATTACHED) - return (EBUSY); - /* * Detach children in the reverse order. * See bus_generic_suspend for details. From nobody Wed Oct 16 18:09:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTJrc3ChBz5Yq9B; Wed, 16 Oct 2024 18:09:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTJrc08DZz4r7M; Wed, 16 Oct 2024 18:09:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729102160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=09efH7U2wsTP3De6ZP0hO2X+5Gf7QWVxnLOpjlo2X5s=; b=ZWH7PXsFRCVvECE6aHjyCIOaVoIJzcSgS+hAv/u7U0o/w+xap/q8acgl97/XMs6ntpvYD2 +W6Yy/aThmnK0Hk+jKZBNUau0779wva/EY5JqOY30G2rsyS6bGBwBUebSZsKcd3RMrE0Wv ndwg/dG0tp9CgAx6MPStBw1x8EwbmCp+eC7PlByvP+kGuwBqPLisZOamY9rsNeLV5jeGAa WHKO4Ful7GPkjtgz9xi2oQKkZtJ3D9l1yasvSbDf2+Tu3ga01jD5PNIGD46GlC4bwOeSBf Ep5GiNh5t2OgcCTIZSM2758W9pHA1YALramj8atzfIPQh4uRiExgQwuJ6wbOdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729102160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=09efH7U2wsTP3De6ZP0hO2X+5Gf7QWVxnLOpjlo2X5s=; b=OKEcQWHSh2k1PwcoXjqWVg8HAXUbvh4PYycKcEh16KQGJTh4NBjPJODMUCgRmEhvB5Bys4 qJg7zW+xhtl/TTVqfLAPgCgDX5MAERuKeDPBK1S6p90DSvYWTfSjCmrv9A+GUjl5gMo3zV z6RSN0bU86hPlezqDDjt/QMdWGtBcFSRO/pRKrMI/Z3cRWzYLZsU1SxKDdEbP1sc1TxoAT oj+l42DA/I5KZ9V3FeaNykVHQBDDSo7JQRkmyJ2JN9hpNl8recqZmTH8ZkxkuEgITA9cMX c5/gELgAlq3LMCkzwpOlT95W71f5pZdt6KMMt7ThvgKoQRjrEtGVrTN0lFggSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729102160; a=rsa-sha256; cv=none; b=pbL8svyHSf10UYR1DIyAvOMwU+EZ6rccdVKGZJpUQLzDWQ6b9hCW7zt8XoUaEdBVDZWofm ttpArgR3INmmapJNrjQ3Ysfk0npY9ncaA7UXRRcEPoTlzA/JVe9j33+V6PXsf6VSfJWvsy avZKTX4Pi6DH/hovX0rRfa+7v2eTD9CefbDM689Mmi9mtPShmGFvuwqNurBEzEzLohfGF/ wuakLkZlHb28gEPKBjQI6iKEb604nPxYdS32QIuojQXABd6m+4QVQZ6GMsDlat2NjZM9F3 meiPWb5EWfhhF9VQ/Ybl7asNUsUTvCLEiChdx2SbOsSwXUg5ZxUmU81opfXuNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTJrb6rYrzGYF; Wed, 16 Oct 2024 18:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GI9J9L046444; Wed, 16 Oct 2024 18:09:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GI9Jkr046441; Wed, 16 Oct 2024 18:09:19 GMT (envelope-from git) Date: Wed, 16 Oct 2024 18:09:19 GMT Message-Id: <202410161809.49GI9Jkr046441@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: 60516a51abd4 - main - devinfo: Output device description in verbose mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 60516a51abd4b09095bc70a830e4a2c5c761af04 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=60516a51abd4b09095bc70a830e4a2c5c761af04 commit 60516a51abd4b09095bc70a830e4a2c5c761af04 Author: John Baldwin AuthorDate: 2024-10-16 18:09:05 +0000 Commit: John Baldwin CommitDate: 2024-10-16 18:09:05 +0000 devinfo: Output device description in verbose mode The description is listed in angle brackets after the device name similar to device probe messages. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47157 --- usr.sbin/devinfo/devinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index a035d958ab80..25d5a3a36db2 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -134,6 +134,8 @@ print_dev(struct devinfo_dev *dev) { printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); + if (vflag && *dev->dd_desc) + printf(" <%s>", dev->dd_desc); if (vflag && *dev->dd_pnpinfo) printf(" pnpinfo %s", dev->dd_pnpinfo); if (vflag && *dev->dd_location) From nobody Wed Oct 16 18:40: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 4XTKX870JWz5Yrkq; Wed, 16 Oct 2024 18:40:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTKX865Fxz3xJR; Wed, 16 Oct 2024 18:40:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729104008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5NEF6DoN2QVq3w/b9RhYmW3uSw624M3Itjc6O9Z7tgo=; b=F78EVdoIOMxiWpEef0CAoIbzcuUhlTd320lhm88K7/ExmHZn7U0DaqX9/oggzgsF4S5TSa rbCqa5uqaQIiO24jQs2c0piBlDbEV2prWeS7xTioT9FPTo8AWzcDDQdLqHHKCtTNQiD3F3 egyO6FsiftZuaV/N6mFE2WVi0HSuRvuLXV7eDxd9zLnDpQCrrl5yzOPBoJQStN2wd3YEEX m0X8+9Ty7rr9ssD8UTSUTtTiTrQ+V5GRgJAmqwPl1n0Vv91r2AcNwTv6oYCjaDJy5L4ckO 3QNVdkAK53J7gFJ6joManRFWbRrD/5CR58OApBOMPGO2vowYwVLNVkA/7QMCbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729104008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5NEF6DoN2QVq3w/b9RhYmW3uSw624M3Itjc6O9Z7tgo=; b=qrUf4aTnHVZneVUKbYmApmvt4n/YgBX342dfqbUO3bqxUifJ04FWRQ5Zmfuru25oJavjpI rSz1ElESSkKQRYN+YXZTNKYnbaGk8lNm6SMrgEcI+k2DmYjzsj1fWtqmQN0byqnk+bSwry GT9+706xW5oXizUSqb9dycRQB4V0+MbfygwAKXPFIh3m1YEwnPg6CMPmu2UvwUlrlWjXyU JpYjO3FbUIGQ83aDYWY//AV0PN3jARBobIxZifE2neJJb4+0nc+GQMvHCXjqFvw+YNaQBo T4dMywkCzq3pisn4fG0bA60pmdWqNcQWbbIGYHAjIZwDYryBh0aLEWHJ5LatQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729104008; a=rsa-sha256; cv=none; b=pDpYFHqnu8W7S7rWmqnCP6UMnCBrJ329SS8g+1rCNFOQBYNVpbay+toguqZifM0Z2LRh1k Ub4dymNgPuUm1WKzEEtUV2y+KHAVnZtw42MnyUoP+W51QIUcUG5EbdN9eJWH6cry8AB798 5Y2+SlNHLkTZc+mUUIxmYMTJZABo1VNC4rIK4XiP+O9QkM8DmPHQ7ba7NorskwYfQTQ9n1 IuIX4u3VMItB/fd99sOOrXttczukwb7U8AsNFEX1mBN/JwSHQLBKyw3DyuUZ9Wgh1itQvF 0bi6x4t4sRjgEetM8bpfgwej1bdQgOzAA2SwJ/eiI2rZma+AzXD0Y5monXxc8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTKX85hPwzH1s; Wed, 16 Oct 2024 18:40:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GIe88R000412; Wed, 16 Oct 2024 18:40:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GIe8CR000407; Wed, 16 Oct 2024 18:40:08 GMT (envelope-from git) Date: Wed, 16 Oct 2024 18:40:08 GMT Message-Id: <202410161840.49GIe8CR000407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Pedro F. Giffuni" Subject: git: b88df1e893c4 - main - Reapply "sbin/ping: allow normal users to specify larger packets" 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: pfg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b88df1e893c455731c7915f72a3b97b078ab04e2 Auto-Submitted: auto-generated The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=b88df1e893c455731c7915f72a3b97b078ab04e2 commit b88df1e893c455731c7915f72a3b97b078ab04e2 Author: Pedro F. Giffuni AuthorDate: 2024-10-16 18:35:44 +0000 Commit: Pedro F. Giffuni CommitDate: 2024-10-16 18:39:48 +0000 Reapply "sbin/ping: allow normal users to specify larger packets" The ping tests were originally broken by an unrelated isue that is now fixed ( 2926c2594249f64fecbbdcb0b0b9a3591931ab04 ). THanks to kp@ for fixing the test and Jose Luis Duran for pinting it out. This reverts commit 7bc0cb91a2dfc7e23d96efd0fb7866ee2a23ba88. --- sbin/ping/ping.8 | 3 +-- sbin/ping/ping.c | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sbin/ping/ping.8 b/sbin/ping/ping.8 index 0eaec196e1e3..951049d0f252 100644 --- a/sbin/ping/ping.8 +++ b/sbin/ping/ping.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 15, 2023 +.Dd October 15, 2024 .Dt PING 8 .Os .Sh NAME @@ -312,7 +312,6 @@ with the 8 bytes of ICMP header data. .Pp -For IPv4, only the super-user may specify values more than default. This option cannot be used with ping sweeps. .Pp For IPv6, you may need to specify diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index d9d544bc75c8..e6b1247af497 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -96,8 +96,8 @@ #define DEFDATALEN 56 /* default data length */ #define FLOOD_BACKOFF 20000 /* usecs to back off if F_FLOOD mode */ /* runs out of buffer space */ -#define MAXIPLEN (sizeof(struct ip) + MAX_IPOPTLEN) -#define MAXICMPLEN (ICMP_ADVLENMIN + MAX_IPOPTLEN) +#define MAXIPLEN ((int)sizeof(struct ip) + MAX_IPOPTLEN) +#define MAXPAYLOAD (IP_MAXPACKET - MAXIPLEN - ICMP_MINLEN) #define MAXWAIT 10000 /* max ms to wait for response */ #define MAXALARM (60 * 60) /* max seconds for alarm timeout */ #define MAXTOS 255 @@ -458,11 +458,10 @@ ping(int argc, char *const *argv) errx(EX_USAGE, "invalid packet size: `%s'", optarg); datalen = (int)ltmp; - if (uid != 0 && datalen > DEFDATALEN) { - errno = EPERM; - err(EX_NOPERM, + if (datalen > MAXPAYLOAD) { + errx(EX_USAGE, "packet size too large: %d > %u", - datalen, DEFDATALEN); + datalen, MAXPAYLOAD); } break; case 'T': /* multicast TTL */ From nobody Wed Oct 16 19:04: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 4XTL4m20CLz5YtF6; Wed, 16 Oct 2024 19:04:56 +0000 (UTC) (envelope-from maxim@maxim.int.ru) Received: from maxim.int.ru (maxim.int.ru [167.71.75.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "maxim.int.ru", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTL4l3RXYz41Yk; Wed, 16 Oct 2024 19:04:55 +0000 (UTC) (envelope-from maxim@maxim.int.ru) Authentication-Results: mx1.freebsd.org; none Received: from localhost (maxim@localhost [127.0.0.1]) by maxim.int.ru (8.17.1/8.17.1) with ESMTPS id 49GJ4rSl029948 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 16 Oct 2024 19:04:53 GMT (envelope-from maxim@maxim.int.ru) Date: Wed, 16 Oct 2024 19:04:53 +0000 (UTC) From: Maxim Konovalov To: "Pedro F. Giffuni" cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b88df1e893c4 - main - Reapply "sbin/ping: allow normal users to specify larger packets" In-Reply-To: <202410161840.49GIe8CR000407@gitrepo.freebsd.org> Message-ID: References: <202410161840.49GIe8CR000407@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:14061, ipnet:167.71.64.0/20, country:US] X-Rspamd-Queue-Id: 4XTL4l3RXYz41Yk X-Spamd-Bar: ---- Hi Pedro, No, this is not right. Let me clarify: (1) I never told that there are any issues with the tests. I just mumbled that the tests should catch such regression though I never checked if they actually did. (2) The MAXPAYLOAD calculation in the code below is not fully correct. It should be 65535 - 20 (ip header) - 8 (icmp part) = 65507 without IP options OR 65535 - 20 (ip header) - 40 (ip options) - 8 (icmp part) = 65467 with IP options, ie. whenever you run ping -R. The code below hardcoded the latter value which is simply wrong. I wouldn't rely on the fact that you get it from other BSD flavours and would recommend to have this code reviewed before committing it. Maxim On Wed, 16 Oct 2024, 18:40-0000, Pedro F. Giffuni wrote: > The branch main has been updated by pfg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b88df1e893c455731c7915f72a3b97b078ab04e2 > > commit b88df1e893c455731c7915f72a3b97b078ab04e2 > Author: Pedro F. Giffuni > AuthorDate: 2024-10-16 18:35:44 +0000 > Commit: Pedro F. Giffuni > CommitDate: 2024-10-16 18:39:48 +0000 > > Reapply "sbin/ping: allow normal users to specify larger packets" > > The ping tests were originally broken by an unrelated isue that > is now fixed ( 2926c2594249f64fecbbdcb0b0b9a3591931ab04 ). > > THanks to kp@ for fixing the test and Jose Luis Duran for pinting it out. > > This reverts commit 7bc0cb91a2dfc7e23d96efd0fb7866ee2a23ba88. > --- > sbin/ping/ping.8 | 3 +-- > sbin/ping/ping.c | 11 +++++------ > 2 files changed, 6 insertions(+), 8 deletions(-) > > diff --git a/sbin/ping/ping.8 b/sbin/ping/ping.8 > index 0eaec196e1e3..951049d0f252 100644 > --- a/sbin/ping/ping.8 > +++ b/sbin/ping/ping.8 > @@ -25,7 +25,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > .\" SUCH DAMAGE. > .\" > -.Dd September 15, 2023 > +.Dd October 15, 2024 > .Dt PING 8 > .Os > .Sh NAME > @@ -312,7 +312,6 @@ with the 8 bytes of > ICMP > header data. > .Pp > -For IPv4, only the super-user may specify values more than default. > This option cannot be used with ping sweeps. > .Pp > For IPv6, you may need to specify > diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c > index d9d544bc75c8..e6b1247af497 100644 > --- a/sbin/ping/ping.c > +++ b/sbin/ping/ping.c > @@ -96,8 +96,8 @@ > #define DEFDATALEN 56 /* default data length */ > #define FLOOD_BACKOFF 20000 /* usecs to back off if F_FLOOD mode */ > /* runs out of buffer space */ > -#define MAXIPLEN (sizeof(struct ip) + MAX_IPOPTLEN) > -#define MAXICMPLEN (ICMP_ADVLENMIN + MAX_IPOPTLEN) > +#define MAXIPLEN ((int)sizeof(struct ip) + MAX_IPOPTLEN) > +#define MAXPAYLOAD (IP_MAXPACKET - MAXIPLEN - ICMP_MINLEN) > #define MAXWAIT 10000 /* max ms to wait for response */ > #define MAXALARM (60 * 60) /* max seconds for alarm timeout */ > #define MAXTOS 255 > @@ -458,11 +458,10 @@ ping(int argc, char *const *argv) > errx(EX_USAGE, "invalid packet size: `%s'", > optarg); > datalen = (int)ltmp; > - if (uid != 0 && datalen > DEFDATALEN) { > - errno = EPERM; > - err(EX_NOPERM, > + if (datalen > MAXPAYLOAD) { > + errx(EX_USAGE, > "packet size too large: %d > %u", > - datalen, DEFDATALEN); > + datalen, MAXPAYLOAD); > } > break; > case 'T': /* multicast TTL */ > -- Maxim Konovalov From nobody Thu Oct 17 09:16: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 4XThzb3T9vz5Ym7J; Thu, 17 Oct 2024 09:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzb1bK3z4HXV; Thu, 17 Oct 2024 09:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvBrvEFg6OcYVPX1w7EsCEshifQUqt+vkO6BQDiAKwo=; b=SUXzSJrhE2jGXXbxadWu9Ns0o1wsm4YMSxoDibjJ44k+I7DOejrCuwVxJldfNR/n5qdlW3 /nxxxbXrubHhjo3ESmNPjWojqRk/md3OfG50gSJwc3H0x89JAq7IsOUkU0Cr55+v55kx7P TnT8wtAEfPeme1TaGeN9tR9nhCL4noKpQq9TZ0V3fEOH6I8IbsK8PAuoGS/dmRe7OGqPXO 0wAiS3W6kHXCKzpSxT7sEvyZ/TmGnNIFj51vQUkpS/0cIEBbyVTIdTGhF9gFabZoATXYtM F1zltiYmJxnVdLW2SVuA0akU6PQUPzLsq586SLH+yu8BGUtOHCrSro2lMf6DoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvBrvEFg6OcYVPX1w7EsCEshifQUqt+vkO6BQDiAKwo=; b=psg7OJt7ZhbF+Bu33mlZtN7ksE8Vg5xjqqJKyfQv7qr9VgGY0qcuTFl85Tv9Gv4d21HjD9 V//qvAIeBSLY3h9ejNtRpFoqBxduC1UwBiuQzVoOami6ZjIi7Y2/wc3smgkn6gJrVgynJk tEA9Z3d5Ts9Qk0VNT+ve6EV9Yqmq1op+RdaTJw0L5NxhZZfklCpf6z659+M01qf3vC7RdX YQK+ZzNBcw7r0zDFjORjgzO1H1/9cYkwX4lmAorVuTaqu9O86zBbcrB/essq36ZZKJJq4k pGB7Cm5lzutpnvz5qbnX0qIK4H+jWSQ0fQFxDLEynnDj1jJFwIHSGHaUOPTapw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156603; a=rsa-sha256; cv=none; b=X0XXH+8IWjB0oOSZzCiMMnqfT0gKMpOAcEHI7yAbW3XVfw4+4RK1BtHhZ4HFnlwSatVijx 8nVRO9Lh0sJtwEnat/uFoQ5iQloMzqKaChH+sclIS+GQao3pYGfSL2JiPAI1UIrUPH8s0n A2rVcfcRaDKxa7SMF2wFRrKH6QsgPFrep4E75jaaN7xbPyuv/wD9EZzhNzfERLN0wyKnAy FdBc6xePFJ9UXRaQTD/XWMYJKjOUNtOqZO6q17pruJAOVifbJPLfrDwDr/3QBB1gep8NLk dq/sand35JW75EgKiJzi1tj4eRhToE/m3pinaXVCPe3Uhiw6ZNUAR68dNbLr5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XThzZ6xXMzk8r; Thu, 17 Oct 2024 09:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9GgTM087502; Thu, 17 Oct 2024 09:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9GgF1087499; Thu, 17 Oct 2024 09:16:42 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:42 GMT Message-Id: <202410170916.49H9GgF1087499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 65de0f1855f3 - stable/14 - LinuxKPI: 802.11: fix ieee80211_schedule_txq() to avoid rtw89 panic List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 65de0f1855f3e2e49413dfa03ffbfd6735d3e738 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=65de0f1855f3e2e49413dfa03ffbfd6735d3e738 commit 65de0f1855f3e2e49413dfa03ffbfd6735d3e738 Author: Austin Shafer AuthorDate: 2024-10-10 15:31:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:46:19 +0000 LinuxKPI: 802.11: fix ieee80211_schedule_txq() to avoid rtw89 panic rtw89 TX path was faulting in linuxkpi_ieee80211_next_txq() due to a "double scheduling" check in linuxkpI_ieee80211_schedule_txq() being incorrect: the next pointer may be NULL there if the element is the last in the tailq, so correctly check tqe_prev. Without the fix we may have queued the same element to the tailq twice, and because it was the last element and had a NULL tqe_next, that NULL value would get propogated into another node's tqe_prev on removal, and other such nastiness. With this rtw89 no longer panics. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D47006 (cherry picked from commit 41b746e05231b44c87f3a3087a7fe29966af6d0f) --- sys/compat/linuxkpi/common/src/linux_80211.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 56bc9252511a..ff257bf32766 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -6075,8 +6075,12 @@ void linuxkpi_ieee80211_schedule_txq(struct ieee80211_hw *hw, if (!withoutpkts && ltxq_empty) goto out; - /* Make sure we do not double-schedule. */ - if (ltxq->txq_entry.tqe_next != NULL) + /* + * Make sure we do not double-schedule. We do this by checking tqe_prev, + * the previous entry in our tailq. tqe_prev is always valid if this entry + * is queued, tqe_next may be NULL if this is the only element in the list. + */ + if (ltxq->txq_entry.tqe_prev != NULL) goto out; lhw = HW_TO_LHW(hw); From nobody Thu Oct 17 09:16: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 4XThzc29lbz5Ylxk; Thu, 17 Oct 2024 09:16:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzc1DQyz4HZC; Thu, 17 Oct 2024 09:16:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4y/F/1pYSV+wXWyapvIZLgg0AR9Jqtnv+b3f8TTAnk=; b=sjF/hH686UJzbiOar3G3aVZ+kp/NaLp7P5rRx9zTh9VjEsgtWFX/HkCT7ODFzzbMAP5CQI 65DIfIlgtVlnL7eDV267f7rX05QkubFqW6qvORFj/xf8I+RQ9qUgS9ErmkEhUYs7WJoMER OZBkLuMbhXzGBeSCnsE0zpWlkp6UgKIZOX6V5Pmgf9MVN4pMsmigKryZcs4UMuEvsqgkkM Cj/yhCtttLqzvsLkrDG8SkKqDq1itjRFdHCu1MrwI9f92/K68NeJ08EGj1lU7CAR2Cfgnx qwH1MrjydHIXgq+Mn7gknfcSVisXoLyMHJmIb1kiyO0x0yTl+jcoik5PtyGukQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4y/F/1pYSV+wXWyapvIZLgg0AR9Jqtnv+b3f8TTAnk=; b=k/UWArckOF83HuNdTStuDwW9VtDJCE7a+GF2+E4Wj+INfpIEpb0aPGV8+HaKRzcvAHczi6 tjcoOSmZofAwO4F5FKI3nsXJUmtIno+ipPX5O3UghHZbf6oiDmG0y2uQfuQ/xmGgd565CL XSXOAD5VkzkT8ZwaDdHaVoo74yw3tEtof4NuWYQcTEuL8pLyW/Y5LhyI8xHVdi9NgPf8Hg P7SJ9ZJR/Xe5CnzVVnL7gtk7J5ocV0i51/4eW6ddxvNi9XobPAaOBRzpSV621FL0e4h5+Z BcV4l3qUXEU0eceLMJ1oEu7xS+Vlp4HjL1f2mLgzpz4G5dQ1j7l8Y4rnYnVCtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156604; a=rsa-sha256; cv=none; b=P0nPpZF2gkooxBMwm7eOI83x8UNErcB7djIzy8x6KtTgM67rNTB5N6cHZAh0lvdKFlUcWV dsHlQg6JKVyG58JwsrsLRnLKT6hP4qZ6UOuifUBsM2Ggtn/SPYJPHxMIsnSRvQowjq+WCz NkVjLe9e+Cuq+n5WUHTn2Fi/zZYsvp483Mq5iire0vep5HlqedQn8KIuscMaLuc0YZ+WsT 7yLlypAn8ippwofBPtcoabIfk8/ECf9nLn2vj7BUicp0J9DEPgZxzbS/c6+kbgJVh/5JLv MO7zuTRPiO6dTe6nBFGldaLXFs61DaheROqWz7smo5G+5N2dXg5cgpt09/oWAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XThzc0qj0zkRm; Thu, 17 Oct 2024 09:16:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9GimG087563; Thu, 17 Oct 2024 09:16:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9GiVs087560; Thu, 17 Oct 2024 09:16:44 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:44 GMT Message-Id: <202410170916.49H9GiVs087560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 9bb9bfc76941 - stable/14 - rtw89: add missing bsddriver.name assignments for two chipsets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9bb9bfc76941e5a72560e57499cbad6d856fc75f Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9bb9bfc76941e5a72560e57499cbad6d856fc75f commit 9bb9bfc76941e5a72560e57499cbad6d856fc75f Author: Bjoern A. Zeeb AuthorDate: 2024-10-10 23:07:55 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:46:27 +0000 rtw89: add missing bsddriver.name assignments for two chipsets On FreeBSDs we locally set bsddriver.name in struct pci_driver to have the same name for all chipsets. This helps with, e.g., device enumeration. For two chipsets the manual entry was missing. Sponsored by: The FreeBSD Foundation (cherry picked from commit ce15215befa1022d9a20ec15bdb0739dbe55f10f) --- sys/contrib/dev/rtw89/rtw8851be.c | 3 +++ sys/contrib/dev/rtw89/rtw8852be.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sys/contrib/dev/rtw89/rtw8851be.c b/sys/contrib/dev/rtw89/rtw8851be.c index 0f7711c50bd1..76216b790450 100644 --- a/sys/contrib/dev/rtw89/rtw8851be.c +++ b/sys/contrib/dev/rtw89/rtw8851be.c @@ -78,6 +78,9 @@ static struct pci_driver rtw89_8851be_driver = { .probe = rtw89_pci_probe, .remove = rtw89_pci_remove, .driver.pm = &rtw89_pm_ops, +#if defined(__FreeBSD__) + .bsddriver.name = KBUILD_MODNAME, +#endif }; module_pci_driver(rtw89_8851be_driver); diff --git a/sys/contrib/dev/rtw89/rtw8852be.c b/sys/contrib/dev/rtw89/rtw8852be.c index ecf39d2d9f81..be96ff56d699 100644 --- a/sys/contrib/dev/rtw89/rtw8852be.c +++ b/sys/contrib/dev/rtw89/rtw8852be.c @@ -82,6 +82,9 @@ static struct pci_driver rtw89_8852be_driver = { .probe = rtw89_pci_probe, .remove = rtw89_pci_remove, .driver.pm = &rtw89_pm_ops, +#if defined(__FreeBSD__) + .bsddriver.name = KBUILD_MODNAME, +#endif }; module_pci_driver(rtw89_8852be_driver); From nobody Thu Oct 17 09:16:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XThzd2YpJz5Ylxl; Thu, 17 Oct 2024 09:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzd1m90z4HVG; Thu, 17 Oct 2024 09:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zL49oYIjqCGcupqXJP6CnMw76Q61Hshv5huAxaslvLw=; b=YNejMiJsFhhc9g8SbbQZWn46Hgqx7aWlxbblQ8E8fYQuxWk8eaWMt++d5Oo9BtWzB13UGT cMfY33FtVIr33rQ9J9E0mnm8yvzAfYHFsNI3spVPs8ZHiV8c+sDvMxrifKqVqPDxBacBDv xb5kvkNTsPfLzc2SMJb3ZKjc+eK+zn4GvHNrrkhkJDj6kAqWUWK2UlEoq/+jWggclwU18e GeDdgC1NPDBAwnzcBGcMMtdOrvfHTkoAuyMEIuO8f5sze92JJJiORlwgF/cDWgiXDganM4 Z5MrQiU4rAqQbk5zhtQlFH6DHli2E0MCz/e0YU/cROxkWbPsd9LgAzYlsHElew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zL49oYIjqCGcupqXJP6CnMw76Q61Hshv5huAxaslvLw=; b=yTA6g1Qj5WIZsI3cHJsX7oad9NAb6TBoMJYq+CuLF3RLJeKsKH/AJYBNNfpyt2suqnnoYv FUkyvi4cqO2MuZCYwZcaOni9ErFI6aLTQcAw0+vHLbtIsqM62FYSEpGEz7ey9rhOj++IOr zzu8KcIUg6mw4MgBoGUM6wIo+N6E2X9buRTXW4DsAW5WsWI18yVnz4WvkCDhbF86RvR+Ua fWS9JYhJjFAv+tuOwN9LZW6HnLwgQLpJSwMmRR6tRda92zq7XoMQJ6nMiBLri8o5zfRbQb EjFDJD48zYf7kjEWHn4/jraGF77iUnzx+Rnm0wHN3TpL8hMpBZTWbtwh0P/6Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156605; a=rsa-sha256; cv=none; b=s1csOZlHnShFEILK/v1u3Oo+a8MruEC/HzjMvy7o1HHxn7iDcSLHg5D8hHg1R9OXS6GgBM QZBqiKzbXDVX3rs9gSPi4y9nzydJnoMOFvcKcDftSFmAHjxc9e2YExnGcenJW9P+oPEF2e 7hJ9aazTHBrERLzZeiUyP61CdHNpJX54aFSbK9fDL6gpTwqq9MRgLEL6z+IEWScLbKpsAk Ql6TS1318vBH85TKi4128IVDRm30h9gZWzvWMw7MWyMSKwUMVIWhh80crntvmcloEIM0nr pup9ngsanFUCvmTgS8r+fTt13afk7BW+pzjxF5EUm24NGurt0iCvefAabzc8Wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XThzd1Mn1zkBn; Thu, 17 Oct 2024 09:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9Gj3W087627; Thu, 17 Oct 2024 09:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9GjHa087624; Thu, 17 Oct 2024 09:16:45 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:45 GMT Message-Id: <202410170916.49H9GjHa087624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a2d1e07f6451 - stable/14 - rtw89: add man page and hook driver up to the build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a2d1e07f6451fa5d1803e6dba819db2020bf1c31 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a2d1e07f6451fa5d1803e6dba819db2020bf1c31 commit a2d1e07f6451fa5d1803e6dba819db2020bf1c31 Author: Bjoern A. Zeeb AuthorDate: 2023-04-18 15:17:41 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:49:29 +0000 rtw89: add man page and hook driver up to the build After two years, add the initial man page and hook Realteks rtw89 driver up to the build for more people to test given successful reports. devd.conf is already providing support based on the rtw regex. The driver uses the LinuxKPI compat layer. Firmware is provided by ports: net/wifi-firmware-rtw89-kmod or one of the flavours. People are advised to used fwget(8) to automatically install the correct firmware for their chipset. Please note that for the moment the driver requires a tunable to be set in loader.conf: compat.linuxkpi.skb.mem_limit=1 Many thanks to everyone who in the last two years helped testing, debugged, submitted patches to get the driver to this stage where initial functionality seems working. Sponsored by: The FreeBSD Foundation (cherry picked from commit 310c31d3f04ef9d3ebe598fd076d017a48d0ca0d) --- share/man/man4/Makefile | 1 + share/man/man4/rtw89.4 | 126 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/modules/Makefile | 2 + 3 files changed, 129 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index d4b5e39e94d9..7f6c9a501238 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -474,6 +474,7 @@ MAN= aac.4 \ rtsx.4 \ rtw88.4 \ rtw88fw.4 \ + rtw89.4 \ rtwn.4 \ rtwnfw.4 \ rtwn_pci.4 \ diff --git a/share/man/man4/rtw89.4 b/share/man/man4/rtw89.4 new file mode 100644 index 000000000000..2e1f2676eb8e --- /dev/null +++ b/share/man/man4/rtw89.4 @@ -0,0 +1,126 @@ +.\"- +.\" Copyright (c) 2023-2024 Bjoern A. Zeeb +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 10, 2024 +.Dt RTW89 4 +.Os +.Sh NAME +.Nm rtw89 +.Nd Realtek IEEE 802.11ax wireless network driver +.Sh SYNOPSIS +The driver will auto-load without any user interaction using +.Xr devmatch 8 +if enabled in +.Xr rc.conf 5 . +.Pp +Only if auto-loading is explicitly disabled, place the following +lines in +.Xr rc.conf 5 +to manually load the driver as a module at boot time: +.Bd -literal -offset indent +kld_list="${kld_list} if_rtw89" +.Ed +.Pp +It is discouraged to load the driver from +.Xr loader 8 . +.Sh DESCRIPTION +The +.Nm +driver is derived from Realtek's Linux rtw89 driver. +.Pp +This driver requires firmware to be loaded before it will work. +The package +.Pa wifi-firmware-rtw89-kmod +from the +.Pa ports/net/wifi-firmware-rtw89-kmod +port needs to be installed before the driver is loaded. +Otherwise no +.Xr wlan 4 +interface can be created using +.Xr ifconfig 8 . +One should use +.Xr fwget 8 +to install the correct firmware package. +.Pp +The driver uses the +.\" No LinuxKPI man pages so no .Xr here. +.Em linuxkpi_wlan +and +.Em linuxkpi +compat framework to bridge between the Linux and +native +.Fx +driver code as well as to the native +.Xr net80211 4 +wireless stack. +.Pp +While +.Nm +supports all 802.11 a/b/g/n/ac and ax +the compatibility code currently only supports 802.11 a/b/g modes. +Support for 802.11 n/ac is to come. +.Sh LOADER TUNABLES +.Bl -tag -width indent +.It Va compat.linuxkpi.skb.mem_limit +If you are running a 64bit system with more than 4GB of main memory +you need to set this tunable to +.Sy 1 +in +.Xr loader.conf 5 +and reboot once to make it effective. +This tunable will work around a problem with DMA and limit allocations +for network buffer memory to the lower 32bit of physical memory and +make the driver work. +.El +.Sh HARDWARE +The +.Nm +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It Realtek 802.11ax wireless 8851be (RTL8851BE) +.It Realtek 802.11ax wireless 8852ae (RTL8852AE) +.It Realtek 802.11ax wireless 8852be (RTL8852BE) +.It Realtek 802.11ax wireless 8852ce (RTL8852CE) +.El +.Sh BUGS +Certainly. +.Pp +Does not seem to work (reliably) on machines with more than 4GB of +main memory. +See in the +.Sx LOADER TUNABLES +section above. +.Sh SEE ALSO +.Xr wlan 4 , +.Xr fwget 8 , +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 14.2 . diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 674ae1a86bc5..45eec38565e2 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -342,6 +342,7 @@ SUBDIR= \ rtsx \ ${_rtw88} \ ${_rtw88fw} \ + ${_rtw89} \ rtwn \ rtwn_pci \ rtwn_usb \ @@ -572,6 +573,7 @@ _rtw88= rtw88 .if ${MK_SOURCELESS_UCODE} != "no" _rtw88fw= rtw88fw .endif +_rtw89= rtw89 _vmware= vmware .endif From nobody Thu Oct 17 09:16:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XThzf51mCz5Yld5; Thu, 17 Oct 2024 09:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzf3brQz4HZN; Thu, 17 Oct 2024 09:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rs3/kCuKg2+4ITUgp8cyV858OY+/YRtvbKLQRab7/i0=; b=axII1X2E4SVe7rWWYI+EkURx8QhQKe42fRguedCGOIEzUem2tBtbhRqkXprSlzbqG5v/+1 kMSgNKdO9suakTB5TnzAQUNBQL8B9zk+Mi92qHFdaHlnCcGF9L6c9CvykXdCKzXvziQZhy xpGEm6NN5wf4lW1NJag0diVtckzn50n3ZcWfnyXg6z4dnl48z2gB73PQJqf9YC4hl07aa+ XvXvM45yFqSNTw4lqDgbYpZIu46oSq8MMjiKykYoEAcmAFpokHfB0fcOID5oCXiPfI5XOO qouye6a3CrLTUaPIu7LuIW6AhuD/bh9MF5lciayK+el4QYWG91SdHLSAVlm/Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rs3/kCuKg2+4ITUgp8cyV858OY+/YRtvbKLQRab7/i0=; b=GbqfvMHdNPLnppQJLh75rpK0cxw2vBEA0Q3E1wsoTjG8imyuveJsGg88H9yOAfBL5XdWZH SO8IwemlU52+PLYPFLCIZVKvzV+BsdbKsf3kyebHjWhmfy47zeAJy/a4X270Sr8jWgLF4B WEoWmNzZ6IYLdwjnmU+b5DvOQUcVE6z4y4pfg0I9DsGWSP/DgsrqgCszzt4PQVmuhtAdtM CJ7AH56CpYResp89J4EOxQkP0eNGjALkR/KXSMk7H/cqT+MBGjIrOWD/5hlxIDaX5EB2CM IeaLPLJJhEcb1Px0dF95u/Bwl/ZffG288S615k5f63U/uG1WrZHx0BK/HPIeaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156606; a=rsa-sha256; cv=none; b=rBM6rKnRkCTtCbasV1gtEDG+68KeotPEe54ID+sDmGPsp4B4vRGm7pIL5/1eOtDdrTMKZi ksZ9re2+rtYVFB8CnPMV1oBfFngvhVZYNSJOFU16sD6bY5+TavYTyO/qmI2FvK1FeqPWen F55069sUTCl5UyJd1j9sGu5aFk91lpPYasDIzYGCUr8g0rophTl+P5japJPGA1OODZ5kWT 2Iu+wFP8I9vEW8onlUiAfze1F1KdUkuYBYAfpE0c9iULY4zF1iSah+gSGAbpUuZ4/x3odq wC9XO9YhKS4NbNzuP6hxyrTOZknG9PVwOuIp9jejnyOphLrJS6Ij+UBhOAwB+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 4XThzf2dh1zkcL; Thu, 17 Oct 2024 09:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9GkaT087675; Thu, 17 Oct 2024 09:16:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9Gkgx087672; Thu, 17 Oct 2024 09:16:46 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:46 GMT Message-Id: <202410170916.49H9Gkgx087672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 080484840344 - stable/14 - LinuxKPI: add time_is_before_jiffies() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 080484840344fbf243b67f2541bb3be296679a8b Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=080484840344fbf243b67f2541bb3be296679a8b commit 080484840344fbf243b67f2541bb3be296679a8b Author: Bjoern A. Zeeb AuthorDate: 2024-09-28 22:32:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:49:40 +0000 LinuxKPI: add time_is_before_jiffies() Add time_is_before_jiffies() as needed by iwlwifi from v6.11. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46841 (cherry picked from commit 8f9567628cb2ccb335640c4bb044df2ebf45d83a) --- sys/compat/linuxkpi/common/include/linux/jiffies.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/jiffies.h b/sys/compat/linuxkpi/common/include/linux/jiffies.h index d5cb6e14860e..bd05a0db0767 100644 --- a/sys/compat/linuxkpi/common/include/linux/jiffies.h +++ b/sys/compat/linuxkpi/common/include/linux/jiffies.h @@ -52,6 +52,7 @@ (time_after_eq(a,b) && time_before_eq(a,c)) #define time_is_after_eq_jiffies(a) time_after_eq(a, jiffies) #define time_is_after_jiffies(a) time_after(a, jiffies) +#define time_is_before_jiffies(a) time_before(a, jiffies) #define HZ hz From nobody Thu Oct 17 09:16:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XThzg66ywz5Ym52; Thu, 17 Oct 2024 09:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzg437Dz4Hg6; Thu, 17 Oct 2024 09:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9s9xSgJSQl6Wfor7ocsKtx8OA1OVsZdHqpUz7Enh8Gs=; b=FluZqW2KY2KL9W+otELb5av3gdd0m+jjaubX/1liK0adptPyZfxKUhWDFvFMB/sRFJX2It 5IbJ27jN7hemvOdHNMaGnHg2asm4r5T/lyUS+SNN5MDnAI6s8xgfIdFKvY+0CTH2Re6sNX ZaLDHiMzJm6ASrj4Wbe9IxczFek2R4k7Nm9eW/vgKuEj8cUaJGf0mK9dbYW4GgtXFMe7xi wYvO8iyQASJ9/Kdv43OZrIOp6B3CJxdpWlCtwzmBonR72VPcUDBUgznZLH72ZLdsuIhQKV v8Kz+CPfvOrwsboh7tvZjyCN7P6n+PE/GVqzWThr+WBIPajmE/xsK9UBTLETAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9s9xSgJSQl6Wfor7ocsKtx8OA1OVsZdHqpUz7Enh8Gs=; b=PvrZx2EQGPahDVsM8hzp4pqjCjIAeqYQDtgbniJATrJedWvdA0ApjSBP7UKD6l7W4uVQRE Ki0+9aoQxS8oJ+g6pOPJogvvGQXvOxQzZ+uli8djn1UL/BpnokAu1qOqSHG9VylihQRGSb X3RXs9tJYP0WDVKoRS9kV+QwlKiTOUtcVmB8uxRahjkJjxcnhz5G4TlmSkuvh0pIi7ZZyr 7b+vWEXE+xV6iM969wNJbUxHCYk9zV2YPJv0qMtb7HojXEdtdjDpa67xpKZwzy+lmJKPPo TfbGIwFCUP3kWl/yIognQoc0D648fIIsbbI4SUwl/tF7Q5rERSv4f+oerttpQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156607; a=rsa-sha256; cv=none; b=lOaakiKzdWIWtwudp59AWO7kMIkIKLM29E2X6SLgqovyGIhkNRviPsFa3Q6r1EGmB46PNk vPw66Ta3XFBO73Qcuzf2aV0WRlIvT5jXrjH323dNn8BVpK3h0RTnA68Cc4fq/T2hmHDsvQ JNSY0f6paagS9UU9EJva2JB+Zs+wGk7FiBoG1yKq/hpqH98AVZZLNnHAL3KP8ilYZiKDIu JMJIBGkQxWSkx62efv0a+syo7lfIx83m/p+9/Uy+gEI+YPG3GxzpGnOKm4OxKyMUPxWXy3 Ffg+L9qbBLFejwRbxY6j0l5ZJtBVwR9+v2HsZLJCHGyD/FxowxtKYxT4zgdACA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XThzg3cTJzkRn; Thu, 17 Oct 2024 09:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9GliS087717; Thu, 17 Oct 2024 09:16:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9GlIM087714; Thu, 17 Oct 2024 09:16:47 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:47 GMT Message-Id: <202410170916.49H9GlIM087714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 20fe7e889f3f - stable/14 - LinuxKPI: always include linux/kconfig.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 20fe7e889f3fa6cdd3587ee03cbd2fe4d9d38041 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=20fe7e889f3fa6cdd3587ee03cbd2fe4d9d38041 commit 20fe7e889f3fa6cdd3587ee03cbd2fe4d9d38041 Author: Bjoern A. Zeeb AuthorDate: 2024-09-26 21:36:17 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:49:45 +0000 LinuxKPI: always include linux/kconfig.h Always include linux/kconfig.h which seems to match Linux behaviour and avoid errors compiling code expected from that file but never included. Sponsored by: The FreeBSD Foundation Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D46801 (cherry picked from commit 41283b454b7abd3de251ec8234d19b67dbca3916) --- sys/conf/kern.pre.mk | 3 ++- sys/conf/kmod.mk | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 53b9862f2145..6c027ca7c208 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -318,7 +318,8 @@ NORMAL_CTFCONVERT= @: # Linux Kernel Programming Interface C-flags LINUXKPI_INCLUDES= -I$S/compat/linuxkpi/common/include \ - -I$S/compat/linuxkpi/dummy/include + -I$S/compat/linuxkpi/dummy/include \ + -include $S/compat/linuxkpi/common/include/linux/kconfig.h LINUXKPI_C= ${NORMAL_C} ${LINUXKPI_INCLUDES} # Infiniband C flags. Correct include paths and omit errors that linux diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 48872f88932d..9310f1572b41 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -109,7 +109,8 @@ LINUXKPI_GENSRCS+= \ LINUXKPI_INCLUDES+= \ -I${SYSDIR}/compat/linuxkpi/common/include \ - -I${SYSDIR}/compat/linuxkpi/dummy/include + -I${SYSDIR}/compat/linuxkpi/dummy/include \ + -include ${SYSDIR}/compat/linuxkpi/common/include/linux/kconfig.h CFLAGS+= ${WERROR} CFLAGS+= -D_KERNEL From nobody Thu Oct 17 09:16: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 4XThzj0Nrjz5Ym38; Thu, 17 Oct 2024 09:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzh53xrz4HPc; Thu, 17 Oct 2024 09:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6M6KMDw8qEr2UkxqC6YwdMAnpPh0ztsupTFJFhoESkM=; b=YqfwPye3ZYRP3oRTwgdGkvsmsvzHUdIdZEF9OAbv3GTB7GjBtpswKUq7BhGUBDU1RIg6+X XQj3FZS664l7ScodYlW13sJef4WYfIbymq2ql00y22j0ti6GG6LpaHeL1LXCMzbP+OYRUO 7fGxrF9XkMR3UNWIOy6M6L5CWVUhLkSIsyLI0OhU9m/z+G8a2cIGGsIjST3Ynpti4q6gFn WyjNusCVTLgBMMHVrFBHTrnTpdqjPWEwJ8MhrZkcNIqbIdM8XPbakhZ2FOxHAeYoBABv69 1LdVhG4ZPkwTf/MrUZUO1cos9sdTazU7FIXOwcIw4vHI1C1AmQ+VS5uaj+n6ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6M6KMDw8qEr2UkxqC6YwdMAnpPh0ztsupTFJFhoESkM=; b=vyl1CuabwTLN5fFr21sj0xsrgkLF5WsIBT6pEuv2uuMkUI4QPvFP//6l4VaghEUju/duwI CXRIqsTR6TdfpXAZPbagshmxbSgHh+HAzjicZYGGiAtDEgalj98kZXNe3htmHy4NQMu5rP 7i5cQSAXLhpAe8hbjCBdoMBqN8A525pSBAHfM62WezlQdikfbwXj4hqsqi4pVj050tZYex 9s1aB3CBBZHYcHtSl+vD0biX+QpgTVwrt4oXnGGDO5dgIuNx48R991AWhv/nEnWEaYnGB/ dJKuOTpG7/CKX/lm4tSno2jwTpiTDy38QPaqGktIqJTc5LcQ7rUVgvv8ztV0mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156608; a=rsa-sha256; cv=none; b=MLIIpIKvzpPSX/13m4XQgH4XpT3Wj4quxyGpmuJy+T0xh4M258+C1UjlHWsuUi0IK41QZk E6UqojBfbG8DGUkPIPoML5qoMZpP6UIjdFdupsT7kjH4kyKlmlp29rehxCxUy1e/fX1LKY N9MV4aF3shgc78DpyRPp4kVhekRU3HL/J0VJ6jsWFGme0qaxAz1//iTVV/VaffS1qh4V2+ AWToYP4ZniJ53P4jN/YBs5l9vsZPPbNkB7iXw+nE8qGcWxWzjCH6bkZVi7pn10tj+6A0q8 WaLv8+IRbqOVtXUzx/1f2z2zW4frBbH4Q1WQ9aka+S3nTVQW2dgQzVqB0ZZA+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 4XThzh4hHVzk8s; Thu, 17 Oct 2024 09:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9GmpG087780; Thu, 17 Oct 2024 09:16:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9Gm5G087777; Thu, 17 Oct 2024 09:16:48 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:48 GMT Message-Id: <202410170916.49H9Gm5G087777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 775a6c0036a9 - stable/14 - man.4: Add .Sh HARDWARE for some wireless drivers for release notes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 775a6c0036a90e4f6eef5f890eda4cc23defdb62 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=775a6c0036a90e4f6eef5f890eda4cc23defdb62 commit 775a6c0036a90e4f6eef5f890eda4cc23defdb62 Author: Bjoern A. Zeeb AuthorDate: 2024-09-30 20:01:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:50:19 +0000 man.4: Add .Sh HARDWARE for some wireless drivers for release notes iwlwifi.4 and rtw88.4 did not show up in the hardware list in the release notes for 13.4. The doc/website/tools/hardware-notes-processor.rb script parses the .Sh HARDWARE section to automagically create a note once the manual page is listed in the website/archetypes/release/hardware.adoc file. While here update the other committed man pages not yet connected to the build. Reported by: re (cperciva), grahamperrin Sponsored by: The FreeBSD Foundation Reviewed by: concussious.bugzilla_runbox.com (Alexander Ziaee) Differential Revision: https://reviews.freebsd.org/D46851 (cherry picked from commit 5dbb0b7c19cf40ab6562c03396d245cf3a7374fe) --- share/man/man4/ath10k.4 | 31 ++++++++++++----------- share/man/man4/iwlwifi.4 | 65 +++++++++++++++++++++++++----------------------- share/man/man4/mt7915.4 | 19 ++++++++------ share/man/man4/mt7921.4 | 19 ++++++++------ share/man/man4/rtw88.4 | 25 +++++++++++-------- 5 files changed, 87 insertions(+), 72 deletions(-) diff --git a/share/man/man4/ath10k.4 b/share/man/man4/ath10k.4 index 61c44543815f..4e23382e2450 100644 --- a/share/man/man4/ath10k.4 +++ b/share/man/man4/ath10k.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2022 Bjoern A. Zeeb +.\" Copyright (c) 2022-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 22, 2023 +.Dd September 30, 2024 .Dt ATH10K 4 .Os .Sh NAME @@ -47,18 +47,7 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from Qualcomm Atheros' Linux ath10k driver and -provides support for the following PCI chipsets: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It QCA6174 -.It QCA9377 -.It QCA9887 -.It QCA9888 -.It QCA988X -.It QCA9984 -.It QCA99X0 -.El +driver is derived from Qualcomm Atheros' Linux ath10k driver .Pp This driver requires firmware to be loaded before it will work. The package @@ -87,6 +76,20 @@ While supports all 802.11 a/b/g/n and ac the compatibility code currently only supports 802.11 a/b/g modes. Support for 802.11 n/ac is to come. +.Sh HARDWARE +The +.Nm +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It QCA6174 +.It QCA9377 +.It QCA9887 +.It QCA9888 +.It QCA988X +.It QCA9984 +.It QCA99X0 +.El .Sh SEE ALSO .Xr wlan 4 , .Xr ifconfig 8 , diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4 index 1cf61c0008b5..ddeeb549d0f4 100644 --- a/share/man/man4/iwlwifi.4 +++ b/share/man/man4/iwlwifi.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2021-2023 The FreeBSD Foundation +.\" Copyright (c) 2021-2024 The FreeBSD Foundation .\" .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from .\" the FreeBSD Foundation. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 21, 2023 +.Dd September 30, 2024 .Dt IWLWIFI 4 .Os .Sh NAME @@ -54,10 +54,39 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from Intel's Linux iwlwifi driver and provides support for -all chipsets supported by the +driver is derived from Intel's Linux iwlwifi driver +.Pp +.Nm +will be a successor to +.Xr iwm 4 +and may supersede that driver in the future. +It still complements the +.Xr iwn 4 +driver which supports older chipsets. +.Pp +The driver uses the +.\" No LinuxKPI man pages so no .Xr here. +.Em linuxkpi_wlan +and +.Em linuxkpi +compat framework to bridge between the Linux and +native +.Fx +driver code as well as to the native +.Xr net80211 4 +wireless stack. +.Pp +While +.Nm +supports all 802.11 a/b/g/n/ac/ax +the compatibility code currently only supports 802.11 a/b/g modes. +Support for 802.11 n/ac is to come. 802.11ax and 6Ghz support are planned. +.Sh HARDWARE +The +.Nm +driver supports PCIe devices from the .Em mvm -part of that driver. +sub-driver with the following chipsets: .Pp .Bl -bullet -compact .\" --------------------------------------------------------------------- @@ -182,32 +211,6 @@ Intel(R) Wi-Fi 6 AX204 160MHz Intel(R) TBD Sc device .\" --------------------------------------------------------------------- .El -.Pp -.Nm -will be a successor to -.Xr iwm 4 -and may supersede that driver in the future. -It still complements the -.Xr iwn 4 -driver which supports older chipsets. -.Pp -The driver uses the -.\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan -and -.Em linuxkpi -compat framework to bridge between the Linux and -native -.Fx -driver code as well as to the native -.Xr net80211 4 -wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac/ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. 802.11ax and 6Ghz support are planned. .Sh BUGS Certainly. .Sh SEE ALSO diff --git a/share/man/man4/mt7915.4 b/share/man/man4/mt7915.4 index fa5fd626d870..eece142c11a5 100644 --- a/share/man/man4/mt7915.4 +++ b/share/man/man4/mt7915.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2023 Bjoern A. Zeeb +.\" Copyright (c) 2023-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 18, 2023 +.Dd September 30, 2024 .Dt MT7915 4 .Os .Sh NAME @@ -50,12 +50,7 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from MediaTek's Linux mt76 driver and provides support for -the following chipsets: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It MediaTek MT7915E (PCIe) -.El +driver is derived from MediaTek's Linux mt76 driver. .Pp This driver requires firmware to be loaded before it will work. The package @@ -85,6 +80,14 @@ While supports all 802.11 a/b/g/n/ac and ax the compatibility code currently only supports 802.11 a/b/g modes. Support for 802.11 n/ac is to come. +.Sh HARDWARE +The +.Nm +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It MediaTek MT7915E +.El .Sh BUGS Certainly. .Sh SEE ALSO diff --git a/share/man/man4/mt7921.4 b/share/man/man4/mt7921.4 index 460c90ece808..d28dc520de6b 100644 --- a/share/man/man4/mt7921.4 +++ b/share/man/man4/mt7921.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2023 Bjoern A. Zeeb +.\" Copyright (c) 2023-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 18, 2023 +.Dd September 30, 2024 .Dt MT7921 4 .Os .Sh NAME @@ -50,12 +50,7 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from MediaTek's Linux mt76 driver and provides support for -the following chipsets: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It MediaTek MT7921E (PCIe) -.El +driver is derived from MediaTek's Linux mt76 driver. .Pp This driver requires firmware to be loaded before it will work. The package @@ -85,6 +80,14 @@ While supports all 802.11 a/b/g/n/ac and ax the compatibility code currently only supports 802.11 a/b/g modes. Support for 802.11 n/ac is to come. +.Sh HARDWARE +The +.Nm +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It MediaTek MT7921E +.El .Sh BUGS Certainly. .Sh SEE ALSO diff --git a/share/man/man4/rtw88.4 b/share/man/man4/rtw88.4 index 6036ad62d84d..f2446a346f59 100644 --- a/share/man/man4/rtw88.4 +++ b/share/man/man4/rtw88.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2022 Bjoern A. Zeeb +.\" Copyright (c) 2022-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 22, 2023 +.Dd September 30, 2024 .Dt RTW88 4 .Os .Sh NAME @@ -51,15 +51,7 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from Realtek's Linux rtw88 driver and provides support for -the following chipsets: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It Realtek 802.11n wireless 8723de (RTL8723DE) -.It Realtek 802.11ac wireless 8821ce (RTL8821CE) -.It Realtek 802.11ac wireless 8822be (RTL8822BE) -.It Realtek 802.11ac wireless 8822ce (RTL8822CE) -.El +driver is derived from Realtek's Linux rtw88 driver. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. @@ -91,6 +83,17 @@ This tunable will work around a problem with DMA and limit allocations for network buffer memory to the lower 32bit of physical memory and make the driver work. .El +.Sh HARDWARE +The +.Nm +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It Realtek 802.11n wireless 8723de (RTL8723DE) +.It Realtek 802.11ac wireless 8821ce (RTL8821CE) +.It Realtek 802.11ac wireless 8822be (RTL8822BE) +.It Realtek 802.11ac wireless 8822ce (RTL8822CE) +.El .Sh BUGS Certainly. .Pp From nobody Thu Oct 17 09:16: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 4XThzk2FB9z5YldH; Thu, 17 Oct 2024 09:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzj6BXKz4HYJ; Thu, 17 Oct 2024 09:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+hD0N7fzU2ygVsuQyYZAmtvVJ5H4JUDku2VhvPeW0EA=; b=e2r1huM9KOJ13M9HsbgA6XS00eqsfvfbYNZ5el0zbOzceKe8TfESSDXhwLDq9f/DBxJFqa elFs70ko8R9Zlza0Gl1IMknpHP3FH6lwcSDM1HPIwOfCx26ctthyoNxG1Kg9JtqNhOjMI+ rexLVBQlVlbE6ImPYsMvyFBikrO+bJ8AhN+GcNIUX1XnU1z+7qYaehXXUeHwcYx1LXhAGt msZU82EFLE9MgVAAmZWXYMqc2nDecLyyqsbTt3XoLGAgBvm6JofW6xjCQVh/lBp8+VzYMW 7184mc0NMYGCTTcsixMyXaTdR1wnSY4FtO5GqPupDmaO5phACKca4CL3ITDSyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+hD0N7fzU2ygVsuQyYZAmtvVJ5H4JUDku2VhvPeW0EA=; b=S7eldBDULF+Qy/atP1k3B7onJUd/VcltPRLpaE4A4fl7napC11RO5gfV2WuVtC1HxvJiiT 6M2eXwhblXl0lD+6nmC+Vov3qqzMruW6qBxilXlFTYdIT099t4GUBK903BEdGDA02PBkIv s3CAB8EzhSiNDtiAxrm9XHhtfYu7UNdMZBOjICVCEljVSCouy+jiVPnBY6sUwza3F60HZR yNrIHisff8/tX0eKL+iv/YtBH9t82lcJXL1fvAiO9mLi22HShOILplohJle1waMiu9AMRK Ogo9z8508JLGZobjrbzCdHFqt3iVxYkoATMffTS8YIGYJESpteU9xN45o7N0pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156609; a=rsa-sha256; cv=none; b=Iv+xIiWmdqDU/ps4ZdkMAvb/TJPm2hJVr0WYNH832hsYKOsNL4ApxCN9W16R94tO/87EOJ qVUEuDi2FbDZYGJLsQygFTBj6l/9AK7TAGQ+Ncnqy9CU6aJQx04JUqvtfsawqajPMkAqMa wR58ICdZkYm6hWH+kgO4l39c/oXrTD2u00GRlTh4rGbl1GTU40ob4uVysqVZCU93LAfMYp L7C2b6vp86th2Y8gyxOaImfU3Nw4h/5Qn0fyEDKE3Ao2d8dOVvEN3pXf0vpYrc6U1FSrxG kng5EWkLswMBcwassErKq7mMQ4CtONwkwhQkMjDwyXunJc/1p/8l4GeiwDq9QQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XThzj5mk0zk8t; Thu, 17 Oct 2024 09:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9GnI8087840; Thu, 17 Oct 2024 09:16:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9GnQi087837; Thu, 17 Oct 2024 09:16:49 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:49 GMT Message-Id: <202410170916.49H9GnQi087837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f9c867bf4e4c - stable/14 - LinuxKPI: add new dummy headers visibility.h and of_net.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f9c867bf4e4cb18e7bdda073ab9a74a4c1331497 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f9c867bf4e4cb18e7bdda073ab9a74a4c1331497 commit f9c867bf4e4cb18e7bdda073ab9a74a4c1331497 Author: Bjoern A. Zeeb AuthorDate: 2024-09-28 22:35:56 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:50:30 +0000 LinuxKPI: add new dummy headers visibility.h and of_net.h Those files are required by updated wireless drivers. Sponsored by: The FreeBSD Foundation (cherry picked from commit 6621842ccfb4dd01470e9085697b553d10634eb0) --- sys/compat/linuxkpi/dummy/include/kunit/visibility.h | 0 sys/compat/linuxkpi/dummy/include/linux/of_net.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/kunit/visibility.h b/sys/compat/linuxkpi/dummy/include/kunit/visibility.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/of_net.h b/sys/compat/linuxkpi/dummy/include/linux/of_net.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Thu Oct 17 09:16: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 4XThzl28tvz5YlvG; Thu, 17 Oct 2024 09:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzk6qrtz4HQ1; Thu, 17 Oct 2024 09:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pSaWGixFIJcNIGHtck1jlVQn1l2CxGcJWNETGcLpUso=; b=VbTAXtAeK13qKDIZjPsx9VlYkPB4+KC1cZhTTWMhcZSNK8Bfh1dfMoBZNJBj5IPijvpm8p sLWdx2IQ8pD+hvTIAi1IUAAs60pZKDWBpD62PIVQG+09jqozPRxkw/bfjpSN/2noZb0RQe TKcdBx0ijn8TGUTl01VYHHJmw1hOqEHis3lec8so9YZha0Zp6+0RQemM6kV29p/rFI23Xd IRpqRV+IGJ2haNaMIVcGpGQIDd7W1UeBXlE/+E5o8gbq0hSxrYFPY9K2+iwVnxJ1V1Tep+ bcoPM6c8CsED1IMULO3qhb8ELrz8cwOJBWVKkeCn/5DACcyNNyea9o2UWzwA0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pSaWGixFIJcNIGHtck1jlVQn1l2CxGcJWNETGcLpUso=; b=P/+Hhg8pEjedDYPZyIyTPOFunJP//mREplNxXBJ7Pq7wBKq8Zsyw3nnJkvGX6ZZG/n3lFa CQvcyGfiFppEDjrUF4eqoM++6TAhyML7N3BZIaQ/qhaVvqkij/VPSKr8eQNqSD44SwrABl UOBA4OfrV3euvsFkIdhCUYGjfjpPrMS6jbxbwqROePr8Vmk3CBBKw9Vj6BYzZHdX/1CRht VjTNnfp0fIFdPTSPBHje8SwHCAImyNIg/A2PeMjYNVKHNUumnLI0MI+mlIJ1siZw4runk1 YWtzEScAlYkpz8y4x6C7wGxgBo8rC2MCaOpXUZpqWajLTfJTrZ7X1uoEwpjcNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156611; a=rsa-sha256; cv=none; b=JFzqmLQcKoKHCdqfjkAHW7+15rrUkOJ1IeP5xIgGQMW2e5ZOAm1DCyDwEP6KQNQ/AUJc/x 8hGhaDMkxPw6GdwhuHsano49mZTMIZOzZkjRoUNsMGSCLqTtMNOe6G3Djb7cS4BxyykZCS n+yBCOL6uQmxoAMG1gKKd59wFJQlZV7qG6cns+f+kNceKB1wblEw1alPM5wvbEwJazf+dm fc00DWeVkPo0xostkPT8iMdJAlsk4ZD0nx1RqK9q/GvAg4LnuDt08uMhHVFkO/To6/dAw6 S/ZNqvkY4atHU1LvUtEw5U2q0iL3mCoQEFCRk+xlOv1DXZ7NA4sZlc3Hqh0pZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XThzk6N1kzkZQ; Thu, 17 Oct 2024 09:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9GoiJ087888; Thu, 17 Oct 2024 09:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9Go20087885; Thu, 17 Oct 2024 09:16:50 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:50 GMT Message-Id: <202410170916.49H9Go20087885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 75ac24a7dfeb - stable/14 - LinuxKPI: add cleanup.h for guard DEFINE_GUARD/guard. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 75ac24a7dfeb93301d4bb8b0118e2c98cc201f5e Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=75ac24a7dfeb93301d4bb8b0118e2c98cc201f5e commit 75ac24a7dfeb93301d4bb8b0118e2c98cc201f5e Author: Bjoern A. Zeeb AuthorDate: 2024-09-28 22:38:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:50:37 +0000 LinuxKPI: add cleanup.h for guard DEFINE_GUARD/guard. iwlwifi v6.11 started to use guard(). _T in the implementation needs to be exposed to the driver which uses it in DEFINE_GUARD(). Given this is the first instance of attribute(cleanup) in the tree: - gcc has support for it since at least 2003-06-04 (0bfa5f65bfb186f10d43304946fd7fcd69988732) - llvm gained support on 2009-01-31 (d277d790e0f6f23043397ba919619b5c3e157ff3, llvm-svn 63462). Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46843 (cherry picked from commit fa81baa307da9a0055d7d08f6d141ea310f067ed) --- sys/compat/linuxkpi/common/include/linux/cleanup.h | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/cleanup.h b/sys/compat/linuxkpi/common/include/linux/cleanup.h new file mode 100644 index 000000000000..01f234f0cbe7 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/cleanup.h @@ -0,0 +1,46 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software was developed by Björn Zeeb under sponsorship from + * the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_CLEANUP_H +#define _LINUXKPI_LINUX_CLEANUP_H + +#define __cleanup(_f) __attribute__((__cleanup__(_f))) + +/* + * Note: "_T" are special as they are exposed into common code for + * statements. Extra care should be taken when changing the code. + */ +#define DEFINE_GUARD(_n, _dt, _lock, _unlock) \ + \ + typedef _dt guard_ ## _n ## _t; \ + \ + static inline _dt \ + guard_ ## _n ## _create( _dt _T) \ + { \ + _dt c; \ + \ + c = ({ _lock; _T; }); \ + return (c); \ + } \ + \ + static inline void \ + guard_ ## _n ## _destroy(_dt *t) \ + { \ + _dt _T; \ + \ + _T = *t; \ + if (_T) { _unlock; }; \ + } + +/* We need to keep these calls unique. */ +#define guard(_n) \ + guard_ ## _n ## _t guard_ ## _n ## _ ## __COUNTER__ \ + __cleanup(guard_ ## _n ## _destroy) = guard_ ## _n ## _create + +#endif /* _LINUXKPI_LINUX_CLEANUP_H */ From nobody Thu Oct 17 09:16:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XThzm2RDgz5Ym3K; Thu, 17 Oct 2024 09:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzm0XXFz4Hrn; Thu, 17 Oct 2024 09:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZR3qLbN2/34s0Q7USLJON9J6lKaltjqguPIVABuF/c=; b=ty8Tjf5IkxKkZW6chLtGCKHJ4yVoNBBJ5kaDWpXTnRjCC4Sp58YHpb5ALzgjTOiDZWhFh2 47ep3HYR8mXNh+LbbfFuy2eO10dknvRI/gXGakBAioB8GgXbe+t19nfZ+ww0WL3if31hH8 FzaorD8AvUJI2uKjskDacbyg2EhivcaIAQS3kHEgKSCi3+ykvNFnPloQkmGLUXCpHh7rbG 5QE3XM1GaU81fLELcVa6BZhOFPHAfA0osXB0DsxUpJ/XzewqN0VUrvdUvpzQSoa0NTlAND nZcq8TuXJ2jjPbl9UAQzzHHwnqLV8OCVuPQFb9tskqYSF9xHTRpvoXmn7Z1vnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZR3qLbN2/34s0Q7USLJON9J6lKaltjqguPIVABuF/c=; b=yizCQbFE/DmTAMjjsX6Uu/hoBOIGtwI8hu6toWwtG3Oxj2tyv06eq9iPkbGwnHR+wfl5U2 JYBlYOgkicYDDVE3YPYIKNp85717S5G1/nM6++HYw/xj2F67PauUaGgRy1BCJAsSfoqWT9 0wniOpnS/HpTnptttTmzcIN16Exml2LAjsalEWMOx6ufW1mgRhTbgZXFiPNnV+Cvjk7iEA 9W75y7xsb+IBY0VI2zNPSRC6pCObMqxF3J4UW9DnVroqIkCyEfXU8y2mm8SdlNN5/jrx6F GgqP1q+oJ1bXMULIyrWfsmhZjSGzRIvOxuQ9QEYzHgG0SUeotAnECWy19MBjtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156612; a=rsa-sha256; cv=none; b=xZDKKGEMem4t+OWADsMRsKicGFxWKpIKyrVYsVdjwwaC4kxuQRwxsIyMyp86tJvqxg5qP8 PVRTpyCaU8Y3Ahp177ub76HhxoJ5JuSxSfqEIOUMLvAtxFN0v8tYKK1fpP35WD5acg3Zsn KIr7rHMiZ9Qqh2l1cncwTEOUCmVLx01Z6s4VG9E7V5gXkm0+ndtGhm342h0eciC1QXI+mN GMzPQ4yEtKEgjDIS80FtCVeG4P6M/HIPwCzFKhhHxH8kHTMzagmEGte6UWTGHrAiY6wnrN btGwAr+8jOQZXQwzCjJjIvun+gXOfeIu8vcBWBQF/WxX7r4LSPX9j/wvUTU8zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XThzm06RqzkZR; Thu, 17 Oct 2024 09:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9GpWa087945; Thu, 17 Oct 2024 09:16:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9Gpsa087942; Thu, 17 Oct 2024 09:16:51 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:51 GMT Message-Id: <202410170916.49H9Gpsa087942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 217024001f17 - stable/14 - dpaa2: fix MRU for dpni (and software vlans along) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 217024001f17f8288aab98cb700b3ef8305abeee Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=217024001f17f8288aab98cb700b3ef8305abeee commit 217024001f17f8288aab98cb700b3ef8305abeee Author: Bjoern A. Zeeb AuthorDate: 2024-10-11 18:51:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:50:44 +0000 dpaa2: fix MRU for dpni (and software vlans along) 0480dccd3f34 tried to fix the MTU for software VLANs given dpni announces IFCAP_VLAN_MTU. Unfortunately the initial MRU during setup is reduced from the maximum supported by the HW to our maximum ethernet RX frame length so only after further mtu toggles the solution there would work. Set the maximum RX frame size (without CRC) to jumbo length + vlan encap len by default given we also announce IFCAP_JUMBO_MTU. While here improve the manual (ioctl) MTU setting by checking if IFCAP_VLAN_MTU is currently enabled and only then add the extra bytes. Fixes: 0480dccd3f347da0dbccf5917633435d5ce6cb86 Reviewed by: dsl Differential Revision: https://reviews.freebsd.org/D47066 (cherry picked from commit fa3dfeff95a5bafcf13accaed5164bfc4e028d9a) --- sys/dev/dpaa2/dpaa2_ni.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 6ed656849709..622e63626bfe 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -138,8 +138,9 @@ MALLOC_DEFINE(M_DPAA2_TXB, "dpaa2_txb", "DPAA2 DMA-mapped buffer (Tx)"); #define DPNI_IRQ_LINK_CHANGED 1 /* Link state changed */ #define DPNI_IRQ_EP_CHANGED 2 /* DPAA2 endpoint dis/connected */ -/* Default maximum frame length. */ -#define DPAA2_ETH_MFL (ETHER_MAX_LEN - ETHER_CRC_LEN) +/* Default maximum RX frame length w/o CRC. */ +#define DPAA2_ETH_MFL (ETHER_MAX_LEN_JUMBO + ETHER_VLAN_ENCAP_LEN - \ + ETHER_CRC_LEN) /* Minimally supported version of the DPNI API. */ #define DPNI_VER_MAJOR 7 @@ -2561,8 +2562,10 @@ dpaa2_ni_ioctl(if_t ifp, u_long c, caddr_t data) DPNI_UNLOCK(sc); /* Update maximum frame length. */ - error = DPAA2_CMD_NI_SET_MFL(dev, child, &cmd, - mtu + ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); + mtu += ETHER_HDR_LEN; + if (if_getcapenable(ifp) & IFCAP_VLAN_MTU) + mtu += ETHER_VLAN_ENCAP_LEN; + error = DPAA2_CMD_NI_SET_MFL(dev, child, &cmd, mtu); if (error) { device_printf(dev, "%s: failed to update maximum frame " "length: error=%d\n", __func__, error); From nobody Thu Oct 17 09:16: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 4XThzn5L95z5Ym57; Thu, 17 Oct 2024 09:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzn1XqZz4Hq9; Thu, 17 Oct 2024 09:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ae6VoMtGUCE/QvNHShEgIW8uBF/tc3moEkaMPjib8SU=; b=oB30jDu0oP1OwOJcfBNagzjsv1r5L08013DGyjLr0N8SKWxRfe2qI+iWZt06nHZ0bBtJd/ pETXE1gmr4yvEpEZqXEgZ74enkf3MlzPtlm4rathqBDqHgcaBmWUsBACZ8U+Byc9di6M+2 MUR8A7qgN3tWwKHCdKJZImSC+uZMDKg0+gavyXKpgz1WORiX7ee5Uh8W9lTWMkuG7P2k1l 2AGoeMyWvQDkDzmVXMgKGMKhVXqYRYEDPae+eRYm3DYSiK351BG+e+NzrgOvsUrhV2L6fl o0gAQmkksK0334I40jPnRo4nfvVv1Ig3mX0jeWFRXiilz+Dma0oBGQqeEoFQJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ae6VoMtGUCE/QvNHShEgIW8uBF/tc3moEkaMPjib8SU=; b=PPA9mm5tO4b/SgAuP+hYPuK5tMLupI6X9zbZ9YJaMgFYdxgiOhUI2yBsLiQ86TCMqGF45y esOOvJFYEypzwiH7MkvLPalUSCzLQ9Bg4sou3YSyNy5dh0cBw8BBVdCiqLxf2xJf9UsEsY y0st+osrUAtiUFtkiwIlvjE9E0l/AIliSlqF45gXEyji59udda/o2jT5k+v6HVoOLG5U6o 2mxLBYn6qCwr4ST8blOJ8pSjiK48NwuMARNNJskEA8ZPGzfbvWyWqbJfgzt4HaUQxaHYwn K56AKiLQidaczGBhZBexAnKeRdSGnkY9pq1qMagS9dsohocd1etLwL58JfCgRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156613; a=rsa-sha256; cv=none; b=p8sHX+Vk4SWUdO4GpWUVoxOYLt8N1wFikhYDvkD3WTFjN6sStrtRx4teE3lkXdQTo+e6nc YWEqmXWGmQoX3TO+1rWThVW3zeoQC1mttAdrEeVph+z2HRH/97jmfb8mMQZk1UUJnT2u3A PnaHakjz/69v9DBxeXHmtKnl1dmLlZX1RejfxoP/2tJ6s4yA3ZYUUWVtjU74KOx+QK3nkD ZjHgWtt5LPVxdzzEJTsotzwo1OgdEcgx/2/ytItkfF9gpGlaHXViCowRlSTtuYQ4rJ91hO xaGINYJYd1Cdi/VF3MKgM+knhD14l0JKZIEv7fvQue38NDNbUrAcaq5MSPyzVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XThzn188HzkcM; Thu, 17 Oct 2024 09:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9Grup087999; Thu, 17 Oct 2024 09:16:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9Gr4C087996; Thu, 17 Oct 2024 09:16:53 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:53 GMT Message-Id: <202410170916.49H9Gr4C087996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 9e596eab21d4 - stable/14 - dpaa2: allow tapping of tx packets in dpni List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e596eab21d46864f0d90aae085319a1782e565e Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9e596eab21d46864f0d90aae085319a1782e565e commit 9e596eab21d46864f0d90aae085319a1782e565e Author: Bjoern A. Zeeb AuthorDate: 2024-10-13 23:14:35 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:50:49 +0000 dpaa2: allow tapping of tx packets in dpni Packet capturing on dpni is only half-working given the BPF_MTAP call in the TX path is missing. Add it to see packets in both directions. Reviewed by: dsl Differential Revision: https://reviews.freebsd.org/D47103 (cherry picked from commit e69e172d40585cfbcfdb28433cec523ca4867cf1) --- sys/dev/dpaa2/dpaa2_ni.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 622e63626bfe..698b440376e3 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -2936,6 +2936,8 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, KASSERT(btx->fq->chan == ch, ("%s: unexpected channel", __func__)); #endif /* INVARIANTS */ + BPF_MTAP(sc->ifp, m); + error = bus_dmamap_load_mbuf_sg(buf->dmat, buf->dmap, m, segs, &nsegs, BUS_DMA_NOWAIT); if (__predict_false(error != 0)) { From nobody Thu Oct 17 09:16: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 4XThzp4wMwz5YlvK; Thu, 17 Oct 2024 09:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzp2nf4z4Hby; Thu, 17 Oct 2024 09:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oXCsxSrJh+2dvhxwcsSrzwygg3gQBXczMAGdXfL8xAI=; b=rIbteJgclG5aKoS7a2s5ifugiqmDbkHyc8j7j2vSsNKvKjsYgN5I1hU+v0CBXFKd33rJ32 GaSDBiC7QApUJ41p/oflCktcxfeavej24yrKiLQPIWPS8b9IG6XIXY+m5Uy4WoOFM5Zf0P 3aKf0ZKZo+R+nrmbDJNldrpxJ+wlE+qKcC3BqUOItgFjnU+m+7zBStHkUox8eQ0DSpRKUN 2OaNACG1hRXJQiKqYNlh+lu3SUl+x3cG/cflUVcRq8HQAcLLm8MDalXb2Jq25De4N41FNx 3/BCVmIQsIhBcxK6STBV6FLJJS3mtwUfKPN/d3DMadty4mxeVwEgeQ19rc92Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oXCsxSrJh+2dvhxwcsSrzwygg3gQBXczMAGdXfL8xAI=; b=LhMKFHqr42qNDE8FfsI1Fphel2eX6vCvgj1IJ5pCohoIRA21j44JnLQZQ1m2cO52NcPc5Q o/w4hSw3ILpjUQWXdW1RU6XyMZt89bZtpH9nsuUc4ojWDd7QoDpA6la6rv61eFMo0sGn40 LjvG7igfFg4GHAmQma4bA7Xy4ya/R5frFL9ZAQUk5jJDGUNiCAmeBUNzlUtb6BcGLtpVGT SHgmTnVW6DgWaXWth02YBrCYHsniEHTr/bP+7OrMLjpPMXs8NH5TaZxRMRobWY1JIIErR1 NfoqIkcUxCBLVOqF8mGqgX7dc+7hQilr+uxM0EkosOCacHMY0CU0yFAWuq2SQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156614; a=rsa-sha256; cv=none; b=sw45aRzCZWi/9/4peIOIjdz6ZIFWpqHN/dfP1mGZYI6Cjewa5I4862MO9/v95AeMd25nET bdqmzo6ay8gbp2npspBv38a/TgS+h8Nu1ZlszpjIyFmMWp3m9DK8rk+XIxSLgzqn865E1t NwbUH+Js6aTmy9CvggZCh8vNOC7rDNqBu2ZTqGSKHVpNpvlCgAFUKTtvvgtHyMgkmBjwlJ nKwWD4bIyPKMn17eIs4FijFgsRwsMDVyS2Oo9FXnS5fRPpA9FTdSoNO4bbJNhvX8CBj1r7 Xhlq/zx6CH84L2KZX3qYp3ogvGskA1lKk2dVsjgiAvdhjWeyVEbcNpf4n86y9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XThzp2PJczjxx; Thu, 17 Oct 2024 09:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9GsSE088051; Thu, 17 Oct 2024 09:16:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9Gslh088048; Thu, 17 Oct 2024 09:16:54 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:54 GMT Message-Id: <202410170916.49H9Gslh088048@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 71f81398f7a7 - stable/14 - rtw89fw: remove module build dirs and firmware List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 71f81398f7a7160cf78275537703d360bc747f29 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=71f81398f7a7160cf78275537703d360bc747f29 commit 71f81398f7a7160cf78275537703d360bc747f29 Author: Bjoern A. Zeeb AuthorDate: 2024-10-10 22:43:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 22:01:56 +0000 rtw89fw: remove module build dirs and firmware rtw89 firmware files were removed from main a year ago after core members asked to not import more biinary blobs into main. Also remove the module build framework for them on stable/14 to avoid any confusion (it was never attached to the build). People are asked to use fwget(8) to automatically install firmware from ports according to the man page. A solution for the install media is still pending. X-MFC after: rtw89 only Sponsored by: The FreeBSD Foundation (cherry picked from commit cf94672363d6638b7268c05b4628b62bbfc8dbe5) (cherry picked from commit 7ff12dd25ada486c4d33e854977514b2db690e7f) --- .../dev/rtw89fw/LICENCE.rtlwifi_firmware.txt | 39 --------------------- sys/contrib/dev/rtw89fw/WHENCE | 8 ----- sys/contrib/dev/rtw89fw/rtw8852a_fw.bin | Bin 1423232 -> 0 bytes sys/contrib/dev/rtw89fw/rtw8852c_fw.bin | Bin 1340192 -> 0 bytes sys/modules/rtw89fw/Makefile | 6 ---- sys/modules/rtw89fw/Makefile.inc | 16 --------- sys/modules/rtw89fw/rtw8852a/Makefile | 5 --- sys/modules/rtw89fw/rtw8852c/Makefile | 5 --- 8 files changed, 79 deletions(-) diff --git a/sys/contrib/dev/rtw89fw/LICENCE.rtlwifi_firmware.txt b/sys/contrib/dev/rtw89fw/LICENCE.rtlwifi_firmware.txt deleted file mode 100644 index d70921f49379..000000000000 --- a/sys/contrib/dev/rtw89fw/LICENCE.rtlwifi_firmware.txt +++ /dev/null @@ -1,39 +0,0 @@ -Copyright (c) 2010, Realtek Semiconductor Corporation -All rights reserved. - -Redistribution. Redistribution and use in binary form, without -modification, are permitted provided that the following conditions are -met: - -* Redistributions must reproduce the above copyright notice and the - following disclaimer in the documentation and/or other materials - provided with the distribution. -* Neither the name of Realtek Semiconductor Corporation nor the names of its - suppliers may be used to endorse or promote products derived from this - software without specific prior written permission. -* No reverse engineering, decompilation, or disassembly of this software - is permitted. - -Limited patent license. Realtek Semiconductor Corporation grants a world-wide, -royalty-free, non-exclusive license under patents it now or hereafter -owns or controls to make, have made, use, import, offer to sell and -sell ("Utilize") this software, but solely to the extent that any -such patent is necessary to Utilize the software alone, or in -combination with an operating system licensed under an approved Open -Source license as listed by the Open Source Initiative at -http://opensource.org/licenses. The patent license shall not apply to -any other combinations which include this software. No hardware per -se is licensed hereunder. - -DISCLAIMER. 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. diff --git a/sys/contrib/dev/rtw89fw/WHENCE b/sys/contrib/dev/rtw89fw/WHENCE deleted file mode 100644 index 496ef115ef0b..000000000000 --- a/sys/contrib/dev/rtw89fw/WHENCE +++ /dev/null @@ -1,8 +0,0 @@ - -Driver: rtw89 - Realtek 802.11ax WLAN driver for RTL8852A - -File: rtw89/rtw8852a_fw.bin -File: rtw89/rtw8852c_fw.bin - -Licence: Redistributable. See LICENCE.rtlwifi_firmware.txt for details. - diff --git a/sys/contrib/dev/rtw89fw/rtw8852a_fw.bin b/sys/contrib/dev/rtw89fw/rtw8852a_fw.bin deleted file mode 100644 index 00d139b3f2f1..000000000000 Binary files a/sys/contrib/dev/rtw89fw/rtw8852a_fw.bin and /dev/null differ diff --git a/sys/contrib/dev/rtw89fw/rtw8852c_fw.bin b/sys/contrib/dev/rtw89fw/rtw8852c_fw.bin deleted file mode 100644 index 86b634aeb69f..000000000000 Binary files a/sys/contrib/dev/rtw89fw/rtw8852c_fw.bin and /dev/null differ diff --git a/sys/modules/rtw89fw/Makefile b/sys/modules/rtw89fw/Makefile deleted file mode 100644 index 7732d9d868ff..000000000000 --- a/sys/modules/rtw89fw/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -SUBDIR= \ - rtw8852a \ - rtw8852c - -.include diff --git a/sys/modules/rtw89fw/Makefile.inc b/sys/modules/rtw89fw/Makefile.inc deleted file mode 100644 index 349041ea5fff..000000000000 --- a/sys/modules/rtw89fw/Makefile.inc +++ /dev/null @@ -1,16 +0,0 @@ -# -# Common rules for building firmware. Note this gets auto-included -# by the subdir Makefile's as a consequence of included bsd.kmod.mk. - -_NAME= rtw${NAME}_fw.bin - -IMG= ${_NAME} -KMOD= ${_NAME} - -CLEANFILES+= ${IMG} - -FIRMWS= ${IMG}:${IMG}:${VERSION} - -${IMG}: ${SRCTOP}/sys/contrib/dev/rtw89fw/${IMG} - cp ${.ALLSRC} ${.TARGET} - diff --git a/sys/modules/rtw89fw/rtw8852a/Makefile b/sys/modules/rtw89fw/rtw8852a/Makefile deleted file mode 100644 index 910468870e78..000000000000 --- a/sys/modules/rtw89fw/rtw8852a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -VERSION= 013360 -NAME= 8852a - -.include diff --git a/sys/modules/rtw89fw/rtw8852c/Makefile b/sys/modules/rtw89fw/rtw8852c/Makefile deleted file mode 100644 index b051945017e5..000000000000 --- a/sys/modules/rtw89fw/rtw8852c/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -VERSION= 027200 -NAME= 8852c - -.include From nobody Thu Oct 17 09:34: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 4XTjMf4J9Lz5Ymtb; Thu, 17 Oct 2024 09:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTjMf3Nl2z4NWk; Thu, 17 Oct 2024 09:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729157646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ajjzUU7E22wAmkrnSPFZfSV499IQT27Wp2pVRm0RdcU=; b=QOje9VazQC6ME/jhikqPmTwGwS5US95zgS0fLk3iTmAopwHJTpyiJ0DuF66wb++9WufHus +0iGjg3XQ3LbxrpFGnA5Lqt+iqeo9WJ+PN/oeVVAiQHwcfv0kn+1tG27TDdUCrlOP96ne8 w+knOExYMldfchj5VUUAmSAqFG60+EtlySYDynJdWahyZDHYUGoq+fIU71qhxFJY/iNirS BjE5/bJrpYz1pjCdTwLbNsZbsSdy9rLdEmkftpkt73TFJGSyjDbTzlsruU0VPHIoRNjvkm e+gQIW+1X1VHZx0xqFK4pcYLmn6E4IIBynAs9EMwydJaXWXX1jS6CWD/w6LKeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729157646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ajjzUU7E22wAmkrnSPFZfSV499IQT27Wp2pVRm0RdcU=; b=om3v0DxBqtrMPqzqioH932wVW8pB7rvZtE4QSb8Gd+IL+Ukacx8xbWAG7eUegrZbVc/5Pc TiiIioa4tYT0IcW/65zGycSiBrk2OSc3hUpIW7YA1KWw2BM6CZM+I/WqBD4f18QtgMG5f0 iuqcQhlzMM5oVr5id2BUG8COUH/BPjxyaFr3BfzHQeXDPvnWCscLifYw//Cb7apYfP2E7l W18rNOf7HiV3u0RMFCg5QqLPmfJu/TPWosPUFwuHSt/v8VFF8LUBKfojonc4XyUC6sCbD0 BUTSCckfO1JHSmLWsr/DZEgBs3rsPaHOQwg8Q7IbTG29VfHIpg5SD7Oj1u3hEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729157646; a=rsa-sha256; cv=none; b=uzbq0pZmUTecP7OiZanC07BA0XesI9e4l1EOGIb79wNhGchLzMJplPkoSIRVz3gghEFOnp pyodXTm3fSoH/SiDdeaQy5uBt7kdnHUxt1QCXLx9CAuU9OFWoQZ9nB0Fb+hO+XmyLkI8JD 8OilAZX/kEUJe8jbK4g3L3PcVqMn3vxFBcoOdIBeECHTLae2RWn5uu7HJYif3qaX9TTNU0 SOEZYyR1ZpwTGtmBFbkQeZ8FmcpHHLWE8SVkEHUkYhqsxf/51xOD1xreL4tX2kPXnCjASd WMS+quEq2JSsOOuiZpQdT50tvHjCselg/tKNW45fvl/XLLczIchHz+mF8L0KiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTjMf2zkmzlCL; Thu, 17 Oct 2024 09:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9Y6RZ021716; Thu, 17 Oct 2024 09:34:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9Y6vp021713; Thu, 17 Oct 2024 09:34:06 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:34:06 GMT Message-Id: <202410170934.49H9Y6vp021713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 9cd6ab45a446 - main - pf tests: disable epsv for the ftp proxy test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cd6ab45a44607ea862c8bbb2ebaa8a7521178ff Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9cd6ab45a44607ea862c8bbb2ebaa8a7521178ff commit 9cd6ab45a44607ea862c8bbb2ebaa8a7521178ff Author: Kristof Provost AuthorDate: 2024-10-17 08:17:10 +0000 Commit: Kristof Provost CommitDate: 2024-10-17 08:17:10 +0000 pf tests: disable epsv for the ftp proxy test The update to py-twisted 24.7.0 broke EPSV mode in twisted's ftp server. Work around this by disabling EPSV (and thus using PASV). PR: 282154 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/proxy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/proxy.sh b/tests/sys/netpfil/pf/proxy.sh index b112001ef2b4..78ce25930c04 100644 --- a/tests/sys/netpfil/pf/proxy.sh +++ b/tests/sys/netpfil/pf/proxy.sh @@ -74,7 +74,7 @@ ftp_body() # Create a dummy file to download echo 'foo' > remote.txt - echo 'get remote.txt local.txt' | ftp -a 198.51.100.2 + echo -e 'epsv\nget remote.txt local.txt' | ftp -a 198.51.100.2 # Compare the downloaded file to the original if ! diff -q local.txt remote.txt; From nobody Thu Oct 17 10:54: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 4XTl8n1Ybgz5YrRX for ; Thu, 17 Oct 2024 10:54:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTl8n13RPz4Wq3; Thu, 17 Oct 2024 10:54:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162489; h=from:from:reply-to:subject:subject: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+cTJwCsZTkSeJTYYASFBbn0pfzY5/0N6/ZhWjDM2i0=; b=SJhKenA9Za3bayZF0/J2Dsj9Nh8SSiFMA0P45hnAp50I+a7qh2ilj22HdbD8W3Gpwe/JjJ C79LJJTcqbWepLGIWKXQfAJbbRGLwKla9HLgPOEWPr6L/Vk+B8IaW3QjVRv62TO6XFHxOw 3+TCENnZVvdJ0QM1CkPXfa1TJFTfqTrWI+OdTC+OsvN/Tznh6ZFu1O7kKfOuUf+J9Dt4C4 u7T9ipVbqi+biklNH8zd6ZJhe/6oeHCComNykZr7gg1H2SgnGhCMRF9iNk0nvDavlajpaV T0AOaFmHZsbR7sYRhZZnxilZaPjoF6JuGZxRzVPneh+kGwwNka2iI+QzpxGZ0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162489; h=from:from:reply-to:subject:subject: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+cTJwCsZTkSeJTYYASFBbn0pfzY5/0N6/ZhWjDM2i0=; b=UCCItHj78QtcRpDuUOVk0o5jfePvOyZQIkE3Pss+yxW6XK/vUuBkFE7S7fo2c9L6MfPryN QU9EYmqYOwN+uTrNniTT97UfuUgvla+NlZNP+UNVPTP9IXBU++xaFKkw5jVNEgIt4tNLaF 0bdO5MFgCkMlJnj4mhut/axdCVULIPJOFSpqn/X7E4emImUbQ3jQnt4OMufvKc3TvGviHs vEpnicpwooBVHtD030z+7wGikcBh8lnZxVGKgeuRGBBlUTzDQBpSQNp5T/XNXQMR285rGw 2xaXxOWHmC16X3Ad/iCuBgMrhzYJPfkGvxBf8j/MqiINj9qRw0opShsGHV7y0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729162489; a=rsa-sha256; cv=none; b=ZgGZiyYCLsvbnUO1tjaDYkm8y96tSxbOsOx1yn58FRfZVkhhxPTI6mu3xAGvVKyG8cYAK0 rAwjRDxp2r/LxNEyRzsVFFBln7XQ+NRwHbQn34s1xwMlE3JHnnvQCr64onNq5N5wbcpnDU +b+0aL1SnjKcfG+kVJXtS0Jlj5zPrQuR+DV3QkC7FLnrYqDgqs0bIkqb1vcgK16VHO2ihg ND5N+jYCvomklVt5GxPvYzUigWMJm4kQMxO4XHXp595IlLkwHK13KJmPvJzrMkUq1CmmQ5 nsi635jdFzcYpQJd4EdWfyID73QwVR3emg5jRcr5K7+sPA/pkxBo5rGRYaB+2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTl8n0LPBzmjF; Thu, 17 Oct 2024 10:54:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HAsmXS056421; Thu, 17 Oct 2024 10:54:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HAsmHZ056420; Thu, 17 Oct 2024 10:54:48 GMT (envelope-from git) Date: Thu, 17 Oct 2024 10:54:48 GMT Message-Id: <202410171054.49HAsmHZ056420@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c6bcce0f5b92..5d6ad179ba13 - vendor/Linux/iwlwifi - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/vendor/Linux/iwlwifi X-Git-Reftype: branch X-Git-Commit: 5d6ad179ba1337044d054d06596e2169952660b6 X-Git-Oldrev: c6bcce0f5b920c7be597b105cc01ae72f9189747 X-Git-Newrev: 5d6ad179ba1337044d054d06596e2169952660b6 Auto-Submitted: auto-generated The branch vendor/Linux/iwlwifi has been updated by bz: URL: https://cgit.FreeBSD.org/src/log/?id=c6bcce0f5b92..5d6ad179ba13 5d6ad179ba13 iwlwifi: update Intel's iwlwifi/mvm driver. From nobody Thu Oct 17 10:54: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 4XTl8n1cWDz5Ys69 for ; Thu, 17 Oct 2024 10:54:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTl8n1BqMz4WMg; Thu, 17 Oct 2024 10:54:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ASdaMkJJ7ZgwuwZ2PWGjGAJ50gcwi6iLQzuKFS8GnXs=; b=KzEbNiTvfdSKQys91VZ2tXEknWTH42cT0qoIzKPHvF/RQU4uCCtmnhAxr/CWBrJZgYTzQc GiTEeND9l9FpsxunSPhJoWljA4FowXqMsxrULqsYnZSMvDcnspEFtoRQzl0WylQWdFmv0b 9/b3z4GsVc1CIkM2RSMN7q/VQAyaI5rq3yWdeSWqdsurc6ERFLhw9fa1TdAtm0o9CSZ7n5 N3X/0EXgtJxWSDyVVBQcloxxJLVQxHNuis7VPA1lqhbfOmSoDOB2+hlyizTrkKnJoBlpER immu8fAKVlId+VIo+EWa0V/rycmYVty/3g2aqd1YUFHONQ4Qkh9j5NNvelTXfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ASdaMkJJ7ZgwuwZ2PWGjGAJ50gcwi6iLQzuKFS8GnXs=; b=XJw+ieczDnJIYkGmN71kkPnFfcENA3whzpYmTOHIOvpZabKRs+wuKlXewsCC9PBGk+RM74 S2JaxQmylFw9Ll+PPfrTu5oT5fdvqL240cNifqmdIJP0DXnkWwJjJkABQUMIUDdIaWMbqv JwO8kSHhqQwzgxt2u6kCDzrzxkfdGhS2gO4nUhh/Xa4yTyjVRDtPm13f6VGi9/Em/7MWUm M4SyV6056HqjzJxMd/a5tKRv7v5WSh4pF59JQJP2hwFcJ5LxVPfhfJqNneQ2u3F+tr621c tgv/rtiPrHtVT0t5xGOJ3DFVnQisuCbcUv67T7dW4xsfiEyLMmwTvriN/t+fiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729162489; a=rsa-sha256; cv=none; b=Xvb+8gkCGWx0t2TzYmR9DmqQVnDt31OUHrSMUA9kVNMbyYLCS+XSofvk4hkPpOkCGvkqLU RkZw+4daOtNqGQidFEi/smXQk/XGpXm8ApqLlCetFVqKVxhAlcpcwjWvB83kKhD+VRCZ54 nBjv0QPtMoqEiXpdRzy+9emVu1/ZAHJRfh4jxgLO+YGrdYftj0jBx6nXSAdgjUC47d5xxs g28/saw78TQKkiyhyXU8WcNuVbj4lUIdc2g+4ilf4AQS0EEGmUBLja6Qh8jPpQXIRziKzF eNVXMj4yJhAlgJHHBbByOGAIOY3azm3m5tuIKmheWWpJaRylJ8oLTNNhiDnVMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTl8n0nyfzmjG; Thu, 17 Oct 2024 10:54:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HAsnEA056440; Thu, 17 Oct 2024 10:54:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HAsnL2056439; Thu, 17 Oct 2024 10:54:49 GMT (envelope-from git) Date: Thu, 17 Oct 2024 10:54:49 GMT Message-Id: <202410171054.49HAsnL2056439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0844f2b79ce5 - Create tag vendor/Linux/iwlwifi/torvalds-v6.11 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/tags/vendor/Linux/iwlwifi/torvalds-v6.11 X-Git-Reftype: annotated tag X-Git-Commit: 0844f2b79ce5a1b55a5ee3e08738410ada6221b3 Auto-Submitted: auto-generated The annotated tag vendor/Linux/iwlwifi/torvalds-v6.11 has been created by bz: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/Linux/iwlwifi/torvalds-v6.11 tag vendor/Linux/iwlwifi/torvalds-v6.11 Tagger: Bjoern A. Zeeb TaggerDate: 2024-09-27 21:22:38 +0000 iwlwifi: update Intel's iwlwifi/mvm driver. This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ). commit 5d6ad179ba1337044d054d06596e2169952660b6 Author: Bjoern A. Zeeb AuthorDate: 2024-09-18 10:42:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-27 21:22:00 +0000 iwlwifi: update Intel's iwlwifi/mvm driver. This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ). From nobody Thu Oct 17 10:56:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTlBX5hH8z5Yrh6 for ; Thu, 17 Oct 2024 10:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTlBX3df7z4Wts; Thu, 17 Oct 2024 10:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fAIb/ioU/Rovgf4vvnATiPKtYkigpZxevlPrr1hLIt0=; b=aNO2P4OSZnEAuNdazSpj28ybUyt7HlC3IntMuihtKYwVOtEHGv4iHYOw2aYdcepXc9DJ+G e1e1XuUQ9TwUO4N/zvGagkg/8A6yclYbmniShZVjt/whsZaRDQZuLLpuFWcuEa9+Upnimh aiBrq7NFflZPRgT8z0wR4L/eqH6trT7EG/BiX1tH4FlzjAjXQVYlU43Kyi2N148bnxbY6e 4H4VL9HD4JlwFk0v77QYl94hxWjGbH1uXRsyvnw2w6tY2cOJshS6FufMS/6hv8vmWSIFu5 m4FQnarN4fXJ4jIi0YRpmdsbvpGVkXglSP3oQd7Ub2L8wT8j4vcZK/WGS9wZcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fAIb/ioU/Rovgf4vvnATiPKtYkigpZxevlPrr1hLIt0=; b=qWCdwzQlL+b67Y8Wnsbd3On/U+idfkVHMS5oXqLUBCteDWyY5gVYJypGrl8swRXhh5NCje HM8l8W6i3KJrisVCoTkSQyuNZamtPPXhwozIVVYTfwD/Q1eEulg8Th7ryi6W+YpNOEoDoV G5M8DxlFhkYoI2UEBUQ/7hqS2Lha+RR+nr340y/cb9NJLGQWAq/Ona3QtmoLiXiPykAzyB d2xcfE74wysBEh44yKcBXxQYV7/MIcWYtb27BRlZM7W0myBC1KPn1dgYgtafgwiZ76dtwP MoXsTDJcEtFlU0vQ9xfEL6q3+Amdp/SyKRKOJQsisvTPoHl0lFhbcfMobhbkoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729162580; a=rsa-sha256; cv=none; b=eCPXYBl1fcB15m+IdM+W8tLSpNd9B/1XpHRcgPaPXomMNBSmqCK9t2LwdTHHkVAqz05fif IhV2q7HHgG+HwCzEB6accR9rCn8aj2b1rZWIX0kLiuoRml0lcz0LsF4lTF9PoOAMJn6LY0 XTeyxZV9tC9p+qO+jmPYFfoq7+X9jMSx7M+wV2G941rhXOJagq0PRly9jbQ8cO+8oojCjx LbP0gRxEg4uIh2KHzRFZVhWXm1yqURakp+qvQ/70pF6ys2oNPbYtOTaioJPdrS9ZJPQpfT vZv/etgpea1ls+vPrnghTw0vfeVD8tb+lwhedLUlVGwmn87T77kzGSnQDKdyCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTlBX3DQ4zmrd; Thu, 17 Oct 2024 10:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HAuKAa056869; Thu, 17 Oct 2024 10:56:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HAuKUg056867; Thu, 17 Oct 2024 10:56:20 GMT (envelope-from git) Date: Thu, 17 Oct 2024 10:56:20 GMT Message-Id: <202410171056.49HAuKUg056867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 9dad034a7215 - Create tag vendor/Linux/rtw88/torvalds-v6.11 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/tags/vendor/Linux/rtw88/torvalds-v6.11 X-Git-Reftype: annotated tag X-Git-Commit: 9dad034a7215bed117dbf4d1e2a48136186dd6fa Auto-Submitted: auto-generated The annotated tag vendor/Linux/rtw88/torvalds-v6.11 has been created by bz: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/Linux/rtw88/torvalds-v6.11 tag vendor/Linux/rtw88/torvalds-v6.11 Tagger: Bjoern A. Zeeb TaggerDate: 2024-09-24 19:56:31 +0000 rtw88: update Realtek's rtw88 driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ). Sponsored by: The FreeBSD Foundation commit 8e9553a4cdee83cae197bb0f8929842af66f64be Author: Bjoern A. Zeeb AuthorDate: 2024-09-24 19:55:17 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-24 19:55:17 +0000 rtw88: update Realtek's rtw88 driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ). Sponsored by: The FreeBSD Foundation From nobody Thu Oct 17 10:56:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTlBX40czz5Yrkr for ; Thu, 17 Oct 2024 10:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTlBX3W3Fz4X0d; Thu, 17 Oct 2024 10:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vg4G311Ybv03ABGmIQR5K0gZZA/BCAAR+ugotRNYOsQ=; b=v3r4RR9sCLVldT1Pdsbkkrx+ydvd9xAAfBkz/sUhbaNCJYJIhVY6YR/2eWkFThjTH8RqtY tgXv+qbjlKE6A/uHcd7XgQ0NepnCAHoLr/k7x8H0k79Xip5nY49sojMX9YX48HbbqCRCRd 0IJpIY5IQ9arP2sldX5DBeCMXSePSIe5ggVNpKvVqjTl4jIPsnFGYe8IzNjOsfXm80wR4w 4mHAxNa4yJNYMZVldXrwGVIyLh4mVozQma1CEqMeS2vbyDZJjyzzPBv9O/sPVZkhSJhDma GHgK0l6D/QMDjEFNLbCBjaayW680xF4TYf+4PvMHD2TCoNLjBlMENudgp/Ui7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vg4G311Ybv03ABGmIQR5K0gZZA/BCAAR+ugotRNYOsQ=; b=kqPlXwPhwVJDUN4KZr/TpJNM55iuX9fF1nxCDgdtYN0FvU9IKUNBRGhquvuAHcJ7LEAQs8 DKrAU1rDbsULzFGovZ4DTCSkNmtlGNBp33eSjhhFfhSmeCO3TROImUh0exJZyK17Aiz2DP 6efJWgHJ+WIoHUbFLq+E/4epJmUQJwUNM+5rpm3aIwSh6rCvLUg65el+UrF3+GPlYTmPFF ft6c62wE1gUovDbkjjmk9I65nrWo5XVJ/J8HA/YaN7NsoNO1cjtof59SvNcwpDeLvrR5Bh nht2qVNmhIMYDThEi5fWfV7lsnRsHjVBO6y/mh8oUWTV/fASMs49iTKXxiK53Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729162580; a=rsa-sha256; cv=none; b=dwXljg4qfz7EIMbmw00s2UBg23sv7BdhznYWotF+No2gALFOuBxtUR7OiMad1oIyTOmTB3 yfjA7o9zLdcKHbPFKwFcDNPKE4KYVsYMYOVSXWE+wZR7W5IonimJzOK9w3uvXOHmtRwZqO EolsolWNAO4xDYI4j1Nqg7Nk1V+0azblo+SrgtXu3e2o2QWZgK/PI+xbrUEayZjOzRZd3T 63RiRt+/TCj1mRL9UQjqxuR7AzwnmgPJioPvInZA45qw8P94tap677+WAysqHC/0uKFzdh 6Q59X+jb7NTQsESyNeqqc9/D8MVTj8UUJr29I+nx6k0qzm95Qao9wyf8cpqffA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTlBX2nxfzmrc; Thu, 17 Oct 2024 10:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HAuKuF056848; Thu, 17 Oct 2024 10:56:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HAuKJv056847; Thu, 17 Oct 2024 10:56:20 GMT (envelope-from git) Date: Thu, 17 Oct 2024 10:56:20 GMT Message-Id: <202410171056.49HAuKJv056847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 1f3bff0d3082..8e9553a4cdee - vendor/Linux/rtw88 - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/vendor/Linux/rtw88 X-Git-Reftype: branch X-Git-Commit: 8e9553a4cdee83cae197bb0f8929842af66f64be X-Git-Oldrev: 1f3bff0d30821485f321b1d9802e6c440f2e140c X-Git-Newrev: 8e9553a4cdee83cae197bb0f8929842af66f64be Auto-Submitted: auto-generated The branch vendor/Linux/rtw88 has been updated by bz: URL: https://cgit.FreeBSD.org/src/log/?id=1f3bff0d3082..8e9553a4cdee 8e9553a4cdee rtw88: update Realtek's rtw88 driver From nobody Thu Oct 17 10:57: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 4XTlCb6rgrz5Ys8p for ; Thu, 17 Oct 2024 10:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTlCb2q7Mz4XZp; Thu, 17 Oct 2024 10:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TRFqfUhaBwDypE4E1x+Jw6wsaymOxkuO0fTF/CcmkwI=; b=vrBBY5zLPB7sDRnGURIvrbMDGNw1GWpvMcPtkMTdLk5XDkZaXcHIoKm3BwYxsnCr9tok6V pkX2KUHNT01lD7O1ExFRV9nN4cEQxt7HAAfW9lmygAHR7SHMIjQ34Wy92WUVIQxMDglNUv ZmsHJmllYVWJsGTu0ilU8tpTi0jKYtPAd15ZaqNLuWJjZ52sE5bg7P53K9e562Q5ppFkue zgtwsU23+e9nqr3n8dno3xFgoDUC6lv9nihSPwlRMahV6WD+Yzf+6OoCLH8Sy8cEIF2816 fk+DqO+VEMx+b+Vb6wuZBJFdE66H/51JfBrB6uHZvkFtahOYb+7m3RJKfglIRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TRFqfUhaBwDypE4E1x+Jw6wsaymOxkuO0fTF/CcmkwI=; b=LG64ChBVw+SM6+8DbrE6Jathi+55OvXjZ8Xnz2kA+9yJX60UF9a+NmW61lvdlFRKPMgfN/ x9MtnRrhD+uB6dZbK9jruw512vieWKsTuiP1nCf7cFbT9v/Lc0OBC7rviN4a+gJsw3d4Io g9H2O+SOt1RUS0Riza10zVb/B8FSLQlxPfsft3J9+JQ6GRFO+XN9Dx/PNtbWHXhyzA4bNB q94knGg1jKzzfLBDjsyFgWpi9AGJvmIv3uS+U6i98e9K3+vmuCbZH+DYQUwXAx7RN8k5Ne W/LQTAfuC52fTR++0xQomeWk7EH9Z9aMPBTTIPo9Go2DBzAqA+vTdKYEX26PDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729162635; a=rsa-sha256; cv=none; b=ictcod/gLyBBV4T8FFJ0zyBVCXKQbrXsvfQqCSR0x81T7SntMPiy+VSTo0ybgeoMyomPMo 4X8jgO91tdWt1TqQBxl5R6zyw1sAj1KMjVwGLDATn4Sz+4N+zCbB4bzmUZ+QtVuEVeH6Oz 7/gR4Wq9q4jXFxB3oHLe9SoK7OtC7M3fVzKgFC9vW4AThnL7FgTwOlSYCNTKRMBMzpmb1N jDCkXxpx332HLAKecaeZB2YgSvMSEiljN5SXsSO/5/ntptm3tWnzcpeP4NkFyErGHWZee0 ADuWyR+t5eYfnIGvUxDSqpdxqoB1atPUPWSSxEDNHwqX+JNZ66NBv1MTZIQbwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTlCb26VFzmjJ; Thu, 17 Oct 2024 10:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HAvFWI057101; Thu, 17 Oct 2024 10:57:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HAvFI7057100; Thu, 17 Oct 2024 10:57:15 GMT (envelope-from git) Date: Thu, 17 Oct 2024 10:57:15 GMT Message-Id: <202410171057.49HAvFI7057100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 6224ff21f3ff..5b760eaecd6c - vendor/Linux/rtw89 - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/vendor/Linux/rtw89 X-Git-Reftype: branch X-Git-Commit: 5b760eaecd6c3977aeacfe1654940f6ecd1d4d3e X-Git-Oldrev: 6224ff21f3ffc890838b54f80e9c93a3bc2461c9 X-Git-Newrev: 5b760eaecd6c3977aeacfe1654940f6ecd1d4d3e Auto-Submitted: auto-generated The branch vendor/Linux/rtw89 has been updated by bz: URL: https://cgit.FreeBSD.org/src/log/?id=6224ff21f3ff..5b760eaecd6c 5b760eaecd6c rtw89: update Realtek's rtw89 driver. From nobody Thu Oct 17 10:57: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 4XTlCb6wBgz5YsHh for ; Thu, 17 Oct 2024 10:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTlCb39GDz4XVD; Thu, 17 Oct 2024 10:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gz5VKNdrrwl+sa5U4UxAVpWPPsEbz8C2FLoWvES6OQI=; b=XvTYVg35S9P0K/n+O6NvhoAUPdl0o/1Sxd/UiQOzbrNGr5jA3EL/ZHRsPA9Y5wXLI+5wjB de4snkKIChdkkLPpoQi3dmXrs/XvQKhKKB21FuTY6C9ImFoaa47o7JVl9DAtNyzagB7JvE f6mKzVj4rfk4OYJYbwC2mC/eNPvpAqGb8ozTQMuwaNTb3GT+rJnPrCX8hB/A7bHfcWtoCu efxyqAvaaW9Q6ueTAxachygHmZ2HGU58sYoaTvNMSycgBXvxAvd8IX6mCa8kiujO+bZMa2 hsTwma4Lt3TlGg6iqqLgTUlVUQxz5U4+9EWQeerCgIvy+zh2mHKUEg9JHKvKyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729162635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gz5VKNdrrwl+sa5U4UxAVpWPPsEbz8C2FLoWvES6OQI=; b=DZyMoowTgrTSNcR84vYMVil3UxxHjEiR1e0IJEiyj39/S/jU1WOy/wLWlNfxBRPTMsFOCv ml4DUaVj1B2AdvvihrkggtY+/twrxJpK/8Xv/ZRoIv4ld7/1h/3xe4S2xM+FvgKMakV0NU 2XycA56FujRHXUQJcQVCia/A9RLKhaJpNAZIH2hwgz8q6lBKGRSWZeFdel/SM6tsKFv1I0 awVPB4ypAK+Xvo0+0WE8D8jGj39goBFuqrO22DljIjx5HuQUW9aefTglrVSygUtbLJc9av KU3szh5U6VvPmL+gr5pggYPNjZhWW8+DvQ87Ljn+YgqV56WTVKH3I9nA4BNIfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729162635; a=rsa-sha256; cv=none; b=ooctIJnNge8NDIOTdqvfV33N4NeQUPVsvR8q2+eu4rbPEAlUm5q28oHHM57eXT3eBUjabr 8lXPKW3A5VJaNrt3ZnFXfMPdnq1RWERpnN1wYNLxdUHAlLpqufcxqzK4yxwCpENjoTwTxk EnJf0LLtJd97EGIOHPUGj3Q+Jw5DvDfgzd1Qd/xK3ZK1mRSy+FdWJq3n1zYxTPbMsBuXOv uGDr91Bg01WGwEPIUWZz9G9TD+QyivMs8lu86rbtlZ8yJKrgTAaWre7+oKP9+fDDW/PsIx dqhQXeY3H9xYeSN7HNjrxjwdIZ4OYGivB0ACx3utxzzsj9HnZLl+TUwJwvdNjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTlCb2ZY4zmQq; Thu, 17 Oct 2024 10:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HAvFQQ057120; Thu, 17 Oct 2024 10:57:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HAvF2b057119; Thu, 17 Oct 2024 10:57:15 GMT (envelope-from git) Date: Thu, 17 Oct 2024 10:57:15 GMT Message-Id: <202410171057.49HAvF2b057119@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 567bfbc85d06 - Create tag vendor/Linux/rtw89/torvalds-v6.11 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/tags/vendor/Linux/rtw89/torvalds-v6.11 X-Git-Reftype: annotated tag X-Git-Commit: 567bfbc85d06be2af80c0ff51128cf5695deeb3e Auto-Submitted: auto-generated The annotated tag vendor/Linux/rtw89/torvalds-v6.11 has been created by bz: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/Linux/rtw89/torvalds-v6.11 tag vendor/Linux/rtw89/torvalds-v6.11 Tagger: Bjoern A. Zeeb TaggerDate: 2024-10-03 23:43:56 +0000 rtw89: update Realtek's rtw89 driver. This adds support for the Realtek 8922AE PCI wireless network (Wi-Fi 7) adapter. This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ). Sponsored by: The FreeBSD Foundation commit 5b760eaecd6c3977aeacfe1654940f6ecd1d4d3e Author: Bjoern A. Zeeb AuthorDate: 2024-10-03 23:43:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-03 23:43:12 +0000 rtw89: update Realtek's rtw89 driver. This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ). Sponsored by: The FreeBSD Foundation From nobody Thu Oct 17 12:32:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTnK237N9z5YxYR; Thu, 17 Oct 2024 12:32:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTnK22dBxz4dgm; Thu, 17 Oct 2024 12:32:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729168326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+EB9/aTQNHnWjWnRwdInxvzp7bVAs18CXF4bwjjHz/U=; b=xnhzIjaJzRpyCAq+Ng2FNyOPVHqJAIcvVZssKe+MgNKBYDi7FEQz5cCt4BRvDT2ccHkVcq r0LnCMjc2tOe/7ZXTf9uD3Ch7IHPHbfbB3Cwx3v2vXs4FOeHIUkPc/DlO6VlyIU3M2Pxv6 p3hdUPKrJ9JCkKF98Ng7qqHNG61m/m6Do5gvoIOcqITeoaNRxDIwU497FGOLg/Uzh4VRko WqnTsfGyfesGfguoyWexDINzjaRtXCgzEsbepDk0rUz0kK0Cj+ZMwTEhwoaWIjti0RuF+H XLGT34gDNjj/DfubviUCca/14EHGnwPfhqbYZp50B/8eOAd4Zyppjy20uvbiwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729168326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+EB9/aTQNHnWjWnRwdInxvzp7bVAs18CXF4bwjjHz/U=; b=LW+d5kMAPo8VoN5KBb7WXXHGflPh6RqwFUIdSt5Tdr1c1IBQ1WslTQc9KXWCupoj3X2CI3 bNgRFqt5q4PqbsgX6FayRvKW36Uw0GyvUccicykeO/YGQhsrj0qRTBwHwa4CWEQOhtmoPa LZYKdxAQFWbiAWKv4FbtjTTT2UJH8avd8fv1wfrUZyguVphxBe3KCcLyZUL6kZGd0DONiW 3fte9RkUviqzrOap6sKlAzAkI/XMUOFvjRv/hgzTeeqcY829N5gDP1BBeW0nYTKs1FxQlA GPGcasU9Jpq+GISaTZlYvkIc9xVp8E7pGVDfiBDIx6LrjVoVpYiHSoKnHUtp3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729168326; a=rsa-sha256; cv=none; b=BZWIimoho9bsEGOzshayXWCCjrvjxO2chee7iRDtq+NXjKG4plbtwjCecr7Nb8AGE68DC2 NIQqQQAlOvH1RvTVTdTbs9jhs/cPr4yXo8Y10OCllDd6uitk5n01L3kU09zNqZBJXxXlhl lMaikWOftxbTlO4qG6/olj5xdi1DYCG/LTF6ENVzkR+gQ6crgBm9Keetsxw6tMfKu5XhNw +IN6r1pN4WLGHLGXZav0ea1oWl+7TmJf4l6awE1mh6vCsxmDx8G19CjOGtB2iRSsWOe+xL qX4Q4qBew4hZxFmhwkBEy/gM8Yi1cfx6ZSSZJkpt2wFZDZO8M7p3RJEd+os7sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTnK2276yzq9R; Thu, 17 Oct 2024 12:32:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HCW6dm024159; Thu, 17 Oct 2024 12:32:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HCW67D024156; Thu, 17 Oct 2024 12:32:06 GMT (envelope-from git) Date: Thu, 17 Oct 2024 12:32:06 GMT Message-Id: <202410171232.49HCW67D024156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c17d96fe7952 - stable/14 - bhyve: avoid buffer overflow in pci_vtcon_control_send 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/stable/14 X-Git-Reftype: branch X-Git-Commit: c17d96fe79529b2490011e7c857739f41a7c3ce6 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c17d96fe79529b2490011e7c857739f41a7c3ce6 commit c17d96fe79529b2490011e7c857739f41a7c3ce6 Author: Pierre Pronchery AuthorDate: 2024-07-24 18:23:12 +0000 Commit: Ed Maste CommitDate: 2024-10-17 12:31:39 +0000 bhyve: avoid buffer overflow in pci_vtcon_control_send The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. Inside the function pci_vtcon_control_send, the length of the iov buffer is not validated before copy of the payload. Reported by: Synacktiv Reviewed by: markj Security: HYP-19 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46105 (cherry picked from commit 8934002959e02bcf5e3262730c3a731af95afb15) This is a follow-up to the fix for HYP-19, addressing another condition where an overflow might still occur. (Spotted by jhb@, thanks!) Reported by: Synacktiv Reviewed by: markj Security: HYP-19 Sponsored by: Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46882 (cherry picked from commit b34a4edefb0a40ced9b17ffd640f52fe55edc1f5) --- usr.sbin/bhyve/pci_virtio_console.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_virtio_console.c b/usr.sbin/bhyve/pci_virtio_console.c index a0bb8591811c..183dd1da934d 100644 --- a/usr.sbin/bhyve/pci_virtio_console.c +++ b/usr.sbin/bhyve/pci_virtio_console.c @@ -573,6 +573,9 @@ pci_vtcon_control_send(struct pci_vtcon_softc *sc, struct iovec iov; int n; + if (len > SIZE_T_MAX - sizeof(struct pci_vtcon_control)) + return; + vq = pci_vtcon_port_to_vq(&sc->vsc_control_port, true); if (!vq_has_descs(vq)) @@ -581,11 +584,15 @@ pci_vtcon_control_send(struct pci_vtcon_softc *sc, n = vq_getchain(vq, &iov, 1, &req); assert(n == 1); + if (iov.iov_len < sizeof(struct pci_vtcon_control) + len) + goto out; + memcpy(iov.iov_base, ctrl, sizeof(struct pci_vtcon_control)); - if (payload != NULL && len > 0) + if (len > 0) memcpy((uint8_t *)iov.iov_base + sizeof(struct pci_vtcon_control), payload, len); +out: vq_relchain(vq, req.idx, sizeof(struct pci_vtcon_control) + len); vq_endchains(vq, 1); } From nobody Thu Oct 17 12:34: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 4XTnMj3fSRz5Yxs8; Thu, 17 Oct 2024 12:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTnMj2wTrz4f08; Thu, 17 Oct 2024 12:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729168465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BxYB8yFRYgO34BWXt6og4Gscz7PlY4IrUqyDc9bnJcg=; b=rDTgPVf4DUoeH6WA+S7CCdhwopWk3UMCnYDXow906cLaG3a/6sSupZ2NBi+lxbVmMmXz1b lfzrZD1k52R+L9SUORK0l5okcHenXBYXtvFwVJ/CNcHfGlEwjBngXgLQu2eSger+/dR0Qg 5HoTLqiyQKky+9oIb6WMpeVV9VWAMUm8USLgM3ApGi7bs8l00Ej+YsGddpVgpdFRGgRqIU 2YU8efulH5N4ORvdMrySfv9/T/xHsRiDe5Gy5TgL+cmPue3tYBEC183BGfGfxDdEi5RzmM k336Kl/bHybtEBaboZ+lI5xomScHlIEPGnhvxnlraDdCsB31leZby5jUr7iQkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729168465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BxYB8yFRYgO34BWXt6og4Gscz7PlY4IrUqyDc9bnJcg=; b=u6oblt1XsTIBj9n9zliGyEOxJDPM8f9nkWBWvNpOkgjXvctWMv8HwlP0UF3eT62UYCToaA 0Y76a32uIavU/ZGMoqzHWDBeiLxKkMJHZBaRXl/3fSflbDcnLDUNHIJpPkjaZpl2ztmN0u /br7or8LhaJBfvt7HAup3+IfjBBExAfzokQYwk+ORlFkYCUUG/00f0jFdhorZKAwXc4Oup /uKcK+03bZJ9qmOYY32L8hhVEf7UpDpkWggpxNvEW6/8O/OIyQBSpzjyFMJ4yLltvajCJV xkY5ISn9Mzgq+nU2EBRfpB3N3Ktx0om7WVfZSPeUb4uPwePxMLm+T2fRFuZP0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729168465; a=rsa-sha256; cv=none; b=HG96rHd4JNSyaVt5LLqIzqvhmiQs8jw7FGJuu/kMuOCfKtWESpQGqWxgLiQW3U2QeYAvNa A1xBzpNXZYuZcVgAp6RFSCMC+h0jVGVCMu069LwfOXMI2Cmqp2Gzj2L69UvgckxNmERqZe UJ1+Ory8imKmu99IE6yJ++BKlsB7C/MpVJxcmHj5UziVaz+c84F8OhsJiNlvpzdQ9EaRQa acHPA/58laSlgVvGID2feqMye26Ly0J9pmFJpnj4ZtAqJd1wzvQ2i4CP3tl9fXC4KAxyDE N8ocw2z4jwAXziopaFVUVBc5G0Ag6nkFZHtS+DNdni/nIhapCM7b2luVVJqBMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTnMj2QvczqLt; Thu, 17 Oct 2024 12:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HCYPJe025678; Thu, 17 Oct 2024 12:34:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HCYPnW025675; Thu, 17 Oct 2024 12:34:25 GMT (envelope-from git) Date: Thu, 17 Oct 2024 12:34:25 GMT Message-Id: <202410171234.49HCYPnW025675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c4ec2918f26e - stable/13 - bhyve: avoid buffer overflow in pci_vtcon_control_send 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/stable/13 X-Git-Reftype: branch X-Git-Commit: c4ec2918f26e0277e7243ed4fa0ac890b1ce12cd Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c4ec2918f26e0277e7243ed4fa0ac890b1ce12cd commit c4ec2918f26e0277e7243ed4fa0ac890b1ce12cd Author: Pierre Pronchery AuthorDate: 2024-07-24 18:23:12 +0000 Commit: Ed Maste CommitDate: 2024-10-17 12:34:11 +0000 bhyve: avoid buffer overflow in pci_vtcon_control_send The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. Inside the function pci_vtcon_control_send, the length of the iov buffer is not validated before copy of the payload. Reported by: Synacktiv Reviewed by: markj Security: HYP-19 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46105 (cherry picked from commit 8934002959e02bcf5e3262730c3a731af95afb15) This is a follow-up to the fix for HYP-19, addressing another condition where an overflow might still occur. (Spotted by jhb@, thanks!) Reported by: Synacktiv Reviewed by: markj Security: HYP-19 Sponsored by: Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46882 (cherry picked from commit b34a4edefb0a40ced9b17ffd640f52fe55edc1f5) (cherry picked from commit c17d96fe79529b2490011e7c857739f41a7c3ce6) --- usr.sbin/bhyve/pci_virtio_console.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_virtio_console.c b/usr.sbin/bhyve/pci_virtio_console.c index a0bb8591811c..183dd1da934d 100644 --- a/usr.sbin/bhyve/pci_virtio_console.c +++ b/usr.sbin/bhyve/pci_virtio_console.c @@ -573,6 +573,9 @@ pci_vtcon_control_send(struct pci_vtcon_softc *sc, struct iovec iov; int n; + if (len > SIZE_T_MAX - sizeof(struct pci_vtcon_control)) + return; + vq = pci_vtcon_port_to_vq(&sc->vsc_control_port, true); if (!vq_has_descs(vq)) @@ -581,11 +584,15 @@ pci_vtcon_control_send(struct pci_vtcon_softc *sc, n = vq_getchain(vq, &iov, 1, &req); assert(n == 1); + if (iov.iov_len < sizeof(struct pci_vtcon_control) + len) + goto out; + memcpy(iov.iov_base, ctrl, sizeof(struct pci_vtcon_control)); - if (payload != NULL && len > 0) + if (len > 0) memcpy((uint8_t *)iov.iov_base + sizeof(struct pci_vtcon_control), payload, len); +out: vq_relchain(vq, req.idx, sizeof(struct pci_vtcon_control) + len); vq_endchains(vq, 1); } From nobody Thu Oct 17 13:10:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTp9q2f2Wz5Z0kN; Thu, 17 Oct 2024 13:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTp9q29zmz4gtT; Thu, 17 Oct 2024 13:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729170655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VZ65EYJ/6RTcv79Te9vcQKzcOpfyZpExVBN/6DtP7L0=; b=YzSZzY78zcQqWcnprlD32HaL9XfYQNdaztOubG40RY+xqT/giHjOq0Mtnun9yolLr7Eezx Z6UWI7m1IS+5h/AmFo9h5Moxjdu6NvKwaEl3dHEXN7oakh1cn//byQciaIYHk0WC+Lrfia ZUGztf3ILE+1TFeUfHG+5q9xpxz2Del51YyfuwXIGiJJzqks9+XbhL8vlVPx7XMVdJiAfn GnNqt2GG4umxPUlBlTiSqYVq5M2XAlMQKyW7NPAU3zDjKax8iPNPkvX0W65pw+V0C9yFTB q/dd9GHLUZS+5yIEOC7sCJJi4I50vmprqzY4XLAHMKLSAeD5/pNMg7SnamrbKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729170655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VZ65EYJ/6RTcv79Te9vcQKzcOpfyZpExVBN/6DtP7L0=; b=B+pLJuGZzOM166vL3hQ78pAKMdJ/2E1sdwLUj6wYV48y841xsp+BFtVUn2HGBc04ti9I2x e1CDY9dxt/QcP8QP0h1Podej7NobitokNtvxo+n4tihG3yOk4ZRHjh+tjH8oML0qRi1xKY +/JMh9capPVOfbUfKuS3jEvic05sX7WNl9hUiVl2jTS1xs4DEAu8u3BHFHYzylmn73wXkm aGKNUEJ49uGQr2J9TzWPRuPlxf4wgtCPJN1k1Y+BjCGKMoVcdqDtWZTsndCqRKGm1fIMkQ QNzNklhzxq0poYrq96gyYQpDK3Uwlm5yugxHRpcXGGttk/ZMC4o2R69J4wSy7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729170655; a=rsa-sha256; cv=none; b=vDczDeQLry0YgEDU62CJMvpMWDxIwjqCEUMrJXJh41BeyWnF+3lrRCTCodlo8cnwiwsWG7 OJdL+z26F6WdJRW4Aq/4abIlzciN94RQeE7XyvIDikVR1oz2JmMawCK1ESyNubDC6ApHnP 2j2Uoi7cySLhz6mFnIcDT8XfWXj1LbxwtA/XArbx8a9kXklh8Ro/gB2BVVDgPiPTim+0Ng W9pdinVgHvu/DDMDmaLWYWJRIJmn3jGhTYVaFUS0ti7Obgqp49/5rNArzYoBI7fvijyGkk wvvNXDVbp9MmfZNFRCT4vPLKO1SpVrJjaAkdQoxrAgLLAyah4bIs4BIqdpUf+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 4XTp9q1nctzrBj; Thu, 17 Oct 2024 13:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HDAtLw087179; Thu, 17 Oct 2024 13:10:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HDAtUO087176; Thu, 17 Oct 2024 13:10:55 GMT (envelope-from git) Date: Thu, 17 Oct 2024 13:10:55 GMT Message-Id: <202410171310.49HDAtUO087176@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: 17120e4bc3e6 - main - ndp: Remove a stray semicolon 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: 17120e4bc3e61557816ca0558a60ab969b3df404 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=17120e4bc3e61557816ca0558a60ab969b3df404 commit 17120e4bc3e61557816ca0558a60ab969b3df404 Author: Zhenlei Huang AuthorDate: 2024-10-17 13:05:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-10-17 13:05:29 +0000 ndp: Remove a stray semicolon MFC after: 1 week --- usr.sbin/ndp/ndp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index a023a7d0ad77..9a249a4987a7 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -638,7 +638,7 @@ dump_rtsock(struct sockaddr_in6 *addr, int cflag) xo_emit(xobuf, "Neighbor", "Linklayer Address", "Netif", "Expire", "S", "Flags"); } xo_open_list("neighbor-cache"); -again:; +again: mib[0] = CTL_NET; mib[1] = PF_ROUTE; mib[2] = 0; From nobody Thu Oct 17 13:27: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 4XTpXw2pDkz5Z13j; Thu, 17 Oct 2024 13:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTpXw2MKGz4j9V; Thu, 17 Oct 2024 13:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729171648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NUfqti+sDezzp4gpGJ7eekUKSZuS9KRSHzIM9U0WI1g=; b=iNJx4i37PWZDd3RwX9CGf+5f51TDEI3XbGAALcRomzprOY9uXO3nLRYIJtDHaP+BDpecI3 AN6j89eZnpmzZMhd6VOX+RE40b7RkTghNGt5ICqguQhPglc+C2L+KOmTntl1X5Ge0iEXNQ Cuje27TdzfCBqlOYeQUVu3gm4umseB3Gl8rIX6DS8IqOlEDWGGgaqijn1mShAXrrLSAeAN 36FkmdEHa0VAEWgzomQKT8A7KOoOGBoZTKa1YCQyQjL7jVd5syTquQL26DbMucku6iDt4E laBAc6Q39dNMX0E8C2n9oiOpcS9mrrIVrrCoITAS3sJftG93HR9qNyRxUXSOEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729171648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NUfqti+sDezzp4gpGJ7eekUKSZuS9KRSHzIM9U0WI1g=; b=KRDwxgjRhcwgFUeffahXasdVEWem0rum/0TZEkmK3CyCjnn6yVPKiGjS/omso9eNEGa0yk lxBqdubRJgs1nCjhLamojmT8T31r5FVVMaSYf3KX/1DPDzT8HencU57hvoVPy04W8c1i+f Edr0A1s6jZX9fehw5ED0+mlVIMytrvh8iRNM+l+FjAPYvr3k64z/Bf3GYcsQ54jQIloeYv dtl62fqml8Jtrfr507W0X//WjIkPiFd3TnKbXko29NeH7YK0plAEGckdc3UKnxkpvzOEng YlWFL8Ogr2auXrrz9v7sMukPmRVGzVg+vdU3R3Je+92jGuXMaQtmz0UpttA+qA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729171648; a=rsa-sha256; cv=none; b=aPhVrx/Hqhh5rdnNAIL33ibDhWt4sxdZtEMqkojkDfZQzuQwgwLy+s7x1XprLjrS1p2QNR lxCu1B7KD2qEn0KCI0NWoxXy2qTV5+YXmoi0+g4o0whAOyFvUbAW8hLU+Dv63rTuTgrp+s D6MbdfOKaksTFAM6TNY6xoymHDo8Ra0+9gDa9o2jdPUikP6nJALcO/34MDFJBQwiz62lrF 9YHJG/aUezd9XRd4133kxyzsFPrDJrVGYOyRKzElsogsZ0kc3MyWK0tLiCS68AZrxrsPc+ wBym2EkcGh7St4slx3TWVCuoggHsB51E67AWYb4c5UWBhYpv9L9Gbi2HijC/ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTpXw1yXGzqsK; Thu, 17 Oct 2024 13:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HDRSG6011486; Thu, 17 Oct 2024 13:27:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HDRSe5011483; Thu, 17 Oct 2024 13:27:28 GMT (envelope-from git) Date: Thu, 17 Oct 2024 13:27:28 GMT Message-Id: <202410171327.49HDRSe5011483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 105331f658e2 - main - LinuxKPI: netdevice: add alloc_netdev_dummy() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 105331f658e2f14fb4daa64dcd076c7369505295 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=105331f658e2f14fb4daa64dcd076c7369505295 commit 105331f658e2f14fb4daa64dcd076c7369505295 Author: Bjoern A. Zeeb AuthorDate: 2024-09-26 21:06:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-17 13:27:05 +0000 LinuxKPI: netdevice: add alloc_netdev_dummy() Add alloc_netdev_dummy() which is needed by an updated rtw88 driver. Given we already call linuxkpi_init_dummy_netdev() ourselves allow the setup function to be NULL to not initialize and start a tasq td twice. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46802 --- sys/compat/linuxkpi/common/include/linux/netdevice.h | 2 ++ sys/compat/linuxkpi/common/src/linux_netdev.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h index dde3ad07dec2..cd7d23077a62 100644 --- a/sys/compat/linuxkpi/common/include/linux/netdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h @@ -466,6 +466,8 @@ void linuxkpi_free_netdev(struct net_device *); #define alloc_netdev(_l, _n, _f, _func) \ linuxkpi_alloc_netdev(_l, _n, _f, _func) +#define alloc_netdev_dummy(_l) \ + linuxkpi_alloc_netdev(_l, "dummy", NET_NAME_UNKNOWN, NULL) #define free_netdev(_n) \ linuxkpi_free_netdev(_n) diff --git a/sys/compat/linuxkpi/common/src/linux_netdev.c b/sys/compat/linuxkpi/common/src/linux_netdev.c index fe00e929c168..c36684f9fd97 100644 --- a/sys/compat/linuxkpi/common/src/linux_netdev.c +++ b/sys/compat/linuxkpi/common/src/linux_netdev.c @@ -409,7 +409,8 @@ linuxkpi_alloc_netdev(size_t len, const char *name, uint32_t flags, /* This needs extending as we support more. */ - setup_func(ndev); + if (setup_func != NULL) + setup_func(ndev); return (ndev); } From nobody Thu Oct 17 13:27:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTpXx4PDMz5Z11X; Thu, 17 Oct 2024 13:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTpXx3fdKz4jK5; Thu, 17 Oct 2024 13:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729171649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zm0uE3kWajypTG06lE9YfAX8uE5nB/TVDk48j3fVoTM=; b=fG99xpQjNuuyS+vM8H+HN+mx2B/dlb1dZjnoCk9sf6YyKFJX4BHRnBEK9DIJ9fuaRAzxPU 55RPI8ZvderrfrycuzUMVEcQFokTimbIVdpBwFnmO8Ozx1p/oQXY4IrEa1a52DZc8zLOkf 8DppYZD5YDrF5BG3QiGTGvSGcYip61siT6kDHyWVn6ZJjcTYhqvV2h0gz1QvpqMbCg8sRG h4/ypLwUVevkGIuslNSgKd0XFfNTPVSJIZHAk3NW856VRM4S3zmoFAEX/nM47GedKrc1aK l6PhImvGHyIaSQRDlTkEcO3B7l3bd4lFGfuCV2EQRTqPbvDA+OhDOuZjpnOQHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729171649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zm0uE3kWajypTG06lE9YfAX8uE5nB/TVDk48j3fVoTM=; b=nxv19JaCI8i0Cs1SdfGcvZvFnKyRGpkGBtS1mo3vDiAtgcu4Un8esoyMcd3rP7BM0iPMhw z5REqh1awefUOM5tHgSg0A440JpVPuDH/j8nV719MkRfhQ9cs5JhvYLzJOPLu/M3z2l6uD 6UgmLIbzNLc6O0B6K9DgWHsh1EDIXzi2kMkwi5moFb8Ts6ftmXGjdBiO+jvBgg0XRD+jQo zIuQwd5jsKMH23vLgT2fP+eUKVebklp3ncJlxJm5ZAIb6AdQ6uaalkTjhYh/3sktK9WSR4 U2lzyJDIdWw8QI1EevwAS0EGvVGtbk4kX70BjTt3YVpnmOJwEKfM/pqpe+G1ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729171649; a=rsa-sha256; cv=none; b=gBNtObbymvHu00p1fp5K8KFb93ReNzaxmnrLVoCGHiQXJPbuzqlidXZ3U9xKJ46NUCc+dt Zt4PWNoKv43Cv8zaj3fw8LF2YDd6CmxixgBi5rzNLYTDQ09o8EeRqESJtxjY61Tiv0yDsG irPRtPsZon/Gql3Gm6garPXmROdpckg+P1YbtgbBEbjpkWWbiONzVkpZhkODG1SbJDSLj9 /KoRK8LGxyYNUEOfym117WnvTO+oOl2RsR5VBH9MM8SpF1iK4sbWNmYuvubCb/ChDZE8jj 5BEoR0Du7wxb4jOShDZMdQ3bH8J6ffVtt7tG3X3wMUuSjvxL7UaHhXtTsUVE3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTpXx3G0qzrm9; Thu, 17 Oct 2024 13:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HDRTPL011534; Thu, 17 Oct 2024 13:27:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HDRTwF011531; Thu, 17 Oct 2024 13:27:29 GMT (envelope-from git) Date: Thu, 17 Oct 2024 13:27:29 GMT Message-Id: <202410171327.49HDRTwF011531@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 157e93e0e813 - main - LinuxKPI: pci: rename PCI_IRQ_LEGACY to PCI_IRQ_INTX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 157e93e0e8138fbaa6ab5d5b20b0c23f903667a6 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=157e93e0e8138fbaa6ab5d5b20b0c23f903667a6 commit 157e93e0e8138fbaa6ab5d5b20b0c23f903667a6 Author: Bjoern A. Zeeb AuthorDate: 2024-09-26 21:13:35 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-17 13:27:05 +0000 LinuxKPI: pci: rename PCI_IRQ_LEGACY to PCI_IRQ_INTX PCI_IRQ_LEGACY was added in 366d68f28379 (likely) for rtw88 only. The define now got renamed and I cannot find any other use but rtw88 and rtw89. We keep the old name as comapt while driver updates are in progress enabling it defining LINUXKPI_VERSION for the two drivers. Sponsored by; The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46822 --- sys/compat/linuxkpi/common/include/linux/pci.h | 8 ++++++-- sys/compat/linuxkpi/common/src/linux_pci.c | 2 +- sys/modules/rtw88/Makefile | 1 + sys/modules/rtw89/Makefile | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index a2de534fcb60..c6fc1195f71b 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -233,10 +233,14 @@ extern const char *pci_power_names[6]; #define PCI_L1SS_CTL1 0x8 #define PCI_L1SS_CTL1_L1SS_MASK 0xf -#define PCI_IRQ_LEGACY 0x01 +#define PCI_IRQ_INTX 0x01 #define PCI_IRQ_MSI 0x02 #define PCI_IRQ_MSIX 0x04 -#define PCI_IRQ_ALL_TYPES (PCI_IRQ_MSIX|PCI_IRQ_MSI|PCI_IRQ_LEGACY) +#define PCI_IRQ_ALL_TYPES (PCI_IRQ_MSIX|PCI_IRQ_MSI|PCI_IRQ_INTX) + +#if defined(LINUXKPI_VERSION) && (LINUXKPI_VERSION >= 60800) +#define PCI_IRQ_LEGACY PCI_IRQ_INTX +#endif struct pci_dev; diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 3376d93053dc..366731081072 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -1306,7 +1306,7 @@ out: if (error == 0 && pdev->msi_enabled) return (pdev->dev.irq_end - pdev->dev.irq_start); } - if (flags & PCI_IRQ_LEGACY) { + if (flags & PCI_IRQ_INTX) { if (pdev->irq) return (1); } diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index b0e6b59b708e..a63f769cb878 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -32,6 +32,7 @@ SRCS+= opt_wlan.h opt_inet6.h opt_inet.h #CFLAGS+= -ferror-limit=0 CFLAGS+= -DKBUILD_MODNAME='"rtw88"' +CFLAGS+= -DLINUXKPI_VERSION=60800 CFLAGS+= -I${DEVRTW88DIR} CFLAGS+= ${LINUXKPI_INCLUDES} diff --git a/sys/modules/rtw89/Makefile b/sys/modules/rtw89/Makefile index f13924e1aa5b..87e1b133867d 100644 --- a/sys/modules/rtw89/Makefile +++ b/sys/modules/rtw89/Makefile @@ -32,6 +32,7 @@ SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h CFLAGS+= -DKBUILD_MODNAME='"rtw89"' +CFLAGS+= -DLINUXKPI_VERSION=60800 CFLAGS+= -I${DEVRTW89DIR} CFLAGS+= ${LINUXKPI_INCLUDES} From nobody Thu Oct 17 13:49: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 4XTq2h6yJ3z5Z2Kh; Thu, 17 Oct 2024 13:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTq2h6F3Cz4lSQ; Thu, 17 Oct 2024 13:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6c7xQmoNgD0qStjnzYRA0U0jLzVnaahi11/gXd0Uldg=; b=ZzCzS+Ly+mmvrv7H5azZ08FLy5h8ZqAs0Rah8s7GxOGhYEnKbvHVMOGWdZnedKZSydhNL7 u8jBQWgIJjoX5mmxisvxHZBha6o7Lt4qkrkKEc5NgL4I5JieVRIbUR5eRDNWfm5NjfEBlb zBta7flvYYjrfRF8krelCYkzZWLXAuFTkNGDI7F2q9g8x1sLcxykaG+RlI++6I8QNWFhkp 9tqm837Xz60UyAsW33ur6FvS33UH3zr1jkFbQUQHFXozFjH1zehgQPx218T4TlZ2rPfw21 AU7EvrZrSkOUwvX8vK3JFe+dqlJSZU/eRI5eHadVQe5n3uGty46Nrip4N1Bu6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6c7xQmoNgD0qStjnzYRA0U0jLzVnaahi11/gXd0Uldg=; b=q+q7ig08FvKLajK5ilqbxhTCQc4Ita4lu2WcULXZXdr3aM91vo3QjjCu/R4ZalwICFJcN2 dqTDLBdPmOopLEKNBzldDj0Aq5snk4Yz4qH3NvJP1HZjP7O5BRsDezWVbUJ7orDOQrKIw9 4rnmQ28XBt1vBjKiDSeqMQZwQ8nfGdHZYUUVhc8UwWhkd7DKAZsjZNmHXyni9YcRq3XJ2/ ELE2grDkpk0fpp6RJf8B6tL8sWerBFp/snEMy1y2ii2nk/5OdIykrzebOseKh21jCacPwd LO+J5hJMDXzJqnaauh2sHEwRnmXufYvd0NUlD7MugjNNr4pxv74fwM6AJTg02w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729172988; a=rsa-sha256; cv=none; b=a+T3NPk6fQzjn+O5Hm0nbSFPWo+Gc2zGg+JHAG10l03v8QGuRh30QhAOWJ2hWczyr9MPlC QLVYrbMqApSpf31t+x+P75y2Ri5IcDopq5q7daGgAhebMrBQEMM2tO3u7sundnuOEC5D5T XrmVzcMzfRsPwaCDs/xCHjbqK9RrNKpy5XJu6DKQt/pYt83C2EpTMSUgiqrVdXtDsrfc3U QMXL1/RzeoE8CV9ao1i+XKxMaOzNv65l3+wFlWCDF8tGQLK6aFdJp+50vvA2xhqihex3KW xBnTYwUNCfhI0l2uHvAf3bGNq7t3kCK2Rk8EKocDNhVS6qPvF9kjAtmfTKgUGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTq2h5qzbzrbm; Thu, 17 Oct 2024 13:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HDnms7044601; Thu, 17 Oct 2024 13:49:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HDnmXv044598; Thu, 17 Oct 2024 13:49:48 GMT (envelope-from git) Date: Thu, 17 Oct 2024 13:49:48 GMT Message-Id: <202410171349.49HDnmXv044598@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Igor Ostapenko Subject: git: 26980dceaef3 - stable/14 - kyua: Add FreeBSD Jail execution environment 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 26980dceaef31cb2fec887b3cd5d928438d8579a Auto-Submitted: auto-generated The branch stable/14 has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=26980dceaef31cb2fec887b3cd5d928438d8579a commit 26980dceaef31cb2fec887b3cd5d928438d8579a Author: Igor Ostapenko AuthorDate: 2024-07-16 18:41:12 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-17 13:44:34 +0000 kyua: Add FreeBSD Jail execution environment support A new Kyua concept is added -- "execution environment". A test can be configured to be run within a specific environment. The test case lifecycle is extended respectively: - execenv init (creates a jail or does nothing for default execenv="host") - test exec - cleanup exec (optional) - execenv cleanup (removes a jail or does nothing for default execenv="host") The following new functionality is provided, from bottom to top: 1 ATF based tests - The new "execenv" metadata property can be set to explicitly ask for an execution environment: "host" or "jail". If it's not defined, as all existing tests do, then it implicitly means "host". - The new "execenv.jail.params" metadata property can be optionally defined to ask Kyua to use specific jail(8) parameters during creation of a temporary jail. An example is "vnet allow.raw_sockets". Kyua implicitly adds "children.max" to "execenv_jail_params" parameters with the maximum possible value. A test case can override it. 2 Kyuafile - The same new metadata properties can be defined on Kyuafile level: "execenv" and "execenv_jail_params". - Note that historically ATF uses dotted style of metadata naming, while Kyua uses underscore style. Hence "execenv.jail.params" vs. "execenv_jail_params". 3 kyua.conf, kyua CLI - The new "execenvs" engine configuration variable can be set to a list of execution environments to run only tests designed for. Tests of not listed environments are skipped. - By default, this variable lists all execution environments supported by a Kyua binary, e.g. execenvs="host jail". - This variable can be changed via "kyua.conf" or via kyua CLI's "-v" parameter. For example, "kyua -v execenvs=host test" will run only host-based tests and skip jail-based ones. - Current value of this variable can be examined with "kyua config". [markj] This feature has not landed upstream yet. See the discussion in https://github.com/freebsd/kyua/pull/224 . Having the ability to automatically jail tests allows many network tests to run in parallel, giving a drastic speedup. So, let's import the feature and start using it in main. Signed-off-by: Igor Ostapenko Reviewed by: markj, kp Tested by: markj, kp MFC after: 3 months Differential Revision: https://reviews.freebsd.org/D45865 (cherry picked from commit 257e70f1d5ee61037c8c59b116538d3b6b1427a2) Approved by: kp (mentor), markj (mentor) --- contrib/kyua/AUTHORS | 1 + contrib/kyua/cli/cmd_config_test.cpp | 12 +- contrib/kyua/doc/kyua.conf.5.in | 13 +- contrib/kyua/doc/kyuafile.5.in | 103 +++++++- contrib/kyua/drivers/report_junit_test.cpp | 8 + contrib/kyua/engine/atf.cpp | 11 +- contrib/kyua/engine/atf_list.cpp | 4 + contrib/kyua/engine/config.cpp | 18 ++ contrib/kyua/engine/execenv/execenv.cpp | 74 ++++++ contrib/kyua/engine/execenv/execenv.hpp | 149 +++++++++++ contrib/kyua/engine/execenv/execenv_host.cpp | 52 ++++ contrib/kyua/engine/execenv/execenv_host.hpp | 63 +++++ contrib/kyua/engine/plain.cpp | 7 +- contrib/kyua/engine/requirements.cpp | 33 +++ contrib/kyua/engine/scheduler.cpp | 274 ++++++++++++++++++- contrib/kyua/engine/scheduler.hpp | 1 + contrib/kyua/engine/tap.cpp | 7 +- contrib/kyua/examples/kyua.conf | 3 + contrib/kyua/integration/cmd_config_test.sh | 2 + contrib/kyua/integration/cmd_report_junit_test.sh | 8 + contrib/kyua/integration/cmd_report_test.sh | 2 + contrib/kyua/main.cpp | 3 + contrib/kyua/model/metadata.cpp | 76 ++++++ contrib/kyua/model/metadata.hpp | 5 + contrib/kyua/model/metadata_test.cpp | 8 +- contrib/kyua/model/test_case_test.cpp | 3 +- contrib/kyua/model/test_program_test.cpp | 13 +- contrib/kyua/os/freebsd/execenv_jail.cpp | 78 ++++++ contrib/kyua/os/freebsd/execenv_jail.hpp | 65 +++++ contrib/kyua/os/freebsd/execenv_jail_manager.cpp | 63 +++++ contrib/kyua/os/freebsd/execenv_jail_manager.hpp | 54 ++++ contrib/kyua/os/freebsd/execenv_jail_stub.cpp | 75 ++++++ contrib/kyua/os/freebsd/main.cpp | 54 ++++ contrib/kyua/os/freebsd/main.hpp | 41 +++ contrib/kyua/os/freebsd/utils/jail.cpp | 306 ++++++++++++++++++++++ contrib/kyua/os/freebsd/utils/jail.hpp | 64 +++++ contrib/kyua/utils/config/nodes.ipp | 9 +- contrib/kyua/utils/process/executor.cpp | 42 +++ contrib/kyua/utils/process/executor.hpp | 1 + usr.bin/kyua/Makefile | 15 +- 40 files changed, 1792 insertions(+), 28 deletions(-) diff --git a/contrib/kyua/AUTHORS b/contrib/kyua/AUTHORS index ac0998fb937c..26bfcd3471d3 100644 --- a/contrib/kyua/AUTHORS +++ b/contrib/kyua/AUTHORS @@ -9,3 +9,4 @@ # * Organization * Google Inc. +* Igor Ostapenko diff --git a/contrib/kyua/cli/cmd_config_test.cpp b/contrib/kyua/cli/cmd_config_test.cpp index f084f99bb90a..a5f6930ba027 100644 --- a/contrib/kyua/cli/cmd_config_test.cpp +++ b/contrib/kyua/cli/cmd_config_test.cpp @@ -61,6 +61,7 @@ fake_config(void) { config::tree user_config = engine::default_config(); user_config.set_string("architecture", "the-architecture"); + user_config.set_string("execenvs", "the-env"); user_config.set_string("parallelism", "128"); user_config.set_string("platform", "the-platform"); //user_config.set_string("unprivileged_user", ""); @@ -83,12 +84,13 @@ ATF_TEST_CASE_BODY(all) cmdline::ui_mock ui; ATF_REQUIRE_EQ(EXIT_SUCCESS, cmd.main(&ui, args, fake_config())); - ATF_REQUIRE_EQ(5, ui.out_log().size()); + ATF_REQUIRE_EQ(6, ui.out_log().size()); ATF_REQUIRE_EQ("architecture = the-architecture", ui.out_log()[0]); - ATF_REQUIRE_EQ("parallelism = 128", ui.out_log()[1]); - ATF_REQUIRE_EQ("platform = the-platform", ui.out_log()[2]); - ATF_REQUIRE_EQ("test_suites.foo.bar = first", ui.out_log()[3]); - ATF_REQUIRE_EQ("test_suites.foo.baz = second", ui.out_log()[4]); + ATF_REQUIRE_EQ("execenvs = the-env", ui.out_log()[1]); + ATF_REQUIRE_EQ("parallelism = 128", ui.out_log()[2]); + ATF_REQUIRE_EQ("platform = the-platform", ui.out_log()[3]); + ATF_REQUIRE_EQ("test_suites.foo.bar = first", ui.out_log()[4]); + ATF_REQUIRE_EQ("test_suites.foo.baz = second", ui.out_log()[5]); ATF_REQUIRE(ui.err_log().empty()); } diff --git a/contrib/kyua/doc/kyua.conf.5.in b/contrib/kyua/doc/kyua.conf.5.in index 05a9499b48c4..7188bb8888c3 100644 --- a/contrib/kyua/doc/kyua.conf.5.in +++ b/contrib/kyua/doc/kyua.conf.5.in @@ -1,4 +1,4 @@ -.\" Copyright 2012 The Kyua Authors. +.\" Copyright 2012-2024 The Kyua Authors. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd February 20, 2015 +.Dd March 22, 2024 .Dt KYUA.CONF 5 .Os .Sh NAME @@ -36,6 +36,7 @@ .Pp Variables: .Va architecture , +.Va execenvs , .Va platform , .Va test_suites , .Va unprivileged_user . @@ -72,6 +73,14 @@ The following variables are internally recognized by .Bl -tag -width XX -offset indent .It Va architecture Name of the system architecture (aka processor type). +.It Va execenvs +Whitespace-separated list of execution environment names. +.Pp +Only tests which require one of the given execution environments will be run. +.Pp +See +.Xr kyuafile 5 +for the list of possible execution environments. .It Va parallelism Maximum number of test cases to execute concurrently. .It Va platform diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in index 06cb2dbc42a8..a667f5dc2816 100644 --- a/contrib/kyua/doc/kyuafile.5.in +++ b/contrib/kyua/doc/kyuafile.5.in @@ -1,4 +1,4 @@ -.\" Copyright 2012 The Kyua Authors. +.\" Copyright 2012-2024 The Kyua Authors. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd July 3, 2015 +.Dd March 23, 2024 .Dt KYUAFILE 5 .Os .Sh NAME @@ -173,6 +173,75 @@ Refer to the section below for clarification. .It Va description Textual description of the test. +.It Va execenv +The name of the execution environment to be used for running the test. +If empty or not defined, the +.Sq host +execution environment is meant. +The possible values are: +.Bl -tag -width xUnnnnnnn +.It host +The default environment which runs the test as a usual child process. +.It jail +The +.Fx +.Xr jail 8 +environment. +It creates a temporary jail to run the test and its optional cleanup logic +within. +.Pp +This feature requires +.Xr kyua 1 +to be running with superuser privileges. +.Pp +The difference between +.Va security.jail.children.max +and +.Va security.jail.children.cur +sysctl of the jail +.Xr kyua 1 +is running within must have a value high enough for the jail based tests +planned to be run. +For instance, the value 1 should be enough for a sequential run of simple +tests. +Otherwise, such aspects as parallel test execution and sub-jails spawned +by specific test cases should be considered. +.Pp +The formula of a temporary jail name is +.Sq kyua ++ +.Va test program path ++ +.Sq _ ++ +.Va test case name . +All non-alphanumeric characters are replaced with +.Sq _ . +.Sq kyua_usr_tests_sys_netpfil_pf_pass_block_v4 +is an example for /usr/tests/sys/netpfil/pf/pass_block:v4 test case. +.El +.It Va execenv_jail_params +Additional test-specific whitespace-separated parameters of +.Fx +.Xr jail 8 +to create a temporary jail within which the test is run. +It makes sense only if execenv is set to +.Sq jail . +.sp +.Xr kyua 1 +implicitly passes +.Sq children.max +parameter to +.Xr jail 8 +for a temporary jail with the maximum possible value according to +the jail +.Xr kyua 1 +itself is running within. +It allows tests to easily spawn their own sub-jails without additional +configuration. +It can be overridden via +.Va execenv_jail_params +if needed. .It Va is_exclusive If true, indicates that this test program cannot be executed along any other programs at the same time. @@ -360,6 +429,36 @@ test_suite('FreeBSD') plain_test_program{name='the_test', ['custom.FreeBSD-Bug-Id']='category/12345'} .Ed +.Ss FreeBSD jail execution environment +The following example configures the test to be run within a temporary jail +with +.Xr vnet 9 +support and the permission to create raw sockets: +.Bd -literal -offset indent +syntax(2) + +test_suite('FreeBSD') + +atf_test_program{name='network_test', + execenv='jail', + execenv_jail_params='vnet allow.raw_sockets', + required_user='root'} +.Ed +.Pp +A test case itself may have no requirements in superuser privileges, +but required_user='root' metadata property reminds that the jail execution +environment requires +.Xr kyua 1 +being running with root privileges, and the test is skipped otherwise with +the respective message. The combination of +.Va execenv +set to +.Sq jail +and +.Va required_user +set to +.Sq unprivileged +does not work respectively. .Ss Connecting disjoint test suites Now suppose you had various test suites on your file system and you would like to connect them together so that they could be executed and treated as diff --git a/contrib/kyua/drivers/report_junit_test.cpp b/contrib/kyua/drivers/report_junit_test.cpp index 462dca72f9be..0f009c6befd3 100644 --- a/contrib/kyua/drivers/report_junit_test.cpp +++ b/contrib/kyua/drivers/report_junit_test.cpp @@ -63,6 +63,8 @@ static const char* const default_metadata = "allowed_architectures is empty\n" "allowed_platforms is empty\n" "description is empty\n" + "execenv is empty\n" + "execenv_jail_params is empty\n" "has_cleanup = false\n" "is_exclusive = false\n" "required_configs is empty\n" @@ -80,6 +82,8 @@ static const char* const overriden_metadata = "allowed_architectures is empty\n" "allowed_platforms is empty\n" "description = Textual description\n" + "execenv is empty\n" + "execenv_jail_params is empty\n" "has_cleanup = false\n" "is_exclusive = false\n" "required_configs is empty\n" @@ -199,6 +203,8 @@ ATF_TEST_CASE_BODY(junit_metadata__overrides) .add_allowed_architecture("arch1") .add_allowed_platform("platform1") .set_description("This is a test") + .set_execenv("jail") + .set_execenv_jail_params("vnet") .set_has_cleanup(true) .set_is_exclusive(true) .add_required_config("config1") @@ -215,6 +221,8 @@ ATF_TEST_CASE_BODY(junit_metadata__overrides) + "allowed_architectures = arch1\n" + "allowed_platforms = platform1\n" + "description = This is a test\n" + + "execenv = jail\n" + + "execenv_jail_params = vnet\n" + "has_cleanup = true\n" + "is_exclusive = true\n" + "required_configs = config1\n" diff --git a/contrib/kyua/engine/atf.cpp b/contrib/kyua/engine/atf.cpp index eb63be20b0e7..f6746dd2f29f 100644 --- a/contrib/kyua/engine/atf.cpp +++ b/contrib/kyua/engine/atf.cpp @@ -39,6 +39,7 @@ extern "C" { #include "engine/atf_list.hpp" #include "engine/atf_result.hpp" #include "engine/exceptions.hpp" +#include "engine/execenv/execenv.hpp" #include "model/test_case.hpp" #include "model/test_program.hpp" #include "model/test_result.hpp" @@ -54,6 +55,7 @@ extern "C" { #include "utils/stream.hpp" namespace config = utils::config; +namespace execenv = engine::execenv; namespace fs = utils::fs; namespace process = utils::process; @@ -190,7 +192,10 @@ engine::atf_interface::exec_test(const model::test_program& test_program, args.push_back(F("-r%s") % (control_directory / result_name)); args.push_back(test_case_name); - process::exec(test_program.absolute_path(), args); + + auto e = execenv::get(test_program, test_case_name); + e->init(); + e->exec(args); } @@ -219,7 +224,9 @@ engine::atf_interface::exec_cleanup( } args.push_back(F("%s:cleanup") % test_case_name); - process::exec(test_program.absolute_path(), args); + + auto e = execenv::get(test_program, test_case_name); + e->exec(args); } diff --git a/contrib/kyua/engine/atf_list.cpp b/contrib/kyua/engine/atf_list.cpp index a16b889c74f0..c9c2fed70175 100644 --- a/contrib/kyua/engine/atf_list.cpp +++ b/contrib/kyua/engine/atf_list.cpp @@ -121,6 +121,10 @@ engine::parse_atf_metadata(const model::properties_map& props) mdbuilder.set_string("has_cleanup", value); } else if (name == "require.arch") { mdbuilder.set_string("allowed_architectures", value); + } else if (name == "execenv") { + mdbuilder.set_string("execenv", value); + } else if (name == "execenv.jail.params") { + mdbuilder.set_string("execenv_jail_params", value); } else if (name == "require.config") { mdbuilder.set_string("required_configs", value); } else if (name == "require.files") { diff --git a/contrib/kyua/engine/config.cpp b/contrib/kyua/engine/config.cpp index 3f162a94fbb5..a7c418e3164c 100644 --- a/contrib/kyua/engine/config.cpp +++ b/contrib/kyua/engine/config.cpp @@ -35,6 +35,7 @@ #include #include "engine/exceptions.hpp" +#include "engine/execenv/execenv.hpp" #include "utils/config/exceptions.hpp" #include "utils/config/parser.hpp" #include "utils/config/tree.ipp" @@ -43,6 +44,7 @@ #include "utils/text/operations.ipp" namespace config = utils::config; +namespace execenv = engine::execenv; namespace fs = utils::fs; namespace passwd = utils::passwd; namespace text = utils::text; @@ -59,6 +61,7 @@ static void init_tree(config::tree& tree) { tree.define< config::string_node >("architecture"); + tree.define< config::strings_set_node >("execenvs"); tree.define< config::positive_int_node >("parallelism"); tree.define< config::string_node >("platform"); tree.define< engine::user_node >("unprivileged_user"); @@ -74,6 +77,14 @@ static void set_defaults(config::tree& tree) { tree.set< config::string_node >("architecture", KYUA_ARCHITECTURE); + + std::set< std::string > supported; + for (auto em : execenv::execenvs()) + if (em->is_supported()) + supported.insert(em->name()); + supported.insert(execenv::default_execenv_name); + tree.set< config::strings_set_node >("execenvs", supported); + // TODO(jmmv): Automatically derive this from the number of CPUs in the // machine and forcibly set to a value greater than 1. Still testing // the new parallel implementation as of 2015-02-27 though. @@ -229,6 +240,13 @@ engine::empty_config(void) { config::tree tree(false); init_tree(tree); + + // Tests of Kyua itself tend to use an empty config, i.e. default + // execution environment is used. Let's allow it. + std::set< std::string > supported; + supported.insert(engine::execenv::default_execenv_name); + tree.set< config::strings_set_node >("execenvs", supported); + return tree; } diff --git a/contrib/kyua/engine/execenv/execenv.cpp b/contrib/kyua/engine/execenv/execenv.cpp new file mode 100644 index 000000000000..b043bcda52cb --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv.cpp @@ -0,0 +1,74 @@ +// Copyright 2023 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "engine/execenv/execenv.hpp" + +#include "engine/execenv/execenv_host.hpp" + +namespace execenv = engine::execenv; + +using utils::none; + + +const char* execenv::default_execenv_name = "host"; + + +/// List of registered execution environments, except default host one. +/// +/// Use register_execenv() to add an entry to this global list. +static std::vector< std::shared_ptr< execenv::manager > > + execenv_managers; + + +void +execenv::register_execenv(const std::shared_ptr< execenv::manager > manager) +{ + execenv_managers.push_back(manager); +} + + +const std::vector< std::shared_ptr< execenv::manager> > +execenv::execenvs() +{ + return execenv_managers; +} + + +std::unique_ptr< execenv::interface > +execenv::get(const model::test_program& test_program, + const std::string& test_case_name) +{ + for (auto m : execenv_managers) { + auto e = m->probe(test_program, test_case_name); + if (e != nullptr) + return e; + } + + return std::unique_ptr< execenv::interface >( + new execenv::execenv_host(test_program, test_case_name)); +} diff --git a/contrib/kyua/engine/execenv/execenv.hpp b/contrib/kyua/engine/execenv/execenv.hpp new file mode 100644 index 000000000000..e667ff205d85 --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv.hpp @@ -0,0 +1,149 @@ +// Copyright 2023 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file engine/execenv/execenv.hpp +/// Execution environment subsystem interface. + +#if !defined(ENGINE_EXECENV_EXECENV_HPP) +#define ENGINE_EXECENV_EXECENV_HPP + +#include "model/test_program.hpp" +#include "utils/optional.ipp" +#include "utils/process/operations_fwd.hpp" + +using utils::process::args_vector; +using utils::optional; + +namespace engine { +namespace execenv { + + +extern const char* default_execenv_name; + + +/// Abstract interface of an execution environment. +class interface { +protected: + const model::test_program& _test_program; + const std::string& _test_case_name; + +public: + /// Constructor. + /// + /// \param program The test program. + /// \param test_case_name Name of the test case. + interface(const model::test_program& test_program, + const std::string& test_case_name) : + _test_program(test_program), + _test_case_name(test_case_name) + {} + + /// Destructor. + virtual ~interface() {} + + /// Initializes execution environment. + /// + /// It's expected to be called inside a fork which runs + /// scheduler::interface::exec_test(), so we can fail a test fast if its + /// execution environment setup fails, and test execution could use the + /// configured proc environment, if expected. + virtual void init() const = 0; + + /// Cleanups or removes execution environment. + /// + /// It's expected to be called inside a fork for execenv cleanup. + virtual void cleanup() const = 0; + + /// Executes a test within the execution environment. + /// + /// It's expected to be called inside a fork which runs + /// scheduler::interface::exec_test() or exec_cleanup(). + /// + /// \param args The arguments to pass to the binary. + virtual void exec(const args_vector& args) const UTILS_NORETURN = 0; +}; + + +/// Abstract interface of an execution environment manager. +class manager { +public: + /// Destructor. + virtual ~manager() {} + + /// Returns name of an execution environment. + virtual const std::string& name() const = 0; + + /// Returns whether this execution environment is actually supported. + /// + /// It can be compile time and/or runtime check. + virtual bool is_supported() const = 0; + + /// Returns execution environment for a test. + /// + /// It checks if the given test is designed for this execution environment. + /// + /// \param program The test program. + /// \param test_case_name Name of the test case. + /// + /// \return An execenv object if the test conforms, or none. + virtual std::unique_ptr< interface > probe( + const model::test_program& test_program, + const std::string& test_case_name) const = 0; + + // TODO: execenv related extra metadata could be provided by a manager + // not to know how exactly and where it should be added to the kyua +}; + + +/// Registers an execution environment. +/// +/// \param manager Execution environment manager. +void register_execenv(const std::shared_ptr< manager > manager); + + +/// Returns list of registered execenv managers, except default host one. +/// +/// \return A vector of pointers to execenv managers. +const std::vector< std::shared_ptr< manager> > execenvs(); + + +/// Returns execution environment for a test case. +/// +/// \param program The test program. +/// \param test_case_name Name of the test case. +/// +/// \return An execution environment of a test. +std::unique_ptr< execenv::interface > get( + const model::test_program& test_program, + const std::string& test_case_name); + + +} // namespace execenv +} // namespace engine + +#endif // !defined(ENGINE_EXECENV_EXECENV_HPP) diff --git a/contrib/kyua/engine/execenv/execenv_host.cpp b/contrib/kyua/engine/execenv/execenv_host.cpp new file mode 100644 index 000000000000..4e37fca3e7d3 --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv_host.cpp @@ -0,0 +1,52 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "engine/execenv/execenv_host.hpp" + +#include "utils/fs/path.hpp" +#include "utils/process/operations.hpp" + +void +execenv::execenv_host::init() const +{ + // nothing to do +} + + +void +execenv::execenv_host::cleanup() const +{ + // nothing to do +} + + +void +execenv::execenv_host::exec(const args_vector& args) const +{ + utils::process::exec(_test_program.absolute_path(), args); +} diff --git a/contrib/kyua/engine/execenv/execenv_host.hpp b/contrib/kyua/engine/execenv/execenv_host.hpp new file mode 100644 index 000000000000..2742366cfd6f --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv_host.hpp @@ -0,0 +1,63 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file engine/execenv/execenv_host.hpp +/// Default execution environment. + +#if !defined(ENGINE_EXECENV_EXECENV_HOST_HPP) +#define ENGINE_EXECENV_EXECENV_HOST_HPP + +#include "engine/execenv/execenv.hpp" + +#include "utils/process/operations_fwd.hpp" + +namespace execenv = engine::execenv; + +using utils::process::args_vector; + +namespace engine { +namespace execenv { + + +class execenv_host : public execenv::interface { +public: + execenv_host(const model::test_program& test_program, + const std::string& test_case_name) : + execenv::interface(test_program, test_case_name) + {} + + void init() const; + void cleanup() const; + void exec(const args_vector& args) const UTILS_NORETURN; +}; + + +} // namespace execenv +} // namespace engine + +#endif // !defined(ENGINE_EXECENV_EXECENV_HOST_HPP) diff --git a/contrib/kyua/engine/plain.cpp b/contrib/kyua/engine/plain.cpp index 8346e50bbecf..9a2c63f8b663 100644 --- a/contrib/kyua/engine/plain.cpp +++ b/contrib/kyua/engine/plain.cpp @@ -34,6 +34,7 @@ extern "C" { #include +#include "engine/execenv/execenv.hpp" #include "model/test_case.hpp" #include "model/test_program.hpp" #include "model/test_result.hpp" @@ -47,6 +48,7 @@ extern "C" { #include "utils/sanity.hpp" namespace config = utils::config; +namespace execenv = engine::execenv; namespace fs = utils::fs; namespace process = utils::process; @@ -104,7 +106,10 @@ engine::plain_interface::exec_test( } process::args_vector args; - process::exec(test_program.absolute_path(), args); + + auto e = execenv::get(test_program, test_case_name); + e->init(); + e->exec(args); } diff --git a/contrib/kyua/engine/requirements.cpp b/contrib/kyua/engine/requirements.cpp index a7b0a90d97db..a6a4cae7511c 100644 --- a/contrib/kyua/engine/requirements.cpp +++ b/contrib/kyua/engine/requirements.cpp @@ -28,6 +28,7 @@ #include "engine/requirements.hpp" +#include "engine/execenv/execenv.hpp" #include "model/metadata.hpp" #include "model/types.hpp" #include "utils/config/nodes.ipp" @@ -100,6 +101,34 @@ check_allowed_architectures(const model::strings_set& allowed_architectures, } +/// Checks if test's execenv matches the user configuration. +/// +/// \param execenv Execution environment name a test is designed for. +/// \param user_config Runtime user configuration. +/// +/// \return Empty if the execenv is in the list or an error message otherwise. +static std::string +check_execenv(const std::string& execenv, const config::tree& user_config) +{ + std::string name = execenv; + if (name.empty()) + name = engine::execenv::default_execenv_name; // if test claims nothing + + std::set< std::string > execenvs; + try { + execenvs = user_config.lookup< config::strings_set_node >("execenvs"); + } catch (const config::unknown_key_error&) { + // okay, user config does not define it, empty set then + } + + if (execenvs.find(name) == execenvs.end()) + return F("'%s' execenv is not supported or not allowed by " + "the runtime user configuration") % name; + + return ""; +} + + /// Checks if the allowed platforms match the current architecture. /// /// \param allowed_platforms Set of allowed platforms. @@ -263,6 +292,10 @@ engine::check_reqs(const model::metadata& md, const config::tree& cfg, if (!reason.empty()) return reason; + reason = check_execenv(md.execenv(), cfg); + if (!reason.empty()) + return reason; + reason = check_allowed_platforms(md.allowed_platforms(), cfg); if (!reason.empty()) return reason; diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp index e7b51d23acca..e75091a40e38 100644 --- a/contrib/kyua/engine/scheduler.cpp +++ b/contrib/kyua/engine/scheduler.cpp @@ -40,6 +40,7 @@ extern "C" { #include "engine/config.hpp" #include "engine/exceptions.hpp" +#include "engine/execenv/execenv.hpp" #include "engine/requirements.hpp" #include "model/context.hpp" #include "model/metadata.hpp" @@ -68,6 +69,7 @@ extern "C" { namespace config = utils::config; namespace datetime = utils::datetime; +namespace execenv = engine::execenv; namespace executor = utils::process::executor; namespace fs = utils::fs; namespace logging = utils::logging; @@ -87,6 +89,10 @@ using utils::optional; datetime::delta scheduler::cleanup_timeout(60, 0); +/// Timeout for the test case execenv cleanup operation. +datetime::delta scheduler::execenv_cleanup_timeout(60, 0); + + /// Timeout for the test case listing operation. /// /// TODO(jmmv): This is here only for testing purposes. Maybe we should expose @@ -206,6 +212,18 @@ struct test_exec_data : public exec_data { /// denote that no further attempts shall be made at cleaning this up. bool needs_cleanup; + /// Whether this test case still needs to have its execenv cleanup executed. + /// + /// This is set externally when the cleanup routine is actually invoked to + /// denote that no further attempts shall be made at cleaning this up. + bool needs_execenv_cleanup; + + /// Original PID of the test case subprocess. + /// + /// This is used for the cleanup upon termination by a signal, to reap the + /// leftovers and form missing exit_handle. *** 1724 LINES SKIPPED *** From nobody Thu Oct 17 13:49: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 4XTq2k0hWrz5Z2DD; Thu, 17 Oct 2024 13:49:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTq2k04s2z4lNG; Thu, 17 Oct 2024 13:49:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BK6w8wVTDwqEPgKASBI7Bs0HRcbn3ygbzVx/WQUHujo=; b=sHwk1Gvx0IAAeyZaHlXWzZvscDc/OWprrs03aejaY2DMAPou3+amz4mJMu91X2rmYpKDRp /YdAnG8FFeggfO9mxXhZWRWjjxHZie4FvoyuT5koVjLJDhmfKKwcwMuJExPYDaKZByzRw7 0TSqRxRsq/nUQryH1hwVLszyZ7v7SfBzxth5+7upqUJ+I1gvax2TBvwDYftjJX8NILU2o0 mRSGTKGDn98N1HyGrAQbw5PaxZWwdskgxtAvHSqkSHjmd9OieeFeZxx0I0tLf2aEm/7Gqb d6wSAE4XDHNciqirf3qqhgCI5RyBpP5qDbqEA16GPRVJZzEd2//qTci//6eQVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BK6w8wVTDwqEPgKASBI7Bs0HRcbn3ygbzVx/WQUHujo=; b=wFLCB+d4AG/p0/FdfpQi21WH6ih9IKNoIa38p/pR0BA1LR/LEUBVTvgZXA1iMPnUma1mfa KiwXZMBt/vofFdeJ3F6P1x07WuvfrpZDcjMgzWFI4F+0LaFkzYJEiSwagnG3MOV1+VFN9d APzxGp5O4uPVfXrUjZDwM0bJZNv3E5SfRwAIMVhjfVoSPJ2prwxF46TgNoq6BrLO0lHb6K g7dBaWBT2DxR0sumezaSK1K6QwZcccu3lGAGXYJlqFV1TvsGOUZgrprRNIKTbDR54QLzrU +TUuphjrkvYOXBDJkiHL6D6qsTrOlkp5pK7yz4sbqs77nJWNfecrpO2JjTFSjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729172990; a=rsa-sha256; cv=none; b=B7uVWyn2D4WzT9fHtovkTR8ntDKQFF7ZWylQIh3p7l8iA917SMGyXX6geF+bO1kXuCOkM5 eEYYARw3/jmio5i3Oy5nLXlBV4yagFfV6wx7fPx+BARG6YJXYhzJwfQvUzCqT0m1Y/E9CD sJl+Qx04scfYN44+qf4UsAMIX59sPq6288oWrJROvknb1A4a9+jfXf3jCF8FULWo7absuP QIUb4EPejEJrFSaPD8GbWm88wvylAEpxa93YCjzuoPboV8BTaHq3ywZxSsDFvX+iwgLsBA 78zBpzwXycPjhdCCVdD5YLXNSZS91DpQSffTqeLiJlzbQrS1wgZjLAqRYn9tZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTq2j6mHyzsJg; Thu, 17 Oct 2024 13:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HDnnOd044649; Thu, 17 Oct 2024 13:49:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HDnnvK044646; Thu, 17 Oct 2024 13:49:49 GMT (envelope-from git) Date: Thu, 17 Oct 2024 13:49:49 GMT Message-Id: <202410171349.49HDnnvK044646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Igor Ostapenko Subject: git: 946d76fb154b - stable/14 - kyua: fix gcc builds 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 946d76fb154bde23115ec4463d7968ee803769c8 Auto-Submitted: auto-generated The branch stable/14 has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=946d76fb154bde23115ec4463d7968ee803769c8 commit 946d76fb154bde23115ec4463d7968ee803769c8 Author: Brooks Davis AuthorDate: 2024-07-19 23:24:35 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-17 13:45:15 +0000 kyua: fix gcc builds For some reason execenv::exec() isn't successfully marked noreturn (rlibby reports that virtual functions can't be noreturn), but calling methods are so gcc rightly complains. Work around this by adding explicit __builtin_unreachable() calls. Reviewed by: imp, markj Fixes: 257e70f1d5ee kyua: Add FreeBSD Jail execution environment support Differential Revision: https://reviews.freebsd.org/D46041 (cherry picked from commit 47fb5d2b13c5ca8e1a3b05ed223d62ea4b43b3e8) Approved by: kp (mentor), markj (mentor) --- contrib/kyua/engine/atf.cpp | 2 ++ contrib/kyua/engine/plain.cpp | 1 + contrib/kyua/engine/tap.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/contrib/kyua/engine/atf.cpp b/contrib/kyua/engine/atf.cpp index f6746dd2f29f..47f3bd2a1903 100644 --- a/contrib/kyua/engine/atf.cpp +++ b/contrib/kyua/engine/atf.cpp @@ -196,6 +196,7 @@ engine::atf_interface::exec_test(const model::test_program& test_program, auto e = execenv::get(test_program, test_case_name); e->init(); e->exec(args); + __builtin_unreachable(); } @@ -227,6 +228,7 @@ engine::atf_interface::exec_cleanup( auto e = execenv::get(test_program, test_case_name); e->exec(args); + __builtin_unreachable(); } diff --git a/contrib/kyua/engine/plain.cpp b/contrib/kyua/engine/plain.cpp index 9a2c63f8b663..0aba9b3fb6fa 100644 --- a/contrib/kyua/engine/plain.cpp +++ b/contrib/kyua/engine/plain.cpp @@ -110,6 +110,7 @@ engine::plain_interface::exec_test( auto e = execenv::get(test_program, test_case_name); e->init(); e->exec(args); + __builtin_unreachable(); } diff --git a/contrib/kyua/engine/tap.cpp b/contrib/kyua/engine/tap.cpp index ed35ba40433f..716212d18d02 100644 --- a/contrib/kyua/engine/tap.cpp +++ b/contrib/kyua/engine/tap.cpp @@ -157,6 +157,7 @@ engine::tap_interface::exec_test( auto e = execenv::get(test_program, test_case_name); e->init(); e->exec(args); + __builtin_unreachable(); } From nobody Thu Oct 17 13:49: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 4XTq2l30Wmz5Z2Kk; Thu, 17 Oct 2024 13:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTq2l1YHhz4lQG; Thu, 17 Oct 2024 13:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3SjLJc4niQ6i+MlklwL48W87NEyKeBfidqsQiplppc=; b=Kd/LuZynwLepB3zgP2HgPm+kD6B+90GKvi/1P3SziupR1XSHXiVekgwQIdeHo6yHdplPi0 5XXGlEqYmPHKPib313mekeMF0ekMTN62a7MGL4d5UAQS8EQtCF7aQW6W7v2TRizsxZ7uO8 e/Shd2NC8NeuUFFXQaDFcbunH5iswYy5EyZsO7cTXMeCx+4Bk3m0TxSCdsrioVpRTQNMN4 hmgR+qUGCS/CZDGlkpcu2uSgV1snOWQqLMva9DoYKPG3x1bLgpui5XwFQbm8m8kCwn3C+v otpRpMTs2oiJHGnATCNxQq3vQVmVlHIcMPSFmnTew5tYh0Yehey0dVxogkLZ8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3SjLJc4niQ6i+MlklwL48W87NEyKeBfidqsQiplppc=; b=QN6GE9DpqeVBJiIBz6hH2A4geGVqtN141StFohiU4Q3wNwGr7VWXZi2dU/5SbclV+1weku MM1TzsjYNtdOGJwWooWLGsdIFnw7qv7FW8NPRLfuY4Y6gCm0ZSysyVcW7NNr5PM5COLKre rM9Ew3qm6kmtiGFxhmgDIIi3K+GIJ803YUbZu6H7fM3jlmHVrZxJaHnS5sBT5UClCNzcD0 je/RXdQk7TQPLVmtQpcBzdfiiDy0sFj3j4cU/gUfwMEnfwukSYjM37I++rTxfIkACNnMIQ 6G1utyuY68CwG2Imva8MTZNcu9rd5sqU4NHLDfcNYTUrBey6if/aK4m1WRpM1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729172991; a=rsa-sha256; cv=none; b=ZSg2wwap+iudIEKAkF5buvit/p1gME3OQ/M/bQf3iIMeRwJ0FH6+3PKnRO5dOl0UKkXwVG e22CVtQ0L0IIIGdrWZQmWK+t6K2Sc2i6lagBMmTzRWDvJXiGNVqDNzzWFHbqb/Sr8QB+2h RRQnhqcmY0kHHc1DR/zfWwYw392SNgYrW+kTYsCk0cVpBOleI6z+eXTb7KWaJqUKsO7Sp4 CuTxbLefaRXiz3Fhm+usWlUnF9L/nII6DbWgTnarlbsGRZWddMSI6h/QSpOoMeajUu8JBg CSLyXWIk9BzBFeVbasAjRU0opWdG2eI12DQ1N3QHtuznx3IJM/yw3pC8f4vjwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTq2l0NCPzs12; Thu, 17 Oct 2024 13:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HDnoos044706; Thu, 17 Oct 2024 13:49:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HDnoW3044703; Thu, 17 Oct 2024 13:49:50 GMT (envelope-from git) Date: Thu, 17 Oct 2024 13:49:50 GMT Message-Id: <202410171349.49HDnoW3044703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Igor Ostapenko Subject: git: 1152da4a99fb - stable/14 - kyua: Do not count skipped as passed in test cmd 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1152da4a99fb2bb06e7d45b646580bd31904317a Auto-Submitted: auto-generated The branch stable/14 has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=1152da4a99fb2bb06e7d45b646580bd31904317a commit 1152da4a99fb2bb06e7d45b646580bd31904317a Author: Igor Ostapenko AuthorDate: 2024-10-05 10:19:31 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-17 13:45:21 +0000 kyua: Do not count skipped as passed in test cmd It changes output of 'kyua test' CLI command only. Hence, other outputs like junit are kept intact for CI and other use cases. It's meant to improve UX of attended use cases. The issue is that the following can be tricky to interpret: 222/222 passed (0 failed) It can be read as all tests are passed, but it might be a summary line of all tests skipped due to some requirement is not met. It's reworked to easily distinguish such cases: 222/222 passed (0 broken, 0 failed, 0 skipped) 0/222 passed (0 broken, 0 failed, 222 skipped) The overall formula is: / (
) Suggested by: kp Reviewed by: ngie, markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D46653 (cherry picked from commit 99689201a1eb7bcd503987c5220b79330dc058b7) Approved by: kp (mentor), markj (mentor) --- contrib/kyua/cli/cmd_test.cpp | 50 +++++++++++++++++++++---------- contrib/kyua/integration/cmd_test_test.sh | 42 +++++++++++++------------- contrib/kyua/model/test_result.cpp | 48 ++++++++++++++++++++++------- contrib/kyua/model/test_result.hpp | 15 ++++++++++ 4 files changed, 107 insertions(+), 48 deletions(-) diff --git a/contrib/kyua/cli/cmd_test.cpp b/contrib/kyua/cli/cmd_test.cpp index cfaeec9b74cc..b7afa6d11547 100644 --- a/contrib/kyua/cli/cmd_test.cpp +++ b/contrib/kyua/cli/cmd_test.cpp @@ -64,11 +64,8 @@ class print_hooks : public drivers::run_tests::base_hooks { bool _parallel; public: - /// The amount of positive test results found so far. - unsigned long good_count; - - /// The amount of negative test results found so far. - unsigned long bad_count; + /// The amount of test results per type. + std::map type_count; /// Constructor for the hooks. /// @@ -76,10 +73,10 @@ public: /// \param parallel_ True if we are executing more than one test at once. print_hooks(cmdline::ui* ui_, const bool parallel_) : _ui(ui_), - _parallel(parallel_), - good_count(0), - bad_count(0) + _parallel(parallel_) { + for (const auto& pair : model::test_result_types) + type_count[pair.first] = 0; } /// Called when the processing of a test case begins. @@ -116,10 +113,8 @@ public: } _ui->out(F("%s [%s]") % cli::format_result(result) % cli::format_delta(duration)); - if (result.good()) - good_count++; - else - bad_count++; + + type_count[result.type()]++; } }; @@ -159,8 +154,21 @@ cmd_test::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, kyuafile_path(cmdline), build_root_path(cmdline), results.second, parse_filters(cmdline.arguments()), user_config, hooks); + unsigned long total = 0; + unsigned long good = 0; + unsigned long bad = 0; + for (const auto& pair : model::test_result_types) { + const auto& type = pair.second; + const auto count = hooks.type_count[type.id]; + total += count; + if (type.is_run && type.is_good) + good += count; + if (!type.is_good) + bad += count; + } + int exit_code; - if (hooks.good_count > 0 || hooks.bad_count > 0) { + if (total > 0) { ui->out(""); if (!results.first.empty()) { ui->out(F("Results file id is %s") % results.first); @@ -168,10 +176,20 @@ cmd_test::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, ui->out(F("Results saved to %s") % results.second); ui->out(""); - ui->out(F("%s/%s passed (%s failed)") % hooks.good_count % - (hooks.good_count + hooks.bad_count) % hooks.bad_count); + ui->out(F("%s/%s passed (") % good % total, false); + const auto& types = model::test_result_types; + for (auto it = types.begin(); it != types.end(); it++) { + const auto& type = it->second; + if (!type.is_run || !type.is_good) { + if (it != types.begin()) + ui->out(", ", false); + ui->out(F("%s %s") % hooks.type_count[type.id] % type.name, + false); + } + } + ui->out(")"); - exit_code = (hooks.bad_count == 0 ? EXIT_SUCCESS : EXIT_FAILURE); + exit_code = (bad == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } else { // TODO(jmmv): Delete created empty file; it's useless! if (!results.first.empty()) { diff --git a/contrib/kyua/integration/cmd_test_test.sh b/contrib/kyua/integration/cmd_test_test.sh index bc8c62daf223..f0862cf29582 100755 --- a/contrib/kyua/integration/cmd_test_test.sh +++ b/contrib/kyua/integration/cmd_test_test.sh @@ -44,7 +44,7 @@ simple_all_pass:skip -> skipped: The reason for skipping is this [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -2/2 passed (0 failed) +1/2 passed (0 broken, 0 failed, 1 skipped) EOF utils_cp_helper simple_all_pass . @@ -69,7 +69,7 @@ simple_some_fail:pass -> passed [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -1/2 passed (1 failed) +1/2 passed (0 broken, 1 failed, 0 skipped) EOF utils_cp_helper simple_some_fail . @@ -102,7 +102,7 @@ third:skip -> skipped: The reason for skipping is this [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -7/7 passed (0 failed) +3/7 passed (0 broken, 0 failed, 4 skipped) EOF utils_cp_helper simple_all_pass first @@ -138,7 +138,7 @@ third:skip -> skipped: The reason for skipping is this [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -4/7 passed (3 failed) +3/7 passed (0 broken, 3 failed, 1 skipped) EOF utils_cp_helper simple_some_fail first @@ -172,7 +172,7 @@ expect_all_pass:timeout -> expected_failure: This times out [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -5/5 passed (0 failed) +5/5 passed (0 broken, 0 failed, 0 skipped) EOF # CHECK_STYLE_ENABLE @@ -203,7 +203,7 @@ expect_some_fail:timeout -> failed: Test case was expected to hang but it cont Results file id is $(utils_results_id) Results saved to $(utils_results_file) -1/6 passed (5 failed) +1/6 passed (0 broken, 5 failed, 0 skipped) EOF # CHECK_STYLE_ENABLE @@ -231,7 +231,7 @@ bogus_test_cases:pass -> passed [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -1/3 passed (2 failed) +1/3 passed (2 broken, 0 failed, 0 skipped) EOF # CHECK_STYLE_ENABLE @@ -270,7 +270,7 @@ subdir/simple_some_fail:pass -> passed [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -3/4 passed (1 failed) +2/4 passed (0 broken, 1 failed, 1 skipped) EOF atf_check -s exit:1 -o file:expout -e empty kyua test } @@ -302,7 +302,7 @@ subdir/simple_all_pass:skip -> skipped: The reason for skipping is this [S.UU Results file id is $(utils_results_id) Results saved to $(utils_results_file) -2/2 passed (0 failed) +1/2 passed (0 broken, 0 failed, 1 skipped) EOF # CHECK_STYLE_ENABLE atf_check -s exit:0 -o file:expout -e empty kyua test subdir @@ -328,7 +328,7 @@ first:skip -> skipped: The reason for skipping is this [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -1/1 passed (0 failed) +0/1 passed (0 broken, 0 failed, 1 skipped) EOF atf_check -s exit:0 -o file:expout -e empty kyua test first:skip } @@ -354,7 +354,7 @@ second:pass -> passed [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -1/2 passed (1 failed) +1/2 passed (0 broken, 1 failed, 0 skipped) EOF atf_check -s exit:1 -o file:expout -e empty kyua test second } @@ -402,7 +402,7 @@ subdir/second:pass -> passed [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -2/3 passed (1 failed) +2/3 passed (0 broken, 1 failed, 0 skipped) EOF atf_check -s exit:1 -o file:expout -e empty kyua test subdir first:pass } @@ -470,7 +470,7 @@ third:pass -> passed [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -3/4 passed (1 failed) +2/4 passed (0 broken, 1 failed, 1 skipped) EOF cat >experr < failed: This fails on purpose [S.UUUs] Results file id is $(utils_results_id root) Results saved to $(utils_results_file root) -2/3 passed (1 failed) +1/3 passed (0 broken, 1 failed, 1 skipped) EOF atf_check -s exit:1 -o file:expout -e empty kyua test \ -k "$(pwd)/root/Kyuafile" first subdir/fourth:fail @@ -542,7 +542,7 @@ first:skip -> skipped: The reason for skipping is this [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -2/2 passed (0 failed) +1/2 passed (0 broken, 0 failed, 1 skipped) EOF CREATE_COOKIE="$(pwd)/cookie"; export CREATE_COOKIE atf_check -s exit:0 -o file:expout -e empty kyua test first @@ -612,7 +612,7 @@ some-program:pass -> passed [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -1/2 passed (1 failed) +1/2 passed (0 broken, 1 failed, 0 skipped) EOF atf_check -s exit:1 -o file:expout -e empty kyua test @@ -710,7 +710,7 @@ subdir/third:skip -> skipped: The reason for skipping is this [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -6/6 passed (0 failed) +3/6 passed (0 broken, 0 failed, 3 skipped) EOF mkdir build @@ -745,7 +745,7 @@ sometest:skip -> skipped: The reason for skipping is this [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -2/2 passed (0 failed) +1/2 passed (0 broken, 0 failed, 1 skipped) EOF atf_check -s exit:0 -o file:expout -e empty kyua test -k myfile atf_check -s exit:0 -o file:expout -e empty kyua test --kyuafile=myfile @@ -774,7 +774,7 @@ sometest:skip -> skipped: The reason for skipping is this [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -2/2 passed (0 failed) +1/2 passed (0 broken, 0 failed, 1 skipped) EOF atf_check -s exit:0 -o file:expout -e empty kyua test -k myfile sometest cat >expout < skipped: The reason for skipping is this [S.UUUs] Results file id is $(utils_results_id) Results saved to $(utils_results_file) -2/2 passed (0 failed) +1/2 passed (0 broken, 0 failed, 1 skipped) EOF atf_check -s exit:0 -o file:expout -e empty kyua test --kyuafile=myfile \ sometest @@ -987,7 +987,7 @@ non_executable:__test_cases_list__ -> broken: Permission denied to run test pr Results file id is $(utils_results_id) Results saved to $(utils_results_file) -0/2 passed (2 failed) +0/2 passed (2 broken, 0 failed, 0 skipped) EOF # CHECK_STYLE_ENABLE atf_check -s exit:1 -o file:expout -e empty kyua test diff --git a/contrib/kyua/model/test_result.cpp b/contrib/kyua/model/test_result.cpp index 7392e77f5561..f3e1b66f260b 100644 --- a/contrib/kyua/model/test_result.cpp +++ b/contrib/kyua/model/test_result.cpp @@ -35,6 +35,42 @@ namespace text = utils::text; +const std::map + model::test_result_types = +{ + { test_result_broken, + { .id = test_result_broken, + .name = "broken", + .is_run = true, + .is_good = false, } }, + + { test_result_expected_failure, + { .id = test_result_expected_failure, + .name = "xfail", + .is_run = true, + .is_good = true, } }, + + { test_result_failed, + { .id = test_result_failed, + .name = "failed", + .is_run = true, + .is_good = false, } }, + + { test_result_passed, + { .id = test_result_passed, + .name = "passed", + .is_run = true, + .is_good = true, } }, + + { test_result_skipped, + { .id = test_result_skipped, + .name = "skipped", + .is_run = false, + .is_good = true, } }, +}; + + /// Constructs a base result. /// /// \param type_ The type of the result. @@ -74,17 +110,7 @@ model::test_result::reason(void) const bool model::test_result::good(void) const { - switch (_type) { - case test_result_expected_failure: - case test_result_passed: - case test_result_skipped: - return true; - - case test_result_broken: - case test_result_failed: - return false; - } - UNREACHABLE; + return test_result_types.at(_type).is_good; } diff --git a/contrib/kyua/model/test_result.hpp b/contrib/kyua/model/test_result.hpp index b9c439ce789a..33c76124550f 100644 --- a/contrib/kyua/model/test_result.hpp +++ b/contrib/kyua/model/test_result.hpp @@ -34,12 +34,27 @@ #include "model/test_result_fwd.hpp" +#include #include #include namespace model { +/// Test result type metadata. +struct test_result_type_desc { + enum test_result_type id; + std::string name; + bool is_run; + bool is_good; +}; + + +/// Description of each test result type. +extern const std::map test_result_types; + + /// Representation of a single test result. /// /// A test result is a simple pair of (type, reason). The type indicates the From nobody Thu Oct 17 13:49:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTq2m3J7rz5Z2DK; Thu, 17 Oct 2024 13:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTq2m264yz4ldB; Thu, 17 Oct 2024 13:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qIUnyiK3y/sV3XxqHtV0d3cgwFsN7+k81knF4avsBDI=; b=CQwnLYNGWmpbZIUJoaaZAokYX9eU9BrqF/axO4P4UhKC4Rp3uI5Wd6zLgZ6NLE4IgdSUOK dVrhQvvOIHS+Dwj7a9tKXI6gvN5wk20kPj0/3JG8notJ70HRwwJmiIIyKy4TbzcVKjb7qx YUN2D9RtPzklfQcuqNGKnE29UbQ/zsZ2hFMAvccyXIKJ+I/iLDLei3H5fx7ZL0sgpkSE9y Lb6I2MXWWJtkqs66ZCzgTpUFMV6V3mOuz2RUTJpw3hI8NgalHm9ratQ3zQjq7S/BTiw38h FGfeW2jw8NXqAcuW73CiF5gYfy/7lQLqnzTFRzkF7xvtbYQMpEY7lW7FQWhx1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qIUnyiK3y/sV3XxqHtV0d3cgwFsN7+k81knF4avsBDI=; b=knO3VcQndaT08kCUweFrq5gme/FgGVZLzIcQ0SZrFAVQak4rnrl0wF1OpNhXqqYoA6VCjW 7rAkzu7N9CNmkH8c5pxI8cyK9fN1/RmNYWdnVUMxxpo0f5EY79JxOzyXHHD5VyI1I08I5u nvc+zoix6gVwqcVDEMdAj1CQOykQLKcNhe3BdPN5E5ofPRQG7aXYvVbty2nk+HE0eBg0S0 gxQU9HaTl2CmikyyeZ30W1bJ4szGmmnzu6qaK4TtvWZguH2sVHk1TkiACo2awGrXo9XTwG egTSLLw2gNwFfv6MTwUPenNozWIITflZWfS6ECvspFFenwmeO3GaaNH0EhVjcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729172992; a=rsa-sha256; cv=none; b=qOtuEV+jIdx4jlT6XazccW5/jYt/bgQgSPsuRN934zcGmhfNypX3BJg83DwRw7YLCOgt81 Dwhiqt+iXNqbhGOkg1LlyAfTfe6oRsKnDZCKEyIkxduRfL/TPiTAcOGjq4HbUj+GbpAreD QuCO307UFsS8DaL0eg6TCeXE367Sdk2I1xyGGHrFAwFErx8se+FKePbPk0eC3s6GbT6665 /iRE6Hnmlh90lbMXRvrpxa+hJTAygje/cHGLxNSpJLrK4eVyuE2iyym92BJ+jNF1B5QZeK xRN34WR4MReiUQudy1wAGwjoRyoVHDpy211/x1SHByfrS3c2x85FX2HC2SttMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTq2m1j45zs2Q; Thu, 17 Oct 2024 13:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HDnq99044749; Thu, 17 Oct 2024 13:49:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HDnqTN044746; Thu, 17 Oct 2024 13:49:52 GMT (envelope-from git) Date: Thu, 17 Oct 2024 13:49:52 GMT Message-Id: <202410171349.49HDnqTN044746@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Igor Ostapenko Subject: git: c5fc967cf158 - stable/14 - netpfil tests: run in parallel 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c5fc967cf158f47ff479155b9ee2f9cfa852cd85 Auto-Submitted: auto-generated The branch stable/14 has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=c5fc967cf158f47ff479155b9ee2f9cfa852cd85 commit c5fc967cf158f47ff479155b9ee2f9cfa852cd85 Author: Kristof Provost AuthorDate: 2024-07-19 08:03:30 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-17 13:45:29 +0000 netpfil tests: run in parallel Run these tests in their own (vnet) jail so we don't have to worry about IP range or jail name conflicts. Reviewed by: markj Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46040 (cherry picked from commit 4f752a1583dc97d166caae7f844bf42715e99978) Approved by: kp (mentor), markj (mentor) --- tests/sys/netpfil/common/Makefile | 5 +++-- tests/sys/netpfil/ipfw/Makefile | 4 ++++ tests/sys/netpfil/pf/Makefile | 5 +++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/sys/netpfil/common/Makefile b/tests/sys/netpfil/common/Makefile index 0003aac28779..2b6a812482ec 100644 --- a/tests/sys/netpfil/common/Makefile +++ b/tests/sys/netpfil/common/Makefile @@ -13,8 +13,9 @@ ATF_TESTS_SH+= \ fragments \ forward -# Tests reuse jail names and so cannot run in parallel. -TEST_METADATA+= is_exclusive=true +# Allow tests to run in parallel in their own jails +TEST_METADATA+= execenv="jail" +TEST_METADATA+= execenv_jail_params="vnet allow.raw_sockets" ${PACKAGE}FILES+= \ utils.subr \ diff --git a/tests/sys/netpfil/ipfw/Makefile b/tests/sys/netpfil/ipfw/Makefile index 1d4629c0e738..78882ef51aec 100644 --- a/tests/sys/netpfil/ipfw/Makefile +++ b/tests/sys/netpfil/ipfw/Makefile @@ -5,4 +5,8 @@ TESTSDIR= ${TESTSBASE}/sys/netpfil/ipfw ATF_TESTS_SH+= fwd ${PACKAGE}FILES+= fwd_inetd.conf +# Allow tests to run in parallel in their own jails +TEST_METADATA+= execenv="jail" +TEST_METADATA+= execenv_jail_params="vnet allow.raw_sockets" + .include diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 9b793417c1d8..085cdf043606 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -47,8 +47,9 @@ ATF_TESTS_SH+= altq \ ATF_TESTS_PYTEST+= frag6.py ATF_TESTS_PYTEST+= sctp.py -# Tests reuse jail names and so cannot run in parallel. -TEST_METADATA+= is_exclusive=true +# Allow tests to run in parallel in their own jails +TEST_METADATA+= execenv="jail" +TEST_METADATA+= execenv_jail_params="vnet allow.raw_sockets" PROGS= divapp From nobody Thu Oct 17 13:49: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 4XTq2n5gvZz5Z2DL; Thu, 17 Oct 2024 13:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTq2n3yrmz4lXw; Thu, 17 Oct 2024 13:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4gP33WVMl/rERWsuuPfgYbZSOpdtzM39iJ6C0TnYLmA=; b=l/KzJu8YDqm7wWueoEzkoCZ4XbgEHtYCM+SVfmNONTSwYqUHNSN6ghjogQ5BSmzgsHORio Z+fY4fur32aPZ/b1dsbV/2Kqad7WtrqLA1lBz/3h9NMORhwbIpovuQx0r44yHp0gugMJGN xAab/5DFmICOwCOYWVt8doGgsH7MO9dcp22J4+dlwjCueXJRH1TRbzbWDEy0pBinlB6tH9 o+QkTpU4k9IaCt3B3xMQkBGeqReqIub+HEaGbP+vscU/oh05vRHit4wKCgeSHSh6CCk0fb wbiTuvtiH1TZnvJDdU/H+GlfmQcKJK0gzgUo77/3VQuBR61XG8GjIR8i/r8thA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4gP33WVMl/rERWsuuPfgYbZSOpdtzM39iJ6C0TnYLmA=; b=nWpcuWj9SQBaexxuM6woRfz+XPWv85h9duEav3hOWpSaPltjoU2ZC0JXe69zGPjeD+n6Cp LQVYWanvAdxOrFkE6UZ2ICTa3h8QKgipW4R7HkmyzhV3U5YPMu573TlT83YwThvqHkQXH5 7kNXhfIWvWUlw0sH1UB5SSjrNSDSUWO8hmv9FV7RQf3AtKUq75/IorbyrmWXLjMD3Vut31 g+PcWOFoaKqFYRr3vi1WjOUYAkMvHrRtWjOgubp6qU04HPV2ckp/YLG0G8b3nYm2cpb4ff aJGSgOnUwSFLEtnOwZnbHvfTsVmfmaor2QNamq7VnQKgGbEkCdGBaNjp3YIX5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729172993; a=rsa-sha256; cv=none; b=uC1RFK3dHWl171huhySRbTpGqEi1fJiwskDCQKzTKlcVMZlGwFwaNqK+82ZATnww4D4mPC uH2EbtstVCVe/EeFYenoGjjHsMre6oajV47e2vgJiB2Zr0SOHmb/55VNxxVTIfLZdo86d5 o/ZHbXFC3wiTbR9aJXSRAMRMnegZWYkXGdnaemYDD1lFN1ZPnbwrwwdzu0h20vJ3rZIxQG zngdBiIcQCkKHhld47cUdOeKaIdsYn+RRSckGIwpFhQpQd9u9cLKq2zVV7YAwDDH3qOIlX Lp0kP9bSNLycAW22jnpntkmVn4kta7C9FjM6fq8wfyuKkxWAVyFAu1224DCQzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTq2n2kyNzs13; Thu, 17 Oct 2024 13:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HDnr5C044803; Thu, 17 Oct 2024 13:49:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HDnriN044800; Thu, 17 Oct 2024 13:49:53 GMT (envelope-from git) Date: Thu, 17 Oct 2024 13:49:53 GMT Message-Id: <202410171349.49HDnriN044800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Igor Ostapenko Subject: git: 0e2a3e1da9c2 - stable/14 - if_ovpn tests: allow these tests to run in parallel 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0e2a3e1da9c29c943b6f7272ecf2527cc8046633 Auto-Submitted: auto-generated The branch stable/14 has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=0e2a3e1da9c29c943b6f7272ecf2527cc8046633 commit 0e2a3e1da9c29c943b6f7272ecf2527cc8046633 Author: Kristof Provost AuthorDate: 2024-09-06 16:47:06 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-17 13:45:35 +0000 if_ovpn tests: allow these tests to run in parallel Now that kyua can isolate tests in their own vnets we can run these tests in parallel. Reviewed by: markj Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46600 (cherry picked from commit a05decec2d194821f8bf5c8f2ae72063de0c87a8) Approved by: kp (mentor), markj (mentor) --- tests/sys/net/if_ovpn/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/net/if_ovpn/Makefile b/tests/sys/net/if_ovpn/Makefile index 823ad06e76ee..85746226e122 100644 --- a/tests/sys/net/if_ovpn/Makefile +++ b/tests/sys/net/if_ovpn/Makefile @@ -6,8 +6,8 @@ TESTSDIR= ${TESTSBASE}/sys/net/if_ovpn .if ${MK_PF} != "no" ATF_TESTS_SH+= if_ovpn -# Tests reuse jail names and so cannot run in parallel. -TEST_METADATA.if_ovpn+= is_exclusive=true +TEST_METADATA.if_ovpn+= execenv="jail" +TEST_METADATA.if_ovpn+= execenv_jail_params="vnet allow.raw_sockets" .endif ATF_TESTS_C+= if_ovpn_c From nobody Thu Oct 17 13:49: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 4XTq2p6lN4z5Z2HS; Thu, 17 Oct 2024 13:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTq2p4nYvz4lT9; Thu, 17 Oct 2024 13:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FjcUsVZNirVUVI+CMTwgkOEJIgjqInwZnWstRLzn3Ow=; b=IaZrHHbSQSd0iHlHoAR1TV+vl8+7c56KyaNwWsiD7oRAia1zTApplYHVxy6rx+iq9Gzq0s rytUL4qXw2hMiOpgaaM7FFESHrhBLwXDZx59rtdNVdsWGwyrqh4OXOPzVnoO8Ip1fB8AKI Wn4oicBit87xNLyZz89a274xYF/FJy9Qcx8wn85doxprmOxes7LKUxRvo1UahFgGsSistS JegXqzg6NjKE3T5SNjaOCl5gj1HevmfeNgF22uIP3CN7dbyY3P24lPiLYQn/gOMjmM7LiB qtlXPxfRUwCoDQEo4DIl2gdrFyz/eV82M5CX2sdqvBHBxEvmHQ1IwbBMi+SZUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729172994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FjcUsVZNirVUVI+CMTwgkOEJIgjqInwZnWstRLzn3Ow=; b=pr4olgGizWNUswEGT91pU2KE8lorwyGeEf8B77DZYXGJnTM5KX9a36PHKMmtqivnTAUxFc Mgl27y2nkRODUUNm7Fk95GAJUyjxZxiCw1CacZ4bNkrOoAX+h9yh/UDPV/hSdzZhFbYiIq GKw9I4/XXPz/gd2YhUQbu/sZSwruAG1GN3OpVbG4PH3ZSv9SZgn5YucT8PyB6ppvDDqg2E Hl44oOec+Duj6q7hTuuP8tnBMj3VWWyJvJmk5kmmHeKqfbcic9iocPNiqzLMa791kODiz3 alMrrusRQzWKNfFdBxJ2h+G9kCqx5RK4gdCfAyDWjOv8MjvlT00OMMRPcu/58g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729172994; a=rsa-sha256; cv=none; b=XB78xRN3GtPKBvoXoZeXZJQnkEvU5g1ba4pklX9lrBjeOe+yXALaLyoqd5j4naLFrxgCl+ CKJN7mlhFsfCjxy0smlNbMIG1gwzJJjCiS0EfpjBaaCF+y2TKhZHEP6GH19j5pGq1Ttzaa yhMSk6p5x329eWRt/RAwg+FjcxtuKdFQmR6eBsXocOsp4f31yPhJmVwRdDAsjSARQ7Wjc+ cO0hi8LMLbKDLlZEjBSzQq+ZpqqkhFi79WOQeu0c+dm03qW/DZuVWtXRPuTELOfNvXpUEz 5hU9a7j6/WvhFkqf2gMuRO0gD6qTJsSHV0TFd+d87q7srJniMTkLE3Gx1igC/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 4XTq2p3XQlzsJh; Thu, 17 Oct 2024 13:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HDnsGS044863; Thu, 17 Oct 2024 13:49:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HDnsYB044860; Thu, 17 Oct 2024 13:49:54 GMT (envelope-from git) Date: Thu, 17 Oct 2024 13:49:54 GMT Message-Id: <202410171349.49HDnsYB044860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Igor Ostapenko Subject: git: 9e6ff43535e4 - stable/14 - netinet tests: Make some tests more reliable when run in parallel 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e6ff43535e4b345202ff9586c2e72eed14e4114 Auto-Submitted: auto-generated The branch stable/14 has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=9e6ff43535e4b345202ff9586c2e72eed14e4114 commit 9e6ff43535e4b345202ff9586c2e72eed14e4114 Author: Mark Johnston AuthorDate: 2024-09-09 15:28:24 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-17 13:45:45 +0000 netinet tests: Make some tests more reliable when run in parallel Many of the modified tests add epair interfaces to the host, though most of the tests themselves run in a VNET jail. scapy in particular becomes unhappy when the list of interfaces changes as it is running, so, to improve reliability of parallel test runs, isolate tests which add epairs to the host. Also serialize arp tests, as they examine the dmesg as part of the test. The list of modified tests is not exhaustive, it was determined by running the test suite with parallelization enabled and looking at failures. It may be easier to just automatically enable VNET jailing of all netinet tests, but let's be more particular for now. Reviewed by: kp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D46606 (cherry picked from commit b103fc49ae160fdce221c2fffa98dde9bc0ff3b0) Approved by: kp (mentor), markj (mentor) --- tests/sys/netinet/Makefile | 11 +++++++++-- tests/sys/netinet6/Makefile | 18 +++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index 44f76508bf5c..8fa12378990c 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -25,8 +25,15 @@ ATF_TESTS_SH= arp \ ATF_TESTS_PYTEST+= carp.py -TEST_METADATA.divert+= required_programs="python" -TEST_METADATA.forward+= required_programs="python" +# Some of the arp tests look for log messages in the dmesg buffer, so run them +# serially to avoid problems with interleaved output. +TEST_METADATA.arp+= is_exclusive="true" +TEST_METADATA.divert+= required_programs="python" \ + execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" +TEST_METADATA.forward+= required_programs="python" \ + execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" TEST_METADATA.output+= required_programs="python" TEST_METADATA.redirect+= required_programs="python" TEST_METADATA.tcp6_v4mapped_bind_test+= is_exclusive="true" diff --git a/tests/sys/netinet6/Makefile b/tests/sys/netinet6/Makefile index 46f6f26115fe..6af0d13c5f03 100644 --- a/tests/sys/netinet6/Makefile +++ b/tests/sys/netinet6/Makefile @@ -17,7 +17,23 @@ ATF_TESTS_SH= exthdr \ ndp \ proxy_ndp -TEST_METADATA.output6+= required_programs="python" +TEST_METADATA.divert+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" +TEST_METADATA.exthdr+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" +TEST_METADATA.forward6+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" +TEST_METADATA.ndp+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" +TEST_METADATA.output6+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" \ + required_programs="python" +TEST_METADATA.proxy_ndp+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" +TEST_METADATA.redirect+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" +TEST_METADATA.scapyi386+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" ${PACKAGE}FILES+= exthdr.py \ mld.py \ From nobody Thu Oct 17 14:04:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTqMW5GLsz5Z2r6; Thu, 17 Oct 2024 14:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTqMW4chLz4q9s; Thu, 17 Oct 2024 14:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729173863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Vx+rW3PDzRvpxO6zKPpD7xNj5tXhcxAEE0urk75eCU=; b=Z5MZaPUZicnLx+UwNRMpYAVozJFFUFlRbh/ksRVz7kBlV6/EY9ESbrPm7cRLRlIG7K0yq4 ddCOHjXCw6dMIH8sd01ZuaVobcoy7prDRmOx2bUl6fN4cJyxAYjMdxLf3OU0EImjqx3zRl FIoJ6MeiFg9VBdgppKU8EGgScos/aaZUuAs5FP/UKOoEKgHIJnnNDh5Vx2kIgHwrPzYahU JkOCO72oVW3U3B3fj2L3Y1vNJnLGsvX0CpmKs5a/q1kc9kLRPnQPoYRItxg+aZjqsA2wZ0 JLvpZo5B//vlS4th9Si01ncboDiURA9G6JXEqnJM+Tl55duOF0fKWvNIJ0JFRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729173863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Vx+rW3PDzRvpxO6zKPpD7xNj5tXhcxAEE0urk75eCU=; b=WafFbkWGMgVwkEtOgtPaO0DeW665o/K8BUjpTNhhQbBrgO6oEwWPOvKSvcAPrZHcRxcLHC 0PG7vYyP05SRY7bxIF8iTUsSp4O8jn1AjRvsmDdFNnJ0UZsd7H1KPzClr+aayKod22U3yx w+MClLfJKCR2/E5bGajt5uEPnBUzsGjgiKZ5UmNW1zqUrkW/6nPSvXEtWnsvdTT/eI5EL+ BqlM0pn11QLeSAXNyub73LFioaARYNHnG6UzS8nDhrES21HrTzCNg2Y6H6hk383pXD+TBO 7mH2UfloEdXPBgaE5q8Z8//myMGQeajPdD5kwgJ5CW8Bo1NUfCMIgAPDq/xIHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729173863; a=rsa-sha256; cv=none; b=C4xI8n7fh9GvAQHAejUvrbA3P5LZ9PwvlQ+l0Q1axpKZXeUBTXc4Cc1dYKXpMle3Bt/FWv 7+kpHv82KNXxhFJnNel7uhjtJijYOy02Pry/Xv4wAiqd5tFDOw49N7ny80KYYhpb67HFv7 EInt+TIMmWSilN4b2YFNfHZQlmv0fHiqkcoYqYQXBK7+fsF5mVOS6FmlYRqlPMpZrIT/as vs8ceQDPrhjqPXjStJJg0fMFuxYQI+ancgc1iNIJ0lIU8++P8DGBxiM70rItkFf9feM2X2 3YxGSUSAYE98SvwLVxcY9KlBioBqGg88Ydzs1+0M+eoSbe44NV5L1J+W7Lp8Tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTqMW48WLzsp1; Thu, 17 Oct 2024 14:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HE4N9a079576; Thu, 17 Oct 2024 14:04:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HE4NfZ079573; Thu, 17 Oct 2024 14:04:23 GMT (envelope-from git) Date: Thu, 17 Oct 2024 14:04:23 GMT Message-Id: <202410171404.49HE4NfZ079573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Igor Ostapenko Subject: git: cc7ec8fe3bca - main - ipfw tests: Add basic coverage of divert(4) use cases 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc7ec8fe3bca7dbf643639b02d81a0b7f3c92198 Auto-Submitted: auto-generated The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=cc7ec8fe3bca7dbf643639b02d81a0b7f3c92198 commit cc7ec8fe3bca7dbf643639b02d81a0b7f3c92198 Author: Igor Ostapenko AuthorDate: 2024-10-17 14:02:27 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-17 14:02:27 +0000 ipfw tests: Add basic coverage of divert(4) use cases Reviewed by: kp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D47163 --- tests/sys/netpfil/ipfw/Makefile | 4 +- tests/sys/netpfil/ipfw/divert.sh | 281 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 284 insertions(+), 1 deletion(-) diff --git a/tests/sys/netpfil/ipfw/Makefile b/tests/sys/netpfil/ipfw/Makefile index 78882ef51aec..d4dbdb00f251 100644 --- a/tests/sys/netpfil/ipfw/Makefile +++ b/tests/sys/netpfil/ipfw/Makefile @@ -2,7 +2,9 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netpfil/ipfw -ATF_TESTS_SH+= fwd +ATF_TESTS_SH+= fwd \ + divert + ${PACKAGE}FILES+= fwd_inetd.conf # Allow tests to run in parallel in their own jails diff --git a/tests/sys/netpfil/ipfw/divert.sh b/tests/sys/netpfil/ipfw/divert.sh new file mode 100644 index 000000000000..62db3f8fce98 --- /dev/null +++ b/tests/sys/netpfil/ipfw/divert.sh @@ -0,0 +1,281 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Igor Ostapenko +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# +# ipfw divert action test cases +# +# -----------| |-- |----| ----| |----------- +# ( ) inbound |ipfw| ) -> |host| -> ( ) |ipfw| outbound ) +# -----------| | |-- |----| ----| | |----------- +# | | +# \|/ \|/ +# |------| |------| +# |divapp| |divapp| +# |------| |------| +# +# The basic cases: +# - inbound > diverted | divapp terminated +# - inbound > diverted > inbound | host terminated +# - inbound > diverted > outbound | network terminated +# - outbound > diverted | divapp terminated +# - outbound > diverted > outbound | network terminated +# - outbound > diverted > inbound | e.g. host terminated +# +# When a packet is diverted, forwarded, and possibly diverted again: +# - inbound > diverted > inbound > forwarded +# > outbound | network terminated +# - inbound > diverted > inbound > forwarded +# > outbound > diverted > outbound | network terminated +# +# Test case naming legend: +# in - inbound +# div - diverted +# out - outbound +# fwd - forwarded +# + +. $(atf_get_srcdir)/../common/utils.subr + +divert_init() +{ + if ! kldstat -q -m ipdivert; then + atf_skip "This test requires ipdivert" + fi +} + +atf_test_case "in_div" "cleanup" +in_div_head() +{ + atf_set descr 'Test inbound > diverted | divapp terminated' + atf_set require.user root +} +in_div_body() +{ + firewall_init "ipfw" + divert_init + + epair=$(vnet_mkepair) + vnet_mkjail div ${epair}b + ifconfig ${epair}a 192.0.2.1/24 up + jexec div ifconfig ${epair}b 192.0.2.2/24 up + jexec div ipfw add 65534 allow all from any to any + + # Sanity check + atf_check -s exit:0 -o ignore ping -c3 192.0.2.2 + + jexec div ipfw add 100 divert 2000 icmp from any to any in icmptypes 8 + + jexec div $(atf_get_srcdir)/../common/divapp 2000 & + divapp_pid=$! + # Wait for the divapp to be ready + sleep 1 + + # divapp is expected to "eat" the packet + atf_check -s not-exit:0 -o ignore ping -c1 -t1 192.0.2.2 + + wait $divapp_pid +} +in_div_cleanup() +{ + firewall_cleanup "ipfw" +} + +atf_test_case "in_div_in" "cleanup" +in_div_in_head() +{ + atf_set descr 'Test inbound > diverted > inbound | host terminated' + atf_set require.user root +} +in_div_in_body() +{ + firewall_init "ipfw" + divert_init + + epair=$(vnet_mkepair) + vnet_mkjail div ${epair}b + ifconfig ${epair}a 192.0.2.1/24 up + jexec div ifconfig ${epair}b 192.0.2.2/24 up + jexec div ipfw add 65534 allow all from any to any + + # Sanity check + atf_check -s exit:0 -o ignore ping -c3 192.0.2.2 + + jexec div ipfw add 100 divert 2000 icmp from any to any in icmptypes 8 + + jexec div $(atf_get_srcdir)/../common/divapp 2000 divert-back & + divapp_pid=$! + # Wait for the divapp to be ready + sleep 1 + + # divapp is NOT expected to "eat" the packet + atf_check -s exit:0 -o ignore ping -c1 192.0.2.2 + + wait $divapp_pid +} +in_div_in_cleanup() +{ + firewall_cleanup "ipfw" +} + +atf_test_case "out_div" "cleanup" +out_div_head() +{ + atf_set descr 'Test outbound > diverted | divapp terminated' + atf_set require.user root +} +out_div_body() +{ + firewall_init "ipfw" + divert_init + + epair=$(vnet_mkepair) + vnet_mkjail div ${epair}b + ifconfig ${epair}a 192.0.2.1/24 up + jexec div ifconfig ${epair}b 192.0.2.2/24 up + jexec div ipfw add 65534 allow all from any to any + + # Sanity check + atf_check -s exit:0 -o ignore ping -c3 192.0.2.2 + + jexec div ipfw add 100 divert 2000 icmp from any to any out icmptypes 0 + + jexec div $(atf_get_srcdir)/../common/divapp 2000 & + divapp_pid=$! + # Wait for the divapp to be ready + sleep 1 + + # divapp is expected to "eat" the packet + atf_check -s not-exit:0 -o ignore ping -c1 -t1 192.0.2.2 + + wait $divapp_pid +} +out_div_cleanup() +{ + firewall_cleanup "ipfw" +} + +atf_test_case "out_div_out" "cleanup" +out_div_out_head() +{ + atf_set descr 'Test outbound > diverted > outbound | network terminated' + atf_set require.user root +} +out_div_out_body() +{ + firewall_init "ipfw" + divert_init + + epair=$(vnet_mkepair) + vnet_mkjail div ${epair}b + ifconfig ${epair}a 192.0.2.1/24 up + jexec div ifconfig ${epair}b 192.0.2.2/24 up + jexec div ipfw add 65534 allow all from any to any + + # Sanity check + atf_check -s exit:0 -o ignore ping -c3 192.0.2.2 + + jexec div ipfw add 100 divert 2000 icmp from any to any out icmptypes 0 + + jexec div $(atf_get_srcdir)/../common/divapp 2000 divert-back & + divapp_pid=$! + # Wait for the divapp to be ready + sleep 1 + + # divapp is NOT expected to "eat" the packet + atf_check -s exit:0 -o ignore ping -c1 192.0.2.2 + + wait $divapp_pid +} +out_div_out_cleanup() +{ + firewall_cleanup "ipfw" +} + +atf_test_case "in_div_in_fwd_out_div_out" "cleanup" +in_div_in_fwd_out_div_out_head() +{ + atf_set descr 'Test inbound > diverted > inbound > forwarded > outbound > diverted > outbound | network terminated' + atf_set require.user root +} +in_div_in_fwd_out_div_out_body() +{ + firewall_init "ipfw" + divert_init + + # host router site + epair0=$(vnet_mkepair) + epair1=$(vnet_mkepair) + + vnet_mkjail router ${epair0}b ${epair1}a + ifconfig ${epair0}a 192.0.2.1/24 up + jexec router sysctl net.inet.ip.forwarding=1 + jexec router ifconfig ${epair0}b 192.0.2.2/24 up + jexec router ifconfig ${epair1}a 198.51.100.1/24 up + jexec router ipfw add 65534 allow all from any to any + + vnet_mkjail site ${epair1}b + jexec site ifconfig ${epair1}b 198.51.100.2/24 up + jexec site ipfw add 65534 allow all from any to any + jexec site route add default 198.51.100.1 + + route add -net 198.51.100.0/24 192.0.2.2 + + # Sanity check + atf_check -s exit:0 -o ignore ping -c3 192.0.2.2 + + # Should be routed without diversion + atf_check -s exit:0 -o ignore ping -c3 198.51.100.2 + + jexec router ipfw add 100 divert 2001 icmp from any to any in icmptypes 8 + jexec router ipfw add 200 divert 2002 icmp from any to any out icmptypes 8 + + jexec router $(atf_get_srcdir)/../common/divapp 2001 divert-back & + indivapp_pid=$! + jexec router $(atf_get_srcdir)/../common/divapp 2002 divert-back & + outdivapp_pid=$! + # Wait for the divappS to be ready + sleep 1 + + # Both divappS are NOT expected to "eat" the packet + atf_check -s exit:0 -o ignore ping -c1 198.51.100.2 + + wait $indivapp_pid && wait $outdivapp_pid +} +in_div_in_fwd_out_div_out_cleanup() +{ + firewall_cleanup "ipfw" +} + +atf_init_test_cases() +{ + atf_add_test_case "in_div" + atf_add_test_case "in_div_in" + + atf_add_test_case "out_div" + atf_add_test_case "out_div_out" + + atf_add_test_case "in_div_in_fwd_out_div_out" +} From nobody Thu Oct 17 14:32:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTqzf4QtWz5Z48Q; Thu, 17 Oct 2024 14:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTqzf3sx5z51JW; Thu, 17 Oct 2024 14:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729175534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3cRJOv7GuXGBXK0MNxDx3jdLjRcNwu4jqBiz/xOhUE0=; b=eF1XWUqB75PndlkMj7i/ziVlMhLTkWpLoCO8VCjIso4TZax/zaMKTvjUfjSvl2CVP1+iBB KDZ0AFBgfNOO2u4FkXQM0rlD5HBXLYi7hx87D7eTCWsOn5QpHpDPsJk8Vth3D4WO0iJX1+ YDQALwXRy9gaqp3ZeJLFHk0wBNokBX34ICRmkWStrJvn/7su48YshcprElUqm2WduQI2ER N8O6XJWFa14j1LZyTPKpycE5i7OWvh6WxWs6NMqYi+Y4nsEywOT7qbMem4bGllkQcNbqOD QFkj5c34aLJW4al2avhl0a9CLjhy/iIklJo7OgNCwIrk545n5Cii7AM52Ae4Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729175534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3cRJOv7GuXGBXK0MNxDx3jdLjRcNwu4jqBiz/xOhUE0=; b=B+JR4winwt9p4LsDAVcGzKAn1i2WXumI917fdDOd63RsazcfX2ECqMwBqYjzhtVCfEXrfj bHfHgeV+aes8GADzCzOhrKb3qGb133zQPX0GDdZEAGsy9Rys9Tc0JNdABWtnZszkCQGar5 Z/p18Uz3FLCogt7RaVs/9iw1W135cPIU3WNmfFlXcqpXMHGp9IH9iQoPl7z/1u8tgmkU+W B1ohRwtl9Zcpt8yer5JWe3zMXvAO6vO+/yv8gV597btXfTJ5NFpHVLY3QY4hQc4tFNV0Nl ntQ6bCJMIVtDieGD4l3ejeVzuAqCJl2/0jmVDeVrBARBRF5/BwDnPwJy8iYM2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729175534; a=rsa-sha256; cv=none; b=lgLymV+e/6wNPF8m5w1IQS0Z4rntcV4ufpjqHtsiirEnBQKeoDycJH9pUWc/j7AQ/7+qZZ m8DXJNtmXOJXA2mCn94/GwspuIgz4pO/I+BvDZRdcDwJEK43pJqsqxxU9+IO9nwcGTVlVp +AeLrbMXb1OTgFljfK6sOG1G5jGklS1NwelI0//qp5l1yDQh5pVLCrpmbjKc2NB6Q08YGw andGEp0O3tu+pByZQYlgRgW87cqVCTPNqvicpfC605dGb0BxELMXVgEjizEG/OeyCom0Ap CQTc14y/MGmW1pOQVBLUjfw1rjhqmtiVOG8DAst1vSz77FqvgwQRzMc862m8Zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTqzf3LPTzsqd; Thu, 17 Oct 2024 14:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HEWEJh026987; Thu, 17 Oct 2024 14:32:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HEWE9G026984; Thu, 17 Oct 2024 14:32:14 GMT (envelope-from git) Date: Thu, 17 Oct 2024 14:32:14 GMT Message-Id: <202410171432.49HEWE9G026984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ea4e4449b855 - main - apic: add ioapic_get_dev() method 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/main X-Git-Reftype: branch X-Git-Commit: ea4e4449b85593025c2eb31bb642732971d96225 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ea4e4449b85593025c2eb31bb642732971d96225 commit ea4e4449b85593025c2eb31bb642732971d96225 Author: Konstantin Belousov AuthorDate: 2024-10-12 22:52:44 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-17 14:31:50 +0000 apic: add ioapic_get_dev() method which returns apic device_t by apic_id, if there exists the pci representer Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/x86/include/apicvar.h | 1 + sys/x86/x86/io_apic.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/sys/x86/include/apicvar.h b/sys/x86/include/apicvar.h index ac6a82659e34..61c726f150df 100644 --- a/sys/x86/include/apicvar.h +++ b/sys/x86/include/apicvar.h @@ -258,6 +258,7 @@ void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); int ioapic_get_rid(u_int apic_id, uint16_t *ridp); +device_t ioapic_get_dev(u_int apic_id); extern int x2apic_mode; extern int lapic_eoi_suppression; diff --git a/sys/x86/x86/io_apic.c b/sys/x86/x86/io_apic.c index 4337d1adc8a9..525547f9482a 100644 --- a/sys/x86/x86/io_apic.c +++ b/sys/x86/x86/io_apic.c @@ -1081,6 +1081,22 @@ ioapic_get_rid(u_int apic_id, uint16_t *ridp) return (0); } +device_t +ioapic_get_dev(u_int apic_id) +{ + struct ioapic *io; + + mtx_lock_spin(&icu_lock); + STAILQ_FOREACH(io, &ioapic_list, io_next) { + if (io->io_hw_apic_id == apic_id) + break; + } + mtx_unlock_spin(&icu_lock); + if (io != NULL) + return (io->pci_dev); + return (NULL); +} + /* * A new-bus driver to consume the memory resources associated with * the APICs in the system. On some systems ACPI or PnPBIOS system From nobody Thu Oct 17 14:32: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 4XTqzg5Tqbz5Z48R; Thu, 17 Oct 2024 14:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTqzg4l63z51ND; Thu, 17 Oct 2024 14:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729175535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m9sbXa2/i4lP0QiIMp0zVPTBZnO7w8jVyr3sLzbKKWo=; b=TC60MknAZulKfnFNCybvmoDsuMe/NX4B6khpo5L7P3w46JlP3jSewSSfm3ImBRgmMIhApI avYWxklP6R7SP7+F8WMhcXeVRSFHR3fAUhTFWB6nVHKb+Aa5+/PPfSG/AFmyLuUyu5aIFv RY0VhD29P5C8tBM4fnnS6OjecPH1UPTXcF2qrKh2AmTis8pGCIbopNC2pwHCeLumxcmjyq Di8W4UNhnoH7ylQm1mRq3RTeFpXHqIGEwDlUHXu06tyh8R8Oho+nWgTDUoRNB4jTzEkIIn W+JczzmaJ9/av4XFBDNRuq9mGsvJwW0z6MjvuZr4Iprtu3NKlOWnR4sNdvlnQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729175535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m9sbXa2/i4lP0QiIMp0zVPTBZnO7w8jVyr3sLzbKKWo=; b=BCV+E5LlQonZELAYu/LK2lKMdxr3a1i7fLA52M60ohml/4PdvNIi6NhKi/4S8exv4gGifD eEu8c2bOoJQpcfjQ4o0WKJ+k1WuJzeH5JqHhQeQ90r+jPRSPxlV7GuX34k7oyexRnAcOP+ p5svKlspPFS5eaOPG7ZMDmSN652ykiOAnxqoId5NLw50YKfB07zPgLUDasCWsgjPShpsUz n3gzAx1Mce9GZKx/XmOmiBXytHMF9nLXAobT9fCzzEjuyDQagz3sGigxDyduDIsQF++sPg 2mVovTuhHesk0xqP5XHEQObduekjdLKmUWFNLIa3VvUVF0Po9zWUmoQL/PHSKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729175535; a=rsa-sha256; cv=none; b=tybQ1Aes1c7yDfgZMkyfBhqIq5JBfuXI9QiVKWJhYJatP7Zss/Zqpaj4xpWqAz388mIWng gXLpvu7HdHfuZGYd5JTInIEH5NfMZ+x8bHYO0bpA2zb4vV5G+Wq9LB5Qj7ce/dCTvkdCIU yDPQrnOqk3OOO5IdkUsCxEDCTWnceF/ZAnR5uAT4odHH++svkpR6XMu8hbeyaIH96dFaHf oM9af+ZsxalpjmEKN3uFjwNoLOszjScXrMV21/N2/1ZJnU0RNKpyNOfeN8nllgUwZJyYYH 0Bk/oUBWNqTkfQWSc4euMcQXwsrE2lWn9GT6aueXtlQzfoJZCaWAHkMN3FbMHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTqzg4LPrzsqf; Thu, 17 Oct 2024 14:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HEWFwn027038; Thu, 17 Oct 2024 14:32:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HEWFd4027035; Thu, 17 Oct 2024 14:32:15 GMT (envelope-from git) Date: Thu, 17 Oct 2024 14:32:15 GMT Message-Id: <202410171432.49HEWFd4027035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: cb83af64f161 - main - device: add generic named per-device property 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/main X-Git-Reftype: branch X-Git-Commit: cb83af64f161b228171d6fb4f36d22493cefaa7f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cb83af64f161b228171d6fb4f36d22493cefaa7f commit cb83af64f161b228171d6fb4f36d22493cefaa7f Author: Konstantin Belousov AuthorDate: 2024-09-08 04:40:41 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-17 14:31:50 +0000 device: add generic named per-device property The KPI allows to store arbitrary data within struct device, retrieve it back by name, and update the value. The data is automatically destroyed on the device deletion. Also, the user can request to clear the named property from all devices. My need for this interface is due to IOMMU needing to save some indicator on device, which must survive the re-creation of the domain context. Reviewed by: imp Discussed with: emaste Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46605 --- sys/kern/subr_bus.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/bus.h | 7 +++ 2 files changed, 127 insertions(+) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 7c21325f8684..26c476e9fef6 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -105,6 +105,16 @@ struct devclass { struct sysctl_oid *sysctl_tree; }; +struct device_prop_elm { + const char *name; + void *val; + void *dtr_ctx; + device_prop_dtr_t dtr; + LIST_ENTRY(device_prop_elm) link; +}; + +static void device_destroy_props(device_t dev); + /** * @brief Implementation of _device. * @@ -141,6 +151,7 @@ struct _device { u_int order; /**< order from device_add_child_ordered() */ void *ivars; /**< instance variables */ void *softc; /**< current driver's variables */ + LIST_HEAD(, device_prop_elm) props; struct sysctl_ctx_list sysctl_ctx; /**< state for sysctl variables */ struct sysctl_oid *sysctl_tree; /**< state for sysctl variables */ @@ -1349,6 +1360,7 @@ make_device(device_t parent, const char *name, int unit) dev->flags |= DF_QUIET | DF_QUIET_CHILDREN; dev->ivars = NULL; dev->softc = NULL; + LIST_INIT(&dev->props); dev->state = DS_NOTPRESENT; @@ -1491,6 +1503,7 @@ device_delete_child(device_t dev, device_t child) return (error); } + device_destroy_props(dev); if (child->devclass) devclass_delete_device(child->devclass, child); if (child->parent) @@ -6015,6 +6028,113 @@ dev_wired_cache_match(device_location_cache_t *dcp, device_t dev, return (strcmp(res->dln_path, cp) == 0); } +static struct device_prop_elm * +device_prop_find(device_t dev, const char *name) +{ + struct device_prop_elm *e; + + bus_topo_assert(); + + LIST_FOREACH(e, &dev->props, link) { + if (strcmp(name, e->name) == 0) + return (e); + } + return (NULL); +} + +int +device_set_prop(device_t dev, const char *name, void *val, + device_prop_dtr_t dtr, void *dtr_ctx) +{ + struct device_prop_elm *e, *e1; + + bus_topo_assert(); + + e = device_prop_find(dev, name); + if (e != NULL) + goto found; + + e1 = malloc(sizeof(*e), M_BUS, M_WAITOK); + e = device_prop_find(dev, name); + if (e != NULL) { + free(e1, M_BUS); + goto found; + } + + e1->name = name; + e1->val = val; + e1->dtr = dtr; + e1->dtr_ctx = dtr_ctx; + LIST_INSERT_HEAD(&dev->props, e1, link); + return (0); + +found: + LIST_REMOVE(e, link); + if (e->dtr != NULL) + e->dtr(dev, name, e->val, e->dtr_ctx); + e->val = val; + e->dtr = dtr; + e->dtr_ctx = dtr_ctx; + LIST_INSERT_HEAD(&dev->props, e, link); + return (EEXIST); +} + +int +device_get_prop(device_t dev, const char *name, void **valp) +{ + struct device_prop_elm *e; + + bus_topo_assert(); + + e = device_prop_find(dev, name); + if (e == NULL) + return (ENOENT); + *valp = e->val; + return (0); +} + +int +device_clear_prop(device_t dev, const char *name) +{ + struct device_prop_elm *e; + + bus_topo_assert(); + + e = device_prop_find(dev, name); + if (e == NULL) + return (ENOENT); + LIST_REMOVE(e, link); + if (e->dtr != NULL) + e->dtr(dev, e->name, e->val, e->dtr_ctx); + free(e, M_BUS); + return (0); +} + +static void +device_destroy_props(device_t dev) +{ + struct device_prop_elm *e; + + bus_topo_assert(); + + while ((e = LIST_FIRST(&dev->props)) != NULL) { + LIST_REMOVE_HEAD(&dev->props, link); + if (e->dtr != NULL) + e->dtr(dev, e->name, e->val, e->dtr_ctx); + free(e, M_BUS); + } +} + +void +device_clear_prop_alldev(const char *name) +{ + device_t dev; + + TAILQ_FOREACH(dev, &bus_data_devices, devlink) { + device_clear_prop(dev, name); + } +} + /* * APIs to manage deprecation and obsolescence. */ diff --git a/sys/sys/bus.h b/sys/sys/bus.h index acadbb217711..49c5d62cebce 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -924,6 +924,13 @@ device_location_cache_t *dev_wired_cache_init(void); void dev_wired_cache_fini(device_location_cache_t *dcp); bool dev_wired_cache_match(device_location_cache_t *dcp, device_t dev, const char *at); +typedef void (*device_prop_dtr_t)(device_t dev, const char *name, void *val, + void *dtr_ctx); +int device_set_prop(device_t dev, const char *name, void *val, + device_prop_dtr_t dtr, void *dtr_ctx); +int device_get_prop(device_t dev, const char *name, void **valp); +int device_clear_prop(device_t dev, const char *name); +void device_clear_prop_alldev(const char *name); /** * Shorthand macros, taking resource argument From nobody Thu Oct 17 14:32: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 4XTqzj2Rl6z5Z4YR; Thu, 17 Oct 2024 14:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTqzh6NnFz51Qk; Thu, 17 Oct 2024 14:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729175536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UD9mlJJn8p04wb1bBbq74bARwd61v4nS0OQBUVb5IXo=; b=UE70wRswzhSsuWvKa9jOSVBNw3PfoshKRhrnJTtJH6y65RsPNcSgCEXjnsC4O56hzDwDn3 4cd6uqQ0Qig6wldoWmrRH0/TSqIIACGG5uEGPw6iODKr3RLcSFPK7GicgNapWLNeL0PUnP kfrAEda2g3mWNyrqt4PN6LS5S2quQoilkaa7lij1r1xce6wsUa+Qpd39X1MaB+FPGU3SDg fqqAOB9Iz1jtr108KaiL/V1sYBcnAG7PvRQTnkzsRLMQ/xzF5hYlKoAL3X+0Ao0Ye1L4Me 3kzzTNJ5aIlmdMJFnkw70DkeV27YPOtMftPfRwJYau7FitnGi70QWE+98XOfng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729175536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UD9mlJJn8p04wb1bBbq74bARwd61v4nS0OQBUVb5IXo=; b=ZWsiMJjcO1i012IDIv4LT0XCRui3xGz034dNDrOUqFjAlmeiTwMzdWvSag8X+o3aD7OEIS VFCqVhxoy/nkdrbqeNrAETPdawIAA+XnXJcI1re1axKyGx4p3Qfv3irjPO4j3wUtb9mWR4 CtefnuvO91cW9rx8qyn62XUSwmCm//IvSUJBkz5MPRavHKsQeioESaQdQcutUdONkN7S2P UurVk1ABEOT2LpDReav5P/jtosLN9tJNeM2KJDYssxdj7dKxhuBii7eZBS8t/ge9tWfTac XSPosYvhoqvzBEkP9RwcKFecc1Z6uGj8NfuddJrMX6vjNVYcMA8DNf/QrI7sQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729175536; a=rsa-sha256; cv=none; b=CPvGzOLp6hF+gNOxOs35rll0AWDJ/WuGMHEQLimRrSPQHfkQ3VCGiu4OLTeo6PoQlI2n+s 1HtwPv2ut/yjSIcjWUecB04HBqN6HsYuFlYderauupx/6JJg93Itg0Kqwo5y/HvuMYnR+v mvBnnQ1KwYTcPvqhqrKHaJ6HzpjffcWwkpZadM3HxuTluJzRGFliyWRH4PeeCD9fueeHZv KyrGW6ghD2HeaNOCcKH8uhXduT2VtDsB+y4+yGxFQaQRULRDWEPRACc6ip/v4Df1VGkW2M jqF+KO8YHTvOdhqteh96loixlWsOzyJi655dHxxSdpez0CKNeSmv3mmLIy9Nuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTqzh5RSXztXl; Thu, 17 Oct 2024 14:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HEWGUX027327; Thu, 17 Oct 2024 14:32:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HEWGEA027305; Thu, 17 Oct 2024 14:32:16 GMT (envelope-from git) Date: Thu, 17 Oct 2024 14:32:16 GMT Message-Id: <202410171432.49HEWGEA027305@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b08d332da035 - main - devices: report iommu data for the device in the dev. sysctl tree 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/main X-Git-Reftype: branch X-Git-Commit: b08d332da035e11bfc9373f2d08244cb3e10cda4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b08d332da035e11bfc9373f2d08244cb3e10cda4 commit b08d332da035e11bfc9373f2d08244cb3e10cda4 Author: Konstantin Belousov AuthorDate: 2024-10-12 22:54:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-17 14:31:50 +0000 devices: report iommu data for the device in the dev. sysctl tree Show the iommu unit' device name/unit which translates the device' requests, if any, as parsed out from the BIOS tables. Also show the rid value for the device. Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47098 --- sys/kern/subr_bus.c | 28 ++++++++++++++++++++++++++++ sys/sys/bus.h | 1 + sys/x86/iommu/intel_drv.c | 19 ++++++++++++++++--- sys/x86/iommu/iommu_utils.c | 13 +++++++++++++ sys/x86/iommu/x86_iommu.h | 1 + 5 files changed, 59 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 26c476e9fef6..70e5e22854f3 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -29,6 +29,7 @@ #include #include "opt_bus.h" #include "opt_ddb.h" +#include "opt_iommu.h" #include #include @@ -60,6 +61,8 @@ #include #include +#include + #include SYSCTL_NODE(_hw, OID_AUTO, bus, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, @@ -261,6 +264,7 @@ enum { DEVICE_SYSCTL_LOCATION, DEVICE_SYSCTL_PNPINFO, DEVICE_SYSCTL_PARENT, + DEVICE_SYSCTL_IOMMU, }; static int @@ -268,7 +272,10 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS) { struct sbuf sb; device_t dev = (device_t)arg1; + device_t iommu; int error; + uint16_t rid; + const char *c; sbuf_new_for_sysctl(&sb, NULL, 1024, req); sbuf_clear_flags(&sb, SBUF_INCLUDENUL); @@ -289,6 +296,22 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS) case DEVICE_SYSCTL_PARENT: sbuf_cat(&sb, dev->parent ? dev->parent->nameunit : ""); break; + case DEVICE_SYSCTL_IOMMU: + iommu = NULL; + error = device_get_prop(dev, DEV_PROP_NAME_IOMMU, + (void **)&iommu); + c = ""; + if (error == 0 && iommu != NULL) { + sbuf_printf(&sb, "unit=%s", device_get_nameunit(iommu)); + c = " "; + } + rid = 0; +#ifdef IOMMU + iommu_get_requester(dev, &rid); +#endif + if (rid != 0) + sbuf_printf(&sb, "%srid=%#x", c, rid); + break; default: error = EINVAL; goto out; @@ -338,6 +361,11 @@ device_sysctl_init(device_t dev) CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, DEVICE_SYSCTL_PARENT, device_sysctl_handler, "A", "parent device"); + SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), + OID_AUTO, "%iommu", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, DEVICE_SYSCTL_IOMMU, device_sysctl_handler, "A", + "iommu unit handling the device requests"); if (bus_get_domain(dev, &domain) == 0) SYSCTL_ADD_INT(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), OID_AUTO, "%domain", diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 49c5d62cebce..4f34990cd10f 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -924,6 +924,7 @@ device_location_cache_t *dev_wired_cache_init(void); void dev_wired_cache_fini(device_location_cache_t *dcp); bool dev_wired_cache_match(device_location_cache_t *dcp, device_t dev, const char *at); +#define DEV_PROP_NAME_IOMMU "iommu-unit" typedef void (*device_prop_dtr_t)(device_t dev, const char *name, void *val, void *dtr_ctx); int device_set_prop(device_t dev, const char *name, void *val, diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index ebc77879480b..f4a1ec06b721 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -757,6 +757,7 @@ dmar_find(device_t dev, bool verbose) dmar_print_path(dev_busno, dev_path_len, dev_path); printf("\n"); } + iommu_device_set_iommu_prop(dev, unit->iommu.dev); return (unit); } @@ -826,16 +827,28 @@ dmar_find_nonpci(u_int id, u_int entry_type, uint16_t *rid) struct dmar_unit * dmar_find_hpet(device_t dev, uint16_t *rid) { + struct dmar_unit *unit; - return (dmar_find_nonpci(hpet_get_uid(dev), ACPI_DMAR_SCOPE_TYPE_HPET, - rid)); + unit = dmar_find_nonpci(hpet_get_uid(dev), ACPI_DMAR_SCOPE_TYPE_HPET, + rid); + if (unit != NULL) + iommu_device_set_iommu_prop(dev, unit->iommu.dev); + return (unit); } struct dmar_unit * dmar_find_ioapic(u_int apic_id, uint16_t *rid) { + struct dmar_unit *unit; + device_t apic_dev; - return (dmar_find_nonpci(apic_id, ACPI_DMAR_SCOPE_TYPE_IOAPIC, rid)); + unit = dmar_find_nonpci(apic_id, ACPI_DMAR_SCOPE_TYPE_IOAPIC, rid); + if (unit != NULL) { + apic_dev = ioapic_get_dev(apic_id); + if (apic_dev != NULL) + iommu_device_set_iommu_prop(apic_dev, unit->iommu.dev); + } + return (unit); } struct rmrr_iter_args { diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c index 259c87403b07..479e8637ee8e 100644 --- a/sys/x86/iommu/iommu_utils.c +++ b/sys/x86/iommu/iommu_utils.c @@ -758,6 +758,19 @@ pglvl_page_size(int total_pglvl, int lvl) return (pg_sz[rlvl]); } +void +iommu_device_set_iommu_prop(device_t dev, device_t iommu) +{ + device_t iommu_dev; + int error; + + bus_topo_lock(); + error = device_get_prop(dev, DEV_PROP_NAME_IOMMU, (void **)&iommu_dev); + if (error == ENOENT) + device_set_prop(dev, DEV_PROP_NAME_IOMMU, iommu, NULL, NULL); + bus_topo_unlock(); +} + #ifdef DDB #include #include diff --git a/sys/x86/iommu/x86_iommu.h b/sys/x86/iommu/x86_iommu.h index 92ac993e7c9c..eb4a9907a5d6 100644 --- a/sys/x86/iommu/x86_iommu.h +++ b/sys/x86/iommu/x86_iommu.h @@ -188,6 +188,7 @@ int iommu_alloc_irq(struct iommu_unit *unit, int idx); void iommu_release_intr(struct iommu_unit *unit, int idx); void iommu_device_tag_init(struct iommu_ctx *ctx, device_t dev); +void iommu_device_set_iommu_prop(device_t dev, device_t iommu); int pglvl_pgtbl_pte_off(int pglvl, iommu_gaddr_t base, int lvl); vm_pindex_t pglvl_pgtbl_get_pindex(int pglvl, iommu_gaddr_t base, int lvl); From nobody Thu Oct 17 16:10:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTt8g6Pz3z5Z9Vj; Thu, 17 Oct 2024 16:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTt8g5WP0z42HS; Thu, 17 Oct 2024 16:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D0OyXrXc1+x31e2UBXP/fQdh0vP1Zl6bxzaopPNG4SQ=; b=TrxyKBALb1jiZaJvigyU9w4MR/TIHhori9cg1F4OYq5ag8qiZuOaHfU7BdC14LSOqmqX44 elXlEu2y7SBcBca0BhcJdDYAxiumjQeK57cUJJTcKyIs+MIhJdMOHR5CEH9JysPEWrsM/S JLCQ2wH6cAyXaoQFZChnhB8nR0pxSECFaAWA+T162g7ajTB80vVleTGpc/8B/IVPxW1RTk TGCcGGyYyiKNqePdNRJYbPlt5vgh3yTGPaTuqV716aYFaE1+f5OZZKqTUSUJ8KZcE+4KAn OqYdUfAebMTytibSzn0K0ssXeCEgXuAFfoUI9AcJ6Oy8wPVmad5DXKO3kweytQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D0OyXrXc1+x31e2UBXP/fQdh0vP1Zl6bxzaopPNG4SQ=; b=XIrZF0vxpXorrR9ZSoy5YnNQgsvVbRnWxPnoNVPb/dRdcqMLP9GLNsq9N2vTeBOx0G0OTy k81BvFesuyiM3jofrqBmJb+aMOP6QpeQs0NqPcM+vZC1CkfMMbJHG3rQgEQGNuVwMRR8mI YCXYPUB3f8QdlLvv4e5YTM3kfcioKc+tARf3Ggcl4kfmDPu2ygW6yzLOEwsQZw8RBYjmuG KexbIYBMJt40sXAEcdH84b4HOq6fn5PwLPGjV2CPnvKOMFJcOQ8nUnNrfXlFO+PzBqD97/ RBpq4CZnGCQnFgV4epBXMbqYK3mOBb2YB7H3tICaUnt7cNRroZxOtUiBns3QjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729181411; a=rsa-sha256; cv=none; b=c9UfCD4ur9M6RN1W3NOk8pC/OrY8wnDBjHkYtPDa1RVxc+64UeAkMPA8c5Xhho01xN5C++ HWCERPnqSSalpVIc60rfWDWlYNjsDLkAGKZSZWSj1ycRS+NQAz1WGyVeJXJ2Bphpbw5ky4 BlaQwCt9CUJfy+pBOFGGYVTL6LYi/1D+R/0uPIAKNs+IWxQv8OE+HpOHMnW5jQVivjI202 UCinaw8qOfEJKE/ufUl8QOPcNNbtqgGXI4Cgaz9FYtLBP66On77J1XcrvIe3EHoWGzixgt s1l4/wkibrI3DVOOwz07ZujXX/9jorlaEtXt5WNV1cU95vifQ2tmiwfyuRRKcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTt8g56ZfzwZF; Thu, 17 Oct 2024 16:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGABQO087571; Thu, 17 Oct 2024 16:10:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGAB2l087562; Thu, 17 Oct 2024 16:10:11 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:10:11 GMT Message-Id: <202410171610.49HGAB2l087562@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: d1516ec33e66 - main - nvmf: Fail pass through commands while a controller is not associated 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: d1516ec33e6600f6aae3243119aeb14762dc9f97 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d1516ec33e6600f6aae3243119aeb14762dc9f97 commit d1516ec33e6600f6aae3243119aeb14762dc9f97 Author: John Baldwin AuthorDate: 2024-10-17 16:09:27 +0000 Commit: John Baldwin CommitDate: 2024-10-17 16:09:27 +0000 nvmf: Fail pass through commands while a controller is not associated Previously this just dereferenced NULL qp pointers and panicked. Instead, use a shared lock on the connection lock to protect access to the qp pointers and allocate a request. If the controller is not associated, fail the request with ECONNABORTED. Possibly this should be honoring kern.nvmf.fail_on_disconnection and block waiting for a reconnect request while disconnected if that tunable is false. Reported by: Suhas Lokesha Sponsored by: Chelsio Communications --- sys/dev/nvmf/host/nvmf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/nvmf/host/nvmf.c b/sys/dev/nvmf/host/nvmf.c index 623c76954720..12023ebf96f9 100644 --- a/sys/dev/nvmf/host/nvmf.c +++ b/sys/dev/nvmf/host/nvmf.c @@ -972,12 +972,21 @@ nvmf_passthrough_cmd(struct nvmf_softc *sc, struct nvme_pt_command *pt, cmd.cdw14 = pt->cmd.cdw14; cmd.cdw15 = pt->cmd.cdw15; + sx_slock(&sc->connection_lock); + if (sc->admin == NULL || sc->detaching) { + device_printf(sc->dev, + "failed to send passthrough command\n"); + error = ECONNABORTED; + sx_sunlock(&sc->connection_lock); + goto error; + } if (admin) qp = sc->admin; else qp = nvmf_select_io_queue(sc); nvmf_status_init(&status); req = nvmf_allocate_request(qp, &cmd, nvmf_complete, &status, M_WAITOK); + sx_sunlock(&sc->connection_lock); if (req == NULL) { device_printf(sc->dev, "failed to send passthrough command\n"); error = ECONNABORTED; From nobody Thu Oct 17 16:16: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 4XTtJ32Cmpz5Z9w1; Thu, 17 Oct 2024 16:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtJ31xk3z42vy; Thu, 17 Oct 2024 16:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fxn9IDUeVeiHxVU8DzR8xSwVGOrXbrHDBQq3j3aWDCQ=; b=egWur70u5xeOjnyitaRSN1YBwgwLEmEK7eDtyBl2sf8OV0PtsXkHO1F0qskHj9yjbcsS4/ 9bQdPy1cxxe1Dqjft7ql+z1X/8Qph3gduIEGxE9euwGpvuwEXzZ5wnLjI/u3Pq9QFTX2Wd /7MF4TqqxaUKf0OhKQc6AIrpkoH2GuJ+h0tdYBNtec+Lxo99KXoBpQugkl8kLYXUVntxHO WdOu9rmY5z5pA2ZfYzi9aUcBvGB8LPWwTRm+xvgH/2cNFHvO8U016w4+OgjOFJ8j13Pc8g h+28egleaw9wTT9HZIue2yq/Ipt66EHgiIpn8OWFFRHm721ckzg2hLykMcWHPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fxn9IDUeVeiHxVU8DzR8xSwVGOrXbrHDBQq3j3aWDCQ=; b=Cf2Y62Z9jybMrqZTIg4ZWx3nIeAeq7I940WhfzxYshSIMC3wEE89Ie22HQsGO7vkr0ONfS u1COoduRBRyjw470Pe6JDlHicoAr1sGUFxTKeLUq9I/j307ESFAuo3wrNGhcjJoy6f24LB B5dMnma+c+ESZYvhqv0gkLCCxpIDUBgs/RbL9lK/dRScQKpsKwnMXQOBF6pbgAXfaL9IG4 KJYZTzfpL0WVa99j2wXqNdKbluiFxQxYJ/YwhzFTaPZ0z2ocg2XQ4BszijhuOW+gyTyB1g 1VraMjm8jYwKUa2URoUnOTMRogtbNmMK3ycWJlckf4F11krg9Jcrb7QLqZwaUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729181795; a=rsa-sha256; cv=none; b=nSEKQv4pO0ilnoJMZfb3rCVPxsvTFjB4/E/kZ8JQ1xyBdEGb4PvxiIFNBLtN9WKAaCsjl/ 7H5Mu6Fc0LvyyDHzK80yZLMhR++gq2hNNqQPYYUKgX3a38r2rWN97jLislrmIr+sIs2Gti M5ETQVUcLINNMHFlwp0qgpYivc9mC3cGkb6WghV+Ut41e8i2ejukO/T8Y2DCZWZa3KN996 1laiKXqmVGai35CFtXH7aBs2l/gkjjBL2GrjPQ2juaD0nfxo0b3Met2rWIl+uV4451nmR4 uzIouBI1XIWTMBgz1kT7z/FseFAw/11nkisipaSzH5fZOcSZrQVf51Eur4CNnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtJ31XJWzwpw; Thu, 17 Oct 2024 16:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGGZd9099061; Thu, 17 Oct 2024 16:16:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGGZIr099058; Thu, 17 Oct 2024 16:16:35 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:16:35 GMT Message-Id: <202410171616.49HGGZIr099058@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: 93ff7dbaea1d - stable/14 - socket: Implement SO_SPLICE 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: 93ff7dbaea1dac5a6a4309de3780eaf39d52a2a4 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=93ff7dbaea1dac5a6a4309de3780eaf39d52a2a4 commit 93ff7dbaea1dac5a6a4309de3780eaf39d52a2a4 Author: Mark Johnston AuthorDate: 2024-09-10 16:50:30 +0000 Commit: Mark Johnston CommitDate: 2024-10-17 15:48:36 +0000 socket: Implement SO_SPLICE This is a feature which allows one to splice two TCP sockets together such that data which arrives on one socket is automatically pushed into the send buffer of the spliced socket. This can be used to make TCP proxying more efficient as it eliminates the need to copy data into and out of userspace. The interface is copied from OpenBSD, and this implementation aims to be compatible. Splicing is enabled by setting the SO_SPLICE socket option. When spliced, data that arrives on the receive buffer is automatically forwarded to the other socket. In particular, splicing is a unidirectional operation; to splice a socket pair in both directions, SO_SPLICE needs to be applied to both sockets. More concretely, when setting the option one passes the following struct: struct splice { int fd; off_t max; struct timveval idle; }; where "fd" refers to the socket to which the first socket is to be spliced, and two setsockopt(SO_SPLICE) calls are required to set up a bi-directional splice. select(), poll() and kevent() do not return when data arrives in the receive buffer of a spliced socket, as such data is expected to be removed automatically once space is available in the corresponding send buffer. Userspace can perform I/O on spliced sockets, but it will be unpredictably interleaved with splice I/O. A splice can be configured to unsplice once a certain number of bytes have been transmitted, or after a given time period. Once unspliced, the socket behaves normally from userspace's perspective. The number of bytes transmitted via the splice can be retrieved using getsockopt(SO_SPLICE); this works after unsplicing as well, up until the socket is closed or spliced again. Userspace can also manually trigger unsplicing by splicing to -1. Splicing work is handled by dedicated threads, similar to KTLS. A worker thread is assigned at splice creation time. At some point it would be nice to have a direct dispatch mode, wherein the thread which places data into a receive buffer is also responsible for pushing it into the sink, but this requires tighter integration with the protocol stack in order to avoid reentrancy problems. Currently, sowakeup() and related functions will signal the worker thread assigned to a spliced socket. so_splice_xfer() does the hard work of moving data between socket buffers. Co-authored by: gallatin Reviewed by: brooks (interface bits) MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Stormshield Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D46411 (cherry picked from commit a1da7dc1cdad8c000622a7b23ff5994ccfe9cac6) --- lib/libc/sys/getsockopt.2 | 62 +++- sys/kern/uipc_sockbuf.c | 34 ++- sys/kern/uipc_socket.c | 702 +++++++++++++++++++++++++++++++++++++++++++++- sys/sys/ktrace.h | 2 + sys/sys/sockbuf.h | 3 +- sys/sys/socket.h | 12 + sys/sys/socketvar.h | 49 +++- 7 files changed, 854 insertions(+), 10 deletions(-) diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2 index 3f49c3186209..548e2f738e22 100644 --- a/lib/libc/sys/getsockopt.2 +++ b/lib/libc/sys/getsockopt.2 @@ -27,7 +27,7 @@ .\" .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" -.Dd February 8, 2021 +.Dd July 8, 2024 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -193,6 +193,7 @@ The following options are recognized in .It Dv SO_MAX_PACING_RATE Ta "set the maximum transmit rate in bytes per second for the socket" .It Dv SO_NO_OFFLOAD Ta "disables protocol offloads" .It Dv SO_NO_DDP Ta "disables direct data placement offload" +.It Dv SO_SPLICE Ta "splice two sockets together" .El .Pp .Dv SO_DEBUG @@ -553,6 +554,56 @@ DDP is an offload supported by Chelsio network adapters that permits reassembled TCP data streams to be received via zero-copy in user-supplied buffers using .Xr aio_read 2 . +.Pp +.Dv SO_SPLICE , +when passed to +.Fn setsockopt , +splices two sockets together using the following +.Fa optval : +.Bd -literal +struct so_splice { + int sp_fd; + off_t sp_max; + struct timeval sp_idle; +}; +.Ed +.Pp +Data received on +.Fa s +will automatically be transmitted from the socket specified in +.Fa sp_fd +without any intervention by userspace. +Splicing is a one-way operation; a given pair of sockets may be +spliced in one or both directions. +Currently only connected +.Xr tcp 4 +sockets may be spliced together. +If +.Fa sp_max +is greater than zero, the socket pair will automatically be unspliced +once that number of bytes have been transmitted. +If +.Fa sp_idle +is non-zero, the socket pair will automatically be unspliced once the +specified amount of time has elapsed since the initial call to +.Fn setsockopt . +If +.Fa sp_fd +is -1, the socket will be unspliced immediately. +.Pp +When passed to +.Fn getsockopt , +the +.Dv SO_SPLICE +option returns a 64-bit integer containing the number of bytes transmitted by +the most recent splice. +That is, while the socket is spliced, the value returned will be the number +of bytes spliced so far. +When unsplicing, this value is saved and is returned until the socket is closed +or spliced again. +For example, if a splice transmits 100 bytes and is then unspliced, a subsequent +.Nm getsockopt +call will return 100 until the socket is spliced again. .Sh RETURN VALUES .Rv -std .Sh ERRORS @@ -620,5 +671,14 @@ and .Fn setsockopt system calls appeared in .Bx 4.2 . +The +.Dv SO_SPLICE +option originated in +.Ox 4.9 +and first appeared in +.Fx 15.0 . +The +.Fx +implementation aims to be source-compatible. .Sh BUGS Several of the socket options should be handled at lower levels of the system. diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 406fdca11b47..0c28812aa3c2 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -510,6 +510,32 @@ sowakeup(struct socket *so, const sb_which which) SOCK_BUF_UNLOCK_ASSERT(so, which); } +static void +splice_push(struct socket *so) +{ + struct so_splice *sp; + + SOCK_RECVBUF_LOCK_ASSERT(so); + + sp = so->so_splice; + mtx_lock(&sp->mtx); + SOCK_RECVBUF_UNLOCK(so); + so_splice_dispatch(sp); +} + +static void +splice_pull(struct socket *so) +{ + struct so_splice *sp; + + SOCK_SENDBUF_LOCK_ASSERT(so); + + sp = so->so_splice_back; + mtx_lock(&sp->mtx); + SOCK_SENDBUF_UNLOCK(so); + so_splice_dispatch(sp); +} + /* * Do we need to notify the other side when I/O is possible? */ @@ -524,7 +550,9 @@ void sorwakeup_locked(struct socket *so) { SOCK_RECVBUF_LOCK_ASSERT(so); - if (sb_notify(&so->so_rcv)) + if (so->so_rcv.sb_flags & SB_SPLICED) + splice_push(so); + else if (sb_notify(&so->so_rcv)) sowakeup(so, SO_RCV); else SOCK_RECVBUF_UNLOCK(so); @@ -534,7 +562,9 @@ void sowwakeup_locked(struct socket *so) { SOCK_SENDBUF_LOCK_ASSERT(so); - if (sb_notify(&so->so_snd)) + if (so->so_snd.sb_flags & SB_SPLICED) + splice_pull(so); + else if (sb_notify(&so->so_snd)) sowakeup(so, SO_SND); else SOCK_SENDBUF_UNLOCK(so); diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index cdff5f23de0a..edd26f28a292 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -124,6 +124,7 @@ #include #include #include +#include #include #include #include @@ -135,7 +136,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -161,8 +164,17 @@ #include #endif +static int soreceive_generic_locked(struct socket *so, + struct sockaddr **psa, struct uio *uio, struct mbuf **mp, + struct mbuf **controlp, int *flagsp); static int soreceive_rcvoob(struct socket *so, struct uio *uio, int flags); +static int soreceive_stream_locked(struct socket *so, struct sockbuf *sb, + struct sockaddr **psa, struct uio *uio, struct mbuf **mp, + struct mbuf **controlp, int flags); +static int sosend_generic_locked(struct socket *so, struct sockaddr *addr, + struct uio *uio, struct mbuf *top, struct mbuf *control, + int flags, struct thread *td); static void so_rdknl_lock(void *); static void so_rdknl_unlock(void *); static void so_rdknl_assert_lock(void *, int); @@ -206,6 +218,21 @@ MALLOC_DEFINE(M_PCB, "pcb", "protocol control block"); VNET_DEFINE(struct hhook_head *, socket_hhh[HHOOK_SOCKET_LAST + 1]); #define V_socket_hhh VNET(socket_hhh) +#ifdef COMPAT_FREEBSD32 +#ifdef __amd64__ +/* off_t has 4-byte alignment on i386 but not on other 32-bit platforms. */ +#define __splice32_packed __packed +#else +#define __splice32_packed +#endif +struct splice32 { + int32_t sp_fd; + int64_t sp_max; + struct timeval32 sp_idle; +} __splice32_packed; +#undef __splice32_packed +#endif + /* * Limit on the number of connections in the listen queue waiting * for accept(2). @@ -278,6 +305,371 @@ socket_zone_change(void *tag) maxsockets = uma_zone_set_max(socket_zone, maxsockets); } +static int splice_init_state; +static struct sx splice_init_lock; +SX_SYSINIT(splice_init_lock, &splice_init_lock, "splice_init"); + +static SYSCTL_NODE(_kern_ipc, OID_AUTO, splice, CTLFLAG_RW, 0, + "Settings relating to the SO_SPLICE socket option"); + +static bool splice_receive_stream = true; +SYSCTL_BOOL(_kern_ipc_splice, OID_AUTO, receive_stream, CTLFLAG_RWTUN, + &splice_receive_stream, 0, + "Use soreceive_stream() for stream splices"); + +static uma_zone_t splice_zone; +static struct proc *splice_proc; +struct splice_wq { + struct mtx mtx; + STAILQ_HEAD(, so_splice) head; + bool running; +} __aligned(CACHE_LINE_SIZE); +static struct splice_wq *splice_wq; +static uint32_t splice_index = 0; + +static void so_splice_timeout(void *arg, int pending); +static void so_splice_xfer(struct so_splice *s); +static int so_unsplice(struct socket *so, bool timeout); + +static void +splice_work_thread(void *ctx) +{ + struct splice_wq *wq = ctx; + struct so_splice *s, *s_temp; + STAILQ_HEAD(, so_splice) local_head; + int cpu; + + cpu = wq - splice_wq; + if (bootverbose) + printf("starting so_splice worker thread for CPU %d\n", cpu); + + for (;;) { + mtx_lock(&wq->mtx); + while (STAILQ_EMPTY(&wq->head)) { + wq->running = false; + mtx_sleep(wq, &wq->mtx, 0, "-", 0); + wq->running = true; + } + STAILQ_INIT(&local_head); + STAILQ_CONCAT(&local_head, &wq->head); + STAILQ_INIT(&wq->head); + mtx_unlock(&wq->mtx); + STAILQ_FOREACH_SAFE(s, &local_head, next, s_temp) { + mtx_lock(&s->mtx); + CURVNET_SET(s->src->so_vnet); + so_splice_xfer(s); + CURVNET_RESTORE(); + } + } +} + +static void +so_splice_dispatch_async(struct so_splice *sp) +{ + struct splice_wq *wq; + bool running; + + wq = &splice_wq[sp->wq_index]; + mtx_lock(&wq->mtx); + STAILQ_INSERT_TAIL(&wq->head, sp, next); + running = wq->running; + mtx_unlock(&wq->mtx); + if (!running) + wakeup(wq); +} + +void +so_splice_dispatch(struct so_splice *sp) +{ + mtx_assert(&sp->mtx, MA_OWNED); + + if (sp->state != SPLICE_IDLE) { + mtx_unlock(&sp->mtx); + } else { + sp->state = SPLICE_QUEUED; + mtx_unlock(&sp->mtx); + so_splice_dispatch_async(sp); + } +} + +static int +splice_zinit(void *mem, int size __unused, int flags __unused) +{ + struct so_splice *s; + + s = (struct so_splice *)mem; + mtx_init(&s->mtx, "so_splice", NULL, MTX_DEF); + return (0); +} + +static void +splice_zfini(void *mem, int size) +{ + struct so_splice *s; + + s = (struct so_splice *)mem; + mtx_destroy(&s->mtx); +} + +static int +splice_init(void) +{ + struct thread *td; + int error, i, state; + + state = atomic_load_acq_int(&splice_init_state); + if (__predict_true(state > 0)) + return (0); + if (state < 0) + return (ENXIO); + sx_xlock(&splice_init_lock); + if (splice_init_state != 0) { + sx_xunlock(&splice_init_lock); + return (0); + } + + splice_zone = uma_zcreate("splice", sizeof(struct so_splice), NULL, + NULL, splice_zinit, splice_zfini, UMA_ALIGN_CACHE, 0); + + splice_wq = mallocarray(mp_maxid + 1, sizeof(*splice_wq), M_TEMP, + M_WAITOK | M_ZERO); + + /* + * Initialize the workqueues to run the splice work. We create a + * work queue for each CPU. + */ + CPU_FOREACH(i) { + STAILQ_INIT(&splice_wq[i].head); + mtx_init(&splice_wq[i].mtx, "splice work queue", NULL, MTX_DEF); + } + + /* Start kthreads for each workqueue. */ + error = 0; + CPU_FOREACH(i) { + error = kproc_kthread_add(splice_work_thread, &splice_wq[i], + &splice_proc, &td, 0, 0, "so_splice", "thr_%d", i); + if (error) { + printf("Can't add so_splice thread %d error %d\n", + i, error); + break; + } + + /* + * It's possible to create loops with SO_SPLICE; ensure that + * worker threads aren't able to starve the system too easily. + */ + thread_lock(td); + sched_prio(td, PUSER); + thread_unlock(td); + } + + splice_init_state = error != 0 ? -1 : 1; + sx_xunlock(&splice_init_lock); + + return (error); +} + +/* + * Lock a pair of socket's I/O locks for splicing. Avoid blocking while holding + * one lock in order to avoid potential deadlocks in case there is some other + * code path which acquires more than one I/O lock at a time. + */ +static void +splice_lock_pair(struct socket *so_src, struct socket *so_dst) +{ + int error; + + for (;;) { + error = SOCK_IO_SEND_LOCK(so_dst, SBL_WAIT | SBL_NOINTR); + KASSERT(error == 0, + ("%s: failed to lock send I/O lock: %d", __func__, error)); + error = SOCK_IO_RECV_LOCK(so_src, 0); + KASSERT(error == 0 || error == EWOULDBLOCK, + ("%s: failed to lock recv I/O lock: %d", __func__, error)); + if (error == 0) + break; + SOCK_IO_SEND_UNLOCK(so_dst); + + error = SOCK_IO_RECV_LOCK(so_src, SBL_WAIT | SBL_NOINTR); + KASSERT(error == 0, + ("%s: failed to lock recv I/O lock: %d", __func__, error)); + error = SOCK_IO_SEND_LOCK(so_dst, 0); + KASSERT(error == 0 || error == EWOULDBLOCK, + ("%s: failed to lock send I/O lock: %d", __func__, error)); + if (error == 0) + break; + SOCK_IO_RECV_UNLOCK(so_src); + } +} + +static void +splice_unlock_pair(struct socket *so_src, struct socket *so_dst) +{ + SOCK_IO_RECV_UNLOCK(so_src); + SOCK_IO_SEND_UNLOCK(so_dst); +} + +/* + * Move data from the source to the sink. Assumes that both of the relevant + * socket I/O locks are held. + */ +static int +so_splice_xfer_data(struct socket *so_src, struct socket *so_dst, off_t max, + ssize_t *lenp) +{ + struct uio uio; + struct mbuf *m; + struct sockbuf *sb_src, *sb_dst; + ssize_t len; + long space; + int error, flags; + + SOCK_IO_RECV_ASSERT_LOCKED(so_src); + SOCK_IO_SEND_ASSERT_LOCKED(so_dst); + + error = 0; + m = NULL; + memset(&uio, 0, sizeof(uio)); + + sb_src = &so_src->so_rcv; + sb_dst = &so_dst->so_snd; + + space = sbspace(sb_dst); + if (space < 0) + space = 0; + len = MIN(max, MIN(space, sbavail(sb_src))); + if (len == 0) { + SOCK_RECVBUF_LOCK(so_src); + if ((sb_src->sb_state & SBS_CANTRCVMORE) != 0) + error = EPIPE; + SOCK_RECVBUF_UNLOCK(so_src); + } else { + flags = MSG_DONTWAIT; + uio.uio_resid = len; + if (splice_receive_stream && sb_src->sb_tls_info == NULL) { + error = soreceive_stream_locked(so_src, sb_src, NULL, + &uio, &m, NULL, flags); + } else { + error = soreceive_generic_locked(so_src, NULL, + &uio, &m, NULL, &flags); + } + if (error != 0 && m != NULL) { + m_freem(m); + m = NULL; + } + } + if (m != NULL) { + len -= uio.uio_resid; + error = sosend_generic_locked(so_dst, NULL, NULL, m, NULL, + MSG_DONTWAIT, curthread); + } else if (error == 0) { + len = 0; + SOCK_SENDBUF_LOCK(so_dst); + if ((sb_dst->sb_state & SBS_CANTSENDMORE) != 0) + error = EPIPE; + SOCK_SENDBUF_UNLOCK(so_dst); + } + if (error == 0) + *lenp = len; + return (error); +} + +/* + * Transfer data from the source to the sink. + * + * If "direct" is true, the transfer is done in the context of whichever thread + * is operating on one of the socket buffers. We do not know which locks are + * held, so we can only trylock the socket buffers; if this fails, we fall back + * to the worker thread, which invokes this routine with "direct" set to false. + */ +static void +so_splice_xfer(struct so_splice *sp) +{ + struct socket *so_src, *so_dst; + off_t max; + ssize_t len; + int error; + + mtx_assert(&sp->mtx, MA_OWNED); + KASSERT(sp->state == SPLICE_QUEUED || sp->state == SPLICE_CLOSING, + ("so_splice_xfer: invalid state %d", sp->state)); + KASSERT(sp->max != 0, ("so_splice_xfer: max == 0")); + + if (sp->state == SPLICE_CLOSING) { + /* Userspace asked us to close the splice. */ + goto closing; + } + + sp->state = SPLICE_RUNNING; + so_src = sp->src; + so_dst = sp->dst; + max = sp->max > 0 ? sp->max - so_src->so_splice_sent : OFF_MAX; + if (max < 0) + max = 0; + + /* + * Lock the sockets in order to block userspace from doing anything + * sneaky. If an error occurs or one of the sockets can no longer + * transfer data, we will automatically unsplice. + */ + mtx_unlock(&sp->mtx); + splice_lock_pair(so_src, so_dst); + + error = so_splice_xfer_data(so_src, so_dst, max, &len); + + mtx_lock(&sp->mtx); + + /* + * Update our stats while still holding the socket locks. This + * synchronizes with getsockopt(SO_SPLICE), see the comment there. + */ + if (error == 0) { + KASSERT(len >= 0, ("%s: len %zd < 0", __func__, len)); + so_src->so_splice_sent += len; + } + splice_unlock_pair(so_src, so_dst); + + switch (sp->state) { + case SPLICE_CLOSING: +closing: + sp->state = SPLICE_CLOSED; + wakeup(sp); + mtx_unlock(&sp->mtx); + break; + case SPLICE_RUNNING: + if (error != 0 || + (sp->max > 0 && so_src->so_splice_sent >= sp->max)) { + sp->state = SPLICE_EXCEPTION; + soref(so_src); + mtx_unlock(&sp->mtx); + (void)so_unsplice(so_src, false); + sorele(so_src); + } else { + /* + * Locklessly check for additional bytes in the source's + * receive buffer and queue more work if possible. We + * may end up queuing needless work, but that's ok, and + * if we race with a thread inserting more data into the + * buffer and observe sbavail() == 0, the splice mutex + * ensures that splice_push() will queue more work for + * us. + */ + if (sbavail(&so_src->so_rcv) > 0 && + sbspace(&so_dst->so_snd) > 0) { + sp->state = SPLICE_QUEUED; + mtx_unlock(&sp->mtx); + so_splice_dispatch_async(sp); + } else { + sp->state = SPLICE_IDLE; + mtx_unlock(&sp->mtx); + } + } + break; + default: + __assert_unreachable(); + } +} + static void socket_hhook_register(int subtype) { @@ -1192,6 +1584,219 @@ solisten_dequeue(struct socket *head, struct socket **ret, int flags) return (0); } +static struct so_splice * +so_splice_alloc(off_t max) +{ + struct so_splice *sp; + + sp = uma_zalloc(splice_zone, M_WAITOK); + sp->src = NULL; + sp->dst = NULL; + sp->max = max > 0 ? max : -1; + do { + sp->wq_index = atomic_fetchadd_32(&splice_index, 1) % + (mp_maxid + 1); + } while (CPU_ABSENT(sp->wq_index)); + sp->state = SPLICE_IDLE; + TIMEOUT_TASK_INIT(taskqueue_thread, &sp->timeout, 0, so_splice_timeout, + sp); + return (sp); +} + +static void +so_splice_free(struct so_splice *sp) +{ + KASSERT(sp->state == SPLICE_CLOSED, + ("so_splice_free: sp %p not closed", sp)); + uma_zfree(splice_zone, sp); +} + +static void +so_splice_timeout(void *arg, int pending __unused) +{ + struct so_splice *sp; + + sp = arg; + (void)so_unsplice(sp->src, true); +} + +/* + * Splice the output from so to the input of so2. + */ +static int +so_splice(struct socket *so, struct socket *so2, struct splice *splice) +{ + struct so_splice *sp; + int error; + + if (splice->sp_max < 0) + return (EINVAL); + /* Handle only TCP for now; TODO: other streaming protos */ + if (so->so_proto->pr_protocol != IPPROTO_TCP || + so2->so_proto->pr_protocol != IPPROTO_TCP) + return (EPROTONOSUPPORT); + if (so->so_vnet != so2->so_vnet) + return (EINVAL); + + /* so_splice_xfer() assumes that we're using these implementations. */ + KASSERT(so->so_proto->pr_sosend == sosend_generic, + ("so_splice: sosend not sosend_generic")); + KASSERT(so2->so_proto->pr_soreceive == soreceive_generic || + so2->so_proto->pr_soreceive == soreceive_stream, + ("so_splice: soreceive not soreceive_generic/stream")); + + sp = so_splice_alloc(splice->sp_max); + so->so_splice_sent = 0; + sp->src = so; + sp->dst = so2; + + error = 0; + SOCK_LOCK(so); + if (SOLISTENING(so)) + error = EINVAL; + else if ((so->so_state & (SS_ISCONNECTED | SS_ISCONNECTING)) == 0) + error = ENOTCONN; + else if (so->so_splice != NULL) + error = EBUSY; + if (error != 0) { + SOCK_UNLOCK(so); + uma_zfree(splice_zone, sp); + return (error); + } + soref(so); + so->so_splice = sp; + SOCK_RECVBUF_LOCK(so); + so->so_rcv.sb_flags |= SB_SPLICED; + SOCK_RECVBUF_UNLOCK(so); + SOCK_UNLOCK(so); + + error = 0; + SOCK_LOCK(so2); + if (SOLISTENING(so2)) + error = EINVAL; + else if ((so2->so_state & (SS_ISCONNECTED | SS_ISCONNECTING)) == 0) + error = ENOTCONN; + else if (so2->so_splice_back != NULL) + error = EBUSY; + if (error != 0) { + SOCK_UNLOCK(so2); + SOCK_LOCK(so); + so->so_splice = NULL; + SOCK_RECVBUF_LOCK(so); + so->so_rcv.sb_flags &= ~SB_SPLICED; + SOCK_RECVBUF_UNLOCK(so); + SOCK_UNLOCK(so); + sorele(so); + uma_zfree(splice_zone, sp); + return (error); + } + soref(so2); + so2->so_splice_back = sp; + SOCK_SENDBUF_LOCK(so2); + so2->so_snd.sb_flags |= SB_SPLICED; + mtx_lock(&sp->mtx); + SOCK_SENDBUF_UNLOCK(so2); + SOCK_UNLOCK(so2); + + if (splice->sp_idle.tv_sec != 0 || splice->sp_idle.tv_usec != 0) { + taskqueue_enqueue_timeout_sbt(taskqueue_thread, &sp->timeout, + tvtosbt(splice->sp_idle), 0, C_PREL(4)); + } + + /* + * Transfer any data already present in the socket buffer. + */ + sp->state = SPLICE_QUEUED; + so_splice_xfer(sp); + return (0); +} + +static int +so_unsplice(struct socket *so, bool timeout) +{ + struct socket *so2; + struct so_splice *sp; + bool drain; + + /* + * First unset SB_SPLICED and hide the splice structure so that + * wakeup routines will stop enqueuing work. This also ensures that + * a only a single thread will proceed with the unsplice. + */ + SOCK_LOCK(so); + if (SOLISTENING(so)) { + SOCK_UNLOCK(so); + return (EINVAL); + } + SOCK_RECVBUF_LOCK(so); + if ((so->so_rcv.sb_flags & SB_SPLICED) == 0) { + SOCK_RECVBUF_UNLOCK(so); + SOCK_UNLOCK(so); + return (ENOTCONN); + } + so->so_rcv.sb_flags &= ~SB_SPLICED; + sp = so->so_splice; + so->so_splice = NULL; + SOCK_RECVBUF_UNLOCK(so); + SOCK_UNLOCK(so); + + so2 = sp->dst; + SOCK_LOCK(so2); + KASSERT(!SOLISTENING(so2), ("%s: so2 is listening", __func__)); + SOCK_SENDBUF_LOCK(so2); + KASSERT((so2->so_snd.sb_flags & SB_SPLICED) != 0, + ("%s: so2 is not spliced", __func__)); + KASSERT(so2->so_splice_back == sp, + ("%s: so_splice_back != sp", __func__)); + so2->so_snd.sb_flags &= ~SB_SPLICED; + so2->so_splice_back = NULL; + SOCK_SENDBUF_UNLOCK(so2); + SOCK_UNLOCK(so2); + + /* + * No new work is being enqueued. The worker thread might be + * splicing data right now, in which case we want to wait for it to + * finish before proceeding. + */ + mtx_lock(&sp->mtx); + switch (sp->state) { + case SPLICE_QUEUED: + case SPLICE_RUNNING: + sp->state = SPLICE_CLOSING; + while (sp->state == SPLICE_CLOSING) + msleep(sp, &sp->mtx, PSOCK, "unsplice", 0); + break; + case SPLICE_IDLE: + case SPLICE_EXCEPTION: + sp->state = SPLICE_CLOSED; + break; + default: + __assert_unreachable(); + } + if (!timeout) { + drain = taskqueue_cancel_timeout(taskqueue_thread, &sp->timeout, + NULL) != 0; + } else { + drain = false; + } + mtx_unlock(&sp->mtx); + if (drain) + taskqueue_drain_timeout(taskqueue_thread, &sp->timeout); + + /* + * Now we hold the sole reference to the splice structure. + * Clean up: signal userspace and release socket references. + */ + sorwakeup(so); + CURVNET_SET(so->so_vnet); + sorele(so); + sowwakeup(so2); + sorele(so2); + CURVNET_RESTORE(); + so_splice_free(sp); + return (0); +} + /* * Free socket upon release of the very last reference. */ @@ -1205,6 +1810,12 @@ sofree(struct socket *so) ("%s: so %p has references", __func__, so)); KASSERT(SOLISTENING(so) || so->so_qstate == SQ_NONE, ("%s: so %p is on listen queue", __func__, so)); + KASSERT(SOLISTENING(so) || (so->so_rcv.sb_flags & SB_SPLICED) == 0, + ("%s: so %p rcvbuf is spliced", __func__, so)); + KASSERT(SOLISTENING(so) || (so->so_snd.sb_flags & SB_SPLICED) == 0, + ("%s: so %p sndbuf is spliced", __func__, so)); + KASSERT(so->so_splice == NULL && so->so_splice_back == NULL, + ("%s: so %p has spliced data", __func__, so)); SOCK_UNLOCK(so); @@ -3315,6 +3926,59 @@ sosetopt(struct socket *so, struct sockopt *sopt) so->so_max_pacing_rate = val32; break; + case SO_SPLICE: { + struct splice splice; + +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) { + struct splice32 splice32; + + error = sooptcopyin(sopt, &splice32, + sizeof(splice32), sizeof(splice32)); + if (error == 0) { + splice.sp_fd = splice32.sp_fd; + splice.sp_max = splice32.sp_max; + CP(splice32.sp_idle, splice.sp_idle, + tv_sec); + CP(splice32.sp_idle, splice.sp_idle, + tv_usec); + } + } else +#endif + { + error = sooptcopyin(sopt, &splice, + sizeof(splice), sizeof(splice)); + } + if (error) + goto bad; + ktrsplice(&splice); + + error = splice_init(); + if (error != 0) + goto bad; + + if (splice.sp_fd >= 0) { + struct file *fp; + struct socket *so2; + + if (!cap_rights_contains(sopt->sopt_rights, + &cap_recv_rights)) { + error = ENOTCAPABLE; + goto bad; + } + error = getsock(sopt->sopt_td, splice.sp_fd, + &cap_send_rights, &fp); + if (error != 0) + goto bad; + so2 = fp->f_data; + + error = so_splice(so, so2, &splice); + fdrop(fp, sopt->sopt_td); + } else { + error = so_unsplice(so, false); + } + break; + } default: if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0) error = hhook_run_socket(so, sopt, @@ -3532,6 +4196,33 @@ integer: optval = so->so_max_pacing_rate; goto integer; + case SO_SPLICE: { + off_t n; + + /* + * Acquire the I/O lock to serialize with + * so_splice_xfer(). This is not required for + * correctness, but makes testing simpler: once a byte + * has been transmitted to the sink and observed (e.g., + * by reading from the socket to which the sink is + * connected), a subsequent getsockopt(SO_SPLICE) will + * return an up-to-date value. + */ + error = SOCK_IO_RECV_LOCK(so, SBL_WAIT); + if (error != 0) + goto bad; + SOCK_LOCK(so); + if (SOLISTENING(so)) { + n = 0; + } else { + n = so->so_splice_sent; + } + SOCK_UNLOCK(so); + SOCK_IO_RECV_UNLOCK(so); + error = sooptcopyout(sopt, &n, sizeof(n)); *** 226 LINES SKIPPED *** From nobody Thu Oct 17 16:16: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 4XTtJ44w8dz5Z9WV; Thu, 17 Oct 2024 16:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtJ433pHz42hY; Thu, 17 Oct 2024 16:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wv+JUOSXaNgy8ye4xmCmz8bKZeBBHJIQ00il+eKdyeY=; b=esV9C733HXxoyAhrY1dtUy+k4m5yBuCwpQq0efLoQLdSaqGhv2u7glmzbGRzPLC6QS1F5I gOLN39FI19Hf9GYq3J54zCcP5hslPTmSsM6J7c9FPUu8LHD63zCBPX+aDuBQJEL7TH5TW9 i5C5X0Si38jux18/5J+Av8Gz78XCcGWqbt1HzBnrjKuMhgc0aycWLemfp8DTmO+zNLDdIw M7Q2f3sHS+yhIa2XHohJ2yMph2WmNihz90P+foLSQ8tPCSvdL6gbRXEhTa6I+e1ApZzJEM w2eRddD/uu9xl1WtSGMvi9HPVMJIn+dSG9BkKFj8A45vTWszzh5pajkjj/50PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wv+JUOSXaNgy8ye4xmCmz8bKZeBBHJIQ00il+eKdyeY=; b=UpwizweFD2f3EzwJDBzMMUWtYxGOkzgAlR8a2m9cmN1+dJX/zNxIgLBKK1iapVcjOaNf8V 57yhXCKgeTBfbQSL8YaKVBrkmFW4ZVE0kmU1358SpLowaYBWHXrJEPz6R4RMrwdSEOlcX2 mHqUur7hI8jcnTBnXg6niAZR8QcwYFhjK90+LeylSFbHEr2hPBKs2336OMw7bendVXkIgc 8z/I1Rb+3jNsemoBLNDnqJz8kgYiDYimuCNvpdc6T7x3/4NFrH2qWka9CaLoyJuAKT0lIq 2+nk5N6zw9FdUTCDBjc4Da4HWOKTu5/YgDn7wm4C2J4sP8yxEE9TY+59ZXgyEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729181796; a=rsa-sha256; cv=none; b=HPkXtnAIyuVellqBBx9U6B/K2VCUyOYMVeMeUVa3+ZD6lZQnezEAf1NkE35XASeuvwZS3p RgZNBX/n6+OSvsVhc+qUuk3PMu4mMhEo3+EFDRFVvgkMrriMHoa7h3cQ+KOhHNplHIeR7m zzQIzooumBO6FflZMZLDwva2O7SDEj7svUtJ6oEqNITFBicx1oav9NgejvUPErJCDLxnK5 8dNpALiWCkKR3wLGvIIVxmRhSp7nh1zKcsp6oAL2sOEqC7IVODBby2YbqzStmAKzCsukdI v5T7pZhH8AvpjCByPfgJeV8Rv4FFpqJwKLc1cmqMxXZHLdhUazQDIwDxHItM7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtJ42483zwbJ; Thu, 17 Oct 2024 16:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGGaCu099119; Thu, 17 Oct 2024 16:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGGaqE099116; Thu, 17 Oct 2024 16:16:36 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:16:36 GMT Message-Id: <202410171616.49HGGaqE099116@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: 794fd74ab8bd - stable/14 - tests: Add some test cases for SO_SPLICE 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: 794fd74ab8bdfae50dcb5f31ffdeb2d186a3fd9c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=794fd74ab8bdfae50dcb5f31ffdeb2d186a3fd9c commit 794fd74ab8bdfae50dcb5f31ffdeb2d186a3fd9c Author: Mark Johnston AuthorDate: 2024-09-10 16:51:03 +0000 Commit: Mark Johnston CommitDate: 2024-10-17 15:48:37 +0000 tests: Add some test cases for SO_SPLICE Reviewed by: gallatin MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D46412 (cherry picked from commit 877cf210c08b99aa532107e176b372de58579493) --- tests/sys/kern/Makefile | 2 + tests/sys/kern/socket_splice.c | 979 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 981 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 29d33f4c617c..b6333c9f04f3 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -32,6 +32,7 @@ ATF_TESTS_C+= sigwait ATF_TESTS_C+= socket_accf ATF_TESTS_C+= socket_msg_trunc ATF_TESTS_C+= socket_msg_waitall +ATF_TESTS_C+= socket_splice TEST_METADATA.sigwait+= is_exclusive="true" .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH:Mpowerpc*} == "" ATF_TESTS_C+= subr_physmem_test @@ -78,6 +79,7 @@ LIBADD.kcov+= pthread CFLAGS.ktls_test+= -DOPENSSL_API_COMPAT=0x10100000L LIBADD.ktls_test+= crypto util LIBADD.socket_msg_waitall+= pthread +LIBADD.socket_splice+= pthread LIBADD.sendfile_helper+= pthread LIBADD.fdgrowtable_test+= util pthread kvm procstat LIBADD.sigwait+= rt diff --git a/tests/sys/kern/socket_splice.c b/tests/sys/kern/socket_splice.c new file mode 100644 index 000000000000..3970f16b34dc --- /dev/null +++ b/tests/sys/kern/socket_splice.c @@ -0,0 +1,979 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Stormshield + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +static void +checked_close(int fd) +{ + int error; + + error = close(fd); + ATF_REQUIRE_MSG(error == 0, "close failed: %s", strerror(errno)); +} + +static int +fionread(int fd) +{ + int data, error; + + data = 0; + error = ioctl(fd, FIONREAD, &data); + ATF_REQUIRE_MSG(error == 0, "ioctl failed: %s", strerror(errno)); + ATF_REQUIRE(data >= 0); + return (data); +} + +static void +noblocking(int fd) +{ + int flags, error; + + flags = fcntl(fd, F_GETFL); + ATF_REQUIRE_MSG(flags != -1, "fcntl failed: %s", strerror(errno)); + flags |= O_NONBLOCK; + error = fcntl(fd, F_SETFL, flags); + ATF_REQUIRE_MSG(error == 0, "fcntl failed: %s", strerror(errno)); +} + +/* + * Create a pair of connected TCP sockets, returned via the "out" array. + */ +static void +tcp_socketpair(int out[2], int domain) +{ + struct sockaddr_in sin; + struct sockaddr_in6 sin6; + struct sockaddr *sinp; + int error, sd[2]; + + sd[0] = socket(domain, SOCK_STREAM, 0); + ATF_REQUIRE_MSG(sd[0] >= 0, "socket failed: %s", strerror(errno)); + sd[1] = socket(domain, SOCK_STREAM, 0); + ATF_REQUIRE_MSG(sd[1] >= 0, "socket failed: %s", strerror(errno)); + + error = setsockopt(sd[0], IPPROTO_TCP, TCP_NODELAY, &(int){ 1 }, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, "setsockopt failed: %s", strerror(errno)); + error = setsockopt(sd[1], IPPROTO_TCP, TCP_NODELAY, &(int){ 1 }, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, "setsockopt failed: %s", strerror(errno)); + + if (domain == PF_INET) { + memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_len = sizeof(sin); + sin.sin_addr.s_addr = htonl(INADDR_ANY); + sin.sin_port = htons(0); + sinp = (struct sockaddr *)&sin; + } else { + ATF_REQUIRE(domain == PF_INET6); + memset(&sin6, 0, sizeof(sin6)); + sin6.sin6_family = AF_INET6; + sin6.sin6_len = sizeof(sin6); + sin6.sin6_addr = in6addr_any; + sin6.sin6_port = htons(0); + sinp = (struct sockaddr *)&sin6; + } + + error = bind(sd[0], sinp, sinp->sa_len); + ATF_REQUIRE_MSG(error == 0, "bind failed: %s", strerror(errno)); + error = listen(sd[0], 1); + ATF_REQUIRE_MSG(error == 0, "listen failed: %s", strerror(errno)); + + error = getsockname(sd[0], sinp, &(socklen_t){ sinp->sa_len }); + ATF_REQUIRE_MSG(error == 0, "getsockname failed: %s", strerror(errno)); + + error = connect(sd[1], sinp, sinp->sa_len); + ATF_REQUIRE_MSG(error == 0, "connect failed: %s", strerror(errno)); + out[0] = accept(sd[0], NULL, NULL); + ATF_REQUIRE_MSG(out[0] >= 0, "accept failed: %s", strerror(errno)); + checked_close(sd[0]); + out[1] = sd[1]; +} + +static void +tcp4_socketpair(int out[2]) +{ + tcp_socketpair(out, PF_INET); +} + +static void +tcp6_socketpair(int out[2]) +{ + tcp_socketpair(out, PF_INET6); +} + +static off_t +nspliced(int sd) +{ + off_t n; + socklen_t len; + int error; + + len = sizeof(n); + error = getsockopt(sd, SOL_SOCKET, SO_SPLICE, &n, &len); + ATF_REQUIRE_MSG(error == 0, "getsockopt failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(len == sizeof(n), "unexpected length: %d", len); + return (n); +} + +/* + * Use a macro so that ATF_REQUIRE_MSG prints a useful line number. + */ +#define check_nspliced(sd, n) do { \ + off_t sofar; \ + \ + sofar = nspliced(sd); \ + ATF_REQUIRE_MSG(sofar == (off_t)n, "spliced %jd bytes, expected %jd", \ + (intmax_t)sofar, (intmax_t)n); \ +} while (0) + +static void +splice_init(struct splice *sp, int fd, off_t max, struct timeval *tv) +{ + memset(sp, 0, sizeof(*sp)); + sp->sp_fd = fd; + sp->sp_max = max; + if (tv != NULL) + sp->sp_idle = *tv; + else + sp->sp_idle.tv_sec = sp->sp_idle.tv_usec = 0; +} + +static void +unsplice(int fd) +{ + struct splice sp; + int error; + + splice_init(&sp, -1, 0, NULL); + error = setsockopt(fd, SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_MSG(error == 0, "setsockopt failed: %s", strerror(errno)); +} + +static void +unsplice_pair(int fd1, int fd2) +{ + unsplice(fd1); + unsplice(fd2); +} + +static void +splice_pair(int fd1, int fd2, off_t max, struct timeval *tv) +{ + struct splice sp; + int error; + + splice_init(&sp, fd1, max, tv); + error = setsockopt(fd2, SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_MSG(error == 0, "setsockopt failed: %s", strerror(errno)); + + splice_init(&sp, fd2, max, tv); + error = setsockopt(fd1, SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_MSG(error == 0, "setsockopt failed: %s", strerror(errno)); +} + +/* + * A structure representing a spliced pair of connections. left[1] is + * bidirectionally spliced with right[0]. + */ +struct splice_conn { + int left[2]; + int right[2]; +}; + +/* + * Initialize a splice connection with the given maximum number of bytes to + * splice and the given idle timeout. For now we're forced to use TCP socket, + * but at some point it would be nice (and simpler) to use pairs of PF_LOCAL + * sockets. + */ +static void +splice_conn_init_limits(struct splice_conn *sc, off_t max, struct timeval *tv) +{ + memset(sc, 0, sizeof(*sc)); + tcp4_socketpair(sc->left); + tcp4_socketpair(sc->right); + splice_pair(sc->left[1], sc->right[0], max, tv); +} + +static void +splice_conn_init(struct splice_conn *sc) +{ + splice_conn_init_limits(sc, 0, NULL); +} + +static void +splice_conn_check_empty(struct splice_conn *sc) +{ + int data; + + data = fionread(sc->left[0]); + ATF_REQUIRE_MSG(data == 0, "unexpected data on left[0]: %d", data); + data = fionread(sc->left[1]); + ATF_REQUIRE_MSG(data == 0, "unexpected data on left[1]: %d", data); + data = fionread(sc->right[0]); + ATF_REQUIRE_MSG(data == 0, "unexpected data on right[0]: %d", data); + data = fionread(sc->right[1]); + ATF_REQUIRE_MSG(data == 0, "unexpected data on right[1]: %d", data); +} + +static void +splice_conn_fini(struct splice_conn *sc) +{ + checked_close(sc->left[0]); + checked_close(sc->left[1]); + checked_close(sc->right[0]); + checked_close(sc->right[1]); +} + +static void +splice_conn_noblocking(struct splice_conn *sc) +{ + noblocking(sc->left[0]); + noblocking(sc->left[1]); + noblocking(sc->right[0]); + noblocking(sc->right[1]); +} + +/* Pass a byte through a pair of spliced connections. */ +ATF_TC_WITHOUT_HEAD(splice_basic); +ATF_TC_BODY(splice_basic, tc) +{ + struct splice_conn sc; + ssize_t n; + char c; + + splice_conn_init(&sc); + + check_nspliced(sc.left[1], 0); + check_nspliced(sc.right[0], 0); + + /* Left-to-right. */ + c = 'M'; + n = write(sc.left[0], &c, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.right[1], &c, 1); + ATF_REQUIRE_MSG(n == 1, "read failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(c == 'M', "unexpected character: %c", c); + check_nspliced(sc.left[1], 1); + check_nspliced(sc.right[0], 0); + + /* Right-to-left. */ + c = 'J'; + n = write(sc.right[1], &c, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.left[0], &c, 1); + ATF_REQUIRE_MSG(n == 1, "read failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(c == 'J', "unexpected character: %c", c); + check_nspliced(sc.left[1], 1); + check_nspliced(sc.right[0], 1); + + /* Unsplice and verify that the byte counts haven't changed. */ + unsplice(sc.left[1]); + unsplice(sc.right[0]); + check_nspliced(sc.left[1], 1); + check_nspliced(sc.right[0], 1); + + splice_conn_fini(&sc); +} + +static void +remove_rights(int fd, const cap_rights_t *toremove) +{ + cap_rights_t rights; + int error; + + error = cap_rights_get(fd, &rights); + ATF_REQUIRE_MSG(error == 0, "cap_rights_get failed: %s", + strerror(errno)); + cap_rights_remove(&rights, toremove); + error = cap_rights_limit(fd, &rights); + ATF_REQUIRE_MSG(error == 0, "cap_rights_limit failed: %s", + strerror(errno)); +} + +/* + * Verify that splicing fails when the socket is missing the necessary rights. + */ +ATF_TC_WITHOUT_HEAD(splice_capsicum); +ATF_TC_BODY(splice_capsicum, tc) +{ + struct splice sp; + cap_rights_t rights; + off_t n; + int error, left[2], right[2]; + + tcp4_socketpair(left); + tcp4_socketpair(right); + + /* + * Make sure that we splice a socket that's missing recv rights. + */ + remove_rights(left[1], cap_rights_init(&rights, CAP_RECV)); + splice_init(&sp, right[0], 0, NULL); + error = setsockopt(left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(ENOTCAPABLE, error == -1); + + /* Make sure we can still splice left[1] in the other direction. */ + splice_init(&sp, left[1], 0, NULL); + error = setsockopt(right[0], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_MSG(error == 0, "setsockopt failed: %s", strerror(errno)); + splice_init(&sp, -1, 0, NULL); + error = setsockopt(right[0], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_MSG(error == 0, "setsockopt failed: %s", strerror(errno)); + + /* + * Now remove send rights from left[1] and verify that splicing is no + * longer possible. + */ + remove_rights(left[1], cap_rights_init(&rights, CAP_SEND)); + splice_init(&sp, left[1], 0, NULL); + error = setsockopt(right[0], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(ENOTCAPABLE, error == -1); + + /* + * It's still ok to query the SO_SPLICE state though. + */ + n = -1; + error = getsockopt(left[1], SOL_SOCKET, SO_SPLICE, &n, + &(socklen_t){ sizeof(n) }); + ATF_REQUIRE_MSG(error == 0, "getsockopt failed: %s", strerror(errno)); + ATF_REQUIRE(n == 0); + + /* + * Make sure that we can unsplice a spliced pair without any rights + * other than CAP_SETSOCKOPT. + */ + splice_pair(left[0], right[1], 0, NULL); + error = cap_rights_limit(left[0], + cap_rights_init(&rights, CAP_SETSOCKOPT)); + ATF_REQUIRE_MSG(error == 0, "cap_rights_limit failed: %s", + strerror(errno)); + unsplice(left[0]); + + checked_close(left[0]); + checked_close(left[1]); + checked_close(right[0]); + checked_close(right[1]); +} + +/* + * Check various error cases in splice configuration. + */ +ATF_TC_WITHOUT_HEAD(splice_error); +ATF_TC_BODY(splice_error, tc) +{ + struct splice_conn sc; + struct splice sp; + char path[PATH_MAX]; + int error, fd, sd, usd[2]; + + memset(&sc, 0, sizeof(sc)); + tcp4_socketpair(sc.left); + tcp4_socketpair(sc.right); + + /* A negative byte limit is invalid. */ + splice_init(&sp, sc.right[0], -3, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(EINVAL, error == -1); + + /* Can't unsplice a never-spliced socket. */ + splice_init(&sp, -1, 0, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(ENOTCONN, error == -1); + + /* Can't double-unsplice a socket. */ + splice_init(&sp, sc.right[0], 0, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_MSG(error == 0, "setsockopt failed: %s", strerror(errno)); + unsplice(sc.left[1]); + splice_init(&sp, -1, 0, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(ENOTCONN, error == -1); + + /* Can't splice a spliced socket */ + splice_init(&sp, sc.right[0], 0, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_MSG(error == 0, "setsockopt failed: %s", strerror(errno)); + splice_init(&sp, sc.right[1], 0, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(EBUSY, error == -1); + splice_init(&sp, sc.right[0], 0, NULL); + error = setsockopt(sc.left[0], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(EBUSY, error == -1); + splice_init(&sp, -1, 0, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + + /* Can't splice to a non-socket. */ + snprintf(path, sizeof(path), "/tmp/splice_error.XXXXXX"); + fd = mkstemp(path); + ATF_REQUIRE_MSG(fd >= 0, "mkstemp failed: %s", strerror(errno)); + splice_init(&sp, fd, 0, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(ENOTSOCK, error == -1); + + /* Can't splice to an invalid fd. */ + checked_close(fd); + splice_init(&sp, fd, 0, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(EBADF, error == -1); + + /* Can't splice a unix stream socket. */ + error = socketpair(AF_UNIX, SOCK_STREAM, 0, usd); + ATF_REQUIRE_MSG(error == 0, "socketpair failed: %s", strerror(errno)); + splice_init(&sp, usd[0], 0, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(EPROTONOSUPPORT, error == -1); + error = setsockopt(usd[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(EPROTONOSUPPORT, error == -1); + checked_close(usd[0]); + checked_close(usd[1]); + + /* Can't splice an unconnected TCP socket. */ + sd = socket(PF_INET, SOCK_STREAM, 0); + ATF_REQUIRE_MSG(sd >= 0, "socket failed: %s", strerror(errno)); + splice_init(&sp, sd, 0, NULL); + error = setsockopt(sc.left[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(ENOTCONN, error == -1); + splice_init(&sp, sc.right[0], 0, NULL); + error = setsockopt(sd, SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(ENOTCONN, error == -1); + + splice_conn_fini(&sc); +} + +/* + * Make sure that kevent() doesn't report read I/O events on spliced sockets. + */ +ATF_TC_WITHOUT_HEAD(splice_kevent); +ATF_TC_BODY(splice_kevent, tc) +{ + struct splice_conn sc; + struct kevent kev; + struct timespec ts; + ssize_t n; + int error, nev, kq; + uint8_t b; + + splice_conn_init(&sc); + + kq = kqueue(); + ATF_REQUIRE_MSG(kq >= 0, "kqueue failed: %s", strerror(errno)); + + EV_SET(&kev, sc.left[1], EVFILT_READ, EV_ADD, 0, 0, NULL); + error = kevent(kq, &kev, 1, NULL, 0, NULL); + ATF_REQUIRE_MSG(error == 0, "kevent failed: %s", strerror(errno)); + + memset(&ts, 0, sizeof(ts)); + nev = kevent(kq, NULL, 0, &kev, 1, &ts); + ATF_REQUIRE_MSG(nev >= 0, "kevent failed: %s", strerror(errno)); + ATF_REQUIRE(nev == 0); + + b = 'M'; + n = write(sc.left[0], &b, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.right[1], &b, 1); + ATF_REQUIRE_MSG(n == 1, "read failed: %s", strerror(errno)); + ATF_REQUIRE(b == 'M'); + + nev = kevent(kq, NULL, 0, &kev, 1, &ts); + ATF_REQUIRE_MSG(nev >= 0, "kevent failed: %s", strerror(errno)); + ATF_REQUIRE(nev == 0); + + b = 'J'; + n = write(sc.right[1], &b, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.left[0], &b, 1); + ATF_REQUIRE_MSG(n == 1, "read failed: %s", strerror(errno)); + ATF_REQUIRE(b == 'J'); + + splice_conn_fini(&sc); + checked_close(kq); +} + +/* + * Verify that a splice byte limit is applied. + */ +ATF_TC_WITHOUT_HEAD(splice_limit_bytes); +ATF_TC_BODY(splice_limit_bytes, tc) +{ + struct splice_conn sc; + ssize_t n; + uint8_t b, buf[128]; + + splice_conn_init_limits(&sc, sizeof(buf) + 1, NULL); + + memset(buf, 'A', sizeof(buf)); + for (size_t total = sizeof(buf); total > 0; total -= n) { + n = write(sc.left[0], buf, total); + ATF_REQUIRE_MSG(n > 0, "write failed: %s", strerror(errno)); + } + for (size_t total = sizeof(buf); total > 0; total -= n) { + n = read(sc.right[1], buf, sizeof(buf)); + ATF_REQUIRE_MSG(n > 0, "read failed: %s", strerror(errno)); + } + + check_nspliced(sc.left[1], sizeof(buf)); + check_nspliced(sc.right[0], 0); + + /* Trigger an unsplice by writing the last byte. */ + b = 'B'; + n = write(sc.left[0], &b, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.right[1], &b, 1); + ATF_REQUIRE_MSG(n == 1, "read failed: %s", strerror(errno)); + ATF_REQUIRE(b == 'B'); + + /* + * The next byte should appear on the other side of the connection + * rather than the splice. + */ + b = 'C'; + n = write(sc.left[0], &b, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.left[1], &b, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + ATF_REQUIRE(b == 'C'); + + splice_conn_check_empty(&sc); + + splice_conn_fini(&sc); +} + +/* + * Verify that a splice timeout limit is applied. + */ +ATF_TC_WITHOUT_HEAD(splice_limit_timeout); +ATF_TC_BODY(splice_limit_timeout, tc) +{ + struct splice_conn sc; + ssize_t n; + int error; + uint8_t b, buf[128]; + + splice_conn_init_limits(&sc, 0, + &(struct timeval){ .tv_sec = 0, .tv_usec = 500000 /* 500ms */ }); + + /* Write some data through the splice. */ + memset(buf, 'A', sizeof(buf)); + for (size_t total = sizeof(buf); total > 0; total -= n) { + n = write(sc.left[0], buf, total); + ATF_REQUIRE_MSG(n > 0, "write failed: %s", strerror(errno)); + } + for (size_t total = sizeof(buf); total > 0; total -= n) { + n = read(sc.right[1], buf, sizeof(buf)); + ATF_REQUIRE_MSG(n > 0, "read failed: %s", strerror(errno)); + } + + check_nspliced(sc.left[1], sizeof(buf)); + check_nspliced(sc.right[0], 0); + + /* Wait for the splice to time out. */ + error = usleep(550000); + ATF_REQUIRE_MSG(error == 0, "usleep failed: %s", strerror(errno)); + + /* + * The next byte should appear on the other side of the connection + * rather than the splice. + */ + b = 'C'; + n = write(sc.left[0], &b, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.left[1], &b, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + ATF_REQUIRE(b == 'C'); + + splice_conn_fini(&sc); +} + +/* + * Make sure that listen() fails on spliced sockets, and that SO_SPLICE can't be + * used with listening sockets. + */ +ATF_TC_WITHOUT_HEAD(splice_listen); +ATF_TC_BODY(splice_listen, tc) +{ + struct splice sp; + struct splice_conn sc; + int error, sd[3]; + + /* + * These should fail regardless since the sockets are connected, but it + * doesn't hurt to check. + */ + splice_conn_init(&sc); + error = listen(sc.left[1], 1); + ATF_REQUIRE_ERRNO(EINVAL, error == -1); + error = listen(sc.right[0], 1); + ATF_REQUIRE_ERRNO(EINVAL, error == -1); + splice_conn_fini(&sc); + + tcp4_socketpair(sd); + sd[2] = socket(PF_INET, SOCK_STREAM, 0); + ATF_REQUIRE_MSG(sd[2] >= 0, "socket failed: %s", strerror(errno)); + error = listen(sd[2], 1); + ATF_REQUIRE_MSG(error == 0, "listen failed: %s", strerror(errno)); + + /* + * Make sure a listening socket can't be spliced in either direction. + */ + splice_init(&sp, sd[2], 0, NULL); + error = setsockopt(sd[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(EINVAL, error == -1); + splice_init(&sp, sd[1], 0, NULL); + error = setsockopt(sd[2], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(EINVAL, error == -1); + + /* + * Make sure we can't try to unsplice a listening socket. + */ + splice_init(&sp, -1, 0, NULL); + error = setsockopt(sd[2], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)); + ATF_REQUIRE_ERRNO(EINVAL, error == -1); + + checked_close(sd[0]); + checked_close(sd[1]); + checked_close(sd[2]); +} + +static void +sigalarm(int sig __unused) +{ +} + +/* + * Our SO_SPLICE implementation doesn't do anything to prevent loops. We should + * however make sure that they are interruptible. + */ +ATF_TC_WITHOUT_HEAD(splice_loop); +ATF_TC_BODY(splice_loop, tc) +{ + ssize_t n; + int sd[2], status; + pid_t child; + char c; + + tcp_socketpair(sd, PF_INET); + splice_pair(sd[0], sd[1], 0, NULL); + + /* + * Let the child process trigger an infinite loop. It should still be + * possible to kill the child with a signal, causing the connection to + * be dropped and ending the loop. + */ + child = fork(); + ATF_REQUIRE_MSG(child >= 0, "fork failed: %s", strerror(errno)); + if (child == 0) { + alarm(2); + c = 42; + n = write(sd[0], &c, 1); + if (n != 1) + _exit(2); + c = 24; + n = write(sd[1], &c, 1); + if (n != 1) + _exit(3); + + for (;;) { + /* Wait for SIGALARM. */ + sleep(100); + } + + _exit(0); + } else { + checked_close(sd[0]); + checked_close(sd[1]); + + child = waitpid(child, &status, 0); + ATF_REQUIRE_MSG(child >= 0, + "waitpid failed: %s", strerror(errno)); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGALRM); + } +} + +/* + * Simple I/O test. + */ +ATF_TC_WITHOUT_HEAD(splice_nonblock); +ATF_TC_BODY(splice_nonblock, tc) +{ + struct splice_conn sc; + char buf[200]; + size_t sofar; + ssize_t n; + + splice_conn_init(&sc); + splice_conn_noblocking(&sc); + + memset(buf, 'A', sizeof(buf)); + for (sofar = 0;;) { + n = write(sc.left[0], buf, sizeof(buf)); + if (n < 0) { + ATF_REQUIRE_ERRNO(EAGAIN, n == -1); + break; + } + sofar += n; + } + + while (sofar > 0) { + n = read(sc.right[1], buf, sizeof(buf)); + if (n < 0) { + ATF_REQUIRE_ERRNO(EAGAIN, n == -1); + usleep(100); + } else { + for (size_t i = 0; i < (size_t)n; i++) + ATF_REQUIRE(buf[i] == 'A'); + sofar -= n; + } + } + + splice_conn_fini(&sc); +} + +ATF_TC_WITHOUT_HEAD(splice_resplice); +ATF_TC_BODY(splice_resplice, tc) +{ + struct splice_conn sc; + ssize_t n; + char c; + + splice_conn_init(&sc); + + /* Left-to-right. */ + c = 'M'; + n = write(sc.left[0], &c, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.right[1], &c, 1); + ATF_REQUIRE_MSG(n == 1, "read failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(c == 'M', "unexpected character: %c", c); + check_nspliced(sc.left[1], 1); + check_nspliced(sc.right[0], 0); + + /* Right-to-left. */ + c = 'J'; + n = write(sc.right[1], &c, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.left[0], &c, 1); + ATF_REQUIRE_MSG(n == 1, "read failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(c == 'J', "unexpected character: %c", c); + check_nspliced(sc.left[1], 1); + check_nspliced(sc.right[0], 1); + + /* Unsplice and verify that the byte counts haven't changed. */ + unsplice(sc.left[1]); + unsplice(sc.right[0]); + check_nspliced(sc.left[1], 1); + check_nspliced(sc.right[0], 1); + + /* Splice again, check that byte counts are reset. */ + splice_pair(sc.left[1], sc.right[0], 0, NULL); + check_nspliced(sc.left[1], 0); + check_nspliced(sc.right[0], 0); + + /* Left-to-right. */ + c = 'M'; + n = write(sc.left[0], &c, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.right[1], &c, 1); + ATF_REQUIRE_MSG(n == 1, "read failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(c == 'M', "unexpected character: %c", c); + check_nspliced(sc.left[1], 1); + check_nspliced(sc.right[0], 0); + + /* Right-to-left. */ + c = 'J'; + n = write(sc.right[1], &c, 1); + ATF_REQUIRE_MSG(n == 1, "write failed: %s", strerror(errno)); + n = read(sc.left[0], &c, 1); + ATF_REQUIRE_MSG(n == 1, "read failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(c == 'J', "unexpected character: %c", c); + check_nspliced(sc.left[1], 1); + check_nspliced(sc.right[0], 1); + + splice_conn_fini(&sc); +} + +struct xfer_args { + pthread_barrier_t *barrier; + uint32_t bytes; + int fd; +}; + +static void * +xfer(void *arg) +{ + struct xfer_args *xfer; + uint8_t *buf; + size_t sz; + ssize_t n; + uint32_t resid; + int error; + + xfer = arg; + + error = fcntl(xfer->fd, F_SETFL, O_NONBLOCK); + ATF_REQUIRE_MSG(error == 0, "fcntl failed: %s", strerror(errno)); + + sz = MIN(xfer->bytes, 1024 * 1024); + buf = malloc(sz); + ATF_REQUIRE(buf != NULL); + arc4random_buf(buf, sz); + + pthread_barrier_wait(xfer->barrier); + + for (resid = xfer->bytes; xfer->bytes > 0 || resid > 0;) { + n = write(xfer->fd, buf, MIN(sz, xfer->bytes)); + if (n < 0) { + ATF_REQUIRE_ERRNO(EAGAIN, n == -1); + usleep(1000); + } else { + ATF_REQUIRE(xfer->bytes >= (size_t)n); + xfer->bytes -= n; + } + + n = read(xfer->fd, buf, sz); + if (n < 0) { + ATF_REQUIRE_ERRNO(EAGAIN, n == -1); + usleep(1000); + } else { + ATF_REQUIRE(resid >= (size_t)n); + resid -= n; + } + } + + free(buf); + return (NULL); +} + +/* + * Use two threads to transfer data between two spliced connections. + */ +ATF_TC_WITHOUT_HEAD(splice_throughput); +ATF_TC_BODY(splice_throughput, tc) +{ + struct xfer_args xfers[2]; + pthread_t thread[2]; + pthread_barrier_t barrier; + struct splice_conn sc; + uint32_t bytes; + int error; + + /* Transfer an amount between 1B and 1GB. */ + bytes = arc4random_uniform(1024 * 1024 * 1024) + 1; + splice_conn_init(&sc); + + error = pthread_barrier_init(&barrier, NULL, 2); + ATF_REQUIRE(error == 0); + xfers[0] = (struct xfer_args){ + .barrier = &barrier, + .bytes = bytes, + .fd = sc.left[0] + }; + xfers[1] = (struct xfer_args){ + .barrier = &barrier, + .bytes = bytes, + .fd = sc.right[1] + }; + + error = pthread_create(&thread[0], NULL, xfer, &xfers[0]); + ATF_REQUIRE_MSG(error == 0, + "pthread_create failed: %s", strerror(errno)); + error = pthread_create(&thread[1], NULL, xfer, &xfers[1]); + ATF_REQUIRE_MSG(error == 0, + "pthread_create failed: %s", strerror(errno)); + + error = pthread_join(thread[0], NULL); + ATF_REQUIRE_MSG(error == 0, + "pthread_join failed: %s", strerror(errno)); + error = pthread_join(thread[1], NULL); + ATF_REQUIRE_MSG(error == 0, + "pthread_join failed: %s", strerror(errno)); + + error = pthread_barrier_destroy(&barrier); + ATF_REQUIRE(error == 0); + splice_conn_fini(&sc); +} + +/* + * Make sure it's possible to splice v4 and v6 sockets together. + */ +ATF_TC_WITHOUT_HEAD(splice_v4v6); +ATF_TC_BODY(splice_v4v6, tc) +{ + struct splice sp; + ssize_t n; + int sd4[2], sd6[2]; + int error; + uint8_t b; + + tcp4_socketpair(sd4); + tcp6_socketpair(sd6); + + splice_init(&sp, sd6[0], 0, NULL); *** 43 LINES SKIPPED *** From nobody Thu Oct 17 16:16: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 4XTtJ55sLsz5Z9LD; Thu, 17 Oct 2024 16:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtJ53qfZz42cD; Thu, 17 Oct 2024 16:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KvFJAdir/p8N+MJp5buLpXGqMrDneJifBYLCh4MuWp0=; b=wETZLBKNkbZy05KJotvFdYwa8dUGVcb7Ss6RIZGkfQKOSu3OQpgQz2rJsbOMAKuy2L2y4x n4NadDh9P0qEPraJpSIvYDH4UA4uONI+yB7IIYHkNUCMmejzoleL6fLGMypdyVrd1rIosd esh3nnWG/HGoNYrE5FGmnk00WQFjKdgqFMV3fJsP71VmVKR+JZd3hWCEiYi0PlAVgLoEd0 7c05YdymHSdkpWT24wana6+hKsoekuM5C2c6QeBxW2BGLtJ23w/JIQuYAMwUvGM2pW5kQq /LBgsbga6RRK4xC1Mq4O5OhmfjURkXcNk2qfDVnhjTWKE2jUljWEJt+xyZAieQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KvFJAdir/p8N+MJp5buLpXGqMrDneJifBYLCh4MuWp0=; b=mLd/rpFveRDwjRM0nEK1ppckcrbkUQuujSQZEv5F0c6skjon7WujjgbgueQd44bAct2hMs epXTYLwCzrnfiNtpRuV4g9kWgH5SD8UiREONqZ3cl4eLEcEVxgM4DIKSu/hq44uNqNN3+r 4I0jZ19oTQlV/28bgHvvLN11KAsEXd7nbUOOtCue2ptdaVy6WFHjCYb5S46DcbWy5xGdUw Wc4th+p5qFwDsZ5wa9s9zVhbmYgQmS4lIlfeop5/BfZyZTqLTwDgok+b43yMBiW5//LQz0 Lif8T18+OAunNhoPY/pq7QnxEdOuQDBdR9zVNzYSD16XhgIBeAb4Lp4pP6tVPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729181797; a=rsa-sha256; cv=none; b=kb77gRo8y8Yf/WNh1HQgUj+ZsPHe8fTObcsHhfX6CMv/L03h3v4k3FOyNP4EAs9Ad4+m7X pvDlwupGe4XPloih+CNW/COcqbhU4g/jujacIy65pRl5baqfQRmkAfNPWWt1o1nxS2xp1n lafDG4RhPUzOmvt4An/2LD08v2arlNVDF+pfgclYel1J3YaMlxTQQZF4GGhlputTJYtf68 UmmHhcEANtzQtlSIlvGX1ZgMc3hiQlEfUvHdTt2E8KBl6u/Us8ki99eF/1bK9ch77cTSSg Pf7bCyW2VsQP94QFTTA226kJVC7LuJ66NNXTMVdtBAEIuStQ4HNwqWQUo85ONw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtJ52gC5zwvW; Thu, 17 Oct 2024 16:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGGbTA099182; Thu, 17 Oct 2024 16:16:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGGbYH099179; Thu, 17 Oct 2024 16:16:37 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:16:37 GMT Message-Id: <202410171616.49HGGbYH099179@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: 51edbf66a816 - stable/14 - sockstat: Show the address of the spliced socket when -I is specified 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: 51edbf66a8166a3698c875db8fbf00c965fa9f60 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=51edbf66a8166a3698c875db8fbf00c965fa9f60 commit 51edbf66a8166a3698c875db8fbf00c965fa9f60 Author: Mark Johnston AuthorDate: 2024-09-10 16:51:18 +0000 Commit: Mark Johnston CommitDate: 2024-10-17 15:48:37 +0000 sockstat: Show the address of the spliced socket when -I is specified MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D46413 (cherry picked from commit 051a2132f41d8394a34b29ac3cfebf8601ede5b6) --- usr.bin/sockstat/sockstat.1 | 11 +++++++++-- usr.bin/sockstat/sockstat.c | 31 +++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1 index 2e1b06688afa..d7174b48f8d5 100644 --- a/usr.bin/sockstat/sockstat.1 +++ b/usr.bin/sockstat/sockstat.1 @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 6, 2022 +.Dd July 9, 2024 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd list open sockets .Sh SYNOPSIS .Nm -.Op Fl 46CciLlnqSsUuvw +.Op Fl 46CcIiLlnqSsUuvw .Op Fl j Ar jail .Op Fl p Ar ports .Op Fl P Ar protocols @@ -59,6 +59,13 @@ Display the congestion control module, if applicable. This is currently only implemented for TCP. .It Fl c Show connected sockets. +.It Fl I +Show the local address of the socket to which the current socket is spliced, if +any. +See the +.Xr setsockopt 2 +.Dv SO_SPLICE +option for more information. .It Fl i Display the .Dv inp_gencnt . diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index 56f107b5cdaf..0481e82efee0 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -83,6 +83,7 @@ static int opt_4; /* Show IPv4 sockets */ static int opt_6; /* Show IPv6 sockets */ static int opt_C; /* Show congestion control */ static int opt_c; /* Show connected sockets */ +static int opt_I; /* Show spliced socket addresses */ static int opt_i; /* Show inp_gencnt */ static int opt_j; /* Show specified jail */ static int opt_L; /* Don't show IPv4 or IPv6 loopback sockets */ @@ -133,6 +134,7 @@ struct sock { RB_ENTRY(sock) pcb_tree; kvaddr_t socket; kvaddr_t pcb; + kvaddr_t splice_socket; uint64_t inp_gencnt; int shown; int vflag; @@ -767,6 +769,7 @@ gather_inet(int proto) if ((faddr = calloc(1, sizeof *faddr)) == NULL) err(1, "malloc()"); sock->socket = so->xso_so; + sock->splice_socket = so->so_splice_so; sock->proto = proto; sock->inp_gencnt = xip->inp_gencnt; if (xip->inp_vflag & INP_IPV4) { @@ -1202,6 +1205,25 @@ displaysock(struct sock *s, int pos) default: abort(); } + if (opt_I) { + if (s->splice_socket != 0) { + struct sock *sp; + + sp = RB_FIND(socks_t, &socks, &(struct sock) + { .socket = s->splice_socket }); + if (sp != NULL) { + while (pos < offset) + pos += xprintf(" "); + pos += printaddr(&sp->laddr->address); + } else { + while (pos < offset) + pos += xprintf(" "); + pos += xprintf("??"); + offset += opt_w ? 46 : 22; + } + } + offset += opt_w ? 46 : 22; + } if (opt_i) { if (s->proto == IPPROTO_TCP || s->proto == IPPROTO_UDP) { @@ -1308,6 +1330,8 @@ display(void) "USER", "COMMAND", "PID", "FD", "PROTO", opt_w ? 45 : 21, "LOCAL ADDRESS", opt_w ? 45 : 21, "FOREIGN ADDRESS"); + if (opt_I) + printf(" %-*s", opt_w ? 45 : 21, "SPLICE ADDRESS"); if (opt_i) printf(" %-8s", "ID"); if (opt_U) @@ -1431,7 +1455,7 @@ static void usage(void) { fprintf(stderr, - "usage: sockstat [-46CciLlnqSsUuvw] [-j jid] [-p ports] [-P protocols]\n"); + "usage: sockstat [-46CcIiLlnqSsUuvw] [-j jid] [-p ports] [-P protocols]\n"); exit(1); } @@ -1446,7 +1470,7 @@ main(int argc, char *argv[]) int o, i; opt_j = -1; - while ((o = getopt(argc, argv, "46Ccij:Llnp:P:qSsUuvw")) != -1) + while ((o = getopt(argc, argv, "46CcIij:Llnp:P:qSsUuvw")) != -1) switch (o) { case '4': opt_4 = 1; @@ -1460,6 +1484,9 @@ main(int argc, char *argv[]) case 'c': opt_c = 1; break; + case 'I': + opt_I = 1; + break; case 'i': opt_i = 1; break; From nobody Thu Oct 17 16:16: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 4XTtJ64llPz5Z9WZ; Thu, 17 Oct 2024 16:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtJ648Yhz42wJ; Thu, 17 Oct 2024 16:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z5XjN9+YqOlaMdkeFpeQNyg5F8zpC2aF2AWhUPfLuYg=; b=eGoXr7IHXHyVLu1kWUZZyZCCEs6w0ZGfVJWsYndohbFavYXaJhML1IkII1wIyZWc9JjCto BXO7IzxjEw33SFGj/BUWIWZ7IQr1rU7GltAg/qQCrXHGUuDI4cTPt1eVulGemvvyhkpN9j dyKvwBpYGq8B0E3pvEJ3Y8JUnSSyNKErHtuOR5j6M6/JogbTejsx47uUVdHYMq7OxcKDDQ YK/vWDJ7JuqE8VOWplpfrxDTaTpqNFwGHyRrL/QL/xZxFIaM0vz9FFx82bDclygB5DM/QR EYZz7Va5AGbZxqGc0k0jbn4/szg2cdwKZkYJQlknual/OcTsEERupYnbUGGbNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z5XjN9+YqOlaMdkeFpeQNyg5F8zpC2aF2AWhUPfLuYg=; b=SAfGK3467Y3WLXsWG/PehVomdik55ntvkYD8GrfhoPkam38lm2hQ+je9ER62m4ObRUowUi V57pX+7yROIEbwZOXpMBEdkZK6ziMmOF8MhaSY6Jf0O+e/2+bi1tSGAY9YxAwHD16/CrHy FlrC5M9zqwTOfQdQiPxGkJ8OqFztrOo2jnvytEeICa0u5kEW1CUl0wQW3sB6fa4VZhTdZ7 RkmGQHh0KQX10m0tmm/OhMWyEMWuzYMozSIvWCl+eqpj4oUyObyOnQMyDzhv9MeLR/QKOW uUlOb+n9qGz+0AwHYg5stgb8aqIkHTf9sFeUjguYfPCBmU6jX5r9qXILjq1kPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729181798; a=rsa-sha256; cv=none; b=anDd8vr1J+tC+8ecNsBl6pVbX8h6sbKE92RerdULXpWRYdiEvWd1XV55kuoFGHMqeqQLQQ nBc45SMqHmFG9T2N1N8w56B+mCpNG8g4FLlRfuvB1++0zlNaddUA8GWhhdgR4BYEJvFWHl BrZMA3Q5Vs2OzdjT65DDNHLCSOTGWidJKCQpLJXU53z11BNYOqDZlKummaYLyepkGXuo4V VO9lTsCdY1vP0mtGUQQTGE1f29D7vDQkeZD6Dqgkx9J2mcnyrlxcm8d0VYP+ui1oxaIDu0 p3HXVuEVrxWrON5LIdBy6Id1nvVkaQgsuQPXPoo4NPUEpVDO+DxGaIHXAVfbLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtJ63kJTzwvX; Thu, 17 Oct 2024 16:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGGc1Z099221; Thu, 17 Oct 2024 16:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGGcM0099218; Thu, 17 Oct 2024 16:16:38 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:16:38 GMT Message-Id: <202410171616.49HGGcM0099218@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: 9a2d163115f5 - stable/14 - kdump: Print splice structures 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: 9a2d163115f509c4a046295a6ffc4f2cd7162a7d Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9a2d163115f509c4a046295a6ffc4f2cd7162a7d commit 9a2d163115f509c4a046295a6ffc4f2cd7162a7d Author: Mark Johnston AuthorDate: 2024-09-10 16:51:26 +0000 Commit: Mark Johnston CommitDate: 2024-10-17 15:48:37 +0000 kdump: Print splice structures MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Stormshield (cherry picked from commit b76961e3a21a820f15ebff9d115ff67feb910cec) --- lib/libsysdecode/ktrace.out | Bin 0 -> 23596 bytes usr.bin/kdump/kdump.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/libsysdecode/ktrace.out b/lib/libsysdecode/ktrace.out new file mode 100644 index 000000000000..29d35f0de3ce Binary files /dev/null and b/lib/libsysdecode/ktrace.out differ diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index abbe57b0b75e..bde4eb7657e0 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -117,6 +117,7 @@ void ktruser(int, void *); void ktrcaprights(cap_rights_t *); void ktritimerval(struct itimerval *it); void ktrsockaddr(struct sockaddr *); +void ktrsplice(struct splice *); void ktrstat(struct stat *); void ktrstruct(char *, size_t); void ktrcapfail(struct ktr_cap_fail *); @@ -1935,6 +1936,14 @@ ktrsockaddr(struct sockaddr *sa) printf(" }\n"); } +void +ktrsplice(struct splice *sp) +{ + printf("struct splice { fd=%d, max=%#jx, idle=%jd.%06jd }\n", + sp->sp_fd, (uintmax_t)sp->sp_max, (intmax_t)sp->sp_idle.tv_sec, + (intmax_t)sp->sp_idle.tv_usec); +} + void ktrstat(struct stat *statp) { @@ -2123,6 +2132,13 @@ ktrstruct(char *buf, size_t buflen) memcpy(set, data, datalen); ktrbitset(name, set, datalen); free(set); + } else if (strcmp(name, "splice") == 0) { + struct splice sp; + + if (datalen != sizeof(sp)) + goto invalid; + memcpy(&sp, data, datalen); + ktrsplice(&sp); } else { #ifdef SYSDECODE_HAVE_LINUX if (ktrstruct_linux(name, data, datalen) == false) From nobody Thu Oct 17 16:16: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 4XTtJ76nSQz5Z9xG; Thu, 17 Oct 2024 16:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtJ74qv6z42ym; Thu, 17 Oct 2024 16:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WWRZreaxwvIU4Cnf1pAeTDtT2Dd3YC4GZGXDnV1L7lw=; b=jE94VKXWxPMxFqEDCrJMs3aRMvKNYzJrp3tO4tah1ey8QBbQWdY9kcU7iqav74+TpcHJhP KI+HpqH2o3eR2NhJfflGtSi/Dk1zpJlG9ebTNeuFqExqObkbkqem4c8c5Vp6qP6Bux70qP qT+C0jaeK3O/wkmklLLrXHHMkXcmmzURJROk2adKOTYtc/ZUgEaXJPCJzo493yh2C+uSnd SRHx977p11stc9fXdk8x7U3vW+w6Dn3CzhNjIYLwhpm0xeZYCW1UzJE5GrNEyuJmjEL4Rd YnD2UfFbe160kCc6T1T16ieMe1LafKWlQvJdgQZ7VOXU1xbcV7i3s8gegsOHHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WWRZreaxwvIU4Cnf1pAeTDtT2Dd3YC4GZGXDnV1L7lw=; b=WzAtea41/VqvRvuKBlKARf/NU1LZmJYOvHktoU+Oa4qh7I5/qv8cIuQ7YjjrTfxiHN2yRS CCgKVL7x41Djvbo1gTfmgf2UmEaMRIaxyNqGKLXiYarmqWZcjkQwvuLhmkb98xPwE8c3dY h5JiQAZgJ1Eb/RdMrKyiWI+V3AO8hKdKTggQY0k2oUCk/Px8fzwakbj0AR6MaD1OHfFecO nwapE8s5KIIiVEhoWZuM6Uo7AnEyXqpvPERTihTa6oX6LBmJ8iDmMSfFbZ4S4ds8hTtgtr Oa+ITi7t1Ks4J8xu8ZSPRLdZcpjD5dzOHMaqHaC8ManSqsmPvuSiHZl2FIjCkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729181799; a=rsa-sha256; cv=none; b=idJALS9Ls0pEb4/WmHSQeSbz5O9LxX5Tpu+ydeHafjc1kXTAe2qgIyYToXHgKFZtf/pF8v 5xjZcpP+iahD6Ho4yo6tVODf+9LHFi1M3qP9iQ0xG5ghYjGBW58+GZhdzaiHa2o4AAoqg/ dR96o5MP88qSo7Jwq+kd4+qqy9bJoxaai77NjGAjJqdoemiUdHIfE3EgzHqyOjFvD/QaM3 GwQeMozQzosUeEx9KDEEElq0BGjD4/KLxdisdYvxmIn71PTf1jv7iGs8jgkdGPDI/RX4Fi RyZcS8/Q6s5txiz6a2W6DcZvDoeFOkInL7chmIJHbXczcj37zpjsSpfXOKPZRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtJ74RgkzwvY; Thu, 17 Oct 2024 16:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGGdMX099275; Thu, 17 Oct 2024 16:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGGdsP099272; Thu, 17 Oct 2024 16:16:39 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:16:39 GMT Message-Id: <202410171616.49HGGdsP099272@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: 418e9b60837b - stable/14 - Remove a ktrace.out which snuck into an earlier commit 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: 418e9b60837b96730f1c8c538545f5e791d7fc61 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=418e9b60837b96730f1c8c538545f5e791d7fc61 commit 418e9b60837b96730f1c8c538545f5e791d7fc61 Author: Mark Johnston AuthorDate: 2024-09-10 17:52:43 +0000 Commit: Mark Johnston CommitDate: 2024-10-17 15:48:37 +0000 Remove a ktrace.out which snuck into an earlier commit Fixes: b76961e3a21a ("kdump: Print splice structures") (cherry picked from commit a86678a3d6b4d394d2979c41c2686523aa831888) --- lib/libsysdecode/ktrace.out | Bin 23596 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/libsysdecode/ktrace.out b/lib/libsysdecode/ktrace.out deleted file mode 100644 index 29d35f0de3ce..000000000000 Binary files a/lib/libsysdecode/ktrace.out and /dev/null differ From nobody Thu Oct 17 16:16: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 4XTtJ92WCqz5ZB34; Thu, 17 Oct 2024 16:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtJ86WXLz431y; Thu, 17 Oct 2024 16:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nrdSMarihb7q2KmMEKevKoaaOfUxTQoNeoMJrTxoyO0=; b=JizNO5cIohamKzagvcID7lKENcOBsQgcvdTmn//7MCyEO+uhjL81VzeWB1fecUMRLnrZ7m 5ChBDxXNvfJ/9DjWnT3zgdP9IYzvBP4BnOTXA08OLTxq7l4dcAUczGbrYx5zbs1ofYxn2+ IVU+rrYBQ7Yf5d7jDlvK+j/8H8WBOipiQEOiK3uPxJMgwuSZqmEUqgdNrbynEEiPeozCQ8 svIyqeaIj4gpGCLeFlhYkuFKz1z9c4D5HaipYGscFwjL5bIuIaOBJNkiSFJ1nqxvDWAVWv w4EmprHl6TUG23w2zGTrxHo7fDg5Kb9Sah/N5J0iWwSR8QZ4pcgQsGSF+NWNrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nrdSMarihb7q2KmMEKevKoaaOfUxTQoNeoMJrTxoyO0=; b=gYM7khEiSkSAvmbYC4WsZdz/eqI6GXMAPvMWd9vUEkUHS03+5E8RAavcrjqXIg0btJel64 ZP9UDhpvl5RSC8C5x91DVTrhAWfCBWkYDX9NVPvREdxRBBvCmt7uXPsLqXlD9u9ZZ3d2Zv Lxa8x9tZUEZ1oTmPtIXZh2UeRi8VIUkizYwol9B08FH01PpCz2GE/WpJ1itMjAowiVnBee HK3iKL9UCvPNZjabweJbWn7+pX5LR+8eq31LxuG2rxLt2J3m0Okd9/jRkY5pLeJZsZtu3B n9d2oQjzrPBPvcE6rTABxDXEV5NSZFo+IObyAg66uiXp6m0TETa2YKESMnWfJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729181800; a=rsa-sha256; cv=none; b=N9qH7kF6owIRyI0GoNyVJquMqx/ouwZslc4ibb7ox6w13CPShkVlWn2+iEy1GhQthnWrHR xYWRTu+2Vgo6XJ+ZZTg5whQBb/Ez/07KFvJZx3Fyom02PUQuAfqaoUShCIxvxcv0R1o9H/ wqjEqQpGYbrZ1AsrllsXCOcuwiUitpkez7S9dmfV9gn1tJ4OoAgVW0onzsOWcR3VxgDmDL 8hvz8GXZHL0WTR5wGOGTlaY+BsOcDUz92lHRUAtbiAxUzZXrmRBRfyvvSZ2x3lrd5DcTY5 Whf8DUVL5Hfv0qaZQc+EKtdvC9EfoRXU++o2uJSK7EgW8aK3hSe/fOEr7OuLVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtJ85jl2zwxd; Thu, 17 Oct 2024 16:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGGee5099323; Thu, 17 Oct 2024 16:16:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGGej6099320; Thu, 17 Oct 2024 16:16:40 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:16:40 GMT Message-Id: <202410171616.49HGGej6099320@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: 032014aaae70 - stable/14 - socket: wrap ktrsplice call with KTRACE ifdef 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: 032014aaae70c7166b714eb911ccb5b86213f837 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=032014aaae70c7166b714eb911ccb5b86213f837 commit 032014aaae70c7166b714eb911ccb5b86213f837 Author: Siva Mahadevan AuthorDate: 2024-09-16 01:46:00 +0000 Commit: Mark Johnston CommitDate: 2024-10-17 15:49:11 +0000 socket: wrap ktrsplice call with KTRACE ifdef This fixes a build error when the kernel is built without KTRACE support. Reviewed by: emaste, markj Fixes: a1da7dc1cdad ("socket: Implement SO_SPLICE") Pull Request: https://github.com/freebsd/freebsd-src/pull/1426 (cherry picked from commit 75cd1e534c75fbdd3294debe6edea27e780bc5f1) --- sys/kern/uipc_socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index edd26f28a292..1f5e09ada217 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -3951,7 +3951,9 @@ sosetopt(struct socket *so, struct sockopt *sopt) } if (error) goto bad; +#ifdef KTRACE ktrsplice(&splice); +#endif error = splice_init(); if (error != 0) From nobody Thu Oct 17 16:16: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 4XTtJB24S6z5ZB37; Thu, 17 Oct 2024 16:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtJB04h8z430G; Thu, 17 Oct 2024 16:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KvopPzgPIEIja1n+fsMA5uL7BtFsB+zOlwK4FCUw1hY=; b=o4cfHQVGjwh1VcEzvJNzzO3MkFYhSGV6EVghmV7h1qpHStn3/486ClKM1CS4v+pOyUSG35 BpUfjvZaUzjgSqNcShliQ7jcl46rrrzcOhjfKsPXyC6V0lRrV/dZps04b0xGuWZTYG7myj 7IxnOoDb9lpiY/+ReGO2IAE3ef9BE2nYJUDE17BkzJW0SuUibzxljcv4yD0QvOKGgnzuKF Di2M1Gz1IYVVYrclKkad2LbS1haJtocgbfEWo6rwx3ckT36TdvzBgL16JpHomj64K/89j7 W204BbOLp8KZeAw5s1QDwC32H4JwFx0IF9xqd2Xx1nctl529b/K2X8bNQ02xIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KvopPzgPIEIja1n+fsMA5uL7BtFsB+zOlwK4FCUw1hY=; b=HtE1GhfdcKG5+2fcwaCSbdsFPCOGeepDC+49Q2aqJHTMOLILmcMtarA4W9rKdqon1jZGg0 f0a6elFLZcnPnBJ+dibMSqmcELM1u49c8CCdivzHNDU6mQf7baLwo7Ty1m+d8GMahVRSol PukMrNFwj30sjtkISVXBkzpyQ5WfIVYoVTDwBcXw1+jYt34Kwsb7SC8ULPSQgR59F10pqL XxkA9l+CKBejQxXfAb1vOcBN84p+tX8IIKPGmY1sCkw5AJpFycjncXZHzOallsRaUeopXb KKyEnNBk/u/pLGgRQHi1vveZqBLB8+Qh44K8DGg6F106Wk2FIznc4+2PMQvZ0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729181802; a=rsa-sha256; cv=none; b=EDZNw1SmZwSPHd4hczYk4awPWaMbhWz+oDWkYOIko+8WDQhdpI1YhjJfju/7Gx+33+CVzD LjVsYqws5swcT2ygeSURyOoEazbrDYBTKfCHiF3KWi6/wjZVhJtr4qiVyO75xY7CFGu1Gy BIUZAwX17MWXgqTKaBffPs1RYrbNSjD8sjU2EqLuGRzz0D5h++uprrdvJWM7272FeNbJvu teknUK5EsSBkIAT5VzHIxTmaUti0h92LqnMvnap3CxMZMFhJsu/yTtlHscechUPOhWOqpT Dk15MfJp49O8lXji3bVUToPgKPLBRpdnp+nBuu1a5tXxvYGn7EucjvSUMBQabw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtJ96kjKzw6H; Thu, 17 Oct 2024 16:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGGfKa099384; Thu, 17 Oct 2024 16:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGGfpa099381; Thu, 17 Oct 2024 16:16:41 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:16:41 GMT Message-Id: <202410171616.49HGGfpa099381@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: 4601b3e04d5e - stable/14 - socket: Only log splice structs to ktrace if KTR_STRUCT is configured 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: 4601b3e04d5e30fa6c4432feeb2cb09a597cf763 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4601b3e04d5e30fa6c4432feeb2cb09a597cf763 commit 4601b3e04d5e30fa6c4432feeb2cb09a597cf763 Author: Mark Johnston AuthorDate: 2024-09-20 11:40:31 +0000 Commit: Mark Johnston CommitDate: 2024-10-17 15:49:12 +0000 socket: Only log splice structs to ktrace if KTR_STRUCT is configured Fixes: a1da7dc1cdad ("socket: Implement SO_SPLICE") (cherry picked from commit 283bf3b4b105ad24e919444ab0e21f3296891283) --- sys/kern/uipc_socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 1f5e09ada217..a038939399e3 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -3952,7 +3952,8 @@ sosetopt(struct socket *so, struct sockopt *sopt) if (error) goto bad; #ifdef KTRACE - ktrsplice(&splice); + if (KTRPOINT(curthread, KTR_STRUCT)) + ktrsplice(&splice); #endif error = splice_init(); From nobody Thu Oct 17 16:29: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 4XTtbH5bLHz5ZBGx; Thu, 17 Oct 2024 16:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtbH58dRz44kL; Thu, 17 Oct 2024 16:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729182587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hstkhZYBINmJL/Q50HYn9Gfp68Y26VD6QRyBvqBL2p0=; b=A+1FjlZoD9JKc2I2RSMv2tqu/hqpT5SZyTy5nnCnoJMqHFZLUFJ9YBBpLSKyIPg27tPBHD hu7EEmDth0+WGHZwD8926GHGx7UbHjiKeh1iWbCfxFDbEvGC6bxPQ/IOtZhctH9kgb5c3+ chbWz1Tas4RbkFaqSTq/keobiojeHMNLGlQt0JS9AWX8LX/Q6rC12uzHfJizlL0D8x2zNr Fj48tFT56+6tYCgT9viw6VoL4dUHGswhvWp2qM02WavVvNPnB1jEk0lWY22E6z6Gxh2gpk 9E0HNVLpVJQ3jDcxSb0rw8xQa6Ob19YvLbtYRR4RYXwX8qU8ewLAM7XEKuexDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729182587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hstkhZYBINmJL/Q50HYn9Gfp68Y26VD6QRyBvqBL2p0=; b=Z5zjts9KKeq7JEEj0Z3ah5rg8bbdT2wa6mtb5HSJyarkksN+p3MrXBY12XQsVdQxktcLLB /PF8EjcnnWiqp5woYNNNML8eSww9kGMQSttCiAcQ+wS4bLhkEhU32mHvoGmS4Uo5gzMhAn ua4sHsF/+4nQsIESqkZH6BBVpBcXxQdzLKHmx6bg4w7FUfoPZp4rCRu6FbBxaGPO3+wnN6 Sx+QWu4hNldqtH+ki6a93g3C7t26F2JPLQuB8WBsmsEVpiunZGphTM4DJCrsCOMh0T35dM eQ/Abfm41eimJFubfJIs2JC0mV8ZC4b19ktFwks0tpeY5RISnom5vV6150wu0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729182587; a=rsa-sha256; cv=none; b=TBRTYlSykG3ewgjyOdUA7I6/UDcV4NUqyNEfeO0szJ4Y4x2Kk2iOQnm7g+kqVDiNC9LulT hBOptw/RxbNEk4SCoCEv/SCsDuxKUx8JYXMRaUqkl+c0t608AxbiKPgMlNz7GBELIqRAzu 9x4Bb51judvxmCVGFr8zNZOSkPE8RRtZnsGWOGHTHGWj4tC3W0Q6HyfNAlzCneCyLnLkEs lKvvQgAH/5wLOantTKoqeGBi1+veXInefnsSB9mOUOaCKxfUHJF+5rW5tzajtltlcK4t0t IRbIWQno3Vu5nbyl7ZkcY+xuaXgTzvE5QHP9FnTNY3Ck0CqZoyCnwg3aOo9NaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtbH4f5PzxLg; Thu, 17 Oct 2024 16:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGTl5H017301; Thu, 17 Oct 2024 16:29:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGTl09017298; Thu, 17 Oct 2024 16:29:47 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:29:47 GMT Message-Id: <202410171629.49HGTl09017298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ae3d7e27abc9 - stable/14 - sctp: propagate cap rights on sctp_peeloff 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/stable/14 X-Git-Reftype: branch X-Git-Commit: ae3d7e27abc98d7325d506a55af6a3ea2e028738 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ae3d7e27abc98d7325d506a55af6a3ea2e028738 commit ae3d7e27abc98d7325d506a55af6a3ea2e028738 Author: Ed Maste AuthorDate: 2024-10-03 11:54:44 +0000 Commit: Ed Maste CommitDate: 2024-10-17 16:29:21 +0000 sctp: propagate cap rights on sctp_peeloff PR: 201052 Reviewed by: oshogbo, tuexen Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46884 (cherry picked from commit 91a9e4e01dab7a740b8e3b7c39c59a537e71e5d2) --- sys/netinet/sctp_syscalls.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/netinet/sctp_syscalls.c b/sys/netinet/sctp_syscalls.c index d67e260b6f99..9d85576e2592 100644 --- a/sys/netinet/sctp_syscalls.c +++ b/sys/netinet/sctp_syscalls.c @@ -141,13 +141,14 @@ sys_sctp_peeloff(struct thread *td, struct sctp_peeloff_args *uap) { struct file *headfp, *nfp = NULL; struct socket *head, *so; + struct filecaps fcaps; cap_rights_t rights; u_int fflag; int error, fd; AUDIT_ARG_FD(uap->sd); - error = getsock(td, uap->sd, cap_rights_init_one(&rights, CAP_PEELOFF), - &headfp); + error = getsock_cap(td, uap->sd, + cap_rights_init_one(&rights, CAP_PEELOFF), &headfp, &fcaps); if (error != 0) goto done2; fflag = atomic_load_int(&headfp->f_flag); @@ -165,7 +166,7 @@ sys_sctp_peeloff(struct thread *td, struct sctp_peeloff_args *uap) * but that is ok. */ - error = falloc(td, &nfp, &fd, 0); + error = falloc_caps(td, &nfp, &fd, 0, &fcaps); if (error != 0) goto done; td->td_retval[0] = fd; From nobody Thu Oct 17 16:29: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 4XTtbK062jz5ZBn9; Thu, 17 Oct 2024 16:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtbJ5LPrz44q0; Thu, 17 Oct 2024 16:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729182588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QeiWI0puMsQYvhQ03RlTjMIsegZtJ7gtklzofRJuogg=; b=GQEVfZG6NEzJZOBKBl9I3wDUzaI8nGPMi2ksCznq+8AQU/YStPn7fqRa0FUx33YX1+wszJ TmWlOBRWf0C5hcZZRVMdz203vgAgfpMaqSAiMd88tfH7gt0Ztzkp0DNAuIrOpGhB2RqaQz 6N0fkDoTFEBf3Eqk5Gb4uQbpArTMQQOrsYpfpXfoodWJXekP0zwymgAQZF2lO1Mp2XTQc4 UWqAVjFiEgPR8nfPsfDtfeW+LzxGhhZ9r6UlG5HMUoYL/fBRsG/Y9dNPdnHxDDglwjtyqJ v2iiBuy2SZt9sW10Bkynrj5RA7HJxgLIiXGEY1CzF+5nWdDoJJovBGf6sIO62A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729182588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QeiWI0puMsQYvhQ03RlTjMIsegZtJ7gtklzofRJuogg=; b=oPgHIfMGIp71ZuUzF1hAnrwke2hFByh6TihsUoZ3CWetKwC4hZqNqvydmOabYlSPzLsh2R dU44tpJwSdcUUx7HexVhOGYQyOogOqDG0xI/94zUCZCCMZyKxU77jdcJQyWbw8ndlGfaHM ENB3rxxBoQm4fy6cLGNcrMw6PwOX78JQL0M/EazH+zHuTIQkqOXSdklBGw424lsi1agYiN nFXwW1KNasMXnBuI70dxQK3ZU8rOwTDNeHJaUl96PRDSj3kA69flq+O0EmhOvhqoTR/96A HRdJzAnEVKWLdeEQeZds2qnpmEY4l6W7erDJ2i6+aXNpJoH1UDsxqhJ3fTRMGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729182588; a=rsa-sha256; cv=none; b=QccAmaxLZSYx8fxruVG9PNj0rhuoAUeHj3voPtvwqZz1J1K5DkjBIVZh10BWcreGVBMoVR BWdM9xLf995PCpSRK+kvDt9Xo96omA8GifnIgIzf1DVsWcYflb/4G3xzrf9r0PkfQ4kL7H pQkcE7/6vsIOHkB8RrF4WzWC8HGKg6JTAzBDvddtEnWIoMjkZoWb8I1zwm2o7ilfCkdLcT uRB37ZY3xXIHlqlKcShRStqdKDhzRg/faZnzof4gbQTOlxHg2ZH3X4wO62mVFgftExncwQ 8hyhJGb2A0M9gzHgPS2e8UFSsCEznTZ8K6Gngg571H4pw9OZ2FCmdvWscK/KHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtbJ4xkYzxRL; Thu, 17 Oct 2024 16:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGTm3w017346; Thu, 17 Oct 2024 16:29:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGTmnT017343; Thu, 17 Oct 2024 16:29:48 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:29:48 GMT Message-Id: <202410171629.49HGTmnT017343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 202bbdcb1a2b - stable/14 - capsicum-test: rights are propagated on sctp_peeloff(2) 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 202bbdcb1a2b67ddfad967db38969af5caa668d7 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=202bbdcb1a2b67ddfad967db38969af5caa668d7 commit 202bbdcb1a2b67ddfad967db38969af5caa668d7 Author: Ed Maste AuthorDate: 2024-10-07 18:28:20 +0000 Commit: Ed Maste CommitDate: 2024-10-17 16:29:21 +0000 capsicum-test: rights are propagated on sctp_peeloff(2) As of commit 91a9e4e01dab ("capsicum: propagate rights on sctp_peeloff") a capability is generated from sctp_peeloff(cap_fd,...). Enable the corresponding test code. PR: 201052 Reviewed by: oshogbo, tuexen Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47000 (cherry picked from commit 38518fda66cda6c57af0aa655d19c1897c0ab15d) --- contrib/capsicum-test/capsicum-freebsd.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/contrib/capsicum-test/capsicum-freebsd.h b/contrib/capsicum-test/capsicum-freebsd.h index da7bb38f073b..13fa24a0f722 100644 --- a/contrib/capsicum-test/capsicum-freebsd.h +++ b/contrib/capsicum-test/capsicum-freebsd.h @@ -62,10 +62,9 @@ typedef unsigned long cap_ioctl_t; // As of commit 85b0f9de11c3 ("capsicum: propagate rights on accept(2)") // FreeBSD generates a capability from accept(cap_fd,...). #define CAP_FROM_ACCEPT -// TODO(FreeBSD): uncomment if/when FreeBSD propagates rights on sctp_peeloff. -// FreeBSD does not generate a capability from sctp_peeloff(cap_fd,...). -// https://bugs.freebsd.org/201052 -// #define CAP_FROM_PEELOFF +// As of commit 91a9e4e01dab ("capsicum: propagate rights on sctp_peeloff") +// FreeBSD generates a capability from sctp_peeloff(cap_fd,...). +#define CAP_FROM_PEELOFF #endif /* __FreeBSD__ */ From nobody Thu Oct 17 16:33: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 4XTtg82jMpz5ZBM4; Thu, 17 Oct 2024 16:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtg81sJ3z45xN; Thu, 17 Oct 2024 16:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729182788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0/xaAbsCm7ymaRN3XO4rbLJWIzFcvNcUEdvzlyQB8wk=; b=jwTx4QxhQoe841kHIRoUwDB4lOf1kv6esq2Hrkg8/9hbeRyNfX5lEBuE8JPuzB96g5bvix rR53WQf35H2OUG0fnDmwr41gWg+F8kpfnfVcvJHTsvwyHzlaGMrfeOV+ejXfmtUYQYJ2G7 NvjZ7R7Q/cfEM+rtjErry+G4D1ZvRu2+RAE/IvmO/JJeJ5HRA745jJyHyyQ66L1t/GR13J dmnZB6EZlm76mczaZlpcBXPrRAcPEkqCUHbA3ARhVYfO2cFjiUNF01jfYSpR73+BqeMT2y Fw/i+p3+w1d5smmMfcF1e4+LWdX4dB3kAglvuLKXPsNTzWq2gImrodrIvkHv+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729182788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0/xaAbsCm7ymaRN3XO4rbLJWIzFcvNcUEdvzlyQB8wk=; b=AUrZ4UgOMJuyxCSrGa+jv24XwXHsCasw1e3tPrUghrTsgNvKQOE1EieIZOaB/qu+o/9Q8q f+fcBgchDv05htCR+ThVtdmIwTd3lmhHGAvvSRpx5m5keQo5VvlxVCrxNOvSBJSmccFoRk jEIh29czfQekpwAutDH5R/RhprdZ7XbDjwmfPGitV/3wBH3H/G/r4iO+G4cbm1bYTa8BKs Nw2Ap+mfY64lXrjvNt0DA2Ha0Es/6ktpWl+yThEE6fjvpPcs4Cv7YpNVADODrOOM0ltuKm rP+9d+Ad2dNWabsM8liCTv9pFdOvgD/RXqnEyg9r1QZ+WOqFoJNaruDGDxB5Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729182788; a=rsa-sha256; cv=none; b=qwT9DTmq6uIHJzJGmf3JRPK9T6upBIAMKwFGnXNNbNmp47EJJPEVVbCNP4jz290cNbAJrv mrnrJ2FBCffFM2fxW2x0nSRX0hSfZB9wuazcLzxEt5ZooFbhwuZXAob7PJJED2zLY5CazC XvpP7YXNqXSM2b0qwwbFc1eNjVzqn7GbRf5+wDHDf51wRp50U59Y6AUHI4YS5iO53OpIRi deysjUkqfqqbGvSXUt8eTggC8mw8vK++AWAJhM3m7X4koxOoCgvN1QU2RNztbDT2o4K4fI D20ES6H24MxOpQfVMZOFMBb86jXKG6tENXoVqTXHrcUs1qSfx6bF5vyKB435Hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtg81RPxzxLD; Thu, 17 Oct 2024 16:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGX8mv033007; Thu, 17 Oct 2024 16:33:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGX8Cx033004; Thu, 17 Oct 2024 16:33:08 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:33:08 GMT Message-Id: <202410171633.49HGX8Cx033004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 14c22e28e4ee - stable/14 - Add smbus and i2c device IDs for Meteor Lake 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 14c22e28e4ee62f4d3f2d6004881d874fafa7d11 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=14c22e28e4ee62f4d3f2d6004881d874fafa7d11 commit 14c22e28e4ee62f4d3f2d6004881d874fafa7d11 Author: SHENG-YI HONG AuthorDate: 2024-08-13 12:22:43 +0000 Commit: Ed Maste CommitDate: 2024-10-17 16:32:38 +0000 Add smbus and i2c device IDs for Meteor Lake Reviewed by: emaste, Daniel Schaefer MFC after: 3 days Sponsored by: Framework Computer Inc Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46249 (cherry picked from commit d3b05d0ea10abe059dc63c6fb6ef3f061b758af2) --- sys/dev/ichiic/ig4_pci.c | 8 ++++++++ sys/dev/ichsmb/ichsmb_pci.c | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/sys/dev/ichiic/ig4_pci.c b/sys/dev/ichiic/ig4_pci.c index 9f12e713cdeb..138de77c35db 100644 --- a/sys/dev/ichiic/ig4_pci.c +++ b/sys/dev/ichiic/ig4_pci.c @@ -168,6 +168,10 @@ static int ig4iic_pci_detach(device_t dev); #define PCI_CHIP_ALDERLAKE_M_I2C_3 0x54eb8086 #define PCI_CHIP_ALDERLAKE_M_I2C_4 0x54c58086 #define PCI_CHIP_ALDERLAKE_M_I2C_5 0x54c68086 +#define PCI_CHIP_METEORLAKE_M_I2C_0 0x7e788086 +#define PCI_CHIP_METEORLAKE_M_I2C_1 0x7e798086 +#define PCI_CHIP_METEORLAKE_M_I2C_2 0x7e508086 +#define PCI_CHIP_METEORLAKE_M_I2C_3 0x7e518086 struct ig4iic_pci_device { uint32_t devid; @@ -280,6 +284,10 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = { { PCI_CHIP_ALDERLAKE_M_I2C_3, "Intel Alder Lake-M I2C Controller-3", IG4_TIGERLAKE}, { PCI_CHIP_ALDERLAKE_M_I2C_4, "Intel Alder Lake-M I2C Controller-4", IG4_TIGERLAKE}, { PCI_CHIP_ALDERLAKE_M_I2C_5, "Intel Alder Lake-M I2C Controller-5", IG4_TIGERLAKE}, + { PCI_CHIP_METEORLAKE_M_I2C_0, "Intel Meteor Lake-M I2C Controller-0", IG4_TIGERLAKE}, + { PCI_CHIP_METEORLAKE_M_I2C_1, "Intel Meteor Lake-M I2C Controller-1", IG4_TIGERLAKE}, + { PCI_CHIP_METEORLAKE_M_I2C_2, "Intel Meteor Lake-M I2C Controller-2", IG4_TIGERLAKE}, + { PCI_CHIP_METEORLAKE_M_I2C_3, "Intel Meteor Lake-M I2C Controller-3", IG4_TIGERLAKE}, }; static int diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c index 57f9afb66f01..6c40132d715d 100644 --- a/sys/dev/ichsmb/ichsmb_pci.c +++ b/sys/dev/ichsmb/ichsmb_pci.c @@ -111,6 +111,9 @@ #define ID_ALDERLAKE 0x7aa3 #define ID_ALDERLAKE2 0x51a3 #define ID_ALDERLAKE3 0x54a3 +#define ID_METEORLAKE 0x7e22 +#define ID_METEORLAKE2 0x7f23 +#define ID_METEORLAKE3 0xae22 static const struct pci_device_table ichsmb_devices[] = { { PCI_DEV(PCI_VENDOR_INTEL, ID_82801AA), @@ -209,6 +212,12 @@ static const struct pci_device_table ichsmb_devices[] = { PCI_DESCR("Intel Alder Lake SMBus controller") }, { PCI_DEV(PCI_VENDOR_INTEL, ID_ALDERLAKE3), PCI_DESCR("Intel Alder Lake SMBus controller") }, + { PCI_DEV(PCI_VENDOR_INTEL, ID_METEORLAKE), + PCI_DESCR("Intel Meteor Lake SMBus controller") }, + { PCI_DEV(PCI_VENDOR_INTEL, ID_METEORLAKE2), + PCI_DESCR("Intel Meteor Lake SMBus controller") }, + { PCI_DEV(PCI_VENDOR_INTEL, ID_METEORLAKE3), + PCI_DESCR("Intel Meteor Lake SMBus controller") }, }; /* Internal functions */ From nobody Thu Oct 17 17:28: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 4XTvvg4Hw2z5ZGH6; Thu, 17 Oct 2024 17:29:03 +0000 (UTC) (envelope-from wschnr@googlemail.com) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTvvf5Zj4z4DfR; Thu, 17 Oct 2024 17:29:02 +0000 (UTC) (envelope-from wschnr@googlemail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of wschnr@googlemail.com designates 209.85.218.44 as permitted sender) smtp.mailfrom=wschnr@googlemail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a9a1b71d7ffso177302866b.1; Thu, 17 Oct 2024 10:29:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729186140; x=1729790940; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QLMMp++J49n7QlKAgFSRdAE5m/c+bgM7I4VQdDc065U=; b=UgOW8IJIMD7apM4jddOUwa5posKUPUSheIYo9EDsu0IXMIJDGYhKr0MP/M+8YzRuiq xljCvA7x/hw8/bKIA/tVavtIoKES2G9GC0yfoy4uQMCVJRRhPs5HY2rGfSBrwGSSA0bG Ru29LKJ6GG5fkPF278kqQp+0A7H3wX4JI0Vjfgy3wAmnoXfbRzdVpTf8nt80NmfTPr+d hIrkf/SyPV8mjt7KY/95zktUAOuwkaY2BxQHZZUsHdK8TKEcFGS618hReuDeQs1S5iNo 1XCob4f6MskBUPpAXh71W0WQaY6NwqQDPij+lwzQwsI1sG4227nqL/aa7Hwf6S+bjJyh +wFA== X-Forwarded-Encrypted: i=1; AJvYcCWq0BuTJNf3c1Sij0hFpci6drST0ykFDjHOngSx37o4X8mcR1f7V+l/sl+CksQPg4SRghxrCMQgF/uzFCaBt2ahrYsLby8=@freebsd.org, AJvYcCXDP+cAjy4nafdFxQ3zdcHMQq396xFxYhqwkYaQ5oF7a6f+3WiFzMbhPfnplAT3HZIpd86jGVrROPM61wahqrkSYRZR@freebsd.org X-Gm-Message-State: AOJu0YybkglD6bCjWx6ssBjgP0F0LdTPXBYIY+1rIyGw7mpbDrgbt/u2 TBptQNFHIarDEd7xMlVI3X/aeiSXg4SNyYgDTiYQfpwlLmcoeVr60TJakVAiEfy8G1EjpiiZooI errTVYTe0pRZgDGsKKeaTn6gJeGVsDlMzaX8= X-Google-Smtp-Source: AGHT+IHJzsRpQzhCoNepWyV473b2WngnjRnX7eppFsUIjEh2sDHD3yJxMHOFZ4tKY/gjInjSZdBHt4hMBPpPSdhtv5k= X-Received: by 2002:a17:906:c10a:b0:a9a:3dc0:8911 with SMTP id a640c23a62f3a-a9a3dc089f9mr539708866b.16.1729186139878; Thu, 17 Oct 2024 10:28:59 -0700 (PDT) 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 References: <202410122058.49CKwkrP038188@gitrepo.freebsd.org> In-Reply-To: <202410122058.49CKwkrP038188@gitrepo.freebsd.org> From: Wolfram Schneider Date: Thu, 17 Oct 2024 19:28:47 +0200 Message-ID: Subject: Re: git: 1a37caeb076b - main - modules: Add missing opt_*.h files for stand-alone compile To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-1.88 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.96)[-0.958]; FORGED_SENDER(0.30)[wosch@freebsd.org,wschnr@googlemail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; NEURAL_HAM_SHORT(-0.02)[-0.021]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[wosch@freebsd.org,wschnr@googlemail.com]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.218.44:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4XTvvf5Zj4z4DfR X-Spamd-Bar: - On Sat, 12 Oct 2024 at 22:58, Warner Losh wrote: > > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1a37caeb076b9d31e13c54691d7f1eeb589798bb > > commit 1a37caeb076b9d31e13c54691d7f1eeb589798bb > Author: Warner Losh > AuthorDate: 2024-10-12 20:40:41 +0000 > Commit: Warner Losh > CommitDate: 2024-10-12 20:40:41 +0000 > > modules: Add missing opt_*.h files for stand-alone compile > > Standalone compile that we at least create these opt_*.h files. > > Sponsored by: Netflix > --- > sys/modules/linux/Makefile | 2 ++ > sys/modules/linux64/Makefile | 5 ++++- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile > index eb4e17ec706b..36dfbbe2192f 100644 > --- a/sys/modules/linux/Makefile > +++ b/sys/modules/linux/Makefile > @@ -33,6 +33,7 @@ SRCS= linux${SFX}_dummy_machdep.c \ > linux_uid16.c \ > linux_vdso.c \ > linux_xattr.c \ > + opt_compat.h \ > opt_inet.h \ > opt_inet6.h \ > opt_ktrace.h \ > @@ -41,6 +42,7 @@ SRCS= linux${SFX}_dummy_machdep.c \ > bus_if.h \ > device_if.h \ > vnode_if.h > + > .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" > SRCS+= linux_dummy_x86.c > VDSODEPS=linux_vdso_gettc_x86.inc > diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile > index b23891a65a4f..119d90126ab3 100644 > --- a/sys/modules/linux64/Makefile > +++ b/sys/modules/linux64/Makefile > @@ -28,14 +28,17 @@ SRCS= linux_dummy_machdep.c \ > linux_vdso.c \ > linux_timer.c \ > linux_xattr.c \ > - opt_ktrace.h \ > + opt_compat.h \ > opt_inet6.h \ > + opt_ktrace.h \ > opt_posix.h \ > + opt_usb.h \ > bus_if.h \ > device_if.h \ > vnode_if.h \ > linux_support.S \ > linux_vdso_inc.S > + > .if ${MACHINE_CPUARCH} == "amd64" > SRCS+= linux_dummy_x86.c > .endif After this commit I get stale symlinks in /usr/obj make -j$(nproc) buildworld > log.buildworld 2>&1; make -j$(nproc) buildkernel >& log.buildkernel; ./tools/build/stale-symlink-buildworld.sh amd64: stale symlink detected: lrwxrwxr-x 1 wosch wheel 95 Oct 17 17:00 /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sys/GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux/opt_compat.h -> /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sys/GENERIC/opt_compat.h stale symlink detected: lrwxrwxr-x 1 wosch wheel 95 Oct 17 17:00 /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sys/GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux64/opt_compat.h -> /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sys/GENERIC/opt_compat.h arm64: stale symlink detected: lrwxr-xr-x 1 root wheel 73 Oct 17 17:18 /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/modules/home/projects/freebsd-src/sys/modules/linux64/opt_compat.h -> /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/opt_compat.h see also PR: 276235 -Wolfram -- Wolfram Schneider https://wolfram.schneider.org From nobody Thu Oct 17 17:38: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 4XTw6q3Ly5z5ZGJ2; Thu, 17 Oct 2024 17:38:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTw6q2qz1z4FC2; Thu, 17 Oct 2024 17:38:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729186723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4DWjONk8OAMwnj/SUz5FV1kJ40gkqSkUx2i81tM+/E=; b=ul77mfumk3wRiQoYlc3LN7a5Xm0Ljqma4KHMdY9wvBv00Kn5x8/+ABqS179hVqWsUfW0Z1 JOdj8/Z6jKfqn3cBOI17lKD8dfs5688UJRGIat5+GmHSWEZ/I+vT7Z1MStIYBegMROAVty szs4YCfr8YyoRoUDvgjNJfrZ4UCaCdE7S6iXjw8D0q8HvAFCa/etYNP4kwTz1y+mDgliA2 d588u0GVDY+U7/G9/oV8dWsBriFslJm7v41qDekpyhcrKLwkzoxovWpt7Imf/FWHOVqj5c FDd2ojviP+ge7AZpU0duZ6zOjzAMhyUfV/EmjBQuWQ54bzF5p8l0sH8dGiguBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729186723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4DWjONk8OAMwnj/SUz5FV1kJ40gkqSkUx2i81tM+/E=; b=IRHdyf5Ex0UCRFNqH28Fcx3R+fGIs93Lrr0hGef82fcpfJ924rjCTgkqjIDHxrY8C2Qf6S 5mBJFpdJSwCHPaAWwgcrailEltgHbdLXO6rHT6DTK+24XUgfzpOdHwANpV+h2FsqJJ3aMS QJOTlnHcaDELOAPDnkdNw9PXHMgk3spetyCL60BZich8zRTSCPHGdUkLv/eW3VXHNXK/YC im9XM1iSn/uctvKd1MDY8Qf11Yl0o4rtqv71UfOinGkACsbjzy46IWP/A9cHZIARDZpQo9 ynOj4P+n2EaXU7OTdYuSS4LfsbhnAStaBIVcQGplHvsFR+La2gFnnLLnB+1yIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729186723; a=rsa-sha256; cv=none; b=sSlXGXj9QQAXtW8DvXfg+LgM7jYTpMIpjiDyVBHNH7zEHyIqKTNp3MwG2Sq/bP+7/zu7H9 XsMnoWqr4Nx8xX4pmcS6NrWmmUiBFB37B7g7K/qshF6DgEo3znQF2mtK7QQHV+OUEp0t+E PcZbPBMURS7rKqpDT/D+kjQOWod50BEZT5ZORCPXD3tV5gRfx2Hzrp9Sc90Uc72Bufv69Z /m2nHzqID7TG6mj3vpAMMzGUT0SeXejLWrcgHp+mBtds38BoJXbqPUvFVpEkOweyi1bKAV welG+ZTT4+R/tIWLXheUGZS6R9l99TprrjeoSCUgUW+RDnlcg4n9Gr/FAyfPyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTw6q2QrbzycW; Thu, 17 Oct 2024 17:38:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HHchQ2035353; Thu, 17 Oct 2024 17:38:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HHchuS035350; Thu, 17 Oct 2024 17:38:43 GMT (envelope-from git) Date: Thu, 17 Oct 2024 17:38:43 GMT Message-Id: <202410171738.49HHchuS035350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: b4c8f251d65f - main - iwlwifi: FreeBSD specific sysctl export update List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4c8f251d65fa99601da000e586933a6df662839 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b4c8f251d65fa99601da000e586933a6df662839 commit b4c8f251d65fa99601da000e586933a6df662839 Author: Bjoern A. Zeeb AuthorDate: 2024-05-16 21:48:41 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-17 17:26:24 +0000 iwlwifi: FreeBSD specific sysctl export update Update the sysctl export (also adding a mapping function) to also print (1) for all lines the "flavor" (device_family) name and (2) also print lines where we only have the trans cfg and not iwl cfg as with the flavor we can match PCI IDs to firmware package and so we can have an increased number of matches. A side effect is that we can also have fwget(8) PCI ID matches for firmware (flavors) not yet (publicly) existing. That will allow us to add them at a later point while a previous release already supports the chipsets and knows how to get the firmware for them. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/contrib/dev/iwlwifi/iwl-config.h | 36 ++++++++++++++++++++++++++++++++++++ sys/contrib/dev/iwlwifi/pcie/drv.c | 22 ++++++++++++++++------ 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/sys/contrib/dev/iwlwifi/iwl-config.h b/sys/contrib/dev/iwlwifi/iwl-config.h index 241a9e3f2a1a..4ea322595925 100644 --- a/sys/contrib/dev/iwlwifi/iwl-config.h +++ b/sys/contrib/dev/iwlwifi/iwl-config.h @@ -38,6 +38,42 @@ enum iwl_device_family { IWL_DEVICE_FAMILY_SC, }; +#if defined(__FreeBSD__) +static const char *iwl_device_family_str[] = { + [IWL_DEVICE_FAMILY_UNDEFINED] = "undefined", + [IWL_DEVICE_FAMILY_1000] = "1000", + [IWL_DEVICE_FAMILY_100] = "100", + [IWL_DEVICE_FAMILY_2000] = "2000", + [IWL_DEVICE_FAMILY_2030] = "2030", + [IWL_DEVICE_FAMILY_105] = "105", + [IWL_DEVICE_FAMILY_135] = "135", + [IWL_DEVICE_FAMILY_5000] = "5000", + [IWL_DEVICE_FAMILY_5150] = "5150", + [IWL_DEVICE_FAMILY_6000] = "6000", + [IWL_DEVICE_FAMILY_6000i] = "6000i", + [IWL_DEVICE_FAMILY_6005] = "6005", + [IWL_DEVICE_FAMILY_6030] = "6030", + [IWL_DEVICE_FAMILY_6050] = "6050", + [IWL_DEVICE_FAMILY_6150] = "6150", + [IWL_DEVICE_FAMILY_7000] = "7000", + [IWL_DEVICE_FAMILY_8000] = "8000", + [IWL_DEVICE_FAMILY_9000] = "9000", + [IWL_DEVICE_FAMILY_22000] = "22000", + [IWL_DEVICE_FAMILY_AX210] = "AX210", + [IWL_DEVICE_FAMILY_BZ] = "BZ", + [IWL_DEVICE_FAMILY_SC] = "SC", +}; + +static inline const char * +iwl_device_family_name(enum iwl_device_family devive_family) +{ + if (devive_family < 0 || + devive_family >= ARRAY_SIZE(iwl_device_family_str)) + return "unknown"; + return (iwl_device_family_str[devive_family]); +} +#endif + /* * LED mode * IWL_LED_DEFAULT: use device default diff --git a/sys/contrib/dev/iwlwifi/pcie/drv.c b/sys/contrib/dev/iwlwifi/pcie/drv.c index 0aab7a1fdc8e..8780d77b704b 100644 --- a/sys/contrib/dev/iwlwifi/pcie/drv.c +++ b/sys/contrib/dev/iwlwifi/pcie/drv.c @@ -1628,18 +1628,27 @@ sysctl_iwlwifi_pci_ids_name(SYSCTL_HANDLER_ARGS) if ((id->driver_data & TRANS_CFG_MARKER) != 0) { /* Skip and print them below. */ + struct iwl_cfg_trans_params *trans; + + trans = (void *)(id->driver_data & ~TRANS_CFG_MARKER); + sbuf_printf(sb, "%#06x/%#06x/%#06x/%#06x\t%s\t%s\t%d\t%s\n", + id->vendor, id->device, id->subvendor, id->subdevice, + "", "", trans->device_family, + iwl_device_family_name(trans->device_family)); } else if (id->driver_data != 0) { const struct iwl_cfg *cfg; cfg = (void *)(id->driver_data & ~TRANS_CFG_MARKER); - sbuf_printf(sb, "%#06x/%#06x/%#06x/%#06x\t%s\t%s\n", + sbuf_printf(sb, "%#06x/%#06x/%#06x/%#06x\t%s\t%s\t%d\t%s\n", id->vendor, id->device, id->subvendor, id->subdevice, - cfg->name, cfg->fw_name_pre); + cfg->name, cfg->fw_name_pre, cfg->trans.device_family, + iwl_device_family_name(cfg->trans.device_family)); } else { - sbuf_printf(sb, "%#06x/%#06x/%#06x/%#06x\t%s\t%s\n", + sbuf_printf(sb, "%#06x/%#06x/%#06x/%#06x\t%s\t%s\t%d\t%s\n", id->vendor, id->device, id->subvendor, id->subdevice, - "",""); + "","", IWL_DEVICE_FAMILY_UNDEFINED, + iwl_device_family_name(IWL_DEVICE_FAMILY_UNDEFINED)); } id++; } @@ -1655,9 +1664,10 @@ sysctl_iwlwifi_pci_ids_name(SYSCTL_HANDLER_ARGS) else name = ""; - sbuf_printf(sb, "%#06x/%#06x/%#06x/%#06x\t%s\t%s\n", + sbuf_printf(sb, "%#06x/%#06x/%#06x/%#06x\t%s\t%s\t%d\t%s\n", PCI_VENDOR_ID_INTEL, dev_info->device, PCI_ANY_ID, dev_info->subdevice, - name, dev_info->cfg->fw_name_pre); + name, dev_info->cfg->fw_name_pre, dev_info->cfg->trans.device_family, + iwl_device_family_name(dev_info->cfg->trans.device_family)); } error = sbuf_finish(sb); From nobody Thu Oct 17 17:38: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 4XTw6r4NfKz5ZGxn; Thu, 17 Oct 2024 17:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTw6r3gLLz4FC5; Thu, 17 Oct 2024 17:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729186724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zIQnRaGauWiDZSLI3xMxH2BjI8bzaNohzdOBexyroFA=; b=GcNUWT/CaYcgDAeVQTru0CXcTbpHvfWoO0+Qn5tr349dthyRVO14WHYQX5kuJEDuKRnNb5 DIWGaYo/jHEnUjsXlz+oig1SfkJDoqBmHhBUZ6Zsld55HWjRqB4s86L3z4XqJ6rlODV7Rn E/9ChRsq98K0oVBUiEM2wGLHcV9TaOTbqNHZpmOTB4atyiFeEh0Vqmn//bMhxAMzGTufH1 7rO68ZDY0faq5rrn5Dcn/xrBx0AsWmTNpLvm0D4YdBlEZhtVbj1AYPlybhFbE7eIhViMyH YSwYhvfKhlda1mzs6AupROEGLQRjbc2srEqdmnI791ABoV3I5LuxXVXl/pVnuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729186724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zIQnRaGauWiDZSLI3xMxH2BjI8bzaNohzdOBexyroFA=; b=itYdJt3DKGXcG8rKDyAB/a/0I9jiEvVSuUsZP17ruhHjakd/OlqVFDGsQiLgi8THq91nIO wFuGGVxyVYWfVZAjtm/2RpVvEb6bdxsS+pohUGNiFPAv6vh/pM0J5sEgs3pl3Vk9trIjjc vWcYlqbp2hGVhcI16d6gS5qMP4AMagWrv/+qd/r6pSpwHjoTll48QP3aJEa39UqSp/Pshw Q+fAxA+SQma5lo6/rmQLYztv/hKHfMYp1OcapGv3JG1cjAP5XGVvLfuMFK88YGxx6jVIem 0KSe0gtvkezvajViV4nfJZCEjTDOx8aI2a2xi11yHC5ZCREZYZXLzsd4yKq9bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729186724; a=rsa-sha256; cv=none; b=cvWZ5jpyOPpetOouUPhDzAwpaPk/StLUZ8IwyseJTLCF21Yz0VSztgoiGKVxIMLMf+ETfU eZDCHJqmtibcy2pvxwRA582M0eHq0eWLRs48BsboEjPosEU1wDtuh6bjuR4kZWnu/ULvU9 oU7bgop8kRA2z9RxKF50DKLW+nnPb6j68bIqhKhnGzsRbCkVj7UkmrvrWzF6n/sl5cHalV 5pgcwCcI4UmSysCotMNoZ3ramvAZ4mx48JiYYH/dW866o0lPwP2cYgZegSBoBZXtNyLUfb ijOIBIobxVAtDmVHjogpBsdTzyByf50SF1iASDn3Rgn1tlYP9zopIpUgAWNnEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTw6r3GpYzyfl; Thu, 17 Oct 2024 17:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HHciCB035416; Thu, 17 Oct 2024 17:38:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HHciTQ035413; Thu, 17 Oct 2024 17:38:44 GMT (envelope-from git) Date: Thu, 17 Oct 2024 17:38:44 GMT Message-Id: <202410171738.49HHciTQ035413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 96190b4fef3b - main - LinuxKPI based WiFi drivers: scripts to extract fwget(8) and port details List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96190b4fef3b4a0cc3ca0606b0c4e3e69a5e6717 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=96190b4fef3b4a0cc3ca0606b0c4e3e69a5e6717 commit 96190b4fef3b4a0cc3ca0606b0c4e3e69a5e6717 Author: Bjoern A. Zeeb AuthorDate: 2024-04-28 20:50:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-17 17:26:28 +0000 LinuxKPI based WiFi drivers: scripts to extract fwget(8) and port details Add a "zzz_fw_ports_fwget.sh" script to each LinuxKPI based wireless driver which in essential are all the same and in detail all different. The scripts have been referenced in fwget(8) sources since d33f5a0afa54b but were never committed. The scripts do the full job compared to `single-line-scripts` I tried to use before to ease maintainance life. Some use hacks like calling cpp and extracting bits from the output to piece them together over multiple files. It will be left as an exercise for the future to see if what was done (a longer while ago) for iwlwifi(4) would be a good idea for some other drivers too, to have a FreeBSD-specific sysctl to export some of the accumulated data in an easily processable way. The scripts are written in the "perl spirit" -- "to get the job done" -- and not to be nice or neat or efficient. For that we do not need them often enough or in any critical path. People are welcome to improve them if they feel like. I've used them for two version updates now and even if ports enforce some other (manual) editing to keep support for multiple branches for now they worked extremly well. For the most the scripts extract 2 parts: PCI IDs and firmware name; then they add "flavor"s to both and put the information together. That output is then separated into: - fwget(8) lines of PCI ID to port/package wifi-firmware-${name}-kmod-${flavor} mappings and - distfiles per flavor for the ports. - For iwlwififw(4) we also generate the tables for the man page (and the wiki) and hopefully the .Sh HARDWARE section for iwlwifi.4 soon too. Depending on driver various other checks are done, e.g., - does the PCI ID have one or more firmware files/flavors associated, - does the referenced firmware exist in the linux-firmware.git repo, - are there duplicates, - find the latest version of the firmware API. Sponsored by: The FreeBSD Foundation Suggested by: imp (to have automation in D44918) MFC after: 3 days --- sys/contrib/dev/athk/ath10k/zzz_fw_ports_fwget.sh | 286 ++++++++++++++++ sys/contrib/dev/athk/ath11k/zzz_fw_ports_fwget.sh | 317 +++++++++++++++++ sys/contrib/dev/athk/ath12k/zzz_fw_ports_fwget.sh | 310 +++++++++++++++++ sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh | 374 +++++++++++++++++++++ .../dev/mediatek/mt76/zzz_fw_ports_fwget.sh | 292 ++++++++++++++++ sys/contrib/dev/rtw88/zzz_fw_ports_fwget.sh | 145 ++++++++ sys/contrib/dev/rtw89/zzz_fw_ports_fwget.sh | 152 +++++++++ 7 files changed, 1876 insertions(+) diff --git a/sys/contrib/dev/athk/ath10k/zzz_fw_ports_fwget.sh b/sys/contrib/dev/athk/ath10k/zzz_fw_ports_fwget.sh new file mode 100644 index 000000000000..71a11a890a48 --- /dev/null +++ b/sys/contrib/dev/athk/ath10k/zzz_fw_ports_fwget.sh @@ -0,0 +1,286 @@ +#!/bin/sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# +# This is neither efficient nor elegant but we need it few times +# a year and it does the job. +# +# +# USAGE: please check out the correct tag/hash for ports in the +# linux-firmware.git repository you point this script to. +# + +set -e + +DRIVER=ath10k +CHECKFILE=qmi_wlfw_v01.c + +################################################################################ +# +# Check pre-reqs +# +if [ $# -ne 1 ]; then + printf "USAGE: %s /path/to/linux-firmware.git\n" $0 >&2 + exit 1 +fi + +if [ ! -e ${CHECKFILE} ]; then + printf "ERROR: run from %s driver directory; no %s.c here\n" ${DRIVER} ${CHECKFILE} >&2 + exit 1 +fi + +LFWDIR=${1} +if test ! -d ${LFWDIR} -o ! -e ${LFWDIR}/WHENCE; then + printf "ERROR: cannot find linux-firmware.git at '%s'\n" ${LFWDIR} >&2 + exit 1 +fi + +################################################################################ +# +# Helper functions. +# +# This uses a hack (cpp) to expand some macros for us and parses out the result +# which is the PCI device ID or the firmware directory for that. +# Checking MODULE_FIRMWARE was pointless as it had too many "dead" entries: +# NOTICE: no firmware file found for 'ath10k/QCA6174/hw2.1/firmware-4.bin' +# NOTICE: no firmware file found for 'ath10k/QCA6174/hw3.0/firmware-5.bin' +# NOTICE: no firmware file found for 'ath10k/QCA9887/hw1.0/board-2.bin' +# NOTICE: no firmware file found for 'ath10k/QCA988X/hw2.0/board-2.bin' +# NOTICE: no firmware file found for 'ath10k/QCA988X/hw2.0/firmware-2.bin' +# NOTICE: no firmware file found for 'ath10k/QCA988X/hw2.0/firmware-3.bin' +# +list_fw() +{ + # List of already seen flavor (firmware directory). + sfwl="" + + # List of "supported" device IDs (ignoring Ubiquity). + devidl=$(cpp pci.c 2> /dev/null | awk '/PCI_VDEVICE\(ATHEROS,/ { gsub("^.*, \\(", ""); gsub("\\)\\) },$", ""); print tolower($0); }') + + # List of (device ID) -> (firware directory) mappings. + cpp core.c 2> /dev/null | egrep -E '\.(dev_id|dir) = ' | awk '{ if (/dev_id/) { printf "%s", $0; } else { print; } }' | grep -v 'dev_id = 0,' | sort | uniq | \ + awk '{ + gsub("^.*\\(", ""); + gsub("),.* = ", "\t"); + gsub(",$", ""); + gsub(/"/, ""); + gsub(" ", ""); + print; + }' | \ + while read did fwd; do + + x="" + for d in ${devidl}; do + if test "${did}" == "${d}"; then + x="${d}" + break + fi + done + if test "${x}" == ""; then + # Device ID not in the list of PCI IDs we support. + # At least the Ubiquity one we hit here. + #printf "Device ID %s (%s) not in PCI ID list; skipping\n" ${did} ${fwd} >&2 + continue + fi + + if test ! -d ${LFWDIR}/${fwd}; then + # Leave this on as it MUST not happen. + printf "Firmware dir %s (for %s) does not exist; skipping\n" ${fwd} ${did} >&2 + continue + fi + + flav=$(echo "${fwd}" | awk -v drv=${DRIVER} '{ + # Ports FLAVOR names are [a-z0-9_]. If needed add more mangling magic here. + gsub("^" drv "/", ""); + gsub("/", "_"); + gsub("\\.", ""); + print tolower($0); + }') + + # Print this first or otherwise if two device IDs have the same firmware + # we may not see that. + echo "FWGET ${did} ${flav}" + + x="" + for zf in ${sfwl}; do + if test "${zf}" == "${flav}"; then + x="${zf}" + break + fi + done + if test "${x}" != ""; then + #printf "Flavor %s (firmware directory %s) already seen; skipping\n" ${flav} ${fwd} >&2 + continue + fi + sfwl="${sfwl} ${flav}" + + #echo "==> ${did} -> ${fwd} -> ${flav}" + + lx=$(cd ${LFWDIR} && find ${fwd} -type f \! -name "*sdio*" -a \! -name "*.txt" -print) + + # Get a count so we can automatically add \\ apart from the last line. + fn=$(echo "${lx}" | wc -w | awk '{ print $1 }') + + #echo "==> ${flav} :: ${fn} :: ${lx}" >&2 + + if test ${fn} -gt 0; then + + echo "FWS ${flav}" + echo "DISTFILES_${flav}= \\" + for fz in ${lx}; do echo "${fz}"; done | \ + awk -v fn=$fn -v fwg=${flav} -v drv=${DRIVER} '{ + if (FNR == fn) { x="" } else { x=" \\" }; + gsub("^" drv "/", "${FWSUBDIR}/"); + printf "\t%s${DISTURL_SUFFIX}%s\n", $0, x; + }' + + # Check for "lic" files. + lx=$(cd ${LFWDIR} && find ${fwd} -type f \! -name "*sdio*" -a -name "*.txt" -print) + + # Get a count so we can automatically add \\ apart from the last line. + fn=$(echo "${lx}" | wc -w | awk '{ print $1 }') + + if test ${fn} -gt 0; then + echo "FWL ${flav}" + echo "DISTFILES_${flav}_lic= \\" + for fz in ${lx}; do echo "${fz}"; done | \ + awk -v fn=$fn -v fwg=${flav} -v drv=${DRIVER} '{ + if (FNR == fn) { x="" } else { x=" \\" }; + gsub("^" drv "/", "${FWSUBDIR}/"); + printf "\t%s${DISTURL_SUFFIX}%s\n", $0, x; + }' + fi + fi + done +} + +################################################################################ +# +# Generate the PORTS file template. +# + +fwsl=$(list_fw | grep ^FWS | awk '{ print $2 }') +# Get a count so we can automatically add \\ apart from the last line. +fn=$(echo "${fwsl}" | wc -w | awk '{ print $1 }') + +if test ${fn} -gt 0; then + + portsfile=$(mktemp -p /tmp ${DRIVER}-fwport.XXXXXX) + + :> ${portsfile} + ( + echo "FWSUBS= \\" + for sz in ${fwsl}; do echo "${sz}"; done | \ + awk -v fn=$fn '{ + if (FNR == fn) { x="" } else { x=" \\" }; + printf "\t%s%s\n", $0, x; + }' + + echo + list_fw | grep -v ^FWS | grep -v ^FWL | grep -v ^FWGET + + echo + echo "DISTFILES_\${FWDRV}= \\" + for sz in ${fwsl}; do echo "${sz}"; done | \ + awk -v fn=$fn '{ + if (FNR == fn) { x="" } else { x=" \\" }; + printf "\t${DISTFILES_%s}%s\n", $0, x; + }' + + fwsl=$(list_fw | grep ^FWL | awk '{ print $2 }') + # Get a count so we can automatically add \\ apart from the last line. + fn=$(echo "${fwsl}" | wc -w | awk '{ print $1 }') + if test ${fn} -gt 0; then + echo "DISTFILES_\${FWDRV}_lic= \\" + for sz in ${fwsl}; do echo "${sz}"; done | \ + awk -v fn=$fn '{ + if (FNR == fn) { x="" } else { x=" \\" }; + printf "\t${DISTFILES_%s_lic}%s\n", $0, x; + }' + else + echo "DISTFILES_\${FWDRV}_lic=" + fi + + ) >> ${portsfile} + + printf "INFO: wifi-firmware-%s-kmod template at %s\n" ${DRIVER} ${portsfile} >&2 +fi + +################################################################################ +# +# Generate the fwget(8) case pattern table (PCI device ID -> fw port flavor). +# + +fwgetfile=$(mktemp -p /tmp ${DRIVER}-fwget.XXXXXX) +:> ${fwgetfile} + +fwsl=$(list_fw | grep ^FWGET | sort) +# Get a count so we can automatically add \\ apart from the last line. +fn=$(echo "${fwsl}" | grep -c FWGET | awk '{ print $1 }') + +if test ${fn} -gt 0; then + + # We need to check for same ID with multiple firmware. + # The list ist sorted by ID so duplicates are next to each other. + cs=$(echo "${fwsl}" | awk '{ print $2 }' | uniq -c | awk '{ print $1 }') + + #echo "==> cs=${cs}" >&2 + + for n in ${cs}; do + + # Skip FWGET + fwsl=${fwsl#*[[:space:]]} + # get device ID + did=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + # get flavor + flav=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + + # printf "===> did %s flav %s\n" ${did} ${flav} >&2 + + if test ${n} -eq 1; then + echo "${did} ${flav}" | awk -v drv=${DRIVER} '{ + printf "\t%s)\taddpkg \"wifi-firmware-%s-kmod-%s\"; return 1 ;;\n", + tolower($1), drv, tolower($2); + }' >> ${fwgetfile} + else + echo "${did} ${flav}" | awk -v drv=${DRIVER} '{ + printf "\t%s)\taddpkg \"wifi-firmware-%s-kmod-%s\"\n", + tolower($1), drv, tolower($2); + }' >> ${fwgetfile} + + i=1 + while test ${i} -lt ${n}; do + # Skip FWGET + fwsl=${fwsl#*[[:space:]]} + # get device ID + did=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + # get flavor + flav=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + + #printf "===> did %s flav %s\n" ${did} ${flav} >&2 + + echo "${did} ${flav}" | awk -v drv=${DRIVER} '{ + printf "\t\taddpkg \"wifi-firmware-%s-kmod-%s\"\n", + drv, tolower($2); + }' >> ${fwgetfile} + + i=$((i + 1)) + done + + printf "\t\treturn 1 ;;\n" >> ${fwgetfile} + fi + done +fi + +printf "INFO: fwget pci_network_qca %s template at %s\n" ${DRIVER} ${fwgetfile} >&2 + +# end diff --git a/sys/contrib/dev/athk/ath11k/zzz_fw_ports_fwget.sh b/sys/contrib/dev/athk/ath11k/zzz_fw_ports_fwget.sh new file mode 100644 index 000000000000..9de14ed45442 --- /dev/null +++ b/sys/contrib/dev/athk/ath11k/zzz_fw_ports_fwget.sh @@ -0,0 +1,317 @@ +#!/bin/sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# +# This is neither efficient nor elegant but we need it few times +# a year and it does the job. +# +# +# USAGE: please check out the correct tag/hash for ports in the +# linux-firmware.git repository you point this script to. +# + +set -e + +DRIVER=ath11k +CHECKFILE=debugfs_htt_stats.c + +################################################################################ +# +# Check pre-reqs +# +if [ $# -ne 1 ]; then + printf "USAGE: %s /path/to/linux-firmware.git\n" $0 >&2 + exit 1 +fi + +if [ ! -e ${CHECKFILE} ]; then + printf "ERROR: run from %s driver directory; no %s.c here\n" ${DRIVER} ${CHECKFILE} >&2 + exit 1 +fi + +LFWDIR=${1} +if test ! -d ${LFWDIR} -o ! -e ${LFWDIR}/WHENCE; then + printf "ERROR: cannot find linux-firmware.git at '%s'\n" ${LFWDIR} >&2 + exit 1 +fi +LFWDIR=${LFWDIR}/${DRIVER} + +################################################################################ +# +# Helper functions. +# +# This uses a hack (cpp) to expand some macros for us and parses out the result +# which is the PCI device ID or the firmware directory for that. +# +# Driver is there, the firmware not yet...? +# ==> 0x1101 -> ATH11K_HW_QCA6390_HW20 -> QCA6390/hw2.0 +# ==> 0x1104 -> ATH11K_HW_QCN9074_HW10 -> QCN9074/hw1.0 +# ==> 0x1103 -> ATH11K_HW_WCN6855_HW20 -> WCN6855/hw2.0 +# ==> 0x1103 -> ATH11K_HW_WCN6855_HW21 -> WCN6855/hw2.1 +# Firmware dir WCN6855/hw2.1 (for 0x1103) does not exist; skipping +# +list_fw() +{ + # List of already seen flavor (firmware directory). + sfwl="" + + # List of "supported" device IDs. + devidl=$(cpp pci.c 2> /dev/null | awk '/PCI_VDEVICE\(QCOM,/ { gsub("^.*, ", ""); gsub("\\) },$", ""); print tolower($0); }') + # Turn them into a regex. + didreg=$(echo "${devidl}" | xargs -J % echo -n % | sed -e 's, ,|,g') + # List the device ID cases along with their hw_rev which we can go and take to lookup fw. + hwrevs=$(cpp pci.c 2> /dev/null | egrep -E "(case (${didreg})|ab->hw_rev = )" | awk '{ + if (FNR > 1 && /case/) { + printf "\n"; + } + gsub("^.*case[[:space:]]*", ""); + gsub("[[:space:]]*ab->hw_rev = ", " "); + gsub("[:;]", ""); + printf "%s", $0; + }') + + # hwrevs is a list of (device IDs) -> (1..n hardware revisions) mappings. + #echo "==> ${devidl} :: ${didreg} :: ${hwrevs}" >&2 + + # List of (hardware revision) -> (firware directory) mappings. + l=$(cpp core.c 2> /dev/null | egrep -E '\.(hw_rev|dir) = ' | awk '{ if (/hw_rev/) { printf "%s", $0; } else { print; } }' | sort | uniq | \ + awk '{ + gsub("^.*hw_rev = ", ""); + gsub(",.* = ", "\t"); + gsub(",$", ""); + gsub(/"/, ""); + gsub(" ", ""); + gsub("\t", " "); + print; + }') + #echo "===> ${l}" >&2 + + ll=$(echo "${l}" | wc -w | awk '{ print $1 }') + while test "${ll}" -gt 1; do + hwr=${l%%[[:space:]]*} + l=${l#*[[:space:]]} + fwd=${l%%[[:space:]]*} + l=${l#*[[:space:]]} + + #echo "=+=> ${hwr} -> ${fwd}" >&2 + eval fwd_${hwr}=${fwd} + ll=$(echo "${l}" | wc -w | awk '{ print $1 }') + done + + echo "${hwrevs}" | \ + while read did hwrl; do + hwrn=$(echo "${hwrl}" | wc -w | awk '{ print $1 }') + if test ${hwrn} -lt 1; then + printf "Device ID %s has no hardware revisions (%s); skipping\n" "${did}" ${hwrn} >&2 + continue + fi + + for hwrx in ${hwrl}; do + + eval fwd=\${fwd_${hwrx}} + #echo "===> ${did} -> ${hwrx} -> ${fwd}" >&2 + + if test ! -d ${LFWDIR}/${fwd}; then + #printf "Firmware dir %s (for %s) does not exist; skipping\n" ${fwd} ${did} >&2 + continue + fi + + flav=$(echo "${fwd}" | awk -v drv=${DRIVER} '{ + # Ports FLAVOR names are [a-z0-9_]. If needed add more mangling magic here. + gsub("^" drv "/", ""); + gsub("/", "_"); + gsub("\\.", ""); + print tolower($0); + }') + + # Print this first or otherwise if two device IDs have the same firmware + # we may not see that. + echo "FWGET ${did} ${flav}" + + x="" + for zf in ${sfwl}; do + if test "${zf}" == "${flav}"; then + x="${zf}" + break + fi + done + if test "${x}" != ""; then + #printf "Flavor %s (firmware directory %s) already seen; skipping\n" ${flav} ${fwd} >&2 + continue + fi + sfwl="${sfwl} ${flav}" + + #echo "==> ${did} -> ${fwd} -> ${flav}" + + lx=$(cd ${LFWDIR} && find ${fwd} -type f \! -name "*sdio*" -a \! -name "*.txt" -print) + + # Get a count so we can automatically add \\ apart from the last line. + fn=$(echo "${lx}" | wc -w | awk '{ print $1 }') + + #echo "==> ${flav} :: ${fn} :: ${lx}" >&2 + + if test ${fn} -gt 0; then + + echo "FWS ${flav}" + echo "DISTFILES_${flav}= \\" + for fz in ${lx}; do echo "${fz}"; done | \ + awk -v fn=$fn -v fwg=${flav} -v drv=${DRIVER} '{ + if (FNR == fn) { x="" } else { x=" \\" }; + #gsub("^" drv "/", "${FWSUBDIR}/"); + gsub("^", "${FWSUBDIR}/"); + printf "\t%s${DISTURL_SUFFIX}%s\n", $0, x; + }' + + # Check for "lic" files. + lx=$(cd ${LFWDIR} && find ${fwd} -type f \! -name "*sdio*" -a -name "*.txt" -print) + + # Get a count so we can automatically add \\ apart from the last line. + fn=$(echo "${lx}" | wc -w | awk '{ print $1 }') + + if test ${fn} -gt 0; then + echo "FWL ${flav}" + echo "DISTFILES_${flav}_lic= \\" + for fz in ${lx}; do echo "${fz}"; done | \ + awk -v fn=$fn -v fwg=${flav} -v drv=${DRIVER} '{ + if (FNR == fn) { x="" } else { x=" \\" }; + #gsub("^" drv "/", "${FWSUBDIR}/"); + gsub("^", "${FWSUBDIR}/"); + printf "\t%s${DISTURL_SUFFIX}%s\n", $0, x; + }' + fi + fi + done + + done +} + +################################################################################ +# +# Generate the PORTS file template. +# + +fwsl=$(list_fw | grep ^FWS | awk '{ print $2 }') +# Get a count so we can automatically add \\ apart from the last line. +fn=$(echo "${fwsl}" | wc -w | awk '{ print $1 }') + +if test ${fn} -gt 0; then + + portsfile=$(mktemp -p /tmp ${DRIVER}-fwport.XXXXXX) + + :> ${portsfile} + ( + echo "FWSUBS= \\" + for sz in ${fwsl}; do echo "${sz}"; done | \ + awk -v fn=$fn '{ + if (FNR == fn) { x="" } else { x=" \\" }; + printf "\t%s%s\n", $0, x; + }' + + echo + list_fw | grep -v ^FWS | grep -v ^FWL | grep -v ^FWGET + + echo + echo "DISTFILES_\${FWDRV}= \\" + for sz in ${fwsl}; do echo "${sz}"; done | \ + awk -v fn=$fn '{ + if (FNR == fn) { x="" } else { x=" \\" }; + printf "\t${DISTFILES_%s}%s\n", $0, x; + }' + + fwsl=$(list_fw | grep ^FWL | awk '{ print $2 }') + # Get a count so we can automatically add \\ apart from the last line. + fn=$(echo "${fwsl}" | wc -w | awk '{ print $1 }') + if test ${fn} -gt 0; then + echo "DISTFILES_\${FWDRV}_lic= \\" + for sz in ${fwsl}; do echo "${sz}"; done | \ + awk -v fn=$fn '{ + if (FNR == fn) { x="" } else { x=" \\" }; + printf "\t${DISTFILES_%s_lic}%s\n", $0, x; + }' + else + echo "DISTFILES_\${FWDRV}_lic=" + fi + + ) >> ${portsfile} + + printf "INFO: wifi-firmware-%s-kmod template at %s\n" ${DRIVER} ${portsfile} >&2 +fi + +################################################################################ +# +# Generate the fwget(8) case pattern table (PCI device ID -> fw port flavor). +# + +fwgetfile=$(mktemp -p /tmp ${DRIVER}-fwget.XXXXXX) +:> ${fwgetfile} + +fwsl=$(list_fw | grep ^FWGET | sort) +# Get a count so we can automatically add \\ apart from the last line. +fn=$(echo "${fwsl}" | grep -c FWGET | awk '{ print $1 }') + +if test ${fn} -gt 0; then + + # We need to check for same ID with multiple firmware. + # The list ist sorted by ID so duplicates are next to each other. + cs=$(echo "${fwsl}" | awk '{ print $2 }' | uniq -c | awk '{ print $1 }') + + #echo "==> cs=${cs}" >&2 + + for n in ${cs}; do + + # Skip FWGET + fwsl=${fwsl#*[[:space:]]} + # get device ID + did=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + # get flavor + flav=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + + # printf "===> did %s flav %s\n" ${did} ${flav} >&2 + + if test ${n} -eq 1; then + echo "${did} ${flav}" | awk -v drv=${DRIVER} '{ + printf "\t%s)\taddpkg \"wifi-firmware-%s-kmod-%s\"; return 1 ;;\n", + tolower($1), drv, tolower($2); + }' >> ${fwgetfile} + else + echo "${did} ${flav}" | awk -v drv=${DRIVER} '{ + printf "\t%s)\taddpkg \"wifi-firmware-%s-kmod-%s\"\n", + tolower($1), drv, tolower($2); + }' >> ${fwgetfile} + + i=1 + while test ${i} -lt ${n}; do + # Skip FWGET + fwsl=${fwsl#*[[:space:]]} + # get device ID + did=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + # get flavor + flav=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + + #printf "===> did %s flav %s\n" ${did} ${flav} >&2 + + echo "${did} ${flav}" | awk -v drv=${DRIVER} '{ + printf "\t\taddpkg \"wifi-firmware-%s-kmod-%s\"\n", + drv, tolower($2); + }' >> ${fwgetfile} + + i=$((i + 1)) + done + + printf "\t\treturn 1 ;;\n" >> ${fwgetfile} + fi + done +fi + +printf "INFO: fwget pci_network_qca %s template at %s\n" ${DRIVER} ${fwgetfile} >&2 + +# end diff --git a/sys/contrib/dev/athk/ath12k/zzz_fw_ports_fwget.sh b/sys/contrib/dev/athk/ath12k/zzz_fw_ports_fwget.sh new file mode 100644 index 000000000000..500f5de05cc4 --- /dev/null +++ b/sys/contrib/dev/athk/ath12k/zzz_fw_ports_fwget.sh @@ -0,0 +1,310 @@ +#!/bin/sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# +# This is neither efficient nor elegant but we need it few times +# a year and it does the job. +# +# +# USAGE: please check out the correct tag/hash for ports in the +# linux-firmware.git repository you point this script to. +# + +set -e + +DRIVER=ath12k +CHECKFILE=dp_mon.c + +################################################################################ +# +# Check pre-reqs +# +if [ $# -ne 1 ]; then + printf "USAGE: %s /path/to/linux-firmware.git\n" $0 >&2 + exit 1 +fi + +if [ ! -e ${CHECKFILE} ]; then + printf "ERROR: run from %s driver directory; no %s.c here\n" ${DRIVER} ${CHECKFILE} >&2 + exit 1 +fi + +LFWDIR=${1} +if test ! -d ${LFWDIR} -o ! -e ${LFWDIR}/WHENCE; then + printf "ERROR: cannot find linux-firmware.git at '%s'\n" ${LFWDIR} >&2 + exit 1 +fi +LFWDIR=${LFWDIR}/${DRIVER} + +################################################################################ +# +# Helper functions. +# +# This uses a hack (cpp) to expand some macros for us and parses out the result +# which is the PCI device ID or the firmware directory for that. +# +list_fw() +{ + # List of already seen flavor (firmware directory). + sfwl="" + + # List of "supported" device IDs. + devidl=$(cpp pci.c 2> /dev/null | awk '/PCI_VDEVICE\(QCOM,/ { gsub("^.*, ", ""); gsub("\\) },$", ""); print tolower($0); }') + # Turn them into a regex. + didreg=$(echo "${devidl}" | xargs -J % echo -n % | sed -e 's, ,|,g') + # List the device ID cases along with their hw_rev which we can go and take to lookup fw. + hwrevs=$(cpp pci.c 2> /dev/null | egrep -E "(case (${didreg})|ab->hw_rev = )" | awk '{ + if (FNR > 1 && /case/) { + printf "\n"; + } + gsub("^.*case[[:space:]]*", ""); + gsub("[[:space:]]*ab->hw_rev = ", " "); + gsub("[:;]", ""); + printf "%s", $0; + }') + + # hwrevs is a list of (device IDs) -> (1..n hardware revisions) mappings. + #echo "==> ${devidl} :: ${didreg} :: ${hwrevs}" >&2 + + # List of (hardware revision) -> (firware directory) mappings. + l=$(cpp hw.c 2> /dev/null | egrep -E '\.(hw_rev|dir) = ' | awk '{ if (/hw_rev/) { printf "%s", $0; } else { print; } }' | sort | uniq | \ + awk '{ + gsub("^.*hw_rev = ", ""); + gsub(",.* = ", "\t"); + gsub(",$", ""); + gsub(/"/, ""); + gsub(" ", ""); + gsub("\t", " "); + print; + }') + #echo "===> ${l}" >&2 + + ll=$(echo "${l}" | wc -w | awk '{ print $1 }') + while test "${ll}" -gt 1; do + hwr=${l%%[[:space:]]*} + l=${l#*[[:space:]]} + fwd=${l%%[[:space:]]*} + l=${l#*[[:space:]]} + + #echo "=+=> ${hwr} -> ${fwd}" >&2 + eval fwd_${hwr}=${fwd} + ll=$(echo "${l}" | wc -w | awk '{ print $1 }') + done + + echo "${hwrevs}" | \ + while read did hwrl; do + hwrn=$(echo "${hwrl}" | wc -w | awk '{ print $1 }') + if test ${hwrn} -lt 1; then + printf "Device ID %s has no hardware revisions (%s); skipping\n" "${did}" ${hwrn} >&2 + continue + fi + + for hwrx in ${hwrl}; do + + eval fwd=\${fwd_${hwrx}} + #echo "===> ${did} -> ${hwrx} -> ${fwd}" >&2 + + if test ! -d ${LFWDIR}/${fwd}; then + #printf "Firmware dir %s (for %s) does not exist; skipping\n" ${fwd} ${did} >&2 + continue + fi + + flav=$(echo "${fwd}" | awk -v drv=${DRIVER} '{ + # Ports FLAVOR names are [a-z0-9_]. If needed add more mangling magic here. + gsub("^" drv "/", ""); + gsub("/", "_"); + gsub("\\.", ""); + print tolower($0); + }') + + # Print this first or otherwise if two device IDs have the same firmware + # we may not see that. + echo "FWGET ${did} ${flav}" + + x="" + for zf in ${sfwl}; do + if test "${zf}" == "${flav}"; then + x="${zf}" + break + fi + done + if test "${x}" != ""; then + #printf "Flavor %s (firmware directory %s) already seen; skipping\n" ${flav} ${fwd} >&2 + continue + fi + sfwl="${sfwl} ${flav}" + + #echo "==> ${did} -> ${fwd} -> ${flav}" + + lx=$(cd ${LFWDIR} && find ${fwd} -type f \! -name "*sdio*" -a \! -name "*.txt" -print) + + # Get a count so we can automatically add \\ apart from the last line. + fn=$(echo "${lx}" | wc -w | awk '{ print $1 }') + + #echo "==> ${flav} :: ${fn} :: ${lx}" >&2 + + if test ${fn} -gt 0; then + + echo "FWS ${flav}" + echo "DISTFILES_${flav}= \\" + for fz in ${lx}; do echo "${fz}"; done | \ + awk -v fn=$fn -v fwg=${flav} -v drv=${DRIVER} '{ + if (FNR == fn) { x="" } else { x=" \\" }; + #gsub("^" drv "/", "${FWSUBDIR}/"); + gsub("^", "${FWSUBDIR}/"); + printf "\t%s${DISTURL_SUFFIX}%s\n", $0, x; + }' + + # Check for "lic" files. + lx=$(cd ${LFWDIR} && find ${fwd} -type f \! -name "*sdio*" -a -name "*.txt" -print) + + # Get a count so we can automatically add \\ apart from the last line. + fn=$(echo "${lx}" | wc -w | awk '{ print $1 }') + + if test ${fn} -gt 0; then + echo "FWL ${flav}" + echo "DISTFILES_${flav}_lic= \\" + for fz in ${lx}; do echo "${fz}"; done | \ + awk -v fn=$fn -v fwg=${flav} -v drv=${DRIVER} '{ + if (FNR == fn) { x="" } else { x=" \\" }; + #gsub("^" drv "/", "${FWSUBDIR}/"); + gsub("^", "${FWSUBDIR}/"); + printf "\t%s${DISTURL_SUFFIX}%s\n", $0, x; + }' + fi + fi + done + + done +} + +################################################################################ +# +# Generate the PORTS file template. +# + +fwsl=$(list_fw | grep ^FWS | awk '{ print $2 }') +# Get a count so we can automatically add \\ apart from the last line. +fn=$(echo "${fwsl}" | wc -w | awk '{ print $1 }') + +if test ${fn} -gt 0; then + + portsfile=$(mktemp -p /tmp ${DRIVER}-fwport.XXXXXX) + + :> ${portsfile} + ( + echo "FWSUBS= \\" + for sz in ${fwsl}; do echo "${sz}"; done | \ + awk -v fn=$fn '{ + if (FNR == fn) { x="" } else { x=" \\" }; + printf "\t%s%s\n", $0, x; + }' + + echo + list_fw | grep -v ^FWS | grep -v ^FWL | grep -v ^FWGET + + echo + echo "DISTFILES_\${FWDRV}= \\" + for sz in ${fwsl}; do echo "${sz}"; done | \ + awk -v fn=$fn '{ + if (FNR == fn) { x="" } else { x=" \\" }; + printf "\t${DISTFILES_%s}%s\n", $0, x; + }' + + fwsl=$(list_fw | grep ^FWL | awk '{ print $2 }') + # Get a count so we can automatically add \\ apart from the last line. + fn=$(echo "${fwsl}" | wc -w | awk '{ print $1 }') + if test ${fn} -gt 0; then + echo "DISTFILES_\${FWDRV}_lic= \\" + for sz in ${fwsl}; do echo "${sz}"; done | \ + awk -v fn=$fn '{ + if (FNR == fn) { x="" } else { x=" \\" }; + printf "\t${DISTFILES_%s_lic}%s\n", $0, x; + }' + else + echo "DISTFILES_\${FWDRV}_lic=" + fi + + ) >> ${portsfile} + + printf "INFO: wifi-firmware-%s-kmod template at %s\n" ${DRIVER} ${portsfile} >&2 +fi + +################################################################################ +# +# Generate the fwget(8) case pattern table (PCI device ID -> fw port flavor). +# + +fwgetfile=$(mktemp -p /tmp ${DRIVER}-fwget.XXXXXX) +:> ${fwgetfile} + +fwsl=$(list_fw | grep ^FWGET | sort) +# Get a count so we can automatically add \\ apart from the last line. +fn=$(echo "${fwsl}" | grep -c FWGET | awk '{ print $1 }') + +if test ${fn} -gt 0; then + + # We need to check for same ID with multiple firmware. + # The list ist sorted by ID so duplicates are next to each other. + cs=$(echo "${fwsl}" | awk '{ print $2 }' | uniq -c | awk '{ print $1 }') + + #echo "==> cs=${cs}" >&2 + + for n in ${cs}; do + + # Skip FWGET + fwsl=${fwsl#*[[:space:]]} + # get device ID + did=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + # get flavor + flav=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + + # printf "===> did %s flav %s\n" ${did} ${flav} >&2 + + if test ${n} -eq 1; then + echo "${did} ${flav}" | awk -v drv=${DRIVER} '{ + printf "\t%s)\taddpkg \"wifi-firmware-%s-kmod-%s\"; return 1 ;;\n", + tolower($1), drv, tolower($2); + }' >> ${fwgetfile} + else + echo "${did} ${flav}" | awk -v drv=${DRIVER} '{ + printf "\t%s)\taddpkg \"wifi-firmware-%s-kmod-%s\"\n", + tolower($1), drv, tolower($2); + }' >> ${fwgetfile} + + i=1 + while test ${i} -lt ${n}; do + # Skip FWGET + fwsl=${fwsl#*[[:space:]]} + # get device ID + did=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + # get flavor + flav=${fwsl%%[[:space:]]*} + fwsl=${fwsl#*[[:space:]]} + + #printf "===> did %s flav %s\n" ${did} ${flav} >&2 + + echo "${did} ${flav}" | awk -v drv=${DRIVER} '{ + printf "\t\taddpkg \"wifi-firmware-%s-kmod-%s\"\n", + drv, tolower($2); + }' >> ${fwgetfile} + + i=$((i + 1)) + done + + printf "\t\treturn 1 ;;\n" >> ${fwgetfile} *** 994 LINES SKIPPED *** From nobody Thu Oct 17 17:41: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 4XTwB10k1cz5ZGww; Thu, 17 Oct 2024 17:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTwB10DPhz4GBK; Thu, 17 Oct 2024 17:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729186889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VihTECFrEsLdlCZqykOdVqq/FsUx2iUcKoqorB8ujSo=; b=uR9mc9lCa7Fm7I4tNwyIqgA+QkoB4nStkrD/zgNtm80+brWHnvSycohjMG8qflqKeyjCjy YgENsbFbX+EWIlAEuBwgFS+cYa7cP1JXDkScZMtMGXUDjzKSpCusOJMjzhUKJJo677+PD/ eR3czcY9xsjKI4Y4labWe/slfm5HjupkRW26hNNjNgS1PHTQsq+ECqRizMaGkINN3vPZgC 1JTP5o/frgL008kgIPDbdPH2FH/SSGwDHLGBxE1VeWrTLHU6lb7jul3SM6VsMAfhrRrI8p KBgmvgvO6/tFuUNJtX7hIuayULECp2IrAPf5rX5Ohc1v8ftGbErAH8dxwA7lqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729186889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VihTECFrEsLdlCZqykOdVqq/FsUx2iUcKoqorB8ujSo=; b=VD4ITgQXZ18bB3Q4pbkA+4U6LEiXOzhfbYllo4KNSnANHGixdUQJzXOVQP6bMpGD93QTOp hz+xPfAYcAENTD8rib8x0ndaGJHsuslTF+E2jZ/irnGBrQqv6w6hAbkeywivQXrxbk83Ex SQWMMIUFlQAa9RZFlJcUmq7h+35nC7SN1cv52n8l7rE1repUHaK1XzmA4a9nqlqAqBjOsM Afm56juYka6GN5u53+VB/SP7nGd7fk9Zih6s8G8FaoD+lx8e9bDaBV0y5xdU3m4mbRzMmM ox6Neb1lJcGBDgH9GWy+TavdjffOZToXV0u9JBCxr7h/kPOo3kmMXTEiQQPyXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729186889; a=rsa-sha256; cv=none; b=mGtAWKs6fucS3xq9g9FhjgPSNYchT02JLTRfbxbbVAcyKT1Mf4nVlQIc/9guUygbCMvAxY O5vdX09RfWrO2H3l62YovqBAi5u7oReTKqsuQolLQte9CE9TYf9iLE5gAHOmv8nI/u5H97 g2f8H18NN2euIQIw8wSm2U7ASrRVbU1i7Vmyapp1qiLbvx/PxdZd+AKU5V7IeuGNR6MbbD +CvsoWfxr80SuVqH4QcHKUXzA0rLpXaGUQ/vGrT7kdwCQNuRp9smCdg1mKoNbZFMXqOqaK Q3wcauMnRHNJz2csHeTkVdx2XDE6If+1/anFSagmVmm/Kx9e5QU6mh4dFaEffQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTwB06xh3z10Pq; Thu, 17 Oct 2024 17:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HHfSX6048946; Thu, 17 Oct 2024 17:41:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HHfSZo048943; Thu, 17 Oct 2024 17:41:28 GMT (envelope-from git) Date: Thu, 17 Oct 2024 17:41:28 GMT Message-Id: <202410171741.49HHfSZo048943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: f48fb131c252 - main - cxgbe/t4_tom: Change stid allocation strategy to be more IPv6 friendly. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f48fb131c2523d4915d1ad4eba002251c64f5574 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=f48fb131c2523d4915d1ad4eba002251c64f5574 commit f48fb131c2523d4915d1ad4eba002251c64f5574 Author: Navdeep Parhar AuthorDate: 2024-10-10 17:45:17 +0000 Commit: Navdeep Parhar CommitDate: 2024-10-17 17:40:38 +0000 cxgbe/t4_tom: Change stid allocation strategy to be more IPv6 friendly. A hardware IPv6 server needs 2 consecutive stids (server tids) starting from a 2-aligned stid whereas an IPv4 server needs only 1 stid without any constraint. The allocator used to grab the first free stid(s) for both but this can fragment the stid space leaving nothing suitable for IPv6 even when lots of stids are available. Change the allocator to prefer stids for IPv4 from the ones that cannot be used for IPv6. Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D47042 --- sys/dev/cxgbe/offload.h | 13 +--- sys/dev/cxgbe/tom/t4_listen.c | 174 +++++++++++++++++++++++++----------------- sys/dev/cxgbe/tom/t4_tom.h | 2 +- 3 files changed, 105 insertions(+), 84 deletions(-) diff --git a/sys/dev/cxgbe/offload.h b/sys/dev/cxgbe/offload.h index c13901ee1a59..b57c03f076b5 100644 --- a/sys/dev/cxgbe/offload.h +++ b/sys/dev/cxgbe/offload.h @@ -33,6 +33,7 @@ #include #include #include +#include #define INIT_ULPTX_WRH(w, wrlen, atomic, tid) do { \ (w)->wr_hi = htonl(V_FW_WR_OP(FW_ULPTX_WR) | V_FW_WR_ATOMIC(atomic)); \ @@ -57,15 +58,6 @@ OPCODE_TID(w) = htonl(MK_OPCODE_TID(cpl, tid)); \ } while (0) -TAILQ_HEAD(stid_head, stid_region); -struct listen_ctx; - -struct stid_region { - TAILQ_ENTRY(stid_region) link; - u_int used; /* # of stids used by this region */ - u_int free; /* # of contiguous stids free right after this region */ -}; - /* * Max # of ATIDs. The absolute HW max is larger than this but we reserve a few * of the upper bits for use as a cookie to demux the reply. @@ -143,9 +135,8 @@ struct tid_info { struct mtx stid_lock __aligned(CACHE_LINE_SIZE); struct listen_ctx **stid_tab; + bitstr_t *stid_bitmap; u_int stids_in_use; - u_int nstids_free_head; /* # of available stids at the beginning */ - struct stid_head stids; bool stid_tab_stopped; struct mtx atid_lock __aligned(CACHE_LINE_SIZE); diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c index 8a39218a55ba..8226c44669ab 100644 --- a/sys/dev/cxgbe/tom/t4_listen.c +++ b/sys/dev/cxgbe/tom/t4_listen.c @@ -72,9 +72,9 @@ #include "tom/t4_tom.h" /* stid services */ -static int alloc_stid(struct adapter *, struct listen_ctx *, int); +static int alloc_stid(struct adapter *, bool, void *); static struct listen_ctx *lookup_stid(struct adapter *, int); -static void free_stid(struct adapter *, struct listen_ctx *); +static void free_stid(struct adapter *, int , bool); /* lctx services */ static struct listen_ctx *alloc_lctx(struct adapter *, struct inpcb *, @@ -103,10 +103,14 @@ alloc_stid_tab(struct adapter *sc) M_ZERO | M_NOWAIT); if (t->stid_tab == NULL) return (ENOMEM); + t->stid_bitmap = bit_alloc(t->nstids, M_CXGBE, M_NOWAIT); + if (t->stid_bitmap == NULL) { + free(t->stid_tab, M_CXGBE); + t->stid_tab = NULL; + return (ENOMEM); + } mtx_init(&t->stid_lock, "stid lock", NULL, MTX_DEF); t->stids_in_use = 0; - TAILQ_INIT(&t->stids); - t->nstids_free_head = t->nstids; return (0); } @@ -123,6 +127,8 @@ free_stid_tab(struct adapter *sc) mtx_destroy(&t->stid_lock); free(t->stid_tab, M_CXGBE); t->stid_tab = NULL; + free(t->stid_bitmap, M_CXGBE); + t->stid_bitmap = NULL; } void @@ -194,74 +200,94 @@ restart_stid_tab(struct adapter *sc) } static int -alloc_stid(struct adapter *sc, struct listen_ctx *lctx, int isipv6) +alloc_stid(struct adapter *sc, bool isipv6, void *ctx) { struct tid_info *t = &sc->tids; - u_int stid, n, f, mask; - struct stid_region *sr = &lctx->stid_region; - - /* - * An IPv6 server needs 2 naturally aligned stids (1 stid = 4 cells) in - * the TCAM. The start of the stid region is properly aligned (the chip - * requires each region to be 128-cell aligned). - */ - n = isipv6 ? 2 : 1; - mask = n - 1; - KASSERT((t->stid_base & mask) == 0 && (t->nstids & mask) == 0, - ("%s: stid region (%u, %u) not properly aligned. n = %u", - __func__, t->stid_base, t->nstids, n)); + const u_int n = isipv6 ? 2 : 1; + int stid, pair_stid; + u_int i; + ssize_t val; mtx_lock(&t->stid_lock); + MPASS(t->stids_in_use <= t->nstids); if (n > t->nstids - t->stids_in_use || t->stid_tab_stopped) { mtx_unlock(&t->stid_lock); return (-1); } - if (t->nstids_free_head >= n) { + stid = -1; + if (isipv6) { /* - * This allocation will definitely succeed because the region - * starts at a good alignment and we just checked we have enough - * stids free. + * An IPv6 server needs 2 naturally aligned stids (1 stid = 4 + * cells) in the TCAM. We know that the start of the stid + * region is properly aligned already (the chip requires each + * region to be 128-cell aligned). */ - f = t->nstids_free_head & mask; - t->nstids_free_head -= n + f; - stid = t->nstids_free_head; - TAILQ_INSERT_HEAD(&t->stids, sr, link); + for (i = 0; i + 1 < t->nstids; i = roundup2(val + 1, 2)) { + bit_ffc_area_at(t->stid_bitmap, i, t->nstids, 2, &val); + if (val == -1) + break; + if ((val & 1) == 0) { + stid = val; + break; + } + } } else { - struct stid_region *s; - - stid = t->nstids_free_head; - TAILQ_FOREACH(s, &t->stids, link) { - stid += s->used + s->free; - f = stid & mask; - if (s->free >= n + f) { - stid -= n + f; - s->free -= n + f; - TAILQ_INSERT_AFTER(&t->stids, s, sr, link); - goto allocated; + /* + * An IPv4 server needs one stid without any alignment + * requirements. But we try extra hard to find an available + * stid adjacent to a used stid so that free "stid-pairs" are + * left intact for IPv6. + */ + bit_ffc_at(t->stid_bitmap, 0, t->nstids, &val); + while (val != -1) { + if (stid == -1) { + /* + * First usable stid. Look no further if it's + * an ideal fit. + */ + stid = val; + if (val & 1 || bit_test(t->stid_bitmap, val + 1)) + break; + } else { + /* + * We have an unused stid already but are now + * looking for in-use stids because we'd prefer + * to grab an unused stid adjacent to one that's + * in use. + * + * Odd stids pair with the previous stid and + * even ones pair with the next stid. + */ + pair_stid = val & 1 ? val - 1 : val + 1; + if (bit_test(t->stid_bitmap, pair_stid) == 0) { + stid = pair_stid; + break; + } } + val = roundup2(val + 1, 2); + if (val >= t->nstids) + break; + bit_ffs_at(t->stid_bitmap, val, t->nstids, &val); } + } - if (__predict_false(stid != t->nstids)) { - panic("%s: stids TAILQ (%p) corrupt." - " At %d instead of %d at the end of the queue.", - __func__, &t->stids, stid, t->nstids); + if (stid >= 0) { + MPASS(stid + n - 1 < t->nstids); + MPASS(bit_ntest(t->stid_bitmap, stid, stid + n - 1, 0)); + bit_nset(t->stid_bitmap, stid, stid + n - 1); + t->stids_in_use += n; + t->stid_tab[stid] = ctx; +#ifdef INVARIANTS + if (n == 2) { + MPASS((stid & 1) == 0); + t->stid_tab[stid + 1] = NULL; } - - mtx_unlock(&t->stid_lock); - return (-1); +#endif + stid += t->stid_base; } - -allocated: - sr->used = n; - sr->free = f; - t->stids_in_use += n; - t->stid_tab[stid] = lctx; mtx_unlock(&t->stid_lock); - - KASSERT(((stid + t->stid_base) & mask) == 0, - ("%s: EDOOFUS.", __func__)); - return (stid + t->stid_base); + return (stid); } static struct listen_ctx * @@ -273,25 +299,28 @@ lookup_stid(struct adapter *sc, int stid) } static void -free_stid(struct adapter *sc, struct listen_ctx *lctx) +free_stid(struct adapter *sc, int stid, bool isipv6) { struct tid_info *t = &sc->tids; - struct stid_region *sr = &lctx->stid_region; - struct stid_region *s; - - KASSERT(sr->used > 0, ("%s: nonsense free (%d)", __func__, sr->used)); + const u_int n = isipv6 ? 2 : 1; mtx_lock(&t->stid_lock); - s = TAILQ_PREV(sr, stid_head, link); - if (s != NULL) - s->free += sr->used + sr->free; - else - t->nstids_free_head += sr->used + sr->free; - KASSERT(t->stids_in_use >= sr->used, - ("%s: stids_in_use (%u) < stids being freed (%u)", __func__, - t->stids_in_use, sr->used)); - t->stids_in_use -= sr->used; - TAILQ_REMOVE(&t->stids, sr, link); + MPASS(stid >= t->stid_base); + stid -= t->stid_base; + MPASS(stid + n - 1 < t->nstids); + MPASS(t->stids_in_use <= t->nstids); + MPASS(t->stids_in_use >= n); + MPASS(t->stid_tab[stid] != NULL); +#ifdef INVARIANTS + if (n == 2) { + MPASS((stid & 1) == 0); + MPASS(t->stid_tab[stid + 1] == NULL); + } +#endif + MPASS(bit_ntest(t->stid_bitmap, stid, stid + n - 1, 1)); + bit_nclear(t->stid_bitmap, stid, stid + n - 1); + t->stid_tab[stid] = NULL; + t->stids_in_use -= n; mtx_unlock(&t->stid_lock); } @@ -306,13 +335,14 @@ alloc_lctx(struct adapter *sc, struct inpcb *inp, struct vi_info *vi) if (lctx == NULL) return (NULL); - lctx->stid = alloc_stid(sc, lctx, inp->inp_vflag & INP_IPV6); + lctx->isipv6 = inp->inp_vflag & INP_IPV6; + lctx->stid = alloc_stid(sc, lctx->isipv6, lctx); if (lctx->stid < 0) { free(lctx, M_CXGBE); return (NULL); } - if (inp->inp_vflag & INP_IPV6 && + if (lctx->isipv6 && !IN6_ARE_ADDR_EQUAL(&in6addr_any, &inp->in6p_laddr)) { lctx->ce = t4_get_clip_entry(sc, &inp->in6p_laddr, true); if (lctx->ce == NULL) { @@ -348,7 +378,7 @@ free_lctx(struct adapter *sc, struct listen_ctx *lctx) if (lctx->ce) t4_release_clip_entry(sc, lctx->ce); - free_stid(sc, lctx); + free_stid(sc, lctx->stid, lctx->isipv6); free(lctx, M_CXGBE); return (in_pcbrele_wlocked(inp)); diff --git a/sys/dev/cxgbe/tom/t4_tom.h b/sys/dev/cxgbe/tom/t4_tom.h index 8debab4940b1..1f97dd81a0bc 100644 --- a/sys/dev/cxgbe/tom/t4_tom.h +++ b/sys/dev/cxgbe/tom/t4_tom.h @@ -294,8 +294,8 @@ struct listen_ctx { LIST_ENTRY(listen_ctx) link; /* listen hash linkage */ volatile int refcount; int stid; - struct stid_region stid_region; int flags; + bool isipv6; struct inpcb *inp; /* listening socket's inp */ struct vnet *vnet; struct sge_wrq *ctrlq; From nobody Thu Oct 17 18:20: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 4XTx2q4c7Sz5ZJs5 for ; Thu, 17 Oct 2024 18:20:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTx2p2XQLz4K9W for ; Thu, 17 Oct 2024 18:20:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-71e579abb99so881852b3a.2 for ; Thu, 17 Oct 2024 11:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1729189217; x=1729794017; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OujFCyRD9/bGHhZBxfS/h+Ld/xrgT3Vb5iFzLkw+eys=; b=o80C2XUp4wYHjo4WHwgOAsKYTmyGFEKW5i1hCfkDVUhi7wVRWohoPh4zgojQY13v9M 5vfHjVr/U9OMoxbXpqVvFsPa/WLrHpapmKpMZ5QXYpm9ye94mQPkY6jMW+qkN7O1A3Vr QsclcmL+aDTzKM/cxAynwSaiAR/f+2rkmh150YURD9buDEOfAYLfn0bii/1fwaRXGwNv r/KCl79AV0gj7VBrE9TGDWA55pBDeQouQYLGbPwb/XQEZIPB/GWJOjvoHaO+mD7kYLcb EvnvlZp9C4CWUCISVqsaI12iwluP82r/M3b+ch5NZZ8sf3WLWgfe940F9GZ0FOXKa6sz spFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729189217; x=1729794017; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OujFCyRD9/bGHhZBxfS/h+Ld/xrgT3Vb5iFzLkw+eys=; b=R9yhpAT8Tmf8D2ebrX1kuTrkbvKSWwz+3IwLc46wHivIsuIBy1QY9WvEjAgfsLZGT0 4stEKh3C1h/Wjw3UD6XSUyEBS8nPMWoNh7Ec4LNpmtVOytUaBtBwSckNVbM43XfQc/Ny wMrMVI44jcjDI31Ify0VVVOie4L3rtNGakeAxElVWrnBCB+jDRIFxRnuBISmJXzbAy+S NNl7HXMgVLimffges6AIGQyokXCB7w9OeB2NGY0KekHnH78fgek0FD2YVjx/BGzZxlq4 JSrSsVrQ4vre7GJqMQ/FRPx2RBMpF446pepHs6JBOtYWK1k2jIxsQEWqUDP/+qPvnzDO ky3A== X-Forwarded-Encrypted: i=1; AJvYcCUXd7BRagrqI6aYbAOq31bxDq749H5l1kPnHVeZvikMvqdv57E55Nm0zS9cgyMhHkDoNm0KYRJH3r93Zf8npvQicypK@freebsd.org X-Gm-Message-State: AOJu0YwRG7QvGW7L3bTYyToCg0Oirmgla4sdFv82p4UJ3oLXe8s3zcYM CZntYfIFGIDoeHv824xZDcYpYEeTKoLBKQtA1yY9FLTspvLHebYOUUNIvsPrB5aZa5d2WuIFNNd wbPx+7zhtni3u7X79WoMvvCJevKShiQiT7YiW2Q== X-Google-Smtp-Source: AGHT+IHVNYrLW0Kl7tlopYDP05azYEkKTx3/Hx55VhqXvU1SJVNHT9GJS4aPAhmeIYQ71j0Sng3wiuGCcMaGJYPRxzM= X-Received: by 2002:a05:6a21:918b:b0:1d8:d6aa:995d with SMTP id adf61e73a8af0-1d905ea1dbbmr13140987637.1.1729189216811; Thu, 17 Oct 2024 11:20:16 -0700 (PDT) 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 References: <202410122058.49CKwkrP038188@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 17 Oct 2024 12:20:04 -0600 Message-ID: Subject: Re: git: 1a37caeb076b - main - modules: Add missing opt_*.h files for stand-alone compile To: Wolfram Schneider Cc: Warner Losh , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000049b280624b03d26" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XTx2p2XQLz4K9W X-Spamd-Bar: ---- --000000000000049b280624b03d26 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Oct 17, 2024, 11:29=E2=80=AFAM Wolfram Schneider wrote: > On Sat, 12 Oct 2024 at 22:58, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D1a37caeb076b9d31e13c54691d7f1ee= b589798bb > > > > commit 1a37caeb076b9d31e13c54691d7f1eeb589798bb > > Author: Warner Losh > > AuthorDate: 2024-10-12 20:40:41 +0000 > > Commit: Warner Losh > > CommitDate: 2024-10-12 20:40:41 +0000 > > > > modules: Add missing opt_*.h files for stand-alone compile > > > > Standalone compile that we at least create these opt_*.h files. > > > > Sponsored by: Netflix > > --- > > sys/modules/linux/Makefile | 2 ++ > > sys/modules/linux64/Makefile | 5 ++++- > > 2 files changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile > > index eb4e17ec706b..36dfbbe2192f 100644 > > --- a/sys/modules/linux/Makefile > > +++ b/sys/modules/linux/Makefile > > @@ -33,6 +33,7 @@ SRCS=3D linux${SFX}_dummy_machdep.c \ > > linux_uid16.c \ > > linux_vdso.c \ > > linux_xattr.c \ > > + opt_compat.h \ > > opt_inet.h \ > > opt_inet6.h \ > > opt_ktrace.h \ > > @@ -41,6 +42,7 @@ SRCS=3D linux${SFX}_dummy_machdep.c \ > > bus_if.h \ > > device_if.h \ > > vnode_if.h > > + > > .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D "amd= 64" > > SRCS+=3D linux_dummy_x86.c > > VDSODEPS=3Dlinux_vdso_gettc_x86.inc > > diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefil= e > > index b23891a65a4f..119d90126ab3 100644 > > --- a/sys/modules/linux64/Makefile > > +++ b/sys/modules/linux64/Makefile > > @@ -28,14 +28,17 @@ SRCS=3D linux_dummy_machdep.c \ > > linux_vdso.c \ > > linux_timer.c \ > > linux_xattr.c \ > > - opt_ktrace.h \ > > + opt_compat.h \ > > opt_inet6.h \ > > + opt_ktrace.h \ > > opt_posix.h \ > > + opt_usb.h \ > > bus_if.h \ > > device_if.h \ > > vnode_if.h \ > > linux_support.S \ > > linux_vdso_inc.S > > + > > .if ${MACHINE_CPUARCH} =3D=3D "amd64" > > SRCS+=3D linux_dummy_x86.c > > .endif > > After this commit I get stale symlinks in /usr/obj > > make -j$(nproc) buildworld > log.buildworld 2>&1; make -j$(nproc) > buildkernel >& log.buildkernel; > ./tools/build/stale-symlink-buildworld.sh > > amd64: > stale symlink detected: lrwxrwxr-x 1 wosch wheel 95 Oct 17 17:00 > > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sy= s/GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux/opt_com= pat.h > -> > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sy= s/GENERIC/opt_compat.h > > stale symlink detected: lrwxrwxr-x 1 wosch wheel 95 Oct 17 17:00 > > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sy= s/GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux64/opt_c= ompat.h > -> > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sy= s/GENERIC/opt_compat.h > > arm64: > stale symlink detected: lrwxr-xr-x 1 root wheel 73 Oct 17 17:18 > > /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/modules/home= /projects/freebsd-src/sys/modules/linux64/opt_compat.h > -> > /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/opt_compat.h > > see also PR: 276235 > The symlinks look right to me. What makes them stale? Warner > -Wolfram > > -- > Wolfram Schneider https://wolfram.schneider.org > --000000000000049b280624b03d26 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, 12 Oct 2024 at 22:58, War= ner Losh <imp@freebsd.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D1a37caeb076b9d31e13c54691d7f1e= eb589798bb
>
> commit 1a37caeb076b9d31e13c54691d7f1eeb589798bb
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2024-10-12 20:40:41 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-10-12 20:40:41 +0000
>
>=C2=A0 =C2=A0 =C2=A0modules: Add missing opt_*.h files for stand-alone = compile
>
>=C2=A0 =C2=A0 =C2=A0Standalone compile that we at least create these op= t_*.h files.
>
>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0Netflix
> ---
>=C2=A0 sys/modules/linux/Makefile=C2=A0 =C2=A0| 2 ++
>=C2=A0 sys/modules/linux64/Makefile | 5 ++++-
>=C2=A0 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile > index eb4e17ec706b..36dfbbe2192f 100644
> --- a/sys/modules/linux/Makefile
> +++ b/sys/modules/linux/Makefile
> @@ -33,6 +33,7 @@ SRCS=3D linux${SFX}_dummy_machdep.c \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_uid16.c \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_vdso.c \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_xattr.c \
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_compat.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0opt_inet.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0opt_inet6.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0opt_ktrace.h \
> @@ -41,6 +42,7 @@ SRCS=3D linux${SFX}_dummy_machdep.c \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bus_if.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0device_if.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0vnode_if.h
> +
>=C2=A0 .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUA= RCH} =3D=3D "amd64"
>=C2=A0 SRCS+=3D linux_dummy_x86.c
>=C2=A0 VDSODEPS=3Dlinux_vdso_gettc_x86.inc
> diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefi= le
> index b23891a65a4f..119d90126ab3 100644
> --- a/sys/modules/linux64/Makefile
> +++ b/sys/modules/linux64/Makefile
> @@ -28,14 +28,17 @@ SRCS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0linux_dummy_mach= dep.c \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_vdso.c \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_timer.c \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_xattr.c \
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_ktrace.h \
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_compat.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0opt_inet6.h \
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_ktrace.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0opt_posix.h \
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_usb.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bus_if.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0device_if.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0vnode_if.h \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_support.S \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_vdso_inc.S
> +
>=C2=A0 .if ${MACHINE_CPUARCH} =3D=3D "amd64"
>=C2=A0 SRCS+=3D linux_dummy_x86.c
>=C2=A0 .endif

After this commit I get stale symlinks in /usr/obj

make -j$(nproc) buildworld=C2=A0 > log.buildworld 2>&1; make -j$(= nproc)
buildkernel >& log.buildkernel;
./tools/build/stale-symlink-buildworld.sh

amd64:
stale symlink detected: lrwxrwxr-x=C2=A0 1 wosch wheel 95 Oct 17 17:00
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sys/= GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux/opt_compa= t.h
-> /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd6= 4/sys/GENERIC/opt_compat.h

stale symlink detected: lrwxrwxr-x=C2=A0 1 wosch wheel 95 Oct 17 17:00
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sys/= GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux64/opt_com= pat.h
-> /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd6= 4/sys/GENERIC/opt_compat.h

arm64:
stale symlink detected: lrwxr-xr-x=C2=A0 1 root wheel 73 Oct 17 17:18
/usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/modules/home/p= rojects/freebsd-src/sys/modules/linux64/opt_compat.h
-> /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/opt_comp= at.h

see also PR: 276235

The symlinks look right to me. What makes them stale?

Warner=C2=A0


-Wolfram

--
Wolfram Schneider <wosch@FreeBSD.org> https://wolfram.= schneider.org
--000000000000049b280624b03d26-- From nobody Thu Oct 17 18:26: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 4XTx9v0cxbz5ZKZM for ; Thu, 17 Oct 2024 18:26:27 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTx9t5k0dz4Kwm for ; Thu, 17 Oct 2024 18:26:26 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-431481433bdso13001545e9.3 for ; Thu, 17 Oct 2024 11:26:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729189585; x=1729794385; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jiJLYUIkBH+ZI7sxgAR9U39g0uj/5blLJCg17Z0ZbO4=; b=SH2nKXYhD1183qadvJ4wcXvZELwV1yKxAxTQPjKDisAa3xWeQNeslaVRb5Uph1i9Ta ft2ezT7cN+/wfI29kbQHkzKMdjj/8pd1Z5Ait7sxmKxhiIfyoEbXhnqeNSrx6cmFfK/F AcrAGbuDzt8x+3yjD/T3yhPY/yyxaJH9eZ0qGIbWSFq+diLjO5sgmye0Kl9i8On1/Wzg nKzOBlKQCjuUX9KaAk+23gVF22M+IqlbHbyp3dPkrxw8WGQHcLWn2LZbGJG/qT0C+6z5 9S4z0Jwzf9iSh3e0eIxBGQgAMC3/KZvfPC76niVkhETYxMCzItDFkiGIotDFWTT6H8xC Kqdg== X-Forwarded-Encrypted: i=1; AJvYcCUVn1AtsYqLwBJqWlJarLwcbSjDb213N56Qlzf9AWgsK/7Chh4Eou/rYMDpgec/8pM1jsWTxt5lNceNvxDOUCLW8gQb@freebsd.org X-Gm-Message-State: AOJu0YzmabSpnQhQp7cOa1stTZWRAHL2UAGfnuXqWvmUZMqgPhVC9dBd wiCdwq3RWWNLhMpJZj8TneEbH8gsLD2C4oRbQZ6S7f6knteMxbZdA6uxdf9UdS8= X-Google-Smtp-Source: AGHT+IFoJ8rD7iDgA8tOcJc3kN4iDrva5YFDoZ44bp2bwvM0Jkhexffe1WA1VEIMLbPyshY/W2fwKw== X-Received: by 2002:a05:600c:3d86:b0:431:5655:1ef3 with SMTP id 5b1f17b1804b1-4315655218dmr34132265e9.23.1729189584937; Thu, 17 Oct 2024 11:26:24 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431606d55a7sm3243225e9.39.2024.10.17.11.26.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Oct 2024 11:26:24 -0700 (PDT) Content-Type: text/plain; charset=utf-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 (Mac OS X Mail 16.0 \(3818.100.11.1.3\)) Subject: Re: git: 1a37caeb076b - main - modules: Add missing opt_*.h files for stand-alone compile From: Jessica Clarke In-Reply-To: Date: Thu, 17 Oct 2024 19:26:13 +0100 Cc: Wolfram Schneider , Warner Losh , src-committers , "" , "" Content-Transfer-Encoding: quoted-printable Message-Id: <8549EB6C-DB57-4ECC-8020-C799F9789D5F@freebsd.org> References: <202410122058.49CKwkrP038188@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3818.100.11.1.3) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4XTx9t5k0dz4Kwm X-Spamd-Bar: ---- On 17 Oct 2024, at 19:20, Warner Losh wrote: >=20 >=20 >=20 > On Thu, Oct 17, 2024, 11:29=E2=80=AFAM Wolfram Schneider = wrote: >> On Sat, 12 Oct 2024 at 22:58, Warner Losh wrote: >> > >> > The branch main has been updated by imp: >> > >> > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D1a37caeb076b9d31e13c54691d7f1eeb= 589798bb >> > >> > commit 1a37caeb076b9d31e13c54691d7f1eeb589798bb >> > Author: Warner Losh >> > AuthorDate: 2024-10-12 20:40:41 +0000 >> > Commit: Warner Losh >> > CommitDate: 2024-10-12 20:40:41 +0000 >> > >> > modules: Add missing opt_*.h files for stand-alone compile >> > >> > Standalone compile that we at least create these opt_*.h files. >> > >> > Sponsored by: Netflix >> > --- >> > sys/modules/linux/Makefile | 2 ++ >> > sys/modules/linux64/Makefile | 5 ++++- >> > 2 files changed, 6 insertions(+), 1 deletion(-) >> > >> > diff --git a/sys/modules/linux/Makefile = b/sys/modules/linux/Makefile >> > index eb4e17ec706b..36dfbbe2192f 100644 >> > --- a/sys/modules/linux/Makefile >> > +++ b/sys/modules/linux/Makefile >> > @@ -33,6 +33,7 @@ SRCS=3D linux${SFX}_dummy_machdep.c \ >> > linux_uid16.c \ >> > linux_vdso.c \ >> > linux_xattr.c \ >> > + opt_compat.h \ >> > opt_inet.h \ >> > opt_inet6.h \ >> > opt_ktrace.h \ >> > @@ -41,6 +42,7 @@ SRCS=3D linux${SFX}_dummy_machdep.c \ >> > bus_if.h \ >> > device_if.h \ >> > vnode_if.h >> > + >> > .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D = "amd64" >> > SRCS+=3D linux_dummy_x86.c >> > VDSODEPS=3Dlinux_vdso_gettc_x86.inc >> > diff --git a/sys/modules/linux64/Makefile = b/sys/modules/linux64/Makefile >> > index b23891a65a4f..119d90126ab3 100644 >> > --- a/sys/modules/linux64/Makefile >> > +++ b/sys/modules/linux64/Makefile >> > @@ -28,14 +28,17 @@ SRCS=3D linux_dummy_machdep.c \ >> > linux_vdso.c \ >> > linux_timer.c \ >> > linux_xattr.c \ >> > - opt_ktrace.h \ >> > + opt_compat.h \ >> > opt_inet6.h \ >> > + opt_ktrace.h \ >> > opt_posix.h \ >> > + opt_usb.h \ >> > bus_if.h \ >> > device_if.h \ >> > vnode_if.h \ >> > linux_support.S \ >> > linux_vdso_inc.S >> > + >> > .if ${MACHINE_CPUARCH} =3D=3D "amd64" >> > SRCS+=3D linux_dummy_x86.c >> > .endif >>=20 >> After this commit I get stale symlinks in /usr/obj >>=20 >> make -j$(nproc) buildworld > log.buildworld 2>&1; make -j$(nproc) >> buildkernel >& log.buildkernel; >> ./tools/build/stale-symlink-buildworld.sh >>=20 >> amd64: >> stale symlink detected: lrwxrwxr-x 1 wosch wheel 95 Oct 17 17:00 >> = /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sys= /GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux/opt_com= pat.h >> -> = /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sys= /GENERIC/opt_compat.h >>=20 >> stale symlink detected: lrwxrwxr-x 1 wosch wheel 95 Oct 17 17:00 >> = /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sys= /GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux64/opt_c= ompat.h >> -> = /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sys= /GENERIC/opt_compat.h >>=20 >> arm64: >> stale symlink detected: lrwxr-xr-x 1 root wheel 73 Oct 17 17:18 >> = /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/modules/home/= projects/freebsd-src/sys/modules/linux64/opt_compat.h >> -> = /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/opt_compat.h >>=20 >> see also PR: 276235 >=20 > The symlinks look right to me. What makes them stale? Given the script does find -H -type l, it=E2=80=99ll be that they point = to non-existent files. I don=E2=80=99t know what opt_compat.h is for = Netflix but there=E2=80=99s no such thing in-tree, these are the only references to = it. Jess From nobody Thu Oct 17 18:52: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 4XTxmJ2scgz5ZLrX; Thu, 17 Oct 2024 18:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTxmJ23WXz4PM3; Thu, 17 Oct 2024 18:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729191168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TRIuptZP01I7OHpnQhMiXyVm0LMWVDZ7kfDhGZ5/UBg=; b=Heu2douUVKobW2228lNecDLqfNYVTxgvyg1X1wd5T9nv+JpsCohSgsYF+iuon3y9pVbCb4 mOAdunr4aROIi7ZXq0bMQR5N8RPgWt7E3kH91Uf3ctXopUwHj4bmMFH1/68EDbfMkcYK0C J+xI5lavot2rvZHETZ5p3JEBzm5zOIJ8OtcFQ3RS7kR/AJCCGU9S7jkVbX+xu77XCrJf+9 dZSQJPFLL9kyF5YIqsbmBCtSnCGpaOFhVVgM/0d5QfSNwNBAPnVNYgkiVkc56ZG0p95ghI iRwBFt62XFMZKNyM4BzoQzSAwasAjG1CR6WGVrhVl7LLl5OLgzfvX7Qw42mE7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729191168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TRIuptZP01I7OHpnQhMiXyVm0LMWVDZ7kfDhGZ5/UBg=; b=tr1LDbW63nvdZ3qOL0CFRj4iAn2T+CgmsRQkcOdhr4H+8g0MQaMuUKR1ylUNZVjwSfM+hp NhzIybnmiRcRMKg9OJAngWxRYFTx5emScfiL1DotYL+uLntUlZm6Rz3O5lCtKqlaJssfHA WH1Mskuanj7vO7aMJW1dkl/nalJo1pNg1wecovJ0+0IBdKm1J/S/Xj2PrdYfhqBkw7MM5c nIKOPkJQyOq1fu2ZE4sC30Hnmdxy61mj8VhtmEjTBh9o8Cgk0wwf+iVd4sF2UGRlfnRMcc AQ0n318JdMaCwrmTAiFE71kvAv/KOu1GuFY5lV0zMBF2vrytWryzx2r2WHAjeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729191168; a=rsa-sha256; cv=none; b=l24XuToWznNlt/cy8+lUIwiy1hNPK1KdkQcFl3QAffxHIpSjxfHrV/FUBv+Z/tGLSZ/xa8 uIp68I5F4q/VlizA2R9U6mjA0Dpqcol+XIbzvXrkJHbmtWHNh4Gx4opl0+QrLhaqukQZT1 ON017dTv2d4MLkUGhM6+PMxm7VQKgXzrXrDZ7aBhmvsxp4Q3ESn9ay8IwwRPKbE1LRuQ9a thF+/q3vpEwDOU0qFq5E5HbmeSV5Azt1E3gfIP+hRduwwY3HieMsBmibUD8SljzsOvR9F+ byUba36cuSb8vvTNq/lusxWYjyBESNg3/ApXYgtUsK7Ii6yryxXHS9/0VNP3Ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTxmJ1fzqz12BF; Thu, 17 Oct 2024 18:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HIqm4r070783; Thu, 17 Oct 2024 18:52:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HIqmmo070780; Thu, 17 Oct 2024 18:52:48 GMT (envelope-from git) Date: Thu, 17 Oct 2024 18:52:48 GMT Message-Id: <202410171852.49HIqmmo070780@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: f11c79fc0046 - main - Revert "modules: Add missing opt_*.h files for stand-alone compile" 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: f11c79fc0046c1579faf7cdf6505c51846cc5709 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f11c79fc0046c1579faf7cdf6505c51846cc5709 commit f11c79fc0046c1579faf7cdf6505c51846cc5709 Author: Warner Losh AuthorDate: 2024-10-17 18:49:42 +0000 Commit: Warner Losh CommitDate: 2024-10-17 18:52:32 +0000 Revert "modules: Add missing opt_*.h files for stand-alone compile" This reverts commit 1a37caeb076b9d31e13c54691d7f1eeb589798bb. I'd overlooked 06c07e1203324bfe8ab4526c82dbb750864272d5 when I updated a branch I'd previously committed but not updated. My search for this in my tree before the commit was to a stale file... Sponsored by: Netflix --- sys/modules/linux/Makefile | 2 -- sys/modules/linux64/Makefile | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 36dfbbe2192f..eb4e17ec706b 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -33,7 +33,6 @@ SRCS= linux${SFX}_dummy_machdep.c \ linux_uid16.c \ linux_vdso.c \ linux_xattr.c \ - opt_compat.h \ opt_inet.h \ opt_inet6.h \ opt_ktrace.h \ @@ -42,7 +41,6 @@ SRCS= linux${SFX}_dummy_machdep.c \ bus_if.h \ device_if.h \ vnode_if.h - .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" SRCS+= linux_dummy_x86.c VDSODEPS=linux_vdso_gettc_x86.inc diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index 119d90126ab3..b23891a65a4f 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -28,17 +28,14 @@ SRCS= linux_dummy_machdep.c \ linux_vdso.c \ linux_timer.c \ linux_xattr.c \ - opt_compat.h \ - opt_inet6.h \ opt_ktrace.h \ + opt_inet6.h \ opt_posix.h \ - opt_usb.h \ bus_if.h \ device_if.h \ vnode_if.h \ linux_support.S \ linux_vdso_inc.S - .if ${MACHINE_CPUARCH} == "amd64" SRCS+= linux_dummy_x86.c .endif From nobody Thu Oct 17 18:56:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTxrH0MPdz5ZLsT for ; Thu, 17 Oct 2024 18:56:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTxrG31dGz4Q70 for ; Thu, 17 Oct 2024 18:56:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-20ca96a155cso10578505ad.2 for ; Thu, 17 Oct 2024 11:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1729191372; x=1729796172; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3TmtRkc4fIGIWeZ3Tia4qU0Ev/HoM+o8qxgVJWbJOFw=; b=yY50OwF7xBMd6Ne1yElGgPneJkyiyuxwaCZJJCOJCEPm9abESJ5E/s3Zl9P7sFU2UU YQoKPJqOpWkHzo6p/HV/qqp4s4xnzjGYEMcS1iNxCaQgOzxsJ+Uxzklb2l2PWhw7unhy bpJY7qg9AyB3YGxS5+05cTIu7erMly9nL/P+7DrzicyRWvZ4El0FRYSd7ImYBedni1+m UfeCTTIoF8ctqqr986mMh87Qa+0FslaL4mWfs1VR06Tb6pGFzi6OA4fpxwT7bZ+vwmWO X+o2O0esuQGZFdmQdZQkCKOmTkHdLePbaYXkTnQd3ImxiIJ3tqtC8JPR/xgff00ZDTCE em0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729191372; x=1729796172; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3TmtRkc4fIGIWeZ3Tia4qU0Ev/HoM+o8qxgVJWbJOFw=; b=u6NsNRJYssd6kcDfjXPX4KaFE/gKIqp1/+Aip866eMrura7IuxvRMw1twbkC/6rgRe xwdBRQPdA/vJH9dZhvdDnzTYsyII+FxNe8Jm2Je1RU+fgZybtHFicmWsV3PME5xULOOu 47t8Xw1YIBzFwl8u9NVfh6QRQHa24qFFWQIcKxyFVAOC7+TSWeskh2fP3qyldzIYqczV 6G0oiZhs8E6d5PZBS+sj4ipp+GWKDis/3IB5VGGnM9ZJ2pnXcO7KLtzdn4BXR+0/FfRC TNuZLpjNx9PCLRf7dsNOOUnPu/SqSv+HyajImYiH/oBc86/Gun6Vuhl77He5Xm+MrclS 7tjA== X-Forwarded-Encrypted: i=1; AJvYcCV0Jxp+N8QDuvE3mOWB8C81YzTWGEwfcT1n/XhhjYjeNVVX+H/rHyR5IRCNOzGjKI7Pp6fWN6pycUmNVcjpEp0tMGiw@freebsd.org X-Gm-Message-State: AOJu0Yxi/lVxVd1g4MP/fO/BboNf2ylOmQeNV4KCjLmfHkX/ZvqxBJ3S 0jnSBrUU4XATEKBYl1EkMJ1nJb/4O3N5T3qAvxDFH1JsmAO6K0tG2Eieg9clxSqK9QG8UuaHjAq q+gcGaiBtir3QyFfXwRMNmyOg8bhWOfeiI1y0eQ== X-Google-Smtp-Source: AGHT+IFqC/zoc+dyHRcP1E9JR5vtWhunFMT8yfqlCI8+95VeJSdhXm2uz41SWWm1cF9wtGT0Hj0r00+VXlKyASC7UjA= X-Received: by 2002:a05:6a21:150c:b0:1d9:2453:4343 with SMTP id adf61e73a8af0-1d9245346aemr2843211637.41.1729191372434; Thu, 17 Oct 2024 11:56:12 -0700 (PDT) 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 References: <202410122058.49CKwkrP038188@gitrepo.freebsd.org> <8549EB6C-DB57-4ECC-8020-C799F9789D5F@freebsd.org> In-Reply-To: <8549EB6C-DB57-4ECC-8020-C799F9789D5F@freebsd.org> From: Warner Losh Date: Thu, 17 Oct 2024 12:56:00 -0600 Message-ID: Subject: Re: git: 1a37caeb076b - main - modules: Add missing opt_*.h files for stand-alone compile To: Jessica Clarke Cc: Wolfram Schneider , Warner Losh , src-committers , "" , "" Content-Type: multipart/alternative; boundary="00000000000080cc240624b0bdcc" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XTxrG31dGz4Q70 X-Spamd-Bar: ---- --00000000000080cc240624b0bdcc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Oct 17, 2024 at 12:26=E2=80=AFPM Jessica Clarke wrote: > On 17 Oct 2024, at 19:20, Warner Losh wrote: > > > > > > > > On Thu, Oct 17, 2024, 11:29=E2=80=AFAM Wolfram Schneider > wrote: > >> On Sat, 12 Oct 2024 at 22:58, Warner Losh wrote: > >> > > >> > The branch main has been updated by imp: > >> > > >> > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D1a37caeb076b9d31e13c54691d7f1ee= b589798bb > >> > > >> > commit 1a37caeb076b9d31e13c54691d7f1eeb589798bb > >> > Author: Warner Losh > >> > AuthorDate: 2024-10-12 20:40:41 +0000 > >> > Commit: Warner Losh > >> > CommitDate: 2024-10-12 20:40:41 +0000 > >> > > >> > modules: Add missing opt_*.h files for stand-alone compile > >> > > >> > Standalone compile that we at least create these opt_*.h files. > >> > > >> > Sponsored by: Netflix > >> > --- > >> > sys/modules/linux/Makefile | 2 ++ > >> > sys/modules/linux64/Makefile | 5 ++++- > >> > 2 files changed, 6 insertions(+), 1 deletion(-) > >> > > >> > diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile > >> > index eb4e17ec706b..36dfbbe2192f 100644 > >> > --- a/sys/modules/linux/Makefile > >> > +++ b/sys/modules/linux/Makefile > >> > @@ -33,6 +33,7 @@ SRCS=3D linux${SFX}_dummy_machdep.c \ > >> > linux_uid16.c \ > >> > linux_vdso.c \ > >> > linux_xattr.c \ > >> > + opt_compat.h \ > >> > opt_inet.h \ > >> > opt_inet6.h \ > >> > opt_ktrace.h \ > >> > @@ -41,6 +42,7 @@ SRCS=3D linux${SFX}_dummy_machdep.c \ > >> > bus_if.h \ > >> > device_if.h \ > >> > vnode_if.h > >> > + > >> > .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D "= amd64" > >> > SRCS+=3D linux_dummy_x86.c > >> > VDSODEPS=3Dlinux_vdso_gettc_x86.inc > >> > diff --git a/sys/modules/linux64/Makefile > b/sys/modules/linux64/Makefile > >> > index b23891a65a4f..119d90126ab3 100644 > >> > --- a/sys/modules/linux64/Makefile > >> > +++ b/sys/modules/linux64/Makefile > >> > @@ -28,14 +28,17 @@ SRCS=3D linux_dummy_machdep.c \ > >> > linux_vdso.c \ > >> > linux_timer.c \ > >> > linux_xattr.c \ > >> > - opt_ktrace.h \ > >> > + opt_compat.h \ > >> > opt_inet6.h \ > >> > + opt_ktrace.h \ > >> > opt_posix.h \ > >> > + opt_usb.h \ > >> > bus_if.h \ > >> > device_if.h \ > >> > vnode_if.h \ > >> > linux_support.S \ > >> > linux_vdso_inc.S > >> > + > >> > .if ${MACHINE_CPUARCH} =3D=3D "amd64" > >> > SRCS+=3D linux_dummy_x86.c > >> > .endif > >> > >> After this commit I get stale symlinks in /usr/obj > >> > >> make -j$(nproc) buildworld > log.buildworld 2>&1; make -j$(nproc) > >> buildkernel >& log.buildkernel; > >> ./tools/build/stale-symlink-buildworld.sh > >> > >> amd64: > >> stale symlink detected: lrwxrwxr-x 1 wosch wheel 95 Oct 17 17:00 > >> > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sy= s/GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux/opt_com= pat.h > >> -> > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sy= s/GENERIC/opt_compat.h > >> > >> stale symlink detected: lrwxrwxr-x 1 wosch wheel 95 Oct 17 17:00 > >> > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sy= s/GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux64/opt_c= ompat.h > >> -> > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/sy= s/GENERIC/opt_compat.h > >> > >> arm64: > >> stale symlink detected: lrwxr-xr-x 1 root wheel 73 Oct 17 17:18 > >> > /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/modules/home= /projects/freebsd-src/sys/modules/linux64/opt_compat.h > >> -> > /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/opt_compat.h > >> > >> see also PR: 276235 > > > > The symlinks look right to me. What makes them stale? > > Given the script does find -H -type l, it=E2=80=99ll be that they point t= o > non-existent files. I don=E2=80=99t know what opt_compat.h is for Netflix= but > there=E2=80=99s no such thing in-tree, these are the only references to i= t. > Ah, but there use to be... I rebased a tree that had a number of similar cleanups across its removal and didn't notice. And my checks of my tree turned that file up, but I didn't notice it was in a tree I'd not built out of since before the change: commit 06c07e1203324bfe8ab4526c82dbb750864272d5 Author: Dmitry Chagin Date: Mon Feb 13 19:07:38 2023 +0300 Complete removal of opt_compat.h Since Linux emulation layer build options was removed there is no reaso= n to keep opt_compat.h. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38548 MFC after: 2 weeks So I've reverted since opt_usb.h was also removed from linuxulator. Warner --00000000000080cc240624b0bdcc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Oct 17, 2024 at 12:26=E2=80= =AFPM Jessica Clarke <jrtc27@freeb= sd.org> wrote:
On 17 Oct 2024, at 19:20, Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Thu, Oct 17, 2024, 11:29=E2=80=AFAM Wolfram Schneider <wosch@freebsd.org> w= rote:
>> On Sat, 12 Oct 2024 at 22:58, Warner Losh <imp@freebsd.org> wrote:
>> >
>> > The branch main has been updated by imp:
>> >
>> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D1a37caeb076b9d31e13c54691d7f1eeb= 589798bb
>> >
>> > commit 1a37caeb076b9d31e13c54691d7f1eeb589798bb
>> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>= ;
>> > AuthorDate: 2024-10-12 20:40:41 +0000
>> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>= ;
>> > CommitDate: 2024-10-12 20:40:41 +0000
>> >
>> >=C2=A0 =C2=A0 =C2=A0modules: Add missing opt_*.h files for sta= nd-alone compile
>> >
>> >=C2=A0 =C2=A0 =C2=A0Standalone compile that we at least create= these opt_*.h files.
>> >
>> >=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0Netflix
>> > ---
>> >=C2=A0 sys/modules/linux/Makefile=C2=A0 =C2=A0| 2 ++
>> >=C2=A0 sys/modules/linux64/Makefile | 5 ++++-
>> >=C2=A0 2 files changed, 6 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/M= akefile
>> > index eb4e17ec706b..36dfbbe2192f 100644
>> > --- a/sys/modules/linux/Makefile
>> > +++ b/sys/modules/linux/Makefile
>> > @@ -33,6 +33,7 @@ SRCS=3D linux${SFX}_dummy_machdep.c \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_uid16.c \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_vdso.c \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_xattr.c \
>> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_compat.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0opt_inet.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0opt_inet6.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0opt_ktrace.h \
>> > @@ -41,6 +42,7 @@ SRCS=3D linux${SFX}_dummy_machdep.c \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bus_if.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0device_if.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0vnode_if.h
>> > +
>> >=C2=A0 .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MAC= HINE_CPUARCH} =3D=3D "amd64"
>> >=C2=A0 SRCS+=3D linux_dummy_x86.c
>> >=C2=A0 VDSODEPS=3Dlinux_vdso_gettc_x86.inc
>> > diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux= 64/Makefile
>> > index b23891a65a4f..119d90126ab3 100644
>> > --- a/sys/modules/linux64/Makefile
>> > +++ b/sys/modules/linux64/Makefile
>> > @@ -28,14 +28,17 @@ SRCS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0linux_d= ummy_machdep.c \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_vdso.c \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_timer.c \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_xattr.c \
>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_ktrace.h \
>> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_compat.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0opt_inet6.h \
>> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_ktrace.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0opt_posix.h \
>> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_usb.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bus_if.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0device_if.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0vnode_if.h \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_support.S \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linux_vdso_inc.S
>> > +
>> >=C2=A0 .if ${MACHINE_CPUARCH} =3D=3D "amd64"
>> >=C2=A0 SRCS+=3D linux_dummy_x86.c
>> >=C2=A0 .endif
>>
>> After this commit I get stale symlinks in /usr/obj
>>
>> make -j$(nproc) buildworld=C2=A0 > log.buildworld 2>&1; = make -j$(nproc)
>> buildkernel >& log.buildkernel;
>> ./tools/build/stale-symlink-buildworld.sh
>>
>> amd64:
>> stale symlink detected: lrwxrwxr-x=C2=A0 1 wosch wheel 95 Oct 17 1= 7:00
>> /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.a= md64/sys/GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux/= opt_compat.h
>> -> /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/a= md64.amd64/sys/GENERIC/opt_compat.h
>>
>> stale symlink detected: lrwxrwxr-x=C2=A0 1 wosch wheel 95 Oct 17 1= 7:00
>> /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.a= md64/sys/GENERIC/modules/home/wosch/projects/freebsd-src/sys/modules/linux6= 4/opt_compat.h
>> -> /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/a= md64.amd64/sys/GENERIC/opt_compat.h
>>
>> arm64:
>> stale symlink detected: lrwxr-xr-x=C2=A0 1 root wheel 73 Oct 17 17= :18
>> /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC/modul= es/home/projects/freebsd-src/sys/modules/linux64/opt_compat.h
>> -> /usr/obj/home/projects/freebsd-src/arm64.aarch64/sys/GENERIC= /opt_compat.h
>>
>> see also PR: 276235
>
> The symlinks look right to me. What makes them stale?

Given the script does find -H -type l, it=E2=80=99ll be that they point to<= br> non-existent files. I don=E2=80=99t know what opt_compat.h is for Netflix b= ut
there=E2=80=99s no such thing in-tree, these are the only references to it.=

Ah, but there use to be...=C2=A0 I reb= ased a tree that had a number of similar cleanups across
its remo= val and didn't notice. And my checks of my tree turned that file up, bu= t I didn't
notice it was in a tree I'd not built out of s= ince before the change:

commit 06c07e1203324bfe8ab= 4526c82dbb750864272d5
Author: Dmitry Chagin <dchagin@FreeBSD.org><= br>Date: =C2=A0 Mon Feb 13 19:07:38 2023 +0300

=C2=A0 =C2=A0 Complet= e removal of opt_compat.h

=C2=A0 =C2=A0 Since Linux emulation layer = build options was removed there is no reason
=C2=A0 =C2=A0 to keep opt_c= ompat.h.

=C2=A0 =C2=A0 Reviewed by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0emaste
=C2=A0 =C2=A0 Differential Revision: =C2=A0https://reviews.freebsd.org/D38548=C2=A0 =C2=A0 MFC after: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= 2 weeks

So I've reverted since opt_usb.h w= as also removed from linuxulator.

Warner
--00000000000080cc240624b0bdcc-- From nobody Thu Oct 17 19:16: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 4XTyHH1BfGz5ZMyW; Thu, 17 Oct 2024 19:16:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTyHG04S6z4YDF; Thu, 17 Oct 2024 19:16:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 49HJG2oD073765; Thu, 17 Oct 2024 22:16:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 49HJG2oD073765 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 49HJG2LR073764; Thu, 17 Oct 2024 22:16:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 17 Oct 2024 22:16:02 +0300 From: Konstantin Belousov To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: cafc839393db - main - ciss: Ignore data over/under run on RECEIVE_DIAGNOSTIC Message-ID: References: <202410140540.49E5ep2I089300@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202410140540.49E5ep2I089300@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; HAS_XAW(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4XTyHG04S6z4YDF X-Spamd-Bar: -- On Mon, Oct 14, 2024 at 05:40:51AM +0000, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=cafc839393db5c5d8000fd086118b3c7b47e95c2 > > commit cafc839393db5c5d8000fd086118b3c7b47e95c2 > Author: Peter Eriksson > AuthorDate: 2024-10-14 04:01:33 +0000 > Commit: Warner Losh > CommitDate: 2024-10-14 05:22:19 +0000 > > ciss: Ignore data over/under run on RECEIVE_DIAGNOSTIC > > This appears to be harmless, so ignore data over/under run on > diagnostics. > > PR: 246279 > Reviewed by: imp > Tested by: Marek Zarychta > Differential Revision: https://reviews.freebsd.org/D25155 I am not sure what does the data overrun or underrun means in this context. But ciss(4) is very unhappy with an IOMMU turned on. It is so broken with it handling of DMA that controller even does not attach, causing faults and timing out. I did not tried to read the ciss code to see where the faults come from. From nobody Thu Oct 17 19:21: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 4XTyPP67v3z5ZNl7 for ; Thu, 17 Oct 2024 19:21:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTyPP4L0Bz4b5N for ; Thu, 17 Oct 2024 19:21:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7db90a28cf6so1698086a12.0 for ; Thu, 17 Oct 2024 12:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1729192888; x=1729797688; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZN4chF7Ng6AZCQhU2y8dN7hp2lulgkX1NsBk8m+Rkkc=; b=u2MsWwuP81sKeyi5lbRwUStqwemvV56lYvYfi2NecgxQg/ppcYFBu8O9gbrCCN5GBx GIidRRoDaNRhM8FH1S3yLDJQXl5ryp/V/boejCBrBn9CeUrmibJP55Q6ZpW9MrUFCUjr wgnWpUPY1LiJuESonK13EEZcgIWyua664UoK7yn2Yhke5jZhl7i+HXaRYFs6sbKDooJ0 Sk1sInFttwqKSTvFCYLyCQ0qDDIb50FCxfmHDDfozjl6RFV7uzGX9FixkmJHNhfpzjR0 n3pTa1HLpT1+Z/0xfEcSMoVWpqdMaOebrpoyks1Ko38t6WP/6S5SRM2pn8xpfzDnf5PQ bfgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729192888; x=1729797688; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZN4chF7Ng6AZCQhU2y8dN7hp2lulgkX1NsBk8m+Rkkc=; b=Nb0/7l5DABMTaKBNnts66XzWXE31ecmo9935WzjPqjR1x/xD+jT3U2fqSw5ZMaszRl 0HtI3bgyH1HBCl03v8soy0u7tyB1S1rBR+iJgC78C2fj27nlL4D9QbXGk6RO8v0tlOWS FWa0Af5jQEWtq0M1EFzUNkNDwBAIfPm4vMzjyFY2S/Oui4mg16fOS3wLQWzUuqSQGoKE yHR0FcUdiQLuz6unycCH0pjlQW3XehrmicizOfngI4KjFvAtOdK3BpcK9HBHEP//toD0 Put96SagrjGAf45yoxhsn2lKphT24kpwwn5hW6gISBkr1FWgnd7WVD0i2SK3M58yp2fI gmwA== X-Forwarded-Encrypted: i=1; AJvYcCXjJmUKcNmT59kBzy5T6e6FRMY/pFdgcjwMaVhlN9tUq1WsWEErs6iXQH+UnU59N0Hhp3Dn+4gquHa7caB+alxGkHDS@freebsd.org X-Gm-Message-State: AOJu0YyPgsKacqf0Rb3aVog6Fx3aAiFCriDemc1/xlRsnMOfA+w89H2y HNK/10Cbaen+8o8PMFSUGuHpVDMs7W+G01CJrI/tbml6Gk8e/JUeFkEedDlUAS2nE+A+xKkWULF fsYXtb/wFkIdn9uHVCIRevN9Daj80IrGFk11zEQ== X-Google-Smtp-Source: AGHT+IENP8p+tmlEzdsEsJcxX9Gr3CyMB/JCXwq+dR0aeafvT261TsUqGWPszJkyeKLosvcHzlO5m7Mo8MOTAeolgfk= X-Received: by 2002:a05:6a21:3a44:b0:1d7:1288:8338 with SMTP id adf61e73a8af0-1d92b66689cmr356022637.8.1729192888205; Thu, 17 Oct 2024 12:21:28 -0700 (PDT) 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 References: <202410140540.49E5ep2I089300@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 17 Oct 2024 13:21:17 -0600 Message-ID: Subject: Re: git: cafc839393db - main - ciss: Ignore data over/under run on RECEIVE_DIAGNOSTIC To: Konstantin Belousov Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000d9a0870624b11709" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XTyPP4L0Bz4b5N X-Spamd-Bar: ---- --000000000000d9a0870624b11709 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Oct 17, 2024 at 1:16=E2=80=AFPM Konstantin Belousov wrote: > On Mon, Oct 14, 2024 at 05:40:51AM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dcafc839393db5c5d8000fd086118b3c= 7b47e95c2 > > > > commit cafc839393db5c5d8000fd086118b3c7b47e95c2 > > Author: Peter Eriksson > > AuthorDate: 2024-10-14 04:01:33 +0000 > > Commit: Warner Losh > > CommitDate: 2024-10-14 05:22:19 +0000 > > > > ciss: Ignore data over/under run on RECEIVE_DIAGNOSTIC > > > > This appears to be harmless, so ignore data over/under run on > > diagnostics. > > > > PR: 246279 > > Reviewed by: imp > > Tested by: Marek Zarychta > > Differential Revision: https://reviews.freebsd.org/D25155 > I am not sure what does the data overrun or underrun means in this > context. But ciss(4) is very unhappy with an IOMMU turned on. It > is so broken with it handling of DMA that controller even does not > attach, causing faults and timing out. > That's a different problem. The under/overrun is technically correct, but expected due to flaws in the firmware (I think) for certain transfers when you don't know the size a-priori. So all the data the driver needs comes across, but the firmware knows it has more that it dropped on the floor so reports this status (I believe, again, don't have the hardware or the docs and puzzled this out reading the code doing the code review years ago, and haven't refreshed my memory since then). > I did not tried to read the ciss code to see where the faults come > from. > Yea, I don't have the hardware, so can't help there. This was in my backlog for people that do and have reported these patches work for them, but the age of the original ciss adapters suggest that it predates IOMMU deployment, so mistakes in that area would not surprise me. Warner --000000000000d9a0870624b11709 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Oct 17, 2024 at 1:16=E2=80=AF= PM Konstantin Belousov <kostikbel= @gmail.com> wrote:
On Mon, Oct 14, 2024 at 05:40:51AM +0000, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3Dcafc839393db5c5d8000fd086118b3c7b47e95c2<= /a>
>
> commit cafc839393db5c5d8000fd086118b3c7b47e95c2
> Author:=C2=A0 =C2=A0 =C2=A0Peter Eriksson <
pen@lysator.liu.se>
> AuthorDate: 2024-10-14 04:01:33 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-10-14 05:22:19 +0000
>
>=C2=A0 =C2=A0 =C2=A0ciss: Ignore data over/under run on RECEIVE_DIAGNOS= TIC
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0This appears to be harmless, so ignore data over/un= der run on
>=C2=A0 =C2=A0 =C2=A0diagnostics.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0PR: 246279
>=C2=A0 =C2=A0 =C2=A0Reviewed by: imp
>=C2=A0 =C2=A0 =C2=A0Tested by: Marek Zarychta
>=C2=A0 =C2=A0 =C2=A0Differential Revision: https://reviews.fre= ebsd.org/D25155
I am not sure what does the data overrun or underrun means in this
context.=C2=A0 But ciss(4) is very unhappy with an IOMMU turned on.=C2=A0 I= t
is so broken with it handling of DMA that controller even does not
attach, causing faults and timing out.

= That's a different problem. The under/overrun is technically correct,
but expected due to flaws in the firmware (I think) for certain tr= ansfers
when you don't know the size a-priori. So all the dat= a the driver
needs comes across, but the firmware knows it has mo= re that it
dropped on the floor so reports this status (I believe= , again, don't
have the hardware or the docs and puzzled this= out reading the code
doing the code review years ago, and haven&= #39;t refreshed my memory
since then).
=C2=A0
I did not tried to read the ciss code to see where the faults come
from.

Yea, I don't have the hardwar= e, so can't help there. This was in
my backlog for people tha= t do and have reported these patches
work for them, but the age o= f the original ciss adapters suggest that
it predates IOMMU deplo= yment, so mistakes in that area would not
surprise me.
=
Warner
--000000000000d9a0870624b11709-- From nobody Thu Oct 17 19:48: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 4XTz0x1hq3z5ZQ4B; Thu, 17 Oct 2024 19:48:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTz0w5LBXz4fj1; Thu, 17 Oct 2024 19:48:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729194528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0CrlmBLM2oHX9OYpfpSIzX9fUdgBMMTBbDGopvhWrM=; b=stHbmAcdRanlyvKo7tYo5uFkPrmbIU6EK8D5cnYi1fM/gq6tAqwxxg02yp8DITyqbth7Hd +3d9S9pqrK++U+fGQThP0CzDHCpRIagYPkjpMgHf16Me55oiiZ4kxHksZuP2nMFaOL7v8o 4LSe0f+05Hz+IIeXrbojWXSg9NFiVqCLsSc3b3RzQC1nKMdynPPRY7jmXYBjBx10YkFTQQ cqJVG1495L+xBFqAIdi4tVy7zZmqlNeDNkqbfO1h21fkJDHPBqwKJfhRZnzXhOBuSU9C6k Wa7crbV50pDZgRkWajHAjA9esUYcd5I2g5x1kT8e2BCSE19ZQqKvqjEgQzl/Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729194528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0CrlmBLM2oHX9OYpfpSIzX9fUdgBMMTBbDGopvhWrM=; b=rQSuI5jpwC4GEAz4iluo5Tgfq5r/hr46Wz+UHWBhZqZJHkgJoGJVKv8o5OyHCERUvzxztm 0jIQ6floBFplhsH3XqNFDjCXlYnjjjX0piADMAPRZecmEKNo0Hnt+ukBZUtjJyiuqiT4QQ 4zJhkvGEs2GH8tKStU+hiEC+9dh+NATRV7S34+L7zQGJfOZTUO51mSJ3dE3prrFIvST+57 5n6JjGFwSrxp6aoRlvzFk+dmBZ6g8IDNx/mhfYKu76GoABybL7nHUcPLANXO5Pfw5dNo8R xF9TP55WQpqipenpD88nz4saPCQTKBGc6YxVkLZ9LX0jCmmpHl9WlNPGMFsDdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729194528; a=rsa-sha256; cv=none; b=NK8+n1IcZFQ4Tv1biDjxL0oSxGXNR907KT0serGPDGTE/bOgSVuKusoz9A6CVR+GENF61/ pUNJZzIPuiBT0yY5dpq9l3JEz1oLn7WBq9/F7SsWkxSbFrx2kVp+mGndMae00upYeUDuP/ eNJc+dnR/SMG1kBNBMtZWWpID1ljHUV3z7DNCdetVQbx2I8FBL1uNFPfl81G+lf3oav8fL QHa/ql98Orb6kLuliI+aCb482q35RBMhhKgvWh0zA+HOQTB87w3vH6hHQejvjKKnPj1br5 qJ517CiE7UgZUeD0iqBsZTYgv0wAc72J8PE3+jcTkyD8HlxzkAHgcttNSLy4KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTz0w4pvYz13PY; Thu, 17 Oct 2024 19:48:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HJmmgR061622; Thu, 17 Oct 2024 19:48:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HJmmDa061619; Thu, 17 Oct 2024 19:48:48 GMT (envelope-from git) Date: Thu, 17 Oct 2024 19:48:48 GMT Message-Id: <202410171948.49HJmmDa061619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 545dbf9d5fad - main - iwn.4: move hardware to HARDWARE + minor cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 545dbf9d5fadfab591350c7c504b8e4bd113ba7b Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=545dbf9d5fadfab591350c7c504b8e4bd113ba7b commit 545dbf9d5fadfab591350c7c504b8e4bd113ba7b Author: Alexander Ziaee AuthorDate: 2024-10-17 19:29:34 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-17 19:48:16 +0000 iwn.4: move hardware to HARDWARE + minor cleanup Add devices supported by this driver to a HARDWARE section for inclusion in the release Hardware Compatibility Notes. While here: - add SPDX tag - add networking(7) cross-ref quick start guide - tweak examples for consistency MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47168 --- share/man/man4/iwn.4 | 106 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 68 insertions(+), 38 deletions(-) diff --git a/share/man/man4/iwn.4 b/share/man/man4/iwn.4 index 1d9f50c38fee..55692a5386a5 100644 --- a/share/man/man4/iwn.4 +++ b/share/man/man4/iwn.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 30, 2021 +.Dd October 17, 2024 .Dt IWN 4 .Os .Sh NAME @@ -87,38 +90,7 @@ iwn6050fw_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It Intel Centrino Advanced-N 6200 -.It Intel Centrino Advanced-N 6205 -.It Intel Centrino Advanced-N 6230 -.It Intel Centrino Advanced-N 6235 -.It Intel Centrino Advanced-N + WiMAX 6250 -.It Intel Centrino Ultimate-N 6300 -.It Intel Centrino Wireless-N 100 -.It Intel Centrino Wireless-N 105 -.It Intel Centrino Wireless-N 130 -.It Intel Centrino Wireless-N 135 -.It Intel Centrino Wireless-N 1000 -.It Intel Centrino Wireless-N 1030 -.It Intel Centrino Wireless-N 2200 -.It Intel Centrino Wireless-N 2230 -.It Intel Centrino Wireless-N 4965 -.It Intel Centrino Wireless-N 5100 -.It Intel Centrino Wireless-N 6150 -.It Intel Centrino Wireless-N 6200 -.It Intel Centrino Wireless-N 6250 -.It Intel Centrino Wireless-N + WiMAX 6150 -.It Intel Ultimate N WiFi Link 5300 -.It Intel Wireless WiFi Link 4965 -.It Intel WiFi Link 5100 -.It Intel WiMAX/WiFi Link 5150 -.It Intel WiMAX/WiFi Link 5350 -.El -.Pp -.Nm -supports +driver supports .Cm station and .Cm monitor @@ -130,27 +102,84 @@ For more information on configuring this device, see This driver requires the firmware built with the .Nm iwnfw module to work. +.Sh HARDWARE +The +.Nm +driver provides support for: +.Pp +.Bl -bullet -compact +.It +Intel Centrino Advanced-N 6200 +.It +Intel Centrino Advanced-N 6205 +.It +Intel Centrino Advanced-N 6230 +.It +Intel Centrino Advanced-N 6235 +.It +Intel Centrino Advanced-N + WiMAX 6250 +.It +Intel Centrino Ultimate-N 6300 +.It +Intel Centrino Wireless-N 100 +.It +Intel Centrino Wireless-N 105 +.It +Intel Centrino Wireless-N 130 +.It +Intel Centrino Wireless-N 135 +.It +Intel Centrino Wireless-N 1000 +.It +Intel Centrino Wireless-N 1030 +.It +Intel Centrino Wireless-N 2200 +.It +Intel Centrino Wireless-N 2230 +.It +Intel Centrino Wireless-N 4965 +.It +Intel Centrino Wireless-N 5100 +.It +Intel Centrino Wireless-N 6150 +.It +Intel Centrino Wireless-N 6200 +.It +Intel Centrino Wireless-N 6250 +.It +Intel Centrino Wireless-N + WiMAX 6150 +.It +Intel Ultimate N WiFi Link 5300 +.It +Intel Wireless WiFi Link 4965 +.It +Intel WiFi Link 5100 +.It +Intel WiMAX/WiFi Link 5150 +.It +Intel WiMAX/WiFi Link 5350 +.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Bd -literal -offset indent -ifconfig wlan create wlandev iwn0 inet 192.168.0.20 \e +# ifconfig wlan create wlandev iwn0 inet 192.168.0.20 \e netmask 0xffffff00 .Ed .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ql my_net : .Pp -.Dl "ifconfig wlan create wlandev iwn0 ssid my_net up" +.Dl # ifconfig wlan create wlandev iwn0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev iwn0 ssid my_net \e +# ifconfig wlan create wlandev iwn0 ssid my_net \e wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev iwn0 wlanmode adhoc ssid my_net \e +# ifconfig wlan create wlandev iwn0 wlanmode adhoc ssid my_net \e wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 .Ed .Sh DIAGNOSTICS @@ -191,6 +220,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS From nobody Thu Oct 17 19:48: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 4XTz0x6kwmz5ZPhL; Thu, 17 Oct 2024 19:48:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTz0x5vRpz4fwJ; Thu, 17 Oct 2024 19:48:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729194529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y7oXT+V29YMYiLDIRbtU/88y8N9kptwMFbtl0SXto3c=; b=HM/EGcnAvHUTb1mT5vmrRVhChXJ9aFjLff2kBQKtTxxa5X4HjNNi9QBeRTd/KcjhxvSMiu SxmWlgKg30F0J9RLTsYx3GZke5nErVkbvqzbiR/j5zj+uATC5pp6RXtC1gbjKdw4GK8mHB 1TQAXHOdfothqx/edY2ykUFpM1XJmv47xfijsPa7GhLhZ4Q03my6iKD4rCeeb9Onx/IGr8 bqTW1Sd69dxjnzvSQgT+CS6/gT4LTvuK5x678bHdFmevew4P1LQv+Oc7fTd3wNXKmPQNj+ +6SGTvKX3xYDEMV9oBOxZlbVg1DHS3nv3n4fg1Sqg8XWCpCIgIItMHQbMuwcIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729194529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y7oXT+V29YMYiLDIRbtU/88y8N9kptwMFbtl0SXto3c=; b=qMz/rLbqpetQs/j/5pz4fM1oGL6jXx0bWt+FW6UD5Q2MhtKFrEKCnqNmVzC1dvqeIwIazT W/yOuDyjyBM6acIZBtyDSn6sNwA/T+nG/gpUg7tGFjtxEEWLbTYpjse/vZ/Wqp7KF8/IfX Kwys1kzBqVl+70XBm1vp/+/cP2cfhQ0J4YtybUygNgJlVmEiqnVzSfO/pYwl8SbuxVApFe eNO81bJR+iqEKN+Jhc6M2tALCelUY94ugnknOuvU88dAtublOHLhwqekwAMw6GF4kd3Z0Q rzX33hRQpINu91F7c6BY5OEU2HQ7y7QgnLkobhZbvtwraIc+l6g+1ttGklwshg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729194529; a=rsa-sha256; cv=none; b=jOVYua6HPN951KHwgY0w0bqvC4t38Tkdocw9c4/wfeYKZlVn/rdzG31ESgWrboWphHo7k+ kFs9R4Feitng+QsXYCWYgAiDS8ysr6HEZzwqtIWNFiDJfKc0Qs0ZZoHWh6ny9Xv7byqS+z bfpgYUzhJ9Rn4dbzpP9Jnz3LcBQnCswa667m/MtIg+JSu+m8uR76ljZSOlfe9opABkmg2W idX92VNi5Dl0uIKYWsw5xpMWQfK3rHSnDLzAI96+86VUKrA6d6Dq1gPuhQMoEGe2entRc8 2kzw5fB/XRbQwC4oncviUIhIB/s+JmA9MOBPRmI9TeJowoghAql4rKAn0W7NAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTz0x5WgKz13W5; Thu, 17 Oct 2024 19:48:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HJmnKB061676; Thu, 17 Oct 2024 19:48:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HJmnLo061673; Thu, 17 Oct 2024 19:48:49 GMT (envelope-from git) Date: Thu, 17 Oct 2024 19:48:49 GMT Message-Id: <202410171948.49HJmnLo061673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: fa573868f187 - main - wpi.4: move hardware to HARDWARE + minor cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa573868f187956b384722a90392866769f4965a Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fa573868f187956b384722a90392866769f4965a commit fa573868f187956b384722a90392866769f4965a Author: Alexander Ziaee AuthorDate: 2024-10-17 19:38:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-17 19:48:16 +0000 wpi.4: move hardware to HARDWARE + minor cleanup Add devices supported by this driver to a HARDWARE section for generation in the Hardware Compatibility Notes. While here: - describe more consistently with product doc and rest of manual - consolidate basics in first paragraph of description - mention boot time configuration - cross-ref networking(7) quick start guide - zap deprecated Tn, macro in list width, and "Dq Li" => "Ql" - markup some unmarked elements - add SPDX tag MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47170 --- share/man/man4/wpi.4 | 54 ++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/share/man/man4/wpi.4 b/share/man/man4/wpi.4 index 8fe52cdc58eb..9d8d5fb1bd65 100644 --- a/share/man/man4/wpi.4 +++ b/share/man/man4/wpi.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2007 .\" Damien Bergamini . All rights reserved. .\" Benjamin Close . All rights reserved. @@ -26,12 +29,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 31, 2016 +.Dd October 17, 2024 .Dt WPI 4 .Os .Sh NAME .Nm wpi -.Nd "Intel 3945ABG Wireless LAN IEEE 802.11 driver" +.Nd Intel PRO/Wireless 3945ABG IEEE 802.11a/b/g network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -48,16 +51,13 @@ kernel configuration file: Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : -.Bd -literal -offset indent -if_wpi_load="YES" -.Ed +.Pp +.Dl if_wpi_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the -.Tn Intel -3945ABG Wireless network adapter. -The driver supports +driver supports running the +Intel PRO/Wireless 3945ABG network adapter in .Cm station , .Cm adhoc , .Cm adhoc-demo , @@ -65,6 +65,11 @@ The driver supports and .Cm monitor mode operation. +This driver requires the wpifw firmware module +and can be configured at runtime with +.Xr ifconfig 8 +or at boot in +.Xr rc.conf 5 . Only one virtual interface may be configured at any time. .Pp The @@ -81,17 +86,13 @@ The .Nm driver offloads both encryption and decryption of data frames to the hardware for the CCMP cipher. -.Pp -This driver requires the firmware built with the -.Nm wpifw 4 -module to work. -.Pp +.Sh HARDWARE The .Nm -driver can be configured at runtime with -.Xr ifconfig 8 . +driver provides support for the +Intel PRO/Wireless 3945ABG Mini PCIe network adapter. .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_wpi.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_wpi.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_wpi.LICENSE .Nm firmware license @@ -104,7 +105,7 @@ ifconfig wlan0 create wlandev wpi0 inet 192.168.0.20 \e .Ed .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp .Dl "ifconfig wlan0 create wlandev wpi0 ssid my_net up" .Pp @@ -122,7 +123,7 @@ ifconfig wlan0 create wlandev wpi0 wlanmode adhoc ssid my_net \e .Ed .Pp Join/create an 802.11b IBSS network with network name -.Dq Li my_net : +.Ar my_net : .Bd -literal -offset indent ifconfig wlan0 create wlandev wpi0 wlanmode adhoc ifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e @@ -141,9 +142,7 @@ ifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e The driver failed to load the firmware image using the .Xr firmware 9 subsystem. -Verify the -.Xr wpifw 4 -firmware module is installed. +Verify the wpifw firmware module is installed. .It "wpi%d: %s: timeout waiting for adapter to initialize, error %d" The onboard microcontroller failed to initialize in time. This should not happen. @@ -189,7 +188,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , -.Xr wpifw 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 @@ -207,10 +206,11 @@ ported to .Fx . .Sh CAVEATS -Hostap mode is not directly supported by the device; +.Cm Hostap +mode is not directly supported by the device; it is implemented through IBSS mode (as a result, DFS/passive channels are not available in this mode). .Pp -Powersave may be unstable on some networks (results in -occasional 'wpi%d: device timeout' messages); you can try -to disable it to improve device stability. +Powersave may be unstable on some networks +.Po results in occasional Sy 'wpi%d: device timeout' No messages Pc ; +you can try to disable it to improve device stability. From nobody Thu Oct 17 19:49:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTz1f6vdvz5ZQ1c; Thu, 17 Oct 2024 19:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTz1f61Zxz4gjK; Thu, 17 Oct 2024 19:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729194566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6as6WZ3x+Q6VT55EALkMvntZtEC2x+norRUoRNP0Hc=; b=SnufC+/BIZae5IjRVkjme8mc0vG5sb3XspFgN/N8hDLo5/UeUOU9ZSJXQwUdAyXN/KqcFP CQUKe8OJjM07M4AsJD7qjEmiMBI+gTnPoutOy0sSWBCJIpcKWlMMyEUSmcMC9XPHRujyig hRT9uk5hXLzzZxqQ/zjQIlwpcyq/WQUcEO6iF/ESCB+PocVBo0TSgb7PvvbXX3pYmW4MI2 sh2zrKlGTAbTB0ojcOFZYqWNT3alrQPh6XlwRoDYORePbrXsbSlgzwhKZjKUi3omBN7JNW ZjnbUOZz7Nef9X2rMlmfQfJZBeLkRTLDfR29VTnIXRgrIKQ/6IihFOfe+dwfng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729194566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6as6WZ3x+Q6VT55EALkMvntZtEC2x+norRUoRNP0Hc=; b=iuUe3f0QUMMWom1iAR8Cwvt5CYA91xOkx07+2N7vM+pmOeabF7q5IV6APFGQSepMKzg/h2 UXZTCn932agUVOoUHtWoXzJp5OXYfnLxA5GzaSnBlEZUGbIx/MhMGYRdzEwt8MlQURcEGX c9xbR5CA9fw09Uuq8sq6CaFPjHwran79tqYX4dTMrlX7ipiQC23SynzpGo5amiyWpIeIG4 CmCRb1uYrFjAart1ngQLoE35kwm8jyxRzFyWYhW11/dJDQlaMbMkABvNpFWg1Qdh8BO3X3 o0jLnG91QVQvQbpuyiPek9YttkTHyfPCIzUbrJPINxryeeK6T8Ortjper4QspQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729194566; a=rsa-sha256; cv=none; b=DreA1qoZFWTEUSCOy1HAxaYXulKhHZggi1b+028eM8yhMSEOQ+CVX+tyG6y/ZpT9ak0VRH CUtuZT/3cNuhZAfKEC9KXyFHbTzapZvjBQlxCsSEKZ3lvZsgoH4teuiRNA6084pYndkFoO IJyS9nuprEBAWvTU4rI9DWoACMKNKjMvNzwCnphaS+b8a13xTZuj8Gk/HJUVLoPS9aDoCY ROSFn/6dqyh5RLzYIItF7gYfdIbIacH70ABpp43l7nOkowr9XpTX7RUs6hGGE2wLjfqdaB 8EIAbMao/1ERxcaKzB75iXPZKEuk0bTHlr1qblglrCZaZewycNzO+pMM9j1FaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTz1f5cJLz13K8; Thu, 17 Oct 2024 19:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HJnQcm061965; Thu, 17 Oct 2024 19:49:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HJnQ2R061962; Thu, 17 Oct 2024 19:49:26 GMT (envelope-from git) Date: Thu, 17 Oct 2024 19:49:26 GMT Message-Id: <202410171949.49HJnQ2R061962@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: dac5a2024bc8 - stable/13 - loader: Change version calculation to be more consistent. 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/13 X-Git-Reftype: branch X-Git-Commit: dac5a2024bc8bed379d3db861580056d0c670fdc Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dac5a2024bc8bed379d3db861580056d0c670fdc commit dac5a2024bc8bed379d3db861580056d0c670fdc Author: Stephen J. Kiernan AuthorDate: 2023-04-17 23:27:54 +0000 Commit: Warner Losh CommitDate: 2024-10-17 19:08:21 +0000 loader: Change version calculation to be more consistent. Use 1000 * major + minor when calculating the version number that gets set in the Ficl environment or lua loader property. This allows for more room if the minor number needs to go above 9. Add loader.version property to lua loader. PR: 282001 Reviewed by: imp Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39631 (cherry picked from commit a50d73d5782a351ad83e8d1f84d11720a12e70d3) --- stand/common/bootstrap.h | 1 + stand/common/interp_forth.c | 1 - stand/common/newvers.sh | 2 +- stand/liblua/lutils.c | 2 ++ 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index 02ddfb84b050..4afab2efa781 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -180,6 +180,7 @@ extern int isapnp_readport; * Version information */ extern char bootprog_info[]; +extern unsigned bootprog_rev; /* * Interpreter information diff --git a/stand/common/interp_forth.c b/stand/common/interp_forth.c index 0c2829c9717e..0320e081d406 100644 --- a/stand/common/interp_forth.c +++ b/stand/common/interp_forth.c @@ -31,7 +31,6 @@ #include "bootstrap.h" #include "ficl.h" -extern unsigned bootprog_rev; INTERP_DEFINE("4th"); /* #define BFORTH_DEBUG */ diff --git a/stand/common/newvers.sh b/stand/common/newvers.sh index ee7678597b7a..0f30b1a4a744 100755 --- a/stand/common/newvers.sh +++ b/stand/common/newvers.sh @@ -55,6 +55,6 @@ fi cat > $tempfile < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: e38b4c031cf8 - stable/14 - 14.2: Update stable/14 to -PRERELEASE 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e38b4c031cf894979f4eed9edee83f962cebb0ec Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e38b4c031cf894979f4eed9edee83f962cebb0ec commit e38b4c031cf894979f4eed9edee83f962cebb0ec Author: Colin Percival AuthorDate: 2024-10-18 00:07:44 +0000 Commit: Colin Percival CommitDate: 2024-10-18 00:07:44 +0000 14.2: Update stable/14 to -PRERELEASE This marks the start of the FreeBSD 14.2 release cycle; the stable/14 tree is now in "code slush". Developers are encouraged to prioritize fixing bugs (and/or merging bug fixes from HEAD) over new features at this time. Commit approval from re@ is not required but if new features introduce problems they may be removed from the release. Approved by: re (implicit) Sponsored by: Amazon --- sys/conf/newvers.sh | 4 ++-- usr.bin/yacc/config.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 3edff3630ae3..9176ee00e9e3 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -52,8 +52,8 @@ # TYPE="FreeBSD" -REVISION="14.1" -BRANCH="STABLE" +REVISION="14.2" +BRANCH="PRERELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi diff --git a/usr.bin/yacc/config.h b/usr.bin/yacc/config.h index 16c6abfc32f5..04ead1f045c9 100644 --- a/usr.bin/yacc/config.h +++ b/usr.bin/yacc/config.h @@ -92,7 +92,7 @@ /* #undef STDC_NORETURN */ /* Define to the system name. */ -#define SYSTEM_NAME "freebsd14.1" +#define SYSTEM_NAME "freebsd14.2" /* "Define to 1 if you want to use dbmalloc for testing." */ /* #undef USE_DBMALLOC */ From nobody Fri Oct 18 01:42:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XV6rl0HNKz5Zk0Y; Fri, 18 Oct 2024 01:42:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XV6rl05k8z4D5N; Fri, 18 Oct 2024 01:42:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729215735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=18K339iF+9zr5G75kcyQ82CloU803waHpZuRz7Sx1q4=; b=AD3stegWmxjOvlFi0u5b8kY9zHP3lLPHg0JHj+3ooEMuBpr3smeb0Y1ffxjc0s7n2PzklL HhVgPLqsiDrQQnNroUDKFUKEDN3CDzHQPelLmTeObIZcYzlV6CuhV0S+sCB/eCPHNS5gfQ mGq06sfi/WFvJGWabFuLGuCLBJuVrv9jiZI4HKYZpEDQ7p/US2QfErfPoEO6Dvs0IkgBXI R0qmixgnNaRGBsy5d1cDUBRZie0XXtn2P1eEA4k9sJBtelkHe0lIyZNIwKoWLTbz9FYFGm 3bQp7oDbfxDe05PJvSwDSIiad6S/ePw/TCW4cjza2FjhdD3d7FWfr4hm5nQFeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729215735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=18K339iF+9zr5G75kcyQ82CloU803waHpZuRz7Sx1q4=; b=RBbFnKdb45+eOkDxMdYPar3ZmNFv6TZhnNGPmZBdKcRcNREwxeC6vgr9yuZMTnwVQPpJf7 Bv8CaaS9UAV2ft0HPcSZbJufuQqIlqYggwGb8tpLcaqGjVKhUWFSFa1YfYll8+pWupJVOS yY5w3Uy/fvhWPaZHbB/v9eJZzVobB/qkKfyO0Hu5FaQGpun8wiKZ+/96tC8TpoQ2OQVal2 y56EV1BaV0CgZrheU2sk6ithNMjpEzcko9es7vmX6Szs2XMDTbFq6pz/sfj7B7xh+L2wt6 HXeXOTrwS24uqlfMSWhDHRDguCzVTySvgt6dwngYaz0wjRlKC75sgYB6oxlSFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729215735; a=rsa-sha256; cv=none; b=F26MtfhVg8igqefPUrL6fmezU2Hr44fbVyq1B5Y6UXUPHpzeB2EK9ygFMAIBPxb5aqJp1a ODR6wkYAhdA4f9b+7tf7QHhdKpOielC21SLlc6zNPhqD4mrYQwXxwwvNBamRbhnke1VcxE UUYvXW4Pc1RtdkeZkDGho7q5t81bs1CFPeiFTouL5/6PnGZvKzEsI2NAEVPzwVG6TOkxX/ 28jjWQUJMNVafpa8Diq6b1sZzSE1HGNIWCCxJCoVIu0cgx4OgS87MfUU3/8xHXgiHEIuxX zanZLkJhlgOaoTHvosCJqD/IWt1HtJn/q5BpOHWyshvUjY/Lf/VQ0tXBLw/c4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XV6rk6pM5zF4k; Fri, 18 Oct 2024 01:42:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I1gEeV068499; Fri, 18 Oct 2024 01:42:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I1gE0Q068496; Fri, 18 Oct 2024 01:42:14 GMT (envelope-from git) Date: Fri, 18 Oct 2024 01:42:14 GMT Message-Id: <202410180142.49I1gE0Q068496@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 49f12d5b38f6 - stable/14 - e1000: Re-add AIM 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49f12d5b38f6bbc66a81438b9bc7ed21af3be39c Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=49f12d5b38f6bbc66a81438b9bc7ed21af3be39c commit 49f12d5b38f6bbc66a81438b9bc7ed21af3be39c Author: Kevin Bowling AuthorDate: 2024-09-22 09:26:05 +0000 Commit: Kevin Bowling CommitDate: 2024-10-18 01:41:56 +0000 e1000: Re-add AIM We originally left this out because iflib modulates interrupts and accomplishes some level of batching versus the custom queues in the older driver. Upon more detailed study of the Linux driver which has a newer implementation, it finally became clear to me this is actually a holdoff timer and not an interrupt limit as it is conventionally (statically) programmed and displayed as an interrupt rate. The data sheets also make this somewhat clear. Thus, AIM accomplishes two beneficial things for a wide variety of workloads[1]: 1. At low throughput/packet rates, it will significantly lower latency (by counter-intuitively "increasing" the interrupt rate.. better thought of as decreasing the holdoff timer because you will modulate down before coming anywhere near these interrupt rates). 2. At bulk data rates, it is tuned to achieve a lower interrupt rate (by increasing the holdoff timer) than the current static 8000/s. This decreases processing overhead and yields more headroom for other work such as packet filters or userland. For a single NIC this might be worth a few sys% on common CPUs, but may be meaningful when multiplied such as if_lagg, if_bridge and forwarding setups. The AIM algorithm was re-introduced from the older igb or out of tree driver, and then modernized with permission to use Intel code from other drivers. I have retroactively added it to lem(4) and em(4) where the same concept applies, albeit to a single ITR register. [1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/gbe-controllers-interrupt-moderation-appl-note.pdf Tested by: cc (https://wiki.freebsd.org/chengcui/testD46768) Relnotes: yes Sponsored by: Rubicon Communications, LLC ("Netgate") Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D46768 (cherry picked from commit 3e501ef896671cb190e8c40c6258b8f27d136f07) --- sys/dev/e1000/em_txrx.c | 10 ++ sys/dev/e1000/if_em.c | 269 ++++++++++++++++++++++++++++++++++++++++++++++- sys/dev/e1000/if_em.h | 28 +++-- sys/dev/e1000/igb_txrx.c | 4 + 4 files changed, 299 insertions(+), 12 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index eec198df7466..6e8fff07cd82 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -455,6 +455,10 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); pi->ipi_new_pidx = i; + /* Sent data accounting for AIM */ + txr->tx_bytes += pi->ipi_len; + ++txr->tx_packets; + return (0); } @@ -669,6 +673,7 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) len = le16toh(rxd->length); ri->iri_len += len; + rxr->rx_bytes += ri->iri_len; eop = (status & E1000_RXD_STAT_EOP) != 0; @@ -690,6 +695,8 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) i++; } while (!eop); + rxr->rx_packets++; + if (scctx->isc_capenable & IFCAP_RXCSUM) em_receive_checksum(status, errors, ri); @@ -732,6 +739,7 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) len = le16toh(rxd->wb.upper.length); ri->iri_len += len; + rxr->rx_bytes += ri->iri_len; eop = (staterr & E1000_RXD_STAT_EOP) != 0; @@ -752,6 +760,8 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) i++; } while (!eop); + rxr->rx_packets++; + if (scctx->isc_capenable & IFCAP_RXCSUM) em_receive_checksum(staterr, staterr >> 24, ri); diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index b9c6131e6741..22578a3d8655 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1,8 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * + * Copyright (c) 2001-2024, Intel Corporation * Copyright (c) 2016 Nicole Graziano - * All rights reserved. + * Copyright (c) 2024 Kevin Bowling * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -329,10 +330,12 @@ static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS); static int em_get_rs(SYSCTL_HANDLER_ARGS); static void em_print_debug_info(struct e1000_softc *); static int em_is_valid_ether_addr(u8 *); +static void em_newitr(struct e1000_softc *, struct em_rx_queue *, + struct tx_ring *, struct rx_ring *); static bool em_automask_tso(if_ctx_t); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); static void em_add_int_delay_sysctl(struct e1000_softc *, const char *, - const char *, struct em_int_delay_info *, int, int); + const char *, struct em_int_delay_info *, int, int); /* Management and WOL Support */ static void em_init_manageability(struct e1000_softc *); static void em_release_manageability(struct e1000_softc *); @@ -545,10 +548,19 @@ static int eee_setting = 1; SYSCTL_INT(_hw_em, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &eee_setting, 0, "Enable Energy Efficient Ethernet"); +/* + * AIM: Adaptive Interrupt Moderation + * which means that the interrupt rate is varied over time based on the + * traffic for that interrupt vector + */ +static int em_enable_aim = 1; +SYSCTL_INT(_hw_em, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &em_enable_aim, + 0, "Enable adaptive interrupt moderation (1=normal, 2=lowlatency)"); + /* ** Tuneable Interrupt rate */ -static int em_max_interrupt_rate = EM_INTS_PER_SEC; +static int em_max_interrupt_rate = EM_INTS_DEFAULT; SYSCTL_INT(_hw_em, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &em_max_interrupt_rate, 0, "Maximum interrupts per second"); @@ -832,6 +844,11 @@ em_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW, sc, 0, em_sysctl_nvm_info, "I", "NVM Information"); + sc->enable_aim = em_enable_aim; + SYSCTL_ADD_INT(ctx_list, child, OID_AUTO, "enable_aim", + CTLFLAG_RW, &sc->enable_aim, 0, + "Interrupt Moderation (1=normal, 2=lowlatency)"); + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, em_sysctl_print_fw_version, "A", @@ -1437,6 +1454,159 @@ em_if_init(if_ctx_t ctx) } } +enum itr_latency_target { + itr_latency_disabled = 0, + itr_latency_lowest = 1, + itr_latency_low = 2, + itr_latency_bulk = 3 +}; +/********************************************************************* + * + * Helper to calculate next (E)ITR value for AIM + * + *********************************************************************/ +static void +em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, + struct tx_ring *txr, struct rx_ring *rxr) +{ + struct e1000_hw *hw = &sc->hw; + u32 newitr; + u32 bytes; + u32 bytes_packets; + u32 packets; + u8 nextlatency; + + /* Idle, do nothing */ + if ((txr->tx_bytes == 0) && (rxr->rx_bytes == 0)) + return; + + newitr = 0; + + if (sc->enable_aim) { + nextlatency = rxr->rx_nextlatency; + + /* Use half default (4K) ITR if sub-gig */ + if (sc->link_speed != 1000) { + newitr = EM_INTS_4K; + goto em_set_next_itr; + } + /* Want at least enough packet buffer for two frames to AIM */ + if (sc->shared->isc_max_frame_size * 2 > (sc->pba << 10)) { + newitr = em_max_interrupt_rate; + sc->enable_aim = 0; + goto em_set_next_itr; + } + + /* Get the largest values from the associated tx and rx ring */ + if (txr->tx_bytes && txr->tx_packets) { + bytes = txr->tx_bytes; + bytes_packets = txr->tx_bytes/txr->tx_packets; + packets = txr->tx_packets; + } + if (rxr->rx_bytes && rxr->rx_packets) { + bytes = max(bytes, rxr->rx_bytes); + bytes_packets = max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); + packets = max(packets, rxr->rx_packets); + } + + /* Latency state machine */ + switch (nextlatency) { + case itr_latency_disabled: /* Bootstrapping */ + nextlatency = itr_latency_low; + break; + case itr_latency_lowest: /* 70k ints/s */ + /* TSO and jumbo frames */ + if (bytes_packets > 8000) + nextlatency = itr_latency_bulk; + else if ((packets < 5) && (bytes > 512)) + nextlatency = itr_latency_low; + break; + case itr_latency_low: /* 20k ints/s */ + if (bytes > 10000) { + /* Handle TSO */ + if (bytes_packets > 8000) + nextlatency = itr_latency_bulk; + else if ((packets < 10) || (bytes_packets > 1200)) + nextlatency = itr_latency_bulk; + else if (packets > 35) + nextlatency = itr_latency_lowest; + } else if (bytes_packets > 2000) { + nextlatency = itr_latency_bulk; + } else if (packets < 3 && bytes < 512) { + nextlatency = itr_latency_lowest; + } + break; + case itr_latency_bulk: /* 4k ints/s */ + if (bytes > 25000) { + if (packets > 35) + nextlatency = itr_latency_low; + } else if (bytes < 1500) + nextlatency = itr_latency_low; + break; + default: + nextlatency = itr_latency_low; + device_printf(sc->dev, "Unexpected newitr transition %d\n", + nextlatency); + break; + } + + /* Trim itr_latency_lowest for default AIM setting */ + if (sc->enable_aim == 1 && nextlatency == itr_latency_lowest) + nextlatency = itr_latency_low; + + /* Request new latency */ + rxr->rx_nextlatency = nextlatency; + } else { + /* We may have toggled to AIM disabled */ + nextlatency = itr_latency_disabled; + rxr->rx_nextlatency = nextlatency; + } + + /* ITR state machine */ + switch(nextlatency) { + case itr_latency_lowest: + newitr = EM_INTS_70K; + break; + case itr_latency_low: + newitr = EM_INTS_20K; + break; + case itr_latency_bulk: + newitr = EM_INTS_4K; + break; + case itr_latency_disabled: + default: + newitr = em_max_interrupt_rate; + break; + } + +em_set_next_itr: + if (hw->mac.type >= igb_mac_min) { + newitr = IGB_INTS_TO_EITR(newitr); + + if (hw->mac.type == e1000_82575) + newitr |= newitr << 16; + else + newitr |= E1000_EITR_CNT_IGNR; + + if (newitr != que->itr_setting) { + que->itr_setting = newitr; + E1000_WRITE_REG(hw, E1000_EITR(que->msix), que->itr_setting); + } + } else { + newitr = EM_INTS_TO_ITR(newitr); + + if (newitr != que->itr_setting) { + que->itr_setting = newitr; + if (hw->mac.type == e1000_82574 && que->msix) { + E1000_WRITE_REG(hw, + E1000_EITR_82574(que->msix), que->itr_setting); + } else { + E1000_WRITE_REG(hw, E1000_ITR, que->itr_setting); + } + } + } +} + /********************************************************************* * * Fast Legacy/MSI Combined Interrupt Service routine @@ -1446,10 +1616,14 @@ int em_intr(void *arg) { struct e1000_softc *sc = arg; + struct e1000_hw *hw = &sc->hw; + struct em_rx_queue *que = &sc->rx_queues[0]; + struct tx_ring *txr = &sc->tx_queues[0].txr; + struct rx_ring *rxr = &que->rxr; if_ctx_t ctx = sc->ctx; u32 reg_icr; - reg_icr = E1000_READ_REG(&sc->hw, E1000_ICR); + reg_icr = E1000_READ_REG(hw, E1000_ICR); /* Hot eject? */ if (reg_icr == 0xffffffff) @@ -1463,7 +1637,7 @@ em_intr(void *arg) * Starting with the 82571 chip, bit 31 should be used to * determine whether the interrupt belongs to us. */ - if (sc->hw.mac.type >= e1000_82571 && + if (hw->mac.type >= e1000_82571 && (reg_icr & E1000_ICR_INT_ASSERTED) == 0) return FILTER_STRAY; @@ -1482,6 +1656,15 @@ em_intr(void *arg) if (reg_icr & E1000_ICR_RXO) sc->rx_overruns++; + if (hw->mac.type >= e1000_82540) + em_newitr(sc, que, txr, rxr); + + /* Reset state */ + txr->tx_bytes = 0; + txr->tx_packets = 0; + rxr->rx_bytes = 0; + rxr->rx_packets = 0; + return (FILTER_SCHEDULE_THREAD); } @@ -1534,9 +1717,20 @@ static int em_msix_que(void *arg) { struct em_rx_queue *que = arg; + struct e1000_softc *sc = que->sc; + struct tx_ring *txr = &sc->tx_queues[que->msix].txr; + struct rx_ring *rxr = &que->rxr; ++que->irqs; + em_newitr(sc, que, txr, rxr); + + /* Reset state */ + txr->tx_bytes = 0; + txr->tx_packets = 0; + rxr->rx_bytes = 0; + rxr->rx_packets = 0; + return (FILTER_SCHEDULE_THREAD); } @@ -2882,6 +3076,9 @@ em_reset(if_ctx_t ctx) if (hw->mac.type >= igb_mac_min) igb_init_dmac(sc, pba); + /* Save the final PBA off if it needs to be used elsewhere i.e. AIM */ + sc->pba = pba; + E1000_WRITE_REG(hw, E1000_VET, ETHERTYPE_VLAN); e1000_get_phy_info(hw); e1000_check_for_link(hw); @@ -3741,6 +3938,7 @@ em_if_intr_enable(if_ctx_t ctx) E1000_WRITE_REG(hw, EM_EIAC, sc->ims); ims_mask |= sc->ims; } + E1000_WRITE_REG(hw, E1000_IMS, ims_mask); E1000_WRITE_FLUSH(hw); } @@ -4410,6 +4608,57 @@ em_sysctl_reg_handler(SYSCTL_HANDLER_ARGS) return (sysctl_handle_int(oidp, &val, 0, req)); } +/* Per queue holdoff interrupt rate handler */ +static int +em_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) +{ + struct em_rx_queue *rque; + struct em_tx_queue *tque; + struct e1000_hw *hw; + int error; + u32 reg, usec, rate; + + bool tx = oidp->oid_arg2; + + if (tx) { + tque = oidp->oid_arg1; + hw = &tque->sc->hw; + if (hw->mac.type >= igb_mac_min) + reg = E1000_READ_REG(hw, E1000_EITR(tque->me)); + else if (hw->mac.type == e1000_82574 && tque->msix) + reg = E1000_READ_REG(hw, E1000_EITR_82574(tque->me)); + else + reg = E1000_READ_REG(hw, E1000_ITR); + } else { + rque = oidp->oid_arg1; + hw = &rque->sc->hw; + if (hw->mac.type >= igb_mac_min) + reg = E1000_READ_REG(hw, E1000_EITR(rque->msix)); + else if (hw->mac.type == e1000_82574 && rque->msix) + reg = E1000_READ_REG(hw, E1000_EITR_82574(rque->msix)); + else + reg = E1000_READ_REG(hw, E1000_ITR); + } + + if (hw->mac.type < igb_mac_min) { + if (reg > 0) + rate = EM_INTS_TO_ITR(reg); + else + rate = 0; + } else { + usec = (reg & IGB_QVECTOR_MASK); + if (usec > 0) + rate = IGB_INTS_TO_EITR(usec); + else + rate = 0; + } + + error = sysctl_handle_int(oidp, &rate, 0, req); + if (error || !req->newptr) + return error; + return 0; +} + /* * Add sysctl variables, one per statistic, to the system. */ @@ -4466,6 +4715,11 @@ em_add_hw_stats(struct e1000_softc *sc) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "TX Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", + CTLTYPE_UINT | CTLFLAG_RD, tx_que, + true, em_sysctl_interrupt_rate_handler, + "IU", "Interrupt Rate"); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_TDH(txr->me), em_sysctl_reg_handler, "IU", @@ -4486,6 +4740,11 @@ em_add_hw_stats(struct e1000_softc *sc) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "RX Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", + CTLTYPE_UINT | CTLFLAG_RD, rx_que, + false, em_sysctl_interrupt_rate_handler, + "IU", "Interrupt Rate"); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_RDH(rxr->me), em_sysctl_reg_handler, "IU", diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 7219dc57c333..52bfed0f9a42 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -1,8 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * + * Copyright (c) 2001-2024, Intel Corporation * Copyright (c) 2016 Nicole Graziano - * All rights reserved. + * Copyright (c) 2024 Kevin Bowling * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -243,16 +244,19 @@ /* Support AutoMediaDetect for Marvell M88 PHY in i354 */ #define IGB_MEDIA_RESET (1 << 0) -/* Define the starting Interrupt rate per Queue */ -#define EM_INTS_PER_SEC 8000 +/* Define the interrupt rates and ITR helpers */ +#define EM_INTS_4K 4000 +#define EM_INTS_20K 20000 +#define EM_INTS_70K 70000 +#define EM_INTS_DEFAULT 8000 #define EM_INTS_MULTIPLIER 256 #define EM_ITR_DIVIDEND 1000000000 #define EM_INTS_TO_ITR(i) (EM_ITR_DIVIDEND/(i * EM_INTS_MULTIPLIER)) -#define IGB_ITR_DIVIDEND 1000000 -#define IGB_ITR_SHIFT 2 +#define IGB_EITR_DIVIDEND 1000000 +#define IGB_EITR_SHIFT 2 #define IGB_QVECTOR_MASK 0x7FFC -#define IGB_INTS_TO_EITR(i) (((IGB_ITR_DIVIDEND/i) & IGB_QVECTOR_MASK) << \ - IGB_ITR_SHIFT) +#define IGB_INTS_TO_EITR(i) (((IGB_EITR_DIVIDEND/i) & IGB_QVECTOR_MASK) << \ + IGB_EITR_SHIFT) #define IGB_LINK_ITR 2000 #define I210_LINK_DELAY 1000 @@ -390,7 +394,11 @@ struct tx_ring { /* Interrupt resources */ void *tag; struct resource *res; + + /* Soft stats */ unsigned long tx_irq; + unsigned long tx_packets; + unsigned long tx_bytes; /* Saved csum offloading context information */ int csum_flags; @@ -426,6 +434,9 @@ struct rx_ring { unsigned long rx_discarded; unsigned long rx_packets; unsigned long rx_bytes; + + /* Next requested ITR latency */ + u8 rx_nextlatency; }; struct em_tx_queue { @@ -441,6 +452,7 @@ struct em_rx_queue { u32 me; u32 msix; u32 eims; + u32 itr_setting; struct rx_ring rxr; u64 irqs; struct if_irq que_irq; @@ -489,6 +501,7 @@ struct e1000_softc { u32 rx_mbuf_sz; + int enable_aim; /* Management and WOL features */ u32 wol; bool has_manage; @@ -512,6 +525,7 @@ struct e1000_softc { u16 link_duplex; u32 smartspeed; u32 dmac; + u32 pba; int link_mask; int tso_automasked; diff --git a/sys/dev/e1000/igb_txrx.c b/sys/dev/e1000/igb_txrx.c index 2819150acba6..82cbb37ce4cd 100644 --- a/sys/dev/e1000/igb_txrx.c +++ b/sys/dev/e1000/igb_txrx.c @@ -292,6 +292,10 @@ igb_isc_txd_encap(void *arg, if_pkt_info_t pi) txd->read.cmd_type_len |= htole32(E1000_TXD_CMD_EOP | txd_flags); pi->ipi_new_pidx = i; + /* Sent data accounting for AIM */ + txr->tx_bytes += pi->ipi_len; + ++txr->tx_packets; + return (0); } From nobody Fri Oct 18 01:42: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 4XV6sJ3Yp5z5ZjxL; Fri, 18 Oct 2024 01:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XV6sJ33JZz4D7v; Fri, 18 Oct 2024 01:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729215764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=egjd8Is92b/E7YFqq2qOS67KzB924mvDe2vRXvYHGjw=; b=gEdI3dd65T9EoJlfidH21urRNQr8jrQpvb2AWqK56WyCErAilvKMs2dbq6OyaP29Ue2J3H 5TKIuWSMGo2O8OsfdWto4b7Ln0IkxfCnKTKGNsPhoKaMJ1UyQ0XyC9gz8fPqV3uzhHEyKN jHEKzSwERHpvxHc8C5wn5/1Cl8OEcOIoUMKttieMy1ZrwwzDCYT7PBZHjVu6A2Xo+gxs1j OMW9lCp8C9zR7Yg6G/IxZBc4swlE5aSfAnVwKd7g7Klnsv+fHnS1XSaZppKM+dU0nfakM5 iKeTdNtpWGaJuvV9pjng2KG5FyHGMzpGNgrBFKS5vEp9HXp5H/+IIuZ4x8FhAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729215764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=egjd8Is92b/E7YFqq2qOS67KzB924mvDe2vRXvYHGjw=; b=VBCdzYyqSH7QhLCfu5imTGHiiUSR6kzFE3aX10J/8khtWO2zdh7PiqfiyXiWSK1idAVsiV v7Gv/Fkr0iDckFxkOuIhPoERUV1QoKgmhVB5yo48BUWmciuT25gD4qYO4pLgQC7KFD72DU EayR+MBasnh41QUEMdha/UaKImBRYpjK8w9vIu/0wloNiYxJU/ESlj2AgeKfpaQZYjVBxL yUPkdmTv6DJjasDJMf8sCgmajTprf6TU4rU/wNnBITuDnXG5g1Ee02MitK4VUHdW1lUK9n 2j/InZOIXpKgKBHne3mAAtcsZXPxzIqkMrkQS22HTx4tovM8GKffqVyLqMSe6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729215764; a=rsa-sha256; cv=none; b=Qp13CoYJ/7jwipWweESX6ffpb18Ivc8AiWPL/iWpFqylL3vcgqVxMyqS9YjCTVxObJnPlj V17bx4M702k2icD6rb7/5DcbSVPzelO7MNNsy3cxbIrQAgTV3z5iI/pVzImGNsY5vWVwi2 FRY0m18MEI/BxRdV+0TdN0t5IBEYM5SKzINMey7MUJ/fkeAIkgQLXByw/sWPweClMyZdTg j5uMPaMsIijMy0XT3KPfRWeKdYXZuHq29pjVH+nRdHdOxDxrYjJU7UklLp0bDcxqcoj1A+ OJ2/doevZUSCxVVs+3OsZrjks/vQnWMxdEGEYWpH5t529HMxFwSg0yWPv5rb8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XV6sJ2fNdzDf8; Fri, 18 Oct 2024 01:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I1giVA072788; Fri, 18 Oct 2024 01:42:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I1giGi072785; Fri, 18 Oct 2024 01:42:44 GMT (envelope-from git) Date: Fri, 18 Oct 2024 01:42:44 GMT Message-Id: <202410180142.49I1giGi072785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: a527aa7a7f62 - stable/13 - e1000: Re-add AIM 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a527aa7a7f6261fb9522ab0bd0bac330df4e0ae9 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a527aa7a7f6261fb9522ab0bd0bac330df4e0ae9 commit a527aa7a7f6261fb9522ab0bd0bac330df4e0ae9 Author: Kevin Bowling AuthorDate: 2024-09-22 09:26:05 +0000 Commit: Kevin Bowling CommitDate: 2024-10-18 01:42:32 +0000 e1000: Re-add AIM We originally left this out because iflib modulates interrupts and accomplishes some level of batching versus the custom queues in the older driver. Upon more detailed study of the Linux driver which has a newer implementation, it finally became clear to me this is actually a holdoff timer and not an interrupt limit as it is conventionally (statically) programmed and displayed as an interrupt rate. The data sheets also make this somewhat clear. Thus, AIM accomplishes two beneficial things for a wide variety of workloads[1]: 1. At low throughput/packet rates, it will significantly lower latency (by counter-intuitively "increasing" the interrupt rate.. better thought of as decreasing the holdoff timer because you will modulate down before coming anywhere near these interrupt rates). 2. At bulk data rates, it is tuned to achieve a lower interrupt rate (by increasing the holdoff timer) than the current static 8000/s. This decreases processing overhead and yields more headroom for other work such as packet filters or userland. For a single NIC this might be worth a few sys% on common CPUs, but may be meaningful when multiplied such as if_lagg, if_bridge and forwarding setups. The AIM algorithm was re-introduced from the older igb or out of tree driver, and then modernized with permission to use Intel code from other drivers. I have retroactively added it to lem(4) and em(4) where the same concept applies, albeit to a single ITR register. [1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/gbe-controllers-interrupt-moderation-appl-note.pdf Tested by: cc (https://wiki.freebsd.org/chengcui/testD46768) Relnotes: yes Sponsored by: Rubicon Communications, LLC ("Netgate") Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D46768 (cherry picked from commit 3e501ef896671cb190e8c40c6258b8f27d136f07) --- sys/dev/e1000/em_txrx.c | 10 ++ sys/dev/e1000/if_em.c | 269 ++++++++++++++++++++++++++++++++++++++++++++++- sys/dev/e1000/if_em.h | 28 +++-- sys/dev/e1000/igb_txrx.c | 4 + 4 files changed, 299 insertions(+), 12 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index eec198df7466..6e8fff07cd82 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -455,6 +455,10 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); pi->ipi_new_pidx = i; + /* Sent data accounting for AIM */ + txr->tx_bytes += pi->ipi_len; + ++txr->tx_packets; + return (0); } @@ -669,6 +673,7 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) len = le16toh(rxd->length); ri->iri_len += len; + rxr->rx_bytes += ri->iri_len; eop = (status & E1000_RXD_STAT_EOP) != 0; @@ -690,6 +695,8 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) i++; } while (!eop); + rxr->rx_packets++; + if (scctx->isc_capenable & IFCAP_RXCSUM) em_receive_checksum(status, errors, ri); @@ -732,6 +739,7 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) len = le16toh(rxd->wb.upper.length); ri->iri_len += len; + rxr->rx_bytes += ri->iri_len; eop = (staterr & E1000_RXD_STAT_EOP) != 0; @@ -752,6 +760,8 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) i++; } while (!eop); + rxr->rx_packets++; + if (scctx->isc_capenable & IFCAP_RXCSUM) em_receive_checksum(staterr, staterr >> 24, ri); diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 41d3ba093bab..e000343eb4b4 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1,8 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * + * Copyright (c) 2001-2024, Intel Corporation * Copyright (c) 2016 Nicole Graziano - * All rights reserved. + * Copyright (c) 2024 Kevin Bowling * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -329,10 +330,12 @@ static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS); static int em_get_rs(SYSCTL_HANDLER_ARGS); static void em_print_debug_info(struct e1000_softc *); static int em_is_valid_ether_addr(u8 *); +static void em_newitr(struct e1000_softc *, struct em_rx_queue *, + struct tx_ring *, struct rx_ring *); static bool em_automask_tso(if_ctx_t); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); static void em_add_int_delay_sysctl(struct e1000_softc *, const char *, - const char *, struct em_int_delay_info *, int, int); + const char *, struct em_int_delay_info *, int, int); /* Management and WOL Support */ static void em_init_manageability(struct e1000_softc *); static void em_release_manageability(struct e1000_softc *); @@ -547,10 +550,19 @@ static int eee_setting = 1; SYSCTL_INT(_hw_em, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &eee_setting, 0, "Enable Energy Efficient Ethernet"); +/* + * AIM: Adaptive Interrupt Moderation + * which means that the interrupt rate is varied over time based on the + * traffic for that interrupt vector + */ +static int em_enable_aim = 1; +SYSCTL_INT(_hw_em, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &em_enable_aim, + 0, "Enable adaptive interrupt moderation (1=normal, 2=lowlatency)"); + /* ** Tuneable Interrupt rate */ -static int em_max_interrupt_rate = EM_INTS_PER_SEC; +static int em_max_interrupt_rate = EM_INTS_DEFAULT; SYSCTL_INT(_hw_em, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &em_max_interrupt_rate, 0, "Maximum interrupts per second"); @@ -834,6 +846,11 @@ em_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW, sc, 0, em_sysctl_nvm_info, "I", "NVM Information"); + sc->enable_aim = em_enable_aim; + SYSCTL_ADD_INT(ctx_list, child, OID_AUTO, "enable_aim", + CTLFLAG_RW, &sc->enable_aim, 0, + "Interrupt Moderation (1=normal, 2=lowlatency)"); + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, em_sysctl_print_fw_version, "A", @@ -1439,6 +1456,159 @@ em_if_init(if_ctx_t ctx) } } +enum itr_latency_target { + itr_latency_disabled = 0, + itr_latency_lowest = 1, + itr_latency_low = 2, + itr_latency_bulk = 3 +}; +/********************************************************************* + * + * Helper to calculate next (E)ITR value for AIM + * + *********************************************************************/ +static void +em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, + struct tx_ring *txr, struct rx_ring *rxr) +{ + struct e1000_hw *hw = &sc->hw; + u32 newitr; + u32 bytes; + u32 bytes_packets; + u32 packets; + u8 nextlatency; + + /* Idle, do nothing */ + if ((txr->tx_bytes == 0) && (rxr->rx_bytes == 0)) + return; + + newitr = 0; + + if (sc->enable_aim) { + nextlatency = rxr->rx_nextlatency; + + /* Use half default (4K) ITR if sub-gig */ + if (sc->link_speed != 1000) { + newitr = EM_INTS_4K; + goto em_set_next_itr; + } + /* Want at least enough packet buffer for two frames to AIM */ + if (sc->shared->isc_max_frame_size * 2 > (sc->pba << 10)) { + newitr = em_max_interrupt_rate; + sc->enable_aim = 0; + goto em_set_next_itr; + } + + /* Get the largest values from the associated tx and rx ring */ + if (txr->tx_bytes && txr->tx_packets) { + bytes = txr->tx_bytes; + bytes_packets = txr->tx_bytes/txr->tx_packets; + packets = txr->tx_packets; + } + if (rxr->rx_bytes && rxr->rx_packets) { + bytes = max(bytes, rxr->rx_bytes); + bytes_packets = max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); + packets = max(packets, rxr->rx_packets); + } + + /* Latency state machine */ + switch (nextlatency) { + case itr_latency_disabled: /* Bootstrapping */ + nextlatency = itr_latency_low; + break; + case itr_latency_lowest: /* 70k ints/s */ + /* TSO and jumbo frames */ + if (bytes_packets > 8000) + nextlatency = itr_latency_bulk; + else if ((packets < 5) && (bytes > 512)) + nextlatency = itr_latency_low; + break; + case itr_latency_low: /* 20k ints/s */ + if (bytes > 10000) { + /* Handle TSO */ + if (bytes_packets > 8000) + nextlatency = itr_latency_bulk; + else if ((packets < 10) || (bytes_packets > 1200)) + nextlatency = itr_latency_bulk; + else if (packets > 35) + nextlatency = itr_latency_lowest; + } else if (bytes_packets > 2000) { + nextlatency = itr_latency_bulk; + } else if (packets < 3 && bytes < 512) { + nextlatency = itr_latency_lowest; + } + break; + case itr_latency_bulk: /* 4k ints/s */ + if (bytes > 25000) { + if (packets > 35) + nextlatency = itr_latency_low; + } else if (bytes < 1500) + nextlatency = itr_latency_low; + break; + default: + nextlatency = itr_latency_low; + device_printf(sc->dev, "Unexpected newitr transition %d\n", + nextlatency); + break; + } + + /* Trim itr_latency_lowest for default AIM setting */ + if (sc->enable_aim == 1 && nextlatency == itr_latency_lowest) + nextlatency = itr_latency_low; + + /* Request new latency */ + rxr->rx_nextlatency = nextlatency; + } else { + /* We may have toggled to AIM disabled */ + nextlatency = itr_latency_disabled; + rxr->rx_nextlatency = nextlatency; + } + + /* ITR state machine */ + switch(nextlatency) { + case itr_latency_lowest: + newitr = EM_INTS_70K; + break; + case itr_latency_low: + newitr = EM_INTS_20K; + break; + case itr_latency_bulk: + newitr = EM_INTS_4K; + break; + case itr_latency_disabled: + default: + newitr = em_max_interrupt_rate; + break; + } + +em_set_next_itr: + if (hw->mac.type >= igb_mac_min) { + newitr = IGB_INTS_TO_EITR(newitr); + + if (hw->mac.type == e1000_82575) + newitr |= newitr << 16; + else + newitr |= E1000_EITR_CNT_IGNR; + + if (newitr != que->itr_setting) { + que->itr_setting = newitr; + E1000_WRITE_REG(hw, E1000_EITR(que->msix), que->itr_setting); + } + } else { + newitr = EM_INTS_TO_ITR(newitr); + + if (newitr != que->itr_setting) { + que->itr_setting = newitr; + if (hw->mac.type == e1000_82574 && que->msix) { + E1000_WRITE_REG(hw, + E1000_EITR_82574(que->msix), que->itr_setting); + } else { + E1000_WRITE_REG(hw, E1000_ITR, que->itr_setting); + } + } + } +} + /********************************************************************* * * Fast Legacy/MSI Combined Interrupt Service routine @@ -1448,10 +1618,14 @@ int em_intr(void *arg) { struct e1000_softc *sc = arg; + struct e1000_hw *hw = &sc->hw; + struct em_rx_queue *que = &sc->rx_queues[0]; + struct tx_ring *txr = &sc->tx_queues[0].txr; + struct rx_ring *rxr = &que->rxr; if_ctx_t ctx = sc->ctx; u32 reg_icr; - reg_icr = E1000_READ_REG(&sc->hw, E1000_ICR); + reg_icr = E1000_READ_REG(hw, E1000_ICR); /* Hot eject? */ if (reg_icr == 0xffffffff) @@ -1465,7 +1639,7 @@ em_intr(void *arg) * Starting with the 82571 chip, bit 31 should be used to * determine whether the interrupt belongs to us. */ - if (sc->hw.mac.type >= e1000_82571 && + if (hw->mac.type >= e1000_82571 && (reg_icr & E1000_ICR_INT_ASSERTED) == 0) return FILTER_STRAY; @@ -1484,6 +1658,15 @@ em_intr(void *arg) if (reg_icr & E1000_ICR_RXO) sc->rx_overruns++; + if (hw->mac.type >= e1000_82540) + em_newitr(sc, que, txr, rxr); + + /* Reset state */ + txr->tx_bytes = 0; + txr->tx_packets = 0; + rxr->rx_bytes = 0; + rxr->rx_packets = 0; + return (FILTER_SCHEDULE_THREAD); } @@ -1536,9 +1719,20 @@ static int em_msix_que(void *arg) { struct em_rx_queue *que = arg; + struct e1000_softc *sc = que->sc; + struct tx_ring *txr = &sc->tx_queues[que->msix].txr; + struct rx_ring *rxr = &que->rxr; ++que->irqs; + em_newitr(sc, que, txr, rxr); + + /* Reset state */ + txr->tx_bytes = 0; + txr->tx_packets = 0; + rxr->rx_bytes = 0; + rxr->rx_packets = 0; + return (FILTER_SCHEDULE_THREAD); } @@ -2884,6 +3078,9 @@ em_reset(if_ctx_t ctx) if (hw->mac.type >= igb_mac_min) igb_init_dmac(sc, pba); + /* Save the final PBA off if it needs to be used elsewhere i.e. AIM */ + sc->pba = pba; + E1000_WRITE_REG(hw, E1000_VET, ETHERTYPE_VLAN); e1000_get_phy_info(hw); e1000_check_for_link(hw); @@ -3743,6 +3940,7 @@ em_if_intr_enable(if_ctx_t ctx) E1000_WRITE_REG(hw, EM_EIAC, sc->ims); ims_mask |= sc->ims; } + E1000_WRITE_REG(hw, E1000_IMS, ims_mask); E1000_WRITE_FLUSH(hw); } @@ -4412,6 +4610,57 @@ em_sysctl_reg_handler(SYSCTL_HANDLER_ARGS) return (sysctl_handle_int(oidp, &val, 0, req)); } +/* Per queue holdoff interrupt rate handler */ +static int +em_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) +{ + struct em_rx_queue *rque; + struct em_tx_queue *tque; + struct e1000_hw *hw; + int error; + u32 reg, usec, rate; + + bool tx = oidp->oid_arg2; + + if (tx) { + tque = oidp->oid_arg1; + hw = &tque->sc->hw; + if (hw->mac.type >= igb_mac_min) + reg = E1000_READ_REG(hw, E1000_EITR(tque->me)); + else if (hw->mac.type == e1000_82574 && tque->msix) + reg = E1000_READ_REG(hw, E1000_EITR_82574(tque->me)); + else + reg = E1000_READ_REG(hw, E1000_ITR); + } else { + rque = oidp->oid_arg1; + hw = &rque->sc->hw; + if (hw->mac.type >= igb_mac_min) + reg = E1000_READ_REG(hw, E1000_EITR(rque->msix)); + else if (hw->mac.type == e1000_82574 && rque->msix) + reg = E1000_READ_REG(hw, E1000_EITR_82574(rque->msix)); + else + reg = E1000_READ_REG(hw, E1000_ITR); + } + + if (hw->mac.type < igb_mac_min) { + if (reg > 0) + rate = EM_INTS_TO_ITR(reg); + else + rate = 0; + } else { + usec = (reg & IGB_QVECTOR_MASK); + if (usec > 0) + rate = IGB_INTS_TO_EITR(usec); + else + rate = 0; + } + + error = sysctl_handle_int(oidp, &rate, 0, req); + if (error || !req->newptr) + return error; + return 0; +} + /* * Add sysctl variables, one per statistic, to the system. */ @@ -4468,6 +4717,11 @@ em_add_hw_stats(struct e1000_softc *sc) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "TX Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", + CTLTYPE_UINT | CTLFLAG_RD, tx_que, + true, em_sysctl_interrupt_rate_handler, + "IU", "Interrupt Rate"); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_TDH(txr->me), em_sysctl_reg_handler, "IU", @@ -4488,6 +4742,11 @@ em_add_hw_stats(struct e1000_softc *sc) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "RX Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", + CTLTYPE_UINT | CTLFLAG_RD, rx_que, + false, em_sysctl_interrupt_rate_handler, + "IU", "Interrupt Rate"); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_RDH(rxr->me), em_sysctl_reg_handler, "IU", diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 7219dc57c333..52bfed0f9a42 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -1,8 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * + * Copyright (c) 2001-2024, Intel Corporation * Copyright (c) 2016 Nicole Graziano - * All rights reserved. + * Copyright (c) 2024 Kevin Bowling * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -243,16 +244,19 @@ /* Support AutoMediaDetect for Marvell M88 PHY in i354 */ #define IGB_MEDIA_RESET (1 << 0) -/* Define the starting Interrupt rate per Queue */ -#define EM_INTS_PER_SEC 8000 +/* Define the interrupt rates and ITR helpers */ +#define EM_INTS_4K 4000 +#define EM_INTS_20K 20000 +#define EM_INTS_70K 70000 +#define EM_INTS_DEFAULT 8000 #define EM_INTS_MULTIPLIER 256 #define EM_ITR_DIVIDEND 1000000000 #define EM_INTS_TO_ITR(i) (EM_ITR_DIVIDEND/(i * EM_INTS_MULTIPLIER)) -#define IGB_ITR_DIVIDEND 1000000 -#define IGB_ITR_SHIFT 2 +#define IGB_EITR_DIVIDEND 1000000 +#define IGB_EITR_SHIFT 2 #define IGB_QVECTOR_MASK 0x7FFC -#define IGB_INTS_TO_EITR(i) (((IGB_ITR_DIVIDEND/i) & IGB_QVECTOR_MASK) << \ - IGB_ITR_SHIFT) +#define IGB_INTS_TO_EITR(i) (((IGB_EITR_DIVIDEND/i) & IGB_QVECTOR_MASK) << \ + IGB_EITR_SHIFT) #define IGB_LINK_ITR 2000 #define I210_LINK_DELAY 1000 @@ -390,7 +394,11 @@ struct tx_ring { /* Interrupt resources */ void *tag; struct resource *res; + + /* Soft stats */ unsigned long tx_irq; + unsigned long tx_packets; + unsigned long tx_bytes; /* Saved csum offloading context information */ int csum_flags; @@ -426,6 +434,9 @@ struct rx_ring { unsigned long rx_discarded; unsigned long rx_packets; unsigned long rx_bytes; + + /* Next requested ITR latency */ + u8 rx_nextlatency; }; struct em_tx_queue { @@ -441,6 +452,7 @@ struct em_rx_queue { u32 me; u32 msix; u32 eims; + u32 itr_setting; struct rx_ring rxr; u64 irqs; struct if_irq que_irq; @@ -489,6 +501,7 @@ struct e1000_softc { u32 rx_mbuf_sz; + int enable_aim; /* Management and WOL features */ u32 wol; bool has_manage; @@ -512,6 +525,7 @@ struct e1000_softc { u16 link_duplex; u32 smartspeed; u32 dmac; + u32 pba; int link_mask; int tso_automasked; diff --git a/sys/dev/e1000/igb_txrx.c b/sys/dev/e1000/igb_txrx.c index 2819150acba6..82cbb37ce4cd 100644 --- a/sys/dev/e1000/igb_txrx.c +++ b/sys/dev/e1000/igb_txrx.c @@ -292,6 +292,10 @@ igb_isc_txd_encap(void *arg, if_pkt_info_t pi) txd->read.cmd_type_len |= htole32(E1000_TXD_CMD_EOP | txd_flags); pi->ipi_new_pidx = i; + /* Sent data accounting for AIM */ + txr->tx_bytes += pi->ipi_len; + ++txr->tx_packets; + return (0); } From nobody Fri Oct 18 06:57: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 4XVFr44hhhz5Ypwt; Fri, 18 Oct 2024 06:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVFr441lbz4cr2; Fri, 18 Oct 2024 06:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729234628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ts9f3MpKtBfzSDRlpgq1XrUR4eR4Xoa4yjmeGNY584A=; b=VUcwxQHwD3dixTKQ0uLz9sh/FBabhBZZiLc/EQXRA2i8FeJxEOYpsXDMpCwOb8vC9k9Hc+ G/FdOMl78j5qI6svpO+RMiiqI0L+C523eoA2USXjtRcfvsaCDfItifYkUsqQelU3kIH5j+ 33VIIawhvfEdrwbrynBIHVPZ9yFcFf1ssuWpiH/2NF2pZD21Ha1ZPZTeFEvq7zOaJT2fQm oQc+SQ9+WBGicg68GoaQzzYseJVZrwPlf392URKIT1xIdEyl4SQusiD+y5M4o5PTJ+7axN lZy1jUBFZOxXN4LgbPOgne4Szzt8fQQUyQU/Evq7F8ALT+Fl7GKCLZHn8T1Ciw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729234628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ts9f3MpKtBfzSDRlpgq1XrUR4eR4Xoa4yjmeGNY584A=; b=X/XNGRHVR6xhA/uGmlBRJr/MrwaZj/UtA06I2OJ0Wkyn0l6/xlhoS8lftLjS0GMlcsUEfo gG4VFwDQMTI1rXcaQO6hq/tY98zLdvibVt9OQ0MM6tI/unn7KGpWWwF/gIsSwA/yghQySF P9eANrRQz+9CXBf9vtahMb82K7a+UPWdjv2bdNSsGdJR2YEhIiEstC/UTVqmCoIccxIVO3 alAzfQZ9byGpsivY55USPBF9A7GTFXy286khXqQlmVm0pBlwiOoc+iSZJp6px+IYtjPCVd t9EhdXOmKsSBnsanbyZZDzjfrqM9IwBztvvN+zgONJmAszwINDu5aNkpoWa0Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729234628; a=rsa-sha256; cv=none; b=wGKO5hz4Y4U8sjPKXkqsaJuA1EHA+MqS2TIdHRMEqkYHhAiZLvXvqjfD5zN6SNOIfyEgXA fkdJ+f6mBnH8Q7+HyH7AvRu3hRAEXUgcz1U/geYdz2O4Ed9+K9HkyICSmE36kf36umhrBb j3T/0ZgDCea3r6tRaKeGP425S5ExNZdejnZZZZmRN528HWFTosTKSJg3cwfQH+kfrlvL5c asKfZ17KZta1mAO3rFGk0uKsR/g8SBZnBls3KnmAxnh+Its9zymOQvQPKZfUAO5b/PDHGX XVjo9llbSTpEpD356mH1brTErB0JvuEbvW/oTDKcB33keA3JKOu4fz/y56LB6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVFr43cs2zNpJ; Fri, 18 Oct 2024 06:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I6v8Y4099890; Fri, 18 Oct 2024 06:57:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I6v8Du099887; Fri, 18 Oct 2024 06:57:08 GMT (envelope-from git) Date: Fri, 18 Oct 2024 06:57:08 GMT Message-Id: <202410180657.49I6v8Du099887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 6b151ad1c83a - stable/14 - timeout(1): Update STANDARDS section 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6b151ad1c83ae66156bd02badd6ee65be1728cfc Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=6b151ad1c83ae66156bd02badd6ee65be1728cfc commit 6b151ad1c83ae66156bd02badd6ee65be1728cfc Author: Gordon Bergling AuthorDate: 2024-09-24 16:42:18 +0000 Commit: Gordon Bergling CommitDate: 2024-10-18 06:56:48 +0000 timeout(1): Update STANDARDS section Update the STANDARDS section for timeout(1) to POSIX 1003.1-2024. Update mandoc to be able to render the new POSIX macro. Reviewed by: bapt, bcr Approved by: bapt Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D45691 (cherry picked from commit 044f94adff55f13130f03c0c170fa879c8febb5b) --- bin/timeout/timeout.1 | 8 +++++++- contrib/mandoc/st.c | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/timeout/timeout.1 b/bin/timeout/timeout.1 index 9e624e809376..10e5fd70c393 100644 --- a/bin/timeout/timeout.1 +++ b/bin/timeout/timeout.1 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 26, 2023 +.Dd June 17, 2024 .Dt TIMEOUT 1 .Os .Sh NAME @@ -195,6 +195,12 @@ $ timeout -k 5s 1m fetch \\ .Xr nohup 1 , .Xr signal 3 , .Xr daemon 8 +.Sh STANDARDS +The +.Nm +utility is compliant with the +.St -p1003.1-2024 +specification. .Sh HISTORY The .Nm diff --git a/contrib/mandoc/st.c b/contrib/mandoc/st.c index ec754cc036f2..266df0081a95 100644 --- a/contrib/mandoc/st.c +++ b/contrib/mandoc/st.c @@ -37,6 +37,7 @@ LINE("-p1003.1-96", "ISO/IEC 9945-1:1996 (\\(lqPOSIX.1\\(rq)") LINE("-p1003.1-2001", "IEEE Std 1003.1-2001 (\\(lqPOSIX.1\\(rq)") LINE("-p1003.1-2004", "IEEE Std 1003.1-2004 (\\(lqPOSIX.1\\(rq)") LINE("-p1003.1-2008", "IEEE Std 1003.1-2008 (\\(lqPOSIX.1\\(rq)") +LINE("-p1003.1-2024", "IEEE Std 1003.1-2024 (\\(lqPOSIX.1\\(rq)") LINE("-p1003.1-2013", "IEEE Std 1003.1-2008, 2013 Edition (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1-2016", "IEEE Std 1003.1-2008, 2016 Edition (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1", "IEEE Std 1003.1 (\\(lqPOSIX.1\\(rq)") From nobody Fri Oct 18 07:54: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 4XVH655jJ6z5Yt2b; Fri, 18 Oct 2024 07:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVH654QTQz4hJB; Fri, 18 Oct 2024 07:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729238061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NGG6LXotAv6fAA6FIRpCTuYc6o+HszFpBIl+S/Irmnc=; b=YC4HA0cybq9MOYV0bGVoB9S7Oee6CwyfeG9dyVLKfAbVkOFY29ID9etOW7LvC/u2PLZ5e7 BCUZbcfQUTBHskVfdUkTGrlDvYA9aE0N5S5+CmF80Uf7v7BvUpLxds+4GYyj5kC6vhnkgu dvJ5TuIulvZ/d4ba4AoMBEl+ATUmP7HfdSMb4RhnuQMiN6SwK6a+f2qESrAHxzr/9wJjyh OqMf4yyQUOnfd2mKu/nPTN9e/fI6GBUzr0OJzLYMwn4KR8FOlDYY62egAgVHl2ulCsm787 L2B7ZZIKIaXP1F/J2lf/j6jYykO96hsaJ6pHdowH3SduYGGSLHK4TIzIzYhj9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729238061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NGG6LXotAv6fAA6FIRpCTuYc6o+HszFpBIl+S/Irmnc=; b=FGYkl8hgKNdDZQi5OicdLINld5dZxcj4Ti5GecVTEMWpbwpB7328NZW2/x+o0cU3HaKfGC 70jZJ8zoqG92t4gcUnCSCrwajK1x8gzW9+DTbGw5mZSS1VxxOp/gBkLUWgwz5fHxhrk558 CBzedKITWsxdGPjwm2JNwHEg0qfSVArwZ0ZjSVXXSEN+qVa3smsiNaUwY7NdgHIjUM+/W+ +HjqoZO517aYpG+0hMNyqILIdDCJ4YW0cDb9URNipzhtywbk5uXb1MZ2Aa/yXEMWr+oWZ2 2mUsxLOL9xtB0/zq8DJ9NaE8dW/UajrQxJn/iRDvzO1sW/EUjSgNi2+zYZpfIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729238061; a=rsa-sha256; cv=none; b=gPf/dlikEDbYmfnd8/5CcAXyE2mZ9WuYpIJXQ7aAsvAjSt537C4KNbHbwivQXF923/3yOp mNYj9+ON8aPte3ISQwkO6xEyFdsF6w+/ykVnVtHijs+5ETN0FojEFtoijBwpyT3ARkcTzC a6Vpgv9AXcczTDLZQ/GCAu8PudUWGihzY9XnwOF3VqLpWXBg49hRW6CA4OWkni2+wG6Q7m B5vKVyTwNpXDu6FzDU6SSWpqClBTy1KH6xU6+rilRjqzN3bK/kDWbaNwE4w11CB3KZr8Q3 u8uSp4hL7Q5kO5BDOLsjctQn96aOhtSmjqGg5kjnu9FGij9lBv6NXnfP8rOOZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVH6541MKzQHW; Fri, 18 Oct 2024 07:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I7sLRn001546; Fri, 18 Oct 2024 07:54:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I7sL9X001543; Fri, 18 Oct 2024 07:54:21 GMT (envelope-from git) Date: Fri, 18 Oct 2024 07:54:21 GMT Message-Id: <202410180754.49I7sL9X001543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 6b2977c5978b - stable/14 - tcp: fix duplicate retransmissions when RTO happens during SACK loss recovery 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: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6b2977c5978b58718d9cddc0a8c31e1bd9aa0361 Auto-Submitted: auto-generated The branch stable/14 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=6b2977c5978b58718d9cddc0a8c31e1bd9aa0361 commit 6b2977c5978b58718d9cddc0a8c31e1bd9aa0361 Author: Richard Scheffenegger AuthorDate: 2024-10-10 10:50:22 +0000 Commit: Richard Scheffenegger CommitDate: 2024-10-18 07:51:38 +0000 tcp: fix duplicate retransmissions when RTO happens during SACK loss recovery When snd_nxt doesn't track snd_max, partial SACK ACKs may elicit unexpected duplicate retransmissions. This is usually masked by LRO not necessarily ACKing every individual segment, and prior to RFC6675 SACK loss recovery, harder to trigger even when an RTO happens while SACK loss recovery is ongoing. Address this by improving the logic when to start a SACK loss recovery and how to deal with a RTO, as well as improvements to the adjusted congestion window during transmission selection. Reviewed By: tuexen, cc, #transport Sponsored by: NetApp, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43355 (cherry picked from commit 440f4ba18e3ab7be912858bbcb96a419fcf14809) --- sys/netinet/tcp_input.c | 16 ++++++++++------ sys/netinet/tcp_output.c | 27 +++++++++++++++++---------- sys/netinet/tcp_sack.c | 42 +++++++++++++++++++++++++++--------------- sys/netinet/tcp_var.h | 2 +- 4 files changed, 55 insertions(+), 32 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 500d208b7756..83f85a50ed40 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2723,9 +2723,7 @@ enter_recovery: tp->snd_nxt - tp->snd_una); } if (tcp_is_sack_recovery(tp, &to)) { - TCPSTAT_INC( - tcps_sack_recovery_episode); - tp->snd_recover = tp->snd_nxt; + TCPSTAT_INC(tcps_sack_recovery_episode); tp->snd_cwnd = maxseg; (void) tcp_output(tp); if (SEQ_GT(th->th_ack, tp->snd_una)) @@ -2768,8 +2766,12 @@ enter_recovery: __func__)); if (tp->t_dupacks == 1) tp->snd_limited = 0; - tp->snd_cwnd = - (tp->snd_nxt - tp->snd_una) + + if ((tp->snd_nxt == tp->snd_max) && + (tp->t_rxtshift == 0)) + tp->snd_cwnd = + SEQ_SUB(tp->snd_nxt, + tp->snd_una); + tp->snd_cwnd += (tp->t_dupacks - tp->snd_limited) * maxseg; /* @@ -2815,7 +2817,9 @@ enter_recovery: * counted as dupacks here. */ if (tcp_is_sack_recovery(tp, &to) && - (sack_changed != SACK_NOCHANGE)) { + (((tp->t_rxtshift == 0) && (sack_changed != SACK_NOCHANGE)) || + ((tp->t_rxtshift > 0) && (sack_changed == SACK_NEWLOSS))) && + (tp->snd_nxt == tp->snd_max)) { tp->t_dupacks++; /* limit overhead by setting maxseg last */ if (!IN_FASTRECOVERY(tp->t_flags) && diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 9269ba443bd9..d1a81123ebad 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -266,6 +266,7 @@ tcp_default_output(struct tcpcb *tp) } } again: + sendwin = 0; /* * If we've recently taken a timeout, snd_max will be greater than * snd_nxt. There may be SACK information that allows us to avoid @@ -273,12 +274,12 @@ again: */ if ((tp->t_flags & TF_SACK_PERMIT) && SEQ_LT(tp->snd_nxt, tp->snd_max)) - tcp_sack_adjust(tp); + sendwin = tcp_sack_adjust(tp); sendalot = 0; tso = 0; mtu = 0; off = tp->snd_nxt - tp->snd_una; - sendwin = min(tp->snd_wnd, tp->snd_cwnd); + sendwin = min(tp->snd_wnd, tp->snd_cwnd + sendwin); flags = tcp_outflags[tp->t_state]; /* @@ -295,7 +296,8 @@ again: sack_bytes_rxmt = 0; len = 0; p = NULL; - if ((tp->t_flags & TF_SACK_PERMIT) && IN_FASTRECOVERY(tp->t_flags) && + if ((tp->t_flags & TF_SACK_PERMIT) && + (IN_FASTRECOVERY(tp->t_flags) || SEQ_LT(tp->snd_nxt, tp->snd_max)) && (p = tcp_sack_output(tp, &sack_bytes_rxmt))) { uint32_t cwin; @@ -397,10 +399,10 @@ after_sack_rexmit: * in which case len is already set. */ if (sack_rxmit == 0) { - if (sack_bytes_rxmt == 0) + if ((sack_bytes_rxmt == 0) || SEQ_LT(tp->snd_nxt, tp->snd_max)) { len = ((int32_t)min(sbavail(&so->so_snd), sendwin) - off); - else { + } else { int32_t cwin; /* @@ -1635,11 +1637,16 @@ timer: tp->snd_max = tp->snd_nxt + xlen; } if ((error == 0) && - (TCPS_HAVEESTABLISHED(tp->t_state) && - (tp->t_flags & TF_SACK_PERMIT) && - tp->rcv_numsacks > 0)) { - /* Clean up any DSACK's sent */ - tcp_clean_dsack_blocks(tp); + (tp->rcv_numsacks > 0) && + TCPS_HAVEESTABLISHED(tp->t_state) && + (tp->t_flags & TF_SACK_PERMIT)) { + /* Clean up any DSACK's sent */ + tcp_clean_dsack_blocks(tp); + } + if ((error == 0) && + sack_rxmit && + SEQ_LT(tp->snd_nxt, SEQ_MIN(p->rxmit, p->end))) { + tp->snd_nxt = SEQ_MIN(p->rxmit, p->end); } if (error) { /* diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 05aaa0b4a662..f33c7030f21e 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -897,8 +897,8 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) if (tp->t_flags & TF_SENTFIN) highdata--; highdata = SEQ_MIN(highdata, tp->snd_recover); - if (th->th_ack != highdata) { - tp->snd_fack = th->th_ack; + if (SEQ_LT(th->th_ack, highdata)) { + tp->snd_fack = SEQ_MAX(th->th_ack, tp->snd_fack); (void)tcp_sackhole_insert(tp, SEQ_MAX(th->th_ack, highdata - maxseg), highdata, NULL); } @@ -991,35 +991,47 @@ tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt) * After a timeout, the SACK list may be rebuilt. This SACK information * should be used to avoid retransmitting SACKed data. This function * traverses the SACK list to see if snd_nxt should be moved forward. + * In addition, cwnd will be inflated by the sacked bytes traversed when + * moving snd_nxt forward. This prevents a traffic burst after the final + * full ACK, and also keeps ACKs coming back. */ -void +int tcp_sack_adjust(struct tcpcb *tp) { + int sacked = 0; struct sackhole *p, *cur = TAILQ_FIRST(&tp->snd_holes); INP_WLOCK_ASSERT(tptoinpcb(tp)); - if (cur == NULL) - return; /* No holes */ - if (SEQ_GEQ(tp->snd_nxt, tp->snd_fack)) - return; /* We're already beyond any SACKed blocks */ - /*- + if (cur == NULL) { + /* No holes */ + return (0); + } + if (SEQ_GEQ(tp->snd_nxt, tp->snd_fack)) { + /* We're already beyond any SACKed blocks */ + return (tp->sackhint.sacked_bytes); + } + /* * Two cases for which we want to advance snd_nxt: * i) snd_nxt lies between end of one hole and beginning of another * ii) snd_nxt lies between end of last hole and snd_fack */ while ((p = TAILQ_NEXT(cur, scblink)) != NULL) { - if (SEQ_LT(tp->snd_nxt, cur->end)) - return; - if (SEQ_GEQ(tp->snd_nxt, p->start)) + if (SEQ_LT(tp->snd_nxt, cur->end)) { + return (sacked); + } + sacked += p->start - cur->end; + if (SEQ_GEQ(tp->snd_nxt, p->start)) { cur = p; - else { + } else { tp->snd_nxt = p->start; - return; + return (sacked); } } - if (SEQ_LT(tp->snd_nxt, cur->end)) - return; + if (SEQ_LT(tp->snd_nxt, cur->end)) { + return (sacked); + } tp->snd_nxt = tp->snd_fack; + return (tp->sackhint.sacked_bytes); } /* diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 83ea1608abe1..b75210acad33 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1516,7 +1516,7 @@ void tcp_update_dsack_list(struct tcpcb *, tcp_seq, tcp_seq); void tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_laststart, tcp_seq rcv_lastend); void tcp_clean_dsack_blocks(struct tcpcb *tp); void tcp_clean_sackreport(struct tcpcb *tp); -void tcp_sack_adjust(struct tcpcb *tp); +int tcp_sack_adjust(struct tcpcb *tp); struct sackhole *tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt); void tcp_do_prr_ack(struct tcpcb *, struct tcphdr *, struct tcpopt *, sackstatus_t); void tcp_lost_retransmission(struct tcpcb *, struct tcphdr *); From nobody Fri Oct 18 08:44: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 4XVJDK1hmQz5YwB3; Fri, 18 Oct 2024 08:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDK1Ftpz4mB2; Fri, 18 Oct 2024 08:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zMIDAsymj+dluVkiOt9L53o8Bg4lLPyQk7O4Kt1fuWw=; b=ZJXE+C8Srp0TKc2IMC2ZezuEuir2MArrSTzfolJ6uufZbutTv86EX5FUXzQMyPs59D4TeW i39JCW9tmzZsn79nGcaNAIJqK9oCRp6qlHjPV2FQUzTx9yefa4fyCU5hff/r5Jpul7cwsw nwJRW3pBYavCxXUmBTEQIYfj+6tSgLHX++XeYuoQ2WMJtnCinecG/0ql7M4oTOpkEJ5sTr zL6985p9Okb0xsfIEi4onhyxwmMtoBbhZ6gb37PFPPozX0AyV6rbdRQxzcfy7mr1G4Y5oh pBLQ06fYA8q08Lv6CgasJao6jrqRABFYhiq+cjXDEOBk1OMdF4s/VX4mY5rp9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zMIDAsymj+dluVkiOt9L53o8Bg4lLPyQk7O4Kt1fuWw=; b=C6zgQspFNVrQ/ZV2Mq7lERBOyfzaUwKPspJaNvUwWolsrPDqD3mZIOOizcCxV6jNJk9dUq L2wNyHySjDsvHrMzllR4BcB3WPOJo3YjDPozfGl03amznXK93sSMhZ/jS2irqMCVYZIwZk Xy7A84cDJ50XvFaVGn6iPm7y06ms2C67r5U2cl0wvoOt2w0rO4wWPihsZTdvXUgCJS5j1H m/Csh0x+vcesGi9bhp+YrHy49o7iIfUwup65p/BnbxiUhU8jhB24xOpQ9Pe0ogn6wgBWId 1V/E2H/a+KqEmnxQw2cHkkX9rxNmI761MjqJsCgw6gW9nhPkaTug2bGS3kG7og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241089; a=rsa-sha256; cv=none; b=osvPjs4PLWvVjKjn/44DTXqRQK3+SM5ZimGySnMo4In8hMI7BB4uPbbf2CsTsdQj/v3Ml5 gy7Tyku7wdVhNRaSGF8oCNqDBx9q4FTreknjtqaCQdUY/6/gybcfb7pNfJyCVNO1BgVUxY m/02Hq+snvSiVH8RV0ZZZHtgGf5jL/2utEaNFkSiQn7hwSwQ5eQeBquZk0e0sRMnTCT5Xe pYnXiU2Ql+zWWxw6iyiUS6AKYx7ATZe1KxcvwdDmkG8H1H00rQE6C8gO8q8gg4iwPhJVnu BjscuUb1+BHOc2GSxTpmbirB4ku54xJLcnLS0H3pf3BGEK+etZSRf2pc/AU0aQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDK0rx2zRgt; Fri, 18 Oct 2024 08:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8in7N087636; Fri, 18 Oct 2024 08:44:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8inCX087633; Fri, 18 Oct 2024 08:44:49 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:44:49 GMT Message-Id: <202410180844.49I8inCX087633@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: 998de46c5145 - main - sound: Remove KASSERT from vchan_setnew() 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: 998de46c51452b046ecd9ba8ed592dd7c4f79f51 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=998de46c51452b046ecd9ba8ed592dd7c4f79f51 commit 998de46c51452b046ecd9ba8ed592dd7c4f79f51 Author: Christos Margiolis AuthorDate: 2024-10-18 08:38:31 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:38:31 +0000 sound: Remove KASSERT from vchan_setnew() This check is not really useful, and can in fact break things, if sysctl_dev_pcm_vchans() calls vchan_setnew() with a value that will not satisfy the KASSERT condition. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D46545 --- sys/dev/sound/pcm/vchan.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index fa4fa2023b71..c1ad9b9ec2ba 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -945,9 +945,6 @@ vchan_setnew(struct snddev_info *d, int direction, int newcnt) return (EINVAL); if (newcnt > vcnt) { - KASSERT((newcnt - 1) == vcnt, - ("bogus vchan_create() request newcnt=%d vcnt=%d", - newcnt, vcnt)); /* add new vchans - find a parent channel first */ ch = NULL; CHN_FOREACH(c, d, channels.pcm) { From nobody Fri Oct 18 08:44: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 4XVJDL3msTz5Ywgv; Fri, 18 Oct 2024 08:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDL2gKHz4lwt; Fri, 18 Oct 2024 08:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=14wZoxqC2NMmrXGQ9wcCalX0YIDAUtzU2Y+R7X03b4k=; b=xTDbiGdUTyt77RH6+WKeQUclD+gTWM/YAN9DeE5FLX4J+PQcNw5pISxblkRbp/n8ZVOT0D wCAiiTo/gNmVg51EDM/JgSfTGKTkZR/2Qllo2u4TLkTVkMVgT7V1LIh9vDfsljvcBavVoG f6oXhEYVTqZ4C7OpEO1BY4uxpR1dGPY+c8Ve6rWAIpBk+tUmOIvaPqT9seJEYk6Jj/7aHn 6iH5Y1Z6OtCbi2eDwOp+QbU/p43X2FjjzLhdk8A+CgdsBY/1wj3u7CG4ccncvfXNmpX6i9 slZG5Tzazv0Y3e0lZOUUcLXCTYaXzlARK3uGLjC92rPALJteXB5wlmbJW379IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=14wZoxqC2NMmrXGQ9wcCalX0YIDAUtzU2Y+R7X03b4k=; b=PagGZJLE/F/Goaz9yQDQBnw5tEQGBcN386LGHBRPDf+VLlumlq4kXPZKreixIZ8ReJgLpx l/qZ7V+G9S8bsECByu/F6SSSVJNHy+9LJ38jIyCM57psJ933mk294dFenQXuhnMe/asl80 bevHdlTdh/rmJsFa2usex1D5AgoMfhvo/rVdT1FF3tojFnC/nb120C0349mKt5s8Zc8TWV aRjprVtdQsMjkoeJ77uh3QMhhsF3kXukcBH8BH+Rw4uOJwGmCxsV1qgg9KAfD/Zn1VIbD+ qSjhRexXSrOlwCg4s7/Oa78RXFDOngUY4E95cvc4N3MfumWe/ZBFG8zZ9bGwtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241090; a=rsa-sha256; cv=none; b=x0XzyNk9lmfSnRQELXYaDg9paJpQgokL0BCXVaL2uf9skSTq3D8EfnH7zuN/wNZ18+9cOe SgRvAvaJiN9pdAVf320qnPqrXRZ2dNyu6LMNRKXtFpk0AF69MMTgqQgZITWZvLfCdynbJo vkq7yCbXcdS9BauXX5B5urWV+mEXbIqysFADc9OdcnBrLB13ivTKxbNHZx3XC45HNloKot fYSG1RmYqKxR1q+gx3Z9l1Ttu36rkICwHjTm0pQ766ZPTSX6za2nOZTUI/fm5G1AlBHxRK /52NiwQCod9Exn6CAhRg4yNM23Ntb1GhLV+cXjlHzwOTLHYEmSyBj4g2qOXRKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDL1zWTzRnk; Fri, 18 Oct 2024 08:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8io86087695; Fri, 18 Oct 2024 08:44:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8ioZd087692; Fri, 18 Oct 2024 08:44:50 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:44:50 GMT Message-Id: <202410180844.49I8ioZd087692@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: de8ee333388b - main - sound: Get rid of pnum and max variables 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: de8ee333388bf5e551e697b08823b3a6c262f609 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=de8ee333388bf5e551e697b08823b3a6c262f609 commit de8ee333388bf5e551e697b08823b3a6c262f609 Author: Christos Margiolis AuthorDate: 2024-10-18 08:38:41 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:38:41 +0000 sound: Get rid of pnum and max variables in chn_init() The VCHAN count is checked in vchan_setnew(), and there is no reason to cap the hardware channels in the first place. This is part of a series of follow-up patches. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46521 --- sys/dev/sound/pcm/channel.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index e0fd24805a21..bf9c74e2ed1d 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1165,7 +1165,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, struct feeder_class *fc; struct snd_dbuf *b, *bs; char *dirs, buf[CHN_NAMELEN]; - int i, direction, *pnum, max, type, unit; + int i, direction, type, unit; PCM_BUSYASSERT(d); PCM_LOCKASSERT(d); @@ -1174,30 +1174,22 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, case PCMDIR_PLAY: dirs = "play"; direction = PCMDIR_PLAY; - pnum = &d->playcount; type = SND_DEV_DSPHW_PLAY; - max = SND_MAXHWCHAN; break; case PCMDIR_PLAY_VIRTUAL: dirs = "virtual_play"; direction = PCMDIR_PLAY; - pnum = &d->pvchancount; type = SND_DEV_DSPHW_VPLAY; - max = SND_MAXVCHANS; break; case PCMDIR_REC: dirs = "record"; direction = PCMDIR_REC; - pnum = &d->reccount; type = SND_DEV_DSPHW_REC; - max = SND_MAXHWCHAN; break; case PCMDIR_REC_VIRTUAL: dirs = "virtual_record"; direction = PCMDIR_REC; - pnum = &d->rvchancount; type = SND_DEV_DSPHW_VREC; - max = SND_MAXVCHANS; break; default: device_printf(d->dev, @@ -1206,23 +1198,11 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, return (NULL); } - if (*pnum >= max) { - device_printf(d->dev, "%s(): cannot allocate more channels " - "(max=%d)\n", __func__, max); - return (NULL); - } - unit = 0; CHN_FOREACH(c, d, channels.pcm) { if (c->type != type) continue; unit++; - if (unit >= max) { - device_printf(d->dev, "%s(): cannot allocate more " - "channels for type=%d (max=%d)\n", - __func__, type, max); - return (NULL); - } } PCM_UNLOCK(d); From nobody Fri Oct 18 08:44:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVJDM5dycz5YwGy; Fri, 18 Oct 2024 08:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDM3prWz4lnx; Fri, 18 Oct 2024 08:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lj1QFevXSHzBJUjDs7XniIjo4taWtaA2D/WMXiUNX00=; b=Y0Zv1ok/jFzzEiM8jf3KKEt0PlHNlTpdkALEisfaEXhbi+Qk5ynUI58/qRWEJbulwHlYms 0OnFAxaDAnyPn8v7XVFknAf6UI1XADN63MpadCaOa87Ni4W8ZOZuORCb6CGcz7DoZTgAQs qVYwzYrm+yKG5CQ0x1bk0IfrVGv+OxQB2qfKRk5OXBm1/IlwqVZUZ3VeSdTy+MbX/j6EJl FU1mbpKdtaLOcGWWyEuPsO4Uv+XFCMVMBEpS2QPKmlMZaQ7RXMksGLVyliei9ynT82HHqP WbCnAMLx7+tXZ4p83Qk/Dp7RP3tHNIwL4h9DA7eMIzmS5JKG4eNazepWUrdCrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lj1QFevXSHzBJUjDs7XniIjo4taWtaA2D/WMXiUNX00=; b=UHyie0HnPfW9nbjdPcoCvlPWh4x4c58LXuB/zLof4ou+H9nPcEQNJ4zZ47L+YYet33Yemz bL0gqjBeeoaRL5ljGn8uzi9BGhYFNnMCgiD0RrtjuSEQRixK/23BuvdYBxoO96cDg0/5ke zKPX3PUDZDlMWA/F5K2H8huBLQegcyfv6vEhCGQXL9GzjM5Br4qyjiFMix/mBF23vPSPvU dvPmqJttoT41w8vs6IsjFZl4+xyi3lvdw2arcK88XiRXhrGvPD2ubxaatKfvKMA7Zuma+K bfTUTDpVotL77PuQpkSvsDdjXh4R/u3PiYjx+8t5XKzZ0Shvi/aytZ9Jm4i/7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241091; a=rsa-sha256; cv=none; b=OihjbC8e2cpciYGPyYvrgX/KS866INPmfk6mm7MtRbyy5c3CXyy6XZlNa/ieuGHzOengBJ u+shjXjxs5AqE3AylwciLXk7KhN9mq79mOaEJmOpw87a1zFsA9yTZHiCghtnduAPI9ahXS In/Y9Ihl3/QHD3dO0ywkr8sbGqO8HDaAL/VoiFKNnPKFwr3ThJ4/i1yPQCboxvIqeFsTno cxMTE9V3BTcErQ6fRf5oGYZMEVLv/PNr03QyESws88LPJvRzgecnVHLXYl+EMjcemSI9zO xEyciYSajtbnmE4mQ/nmGpSMuT17PHuxgWKB3+D5wpXsxLS90xs6sVkWlnvWVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDM3PqlzRWR; Fri, 18 Oct 2024 08:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8ipXN087747; Fri, 18 Oct 2024 08:44:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8ipKu087744; Fri, 18 Oct 2024 08:44:51 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:44:51 GMT Message-Id: <202410180844.49I8ipKu087744@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: b973a14d354f - main - sound: Simplify pcm_chnalloc() and fix infinite loop bug 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: b973a14d354f332a3428cbab8e9d4b72cb3e2d6e Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b973a14d354f332a3428cbab8e9d4b72cb3e2d6e commit b973a14d354f332a3428cbab8e9d4b72cb3e2d6e Author: Christos Margiolis AuthorDate: 2024-10-18 08:38:50 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:38:50 +0000 sound: Simplify pcm_chnalloc() and fix infinite loop bug Simplify logic to execute the following algorithm: 1. Search for a free (i.e not busy) channel and return successfully. 2. If no channel was found, either return an ENOTSUP if no VCHAN can be created (disabled or we reached the limit), or create one more VCHAN and scan for it again. 3. If the second scan failed again, return EBUSY. This patch also solves a bug where we'd end up in an infinite loop, calling vchan_setnew() with the same `newcnt` value indefinitely, after the following scenario: 1. Plug device. 2. Spawn X channels. 3. Kill all channels except _last_ opened. 4. Clean up all unused VCHANs. 5. Spawn X+1 channels. 6. Infinite loop in pcm_chnalloc(). I am not exactly sure which part of pcm_chnalloc() caused this bug, but the patch fixes it at least... Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46548 --- sys/dev/sound/pcm/sound.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index b18b83468150..1aaf614078a4 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -109,13 +109,12 @@ snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand return bus_setup_intr(dev, res, flags, NULL, hand, param, cookiep); } -/* return error status and a locked channel */ int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, pid_t pid, char *comm) { struct pcm_channel *c; - int err, vchancount, vchan_num; + int err, vchancount; bool retry; KASSERT(d != NULL && ch != NULL && @@ -125,46 +124,38 @@ pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, PCM_BUSYASSERT(d); *ch = NULL; - vchan_num = 0; vchancount = (direction == PCMDIR_PLAY) ? d->pvchancount : d->rvchancount; - retry = false; + retry_chnalloc: - err = ENOTSUP; - /* scan for a free channel */ + /* Scan for a free channel. */ CHN_FOREACH(c, d, channels.pcm) { CHN_LOCK(c); - if (c->direction == direction && (c->flags & CHN_F_VIRTUAL)) { - if (vchancount < snd_maxautovchans && - vchan_num < c->unit) { - CHN_UNLOCK(c); - goto vchan_alloc; - } - vchan_num++; + if (c->direction != direction) { + CHN_UNLOCK(c); + continue; } - if (c->direction == direction && !(c->flags & CHN_F_BUSY)) { + if (!(c->flags & CHN_F_BUSY)) { c->flags |= CHN_F_BUSY; c->pid = pid; strlcpy(c->comm, (comm != NULL) ? comm : CHN_COMM_UNKNOWN, sizeof(c->comm)); *ch = c; + return (0); - } else if (c->direction == direction && (c->flags & CHN_F_BUSY)) - err = EBUSY; + } CHN_UNLOCK(c); } - - /* - * We came from retry_chnalloc and still didn't find a free channel. - */ + /* Maybe next time... */ if (retry) - return (err); + return (EBUSY); -vchan_alloc: - /* no channel available */ + /* No channel available. We also cannot create more VCHANs. */ if (!(vchancount > 0 && vchancount < snd_maxautovchans)) - return (err); + return (ENOTSUP); + + /* Increase the VCHAN count and try to get the new channel. */ err = vchan_setnew(d, direction, vchancount + 1); if (err == 0) { retry = true; From nobody Fri Oct 18 08:44:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVJDN6J5Nz5Ywdn; Fri, 18 Oct 2024 08:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDN4WwDz4lmN; Fri, 18 Oct 2024 08:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RXTYN6iREz4f7ExfQCoEhRnYO9nBA34nJWvHq4Nlx1U=; b=gsqu4eSRpoZjaB7AsauuQRKp/Sc9ORuJqOll5+f6sTAhp2dUmXQNYJIpOZISLJzkjtYW/z T2wrROG4951vQDEjBsxhU6+UoP8Z5l6HFOjzuJPcaMOCYhhWYnhK7eCPVqOeqOZQaPy3Tl zBrPFi1YDmfvD/9ZNLsbYC62pzCgH5xlu61f6YTzP1/4pphMx67JQH4JEJtNfwwLzIZlpX z+Hsinb6We3SJWRrVVgViGR1fovGZgwmH7uY4td301XYRcHa5/u7Ud/1IarobvfRUdLq/j Aev2tA0DahT/lL3dgoCTvw6qqO39jKrtHBCWFVA+O5xlFHrLKVd8rg9xI0VLrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RXTYN6iREz4f7ExfQCoEhRnYO9nBA34nJWvHq4Nlx1U=; b=rDtv44Ighh61cI1XXnmurY6Ukpbky1hmJ1eKG3AVr7AN2yNNJgL8wqFL8fAu9rY/5VcPZx N747/IIj+NAqnKYF+tZiHBN4io2ZcGWLQuEND7MgEz2fc8oU+XxS0QqCMKyht3ITr/BJyZ BlbCNR60ka6w0gdWAmTOLplpOoRQboiYkiFXz13FPsenY092U97ErBGbalwaZPPnYG9zkQ 9g7TgpUtPegsfhmJLdqjtXVF2pblqU5Mr5IKsxnbdbKn+PLAUzdaFJ/2B24rqZ1/g0Jik/ xQ9W2x9VyERPm02mF1ztHGolU5Tji2/l4CNwDhOHvxrqG/+FC1Coqp3fL16uYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241092; a=rsa-sha256; cv=none; b=BNQ9xjwATpWyqP13quJOjNQiJeIpFsdxV/gtIJ1joJkwk32pt4xptN6P3bBnyzBiczsIsM 6iJ8ZCiN74ejojGBHJOoazCwnU5auCcP2Efcx6We25yWm0H4da3BlrNcOd8CONHpxdmT13 jJKXg+tviSXLC+Ly1L8p0T8SaIkBNNyal0BrSlj5iDte82gYiPnY67Y21+cSGoSFVYTq2K Jz1SAV/tZ4JdiS1CoetWGkXD86uJXFxyMdLXYwZwqpLmlLyauE5q4YESiIkDsf690sHWfH vxUjY+LtCg5mPlSuTOpp2lrY1oCoAjLsd/MKtronCLs8MkD/7N1wRYYxeEtJFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDN47bKzRgv; Fri, 18 Oct 2024 08:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8iqfS087799; Fri, 18 Oct 2024 08:44:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8iq4Q087796; Fri, 18 Oct 2024 08:44:52 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:44:52 GMT Message-Id: <202410180844.49I8iq4Q087796@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: 142aca25b07c - main - sound: Sort channels by unit number as well 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: 142aca25b07c9a7067d8040ea98812c54b253bbf Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=142aca25b07c9a7067d8040ea98812c54b253bbf commit 142aca25b07c9a7067d8040ea98812c54b253bbf Author: Christos Margiolis AuthorDate: 2024-10-18 08:39:00 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:39:00 +0000 sound: Sort channels by unit number as well Refactor CHN_INSERT_SORT() to also take into account the unit number of each channel, while still prioritizing the type, to make the channel list easier to work with. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46549 --- sys/dev/sound/pcm/channel.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index 445882a62f0a..d146f51120d8 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -225,7 +225,8 @@ struct pcm_channel { #define CHN_INSERT_SORT(w, x, y, z) do { \ struct pcm_channel *t, *a = NULL; \ CHN_FOREACH(t, x, z) { \ - if ((y)->type w t->type) \ + if (((y)->type w t->type) || \ + (((y)->type == t->type) && ((y)->unit w t->unit))) \ a = t; \ else \ break; \ @@ -236,7 +237,7 @@ struct pcm_channel { CHN_INSERT_HEAD(x, y, z); \ } while (0) -#define CHN_INSERT_SORT_ASCEND(x, y, z) CHN_INSERT_SORT(>=, x, y, z) +#define CHN_INSERT_SORT_ASCEND(x, y, z) CHN_INSERT_SORT(>, x, y, z) #define CHN_INSERT_SORT_DESCEND(x, y, z) CHN_INSERT_SORT(<, x, y, z) #define CHN_BUF_PARENT(x, y) \ From nobody Fri Oct 18 08:44: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 4XVJDQ09FMz5Ywgx; Fri, 18 Oct 2024 08:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDP5lyCz4lpS; Fri, 18 Oct 2024 08:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tlIYIBqYMDr2TUTisVowHNjd5ThO5KrjshGevrpXD10=; b=gK/JW7k5mJWopAY6fb+/9GchiXZu5JK2YsBtFzDNxUdq1p2A9pevCGwnEB9eFU0qulnqJB VizLHHl+mw8xb2/Lg9ln1IkhHfDyCsB6GQUT6RzmpWmQhoC4cvGxmnSGc9YezKx5U7veQD 8maDks/v2Arm642WwDiSpZ/yMxNl6Ixc5+fd7JuGVQMRhPpgN1U8Jxa7FA+4wn6OV29ber eLbnfRUowPgccOjXhKZ0H+4yC7x73kQ+zD1b47vQrzCoyeZN94vh9rajrnDiA14mUrPotk uxPbcHEesTRwVoIh2QULIAR4Yl4PXCk1Gvv2voQMI0iE3uhF7z064dK91S3O6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tlIYIBqYMDr2TUTisVowHNjd5ThO5KrjshGevrpXD10=; b=iZZfxsP7VjBfZbsO1BRr7jNWwemMk1m/Gf1uKLb9eE9A3A+iKcboebZejAX7Hkcci2ISb3 gBm7yPKkvShpV4eviKYQAtt+OxUsKDRHeomRTXyNttyxcyNMt1ClvXjVKuvfUOFPFSQsjD b6+B4nEm701CF+Fm+6JCcz/aYy4u467XrG5vEy4D/IlpsDwu4Z2tIew8/hhI5h2oMaKdjD vhzvDdK/jYo4faozGR8rj6U0KA7Zf/CkbtctsRZ9/WBnpvMCLwULp5fnaoZXdFq943JZ50 ZdSY2Vi2Irj1sQqkTTQaDWCl3Z47GIW8CeqsLSQsuF9AnGBCbt1G2AESiqBUWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241093; a=rsa-sha256; cv=none; b=N2pLRyQvN/HTjjcDlKpawJxzihEX8EvHs3OFcXCSyymwNwCFXm/WsY5VG3M7Z7RUezDJZ3 eCXlR61OPpyrCjT9PdT/0vixr+d+D/3znsKv9WG0RxfMlCOi7040mGVACJ4a9AicP24sEj 38xkEAX2cMpbdXKxdIqhazDNL1ieMG0J1xvl2rwfmFhHaHP1Pd34nz+9dMHZf4ZOU12NRm ybyTaLugxbvhCtUZkbHQN3oZCJvpzl/Vt1N3X6kE/Pw+SNPFreDyRKQByzFHfX12OrjYQf P3iu3KlrGIM6FyqG31KNOruSWvPJNd1vaPhs9lRoUCTn45IZUThclPafXh6DtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDP5Kr4zRgw; Fri, 18 Oct 2024 08:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8irFQ087853; Fri, 18 Oct 2024 08:44:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8irlR087850; Fri, 18 Oct 2024 08:44:53 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:44:53 GMT Message-Id: <202410180844.49I8irlR087850@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: ad4c8671bdda - main - sound: Use unr(9) to produce unique channel unit numbers 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: ad4c8671bddaa30bf0413089c74dde6a618d9021 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ad4c8671bddaa30bf0413089c74dde6a618d9021 commit ad4c8671bddaa30bf0413089c74dde6a618d9021 Author: Christos Margiolis AuthorDate: 2024-10-18 08:39:08 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:39:08 +0000 sound: Use unr(9) to produce unique channel unit numbers Currently it is possible to assign a unit number that already exists. Suppose the following channel list: [vp2] If we create 3 channels, we'll end up with the following list: [vp0, vp1, vp2, vp2] This happens because chn_init() does not check if the unit number we are assigning already exists. While fixing this is trivial when the channel list is sorted in ascending order, it is way more involved when sorted in descending order. Even though sorting the list in descending order would require deliberately modifying pcm_chn_add(), and is most likely not going to happen, make the mechanism more robust by using a unr(9) allocator for each channel type. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46680 --- sys/dev/sound/pcm/channel.c | 31 ++++++++++++++++++++++--------- sys/dev/sound/pcm/sound.c | 12 ++++++++++++ sys/dev/sound/pcm/sound.h | 4 ++++ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index bf9c74e2ed1d..d1c9bc616dcf 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1157,6 +1157,24 @@ chn_reset(struct pcm_channel *c, uint32_t fmt, uint32_t spd) return r; } +static struct unrhdr * +chn_getunr(struct snddev_info *d, int type) +{ + switch (type) { + case SND_DEV_DSPHW_PLAY: + return (d->p_unr); + case SND_DEV_DSPHW_VPLAY: + return (d->vp_unr); + case SND_DEV_DSPHW_REC: + return (d->r_unr); + case SND_DEV_DSPHW_VREC: + return (d->vr_unr); + default: + __assert_unreachable(); + } + +} + struct pcm_channel * chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, int dir, void *devinfo) @@ -1165,7 +1183,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, struct feeder_class *fc; struct snd_dbuf *b, *bs; char *dirs, buf[CHN_NAMELEN]; - int i, direction, type, unit; + int i, direction, type; PCM_BUSYASSERT(d); PCM_LOCKASSERT(d); @@ -1198,13 +1216,6 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, return (NULL); } - unit = 0; - CHN_FOREACH(c, d, channels.pcm) { - if (c->type != type) - continue; - unit++; - } - PCM_UNLOCK(d); b = NULL; bs = NULL; @@ -1216,7 +1227,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, CHN_INIT(c, children.busy); c->direction = direction; c->type = type; - c->unit = unit; + c->unit = alloc_unr(chn_getunr(d, c->type)); c->format = SND_FORMAT(AFMT_U8, 1, 0); c->speed = DSP_DEFAULT_SPEED; c->pid = -1; @@ -1304,6 +1315,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, return (c); fail: + free_unr(chn_getunr(d, c->type), c->unit); feeder_remove(c); if (c->devinfo && CHANNEL_FREE(c->methods, c->devinfo)) sndbuf_free(b); @@ -1335,6 +1347,7 @@ chn_kill(struct pcm_channel *c) chn_trigger(c, PCMTRIG_ABORT); CHN_UNLOCK(c); } + free_unr(chn_getunr(c->parentsnddev, c->type), c->unit); feeder_remove(c); if (CHANNEL_FREE(c->methods, c->devinfo)) sndbuf_free(b); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 1aaf614078a4..f9c87facfeec 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -568,6 +568,10 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec) d->pvchanformat = 0; d->rvchanrate = 0; d->rvchanformat = 0; + d->p_unr = new_unrhdr(0, INT_MAX, NULL); + d->vp_unr = new_unrhdr(0, INT_MAX, NULL); + d->r_unr = new_unrhdr(0, INT_MAX, NULL); + d->vr_unr = new_unrhdr(0, INT_MAX, NULL); CHN_INIT(d, channels.pcm); CHN_INIT(d, channels.pcm.busy); @@ -653,6 +657,14 @@ pcm_unregister(device_t dev) cv_destroy(&d->cv); PCM_UNLOCK(d); snd_mtxfree(d->lock); + if (d->p_unr != NULL) + delete_unrhdr(d->p_unr); + if (d->vp_unr != NULL) + delete_unrhdr(d->vp_unr); + if (d->r_unr != NULL) + delete_unrhdr(d->r_unr); + if (d->vr_unr != NULL) + delete_unrhdr(d->vr_unr); if (snd_unit == device_get_unit(dev)) { snd_unit = pcm_best_unit(-1); diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 5f32dd767fe8..2de6ab29bd66 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -325,6 +325,10 @@ struct snddev_info { struct sysctl_ctx_list play_sysctl_ctx, rec_sysctl_ctx; struct sysctl_oid *play_sysctl_tree, *rec_sysctl_tree; struct cv cv; + struct unrhdr *p_unr; + struct unrhdr *vp_unr; + struct unrhdr *r_unr; + struct unrhdr *vr_unr; }; void sound_oss_sysinfo(oss_sysinfo *); From nobody Fri Oct 18 08:44:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVJDS2p5Rz5Ywgy; Fri, 18 Oct 2024 08:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDR72DMz4mCS; Fri, 18 Oct 2024 08:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0U0aPFF8ZYQNwdzh91PjbAIC9Nxi4wFLxlYH+Ykrbww=; b=qrzsM1lPJ5yphzbejjNePGOgfLQRVzyzm2SLRsuJNelDUfqca50IAZpHOKYAIFazHNYIkE N8ws2k+4dor7I/tHAks2DWXMgDxLWd+2jz+EgGA06oANoTo26CEEULRuESjKvynZyjG069 qXA+tHBBih5vviVqHVT8c7o31cmIqhi00+Wry/49fTecbn7NOD/YlpbL9fQQftcVQbsp6n rcaqNHOYAagj8HmRU9aBn6wCkFjXtc47Mp+4S1ZIeIffS6mOvHX7ZzPzohYWKCYL7M8+a6 1g5A7D4e38HXQ5VWU+N4p9I8t71ZegDEJCqXvE8R0FwBMryGdVrqxTpw2aYRjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0U0aPFF8ZYQNwdzh91PjbAIC9Nxi4wFLxlYH+Ykrbww=; b=ABcf6ShW5F34nVyAoI7beVKNIE1hvBdmb1xpIiV32bsTyGP38c/TELNPO6o/EXD42i92hZ l4BMOvMiUpXzYHa0GU/Yt5qVA0XcDPwQ0KuBomOpYlFkC9Gc9GHjm5yOH7EeeXapixjNR+ Zgfo3Pj8K1n3zEvC37BcrdyI/I2EytParNoADVYZvhxuugz3Pevmz19ElJsKMyIZ605zCp Z15UPNKjrs7SSZxWsueugB2V5YjY3Vvg0b1MoyQGvVQq1Xhf0AwooJMHWvt4+GDMjUucu7 +ou1QAOpkQSNUtJt0Gad49C0F3oIGM4lFSjo5uENDOKM7hGXBJSctJyci6Y06w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241096; a=rsa-sha256; cv=none; b=K3EeyTBgA1uiT3wvPLt5o5bzyvptYBPpvom+eCED9FEtw7OF0d66bY6Jum32O3X8vUfoh/ GWzEfrwkpJr5C346KclEBwjmKIOLh6ytfmEP+2afSAt21pjeW82nJLsxz/8oFp8XoLO6jp waM3s3mPEq+cHEynL8TFTlzTpvRrE5p5AntnlQ2M9VLg8s9IxdqHTq4fUnEU7/d2IWKWlR AUBaEHAlRrz3An4RZb08kh0nx7FcizpCuLEO40FoltuFldYZv0tSnYrPXCgK9ZACOXuP9T GRyEWoD89XYeBfgbRE1YeElsnPn5/LwS4/r6xDqGMqSoru5/evCCLC/L7nm3Aw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDR6ZqQzRWS; Fri, 18 Oct 2024 08:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8it2s087950; Fri, 18 Oct 2024 08:44:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8itjc087947; Fri, 18 Oct 2024 08:44:55 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:44:55 GMT Message-Id: <202410180844.49I8itjc087947@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: 0a0301deb5b6 - main - sound: Move global variable initialization to sound_modevent() 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: 0a0301deb5b6a9c66829dd20cff9d40c5ba9ad92 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0a0301deb5b6a9c66829dd20cff9d40c5ba9ad92 commit 0a0301deb5b6a9c66829dd20cff9d40c5ba9ad92 Author: Christos Margiolis AuthorDate: 2024-10-18 08:39:46 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:39:46 +0000 sound: Move global variable initialization to sound_modevent() There is no reason to initialize global variables in feeder_register(), as these variables are unrelated to what the function does. Instead, initialize them during sound(4) load. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D46749 --- sys/dev/sound/pcm/feeder.c | 43 ------------------------------------------- sys/dev/sound/pcm/sound.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 43 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 716eb07feaae..87437c6d00b5 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -77,49 +77,6 @@ feeder_register(void *p) SLIST_INSERT_HEAD(&feedertab, fte, link); feedercnt++; - /* initialize global variables */ - - if (snd_verbose < 0 || snd_verbose > 4) - snd_verbose = 1; - - if (snd_unit < 0) - snd_unit = -1; - - if (snd_maxautovchans < 0 || - snd_maxautovchans > SND_MAXVCHANS) - snd_maxautovchans = 0; - - if (chn_latency < CHN_LATENCY_MIN || - chn_latency > CHN_LATENCY_MAX) - chn_latency = CHN_LATENCY_DEFAULT; - - if (chn_latency_profile < CHN_LATENCY_PROFILE_MIN || - chn_latency_profile > CHN_LATENCY_PROFILE_MAX) - chn_latency_profile = CHN_LATENCY_PROFILE_DEFAULT; - - if (feeder_rate_min < FEEDRATE_MIN || - feeder_rate_max < FEEDRATE_MIN || - feeder_rate_min > FEEDRATE_MAX || - feeder_rate_max > FEEDRATE_MAX || - !(feeder_rate_min < feeder_rate_max)) { - feeder_rate_min = FEEDRATE_RATEMIN; - feeder_rate_max = FEEDRATE_RATEMAX; - } - - if (feeder_rate_round < FEEDRATE_ROUNDHZ_MIN || - feeder_rate_round > FEEDRATE_ROUNDHZ_MAX) - feeder_rate_round = FEEDRATE_ROUNDHZ; - - if (bootverbose) - printf("%s: snd_unit=%d snd_maxautovchans=%d " - "latency=%d " - "feeder_rate_min=%d feeder_rate_max=%d " - "feeder_rate_round=%d\n", - __func__, snd_unit, snd_maxautovchans, - chn_latency, - feeder_rate_min, feeder_rate_max, - feeder_rate_round); - /* we've got our root feeder so don't veto pcm loading anymore */ pcm_veto_load = 0; diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 330c99de14d1..da28a267c81a 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -829,6 +829,51 @@ sound_oss_card_info(oss_card_info *si) /************************************************************************/ +static void +sound_global_init(void) +{ + if (snd_verbose < 0 || snd_verbose > 4) + snd_verbose = 1; + + if (snd_unit < 0) + snd_unit = -1; + + if (snd_maxautovchans < 0 || + snd_maxautovchans > SND_MAXVCHANS) + snd_maxautovchans = 0; + + if (chn_latency < CHN_LATENCY_MIN || + chn_latency > CHN_LATENCY_MAX) + chn_latency = CHN_LATENCY_DEFAULT; + + if (chn_latency_profile < CHN_LATENCY_PROFILE_MIN || + chn_latency_profile > CHN_LATENCY_PROFILE_MAX) + chn_latency_profile = CHN_LATENCY_PROFILE_DEFAULT; + + if (feeder_rate_min < FEEDRATE_MIN || + feeder_rate_max < FEEDRATE_MIN || + feeder_rate_min > FEEDRATE_MAX || + feeder_rate_max > FEEDRATE_MAX || + !(feeder_rate_min < feeder_rate_max)) { + feeder_rate_min = FEEDRATE_RATEMIN; + feeder_rate_max = FEEDRATE_RATEMAX; + } + + if (feeder_rate_round < FEEDRATE_ROUNDHZ_MIN || + feeder_rate_round > FEEDRATE_ROUNDHZ_MAX) + feeder_rate_round = FEEDRATE_ROUNDHZ; + + if (bootverbose) + printf("%s: snd_unit=%d snd_maxautovchans=%d " + "latency=%d " + "feeder_rate_min=%d feeder_rate_max=%d " + "feeder_rate_round=%d\n", + __func__, snd_unit, snd_maxautovchans, + chn_latency, + feeder_rate_min, feeder_rate_max, + feeder_rate_round); +} + static int sound_modevent(module_t mod, int type, void *data) { @@ -839,6 +884,7 @@ sound_modevent(module_t mod, int type, void *data) case MOD_LOAD: pcm_devclass = devclass_create("pcm"); pcmsg_unrhdr = new_unrhdr(1, INT_MAX, NULL); + sound_global_init(); break; case MOD_UNLOAD: if (pcmsg_unrhdr != NULL) { From nobody Fri Oct 18 08:44: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 4XVJDR3wldz5Ywdt; Fri, 18 Oct 2024 08:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDQ6JKCz4mF5; Fri, 18 Oct 2024 08:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2HLPU/ByZB49kG+4sbxGSF8iAd4bZ3e5LJUlSDuAasc=; b=f1Hwuk/F+m7TA3tjqy6HPdjYqTsQxGZ1VAc85PyvFm5uhLGviq0PwHUXXIq0dO9DGFE2xH yI5Vv01mBQyWx5yvvnCj/oxIpv63csmNhWMCSUyKa6VRfKO2Y7NHgIaHF5C46RjD9CWQXe rU6DA3jI9oxVcY2fCdMYJcyAAhkFORppfLboOA0L90GJ6TjmHfhBTWaJRGb04Kth3Z/TMm pJ83hbu11rqzWETxDgPxyxVSBxuZuF27Qjgk1dyJt7OGRQvrnS2PiaaHuAeGGumOT7qUhl QniazR5wbx5TyVtZNcFdMuCMKNGIJnK5Nms5azclqV+q+tOWrI0TC6ue4ydbgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2HLPU/ByZB49kG+4sbxGSF8iAd4bZ3e5LJUlSDuAasc=; b=WzcsxNxuPbzjeFNK/5BShHyTcnqLhf7sAdDAA8ygxsBhlNtWJa9DBnWAWRgvvJPqRYJIGD gYw+IxKL4/i8QYPTVnjlF1/c38vQI0E1Z9i+5MurpXOOdr0KnH+zO60D7iIa7AA54cDtYO fkRiSGqbQMUljsvDhsS6erNfdbgrhCj/gb6mDIVHtd+vTD/kGewdE1+7xRSARn3nSSudwk arTEu5BWaYTayLsj3kivml0ei+JV/glvc7dl2YRPH+7GZ8tLd3M5ce1qtvMRQLeRSBAfSV BeVUzCL9J5pppPCI8HTT0Fj5AIeKSbt1hUZXQ3h+STJQJp5mMHgDhoDfAtngEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241094; a=rsa-sha256; cv=none; b=lTs879eQ/+YmVjlFIcqlO5usxIjhkgpl5iTgwdcVVyu3JjDFEIfJj5/Z7QDQIPKju3+iJS P0WCSgn8jei8myEmmneK1H25P6Ery0ojkslFGxm1Iv8Tmt9ErYQ4qPwOm6hju2mfU3Z0FT r5/GidlX4cyAtO0v+HU3NRHmWfYfq3r5MK1zNpntdCB5ptkYpEoIQ4aRNux8vnFHGto3Y8 j+W8idKNhzJuAUb7kCipGsrvYK6eUPJmxIG1SUU/RrES6Yaa87qL7qNHC032G9r2aIzhBB jX+laeZ2/mwq0uZEnf3KFkPv3Qdexr+9GoiiapejvZXNsTedNWk8NvoDIC3RIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDQ5sBpzRnl; Fri, 18 Oct 2024 08:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8is82087901; Fri, 18 Oct 2024 08:44:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8iskH087898; Fri, 18 Oct 2024 08:44:54 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:44:54 GMT Message-Id: <202410180844.49I8iskH087898@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: 41ff41776145 - main - sound: Fix indendation in sound_modevent() switch statement 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: 41ff4177614562923a30e2541e2a15883a4ce32c Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=41ff4177614562923a30e2541e2a15883a4ce32c commit 41ff4177614562923a30e2541e2a15883a4ce32c Author: Christos Margiolis AuthorDate: 2024-10-18 08:39:15 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:39:15 +0000 sound: Fix indendation in sound_modevent() switch statement Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46856 --- sys/dev/sound/pcm/sound.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index f9c87facfeec..330c99de14d1 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -836,20 +836,20 @@ sound_modevent(module_t mod, int type, void *data) ret = 0; switch (type) { - case MOD_LOAD: - pcm_devclass = devclass_create("pcm"); - pcmsg_unrhdr = new_unrhdr(1, INT_MAX, NULL); - break; - case MOD_UNLOAD: - if (pcmsg_unrhdr != NULL) { - delete_unrhdr(pcmsg_unrhdr); - pcmsg_unrhdr = NULL; - } - break; - case MOD_SHUTDOWN: - break; - default: - ret = ENOTSUP; + case MOD_LOAD: + pcm_devclass = devclass_create("pcm"); + pcmsg_unrhdr = new_unrhdr(1, INT_MAX, NULL); + break; + case MOD_UNLOAD: + if (pcmsg_unrhdr != NULL) { + delete_unrhdr(pcmsg_unrhdr); + pcmsg_unrhdr = NULL; + } + break; + case MOD_SHUTDOWN: + break; + default: + ret = ENOTSUP; } return ret; From nobody Fri Oct 18 08:44:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVJDT3LWkz5YwJs; Fri, 18 Oct 2024 08:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDT0ypkz4mKM; Fri, 18 Oct 2024 08:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8rliVtWm7i3u6ElzdMBeqm4IRrmKoainOdZ6QDhSTro=; b=BMCUlfVkmFzaVOwBbHukJTO3x8wneWAPxTyZrCJzJb0FlWw8CGAQmq6Gy6neUORrD8hEFk oWHKqdNktJKlRDn8Ao7XbLMY/1zvNwjZxNHYxbj8q+BWWA2nfmZcxXiDx5MKmjBAiZCuu7 3dNalLOsHJGc9n43gbFRAWpDShgLbN4pOc/PyLeOv9jkttKoXUcjNbgFAdQQJBv7OL4jSa DGm+oDk+YBkupsLYH6YeBikr9NioQBdz6BS4P05lzZ0pfRcNeO0fisNZBm0RNWMrchM8BM 4lGyCJkcSQZKO+clyFevTLVtWRjisPQzsaYJ9sNoeuzjhyF2GJdA/swM9bkNpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8rliVtWm7i3u6ElzdMBeqm4IRrmKoainOdZ6QDhSTro=; b=xrrvl7IyRyTHt5VFnUtcOqNKKVz/0VAMK6P5Qqh766zu6xbmNthrfSgwlDxVGpjpviALCf bYkThC5RZU83boYKyhCs95vjOM5ZUCn1sMh5bGD4hWtXmsEGBD8I7i7QlRhNw2YAipmCMy q8xf8y3p+lx+Fa3a01Q+81TmwlmyRT69jkMUhYhbkLFL/h7GIB2VrldJVVw9lJi0iTRCfR YG21gtYOlldLLurpkVJhKXh0HO4e5MnX7HlkzuhFfKyblcsl2PALQNYqR4Xm1uWWvaaMrE nuhd3yyztEtnvZ0kMxBu1V1la1JhrxIYvV+obKbiZXeNWuQ5+k9btdwVH94uCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241097; a=rsa-sha256; cv=none; b=VBnreTkIlkX0KWwC4qr7Wzfh3gcp3m7xdagcqeM0mtfCHPHPWZr6ZoJDfKTvD8X3k4pWB9 /1t8SAA98V2vsEmgPdXfiWZeNu+gP16+/RqEKKUg3LtoVMeKNwpXSo9ANl1fMf4ZiDnmcH qwu3r15fOsokRZYhtXijXlaRRKh38+fU9Oqx371J8nMykIIwLfqP0CdP+P5wmvM2l4M93/ SAObzilU3JspsPI1cunXREWPgpD8q2vDwN9/RaNToz2Hong7O2Yy/BSIonL2Z3hM/hW2O2 6wENbGxXZlyvpzVvKuFmCFbva3g6ULCGiFstDKfDgiAcFpCro8UWip73go2ZkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDT0X6wzRTm; Fri, 18 Oct 2024 08:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8iv1H088003; Fri, 18 Oct 2024 08:44:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8ivk7088000; Fri, 18 Oct 2024 08:44:57 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:44:57 GMT Message-Id: <202410180844.49I8ivk7088000@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: 97570db05ced - main - sound: Move root feeder initialization to separate function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97570db05ced435f4fb1c6a67bdb16966ce5e4d9 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=97570db05ced435f4fb1c6a67bdb16966ce5e4d9 commit 97570db05ced435f4fb1c6a67bdb16966ce5e4d9 Author: Christos Margiolis AuthorDate: 2024-10-18 08:39:58 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:39:58 +0000 sound: Move root feeder initialization to separate function feeder_register() is currently a SYSINIT in order to create the root feeder, which happens only when feedercnt is 0. Separating the root feeder registration makes the code more readable. No functional change intended. While here, fix some style errors. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, zlei, markj Differential Revision: https://reviews.freebsd.org/D46821 --- sys/dev/sound/pcm/feeder.c | 69 +++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 87437c6d00b5..c6f93ac54036 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -48,51 +48,55 @@ struct feedertab_entry { int idx; }; static SLIST_HEAD(, feedertab_entry) feedertab; +static int feedercnt = 0; /*****************************************************************************/ -void -feeder_register(void *p) +static void +feeder_register_root(void *p) { - static int feedercnt = 0; - struct feeder_class *fc = p; struct feedertab_entry *fte; - int i; - - if (feedercnt == 0) { - KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name)); - - SLIST_INIT(&feedertab); - fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO); - if (fte == NULL) { - printf("can't allocate memory for root feeder: %s\n", - fc->name); - return; - } - fte->feederclass = fc; - fte->desc = NULL; - fte->idx = feedercnt; - SLIST_INSERT_HEAD(&feedertab, fte, link); - feedercnt++; - - /* we've got our root feeder so don't veto pcm loading anymore */ - pcm_veto_load = 0; + MPASS(feedercnt == 0); + KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name)); + SLIST_INIT(&feedertab); + fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO); + if (fte == NULL) { + printf("can't allocate memory for root feeder: %s\n", fc->name); return; } + fte->feederclass = fc; + fte->desc = NULL; + fte->idx = feedercnt; + SLIST_INSERT_HEAD(&feedertab, fte, link); + feedercnt++; + + /* we've got our root feeder so don't veto pcm loading anymore */ + pcm_veto_load = 0; +} + +void +feeder_register(void *p) +{ + struct feeder_class *fc = p; + struct feedertab_entry *fte; + int i; KASSERT(fc->desc != NULL, ("feeder '%s' has no descriptor", fc->name)); - /* beyond this point failure is non-fatal but may result in some translations being unavailable */ + /* + * beyond this point failure is non-fatal but may result in some + * translations being unavailable + */ i = 0; while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) { - /* printf("adding feeder %s, %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); */ fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO); if (fte == NULL) { - printf("can't allocate memory for feeder '%s', %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); - + printf("can't allocate memory for feeder '%s', " + "%x -> %x\n", + fc->name, fc->desc[i].in, fc->desc[i].out); return; } fte->feederclass = fc; @@ -103,8 +107,10 @@ feeder_register(void *p) i++; } feedercnt++; - if (feedercnt >= MAXFEEDERS) - printf("MAXFEEDERS (%d >= %d) exceeded\n", feedercnt, MAXFEEDERS); + if (feedercnt >= MAXFEEDERS) { + printf("MAXFEEDERS (%d >= %d) exceeded\n", + feedercnt, MAXFEEDERS); + } } static void @@ -469,5 +475,6 @@ static struct feeder_class feeder_root_class = { .desc = NULL, .data = NULL, }; -SYSINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_register, &feeder_root_class); +SYSINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_register_root, + &feeder_root_class); SYSUNINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_unregisterall, NULL); From nobody Fri Oct 18 08:44:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVJDV5Krmz5YwJv; Fri, 18 Oct 2024 08:44:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDV3Q8sz4mQJ; Fri, 18 Oct 2024 08:44:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s91VsAyZQeqSmyJpJ+/66Gq30zipusxJx3aJ+kEHxck=; b=PVIqLH4S3BZaskS1N5HMSrw59Osjjn4h0xVGT/KJscjstRoGceKOHLZslf0AewkltgHYYA TYxDMy2k+6l7MolhMBbGp5nIqo04voYqJs3wkm2FM2FOMUQq+wVWKqglXzLYRpbcZcVf/b iN4bUgqEvpVNIRn/idju99tQjL9Rsd9eumI5TJnrz6TUJdWPYnr0UJupdKBdyA8gVQDPDg 19anXm88h0yoyIoIaT82PxfwXcvQLoMUgRaz7NkCwIJ54HLUIO2gqW0EEpU/Z5qVebqAFj Q3pMl8Sgpn1T8W+IJpF+S1TLIgBsWMJ7epXxT4xXRfU9q84FzOXL7fZrgCWD9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s91VsAyZQeqSmyJpJ+/66Gq30zipusxJx3aJ+kEHxck=; b=VNo3uupFIjsER8z2oG2Vuaz+tB/w9pEsJ8NKfLpPttIVEIVSrJZhw3rMsnqyBqo0erF6A+ Z1/2yRzV9J5bTDJfCjyNs/G/kJLT7/JEjy08FYMvLwoAxdfs3JA8+ANwpgzGN9KNrKaKUM E4eha+WL0cFcZThu0cYYHBpYuoI0+grHmdS+I7DChRdrbr4+fXoZAh4I/mbnPN6YQMRqF5 Wda5A4s5Z+Aw9o+lx/w+UBLj2gLeX1ayMWH0yccNOecmp8qHOKq3jn+NETzNe014RQ5cV+ IKGy7QMDeBjelB+gbfABVrr94yqEr4UEM3dyJ2p0ooX2R5ajl/kJEgt/B7j3vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241098; a=rsa-sha256; cv=none; b=RPXQmzKtSconqnnGS0EBD+D5qCcr9qkxNPp5g+sw8MNd9/DhUfybFTRsSYSCEZBGwUBl3w Tl+2FScitDDZaGlMCfVe4ZAETmkIswjSWtPFFWjoHdaPkoThPVr+IYGLe+0SpR2ppIAKWm 3QQap/PXCXck3ImC+d/XFwZVJkiXyDAFlMOc1Hg1TdrTocyRYGiETxTg0LYDSgAZfSra42 lU3vmA71sDrjcataAvv6FWvhQQ9pmRUv4b1ktNDY8q6rBNImJHD8zTAEt8Gm4JDDX/1HcI 9vQDHKlhmyn8maKsPJJ8rviTmz3ounfbiPgFmSsjfzs/mAJIhzEElyQ8FkGb/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 4XVJDV2pPRzRTn; Fri, 18 Oct 2024 08:44:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8iwob088048; Fri, 18 Oct 2024 08:44:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8iw1w088045; Fri, 18 Oct 2024 08:44:58 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:44:58 GMT Message-Id: <202410180844.49I8iw1w088045@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: e42c82678219 - main - snd_dummy: Drain callout during detach 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: e42c8267821952407d4f4064026058aeaaa741ac Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e42c8267821952407d4f4064026058aeaaa741ac commit e42c8267821952407d4f4064026058aeaaa741ac Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:08 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:40:08 +0000 snd_dummy: Drain callout during detach If we do not enter dummy_chan_trigger() before detaching, we'll get a use-after-free since the callout(9) callback might be called after having been detached. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D46715 --- sys/dev/sound/dummy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index f8193a73fcc8..c1cd4dff15f9 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -327,6 +327,7 @@ dummy_detach(device_t dev) struct dummy_softc *sc = device_get_softc(dev); int err; + callout_drain(&sc->callout); err = pcm_unregister(dev); snd_mtxfree(sc->lock); From nobody Fri Oct 18 08:44:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVJDW5XdKz5Ywf0; Fri, 18 Oct 2024 08:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDW4HWCz4mT2; Fri, 18 Oct 2024 08:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dJy8m1BJG3LILzMwTdu2a4ZjafJOeqVMhBYrwH0fp10=; b=Ag3Xluo+jYkbsJDgxJJWi7wB2QBomMYLpI+MPYKf1tPL7hdTYMtCDDsBpdcojbNMWe94iJ pdv7Mx+q3q5GDgyS2BWvcebrElp9SdsOeSOzA3AUVGISzxrSMlZjMXMXX0oSiTW9a8GNV4 p1Paho4QQh24kdD13VuLArQ03Q/VpHZwtWQSAsZ21Xn2TyEIjkTuqWc7xagBpvBddLrQZT ZHxL5WNsR9EEN++cbepu3cYRQtcgbJEKJf1TP9H7ob2EYKSoIE6Oa8BE+78cTbOaiiOgc3 kMw/+TbWd+bNk2PZMEzKPffVD8WGpC78f1OeAmqsQ5QrTEUniI1If/HbioJLjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dJy8m1BJG3LILzMwTdu2a4ZjafJOeqVMhBYrwH0fp10=; b=w53xufQt0oOYEdBjpgPsS4c5VNAgmU/ftwu+t7RFXFDRF5W+NKMTB+DLaenlXsYOl9p3DV s74silDNVnDjocmvGMXQfVFZzczPrbFT06pv9/7+X2fpla9oKSfLJg1ymp86Mx4xI4wP5N yb1DniDwNWAQTO8+KWsDMZob7LSKRcXSXZTUbCwrJAwTPTO/tWIp5h8ZEegqNjjH7ZCxTO lS7XWhT9zRefnMOIEJhI6LjSmxMj6o0U85q5cYMsMajxMwyzHlgeqN9SNq7p83nUVbpVGH h4iWoxiNQ0a+Ii0IL9B+kwmCRtgel/swXJFzE9NkcxRfx1x2ugiDDRIhQMNI+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241099; a=rsa-sha256; cv=none; b=QATn9kfMY0RSW0SInwRRmz7Dt7dzw6A4PuPN96udAWB6RYzl3syHCtuGaQW3MHVQQFgMAQ k/HMiPFsnK4DRVjqcijnJV0pwEKMOkYddJNlXfQZGIv3q+xq8pwZFnBFJ7kL5z1eRqRR4L wuKrxpoOnW4CUo0T2Dxo0nHv0iHqFrxw9ReIriZ2cXreDOTTnwKPj/F0WUTDJ4bRYesCHP LlQ9tlcKn5NoWqjqiK7LRDwEJ7y5+AR1utE+XKU7LAn1hLKzA/l0Hr5bjgdlveEJGBxYU1 5Sy9hS1qvEyBs3aJy90VhCY6W4/7JrqAk2o71fQxruhYeOYy/nhQ/ny28WAqeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDW3gnJzRgx; Fri, 18 Oct 2024 08:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8ix2j088089; Fri, 18 Oct 2024 08:44:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8ix8S088086; Fri, 18 Oct 2024 08:44:59 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:44:59 GMT Message-Id: <202410180844.49I8ix8S088086@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: 248aced26eee - main - sound: Retire SND_MAXHWCHAN 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: 248aced26eee6f569717618d097bc2205a93c800 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=248aced26eee6f569717618d097bc2205a93c800 commit 248aced26eee6f569717618d097bc2205a93c800 Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:16 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:40:16 +0000 sound: Retire SND_MAXHWCHAN No longer used. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46522 --- sys/dev/sound/pcm/sound.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 2de6ab29bd66..51c9c91f6f20 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -99,11 +99,7 @@ struct snd_mixer; #define SOUND_PREFVER SOUND_MODVER #define SOUND_MAXVER SOUND_MODVER -/* - * By design, limit possible channels for each direction. - */ -#define SND_MAXHWCHAN 256 -#define SND_MAXVCHANS SND_MAXHWCHAN +#define SND_MAXVCHANS 256 #define SD_F_SIMPLEX 0x00000001 #define SD_F_AUTOVCHAN 0x00000002 From nobody Fri Oct 18 08:45:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVJDY30mgz5YwMk; Fri, 18 Oct 2024 08:45:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDX483Jz4m8w; Fri, 18 Oct 2024 08:45:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2MkhIGBQJF2xoXke8YZFzjP1wJWXdzfj5d+4Uo5/ypQ=; b=V5meOHiGQbYM3aXWKJrvbaYVtguqu2WzX7ea/0TNAJ4Un6YPY90p2VLnxaOYRPIBPWs7bz V6zLeXwzZa9RbQEZt5kU8B5vGhllVeo1y48XpuawmLFrIsV30cazTEpB6DI/uzsHta7Cnn //DVngOEWUPGdsOA6PmgSSD6aya3iU1B0dv+4PI9Xqa+lk4FMd5O+f08KWNb6bWweENemo c/+nbTnw3xwGxi2df2Nzssh5xDAL+1Y9doHM9+Nz0GBj38HPOE4A9r25ZlBcM2m4P1ALa1 jEHlKYbEhFsxYXFFSO/aJxbVxWMYgutrMqcydtdkdpmIN6TXiaTVfGQQk6wX9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2MkhIGBQJF2xoXke8YZFzjP1wJWXdzfj5d+4Uo5/ypQ=; b=kySk3YVX4VmWp1qrujZuACBSoPaDBaCGP4zsPrcYM01knW71jdkPRIg6IrLftcQvKC5Mgy s7rjGuvAF9nCfOurNEfeGod5hN8UUH4In247mBaSAqAIHCKPnl7BYNEaZkCC4VV9zWevJ7 YnQqL35VBLBQVjhtvgOwff5AzXHJeH+NX3Kw9bfj2mGJfSOwWtSpTUngo70Hhsm+Rakiw2 +JKCWF/p3jYb0zLj9n+flWHCn8faxFfoDt5Az6TtjCxDygrOjhbRRgc620/AG7RdCL6dXW srRKLCDYAkBKTFYYK208f7jLLjyPkj3stV+mICIOPzqu/SGDnBn7ODI+45SeoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241100; a=rsa-sha256; cv=none; b=sZSxdyrj5RZRpZvxeWqxhMNYUxl3g7K2bTzVuNLyCtujuQ03O7Qz52xxjiJgGBjAaScGpu Ctnz4S0ZphnCuo24nBBgSM+xcb/pnH5iD+XFJ3hCcQaSFjZUBJiWUchV2kH/83LaS7jhC6 m31OjYc82siL2TL8ykEgl/GkmI9hw/uL2D92h/tpkwPczc3gsdfnDRN78Z67zunhxGG4Pr gysmzx1+lHhuakQWleEewyDQeil+s3/JDn36ulMfRpEMt4Z8JcirXcZRgQjk/KLlXCHY1Q M4J5pHXhDSTTiFlYjd/v749riTHG63ofHqNY7llkwQNYhDZXLQqsj3VravP+BA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDX3llVzRnm; Fri, 18 Oct 2024 08:45:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8j0r4088148; Fri, 18 Oct 2024 08:45:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8j0ps088145; Fri, 18 Oct 2024 08:45:00 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:00 GMT Message-Id: <202410180845.49I8j0ps088145@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: 3cab66d12d43 - main - sound: Simplify vchan_create() error paths 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: 3cab66d12d439357b948093756ca1af87967c8cc Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3cab66d12d439357b948093756ca1af87967c8cc commit 3cab66d12d439357b948093756ca1af87967c8cc Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:23 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:40:23 +0000 sound: Simplify vchan_create() error paths Instead of checking the value of "ret" multiple times, just set a goto label and jump there immediately in case of an error. While here, remove a redundant assignment to "d". Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D46833 --- sys/dev/sound/pcm/vchan.c | 76 +++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index c1ad9b9ec2ba..9046c144b41b 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -674,8 +674,11 @@ vchan_create(struct pcm_channel *parent) struct pcm_channel *ch; struct pcmchan_caps *parent_caps; uint32_t vchanfmt, vchanspd; - int ret, direction, r, save; + int ret, direction, r; + bool save; + ret = 0; + save = false; d = parent->parentsnddev; PCM_BUSYASSERT(d); @@ -688,8 +691,6 @@ vchan_create(struct pcm_channel *parent) parent->direction == PCMDIR_REC)) return (EINVAL); - d = parent->parentsnddev; - CHN_UNLOCK(parent); PCM_LOCK(d); @@ -728,14 +729,13 @@ vchan_create(struct pcm_channel *parent) parent->flags |= CHN_F_HAS_VCHAN; - ret = 0; parent_caps = chn_getcaps(parent); - if (parent_caps == NULL) + if (parent_caps == NULL) { ret = EINVAL; + goto fail; + } - save = 0; - - if (ret == 0 && vchanfmt == 0) { + if (vchanfmt == 0) { const char *vfmt; CHN_UNLOCK(parent); @@ -752,10 +752,10 @@ vchan_create(struct pcm_channel *parent) } if (vchanfmt == 0) vchanfmt = VCHAN_DEFAULT_FORMAT; - save = 1; + save = true; } - if (ret == 0 && vchanspd == 0) { + if (vchanspd == 0) { /* * This is very sad. Few soundcards advertised as being * able to do (insanely) higher/lower speed, but in @@ -773,26 +773,25 @@ vchan_create(struct pcm_channel *parent) RANGE(vchanspd, parent_caps->minspeed, parent_caps->maxspeed); } - save = 1; + save = true; } - if (ret == 0) { - /* - * Limit the speed between feeder_rate_min <-> feeder_rate_max. - */ - RANGE(vchanspd, feeder_rate_min, feeder_rate_max); - - if (feeder_rate_round) { - RANGE(vchanspd, parent_caps->minspeed, - parent_caps->maxspeed); - vchanspd = CHANNEL_SETSPEED(parent->methods, - parent->devinfo, vchanspd); - } + /* + * Limit the speed between feeder_rate_min <-> feeder_rate_max. + */ + RANGE(vchanspd, feeder_rate_min, feeder_rate_max); - ret = chn_reset(parent, vchanfmt, vchanspd); + if (feeder_rate_round) { + RANGE(vchanspd, parent_caps->minspeed, + parent_caps->maxspeed); + vchanspd = CHANNEL_SETSPEED(parent->methods, + parent->devinfo, vchanspd); } - if (ret == 0 && save) { + if ((ret = chn_reset(parent, vchanfmt, vchanspd)) != 0) + goto fail; + + if (save) { /* * Save new value. */ @@ -809,23 +808,24 @@ vchan_create(struct pcm_channel *parent) * If the parent channel supports digital format, * enable passthrough mode. */ - if (ret == 0 && snd_fmtvalid(AFMT_PASSTHROUGH, parent_caps->fmtlist)) { + if (snd_fmtvalid(AFMT_PASSTHROUGH, parent_caps->fmtlist)) { parent->flags &= ~CHN_F_VCHAN_DYNAMIC; parent->flags |= CHN_F_VCHAN_PASSTHROUGH; } - if (ret != 0) { - CHN_REMOVE(parent, ch, children); - parent->flags &= ~CHN_F_HAS_VCHAN; - CHN_UNLOCK(parent); - PCM_LOCK(d); - if (pcm_chn_remove(d, ch) == 0) { - PCM_UNLOCK(d); - chn_kill(ch); - } else - PCM_UNLOCK(d); - CHN_LOCK(parent); - } + return (ret); + +fail: + CHN_REMOVE(parent, ch, children); + parent->flags &= ~CHN_F_HAS_VCHAN; + CHN_UNLOCK(parent); + PCM_LOCK(d); + if (pcm_chn_remove(d, ch) == 0) { + PCM_UNLOCK(d); + chn_kill(ch); + } else + PCM_UNLOCK(d); + CHN_LOCK(parent); return (ret); } From nobody Fri Oct 18 08:45: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 4XVJDZ0M0Mz5YwDm; Fri, 18 Oct 2024 08:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDY5Kj1z4mLJ; Fri, 18 Oct 2024 08:45:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88g9iLLT/ueQYEIayzoq737dZXQpyVar4SwdO7XEF+c=; b=Obdrpgo8BwLjbd+xwSUclaR3Pi5iKGooo3RuldCDjW01PJcniXOGTm59aeyTvkGGPeK6bg ZXU21SBTAw52o1HGwxa7s9BloX7ADO2e806QFc61y0Nx0iDB400J+QztrKKNRSbqm15WdQ 8ZlwccLijfvzyj8F4N28C40CpwIbpexkO0m9lLJGZeMebTZ87rvuktlOdkyt6nK6Hf0rRG 6Xr8PWD5y4LVd2vU8l9YlBIrRxphz6iJh5KSXx0PAemuCz2fNFv+iE1WjBRZ3bfQx5yUUQ NVgmb46ekHvcMrXFLTBkgXfzh4iboIxuDeRishZ9UvNjFvvwNEzo8XSn2Y4HBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88g9iLLT/ueQYEIayzoq737dZXQpyVar4SwdO7XEF+c=; b=ps7/PGUqkiKvQ0vPz619Tbp0LXghXFDE4HTvtPi+BvOsWXkYJHzYzOillteOEl69+vLyKl pBpkgIDYtK9vKW/xBfRAeoSiQrb649x075QKZDWq54rT/knjCBuoQ0XNvS0tpzzekY2CEx fTFih4VOLivL56lN3TS9InILwf9MKfOwPfJsXDzJvQQ/C7rzMa0AZH7cDCLwrN0Q7WyyuJ YNp0KXOxz4tCsdXCzuGINYXh2pg+zEuZe2dv512tkIG5PSjjBjyNzzvhBra1k/oODWn3fv ZmvAQ63ZdC+fxlYsRx4ArJcYZtAj9Kra614jK8pwJ+NvAyDnN2YQZsBKyxVzqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241101; a=rsa-sha256; cv=none; b=vQ7BLKzx0EGMbFvg1bQVJgN0mKFmwj4qLACnximl00xJ8uSqPx9qAxkNiP8Z5ZwGtVuRfh Jial+YyrX1D82bVp0k0mzLeaAUFgdPqAiskq+yt9iPDimvfGrteJoJfavyFcTu6bCfNNx1 dykKVoNbO/84Gt80Ze7MEpO0mjmW99sI7AFLCNs/E/N4UGCOEJ3ZyykDL6kVeA7XSC39dk iDpIUvr0Bh1h71bbHABAqBFkhwJpzEtenzkKWVuxD5FjnkbC3JF1DaAhVVj5fMSKdz71nw W7+IWgdU0R0xT+bHjrp2HgB6zggDR8uT9PC9Pl6GlKCB4vHXmORPODiAIpduew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDY4x87zRnn; Fri, 18 Oct 2024 08:45:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8j1w8088196; Fri, 18 Oct 2024 08:45:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8j1ZA088193; Fri, 18 Oct 2024 08:45:01 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:01 GMT Message-Id: <202410180845.49I8j1ZA088193@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: f3092614bcae - main - sound: Remove useless newspd check in sysctl_dev_pcm_vchanrate() 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: f3092614bcae949332a8f21f7b78ba68b3ee5899 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f3092614bcae949332a8f21f7b78ba68b3ee5899 commit f3092614bcae949332a8f21f7b78ba68b3ee5899 Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:33 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:40:33 +0000 sound: Remove useless newspd check in sysctl_dev_pcm_vchanrate() feeder_rate_min functions as the lower boundary. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D46834 --- sys/dev/sound/pcm/vchan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index 9046c144b41b..8580eb679f35 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -508,8 +508,7 @@ sysctl_dev_pcm_vchanrate(SYSCTL_HANDLER_ARGS) return (ret); } - if (newspd < 1 || newspd < feeder_rate_min || - newspd > feeder_rate_max) { + if (newspd < feeder_rate_min || newspd > feeder_rate_max) { PCM_RELEASE_QUICK(d); return (EINVAL); } From nobody Fri Oct 18 08:45: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 4XVJDb20wKz5YwHR; Fri, 18 Oct 2024 08:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDZ6XNLz4mLc; Fri, 18 Oct 2024 08:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OIlKntomP9j0zBRAmntSN/orkdXYG+tNPOEOWlkLats=; b=EsdPkfarfsCBlO7HQZ2WEln7z2FCoVYCfipzeUD4RK37bYYvPv1dgsGoGMJENv9Zp7vlxL nhykwbdjWAh2f82LuMC7DtUVmGgru0k+orL9Y+XkpzGJB88EM2mpGK2WJTd7yATgwxlASv /XeK/0pzOgGkoMO0foXzGsJURvzPrGyTD6Evv0Pr9QyTui+PjTrqQnt12Uzck9O5aQBF8R TRfDBrH07vcz2zEWGPvDirANPjB6Q0RBmsRdhCV5U5KdKcTJvMocWTpr7AR1rkR+uET/r5 BEp1juJYorr7ZO4FD4EQuy9RIWAgE+fqGVJMu39TqTBnolKOnjgba71lQ4RudA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OIlKntomP9j0zBRAmntSN/orkdXYG+tNPOEOWlkLats=; b=ZvuKS2UuKzev3OP0tE93IcmtKpmaHcDuFdVHtx7I7sJrJGWe8TXJv8K4KPLbmt8far+qy8 pOofBchN24hxrazUxBmeRZ9jpqsNUPnLLcR20aH8VFLQp2g0xflaTO8YjYMGa9DD1dZOjA KSEbwZljU8BmyhLDMHza75TMnPFKWBQjnyiQbJXMN/XcLPv5MnJR4SqKFYQllupwVmPTEd swnDzf/Y58dA533CD+X2tVp8mQIw2AEgDyd60hC46ARhUvD89urZ/V1upEpOySJv+typzm K//ZMtAn/yKbdU/PgSR8voS1L6Fzw6X1Qbpu+jwncG4OuXJh+nr2yXfAdMBwRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241102; a=rsa-sha256; cv=none; b=Nx4oLuTwMi74sgpkzk/NWzYwffoLSGyM1WDywL552sgZJBiiPXEe+36TELieBMshz1zXmx x9d61CEz6tnqg+BtGlxxCGSQqpT4WxAdViklwBTxZsEtWuPwFK/eJK82vqCQ1mL8VQXuIv 9FPAqi+Ra/Jh9BPCfTgeGR27XKNCaWHwvxUxMSxnCYGnYlA0cTnIE6I7SRExWB1izA8g01 qL2eCyrGs6fBwiA23LQcW/b6b5mGzRPdNl9cVf6PECBhN0ddOZG/81ivGPa/8Pfqc7sBlS /M7LPnvpYHshb9qlsCKQwwkfhzOE1i6xWfAUQ1hS4YkluWqQOAVh02QgOk+fYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDZ664qzR3Q; Fri, 18 Oct 2024 08:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8j2NN088249; Fri, 18 Oct 2024 08:45:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8j2JR088246; Fri, 18 Oct 2024 08:45:02 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:02 GMT Message-Id: <202410180845.49I8j2JR088246@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: 9263f854e9a6 - main - sound: Simplify channel creation and deletion process 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: 9263f854e9a63cc326a3d5f6331b933c4a010abf Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9263f854e9a63cc326a3d5f6331b933c4a010abf commit 9263f854e9a63cc326a3d5f6331b933c4a010abf Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:41 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:40:41 +0000 sound: Simplify channel creation and deletion process Currently we create and destroy channels with the following consistent pattern: - chn_init() -> pcm_chn_add() - pcm_chn_remove() -> chn_kill() Instead of calling two separate functions, merge pcm_chn_add() with chn_init(), and pcm_chn_remove() with chn_kill(). Another benefit of this change is that we avoid the confusion caused by having pcm_chn_add(), as well as pcm_addchan(). Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D46835 --- sys/dev/sound/pcm/channel.c | 40 +++++++++++++++++++++++ sys/dev/sound/pcm/sound.c | 78 +-------------------------------------------- sys/dev/sound/pcm/sound.h | 3 -- sys/dev/sound/pcm/vchan.c | 25 +++------------ 4 files changed, 45 insertions(+), 101 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index d1c9bc616dcf..5b0bb105c505 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1311,6 +1311,24 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, } PCM_LOCK(d); + CHN_INSERT_SORT_ASCEND(d, c, channels.pcm); + + switch (c->type) { + case SND_DEV_DSPHW_PLAY: + d->playcount++; + break; + case SND_DEV_DSPHW_VPLAY: + d->pvchancount++; + break; + case SND_DEV_DSPHW_REC: + d->reccount++; + break; + case SND_DEV_DSPHW_VREC: + d->rvchancount++; + break; + default: + __assert_unreachable(); + } return (c); @@ -1337,11 +1355,33 @@ fail: void chn_kill(struct pcm_channel *c) { + struct snddev_info *d = c->parentsnddev; struct snd_dbuf *b = c->bufhard; struct snd_dbuf *bs = c->bufsoft; PCM_BUSYASSERT(c->parentsnddev); + PCM_LOCK(d); + CHN_REMOVE(d, c, channels.pcm); + + switch (c->type) { + case SND_DEV_DSPHW_PLAY: + d->playcount--; + break; + case SND_DEV_DSPHW_VPLAY: + d->pvchancount--; + break; + case SND_DEV_DSPHW_REC: + d->reccount--; + break; + case SND_DEV_DSPHW_VREC: + d->rvchancount--; + break; + default: + __assert_unreachable(); + } + PCM_UNLOCK(d); + if (CHN_STARTED(c)) { CHN_LOCK(c); chn_trigger(c, PCMTRIG_ABORT); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index da28a267c81a..e25cb359f793 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -188,74 +188,6 @@ SYSCTL_PROC(_hw_snd, OID_AUTO, default_unit, sizeof(int), sysctl_hw_snd_default_unit, "I", "default sound device"); -void -pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch) -{ - PCM_BUSYASSERT(d); - PCM_LOCKASSERT(d); - KASSERT(ch != NULL && (ch->direction == PCMDIR_PLAY || - ch->direction == PCMDIR_REC), ("Invalid pcm channel")); - - CHN_INSERT_SORT_ASCEND(d, ch, channels.pcm); - - switch (ch->type) { - case SND_DEV_DSPHW_PLAY: - d->playcount++; - break; - case SND_DEV_DSPHW_VPLAY: - d->pvchancount++; - break; - case SND_DEV_DSPHW_REC: - d->reccount++; - break; - case SND_DEV_DSPHW_VREC: - d->rvchancount++; - break; - default: - __assert_unreachable(); - } -} - -int -pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch) -{ - struct pcm_channel *tmp; - - PCM_BUSYASSERT(d); - PCM_LOCKASSERT(d); - - tmp = NULL; - - CHN_FOREACH(tmp, d, channels.pcm) { - if (tmp == ch) - break; - } - - if (tmp != ch) - return (EINVAL); - - CHN_REMOVE(d, ch, channels.pcm); - - switch (ch->type) { - case SND_DEV_DSPHW_PLAY: - d->playcount--; - break; - case SND_DEV_DSPHW_VPLAY: - d->pvchancount--; - break; - case SND_DEV_DSPHW_REC: - d->reccount--; - break; - case SND_DEV_DSPHW_VREC: - d->rvchancount--; - break; - default: - __assert_unreachable(); - } - - return (0); -} - int pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo) { @@ -272,8 +204,6 @@ pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo) PCM_UNLOCK(d); return (ENODEV); } - - pcm_chn_add(d, ch); PCM_UNLOCK(d); return (0); @@ -283,7 +213,6 @@ static void pcm_killchans(struct snddev_info *d) { struct pcm_channel *ch; - int error; bool found; PCM_BUSYASSERT(d); @@ -316,12 +245,7 @@ pcm_killchans(struct snddev_info *d) pause_sbt("pcmkillchans", SBT_1MS * 5, 0, 0); continue; } - - PCM_LOCK(d); - error = pcm_chn_remove(d, ch); - PCM_UNLOCK(d); - if (error == 0) - chn_kill(ch); + chn_kill(ch); } while (!CHN_EMPTY(d, channels.pcm)); } diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 51c9c91f6f20..f96638081cb9 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -248,9 +248,6 @@ SYSCTL_DECL(_hw_snd); int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, pid_t pid, char *comm); -void pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch); -int pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch); - int pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo); unsigned int pcm_getbuffersize(device_t dev, unsigned int minbufsz, unsigned int deflt, unsigned int maxbufsz); int pcm_register(device_t dev, void *devinfo, int numplay, int numrec); diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index 8580eb679f35..4da6f83dc0a2 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -710,9 +710,6 @@ vchan_create(struct pcm_channel *parent) CHN_LOCK(parent); return (ENODEV); } - - /* add us to our grandparent's channel list */ - pcm_chn_add(d, ch); PCM_UNLOCK(d); CHN_LOCK(parent); @@ -818,12 +815,7 @@ fail: CHN_REMOVE(parent, ch, children); parent->flags &= ~CHN_F_HAS_VCHAN; CHN_UNLOCK(parent); - PCM_LOCK(d); - if (pcm_chn_remove(d, ch) == 0) { - PCM_UNLOCK(d); - chn_kill(ch); - } else - PCM_UNLOCK(d); + chn_kill(ch); CHN_LOCK(parent); return (ret); @@ -833,8 +825,6 @@ int vchan_destroy(struct pcm_channel *c) { struct pcm_channel *parent; - struct snddev_info *d; - int ret; KASSERT(c != NULL && c->parentchannel != NULL && c->parentsnddev != NULL, ("%s(): invalid channel=%p", @@ -842,10 +832,9 @@ vchan_destroy(struct pcm_channel *c) CHN_LOCKASSERT(c); - d = c->parentsnddev; parent = c->parentchannel; - PCM_BUSYASSERT(d); + PCM_BUSYASSERT(c->parentsnddev); CHN_LOCKASSERT(parent); CHN_UNLOCK(c); @@ -866,18 +855,12 @@ vchan_destroy(struct pcm_channel *c) CHN_UNLOCK(parent); - /* remove us from our grandparent's channel list */ - PCM_LOCK(d); - ret = pcm_chn_remove(d, c); - PCM_UNLOCK(d); - /* destroy ourselves */ - if (ret == 0) - chn_kill(c); + chn_kill(c); CHN_LOCK(parent); - return (ret); + return (0); } int From nobody Fri Oct 18 08:45: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 4XVJDc2VWfz5YwPl; Fri, 18 Oct 2024 08:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDc0TJtz4mcJ; Fri, 18 Oct 2024 08:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67n7IMlo44fsXIc1lplkB8RTP515pwRGTFRzz1tKTzk=; b=Xhmak8HycbYfobFYEb+27L+HBr+mORP7r+FAxCuvlWb8cMNVqZYKlxzfvEN9MWEiq9jwvq ej+eUhuOmWyVvSIqihTq5MWWl28jzPEUfnc1TG0ZrxZZvka0rIOeBzNRY7khO6ezKS2mE/ AY+6EvZ5ThB5fx7uj6MnNxHtxo6a4mijQbWi8/Zcv4xBnc2u5bnwT/x2XxBfH7PKjYDvQm VAuK2o2k20c6QhrqKmi4aL793ppsXKe+WAOpP9btVMftZbyfZmG266C/MTE5vX0qAZmN7C xlbbQHL7cJmckk3jdkspm4BqL0Vm2ipLpvc+k/zPFoayNhiHgp2NLmpoTbi4dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67n7IMlo44fsXIc1lplkB8RTP515pwRGTFRzz1tKTzk=; b=ssnPvvxZdbMhm6ymbmb3GM3/d/kH4D48Mz2h5UphDsJbkOJVBDtJasNm4ErkC9pdEU6G39 AS722NrhqOWHPoIlNvLelg0SKxS8AAD9fYd6TUmIca0vnfHSQTeWWP8GcamajWONnU9RdO mh2dC1Sp1FfMnnubrnmvGNYAKXjNml9LrNG2Gwihs1Ex/crZr3oQUOyo7PDmnzMHphbpcB f+VJvcgyNU0bxO+2ojSKnincGJBjQtLb8ZTe2gUQnqRPiTqUwH6MfQbFvQPo2L3fBtpkMj eywAK38ATUcP63sb06kLUClMFJtqu1PSuRoYHdx0Dz7Dqyc2k01NPcPzsSdo2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241104; a=rsa-sha256; cv=none; b=QM1pfrxa2q2f+UkVtJas2vHtC0/6gsbDRYiwZEVSU/jmtghiKeEqkILjpoWIkIU+qHo7zP fjpgSVZ7kJy6zaDSw+/rufD7yNu7L/pyx1KR7jbHXlKd8YsKOxDXndRBdWc8CR9IFqlVMN aj21354lMn+F7FP8TTd3vQnNMYditQjLjMCsny0IDDvYcYvLKpFTFZgmshftE1gae78KQA 8rjAC8ohoJHDRYhAf8hCQFCUHGccAIh6KQcibKytOJaEv70dHjf+FlQY3d/D/OqAFUVHNt cnZHDJZYv/whuvJBqlVIt3wt0Q922fhdXHjIe55ByzdXu6Vp1EbToMO/EAkzGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDc04c7zRQt; Fri, 18 Oct 2024 08:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8j32o088288; Fri, 18 Oct 2024 08:45:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8j3rQ088285; Fri, 18 Oct 2024 08:45:03 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:03 GMT Message-Id: <202410180845.49I8j3rQ088285@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: c30f531ddb62 - main - sound: Shorten channel names 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: c30f531ddb629ab51359fb540c8ef6068bab288b Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=c30f531ddb629ab51359fb540c8ef6068bab288b commit c30f531ddb629ab51359fb540c8ef6068bab288b Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:50 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:40:50 +0000 sound: Shorten channel names The current channel naming convention is: pcmX:[virtual_]play|record:dspX.[v]p|rY - pcmX and dspX share the same unit numbers - "[v]p|r" gives us the same information as "[virtual_]play|record" Remove the redundant information, so that the channel names become more readable: dspX.[virtual_]play|record.Y Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46836 --- sys/dev/sound/pcm/channel.c | 10 ++-------- sys/dev/sound/pcm/dsp.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 5b0bb105c505..1e68be161322 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1182,7 +1182,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, struct pcm_channel *c; struct feeder_class *fc; struct snd_dbuf *b, *bs; - char *dirs, buf[CHN_NAMELEN]; + char buf[CHN_NAMELEN]; int i, direction, type; PCM_BUSYASSERT(d); @@ -1190,22 +1190,18 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, switch (dir) { case PCMDIR_PLAY: - dirs = "play"; direction = PCMDIR_PLAY; type = SND_DEV_DSPHW_PLAY; break; case PCMDIR_PLAY_VIRTUAL: - dirs = "virtual_play"; direction = PCMDIR_PLAY; type = SND_DEV_DSPHW_VPLAY; break; case PCMDIR_REC: - dirs = "record"; direction = PCMDIR_REC; type = SND_DEV_DSPHW_REC; break; case PCMDIR_REC_VIRTUAL: - dirs = "virtual_record"; direction = PCMDIR_REC; type = SND_DEV_DSPHW_VREC; break; @@ -1239,9 +1235,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, c->dev = d->dev; c->trigger = PCMTRIG_STOP; - snprintf(c->name, sizeof(c->name), "%s:%s:%s", - device_get_nameunit(c->dev), dirs, - dsp_unit2name(buf, sizeof(buf), c)); + strlcpy(c->name, dsp_unit2name(buf, sizeof(buf), c), sizeof(c->name)); c->matrix = *feeder_matrix_id_map(SND_CHN_MATRIX_1_0); c->matrix.id = SND_CHN_MATRIX_PCMCHANNEL; diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 2b765bc8b115..bf68f64929c3 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -170,17 +170,17 @@ static const struct { char *sep; char *alias; } dsp_cdevs[] = { - { SND_DEV_DSP, "dsp", ".", NULL }, - { SND_DEV_DSPHW_PLAY, "dsp", ".p", NULL }, - { SND_DEV_DSPHW_VPLAY, "dsp", ".vp", NULL }, - { SND_DEV_DSPHW_REC, "dsp", ".r", NULL }, - { SND_DEV_DSPHW_VREC, "dsp", ".vr", NULL }, + { SND_DEV_DSP, "dsp", ".", NULL }, + { SND_DEV_DSPHW_PLAY, "dsp", ".play.", NULL }, + { SND_DEV_DSPHW_VPLAY, "dsp", ".virtual_play.", NULL }, + { SND_DEV_DSPHW_REC, "dsp", ".record.", NULL }, + { SND_DEV_DSPHW_VREC, "dsp", ".virtual_record.", NULL }, /* Low priority, OSSv4 aliases. */ - { SND_DEV_DSP, "dsp_ac3", ".", "dsp" }, - { SND_DEV_DSP, "dsp_mmap", ".", "dsp" }, - { SND_DEV_DSP, "dsp_multich", ".", "dsp" }, - { SND_DEV_DSP, "dsp_spdifout", ".", "dsp" }, - { SND_DEV_DSP, "dsp_spdifin", ".", "dsp" }, + { SND_DEV_DSP, "dsp_ac3", ".", "dsp" }, + { SND_DEV_DSP, "dsp_mmap", ".", "dsp" }, + { SND_DEV_DSP, "dsp_multich", ".", "dsp" }, + { SND_DEV_DSP, "dsp_spdifout", ".", "dsp" }, + { SND_DEV_DSP, "dsp_spdifin", ".", "dsp" }, }; static void From nobody Fri Oct 18 08:45: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 4XVJDd2vS0z5YwMt; Fri, 18 Oct 2024 08:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDd1q22z4mRp; Fri, 18 Oct 2024 08:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BWq5CFR9VYJWopl+QtmyciSFF/6KBVy3FMN4XkG2uE=; b=bbpvhjpXk4LiTNWprPR2h8pLYExNziK5K2wwck+7by7tEHlXHVbknC/Y2k8Q1ya8VlrjAx 0mbXYnoQPcM/EBjhle+BmuS1By6qQcZsTtx5rPLO3XMzXDTqQUwkAxO/3sZ3RbyHXOW5Xk wqAbV21sqlWNBK+7yEHm2ILis6Hhwxp+6DmEhZdCVJ1F/i/rBGHeF70z65R8BEdOGycAYj 3YWP+GNo/RVA3+dIpNyi1xZyRsf0sNSkCxaqEyPMf1C/cy0jVhrke/1kdazgtIOvouJRO2 MwSNJamI0d9nzRBtVQMIZYm8UQUbV/6sOeLjf7IRwuc2BYHZuah4geK9HfxUnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BWq5CFR9VYJWopl+QtmyciSFF/6KBVy3FMN4XkG2uE=; b=FKCRL4tY6btSaG8We/57GM3yNvrHo3Ws5FfmiWYA6DLcqzV19Koq9+XNrIbP3zliGiuSVz YGrQb1khDDOKzqeMV2RvcbwtsCyZNyxjbSdZb3jV0aZvqgPoeLKQ6rjGJJ3ch8AzhU0ZN2 +FaqVkIphbBYwI8SG6fgbnfxySLeEZ7ahyzA9FzokiAevjxTF7Ey7rFAxJXD9znty0xZiv WCWakkeIEqOPG0t7DcRvYCUU57tIiwVFVVmGQQWHwnbObdaZlsyRyY+TYaqtC1wDrj9Oy3 L7HY4ufJ9lDrWaTnE0Bso3JXxjK97kLVnqEl2URFCMBbnmwvLiI4RPi5fkdtVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241105; a=rsa-sha256; cv=none; b=w5SqeKs93xxbuy0uZFNivXr42EclY7La69ZlVYIGtCjRN7F316HwDoKCsbg1LccwJ+sffL k3xx/K2ejk3KO2zND4ocppX2fBoAenNMeu6k+PrI6W713jkZn5jRbyCW96/m99hhS3u1TE rrRBSlQLH/+s86ie7eJgmOvJLVrwn5g1j+kasVmvwWQOVZTvWsYkJ4UHiaq4QcJ+9vkdu3 jUu2/fN8isEhM5HgmSXjRE5J8Xav43Zh7iqIpiSAtFj6WzNZZqFHiAPfCLjQV+zIC1/HXI CymLZfYLtFSZnyzXoPxLcTs5SYY1Dm1UUqm4PzoHtR1C3MJg+N4TJ42aj0a0TQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDd1NwkzRTp; Fri, 18 Oct 2024 08:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8j5qP088355; Fri, 18 Oct 2024 08:45:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8j58H088351; Fri, 18 Oct 2024 08:45:05 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:05 GMT Message-Id: <202410180845.49I8j58H088351@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: 3cc01caa26e4 - main - sound: Do not cast return value of malloc(9) 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: 3cc01caa26e4bf0798d219b2d40429a2cc1a642a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3cc01caa26e4bf0798d219b2d40429a2cc1a642a commit 3cc01caa26e4bf0798d219b2d40429a2cc1a642a Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:57 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:40:57 +0000 sound: Do not cast return value of malloc(9) No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, zlei, markj, emaste Differential Revision: https://reviews.freebsd.org/D46844 --- sys/dev/sound/fdt/audio_soc.c | 2 +- sys/dev/sound/pci/hda/hdaa.c | 20 +++++++------------- sys/dev/sound/pci/maestro3.c | 2 +- sys/dev/sound/pci/spicds.c | 2 +- sys/dev/sound/pcm/dsp.c | 6 +++--- sys/dev/sound/pcm/sndstat.c | 2 +- 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/sys/dev/sound/fdt/audio_soc.c b/sys/dev/sound/fdt/audio_soc.c index 3e937720bb5b..92813a3079d8 100644 --- a/sys/dev/sound/fdt/audio_soc.c +++ b/sys/dev/sound/fdt/audio_soc.c @@ -367,7 +367,7 @@ audio_soc_init(void *arg) auxdev = OF_device_from_xref(aux_devs[i]); if (auxdev == NULL) device_printf(sc->dev, "warning: no driver attached to aux node\n"); - aux_node = (struct audio_soc_aux_node *)malloc(sizeof(*aux_node), M_DEVBUF, M_NOWAIT); + aux_node = malloc(sizeof(*aux_node), M_DEVBUF, M_NOWAIT); if (aux_node == NULL) { device_printf(sc->dev, "failed to allocate aux node struct\n"); return; diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 3489513e038c..bf38e6a97483 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -3033,8 +3033,7 @@ hdaa_audio_ctl_parse(struct hdaa_devinfo *devinfo) if (max < 1) return; - ctls = (struct hdaa_audio_ctl *)malloc( - sizeof(*ctls) * max, M_HDAA, M_ZERO | M_NOWAIT); + ctls = malloc(sizeof(*ctls) * max, M_HDAA, M_ZERO | M_NOWAIT); if (ctls == NULL) { /* Blekh! */ @@ -3186,8 +3185,7 @@ hdaa_audio_as_parse(struct hdaa_devinfo *devinfo) if (max < 1) return; - as = (struct hdaa_audio_as *)malloc( - sizeof(*as) * max, M_HDAA, M_ZERO | M_NOWAIT); + as = malloc(sizeof(*as) * max, M_HDAA, M_ZERO | M_NOWAIT); if (as == NULL) { /* Blekh! */ @@ -4077,8 +4075,7 @@ hdaa_audio_bind_as(struct hdaa_devinfo *devinfo) cnt += as[j].num_chans; } if (devinfo->num_chans == 0) { - devinfo->chans = (struct hdaa_chan *)malloc( - sizeof(struct hdaa_chan) * cnt, + devinfo->chans = malloc(sizeof(struct hdaa_chan) * cnt, M_HDAA, M_ZERO | M_NOWAIT); if (devinfo->chans == NULL) { device_printf(devinfo->dev, @@ -5490,10 +5487,8 @@ hdaa_prepare_pcms(struct hdaa_devinfo *devinfo) } devinfo->num_devs = max(ardev, apdev) + max(drdev, dpdev); - devinfo->devs = - (struct hdaa_pcm_devinfo *)malloc( - devinfo->num_devs * sizeof(struct hdaa_pcm_devinfo), - M_HDAA, M_ZERO | M_NOWAIT); + devinfo->devs = malloc(devinfo->num_devs * + sizeof(struct hdaa_pcm_devinfo), M_HDAA, M_ZERO | M_NOWAIT); if (devinfo->devs == NULL) { device_printf(devinfo->dev, "Unable to allocate memory for devices\n"); @@ -6625,9 +6620,8 @@ hdaa_attach(device_t dev) ); if (devinfo->nodecnt > 0) - devinfo->widget = (struct hdaa_widget *)malloc( - sizeof(*(devinfo->widget)) * devinfo->nodecnt, M_HDAA, - M_WAITOK | M_ZERO); + devinfo->widget = malloc(sizeof(*(devinfo->widget)) * + devinfo->nodecnt, M_HDAA, M_WAITOK | M_ZERO); else devinfo->widget = NULL; diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index 4d6dca310eea..f922aa5cec3f 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -1453,7 +1453,7 @@ m3_pci_attach(device_t dev) /* Create the buffer for saving the card state during suspend */ len = sizeof(u_int16_t) * (REV_B_CODE_MEMORY_LENGTH + REV_B_DATA_MEMORY_LENGTH); - sc->savemem = (u_int16_t*)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); + sc->savemem = malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); return 0; diff --git a/sys/dev/sound/pci/spicds.c b/sys/dev/sound/pci/spicds.c index 3b67101b8df0..da0e8d9da6d5 100644 --- a/sys/dev/sound/pci/spicds.c +++ b/sys/dev/sound/pci/spicds.c @@ -144,7 +144,7 @@ spicds_create(device_t dev, void *devinfo, int num, spicds_ctrl ctrl) #if(0) device_printf(dev, "spicds_create(dev, devinfo, %d, ctrl)\n", num); #endif - codec = (struct spicds_info *)malloc(sizeof *codec, M_SPICDS, M_NOWAIT); + codec = malloc(sizeof(*codec), M_SPICDS, M_NOWAIT); if (codec == NULL) return NULL; diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index bf68f64929c3..d4f7e3d6e63f 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2493,7 +2493,7 @@ dsp_oss_syncgroup(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_syncgr * syncgroup. */ if (group->id == 0) { - sg = (struct pcmchan_syncgroup *)malloc(sizeof(*sg), M_DEVBUF, M_NOWAIT); + sg = malloc(sizeof(*sg), M_DEVBUF, M_NOWAIT); if (sg != NULL) { SLIST_INIT(&sg->members); sg->id = alloc_unr(pcmsg_unrhdr); @@ -2520,7 +2520,7 @@ dsp_oss_syncgroup(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_syncgr * insert into syncgroup. */ if (group->mode & PCM_ENABLE_INPUT) { - smrd = (struct pcmchan_syncmember *)malloc(sizeof(*smrd), M_DEVBUF, M_NOWAIT); + smrd = malloc(sizeof(*smrd), M_DEVBUF, M_NOWAIT); if (smrd == NULL) { ret = ENOMEM; goto out; @@ -2536,7 +2536,7 @@ dsp_oss_syncgroup(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_syncgr } if (group->mode & PCM_ENABLE_OUTPUT) { - smwr = (struct pcmchan_syncmember *)malloc(sizeof(*smwr), M_DEVBUF, M_NOWAIT); + smwr = malloc(sizeof(*smwr), M_DEVBUF, M_NOWAIT); if (smwr == NULL) { ret = ENOMEM; goto out; diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 4c5efb72cc0a..993ca926070f 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -1109,7 +1109,7 @@ sndstat_line2userdev(struct sndstat_file *pf, const char *line, int n) if (e == NULL) goto fail; ud->nameunit = strndup(line, e - line, M_DEVBUF); - ud->devnode = (char *)malloc(e - line + 1, M_DEVBUF, M_WAITOK | M_ZERO); + ud->devnode = malloc(e - line + 1, M_DEVBUF, M_WAITOK | M_ZERO); strlcat(ud->devnode, ud->nameunit, e - line + 1); line = e + 1; From nobody Fri Oct 18 08:45: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 4XVJDf5RVgz5YwKB; Fri, 18 Oct 2024 08:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDf304sz4mZJ; Fri, 18 Oct 2024 08:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yti4iqMXRlcEvW1n3fAqMGJw7nUj3hyWjXApbT/9CZQ=; b=MZaCwMsRh7NQ+PyOBIMTnntL8RrqJysoWvqlxFazckD252gMPRamlGkPhGpk20KPM37gy0 8Owt0+7xvVwoYmO/CXVkj/10oI4ZWSlnG0L1XWNhfjOsJtLYJ+YIXlUZ+E/SasEF2/YORT WDvPvvq5ou0NrtaVm2IghumlQjtgWwlFnRIoQkBoT18xl4ORJuo23C08cVbGbdSIKMVE+W sANtUvvnb+6hoC9Igce8pmB9i7/f3EmV2F3QvL1pecD3fN9Az22OnbWPvVUIuhXjcHmVm5 iomQzI5fPHGB7mVB6DhAgOPAu5g2dW8s9BL0WBVSx9IRss5KJWEBj89ljUibvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yti4iqMXRlcEvW1n3fAqMGJw7nUj3hyWjXApbT/9CZQ=; b=X1ah35QmITDKLNjzd8GIb5KhB5S2jPt6Sz/frg4ViVqnzYbVwnBWkHLg+h6kHfcR0OVtXs 8vbDQ7PnZCYDRYAq2jnM287KuqXsaKvrqc3tx/1STRgwMIKCpRNXKL66whBHeGkOze8wA/ eqFKp6Jlbw4EMuVU33s6cqXq6WMkn38P7dEDh9G+EEzEjWze/0fhW0ycRNmgSa0AvPUAMD VD0KW0bq0o8ilX8u2ZcEgPi06FWx+/dk28iTORLgKYpAsDmqgjZtP1FwqklWttarfQWb17 DR3844VPq+q5ejSj/+M7Kkit7HIrM5zBrc2FAksAIFA58oBJwn3ZJ13WMwy4UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241106; a=rsa-sha256; cv=none; b=SJdQyIau3BTBBFAJxJ+CQ90A3OxE4SONyM0/c6ZMG02aRIqHkgOxkydgeQAC27/u7CLm1A 0BKRv2pLyvQVQtthASD4YMVsGfuvuOrlNazSmT3aZQtCLFv6+fneyNFpK69hQe8y4/LehJ nIAoUxyuqtV2sMzDw2TeZq1hIjHh97dGErKhRiT6CMIbuWwWsFFLFs4/dtyMbOBXRcKwdP yLiy5kaEUyMMZChDR/OqHLoshd+orhAy4RuEt9xiCkIvtAUe00ojjjeaj2IPSeWBZeKvil ryJPXKNPejZ05vHTfgWuLMDbEzAaxI1avw/peF3e8WbGYw8CdFCT+y28zOAKCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDf2K8pzRTq; Fri, 18 Oct 2024 08:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8j6wo088398; Fri, 18 Oct 2024 08:45:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8j6Tb088395; Fri, 18 Oct 2024 08:45:06 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:06 GMT Message-Id: <202410180845.49I8j6Tb088395@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: 5e33eca8e8f3 - main - sound: Use M_WAITOK where possible 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: 5e33eca8e8f359d4d48f4c50334a03748420a7da Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5e33eca8e8f359d4d48f4c50334a03748420a7da commit 5e33eca8e8f359d4d48f4c50334a03748420a7da Author: Christos Margiolis AuthorDate: 2024-10-18 08:41:05 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:41:05 +0000 sound: Use M_WAITOK where possible These malloc(9) calls are in contexts where sleeping is permitted. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, zlei, markj, emaste Differential Revision: https://reviews.freebsd.org/D46845 --- sys/dev/sound/pcm/channel.c | 7 +------ sys/dev/sound/pcm/feeder.c | 14 ++------------ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 1e68be161322..6b8f00f9aa83 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1296,12 +1296,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, */ if (c->direction == PCMDIR_PLAY) { bs->sl = sndbuf_getmaxsize(bs); - bs->shadbuf = malloc(bs->sl, M_DEVBUF, M_NOWAIT); - if (bs->shadbuf == NULL) { - device_printf(d->dev, "%s(): failed to create shadow " - "buffer\n", __func__); - goto fail; - } + bs->shadbuf = malloc(bs->sl, M_DEVBUF, M_WAITOK); } PCM_LOCK(d); diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index c6f93ac54036..2b9599859102 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -62,11 +62,7 @@ feeder_register_root(void *p) KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name)); SLIST_INIT(&feedertab); - fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO); - if (fte == NULL) { - printf("can't allocate memory for root feeder: %s\n", fc->name); - return; - } + fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); fte->feederclass = fc; fte->desc = NULL; fte->idx = feedercnt; @@ -92,13 +88,7 @@ feeder_register(void *p) */ i = 0; while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) { - fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO); - if (fte == NULL) { - printf("can't allocate memory for feeder '%s', " - "%x -> %x\n", - fc->name, fc->desc[i].in, fc->desc[i].out); - return; - } + fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); fte->feederclass = fc; fte->desc = &fc->desc[i]; fte->idx = feedercnt; From nobody Fri Oct 18 08:45: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 4XVJDg6G3zz5YwPq; Fri, 18 Oct 2024 08:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDg457Cz4mVt; Fri, 18 Oct 2024 08:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oxzYZui7/1HIAcOjbA4ctyTdTQjj+ZItMBH3Dw9/wjo=; b=VNyqgm+7Zgkpb0kiMQZyugBPaWoGBOHhbtobgqJdgIlxS9ouxeTiiQfhrbuxnBV+Id2K5o +1UBuYv7S7fOwoDE7UfTocEVrCEgmjTGUmmVZjSxZVJ3oCz/77Zcc+5KA6SfObOMOJMBxt 7B0TK4UpkQZiQfAt766q/s7Ef9qOx3xni58+dT/rZF53YBW68x0HVTNgCHSyiIX3u0esxq QNfWB26mZSa3IU0kzsnXIhAol3yYqQnmoVO02psPBBlUmwFuxhXKci4awf2YPclnPHihIP syATe4gKYaLbPROx204Q9i1VGZMGxP6aXHaMdvS7taZ2+5iymgSRt1thDS2scg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oxzYZui7/1HIAcOjbA4ctyTdTQjj+ZItMBH3Dw9/wjo=; b=QLWQtS0Ykjw7yCoX3P/YKLCFw+3RLK8IdB4HC3PvuqA1tS5d5Vtpkg8VQxX5VYMGCZa6Nq 9afjJkIMYCu1JxvFjQnUA4l6/EQAIxlR0MBEA3yI7CoqDQO1zGuI5dfE+TVCphHZ0ZL5rI BGh0MxrRfdTp8G9Wsfr8/7RYRoVbLDm9CxdBKlYqPPrUOwuPqZuNyW01i66lnu5DIQxAJR +oAM/TJpVarzBAPdCq0wBw0i08AyYYnIUzj8fulDZIZvQC/03lFrA9NJo0Hoh0Rh4laa0F /ZBzJqN+L7ZpzTpgsslDrvo6ILNdJg/yw64nJh+JhvYZk6FWnjfOyTJ6YuMFbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241107; a=rsa-sha256; cv=none; b=alm4mhi/5TyT6iQHeidcJ9jFK0/Q44Yz1pYl7iVMRgP89c6Bd22jN5b2dPD4+252MPjbx2 +hPRPc9nNnkjAHMpJrp4qzHglt9lYEBmPOyESQs3gKwkWrKqfyFk0JrTe5HhCrYEAnDJ7N y9Wx3duQcRsmgTSlq6LFjmOJkw8yzPwei5PFBAVaXiV8Df4476Ce+fGo7qijqQg6ziEVlx XBXZ0NbhWvPbSRa2lCOzld0ipiPPEL5PCguTgfhxOcBcW3K7aaFNequk/abNovGFgwUwzS MfI9FkGTSp9dZTKhWfjsniQsD+vJ5RifUOnYDdDL+S1Lao2p+AHRujMaMGtPxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDg3fxSzRm9; Fri, 18 Oct 2024 08:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8j76N088461; Fri, 18 Oct 2024 08:45:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8j7B0088458; Fri, 18 Oct 2024 08:45:07 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:07 GMT Message-Id: <202410180845.49I8j7B0088458@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: aaf84d0e9683 - main - sound: Do not check for NULL if sbuf is allocated with SBUF_AUTOEXTEND 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: aaf84d0e96831cd886b8e1e4ae102b3ba703b90a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=aaf84d0e96831cd886b8e1e4ae102b3ba703b90a commit aaf84d0e96831cd886b8e1e4ae102b3ba703b90a Author: Christos Margiolis AuthorDate: 2024-10-18 08:41:16 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:41:16 +0000 sound: Do not check for NULL if sbuf is allocated with SBUF_AUTOEXTEND Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D46846 --- sys/dev/sound/midi/midi.c | 6 +----- sys/dev/sound/pcm/sndstat.c | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index c42cb1d7a90c..fbfb69de2913 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -950,12 +950,8 @@ midistat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) return EBUSY; } midistat_isopen = 1; - if (sbuf_new(&midistat_sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { - error = ENXIO; - goto out; - } + sbuf_new(&midistat_sbuf, NULL, 4096, SBUF_AUTOEXTEND); error = (midistat_prepare(&midistat_sbuf) > 0) ? 0 : ENOMEM; -out: if (error) midistat_isopen = 0; midistat_unlock(); diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 993ca926070f..bc51da083439 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -150,10 +150,7 @@ sndstat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) pf = malloc(sizeof(*pf), M_DEVBUF, M_WAITOK | M_ZERO); - if (sbuf_new(&pf->sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { - free(pf, M_DEVBUF); - return (ENOMEM); - } + sbuf_new(&pf->sbuf, NULL, 4096, SBUF_AUTOEXTEND); pf->fflags = flags; TAILQ_INIT(&pf->userdev_list); From nobody Fri Oct 18 08:45: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 4XVJDh6hDgz5YwF2; Fri, 18 Oct 2024 08:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDh4rfbz4mg1; Fri, 18 Oct 2024 08:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PWCZFFHWdSIJUeh7FwMYq8eke3XFEYLBqtJ1nF1AzdA=; b=uGUB4WXpx2WWfqazpD0DB+8ZzxgSGxTTjjwf8ZwbP/S8eW+9FbJGGFSREgq+dU4WJ9CGYv gKvVMidmRhszbefJnQbRXxiIelKdKhadCxTZTB1aOCgzJaeHfLsztRfieT0Lp98sxqb0+X 7iruEUIVVPJ2xP/McKPatNRnbwCYEsl9syLDH5CKzgnW6Nz9N9Yl3N8ZHyaOYBv43hrYVb B/zqCzadAD90jFWG6DvsqfSaznPQZQHI/p/QoJ49GZxJsYS9xi5DBrflrZ5QwhAHa+50vR cn8wY/rxfuo/O42mOl87d20s/vqwInObXOrQpKoqNPU7kvk7HzBzDruWP8XJCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PWCZFFHWdSIJUeh7FwMYq8eke3XFEYLBqtJ1nF1AzdA=; b=Eg5ve4pWS+Se3zgWgt6tBpg0WeXtK0kUjRY0WM+hMVCJIW5Dzk0Y8PPasNUp3lQmSJHC3L 36FaRvpTp+fRlJGFg/cbo1tqK+pXzJPlycgKECFL0XhKS2SmmLKHm1uRgdolxu/FxXgl03 Iq/K16/c7+/AL6+ecYOlZgHbxN03RRZQTX0OdFgIgC0nTNyOt9S2/y7p/Z5tad8dUaDKgz ZCRzSbCHzUZLO7jg7aEGqTQi2JWo7C5dxVbNyxblsVuH3SetLrF6QdU0lYdRerx2eA3ivc M9R1wKlkhlAMbJfBONPb6vOl5VwLLHNMv2o+ma8zBaMuYrxKf2m0sZJFqnqZLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241108; a=rsa-sha256; cv=none; b=JQ9IQ8Nfv8LPJTNl4Vo5tI6Nxr7suHujelXOcZslJ3gwuuiHZH3aXlSlE6JaAuuZAUn7L5 Aeq+ClkWKbaxWHSkBk+puciXvZPncHe8YifkeBFFACrxCjbwoISPnQNCWy7SS6cJGhGkKw R7i/6e0QoVsSrJhoOcsRqqQBJAmwwlCemBRK3MRf8h9pDFNDlfw09rn1amWPSummpoD4hL a2qakgHIyB4TIZDbJaPnRGI96HOPEurNmGwsEdItEZTTxevJDFcVijOas1ih/D4TfdpQnv YnuMu0R7X8eE5puI6BfNu8mrVLR+NqWv0fqHsYyhYb/rT0kL8JBPq1rph7lvZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDh4RK1zRWT; Fri, 18 Oct 2024 08:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8j8KE088506; Fri, 18 Oct 2024 08:45:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8j8Rx088503; Fri, 18 Oct 2024 08:45:08 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:08 GMT Message-Id: <202410180845.49I8j8Rx088503@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: 0ff0a8234f83 - main - sound: Improve /dev/sndstat channel info readability 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: 0ff0a8234f83e6b25e9a2f1b64623baaf723d6dc Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0ff0a8234f83e6b25e9a2f1b64623baaf723d6dc commit 0ff0a8234f83e6b25e9a2f1b64623baaf723d6dc Author: Christos Margiolis AuthorDate: 2024-10-18 08:41:23 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:41:23 +0000 sound: Improve /dev/sndstat channel info readability Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, zlei Differential Revision: https://reviews.freebsd.org/D46857 --- sys/dev/sound/pcm/sndstat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index bc51da083439..b20b3f8f6158 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -1280,12 +1280,12 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) } sbuf_printf(s, "\n\t"); - sbuf_printf(s, "interrupts %d, ", c->interrupts); + sbuf_printf(s, "\tinterrupts %d, ", c->interrupts); if (c->direction == PCMDIR_REC) { sbuf_printf(s, "overruns %d, feed %u, hfree %d, " - "sfree %d [b:%d/%d/%d|bs:%d/%d/%d]", + "sfree %d\n\t\t[b:%d/%d/%d|bs:%d/%d/%d]", c->xruns, c->feedcount, sndbuf_getfree(c->bufhard), sndbuf_getfree(c->bufsoft), @@ -1298,7 +1298,7 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) } else { sbuf_printf(s, "underruns %d, feed %u, ready %d " - "[b:%d/%d/%d|bs:%d/%d/%d]", + "\n\t\t[b:%d/%d/%d|bs:%d/%d/%d]", c->xruns, c->feedcount, sndbuf_getready(c->bufsoft), sndbuf_getsize(c->bufhard), @@ -1310,14 +1310,14 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) } sbuf_printf(s, "\n\t"); - sbuf_printf(s, "channel flags=0x%b", c->flags, CHN_F_BITS); + sbuf_printf(s, "\tchannel flags=0x%b", c->flags, CHN_F_BITS); sbuf_printf(s, "\n\t"); if (c->parentchannel != NULL) { - sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + sbuf_printf(s, "\t{%s}", (c->direction == PCMDIR_REC) ? c->parentchannel->name : "userland"); } else { - sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + sbuf_printf(s, "\t{%s}", (c->direction == PCMDIR_REC) ? "hardware" : "userland"); } sbuf_printf(s, " -> "); From nobody Fri Oct 18 08:45:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVJDk1HdPz5YwPs; Fri, 18 Oct 2024 08:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDj69Wjz4mpL; Fri, 18 Oct 2024 08:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=alYIANWGsZitXwkzXkL5Nbse2V/eak+aeC9WH+k2qjQ=; b=wKy2D+P/IQLVT+ztFmkANSYJZnpx8u4qnhsx9OCIulzq4iTVbJG7eIzY5F4lW4UWmD8GDB 4QgaLC2mU0hWSvAQ4as2l2JTqpayY4usdTUiSUxsjAcu+371XxeSZPL5Zo1pUkpOk7nu9T Ok0SHasF2XPct+8EhfLEGV+3XpkmnafGRhpXi4YXmZaNAUraPEXrHh+EbwF9d1C6d1otZT 9a4UAazztFdMIwfO39XW8xvnJmHfVWLPFmVta+8i4fyQiP6K2isWznbDqe7DWnd996sqjl 0by8UT6tC80U9HFMnWUTrNH4ktbu8fUzpOT0HQWDBsmTSa3LL83JRUMBIy5ctQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=alYIANWGsZitXwkzXkL5Nbse2V/eak+aeC9WH+k2qjQ=; b=j7rBCJ8mk7JdkotY1TNEf8uI7Uacp98Gtnidj+e8kHKb/DiPNNZGhJv3AQKTLn3bKwyEXB 8o97hcQuBnrc6CZW8X17Gw82dYq63EDDXoGYJ/5QQdRhJYu54vVfORfqF21orfnOs5jsli XHs2lHORo1V5UfLFcOurNRC1w4XvOKg5nZWyZIS6K9MQ1NvBdR81moKyFxhZFVUN5X6cQH GhUJz6hsfMKcnUNy78fvZ8tKSSAR89YHohBu7xeVZPsn0H3RQPirdX1SARPPLh1r15CHJm qCP+03Mrd6TjJhNCR0mAyI5KlgS1/zJsSq3B3W7DuwG+Q3EPBv9eG9fGGRRACQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241109; a=rsa-sha256; cv=none; b=I6kea5AAdli7AjRbP3wYIa22xJB2Y8KSnv0Lq81ntjXwSLt3xBzfdwJW26mDjguHy9XalP 7SguV2YIg14jcD4bpTlgqu443fyILiZCxc/IEFbqCw9UXsAXsKLTia4LFxTPdZIvO/o9BO BSqqWNQMa8pmQuZP43CW89VAVqWIb1vKiHoVGgAmO6mtud1eiK8Y499cHOqAyGV7s91dA7 sEqnBTJrNhVjof7zhPSDBdLsnZo0lCjJQzd1exhmmnTtPsid7v7b75x00zr+HNRBxm+qqJ 3AJvHGvNzOD5HZfdxJbF/VnhAOOPvTWcozjioE3glFN6odsQWD29f4omh0HLyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDj5lyKzRmB; Fri, 18 Oct 2024 08:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8j9O4088550; Fri, 18 Oct 2024 08:45:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8j9rR088547; Fri, 18 Oct 2024 08:45:09 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:09 GMT Message-Id: <202410180845.49I8j9rR088547@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: de009cf68ba6 - main - snd_hda: Remove duplicate HDA_INTEL_CMLK* entries 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: de009cf68ba68aa5823be3d6afeebb49a15b1251 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=de009cf68ba68aa5823be3d6afeebb49a15b1251 commit de009cf68ba68aa5823be3d6afeebb49a15b1251 Author: Christos Margiolis AuthorDate: 2024-10-18 08:41:36 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:41:36 +0000 snd_hda: Remove duplicate HDA_INTEL_CMLK* entries No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D47152 --- sys/dev/sound/pci/hda/hdac.c | 2 -- sys/dev/sound/pci/hda/hdac.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index cd5fc6adb80d..929080b7ac69 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -106,8 +106,6 @@ static const struct { { HDA_INTEL_CMLKS, "Intel Comet Lake-S", 0, 0 }, { HDA_INTEL_CNLK, "Intel Cannon Lake", 0, 0 }, { HDA_INTEL_ICLK, "Intel Ice Lake", 0, 0 }, - { HDA_INTEL_CMLKLP, "Intel Comet Lake-LP", 0, 0 }, - { HDA_INTEL_CMLKH, "Intel Comet Lake-H", 0, 0 }, { HDA_INTEL_TGLK, "Intel Tiger Lake", 0, 0 }, { HDA_INTEL_TGLKH, "Intel Tiger Lake-H", 0, 0 }, { HDA_INTEL_GMLK, "Intel Gemini Lake", 0, 0 }, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 5e66e8eaed59..91ddbcccc9ed 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -95,8 +95,6 @@ #define HDA_INTEL_CMLKS HDA_MODEL_CONSTRUCT(INTEL, 0xa3f0) #define HDA_INTEL_CNLK HDA_MODEL_CONSTRUCT(INTEL, 0x9dc8) #define HDA_INTEL_ICLK HDA_MODEL_CONSTRUCT(INTEL, 0x34c8) -#define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) -#define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) #define HDA_INTEL_TGLKH HDA_MODEL_CONSTRUCT(INTEL, 0x43c8) #define HDA_INTEL_MTL HDA_MODEL_CONSTRUCT(INTEL, 0x7e28) From nobody Fri Oct 18 08:45:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVJDl2LPqz5Ywmv; Fri, 18 Oct 2024 08:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDk734lz4mrr; Fri, 18 Oct 2024 08:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2SenKVciPpg77OithE+D5tQ6Hpk9R8iv3mROqnqXAEs=; b=PwAj6AOkxnealPZ1HKfstpOfrxCird4zd7/iJEsWMjyjht7U5qfakodngkjmlt1WxlUgDr vL1Ks73vkIPXyCMdU8IGrV9U15MeNc2heNn0qDvc3mYbC0RxkeBrarrCXF3mKbUJ7BCpU1 /EkGIHg1Uif9zYnRE1Emh0PfITHLMplWf3/ctcmTLDjh/uN3emmwdSL1JL/jfDNL5SJrsr 2gaqfyWTICpGnAQxfaZIWZPtQkG2+srNDv4E7YI8jufFNjCjEE9ovbpBrWWssxout7CFCt cjLzxyxC2f0kRJ6ZeB7pQyUSAkhqbpniZnMprzLMMiQzn3wQpw0hcLKEmVr5BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2SenKVciPpg77OithE+D5tQ6Hpk9R8iv3mROqnqXAEs=; b=LAHblhM6UtcF145j/9qnkauJYx4Rjnw2c8Oycqc0AqBD35TXA8voDlqzMSF2E1LagDN8pk eRVkdgJ7i2Hcw2BX674eFQOUWrXTdGtga/y3u4BeXvPw4lxy8puHAU1Ea5NYDxUrjW01Sj HoGWdH3Hsl8KU2lvmhXUTHQEVrzgz0eGAIXipSpNicIUOcrJbIPD0TNM0gbrmAjWZuckB5 qIjmsVcImjF8h6wo+Q6PN5o72vdN1Sgsf4mjrGkMkByl437EjTxjVRJXaNEkXKyGSGIc1m aMr5kuv+T5uFyuqfK0Stcs3C6LP+mSKq0i3SOSzqcDGATCfJ14/kP5VDNekX6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241111; a=rsa-sha256; cv=none; b=bycXgoKrleTNX4MwiMcgFMTltPhy5jMzthbkangQkOVmAA4UL28O+SXNQcwwCvNnzzyYuc LQPLuAYLPJslwjZc4TCaatGdTs07xVpB3vsoTF5OGhdXBtriXzGKCzJPNXfeUn8aQYKUn3 6iUst7c613b+Z3uhkNqhonmLHAsZK5CJBE2JZLyAl3TSLT+xjRw2ZtLWU3DJUatIoLzFQD BB8gB5tWWQRTzBKvj/enp4ToF75iyYjK3USQ1+YkfQq0/fccsve0gKt0jmoqwHgaReM2tP i9IUcjF7Ki9M6O9uEkx5i8zfVFwmTZ/HlPvNJp5cTUf8IzWVgbIOHZ/YRoborg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDk6cn7zRWV; Fri, 18 Oct 2024 08:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8jASl088596; Fri, 18 Oct 2024 08:45:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8jAE8088593; Fri, 18 Oct 2024 08:45:10 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:10 GMT Message-Id: <202410180845.49I8jAE8088593@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: d643e82356d4 - main - snd_hda: Identify NVIDIA GM204 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: d643e82356d46a20a8f3f2f3c42573a6827d568a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=d643e82356d46a20a8f3f2f3c42573a6827d568a commit d643e82356d46a20a8f3f2f3c42573a6827d568a Author: Jani Salonen AuthorDate: 2024-10-18 08:41:44 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:41:44 +0000 snd_hda: Identify NVIDIA GM204 PR: 228615 MFC after: 2 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47166 --- sys/dev/sound/pci/hda/hdac.h | 1 + sys/dev/sound/pci/hda/hdacc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 91ddbcccc9ed..d00ad4e4705c 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -883,6 +883,7 @@ #define HDA_CODEC_NVIDIATEGRA124 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0028) #define HDA_CODEC_NVIDIATEGRA210 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0029) #define HDA_CODEC_NVIDIAMCP67 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0067) +#define HDA_CODEC_NVIDIAGM204 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0071) #define HDA_CODEC_NVIDIAMCP73 HDA_CODEC_CONSTRUCT(NVIDIA, 0x8001) #define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff) diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c index ebb331779ba4..d5643caf4405 100644 --- a/sys/dev/sound/pci/hda/hdacc.c +++ b/sys/dev/sound/pci/hda/hdacc.c @@ -358,6 +358,7 @@ static const struct { { HDA_CODEC_NVIDIAMCP78_3, 0, "NVIDIA MCP78" }, { HDA_CODEC_NVIDIAMCP78_4, 0, "NVIDIA MCP78" }, { HDA_CODEC_NVIDIAMCP7A, 0, "NVIDIA MCP7A" }, + { HDA_CODEC_NVIDIAGM204, 0, "NVIDIA GM204" }, { HDA_CODEC_NVIDIAGT220, 0, "NVIDIA GT220" }, { HDA_CODEC_NVIDIAGT21X, 0, "NVIDIA GT21x" }, { HDA_CODEC_NVIDIAMCP89, 0, "NVIDIA MCP89" }, From nobody Fri Oct 18 08:45: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 4XVJDm3D1lz5YwqF; Fri, 18 Oct 2024 08:45:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDm0vCQz4mmM; Fri, 18 Oct 2024 08:45:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g02SrkNohrfp/Vbux1npPj7bdY09vs00u1rnhWTn+48=; b=CoSWzIq94rQz+7pX4GZu0u3E5BcrAzIqO/NFLLeNAotpdEDwtpxVrgyO7uB9Ir7vki60lc EuN00vma8D5Pgfn/XGwu4PQoAW5k09zJSy2xvetIfGOVz3hVuk77Iza1J1xUhSAJpDsb9c TQCSfD4WtDpkMZTcuHyGwSQImTtxKWFWIRPUJT11QUZqYbMaM/LIR8cFOXQNJNrTiUTyEE irZzIdSgsaFRpg+jHjIU7bRBhZEfQ7FaRNMS+IBraxQ7tuK7QzFI2+LijnsSABBJjpAWME YG8iCPgsRMe5HWUPzG+rqNom7dzLMeBDmvsXUMBtgVQFdunVYsWK3gvChIBsHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g02SrkNohrfp/Vbux1npPj7bdY09vs00u1rnhWTn+48=; b=uInUWMXykE2adOokI+T/g1Llm5cagehTClMF+5WdP4LjTUzkexePExnsVieHwpuJS5p/rC 8OlBDmDs4er8ctqzRAXYe8kw1/kQhMAYtEfSPgwYlLYgq1UsUFIM1F3D4eZMohW6Bl6OqU fktBW5rldvs4UVuZY3u5BpzbrnwwL9LfSDYuXu9m5b0vtOXcGfkMqTbfehY94FLF0RjxKT x6o5xMrg0mTBm6pUQFGW0JyTxHrQ5aUUIVe7ur/IP7r36fqP/otUjRavOPAU7TS2q3QKSU ixiHaX+GYqu6ZAsj79ly/GdXi7F0PQmiuUtsUrb3HmOlT78pNoWu+jmaZ9XeCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241112; a=rsa-sha256; cv=none; b=xoC0E9Oz6pZQDHDU2rPbLf6I0uKvSNMm8+vzgm6dcpnyDL0mYkILNfflyOeVMyOJ+TgYmE JhNDcVvLA+qJrtKGM7M4hCbBMnZfg/x48d2njx4Sn8Auu4x9ECemalqXKYbdCIB40xcxRd icjwolE/u5Phgw72u2/oB0X/RzgnWNhpbWUimBAO68U2JOeK4n0wG9CxBRgSJ8p4q+tSsO eoPMgGQ+AyxXWNVmqbY4NWA6oEVsxyRsF8edagj4lnEV+5ub+wNND49MFZD9pr4esjxVMr 7McJrsrzE0EktEbuoa/iutcqKlFk8juWHx5mscXYERsLY4uhhssnzwfA4MfsPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDm0W0rzR3R; Fri, 18 Oct 2024 08:45:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8jC9H088638; Fri, 18 Oct 2024 08:45:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8jCfi088635; Fri, 18 Oct 2024 08:45:12 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:12 GMT Message-Id: <202410180845.49I8jCfi088635@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: 6f96ef84b359 - main - onyx: Remove unreachable if condition 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: 6f96ef84b359137a51dc1e717887ca7d31ba7bad Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6f96ef84b359137a51dc1e717887ca7d31ba7bad commit 6f96ef84b359137a51dc1e717887ca7d31ba7bad Author: Christos Margiolis AuthorDate: 2024-10-18 08:41:55 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:41:55 +0000 onyx: Remove unreachable if condition Both conditions are the same, so the second one is unreachable. PR: 229550 Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: andreast, markj Differential Revision: https://reviews.freebsd.org/D47167 --- sys/dev/sound/macio/onyx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/sound/macio/onyx.c b/sys/dev/sound/macio/onyx.c index 00c7b826f142..d13f3da92db6 100644 --- a/sys/dev/sound/macio/onyx.c +++ b/sys/dev/sound/macio/onyx.c @@ -197,7 +197,6 @@ onyx_probe(device_t dev) if (strcmp(name, "codec") == 0) { if (iicbus_get_addr(dev) != PCM3052_IICADDR) return (ENXIO); - } else if (strcmp(name, "codec") == 0) { compat = ofw_bus_get_compat(dev); if (compat == NULL || strcmp(compat, "pcm3052") != 0) return (ENXIO); From nobody Fri Oct 18 08:45: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 4XVJDn3MBjz5YwkR; Fri, 18 Oct 2024 08:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDn2ML4z4mbW; Fri, 18 Oct 2024 08:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1bFdvRYfRqwefGqxd4Zf/bcvyCOM7T422Fs5Kq90yEU=; b=YFAx5N83AX/HXE+uUndcFT0T/Iu/FaZeTLdkFz65BDmEr2ezVWoIpdMRvwQ/H5EZ5I2J2G 7ZkHSqLec0r62ri30EPEaA18s8E9mHlOVrppmNo1FWB7pg1uycTUg+EWBtM/B9XI8KEL44 1fRcOFqpy+GxOEx/5fZVDp6eI2kR9m4TEYRjhEEk721UltxT+fOb8xaMsKfWs7L0CaBvRo cP11/Ou7O3sNXVSIzT0KZe9xaCZv+9aJH0jOAyhBuIvxM8/72Y7euhOikkvDhQjaFcdFbu 7fd5EkDMloco3NkWimTT5jueb9c3ucHUVax4aBnhmNQxha5KO6m2rQxGNCxHMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1bFdvRYfRqwefGqxd4Zf/bcvyCOM7T422Fs5Kq90yEU=; b=Rr1sxl/RDD1sND+6i4rSQi5uhAA4nmEWenl9RRbL05+TFNso5jGFGRhMTRq+Us7xudm54N /S9OyD7Zbb7ogGQbLISD9EfrDn0Y2TG09FaETKZsA6pYjD8y/PSpo71DC4+OuFg8Y08Zz4 dic5dwB7yYgbW6VcFSIco6SaGhB2PQdbOIvBdTd13cL7291hESRhNgYCHcdh8eSs7TjDfd PHhDRHTit21XZXYHA7Us+f6DsDlvsbmBvjmB3npX2JQToFgxJRvrx6sQQ9Iv0Ju2abz4tS mX4OjBvQasmVczNYaOGCfZwnPf0Q6H+fy0Olb4t6t7UuMMYyKuo2VDj3Ykj4Eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241113; a=rsa-sha256; cv=none; b=JNPF5q3aVQQxKDVPAODTLSZMKLHcQsDz5mJllwzYAcU+6ZwsBZrvoCuZhpPUGDnc2+ik42 NjHZ5nxO6FzOFsQIl6ZHmwYd2AsGNYegz3ZGMcbY7+qbiZDAePWAzO46Rd8q8nDKE4APev 0F3/HXQktOHKVF1GchtvpGKtotA8YWrzjdL42e30dt8Nyzwz5Bv8ZqH57oQuJFfYvR29cd GFQzSSBffbl8FVuCvZm284jDoeCHG+cEuh3K21E/HN+TIiJkxdFsP/8esT16qWXpUO84nO Ky1gOrrapUl383jXH1L5jCq1HmSpokE131tfNkj8mcVqb6NL2cGkS25e1EJ/bQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDn1zS7zR3S; Fri, 18 Oct 2024 08:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8jDPg088683; Fri, 18 Oct 2024 08:45:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8jD3u088680; Fri, 18 Oct 2024 08:45:13 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:13 GMT Message-Id: <202410180845.49I8jD3u088680@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: 9ad289155872 - main - vmm.4: Add ppt device detach example 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: 9ad2891558729b1c1ad4ba02377b157e404a3da2 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9ad2891558729b1c1ad4ba02377b157e404a3da2 commit 9ad2891558729b1c1ad4ba02377b157e404a3da2 Author: Christos Margiolis AuthorDate: 2024-10-18 08:42:05 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:42:05 +0000 vmm.4: Add ppt device detach example Showcase how to detach ppt from a PCI device and attach a host driver, and vice-versa. MFC after: 2 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46811 --- share/man/man4/vmm.4 | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/share/man/man4/vmm.4 b/share/man/man4/vmm.4 index dfd7ad26fb98..7e4c9050021a 100644 --- a/share/man/man4/vmm.4 +++ b/share/man/man4/vmm.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 6, 2024 +.Dd September 27, 2024 .Dt VMM 4 .Os .Sh NAME @@ -108,11 +108,36 @@ bus 6 slot 5 function 0, and bus 6 slot 5 function 1. .Bd -literal -offset indent pptdevs="10/0/0 6/5/0 6/5/1" .Ed +.Pp +It is possible to detach +.Va ppt +from a PCI device without rebooting the host machine and then attach a host +driver, using the +.Xr devctl 8 +utility. +Suppose +.Va ppt +is currently attached to +.Va pci0:0:1:0 +and we want the host's +.Xr xhci 4 +driver to be attached instead: +.Bd -literal -offset indent +# devctl set driver -f pci0:0:1:0 xhci +.Ed +.Pp +The same can be applied to attach +.Va ppt +back: +.Bd -literal -offset indent +# devctl set driver -f pci0:0:1:0 ppt +.Ed .Sh SEE ALSO .Xr bhyve 4 , .Xr loader.conf 5 , .Xr bhyve 8 , .Xr bhyveload 8 , +.Xr devctl 8 , .Xr kldload 8 .Sh HISTORY .Nm vmm.ko From nobody Fri Oct 18 08:45:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVJDq0KmYz5YwND; Fri, 18 Oct 2024 08:45:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVJDp3tY2z4mhF; Fri, 18 Oct 2024 08:45:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GfIlgRdkgAYlKb1H2xrOuRAKWpGYLMV2NLVU3rtU7AI=; b=MDsf+xXPoDCRaizKrS0oL7f8oUxaCQrgJ+Mch7xanMUkd5pTh0HPhI+ZjTbnswRvp81V1Y YYr5EucvTfMhILKht3Vb2c4rcA99AiPTwcsak7GgUhEvPaJj13oLq629g5SOAzibIOHa8R SWe1No2m7DtD8fzIIE7RoBL4PWjTsWWfx7tcBPB7XaWkKgMR19f/ffS70id16a5emubPMq zonD2LycdKjjYsW+X7LhGmZwQHo+4ZkN5P2aZ2cloaPilyJmBW0ld2vU5r/SehfxGCxpSc u93dsCCUYyxA8TFExNizmmFGJVQuZbzOSb4KFQliC8AH1QbNRORDwF2/B+FbQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729241114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GfIlgRdkgAYlKb1H2xrOuRAKWpGYLMV2NLVU3rtU7AI=; b=b/Ddz2gNAu25fkKvwSw0dmS4LJJB3cwJ7+vBPuEJbvNOm8F3XWKtA/Wew1u9mD70ukLirN ok5Vl+5cA21oMf1fMIR44a9ZB8ZT579+eE0Os7/pympL+JxA6KgD4g/azNEK4ABZm9ZfHz WsNLKqozSa7HD5bHRC6JpnLnKp1syIyIichvALYU22DvzU5x2k07itIYUHqLMgnvmPxc6J Kso69aCGaO+erqUedWw8Ee0aFIhSHIlPE492TVmWBsAC1cAPOsjwAixNADhKoRmqtkalYy r9sh03L/4eSVpgiNcNf1SFSKeMdMHWMreoSdm+ooYyK/6ls0vZWYfjC9J6WyJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729241114; a=rsa-sha256; cv=none; b=oc1KtNUqSfBrcRNU9XXENuc83MERkFAD/q59VicF7t/M6BhdMMC53YubFHtDNttaZyJVTa K1ecfj4pOBwaglJ3X/q8SsRDNS1ak/Q1KiU43WHG0DoNkEG86p/LUX2PUoQRDnWWh6v1xV iliulWVmXn66+Ym4LvchDhBSvE5bbSdiZC6oIlSxIeOBVdX6+GTfhaSd8xGRUqWD5grt3a y/zkXYKyaHy6JHGQ1cNwmagz7NXPGcnUJGFv2U07Q/iImPqvlcX8ZJltYUdHVXhfveC8WX n8Vae2gLSmZ3S9nVCw6aHltfqXjc/AaQa1voSHlKmKqEKfdXYGTNA9ZR+wp1Eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVJDp3PpvzRWW; Fri, 18 Oct 2024 08:45:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49I8jEI6088719; Fri, 18 Oct 2024 08:45:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49I8jEen088716; Fri, 18 Oct 2024 08:45:14 GMT (envelope-from git) Date: Fri, 18 Oct 2024 08:45:14 GMT Message-Id: <202410180845.49I8jEen088716@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: f57efe95cc25 - main - mididump(1): Initial revision 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: f57efe95cc25ae527c632d4ffcf064799f922216 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f57efe95cc25ae527c632d4ffcf064799f922216 commit f57efe95cc25ae527c632d4ffcf064799f922216 Author: Christos Margiolis AuthorDate: 2024-10-18 08:42:12 +0000 Commit: Christos Margiolis CommitDate: 2024-10-18 08:42:12 +0000 mididump(1): Initial revision A new utility which dumps MIDI 1.0 events in real-time. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46418 --- usr.bin/Makefile | 1 + usr.bin/mididump/Makefile | 8 ++ usr.bin/mididump/mididump.1 | 80 +++++++++++ usr.bin/mididump/mididump.c | 320 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 409 insertions(+) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 88786a0dd7e0..3cd91f8019e3 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -88,6 +88,7 @@ SUBDIR= alias \ mandoc \ mdo \ mesg \ + mididump \ ministat \ mkdep \ mkfifo \ diff --git a/usr.bin/mididump/Makefile b/usr.bin/mididump/Makefile new file mode 100644 index 000000000000..f3b273172b1e --- /dev/null +++ b/usr.bin/mididump/Makefile @@ -0,0 +1,8 @@ +.include + +PROG= mididump +SRCS= ${PROG}.c +MAN= ${PROG}.1 +LDFLAGS+= -lm + +.include diff --git a/usr.bin/mididump/mididump.1 b/usr.bin/mididump/mididump.1 new file mode 100644 index 000000000000..7b2bc649eb24 --- /dev/null +++ b/usr.bin/mididump/mididump.1 @@ -0,0 +1,80 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this software were developed by Christos Margiolis +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd September 14, 2024 +.Dt MIDIDUMP 1 +.Os +.Sh NAME +.Nm mididump +.Nd dump MIDI events +.Sh SYNOPSIS +.Nm +.Op Fl t +.Ar device +.Sh DESCRIPTION +The +.Nm +utility is used to dump MIDI 1.0 events in real-time. +.Pp +The options are as follows: +.Bl -tag -width "-t" +.It Fl t +Print "Timing Clock" events. +These events are not printed by default, as they tend to clutter output. +.El +.Pp +The +.Ar device +argument corresponds to the MIDI device (e.g. +.Pa /dev/umidi0.0 ) . +.Sh SEE ALSO +.Rs +.%T Summary of MIDI 1.0 Messages +.%U https://midi.org/summary-of-midi-1-0-messages +.Re +.Rs +.%T Expanded MIDI 1.0 Messages List (Status Bytes) +.%U https://midi.org/expanded-midi-1-0-messages-list +.Re +.Rs +.%T Standard MIDI-File Format Spec. 1.1, updated +.%U https://www.music.mcgill.ca/~ich/classes/mumt306/StandardMIDIfileformat.html +.Re +.Rs +.%T MIDI CC List for Continuous Controllers +.%U https://anotherproducer.com/online-tools-for-musicians/midi-cc-list/ +.Re +.Sh AUTHORS +The +.Nm +utility was implemented by +.An Christos Margiolis Aq Mt christos@FreeBSD.org +under sponsorship from the +.Fx +Foundation. diff --git a/usr.bin/mididump/mididump.c b/usr.bin/mididump/mididump.c new file mode 100644 index 000000000000..9c8fe62c9859 --- /dev/null +++ b/usr.bin/mididump/mididump.c @@ -0,0 +1,320 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software was developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#define ARRLEN(x) (sizeof(x) / sizeof(x[0])) +#define NOTE2OCTAVE(n) (n / 12 - 1) +#define NOTE2FREQ(n) (440 * pow(2.0f, ((float)n - 69) / 12)) +#define CHAN_MASK 0x0f + +struct note { + const char *name; + const char *alt; +} static notes[] = { + { "C", NULL }, + { "C#", "Db" }, + { "D", NULL }, + { "D#", "Eb" }, + { "E", NULL }, + { "F", NULL }, + { "F#", "Gb" }, + { "G", NULL }, + { "G#", "Ab" }, + { "A", NULL }, + { "A#", "Bb" }, + { "B", NULL }, +}; + +/* Hardcoded values are not defined in sys/soundcard.h. */ +static const char *ctls[] = { + [CTL_BANK_SELECT] = "Bank Select", + [CTL_MODWHEEL] = "Modulation Wheel", + [CTL_BREATH] = "Breath Controller", + [0x03] = "Undefined", + [CTL_FOOT] = "Foot Pedal", + [CTL_PORTAMENTO_TIME] = "Portamento Time", + [CTL_DATA_ENTRY] = "Data Entry", + [CTL_MAIN_VOLUME] = "Volume", + [CTL_BALANCE] = "Balance", + [0x09] = "Undefined", + [CTL_PAN] = "Pan", + [CTL_EXPRESSION] = "Expression", + [0x0c] = "Effect Controller 1", + [0x0d] = "Effect Controller 2", + [0x0e] = "Undefined", + [0x0f] = "Undefined", + [CTL_GENERAL_PURPOSE1] = "General Purpose 1", + [CTL_GENERAL_PURPOSE2] = "General Purpose 2", + [CTL_GENERAL_PURPOSE3] = "General Purpose 3", + [CTL_GENERAL_PURPOSE4] = "General Purpose 4", + [0x14 ... 0x1f] = "Undefined", + [0x20 ... 0x3f] = "LSB Controller", + [CTL_DAMPER_PEDAL] = "Damper Pedal (Sustain)", + [CTL_PORTAMENTO] = "Portamento", + [CTL_SOSTENUTO] = "Sostenuto Pedal", + [CTL_SOFT_PEDAL] = "Soft Pedal", + [0x44] = "Legato Foot-Switch", + [CTL_HOLD2] = "Hold 2", + [0x46] = "Sound Controller 1", + [0x47] = "Sound Controller 2", + [0x48] = "Sound Controller 3", + [0x49] = "Sound Controller 4", + [0x4a] = "Sound Controller 5", + [0x4b] = "Sound Controller 6", + [0x4c] = "Sound Controller 7", + [0x4d] = "Sound Controller 8", + [0x4e] = "Sound Controller 9", + [0x4f] = "Sound Controller 10", + [CTL_GENERAL_PURPOSE5] = "General Purpose 5", + [CTL_GENERAL_PURPOSE6] = "General Purpose 6", + [CTL_GENERAL_PURPOSE7] = "General Purpose 7", + [CTL_GENERAL_PURPOSE8] = "General Purpose 8", + [0x54] = "Portamento CC", + [0x55 ... 0x57] = "Undefined", + [0x58] = "Hi-Res Velocity Prefix", + [0x59 ... 0x5a] = "Undefined", + [CTL_EXT_EFF_DEPTH] = "Effect 1 Depth", + [CTL_TREMOLO_DEPTH] = "Effect 2 Depth", + [CTL_CHORUS_DEPTH] = "Effect 3 Depth", + [CTL_DETUNE_DEPTH] = "Effect 4 Depth", + [CTL_PHASER_DEPTH] = "Effect 5 Depth", + [CTL_DATA_INCREMENT] = "Data Increment", + [CTL_DATA_DECREMENT] = "Data Decrement", + [CTL_NONREG_PARM_NUM_LSB] = "NRPN (LSB)", + [CTL_NONREG_PARM_NUM_MSB] = "NRPN (MSB)", + [CTL_REGIST_PARM_NUM_LSB] = "RPN (LSB)", + [CTL_REGIST_PARM_NUM_MSB] = "RPN (MSB)", + [0x66 ... 0x77] = "Undefined", + /* Channel mode messages */ + [0x78] = "All Sound Off", + [0x79] = "Reset All Controllers", + [0x7a] = "Local On/Off Switch", + [0x7b] = "All Notes Off", + [0x7c] = "Omni Mode Off", + [0x7d] = "Omni Mode On", + [0x7e] = "Mono Mode", + [0x7f] = "Poly Mode", +}; + +static void __dead2 +usage(void) +{ + fprintf(stderr, "usage: %s [-t] device\n", getprogname()); + exit(1); +} + +static uint8_t +read_byte(int fd) +{ + uint8_t byte; + + if (read(fd, &byte, sizeof(byte)) < (ssize_t)sizeof(byte)) + err(1, "read"); + + return (byte); +} + +int +main(int argc, char *argv[]) +{ + struct note *pn; + char buf[16]; + int fd, ch, tflag = 0; + uint8_t event, chan, b1, b2; + + while ((ch = getopt(argc, argv, "t")) != -1) { + switch (ch) { + case 't': + tflag = 1; + break; + case '?': /* FALLTHROUGH */ + default: + usage(); + } + } + argc -= optind; + argv += optind; + + if (argc < 1) + usage(); + + if ((fd = open(*argv, O_RDONLY)) < 0) + err(1, "open(%s)", *argv); + + for (;;) { + event = read_byte(fd); + if (!(event & 0x80)) + continue; + chan = (event & CHAN_MASK) + 1; + + switch (event) { + case 0x80 ... 0x8f: /* FALLTHROUGH */ + case 0x90 ... 0x9f: + b1 = read_byte(fd); + b2 = read_byte(fd); + pn = ¬es[b1 % ARRLEN(notes)]; + snprintf(buf, sizeof(buf), "%s%d", pn->name, + NOTE2OCTAVE(b1)); + if (pn->alt != NULL) { + snprintf(buf + strlen(buf), sizeof(buf), + "/%s%d", pn->alt, NOTE2OCTAVE(b1)); + } + printf("Note %-3s channel=%d, " + "note=%d (%s, %.2fHz), velocity=%d\n", + (event >= 0x80 && event <= 0x8f) ? "off" : "on", + chan, b1, buf, NOTE2FREQ(b1), b2); + break; + case 0xa0 ... 0xaf: + b1 = read_byte(fd); + b2 = read_byte(fd); + printf("Polyphonic aftertouch channel=%d, note=%d, " + "pressure=%d\n", + chan, b1, b2); + break; + case 0xb0 ... 0xbf: + b1 = read_byte(fd); + b2 = read_byte(fd); + if (b1 < 0 || b1 > ARRLEN(ctls) - 1) + break; + printf("Control/Mode change channel=%d, " + "control=%d (%s), value=%d", + chan, b1, ctls[b1], b2); + if (b1 >= 0x40 && b1 <= 0x45) { + if (b2 <= 63) + printf(" (off)"); + else + printf(" (on)"); + } + if (b1 == 0x7a) { + if (b2 == 0) + printf(" (off)"); + else if (b2 == 127) + printf(" (on"); + } + putchar('\n'); + break; + case 0xc0 ... 0xcf: + b1 = read_byte(fd); + printf("Program change channel=%d, " + "program=%d\n", + chan, b1); + break; + case 0xd0 ... 0xdf: + b1 = read_byte(fd); + printf("Channel aftertouch channel=%d, " + "pressure=%d\n", + chan, b1); + break; + case 0xe0 ... 0xef: + /* TODO Improve */ + b1 = read_byte(fd); + b2 = read_byte(fd); + printf("Pitch bend channel=%d, change=%d\n", + chan, b1 | b2 << 7); + break; + case 0xf0: + printf("SysEx vendorid="); + b1 = read_byte(fd); + printf("0x%02x", b1); + if (b1 == 0) { + printf(" 0x%02x 0x%02x", + read_byte(fd), read_byte(fd)); + } + printf(" data="); + for (;;) { + b1 = read_byte(fd); + printf("0x%02x ", b1); + /* End of SysEx (EOX) */ + if (b1 == 0xf7) + break; + } + putchar('\n'); + break; + case 0xf2: + b1 = read_byte(fd); + b2 = read_byte(fd); + printf("Song position pointer ptr=%d\n", + b1 | b2 << 7); + break; + case 0xf3: + b1 = read_byte(fd); + printf("Song select song=%d\n", b1); + break; + case 0xf6: + printf("Tune request\n"); + break; + case 0xf7: + printf("End of SysEx (EOX)\n"); + break; + case 0xf8: + if (tflag) + printf("Timing clock\n"); + break; + case 0xfa: + printf("Start\n"); + break; + case 0xfb: + printf("Continue\n"); + break; + case 0xfc: + printf("Stop\n"); + break; + case 0xfe: + printf("Active sensing\n"); + break; + case 0xff: + printf("System reset\n"); + break; + case 0xf1: /* TODO? MIDI time code qtr. frame */ + case 0xf4: /* Undefined (reserved) */ + case 0xf5: + case 0xf9: + case 0xfd: + break; + default: + printf("Unknown event type: 0x%02x\n", event); + break; + } + } + + close(fd); + + return (0); +} From nobody Fri Oct 18 12:51: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 4XVPht1D7gz5Z9qp; Fri, 18 Oct 2024 12:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVPht0Xxfz4Hxd; Fri, 18 Oct 2024 12:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729255886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4RhPPRyCYhSvovGFXMJB9CCKr7fS4IAGmoqxWYhSA4c=; b=T0YH6Wj9i2FzBkdembVaS1t/rmhDw82oqRgBl9Hs/JwF7HKIdI5eIA+ydG1QyE4/lMAwgD 44kk8KgBLHWweat/fURKlN99AAOt86OwWadCxXAgkgJdMeR1DFrAeWLNuXicuMyDUQ6sHi jw67OWvFhqNAYiF/rgB9kIuuumgSNjuxakYCFZLhXD/IpJAUhUU2Pxx103t0WP0IsDnwgB 4dviM2tZHJO78YFA91CwdU1BFvMc+hlJpxqVMELvp5PNRDMynTJ3nsSMdKTwn5xyLax5t1 eLH4vT/F3M5bvsamCTqkQyu0Xi1Xe0VOLfU3vgHZjbm+MgdBP6+WtpmJeSguBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729255886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4RhPPRyCYhSvovGFXMJB9CCKr7fS4IAGmoqxWYhSA4c=; b=mDUlAEBZMF//vDEaVh7wPrehKEGhYc8kp+3Tn7BhRr0aIdsa+3i35lkgfd3LCo1HiCKGDp Cf/KSYlUphkc5mbhu/jznhELGMWlzuYwtYRk+Z1dXbgmY3oDkdVWAK04NvSmVlYxldezwL dO/XI7Rj+bjciP/b/HOFZzt4owiRL0+hTGU7+O3FhTVbbnqehNDp2KrvjCvAsGxF8BUU8L gllzk8gobS2qRLbzjhyOFAUM7+fXRCYq/AhCP6RWGuCwFbCpF4xyBhLlYHA2CXrKuLMw4q IqxBbuTgDMc28p49vAf45ZLCRK4sqmdfkV4LJQonzr4/pKPKsPGoGC/Q97lM+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729255886; a=rsa-sha256; cv=none; b=mi+jV95lNGihmyvLi8XD4+UzkSD106CXtl+dUYrlTNEaTeLk77+vXt7tJXgDzKjzYgkgJb uuroZAC5+kt43rlReKhCorVQWf4l8enBAE9hbdlxIZ6nqWYcYaLqlhToG1dRPeLCI8qEDj nzmN2laDQh8F9trlKnIFGs6tYOnQUGqpxVNZ8BytCcNs4aB0QNC9dOEbjbV8hfkbJskwaL 8MH10KWsFpk8895O40eS91UBSTK88JGT+rv8HgmdxNfV/f7qzg4/Fl3HvkOLBnyAdA0H7S 9225Fe1/RQ0vIY2Jd9Xb0vic6YMEGby6xeVgAGv2CJWYFq0fypZG9DFCymai0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVPht08rTzb4T; Fri, 18 Oct 2024 12:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49ICpPD3007825; Fri, 18 Oct 2024 12:51:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49ICpPTh007822; Fri, 18 Oct 2024 12:51:25 GMT (envelope-from git) Date: Fri, 18 Oct 2024 12:51:25 GMT Message-Id: <202410181251.49ICpPTh007822@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 167bfde7057f - main - ftime.3: fix typo in spelling of libutil 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/main X-Git-Reftype: branch X-Git-Commit: 167bfde7057f38894c8fbd790a65136f0174368e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=167bfde7057f38894c8fbd790a65136f0174368e commit 167bfde7057f38894c8fbd790a65136f0174368e Author: Keith White AuthorDate: 2024-10-18 12:49:30 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-18 12:50:24 +0000 ftime.3: fix typo in spelling of libutil PR: 282171 MFC after: 3 days --- lib/libutil/ftime.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libutil/ftime.3 b/lib/libutil/ftime.3 index 043bbe2ed2c3..e5770367f022 100644 --- a/lib/libutil/ftime.3 +++ b/lib/libutil/ftime.3 @@ -32,7 +32,7 @@ .Nm ftime .Nd get date and time .Sh LIBRARY -.Lb libuitl +.Lb libutil .Sh SYNOPSIS .In sys/types.h .In sys/timeb.h From nobody Fri Oct 18 13:01: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 4XVPw96RXGz5ZB3n; Fri, 18 Oct 2024 13:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVPw95ykTz4LH4; Fri, 18 Oct 2024 13:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729256473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XOUuaQSTchKZ8W8DYw2gNVoUctoDkqszepgSvhS0kks=; b=Ix+aLYIIhkS8l1iBEAyNpQfMl2ptt/CpIu7Gg4iI7OUoCZzsIMKRXatmRVult5QGSgZwL8 Ik6UNOwmVUDh972otPKMq0nOpGG4bHADwR/yv0xu0nS6hVithKv8xh+B/048Cmlfb0wLft gbOoPE/+NycnhtTiY78Skb2z4Gw5L6tI5ZttQSnn2ojoCO60zb1RASUPvcXUUKlYNt5e5e xzjNYRBhxpCWecAI7Qc6Ipzt1Z0PgGelZVFQ+SUfC0lZnLSVS3E57sjjpU5wCgT2tK1PAu oT1NOFj6lM73I/V8pKwhl4skoAJ8WpRNOUrkau1vUS27ZbQt3WvIBl++RVvggA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729256473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XOUuaQSTchKZ8W8DYw2gNVoUctoDkqszepgSvhS0kks=; b=xvKoR8ZhGuaeLOuHZSQWUPD/2jty9cndL4Q0EybMjvX5BfVfqiNyJPV83XVy/o3ALuGoEh 8zLe/mjNFw810tuBswAjYOUlHgZa2k5m/6tvNldRyeHvYUIb4zrFwQhwaTWZaHXjOr0dg9 Fy8mZKzxKoRuabZ7EZxc04b+yJVAuVQbfVE8jE5kwhK74Au+dGQOXA0vnoS8ucSJDQEh4X Kdri0aEhqlepgv6MuVXxF/IPu3bKZrRX7n1IfJb3/vg8aKQKWD8UfZ0cwiyvpDL0ckiqet eCN5l0skdd9S30rGNK4j26wQMagLmFQn6zPbFHsUbMlfP8OE6XhoUK9i+oTOiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729256473; a=rsa-sha256; cv=none; b=puUKUE/kkyOvi0atps1BhOhVeCDRryz3kWtVqsDPNHIC035O1x5u3CT9oRQI1lTJin5/C6 Thv2IOxwLTczdNAcNnokSuawc1bcVTqFU7D6CranHCuccAZDqrAkeuq/rQFw8zirl3JxDG Y01c4nfFCkCOiYr73qXdtCX8ZJecBcq3ErdqpfZEp7T379MqzvH5mCOpKDCEOj1S8r8FCT zDj4G5TWW7mnKU+ZJUgWPfKAOJbDUEDECNuZUM8yGhttIS1GLxOIRAbxpznL84iqVjIPBl QTzbbQm60gzzLXEHFahpKVCs4je2S6PENxiwmVR0OuMsDXqZTh9U2FJjxVkZ0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVPw95Z6kzb5F; Fri, 18 Oct 2024 13:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49ID1Do4025359; Fri, 18 Oct 2024 13:01:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49ID1D0s025356; Fri, 18 Oct 2024 13:01:13 GMT (envelope-from git) Date: Fri, 18 Oct 2024 13:01:13 GMT Message-Id: <202410181301.49ID1D0s025356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 7aa6667623be - main - lib/clang: Commit cleaned-up workaround for building on RISC-V 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7aa6667623bef7306009d50a571e5e8c7766a174 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=7aa6667623bef7306009d50a571e5e8c7766a174 commit 7aa6667623bef7306009d50a571e5e8c7766a174 Author: Jessica Clarke AuthorDate: 2024-10-18 12:59:48 +0000 Commit: Jessica Clarke CommitDate: 2024-10-18 12:59:48 +0000 lib/clang: Commit cleaned-up workaround for building on RISC-V There is a long-standing issue on RISC-V around --gc-sections when statically linking, which affects the bootstrap build of LLVM. Since fixing this properly has remained a TODO for years, commit the workaround with documentation so that building natively from source works out of the box. PR: 258358 MFC after: 1 week --- lib/clang/llvm.build.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index 7b16f4485340..2520637e2d06 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -109,6 +109,14 @@ CFLAGS+= -fdata-sections LDFLAGS+= -Wl,-dead_strip .else LDFLAGS+= -Wl,--gc-sections +# XXX: --gc-sections strips the ELF brand note and on RISC-V the OS/ABI ends up +# as NONE, so for statically-linked binaries, i.e. lacking an interpreter, +# get_brandinfo finds nothing and (f)execve fails with ENOEXEC. Work around +# this by manually setting the OS/ABI field via the emulation. +.if ${MACHINE_ARCH:Mriscv64*} != "" && ${NO_SHARED:Uno:tl} != "no" && \ + (${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING)) +LDFLAGS+= -Wl,-m,elf64lriscv_fbsd +.endif .endif CXXSTD?= c++17 From nobody Fri Oct 18 13:54: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 4XVR5z2JvBz5ZG49 for ; Fri, 18 Oct 2024 13:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVR5z1fC6z4ShN; Fri, 18 Oct 2024 13:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729259687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prZDPryCHo/XZ69wv9kBn/2ZthvWJVOBfElujEMb6IE=; b=n2R+gObisY1k0QGfZhBQdNAcwzOyTzeBNHgMk3Ct54qGArC8vjZ+4vqNgjlR7xPhUmAaKt NTSiZVyELeW1Mj8pzJynPeFUVvap+X6n1srTVfFQoADQGzC6pnhgMRecyPsyzmJUZXI3pW awfcOYmo7IdnL/f4v7O48KkM0L+UxAmvbOw8KPy8ONCoft0PIYFAfkAU4890sx6giBOhFt JzUriqT/fSitP5xyTtDzEXxD0heZmJkuD8JDXeCVQ8myS4l7cUtn/7PLJ5NdCmv/EcAqdm rtduxZNcm3BWiqpGY+NEGLVMJ0BLs6H2/Z6JJkGEIHFahVn0PkGJ5I4UhD0ugw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729259687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prZDPryCHo/XZ69wv9kBn/2ZthvWJVOBfElujEMb6IE=; b=LX7ZmCIOB3beNy5za57jbz5N8q+CKO1tq1BEw6uAu0nhIzbnw2zlNlXVgkBRaGuRU7/oFS +4Mtp5g72Z9ZKtOeTO9xdy1IQVtHz+kSK2O5H+Smqz2wXBkUj9OqJxcFvJCCLuOWrkJLC6 mcKugtLrkKhFgGhvymbu4S+i9ArGQqJblbUTz7JKUSMkEs7TPDGrj+8WaerL6QDjDvvOXX b6ZQPpXI9SEvymkjkRLEzdJKTDeKQhbvxs2naGRSBqo6H2ImodZcvSTiOKPsCiIU5WID+V LwnWgOE5t6we4rr14LN4PVXdBr+Ljb/HrN4/NYV9YdDaLKdzht8IYytw6QyDBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729259687; a=rsa-sha256; cv=none; b=FFbNRCe//6nrZPJ4jrapKH8thMMCVnM29z1fj/37YOp6aD+UZRvMBNF7ismB528QABu8n8 77SFeDbLAz7feEJhC48WcNl5gQQ8XnpNYMAm0jt0Hzjvk8MYwGdO3usafj+t8+YeReTaal NXRtCveq2PdPF0tzZkJKCt99Mx210y5dkL+MlkZr3faIJnGUXOO1nPVlnHDNJC86emc8kI BEbqWrM2Zdybi19zypiMObVPR01/42DGWqUATOOhgwZM/I2ZZ1kOaBgBTJlbnKxQPpfPRh zHCHRa1tJddLeo9BJJ5snfaAdFtGUnETfbvcQKWc4x0Ro1/soxxS5y88Cf564g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVR5z0xrgzcQB; Fri, 18 Oct 2024 13:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IDslT6014821; Fri, 18 Oct 2024 13:54:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IDsl0k014820; Fri, 18 Oct 2024 13:54:47 GMT (envelope-from git) Date: Fri, 18 Oct 2024 13:54:47 GMT Message-Id: <202410181354.49IDsl0k014820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 9b8db746ac60..0a6d797cf6eb - vendor/unbound - vendor branch updated 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/vendor/unbound X-Git-Reftype: branch X-Git-Commit: 0a6d797cf6eb751d7eb613900cd19803e05d905f X-Git-Oldrev: 9b8db746ac608ff7cdad3c9ac7ac395319e4ea0f X-Git-Newrev: 0a6d797cf6eb751d7eb613900cd19803e05d905f Auto-Submitted: auto-generated The branch vendor/unbound has been updated by cy: URL: https://cgit.FreeBSD.org/src/log/?id=9b8db746ac60..0a6d797cf6eb 0a6d797cf6eb unbound: Vendor import 1.20.0 From nobody Fri Oct 18 13:54: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 4XVR5z2byxz5ZFSg for ; Fri, 18 Oct 2024 13:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVR5z27Crz4Sk7; Fri, 18 Oct 2024 13:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729259687; h=from:from:reply-to:subject:subject: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/twiwflIyn9fzNhitiN6i1wWJwhUW0BhdMEDqMKZyo=; b=iPMMYhYjIqKUqC4WR2LB5AU7mHUD9zTUD3usL23i2c3Zpt4heC5WWlhhHUG02tgO3nGt9Y UTj7zB9cZbTMiltSsqUWPR6zeL9mv+R63DNeUEW3Av/x25cUrMsyStdhEFKP9Sz45jIo81 VLXRP0SVLCdRKwe7M9FRy1xzxDmhIucnnpKfCSlRNPG1lc6dK0f8aeWxlZHBarlRyDH9G6 oaz3aDjpTkbHevktf/G8j37kiYPuqCquEYA5NJL/TmgvBFVs+iaNh9gTu9Zvnj7ZDsulQA 7WppbCFfV1FiigVbnEB7pC5EVRoMqEZLXZm7OoQ6sK1Am51fmDu0kUt46utnfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729259687; h=from:from:reply-to:subject:subject: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/twiwflIyn9fzNhitiN6i1wWJwhUW0BhdMEDqMKZyo=; b=Kos+I7BInTvVr3ZuWo0wiyVRtgXABXto5ovSnSXlteY+x+5GUz7tRt1mrJX6DzPWdh9Wg/ Efb+XaLi3lhOlZ3zw1HdJnfFKCxnEvVd83PORjm0IQ98Jnb4Xp7Td+ire1qzFQK/IHo0Ht CtOvDAyKe0oaQc+mpCkxH9mnT4ZXouNLSNt11oymTOViGg9fZkxtLEt9d+TxBUta/lDSLZ v76SuJaIRHzgIDfoOkmlK1SmuBEpdTVdaLNawGxGGAesBegImxhHIlbJILvNtWBDitFKVi zu0Zahu7zizJmbRcot6CToBrtuLvQ6d/QnudBFMt0A63g/iY38uauBKqf9BqMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729259687; a=rsa-sha256; cv=none; b=PSAwSuGVnoZiba+66EKW+KZkfxaH1bDZfef/PB2nP2jxXBqH9+oc0a1GA3GkSmuGaJTMXX aGfMB5Tm+0KfF+QFgk9K2MfMLkXyKGng5Xi881lmLJZU6aYLhQTf9xFXXDWOtWOSUxtBVc cMXkMYa9D+CEkA8BG3P2sceVAwQaMOEInvFzldDDPpQKVahKfVR7vbg9EGsnSnR1+7cwmL pYVTt7RQCgzohBAqCNcyJS5uD4NWJkPGce5V4cYzcMcltRCdWKOWQGi8IfAHGVXpOcPFA6 KPYYjXC1SUsUHrbdHFilh4d23Q38fXuLE+B63weV+oXbnLEfHNkqBJfG8ExB8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVR5z1c7GzcKd; Fri, 18 Oct 2024 13:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IDsldx014840; Fri, 18 Oct 2024 13:54:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IDslDS014839; Fri, 18 Oct 2024 13:54:47 GMT (envelope-from git) Date: Fri, 18 Oct 2024 13:54:47 GMT Message-Id: <202410181354.49IDslDS014839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 618cacce6d46 - Create tag vendor/unbound/1.22.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: cy X-Git-Repository: src X-Git-Refname: refs/tags/vendor/unbound/1.22.0 X-Git-Reftype: annotated tag X-Git-Commit: 618cacce6d46d5d8bb35810689b58e716c457c9b Auto-Submitted: auto-generated The annotated tag vendor/unbound/1.22.0 has been created by cy: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/unbound/1.22.0 tag vendor/unbound/1.22.0 Tagger: Cy Schubert TaggerDate: 2024-10-18 13:54:03 +0000 Unbound: Tag 1.22.0 commit 0a6d797cf6eb751d7eb613900cd19803e05d905f Author: Cy Schubert AuthorDate: 2024-10-18 13:52:55 +0000 Commit: Cy Schubert CommitDate: 2024-10-18 13:52:55 +0000 unbound: Vendor import 1.20.0 Release notes at https://nlnetlabs.nl/news/2024/Oct/17/unbound-1.22.0-released/ From nobody Fri Oct 18 14:24: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 4XVRlp0kv6z5ZHP1; Fri, 18 Oct 2024 14:24:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVRln640Zz4WwQ; Fri, 18 Oct 2024 14:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729261445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ddzdLQVVti40qLImv89ugoaQrQLaSWDID629/PthxH0=; b=iuK1xP/1D77LmKQS2YngDQ6QnmS3XkhwhYNmAnNe3yMQqD5t+xXN8oe0NUY60zUO71Pp0i SdRkK8Qw+2aAizJaoSxpcHQBiPaX0+Su6AbWPWSGwFHylsBxqDrsDMKwCzXD1j6AJ+kgYA +CN55lsJQe8yYuGDg7hjR8V8b8BuYJnBNpeNLAeyT94riIG3l13yB2M+TRw90+y5TaKaeU IflmDSzGsoIHazv+ArsCe37CSwL8gOGAopEoKVtXZgpNCMc14wLB3h+PGaOVH3h5oB4X1d GAwXkIroPU7hhiCrZSV9JlvWavqwYzIE+AcjEWSb5hfb8xihn05DpzmeQjmIug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729261445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ddzdLQVVti40qLImv89ugoaQrQLaSWDID629/PthxH0=; b=fRNY6qo31Epo0tiITJFGdfLXA3+1lpRabm4Qnn9X1WiuyMlsk/dH2FJbuIs1XxILHQLKKf bcihOIGfKy3s4dYtchv3F3UkGeQM3RBRiQgeg1FYJHejW7syyCqslbJODvfgPgddIJ3PwC mbjk0hb1mBUk6g25oOuXrSPCNsFPWwL5KqlPXyvwFurK3DuE6coEf/t574i4uOjSLPI6cS NI+Nvp431cIT2Dq9Ej+bJxVM3fQW4VZs12bD+T6btdGHlZcP3F47MzRku+GjJCa2pHSfEx UhUwGoMuWHGCSzOpeLjrlnWJMCWiwD2NbltpynsnPc1KkKxNeZgOEnGfL7HOjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729261445; a=rsa-sha256; cv=none; b=ZdotSWIHW/Ib5qe1j7RJEkgA/WsOPTy12g6lnpu62AOHTIsXO8xZ4AJe13vkFrd9OlRkit zrYitT736yAB+DnMlK8CFhTGOKypGF8066UPaGK3u5Q3tX3ytTqFthqJKylr+wgLkwOUDt myPwJ7HBu7ZWlRDwe1cUhX971uoeh+iMyNjlP9do0D7iBbSivfEozJe1o+Fne+o0HU9hiv /tYKLSAkAfyrA4hv1p+CHYaIn4PXprcZXkX3gbFIegyhRn77+aZbzU73u0PXXu3d/vLeUO TURFuUmTAYatFTxKe1YVtsWNe9ZXJGnBEK+xIa3h9e3WB3R6NaOdZ3eqDuDpeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVRln3sbLzdJd; Fri, 18 Oct 2024 14:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IEO5N2066346; Fri, 18 Oct 2024 14:24:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IEO5V0066343; Fri, 18 Oct 2024 14:24:05 GMT (envelope-from git) Date: Fri, 18 Oct 2024 14:24:05 GMT Message-Id: <202410181424.49IEO5V0066343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 46d2f61818f5 - main - unbound: Vendor import 1.22.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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46d2f61818f594174cafe31ee338c6e083fa1876 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=46d2f61818f594174cafe31ee338c6e083fa1876 commit 46d2f61818f594174cafe31ee338c6e083fa1876 Merge: 7aa6667623be 0a6d797cf6eb Author: Cy Schubert AuthorDate: 2024-10-18 13:59:33 +0000 Commit: Cy Schubert CommitDate: 2024-10-18 14:14:21 +0000 unbound: Vendor import 1.22.0 Release notes at https://nlnetlabs.nl/news/2024/Oct/17/unbound-1.22.0-released/ MFC after: 1 week Merge commit '0a6d797cf6eb751d7eb613900cd19803e05d905f' into main contrib/unbound/Makefile.in | 19 +- contrib/unbound/aclocal.m4 | 292 +- contrib/unbound/cachedb/cachedb.c | 5 +- contrib/unbound/cachedb/redis.c | 29 +- contrib/unbound/config.h.in | 94 + contrib/unbound/configure | 769 +- contrib/unbound/configure.ac | 74 +- contrib/unbound/contrib/aaaa-filter-iterator.patch | 2 +- contrib/unbound/daemon/daemon.c | 10 + contrib/unbound/daemon/daemon.h | 3 + contrib/unbound/daemon/remote.c | 14 +- contrib/unbound/daemon/stats.c | 14 +- contrib/unbound/daemon/worker.c | 38 +- contrib/unbound/dns64/dns64.c | 5 +- contrib/unbound/dnstap/unbound-dnstap-socket.c | 24 +- contrib/unbound/doc/Changelog | 151 +- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf.in | 26 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 2 +- contrib/unbound/doc/unbound-control.8.in | 10 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 71 +- contrib/unbound/doc/unbound.doxygen | 8 +- contrib/unbound/install-sh | 174 +- contrib/unbound/iterator/iter_scrub.c | 45 +- contrib/unbound/iterator/iter_utils.c | 42 + contrib/unbound/iterator/iter_utils.h | 7 + contrib/unbound/iterator/iterator.c | 57 +- contrib/unbound/iterator/iterator.h | 2 +- contrib/unbound/libunbound/context.c | 2 +- contrib/unbound/libunbound/libworker.c | 16 + contrib/unbound/libunbound/unbound.h | 4 + contrib/unbound/ltmain.sh | 866 +- contrib/unbound/services/authzone.c | 39 +- contrib/unbound/services/cache/dns.c | 59 +- contrib/unbound/services/cache/dns.h | 3 +- contrib/unbound/services/cache/rrset.c | 10 +- contrib/unbound/services/listen_dnsport.c | 2534 +++++- contrib/unbound/services/listen_dnsport.h | 405 +- contrib/unbound/services/mesh.c | 13 +- contrib/unbound/services/mesh.h | 3 +- contrib/unbound/services/modstack.c | 2 +- contrib/unbound/services/rpz.c | 19 + .../unbound/smallapp/unbound-control-setup.sh.in | 2 +- contrib/unbound/smallapp/unbound-control.c | 6 + contrib/unbound/smallapp/unbound-host.c | 6 + contrib/unbound/smallapp/worker_cb.c | 16 + contrib/unbound/testcode/doqclient.c | 2701 +++++++ contrib/unbound/testcode/unitdoq.c | 84 + .../unbound/testdata/auth_tls.tdir/auth_tls.dsc | 16 + .../testdata/auth_tls.tdir/auth_tls.nsd.conf | 21 + .../unbound/testdata/auth_tls.tdir/auth_tls.post | 14 + .../unbound/testdata/auth_tls.tdir/auth_tls.pre | 47 + .../unbound/testdata/auth_tls.tdir/auth_tls.test | 48 + .../testdata/auth_tls.tdir/auth_tls.ub.conf | 22 + .../testdata/auth_tls.tdir/example.com.zone | 4 + .../unbound/testdata/auth_tls.tdir/nsd_server.key | 39 + .../unbound/testdata/auth_tls.tdir/nsd_server.pem | 22 + .../testdata/auth_tls.tdir/unbound_server.key | 39 + .../testdata/auth_tls.tdir/unbound_server.pem | 22 + .../auth_tls_failcert.tdir/auth_tls_failcert.dsc | 16 + .../auth_tls_failcert.nsd.conf | 21 + .../auth_tls_failcert.tdir/auth_tls_failcert.post | 14 + .../auth_tls_failcert.tdir/auth_tls_failcert.pre | 47 + .../auth_tls_failcert.tdir/auth_tls_failcert.test | 56 + .../auth_tls_failcert.ub.conf | 23 + .../auth_tls_failcert.tdir/example.com.zone | 4 + .../testdata/auth_tls_failcert.tdir/nsd_server.key | 39 + .../testdata/auth_tls_failcert.tdir/nsd_server.pem | 22 + .../auth_tls_failcert.tdir/unbound_server.key | 39 + .../auth_tls_failcert.tdir/unbound_server.pem | 22 + .../testdata/cookie_file.tdir/cookie_file.test | 6 +- contrib/unbound/testdata/dns64_prefetch_cache.rpl | 195 + .../doq_downstream.tdir/doq_downstream.conf | 21 + .../doq_downstream.tdir/doq_downstream.dsc | 16 + .../doq_downstream.tdir/doq_downstream.post | 13 + .../doq_downstream.tdir/doq_downstream.pre | 44 + .../doq_downstream.tdir/doq_downstream.test | 109 + .../doq_downstream.tdir/doq_downstream.testns | 13 + .../doq_downstream.tdir/unbound_server.key | 15 + .../doq_downstream.tdir/unbound_server.pem | 11 + contrib/unbound/testdata/iter_max_global_quota.rpl | 2236 ++++++ contrib/unbound/testdata/iter_unverified_glue.rpl | 188 + .../testdata/iter_unverified_glue_fallback.rpl | 138 + contrib/unbound/testdata/rpz_val_block.rpl | 643 ++ .../testdata/serve_expired_cached_servfail.rpl | 2 +- .../serve_expired_cached_servfail_refresh.rpl | 2 +- .../serve_expired_client_timeout_val_bogus.rpl | 317 + ...ired_client_timeout_val_insecure_delegation.rpl | 247 + .../unbound/testdata/serve_expired_ttl_reset.rpl | 102 + .../unbound/testdata/serve_expired_val_bogus.rpl | 316 + contrib/unbound/testdata/val_negcache_ttl.rpl | 188 + .../unbound/testdata/val_negcache_ttl_prefetch.rpl | 316 + contrib/unbound/util/alloc.c | 9 + contrib/unbound/util/config_file.c | 55 +- contrib/unbound/util/config_file.h | 23 + contrib/unbound/util/configlexer.c | 8484 ++++++++++---------- contrib/unbound/util/configlexer.lex | 11 +- contrib/unbound/util/configparser.c | 4713 +++++------ contrib/unbound/util/configparser.h | 296 +- contrib/unbound/util/configparser.y | 165 +- contrib/unbound/util/data/msgparse.h | 2 + contrib/unbound/util/data/msgreply.c | 47 +- contrib/unbound/util/data/msgreply.h | 39 +- contrib/unbound/util/data/packed_rrset.h | 3 + contrib/unbound/util/fptr_wlist.c | 17 + contrib/unbound/util/locks.h | 1 + contrib/unbound/util/log.c | 36 + contrib/unbound/util/log.h | 6 + contrib/unbound/util/module.h | 8 +- contrib/unbound/util/netevent.c | 2067 ++++- contrib/unbound/util/netevent.h | 164 + contrib/unbound/validator/val_neg.c | 6 +- contrib/unbound/validator/val_nsec3.c | 6 +- contrib/unbound/validator/validator.c | 81 +- contrib/unbound/validator/validator.h | 2 +- lib/libunbound/config.h | 8 +- 120 files changed, 22786 insertions(+), 7989 deletions(-) diff --cc contrib/unbound/smallapp/unbound-control-setup.sh.in index f74b0105afee,4a358f6bd09d..4a358f6bd09d mode 100755,100644..100755 --- a/contrib/unbound/smallapp/unbound-control-setup.sh.in +++ b/contrib/unbound/smallapp/unbound-control-setup.sh.in diff --cc contrib/unbound/testcode/doqclient.c index 000000000000,1a2fd418359b..1a2fd418359b mode 000000,100644..100644 --- a/contrib/unbound/testcode/doqclient.c +++ b/contrib/unbound/testcode/doqclient.c diff --cc contrib/unbound/testcode/unitdoq.c index 000000000000,2b9160970493..2b9160970493 mode 000000,100644..100644 --- a/contrib/unbound/testcode/unitdoq.c +++ b/contrib/unbound/testcode/unitdoq.c diff --cc contrib/unbound/testdata/auth_tls.tdir/auth_tls.dsc index 000000000000,0caf949e88e4..0caf949e88e4 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/auth_tls.dsc +++ b/contrib/unbound/testdata/auth_tls.tdir/auth_tls.dsc diff --cc contrib/unbound/testdata/auth_tls.tdir/auth_tls.nsd.conf index 000000000000,c20ed21dfe29..c20ed21dfe29 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/auth_tls.nsd.conf +++ b/contrib/unbound/testdata/auth_tls.tdir/auth_tls.nsd.conf diff --cc contrib/unbound/testdata/auth_tls.tdir/auth_tls.post index 000000000000,19de9f46f9e2..19de9f46f9e2 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/auth_tls.post +++ b/contrib/unbound/testdata/auth_tls.tdir/auth_tls.post diff --cc contrib/unbound/testdata/auth_tls.tdir/auth_tls.pre index 000000000000,ebeee24c5658..ebeee24c5658 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/auth_tls.pre +++ b/contrib/unbound/testdata/auth_tls.tdir/auth_tls.pre diff --cc contrib/unbound/testdata/auth_tls.tdir/auth_tls.test index 000000000000,030212f52850..030212f52850 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/auth_tls.test +++ b/contrib/unbound/testdata/auth_tls.tdir/auth_tls.test diff --cc contrib/unbound/testdata/auth_tls.tdir/auth_tls.ub.conf index 000000000000,0220c60af58c..0220c60af58c mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/auth_tls.ub.conf +++ b/contrib/unbound/testdata/auth_tls.tdir/auth_tls.ub.conf diff --cc contrib/unbound/testdata/auth_tls.tdir/example.com.zone index 000000000000,18b5b407eedd..18b5b407eedd mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/example.com.zone +++ b/contrib/unbound/testdata/auth_tls.tdir/example.com.zone diff --cc contrib/unbound/testdata/auth_tls.tdir/nsd_server.key index 000000000000,5d9f6103134e..5d9f6103134e mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/nsd_server.key +++ b/contrib/unbound/testdata/auth_tls.tdir/nsd_server.key diff --cc contrib/unbound/testdata/auth_tls.tdir/nsd_server.pem index 000000000000,5d41ad2d6477..5d41ad2d6477 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/nsd_server.pem +++ b/contrib/unbound/testdata/auth_tls.tdir/nsd_server.pem diff --cc contrib/unbound/testdata/auth_tls.tdir/unbound_server.key index 000000000000,370a7bbb2f22..370a7bbb2f22 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/unbound_server.key +++ b/contrib/unbound/testdata/auth_tls.tdir/unbound_server.key diff --cc contrib/unbound/testdata/auth_tls.tdir/unbound_server.pem index 000000000000,986807310f2b..986807310f2b mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls.tdir/unbound_server.pem +++ b/contrib/unbound/testdata/auth_tls.tdir/unbound_server.pem diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.dsc index 000000000000,ba11e2b8c93b..ba11e2b8c93b mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.dsc +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.dsc diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.nsd.conf index 000000000000,c20ed21dfe29..c20ed21dfe29 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.nsd.conf +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.nsd.conf diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.post index 000000000000,db103df70056..db103df70056 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.post +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.post diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.pre index 000000000000,519c363dbb7a..519c363dbb7a mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.pre +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.pre diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.test index 000000000000,1f9e8e201c9e..1f9e8e201c9e mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.test +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.test diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.ub.conf index 000000000000,57e3dcfcbc33..57e3dcfcbc33 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.ub.conf +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/auth_tls_failcert.ub.conf diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/example.com.zone index 000000000000,18b5b407eedd..18b5b407eedd mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/example.com.zone +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/example.com.zone diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/nsd_server.key index 000000000000,5d9f6103134e..5d9f6103134e mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/nsd_server.key +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/nsd_server.key diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/nsd_server.pem index 000000000000,5d41ad2d6477..5d41ad2d6477 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/nsd_server.pem +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/nsd_server.pem diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/unbound_server.key index 000000000000,370a7bbb2f22..370a7bbb2f22 mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/unbound_server.key +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/unbound_server.key diff --cc contrib/unbound/testdata/auth_tls_failcert.tdir/unbound_server.pem index 000000000000,986807310f2b..986807310f2b mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_tls_failcert.tdir/unbound_server.pem +++ b/contrib/unbound/testdata/auth_tls_failcert.tdir/unbound_server.pem diff --cc contrib/unbound/testdata/dns64_prefetch_cache.rpl index 000000000000,a23b92f08d42..a23b92f08d42 mode 000000,100644..100644 --- a/contrib/unbound/testdata/dns64_prefetch_cache.rpl +++ b/contrib/unbound/testdata/dns64_prefetch_cache.rpl diff --cc contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.conf index 000000000000,babd3504123a..babd3504123a mode 000000,100644..100644 --- a/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.conf +++ b/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.conf diff --cc contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.dsc index 000000000000,1e0b19d509d1..1e0b19d509d1 mode 000000,100644..100644 --- a/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.dsc +++ b/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.dsc diff --cc contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.post index 000000000000,f1a31be3cd81..f1a31be3cd81 mode 000000,100644..100644 --- a/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.post +++ b/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.post diff --cc contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.pre index 000000000000,f748cc1f5cf3..f748cc1f5cf3 mode 000000,100644..100644 --- a/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.pre +++ b/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.pre diff --cc contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.test index 000000000000,a302e8da6b62..a302e8da6b62 mode 000000,100644..100644 --- a/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.test +++ b/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.test diff --cc contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.testns index 000000000000,2d0ea45a4c3d..2d0ea45a4c3d mode 000000,100644..100644 --- a/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.testns +++ b/contrib/unbound/testdata/doq_downstream.tdir/doq_downstream.testns diff --cc contrib/unbound/testdata/doq_downstream.tdir/unbound_server.key index 000000000000,4256c421dd0d..4256c421dd0d mode 000000,100644..100644 --- a/contrib/unbound/testdata/doq_downstream.tdir/unbound_server.key +++ b/contrib/unbound/testdata/doq_downstream.tdir/unbound_server.key diff --cc contrib/unbound/testdata/doq_downstream.tdir/unbound_server.pem index 000000000000,aeda3ff11882..aeda3ff11882 mode 000000,100644..100644 --- a/contrib/unbound/testdata/doq_downstream.tdir/unbound_server.pem +++ b/contrib/unbound/testdata/doq_downstream.tdir/unbound_server.pem diff --cc contrib/unbound/testdata/iter_max_global_quota.rpl index 000000000000,2dddf035a70b..2dddf035a70b mode 000000,100644..100644 --- a/contrib/unbound/testdata/iter_max_global_quota.rpl +++ b/contrib/unbound/testdata/iter_max_global_quota.rpl diff --cc contrib/unbound/testdata/iter_unverified_glue.rpl index 000000000000,017f220b6f1c..017f220b6f1c mode 000000,100644..100644 --- a/contrib/unbound/testdata/iter_unverified_glue.rpl +++ b/contrib/unbound/testdata/iter_unverified_glue.rpl diff --cc contrib/unbound/testdata/iter_unverified_glue_fallback.rpl index 000000000000,386186d48b0c..386186d48b0c mode 000000,100644..100644 --- a/contrib/unbound/testdata/iter_unverified_glue_fallback.rpl +++ b/contrib/unbound/testdata/iter_unverified_glue_fallback.rpl diff --cc contrib/unbound/testdata/rpz_val_block.rpl index 000000000000,acde15294adb..acde15294adb mode 000000,100644..100644 --- a/contrib/unbound/testdata/rpz_val_block.rpl +++ b/contrib/unbound/testdata/rpz_val_block.rpl diff --cc contrib/unbound/testdata/serve_expired_client_timeout_val_bogus.rpl index 000000000000,f4937a16c538..f4937a16c538 mode 000000,100644..100644 --- a/contrib/unbound/testdata/serve_expired_client_timeout_val_bogus.rpl +++ b/contrib/unbound/testdata/serve_expired_client_timeout_val_bogus.rpl diff --cc contrib/unbound/testdata/serve_expired_client_timeout_val_insecure_delegation.rpl index 000000000000,6654a2c68409..6654a2c68409 mode 000000,100644..100644 --- a/contrib/unbound/testdata/serve_expired_client_timeout_val_insecure_delegation.rpl +++ b/contrib/unbound/testdata/serve_expired_client_timeout_val_insecure_delegation.rpl diff --cc contrib/unbound/testdata/serve_expired_ttl_reset.rpl index 000000000000,521d5a0f04ca..521d5a0f04ca mode 000000,100644..100644 --- a/contrib/unbound/testdata/serve_expired_ttl_reset.rpl +++ b/contrib/unbound/testdata/serve_expired_ttl_reset.rpl diff --cc contrib/unbound/testdata/serve_expired_val_bogus.rpl index 000000000000,35365beef973..35365beef973 mode 000000,100644..100644 --- a/contrib/unbound/testdata/serve_expired_val_bogus.rpl +++ b/contrib/unbound/testdata/serve_expired_val_bogus.rpl diff --cc contrib/unbound/testdata/val_negcache_ttl.rpl index 000000000000,328b9b6ecba8..328b9b6ecba8 mode 000000,100644..100644 --- a/contrib/unbound/testdata/val_negcache_ttl.rpl +++ b/contrib/unbound/testdata/val_negcache_ttl.rpl diff --cc contrib/unbound/testdata/val_negcache_ttl_prefetch.rpl index 000000000000,103c81fbaba4..103c81fbaba4 mode 000000,100644..100644 --- a/contrib/unbound/testdata/val_negcache_ttl_prefetch.rpl +++ b/contrib/unbound/testdata/val_negcache_ttl_prefetch.rpl diff --cc contrib/unbound/util/config_file.c index de3c5375b4c0,000000000000..6d13c03befb8 mode 100644,000000..100644 --- a/contrib/unbound/util/config_file.c +++ b/contrib/unbound/util/config_file.c @@@ -1,2797 -1,0 +1,2848 @@@ +/* + * util/config_file.c - reads and stores the config file for unbound. + * + * Copyright (c) 2007, NLnet Labs. All rights reserved. + * + * This software is open source. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the NLNET LABS 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 + * HOLDER 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. + */ + +/** + * \file + * + * This file contains functions for the config file. + */ + +#include "config.h" +#include +#include +#include +#ifdef HAVE_TIME_H +#include +#endif +#include "util/log.h" +#include "util/configyyrename.h" +#include "util/config_file.h" +#include "configparser.h" +#include "util/net_help.h" +#include "util/data/msgparse.h" +#include "util/module.h" +#include "util/regional.h" +#include "util/fptr_wlist.h" +#include "util/data/dname.h" +#include "util/random.h" +#include "util/rtt.h" +#include "services/cache/infra.h" +#include "sldns/wire2str.h" +#include "sldns/parseutil.h" +#include "iterator/iterator.h" +#ifdef HAVE_GLOB_H +# include +#endif +#ifdef CLIENT_SUBNET +#include "edns-subnet/edns-subnet.h" +#endif +#ifdef HAVE_PWD_H +#include +#endif + +/** from cfg username, after daemonize setup performed */ +uid_t cfg_uid = (uid_t)-1; +/** from cfg username, after daemonize setup performed */ +gid_t cfg_gid = (gid_t)-1; +/** for debug allow small timeout values for fast rollovers */ +int autr_permit_small_holddown = 0; +/** size (in bytes) of stream wait buffers max */ +size_t stream_wait_max = 4 * 1024 * 1024; +size_t http2_query_buffer_max = 4 * 1024 * 1024; +size_t http2_response_buffer_max = 4 * 1024 * 1024; + +/** global config during parsing */ +struct config_parser_state* cfg_parser = 0; + +/** init ports possible for use */ +static void init_outgoing_availports(int* array, int num); + +/** init cookie with random data */ +static void init_cookie_secret(uint8_t* cookie_secret, size_t cookie_secret_len); + +struct config_file* +config_create(void) +{ + struct config_file* cfg; + cfg = (struct config_file*)calloc(1, sizeof(struct config_file)); + if(!cfg) + return NULL; + /* the defaults if no config is present */ + cfg->verbosity = 1; + cfg->stat_interval = 0; + cfg->stat_cumulative = 0; + cfg->stat_extended = 0; + cfg->stat_inhibit_zero = 1; + cfg->num_threads = 1; + cfg->port = UNBOUND_DNS_PORT; + cfg->do_ip4 = 1; + cfg->do_ip6 = 1; + cfg->do_udp = 1; + cfg->do_tcp = 1; + cfg->tcp_reuse_timeout = 60 * 1000; /* 60s in milisecs */ + cfg->max_reuse_tcp_queries = 200; + cfg->tcp_upstream = 0; + cfg->udp_upstream_without_downstream = 0; + cfg->tcp_mss = 0; + cfg->outgoing_tcp_mss = 0; + cfg->tcp_idle_timeout = 30 * 1000; /* 30s in millisecs */ + cfg->tcp_auth_query_timeout = 3 * 1000; /* 3s in millisecs */ + cfg->do_tcp_keepalive = 0; + cfg->tcp_keepalive_timeout = 120 * 1000; /* 120s in millisecs */ + cfg->sock_queue_timeout = 0; /* do not check timeout */ + cfg->ssl_service_key = NULL; + cfg->ssl_service_pem = NULL; + cfg->ssl_port = UNBOUND_DNS_OVER_TLS_PORT; + cfg->ssl_upstream = 0; + cfg->tls_cert_bundle = NULL; + cfg->tls_win_cert = 0; + cfg->tls_use_sni = 1; + cfg->https_port = UNBOUND_DNS_OVER_HTTPS_PORT; + if(!(cfg->http_endpoint = strdup("/dns-query"))) goto error_exit; + cfg->http_max_streams = 100; + cfg->http_query_buffer_size = 4*1024*1024; + cfg->http_response_buffer_size = 4*1024*1024; + cfg->http_nodelay = 1; ++ cfg->quic_port = UNBOUND_DNS_OVER_QUIC_PORT; ++ cfg->quic_size = 8*1024*1024; + cfg->use_syslog = 1; + cfg->log_identity = NULL; /* changed later with argv[0] */ + cfg->log_time_ascii = 0; ++ cfg->log_time_iso = 0; + cfg->log_queries = 0; + cfg->log_replies = 0; + cfg->log_tag_queryreply = 0; + cfg->log_local_actions = 0; + cfg->log_servfail = 0; + cfg->log_destaddr = 0; +#ifndef USE_WINSOCK +# ifdef USE_MINI_EVENT + /* select max 1024 sockets */ + cfg->outgoing_num_ports = 960; + cfg->num_queries_per_thread = 512; +# else + /* libevent can use many sockets */ + cfg->outgoing_num_ports = 4096; + cfg->num_queries_per_thread = 1024; +# endif + cfg->outgoing_num_tcp = 10; + cfg->incoming_num_tcp = 10; +#else + cfg->outgoing_num_ports = 48; /* windows is limited in num fds */ + cfg->num_queries_per_thread = 24; + cfg->outgoing_num_tcp = 2; /* leaves 64-52=12 for: 4if,1stop,thread4 */ + cfg->incoming_num_tcp = 2; +#endif + cfg->stream_wait_size = 4 * 1024 * 1024; + cfg->edns_buffer_size = 1232; /* from DNS flagday recommendation */ + cfg->msg_buffer_size = 65552; /* 64 k + a small margin */ + cfg->msg_cache_size = 4 * 1024 * 1024; + cfg->msg_cache_slabs = 4; + cfg->jostle_time = 200; + cfg->rrset_cache_size = 4 * 1024 * 1024; + cfg->rrset_cache_slabs = 4; + cfg->host_ttl = 900; + cfg->bogus_ttl = 60; + cfg->min_ttl = 0; + cfg->max_ttl = 3600 * 24; + cfg->max_negative_ttl = 3600; + cfg->min_negative_ttl = 0; + cfg->prefetch = 0; + cfg->prefetch_key = 0; + cfg->deny_any = 0; + cfg->infra_cache_slabs = 4; + cfg->infra_cache_numhosts = 10000; + cfg->infra_cache_min_rtt = 50; + cfg->infra_cache_max_rtt = 120000; + cfg->infra_keep_probing = 0; + cfg->delay_close = 0; + cfg->udp_connect = 1; + if(!(cfg->outgoing_avail_ports = (int*)calloc(65536, sizeof(int)))) + goto error_exit; + init_outgoing_availports(cfg->outgoing_avail_ports, 65536); + if(!(cfg->username = strdup(UB_USERNAME))) goto error_exit; +#ifdef HAVE_CHROOT + if(!(cfg->chrootdir = strdup(CHROOT_DIR))) goto error_exit; +#endif + if(!(cfg->directory = strdup(RUN_DIR))) goto error_exit; + if(!(cfg->logfile = strdup(""))) goto error_exit; + if(!(cfg->pidfile = strdup(PIDFILE))) goto error_exit; + if(!(cfg->target_fetch_policy = strdup("3 2 1 0 0"))) goto error_exit; + cfg->fast_server_permil = 0; + cfg->fast_server_num = 3; + cfg->donotqueryaddrs = NULL; + cfg->donotquery_localhost = 1; + cfg->root_hints = NULL; + cfg->use_systemd = 0; + cfg->do_daemonize = 1; + cfg->if_automatic = 0; + cfg->if_automatic_ports = NULL; + cfg->so_rcvbuf = 0; + cfg->so_sndbuf = 0; + cfg->so_reuseport = REUSEPORT_DEFAULT; + cfg->ip_transparent = 0; + cfg->ip_freebind = 0; + cfg->ip_dscp = 0; + cfg->num_ifs = 0; + cfg->ifs = NULL; + cfg->num_out_ifs = 0; + cfg->out_ifs = NULL; + cfg->stubs = NULL; + cfg->forwards = NULL; + cfg->auths = NULL; +#ifdef CLIENT_SUBNET + cfg->client_subnet = NULL; + cfg->client_subnet_zone = NULL; + cfg->client_subnet_opcode = LDNS_EDNS_CLIENT_SUBNET; + cfg->client_subnet_always_forward = 0; + cfg->max_client_subnet_ipv4 = 24; + cfg->max_client_subnet_ipv6 = 56; + cfg->min_client_subnet_ipv4 = 0; + cfg->min_client_subnet_ipv6 = 0; + cfg->max_ecs_tree_size_ipv4 = 100; + cfg->max_ecs_tree_size_ipv6 = 100; +#endif + cfg->views = NULL; + cfg->acls = NULL; + cfg->tcp_connection_limits = NULL; + cfg->harden_short_bufsize = 1; + cfg->harden_large_queries = 0; + cfg->harden_glue = 1; ++ cfg->harden_unverified_glue = 0; + cfg->harden_dnssec_stripped = 1; + cfg->harden_below_nxdomain = 1; + cfg->harden_referral_path = 0; + cfg->harden_algo_downgrade = 0; + cfg->harden_unknown_additional = 0; + cfg->use_caps_bits_for_id = 0; + cfg->caps_whitelist = NULL; + cfg->private_address = NULL; + cfg->private_domain = NULL; + cfg->unwanted_threshold = 0; + cfg->hide_identity = 0; + cfg->hide_version = 0; + cfg->hide_trustanchor = 0; + cfg->hide_http_user_agent = 0; + cfg->identity = NULL; + cfg->version = NULL; + cfg->http_user_agent = NULL; + cfg->nsid_cfg_str = NULL; + cfg->nsid = NULL; + cfg->nsid_len = 0; + cfg->auto_trust_anchor_file_list = NULL; + cfg->trust_anchor_file_list = NULL; + cfg->trust_anchor_list = NULL; + cfg->trusted_keys_file_list = NULL; + cfg->trust_anchor_signaling = 1; + cfg->root_key_sentinel = 1; + cfg->domain_insecure = NULL; + cfg->val_date_override = 0; + cfg->val_sig_skew_min = 3600; /* at least daylight savings trouble */ + cfg->val_sig_skew_max = 86400; /* at most timezone settings trouble */ + cfg->val_max_restart = 5; + cfg->val_clean_additional = 1; + cfg->val_log_level = 0; + cfg->val_log_squelch = 0; + cfg->val_permissive_mode = 0; + cfg->aggressive_nsec = 1; + cfg->ignore_cd = 0; + cfg->disable_edns_do = 0; + cfg->serve_expired = 0; + cfg->serve_expired_ttl = 0; + cfg->serve_expired_ttl_reset = 0; + cfg->serve_expired_reply_ttl = 30; + cfg->serve_expired_client_timeout = 0; + cfg->ede_serve_expired = 0; + cfg->serve_original_ttl = 0; + cfg->zonemd_permissive_mode = 0; + cfg->add_holddown = 30*24*3600; + cfg->del_holddown = 30*24*3600; + cfg->keep_missing = 366*24*3600; /* one year plus a little leeway */ + cfg->permit_small_holddown = 0; + cfg->key_cache_size = 4 * 1024 * 1024; + cfg->key_cache_slabs = 4; + cfg->neg_cache_size = 1 * 1024 * 1024; + cfg->local_zones = NULL; + cfg->local_zones_nodefault = NULL; +#ifdef USE_IPSET + cfg->local_zones_ipset = NULL; +#endif + cfg->local_zones_disable_default = 0; + cfg->local_data = NULL; + cfg->local_zone_overrides = NULL; + cfg->unblock_lan_zones = 0; + cfg->insecure_lan_zones = 0; + cfg->python_script = NULL; + cfg->dynlib_file = NULL; + cfg->remote_control_enable = 0; + cfg->control_ifs.first = NULL; + cfg->control_ifs.last = NULL; + cfg->control_port = UNBOUND_CONTROL_PORT; + cfg->control_use_cert = 1; + cfg->minimal_responses = 1; + cfg->rrset_roundrobin = 1; + cfg->unknown_server_time_limit = 376; + cfg->discard_timeout = 1900; /* msec */ + cfg->wait_limit = 1000; + cfg->wait_limit_cookie = 10000; + cfg->wait_limit_netblock = NULL; + cfg->wait_limit_cookie_netblock = NULL; + cfg->max_udp_size = 1232; /* value taken from edns_buffer_size */ + if(!(cfg->server_key_file = strdup(RUN_DIR"/unbound_server.key"))) + goto error_exit; + if(!(cfg->server_cert_file = strdup(RUN_DIR"/unbound_server.pem"))) + goto error_exit; + if(!(cfg->control_key_file = strdup(RUN_DIR"/unbound_control.key"))) + goto error_exit; + if(!(cfg->control_cert_file = strdup(RUN_DIR"/unbound_control.pem"))) + goto error_exit; + +#ifdef CLIENT_SUBNET + if(!(cfg->module_conf = strdup("subnetcache validator iterator"))) goto error_exit; +#else + if(!(cfg->module_conf = strdup("validator iterator"))) goto error_exit; +#endif + if(!(cfg->val_nsec3_key_iterations = + strdup("1024 150 2048 150 4096 150"))) goto error_exit; +#if defined(DNSTAP_SOCKET_PATH) + if(!(cfg->dnstap_socket_path = strdup(DNSTAP_SOCKET_PATH))) + goto error_exit; +#endif + cfg->dnstap_bidirectional = 1; + cfg->dnstap_tls = 1; + cfg->disable_dnssec_lame_check = 0; + cfg->ip_ratelimit_cookie = 0; + cfg->ip_ratelimit = 0; + cfg->ratelimit = 0; + cfg->ip_ratelimit_slabs = 4; + cfg->ratelimit_slabs = 4; + cfg->ip_ratelimit_size = 4*1024*1024; + cfg->ratelimit_size = 4*1024*1024; + cfg->ratelimit_for_domain = NULL; + cfg->ratelimit_below_domain = NULL; + cfg->ip_ratelimit_factor = 10; + cfg->ratelimit_factor = 10; + cfg->ip_ratelimit_backoff = 0; + cfg->ratelimit_backoff = 0; + cfg->outbound_msg_retry = 5; + cfg->max_sent_count = 32; + cfg->max_query_restarts = 11; + cfg->qname_minimisation = 1; + cfg->qname_minimisation_strict = 0; + cfg->shm_enable = 0; + cfg->shm_key = 11777; + cfg->edns_client_strings = NULL; + cfg->edns_client_string_opcode = 65001; + cfg->dnscrypt = 0; + cfg->dnscrypt_port = 0; + cfg->dnscrypt_provider = NULL; + cfg->dnscrypt_provider_cert = NULL; + cfg->dnscrypt_provider_cert_rotated = NULL; + cfg->dnscrypt_secret_key = NULL; + cfg->dnscrypt_shared_secret_cache_size = 4*1024*1024; + cfg->dnscrypt_shared_secret_cache_slabs = 4; + cfg->dnscrypt_nonce_cache_size = 4*1024*1024; + cfg->dnscrypt_nonce_cache_slabs = 4; + cfg->pad_responses = 1; + cfg->pad_responses_block_size = 468; /* from RFC8467 */ + cfg->pad_queries = 1; + cfg->pad_queries_block_size = 128; /* from RFC8467 */ +#ifdef USE_IPSECMOD + cfg->ipsecmod_enabled = 1; + cfg->ipsecmod_ignore_bogus = 0; + cfg->ipsecmod_hook = NULL; + cfg->ipsecmod_max_ttl = 3600; + cfg->ipsecmod_whitelist = NULL; + cfg->ipsecmod_strict = 0; +#endif + cfg->do_answer_cookie = 0; + memset(cfg->cookie_secret, 0, sizeof(cfg->cookie_secret)); + cfg->cookie_secret_len = 16; + init_cookie_secret(cfg->cookie_secret, cfg->cookie_secret_len); + cfg->cookie_secret_file = NULL; +#ifdef USE_CACHEDB + if(!(cfg->cachedb_backend = strdup("testframe"))) goto error_exit; + if(!(cfg->cachedb_secret = strdup("default"))) goto error_exit; + cfg->cachedb_no_store = 0; + cfg->cachedb_check_when_serve_expired = 1; +#ifdef USE_REDIS + if(!(cfg->redis_server_host = strdup("127.0.0.1"))) goto error_exit; + cfg->redis_server_path = NULL; + cfg->redis_server_password = NULL; + cfg->redis_timeout = 100; ++ cfg->redis_command_timeout = 0; ++ cfg->redis_connect_timeout = 0; + cfg->redis_server_port = 6379; + cfg->redis_expire_records = 0; + cfg->redis_logical_db = 0; +#endif /* USE_REDIS */ +#endif /* USE_CACHEDB */ +#ifdef USE_IPSET + cfg->ipset_name_v4 = NULL; + cfg->ipset_name_v6 = NULL; +#endif + cfg->ede = 0; ++ cfg->iter_scrub_ns = 20; ++ cfg->iter_scrub_cname = 11; ++ cfg->max_global_quota = 128; + return cfg; +error_exit: + config_delete(cfg); + return NULL; +} + +struct config_file* config_create_forlib(void) +{ + struct config_file* cfg = config_create(); + if(!cfg) return NULL; + /* modifications for library use, less verbose, less memory */ + free(cfg->chrootdir); + cfg->chrootdir = NULL; + cfg->verbosity = 0; + cfg->outgoing_num_ports = 16; /* in library use, this is 'reasonable' + and probably within the ulimit(maxfds) of the user */ + cfg->outgoing_num_tcp = 2; + cfg->msg_cache_size = 1024*1024; + cfg->msg_cache_slabs = 1; + cfg->rrset_cache_size = 1024*1024; + cfg->rrset_cache_slabs = 1; + cfg->infra_cache_slabs = 1; + cfg->use_syslog = 0; + cfg->key_cache_size = 1024*1024; + cfg->key_cache_slabs = 1; + cfg->neg_cache_size = 100 * 1024; + cfg->donotquery_localhost = 0; /* allow, so that you can ask a + forward nameserver running on localhost */ + cfg->val_log_level = 2; /* to fill why_bogus with */ + cfg->val_log_squelch = 1; + cfg->minimal_responses = 0; + cfg->harden_short_bufsize = 1; + return cfg; +} + +/** check that the value passed is >= 0 */ +#define IS_NUMBER_OR_ZERO \ + if(atoi(val) == 0 && strcmp(val, "0") != 0) return 0 +/** check that the value passed is > 0 */ +#define IS_NONZERO_NUMBER \ + if(atoi(val) == 0) return 0 +/** check that the value passed is not 0 and a power of 2 */ +#define IS_POW2_NUMBER \ + if(atoi(val) == 0 || !is_pow2((size_t)atoi(val))) return 0 +/** check that the value passed is yes or no */ +#define IS_YES_OR_NO \ + if(strcmp(val, "yes") != 0 && strcmp(val, "no") != 0) return 0 +/** put integer_or_zero into variable */ +#define S_NUMBER_OR_ZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NUMBER_OR_ZERO; cfg->var = atoi(val); } +/** put integer_nonzero into variable */ +#define S_NUMBER_NONZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NONZERO_NUMBER; cfg->var = atoi(val); } +/** put integer_or_zero into unsigned */ +#define S_UNSIGNED_OR_ZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NUMBER_OR_ZERO; cfg->var = (unsigned)atoi(val); } +/** put integer_or_zero into size_t */ +#define S_SIZET_OR_ZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NUMBER_OR_ZERO; cfg->var = (size_t)atoi(val); } +/** put integer_nonzero into size_t */ +#define S_SIZET_NONZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NONZERO_NUMBER; cfg->var = (size_t)atoi(val); } +/** put yesno into variable */ +#define S_YNO(str, var) if(strcmp(opt, str) == 0) \ + { IS_YES_OR_NO; cfg->var = (strcmp(val, "yes") == 0); } +/** put memsize into variable */ +#define S_MEMSIZE(str, var) if(strcmp(opt, str)==0) \ + { return cfg_parse_memsize(val, &cfg->var); } +/** put pow2 number into variable */ +#define S_POW2(str, var) if(strcmp(opt, str)==0) \ + { IS_POW2_NUMBER; cfg->var = (size_t)atoi(val); } +/** put string into variable */ +#define S_STR(str, var) if(strcmp(opt, str)==0) \ + { free(cfg->var); return (cfg->var = strdup(val)) != NULL; } +/** put string into strlist */ +#define S_STRLIST(str, var) if(strcmp(opt, str)==0) \ + { return cfg_strlist_insert(&cfg->var, strdup(val)); } +/** put string into strlist if not present yet*/ +#define S_STRLIST_UNIQ(str, var) if(strcmp(opt, str)==0) \ + { if(cfg_strlist_find(cfg->var, val)) { return 0;} \ + return cfg_strlist_insert(&cfg->var, strdup(val)); } +/** append string to strlist */ +#define S_STRLIST_APPEND(str, var) if(strcmp(opt, str)==0) \ + { return cfg_strlist_append(&cfg->var, strdup(val)); } + +int config_set_option(struct config_file* cfg, const char* opt, + const char* val) +{ + char buf[64]; + if(!opt) return 0; + if(opt[strlen(opt)-1] != ':' && strlen(opt)+2stat_interval = 0; + else if(atoi(val) == 0) + return 0; + else cfg->stat_interval = atoi(val); + } else if(strcmp(opt, "num-threads:") == 0) { + /* not supported, library must have 1 thread in bgworker */ + return 0; + } else if(strcmp(opt, "outgoing-port-permit:") == 0) { + return cfg_mark_ports(val, 1, + cfg->outgoing_avail_ports, 65536); + } else if(strcmp(opt, "outgoing-port-avoid:") == 0) { + return cfg_mark_ports(val, 0, + cfg->outgoing_avail_ports, 65536); + } else if(strcmp(opt, "local-zone:") == 0) { + return cfg_parse_local_zone(cfg, val); + } else if(strcmp(opt, "val-override-date:") == 0) { + if(strcmp(val, "") == 0 || strcmp(val, "0") == 0) { + cfg->val_date_override = 0; + } else if(strlen(val) == 14) { + cfg->val_date_override = cfg_convert_timeval(val); + return cfg->val_date_override != 0; + } else { + if(atoi(val) == 0) return 0; + cfg->val_date_override = (uint32_t)atoi(val); + } + } else if(strcmp(opt, "local-data-ptr:") == 0) { + char* ptr = cfg_ptr_reverse((char*)opt); + return cfg_strlist_insert(&cfg->local_data, ptr); + } else if(strcmp(opt, "logfile:") == 0) { + cfg->use_syslog = 0; + free(cfg->logfile); + return (cfg->logfile = strdup(val)) != NULL; + } + else if(strcmp(opt, "log-time-ascii:") == 0) + { IS_YES_OR_NO; cfg->log_time_ascii = (strcmp(val, "yes") == 0); + log_set_time_asc(cfg->log_time_ascii); } ++ else if(strcmp(opt, "log-time-iso:") == 0) ++ { IS_YES_OR_NO; cfg->log_time_iso = (strcmp(val, "yes") == 0); ++ log_set_time_iso(cfg->log_time_iso); } + else S_SIZET_NONZERO("max-udp-size:", max_udp_size) + else S_YNO("use-syslog:", use_syslog) + else S_STR("log-identity:", log_identity) + else S_YNO("extended-statistics:", stat_extended) + else S_YNO("statistics-inhibit-zero:", stat_inhibit_zero) + else S_YNO("statistics-cumulative:", stat_cumulative) + else S_YNO("shm-enable:", shm_enable) + else S_NUMBER_OR_ZERO("shm-key:", shm_key) + else S_YNO("do-ip4:", do_ip4) + else S_YNO("do-ip6:", do_ip6) + else S_YNO("do-udp:", do_udp) + else S_YNO("do-tcp:", do_tcp) + else S_YNO("prefer-ip4:", prefer_ip4) + else S_YNO("prefer-ip6:", prefer_ip6) + else S_YNO("tcp-upstream:", tcp_upstream) + else S_YNO("udp-upstream-without-downstream:", + udp_upstream_without_downstream) + else S_NUMBER_NONZERO("tcp-mss:", tcp_mss) + else S_NUMBER_NONZERO("outgoing-tcp-mss:", outgoing_tcp_mss) + else S_NUMBER_NONZERO("tcp-auth-query-timeout:", tcp_auth_query_timeout) + else S_NUMBER_NONZERO("tcp-idle-timeout:", tcp_idle_timeout) + else S_NUMBER_NONZERO("max-reuse-tcp-queries:", max_reuse_tcp_queries) + else S_NUMBER_NONZERO("tcp-reuse-timeout:", tcp_reuse_timeout) + else S_YNO("edns-tcp-keepalive:", do_tcp_keepalive) + else S_NUMBER_NONZERO("edns-tcp-keepalive-timeout:", tcp_keepalive_timeout) + else S_NUMBER_OR_ZERO("sock-queue-timeout:", sock_queue_timeout) + else S_YNO("ssl-upstream:", ssl_upstream) + else S_YNO("tls-upstream:", ssl_upstream) + else S_STR("ssl-service-key:", ssl_service_key) + else S_STR("tls-service-key:", ssl_service_key) + else S_STR("ssl-service-pem:", ssl_service_pem) + else S_STR("tls-service-pem:", ssl_service_pem) + else S_NUMBER_NONZERO("ssl-port:", ssl_port) + else S_NUMBER_NONZERO("tls-port:", ssl_port) + else S_STR("ssl-cert-bundle:", tls_cert_bundle) + else S_STR("tls-cert-bundle:", tls_cert_bundle) + else S_YNO("tls-win-cert:", tls_win_cert) + else S_YNO("tls-system-cert:", tls_win_cert) + else S_STRLIST("additional-ssl-port:", tls_additional_port) + else S_STRLIST("additional-tls-port:", tls_additional_port) + else S_STRLIST("tls-additional-ports:", tls_additional_port) + else S_STRLIST("tls-additional-port:", tls_additional_port) + else S_STRLIST_APPEND("tls-session-ticket-keys:", tls_session_ticket_keys) + else S_STR("tls-ciphers:", tls_ciphers) + else S_STR("tls-ciphersuites:", tls_ciphersuites) + else S_YNO("tls-use-sni:", tls_use_sni) + else S_NUMBER_NONZERO("https-port:", https_port) + else S_STR("http-endpoint:", http_endpoint) + else S_NUMBER_NONZERO("http-max-streams:", http_max_streams) + else S_MEMSIZE("http-query-buffer-size:", http_query_buffer_size) + else S_MEMSIZE("http-response-buffer-size:", http_response_buffer_size) + else S_YNO("http-nodelay:", http_nodelay) + else S_YNO("http-notls-downstream:", http_notls_downstream) ++ else S_NUMBER_NONZERO("quic-port:", quic_port) ++ else S_MEMSIZE("quic-size:", quic_size) + else S_YNO("interface-automatic:", if_automatic) + else S_STR("interface-automatic-ports:", if_automatic_ports) + else S_YNO("use-systemd:", use_systemd) + else S_YNO("do-daemonize:", do_daemonize) + else S_NUMBER_NONZERO("port:", port) + else S_NUMBER_NONZERO("outgoing-range:", outgoing_num_ports) + else S_SIZET_OR_ZERO("outgoing-num-tcp:", outgoing_num_tcp) + else S_SIZET_OR_ZERO("incoming-num-tcp:", incoming_num_tcp) + else S_MEMSIZE("stream-wait-size:", stream_wait_size) *** 3790 LINES SKIPPED *** From nobody Fri Oct 18 14:24: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 4XVRlq0XBRz5ZHZZ; Fri, 18 Oct 2024 14:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVRlp6Z0Rz4WrF; Fri, 18 Oct 2024 14:24:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729261446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rfs1SiYB5Gpt+7DKNsv2pcbW2cGAIT5F0KTIQP5A8Ms=; b=tEEcJh090b1808zIHLB2dInJVCAW94KaQbLJORv+dR/TXVXfOibFk8pRtptZWTU3lvwh+i IWAts95wbIN6Aqxth4rVtouD2obaIlgc65S5vN/96YZSEteMtyFqiSKQEppchGmJSKhBZh Flau7Srz/y7vtSpx2Pol4EwPweeoc1nUONtzrXPKz8zftXEUOattmbKRxp+KHLGhG6whDh NRw/+sMzfX4rWqal5GgM0kpSkJco+GL3n9cVWwXhrYzs+XDmlCE2G0yHiBFvX2RWRUK9m/ /opbwGBb/NbPRjQqh2kvsA6QLaYqwOmW9gWyPuxFIuxEg/cyVHeWDvAHgbJqNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729261446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rfs1SiYB5Gpt+7DKNsv2pcbW2cGAIT5F0KTIQP5A8Ms=; b=NNdVG68aBjSaxKJ83FYCqsTl3Nh0o1qtGhc0WkDjGS01NEFBC7ZNc0wIke5YuUFo/ChL3J dklVLRoODxTsrXKgJUUADYIaccasmbJJSMwIphEtRtHsXXlBjbuRJqmb4n5TfBJGJcZBvx 0jgNfyXiWfZIvCUiILjv8V9QWJ+mCDb5YZTXe0K9NWv4ZvykCoT1gbRKj5hf+RGXEAjpmD 1nS5hWsfQTluCGIJtmc2yIhed6xXTAZj9truDaS6LuHRx6AJXKkOVIUEBvs+8SF8n9+ngG TqUg1Q2E/qI3hEnSvNDwuArFloH1ELj9DnB647QtgcyKQWXlkrGyfgm1BBSgjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729261446; a=rsa-sha256; cv=none; b=JBCmwcWPphkpd7dtgQUzCr8Mc9bFiMuV+rNiaYpMkaPxTeBSSk9vypKfKDrjU3LqdpbSZj 0cHaKAsePjozt5PEbridnoJZjvvvH416aSxf7b2lsBEG5gU57jnKXf2yUBa40x/eK20eld E838M6eN0TOb9F0lSpSeFYMFD0MCNwjQb8FtWK4NT9g1EBk8rxi9yzRVx01+W3ZTacLKiU khH1RbNfe4KMKdhMNYksKxTMLa5VVLuXYoS62uZlmr/9c43/c83mwEpuzc5dmGXIV5Wux3 aWxXXtHdPKUY84IR5WJFuxY9RBDV+q3lgeLE5a3mSFQ5znODH589tiI3MMvvHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVRlp695Dzd7K; Fri, 18 Oct 2024 14:24:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IEO6fX066388; Fri, 18 Oct 2024 14:24:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IEO6NK066385; Fri, 18 Oct 2024 14:24:06 GMT (envelope-from git) Date: Fri, 18 Oct 2024 14:24:06 GMT Message-Id: <202410181424.49IEO6NK066385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 0c2af19e78a0 - main - unbound: Remove testcode and testdata 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c2af19e78a0a8dbbf305b74c944b5758578ea30 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=0c2af19e78a0a8dbbf305b74c944b5758578ea30 commit 0c2af19e78a0a8dbbf305b74c944b5758578ea30 Author: Cy Schubert AuthorDate: 2024-10-18 14:14:41 +0000 Commit: Cy Schubert CommitDate: 2024-10-18 14:14:41 +0000 unbound: Remove testcode and testdata The testcode and testdata directories are not used by FreeBSD. Remove them. MFC after: 1 week --- contrib/unbound/testcode/doqclient.c | 2701 -------------------- contrib/unbound/testcode/unitdoq.c | 84 - contrib/unbound/testdata/00-lint.tdir/00-lint.pre | 14 - .../09-unbound-control.tdir/conf.bad_credentials | 5 - .../conf.spoofed_credentials | 5 - .../09-unbound-control.tdir/view_local_data | 4 - .../09-unbound-control.tdir/view_local_data_remove | 4 - .../testdata/acl_interface.tdir/rpz-nx.zone | 3 - .../testdata/acl_interface.tdir/rpz-one.zone | 3 - .../testdata/acl_interface.tdir/rpz-two.zone | 3 - .../unbound/testdata/auth_tls.tdir/auth_tls.dsc | 16 - .../testdata/auth_tls.tdir/auth_tls.nsd.conf | 21 - .../unbound/testdata/auth_tls.tdir/auth_tls.post | 14 - .../unbound/testdata/auth_tls.tdir/auth_tls.pre | 47 - .../unbound/testdata/auth_tls.tdir/auth_tls.test | 48 - .../testdata/auth_tls.tdir/auth_tls.ub.conf | 22 - .../testdata/auth_tls.tdir/example.com.zone | 4 - .../unbound/testdata/auth_tls.tdir/nsd_server.key | 39 - .../unbound/testdata/auth_tls.tdir/nsd_server.pem | 22 - .../testdata/auth_tls.tdir/unbound_server.key | 39 - .../testdata/auth_tls.tdir/unbound_server.pem | 22 - .../auth_tls_failcert.tdir/auth_tls_failcert.dsc | 16 - .../auth_tls_failcert.nsd.conf | 21 - .../auth_tls_failcert.tdir/auth_tls_failcert.post | 14 - .../auth_tls_failcert.tdir/auth_tls_failcert.pre | 47 - .../auth_tls_failcert.tdir/auth_tls_failcert.test | 56 - .../auth_tls_failcert.ub.conf | 23 - .../auth_tls_failcert.tdir/example.com.zone | 4 - .../testdata/auth_tls_failcert.tdir/nsd_server.key | 39 - .../testdata/auth_tls_failcert.tdir/nsd_server.pem | 22 - .../auth_tls_failcert.tdir/unbound_server.key | 39 - .../auth_tls_failcert.tdir/unbound_server.pem | 22 - contrib/unbound/testdata/cachedb_cached_ede.crpl | 91 - contrib/unbound/testdata/cachedb_expired.crpl | 324 --- .../testdata/cachedb_expired_client_timeout.crpl | 343 --- .../testdata/cachedb_expired_reply_ttl.crpl | 259 -- .../cachedb_no_store.tdir/cachedb_no_store.conf | 29 - .../cachedb_no_store.tdir/cachedb_no_store.dsc | 16 - .../cachedb_no_store.tdir/cachedb_no_store.post | 20 - .../cachedb_no_store.tdir/cachedb_no_store.pre | 36 - .../cachedb_no_store.servfail.testns | 8 - .../cachedb_no_store.tdir/cachedb_no_store.test | 132 - .../cachedb_no_store.tdir/cachedb_no_store.testns | 9 - .../unbound/testdata/cachedb_servfail_cname.crpl | 181 -- .../unbound/testdata/cachedb_subnet_change.crpl | 304 --- .../unbound/testdata/cachedb_subnet_expired.crpl | 322 --- .../testdata/cachedb_subnet_toecs_timeout.crpl | 229 -- contrib/unbound/testdata/cachedb_val_expired.crpl | 327 --- .../testdata/cookie_file.tdir/cookie_file.conf | 19 - .../testdata/cookie_file.tdir/cookie_file.dsc | 16 - .../testdata/cookie_file.tdir/cookie_file.pre | 24 - .../testdata/cookie_file.tdir/cookie_file.test | 250 -- contrib/unbound/testdata/disable_edns_do.rpl | 164 -- contrib/unbound/testdata/dns64_prefetch_cache.rpl | 195 -- .../doq_downstream.tdir/doq_downstream.conf | 21 - .../doq_downstream.tdir/doq_downstream.dsc | 16 - .../doq_downstream.tdir/doq_downstream.post | 13 - .../doq_downstream.tdir/doq_downstream.pre | 44 - .../doq_downstream.tdir/doq_downstream.test | 109 - .../doq_downstream.tdir/doq_downstream.testns | 13 - .../doq_downstream.tdir/unbound_server.key | 15 - .../doq_downstream.tdir/unbound_server.pem | 11 - .../unbound/testdata/edns_downstream_cookies.rpl | 235 -- contrib/unbound/testdata/fwd_name_lookup.rpl | 152 -- .../testdata/ip_ratelimit.tdir/ip_ratelimit.conf | 28 - .../testdata/ip_ratelimit.tdir/ip_ratelimit.dsc | 16 - .../testdata/ip_ratelimit.tdir/ip_ratelimit.post | 13 - .../testdata/ip_ratelimit.tdir/ip_ratelimit.pre | 24 - .../testdata/ip_ratelimit.tdir/ip_ratelimit.test | 165 -- .../testdata/ip_ratelimit.tdir/unbound_control.key | 39 - .../testdata/ip_ratelimit.tdir/unbound_control.pem | 22 - .../testdata/ip_ratelimit.tdir/unbound_server.key | 39 - .../testdata/ip_ratelimit.tdir/unbound_server.pem | 22 - .../unbound/testdata/iter_cname_minimise_nx.rpl | 245 -- contrib/unbound/testdata/iter_dname_ttl.rpl | 271 -- contrib/unbound/testdata/iter_failreply.rpl | 132 - .../testdata/iter_ghost_grandchild_delegation.rpl | 256 -- contrib/unbound/testdata/iter_ignore_empty.rpl | 248 -- contrib/unbound/testdata/iter_max_global_quota.rpl | 2236 ---------------- contrib/unbound/testdata/iter_nat64.rpl | 117 - contrib/unbound/testdata/iter_nat64_prefix.rpl | 119 - contrib/unbound/testdata/iter_nat64_prefix48.rpl | 118 - contrib/unbound/testdata/iter_scrub_rr_length.rpl | 298 --- contrib/unbound/testdata/iter_unverified_glue.rpl | 188 -- .../testdata/iter_unverified_glue_fallback.rpl | 138 - contrib/unbound/testdata/local_cnameother.rpl | 67 - .../testdata/root_zonemd.tdir/root_zonemd.conf | 34 - .../testdata/root_zonemd.tdir/root_zonemd.dsc | 16 - .../testdata/root_zonemd.tdir/root_zonemd.post | 14 - .../testdata/root_zonemd.tdir/root_zonemd.pre | 50 - .../testdata/root_zonemd.tdir/root_zonemd.test | 63 - .../testdata/root_zonemd.tdir/root_zonemd.testns | 9 - contrib/unbound/testdata/rpz_cached_cname.rpl | 122 - contrib/unbound/testdata/rpz_clientip_override.rpl | 269 -- contrib/unbound/testdata/rpz_cname_handle.rpl | 779 ------ contrib/unbound/testdata/rpz_cname_tag.rpl | 281 -- 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/rpz_val_block.rpl | 643 ----- contrib/unbound/testdata/rrset_use_cached.rpl | 151 -- .../unbound/testdata/serve_expired_0ttl_nodata.rpl | 154 -- .../testdata/serve_expired_0ttl_nxdomain.rpl | 154 -- .../testdata/serve_expired_0ttl_servfail.rpl | 129 - .../testdata/serve_expired_cached_servfail.rpl | 130 - .../serve_expired_cached_servfail_refresh.rpl | 145 -- .../serve_expired_client_timeout_val_bogus.rpl | 317 --- ...ired_client_timeout_val_insecure_delegation.rpl | 247 -- .../unbound/testdata/serve_expired_ttl_reset.rpl | 102 - .../unbound/testdata/serve_expired_val_bogus.rpl | 316 --- .../stat_values.tdir/stat_values_cachedb.conf | 36 - .../stat_values_downstream_cookies.conf | 32 - contrib/unbound/testdata/subnet_cached_ede.crpl | 114 - .../unbound/testdata/subnet_cached_servfail.crpl | 167 -- contrib/unbound/testdata/subnet_cached_size.crpl | 308 --- .../unbound/testdata/subnet_global_prefetch.crpl | 236 -- .../subnet_global_prefetch_always_forward.crpl | 167 -- .../testdata/subnet_global_prefetch_expired.crpl | 241 -- contrib/unbound/testdata/subnet_prezero.crpl | 155 -- .../unbound/testdata/subnet_scopezero_noedns.crpl | 441 ---- contrib/unbound/testdata/ttl_max_negative.rpl | 206 -- contrib/unbound/testdata/ttl_min_negative.rpl | 204 -- contrib/unbound/testdata/val_any_negcache.rpl | 243 -- contrib/unbound/testdata/val_cnameqtype_qmin.rpl | 784 ------ contrib/unbound/testdata/val_dname_twice.rpl | 226 -- contrib/unbound/testdata/val_dnameqtype.rpl | 689 ----- contrib/unbound/testdata/val_dnameqtype_qmin.rpl | 859 ------- contrib/unbound/testdata/val_failure_dnskey.rpl | 348 --- contrib/unbound/testdata/val_negcache_ttl.rpl | 188 -- .../unbound/testdata/val_negcache_ttl_prefetch.rpl | 316 --- contrib/unbound/testdata/val_scrub_rr_length.rpl | 164 -- 139 files changed, 23468 deletions(-) diff --git a/contrib/unbound/testcode/doqclient.c b/contrib/unbound/testcode/doqclient.c deleted file mode 100644 index 1a2fd418359b..000000000000 --- a/contrib/unbound/testcode/doqclient.c +++ /dev/null @@ -1,2701 +0,0 @@ -/* - * testcode/doqclient.c - debug program. Perform multiple DNS queries using DoQ. - * - * Copyright (c) 2022, NLnet Labs. All rights reserved. - * - * This software is open source. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the NLNET LABS 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 - * HOLDER 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. - */ - -/** - * \file - * - * Simple DNS-over-QUIC client. For testing and debugging purposes. - * No authentication of TLS cert. - */ - -#include "config.h" -#ifdef HAVE_GETOPT_H -#include -#endif - -#ifdef HAVE_NGTCP2 -#include -#include -#ifdef HAVE_NGTCP2_NGTCP2_CRYPTO_QUICTLS_H -#include -#else -#include -#endif -#include -#include -#ifdef HAVE_TIME_H -#include -#endif -#include -#include "util/locks.h" -#include "util/net_help.h" -#include "sldns/sbuffer.h" -#include "sldns/str2wire.h" -#include "sldns/wire2str.h" -#include "util/data/msgreply.h" -#include "util/data/msgencode.h" -#include "util/data/msgparse.h" -#include "util/data/dname.h" -#include "util/random.h" -#include "util/ub_event.h" -struct doq_client_stream_list; -struct doq_client_stream; - -/** the local client data for the DoQ connection */ -struct doq_client_data { - /** file descriptor */ - int fd; - /** the event base for the events */ - struct ub_event_base* base; - /** the ub event */ - struct ub_event* ev; - /** the expiry timer */ - struct ub_event* expire_timer; - /** is the expire_timer added */ - int expire_timer_added; - /** the ngtcp2 connection information */ - struct ngtcp2_conn* conn; - /** random state */ - struct ub_randstate* rnd; - /** server connected to as a string */ - const char* svr; - /** the static secret */ - uint8_t* static_secret_data; - /** the static secret size */ - size_t static_secret_size; - /** destination address sockaddr */ - struct sockaddr_storage dest_addr; - /** length of dest addr */ - socklen_t dest_addr_len; - /** local address sockaddr */ - struct sockaddr_storage local_addr; - /** length of local addr */ - socklen_t local_addr_len; - /** SSL context */ - SSL_CTX* ctx; - /** SSL object */ - SSL* ssl; -#ifdef HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_CLIENT_CONTEXT - /** the connection reference for ngtcp2_conn and userdata in ssl */ - struct ngtcp2_crypto_conn_ref conn_ref; -#endif - /** the quic version to use */ - uint32_t quic_version; - /** the last error */ -#ifdef HAVE_NGTCP2_CCERR_DEFAULT - struct ngtcp2_ccerr ccerr; -#else - struct ngtcp2_connection_close_error last_error; -#endif - /** the recent tls alert error code */ - uint8_t tls_alert; - /** the buffer for packet operations */ - struct sldns_buffer* pkt_buf; - /** The list of queries to start. They have no stream associated. - * Once they do, they move to the send list. */ - struct doq_client_stream_list* query_list_start; - /** The list of queries to send. They have a stream, and they are - * sending data. Data could also be received, like errors. */ - struct doq_client_stream_list* query_list_send; - /** The list of queries to receive. They have a stream, and the - * send is done, it is possible to read data. */ - struct doq_client_stream_list* query_list_receive; - /** The list of queries that are stopped. They have no stream - * active any more. Write and read are done. The query is done, - * and it may be in error and then have no answer or partial answer. */ - struct doq_client_stream_list* query_list_stop; - /** is there a blocked packet in the blocked_pkt buffer */ - int have_blocked_pkt; - /** store blocked packet, a packet that could not be sent on the - * nonblocking socket. */ - struct sldns_buffer* blocked_pkt; - /** ecn info for the blocked packet */ - struct ngtcp2_pkt_info blocked_pkt_pi; - /** the congestion control algorithm */ - ngtcp2_cc_algo cc_algo; - /** the transport parameters file, for early data transmission */ - const char* transport_file; - /** the tls session file, for session resumption */ - const char* session_file; - /** if early data is enabled for the connection */ - int early_data_enabled; - /** how quiet is the output */ - int quiet; - /** the configured port for the destination */ - int port; -}; - -/** the local client stream list, for appending streams to */ -struct doq_client_stream_list { - /** first and last members of the list */ - struct doq_client_stream* first, *last; -}; - -/** the local client data for a DoQ stream */ -struct doq_client_stream { - /** next stream in list, and prev in list */ - struct doq_client_stream* next, *prev; - /** the data buffer */ - uint8_t* data; - /** length of the data buffer */ - size_t data_len; - /** if the client query has a stream, that is active, associated with - * it. The stream_id is in stream_id. */ - int has_stream; - /** the stream id */ - int64_t stream_id; - /** data written position */ - size_t nwrite; - /** the data length for write, in network format */ - uint16_t data_tcplen; - /** if the write of the query data is done. That means the - * write channel has FIN, is closed for writing. */ - int write_is_done; - /** data read position */ - size_t nread; - /** the answer length, in network byte order */ - uint16_t answer_len; - /** the answer buffer */ - struct sldns_buffer* answer; - /** the answer is complete */ - int answer_is_complete; - /** the query has an error, it has no answer, or no complete answer */ - int query_has_error; - /** if the query is done */ - int query_is_done; -}; - -#ifndef HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_CLIENT_CONTEXT -/** the quic method struct, must remain valid during the QUIC connection. */ -static SSL_QUIC_METHOD quic_method; -#endif - -/** Get the connection ngtcp2_conn from the ssl app data - * ngtcp2_crypto_conn_ref */ -static ngtcp2_conn* conn_ref_get_conn(ngtcp2_crypto_conn_ref* conn_ref) -{ - struct doq_client_data* data = (struct doq_client_data*) - conn_ref->user_data; - return data->conn; -} - -static void -set_app_data(SSL* ssl, struct doq_client_data* data) -{ -#ifdef HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_CLIENT_CONTEXT - data->conn_ref.get_conn = &conn_ref_get_conn; - data->conn_ref.user_data = data; - SSL_set_app_data(ssl, &data->conn_ref); -#else - SSL_set_app_data(ssl, data); -#endif -} - -static struct doq_client_data* -get_app_data(SSL* ssl) -{ - struct doq_client_data* data; -#ifdef HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_CLIENT_CONTEXT - data = (struct doq_client_data*)((struct ngtcp2_crypto_conn_ref*) - SSL_get_app_data(ssl))->user_data; -#else - data = (struct doq_client_data*) SSL_get_app_data(ssl); -#endif - return data; -} - - - -/** write handle routine */ -static void on_write(struct doq_client_data* data); -/** update the timer */ -static void update_timer(struct doq_client_data* data); -/** disconnect we are done */ -static void disconnect(struct doq_client_data* data); -/** fetch and write the transport file */ -static void early_data_write_transport(struct doq_client_data* data); - -/** usage of doqclient */ -static void usage(char* argv[]) -{ - printf("usage: %s [options] name type class ...\n", argv[0]); - printf(" sends the name-type-class queries over " - "DNS-over-QUIC.\n"); - printf("-s server IP address to send the queries to, " - "default: 127.0.0.1\n"); - printf("-p Port to connect to, default: %d\n", - UNBOUND_DNS_OVER_QUIC_PORT); - printf("-v verbose output\n"); - printf("-q quiet, short output of answer\n"); - printf("-x file transport file, for read/write of transport parameters.\n\t\tIf it exists, it is used to send early data. It is then\n\t\twritten to contain the last used transport parameters.\n\t\tAlso -y must be enabled for early data to succeed.\n"); - printf("-y file session file, for read/write of TLS session. If it exists,\n\t\tit is used for TLS session resumption. It is then written\n\t\tto contain the last session used.\n\t\tOn its own, without also -x, resumes TLS session.\n"); - printf("-h This help text\n"); - exit(1); -} - -/** get the dest address */ -static void -get_dest_addr(struct doq_client_data* data, const char* svr, int port) -{ - if(!ipstrtoaddr(svr, port, &data->dest_addr, &data->dest_addr_len)) { - printf("fatal: bad server specs '%s'\n", svr); - exit(1); - } -} - -/** open UDP socket to svr */ -static int -open_svr_udp(struct doq_client_data* data) -{ - int fd = -1; - int r; - fd = socket(addr_is_ip6(&data->dest_addr, data->dest_addr_len)? - PF_INET6:PF_INET, SOCK_DGRAM, 0); - if(fd == -1) { - perror("socket() error"); - exit(1); - } - r = connect(fd, (struct sockaddr*)&data->dest_addr, - data->dest_addr_len); - if(r < 0 && r != EINPROGRESS) { - perror("connect() error"); - exit(1); - } - fd_set_nonblock(fd); - return fd; -} - -/** get the local address of the connection */ -static void -get_local_addr(struct doq_client_data* data) -{ - memset(&data->local_addr, 0, sizeof(data->local_addr)); - data->local_addr_len = (socklen_t)sizeof(data->local_addr); - if(getsockname(data->fd, (struct sockaddr*)&data->local_addr, - &data->local_addr_len) == -1) { - perror("getsockname() error"); - exit(1); - } - log_addr(1, "local_addr", &data->local_addr, data->local_addr_len); - log_addr(1, "dest_addr", &data->dest_addr, data->dest_addr_len); -} - -static sldns_buffer* -make_query(char* qname, char* qtype, char* qclass) -{ - struct query_info qinfo; - struct edns_data edns; - sldns_buffer* buf = sldns_buffer_new(65553); - if(!buf) fatal_exit("out of memory"); - qinfo.qname = sldns_str2wire_dname(qname, &qinfo.qname_len); - if(!qinfo.qname) { - printf("cannot parse query name: '%s'\n", qname); - exit(1); - } - - qinfo.qtype = sldns_get_rr_type_by_name(qtype); - qinfo.qclass = sldns_get_rr_class_by_name(qclass); - qinfo.local_alias = NULL; - - qinfo_query_encode(buf, &qinfo); /* flips buffer */ - free(qinfo.qname); - sldns_buffer_write_u16_at(buf, 0, 0x0000); - sldns_buffer_write_u16_at(buf, 2, BIT_RD); - memset(&edns, 0, sizeof(edns)); - edns.edns_present = 1; - edns.bits = EDNS_DO; - edns.udp_size = 4096; - if(sldns_buffer_capacity(buf) >= - sldns_buffer_limit(buf)+calc_edns_field_size(&edns)) - attach_edns_record(buf, &edns); - return buf; -} - -/** create client stream structure */ -static struct doq_client_stream* -client_stream_create(struct sldns_buffer* query_data) -{ - struct doq_client_stream* str = calloc(1, sizeof(*str)); - if(!str) - fatal_exit("calloc failed: out of memory"); - str->data = memdup(sldns_buffer_begin(query_data), - sldns_buffer_limit(query_data)); - if(!str->data) - fatal_exit("alloc data failed: out of memory"); - str->data_len = sldns_buffer_limit(query_data); - str->stream_id = -1; - return str; -} - -/** free client stream structure */ -static void -client_stream_free(struct doq_client_stream* str) -{ - if(!str) - return; - free(str->data); - sldns_buffer_free(str->answer); - free(str); -} - -/** setup the stream to start the write process */ -static void -client_stream_start_setup(struct doq_client_stream* str, int64_t stream_id) -{ - str->has_stream = 1; - str->stream_id = stream_id; - str->nwrite = 0; - str->nread = 0; - str->answer_len = 0; - str->query_is_done = 0; - str->answer_is_complete = 0; - str->query_has_error = 0; - if(str->answer) { - sldns_buffer_free(str->answer); - str->answer = NULL; - } -} - -/** Return string for log purposes with query name. */ -static char* -client_stream_string(struct doq_client_stream* str) -{ - char* s; - size_t dname_len; - char dname[256], tpstr[32], result[256+32+16]; - uint16_t tp; - if(str->data_len <= LDNS_HEADER_SIZE) { - s = strdup("query_with_no_question"); - if(!s) - fatal_exit("strdup failed: out of memory"); - return s; - } - dname_len = dname_valid(str->data+LDNS_HEADER_SIZE, - str->data_len-LDNS_HEADER_SIZE); - if(!dname_len) { - s = strdup("query_dname_not_valid"); - if(!s) - fatal_exit("strdup failed: out of memory"); - return s; - } - (void)sldns_wire2str_dname_buf(str->data+LDNS_HEADER_SIZE, dname_len, - dname, sizeof(dname)); - tp = sldns_wirerr_get_type(str->data+LDNS_HEADER_SIZE, - str->data_len-LDNS_HEADER_SIZE, dname_len); - (void)sldns_wire2str_type_buf(tp, tpstr, sizeof(tpstr)); - snprintf(result, sizeof(result), "%s %s", dname, tpstr); - s = strdup(result); - if(!s) - fatal_exit("strdup failed: out of memory"); - return s; -} - -/** create query stream list */ -static struct doq_client_stream_list* -stream_list_create(void) -{ - struct doq_client_stream_list* list = calloc(1, sizeof(*list)); - if(!list) - fatal_exit("calloc failed: out of memory"); - return list; -} - -/** free the query stream list */ -static void -stream_list_free(struct doq_client_stream_list* list) -{ - struct doq_client_stream* str; - if(!list) - return; - str = list->first; - while(str) { - struct doq_client_stream* next = str->next; - client_stream_free(str); - str = next; - } - free(list); -} - -/** append item to list */ -static void -stream_list_append(struct doq_client_stream_list* list, - struct doq_client_stream* str) -{ - if(list->last) { - str->prev = list->last; - list->last->next = str; - } else { - str->prev = NULL; - list->first = str; - } - str->next = NULL; - list->last = str; -} - -/** delete the item from the list */ -static void -stream_list_delete(struct doq_client_stream_list* list, - struct doq_client_stream* str) -{ - if(str->next) { - str->next->prev = str->prev; - } else { - list->last = str->prev; - } - if(str->prev) { - str->prev->next = str->next; - } else { - list->first = str->next; - } - str->prev = NULL; - str->next = NULL; -} - -/** move the item from list1 to list2 */ -static void -stream_list_move(struct doq_client_stream* str, - struct doq_client_stream_list* list1, - struct doq_client_stream_list* list2) -{ - stream_list_delete(list1, str); - stream_list_append(list2, str); -} - -/** allocate stream data buffer, then answer length is complete */ -static void -client_stream_datalen_complete(struct doq_client_stream* str) -{ - verbose(1, "answer length %d", (int)ntohs(str->answer_len)); - str->answer = sldns_buffer_new(ntohs(str->answer_len)); - if(!str->answer) - fatal_exit("sldns_buffer_new failed: out of memory"); - sldns_buffer_set_limit(str->answer, ntohs(str->answer_len)); -} - -/** print the answer rrs */ -static void -print_answer_rrs(uint8_t* pkt, size_t pktlen) -{ - char buf[65535]; - char* str; - size_t str_len; - int i, qdcount, ancount; - uint8_t* data = pkt; - size_t data_len = pktlen; - int comprloop = 0; - if(data_len < LDNS_HEADER_SIZE) - return; - qdcount = LDNS_QDCOUNT(data); - ancount = LDNS_ANCOUNT(data); - data += LDNS_HEADER_SIZE; - data_len -= LDNS_HEADER_SIZE; - - for(i=0; iquery_has_error) { - char* logs = client_stream_string(str); - printf("%s has error, there is no answer\n", logs); - free(logs); - return; - } - if(sldns_buffer_limit(str->answer) < LDNS_HEADER_SIZE) { - char* logs = client_stream_string(str); - printf("%s received short packet, smaller than header\n", - logs); - free(logs); - return; - } - rcode = LDNS_RCODE_WIRE(sldns_buffer_begin(str->answer)); - if(rcode != 0) { - char* logs = client_stream_string(str); - char rc[16]; - (void)sldns_wire2str_rcode_buf(rcode, rc, sizeof(rc)); - printf("%s rcode %s\n", logs, rc); - free(logs); - return; - } - ancount = LDNS_ANCOUNT(sldns_buffer_begin(str->answer)); - if(ancount == 0) { - char* logs = client_stream_string(str); - printf("%s nodata answer\n", logs); - free(logs); - return; - } - print_answer_rrs(sldns_buffer_begin(str->answer), - sldns_buffer_limit(str->answer)); -} - -/** print the stream output answer */ -static void -client_stream_print_long(struct doq_client_data* data, - struct doq_client_stream* str) -{ - char* s; - if(str->query_has_error) { - char* logs = client_stream_string(str); - printf("%s has error, there is no answer\n", logs); - free(logs); - return; - } - s = sldns_wire2str_pkt(sldns_buffer_begin(str->answer), - sldns_buffer_limit(str->answer)); - printf("%s", (s?s:";sldns_wire2str_pkt failed\n")); - printf(";; SERVER: %s %d\n", data->svr, data->port); - free(s); -} - -/** the stream has completed the data */ -static void -client_stream_data_complete(struct doq_client_stream* str) -{ - verbose(1, "received all answer content"); - if(verbosity > 0) { - char* logs = client_stream_string(str); - char* s; - log_buf(1, "received answer", str->answer); - s = sldns_wire2str_pkt(sldns_buffer_begin(str->answer), - sldns_buffer_limit(str->answer)); - if(!s) verbose(1, "could not sldns_wire2str_pkt"); - else verbose(1, "query %s received:\n%s", logs, s); - free(s); - free(logs); - } - str->answer_is_complete = 1; -} - -/** the stream has completed but with an error */ -static void -client_stream_answer_error(struct doq_client_stream* str) -{ - if(verbosity > 0) { - char* logs = client_stream_string(str); - if(str->answer) - verbose(1, "query %s has an error. received %d/%d bytes.", - logs, (int)sldns_buffer_position(str->answer), - (int)sldns_buffer_limit(str->answer)); - else - verbose(1, "query %s has an error. received no data.", - logs); - free(logs); - } - str->query_has_error = 1; -} - -/** receive data for a stream */ -static void -client_stream_recv_data(struct doq_client_stream* str, const uint8_t* data, - size_t datalen) -{ - int got_data = 0; - /* read the tcplength uint16_t at the start of the DNS message */ - if(str->nread < 2) { - size_t to_move = datalen; - if(datalen > 2-str->nread) - to_move = 2-str->nread; - memmove(((uint8_t*)&str->answer_len)+str->nread, data, - to_move); - str->nread += to_move; - data += to_move; - datalen -= to_move; - if(str->nread == 2) { - /* we can allocate the data buffer */ - client_stream_datalen_complete(str); - } - } - /* if we have data bytes */ - if(datalen > 0) { - size_t to_write = datalen; - if(datalen > sldns_buffer_remaining(str->answer)) - to_write = sldns_buffer_remaining(str->answer); - if(to_write > 0) { - sldns_buffer_write(str->answer, data, to_write); - str->nread += to_write; - data += to_write; - datalen -= to_write; - got_data = 1; - } - } - /* extra received bytes after end? */ - if(datalen > 0) { - verbose(1, "extra bytes after end of DNS length"); - if(verbosity > 0) - log_hex("extradata", (void*)data, datalen); - } - /* are we done with it? */ - if(got_data && str->nread >= (size_t)(ntohs(str->answer_len))+2) { - client_stream_data_complete(str); - } -} - -/** receive FIN from remote end on client stream, no more data to be - * received on the stream. */ -static void -client_stream_recv_fin(struct doq_client_data* data, - struct doq_client_stream* str, int is_fin) -{ - if(verbosity > 0) { - char* logs = client_stream_string(str); - if(is_fin) - verbose(1, "query %s: received FIN from remote", logs); - else - verbose(1, "query %s: stream reset from remote", logs); - free(logs); - } - if(str->write_is_done) - stream_list_move(str, data->query_list_receive, - data->query_list_stop); - else - stream_list_move(str, data->query_list_send, - data->query_list_stop); - if(!str->answer_is_complete) { - client_stream_answer_error(str); - } - str->query_is_done = 1; - if(data->quiet) - client_stream_print_short(str); - else client_stream_print_long(data, str); - if(data->query_list_send->first==NULL && - data->query_list_receive->first==NULL) - disconnect(data); -} - -/** fill a buffer with random data */ -static void fill_rand(struct ub_randstate* rnd, uint8_t* buf, size_t len) -{ - if(RAND_bytes(buf, len) != 1) { - size_t i; - for(i=0; istatic_secret_data = malloc(len); - if(!data->static_secret_data) - fatal_exit("malloc failed: out of memory"); - data->static_secret_size = len; - fill_rand(data->rnd, data->static_secret_data, len); -} - -/** fill cid structure with random data */ -static void cid_randfill(struct ngtcp2_cid* cid, size_t datalen, - struct ub_randstate* rnd) -{ - uint8_t buf[32]; - if(datalen > sizeof(buf)) - datalen = sizeof(buf); - fill_rand(rnd, buf, datalen); - ngtcp2_cid_init(cid, buf, datalen); -} - -/** send buf on the client stream */ -static int -client_bidi_stream(struct doq_client_data* data, int64_t* ret_stream_id, - void* stream_user_data) -{ - int64_t stream_id; - int rv; - - /* open new bidirectional stream */ - rv = ngtcp2_conn_open_bidi_stream(data->conn, &stream_id, - stream_user_data); - if(rv != 0) { - if(rv == NGTCP2_ERR_STREAM_ID_BLOCKED) { - /* no bidi stream count for this new stream */ - return 0; - } - fatal_exit("could not ngtcp2_conn_open_bidi_stream: %s", - ngtcp2_strerror(rv)); - } - *ret_stream_id = stream_id; - return 1; -} - -/** See if we can start query streams, by creating bidirectional streams - * on the QUIC transport for them. */ -static void -query_streams_start(struct doq_client_data* data) -{ - while(data->query_list_start->first) { - struct doq_client_stream* str = data->query_list_start->first; - int64_t stream_id = 0; - if(!client_bidi_stream(data, &stream_id, str)) { - /* no more bidi streams allowed */ - break; - } - if(verbosity > 0) { - char* logs = client_stream_string(str); - verbose(1, "query %s start on bidi stream id %lld", - logs, (long long int)stream_id); - free(logs); - } - /* setup the stream to start */ - client_stream_start_setup(str, stream_id); - /* move the query entry to the send list to write it */ - stream_list_move(str, data->query_list_start, - data->query_list_send); - } -} - -/** the rand callback routine from ngtcp2 */ -static void rand_cb(uint8_t* dest, size_t destlen, - const ngtcp2_rand_ctx* rand_ctx) -{ - struct ub_randstate* rnd = (struct ub_randstate*) - rand_ctx->native_handle; - fill_rand(rnd, dest, destlen); -} - -/** the get_new_connection_id callback routine from ngtcp2 */ -static int get_new_connection_id_cb(struct ngtcp2_conn* ATTR_UNUSED(conn), - struct ngtcp2_cid* cid, uint8_t* token, size_t cidlen, void* user_data) -{ - struct doq_client_data* data = (struct doq_client_data*)user_data; - cid_randfill(cid, cidlen, data->rnd); - if(ngtcp2_crypto_generate_stateless_reset_token(token, - data->static_secret_data, data->static_secret_size, cid) != 0) - return NGTCP2_ERR_CALLBACK_FAILURE; - return 0; -} - -/** handle that early data is rejected */ -static void -early_data_is_rejected(struct doq_client_data* data) -{ - int rv; - verbose(1, "early data was rejected by the server"); *** 23474 LINES SKIPPED *** From nobody Fri Oct 18 16:25: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 4XVVS64z8fz5ZQ8s; Fri, 18 Oct 2024 16:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVVS64Sqfz4mcc; Fri, 18 Oct 2024 16:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729268742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xXB/k/P/XW9+iEkeji5CdpsTA+WHwPdeUMB27aI/We8=; b=V64zboR3rBBXCcT6SCELTIXu/ewlX5+2T7Li8WxyATVVZGNQ/K44FQxBj7xcTjJkSUa1GQ HV3s5UHEChXkIoA6bIokBLcBM3dZMwIwJ0hTbSy6jo8UutM4eh68DT68scp+310Ka1y01+ Ihzc/nch3t0sSvRy/OB0z1TCEqaos98qIlDAse1RKgDDChqKDvlQvYy1f3LUHGIC+mLXnJ wi6FUXVFKm9BEwtmtM4BLuawFMniVdgt2RdliT26yclFJC1zchKbEPM+qPpomO3genNAwc upfyXQGfR0sDwPyPtr87PJWGG/b4ChNm3JN76c7xxLd5dUoZa3bSB/D8wm3KIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729268742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xXB/k/P/XW9+iEkeji5CdpsTA+WHwPdeUMB27aI/We8=; b=W28y/U+RqKlEouoC/fxqSed8at6848/Cjk7aeGEiM52da2mH6IKEIuQzQFu47DWMD5xckb 5E2j1DUoGkJeQ3OPJVPtifOGJkml0KdMS7hcIxIuPh/RO0RW+O9rHY3yKoz3W95lgBov4f vWs6Khd+OKaxSBMrVTD/kJFNTr8IuZikEEL/aMUucMQyx06d7LctyVJCVHg7LeVQdyRt4f cIyz46R9JrtEOotKFNHsqCyQaWFmUnb46v9ai97Sic1EZbydgXQnmc8eKaDRcyGdyuQKQO 0bnBDda+7duigGx5/qPsGTX0x0qpTaNcMvUTSdJsh8kAj9XJoaqO78LZqOMzwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729268742; a=rsa-sha256; cv=none; b=EKy5ikxXRZbKcwFXI4W9nKn9cSMWJspXnBFiS2rZYUWbIOlg5gsWaxpENeBF6JV4riLPH3 RQ8scVL/XQA67+sWEIVx4HMoT6nkRWzQMEVuGW1tr9stZIy+S//Eh1ZwN7SQcQ4p7IcB3l MLC/3vVnJDx76ISLQahJZ+4xtTwOM+BgGYA5fZsFhJS4XKvHX+5y6olr6MmmPlPRetrJAa z1q1+SI76AmmJpboL6AUFel8rDW9pt+WuIDU+UQaYVta8yvWDmzHGokmvGgxkmxz0mJPam 9iH+KohaPueujW9ZAKTQatFTi58n2vFpTcj66HuKpXvkiavXA7OFhTvsJmdzTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVVS644bZzh3L; Fri, 18 Oct 2024 16:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IGPguj069586; Fri, 18 Oct 2024 16:25:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IGPgWn069583; Fri, 18 Oct 2024 16:25:42 GMT (envelope-from git) Date: Fri, 18 Oct 2024 16:25:42 GMT Message-Id: <202410181625.49IGPgWn069583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Igor Ostapenko Subject: git: 8829d4cb09d3 - main - pf tests: Lower chances of false positives for mbuf:inet6_in_mbuf_len 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8829d4cb09d39801d3b6bcf8ab8c6b72dd757636 Auto-Submitted: auto-generated The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=8829d4cb09d39801d3b6bcf8ab8c6b72dd757636 commit 8829d4cb09d39801d3b6bcf8ab8c6b72dd757636 Author: Igor Ostapenko AuthorDate: 2024-10-18 16:24:11 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-18 16:24:11 +0000 pf tests: Lower chances of false positives for mbuf:inet6_in_mbuf_len Reviewed by: kp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D47175 --- tests/sys/netpfil/pf/mbuf.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/sys/netpfil/pf/mbuf.sh b/tests/sys/netpfil/pf/mbuf.sh index a4664718093a..d845f793a969 100644 --- a/tests/sys/netpfil/pf/mbuf.sh +++ b/tests/sys/netpfil/pf/mbuf.sh @@ -119,6 +119,11 @@ inet6_in_mbuf_len_body() "pass quick inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" atf_check -s not-exit:0 -o ignore ping -c1 -t1 2001:db8::2 + # Avoid redundant ICMPv6 packets to avoid false positives during + # counting of net.dummymbuf.hits. + ndp -i ${epair}a -- -nud + jexec alcatraz ndp -i ${epair}b -- -nud + # Should be allowed by from/to addresses pft_set_rules alcatraz \ "block" \ From nobody Fri Oct 18 17:35:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVX1941RGz5ZTj2; Fri, 18 Oct 2024 17:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVX193HBrz4tVv; Fri, 18 Oct 2024 17:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729272957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0P3D+eQ25hEnMu8YVRdljZtmVP850gH4VsbCJi9Q2tc=; b=xrDYPR2G8ig6J1iL2LIdZ9TUGwStDPKbjGfKmraoTLcTYo+uz3asRgo6OedAbN3+6pXjig MP7JdghBJ+KT01FIudpIMbUv1fjVTbcGTN2tTWwxXtiihnd3jEjhaS967JrfUV2oxYYnzD dYypC/HEZl3TZz/sJPLB2dxXm1Wd2TK1c4e25g/lWOaUgt9+NHWAfmE2C9rKyJJqUjFpus SbcsEdRiFZhSZdjC6oVI5cBHVWrzUhd+LJeanPw57zbfhjB1NNvBYSfGbE48WeXc3DOuHz vieWdKtuCajAdG3zdXWe6FOtXr0zpzrQ+vV3fQf2Dr+bJV/Q2xr0a/9FXHXkBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729272957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0P3D+eQ25hEnMu8YVRdljZtmVP850gH4VsbCJi9Q2tc=; b=BrqhU/7gdZBqu6lhSTZnLdX9BFCc9vxELWnxlge3RynmVnncLnd11z5V9gA4n7o5tPZuWG IK8DS15Xm/lAQ//92eL4LRSo1vYyD1Y6KfPQp7CY1cT6c94nhl17iRcqmSnfXhK987P7E2 3HmK6dzz/wdISqMpsmEklsvnt9VD6Qx25CwK0ZYw7VmY+3pIUa21crcGWIBTZK9izy8FNW p/dAJ67hK7pAPltGBTsyNllMkJfMNLBGHaXdOVVd3dgar7mi829J4GYl6ladbdHAlvxaJ4 nCp0aYDs3SB8EFYvE+mncanCI7zfwGwo4jJP9TMKHnbz491XJkc/dVruoyZrhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729272957; a=rsa-sha256; cv=none; b=phHF1wbMDTcIDMzH4JZwqtUrr2IYIPYgxx3Z9cJnZDpP8V2C0SEbRuBup3uZqepiQb6yhX VU+ZcjJL4alUiDO9QSI9L02yge+gjjc/EsJMJWKcbGrUJUO2Y4YvnDa5y6TAgWJsyGjsNo mFsS/QpHkuMDyyDnlbh46t1rEoUJjYVA/s2M8Bly+SZLy9dqz5gmQWMaI4JDFtkOetnJRl cT4i2llisY3p8mK57SjFpl7RweATbf/Z/MeeagHbyUO1PmabeZf8MkospWqncSvNlxcTBl FHBe5XQnUKeHxfB+opfsRyBNY1T6Eh90a8IcFwhYEIOfBB4Cx4s3mBHrWwz59w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVX192sf3zjph; Fri, 18 Oct 2024 17:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IHZveb087871; Fri, 18 Oct 2024 17:35:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IHZvte087868; Fri, 18 Oct 2024 17:35:57 GMT (envelope-from git) Date: Fri, 18 Oct 2024 17:35:57 GMT Message-Id: <202410181735.49IHZvte087868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 994a82a01956 - main - tcp: garbage collect unused macros 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 994a82a0195627027f209f956da1c48cf5089079 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=994a82a0195627027f209f956da1c48cf5089079 commit 994a82a0195627027f209f956da1c48cf5089079 Author: Gleb Smirnoff AuthorDate: 2024-10-18 17:35:38 +0000 Commit: Gleb Smirnoff CommitDate: 2024-10-18 17:35:38 +0000 tcp: garbage collect unused macros Fixes: d40c0d47cd2a8100b8b9719bea092dde0512937a --- sys/netinet/tcp_var.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 3fd6edccf365..9f28e8247e3e 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1107,8 +1107,6 @@ struct tcpstat { #define tcps_rcvmemdrop tcps_rcvreassfull /* compat */ #ifdef _KERNEL -#define TI_UNLOCKED 1 -#define TI_RLOCKED 2 #include #include From nobody Fri Oct 18 18:15: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 4XVXv456X4z5ZWpr; Fri, 18 Oct 2024 18:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVXv44YSgz41Lm; Fri, 18 Oct 2024 18:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729275344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6UM5bJf3wV+HYalXjAjCl/ORQOnaHzSNfs/hY2X5I/s=; b=c1k+vi3L8vJx/TOc79Jo8tF0J/sPhkBQtMnWmypOvzMmLMd223d2YZOT17Z+cIusf5pe4u IOLkpAa5FEGf8vI1UI8m3+Mh4X1VQp2Ha3rR1kbpqxOOpFbk6UGYi66gbDOWK74r88Q8r7 B3XnHkW+HigQHmUnblBUsnZ8g+JXYBACPkVJW9WYkx/Me6WevsqYhKGIUhcX6VM8NfsZOj LA/J8B0/FSVBTUm+ZXLTWOgaAYvUQ9fZCkyckmimX490sSZvaAByDeIA/taZmjRmw0dn+m Wf6BJxquyqCt5XvBmkCu+msfdjsWbXj81XJC9WSCv+bZBn+u8lsWFWSnfARC9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729275344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6UM5bJf3wV+HYalXjAjCl/ORQOnaHzSNfs/hY2X5I/s=; b=HnzdepUhooDeK8Keto5UktXZFrriVc8+q5jbLeb4zdu5KTQBcO3Dd6gH3wTrTX2g2k0npB H/am5Nq6edI+BpY4w7yPigl0MzYWG1NdV0bhcC0N8kP9sovBTDHCsV3JIy+94ZVGeOtTJ8 kbgIDxXMFglMtxp/Ds6Wm/gD46hN4AVmjSc19MM5bg74aNdZRbZVuBHdB/UyN+++XUhbnE lYb6yOIWOeV7CX0WoE4sL1VPKS4eggRF6O4uEzFMNg2rIX/LxX+//GZx8fpj+halHmWtTB 0HCWtXGgfLwNrEwzySYCFDVnPyzRHUGTQzrCxvhkUhRwOFgbBlFuH+OAP4puBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729275344; a=rsa-sha256; cv=none; b=x7Y63X4wLq63tb5Gt8H6XH9M6xERL+DoBVnqKsLDnmPRQ912ltTiSedUN2/A6uGMUlMZwI Hl+ZSoOkPSm/smGp5dCbbO3FGHeTbbVw5Ui3PY2TeUlHwd2OvNAeaMDz32g/dx27SpS3RY 2Hj54B1vUvBAm9WSJaobNjtbtG67zqx10ATKTRHsx1yhfRcQS/ZRqqknFwcci2lZ67ABSj 17f/7Sd3mrvxhsLGVBMvuCnYEmyjQh7WwVQkS7KCOmKURTGJJJicovMTWXvtZaAwBRheuH nuK/VpyvEOxuEJ0quM+D2a/wclp6AHE99AVeH0Xv4xb+q2VzJJHrfRjlRxi4PQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVXv43xYtzkqZ; Fri, 18 Oct 2024 18:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IIFi6F055647; Fri, 18 Oct 2024 18:15:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IIFiKi055644; Fri, 18 Oct 2024 18:15:44 GMT (envelope-from git) Date: Fri, 18 Oct 2024 18:15:44 GMT Message-Id: <202410181815.49IIFiKi055644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 1363acbf25de - main - libc/csu: Support IFUNCs on riscv 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1363acbf25de4c36e183cfa0b0e801d4dd9bf2ad Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=1363acbf25de4c36e183cfa0b0e801d4dd9bf2ad commit 1363acbf25de4c36e183cfa0b0e801d4dd9bf2ad Author: Jessica Clarke AuthorDate: 2024-10-18 18:14:58 +0000 Commit: Jessica Clarke CommitDate: 2024-10-18 18:14:58 +0000 libc/csu: Support IFUNCs on riscv When adding support to rtld-elf I neglected the fact that static binaries can have IFUNCs. Add support for this too. Fixes: 729d2b16b74f ("rtld-elf: Support IFUNCs on riscv") MFC after: 1 week --- lib/libc/csu/riscv/Makefile.inc | 4 +-- lib/libc/csu/riscv/reloc.c | 63 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/lib/libc/csu/riscv/Makefile.inc b/lib/libc/csu/riscv/Makefile.inc index 2534e6579f38..5d59d40eb393 100644 --- a/lib/libc/csu/riscv/Makefile.inc +++ b/lib/libc/csu/riscv/Makefile.inc @@ -1,4 +1,4 @@ # -CFLAGS+= -DCRT_IRELOC_SUPPRESS \ - -DINIT_IRELOCS="" +CFLAGS+= -DCRT_IRELOC_RELA \ + -DINIT_IRELOCS="init_cpu_features(env)" diff --git a/lib/libc/csu/riscv/reloc.c b/lib/libc/csu/riscv/reloc.c new file mode 100644 index 000000000000..036ea3de8701 --- /dev/null +++ b/lib/libc/csu/riscv/reloc.c @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2019 Leandro Lupori + * Copyright (c) 2024 Jessica Clarke + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +static unsigned long elf_hwcap; + +static void +init_cpu_features(char **env) +{ + const Elf_Auxinfo *aux; + + /* Find the auxiliary vector on the stack. */ + while (*env++ != 0) /* Skip over environment, and NULL terminator */ + ; + aux = (const Elf_Auxinfo *)env; + + /* Digest the auxiliary vector. */ + for (; aux->a_type != AT_NULL; aux++) { + switch (aux->a_type) { + case AT_HWCAP: + elf_hwcap = (uint32_t)aux->a_un.a_val; + break; + } + } +} + +static void +crt1_handle_rela(const Elf_Rela *r) +{ + typedef Elf_Addr (*ifunc_resolver_t)( + unsigned long, unsigned long, unsigned long, unsigned long, + unsigned long, unsigned long, unsigned long, unsigned long); + Elf_Addr *ptr, *where, target; + + switch (ELF_R_TYPE(r->r_info)) { + case R_RISCV_IRELATIVE: + ptr = (Elf_Addr *)r->r_addend; + where = (Elf_Addr *)r->r_offset; + target = ((ifunc_resolver_t)ptr)(elf_hwcap, + 0, 0, 0, 0, 0, 0, 0); + *where = target; + break; + } +} From nobody Fri Oct 18 18:15: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 4XVXv624JSz5ZX5n; Fri, 18 Oct 2024 18:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVXv604r5z417F; Fri, 18 Oct 2024 18:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729275346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TZ/cFHwDYjDHfDrYvg0lFJPaBB0P6MIMkOhACi2eCUI=; b=fipxAjbltPlHOPMMoFdSE9oFcmndmQjIZZHWlU4h0fnTjJ9PiP4ghGdZO8jwvUedMTdGL6 pgr1xd2eUsKVNOEjYVY1FUzVn96kukhC7nooerMbJLfPlNeVeYJ5RJbvR9quCrurLUYgyP kIybAazxIuyLkMJtJWwJ89fV2DNX8gZS7X9OY6bOS9l9JLR0zuw9KjmTPwwpYTkxVDFYYm Ny3/4aySt36P7nRDy4SLIbBbr29S51moLGsl7Md+hqR1/yyZF9vGqZNa5VbCzvFxAb/web +4myRpBhXmAl3yc3zFhz4tV6x7NsKwxtISTSKPI9dOf8R8VBImg7/nSlTq3qTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729275346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TZ/cFHwDYjDHfDrYvg0lFJPaBB0P6MIMkOhACi2eCUI=; b=vo/rjrI0HxrVuuc2bjzAaOxAK6/avNxnE056ow6043ZfRGoRLP0Q1rAMQGoG4uMfJ2EAha ukQSwaBDa4myrHufN/ACrKYCTAyNm4cVrbhAyXHV+vlQmh8nsguWDaPlMg8iZxARLFdJeb l2CFwBK940cVTyarp1HATqBp0YPAwUYdTulOMjf0KTNA+/zdRT33fsDZmYMcPWetirEbJ7 LEBFHUpdCtJdy3A9UBEK1ROzqa0wuSdoba3sg8GRXVU1OqpnGsDs/sDpbyFOQylXdUGeKZ BPPligMvbEslgGcGlkxaRJoTreIouqco4wWkuseTzHW3y60Ry9UDhbzCrbfktw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729275346; a=rsa-sha256; cv=none; b=aSs9/GJ0at03B4NxbJFUgPYCf/yoA+ZraOGHAiBH3OczaJim9M5OdpDkfv75Elb0FzkiTW loTDHuk4PNXtIyVeLHu/IVCu49U1578PN+XQiWLbozawHdlAa97QFcqLBnNrEKacZ2evMe 0Uwy65a8p0+X+W/76AFNl5T6iVxRvlw5s/nLAJNbCm2xkH8c7DaifbhewuaMB7kIyn56CA M1Vb/9ObZ4cKc/zZ3WQB/xiTyvYnOqIASfk6UthX5ISvkJ+Fl7TqXjN04kbN/qRtbVi1xH tOtoeqqexzwpZqcvzlF0inOI9RkuiX37JwpSMOES7xu28mu2LZKj+tJ6KMhYVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVXv5583mzksb; Fri, 18 Oct 2024 18:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IIFjc1055702; Fri, 18 Oct 2024 18:15:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IIFjof055699; Fri, 18 Oct 2024 18:15:45 GMT (envelope-from git) Date: Fri, 18 Oct 2024 18:15:45 GMT Message-Id: <202410181815.49IIFjof055699@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: d41a40f48482 - main - depend-cleanup.sh: Clean up after riscv static binary IFUNC addition 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d41a40f484826e90ed78dce5f006712b0eeaf501 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=d41a40f484826e90ed78dce5f006712b0eeaf501 commit d41a40f484826e90ed78dce5f006712b0eeaf501 Author: Jessica Clarke AuthorDate: 2024-10-18 18:15:30 +0000 Commit: Jessica Clarke CommitDate: 2024-10-18 18:15:30 +0000 depend-cleanup.sh: Clean up after riscv static binary IFUNC addition reloc.c is conditionally included by libc_start1.c so existing builds don't feature it in the .depend file and won't know they need to rebuild libc_start1.c. MFC after: 1 week --- tools/build/depend-cleanup.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index 94cafbd9a8d6..001a450bf182 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -199,3 +199,19 @@ clean_dep cddl/lib/libzpool zfs_debug c "linux/zfs/zfs_debug\.c" # 20241011 clean_dep cddl/lib/libzpool arc_os c "linux/zfs/arc_os\.c" + +# 20241018 1363acbf25de libc/csu: Support IFUNCs on riscv +if [ ${MACHINE} = riscv ]; then + for f in "$OBJTOP"/lib/libc/.depend.libc_start1.*o; do + if [ ! -f "$f" ]; then + continue + fi + if ! grep -q 'lib/libc/csu/riscv/reloc\.c' "$f"; then + echo "Removing stale dependencies and objects for libc_start1.c" + run rm -f \ + "$OBJTOP"/lib/libc/.depend.libc_start1.* \ + "$OBJTOP"/lib/libc/libc_start1.*o + break + fi + done +fi From nobody Fri Oct 18 18:49:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVYdf5HTZz5YpN8; Fri, 18 Oct 2024 18:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVYdf4cFNz43yt; Fri, 18 Oct 2024 18:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729277350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nXDnMG+yvmlymQO0V7kLaqJN1lkWjZm46rzAwH+Zrm8=; b=YVgYUwKr96vut2b4mEPRVPwj9o67Yieat/XFAoi0+4serB8mWdOBadYnJ9ibik4H2mWsHR c+mq3GHp1aZRAocIcmhTUk0OU2J0ufzBWqkQQOcP/tlngzg2zclCyGjMPWazEcv5U4a6In xwr32ZflNxO3OiQfqoX1m/sJU60tzXzSopO6tZ26pD9OGEwo3G7c/sdWgBakKosy/SWEwQ nMPTeXEKqYC2FlUZAl5sqy2Gdmr7E/Vp4l+AQ/RsDaxgeMhSFBn248JFR00egWnCAkd58S Oo6LaJemGyaCradu8WJlNQXETdjInMc5VGU8432q2W160CmXHEZm2GkfFD5Lcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729277350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nXDnMG+yvmlymQO0V7kLaqJN1lkWjZm46rzAwH+Zrm8=; b=P8WgZsHjkCcdweylyzByNsgzjBP1cw4dJOB/YWEMGywr+k4SXp5cxaQ8gyiIHyBWDlSwDB WsN48nEY/v73Dezj1lLRptxdKwuMtNMyrv7jcl9MuEt/bHfNzZ04pt5uuHgRKnk86/L8Mu 9o3GDoWJrFIp7euZKDtnF/Va0//7umcD1a0oDygprlaq7+SzKnQa11bX+mR92pdHftsIeZ eE1P6CpzcgNKHGLj41iqXjMvrpcrlvNwnOxKrdvzKMUj3O1qDIHDmkMb5QQgKXKDWw8Bnb pDTQFf29vpb2ZpWAgrA4kX/s9Ile15/z9CwiacncN84RPj9Q7VDfv2smT3J6bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729277350; a=rsa-sha256; cv=none; b=BAgd5TnBMGIoyP31QofedJYVne40XQwhaKoSKuWwUYGKhQR9romqxXpPDA17VUONVTRXH9 Obmh05XrccKD9xCGkzM0c207Ut3cJlRZ85lXsRxKJHQmK2RepkNIrMkN+RipY8XVjAeTil jFZUmiY6f+4ww+nG58xs7HmRnqo+IkgXZZor58OCtHIZWySUB2PniqCQzrQp/U1tHA57bD zoH1jgtOL16u+aT21v+0MPitFwpaTIUYcXwQSm/KFiozfgPPPtZz3VEiKvv+9/vQ1wfcV8 4wazV6o2zDwVQ04Dp3tvzxI0WqjyG5M48Pgxr8Zk7k3mG5X58lqu60i/4T9UPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVYdf3vRrzlWq; Fri, 18 Oct 2024 18:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IInAYH006649; Fri, 18 Oct 2024 18:49:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IInASV006646; Fri, 18 Oct 2024 18:49:10 GMT (envelope-from git) Date: Fri, 18 Oct 2024 18:49:10 GMT Message-Id: <202410181849.49IInASV006646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3b2cf9381ef8 - main - amd64: do not pass -z rodynamic to ld.bfd when building vdso 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/main X-Git-Reftype: branch X-Git-Commit: 3b2cf9381ef86847603c3c94811f638660c417ae Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3b2cf9381ef86847603c3c94811f638660c417ae commit 3b2cf9381ef86847603c3c94811f638660c417ae Author: Konstantin Belousov AuthorDate: 2024-10-18 14:09:26 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-18 18:48:56 +0000 amd64: do not pass -z rodynamic to ld.bfd when building vdso Apparently newer versions of binutils complain instead of silently ignoring the unknown -z option. Reported by: bz Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47176 --- sys/tools/amd64_ia32_vdso.sh | 7 ++++++- sys/tools/amd64_vdso.sh | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/tools/amd64_ia32_vdso.sh b/sys/tools/amd64_ia32_vdso.sh index 59923749042f..85d2299b45d0 100644 --- a/sys/tools/amd64_ia32_vdso.sh +++ b/sys/tools/amd64_ia32_vdso.sh @@ -34,9 +34,14 @@ ${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c -m32 \ -o ia32_sigtramp.pico -I. -I"${S}" -include opt_global.h \ "${S}"/amd64/ia32/ia32_sigtramp.S +if ${LD} --version | ${AWK} '/^GNU ld/{exit 1}' ; then + RODYNAMIC="-z rodynamic" +else + RODYNAMIC="" +fi ${LD} --shared -Bsymbolic -soname="elf-vdso32.so.1" \ -T "${S}"/conf/vdso_amd64_ia32.ldscript \ - --eh-frame-hdr --no-undefined -z rodynamic -z norelro -nmagic \ + --eh-frame-hdr --no-undefined ${RODYNAMIC} -z norelro -nmagic \ --hash-style=sysv --fatal-warnings --strip-all \ -o elf-vdso32.so.1 ia32_sigtramp.pico diff --git a/sys/tools/amd64_vdso.sh b/sys/tools/amd64_vdso.sh index aec0694ebdb1..2a83ae874ab7 100644 --- a/sys/tools/amd64_vdso.sh +++ b/sys/tools/amd64_vdso.sh @@ -40,12 +40,17 @@ ${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \ # # -z rodynamic is undocumented lld-specific option, seemingly required # for lld to avoid putting dynamic into dedicated writeable segment, -# despite ldscript placement. It is ignored by ld.bfd but ldscript +# despite ldscript placement. It is omitted for ld.bfd, but ldscript # alone is enough there. # +if ${LD} --version | ${AWK} '/^GNU ld/{exit 1}' ; then + RODYNAMIC="-z rodynamic" +else + RODYNAMIC="" +fi ${LD} --shared -Bsymbolic -soname="elf-vdso.so.1" \ -T "${S}"/conf/vdso_amd64.ldscript \ - --eh-frame-hdr --no-undefined -z rodynamic -z norelro -nmagic \ + --eh-frame-hdr --no-undefined ${RODYNAMIC} -z norelro -nmagic \ --hash-style=sysv --fatal-warnings --strip-all \ -o elf-vdso.so.1 sigtramp.pico From nobody Fri Oct 18 19:30:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVZYK6jtrz5YrjY; Fri, 18 Oct 2024 19:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVZYK65rbz49qH; Fri, 18 Oct 2024 19:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729279829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBJXAknHd3WPzeexqi6yX2jjSD1Ts+IyUsNy2865gfc=; b=Hvhs3IIs7GvEcK3imb5K7TXVLzDe5qSz0ZDxkRMI8BozHQP2n5CAMGcCSFIteIrT3ZuFkb 4EwO//6arXPgiw4eUgJV6sYuCMgEhqj+QeoeQ60cUAeUa4Z8ltonjc4H4XGYi1JsUChZiY PLzsZKxz5wm3ml1gl0Mhpl5SCR1fYOGTtlNK1DmzwFNCkWbiZkyexmkCiWIoTHOqv8oNNm UZhEHJHa7LGGe/x9L0l1doDU6UxS3j3Qj3M7Bl99rGTw2ZTnrQq4L4AyIuOenUDGMjrjiJ Bz0Zgd71DTBW+oMEMaSXL6a6sPaV8b0npu7XNIkRAhPzUuv5qK2UARLD0TYm+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729279829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBJXAknHd3WPzeexqi6yX2jjSD1Ts+IyUsNy2865gfc=; b=aVBct8DtpHbLXPXBx7DJJrz4cq4wZLyeaz+RMHu6MpG1+iFqahmkE0AhiyntSNR2U1VLVR XqzZgrI6vMV3xWrX1thkIpL4PfAjZ1BA9zO3a4EVdYtHi81aGO5eWXxNd2f4VYjTTwxvSP 06uRMIbcrDZjc0p8NYVa02UUYSs5zcxBYMfL3oXItuZAFFkUHmCo+6D4dXGx2UhsNPpj7J N8l2EWshU8e2hdEG6K9+wkW8e1OY7PanFg5OqEchaDqoSriowIO8zDxMtesoWNqVUBY5e6 2aNt9W3uOnR0jwDWct+7pTjX3VTL08Hwf0lNO3C5CCq0SIV8yZ0EekM+ACKR3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729279829; a=rsa-sha256; cv=none; b=frH9XjU9mg01epg01Ac5BsgzLPwICA9maXKWTVzquLg4mnAsHhhohV56xLFazRgTZlIVLY MOryagpLvCvaBuHwCk5CiiOAavipvb5D1LKH9n64h/ahftmBiz7BCPtt5uWRKVJZlJgA6X uB9le6n1f9gC7wJP7jM70IMNm7yHV2h+uw+orTMRnvt8midEbFJTR69AFh8GI4e98qATA3 ie13C1is9LgJ5GvGq+m+C+G8NcWQgL0vwQ9qZuRJbKDFZaI0D8hULQXqufecyPS+eH0dRL hcfqgEJ3RA8gbRpbV+I3HHXxmiOvzCW1ki2lb+q+meewVUX6oh7EDPF2mgDbPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVZYK5VWQzmmg; Fri, 18 Oct 2024 19:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IJUTvW083589; Fri, 18 Oct 2024 19:30:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IJUT5M083586; Fri, 18 Oct 2024 19:30:29 GMT (envelope-from git) Date: Fri, 18 Oct 2024 19:30:29 GMT Message-Id: <202410181930.49IJUT5M083586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 366d6a424e1f - main - ipmi: remove timeout from the ipmi_driver_request method 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 366d6a424e1faad9c151c5794978e218a79fbed8 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=366d6a424e1faad9c151c5794978e218a79fbed8 commit 366d6a424e1faad9c151c5794978e218a79fbed8 Author: Gleb Smirnoff AuthorDate: 2024-10-18 19:30:09 +0000 Commit: Gleb Smirnoff CommitDate: 2024-10-18 19:30:09 +0000 ipmi: remove timeout from the ipmi_driver_request method Driver requests are done with stack allocated request. The request is put on the tailq and then we msleep(9) until kernel process processes it. If we timeout from this sleep, the kernel process may still read the request from our stack, which may already be reused by some other code. Make this sleep unbound and rely on the kernel process that does all its I/O with timouts and will eventually wake us up. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D47179 --- sys/dev/ipmi/ipmi.c | 21 ++++++++++----------- sys/dev/ipmi/ipmi_bt.c | 6 +++--- sys/dev/ipmi/ipmi_kcs.c | 8 ++++---- sys/dev/ipmi/ipmi_opal.c | 10 ++++------ sys/dev/ipmi/ipmi_smic.c | 2 +- sys/dev/ipmi/ipmi_ssif.c | 5 ++--- sys/dev/ipmi/ipmivars.h | 5 ++--- 7 files changed, 26 insertions(+), 31 deletions(-) diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c index efb8a7e7669b..5f759017441c 100644 --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -360,7 +360,7 @@ ipmi_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, kreq->ir_request[req->msg.data_len + 7] = ipmi_ipmb_checksum(&kreq->ir_request[4], req->msg.data_len + 3); - error = ipmi_submit_driver_request(sc, kreq, MAX_TIMEOUT); + error = ipmi_submit_driver_request(sc, kreq); if (error != 0) return (error); @@ -565,11 +565,10 @@ ipmi_complete_request(struct ipmi_softc *sc, struct ipmi_request *req) /* Perform an internal driver request. */ int -ipmi_submit_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, - int timo) +ipmi_submit_driver_request(struct ipmi_softc *sc, struct ipmi_request *req) { - return (sc->ipmi_driver_request(sc, req, timo)); + return (sc->ipmi_driver_request(sc, req)); } /* @@ -636,7 +635,7 @@ ipmi_reset_watchdog(struct ipmi_softc *sc) IPMI_ALLOC_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_RESET_WDOG, 0, 0); - error = ipmi_submit_driver_request(sc, req, 0); + error = ipmi_submit_driver_request(sc, req); if (error) { device_printf(sc->ipmi_dev, "Failed to reset watchdog\n"); } else if (req->ir_compcode == 0x80) { @@ -677,7 +676,7 @@ ipmi_set_watchdog(struct ipmi_softc *sc, unsigned int sec) req->ir_request[4] = 0; req->ir_request[5] = 0; } - error = ipmi_submit_driver_request(sc, req, 0); + error = ipmi_submit_driver_request(sc, req); if (error) { device_printf(sc->ipmi_dev, "Failed to set watchdog\n"); } else if (req->ir_compcode != 0) { @@ -812,7 +811,7 @@ ipmi_power_cycle(void *arg, int howto) IPMI_CHASSIS_CONTROL, 1, 0); req->ir_request[0] = IPMI_CC_POWER_CYCLE; - ipmi_submit_driver_request(sc, req, MAX_TIMEOUT); + ipmi_submit_driver_request(sc, req); if (req->ir_error != 0 || req->ir_compcode != 0) { device_printf(sc->ipmi_dev, "Power cycling via IPMI failed code %#x %#x\n", @@ -859,7 +858,7 @@ ipmi_startup(void *arg) IPMI_ALLOC_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_GET_DEVICE_ID, 0, 15); - error = ipmi_submit_driver_request(sc, req, MAX_TIMEOUT); + error = ipmi_submit_driver_request(sc, req); if (error == EWOULDBLOCK) { device_printf(dev, "Timed out waiting for GET_DEVICE_ID\n"); return; @@ -888,7 +887,7 @@ ipmi_startup(void *arg) IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_CLEAR_FLAGS, 1, 0); - ipmi_submit_driver_request(sc, req, 0); + ipmi_submit_driver_request(sc, req); /* XXX: Magic numbers */ if (req->ir_compcode == 0xc0) { @@ -903,7 +902,7 @@ ipmi_startup(void *arg) IPMI_GET_CHANNEL_INFO, 1, 0); req->ir_request[0] = i; - error = ipmi_submit_driver_request(sc, req, 0); + error = ipmi_submit_driver_request(sc, req); if (error != 0 || req->ir_compcode != 0) break; @@ -918,7 +917,7 @@ ipmi_startup(void *arg) IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_GET_WDOG, 0, 0); - error = ipmi_submit_driver_request(sc, req, 0); + error = ipmi_submit_driver_request(sc, req); if (error == 0 && req->ir_compcode == 0x00) { device_printf(dev, "Attached watchdog\n"); diff --git a/sys/dev/ipmi/ipmi_bt.c b/sys/dev/ipmi/ipmi_bt.c index 2e92bdb0699e..c13397abd253 100644 --- a/sys/dev/ipmi/ipmi_bt.c +++ b/sys/dev/ipmi/ipmi_bt.c @@ -85,7 +85,7 @@ #define BT_IM_BMC_HWRST (1L << 7) static int bt_polled_request(struct ipmi_softc *, struct ipmi_request *); -static int bt_driver_request(struct ipmi_softc *, struct ipmi_request *, int); +static int bt_driver_request(struct ipmi_softc *, struct ipmi_request *); static int bt_wait(struct ipmi_softc *, uint8_t, uint8_t); static int bt_reset(struct ipmi_softc *); @@ -247,7 +247,7 @@ bt_loop(void *arg) IPMI_LOCK(sc); while ((req = ipmi_dequeue_request(sc)) != NULL) { IPMI_UNLOCK(sc); - (void)bt_driver_request(sc, req, 0); + (void)bt_driver_request(sc, req); IPMI_LOCK(sc); sc->ipmi_bt_seq++; ipmi_complete_request(sc, req); @@ -265,7 +265,7 @@ bt_startup(struct ipmi_softc *sc) } static int -bt_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, int timo __unused) +bt_driver_request(struct ipmi_softc *sc, struct ipmi_request *req) { int i, ok; diff --git a/sys/dev/ipmi/ipmi_kcs.c b/sys/dev/ipmi/ipmi_kcs.c index 3f1d84d708ce..be8e6664b717 100644 --- a/sys/dev/ipmi/ipmi_kcs.c +++ b/sys/dev/ipmi/ipmi_kcs.c @@ -488,13 +488,13 @@ kcs_startup(struct ipmi_softc *sc) } static int -kcs_driver_request_queue(struct ipmi_softc *sc, struct ipmi_request *req, int timo) +kcs_driver_request_queue(struct ipmi_softc *sc, struct ipmi_request *req) { int error; IPMI_LOCK(sc); ipmi_polled_enqueue_request_highpri(sc, req); - error = msleep(req, &sc->ipmi_requests_lock, 0, "ipmireq", timo); + error = msleep(req, &sc->ipmi_requests_lock, 0, "ipmireq", 0); if (error == 0) error = req->ir_error; IPMI_UNLOCK(sc); @@ -517,13 +517,13 @@ kcs_driver_request_poll(struct ipmi_softc *sc, struct ipmi_request *req) } static int -kcs_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, int timo) +kcs_driver_request(struct ipmi_softc *sc, struct ipmi_request *req) { if (KERNEL_PANICKED() || dumping) return (kcs_driver_request_poll(sc, req)); else - return (kcs_driver_request_queue(sc, req, timo)); + return (kcs_driver_request_queue(sc, req)); } diff --git a/sys/dev/ipmi/ipmi_opal.c b/sys/dev/ipmi/ipmi_opal.c index 084caba45184..ab0f14e8b3a8 100644 --- a/sys/dev/ipmi/ipmi_opal.c +++ b/sys/dev/ipmi/ipmi_opal.c @@ -142,8 +142,7 @@ opal_ipmi_discard_msgs(struct opal_ipmi_softc *sc) } static int -opal_ipmi_polled_request(struct opal_ipmi_softc *sc, struct ipmi_request *req, - int timo) +opal_ipmi_polled_request(struct opal_ipmi_softc *sc, struct ipmi_request *req) { uint64_t msg_len; int err; @@ -192,7 +191,7 @@ opal_ipmi_polled_request(struct opal_ipmi_softc *sc, struct ipmi_request *req, goto out; } - if ((err = opal_ipmi_recv(sc, &msg_len, timo)) == 0) { + if ((err = opal_ipmi_recv(sc, &msg_len, 0)) == 0) { /* Subtract one extra for the completion code. */ req->ir_replylen = msg_len - sizeof(struct opal_ipmi_msg) - 1; req->ir_replylen = min(req->ir_replylen, req->ir_replybuflen); @@ -248,15 +247,14 @@ opal_ipmi_startup(struct ipmi_softc *sc) } static int -opal_ipmi_driver_request(struct ipmi_softc *isc, struct ipmi_request *req, - int timo) +opal_ipmi_driver_request(struct ipmi_softc *isc, struct ipmi_request *req) { struct opal_ipmi_softc *sc = (struct opal_ipmi_softc *)isc; int i, err; for (i = 0; i < 3; i++) { IPMI_LOCK(&sc->ipmi); - err = opal_ipmi_polled_request(sc, req, timo); + err = opal_ipmi_polled_request(sc, req); IPMI_UNLOCK(&sc->ipmi); if (err == 0) break; diff --git a/sys/dev/ipmi/ipmi_smic.c b/sys/dev/ipmi/ipmi_smic.c index 1bcede44f920..0a80562db7dc 100644 --- a/sys/dev/ipmi/ipmi_smic.c +++ b/sys/dev/ipmi/ipmi_smic.c @@ -388,7 +388,7 @@ smic_startup(struct ipmi_softc *sc) } static int -smic_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, int timo) +smic_driver_request(struct ipmi_softc *sc, struct ipmi_request *req) { int i, ok; diff --git a/sys/dev/ipmi/ipmi_ssif.c b/sys/dev/ipmi/ipmi_ssif.c index 0c22d35421ef..c83cccc75123 100644 --- a/sys/dev/ipmi/ipmi_ssif.c +++ b/sys/dev/ipmi/ipmi_ssif.c @@ -359,15 +359,14 @@ ssif_startup(struct ipmi_softc *sc) } static int -ssif_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, int timo) +ssif_driver_request(struct ipmi_softc *sc, struct ipmi_request *req) { int error; IPMI_LOCK(sc); error = ipmi_polled_enqueue_request(sc, req); if (error == 0) - error = msleep(req, &sc->ipmi_requests_lock, 0, "ipmireq", - timo); + error = msleep(req, &sc->ipmi_requests_lock, 0, "ipmireq", 0); if (error == 0) error = req->ir_error; IPMI_UNLOCK(sc); diff --git a/sys/dev/ipmi/ipmivars.h b/sys/dev/ipmi/ipmivars.h index 17227c2053db..6ab8b128b820 100644 --- a/sys/dev/ipmi/ipmivars.h +++ b/sys/dev/ipmi/ipmivars.h @@ -133,7 +133,7 @@ struct ipmi_softc { driver_intr_t *ipmi_intr; int (*ipmi_startup)(struct ipmi_softc *); int (*ipmi_enqueue_request)(struct ipmi_softc *, struct ipmi_request *); - int (*ipmi_driver_request)(struct ipmi_softc *, struct ipmi_request *, int); + int (*ipmi_driver_request)(struct ipmi_softc *, struct ipmi_request *); }; #define ipmi_ssif_smbus_address _iface.ssif.smbus_address @@ -247,8 +247,7 @@ struct ipmi_request *ipmi_dequeue_request(struct ipmi_softc *); void ipmi_free_request(struct ipmi_request *); int ipmi_polled_enqueue_request(struct ipmi_softc *, struct ipmi_request *); int ipmi_polled_enqueue_request_highpri(struct ipmi_softc *, struct ipmi_request *); -int ipmi_submit_driver_request(struct ipmi_softc *, struct ipmi_request *, - int); +int ipmi_submit_driver_request(struct ipmi_softc *, struct ipmi_request *); /* Identify BMC interface via SMBIOS. */ int ipmi_smbios_identify(struct ipmi_get_info *); From nobody Fri Oct 18 19:41: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 4XVZnh1ZVJz5Yrs0; Fri, 18 Oct 2024 19:41:12 +0000 (UTC) (envelope-from maxim@freebsd.org) Received: from maxim.int.ru (maxim.int.ru [167.71.75.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "maxim.int.ru", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVZng2ZRJz4ClX; Fri, 18 Oct 2024 19:41:11 +0000 (UTC) (envelope-from maxim@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 167.71.75.67 is neither permitted nor denied by domain of maxim@freebsd.org) smtp.mailfrom=maxim@freebsd.org; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=freebsd.org (policy=none) Received: from localhost (maxim@localhost [127.0.0.1]) by maxim.int.ru (8.17.1/8.17.1) with ESMTPS id 49IJf3GX046560 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 18 Oct 2024 19:41:04 GMT (envelope-from maxim@freebsd.org) Date: Fri, 18 Oct 2024 19:41:03 +0000 (UTC) From: maxim@freebsd.org To: "Pedro F. Giffuni" cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b88df1e893c4 - main - Reapply "sbin/ping: allow normal users to specify larger packets" In-Reply-To: Message-ID: <39113afb-66e8-da08-14ab-83564c1271b2@maxim.int.ru> References: <202410161840.49GIe8CR000407@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spamd-Result: default: False [-2.89 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : No valid SPF, No valid DKIM,none]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:14061, ipnet:167.71.64.0/20, country:US]; FROM_NO_DN(0.00)[]; FREEFALL_USER(0.00)[maxim]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org,dev-commits-src-all@FreeBSD.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4XVZng2ZRJz4ClX X-Spamd-Bar: -- Hi Pedro, Unless you have a plan to address this issue please backout this code as it is clearly wrong. Thanks, Maxim On Wed, 16 Oct 2024, 19:04-0000, Maxim Konovalov wrote: > Hi Pedro, > > No, this is not right. Let me clarify: > > (1) I never told that there are any issues with the tests. I just > mumbled that the tests should catch such regression though I never > checked if they actually did. > > (2) The MAXPAYLOAD calculation in the code below is not fully correct. > > It should be > > 65535 - 20 (ip header) - 8 (icmp part) = 65507 without IP options > > OR > > 65535 - 20 (ip header) - 40 (ip options) - 8 (icmp part) = 65467 with > IP options, ie. whenever you run ping -R. > > The code below hardcoded the latter value which is simply wrong. > > I wouldn't rely on the fact that you get it from other BSD flavours > and would recommend to have this code reviewed before committing it. > > Maxim > -- Maxim Konovalov From nobody Fri Oct 18 20:21: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 4XVbhM5Ygbz5Ytj9; Fri, 18 Oct 2024 20:21:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVbhM529yz4GBh; Fri, 18 Oct 2024 20:21:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729282899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K0RfYxGaQmld7x94clsmPpKU0vhC5yGVp81uJ2AMKzQ=; b=dz4SCY7NnDnYIS4eZvWmh7yjsVB1SYtqEjviiEWP4NdOnmTI5DOAcYaLg3UX7zlCpoXAxM 0aJH6WyEPBFThVeHya3I8PZ6VAoTiIyF+twW46G8IY0NoWRpvTfFVWyZLVhoSjp92mQj3X mlvqNcpD6AT/+zq5ph2+lo2PxOjyF5Ay24mTEr+xvPjp5y3cPnrv2VMwqkGom+iRqtgRBb Xl1WXgjvDT2PDGRc1dfQzTVENXu+vG+j8Q3VI1powBj9bvOphkpxDkXCG1Y2Frj/qz62f8 p/HOlQMXMUSsxMDZ/yUGBkz0CVxRioRTD4IFNi9Pal0McedEAgy0q5+Y4/sCEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729282899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K0RfYxGaQmld7x94clsmPpKU0vhC5yGVp81uJ2AMKzQ=; b=EP4lxIi5gSwWV0bH8WBYGLoeMG1kmiYyTsgFUZVAC0wcHKy+KjDt52sswRZURXVLvQkDWI 4lOW8tThVng1fs3l5EZvPs9jd8WacQO+yn36IS/WJvf03y2bJEfeT92PK+tVgmcdXrhobz i69+gEPuOTPj3NQDrqcwVwI8J6GCnoknqH4nEf2RAPlsB6cbFmhV3XwjQBEUM9p9kxVszT IpXvNEWGyJfBNfWY5eth743Yyt6Tsefd7shDY8jbkqAwFNeft8trF+6kDbBhq57DRi3JWC tGTdvohj401np9xw2kdUVjNQ1va3qbsG1+tWilg8NzPXfAKa9eOu1Ys/XcaTfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729282899; a=rsa-sha256; cv=none; b=WATYfsSKhoLUmh42a4eyK9yGiHSCrmqCVKjC0LjzQrad6aOmwq8KseBPaNiOu9Nj/VBr9V ocJnTt3vCyC1BtAxR/Xl1ONHASyeh5XURLYHsDYCy/gPCBENHp4/jZHx7yb999ygxMr+yK e6K22796uZqxisNHR3t4UHsWo7L2NxA+FFf+a5b9uXVOa/H5BjSqPh2t3Cqw5ZAXOZwAFL Lb2PVyTN4fc7yTWu8szC3h4EKxtjlnIXM5PeaKBmYc7/iPKtFpERkKZhPPVx80IhbvOA+r WCeouiAhqNcDLij36JzNk8jYJ5UXqtjoS/1SfxR9s1RZjqx42/bGYMd0pPJGEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVbhM4dGtzndV; Fri, 18 Oct 2024 20:21:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IKLdfa074854; Fri, 18 Oct 2024 20:21:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IKLdwm074851; Fri, 18 Oct 2024 20:21:39 GMT (envelope-from git) Date: Fri, 18 Oct 2024 20:21:39 GMT Message-Id: <202410182021.49IKLdwm074851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 968bcca262a2 - main - libkldelf: add a private library for kernel/kld-related ELF parsing 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: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 968bcca262a2ea8025924fe10e449bf89caf74bc Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=968bcca262a2ea8025924fe10e449bf89caf74bc commit 968bcca262a2ea8025924fe10e449bf89caf74bc Author: Ka Ho Ng AuthorDate: 2024-10-08 04:24:07 +0000 Commit: Ka Ho Ng CommitDate: 2024-10-18 20:20:13 +0000 libkldelf: add a private library for kernel/kld-related ELF parsing The libkldelf library was originally a part of kldxref(8). It exposed ELF parsing helpers specialized in parsing KLDs and the kernel executable. The library can be used to read metadata such as linker_set, mod_depend, mod_version and PNP match info, and raw data from the ELF. To promote the reuse of the facilities the ELF parsing code is separated from kldxref(8) into a new private library. For now, libkldelf's source files will be compiled into kldxref(8) directly if kldxref is built during bootstrapping phase. The reason is linking kldxref(8) against the libkldelf static library has an unwanted side effect which renders the linker sets inside the libkldelf implementation empty if the static library is not build by ld -r all the .o files into a single .o before producing the static library. Sponsored by: Juniper Networks, Inc. Reviewed by: markj Suggested by: jrtc27, markj Differential Revision: https://reviews.freebsd.org/D46719 --- Makefile.inc1 | 11 +++++++-- lib/Makefile | 1 + lib/libkldelf/Makefile | 21 ++++++++++++++++ lib/libkldelf/Makefile.depend | 16 ++++++++++++ {usr.sbin/kldxref => lib/libkldelf}/ef.c | 2 +- {usr.sbin/kldxref => lib/libkldelf}/ef_aarch64.c | 2 +- {usr.sbin/kldxref => lib/libkldelf}/ef_amd64.c | 2 +- {usr.sbin/kldxref => lib/libkldelf}/ef_arm.c | 2 +- {usr.sbin/kldxref => lib/libkldelf}/ef_i386.c | 2 +- {usr.sbin/kldxref => lib/libkldelf}/ef_mips.c | 2 +- {usr.sbin/kldxref => lib/libkldelf}/ef_obj.c | 2 +- {usr.sbin/kldxref => lib/libkldelf}/ef_powerpc.c | 2 +- {usr.sbin/kldxref => lib/libkldelf}/ef_riscv.c | 2 +- {usr.sbin/kldxref => lib/libkldelf}/elf.c | 2 +- usr.sbin/kldxref/ef.h => lib/libkldelf/kldelf.h | 6 ++--- share/mk/src.libnames.mk | 2 ++ usr.sbin/kldxref/Makefile | 31 ++++++++++++++++++------ usr.sbin/kldxref/kldxref.c | 2 +- 18 files changed, 86 insertions(+), 24 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 55d49d5760f2..0a8895933bea 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2527,8 +2527,12 @@ ${_bt}-lib/libdwarf: ${_bt_m4_depend} _bt_libelf_depend=${_bt}-lib/libelf .endif +_libkldelf= lib/libkldelf +${_bt}-lib/libkldelf: ${_bt_libelf_depend} +_bt_libkldelf_depend=${_bt}-lib/libkldelf + _kldxref= usr.sbin/kldxref -${_bt}-usr.sbin/kldxref: ${_bt_libelf_depend} +${_bt}-usr.sbin/kldxref: ${_bt_libelf_depend} ${_bt_libkldelf_depend} # flua is required to regenerate syscall files. It first appeared during the # 13.0-CURRENT cycle, thus needs to be built on -older releases and stable @@ -2791,6 +2795,7 @@ bootstrap-tools: ${_bt}-links .PHONY ${_cat} \ ${_kbdcontrol} \ ${_elftoolchain_libs} \ + ${_libkldelf} \ ${_kldxref} \ lib/libopenbsd \ usr.bin/mandoc \ @@ -3234,7 +3239,8 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ lib/libfigpar \ ${_lib_libgssapi} \ lib/libjail \ - lib/libkiconv lib/libkvm lib/liblzma lib/libmd lib/libnv \ + lib/libkiconv lib/libkldelf lib/libkvm \ + lib/liblzma lib/libmd lib/libnv \ lib/libzstd \ ${_lib_casper} \ lib/ncurses/tinfo \ @@ -3269,6 +3275,7 @@ _prebuild_libs+= lib/libregex .endif lib/libgeom__L: lib/libexpat__L lib/libsbuf__L +lib/libkldelf__L: lib/libelf__L lib/libkvm__L: lib/libelf__L .if ${MK_RADIUS_SUPPORT} != "no" diff --git a/lib/Makefile b/lib/Makefile index 221eac74ee26..e4a4aa95a1ef 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -66,6 +66,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libiscsiutil \ libjail \ libkiconv \ + libkldelf \ libkvm \ liblua \ liblzma \ diff --git a/lib/libkldelf/Makefile b/lib/libkldelf/Makefile new file mode 100644 index 000000000000..0d1716f17fca --- /dev/null +++ b/lib/libkldelf/Makefile @@ -0,0 +1,21 @@ +.include + +PACKAGE= runtime +LIB= kldelf +PRIVATELIB= yes + +SRCS= ef.c \ + ef_obj.c \ + elf.c \ + ef_aarch64.c \ + ef_arm.c \ + ef_amd64.c \ + ef_i386.c \ + ef_mips.c \ + ef_powerpc.c \ + ef_riscv.c +WARNS?= 2 + +LIBADD= elf + +.include diff --git a/lib/libkldelf/Makefile.depend b/lib/libkldelf/Makefile.depend new file mode 100644 index 000000000000..b0aa274151ad --- /dev/null +++ b/lib/libkldelf/Makefile.depend @@ -0,0 +1,16 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libelf \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/kldxref/ef.c b/lib/libkldelf/ef.c similarity index 99% rename from usr.sbin/kldxref/ef.c rename to lib/libkldelf/ef.c index 975626e46046..052798ee31e4 100644 --- a/usr.sbin/kldxref/ef.c +++ b/lib/libkldelf/ef.c @@ -41,7 +41,7 @@ #include #include -#include "ef.h" +#include "kldelf.h" #define MAXSEGS 16 struct ef_file { diff --git a/usr.sbin/kldxref/ef_aarch64.c b/lib/libkldelf/ef_aarch64.c similarity index 99% rename from usr.sbin/kldxref/ef_aarch64.c rename to lib/libkldelf/ef_aarch64.c index b61de3b032ab..d2db29f22891 100644 --- a/usr.sbin/kldxref/ef_aarch64.c +++ b/lib/libkldelf/ef_aarch64.c @@ -31,7 +31,7 @@ #include #include -#include "ef.h" +#include "kldelf.h" /* * Apply relocations to the values obtained from the file. `relbase' is the diff --git a/usr.sbin/kldxref/ef_amd64.c b/lib/libkldelf/ef_amd64.c similarity index 99% rename from usr.sbin/kldxref/ef_amd64.c rename to lib/libkldelf/ef_amd64.c index fde032dcabc2..7295835f75b3 100644 --- a/usr.sbin/kldxref/ef_amd64.c +++ b/lib/libkldelf/ef_amd64.c @@ -33,7 +33,7 @@ #include #include -#include "ef.h" +#include "kldelf.h" /* * Apply relocations to the values obtained from the file. `relbase' is the diff --git a/usr.sbin/kldxref/ef_arm.c b/lib/libkldelf/ef_arm.c similarity index 99% rename from usr.sbin/kldxref/ef_arm.c rename to lib/libkldelf/ef_arm.c index cc5e265f821e..657294dc9fb0 100644 --- a/usr.sbin/kldxref/ef_arm.c +++ b/lib/libkldelf/ef_arm.c @@ -34,7 +34,7 @@ #include #include -#include "ef.h" +#include "kldelf.h" /* * Apply relocations to the values obtained from the file. `relbase' is the diff --git a/usr.sbin/kldxref/ef_i386.c b/lib/libkldelf/ef_i386.c similarity index 99% rename from usr.sbin/kldxref/ef_i386.c rename to lib/libkldelf/ef_i386.c index 962ed2bc0664..ae571e2d50f2 100644 --- a/usr.sbin/kldxref/ef_i386.c +++ b/lib/libkldelf/ef_i386.c @@ -33,7 +33,7 @@ #include #include -#include "ef.h" +#include "kldelf.h" /* * Apply relocations to the values obtained from the file. `relbase' is the diff --git a/usr.sbin/kldxref/ef_mips.c b/lib/libkldelf/ef_mips.c similarity index 99% rename from usr.sbin/kldxref/ef_mips.c rename to lib/libkldelf/ef_mips.c index e4aeedb5c08b..99790e11a9c3 100644 --- a/usr.sbin/kldxref/ef_mips.c +++ b/lib/libkldelf/ef_mips.c @@ -36,7 +36,7 @@ #include #include -#include "ef.h" +#include "kldelf.h" /* * Apply relocations to the values obtained from the file. `relbase' is the diff --git a/usr.sbin/kldxref/ef_obj.c b/lib/libkldelf/ef_obj.c similarity index 99% rename from usr.sbin/kldxref/ef_obj.c rename to lib/libkldelf/ef_obj.c index ac83137cd394..e09bd036b71e 100644 --- a/usr.sbin/kldxref/ef_obj.c +++ b/lib/libkldelf/ef_obj.c @@ -43,7 +43,7 @@ #include #include -#include "ef.h" +#include "kldelf.h" typedef struct { GElf_Addr addr; diff --git a/usr.sbin/kldxref/ef_powerpc.c b/lib/libkldelf/ef_powerpc.c similarity index 99% rename from usr.sbin/kldxref/ef_powerpc.c rename to lib/libkldelf/ef_powerpc.c index f72cc1d85e20..33f09c0d69ef 100644 --- a/usr.sbin/kldxref/ef_powerpc.c +++ b/lib/libkldelf/ef_powerpc.c @@ -33,7 +33,7 @@ #include #include -#include "ef.h" +#include "kldelf.h" /* * Apply relocations to the values obtained from the file. `relbase' is the diff --git a/usr.sbin/kldxref/ef_riscv.c b/lib/libkldelf/ef_riscv.c similarity index 99% rename from usr.sbin/kldxref/ef_riscv.c rename to lib/libkldelf/ef_riscv.c index 46b9b66bee58..bda04bb2c39a 100644 --- a/usr.sbin/kldxref/ef_riscv.c +++ b/lib/libkldelf/ef_riscv.c @@ -36,7 +36,7 @@ #include #include -#include "ef.h" +#include "kldelf.h" /* * Apply relocations to the values obtained from the file. `relbase' is the diff --git a/usr.sbin/kldxref/elf.c b/lib/libkldelf/elf.c similarity index 99% rename from usr.sbin/kldxref/elf.c rename to lib/libkldelf/elf.c index f98c39b69c0b..da319ffc6c98 100644 --- a/usr.sbin/kldxref/elf.c +++ b/lib/libkldelf/elf.c @@ -44,7 +44,7 @@ #include #include -#include "ef.h" +#include "kldelf.h" SET_DECLARE(elf_reloc, struct elf_reloc_data); diff --git a/usr.sbin/kldxref/ef.h b/lib/libkldelf/kldelf.h similarity index 99% rename from usr.sbin/kldxref/ef.h rename to lib/libkldelf/kldelf.h index 9d3dc1b1b435..e0a8cc627ff2 100644 --- a/usr.sbin/kldxref/ef.h +++ b/lib/libkldelf/kldelf.h @@ -32,8 +32,8 @@ * SUCH DAMAGE. */ -#ifndef _EF_H_ -#define _EF_H_ +#ifndef _KLDELF_H_ +#define _KLDELF_H_ #include #include @@ -312,4 +312,4 @@ int elf_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, __END_DECLS -#endif /* _EF_H_*/ +#endif /* _KLDELF_H_*/ diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 1e0a04e83fe3..092e1b444beb 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -27,6 +27,7 @@ _PRIVATELIBS= \ gtest_main \ heimipcc \ heimipcs \ + kldelf \ ldns \ sqlite3 \ ssh \ @@ -312,6 +313,7 @@ _DP_bsnmp= crypto .endif _DP_geom= bsdxml sbuf _DP_cam= sbuf +_DP_kldelf= elf _DP_kvm= elf _DP_casper= nv _DP_cap_dns= nv diff --git a/usr.sbin/kldxref/Makefile b/usr.sbin/kldxref/Makefile index fc9b0b4215fc..ab7b373a45cc 100644 --- a/usr.sbin/kldxref/Makefile +++ b/usr.sbin/kldxref/Makefile @@ -1,17 +1,32 @@ PACKAGE= runtime PROG= kldxref MAN= kldxref.8 -SRCS= kldxref.c ef.c ef_obj.c elf.c -SRCS+= ef_aarch64.c \ - ef_arm.c \ - ef_amd64.c \ - ef_i386.c \ - ef_mips.c \ - ef_powerpc.c \ - ef_riscv.c +SRCS= kldxref.c + +CFLAGS+=-I${SRCTOP}/lib/libkldelf WARNS?= 2 LIBADD= elf +.if defined(BOOTSTRAPPING) +# +# XXX: Fix libprivatelibkldelf.a linker set issue before removing this block +# +.PATH: ${SRCTOP}/lib/libkldelf +KLDELF_SRCS= ef.c \ + ef_obj.c \ + elf.c \ + ef_aarch64.c \ + ef_arm.c \ + ef_amd64.c \ + ef_i386.c \ + ef_mips.c \ + ef_powerpc.c \ + ef_riscv.c +SRCS+= ${KLDELF_SRCS} +.else +LIBADD+= kldelf +.endif + .include diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c index 6bb0469a9ff5..eed754e1e730 100644 --- a/usr.sbin/kldxref/kldxref.c +++ b/usr.sbin/kldxref/kldxref.c @@ -51,7 +51,7 @@ #include #include -#include "ef.h" +#include #define MAXRECSIZE (64 << 10) /* 64k */ #define check(val) if ((error = (val)) != 0) break From nobody Fri Oct 18 20:21: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 4XVbhN6sSSz5Yv4y; Fri, 18 Oct 2024 20:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVbhN5jZgz4GRB; Fri, 18 Oct 2024 20:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729282900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pGMjfmPwSGAkIrxyO9rMeBjG3vc0oweTSx20RkgQMyA=; b=EVHCzXdsKDG2+5fm9XS+a3fhEefJJVDxzv55BGBT8rmWSnRF01da+w+Z3by04gAWo50WNM lrrT2+RP1l1Yx4ryGSUZXL712iolyWcBg8ZLt/15WUqLYpZYNlNzF6QJsoPYRE3RUuZFIq cNpf9M2iwH7X1579T8atmmm9IO1TLnbqsu0TamwQjEQ2WxjOxBNLvjg6ZRvZ0TsncvFJbN 5PX9dcE3DW0hWo2Bi/s6Ue3gYCN9dsSb5+Nr8dFQOy9tAdTYH4Io+BF/KIAKN3tkrSWcER q/d54KLXNCzsBAXC1ETGs2YiGteqV7w3Ge1eAMeB6cqSvJ5ippzWSzjp/Tjl7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729282900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pGMjfmPwSGAkIrxyO9rMeBjG3vc0oweTSx20RkgQMyA=; b=l0DG/g8Y2+pYMkQtMxeGq7BGt38tQn2sXFjEzzR4XsmUGFb4aFt0ZjvYscMkyLfuENh0/3 eXcLq7qBhazaOWbluTc6hTSf/bUPfuTABgGm4FLgPciN77byYEnzgmcjjfOKEkBU0v6oNY WTrkS7ImxJg1SLhyhc5y77PvwVIsDkoF4GljfMVT31WhHqDOzOcLqLIbo30+L01BmugPy0 wiwOfZouPczrndq0Gcp1mfL+rmqhI1zHkW5hfQKgY4C5IW7yMPwsS+s2qt2wkaj7ZR6y2a /b4K3Y6t+yj35pIVO0K2MpQrPczBBPif7BoQFNhCXQbGe+L8BTv8h6xyLeiNnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729282900; a=rsa-sha256; cv=none; b=T0vo2ZcXMgVdgIW0rnuBiZDqut7mnbPE/bS48uiG0sCUmaBAAK4TawtgyfLz0UywHIbGKF fDVsUdtO3xmKgtRAudlnEtVM4FVm7xmkEovC1hJtWjnCGqq5Zx3wBKfiF7lybhlvDNIfct J8TmiBX6wLlBBQD3M3xBjlJT4Yr+1XFJzlkNYQUDv00TQHItVBtXpe/T9tM5+FtHv1CvkO AesU75WiUPonJNI3uc0xXGK10TaUBV1HEgDDCgF6L3/9fm8idSeo0muGOJcHZ8VxNHV3MG L3XlW7qWRaGYV+BUkPa5ETeHAQn0jXbsDjVB6jWz7zeqQTqKpAQnumEdvhTJ3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVbhN5K90zndW; Fri, 18 Oct 2024 20:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IKLeo3074897; Fri, 18 Oct 2024 20:21:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IKLe0C074894; Fri, 18 Oct 2024 20:21:40 GMT (envelope-from git) Date: Fri, 18 Oct 2024 20:21:40 GMT Message-Id: <202410182021.49IKLe0C074894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 43628a31e3a2 - main - libkldelf: add elf_lookup_symbol function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43628a31e3a22e1ea9e2936bdcb07ecbd72aaa5f Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=43628a31e3a22e1ea9e2936bdcb07ecbd72aaa5f commit 43628a31e3a22e1ea9e2936bdcb07ecbd72aaa5f Author: Ka Ho Ng AuthorDate: 2024-10-08 04:24:37 +0000 Commit: Ka Ho Ng CommitDate: 2024-10-18 20:21:44 +0000 libkldelf: add elf_lookup_symbol function The elf_lookup_symbol function looks up the symbol with a given symbol name. A pointer to the GElf_Sym of the symbol is returned if the symbol exists in the opened ELF file. Sponsored by: Juniper Networks, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46764 --- lib/libkldelf/ef.c | 1 + lib/libkldelf/ef_obj.c | 1 + lib/libkldelf/elf.c | 6 ++++++ lib/libkldelf/kldelf.h | 13 +++++++++++++ 4 files changed, 21 insertions(+) diff --git a/lib/libkldelf/ef.c b/lib/libkldelf/ef.c index 052798ee31e4..dcd87fe2bf83 100644 --- a/lib/libkldelf/ef.c +++ b/lib/libkldelf/ef.c @@ -89,6 +89,7 @@ static struct elf_file_ops ef_file_ops = { .seg_read_string = ef_seg_read_string, .symaddr = ef_symaddr, .lookup_set = ef_lookup_set, + .lookup_symbol = ef_lookup_symbol, }; static void diff --git a/lib/libkldelf/ef_obj.c b/lib/libkldelf/ef_obj.c index e09bd036b71e..32a7c17127ed 100644 --- a/lib/libkldelf/ef_obj.c +++ b/lib/libkldelf/ef_obj.c @@ -109,6 +109,7 @@ static struct elf_file_ops ef_obj_file_ops = { .seg_read_string = ef_obj_seg_read_string, .symaddr = ef_obj_symaddr, .lookup_set = ef_obj_lookup_set, + .lookup_symbol = ef_obj_lookup_symbol, }; static GElf_Off diff --git a/lib/libkldelf/elf.c b/lib/libkldelf/elf.c index da319ffc6c98..8af02622de13 100644 --- a/lib/libkldelf/elf.c +++ b/lib/libkldelf/elf.c @@ -686,3 +686,9 @@ elf_reloc(struct elf_file *efile, const void *reldata, Elf_Type reltype, return (efile->ef_reloc(efile, reldata, reltype, relbase, dataoff, len, dest)); } + +int +elf_lookup_symbol(struct elf_file *efile, const char *name, GElf_Sym **sym) +{ + return (EF_LOOKUP_SYMBOL(efile, name, sym)); +} diff --git a/lib/libkldelf/kldelf.h b/lib/libkldelf/kldelf.h index e0a8cc627ff2..71de31a94291 100644 --- a/lib/libkldelf/kldelf.h +++ b/lib/libkldelf/kldelf.h @@ -48,6 +48,8 @@ (ef)->ef_ops->symaddr((ef)->ef_ef, symidx) #define EF_LOOKUP_SET(ef, name, startp, stopp, countp) \ (ef)->ef_ops->lookup_set((ef)->ef_ef, name, startp, stopp, countp) +#define EF_LOOKUP_SYMBOL(ef, name, sym) \ + (ef)->ef_ops->lookup_symbol((ef)->ef_ef, name, sym) /* XXX, should have a different name. */ typedef struct ef_file *elf_file_t; @@ -67,6 +69,7 @@ struct elf_file_ops { GElf_Addr (*symaddr)(elf_file_t ef, GElf_Size symidx); int (*lookup_set)(elf_file_t ef, const char *name, GElf_Addr *startp, GElf_Addr *stopp, long *countp); + int (*lookup_symbol)(elf_file_t ef, const char *name, GElf_Sym **sym); }; typedef int (elf_reloc_t)(struct elf_file *ef, const void *reldata, @@ -310,6 +313,16 @@ int elf_read_mod_pnp_match_info(struct elf_file *efile, GElf_Addr addr, int elf_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest); +/* + * Find the symbol with the specified symbol name 'name' within the given + * 'efile'. 0 is returned when such a symbol is found, otherwise ENOENT is + * returned. + * + * XXX: This only return the first symbol being found when traversing symtab. + */ +int elf_lookup_symbol(struct elf_file *efile, const char *name, + GElf_Sym **sym); + __END_DECLS #endif /* _KLDELF_H_*/ From nobody Fri Oct 18 20:21: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 4XVbhQ2syKz5YtxD; Fri, 18 Oct 2024 20:21:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVbhP6ygYz4GTX; Fri, 18 Oct 2024 20:21:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729282902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4K45XHtwOkawxg44j2fRDeZwkdd7OtT+Utvyy4qc6g=; b=c07niiXGzEOeGJcwlh5CetztlXEpiOoR0cP7iaqY/+M8hQJjnhiwoLoQVVMaKulGH0eJI7 P6tHuJOvEDTbpoFS1aB0y1uGpt4GXI9v3LIu54ltpt8aoVZ5cv4y5iIf74BtUDxG1F67G9 VP5n7CD+buHka678dsKY2D5flZOTw5/Xz1EFSt73XqGULTGh8kwjl4ILMaizwtdQ124Hdr b9UldCkvmlMCWQKYz0Pyw39HPhU1N4CCaRMlZ+PZ7XqtYZCQazEGuKe8peouiPjdPM2HsH YprmirpxUOrvuiywk8YfMGBlZRj4Ilsq6YQaCy8aI/WK+9EfE9/QI/OmmRzkjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729282902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4K45XHtwOkawxg44j2fRDeZwkdd7OtT+Utvyy4qc6g=; b=mdu/ukTGgOlaa+urEBIBx4uJYn5P/sesXktSgVsgiDBv5FM073zRZ4cbYaOEaD8JmnQTHs W30MCx5Zbfew6hqJi9P9uYM7VZ7BxTqqgikQAyMGKHDttdx+eEDP3xbPbNDpXPAmqjsb6N TbqcMpdw65174QMY3w/QG7vOGmvECOUkHTU45BoFS4KMkxC0w0vWhVp9i8mYUL4ZEX6qbX QzUkPlxGAQhuAHxwDie9KbRlOqHDMacNsQpPHHdRYxVQ79TfbxAGmDYsuPSMNvcYUnLFqr BGpwIAfraqRNJlTt/uMOT+kTNqFXX4b0mw8m+g3ad6H31I+aNBNklBVq4jRnNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729282902; a=rsa-sha256; cv=none; b=hkAcFlIPdEzCmAKQcccVsJqBIiZ6iCHIZBrxJ5SuKloTx3aCeAdvAnukkUqKqIcHwwKaUT TuIbRYLqi7IvR7ULxWNi+Z3vCJ3j/TEdy9x3F7nQ1z86N5ObXnIWX8NuyjyPivF6R1lmUV aC8X+37P3JDSe+90C1e4itcexu/NvdT8MP9ps3kEabHWZ/vABZe1Sc8JQByVy98v3ZiTRs kwps6+bmXUnVwl4NmxQOuYolLC+ntDrCkJHvgErzEk6zIQzftt+feKr3XlnT9dDgRWK49h 05nDGYivEk3mMN4ue53Td26cuupIbMnGftF0cJ9XMnYo4wgbtgHAGJNgQBOZcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVbhP6LVzznb9; Fri, 18 Oct 2024 20:21:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IKLfuY074945; Fri, 18 Oct 2024 20:21:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IKLftv074942; Fri, 18 Oct 2024 20:21:41 GMT (envelope-from git) Date: Fri, 18 Oct 2024 20:21:41 GMT Message-Id: <202410182021.49IKLftv074942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 599c4399e9b8 - main - libkldelf: use warnx instead of printf 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: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 599c4399e9b8e5db10dcdd949da96ff2b12b70cf Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=599c4399e9b8e5db10dcdd949da96ff2b12b70cf commit 599c4399e9b8e5db10dcdd949da96ff2b12b70cf Author: Ka Ho Ng AuthorDate: 2024-10-08 04:25:36 +0000 Commit: Ka Ho Ng CommitDate: 2024-10-18 20:21:44 +0000 libkldelf: use warnx instead of printf Sponsored by: Juniper Networks, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46893 --- lib/libkldelf/ef_obj.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libkldelf/ef_obj.c b/lib/libkldelf/ef_obj.c index 32a7c17127ed..30e0d7886995 100644 --- a/lib/libkldelf/ef_obj.c +++ b/lib/libkldelf/ef_obj.c @@ -345,20 +345,20 @@ ef_obj_open(struct elf_file *efile, int verbose) if ((ef->nprogtab != 0 && ef->progtab == NULL) || (ef->nrel != 0 && ef->reltab == NULL) || (ef->nrela != 0 && ef->relatab == NULL)) { - printf("malloc failed\n"); + warnx("malloc failed"); error = ENOMEM; goto out; } if (elf_read_symbols(efile, symtabindex, &ef->ddbsymcnt, &ef->ddbsymtab) != 0) { - printf("elf_read_symbols failed\n"); + warnx("elf_read_symbols failed"); goto out; } if (elf_read_string_table(efile, &shdr[symstrindex], &ef->ddbstrcnt, &ef->ddbstrtab) != 0) { - printf("elf_read_string_table failed\n"); + warnx("elf_read_string_table failed"); goto out; } @@ -367,7 +367,7 @@ ef_obj_open(struct elf_file *efile, int verbose) shdr[hdr->e_shstrndx].sh_type == SHT_STRTAB) { if (elf_read_string_table(efile, &shdr[hdr->e_shstrndx], &ef->shstrcnt, &ef->shstrtab) != 0) { - printf("elf_read_string_table failed\n"); + warnx("elf_read_string_table failed"); goto out; } } @@ -413,7 +413,7 @@ ef_obj_open(struct elf_file *efile, int verbose) ef->reltab[rl].sec = shdr[i].sh_info; if (elf_read_rel(efile, i, &ef->reltab[rl].nrel, &ef->reltab[rl].rel) != 0) { - printf("elf_read_rel failed\n"); + warnx("elf_read_rel failed"); goto out; } rl++; @@ -422,7 +422,7 @@ ef_obj_open(struct elf_file *efile, int verbose) ef->relatab[ra].sec = shdr[i].sh_info; if (elf_read_rela(efile, i, &ef->relatab[ra].nrela, &ef->relatab[ra].rela) != 0) { - printf("elf_read_rela failed\n"); + warnx("elf_read_rela failed"); goto out; } ra++; From nobody Fri Oct 18 20:31: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 4XVbvF5xqFz5Yvmr; Fri, 18 Oct 2024 20:31:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVbvF3GF7z4Hyj; Fri, 18 Oct 2024 20:31:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729283465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bIKaz8V01IK4PvzkN5Lgczu6lbkKfi/s3Z5p1cYZ9j0=; b=hAIb56wTqvceqSb0fGLtobn3ut84EDRw3vn/Wxed8tV1gCgOHxd6MRIZ15aI0cRH2AydJd kts6lOGROJkR12B4QbLURbO5zbn0C5NhvbOgl/HurF11Rzq2mH46Z0uRKM0B8M65plJ8eP WLWllIkVqgR6pG/7qecUoWQsyY0R0aBf5RgzIltayRT3sXdXMylUgiR0tGAQe2LugzZlPg PVhTORKg6KOi9+it4AEL3yAUB6aFh8MtVqyedlWfqKsMPIiyXEsMotnsYc9jOoCX4KZKL/ uozWkLCoOEHXqo4dSWVri9LCTuecU3f/NRbD9VqgvFtxO4nhFJ2ZAFBx0k8m6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729283465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bIKaz8V01IK4PvzkN5Lgczu6lbkKfi/s3Z5p1cYZ9j0=; b=M2KP1aFrS50cSUeKgaKFcgESd/DfPddomAT+CPijyJmHefun0RkuVxDzJO6iQsQs8L1FUY cf9ckeYi4D7KySo0xYxFaRuX4EtY7XopVOfvTyt+RGltVZTe2RBGkKgXSWmXzgWMs3EQ7N 0IoKqC82UeWWfuwb3mpAHLhmbzoe9bXEe2WtnBxJFmIvzDtyJ7HLaSZdzsudlX43xucEi3 puzi3CaKRYg6hLiAdMYnHQ1MEB5v9vW9FYqpV6pxcV7QZxygj2JjR4j2E19dm4zOC3vJ+y 3BWnqOFCP6g2QC+zwplyQjBjmtzcoU0TCRcfqkKOUwf8vA4HyLOEHm8MCq/cLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729283465; a=rsa-sha256; cv=none; b=mxtvnjSN6wq92F6W/UfL9gw7IIYagZuvGGjITOy5199SNqjgWii+8Rs+D1up+mwhrwT7P7 gTXbW8t3kffbIEx9xKI0YgDa/qMQFYipmpSy14oJTD3oBnYZ4Asq7Ihvs8wYJDK2+AUyRr Fd2r2Ve6ngqdnrMd6tey5n31FRwa++Hg4DuhT7NcTgLHSvQ5muPfItV3Sm69kcKoKtFYq4 bJSryi9tUGOtXuF+/45BpJqkwdqxxgIEjXJIIIqehbrUJxTU8wizCh1pDvCxwCxE48JIsI B+JuqbKtMZu3enzOiNgMn9sKODqAQ7VlChZprTYM+4yz7T3kQNKvEsEeKedaLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVbvF2tH1zpDB; Fri, 18 Oct 2024 20:31:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IKV5p4087227; Fri, 18 Oct 2024 20:31:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IKV5so087224; Fri, 18 Oct 2024 20:31:05 GMT (envelope-from git) Date: Fri, 18 Oct 2024 20:31:05 GMT Message-Id: <202410182031.49IKV5so087224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: b75e32a466db - main - ipmi: fix powerpc build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b75e32a466dbab7a6729ff7a6472c6f9c9207491 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b75e32a466dbab7a6729ff7a6472c6f9c9207491 commit b75e32a466dbab7a6729ff7a6472c6f9c9207491 Author: Gleb Smirnoff AuthorDate: 2024-10-18 20:30:02 +0000 Commit: Gleb Smirnoff CommitDate: 2024-10-18 20:30:44 +0000 ipmi: fix powerpc build Fixes: 366d6a424e1faad9c151c5794978e218a79fbed8 --- sys/dev/ipmi/ipmi_opal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/ipmi/ipmi_opal.c b/sys/dev/ipmi/ipmi_opal.c index ab0f14e8b3a8..ae7583a0d749 100644 --- a/sys/dev/ipmi/ipmi_opal.c +++ b/sys/dev/ipmi/ipmi_opal.c @@ -142,7 +142,8 @@ opal_ipmi_discard_msgs(struct opal_ipmi_softc *sc) } static int -opal_ipmi_polled_request(struct opal_ipmi_softc *sc, struct ipmi_request *req) +opal_ipmi_polled_request(struct opal_ipmi_softc *sc, struct ipmi_request *req, + int timo) { uint64_t msg_len; int err; @@ -191,7 +192,7 @@ opal_ipmi_polled_request(struct opal_ipmi_softc *sc, struct ipmi_request *req) goto out; } - if ((err = opal_ipmi_recv(sc, &msg_len, 0)) == 0) { + if ((err = opal_ipmi_recv(sc, &msg_len, timo)) == 0) { /* Subtract one extra for the completion code. */ req->ir_replylen = msg_len - sizeof(struct opal_ipmi_msg) - 1; req->ir_replylen = min(req->ir_replylen, req->ir_replybuflen); @@ -254,7 +255,7 @@ opal_ipmi_driver_request(struct ipmi_softc *isc, struct ipmi_request *req) for (i = 0; i < 3; i++) { IPMI_LOCK(&sc->ipmi); - err = opal_ipmi_polled_request(sc, req); + err = opal_ipmi_polled_request(sc, req, 0); IPMI_UNLOCK(&sc->ipmi); if (err == 0) break; From nobody Fri Oct 18 20:39:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVc5V2n1dz5Yw4h; Fri, 18 Oct 2024 20:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVc5V2C67z4Jjv; Fri, 18 Oct 2024 20:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729283998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3tBVJ0s92yF7iXkghN0a+bzdwPRaPVTDEGVNkAEAWsM=; b=GhlPcXZkGvAPE9jc64sy9vs4mxnDRyms22KIefg29sfdYqmXSD2uGroJj3MnbceXaaXBdb 9YtgkZenR09jyZGJfq9rvcxGLNuCwIRhJSnJDSVi5kk5m7/1gqcwiz59XLBqsi8VJZAKvO nr+Tz3SKQPuCjNxlfhhCG/QV/rTpILnD2fcr3K8QHEQc6hQERwrNeoL31gk+L4g/oXQxc4 0CYbE8k5SIfB57Jhamzn9lkf3a2bvEeroOkVglbU9o3RTzTHqCl1fSMO4kS7bbbM/oN7X6 x29tdlXM0NcG5EIttrb9P7JtzS/zHxkeZdqodPIrWU/kLppP9jt2W/KDkt0cxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729283998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3tBVJ0s92yF7iXkghN0a+bzdwPRaPVTDEGVNkAEAWsM=; b=d/AyyDgAYcjlsgCIuPPWekPJqU076DApvz1f7jkx931azC7uNWaBbMus++EAfj+Ay2DnD2 FhL2WW1xTJsOgMNj1vtA3i8wT7lXNJhcklY4vtEsBaB661NmibBRBNkt5f8Np0uG+DgwlJ dvLPqR86M2k8UERN8FudHHoPD2fp3mrlS2aA3Xk7SvFPBZFbrOurMVYNr+5xGSVaa4+Gse D0UmngrBaln7ktseuoIk4MpPUsc1dLtFuJ6qk134gPNR76uWDio1MEJxaRRCmT40KCpZlv FfNOucfWurTMAYoMylNTM2r7GmYwfHtaoZUZBDVnNF+JtCUcLV/7ogFVy38nLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729283998; a=rsa-sha256; cv=none; b=F3/BIeRWZRPTuaBlCr1LowZGHsDCs/fLwAl/vR849oJGztPxPvpnXnI6NTSIjIMFots0/p /6nmcd39kSa7khEl1ZpcusSzelvFcllDaaLoZhr4L77MIgarGWYnT40gRI38kmjjrgPcWF 1dtt/dnC6KJQUoeZQqKxpQ2NZyWNgFhI5Tfm2AktzISd1C4WbgmYDF14bTzIwhah2Lk08I vvvHl2jStXXLqTHZbPpB6Wo23GY1DMm3uTqK8QyrxSn3Wp2F2WDm+5hnmG65pDFV1luhRn FswqmM23XQvEPa6fnljbiuth75KptPxTp68fbkLXc5gVEj/eooOIsWLGyBCANg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVc5V1nt8zp5n; Fri, 18 Oct 2024 20:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IKdw8f094184; Fri, 18 Oct 2024 20:39:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IKdwFQ094181; Fri, 18 Oct 2024 20:39:58 GMT (envelope-from git) Date: Fri, 18 Oct 2024 20:39:58 GMT Message-Id: <202410182039.49IKdwFQ094181@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 0bdf2535d4f8 - main - tools/build/cross-build: Don't include sys/uio.h from linux limits.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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0bdf2535d4f8a571cb6d230f2f19eb20a452a4f8 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=0bdf2535d4f8a571cb6d230f2f19eb20a452a4f8 commit 0bdf2535d4f8a571cb6d230f2f19eb20a452a4f8 Author: Jessica Clarke AuthorDate: 2024-10-18 20:39:37 +0000 Commit: Jessica Clarke CommitDate: 2024-10-18 20:39:37 +0000 tools/build/cross-build: Don't include sys/uio.h from linux limits.h This creates a circular dependency for OpenZFS's libspl in sys/uio.h, and it shouldn't be needed since the system limits.h already defines IOV_MAX, so delete it, and unconditionally assert that to be the case. Otherwise the re-include of libspl's sys/uio.h tries to use PAGESIZE before it has been defined by OpenZFS's own sys/param.h. Fixes: 7a7741af18d6 ("zfs: merge openzfs/zfs@b10992582") MFC after: 1 week --- tools/build/cross-build/include/linux/limits.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/build/cross-build/include/linux/limits.h b/tools/build/cross-build/include/linux/limits.h index 5eca34b1120c..4631cabb1104 100644 --- a/tools/build/cross-build/include/linux/limits.h +++ b/tools/build/cross-build/include/linux/limits.h @@ -45,13 +45,11 @@ #if !defined(_GNU_SOURCE) #warning "Attempting to use limits.h with -std=c89/without _GNU_SOURCE, many macros will be missing" #endif +#endif /* C89 */ -#else /* Not C89 */ -/* Not C89 -> check that all macros that we expect are defined */ #ifndef IOV_MAX #error IOV_MAX should be defined #endif -#endif /* C89 */ #ifndef MAXBSIZE #define MAXBSIZE 65536 /* must be power of 2 */ @@ -83,7 +81,6 @@ #endif #include -#include /* For IOV_MAX */ /* Sanity checks for glibc */ #ifndef _GNU_SOURCE From nobody Fri Oct 18 20:53: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 4XVcPH1p7gz5Yx27; Fri, 18 Oct 2024 20:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVcPH1JFWz4Kyr; Fri, 18 Oct 2024 20:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729284819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xYSXn9MFmytPAximTuXLnYxBMC9GgZZs95aSKXpMSIQ=; b=s3lpITpvRn0lZaq6MKC+CAh1UOdoSOVYdICttv/9JUElr4nL70JQyAjj6lS459wkenWGID IYMYGnHMfQ9ghxVOsT5dkbwdS/Z+8t9VxOcGpufm1Ef170POM/+y7i1Rez2qg3nMqtIawf ojf6ThIKZ/r7kHujNt/XMlCQhBXUCDT8kVhQqbENXyv/zV8NGCCIBhbw1m7Ud14WRK3RZu XNUWME1BZ16nzTjd3MCxWG3BatZLZXb9zGor07PySMUiZKKDgYo6k1EMw3UJ+ygJK/KBdb MtcZ2zgjgIBlYSO/6WqkSZT9F6VSrNj8kFMVm5rWjiPHZpbWpjdPtYpBh0puCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729284819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xYSXn9MFmytPAximTuXLnYxBMC9GgZZs95aSKXpMSIQ=; b=c5AP26uJt1+is3q6jicHEd3QE/eR6bp+V0JiELByyDkDV3Caxis6My8broQ2nt7Fl3ou8R DiE5B6Or9LSL/+0aEjryVfXT8PVOHGRJ0JnCtiSOMNYnQsh6iEqZATkOuBo6sZltg/u04b aZPcsgVQD7pexLwj63hUomgXsiIiDVCEXFkLlPAS3IyaV1LHDapLPiYWLYf1jxSMHlU+PO wY/ZJd+NPepSOSbJ5XPxLqyza7gvdr6J2UUMRGCnA3ejPBqdkqgWCMau0bYIKkxHrFBETu awG7hlCOtLeTc1eqMzPYUBfxJSFV7BDLtxvSoIxUBu6rn8HSWKVTjspFRKcW5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729284819; a=rsa-sha256; cv=none; b=nTSf/9R619UbnDFWynX+NK1hiV20e67QbqweUNKdWI2KLsjKOUAkDcNe6lhQghiDYicdfa wgjJsz8sPiaH/GR5EYZhW8TE3SJ4grvuH7BxhCuSCvDSZ6gXKLwZA8kjsY+p42YmFw2QIR ibtCJYw3L1jpMRNWvYLxzd6qhor9vjhbTWRs0TgPm/Tpm1vdhiRkTISFyXdJDdcn4H3G/2 H4/dL+N/4RTTGjQxEEr8JYBEdod1ZioQJZOCqTB6XF9xda5te3rZ2564sVC0+QMri0oIet lykZ0ghekKhC2TaJHzIBE/TPR5OsLONfb8BCipe3mqk30Q9m0qjyvi3x06mDMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVcPH0tjhzpcx; Fri, 18 Oct 2024 20:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IKrdGS026590; Fri, 18 Oct 2024 20:53:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IKrdm4026587; Fri, 18 Oct 2024 20:53:39 GMT (envelope-from git) Date: Fri, 18 Oct 2024 20:53:39 GMT Message-Id: <202410182053.49IKrdm4026587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 83069000750d - main - cross-build: fix missing the proper way List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83069000750d0517a329caf7d519cadf270ba5f7 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=83069000750d0517a329caf7d519cadf270ba5f7 commit 83069000750d0517a329caf7d519cadf270ba5f7 Author: Kyle Evans AuthorDate: 2024-10-18 20:44:15 +0000 Commit: Kyle Evans CommitDate: 2024-10-18 20:53:15 +0000 cross-build: fix missing the proper way Add it to tools/build/Makefile with a short note of where it's needed, rather than hamfistedly copying it into the tools/build hierarchy. Reported by: jrtc27 Reviewed by: jrtc27 Fixes: aad507854efd13c43 ("Fix the cross-build after recent commits") Differential Revision: https://reviews.freebsd.org/D46854 --- tools/build/Makefile | 4 ++ tools/build/cross-build/include/common/sys/md4.h | 91 ------------------------ 2 files changed, 4 insertions(+), 91 deletions(-) diff --git a/tools/build/Makefile b/tools/build/Makefile index 9e9d203f108b..faf130f3d99c 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -304,6 +304,10 @@ SYSINCS+= ${SRCTOP}/sys/sys/ctf.h SYSINCS+= ${SRCTOP}/sys/sys/kbio.h # for kldxref: SYSINCS+= ${SRCTOP}/sys/sys/module.h +.if ${.MAKE.OS} != "FreeBSD" +# for libmd: +SYSINCS+= ${SRCTOP}/sys/sys/md4.h +.endif # We want to run the build with only ${WORLDTMP} in $PATH to ensure we don't # accidentally run tools that are incompatible but happen to be in $PATH. diff --git a/tools/build/cross-build/include/common/sys/md4.h b/tools/build/cross-build/include/common/sys/md4.h deleted file mode 100644 index e00675e9f462..000000000000 --- a/tools/build/cross-build/include/common/sys/md4.h +++ /dev/null @@ -1,91 +0,0 @@ -/* MD4.H - header file for MD4C.C - */ - -/*- - SPDX-License-Identifier: RSA-MD - - Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD4 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD4 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ - -#ifndef _SYS_MD4_H_ -#define _SYS_MD4_H_ -/* MD4 context. */ -typedef struct MD4Context { - u_int32_t state[4]; /* state (ABCD) */ - u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ - unsigned char buffer[64]; /* input buffer */ -} MD4_CTX; - -#include - -#ifndef _KERNEL - -/* Ensure libmd symbols do not clash with libcrypto */ - -#ifndef MD4Init -#define MD4Init _libmd_MD4Init -#endif -#ifndef MD4Update -#define MD4Update _libmd_MD4Update -#endif -#ifndef MD4Pad -#define MD4Pad _libmd_MD4Pad -#endif -#ifndef MD4Final -#define MD4Final _libmd_MD4Final -#endif -#ifndef MD4End -#define MD4End _libmd_MD4End -#endif -#ifndef MD4Fd -#define MD4Fd _libmd_MD4Fd -#endif -#ifndef MD4FdChunk -#define MD4FdChunk _libmd_MD4FdChunk -#endif -#ifndef MD4File -#define MD4File _libmd_MD4File -#endif -#ifndef MD4FileChunk -#define MD4FileChunk _libmd_MD4FileChunk -#endif -#ifndef MD4Data -#define MD4Data _libmd_MD4Data -#endif - -#endif - -__BEGIN_DECLS -void MD4Init(MD4_CTX *); -void MD4Update(MD4_CTX *, const unsigned char *, unsigned int); -void MD4Pad(MD4_CTX *); -void MD4Final(unsigned char [__min_size(16)], MD4_CTX *); -#ifndef _KERNEL -char * MD4End(MD4_CTX *, char *); -char * MD4Fd(int, char *); -char * MD4FdChunk(int, char *, off_t, off_t); -char * MD4File(const char *, char *); -char * MD4FileChunk(const char *, char *, off_t, off_t); -char * MD4Data(const void *, unsigned int, char *); -#endif -__END_DECLS - -#endif /* _SYS_MD4_H_ */ From nobody Fri Oct 18 21:01: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 4XVcZP72RWz5YxDm for ; Fri, 18 Oct 2024 21:01:33 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVcZP1vhkz4M03 for ; Fri, 18 Oct 2024 21:01:33 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-37ed3bd6114so551535f8f.2 for ; Fri, 18 Oct 2024 14:01:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729285292; x=1729890092; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4seM3F9JepdhIH1EB+H6nbrqWlRvydsibLjPqLeUEp0=; b=UDmsinQFogMNv6aa/ZQM+tMkIbO9xTiY7A15XsWaUxLvYm+1DLKmpqzHRCbC7Pf3nE eEIrFmXh+khuVsl9qUiQ5Iq2pU6sE04ciev9WknWdT7mnzpffyfGHL/F+T7cNAaP/1S8 wGbz4Dq9+Evp1Ho4C7Ve7n8EC5kdU/RVd7XGYReQiEO7LcMu2fNic6Ge1JHwlEw10g1H wEUSIR4FZQ6mps8bx8ORNWTypjocZPKesdTUKAtYnlm2votumd/eJi3m81QyQSMzzKyk 5WKxQm/RvG/B8/PsePetv3XdFL6uA7MQjiqjAxetOMK2rYIYjqJ6NcEEbERAg0uxYSGx WBbw== X-Forwarded-Encrypted: i=1; AJvYcCWd82nZC1P8vjAu9btP6hvJ6tdtEWktkmGC8BIKjKQ80xYGgYdRoiJBp1D4RTnRjYhyu7tfqmYTM4vqNZtYR1nSkbeI@freebsd.org X-Gm-Message-State: AOJu0YwOw0o+3nP5mx9W8Sa3l90/q1VURSKDK0Opz2rJIXunHcI//1J2 pm8kcwyKBNx0GNqJ4l70Jw+/WSMPiAiV0vudUdx408tq0x/F92hSApOB/LAyTuYRCYyWt1Klbcq y X-Google-Smtp-Source: AGHT+IHvjKI+ep/i8LfTX2T53+sh+BCbGpWrrlI0m0b9oitTQY/F/IJLv3FYQMol/n2VVKfug0heSA== X-Received: by 2002:adf:f490:0:b0:37d:48ee:d6fc with SMTP id ffacd0b85a97d-37ea2137158mr2330655f8f.7.1729285291247; Fri, 18 Oct 2024 14:01:31 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4316068d08dsm36609365e9.15.2024.10.18.14.01.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2024 14:01:30 -0700 (PDT) Content-Type: text/plain; charset=utf-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 (Mac OS X Mail 16.0 \(3818.100.11.1.3\)) Subject: Re: git: 4f2ca36c7bec - main - arm64: Disable coverage sanitization of `pmap_update_strided` From: Jessica Clarke In-Reply-To: <202410111653.49BGrin3091045@gitrepo.freebsd.org> Date: Fri, 18 Oct 2024 22:01:18 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <92030090-11B4-484B-8FD4-6B92F34FD717@freebsd.org> References: <202410111653.49BGrin3091045@gitrepo.freebsd.org> To: Mark Johnston X-Mailer: Apple Mail (2.3818.100.11.1.3) X-Spamd-Result: default: False [-2.40 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEFALL_USER(0.00)[jrtc27]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.42:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.42:from] X-Rspamd-Queue-Id: 4XVcZP1vhkz4M03 X-Spamd-Bar: -- On 11 Oct 2024, at 17:53, Mark Johnston wrote: >=20 > The branch main has been updated by markj: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D4f2ca36c7becd20b21ce5ef7256bbd42= f732dafe >=20 > commit 4f2ca36c7becd20b21ce5ef7256bbd42f732dafe > Author: Zhuo Ying Jiang Li > AuthorDate: 2024-10-11 16:41:49 +0000 > Commit: Mark Johnston > CommitDate: 2024-10-11 16:52:53 +0000 >=20 > arm64: Disable coverage sanitization of `pmap_update_strided` >=20 > The break-before-make update invalidates PTEs, including the PTE > pointing to curthread, causing a fault in `trace_pc`. This > addresses a similar issue in > 01bb9a2a3557bc9389f628d301cd691e08266f1d. This broke* GitHub Actions due to the use of Clang 12 (newest Clang in Ubuntu 20.04 LTS which isn=E2=80=99t EOL until April 2025) which = doesn=E2=80=99t support this sanitiser. Probably the easiest thing to do is to leave the relevant __nosanitizefoo defined to nothing unless that sanitiser is actually enabled (via __has_feature), as it=E2=80=99s not necessary = outside of that, and if it=E2=80=99s enabled then you know it=E2=80=99s = supported? Jess * Masked by the OpenZFS import breaking it earlier in both commit history and build order From nobody Fri Oct 18 21:15: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 4XVctq32ZDz5Yxhf; Fri, 18 Oct 2024 21:15:47 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVctq2XKRz4N5x; Fri, 18 Oct 2024 21:15:47 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729286147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6iCJGPzqhqhgBBGfRlPdrp28vO+LsHCDahqwMPWikQ8=; b=msEkn29rpQYDm79XouZz/PH4YEFWZSFunmeHcxa4hNbxrR77AtK+ARkjY6BANCVcO+4N5N o4KQb9X2ZbDki8ewOzFG3pYu6ioM2vPuXkQEYpym0Hh2+AWq0htpG+Q+bZXUlZ1E5fhExK 0LvPmehgbyMDgOh8kSQI4CjgQg7qMSX1dy+nUFUjbi2EGTxWl8o5EfK8RlQXzRIyajUROm OrWRaB17jzm+f/DAwT8/mJIfcD/6YrHSd9UK3wpOvJ6OXS1DMEMbnseISasiOATgwgYcLm 8yPjqNwR2iyRFnDJKTXbDa9N0tnUBXJI6cRaq9Bv8Vc6URAaAQV6Djl2rFs05g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729286147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6iCJGPzqhqhgBBGfRlPdrp28vO+LsHCDahqwMPWikQ8=; b=p3fiIAj9QY92QIC7eGEZUiC53EToBRBf4VDPEWNY02enPafr0uGgI2kIy1J9Loq7yOODfC oRzBPkn2Sr7JjJoleyqZo9wbF9IKvYxh/+YEVaW43g/4RZp26Xz+fzfoYCnX+ec34zbrnO 7MPxH3Xj5y/VIWTz3/Nb9CP63naURsK1skq11giu7s5c6qExxI6DREj+Df5Q9unztx60lp i0bYr2YcjuF8KGC40TxtxO9W1QW240rxnpLNI2RidqO9q5Vr0jPSmo+9QcipWYwhTpElD6 KbQrzfPWVsliobbqLkqjmHrM6UXkJvXisMG9TOj/MoMaX4Sr7NmgKf+02sFPqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729286147; a=rsa-sha256; cv=none; b=eVAjtDBUedMun8jWPK/0ToNUzG4WUT7vz15IFspZawMd9HsKQlSrLHU6R9f9oeNdNf2DGo PkBwbMkpFguXzhbJPJrtzN3HxDvCN/kLqhy9ZIvmFzwIguCWhJ8Qd+1IMACLNa+/T+Yung +Q6K+i91Kpke1s5pRSI+eUok5dqFgPamK6TpXZ49W6ZzKxbl40zNCHRBJilmjMeAEcCeRQ 7l2xYO6DRpo6iP5wU4aGcWATZzQ7ivRrujlRIg/XM2J3wniuR5JliuIROAxvIpCO5wWTFk c7MKfzZ6xTm6cWVnVcxRVSviHvnHM4GFQwa7BbKTR+Tj96dJLvZ+NirSK1Ugng== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XVctp583rzMll; Fri, 18 Oct 2024 21:15:46 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 18 Oct 2024 14:15:43 -0700 From: Gleb Smirnoff To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b88df1e893c4 - main - Reapply "sbin/ping: allow normal users to specify larger packets" Message-ID: References: <202410161840.49GIe8CR000407@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202410161840.49GIe8CR000407@gitrepo.freebsd.org> Hi Pedro, let me help to explain you what Maxim is talking about. ping(8) before your change: # ping -c 1 -s 65507 10.1.10.1 PING 10.1.10.1 (10.1.10.1): 65507 data bytes 65515 bytes from 10.1.10.1: icmp_seq=0 ttl=64 time=2.078 ms --- 10.1.10.1 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 2.078/2.078/2.078/0.000 ms After your change: # ping -s 65507 10.1.10.1 ping: packet size too large: 65507 > 65467 This is the regression Maxim is pointing you at. Also, after your patch (running from non-root): > ping -s 10000 10.1.10.1 PING 10.1.10.1 (10.1.10.1): 10000 data bytes ping: sendto: Message too long And this just shows that you didn't even fully achieve what you wanted. To achieve what you want, you first need to fully revert your patch, and then apply the attached patch. It will consistently disable all the size checks that _our_ ping has, instead of incorrectly and blindly applying a diff from DragonflyBSD. HOWEVER, PLEASE DO NOT COMMIT the attached patch! Please revert what you already committed and start a normal review process on phabricator. You can use my attached patch as a start. Please put both the #network group and the #secteam group. This is a kind of sensitive change that can't be done by a drive by commit. P.S. If you are pinging FreeBSD host, the other side needs to have increased maxfrag to reply: # sysctl net.inet.ip.maxfragsperpacket=44 -- Gleb Smirnoff From nobody Fri Oct 18 21:18: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 4XVcyJ1jqpz5YxfW; Fri, 18 Oct 2024 21:18:48 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVcyJ19lQz4NGQ; Fri, 18 Oct 2024 21:18:48 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729286328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HEPYfVJex3hkTwameT/49Qy3ZPiLbdSzoBm6qVf5GQk=; b=NygIeFxFP/RT1eJ/XFnhaVtrqILIgOyjexXFL+RbBM6Sek+SKgjX40xyYD25Wb7F6O3/P6 Wg+NgjV1AsqVtzpVEpvCuXQRJ6o5uhVwbLR0+EenLBv3I2epWLBHSh1StHiH7ZhXNvB8wa CK1etJ6bBXy+WLwkez80upcKWxRfpr8T5e0zDCBqfpbeln/esfYoF71CwcHag+Qr5UvElm hgYX+h8HX1qexxh+yQemTAZM7BS4tqrGWNSTk6i5pgxmW+nkKI6eAdR5sg7g04DGMQfGRp QhMYHpmJcqknjWGKmYpcoY818HkVc295QkjNeDPMCfdJmuknzyq4GL3CknmNKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729286328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HEPYfVJex3hkTwameT/49Qy3ZPiLbdSzoBm6qVf5GQk=; b=mN5exmoRoNalQ5DwPifREFWPERc7bEjs3lulTTTJYOy+SBJc6K6agidGqzQv854U/5fD7W K73RJprlWsaob3yqC1OeBrzw7OdPGVYq2pBmw76u+uUEPWYxwc2WWRyNx61vW2R8LtUvaY CKbnCABU/RIzM6Fzfnoj/32XfRkYuJS/d3sUzd8ERdamX2nPmO/1/MTJcW4LGe0G+ZN4By ZxT1mxlfA5c9Ngs/+e9XKCoqCQFLL29XzvsMDbL4oIjHV/dN64KOesFJUrxRVopjHvAHl3 EEbJso+pcmZEwo9SxLIGty/Sjs2FUahGu1JxpM76QU11JexKhLQi+sJXDo0ChA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729286328; a=rsa-sha256; cv=none; b=rxiWrh+oT9y1cp6wypec+oMXBnPXkL4l57ohf9gmVuyKtQIfdR0eksDSURnxQFjn6GPVd2 vgoEo5F0rw86xI/kPW3vQB3fPEfHJOsf6c2R/Q41ZQXGbPmnpoG8xk3S5UnKaT00KtM53P hqW99mgLDiMTCZ/eNGLhp7BSMldAZGNoPWvX5z5/R6Fvfw9LI7+PSa9PXrq8RsL16b5owX 1DK2gu3/XUl8jSawThyp2m/HBnnB87OuSG5lI3zeLQPiW4KqvwPey12X7Ifz3U6e/FHSBl zkYu1/uDqn4OKlC1SNTS+61nEY/jicGoCUUE8FsnkyyqTjwKGX1wzVVV7iZ8sw== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XVcyH3ckqzMgr; Fri, 18 Oct 2024 21:18:47 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 18 Oct 2024 14:18:45 -0700 From: Gleb Smirnoff To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b88df1e893c4 - main - Reapply "sbin/ping: allow normal users to specify larger packets" Message-ID: References: <202410161840.49GIe8CR000407@gitrepo.freebsd.org> 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: multipart/mixed; boundary="eGWoIZfGwRej9Y/v" Content-Disposition: inline In-Reply-To: --eGWoIZfGwRej9Y/v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Oct 18, 2024 at 02:15:43PM -0700, Gleb Smirnoff wrote: T> To achieve what you want, you first need to fully revert your patch, and then T> apply the attached patch. It will consistently disable all the size checks T> that _our_ ping has, instead of incorrectly and blindly applying a diff from T> DragonflyBSD. T> T> HOWEVER, PLEASE DO NOT COMMIT the attached patch! Sorry, forgot the attach in the previous email. -- Gleb Smirnoff --eGWoIZfGwRej9Y/v Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ping.c.diff" diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index d9d544bc75c8..817889eaf599 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -320,11 +320,6 @@ ping(int argc, char *const *argv) optarg); } sweepmax = (int)ltmp; - if (uid != 0 && sweepmax > DEFDATALEN) { - errc(EX_NOPERM, EPERM, - "packet size too large: %d > %u", - sweepmax, DEFDATALEN); - } options |= F_SWEEP; break; case 'g': /* Minimum packet size for ping sweep */ @@ -334,11 +329,6 @@ ping(int argc, char *const *argv) optarg); } sweepmin = (int)ltmp; - if (uid != 0 && sweepmin > DEFDATALEN) { - errc(EX_NOPERM, EPERM, - "packet size too large: %d > %u", - sweepmin, DEFDATALEN); - } options |= F_SWEEP; break; case 'H': @@ -351,11 +341,6 @@ ping(int argc, char *const *argv) optarg); } sweepincr = (int)ltmp; - if (uid != 0 && sweepincr > DEFDATALEN) { - errc(EX_NOPERM, EPERM, - "packet size too large: %d > %u", - sweepincr, DEFDATALEN); - } options |= F_SWEEP; break; case 'I': /* multicast interface */ @@ -458,12 +443,6 @@ ping(int argc, char *const *argv) errx(EX_USAGE, "invalid packet size: `%s'", optarg); datalen = (int)ltmp; - if (uid != 0 && datalen > DEFDATALEN) { - errno = EPERM; - err(EX_NOPERM, - "packet size too large: %d > %u", - datalen, DEFDATALEN); - } break; case 'T': /* multicast TTL */ ltmp = strtonum(optarg, 0, MAXTTL, &errstr); @@ -811,9 +790,8 @@ ping(int argc, char *const *argv) cap_rights_init(&rights, CAP_RECV, CAP_EVENT); if (caph_rights_limit(srecv, &rights) < 0) err(1, "cap_rights_limit srecv setsockopt"); - if (uid == 0) - (void)setsockopt(ssend, SOL_SOCKET, SO_SNDBUF, (char *)&hold, - sizeof(hold)); + (void)setsockopt(ssend, SOL_SOCKET, SO_SNDBUF, (char *)&hold, + sizeof(hold)); /* CAP_SETSOCKOPT removed */ cap_rights_init(&rights, CAP_SEND); if (caph_rights_limit(ssend, &rights) < 0) --eGWoIZfGwRej9Y/v-- From nobody Fri Oct 18 21:38: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 4XVdNq4gTMz5Yydc; Fri, 18 Oct 2024 21:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVdNq4Bjlz4PpD; Fri, 18 Oct 2024 21:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729287499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VEml2+BPMpURsO+KXOZC+e6CyAeg0FGGZvnpqxFMrXQ=; b=Gep25WjGV/7r7Cs55UwstIVJ7OQ+dp/xwdqUqI4EuOo8JgvaJdwyKQTju1/oJaB8oK9XpY h1xuILMBwbiXzAvU3oR0W0O+w+33Aq+ix8Vt1xCPPc8Lmb83/qFeZTLRjAEBpRyz5zzjhi goFQPXOKJjgR5qGXwNN7HyO9WDV3LasAhvvf1VZNDtujRWw0kqywnibq2qLPnJYnlEbfZ0 3J9gMC2mYqRL73q8l6GoKQdec98Lw/cM81tMBns8zRlTTnetH/tRpCMO8M7KmnlE6tkrGo UwkcKMd6dfJ8iGvApI1E26yplCyKTtN8S0cuPHHtVcj7LWXuZnj+x91swHGXoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729287499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VEml2+BPMpURsO+KXOZC+e6CyAeg0FGGZvnpqxFMrXQ=; b=U6PvJpIFnewekR7iSL9IxxQrPE73wMfNrDYiJQkXD3B1Z1VuvXRGKn5r5slWtbiIY2baKA VLN59Exhu7Jh5qg/ZSNcF8dgnTPfW/hGOUXumBuVLW5qUr6LbjZSGtLK/WeSPM74ztYWEb P2d8WX7SFg0BbV2ZXxOZ7GkwBWIllTbb3EoG8UiWmY7L/WJOrWqWZ3hsWKiISCMqWY1J81 ErjJjUn3EUXFUn+iXwCAaycjUCiwEB6HYO9vzs5pzn8p+CW3Dnc5Q8XLDmvxJAX3kPV3+r 5KxHKexC/Mki4IJyTUvh+pJUg8pW1emDEWDdWq6wb5ycpoUk7tn8JaVM/5beIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729287499; a=rsa-sha256; cv=none; b=mgsrJFgwOfTCi4H9IVdm/zK6XcKr1+zkqDlFqapISWMtIH9IWkz3Is4sQlxAER8WDpHYtC iJ2VIh4oLAJfInRyAYFNUIZEPILR/o4Bn9By1Wtq6ow+kfO6EE1xeQA6w95+qyzh1WW37h 7xXguP9x9jnhBcQ1gYrVS6/3omULImVWqYF1sc3a+qHzOhYQypfKGnrN1Th+xdc2NVhlfM GYqAH12mLPyxJOJRQeRw4BwhQ8bk2LQVRIOBgGHttC2sdXlYqDqF7Yqi7Oe7bqR703QvZV 1dQYJ/uBEwxQRUs/AvxAnjo6mhjWXDrdXzoz26zl4OMyeTZPdL4+IJirK2U4Sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVdNq3g7lzqKr; Fri, 18 Oct 2024 21:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49ILcJHG094995; Fri, 18 Oct 2024 21:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49ILcJjp094992; Fri, 18 Oct 2024 21:38:19 GMT (envelope-from git) Date: Fri, 18 Oct 2024 21:38:19 GMT Message-Id: <202410182138.49ILcJjp094992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: b8007cfdb72c - main - mididump: fix gcc build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8007cfdb72c1be27d1d93937886fd60f21915ab Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b8007cfdb72c1be27d1d93937886fd60f21915ab commit b8007cfdb72c1be27d1d93937886fd60f21915ab Author: Gleb Smirnoff AuthorDate: 2024-10-18 21:38:04 +0000 Commit: Gleb Smirnoff CommitDate: 2024-10-18 21:38:04 +0000 mididump: fix gcc build --- usr.bin/mididump/mididump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/mididump/mididump.c b/usr.bin/mididump/mididump.c index 9c8fe62c9859..16bd775f10d4 100644 --- a/usr.bin/mididump/mididump.c +++ b/usr.bin/mididump/mididump.c @@ -44,10 +44,10 @@ #define NOTE2FREQ(n) (440 * pow(2.0f, ((float)n - 69) / 12)) #define CHAN_MASK 0x0f -struct note { +static struct note { const char *name; const char *alt; -} static notes[] = { +} notes[] = { { "C", NULL }, { "C#", "Db" }, { "D", NULL }, @@ -211,7 +211,7 @@ main(int argc, char *argv[]) case 0xb0 ... 0xbf: b1 = read_byte(fd); b2 = read_byte(fd); - if (b1 < 0 || b1 > ARRLEN(ctls) - 1) + if (b1 > ARRLEN(ctls) - 1) break; printf("Control/Mode change channel=%d, " "control=%d (%s), value=%d", From nobody Fri Oct 18 23:50: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 4XVhKJ3Q1nz5ZMXM; Fri, 18 Oct 2024 23:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVhKJ2v5Mz4YNb; Fri, 18 Oct 2024 23:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729295428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKXsUrQBbYUpDj7eDT+SHlZSpW2iP3uF3t8b8jQ4gsg=; b=K2P3GQGkPFEM4FXMu1viAeg1ZTbNa22fFS7gzSVjIcufI28jLraF8lMXG/pASArYks2VLb Cp46IRXbrtVgft/mKC3xbRGjMfy1Cm+Fdc54PgtF8NtmHJ4UyJZK9WoSaFLMFNI2oyhb7P 21w3ikVzYReNdDolUC359o2GZJ/sEPYuslPln/IAA49P44FlNdT/nL5LxWiq5GqJA0942v wNg0yhccfeaZWU8XMOTsbVMLPdlkI9gup00f5MgZXwPQIkBuPB0n83HDutzKd5/y2EKWZe a5WV/oQemlHyEXgYrSI+wT4RQg6auQNvukDfyQC9V/20o+Ir4HpmZa/JsYTjmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729295428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKXsUrQBbYUpDj7eDT+SHlZSpW2iP3uF3t8b8jQ4gsg=; b=t5WWVZ5URH+qK5180lNTolTQWwsrOIhJKsxeMCjYeH4jrUrSTwHW4neYEJ2FG3BALLKK++ Cf6AzSuKy6PqeAWksbh7kqd7r/e3wQihkWCbT50mvJPNb5L/FZPPBxfDeY6xsu8qWAZIDE Dm6ufuR8ZPjCoeCdwO0wsccXIzJqbWFbaEuFLH/0cQ/8YGt+P0Y9/2QVqgf6m86uA2idq3 T3RwuqbUqQChQYAJWbdNGSSX+9+4CYYqhnokk9b6E/r3gYEwWIgCTcBF7DNig/wNuWgT3R py21A/N3nm2cH9dyv5ANfgD7hVxf5y/uIWbb2rGxOiQ/lorqhA0YE+rvzNnYUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729295428; a=rsa-sha256; cv=none; b=SSyT41eBLwmKppNOEFhOKTYsb7CKvekttjWs8lYp5luXDNx+Afwd5ccopEhRb3aQw7sWIy xNf+EmRa0Vz1AUBGPDUTSObYqesE7bht2ssl2yx1M0IzyFcZWjrbtnopATygN/YX2HIvnO ec3ib3wOIiokkijVZhcHg8sYmUWwSCL8xoT98BugoUvCbmmA+F5PBvIgijcgt+y/DExS/s tQwmaoFxrPiB59kIfJNls6wJfKtahz5h0AQ4YAXMQ3FH8PZ1NKSTUnO6KIK4v4EXlqLIP8 RElRSfTH/aU/xa7zPkKWhi6Hh2XZ3/p5wRPCM07iGSR3TzEpr21HzJEdpp35Jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVhKJ2VPmztB1; Fri, 18 Oct 2024 23:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49INoScd025588; Fri, 18 Oct 2024 23:50:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49INoSgV025585; Fri, 18 Oct 2024 23:50:28 GMT (envelope-from git) Date: Fri, 18 Oct 2024 23:50:28 GMT Message-Id: <202410182350.49INoSgV025585@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 9684658e35ab - main - libc/csu: Unify INIT_RELOCS across architectures 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9684658e35ab033c79e0519e3681d9a194976b71 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=9684658e35ab033c79e0519e3681d9a194976b71 commit 9684658e35ab033c79e0519e3681d9a194976b71 Author: Jessica Clarke AuthorDate: 2024-10-18 23:48:52 +0000 Commit: Jessica Clarke CommitDate: 2024-10-18 23:48:52 +0000 libc/csu: Unify INIT_RELOCS across architectures Some architectures don't need any arguments, whilst others need auxargs, which they get by passing in env thanks to INIT_RELOCS referencing the local variable in __libc_start1(_gcrt) by name. This is unnecessarily confusing, fragile (one has to look at INIT_IRELOCS's definition to see that it uses env) and duplicates code between architectures. Instead, implement it more like rtld-elf. Each architecture provides an ifunc_init that takes the auxargs directly, and those that don't need it can just ignore it. Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47188 --- lib/libc/csu/aarch64/Makefile.inc | 3 +-- lib/libc/csu/aarch64/reloc.c | 7 +++++++ lib/libc/csu/amd64/Makefile.inc | 3 +-- lib/libc/csu/amd64/reloc.c | 4 +++- lib/libc/csu/arm/Makefile.inc | 3 +-- lib/libc/csu/i386/Makefile.inc | 3 +-- lib/libc/csu/i386/reloc.c | 4 +++- lib/libc/csu/libc_start1.c | 28 ++++++++++++++++++++-------- lib/libc/csu/powerpc/Makefile.inc | 3 +-- lib/libc/csu/powerpc64/Makefile.inc | 3 +-- lib/libc/csu/powerpc64/reloc.c | 9 +-------- lib/libc/csu/powerpcspe/Makefile.inc | 3 +-- lib/libc/csu/riscv/Makefile.inc | 3 +-- lib/libc/csu/riscv/reloc.c | 9 +-------- 14 files changed, 43 insertions(+), 42 deletions(-) diff --git a/lib/libc/csu/aarch64/Makefile.inc b/lib/libc/csu/aarch64/Makefile.inc index b3420a638164..6c315c5e2624 100644 --- a/lib/libc/csu/aarch64/Makefile.inc +++ b/lib/libc/csu/aarch64/Makefile.inc @@ -1,4 +1,3 @@ # -CFLAGS+= -DCRT_IRELOC_RELA \ - -DINIT_IRELOCS="" +CFLAGS+= -DCRT_IRELOC_RELA diff --git a/lib/libc/csu/aarch64/reloc.c b/lib/libc/csu/aarch64/reloc.c index ead48a8ad4fb..4ba7920bcb07 100644 --- a/lib/libc/csu/aarch64/reloc.c +++ b/lib/libc/csu/aarch64/reloc.c @@ -24,6 +24,13 @@ * SUCH DAMAGE. */ +#include + +static void +ifunc_init(const Elf_Auxinfo *aux __unused) +{ +} + static void crt1_handle_rela(const Elf_Rela *r) { diff --git a/lib/libc/csu/amd64/Makefile.inc b/lib/libc/csu/amd64/Makefile.inc index f14033217580..6c315c5e2624 100644 --- a/lib/libc/csu/amd64/Makefile.inc +++ b/lib/libc/csu/amd64/Makefile.inc @@ -1,4 +1,3 @@ # -CFLAGS+= -DCRT_IRELOC_RELA \ - -DINIT_IRELOCS="init_cpu_features()" +CFLAGS+= -DCRT_IRELOC_RELA diff --git a/lib/libc/csu/amd64/reloc.c b/lib/libc/csu/amd64/reloc.c index 6424d69fbd5c..f1f83db9a391 100644 --- a/lib/libc/csu/amd64/reloc.c +++ b/lib/libc/csu/amd64/reloc.c @@ -23,6 +23,8 @@ * SUCH DAMAGE. */ +#include + #include #include @@ -30,7 +32,7 @@ static uint32_t cpu_feature, cpu_feature2; static uint32_t cpu_stdext_feature, cpu_stdext_feature2; static void -init_cpu_features(void) +ifunc_init(const Elf_Auxinfo *aux __unused) { u_int p[4]; diff --git a/lib/libc/csu/arm/Makefile.inc b/lib/libc/csu/arm/Makefile.inc index 2534e6579f38..ddead75f874d 100644 --- a/lib/libc/csu/arm/Makefile.inc +++ b/lib/libc/csu/arm/Makefile.inc @@ -1,4 +1,3 @@ # -CFLAGS+= -DCRT_IRELOC_SUPPRESS \ - -DINIT_IRELOCS="" +CFLAGS+= -DCRT_IRELOC_SUPPRESS diff --git a/lib/libc/csu/i386/Makefile.inc b/lib/libc/csu/i386/Makefile.inc index f3f8c2b176ce..32018000e1f2 100644 --- a/lib/libc/csu/i386/Makefile.inc +++ b/lib/libc/csu/i386/Makefile.inc @@ -1,4 +1,3 @@ # -CFLAGS+= -DCRT_IRELOC_REL \ - -DINIT_IRELOCS="init_cpu_features()" +CFLAGS+= -DCRT_IRELOC_REL diff --git a/lib/libc/csu/i386/reloc.c b/lib/libc/csu/i386/reloc.c index 1c9ec173facc..7097f58d8f26 100644 --- a/lib/libc/csu/i386/reloc.c +++ b/lib/libc/csu/i386/reloc.c @@ -23,6 +23,8 @@ * SUCH DAMAGE. */ +#include + #include #include @@ -30,7 +32,7 @@ static uint32_t cpu_feature, cpu_feature2; static uint32_t cpu_stdext_feature, cpu_stdext_feature2; static void -init_cpu_features(void) +ifunc_init(const Elf_Auxinfo *aux __unused) { u_int cpuid_supported, p[4]; diff --git a/lib/libc/csu/libc_start1.c b/lib/libc/csu/libc_start1.c index f0e708e405ce..045ea1e68141 100644 --- a/lib/libc/csu/libc_start1.c +++ b/lib/libc/csu/libc_start1.c @@ -137,6 +137,24 @@ handle_argv(int argc, char *argv[], char **env) } } +static void +handle_irelocs(char *env[]) +{ +#ifndef CRT_IRELOC_SUPPRESS + const Elf_Auxinfo *aux; + + /* Find the auxiliary vector on the stack. */ + while (*env++ != 0) /* Skip over environment, and NULL terminator */ + ; + aux = (const Elf_Auxinfo *)env; + + ifunc_init(aux); + process_irelocs(); +#else + (void)env; +#endif +} + void __libc_start1(int argc, char *argv[], char *env[], void (*cleanup)(void), int (*mainX)(int, char *[], char *[])) @@ -146,10 +164,7 @@ __libc_start1(int argc, char *argv[], char *env[], void (*cleanup)(void), if (&_DYNAMIC != NULL) { atexit(cleanup); } else { -#ifndef CRT_IRELOC_SUPPRESS - INIT_IRELOCS; - process_irelocs(); -#endif + handle_irelocs(env); _init_tls(); } @@ -171,10 +186,7 @@ __libc_start1_gcrt(int argc, char *argv[], char *env[], if (&_DYNAMIC != NULL) { atexit(cleanup); } else { -#ifndef CRT_IRELOC_SUPPRESS - INIT_IRELOCS; - process_irelocs(); -#endif + handle_irelocs(env); _init_tls(); } diff --git a/lib/libc/csu/powerpc/Makefile.inc b/lib/libc/csu/powerpc/Makefile.inc index 2534e6579f38..ddead75f874d 100644 --- a/lib/libc/csu/powerpc/Makefile.inc +++ b/lib/libc/csu/powerpc/Makefile.inc @@ -1,4 +1,3 @@ # -CFLAGS+= -DCRT_IRELOC_SUPPRESS \ - -DINIT_IRELOCS="" +CFLAGS+= -DCRT_IRELOC_SUPPRESS diff --git a/lib/libc/csu/powerpc64/Makefile.inc b/lib/libc/csu/powerpc64/Makefile.inc index 5d59d40eb393..6c315c5e2624 100644 --- a/lib/libc/csu/powerpc64/Makefile.inc +++ b/lib/libc/csu/powerpc64/Makefile.inc @@ -1,4 +1,3 @@ # -CFLAGS+= -DCRT_IRELOC_RELA \ - -DINIT_IRELOCS="init_cpu_features(env)" +CFLAGS+= -DCRT_IRELOC_RELA diff --git a/lib/libc/csu/powerpc64/reloc.c b/lib/libc/csu/powerpc64/reloc.c index 41419bf0e6c2..5637e6534197 100644 --- a/lib/libc/csu/powerpc64/reloc.c +++ b/lib/libc/csu/powerpc64/reloc.c @@ -24,15 +24,8 @@ static uint32_t cpu_features; static uint32_t cpu_features2; static void -init_cpu_features(char **env) +ifunc_init(const Elf_Auxinfo *aux) { - const Elf_Auxinfo *aux; - - /* Find the auxiliary vector on the stack. */ - while (*env++ != 0) /* Skip over environment, and NULL terminator */ - ; - aux = (const Elf_Auxinfo *)env; - /* Digest the auxiliary vector. */ for (; aux->a_type != AT_NULL; aux++) { switch (aux->a_type) { diff --git a/lib/libc/csu/powerpcspe/Makefile.inc b/lib/libc/csu/powerpcspe/Makefile.inc index 2534e6579f38..ddead75f874d 100644 --- a/lib/libc/csu/powerpcspe/Makefile.inc +++ b/lib/libc/csu/powerpcspe/Makefile.inc @@ -1,4 +1,3 @@ # -CFLAGS+= -DCRT_IRELOC_SUPPRESS \ - -DINIT_IRELOCS="" +CFLAGS+= -DCRT_IRELOC_SUPPRESS diff --git a/lib/libc/csu/riscv/Makefile.inc b/lib/libc/csu/riscv/Makefile.inc index 5d59d40eb393..6c315c5e2624 100644 --- a/lib/libc/csu/riscv/Makefile.inc +++ b/lib/libc/csu/riscv/Makefile.inc @@ -1,4 +1,3 @@ # -CFLAGS+= -DCRT_IRELOC_RELA \ - -DINIT_IRELOCS="init_cpu_features(env)" +CFLAGS+= -DCRT_IRELOC_RELA diff --git a/lib/libc/csu/riscv/reloc.c b/lib/libc/csu/riscv/reloc.c index 036ea3de8701..6ae85085089b 100644 --- a/lib/libc/csu/riscv/reloc.c +++ b/lib/libc/csu/riscv/reloc.c @@ -24,15 +24,8 @@ static unsigned long elf_hwcap; static void -init_cpu_features(char **env) +ifunc_init(const Elf_Auxinfo *aux) { - const Elf_Auxinfo *aux; - - /* Find the auxiliary vector on the stack. */ - while (*env++ != 0) /* Skip over environment, and NULL terminator */ - ; - aux = (const Elf_Auxinfo *)env; - /* Digest the auxiliary vector. */ for (; aux->a_type != AT_NULL; aux++) { switch (aux->a_type) { From nobody Sat Oct 19 00:45: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 4XVjXv4w9Yz5ZQXy; Sat, 19 Oct 2024 00:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVjXv427hz4cZ0; Sat, 19 Oct 2024 00:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729298735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W++9j9hPitAv7GFakk0qcnQoEKBXJATpOUOSkrpwD24=; b=kSKmvQOGE8LCY/a3Tl5jQ3TmvsZ0/szjMpBJK0Y7KDpj67nTtWsfes25p69MZ5q7TJrCNm KsIKp6lgW9ChFDl4xAh+hZLdNJ3MYP6CcwTVqa6aOzqaT9T/tCxDh9ync6+WAxBFqgWMEt vMzewvINSFqE2Jqbew9AmNPQfk6ujB/wjhk7FAmBL6nF6qihPmu0HHhbPVHVRoMzqZR+Vc qYwjgh2DXuT7PwkSW05r523o6jJlr22Kf8oAH4S6n3NpiO+2MzSJrv6m0qW9f6yUdggrc0 ww5IzXoxRebBK8Ub9DqYBmiv+vdLljDZSF33AiljFCvxpR25Hk5RGa24RJW7ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729298735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W++9j9hPitAv7GFakk0qcnQoEKBXJATpOUOSkrpwD24=; b=AQYaYrRqbJRQlFvcDw+2Hqd3JQTXWMtijmOGla8T+easJtg3Y+/ZaJArAGhibk14NPJTQv /rQeSCxJDDYXIjxA2nlsz3fe8+VOZC7NhTnYTLcHEZsZavmwyw2BcRAA1w7WtRPYaLCPLs gV2OuRSw5j+rMwYxl7Ukoodzk8rsikOto1elIr1ccCV/aA4OFK9PH29Hisq48HEaDtUIcf oft5ESJAEntauOYE5x44Pfroddcu16dJHo8YtLNu2VzRGGB1q2/k0JuokKQFWk7FFmX5g0 uRm+y7MKOi+fHZTEvZjcGKL/1R5TGkaE8uOS5IKcVaoF02jwoGtz9NoZuC7K8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729298735; a=rsa-sha256; cv=none; b=l6pUSvPOZrrJWedwCXjR43d7nBJbq1ypDxL3Njnjs393GNZWi/CZ+0HeayPY5X7GA4kRft g3NNqTJPpiiuIlEaYGvjf1mirj1qVHCj/AG+811YT1kMssgvOVwUUF/7vtEaGhj7vqYOJv RXbiwpszEa+o/RAh3t4V4Shjc7mKGYePCOfNPbjMpi/rAgCbV9VA/hqliG5ycPQe9n61g+ T+sOCF0ijCfGnuRgZscj2ZKr06+rmpEIV1ZXv6UiLbGAkDATCbGR/QJSqoYL4ZRNtpVcoL icfNRVfuAcIF2Td5BrXPi9VUhFe5ukW2oSot1YaBm61CMhSrrJjlB4WUUihxuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVjXv363HzwGh; Sat, 19 Oct 2024 00:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49J0jZam017792; Sat, 19 Oct 2024 00:45:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49J0jZX2017789; Sat, 19 Oct 2024 00:45:35 GMT (envelope-from git) Date: Sat, 19 Oct 2024 00:45:35 GMT Message-Id: <202410190045.49J0jZX2017789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: ba23ab2168ff - main - Update the expat version referenced in libbsdxml.3 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba23ab2168ffabc2c5e647a1a37ab9a8fb482bb8 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=ba23ab2168ffabc2c5e647a1a37ab9a8fb482bb8 commit ba23ab2168ffabc2c5e647a1a37ab9a8fb482bb8 Author: Enji Cooper AuthorDate: 2024-10-02 02:26:37 +0000 Commit: Enji Cooper CommitDate: 2024-10-19 00:44:42 +0000 Update the expat version referenced in libbsdxml.3 This change updates the version of expat referenced from 2.6.0 to 2.6.3, correcting documentation post-ffd294a1f4c23863c3e515d16dce31d5509bcb01. Bump .Dd for the change. MFC with: ffd294a1f4c23863c3e515d16dce31d5509bcb01 Differential Revision: https://reviews.freebsd.org/D46865 --- lib/libexpat/libbsdxml.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libexpat/libbsdxml.3 b/lib/libexpat/libbsdxml.3 index c6c2518ea41a..2ec1f71b58bb 100644 --- a/lib/libexpat/libbsdxml.3 +++ b/lib/libexpat/libbsdxml.3 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\"/ -.Dd February 17, 2024 +.Dd October 1, 2024 .Dt LIBBSDXML 3 .Os .Sh NAME @@ -34,7 +34,7 @@ .Sh DESCRIPTION The .Nm -library is a verbatim copy of the eXpat XML library version 2.6.0. +library is a verbatim copy of the eXpat XML library version 2.6.3. .Pp The .Nm From nobody Sat Oct 19 02:05: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 4XVlKK5RXDz5ZVhZ; Sat, 19 Oct 2024 02:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVlKK3ZTjz4jmX; Sat, 19 Oct 2024 02:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729303541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LSvuAwzRHknaqyyu0SUbaxHKlEaqQHAi17A1nOoTBIw=; b=hs1UcceRXWrowtbqyWwkP5n/owY+BMWRTtp4HqsE7o+Yit0UU+RM/kSDef6z/Wfjj9rImP zMNmqn/SyZIM7BdaDYKK95ivQgkMnZvjSiicQ6/AsoLpXVODQLqaJO5EpgXrt2g7LgYDOz inbE/oxnaAHVPeRhjGEKVO+iigHE3eD9+pvzmT8fR+ymJ43rpsooJkOSwGt7zM77fK3EWV CV+Hc8/4Qj7hbz0QB7HLoZyqKZJNA8aOXsCucraDhlnoNJ9jmiwb3xwaYjgf9Lg5NDifDY W8r23KIt7aTNUFuRLd6MuS6JTwmetdQhJ1PFsfUK6OpA50oYGMiDEME/F0vL2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729303541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LSvuAwzRHknaqyyu0SUbaxHKlEaqQHAi17A1nOoTBIw=; b=N+EIgXV8lFUw3Jy6A/cthilV4EdofnOMlYkaEdh5Wifts3TZoEsLGQ6tXediCAvPjbiX1O Ci//NJfpMJIW/IvylHEIvgAu5A4OeVBg5Q+a2g1TTxDz4tSrzJodgjxQv0+i88VJxtCMHa Y1FFdiRydp6vhNOHCsuGMcQKVPGv9t6I1tXY38WgASRw4+/D0mOLTuf9W0H56r4KRa5yiM FBUp4vo4Fy6oDFWpxt7BWzNXvBrYzcFVCi9j7xGpSi7G1zIi/Mzlet4lwWenH5A9xCm4Eb BKlF5qaFGC9sBzS90Ap06a7swm36ntaSQnLGMLQAk8rihVl6qIPFWgiIVqrgzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729303541; a=rsa-sha256; cv=none; b=uvsUOFCTIXOik3UMqLXLeYFWXq1EMSHWBuOgPY9tCqoy9jNf2c0NhJXqzJfwqmPd9yNs0F Z78v1ELC89u1JqKA+OImWKfgYxwosOJI27abLhzKe7TCTHfhiOaJm3qZqM5moj+nW3uxG2 56+GG/t/0J2+BMyENAGhbA38d169laY2zyfMJjm2gV3xgduJXiYtsQDgVoKdFmSEQM/aU5 an1L2IkTuvlJWegdQN+EOrLmqWsu1+yF4bXePgzcKCNgRnc5zCGSAS9QnI6W4I7ECG2qyZ ppAQeG4qtCsaz8Fn1tQ/SLef120oAmxtE8FE2NqCS5Y+kT3VvskoQLGuEjEH9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVlKK2d2dzyHs; Sat, 19 Oct 2024 02:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49J25fV0063870; Sat, 19 Oct 2024 02:05:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49J25f5u063837; Sat, 19 Oct 2024 02:05:41 GMT (envelope-from git) Date: Sat, 19 Oct 2024 02:05:41 GMT Message-Id: <202410190205.49J25f5u063837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: bcf81d7794a7 - main - contrib/googletest: correct mergeinfo from 1.14.0 import 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bcf81d7794a7b20425cdb48a580d977c49f75251 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=bcf81d7794a7b20425cdb48a580d977c49f75251 commit bcf81d7794a7b20425cdb48a580d977c49f75251 Merge: ba23ab2168ff 8ef491440fca Author: Enji Cooper AuthorDate: 2024-10-19 01:08:26 +0000 Commit: Enji Cooper CommitDate: 2024-10-19 01:11:03 +0000 contrib/googletest: correct mergeinfo from 1.14.0 import From nobody Sat Oct 19 02:05: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 4XVlKM71SXz5ZVpd; Sat, 19 Oct 2024 02:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVlKM6GB6z4jhV; Sat, 19 Oct 2024 02:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729303543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9j6IR9eWLUmEvJipaUUO2VaXhzbQg9Eu6hC+RhHSSKA=; b=RD9ATaX0x0CFw+qI5XUtTMap/ciOmI48v5QEfaGMqRRQAyvk/rZ/deDO0XWdHQcyRXxENA mp4jbScIxspQ9ITQaHyfaISmKnv3nEmRfFlboOYKP4aZHeHEe9VarKMc9xFxS7EaPG1/y0 BEBlkfdERy2xnkt1zllAVTQcJ0ByyW9P+mITUHP0Xs9Ra8AgfMRWcGi3jBQckmMT2cGqaM wQHEzy22vRNfW1kk6rgNC1MyostP0rOEXuFpEPA8gGix9OV4Ojj/2W/hBFCj5TubGbTI0n A9Hcj4JeDyzTra8/R+Q9D0sITDg9xK8OaR+SiTmDM6rwTRCRHgUhvY19tvEUKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729303543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9j6IR9eWLUmEvJipaUUO2VaXhzbQg9Eu6hC+RhHSSKA=; b=G6nKX8AKnDg9diiUGJBq7TK5EfHMLHq22tgJ5TKXTlGb0DNwToFtToT2uNYJq8K+i6rCHa UEeWsypij9kyZ45GExecVWkdoaoWmwePm+JZzldzDgPjzoh+FBnE/lxfYZbSiLxwG01Ck8 +b7AojYkRAJHrZJzvZaz4tQHxx08Q7Sip+zgN/aO+UCdtQ2ksbbNGF0+qJA/7s9E6iJyyn IsSYrmt3V+FEg2pf7gCg3TpqOTiWogfbqNpHzUhkW+m/YBuIX4bzSwc+V7vuyGWdI4jTIB LgJGmA7+eX/5iREZUOtLlxAc88E41jF81ZnhP5up7UfD3RtafmIvFTapJBGlyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729303543; a=rsa-sha256; cv=none; b=jpcvGcSoWIGFHYDobPfHNmsjwtidCetxp/VYA8ShreXaMi4wZCj93HjcE8cDA6BgcQ0Oxc PRL27Q+MFFG7VbS4JPOYuikLl4jYSPzMG7KwWrqIR9/DzThREer5cDMlVDtg4QB1iIgdx/ 6fnkLhFr1kadwz+ikIQBF1i/3hxDInSl5hrCVyLgZQ9E2wUqkDD3LCm8hrxWc8AAhx3hFL sML95j3vsKrFNKBeGpuW+YWeC35SDQIy1wLeIHkbSBtlQeLRLJuB7y+LF0+mY9HQwYtzos Ry6GW2PQ/HTumknkz+vwoNO2RSdSsSTKYzxGuQRdy80xaCJPbqNVliTruvp5lQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVlKM5g2qzyHt; Sat, 19 Oct 2024 02:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49J25hSe063962; Sat, 19 Oct 2024 02:05:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49J25g8O063943; Sat, 19 Oct 2024 02:05:42 GMT (envelope-from git) Date: Sat, 19 Oct 2024 02:05:42 GMT Message-Id: <202410190205.49J25g8O063943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: a52d355b540f - main - Add 'origin/googletest/' from commit '8ef491440fcaec96f899d73e08873426c78583a4' 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a52d355b540f9b7ba13edf20efae5f33e69de189 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=a52d355b540f9b7ba13edf20efae5f33e69de189 commit a52d355b540f9b7ba13edf20efae5f33e69de189 Merge: bcf81d7794a7 8ef491440fca Author: Enji Cooper AuthorDate: 2024-10-19 01:28:19 +0000 Commit: Enji Cooper CommitDate: 2024-10-19 02:04:12 +0000 Add 'origin/googletest/' from commit '8ef491440fcaec96f899d73e08873426c78583a4' This helps bootstrap the mergeinfo so future googletest imports can be done more easily. Suggested by: jrtc27 Fixes: 28f6c2f292806bf31230a959bc4b19d7081669a7 git-subtree-dir: origin/googletest git-subtree-mainline: bcf81d7794a7b20425cdb48a580d977c49f75251 git-subtree-split: 8ef491440fcaec96f899d73e08873426c78583a4 origin/googletest/.clang-format | 4 + .../.github/ISSUE_TEMPLATE/00-bug_report.yml | 53 + .../.github/ISSUE_TEMPLATE/10-feature_request.yml | 33 + .../googletest/.github/ISSUE_TEMPLATE/config.yml | 5 + origin/googletest/.github/workflows/gtest-ci.yml | 43 + origin/googletest/.gitignore | 88 + origin/googletest/.travis.yml | 81 + origin/googletest/BUILD.bazel | 219 + origin/googletest/CMakeLists.txt | 27 + origin/googletest/CONTRIBUTING.md | 141 + origin/googletest/CONTRIBUTORS | 65 + origin/googletest/LICENSE | 28 + origin/googletest/README.md | 146 + origin/googletest/WORKSPACE | 27 + origin/googletest/ci/linux-presubmit.sh | 137 + origin/googletest/ci/macos-presubmit.sh | 76 + origin/googletest/ci/windows-presubmit.bat | 58 + origin/googletest/docs/_config.yml | 1 + origin/googletest/docs/_data/navigation.yml | 43 + origin/googletest/docs/_layouts/default.html | 58 + origin/googletest/docs/_sass/main.scss | 200 + origin/googletest/docs/advanced.md | 2436 ++++++ origin/googletest/docs/assets/css/style.scss | 5 + .../docs/community_created_documentation.md | 7 + origin/googletest/docs/faq.md | 692 ++ origin/googletest/docs/gmock_cheat_sheet.md | 241 + origin/googletest/docs/gmock_cook_book.md | 4344 +++++++++++ origin/googletest/docs/gmock_faq.md | 390 + origin/googletest/docs/gmock_for_dummies.md | 700 ++ origin/googletest/docs/index.md | 22 + origin/googletest/docs/pkgconfig.md | 144 + origin/googletest/docs/platforms.md | 8 + origin/googletest/docs/primer.md | 483 ++ origin/googletest/docs/quickstart-bazel.md | 153 + origin/googletest/docs/quickstart-cmake.md | 157 + origin/googletest/docs/reference/actions.md | 115 + origin/googletest/docs/reference/assertions.md | 633 ++ origin/googletest/docs/reference/matchers.md | 302 + origin/googletest/docs/reference/mocking.md | 589 ++ origin/googletest/docs/reference/testing.md | 1432 ++++ origin/googletest/docs/samples.md | 22 + origin/googletest/googlemock/CMakeLists.txt | 209 + origin/googletest/googlemock/README.md | 40 + origin/googletest/googlemock/cmake/gmock.pc.in | 10 + .../googletest/googlemock/cmake/gmock_main.pc.in | 10 + origin/googletest/googlemock/docs/README.md | 4 + .../googlemock/include/gmock/gmock-actions.h | 2297 ++++++ .../googlemock/include/gmock/gmock-cardinalities.h | 159 + .../include/gmock/gmock-function-mocker.h | 518 ++ .../googlemock/include/gmock/gmock-matchers.h | 5623 ++++++++++++++ .../googlemock/include/gmock/gmock-more-actions.h | 658 ++ .../googlemock/include/gmock/gmock-more-matchers.h | 120 + .../googlemock/include/gmock/gmock-nice-strict.h | 277 + .../googlemock/include/gmock/gmock-spec-builders.h | 2148 ++++++ origin/googletest/googlemock/include/gmock/gmock.h | 96 + .../include/gmock/internal/custom/README.md | 18 + .../internal/custom/gmock-generated-actions.h | 7 + .../include/gmock/internal/custom/gmock-matchers.h | 37 + .../include/gmock/internal/custom/gmock-port.h | 40 + .../include/gmock/internal/gmock-internal-utils.h | 487 ++ .../googlemock/include/gmock/internal/gmock-port.h | 139 + .../googlemock/include/gmock/internal/gmock-pp.h | 279 + origin/googletest/googlemock/src/gmock-all.cc | 46 + .../googlemock/src/gmock-cardinalities.cc | 155 + .../googlemock/src/gmock-internal-utils.cc | 257 + origin/googletest/googlemock/src/gmock-matchers.cc | 479 ++ .../googlemock/src/gmock-spec-builders.cc | 791 ++ origin/googletest/googlemock/src/gmock.cc | 225 + origin/googletest/googlemock/src/gmock_main.cc | 73 + origin/googletest/googlemock/test/BUILD.bazel | 118 + .../googlemock/test/gmock-actions_test.cc | 2169 ++++++ .../googlemock/test/gmock-cardinalities_test.cc | 424 ++ .../googlemock/test/gmock-function-mocker_test.cc | 998 +++ .../googlemock/test/gmock-internal-utils_test.cc | 766 ++ .../test/gmock-matchers-arithmetic_test.cc | 1516 ++++ .../test/gmock-matchers-comparisons_test.cc | 2361 ++++++ .../test/gmock-matchers-containers_test.cc | 3137 ++++++++ .../googlemock/test/gmock-matchers-misc_test.cc | 1823 +++++ .../googlemock/test/gmock-matchers_test.h | 192 + .../googlemock/test/gmock-more-actions_test.cc | 1550 ++++ .../googlemock/test/gmock-nice-strict_test.cc | 541 ++ .../googletest/googlemock/test/gmock-port_test.cc | 42 + .../googlemock/test/gmock-pp-string_test.cc | 205 + origin/googletest/googlemock/test/gmock-pp_test.cc | 83 + .../googlemock/test/gmock-spec-builders_test.cc | 2600 +++++++ .../googletest/googlemock/test/gmock_all_test.cc | 49 + origin/googletest/googlemock/test/gmock_ex_test.cc | 80 + .../googletest/googlemock/test/gmock_leak_test.py | 113 + .../googletest/googlemock/test/gmock_leak_test_.cc | 99 + .../googletest/googlemock/test/gmock_link2_test.cc | 38 + .../googletest/googlemock/test/gmock_link_test.cc | 38 + .../googletest/googlemock/test/gmock_link_test.h | 684 ++ .../googlemock/test/gmock_output_test.py | 190 + .../googlemock/test/gmock_output_test_.cc | 286 + .../googlemock/test/gmock_output_test_golden.txt | 335 + .../googlemock/test/gmock_stress_test.cc | 227 + origin/googletest/googlemock/test/gmock_test.cc | 179 + .../googletest/googlemock/test/gmock_test_utils.py | 91 + origin/googletest/googletest/CMakeLists.txt | 330 + origin/googletest/googletest/README.md | 231 + origin/googletest/googletest/cmake/Config.cmake.in | 9 + origin/googletest/googletest/cmake/gtest.pc.in | 9 + .../googletest/googletest/cmake/gtest_main.pc.in | 10 + .../googletest/cmake/internal_utils.cmake | 332 + origin/googletest/googletest/cmake/libgtest.la.in | 21 + origin/googletest/googletest/docs/README.md | 4 + .../include/gtest/gtest-assertion-result.h | 237 + .../googletest/include/gtest/gtest-death-test.h | 345 + .../googletest/include/gtest/gtest-matchers.h | 923 +++ .../googletest/include/gtest/gtest-message.h | 252 + .../googletest/include/gtest/gtest-param-test.h | 546 ++ .../googletest/include/gtest/gtest-printers.h | 1161 +++ .../googletest/include/gtest/gtest-spi.h | 250 + .../googletest/include/gtest/gtest-test-part.h | 192 + .../googletest/include/gtest/gtest-typed-test.h | 331 + origin/googletest/googletest/include/gtest/gtest.h | 2321 ++++++ .../googletest/include/gtest/gtest_pred_impl.h | 279 + .../googletest/include/gtest/gtest_prod.h | 60 + .../include/gtest/internal/custom/README.md | 44 + .../include/gtest/internal/custom/gtest-port.h | 37 + .../include/gtest/internal/custom/gtest-printers.h | 42 + .../include/gtest/internal/custom/gtest.h | 37 + .../gtest/internal/gtest-death-test-internal.h | 307 + .../include/gtest/internal/gtest-filepath.h | 227 + .../include/gtest/internal/gtest-internal.h | 1560 ++++ .../include/gtest/internal/gtest-param-util.h | 1026 +++ .../include/gtest/internal/gtest-port-arch.h | 122 + .../googletest/include/gtest/internal/gtest-port.h | 2481 +++++++ .../include/gtest/internal/gtest-string.h | 178 + .../include/gtest/internal/gtest-type-util.h | 220 + .../googletest/googletest/samples/prime_tables.h | 125 + origin/googletest/googletest/samples/sample1.cc | 66 + origin/googletest/googletest/samples/sample1.h | 41 + .../googletest/samples/sample10_unittest.cc | 138 + .../googletest/samples/sample1_unittest.cc | 148 + origin/googletest/googletest/samples/sample2.cc | 54 + origin/googletest/googletest/samples/sample2.h | 79 + .../googletest/samples/sample2_unittest.cc | 107 + origin/googletest/googletest/samples/sample3-inl.h | 171 + .../googletest/samples/sample3_unittest.cc | 146 + origin/googletest/googletest/samples/sample4.cc | 50 + origin/googletest/googletest/samples/sample4.h | 53 + .../googletest/samples/sample4_unittest.cc | 53 + .../googletest/samples/sample5_unittest.cc | 189 + .../googletest/samples/sample6_unittest.cc | 214 + .../googletest/samples/sample7_unittest.cc | 113 + .../googletest/samples/sample8_unittest.cc | 154 + .../googletest/samples/sample9_unittest.cc | 148 + origin/googletest/googletest/src/gtest-all.cc | 49 + .../googletest/src/gtest-assertion-result.cc | 77 + .../googletest/googletest/src/gtest-death-test.cc | 1585 ++++ origin/googletest/googletest/src/gtest-filepath.cc | 414 ++ .../googletest/googletest/src/gtest-internal-inl.h | 1218 +++ origin/googletest/googletest/src/gtest-matchers.cc | 98 + origin/googletest/googletest/src/gtest-port.cc | 1392 ++++ origin/googletest/googletest/src/gtest-printers.cc | 555 ++ .../googletest/googletest/src/gtest-test-part.cc | 106 + .../googletest/googletest/src/gtest-typed-test.cc | 108 + origin/googletest/googletest/src/gtest.cc | 6906 +++++++++++++++++ origin/googletest/googletest/src/gtest_main.cc | 66 + origin/googletest/googletest/test/BUILD.bazel | 595 ++ .../test/googletest-break-on-failure-unittest.py | 195 + .../test/googletest-break-on-failure-unittest_.cc | 83 + .../test/googletest-catch-exceptions-test.py | 315 + .../test/googletest-catch-exceptions-test_.cc | 289 + .../googletest/test/googletest-color-test.py | 129 + .../googletest/test/googletest-color-test_.cc | 60 + .../googletest/test/googletest-death-test-test.cc | 1508 ++++ .../test/googletest-death-test_ex_test.cc | 91 + .../googletest/test/googletest-env-var-test.py | 120 + .../googletest/test/googletest-env-var-test_.cc | 130 + .../test/googletest-failfast-unittest.py | 461 ++ .../test/googletest-failfast-unittest_.cc | 166 + .../googletest/test/googletest-filepath-test.cc | 671 ++ .../googletest/test/googletest-filter-unittest.py | 746 ++ .../googletest/test/googletest-filter-unittest_.cc | 106 + .../test/googletest-global-environment-unittest.py | 141 + .../googletest-global-environment-unittest_.cc | 58 + .../test/googletest-json-outfiles-test.py | 180 + .../test/googletest-json-output-unittest.py | 820 +++ .../test/googletest-list-tests-unittest.py | 225 + .../test/googletest-list-tests-unittest_.cc | 143 + .../googletest/test/googletest-listener-test.cc | 509 ++ .../googletest/test/googletest-message-test.cc | 184 + .../googletest/test/googletest-options-test.cc | 222 + .../test/googletest-output-test-golden-lin.txt | 1206 +++ .../googletest/test/googletest-output-test.py | 385 + .../googletest/test/googletest-output-test_.cc | 1058 +++ .../googletest-param-test-invalid-name1-test.py | 63 + .../googletest-param-test-invalid-name1-test_.cc | 46 + .../googletest-param-test-invalid-name2-test.py | 63 + .../googletest-param-test-invalid-name2-test_.cc | 52 + .../googletest/test/googletest-param-test-test.cc | 1173 +++ .../googletest/test/googletest-param-test-test.h | 49 + .../googletest/test/googletest-param-test2-test.cc | 58 + .../googletest/test/googletest-port-test.cc | 1301 ++++ .../googletest/test/googletest-printers-test.cc | 2018 +++++ .../test/googletest-setuptestsuite-test.py | 58 + .../test/googletest-setuptestsuite-test_.cc | 44 + .../googletest/test/googletest-shuffle-test.py | 378 + .../googletest/test/googletest-shuffle-test_.cc | 99 + .../googletest/test/googletest-test-part-test.cc | 220 + .../test/googletest-throw-on-failure-test.py | 166 + .../test/googletest-throw-on-failure-test_.cc | 71 + .../test/googletest-uninitialized-test.py | 70 + .../test/googletest-uninitialized-test_.cc | 39 + .../googletest/test/gtest-typed-test2_test.cc | 39 + .../googletest/test/gtest-typed-test_test.cc | 423 ++ .../googletest/test/gtest-typed-test_test.h | 57 + .../googletest/test/gtest-unittest-api_test.cc | 328 + .../googletest/googletest/test/gtest_all_test.cc | 46 + .../test/gtest_assert_by_exception_test.cc | 112 + .../googletest/googletest/test/gtest_dirs_test.cc | 101 + .../googletest/test/gtest_environment_test.cc | 179 + .../googletest/googletest/test/gtest_help_test.py | 201 + .../googletest/googletest/test/gtest_help_test_.cc | 44 + .../googletest/test/gtest_json_test_utils.py | 64 + .../googletest/test/gtest_list_output_unittest.py | 289 + .../googletest/test/gtest_list_output_unittest_.cc | 77 + .../googletest/test/gtest_main_unittest.cc | 42 + .../googletest/test/gtest_no_test_unittest.cc | 54 + .../googletest/test/gtest_pred_impl_unittest.cc | 2070 ++++++ .../googletest/test/gtest_premature_exit_test.cc | 128 + .../googletest/googletest/test/gtest_prod_test.cc | 56 + .../googletest/test/gtest_repeat_test.cc | 222 + .../test/gtest_skip_check_output_test.py | 60 + .../gtest_skip_environment_check_output_test.py | 55 + .../test/gtest_skip_in_environment_setup_test.cc | 50 + .../googletest/googletest/test/gtest_skip_test.cc | 51 + .../googletest/test/gtest_sole_header_test.cc | 54 + .../googletest/test/gtest_stress_test.cc | 245 + .../test/gtest_test_macro_stack_footprint_test.cc | 89 + .../googletest/googletest/test/gtest_test_utils.py | 262 + .../googletest/test/gtest_testbridge_test.py | 63 + .../googletest/test/gtest_testbridge_test_.cc | 42 + .../test/gtest_throw_on_failure_ex_test.cc | 90 + .../googletest/googletest/test/gtest_unittest.cc | 7783 ++++++++++++++++++++ .../googletest/test/gtest_xml_outfile1_test_.cc | 43 + .../googletest/test/gtest_xml_outfile2_test_.cc | 77 + .../googletest/test/gtest_xml_outfiles_test.py | 147 + .../googletest/test/gtest_xml_output_unittest.py | 469 ++ .../googletest/test/gtest_xml_output_unittest_.cc | 197 + .../googletest/test/gtest_xml_test_utils.py | 242 + origin/googletest/googletest/test/production.cc | 35 + origin/googletest/googletest/test/production.h | 55 + origin/googletest/googletest_deps.bzl | 22 + 246 files changed, 110718 insertions(+) diff --cc origin/googletest/.clang-format index 000000000000,000000000000..5b9bfe6d2242 new file mode 100644 --- /dev/null +++ b/origin/googletest/.clang-format @@@ -1,0 -1,0 +1,4 @@@ ++# Run manually to reformat a file: ++# clang-format -i --style=file ++Language: Cpp ++BasedOnStyle: Google diff --cc origin/googletest/.github/ISSUE_TEMPLATE/00-bug_report.yml index 000000000000,000000000000..586779ad2d61 new file mode 100644 --- /dev/null +++ b/origin/googletest/.github/ISSUE_TEMPLATE/00-bug_report.yml @@@ -1,0 -1,0 +1,53 @@@ ++name: Bug Report ++description: Let us know that something does not work as expected. ++title: "[Bug]: Please title this bug report" ++body: ++ - type: textarea ++ id: what-happened ++ attributes: ++ label: Describe the issue ++ description: What happened, and what did you expect to happen? ++ validations: ++ required: true ++ - type: textarea ++ id: steps ++ attributes: ++ label: Steps to reproduce the problem ++ description: It is important that we are able to reproduce the problem that you are experiencing. Please provide all code and relevant steps to reproduce the problem, including your `BUILD`/`CMakeLists.txt` file and build commands. Links to a GitHub branch or [godbolt.org](https://godbolt.org/) that demonstrate the problem are also helpful. ++ validations: ++ required: true ++ - type: textarea ++ id: version ++ attributes: ++ label: What version of GoogleTest are you using? ++ description: Please include the output of `git rev-parse HEAD` or the GoogleTest release version number that you are using. ++ validations: ++ required: true ++ - type: textarea ++ id: os ++ attributes: ++ label: What operating system and version are you using? ++ description: If you are using a Linux distribution please include the name and version of the distribution as well. ++ validations: ++ required: true ++ - type: textarea ++ id: compiler ++ attributes: ++ label: What compiler and version are you using? ++ description: Please include the output of `gcc -v` or `clang -v`, or the equivalent for your compiler. ++ validations: ++ required: true ++ - type: textarea ++ id: buildsystem ++ attributes: ++ label: What build system are you using? ++ description: Please include the output of `bazel --version` or `cmake --version`, or the equivalent for your build system. ++ validations: ++ required: true ++ - type: textarea ++ id: additional ++ attributes: ++ label: Additional context ++ description: Add any other context about the problem here. ++ validations: ++ required: false diff --cc origin/googletest/.github/ISSUE_TEMPLATE/10-feature_request.yml index 000000000000,000000000000..f3bbc091e8e9 new file mode 100644 --- /dev/null +++ b/origin/googletest/.github/ISSUE_TEMPLATE/10-feature_request.yml @@@ -1,0 -1,0 +1,33 @@@ ++name: Feature request ++description: Propose a new feature. ++title: "[FR]: Please title this feature request" ++labels: "enhancement" ++body: ++ - type: textarea ++ id: version ++ attributes: ++ label: Does the feature exist in the most recent commit? ++ description: We recommend using the latest commit from GitHub in your projects. ++ validations: ++ required: true ++ - type: textarea ++ id: why ++ attributes: ++ label: Why do we need this feature? ++ description: Ideally, explain why a combination of existing features cannot be used instead. ++ validations: ++ required: true ++ - type: textarea ++ id: proposal ++ attributes: ++ label: Describe the proposal. ++ description: Include a detailed description of the feature, with usage examples. ++ validations: ++ required: true ++ - type: textarea ++ id: platform ++ attributes: ++ label: Is the feature specific to an operating system, compiler, or build system version? ++ description: If it is, please specify which versions. ++ validations: ++ required: true diff --cc origin/googletest/.github/ISSUE_TEMPLATE/config.yml index 000000000000,000000000000..65170d10a782 new file mode 100644 --- /dev/null +++ b/origin/googletest/.github/ISSUE_TEMPLATE/config.yml @@@ -1,0 -1,0 +1,5 @@@ ++blank_issues_enabled: false ++contact_links: ++ - name: Get Help ++ url: https://github.com/google/googletest/discussions ++ about: Please ask and answer questions here. diff --cc origin/googletest/.github/workflows/gtest-ci.yml index 000000000000,000000000000..03a8cc5e287b new file mode 100644 --- /dev/null +++ b/origin/googletest/.github/workflows/gtest-ci.yml @@@ -1,0 -1,0 +1,43 @@@ ++name: ci ++ ++on: ++ push: ++ pull_request: ++ ++env: ++ BAZEL_CXXOPTS: -std=c++14 ++ ++jobs: ++ Linux: ++ runs-on: ubuntu-latest ++ steps: ++ ++ - uses: actions/checkout@v3 ++ with: ++ fetch-depth: 0 ++ ++ - name: Tests ++ run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ... ++ ++ macOS: ++ runs-on: macos-latest ++ steps: ++ ++ - uses: actions/checkout@v3 ++ with: ++ fetch-depth: 0 ++ ++ - name: Tests ++ run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ... ++ ++ ++ Windows: ++ runs-on: windows-latest ++ steps: ++ ++ - uses: actions/checkout@v3 ++ with: ++ fetch-depth: 0 ++ ++ - name: Tests ++ run: bazel test --cxxopt=/std:c++14 --features=external_include_paths --test_output=errors ... diff --cc origin/googletest/.gitignore index 000000000000,000000000000..fede02f65093 new file mode 100644 --- /dev/null +++ b/origin/googletest/.gitignore @@@ -1,0 -1,0 +1,88 @@@ ++# Ignore CI build directory ++build/ ++xcuserdata ++cmake-build-debug/ ++.idea/ ++bazel-bin ++bazel-genfiles ++bazel-googletest ++bazel-out ++bazel-testlogs ++# python ++*.pyc ++ ++# Visual Studio files ++.vs ++*.sdf ++*.opensdf ++*.VC.opendb ++*.suo ++*.user ++_ReSharper.Caches/ ++Win32-Debug/ ++Win32-Release/ ++x64-Debug/ ++x64-Release/ ++ ++# VSCode files ++.cache/ ++cmake-variants.yaml ++ ++# Ignore autoconf / automake files ++Makefile.in ++aclocal.m4 ++configure ++build-aux/ ++autom4te.cache/ ++googletest/m4/libtool.m4 ++googletest/m4/ltoptions.m4 ++googletest/m4/ltsugar.m4 ++googletest/m4/ltversion.m4 ++googletest/m4/lt~obsolete.m4 ++googlemock/m4 ++ ++# Ignore generated directories. ++googlemock/fused-src/ ++googletest/fused-src/ ++ ++# macOS files ++.DS_Store ++googletest/.DS_Store ++googletest/xcode/.DS_Store ++ ++# Ignore cmake generated directories and files. ++CMakeFiles ++CTestTestfile.cmake ++Makefile ++cmake_install.cmake ++googlemock/CMakeFiles ++googlemock/CTestTestfile.cmake ++googlemock/Makefile ++googlemock/cmake_install.cmake ++googlemock/gtest ++/bin ++/googlemock/gmock.dir ++/googlemock/gmock_main.dir ++/googlemock/RUN_TESTS.vcxproj.filters ++/googlemock/RUN_TESTS.vcxproj ++/googlemock/INSTALL.vcxproj.filters ++/googlemock/INSTALL.vcxproj ++/googlemock/gmock_main.vcxproj.filters ++/googlemock/gmock_main.vcxproj ++/googlemock/gmock.vcxproj.filters ++/googlemock/gmock.vcxproj ++/googlemock/gmock.sln ++/googlemock/ALL_BUILD.vcxproj.filters ++/googlemock/ALL_BUILD.vcxproj ++/lib ++/Win32 ++/ZERO_CHECK.vcxproj.filters ++/ZERO_CHECK.vcxproj ++/RUN_TESTS.vcxproj.filters ++/RUN_TESTS.vcxproj ++/INSTALL.vcxproj.filters ++/INSTALL.vcxproj ++/googletest-distribution.sln ++/CMakeCache.txt ++/ALL_BUILD.vcxproj.filters ++/ALL_BUILD.vcxproj diff --cc origin/googletest/.travis.yml index 000000000000,000000000000..4e7413a4f9a3 new file mode 100644 --- /dev/null +++ b/origin/googletest/.travis.yml @@@ -1,0 -1,0 +1,81 @@@ ++# Build matrix / environment variable are explained on: ++# https://docs.travis-ci.com/user/customizing-the-build/ ++# This file can be validated on: ++# http://lint.travis-ci.org/ ++ ++sudo: false ++language: cpp ++ ++# Define the matrix explicitly, manually expanding the combinations of (os, compiler, env). ++# It is more tedious, but grants us far more flexibility. ++matrix: ++ include: ++ - os: linux ++ compiler: gcc ++ sudo : true ++ install: ./ci/install-linux.sh && ./ci/log-config.sh ++ script: ./ci/build-linux-bazel.sh ++ - os: linux ++ compiler: clang ++ sudo : true ++ install: ./ci/install-linux.sh && ./ci/log-config.sh ++ script: ./ci/build-linux-bazel.sh ++ - os: linux ++ group: deprecated-2017Q4 ++ compiler: gcc ++ install: ./ci/install-linux.sh && ./ci/log-config.sh ++ script: ./ci/build-linux-autotools.sh ++ - os: linux ++ group: deprecated-2017Q4 ++ compiler: gcc ++ env: BUILD_TYPE=Debug VERBOSE=1 CXX_FLAGS=-std=c++11 ++ - os: linux ++ group: deprecated-2017Q4 ++ compiler: clang ++ env: BUILD_TYPE=Debug VERBOSE=1 ++ - os: linux ++ group: deprecated-2017Q4 ++ compiler: clang ++ env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 ++ - os: linux ++ compiler: clang ++ env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON ++ - os: osx ++ compiler: gcc ++ env: BUILD_TYPE=Debug VERBOSE=1 ++ - os: osx ++ compiler: gcc ++ env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 ++ - os: osx ++ compiler: clang ++ env: BUILD_TYPE=Debug VERBOSE=1 ++ if: type != pull_request ++ - os: osx ++ env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 ++ if: type != pull_request ++ ++# These are the install and build (script) phases for the most common entries in the matrix. They could be included ++# in each entry in the matrix, but that is just repetitive. ++install: ++ - ./ci/install-${TRAVIS_OS_NAME}.sh ++ - . ./ci/env-${TRAVIS_OS_NAME}.sh ++ - ./ci/log-config.sh ++ ++script: ./ci/travis.sh ++ ++# For sudo=false builds this section installs the necessary dependencies. ++addons: ++ apt: ++ # List of whitelisted in travis packages for ubuntu-precise can be found here: ++ # https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise ++ # List of whitelisted in travis apt-sources: ++ # https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json ++ sources: ++ - ubuntu-toolchain-r-test ++ - llvm-toolchain-precise-3.9 ++ packages: ++ - g++-4.9 ++ - clang-3.9 ++ ++notifications: ++ email: false diff --cc origin/googletest/BUILD.bazel index 000000000000,000000000000..b1e3b7fba89a new file mode 100644 --- /dev/null +++ b/origin/googletest/BUILD.bazel @@@ -1,0 -1,0 +1,219 @@@ ++# Copyright 2017 Google Inc. ++# All Rights Reserved. ++# ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are ++# met: ++# ++# * Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# * Redistributions in binary form must reproduce the above ++# copyright notice, this list of conditions and the following disclaimer ++# in the documentation and/or other materials provided with the ++# distribution. ++# * Neither the name of Google Inc. nor the names of its ++# contributors may be used to endorse or promote products derived from ++# this software without specific prior written permission. ++# ++# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++# ++# Bazel Build for Google C++ Testing Framework(Google Test) ++ ++package(default_visibility = ["//visibility:public"]) ++ ++licenses(["notice"]) ++ ++exports_files(["LICENSE"]) ++ ++config_setting( ++ name = "qnx", ++ constraint_values = ["@platforms//os:qnx"], ++) ++ ++config_setting( ++ name = "windows", ++ constraint_values = ["@platforms//os:windows"], ++) ++ ++config_setting( ++ name = "freebsd", ++ constraint_values = ["@platforms//os:freebsd"], ++) ++ ++config_setting( ++ name = "openbsd", ++ constraint_values = ["@platforms//os:openbsd"], ++) ++ ++config_setting( ++ name = "msvc_compiler", ++ flag_values = { ++ "@bazel_tools//tools/cpp:compiler": "msvc-cl", ++ }, ++ visibility = [":__subpackages__"], ++) ++ ++config_setting( ++ name = "has_absl", ++ values = {"define": "absl=1"}, ++) ++ ++# Library that defines the FRIEND_TEST macro. ++cc_library( ++ name = "gtest_prod", ++ hdrs = ["googletest/include/gtest/gtest_prod.h"], ++ includes = ["googletest/include"], ++) ++ ++# Google Test including Google Mock ++cc_library( ++ name = "gtest", ++ srcs = glob( ++ include = [ ++ "googletest/src/*.cc", ++ "googletest/src/*.h", ++ "googletest/include/gtest/**/*.h", ++ "googlemock/src/*.cc", ++ "googlemock/include/gmock/**/*.h", ++ ], ++ exclude = [ ++ "googletest/src/gtest-all.cc", ++ "googletest/src/gtest_main.cc", ++ "googlemock/src/gmock-all.cc", ++ "googlemock/src/gmock_main.cc", ++ ], ++ ), ++ hdrs = glob([ ++ "googletest/include/gtest/*.h", ++ "googlemock/include/gmock/*.h", ++ ]), ++ copts = select({ ++ ":qnx": [], ++ ":windows": [], ++ "//conditions:default": ["-pthread"], ++ }), ++ defines = select({ ++ ":has_absl": ["GTEST_HAS_ABSL=1"], ++ "//conditions:default": [], ++ }), ++ features = select({ ++ ":windows": ["windows_export_all_symbols"], ++ "//conditions:default": [], ++ }), ++ includes = [ ++ "googlemock", ++ "googlemock/include", ++ "googletest", ++ "googletest/include", ++ ], ++ linkopts = select({ ++ ":qnx": ["-lregex"], ++ ":windows": [], ++ ":freebsd": [ ++ "-lm", ++ "-pthread", ++ ], ++ ":openbsd": [ ++ "-lm", ++ "-pthread", ++ ], ++ "//conditions:default": ["-pthread"], ++ }), ++ deps = select({ ++ ":has_absl": [ ++ "@com_google_absl//absl/container:flat_hash_set", ++ "@com_google_absl//absl/debugging:failure_signal_handler", ++ "@com_google_absl//absl/debugging:stacktrace", ++ "@com_google_absl//absl/debugging:symbolize", ++ "@com_google_absl//absl/flags:flag", ++ "@com_google_absl//absl/flags:parse", ++ "@com_google_absl//absl/flags:reflection", ++ "@com_google_absl//absl/flags:usage", ++ "@com_google_absl//absl/strings", ++ "@com_google_absl//absl/types:any", ++ "@com_google_absl//absl/types:optional", ++ "@com_google_absl//absl/types:variant", ++ "@com_googlesource_code_re2//:re2", ++ ], ++ "//conditions:default": [], ++ }), ++) ++ ++cc_library( ++ name = "gtest_main", ++ srcs = ["googlemock/src/gmock_main.cc"], ++ features = select({ ++ ":windows": ["windows_export_all_symbols"], ++ "//conditions:default": [], ++ }), ++ deps = [":gtest"], ++) ++ ++# The following rules build samples of how to use gTest. ++cc_library( ++ name = "gtest_sample_lib", ++ srcs = [ ++ "googletest/samples/sample1.cc", ++ "googletest/samples/sample2.cc", ++ "googletest/samples/sample4.cc", ++ ], ++ hdrs = [ ++ "googletest/samples/prime_tables.h", ++ "googletest/samples/sample1.h", ++ "googletest/samples/sample2.h", ++ "googletest/samples/sample3-inl.h", ++ "googletest/samples/sample4.h", ++ ], ++ features = select({ ++ ":windows": ["windows_export_all_symbols"], ++ "//conditions:default": [], ++ }), ++) ++ ++cc_test( ++ name = "gtest_samples", ++ size = "small", ++ # All Samples except: ++ # sample9 (main) ++ # sample10 (main and takes a command line option and needs to be separate) ++ srcs = [ ++ "googletest/samples/sample1_unittest.cc", ++ "googletest/samples/sample2_unittest.cc", ++ "googletest/samples/sample3_unittest.cc", ++ "googletest/samples/sample4_unittest.cc", ++ "googletest/samples/sample5_unittest.cc", ++ "googletest/samples/sample6_unittest.cc", ++ "googletest/samples/sample7_unittest.cc", ++ "googletest/samples/sample8_unittest.cc", ++ ], ++ linkstatic = 0, ++ deps = [ ++ "gtest_sample_lib", ++ ":gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "sample9_unittest", ++ size = "small", ++ srcs = ["googletest/samples/sample9_unittest.cc"], ++ deps = [":gtest"], ++) ++ ++cc_test( ++ name = "sample10_unittest", ++ size = "small", ++ srcs = ["googletest/samples/sample10_unittest.cc"], ++ deps = [":gtest"], ++) diff --cc origin/googletest/CMakeLists.txt index 000000000000,000000000000..089ac987fb60 new file mode 100644 --- /dev/null +++ b/origin/googletest/CMakeLists.txt @@@ -1,0 -1,0 +1,27 @@@ ++# Note: CMake support is community-based. The maintainers do not use CMake ++# internally. ++ ++cmake_minimum_required(VERSION 3.13) ++ ++project(googletest-distribution) ++set(GOOGLETEST_VERSION 1.14.0) ++ ++if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) ++ set(CMAKE_CXX_EXTENSIONS OFF) ++endif() ++ ++enable_testing() ++ ++include(CMakeDependentOption) ++include(GNUInstallDirs) ++ ++#Note that googlemock target already builds googletest ++option(BUILD_GMOCK "Builds the googlemock subproject" ON) ++option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) ++option(GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF) ++ ++if(BUILD_GMOCK) ++ add_subdirectory( googlemock ) ++else() ++ add_subdirectory( googletest ) ++endif() diff --cc origin/googletest/CONTRIBUTING.md index 000000000000,000000000000..8bed14b2666d new file mode 100644 --- /dev/null +++ b/origin/googletest/CONTRIBUTING.md @@@ -1,0 -1,0 +1,141 @@@ ++# How to become a contributor and submit your own code ++ ++## Contributor License Agreements ++ ++We'd love to accept your patches! Before we can take them, we have to jump a ++couple of legal hurdles. ++ ++Please fill out either the individual or corporate Contributor License Agreement ++(CLA). ++ ++* If you are an individual writing original source code and you're sure you ++ own the intellectual property, then you'll need to sign an ++ [individual CLA](https://developers.google.com/open-source/cla/individual). ++* If you work for a company that wants to allow you to contribute your work, ++ then you'll need to sign a ++ [corporate CLA](https://developers.google.com/open-source/cla/corporate). ++ ++Follow either of the two links above to access the appropriate CLA and ++instructions for how to sign and return it. Once we receive it, we'll be able to ++accept your pull requests. ++ ++## Are you a Googler? ++ ++If you are a Googler, please make an attempt to submit an internal contribution ++rather than a GitHub Pull Request. If you are not able to submit internally, a ++PR is acceptable as an alternative. ++ ++## Contributing A Patch ++ ++1. Submit an issue describing your proposed change to the ++ [issue tracker](https://github.com/google/googletest/issues). ++2. Please don't mix more than one logical change per submittal, because it ++ makes the history hard to follow. If you want to make a change that doesn't ++ have a corresponding issue in the issue tracker, please create one. ++3. Also, coordinate with team members that are listed on the issue in question. ++ This ensures that work isn't being duplicated and communicating your plan ++ early also generally leads to better patches. ++4. If your proposed change is accepted, and you haven't already done so, sign a ++ Contributor License Agreement ++ ([see details above](#contributor-license-agreements)). ++5. Fork the desired repo, develop and test your code changes. ++6. Ensure that your code adheres to the existing style in the sample to which ++ you are contributing. ++7. Ensure that your code has an appropriate set of unit tests which all pass. ++8. Submit a pull request. ++ ++## The Google Test and Google Mock Communities ++ ++The Google Test community exists primarily through the ++[discussion group](http://groups.google.com/group/googletestframework) and the ++GitHub repository. Likewise, the Google Mock community exists primarily through ++their own [discussion group](http://groups.google.com/group/googlemock). You are ++definitely encouraged to contribute to the discussion and you can also help us ++to keep the effectiveness of the group high by following and promoting the ++guidelines listed here. ++ ++### Please Be Friendly ++ ++Showing courtesy and respect to others is a vital part of the Google culture, ++and we strongly encourage everyone participating in Google Test development to ++join us in accepting nothing less. Of course, being courteous is not the same as ++failing to constructively disagree with each other, but it does mean that we ++should be respectful of each other when enumerating the 42 technical reasons ++that a particular proposal may not be the best choice. There's never a reason to ++be antagonistic or dismissive toward anyone who is sincerely trying to ++contribute to a discussion. ++ ++Sure, C++ testing is serious business and all that, but it's also a lot of fun. ++Let's keep it that way. Let's strive to be one of the friendliest communities in ++all of open source. ++ ++As always, discuss Google Test in the official GoogleTest discussion group. You ++don't have to actually submit code in order to sign up. Your participation ++itself is a valuable contribution. ++ ++## Style ++ ++To keep the source consistent, readable, diffable and easy to merge, we use a ++fairly rigid coding style, as defined by the ++[google-styleguide](https://github.com/google/styleguide) project. All patches ++will be expected to conform to the style outlined ++[here](https://google.github.io/styleguide/cppguide.html). Use ++[.clang-format](https://github.com/google/googletest/blob/main/.clang-format) to ++check your formatting. ++ ++## Requirements for Contributors ++ ++If you plan to contribute a patch, you need to build Google Test, Google Mock, ++and their own tests from a git checkout, which has further requirements: ++ ++* [Python](https://www.python.org/) v3.6 or newer (for running some of the ++ tests and re-generating certain source files from templates) ++* [CMake](https://cmake.org/) v2.8.12 or newer ++ ++## Developing Google Test and Google Mock ++ ++This section discusses how to make your own changes to the Google Test project. ++ ++### Testing Google Test and Google Mock Themselves ++ ++To make sure your changes work as intended and don't break existing ++functionality, you'll want to compile and run Google Test and GoogleMock's own *** 106516 LINES SKIPPED *** From nobody Sat Oct 19 02:07: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 4XVlMk65VBz5ZVS9; Sat, 19 Oct 2024 02:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVlMk5nF2z4kQT; Sat, 19 Oct 2024 02:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729303666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aZjcYfj7xKsaR9SW409ZneFRSCs6mq/RAAybNa1UOOQ=; b=ybUdSRJtvAv4v9cTYahReb6a+3F0bIGrHcFkWyTeBa2Tq5n+jsAIvkoE3qIbXCQvDs/U6Y hPNwAEUPkyYbIaT2nkITcpE3F5aQo42jIRm+dCOKsbbrd48ntBmYljY+ZbRvIcStrGCNMl G/jD5IhVeJLFFZUgkxDhgX9gIeegxZsP4HKzrkV1cAnGSEQKuBw8T68VbifxMvSTjRgsfB PM6iOV3T0CNAOoASelU2N+RXeY2TAHOxyxiquCBaROVfySREkOUczDkV91XDcsyoaj6F/x xfGR7iTGaYTZWWp0uiWXyXF/HZXRYAZifKeBhxxhGkojbQE9THEoZcktI5di4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729303666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aZjcYfj7xKsaR9SW409ZneFRSCs6mq/RAAybNa1UOOQ=; b=sH5iMgQHgJt/7BsILMhqKKYkFPQnZk/B6Yih5ASBhWS3rboePX2y0qk7hBxbJJPiYJTY1u Ru5DX1xWHcHvNAMYuRyn7K5hL2NyD0duBIUZxLyX044/zJ0+WalcYLrDK9vk3FJOHWUB4k y5nR+5b+9gSCFt58nuCx58XfMsRxCCtmS9hBS0xEhXCi6SiBeSWN8CgHG/6ji8Uyk7Hg6K FCYMfDsesR7s1flCZtj88qqIwyaDldFpC9nrZkqwPByEDPlDgYXh8XHWxA/7ljbBnCobA4 u4GkJSconW0Uyh8WI2vmq6NkCdyKIKXVPQFkPOIi1/Puz2X8rNIOd1zKC3Em7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729303666; a=rsa-sha256; cv=none; b=furRevXoRGo+9oiIsxuryNXgPl0VgpaetJTC3HpyXeGh5+FZF85pxrnblo2AILycqKXfHd xzd2w3eC0yDx/prOAcTuJBic5/E890SdqOt2kyd5oETzJBiox/NAmCE1OFA4Lgfr7SUkaY wyJvNpc9Fx0+2Dih0FyENDHZI5FbuePaga/2HHR3Hbz7NtDbynBNVT5m6Yna3DqFrmZHD0 3Ik9nT6PQ62Bc9h/RcBw5Z0NddB3aMTX4BsgIfteBbfNRxXbLNfObkTyOwcdxovnCt8oIa PgjSQe+F/Gelmx8Fkn5CIHuXRGgtv06sm527C/xST5lr7BaQGRJKTWjJ5/kXZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVlMk5NGRzych; Sat, 19 Oct 2024 02:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49J27k4s064653; Sat, 19 Oct 2024 02:07:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49J27jEa064650; Sat, 19 Oct 2024 02:07:45 GMT (envelope-from git) Date: Sat, 19 Oct 2024 02:07:45 GMT Message-Id: <202410190207.49J27jEa064650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 92c5681cc347 - main - Revert "Add 'origin/googletest/' from commit '8ef491440fcaec96f899d73e08873426c78583a4'" 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92c5681cc3470c88ba3aa0d8a4ecb0a9af0173bf Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=92c5681cc3470c88ba3aa0d8a4ecb0a9af0173bf commit 92c5681cc3470c88ba3aa0d8a4ecb0a9af0173bf Author: Enji Cooper AuthorDate: 2024-10-19 02:07:19 +0000 Commit: Enji Cooper CommitDate: 2024-10-19 02:07:19 +0000 Revert "Add 'origin/googletest/' from commit '8ef491440fcaec96f899d73e08873426c78583a4'" I used the wrong prefix for googletest; try again. This reverts commit a52d355b540f9b7ba13edf20efae5f33e69de189, reversing changes made to bcf81d7794a7b20425cdb48a580d977c49f75251. --- origin/googletest/.clang-format | 4 - .../.github/ISSUE_TEMPLATE/00-bug_report.yml | 53 - .../.github/ISSUE_TEMPLATE/10-feature_request.yml | 33 - .../googletest/.github/ISSUE_TEMPLATE/config.yml | 5 - origin/googletest/.github/workflows/gtest-ci.yml | 43 - origin/googletest/.gitignore | 88 - origin/googletest/.travis.yml | 81 - origin/googletest/BUILD.bazel | 219 - origin/googletest/CMakeLists.txt | 27 - origin/googletest/CONTRIBUTING.md | 141 - origin/googletest/CONTRIBUTORS | 65 - origin/googletest/LICENSE | 28 - origin/googletest/README.md | 146 - origin/googletest/WORKSPACE | 27 - origin/googletest/ci/linux-presubmit.sh | 137 - origin/googletest/ci/macos-presubmit.sh | 76 - origin/googletest/ci/windows-presubmit.bat | 58 - origin/googletest/docs/_config.yml | 1 - origin/googletest/docs/_data/navigation.yml | 43 - origin/googletest/docs/_layouts/default.html | 58 - origin/googletest/docs/_sass/main.scss | 200 - origin/googletest/docs/advanced.md | 2436 ------ origin/googletest/docs/assets/css/style.scss | 5 - .../docs/community_created_documentation.md | 7 - origin/googletest/docs/faq.md | 692 -- origin/googletest/docs/gmock_cheat_sheet.md | 241 - origin/googletest/docs/gmock_cook_book.md | 4344 ----------- origin/googletest/docs/gmock_faq.md | 390 - origin/googletest/docs/gmock_for_dummies.md | 700 -- origin/googletest/docs/index.md | 22 - origin/googletest/docs/pkgconfig.md | 144 - origin/googletest/docs/platforms.md | 8 - origin/googletest/docs/primer.md | 483 -- origin/googletest/docs/quickstart-bazel.md | 153 - origin/googletest/docs/quickstart-cmake.md | 157 - origin/googletest/docs/reference/actions.md | 115 - origin/googletest/docs/reference/assertions.md | 633 -- origin/googletest/docs/reference/matchers.md | 302 - origin/googletest/docs/reference/mocking.md | 589 -- origin/googletest/docs/reference/testing.md | 1432 ---- origin/googletest/docs/samples.md | 22 - origin/googletest/googlemock/CMakeLists.txt | 209 - origin/googletest/googlemock/README.md | 40 - origin/googletest/googlemock/cmake/gmock.pc.in | 10 - .../googletest/googlemock/cmake/gmock_main.pc.in | 10 - origin/googletest/googlemock/docs/README.md | 4 - .../googlemock/include/gmock/gmock-actions.h | 2297 ------ .../googlemock/include/gmock/gmock-cardinalities.h | 159 - .../include/gmock/gmock-function-mocker.h | 518 -- .../googlemock/include/gmock/gmock-matchers.h | 5623 -------------- .../googlemock/include/gmock/gmock-more-actions.h | 658 -- .../googlemock/include/gmock/gmock-more-matchers.h | 120 - .../googlemock/include/gmock/gmock-nice-strict.h | 277 - .../googlemock/include/gmock/gmock-spec-builders.h | 2148 ------ origin/googletest/googlemock/include/gmock/gmock.h | 96 - .../include/gmock/internal/custom/README.md | 18 - .../internal/custom/gmock-generated-actions.h | 7 - .../include/gmock/internal/custom/gmock-matchers.h | 37 - .../include/gmock/internal/custom/gmock-port.h | 40 - .../include/gmock/internal/gmock-internal-utils.h | 487 -- .../googlemock/include/gmock/internal/gmock-port.h | 139 - .../googlemock/include/gmock/internal/gmock-pp.h | 279 - origin/googletest/googlemock/src/gmock-all.cc | 46 - .../googlemock/src/gmock-cardinalities.cc | 155 - .../googlemock/src/gmock-internal-utils.cc | 257 - origin/googletest/googlemock/src/gmock-matchers.cc | 479 -- .../googlemock/src/gmock-spec-builders.cc | 791 -- origin/googletest/googlemock/src/gmock.cc | 225 - origin/googletest/googlemock/src/gmock_main.cc | 73 - origin/googletest/googlemock/test/BUILD.bazel | 118 - .../googlemock/test/gmock-actions_test.cc | 2169 ------ .../googlemock/test/gmock-cardinalities_test.cc | 424 -- .../googlemock/test/gmock-function-mocker_test.cc | 998 --- .../googlemock/test/gmock-internal-utils_test.cc | 766 -- .../test/gmock-matchers-arithmetic_test.cc | 1516 ---- .../test/gmock-matchers-comparisons_test.cc | 2361 ------ .../test/gmock-matchers-containers_test.cc | 3137 -------- .../googlemock/test/gmock-matchers-misc_test.cc | 1823 ----- .../googlemock/test/gmock-matchers_test.h | 192 - .../googlemock/test/gmock-more-actions_test.cc | 1550 ---- .../googlemock/test/gmock-nice-strict_test.cc | 541 -- .../googletest/googlemock/test/gmock-port_test.cc | 42 - .../googlemock/test/gmock-pp-string_test.cc | 205 - origin/googletest/googlemock/test/gmock-pp_test.cc | 83 - .../googlemock/test/gmock-spec-builders_test.cc | 2600 ------- .../googletest/googlemock/test/gmock_all_test.cc | 49 - origin/googletest/googlemock/test/gmock_ex_test.cc | 80 - .../googletest/googlemock/test/gmock_leak_test.py | 113 - .../googletest/googlemock/test/gmock_leak_test_.cc | 99 - .../googletest/googlemock/test/gmock_link2_test.cc | 38 - .../googletest/googlemock/test/gmock_link_test.cc | 38 - .../googletest/googlemock/test/gmock_link_test.h | 684 -- .../googlemock/test/gmock_output_test.py | 190 - .../googlemock/test/gmock_output_test_.cc | 286 - .../googlemock/test/gmock_output_test_golden.txt | 335 - .../googlemock/test/gmock_stress_test.cc | 227 - origin/googletest/googlemock/test/gmock_test.cc | 179 - .../googletest/googlemock/test/gmock_test_utils.py | 91 - origin/googletest/googletest/CMakeLists.txt | 330 - origin/googletest/googletest/README.md | 231 - origin/googletest/googletest/cmake/Config.cmake.in | 9 - origin/googletest/googletest/cmake/gtest.pc.in | 9 - .../googletest/googletest/cmake/gtest_main.pc.in | 10 - .../googletest/cmake/internal_utils.cmake | 332 - origin/googletest/googletest/cmake/libgtest.la.in | 21 - origin/googletest/googletest/docs/README.md | 4 - .../include/gtest/gtest-assertion-result.h | 237 - .../googletest/include/gtest/gtest-death-test.h | 345 - .../googletest/include/gtest/gtest-matchers.h | 923 --- .../googletest/include/gtest/gtest-message.h | 252 - .../googletest/include/gtest/gtest-param-test.h | 546 -- .../googletest/include/gtest/gtest-printers.h | 1161 --- .../googletest/include/gtest/gtest-spi.h | 250 - .../googletest/include/gtest/gtest-test-part.h | 192 - .../googletest/include/gtest/gtest-typed-test.h | 331 - origin/googletest/googletest/include/gtest/gtest.h | 2321 ------ .../googletest/include/gtest/gtest_pred_impl.h | 279 - .../googletest/include/gtest/gtest_prod.h | 60 - .../include/gtest/internal/custom/README.md | 44 - .../include/gtest/internal/custom/gtest-port.h | 37 - .../include/gtest/internal/custom/gtest-printers.h | 42 - .../include/gtest/internal/custom/gtest.h | 37 - .../gtest/internal/gtest-death-test-internal.h | 307 - .../include/gtest/internal/gtest-filepath.h | 227 - .../include/gtest/internal/gtest-internal.h | 1560 ---- .../include/gtest/internal/gtest-param-util.h | 1026 --- .../include/gtest/internal/gtest-port-arch.h | 122 - .../googletest/include/gtest/internal/gtest-port.h | 2481 ------- .../include/gtest/internal/gtest-string.h | 178 - .../include/gtest/internal/gtest-type-util.h | 220 - .../googletest/googletest/samples/prime_tables.h | 125 - origin/googletest/googletest/samples/sample1.cc | 66 - origin/googletest/googletest/samples/sample1.h | 41 - .../googletest/samples/sample10_unittest.cc | 138 - .../googletest/samples/sample1_unittest.cc | 148 - origin/googletest/googletest/samples/sample2.cc | 54 - origin/googletest/googletest/samples/sample2.h | 79 - .../googletest/samples/sample2_unittest.cc | 107 - origin/googletest/googletest/samples/sample3-inl.h | 171 - .../googletest/samples/sample3_unittest.cc | 146 - origin/googletest/googletest/samples/sample4.cc | 50 - origin/googletest/googletest/samples/sample4.h | 53 - .../googletest/samples/sample4_unittest.cc | 53 - .../googletest/samples/sample5_unittest.cc | 189 - .../googletest/samples/sample6_unittest.cc | 214 - .../googletest/samples/sample7_unittest.cc | 113 - .../googletest/samples/sample8_unittest.cc | 154 - .../googletest/samples/sample9_unittest.cc | 148 - origin/googletest/googletest/src/gtest-all.cc | 49 - .../googletest/src/gtest-assertion-result.cc | 77 - .../googletest/googletest/src/gtest-death-test.cc | 1585 ---- origin/googletest/googletest/src/gtest-filepath.cc | 414 -- .../googletest/googletest/src/gtest-internal-inl.h | 1218 --- origin/googletest/googletest/src/gtest-matchers.cc | 98 - origin/googletest/googletest/src/gtest-port.cc | 1392 ---- origin/googletest/googletest/src/gtest-printers.cc | 555 -- .../googletest/googletest/src/gtest-test-part.cc | 106 - .../googletest/googletest/src/gtest-typed-test.cc | 108 - origin/googletest/googletest/src/gtest.cc | 6906 ----------------- origin/googletest/googletest/src/gtest_main.cc | 66 - origin/googletest/googletest/test/BUILD.bazel | 595 -- .../test/googletest-break-on-failure-unittest.py | 195 - .../test/googletest-break-on-failure-unittest_.cc | 83 - .../test/googletest-catch-exceptions-test.py | 315 - .../test/googletest-catch-exceptions-test_.cc | 289 - .../googletest/test/googletest-color-test.py | 129 - .../googletest/test/googletest-color-test_.cc | 60 - .../googletest/test/googletest-death-test-test.cc | 1508 ---- .../test/googletest-death-test_ex_test.cc | 91 - .../googletest/test/googletest-env-var-test.py | 120 - .../googletest/test/googletest-env-var-test_.cc | 130 - .../test/googletest-failfast-unittest.py | 461 -- .../test/googletest-failfast-unittest_.cc | 166 - .../googletest/test/googletest-filepath-test.cc | 671 -- .../googletest/test/googletest-filter-unittest.py | 746 -- .../googletest/test/googletest-filter-unittest_.cc | 106 - .../test/googletest-global-environment-unittest.py | 141 - .../googletest-global-environment-unittest_.cc | 58 - .../test/googletest-json-outfiles-test.py | 180 - .../test/googletest-json-output-unittest.py | 820 --- .../test/googletest-list-tests-unittest.py | 225 - .../test/googletest-list-tests-unittest_.cc | 143 - .../googletest/test/googletest-listener-test.cc | 509 -- .../googletest/test/googletest-message-test.cc | 184 - .../googletest/test/googletest-options-test.cc | 222 - .../test/googletest-output-test-golden-lin.txt | 1206 --- .../googletest/test/googletest-output-test.py | 385 - .../googletest/test/googletest-output-test_.cc | 1058 --- .../googletest-param-test-invalid-name1-test.py | 63 - .../googletest-param-test-invalid-name1-test_.cc | 46 - .../googletest-param-test-invalid-name2-test.py | 63 - .../googletest-param-test-invalid-name2-test_.cc | 52 - .../googletest/test/googletest-param-test-test.cc | 1173 --- .../googletest/test/googletest-param-test-test.h | 49 - .../googletest/test/googletest-param-test2-test.cc | 58 - .../googletest/test/googletest-port-test.cc | 1301 ---- .../googletest/test/googletest-printers-test.cc | 2018 ----- .../test/googletest-setuptestsuite-test.py | 58 - .../test/googletest-setuptestsuite-test_.cc | 44 - .../googletest/test/googletest-shuffle-test.py | 378 - .../googletest/test/googletest-shuffle-test_.cc | 99 - .../googletest/test/googletest-test-part-test.cc | 220 - .../test/googletest-throw-on-failure-test.py | 166 - .../test/googletest-throw-on-failure-test_.cc | 71 - .../test/googletest-uninitialized-test.py | 70 - .../test/googletest-uninitialized-test_.cc | 39 - .../googletest/test/gtest-typed-test2_test.cc | 39 - .../googletest/test/gtest-typed-test_test.cc | 423 -- .../googletest/test/gtest-typed-test_test.h | 57 - .../googletest/test/gtest-unittest-api_test.cc | 328 - .../googletest/googletest/test/gtest_all_test.cc | 46 - .../test/gtest_assert_by_exception_test.cc | 112 - .../googletest/googletest/test/gtest_dirs_test.cc | 101 - .../googletest/test/gtest_environment_test.cc | 179 - .../googletest/googletest/test/gtest_help_test.py | 201 - .../googletest/googletest/test/gtest_help_test_.cc | 44 - .../googletest/test/gtest_json_test_utils.py | 64 - .../googletest/test/gtest_list_output_unittest.py | 289 - .../googletest/test/gtest_list_output_unittest_.cc | 77 - .../googletest/test/gtest_main_unittest.cc | 42 - .../googletest/test/gtest_no_test_unittest.cc | 54 - .../googletest/test/gtest_pred_impl_unittest.cc | 2070 ------ .../googletest/test/gtest_premature_exit_test.cc | 128 - .../googletest/googletest/test/gtest_prod_test.cc | 56 - .../googletest/test/gtest_repeat_test.cc | 222 - .../test/gtest_skip_check_output_test.py | 60 - .../gtest_skip_environment_check_output_test.py | 55 - .../test/gtest_skip_in_environment_setup_test.cc | 50 - .../googletest/googletest/test/gtest_skip_test.cc | 51 - .../googletest/test/gtest_sole_header_test.cc | 54 - .../googletest/test/gtest_stress_test.cc | 245 - .../test/gtest_test_macro_stack_footprint_test.cc | 89 - .../googletest/googletest/test/gtest_test_utils.py | 262 - .../googletest/test/gtest_testbridge_test.py | 63 - .../googletest/test/gtest_testbridge_test_.cc | 42 - .../test/gtest_throw_on_failure_ex_test.cc | 90 - .../googletest/googletest/test/gtest_unittest.cc | 7783 -------------------- .../googletest/test/gtest_xml_outfile1_test_.cc | 43 - .../googletest/test/gtest_xml_outfile2_test_.cc | 77 - .../googletest/test/gtest_xml_outfiles_test.py | 147 - .../googletest/test/gtest_xml_output_unittest.py | 469 -- .../googletest/test/gtest_xml_output_unittest_.cc | 197 - .../googletest/test/gtest_xml_test_utils.py | 242 - origin/googletest/googletest/test/production.cc | 35 - origin/googletest/googletest/test/production.h | 55 - origin/googletest/googletest_deps.bzl | 22 - 246 files changed, 110718 deletions(-) diff --git a/origin/googletest/.clang-format b/origin/googletest/.clang-format deleted file mode 100644 index 5b9bfe6d2242..000000000000 --- a/origin/googletest/.clang-format +++ /dev/null @@ -1,4 +0,0 @@ -# Run manually to reformat a file: -# clang-format -i --style=file -Language: Cpp -BasedOnStyle: Google diff --git a/origin/googletest/.github/ISSUE_TEMPLATE/00-bug_report.yml b/origin/googletest/.github/ISSUE_TEMPLATE/00-bug_report.yml deleted file mode 100644 index 586779ad2d61..000000000000 --- a/origin/googletest/.github/ISSUE_TEMPLATE/00-bug_report.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Bug Report -description: Let us know that something does not work as expected. -title: "[Bug]: Please title this bug report" -body: - - type: textarea - id: what-happened - attributes: - label: Describe the issue - description: What happened, and what did you expect to happen? - validations: - required: true - - type: textarea - id: steps - attributes: - label: Steps to reproduce the problem - description: It is important that we are able to reproduce the problem that you are experiencing. Please provide all code and relevant steps to reproduce the problem, including your `BUILD`/`CMakeLists.txt` file and build commands. Links to a GitHub branch or [godbolt.org](https://godbolt.org/) that demonstrate the problem are also helpful. - validations: - required: true - - type: textarea - id: version - attributes: - label: What version of GoogleTest are you using? - description: Please include the output of `git rev-parse HEAD` or the GoogleTest release version number that you are using. - validations: - required: true - - type: textarea - id: os - attributes: - label: What operating system and version are you using? - description: If you are using a Linux distribution please include the name and version of the distribution as well. - validations: - required: true - - type: textarea - id: compiler - attributes: - label: What compiler and version are you using? - description: Please include the output of `gcc -v` or `clang -v`, or the equivalent for your compiler. - validations: - required: true - - type: textarea - id: buildsystem - attributes: - label: What build system are you using? - description: Please include the output of `bazel --version` or `cmake --version`, or the equivalent for your build system. - validations: - required: true - - type: textarea - id: additional - attributes: - label: Additional context - description: Add any other context about the problem here. - validations: - required: false diff --git a/origin/googletest/.github/ISSUE_TEMPLATE/10-feature_request.yml b/origin/googletest/.github/ISSUE_TEMPLATE/10-feature_request.yml deleted file mode 100644 index f3bbc091e8e9..000000000000 --- a/origin/googletest/.github/ISSUE_TEMPLATE/10-feature_request.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Feature request -description: Propose a new feature. -title: "[FR]: Please title this feature request" -labels: "enhancement" -body: - - type: textarea - id: version - attributes: - label: Does the feature exist in the most recent commit? - description: We recommend using the latest commit from GitHub in your projects. - validations: - required: true - - type: textarea - id: why - attributes: - label: Why do we need this feature? - description: Ideally, explain why a combination of existing features cannot be used instead. - validations: - required: true - - type: textarea - id: proposal - attributes: - label: Describe the proposal. - description: Include a detailed description of the feature, with usage examples. - validations: - required: true - - type: textarea - id: platform - attributes: - label: Is the feature specific to an operating system, compiler, or build system version? - description: If it is, please specify which versions. - validations: - required: true diff --git a/origin/googletest/.github/ISSUE_TEMPLATE/config.yml b/origin/googletest/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 65170d10a782..000000000000 --- a/origin/googletest/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Get Help - url: https://github.com/google/googletest/discussions - about: Please ask and answer questions here. diff --git a/origin/googletest/.github/workflows/gtest-ci.yml b/origin/googletest/.github/workflows/gtest-ci.yml deleted file mode 100644 index 03a8cc5e287b..000000000000 --- a/origin/googletest/.github/workflows/gtest-ci.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: ci - -on: - push: - pull_request: - -env: - BAZEL_CXXOPTS: -std=c++14 - -jobs: - Linux: - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Tests - run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ... - - macOS: - runs-on: macos-latest - steps: - - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Tests - run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ... - - - Windows: - runs-on: windows-latest - steps: - - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Tests - run: bazel test --cxxopt=/std:c++14 --features=external_include_paths --test_output=errors ... diff --git a/origin/googletest/.gitignore b/origin/googletest/.gitignore deleted file mode 100644 index fede02f65093..000000000000 --- a/origin/googletest/.gitignore +++ /dev/null @@ -1,88 +0,0 @@ -# Ignore CI build directory -build/ -xcuserdata -cmake-build-debug/ -.idea/ -bazel-bin -bazel-genfiles -bazel-googletest -bazel-out -bazel-testlogs -# python -*.pyc - -# Visual Studio files -.vs -*.sdf -*.opensdf -*.VC.opendb -*.suo -*.user -_ReSharper.Caches/ -Win32-Debug/ -Win32-Release/ -x64-Debug/ -x64-Release/ - -# VSCode files -.cache/ -cmake-variants.yaml - -# Ignore autoconf / automake files -Makefile.in -aclocal.m4 -configure -build-aux/ -autom4te.cache/ -googletest/m4/libtool.m4 -googletest/m4/ltoptions.m4 -googletest/m4/ltsugar.m4 -googletest/m4/ltversion.m4 -googletest/m4/lt~obsolete.m4 -googlemock/m4 - -# Ignore generated directories. -googlemock/fused-src/ -googletest/fused-src/ - -# macOS files -.DS_Store -googletest/.DS_Store -googletest/xcode/.DS_Store - -# Ignore cmake generated directories and files. -CMakeFiles -CTestTestfile.cmake -Makefile -cmake_install.cmake -googlemock/CMakeFiles -googlemock/CTestTestfile.cmake -googlemock/Makefile -googlemock/cmake_install.cmake -googlemock/gtest -/bin -/googlemock/gmock.dir -/googlemock/gmock_main.dir -/googlemock/RUN_TESTS.vcxproj.filters -/googlemock/RUN_TESTS.vcxproj -/googlemock/INSTALL.vcxproj.filters -/googlemock/INSTALL.vcxproj -/googlemock/gmock_main.vcxproj.filters -/googlemock/gmock_main.vcxproj -/googlemock/gmock.vcxproj.filters -/googlemock/gmock.vcxproj -/googlemock/gmock.sln -/googlemock/ALL_BUILD.vcxproj.filters -/googlemock/ALL_BUILD.vcxproj -/lib -/Win32 -/ZERO_CHECK.vcxproj.filters -/ZERO_CHECK.vcxproj -/RUN_TESTS.vcxproj.filters -/RUN_TESTS.vcxproj -/INSTALL.vcxproj.filters -/INSTALL.vcxproj -/googletest-distribution.sln -/CMakeCache.txt -/ALL_BUILD.vcxproj.filters -/ALL_BUILD.vcxproj diff --git a/origin/googletest/.travis.yml b/origin/googletest/.travis.yml deleted file mode 100644 index 4e7413a4f9a3..000000000000 --- a/origin/googletest/.travis.yml +++ /dev/null @@ -1,81 +0,0 @@ -# Build matrix / environment variable are explained on: -# https://docs.travis-ci.com/user/customizing-the-build/ -# This file can be validated on: -# http://lint.travis-ci.org/ - -sudo: false -language: cpp - -# Define the matrix explicitly, manually expanding the combinations of (os, compiler, env). -# It is more tedious, but grants us far more flexibility. -matrix: - include: - - os: linux - compiler: gcc - sudo : true - install: ./ci/install-linux.sh && ./ci/log-config.sh - script: ./ci/build-linux-bazel.sh - - os: linux - compiler: clang - sudo : true - install: ./ci/install-linux.sh && ./ci/log-config.sh - script: ./ci/build-linux-bazel.sh - - os: linux - group: deprecated-2017Q4 - compiler: gcc - install: ./ci/install-linux.sh && ./ci/log-config.sh - script: ./ci/build-linux-autotools.sh - - os: linux - group: deprecated-2017Q4 - compiler: gcc - env: BUILD_TYPE=Debug VERBOSE=1 CXX_FLAGS=-std=c++11 - - os: linux - group: deprecated-2017Q4 - compiler: clang - env: BUILD_TYPE=Debug VERBOSE=1 - - os: linux - group: deprecated-2017Q4 - compiler: clang - env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 - - os: linux - compiler: clang - env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON - - os: osx - compiler: gcc - env: BUILD_TYPE=Debug VERBOSE=1 - - os: osx - compiler: gcc - env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 - - os: osx - compiler: clang - env: BUILD_TYPE=Debug VERBOSE=1 - if: type != pull_request - - os: osx - env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 - if: type != pull_request - -# These are the install and build (script) phases for the most common entries in the matrix. They could be included -# in each entry in the matrix, but that is just repetitive. -install: - - ./ci/install-${TRAVIS_OS_NAME}.sh - - . ./ci/env-${TRAVIS_OS_NAME}.sh - - ./ci/log-config.sh - -script: ./ci/travis.sh - -# For sudo=false builds this section installs the necessary dependencies. -addons: - apt: - # List of whitelisted in travis packages for ubuntu-precise can be found here: - # https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise - # List of whitelisted in travis apt-sources: - # https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.9 - packages: - - g++-4.9 - - clang-3.9 - -notifications: - email: false diff --git a/origin/googletest/BUILD.bazel b/origin/googletest/BUILD.bazel deleted file mode 100644 index b1e3b7fba89a..000000000000 --- a/origin/googletest/BUILD.bazel +++ /dev/null @@ -1,219 +0,0 @@ -# Copyright 2017 Google Inc. -# All Rights Reserved. -# -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Bazel Build for Google C++ Testing Framework(Google Test) - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -exports_files(["LICENSE"]) - -config_setting( - name = "qnx", - constraint_values = ["@platforms//os:qnx"], -) - -config_setting( - name = "windows", - constraint_values = ["@platforms//os:windows"], -) - -config_setting( - name = "freebsd", - constraint_values = ["@platforms//os:freebsd"], -) - -config_setting( - name = "openbsd", - constraint_values = ["@platforms//os:openbsd"], -) - -config_setting( - name = "msvc_compiler", - flag_values = { - "@bazel_tools//tools/cpp:compiler": "msvc-cl", - }, - visibility = [":__subpackages__"], -) - -config_setting( - name = "has_absl", - values = {"define": "absl=1"}, -) - -# Library that defines the FRIEND_TEST macro. -cc_library( - name = "gtest_prod", - hdrs = ["googletest/include/gtest/gtest_prod.h"], - includes = ["googletest/include"], -) - -# Google Test including Google Mock -cc_library( - name = "gtest", - srcs = glob( - include = [ - "googletest/src/*.cc", - "googletest/src/*.h", - "googletest/include/gtest/**/*.h", - "googlemock/src/*.cc", - "googlemock/include/gmock/**/*.h", - ], - exclude = [ - "googletest/src/gtest-all.cc", - "googletest/src/gtest_main.cc", - "googlemock/src/gmock-all.cc", - "googlemock/src/gmock_main.cc", - ], - ), - hdrs = glob([ - "googletest/include/gtest/*.h", - "googlemock/include/gmock/*.h", - ]), - copts = select({ - ":qnx": [], - ":windows": [], - "//conditions:default": ["-pthread"], - }), - defines = select({ - ":has_absl": ["GTEST_HAS_ABSL=1"], - "//conditions:default": [], - }), - features = select({ - ":windows": ["windows_export_all_symbols"], - "//conditions:default": [], - }), - includes = [ - "googlemock", - "googlemock/include", - "googletest", - "googletest/include", - ], - linkopts = select({ - ":qnx": ["-lregex"], - ":windows": [], - ":freebsd": [ - "-lm", - "-pthread", - ], - ":openbsd": [ - "-lm", - "-pthread", - ], - "//conditions:default": ["-pthread"], - }), - deps = select({ - ":has_absl": [ - "@com_google_absl//absl/container:flat_hash_set", - "@com_google_absl//absl/debugging:failure_signal_handler", - "@com_google_absl//absl/debugging:stacktrace", - "@com_google_absl//absl/debugging:symbolize", - "@com_google_absl//absl/flags:flag", - "@com_google_absl//absl/flags:parse", - "@com_google_absl//absl/flags:reflection", - "@com_google_absl//absl/flags:usage", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/types:any", - "@com_google_absl//absl/types:optional", - "@com_google_absl//absl/types:variant", - "@com_googlesource_code_re2//:re2", - ], - "//conditions:default": [], - }), -) - -cc_library( - name = "gtest_main", - srcs = ["googlemock/src/gmock_main.cc"], - features = select({ - ":windows": ["windows_export_all_symbols"], - "//conditions:default": [], - }), - deps = [":gtest"], -) - -# The following rules build samples of how to use gTest. -cc_library( - name = "gtest_sample_lib", - srcs = [ - "googletest/samples/sample1.cc", - "googletest/samples/sample2.cc", - "googletest/samples/sample4.cc", - ], - hdrs = [ - "googletest/samples/prime_tables.h", - "googletest/samples/sample1.h", - "googletest/samples/sample2.h", - "googletest/samples/sample3-inl.h", - "googletest/samples/sample4.h", - ], - features = select({ - ":windows": ["windows_export_all_symbols"], - "//conditions:default": [], - }), -) - -cc_test( - name = "gtest_samples", - size = "small", - # All Samples except: - # sample9 (main) - # sample10 (main and takes a command line option and needs to be separate) - srcs = [ - "googletest/samples/sample1_unittest.cc", - "googletest/samples/sample2_unittest.cc", - "googletest/samples/sample3_unittest.cc", - "googletest/samples/sample4_unittest.cc", - "googletest/samples/sample5_unittest.cc", - "googletest/samples/sample6_unittest.cc", - "googletest/samples/sample7_unittest.cc", - "googletest/samples/sample8_unittest.cc", - ], - linkstatic = 0, - deps = [ - "gtest_sample_lib", - ":gtest_main", - ], -) - -cc_test( - name = "sample9_unittest", - size = "small", - srcs = ["googletest/samples/sample9_unittest.cc"], - deps = [":gtest"], -) - -cc_test( - name = "sample10_unittest", - size = "small", - srcs = ["googletest/samples/sample10_unittest.cc"], - deps = [":gtest"], -) diff --git a/origin/googletest/CMakeLists.txt b/origin/googletest/CMakeLists.txt deleted file mode 100644 index 089ac987fb60..000000000000 --- a/origin/googletest/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -# Note: CMake support is community-based. The maintainers do not use CMake -# internally. - -cmake_minimum_required(VERSION 3.13) - -project(googletest-distribution) -set(GOOGLETEST_VERSION 1.14.0) - -if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() - -enable_testing() - -include(CMakeDependentOption) -include(GNUInstallDirs) - -#Note that googlemock target already builds googletest -option(BUILD_GMOCK "Builds the googlemock subproject" ON) -option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) -option(GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF) - -if(BUILD_GMOCK) - add_subdirectory( googlemock ) -else() - add_subdirectory( googletest ) -endif() diff --git a/origin/googletest/CONTRIBUTING.md b/origin/googletest/CONTRIBUTING.md deleted file mode 100644 index 8bed14b2666d..000000000000 --- a/origin/googletest/CONTRIBUTING.md +++ /dev/null @@ -1,141 +0,0 @@ -# How to become a contributor and submit your own code - -## Contributor License Agreements - -We'd love to accept your patches! Before we can take them, we have to jump a -couple of legal hurdles. - -Please fill out either the individual or corporate Contributor License Agreement -(CLA). - -* If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an - [individual CLA](https://developers.google.com/open-source/cla/individual). -* If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a - [corporate CLA](https://developers.google.com/open-source/cla/corporate). - -Follow either of the two links above to access the appropriate CLA and -instructions for how to sign and return it. Once we receive it, we'll be able to -accept your pull requests. - -## Are you a Googler? - -If you are a Googler, please make an attempt to submit an internal contribution -rather than a GitHub Pull Request. If you are not able to submit internally, a -PR is acceptable as an alternative. - -## Contributing A Patch - -1. Submit an issue describing your proposed change to the - [issue tracker](https://github.com/google/googletest/issues). -2. Please don't mix more than one logical change per submittal, because it - makes the history hard to follow. If you want to make a change that doesn't - have a corresponding issue in the issue tracker, please create one. -3. Also, coordinate with team members that are listed on the issue in question. - This ensures that work isn't being duplicated and communicating your plan - early also generally leads to better patches. -4. If your proposed change is accepted, and you haven't already done so, sign a - Contributor License Agreement - ([see details above](#contributor-license-agreements)). -5. Fork the desired repo, develop and test your code changes. -6. Ensure that your code adheres to the existing style in the sample to which - you are contributing. -7. Ensure that your code has an appropriate set of unit tests which all pass. -8. Submit a pull request. - -## The Google Test and Google Mock Communities - -The Google Test community exists primarily through the -[discussion group](http://groups.google.com/group/googletestframework) and the -GitHub repository. Likewise, the Google Mock community exists primarily through -their own [discussion group](http://groups.google.com/group/googlemock). You are -definitely encouraged to contribute to the discussion and you can also help us -to keep the effectiveness of the group high by following and promoting the -guidelines listed here. - -### Please Be Friendly - -Showing courtesy and respect to others is a vital part of the Google culture, -and we strongly encourage everyone participating in Google Test development to -join us in accepting nothing less. Of course, being courteous is not the same as -failing to constructively disagree with each other, but it does mean that we -should be respectful of each other when enumerating the 42 technical reasons -that a particular proposal may not be the best choice. There's never a reason to -be antagonistic or dismissive toward anyone who is sincerely trying to -contribute to a discussion. - -Sure, C++ testing is serious business and all that, but it's also a lot of fun. -Let's keep it that way. Let's strive to be one of the friendliest communities in -all of open source. - -As always, discuss Google Test in the official GoogleTest discussion group. You -don't have to actually submit code in order to sign up. Your participation -itself is a valuable contribution. - -## Style - -To keep the source consistent, readable, diffable and easy to merge, we use a -fairly rigid coding style, as defined by the -[google-styleguide](https://github.com/google/styleguide) project. All patches -will be expected to conform to the style outlined -[here](https://google.github.io/styleguide/cppguide.html). Use -[.clang-format](https://github.com/google/googletest/blob/main/.clang-format) to -check your formatting. - -## Requirements for Contributors - -If you plan to contribute a patch, you need to build Google Test, Google Mock, -and their own tests from a git checkout, which has further requirements: - -* [Python](https://www.python.org/) v3.6 or newer (for running some of the - tests and re-generating certain source files from templates) -* [CMake](https://cmake.org/) v2.8.12 or newer - -## Developing Google Test and Google Mock - -This section discusses how to make your own changes to the Google Test project. - -### Testing Google Test and Google Mock Themselves - -To make sure your changes work as intended and don't break existing -functionality, you'll want to compile and run Google Test and GoogleMock's own -tests. For that you can use CMake: - -``` -mkdir mybuild -cd mybuild -cmake -Dgtest_build_tests=ON -Dgmock_build_tests=ON ${GTEST_REPO_DIR} *** 111473 LINES SKIPPED *** From nobody Sat Oct 19 02:14: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 4XVlWk2Bhpz5ZWJh; Sat, 19 Oct 2024 02:14:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVlWk1ls4z4lNb; Sat, 19 Oct 2024 02:14:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729304082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zuOC4g87GC2zBpbYCE9fY8ntqc72+RNBZFrb7phK7Xc=; b=fDCBC0XBmMmEMXLZqMEwWMwMt5XMBZZKHloUFr45ryxLxufWfzAJT/yAInhmJHEjZ7Y0SM DonesvwQQIvXeQdZM2do1rq82iVAB5xK3Wvlv/zs1RH6ouPofPiRVrjZnzaxYcg/B23FCP y948p2Jq+4SDThoC5o/eSUS07TvGUo2/HJbzSgqcG3EBw7nvaWnh1hJz/4kTnAy/QPl7iP 9n0h4C0bbvxvGYFVeZiSh4rMUHBTSVZQSHeb1tppC1SNkCIOSskw8d34SwKt1y6lZ8CXrM RuEaOj3qtTKkO17m8NamNVRYpQNcvs0k9BnOtGxrnmYdDBO8Yv/J0tjylGcV8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729304082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zuOC4g87GC2zBpbYCE9fY8ntqc72+RNBZFrb7phK7Xc=; b=OZjIPcLaq3R/4xiWVIFNIV1AK/5kpHWHW7zyOCH+VjCoQRPEz9h651AwGpE+7vK/prp5dv zvZnce6NGOUf4nSJs2RBeZcJ+wUureOC9KSRn5P0K5MAtvGfBR7qIAG2RkkAeibsIVf52K PqtFs/lP1K7O/xU23LCy4JxnVt/oYqDM5sEQMvI8DvDL9X1y/KqK5gidFR7xxaoh3eg+zH m8CKozoSF5A5TOfWc7axC+T/FE9QPYwgMnv9u/q2hNMKeqRMWcsjEOdcsckCM9js8sTkoF Fioqo7iW6ZZ3sHnZn9RJBkPuz/RGQ9Iiz2DCqMcyOe4WafZGHBoq63Gr139EQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729304082; a=rsa-sha256; cv=none; b=KdBNh08sqVCaI8H2Fbf0TFgMzrMS08RTYGGGrFGNteKH/AxaEUy+7+O/ayZmmyb+JNTSzP rEfw5phT8yKb5i7aBcYcHDJWcXeIFOSEUIc8LNGEKY83nTvMc2rup2dIfYe7OJFDaCNeKN cyYvg0Tqp5aXrjStak58mYNywVuqq0pWejkmowPdwCym6OwHGTiTDXMMhj2qeGbGr+AiV1 DMWnOYyWr/GUqSa7wodQvZiKhtKCeV+BgLc242dVHLMrUbQNRnu3ixSN3D1j202pwQoRsi jmEhX//Zproor8hHS0EKuc02F09r9jIGri0+LKDrVBYA/Klpid484aNmugKWkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVlWk1MB6zydV; Sat, 19 Oct 2024 02:14:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49J2Eg57081940; Sat, 19 Oct 2024 02:14:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49J2Ef4v081932; Sat, 19 Oct 2024 02:14:41 GMT (envelope-from git) Date: Sat, 19 Oct 2024 02:14:41 GMT Message-Id: <202410190214.49J2Ef4v081932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 1e5e331b1dce - main - Correct mergeinfo from 1.14.0 import 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e5e331b1dce6c8bc05def42b41234c4f1fcea44 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=1e5e331b1dce6c8bc05def42b41234c4f1fcea44 commit 1e5e331b1dce6c8bc05def42b41234c4f1fcea44 Merge: 92c5681cc347 8ef491440fca Author: Enji Cooper AuthorDate: 2024-10-19 02:08:30 +0000 Commit: Enji Cooper CommitDate: 2024-10-19 02:10:07 +0000 Correct mergeinfo from 1.14.0 import This will help ensure that future vendor updates for this component will be more seamless. Suggested by: jtrc27 Fixes: 28f6c2f292806bf31230a959bc4b19d7081669a7 From nobody Sat Oct 19 04:55: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 4XVq5X1nLMz5Zf7T; Sat, 19 Oct 2024 04:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVq5X0pnDz4x3Y; Sat, 19 Oct 2024 04:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729313744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTlTa6TVrO53/LMNmAxkcG7AVFI1cpZatxkmyegVftg=; b=i8sMU1HihTeX0UGcpuS3+eVbYkboxwOnD5kfv1+qU4hLaL9GvksilySkZR4Ak21PnfeLYi 19DNI3USpJ6Vql+yHL3txjkDC2AH06W5dq03GpqF/ZUxdTE/vcBBoSUTi5xv+RopavDldX UxjE2jN+qcyuTk/JQdLsP44/wbqVZCb+63JvwSsobf9JV0sveYWbx//2SZy+kGwQbmDmXn FUCKdrxHC08Z4TrJpt1cBTyNsVYk2m+i9IAGlzfYhRXrF9i+M9sXtPxJ0JDl+7eW6QR5Ct tHbGXe6kol8vv4vyFNW7dZE+kMcGTY5uV8yFIxujLbFS6m1N/PL8YUePNSVCww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729313744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTlTa6TVrO53/LMNmAxkcG7AVFI1cpZatxkmyegVftg=; b=Fv3JK7ZDKM6nIbszk9FqHYh+Cv+hA1wRrlPFoSaUD638TXe5FuetCOdHuogPUaMlIEXT0t XbIqWFonuxRALQQ8TIdmdhEjTdQtDArm6DWuplmVgP85j30FGd3GzvlFDEfHVmStl0WpYE 9lYsGdNqWY4XrKYwrgTu8DVURBn9XzBBJOk3eKyMZpKxJeOrxOC0D4Xq3o9bSWvXkSro+h nC7sGv4mltP2+6CQSfwZdcWRkatiWNwnghBx1jwXB4rkfgEENY37kk8fnPhEBZj9yEAid6 gIDl2qM4Fsj8jlmaNFenwz9MrEQ9Yb3UqCnuZ3Uux+rW9mh2ROAeUyFCd18VSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729313744; a=rsa-sha256; cv=none; b=xO+OzaU5yvpwtqwg6a6yqo1KrdjUgVIHxeEBlTy0XYSBFToQ8VCLeN5oIL/GRMQLo03Bop MCF6BHocuS++6noix0JTibJUsJuD5NvWMlXtPkHMtiKYEu2+xp2Xwnghw74beZ2itj++yA WPrcOGWsyfIQqs2AcK3FlfIjiVUEC/vSTsnejDe1Rx2bqfI7gdt3k6tvINgLhM+3i84FIe vdqTFFm2uG3wIt6AYZFVht3bGKRz6f00R6WMRlSocRq6E7YRJ5lNEu97ml3ehCxFZ4QGXu sYmSyweEjko8YGopqoHQiYU8F1OSYO1ObgU8yYwobt/sl63nfflFHLMVImZn3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVq5X0GX9z147m; Sat, 19 Oct 2024 04:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49J4thDq078630; Sat, 19 Oct 2024 04:55:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49J4thma078627; Sat, 19 Oct 2024 04:55:43 GMT (envelope-from git) Date: Sat, 19 Oct 2024 04:55:43 GMT Message-Id: <202410190455.49J4thma078627@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John-Mark Gurney Subject: git: 4ad443a106d3 - main - they have been not true since 2012. 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: jmg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ad443a106d3201453dc4ce0412431df2c0d1a47 Auto-Submitted: auto-generated The branch main has been updated by jmg: URL: https://cgit.FreeBSD.org/src/commit/?id=4ad443a106d3201453dc4ce0412431df2c0d1a47 commit 4ad443a106d3201453dc4ce0412431df2c0d1a47 Author: John-Mark Gurney AuthorDate: 2024-10-19 04:52:51 +0000 Commit: John-Mark Gurney CommitDate: 2024-10-19 04:52:51 +0000 they have been not true since 2012. --- share/man/man3/stdarg.3 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/share/man/man3/stdarg.3 b/share/man/man3/stdarg.3 index b7346c91d7a3..71409508e6a8 100644 --- a/share/man/man3/stdarg.3 +++ b/share/man/man3/stdarg.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 25, 2020 +.Dd October 18, 2024 .Dt STDARG 3 .Os .Sh NAME @@ -202,9 +202,6 @@ void foo(char *fmt, ...) These macros are .Em not compatible with the historic macros they replace. -A backward compatible version can be found in the include -file -.In varargs.h . .Sh STANDARDS The .Fn va_start , From nobody Sat Oct 19 12:56: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 4XW1mC2GSwz5b4LD; Sat, 19 Oct 2024 12:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW1mC1lb7z4NHZ; Sat, 19 Oct 2024 12:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729342587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L26R4/JxDBPEStmnhrxAaseeip6OfnPPTGQBEw0ZhDo=; b=xyoYWHNPqWo9qCCPk/aYzjX5feWx3+M5WqD5VcqrFkCLyWbXKE1kqw/FB588j1PXKmPJUp ejjtg49suFnuD3rHhhIA8YuP269T9jYPAL4zfiXAots5Mpfr1dsO5Bb37bUez0McLrlPp4 N+jRadN8nOP03R5hc27rugn9Hizfh834BDb0bLMHEX2oDrsXWywY7b3QMRWAmaLNpb8rD/ jAPJiBWBZ2dGYuHj5MKh8ZIvpkohmGvXz2kyFvq2j1qklRFlwaOK9g3EComzSV4gnbNsNt ePmbqlFh0+A0Zsm7ujYhPOM0xO9jkHVWKqgTlJUKvpsrPZ1IA79wUFpU9pn9sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729342587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L26R4/JxDBPEStmnhrxAaseeip6OfnPPTGQBEw0ZhDo=; b=TevreBRr0mnNNbYI6kAqH/2IcXVIjZeiIeGL+PWDogrbLOWSs0e1EQ8y/wuCqXrH3jvKIm JgPtkC0qVPjBmMoWWlZRK7tDZ7gfLA1VViqoa+7Q9/OVoPYGougLRQ5l56c+OrDEd+Rmiw BFflSAM3soouLIXjNQrnYOpmsRvTeyavvtV9laVti09LGY3qY8B0BYw6nyE+CT234ywVJs CbOUljAApAEJpFe4KyqMj+BlYQyHX2Kvzyctj4Bh53y5h86sIdbyS+bw1XcdrUvuHFaudw zqcbcDNdYIeIJW4/qAax3wMgK+8XLcPZq2R77U0DPdknkTOXp0u44AAiIEdqmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729342587; a=rsa-sha256; cv=none; b=n5oUvXv/jiFHiVzMMXALRGn3KUXAYL43uHlEX2GlbJ3UIN1t/ll4PvmhVUE+i0FNVRZhso w/lvEgkUCqYba74A+c/n5PWVtQqNniz1yPHMWFwTfjcnftrK2BWNi/+bMxw2QdfQHe4Etu hZnAJ0akHZfHIsn0zizySL2gtwUsRXsEwGy6PdjG4MiNu4IjXsr+/jkOgbYc+/+pOtXhnx XgF8+2KXEKcgnBlH5w1KOW80pD33bL3BfUBRie8ubYenk3D+sZoWaIqBCelWCV9272x0BG lA+NGYNvtOFFZr4oiRzrzf2WE6rUyGKXgg3XRcYBFk/4mKEllCGKgkFu3+iokw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW1mC1LwhzJZF; Sat, 19 Oct 2024 12:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JCuRY2064975; Sat, 19 Oct 2024 12:56:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JCuRmk064972; Sat, 19 Oct 2024 12:56:27 GMT (envelope-from git) Date: Sat, 19 Oct 2024 12:56:27 GMT Message-Id: <202410191256.49JCuRmk064972@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: 23b44ad101ca - stable/14 - ggate: Avoid dropping the GEOM topology lock in dumpconf 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: 23b44ad101ca2381186aa565b6c04a978c02a35e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=23b44ad101ca2381186aa565b6c04a978c02a35e commit 23b44ad101ca2381186aa565b6c04a978c02a35e Author: Mark Johnston AuthorDate: 2024-10-04 14:53:57 +0000 Commit: Mark Johnston CommitDate: 2024-10-18 12:27:13 +0000 ggate: Avoid dropping the GEOM topology lock in dumpconf In general it's not safe to drop the topology lock in these routines, as GEOM assumes that the mesh will be consistent during traversal. However, there's no reason we can't hold the topology lock across calls to g_gate_release(). (Note that g_gate_hold() can be called with the topology lock held.) PR: 238814 MFC after: 2 weeks (cherry picked from commit b37b2543a23b44c78f6d78823dcfcedba46570db) --- sys/geom/gate/g_gate.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c index 820f18ba220c..8d0e96fce124 100644 --- a/sys/geom/gate/g_gate.c +++ b/sys/geom/gate/g_gate.c @@ -330,7 +330,6 @@ static void g_gate_release(struct g_gate_softc *sc) { - g_topology_assert_not(); mtx_lock(&g_gate_units_lock); sc->sc_ref--; KASSERT(sc->sc_ref >= 0, ("Negative sc_ref for %s.", sc->sc_name)); @@ -454,9 +453,7 @@ g_gate_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, sc->sc_queue_size); sbuf_printf(sb, "%s%u\n", indent, sc->sc_ref); sbuf_printf(sb, "%s%d\n", indent, sc->sc_unit); - g_topology_unlock(); g_gate_release(sc); - g_topology_lock(); } static int From nobody Sat Oct 19 12:56: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 4XW1mD3G10z5b4Hx; Sat, 19 Oct 2024 12:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW1mD2gMgz4NL6; Sat, 19 Oct 2024 12:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729342588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fOxu7z1d+vfxcS9Vmsp0QF/erQxH7qebQwBGhmWMzAE=; b=nih7KEfNguDJSYawoGfos0A9cT6kqtrpOqhhnGIrItedPec6Qtys4FilYX/ATzEUQQV8/I nAGkSTgy3sbVhf+u200G3V8JTIgo8571e1dLxnldWmbAOw4KxhnZdqkrdwv6ghE5r86KI+ w2Own9YwZJJeXl2myABJCBrTyKwOIS20CJw9aPvELF/St50kvDZf9Vz0xxXd6me/+hMoaY QpmRq+eIewd9qRv0tOK8DnmcljHb6rxJIlcU0M3cJNwvLJFd7sLyiPyzTxJH5YIBRN7Nqm TSHoTmHUQ3KPqAGOJ9Ya68xqCikXYswEg9nSLmCi9ERPZdcf6RUTVd1XQH6jmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729342588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fOxu7z1d+vfxcS9Vmsp0QF/erQxH7qebQwBGhmWMzAE=; b=EiYFPSEGjBNLd6SVoRyQ4ew4Nbz8daO+PHU1vtD83H0UfMkzum1naFik/N0s4IDQUl3Inp YTR1rwlyXAv9S+St5HY77mvcbm7AwNTNsZ1ndiXjfo4Da8wS/kfA9nZ+Lo3f2LMIVjwD6g 1UAKpWqNqA/ZR8F2Zpxkw0hADzefb+ZvgH66nraUpi3x39w8ANiBshFN7ucevTE5mrkOus J+L0wdGaeXZ1H/2nWXgh5kbpWN0hRf2EdvI9Wspr0HaZrzBaJRc7l8NXluXCQJrlIF82ih ly+J8aUoRwgCWy0Q3XxkWoOHv6WmPlTt5StwODeLOq0BsoYo9F6j0xmQuf/6Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729342588; a=rsa-sha256; cv=none; b=riCmsMikdBZyiWuhvbavwBmsBN/kIqK4p8sTmJqabREBHpI7PmDuxgVbkTD5L7DUEdKp+p 2mlxKXjBU3GeN3cKiHbspPS4wGg2xx/ZKUJJxSma4AmYXcXqjQ0RHKp6j/c0gpxPA8sVdD DP4j+5BFiYwnm/4n0cPXiRPsLI5WCl8sDH9FGVx4VkeSIKLk/WoXF0OAnbcnWI9H9a142K yfuJq5a7/yoIuBoWaXR8ii0C6bq91Mprg42KjMd5ZLdMH+Ai40IOHNzF6PnbF11K99Ogb8 83juHTDPLtNtRiMmtDQUXWSMc8QIwo3ok8xquZ89TEjnRShn81m7/vkqDPz0LQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW1mD2HZ7zJcS; Sat, 19 Oct 2024 12:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JCuSfL065018; Sat, 19 Oct 2024 12:56:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JCuSK6065015; Sat, 19 Oct 2024 12:56:28 GMT (envelope-from git) Date: Sat, 19 Oct 2024 12:56:28 GMT Message-Id: <202410191256.49JCuSK6065015@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: d001b32a804e - stable/14 - cdefs: Add __nosanitizecoverage 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: d001b32a804e1737f81c6f94d746c6e506ee746e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d001b32a804e1737f81c6f94d746c6e506ee746e commit d001b32a804e1737f81c6f94d746c6e506ee746e Author: Mark Johnston AuthorDate: 2024-10-11 16:51:13 +0000 Commit: Mark Johnston CommitDate: 2024-10-18 12:27:37 +0000 cdefs: Add __nosanitizecoverage Obtained from: CheriBSD MFC after: 1 week (cherry picked from commit a78bacf3b0ec0526e38f299fe4e17557f0930303) --- sys/sys/cdefs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index a52864c5db9d..4fa4decd7652 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -880,9 +880,11 @@ #define __nosanitizeaddress __attribute__((no_sanitize("address"))) #define __nosanitizememory __attribute__((no_sanitize("memory"))) #endif +#define __nosanitizecoverage __attribute__((no_sanitize("coverage"))) #define __nosanitizethread __attribute__((no_sanitize("thread"))) #else #define __nosanitizeaddress +#define __nosanitizecoverage #define __nosanitizememory #define __nosanitizethread #endif From nobody Sat Oct 19 12:56:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XW1mF5gd1z5b4PD; Sat, 19 Oct 2024 12:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW1mF41tFz4Nh9; Sat, 19 Oct 2024 12:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729342589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jNGV2sTalawTWg5+zmgQ/emLsTKCLnZJ0GeDqOwoEBY=; b=QV4yR+8LqcQdAHP34I2hnh6WqvxX2EPyKJdZWNTd9dFuUAF3OtbmaZEsdrauGJJTtq19l+ ypEFVZrZxnkb1GXWhEOh6k2jitWt8g44C7zRoNgoqI2CmIFP61M9nGtGKLPcwqUT/qK5Gf lFIWCDGH5FQBgyftF7H8pEd19Z+KA4+9Kfb/XaSaYgT8bYnq9UmK5T1BaChFDG3m4+eUw+ sXjDFJUHLgDY1NxQ3R95J1+w1wPkyHsc9Rfj+a8pXoS0m1n+eBEwdQPkugyC/LhEpvwFl7 mVRxeYKAzSsm/xChMgfxeDs21hxEQWVLYlsauu+dOAm4jJ6zd6cBQTXztiVQdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729342589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jNGV2sTalawTWg5+zmgQ/emLsTKCLnZJ0GeDqOwoEBY=; b=wqi5Mqo99MG7XVDZICfzSaPRksD2uzliVWAcrn5OKTbsHrqHfHCKtmrjovwgy4sj2X/P/z zwTuxkrnSTL/+vNRRE4CahH/OQ/OSbzmhhVq4MXbvSldCks9ou1uazQxfi2uxA9g+i9VkQ ZD54ExbH/jYvEbRbcyMOYClNFODBHJcjC7ya2auX5TensB0160lYDTrg6yxJyJJknXoyi/ uYgQrgnCmYqSfPSgAp/1M6ZBXYlJa1kFThiHkkeYCCBcGvDZKWoY+fLI8XHLrTSalS2V+i c/pgG/dO1X93MLM//FSjM3Esa8fNqGz37dPvO/pZ6noNg9vuDaEbD2yubnmmpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729342589; a=rsa-sha256; cv=none; b=EIFtkRLcSm1n4/Ec6yoIzNn0ch3RD0IFoT2O7bD1EM/cEwBL8VLMRnVcotZGDczF0saY/t rDViToGq2AQk+wKWNDJZW+FWvOuEopmAxAv5OAMsxZCyrsNtbdtov4eAOIMBypOf7xOBNp L2W8q5d5MubbuGKO2UGoh9WT4RTXjfh8pASpzXTItj7st6/maR4/9D/erNYP4+/5rfPWu9 uSwj9CKjoNqHe3fVRuKn/qtw3FtmCWriTM+jgpF+MJr3vniU1AYvziYinPg5aYrZAhMp8u 9bsN02kjI4fCBmTQkWCKBQr/GqYT4LCpejWIUWoENNOpl+RFGfoGUeIeQYbIvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW1mF3KQ4zJfp; Sat, 19 Oct 2024 12:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JCuTgq065069; Sat, 19 Oct 2024 12:56:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JCuTlJ065066; Sat, 19 Oct 2024 12:56:29 GMT (envelope-from git) Date: Sat, 19 Oct 2024 12:56:29 GMT Message-Id: <202410191256.49JCuTlJ065066@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: 4e61f158893b - stable/14 - debugnet: Use precise types when accessing mbuf contents 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: 4e61f158893b4fcd95a93ccee3812e395378feef Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4e61f158893b4fcd95a93ccee3812e395378feef commit 4e61f158893b4fcd95a93ccee3812e395378feef Author: Mark Johnston AuthorDate: 2024-10-09 15:28:57 +0000 Commit: Mark Johnston CommitDate: 2024-10-18 12:28:09 +0000 debugnet: Use precise types when accessing mbuf contents This might be useful when adding bounds checks to mtod(). No functional change intended. MFC after: 1 week (cherry picked from commit 5c385a54fe9ccbd3f28f20b5a025a856d229fa05) --- sys/net/debugnet.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/net/debugnet.c b/sys/net/debugnet.c index c6f57ec84618..07906e724cbb 100644 --- a/sys/net/debugnet.c +++ b/sys/net/debugnet.c @@ -199,7 +199,7 @@ debugnet_udp_output(struct debugnet_pcb *pcb, struct mbuf *m) return (ENOBUFS); } - udp = mtod(m, void *); + udp = mtod(m, struct udphdr *); udp->uh_ulen = htons(m->m_pkthdr.len); /* Use this src port so that the server can connect() the socket */ udp->uh_sport = htons(pcb->dp_client_port); @@ -226,7 +226,7 @@ debugnet_ack_output(struct debugnet_pcb *pcb, uint32_t seqno /* net endian */) m->m_len = sizeof(*dn_ack); m->m_pkthdr.len = sizeof(*dn_ack); MH_ALIGN(m, sizeof(*dn_ack)); - dn_ack = mtod(m, void *); + dn_ack = mtod(m, struct debugnet_ack *); dn_ack->da_seqno = seqno; return (debugnet_udp_output(pcb, m)); @@ -400,7 +400,7 @@ debugnet_handle_rx_msg(struct debugnet_pcb *pcb, struct mbuf **mb) } } - dnh = mtod(m, const void *); + dnh = mtod(m, const struct debugnet_msg_hdr *); if (ntohl(dnh->mh_len) + sizeof(*dnh) > m->m_pkthdr.len) { DNETDEBUG("Dropping short packet.\n"); return; @@ -459,7 +459,7 @@ debugnet_handle_ack(struct debugnet_pcb *pcb, struct mbuf **mb, uint16_t sport) return; } } - dn_ack = mtod(m, const void *); + dn_ack = mtod(m, const struct debugnet_ack *); /* Debugnet processing. */ /* @@ -503,7 +503,7 @@ debugnet_handle_udp(struct debugnet_pcb *pcb, struct mbuf **mb) return; } } - udp = mtod(m, const void *); + udp = mtod(m, const struct udphdr *); /* We expect to receive UDP packets on the configured client port. */ if (ntohs(udp->uh_dport) != pcb->dp_client_port) { From nobody Sat Oct 19 12:56: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 4XW1mH0VJZz5b4PF; Sat, 19 Oct 2024 12:56:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW1mG51w6z4NhX; Sat, 19 Oct 2024 12:56:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729342590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2lHVXFKqiEjmYLKd+GCyAOv9vWMRDQnfNpwuyct4wCc=; b=k32i+REO/ZVtKrcRjQPrxSXMK53C49fbBd/SCRrFDBjVAICnTCyhMxrX3lgsx8icD8Mcy7 XChWXA77r+XJadkzFvGUMrOtpbjr4MQjheWOO0ycCADd29TbL8AlLEE0lkcZC6MXAbpqHS y64CyOyq+uroArdNGh7yPGWtsuO35cGMGAzysrNvB5pQcGozu446UWMYK1vojHIGs3w9nr HeIPXUpH/iG8qLwqOgebQZQAaaabgxIAvCzQee8b0o41GO8fmVreXCJx+P/dBkIbKSOOxM BCf4iPla9Jt8nCPx6yLwrPBVKeidikdBwbpUgU9mLEhIQ/mELDOZP5QUSCnAwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729342590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2lHVXFKqiEjmYLKd+GCyAOv9vWMRDQnfNpwuyct4wCc=; b=fSroSOPI24aiHMOFNH6VtURsEaLGpS4fCDl96oBmGiOBVZknm4dsmJFYbuB9RVTUJIdvGM 6Rga8xdvPTfyiUqhf+ljAohdvr4134cMSVIYyHBVcADn6LoeVtDdR/YDF/PJTPrE0jO162 cE9w5EWZDUecx+bOndeLZtuIa5ycJRxYKRwt0q28wWqCvkDKQU0CWqRCvY9TCorsrI/veI YyGag4bx5J7vnpBJajXxvzNwmsIMGsyi3sbJsWqb4APksOYCP6UAyPVv3tj3mQupU5HVgg xFEWl7fHrXPdtHXd84E0nux3Puy4ob4oeJfo53FLISH/POwiUw0cZZk3cbvU5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729342590; a=rsa-sha256; cv=none; b=U8vkBFTNHZUtJquAQTutorJPs7tz0Q2fTjbeL0ksVDgOKU58oHnKQgapXjW6+JEj0lZNa9 YBABGARCWY7tvOT0PPuqmaBQx5RG362FAOLz0hFiHcOP3pBaz8jLX5mvtYTaEduqUlw7Rr rLez0kg22PlGHSgIKPFKJcrcX70HsXdhpY5q02QrOYL9DIgN1nAS7VI1DyEM5pVQiiwSb1 7jTRoT8qodoIw69ILqT53Jmh2rtUoFjvRyvWp/E42w7N+abIqvu8qlcNJNjm+hUlv+WG0y ykMfku8rWuw0GSz7fZMkY6JEGuyz9uUrEI3gH3NTJFnAbpab9KpcwXHdsS681A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW1mG4L5xzJZG; Sat, 19 Oct 2024 12:56:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JCuU8E065120; Sat, 19 Oct 2024 12:56:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JCuUap065117; Sat, 19 Oct 2024 12:56:30 GMT (envelope-from git) Date: Sat, 19 Oct 2024 12:56:30 GMT Message-Id: <202410191256.49JCuUap065117@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: 9c0455e4c43a - stable/14 - syslogd: Ignore getaddrinfo() errors if -ss is specified 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: 9c0455e4c43a8123bd7965125d34273c5b3d9eaf Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9c0455e4c43a8123bd7965125d34273c5b3d9eaf commit 9c0455e4c43a8123bd7965125d34273c5b3d9eaf Author: Mark Johnston AuthorDate: 2024-09-19 10:00:33 +0000 Commit: Mark Johnston CommitDate: 2024-10-19 12:55:03 +0000 syslogd: Ignore getaddrinfo() errors if -ss is specified This can arise if the jail doesn't have networking configured, and if -ss is specified, syslogd won't listen on port 514 anyway. Add a regression test case for this as well. PR: 238006 MFC after: 1 month (cherry picked from commit 5d045d556b1cfeb1487d49017b536afb3df105d3) --- usr.sbin/syslogd/syslogd.c | 8 ++++++++ usr.sbin/syslogd/tests/syslogd_test.sh | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index de3d7c106f8a..7356fb3fa43f 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -3825,6 +3825,14 @@ socksetup(struct peer *pe) if (pe->pe_serv == NULL) pe->pe_serv = "syslog"; error = getaddrinfo(pe->pe_name, pe->pe_serv, &hints, &res0); + if (error == EAI_NONAME && pe->pe_name == NULL && SecureMode > 1) { + /* + * If we're in secure mode, we won't open inet sockets anyway. + * This failure can arise legitimately when running in a jail + * without networking. + */ + return (0); + } if (error) { char *msgbuf; diff --git a/usr.sbin/syslogd/tests/syslogd_test.sh b/usr.sbin/syslogd/tests/syslogd_test.sh index e4927868e47f..08e6d76b9ba6 100644 --- a/usr.sbin/syslogd/tests/syslogd_test.sh +++ b/usr.sbin/syslogd/tests/syslogd_test.sh @@ -22,7 +22,13 @@ readonly SYSLOGD_LOCAL_PRIVSOCKET="${PWD}/logpriv.sock" # Start a private syslogd instance. syslogd_start() { - syslogd \ + local jail + + if [ "$1" = "-j" ]; then + jail="jexec $2" + shift 2 + fi + $jail syslogd \ -b ":${SYSLOGD_UDP_PORT}" \ -C \ -d \ @@ -288,6 +294,31 @@ pipe_action_cleanup() syslogd_stop } +atf_test_case "jail_noinet" "cleanup" +jail_noinet_head() +{ + atf_set descr "syslogd -ss can be run in a jail without INET support" + atf_set require.user root +} +jail_noinet_body() +{ + local logfile + + atf_check jail -c name=syslogd_noinet persist + + logfile="${PWD}/jail_noinet.log" + printf "user.debug\t${logfile}\n" > "${SYSLOGD_CONFIG}" + syslogd_start -j syslogd_noinet -ss + + syslogd_log -p user.debug -t "test" -h "${SYSLOGD_LOCAL_SOCKET}" \ + "hello, world" + atf_check -s exit:0 -o match:"test: hello, world" cat "${logfile}" +} +jail_noinet_cleanup() +{ + jail -r syslogd_noinet +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -296,4 +327,5 @@ atf_init_test_cases() atf_add_test_case "host_filter" atf_add_test_case "prop_filter" atf_add_test_case "pipe_action" + atf_add_test_case "jail_noinet" } From nobody Sat Oct 19 13:04: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 4XW1xH5vVPz5b4vm; Sat, 19 Oct 2024 13:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW1xH56B2z4QFP; Sat, 19 Oct 2024 13:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729343059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5gqohjOUY6iOHVQbuJTXAqXv5d6JVbU9Gcd7/C8EBys=; b=hJVIMe15vxdHpcBfgfZFp/YyqCwzZjZkpXvO/EG7wTnvU2XAvz9jI8wh/6ohz1TcC2Xx+I od/1pcSfo4v7Z93CzQxYxng9IRyiozN2LXo7u9lp6tCsfT32tVTJyBHjWsZPjJPwN9VukE cWT43lCjF0O4Z6NJ8trvvcCX9k7ksnvqfLoaLPQwKREXDZUDQfJ3PN6K+fUanEDEsjct15 4EolBYmSsj1FCS9G7cHijnXWk8vvMVq1N572bs7otf1V3c4HzrTTk5yzCjqmqN4RlXAVH+ vD71an20ymw3+eWFqI+7fadit1kahXOHNS6qYlh2L4Jrd9e55hyCpro0BSNXWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729343059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5gqohjOUY6iOHVQbuJTXAqXv5d6JVbU9Gcd7/C8EBys=; b=AgFQdtWZv3MPtoRNTpgi621bai356M4VD731g808thWdNUoKMc37476yXX+DM3ojnHaQau L1Vzdke7TQSr7RWk0k/2+oW2XAFwcPlj21GOUtBm/O0qHvf60s3NIhRuZrHp1b0srZGmZj zwe5rqVWiFFyLD280Sz4vQeumgw9YZwcs0ZxkzqEDzz4XNPtOWaVNOr98KgPIcQJhVa+8A XnM/ggJ4LLxIJ6Vj7K18KMeDqWNtomB+BYObiDZtFiZDrFvYc9BRwpntMuKVEbQW8RYaWN VK/4pISHDHfBdvyDfGrZYZouVgKTnsb9JofLmBzWswB1DlKv8lX34Vg0O2LFvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729343059; a=rsa-sha256; cv=none; b=dPFe3zV4plarZ2cvoRdIEGcGLtMx9oVsrIuaVo1cesVY5dHJreApnv5CV01QK+2jmhUoyc Bk5FgohRH2ksyTHcLKkAqHokU8nVl6x6QQfdj2DDxGrvfb3i/uWx2aX9qxJBg32OPAFoyA GSuwg00UmH2HmOzy/8SXo/NCZCN4ek1KbmSUUUWO6gamZduoCPN9mx1knQx6VPZ42s0PIR 87mwJIFDOdlZoIoGQ343NBqE8P3dOTzSyik0fMvlIqvykKREc9uewSM4RPMxVNEcgNwUG5 O4mTqmwHs3KjV6WoEaX9xds5S7syKh+oUgxJBeYy/lg9DvDFvYCjKkkP3gAiFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW1xH4j6mzJFk; Sat, 19 Oct 2024 13:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JD4JSG084004; Sat, 19 Oct 2024 13:04:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JD4JoM084001; Sat, 19 Oct 2024 13:04:19 GMT (envelope-from git) Date: Sat, 19 Oct 2024 13:04:19 GMT Message-Id: <202410191304.49JD4JoM084001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f4e35c044c89 - main - bus: Set the current VNET in device_attach() 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/main X-Git-Reftype: branch X-Git-Commit: f4e35c044c8988b7452cefbdcc417f5fd723e021 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f4e35c044c8988b7452cefbdcc417f5fd723e021 commit f4e35c044c8988b7452cefbdcc417f5fd723e021 Author: Mark Johnston AuthorDate: 2024-10-19 13:03:56 +0000 Commit: Mark Johnston CommitDate: 2024-10-19 13:03:56 +0000 bus: Set the current VNET in device_attach() Some drivers, in particular anything which creates an ifnet during attach, need to have the current VNET set, as if_attach_internal() and its callees access VNET-global variables. device_probe_and_attach() handles this, but this is not the only way to arrive in DEVICE_ATTACH. In particular, bus drivers may invoke device_attach() directly, as does devctl2's DEV_ENABLE ioctl handler. So, set the current VNET in device_attach() instead. I believe it is always safe to use vnet0, as devctl2 ioctls are not permitted within a jail. PR: 282168 Reviewed by: zlei, kevans, bz, imp, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47174 --- sys/kern/subr_bus.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 70e5e22854f3..eeba75ac574a 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -2538,10 +2539,7 @@ device_probe_and_attach(device_t dev) else if (error != 0) return (error); - CURVNET_SET_QUIET(vnet0); - error = device_attach(dev); - CURVNET_RESTORE(); - return error; + return (device_attach(dev)); } /** @@ -2577,6 +2575,10 @@ device_attach(device_t dev) return (ENXIO); } + KASSERT(IS_DEFAULT_VNET(TD_TO_VNET(curthread)), + ("device_attach: curthread is not in default vnet")); + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); + device_sysctl_init(dev); if (!device_is_quiet(dev)) device_print_child(dev->parent, dev); @@ -2609,8 +2611,10 @@ device_attach(device_t dev) KASSERT(dev->busy == 0, ("attach failed but busy")); dev->state = DS_NOTPRESENT; } + CURVNET_RESTORE(); return (error); } + CURVNET_RESTORE(); dev->flags |= DF_ATTACHED_ONCE; /* * We only need the low bits of this time, but ranges from tens to thousands From nobody Sat Oct 19 13:18:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XW2F51wl7z5b5Sm; Sat, 19 Oct 2024 13:18:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW2F51HYGz4RNb; Sat, 19 Oct 2024 13:18:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729343881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ef8kcIiKcXFA6BCYhsvDBjlA8ozWUoIB1kY9Wfo2d5o=; b=lN1yHho+qfHVhwZ6f55iXM4dsKlTdojai3awQurtju0zGuqGoIoPgI6vuC6dwWj+XB+Vpf v5iSnDu3UwAkvunh27XveQtq2lQr3LrjP3rLVDqTBQG2460Uk9n4KtUBggE0iQT4hL2bc1 ib0VOibh+eMm513CG+7u6/JkXx1TRADg7xZi04zUcXdA0YHjO2FynIKytQFrJN/Q2CkXRn TqmLxQhFed7XlVaGIjiXxZhB4Sdvc6iLGIYJLSJod/NDGp8aLy3xiKwpsyJKTp+w3VLBQ4 2XgcgpXps+4URa2qKaUQJOb5fOaSkTG5Rf0rwg1UbwOHhAvxUIB2bZ/5fL6W7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729343881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ef8kcIiKcXFA6BCYhsvDBjlA8ozWUoIB1kY9Wfo2d5o=; b=nv1tov0zTNS0ez0B/0+Y2naNT86jZLEJP4wE80lFXglPJAe1oh3SVHJLJcKpMvgD+9YFpL /WlyJFFWyiOegYMYdmuP6NG/awR/Innz/Vb6V/GuweEE9DHo70ElGUWBaEk/FNSUqMFxSe o7X1rqfjzncT6GORS1wOL4GlGRnTB41CPZReSKRoH1v0ieYcYpw929UYDy14xlMJqLRgm2 2kvxYZk2DqYbhf8xLrzb/fpVlkxo+0hqWACe/mSwuMnMFsn+cIqstlTl3qHPdtNb28nxIu PtX76tGPfNpMbmGnENdTrdG2LLl2J0fVPu5W61WdB5pCytysi2qiSOM1ulNiSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729343881; a=rsa-sha256; cv=none; b=yafrAiGfL2s33ip1q0AztASYfqlGj0LANcUaA8Ku7fdVA6FsdiWoVsUnSU+Rb26n3mj0F+ CPgRZjhz171Gw8Sj89UDgd2smnFC/xed64t+xfVQZ3AbogY09Eu2yzWXbHrGlLoLNZnq6F lXsp2RiM5L2+QAudyrxoLuey7XrgF7E1P5Xc7Sulp5J8inLZ7MP4vhG49f1yGye0PKFE/c 5rMGtxLq8FPG3tY8Hx9NL+McC/LLnR9EUV7AK/EqptVd66peJLfii4S2BYLnrsVajnFqev 1z+OtNd6Mc8QJ3vn1TKD40hA7p9vKSCzgzH+9AIOxqWF2u8VvFcz2744Cxzxgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW2F50tyqzK7C; Sat, 19 Oct 2024 13:18:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JDI0Cv003526; Sat, 19 Oct 2024 13:18:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JDI0pN003523; Sat, 19 Oct 2024 13:18:00 GMT (envelope-from git) Date: Sat, 19 Oct 2024 13:18:00 GMT Message-Id: <202410191318.49JDI0pN003523@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: 9ecbda844643 - stable/13 - syslogd: Ignore getaddrinfo() errors if -ss is specified 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/13 X-Git-Reftype: branch X-Git-Commit: 9ecbda844643f19aba4c1652b2f9db7c8427d336 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9ecbda844643f19aba4c1652b2f9db7c8427d336 commit 9ecbda844643f19aba4c1652b2f9db7c8427d336 Author: Mark Johnston AuthorDate: 2024-09-19 10:00:33 +0000 Commit: Mark Johnston CommitDate: 2024-10-19 13:17:51 +0000 syslogd: Ignore getaddrinfo() errors if -ss is specified This can arise if the jail doesn't have networking configured, and if -ss is specified, syslogd won't listen on port 514 anyway. Add a regression test case for this as well. PR: 238006 MFC after: 1 month (cherry picked from commit 5d045d556b1cfeb1487d49017b536afb3df105d3) --- usr.sbin/syslogd/syslogd.c | 8 ++++++++ usr.sbin/syslogd/tests/syslogd_test.sh | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 02f8aa39afe8..e78e2327be3b 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -3825,6 +3825,14 @@ socksetup(struct peer *pe) if (pe->pe_serv == NULL) pe->pe_serv = "syslog"; error = getaddrinfo(pe->pe_name, pe->pe_serv, &hints, &res0); + if (error == EAI_NONAME && pe->pe_name == NULL && SecureMode > 1) { + /* + * If we're in secure mode, we won't open inet sockets anyway. + * This failure can arise legitimately when running in a jail + * without networking. + */ + return (0); + } if (error) { char *msgbuf; diff --git a/usr.sbin/syslogd/tests/syslogd_test.sh b/usr.sbin/syslogd/tests/syslogd_test.sh index e4927868e47f..08e6d76b9ba6 100644 --- a/usr.sbin/syslogd/tests/syslogd_test.sh +++ b/usr.sbin/syslogd/tests/syslogd_test.sh @@ -22,7 +22,13 @@ readonly SYSLOGD_LOCAL_PRIVSOCKET="${PWD}/logpriv.sock" # Start a private syslogd instance. syslogd_start() { - syslogd \ + local jail + + if [ "$1" = "-j" ]; then + jail="jexec $2" + shift 2 + fi + $jail syslogd \ -b ":${SYSLOGD_UDP_PORT}" \ -C \ -d \ @@ -288,6 +294,31 @@ pipe_action_cleanup() syslogd_stop } +atf_test_case "jail_noinet" "cleanup" +jail_noinet_head() +{ + atf_set descr "syslogd -ss can be run in a jail without INET support" + atf_set require.user root +} +jail_noinet_body() +{ + local logfile + + atf_check jail -c name=syslogd_noinet persist + + logfile="${PWD}/jail_noinet.log" + printf "user.debug\t${logfile}\n" > "${SYSLOGD_CONFIG}" + syslogd_start -j syslogd_noinet -ss + + syslogd_log -p user.debug -t "test" -h "${SYSLOGD_LOCAL_SOCKET}" \ + "hello, world" + atf_check -s exit:0 -o match:"test: hello, world" cat "${logfile}" +} +jail_noinet_cleanup() +{ + jail -r syslogd_noinet +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -296,4 +327,5 @@ atf_init_test_cases() atf_add_test_case "host_filter" atf_add_test_case "prop_filter" atf_add_test_case "pipe_action" + atf_add_test_case "jail_noinet" } From nobody Sat Oct 19 14:31: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 4XW3sc2mxFz5b8TL; Sat, 19 Oct 2024 14:31:16 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW3sc0JXBz4Y2t; Sat, 19 Oct 2024 14:31:16 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-7b152a923a3so166335085a.3; Sat, 19 Oct 2024 07:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729348275; x=1729953075; darn=freebsd.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=pT1sKTDvEaqTuIITBsXOtbuRwzvC5Chd3ATtccXaEfQ=; b=QyejdiHgOe0tQ7+PM5AR4aTPYyb58bXbpoDGXy4QGH1LF/KDAlsV1HETAGsNE+L1a+ +4hGq+yKc4Kaey/V8Sr5w9Oc+IJuILCE9NvWmUriqX/el+5GObFOXi1DHIiiO6ny437b B+a80mgZOBVd5OJnwOuTthuPjg0s9tTUa5vEPykNYcvYtMI6BUbdI1zCCkw4VTHhtE60 huC/gOH6CzheYSHUbJUdEZgDNAggOaeeVdXGw9iR/EEiMBM5v49N3Lj68mLx1tfS/XoC iaGdp7291ExHro6EcXzn60A0/nhcGDt04Ld1dTunnwsXFgNe6S7kzrf15j1lWJpoltHQ VY5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729348275; x=1729953075; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pT1sKTDvEaqTuIITBsXOtbuRwzvC5Chd3ATtccXaEfQ=; b=QZVUgFpzCCwNj26oK5mKybBlRb43GEtIhHbHbEDZ2m0bh3BXXvc6yWb7l9IasD1Zmh Brd2kHOR1LBdFFPlA+iQP5Hy0Wm+h2bVC5Wdxq4sYjtQNS5rrkTwylDbyfZSHMeT0vXE Iq65PAs6TX2Fr7pv1YZirkWD91rxGYK1/pO2HRr0BANAiMDq5qCNA6k5SjYrmuPftNOm TCSv7WyWDhPU05Od2wWNQuZ8oSvNEaalTppagDGaehu7H5YLur62+F3RVpHuVMDj8pxt IPigpBR6attUiprcMoxNJI7C8eY4NHAmryUDETP8IujCkz8Iwj12KslsclgKcpeKkbGv I1vQ== X-Forwarded-Encrypted: i=1; AJvYcCV5uO6maeFRDCUX+G07i4ND0Kc5B3MHIhFvVu7xprCnIBL12a8jy7iw0wyYsoojXKo/QujlnWAo864qYZm0mTn2y/og@freebsd.org, AJvYcCVPzHlOZPejnt8PISv2692Ey8/cQg+eBWFbLLvyzw5fPQ6U1OtrDWs49RL4z/akuSJljkasyQnTMjpyZYY5Hvbb3apyKdE=@freebsd.org X-Gm-Message-State: AOJu0Ywszzsf7I+0mZ/V7x7dF59LHqAXdMk4OyAz4Hw4yrf5SU22SvnT novBo6EKml4g+VRQs2h83Y+vqxViSqPZHmSMf67e9FuxJw+pS6u1nm7glw== X-Google-Smtp-Source: AGHT+IEIUF4y8rfhHOWVSn0+yjI7Bg1KCHmyqKbX4/Y6vfgrPbeuGuWD/rgyOumOIW+eBkkf5c1kJA== X-Received: by 2002:a05:620a:1a8d:b0:7af:c818:bca with SMTP id af79cd13be357-7b157be31d4mr611860285a.46.1729348274646; Sat, 19 Oct 2024 07:31:14 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b156f954fbsm188129385a.46.2024.10.19.07.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2024 07:31:14 -0700 (PDT) Date: Sat, 19 Oct 2024 10:31:12 -0400 From: Mark Johnston To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 4f2ca36c7bec - main - arm64: Disable coverage sanitization of `pmap_update_strided` Message-ID: References: <202410111653.49BGrin3091045@gitrepo.freebsd.org> <92030090-11B4-484B-8FD4-6B92F34FD717@freebsd.org> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <92030090-11B4-484B-8FD4-6B92F34FD717@freebsd.org> X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XW3sc0JXBz4Y2t X-Spamd-Bar: ---- On Fri, Oct 18, 2024 at 10:01:18PM +0100, Jessica Clarke wrote: > On 11 Oct 2024, at 17:53, Mark Johnston wrote: > > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=4f2ca36c7becd20b21ce5ef7256bbd42f732dafe > > > > commit 4f2ca36c7becd20b21ce5ef7256bbd42f732dafe > > Author: Zhuo Ying Jiang Li > > AuthorDate: 2024-10-11 16:41:49 +0000 > > Commit: Mark Johnston > > CommitDate: 2024-10-11 16:52:53 +0000 > > > > arm64: Disable coverage sanitization of `pmap_update_strided` > > > > The break-before-make update invalidates PTEs, including the PTE > > pointing to curthread, causing a fault in `trace_pc`. This > > addresses a similar issue in > > 01bb9a2a3557bc9389f628d301cd691e08266f1d. > > This broke* GitHub Actions due to the use of Clang 12 (newest Clang in > Ubuntu 20.04 LTS which isn’t EOL until April 2025) which doesn’t > support this sanitiser. Probably the easiest thing to do is to leave > the relevant __nosanitizefoo defined to nothing unless that sanitiser > is actually enabled (via __has_feature), as it’s not necessary outside > of that, and if it’s enabled then you know it’s supported? This seems to work, in that I reproduced the build failure locally with CROSS_TOOLCHAIN=llvm12 and then verified this patch: https://reviews.freebsd.org/D47193 > Jess > > * Masked by the OpenZFS import breaking it earlier in both commit > history and build order > From nobody Sat Oct 19 14:34: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 4XW3xW12vYz5b95b; Sat, 19 Oct 2024 14:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW3xW0SzDz4YVg; Sat, 19 Oct 2024 14:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729348479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fvrMv1kFKv5JRmbUzWspocmyOD68stJb3SBS5yIM/8=; b=SzI11gZ3wtlKua7vgg/iNYUiiXUWMc7pQWvBdZcTZV6aDyi3yvQhnpM8pdqTOk77IcBF1K /fJ5kLnKgSBEcV899oBWfFcyzvKy+dbNGrKgF4zTOmD9RlpmOuevymyeD8P+qkcES/vlpj 3Rr3MBPe9uWTN3bkRvylDVX29UyRU4EabET7oZ2d2Z0rjnGX3Zr1trykD5KuW0x+H1wiak oVEFtg9bQWurVPKd9/feo6GDMj7wT1FOLLRSMbunvSi9nTEe/reGdFH14VwtwGUm9hFRgW QU5MR7LfzAslDZeeEKSnchsrwqQaDHooc8NOrhuRF62rwlC90mKWqgcQmnIqlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729348479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fvrMv1kFKv5JRmbUzWspocmyOD68stJb3SBS5yIM/8=; b=rHELAOniY3levAcWzurtMkbblXMCjXtYabPtVa4Rgv0b6rbEc8luZpbKf1gC27mZ7hpZSe 4S/xHE+iT34SUzoTcrRtOsXnOV5ngrEiGbKJZreIBWoe0aMTKxhpevEALS9aupX9QiKUCa mMY950Bqu2s/DWLSIRPAp+dVfVk0Fn99tt5i9flFB8/8fumJOFOpcPh12fY0oboNjKkCyR m66UU4VcRbLlWEiDM4pe8iPfR7QK56CR3knTRLSUKaDHFd8nQKrriDPa6ktQfyhWLiwm4q x2knrDbwVO+74h8hX56kNrsRSpQITRVvwWMBiccP3lBoyVjqsg+vRJduMqyhJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729348479; a=rsa-sha256; cv=none; b=cIwIrNwv9X6dhPsppVCrWULBAniaWrYGjRJSlxmakSqOZgCOQRrapsARgT3Yfs1HV+PtGX zyvlzIGHb95tEgyMu4FQaqC2I0wPynEOMofbuNygvmwbWw3gTCuJHeTTrY71n6O9eS/9m9 4Dd30CoECGaNqJjzOm3YLtWyczaeEFAhcClLEK92O6i+06mo3Vj3oLrLynuHNRCh54X8pc c8SdiQCkQqJbsl9JmQIiFOiz65OtGIjp89ghvr0U4pmpZ6X1KIC1Tw6PW6aZ2rpcRJPvMu 2jst9KmFz8eRAtPP3ePD5WQ2O82gq02NOZWWOq++7HYg6wcP/giCu+u2seBVZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW3xW043CzLjw; Sat, 19 Oct 2024 14:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JEYc5e049444; Sat, 19 Oct 2024 14:34:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JEYcT0049441; Sat, 19 Oct 2024 14:34:38 GMT (envelope-from git) Date: Sat, 19 Oct 2024 14:34:38 GMT Message-Id: <202410191434.49JEYcT0049441@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: 6e24259590a3 - main - RELNOTES: Add mididump(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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e24259590a3c3b7784c5c656f6be1bee72d0bfe Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6e24259590a3c3b7784c5c656f6be1bee72d0bfe commit 6e24259590a3c3b7784c5c656f6be1bee72d0bfe Author: Christos Margiolis AuthorDate: 2024-10-19 12:05:03 +0000 Commit: Christos Margiolis CommitDate: 2024-10-19 14:29:33 +0000 RELNOTES: Add mididump(1) Sponsored by: The FreeBSD Foundation --- RELNOTES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELNOTES b/RELNOTES index a6f27df32d87..71dea5561ed6 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +f57efe95cc25: + New mididump(1) utility which dumps MIDI 1.0 events in real time. + ddfc6f84f242: Update unicode to 16.0.0 and CLDR to 45.0.0. From nobody Sat Oct 19 14:34: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 4XW3xX2B2Vz5b8st; Sat, 19 Oct 2024 14:34:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW3xX1fBkz4YL3; Sat, 19 Oct 2024 14:34:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729348480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8dCBN3C64CXuX4Y57DmfaAnFFG1zsfKJSMdh74vmzs8=; b=HrxdOW+udGMOwn1BYDSN8T+VhnzpBPID53RTiSyLkwA83RABM0F8U7iFCDrT0AHcNOjG2n h0OPewTgpiIb/nMbiqrPcphHsdNJ0ANgAlMq8aMbAKUcHau+V4HhtYNQp208svhoLXVHWA A0vYp2k8t1OPhj+/QSW6XU7y46iaWb+cHHwPCtkgyyDpqzcEPW118EdW6yhFZi9XBuEKEn Ieb6cSSbkWVE6YjFWSQOWduPm9+gfFqjktxmiOHg2uxDUDkAvaqfv3J3WxV8SxAKoBLDFu uSitkFjqjyJexDUguDiOWmK2E/mOlaYilHSTzFU6I6+s5RDX5eXncv/qg1DGXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729348480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8dCBN3C64CXuX4Y57DmfaAnFFG1zsfKJSMdh74vmzs8=; b=AbDeEYE2bY7ugNWE+xrzQMX5eopiFo67rrN64w1dJehU+CcZ7N3Tcx1uMqdNSKqDluJ1EP jYmusGSP45+xv4NJFltzG53b9vZxHZ0pWKEnztqXTCLkd/P8VTHGk5tLfY3/pwb6PCeaDe u1naEpcg80b8ZUJJyCTdxSdILGxrQDv4z9VxVNAZVbcX32HmMtvHBEp0ujSZwsF8CCCH4O PYD/hD4WTSB5u5uNmybl+g+0Uv8BbeRip0i1fO8XJVeHZm/xXpSBD0YYit2gi47inkuKIQ JRCRPK3mJ9eeo+A4szYDi54PBFgYV/LEhj60WqtqwkCDx0m0S8oYOOAZHlQwOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729348480; a=rsa-sha256; cv=none; b=tqAQnNyS8Eb2MOeRoOuQNk2bo6itt9W/acAQF1n4ojTxs7yI5mjv0GPnsb4nO1AYmumlYa g2NY9J0gXPKg1mRVDKaihFL5GTH09AwTg34d87wtpZCAW5V+3EKd5GR/atGqSI9+DAom8d S9F0oTy+JXJ3KqpVLF9U0QHa7ohOTcAyn7WCkhE1/3c2xykVwGYv/gP92A/tVtMB1Jo3AT 1b7+2sjh34AXxX6R3aIEJYmExKSv6C/+78Fr4uFYkhE7HOT+sJorBlPJP5YAt3aFbPhd+C bAg2vb67JEzFtin2Y3sGPhRpxAT7Vz1p5Viu2yjAaoe/zOfj98jYoiXxvzs7uQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW3xX1Fm2zLjx; Sat, 19 Oct 2024 14:34:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JEYeu8049489; Sat, 19 Oct 2024 14:34:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JEYefk049486; Sat, 19 Oct 2024 14:34:40 GMT (envelope-from git) Date: Sat, 19 Oct 2024 14:34:40 GMT Message-Id: <202410191434.49JEYefk049486@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: feb9ba2993cf - main - mididump(1): Use LIBADD instead of LDFLAGS 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: feb9ba2993cf6aefa49b7b17ca49c52210c26035 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=feb9ba2993cf6aefa49b7b17ca49c52210c26035 commit feb9ba2993cf6aefa49b7b17ca49c52210c26035 Author: Christos Margiolis AuthorDate: 2024-10-19 14:34:20 +0000 Commit: Christos Margiolis CommitDate: 2024-10-19 14:34:20 +0000 mididump(1): Use LIBADD instead of LDFLAGS Reported by: kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D47190 --- usr.bin/mididump/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/mididump/Makefile b/usr.bin/mididump/Makefile index f3b273172b1e..758bbb3a1189 100644 --- a/usr.bin/mididump/Makefile +++ b/usr.bin/mididump/Makefile @@ -3,6 +3,6 @@ PROG= mididump SRCS= ${PROG}.c MAN= ${PROG}.1 -LDFLAGS+= -lm +LIBADD+= m .include From nobody Sat Oct 19 14:34: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 4XW3xY5qKbz5b8sv; Sat, 19 Oct 2024 14:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW3xY2fJwz4YPx; Sat, 19 Oct 2024 14:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729348481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xjhoSWrUiP36sR4EpYltGNQjbbYPTkVk/Po+nk+Ye9Q=; b=vvQ0tIrEU6SoiipjNqzgSbS4nS6GEmymg3/tvE4iodDQ5a0bTXwYAB4WXMz1oWY+4fhg5H oJyzW0C5tgMkq1YoyaojyAThjB3QO2HzZCSkVy3QnYUFSNqj4hcwHNlvon/diu109aGdS7 WZ2fSJLcK7vDVPq9+t+sEbC9GrxfJBQBMnKKqqkgeyOFrVEaMtAIlXP/tOn3hUY74bNM1Q n+P6vzVlDTG2A6KVe9ON9WhsITJeuSUHrbYoSiOz8hbz524PAFJLgYsia7CotMqscY+9+l tKzUsOcL86Ikk3ZT8UBQKP2r1jUOHQulG200/WbuV8jdDOb3J9axwN67KoBlLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729348481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xjhoSWrUiP36sR4EpYltGNQjbbYPTkVk/Po+nk+Ye9Q=; b=tFX3BOkWCNpZ/f5hS3D3Ut1vD3zd7LD9BiIK0/mURv/J5vbpgBIYVybS42baALCTh6ozax hDYcp5bQXnX4OdEvY4lRBUTudKWi9Hty0WlXbkAO3cE2dsiCLq5dTpuOSd+gbDRuOrVF6S muUCKYbRXhnoCFZmbsvwgQ2NYEojENS60z5TDsLVGAKs4rxgLlmsIG1Ek2cGwXytAWzc2t qeOhPlPdlGMHXy254cY3ZunTocCHLLsTZyJCELtpe/zgcWZW2AIQDY+nEk97Lp/+/XzxD7 bHIsviegkykPrekaI3wXw04BoaBeECRdmRNd/8huRJuuRmO9l1Y5EJ/gubIQnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729348481; a=rsa-sha256; cv=none; b=M3qq9IHY3gV8HmEwtr2qP52ot9vCJ9CptZYWsFjlQpFBFhzUiSks/eiYCr2vVb5S1st15K sVXyl2AlES9CwjOiY3UFweP3V9zpsyZSml+VgtKi0n/X7JiOY7pqqWONhv3AgH6U9l56eb e4Wydzy+QBlfUMdix7wUPrRTpdeVffQ4nS4tG0XR7se7Yf8monFbeuMPq97PSN6+9medsQ P6FDSZXJoslTgYkeapErSLUfDG5lomrp2vWdGW1ulqhiveHA/PedwACnv8FVjXE/Ji4Vo7 /Kjf+X21XUFF0u87S0kMbsFVQshQ9gPtoQJbiGfcoK8dHl50Lln2ZWcUWNRg/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 4XW3xY22ZhzM7N; Sat, 19 Oct 2024 14:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JEYfMR049525; Sat, 19 Oct 2024 14:34:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JEYffj049522; Sat, 19 Oct 2024 14:34:41 GMT (envelope-from git) Date: Sat, 19 Oct 2024 14:34:41 GMT Message-Id: <202410191434.49JEYffj049522@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: 53314e34d5e8 - main - mididump(1): Use nitems() 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: 53314e34d5e8e7f781ab990805b22f7a56bc0580 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=53314e34d5e8e7f781ab990805b22f7a56bc0580 commit 53314e34d5e8e7f781ab990805b22f7a56bc0580 Author: Christos Margiolis AuthorDate: 2024-10-19 14:34:27 +0000 Commit: Christos Margiolis CommitDate: 2024-10-19 14:34:27 +0000 mididump(1): Use nitems() Reported by: kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D47191 --- usr.bin/mididump/mididump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/mididump/mididump.c b/usr.bin/mididump/mididump.c index 16bd775f10d4..8ebcce547ac4 100644 --- a/usr.bin/mididump/mididump.c +++ b/usr.bin/mididump/mididump.c @@ -28,6 +28,7 @@ * SUCH DAMAGE. */ +#include #include #include @@ -39,7 +40,6 @@ #include #include -#define ARRLEN(x) (sizeof(x) / sizeof(x[0])) #define NOTE2OCTAVE(n) (n / 12 - 1) #define NOTE2FREQ(n) (440 * pow(2.0f, ((float)n - 69) / 12)) #define CHAN_MASK 0x0f @@ -189,7 +189,7 @@ main(int argc, char *argv[]) case 0x90 ... 0x9f: b1 = read_byte(fd); b2 = read_byte(fd); - pn = ¬es[b1 % ARRLEN(notes)]; + pn = ¬es[b1 % nitems(notes)]; snprintf(buf, sizeof(buf), "%s%d", pn->name, NOTE2OCTAVE(b1)); if (pn->alt != NULL) { @@ -211,7 +211,7 @@ main(int argc, char *argv[]) case 0xb0 ... 0xbf: b1 = read_byte(fd); b2 = read_byte(fd); - if (b1 > ARRLEN(ctls) - 1) + if (b1 > nitems(ctls) - 1) break; printf("Control/Mode change channel=%d, " "control=%d (%s), value=%d", From nobody Sat Oct 19 15:36: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 4XW5Jx4dHvz5bCZw; Sat, 19 Oct 2024 15:36:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW5Jx29RCz4hdv; Sat, 19 Oct 2024 15:36:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729352193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=10te78MOFYU7fndnEnPyaHX0N8i3iqFi+BlskeXT8wY=; b=VWnt2+7Vd5toF2tYwXFYmYemeOmg3BXUKrO/GkH42HVQqIz+55w3fgn/lJ8CKrqwBodEYB Ty499gQVMTOPpVJi2t2nQC3x2PMMem9llYPSDmZr6hqwLn3hFZrDK+ZftwoeWH25/y9rQC r/p+DkrGKb/MIho2mbqy2ObCEcLwuF0DOnw5/DW5owbI25BZytE9fkOj022xuEe2WEaVbg S8bcFkb1aWK1+86LRtDU0VdvfUgxIcY43njHs6c0+5QqK0E8h7zh1KKhlInD9BDMRgaSzP qGuTDuKQxvFxoanSvMA8kYJ08eqhRkdml+TKvnmvybJkzdJolm0VGMWxz2QhpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729352193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=10te78MOFYU7fndnEnPyaHX0N8i3iqFi+BlskeXT8wY=; b=QLU6SHZ2QKANpmFmNBiNOqsfiZiEkGvVZqLJ9oGHXPtlOFCdo+n/qbpa3IY+N/+WMMnfqA VGDLkx9j6zI3JyhDaBODbYrhNzMTE6oFuPFbW0rkNlzDWjps39Ofgm/HYKDayWMUPISKrx ju6Jt0hJEICy4vmnzcwTAl00KJprt/BjZF3R1K6iN9jFLF2ymHH4uzQlBRs0Luz5/n97ZH uyrGE3GpJbcTDq3tLz4ICvPryywCdkGNMyWLjzBJknw8bpYMAP/PmN4isUSKeF2pN1jkkQ RfrLqLMuPnjvmihG9CN5W8pJxnWROsf2AWpM5qXpysx0+u4eahk2i4GheVDxlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729352193; a=rsa-sha256; cv=none; b=iPajlnV3Kk8erjT5mspT2rfjB4bxSu0eqVKusryiUPc94P2Jns0MLTq8UaH0JsnnwxozNB 4IoezRzl7Tub50xw3W1FIcnhIIAFmewmyw/OT9IC7GKLjpGW1qhdT0fNsh7VyVAYZqwW0H KopzKbBNvvF7kQOFhR5PtaMOdnm6OYC+vxuUt9+XIBNS0vivwt+bLJBKFV9sGvyxKuubUJ lJl36FpNjMTV4lQyhg2Y6ZNrx9P8hjlrxtOs8AmfKyv/WPQ/1cQsc/Z6Cj2vTXCcR5ebRB 3XqXkxlHqSWhwSULpXHFqXlysE8Spmp0pUYjBr7C7G+aZlhr6HpsxjRxiNOFaA== Received: from [IPV6:2601:5c0:4200:b830:5c64:99cf:d897:544b] (unknown [IPv6:2601:5c0:4200:b830:5c64:99cf:d897:544b]) (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 4XW5Jx0QpNz11pV; Sat, 19 Oct 2024 15:36:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Sat, 19 Oct 2024 11:36:32 -0400 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: f4e35c044c89 - main - bus: Set the current VNET in device_attach() Content-Language: en-US To: Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202410191304.49JD4JoM084001@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202410191304.49JD4JoM084001@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/19/24 09:04, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f4e35c044c8988b7452cefbdcc417f5fd723e021 > > commit f4e35c044c8988b7452cefbdcc417f5fd723e021 > Author: Mark Johnston > AuthorDate: 2024-10-19 13:03:56 +0000 > Commit: Mark Johnston > CommitDate: 2024-10-19 13:03:56 +0000 > > bus: Set the current VNET in device_attach() > > Some drivers, in particular anything which creates an ifnet during > attach, need to have the current VNET set, as if_attach_internal() and > its callees access VNET-global variables. > > device_probe_and_attach() handles this, but this is not the only way to > arrive in DEVICE_ATTACH. In particular, bus drivers may invoke > device_attach() directly, as does devctl2's DEV_ENABLE ioctl handler. > So, set the current VNET in device_attach() instead. > > I believe it is always safe to use vnet0, as devctl2 ioctls are not > permitted within a jail. > > PR: 282168 > Reviewed by: zlei, kevans, bz, imp, glebius > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D47174 Hmm, there was some other review I thought that had a completely different change. That change removed all the vnet stuff from new-bus and instead handled it in if.c. Specifically, that if_attach would set a default vnet to vnet0 if there wasn't an active vnet at the time. See all the discussion in https://reviews.freebsd.org/D42678 which has a patch that I think is correct in the comments. -- John Baldwin From nobody Sat Oct 19 15:43: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 4XW5Sm2KxJz5bD6N; Sat, 19 Oct 2024 15:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW5Sm0Q0nz4jXV; Sat, 19 Oct 2024 15:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729352600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PrfR+yGfdJ+h/NvQyTzws4TH3kD+oIfrkTP8ZkNhg9Y=; b=oqJlN07nxIXwSvSOtLg8ipKff6bKSlYJBLce3WWmVihChH1bKlkcR7US0P+KRCoRxKHLWz oeN+1vwVBNmM5BnegDBOL1oSaVM222ov7RlJ24X8BZCJCQJFA4K8nAOI5Qerx6YTP1HCbK DxcBj51jG7Gv8DUW6LCUyI3BjD4h8OX1CgiaK2vpMyYaNDtK4NwaMPItdz27ez/o9nWNjN F0FjPIqGqYiv56Pf6rG1hXG4VcrFIhCbvaGsbFDfqz4QXJaV7H/dag190y1p8cfJIL3w32 iiiBPYvG2joBC5zsGKObtToPTXyve8bfAUc30sNEU8I+M2KEp3Xk9chtEtQwfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729352600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PrfR+yGfdJ+h/NvQyTzws4TH3kD+oIfrkTP8ZkNhg9Y=; b=P7X1UHMWC4t/KZR5hpLL9CMbarM7U9xZmlEsvYpmzie/kYDkmzk7/9uVrSIAORAyHvvnL9 vjwJMKFl8zUk6+bhB3pu85lekmNGJsGEdWKSk5clRbnsCKeHpf44luJ7onYPfcmNHBHlNu UV8ZsCZRSVyOWZYkRtHSvkf6i9EC7rj/5ep819b+o462eLNQvzdTGMKqZ6G+zUCL5LYgne E6C7+Xo1nwX4Vyf4dHtOWiMTM1D9nNZ9kATYOHOxvxTbUVkxa+SCJmLrKCM+gTVj9Rom8y XnTNt1h1+AOxjWbZ9ef/FfpSNR0Lb3bi1GxOvZMAOM/Vj7+G5AUuyhOYWbZyBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729352600; a=rsa-sha256; cv=none; b=NGGhBPKhLY5dj8/AO9YYlTgqoReEJhuBpQbyhNLVYvPwMbrMO56IbU97L3/SBMJVjZhdMK zZdttark8bzI13LKCNPcY9fxjHPzwVMWEEe0oTjXtiIrQYcgSKFa2NRG1yUkBo49G7v8/F iLonT9zOJpWcYefRVrW5lGloM2rbs97/QX7I4SVvx9JVZ9zD/WQSxbGFd7wrrbtyeKHKAK 7pNQ4IH9CbIK00KGUCToZgnkF7TAgMCYcFUw5lSzDkFWWKKTVLyyb/mU2hEsBKeCUkBlfE WpSsI1Lo/R5bYc48t3vMCQCV1l/saFoNseSnmWvMvHcxIlB95ITvHQzOJ/sDAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW5Sl75WVzNLM; Sat, 19 Oct 2024 15:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JFhJgb080558; Sat, 19 Oct 2024 15:43:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JFhJjj080555; Sat, 19 Oct 2024 15:43:19 GMT (envelope-from git) Date: Sat, 19 Oct 2024 15:43:19 GMT Message-Id: <202410191543.49JFhJjj080555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 86ba5941b132 - stable/14 - bhyve/nvme: Fix Infinite loop in queue processing 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 86ba5941b132c73476a2a1b76ae53902a027b81c Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=86ba5941b132c73476a2a1b76ae53902a027b81c commit 86ba5941b132c73476a2a1b76ae53902a027b81c Author: Chuck Tuffli AuthorDate: 2024-10-13 13:58:48 +0000 Commit: Ed Maste CommitDate: 2024-10-19 15:42:15 +0000 bhyve/nvme: Fix Infinite loop in queue processing In the functions pci_nvme_handle_admin_cmd and pci_nvme_handle_io_cmd infinite loops are possible in the bhyve process if the sq->tail value is greater than sq->size. An attacker could overload the host CPU. Fix is to validate that doorbell values: - Are for a valid (i.e., created) queue - Are not the same as the previous value - Fit within the available capacity The emulation will generate an Asynchronous Event Notification (Invalid Doorbell or Invalid Doorbell Value) if enabled and ignore the doorbell update. While in the neighborhood, remove a redundant bounds check. Reported by: Synacktiv MFC after: 1 week Security: HYP-14 Sponsored by: Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46064 (cherry picked from commit 5374b9e146811757540e35553a7712c5b9b29239) --- usr.sbin/bhyve/pci_nvme.c | 81 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 73 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index b8eb24d91b49..7e6c8bc9d719 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -265,6 +265,17 @@ struct pci_nvme_aer { uint16_t cid; /* Command ID of the submitted AER */ }; +/** Asynchronous Event Information - Error */ +typedef enum { + PCI_NVME_AEI_ERROR_INVALID_DB, + PCI_NVME_AEI_ERROR_INVALID_DB_VALUE, + PCI_NVME_AEI_ERROR_DIAG_FAILURE, + PCI_NVME_AEI_ERROR_PERSISTANT_ERR, + PCI_NVME_AEI_ERROR_TRANSIENT_ERR, + PCI_NVME_AEI_ERROR_FIRMWARE_LOAD_ERR, + PCI_NVME_AEI_ERROR_MAX, +} pci_nvme_async_event_info_error; + /** Asynchronous Event Information - Notice */ typedef enum { PCI_NVME_AEI_NOTICE_NS_ATTR_CHANGED = 0, @@ -2784,6 +2795,38 @@ complete: pthread_mutex_unlock(&sq->mtx); } +/* + * Check for invalid doorbell write values + * See NVM Express Base Specification, revision 2.0 + * "Asynchronous Event Information - Error Status" for details + */ +static bool +pci_nvme_sq_doorbell_valid(struct nvme_submission_queue *sq, uint64_t value) +{ + uint64_t capacity; + + /* + * Queue empty : head == tail + * Queue full : head is one more than tail accounting for wrap + * Therefore, can never have more than (size - 1) entries + */ + if (sq->head == sq->tail) + capacity = sq->size - 1; + else if (sq->head > sq->tail) + capacity = sq->size - (sq->head - sq->tail) - 1; + else + capacity = sq->tail - sq->head - 1; + + if ((value == sq->tail) || /* same as previous */ + (value > capacity)) { /* exceeds queue capacity */ + EPRINTLN("%s: SQ size=%u head=%u tail=%u capacity=%lu value=%lu", + __func__, sq->size, sq->head, sq->tail, capacity, value); + return false; + } + + return true; +} + static void pci_nvme_handle_doorbell(struct pci_nvme_softc* sc, uint64_t idx, int is_sq, uint64_t value) @@ -2796,22 +2839,34 @@ pci_nvme_handle_doorbell(struct pci_nvme_softc* sc, WPRINTF("%s queue index %lu overflow from " "guest (max %u)", __func__, idx, sc->num_squeues); + pci_nvme_aen_post(sc, PCI_NVME_AE_TYPE_ERROR, + PCI_NVME_AEI_ERROR_INVALID_DB); + return; + } + + if (sc->submit_queues[idx].qbase == NULL) { + WPRINTF("%s write to SQ %lu before created", __func__, + idx); + pci_nvme_aen_post(sc, PCI_NVME_AE_TYPE_ERROR, + PCI_NVME_AEI_ERROR_INVALID_DB); + return; + } + + if (!pci_nvme_sq_doorbell_valid(&sc->submit_queues[idx], value)) { + EPRINTLN("%s write to SQ %lu of %lu invalid", __func__, + idx, value); + pci_nvme_aen_post(sc, PCI_NVME_AE_TYPE_ERROR, + PCI_NVME_AEI_ERROR_INVALID_DB_VALUE); return; } atomic_store_short(&sc->submit_queues[idx].tail, (uint16_t)value); - if (idx == 0) { + if (idx == 0) pci_nvme_handle_admin_cmd(sc, value); - } else { + else { /* submission queue; handle new entries in SQ */ - if (idx > sc->num_squeues) { - WPRINTF("%s SQ index %lu overflow from " - "guest (max %u)", - __func__, idx, sc->num_squeues); - return; - } pci_nvme_handle_io_cmd(sc, (uint16_t)idx); } } else { @@ -2819,6 +2874,16 @@ pci_nvme_handle_doorbell(struct pci_nvme_softc* sc, WPRINTF("%s queue index %lu overflow from " "guest (max %u)", __func__, idx, sc->num_cqueues); + pci_nvme_aen_post(sc, PCI_NVME_AE_TYPE_ERROR, + PCI_NVME_AEI_ERROR_INVALID_DB); + return; + } + + if (sc->compl_queues[idx].qbase == NULL) { + WPRINTF("%s write to CQ %lu before created", __func__, + idx); + pci_nvme_aen_post(sc, PCI_NVME_AE_TYPE_ERROR, + PCI_NVME_AEI_ERROR_INVALID_DB); return; } From nobody Sat Oct 19 16:10: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 4XW64x6BcVz5bFfr; Sat, 19 Oct 2024 16:11:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW64w6FCfz4m8d; Sat, 19 Oct 2024 16:11:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 49JGAsOI058439; Sat, 19 Oct 2024 19:10:57 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 49JGAsOI058439 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 49JGArbR058438; Sat, 19 Oct 2024 19:10:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 19 Oct 2024 19:10:53 +0300 From: Konstantin Belousov To: John Baldwin Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f4e35c044c89 - main - bus: Set the current VNET in device_attach() Message-ID: References: <202410191304.49JD4JoM084001@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4XW64w6FCfz4m8d X-Spamd-Bar: ---- On Sat, Oct 19, 2024 at 11:36:32AM -0400, John Baldwin wrote: > On 10/19/24 09:04, Mark Johnston wrote: > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=f4e35c044c8988b7452cefbdcc417f5fd723e021 > > > > commit f4e35c044c8988b7452cefbdcc417f5fd723e021 > > Author: Mark Johnston > > AuthorDate: 2024-10-19 13:03:56 +0000 > > Commit: Mark Johnston > > CommitDate: 2024-10-19 13:03:56 +0000 > > > > bus: Set the current VNET in device_attach() > > Some drivers, in particular anything which creates an ifnet during > > attach, need to have the current VNET set, as if_attach_internal() and > > its callees access VNET-global variables. > > device_probe_and_attach() handles this, but this is not the only way to > > arrive in DEVICE_ATTACH. In particular, bus drivers may invoke > > device_attach() directly, as does devctl2's DEV_ENABLE ioctl handler. > > So, set the current VNET in device_attach() instead. > > I believe it is always safe to use vnet0, as devctl2 ioctls are not > > permitted within a jail. > > PR: 282168 > > Reviewed by: zlei, kevans, bz, imp, glebius > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D47174 > > Hmm, there was some other review I thought that had a completely different change. > That change removed all the vnet stuff from new-bus and instead handled it in > if.c. Specifically, that if_attach would set a default vnet to vnet0 if there > wasn't an active vnet at the time. See all the discussion in > https://reviews.freebsd.org/D42678 which has a patch that I think is correct > in the comments. > In fact, I think that bus level is better. At least, I know that detach also might need something by vnet (e.g. mce(4) needs to clear the IPSEC offload database on detach, although it still does not do). It sounds as if bus_topo_lock() is the right place. May be some other name for it is better, like bus_topo_changes_enter(). From nobody Sat Oct 19 18:41: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 4XW9Q11kwWz5YvQN; Sat, 19 Oct 2024 18:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW9Q11CnDz41kS; Sat, 19 Oct 2024 18:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729363273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8lC/jHixkTIdnSyF0nzf0W5whzupIbO1RSfM1+R04Rg=; b=LOC7q2vBInqwnAzBodDGwM0sAPq1jRg10TcrekgoQVGXmsg7o5Gvkc8qbXkH06fI3Ct2z5 tyFOPoWlkiaTMIXUkrfSm995RHCKIefXs3ae9EOkRvOMKBRZSweWM59Lf0u9Z0dQ319Zx0 M0OUuoAbwa5OCWNtXlw4FJDGTrsD50bfX4ptSkUktkFYJfrhkHaE+wrWyFhSs+zVbJeVVL 4rq+72UBWZeBOz7S3DmoP90FfpbMty+RT6wWZQmaemdWsvSZXNT5Ouf7JsPbvlIDsxEELm VtZiFRbhRHHhSUEa7rGeymxFOt3iElBEYQa9U2vpXqS8Yrom5UucI3LTJnsBLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729363273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8lC/jHixkTIdnSyF0nzf0W5whzupIbO1RSfM1+R04Rg=; b=CfR/8dYe5hC0e9h8gHqXEIb52xDEITI5NfF1t8nhiqVUo7ENAB9FK+Wn+OepskJ77/aMXx KGY1xRSyBp1Ip/lQF06VjDvtenn4Wn4+XuGGFFyX5GOve+6Q3SIILDZ94iP7BN+92rZfmq xQ/D5fixVpo1fr/CBBGDCkAfgmbt0o08FlqrPU42t/m1MATbj260n4iRU8MWqYpITz71W6 Nnu8//XP5mSz44uuAH39+c73imPFpSEJOVvkCg9s3HHZAJGVCPCV61VOGPR8rBUMxgCifw 9GztqBSyR3YkDf5gF3Q0v2FqShcyPUD/Ww4JDsakA4DvIGOszxL4kn4rp+aVNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729363273; a=rsa-sha256; cv=none; b=AMyMh3B1sXGj41Ma/kgegFD9DqaWRVwm0xYo3QKOUJRZPmofTddeviDGI4TZiezbeEl+70 m/CUA0a13d4jnUm9gB25c26eJdpM1XwDe9S4Yu9/L8d9dUfpocCsm1Ee8cSJl9H9VJP7Ot ixmLyjH3kHibxw1osffIvxmZZALE82JIFI2Ja6+J3NL6wXcRgmFH96HGKZHauDC4Tp81yF kACshEYcSB2S6ThrQWi/ezSs1vWigVIQB2Dw27CTIQUzxSNY8Bi3RVUNmwwHSeVKfphFzo i1YZlcZnmRuw1oUibkFNxqXXSckJMjL4oqtq8OymykcOiyAWYpRg6bI3kuKL0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW9Q10q9CzT0w; Sat, 19 Oct 2024 18:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JIfD7s008771; Sat, 19 Oct 2024 18:41:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JIfDRX008768; Sat, 19 Oct 2024 18:41:13 GMT (envelope-from git) Date: Sat, 19 Oct 2024 18:41:13 GMT Message-Id: <202410191841.49JIfDRX008768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 789576e5de2c - stable/14 - src.conf.5: regen for JEMALLOC_LG_VADDR_WIDE 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 789576e5de2cd11c4931c30ea03651d967106cdf Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=789576e5de2cd11c4931c30ea03651d967106cdf commit 789576e5de2cd11c4931c30ea03651d967106cdf Author: Ed Maste AuthorDate: 2024-10-19 18:38:44 +0000 Commit: Ed Maste CommitDate: 2024-10-19 18:40:45 +0000 src.conf.5: regen for JEMALLOC_LG_VADDR_WIDE Fixes: b90d68c9b28b Sponsored by: The FreeBSD Foundation (cherry picked from commit b0f9f970ec104e1df22ece7c7cdf12240e3c6713) --- share/man/man5/src.conf.5 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index b868b5265763..303854813166 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd September 24, 2024 +.Dd September 26, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -827,6 +827,12 @@ and related utilities. .It Va WITHOUT_JAIL Do not build tools for the support of jails; e.g., .Xr jail 8 . +.It Va WITHOUT_JEMALLOC_LG_VADDR_WIDE +Disallow programs to use more than 48 address bits on amd64. +Incompatible with LA57 mode. +Enabling this option might result in a slight reduction in memory +consumption for jemalloc metadata, but also requires disabling LA57 +(if hardware supports it). .It Va WITHOUT_KDUMP Do not build .Xr kdump 1 From nobody Sat Oct 19 18:42: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 4XW9Rx75FHz5Yv68; Sat, 19 Oct 2024 18:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW9Rx6bBLz42GT; Sat, 19 Oct 2024 18:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729363373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tFryHX88tYXrI3QAWr0GMdGQLhk4P9WV4IDRaHf1OIs=; b=iguCtYTtcOMHqQqmgHYJo2lzFljU4JKXX9ksGmUsCGaqxHsF0knnXgGO7spYn2OrtitTZz cFZm26CI9NGqtvFJbxKyl7uNANCGX7Nl6yt+3oF/QFc6nUzdi8SuuphrlX9kmNK3fjKFDD GtRN90VwTVq0JdhFNZAWM3/WlR6+n+pSog+WTslfhbzpyzMzScFo4sDtKxl7Z0D3vBUp6J CVFZW8z/uv3FYtwFdznYUxyKMnzTneZQbifV7TMrKfO3y7XEhYN8DkLfnNF6zJUdfIsI8m B8v+8OEob8ffjWsX6HqUf7q8TAQzny/QX8rkArcDdVXKQQTpnxbfC047pOt2HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729363373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tFryHX88tYXrI3QAWr0GMdGQLhk4P9WV4IDRaHf1OIs=; b=KxbVpT74tr4EmTe79E66nW7VDYaCOHFZYEqykk2Vxp5yqbtuvSCnWTNXw96hKv1fP2ldxX ZZ/ANwKbQiTV27nXExRnLek9z8X6UMEyj7cF4973IKMOdf4cAft7zo8DuYThAzB8+MBpRP ppSOPLrspU7+vSrdsZKn6KPj+VTAldjdWe9QrST3/ts2IMQ6POZ9Ss77EwxvjIHUe+lpOt HCZhMbR6Ad++4B4WhHLzYcXXrP5a89i6+v3Ff9yE8W8SMVPhqUbjD0FevZQMwtxvkSyN9H 5JZDi6ayy73dkgOm/+Bu1SVJhm+K9zBvKNvib/Zw0J2CDFBqZIR46pNvVpG9Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729363373; a=rsa-sha256; cv=none; b=sSfcVRL5zochxsZc0lFogE0F4+ItYaJ88S1M0anWv+mEtYkwtQqO/s8LnEZAaZwmsNaPRs vr128Mhk82xaW9DzFQzJ4jMwUViUmU1lB0iQ0vy5kLT/nFkYB3T7bZHPiFsjls7wrViDzu Qeurm+zeqEZYrD9l+0qzUQf4ClxMTmyi0z1zxwWdrwUJSH9AuoaBa/El4J8J/Kop4wuiOA csnq0OGW3HuXaqlODjDvY5TC5+YNSAWmDopZEW1JvOPS4j+fI8I5QlP+u9E/XlxrEAQTDm EL9sd22xqakos/uLqSSDDIswl1r08quXDYnRCw7OKboz04VGS35ONP0bv5uyOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW9Rx5tYkzSv7; Sat, 19 Oct 2024 18:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JIgrxW014961; Sat, 19 Oct 2024 18:42:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JIgrYJ014958; Sat, 19 Oct 2024 18:42:53 GMT (envelope-from git) Date: Sat, 19 Oct 2024 18:42:53 GMT Message-Id: <202410191842.49JIgrYJ014958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: df1a36fdfae6 - stable/13 - bhyve/nvme: Fix Infinite loop in queue processing 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/stable/13 X-Git-Reftype: branch X-Git-Commit: df1a36fdfae603ce298b8396ae3388d337c3c5b3 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=df1a36fdfae603ce298b8396ae3388d337c3c5b3 commit df1a36fdfae603ce298b8396ae3388d337c3c5b3 Author: Chuck Tuffli AuthorDate: 2024-10-13 13:58:48 +0000 Commit: Ed Maste CommitDate: 2024-10-19 15:43:46 +0000 bhyve/nvme: Fix Infinite loop in queue processing In the functions pci_nvme_handle_admin_cmd and pci_nvme_handle_io_cmd infinite loops are possible in the bhyve process if the sq->tail value is greater than sq->size. An attacker could overload the host CPU. Fix is to validate that doorbell values: - Are for a valid (i.e., created) queue - Are not the same as the previous value - Fit within the available capacity The emulation will generate an Asynchronous Event Notification (Invalid Doorbell or Invalid Doorbell Value) if enabled and ignore the doorbell update. While in the neighborhood, remove a redundant bounds check. Reported by: Synacktiv MFC after: 1 week Security: HYP-14 Sponsored by: Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46064 (cherry picked from commit 5374b9e146811757540e35553a7712c5b9b29239) (cherry picked from commit 86ba5941b132c73476a2a1b76ae53902a027b81c) --- usr.sbin/bhyve/pci_nvme.c | 81 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 73 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index cbe4d87b6f60..536f34ddb3ee 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -267,6 +267,17 @@ struct pci_nvme_aer { uint16_t cid; /* Command ID of the submitted AER */ }; +/** Asynchronous Event Information - Error */ +typedef enum { + PCI_NVME_AEI_ERROR_INVALID_DB, + PCI_NVME_AEI_ERROR_INVALID_DB_VALUE, + PCI_NVME_AEI_ERROR_DIAG_FAILURE, + PCI_NVME_AEI_ERROR_PERSISTANT_ERR, + PCI_NVME_AEI_ERROR_TRANSIENT_ERR, + PCI_NVME_AEI_ERROR_FIRMWARE_LOAD_ERR, + PCI_NVME_AEI_ERROR_MAX, +} pci_nvme_async_event_info_error; + /** Asynchronous Event Information - Notice */ typedef enum { PCI_NVME_AEI_NOTICE_NS_ATTR_CHANGED = 0, @@ -2841,6 +2852,38 @@ complete: pthread_mutex_unlock(&sq->mtx); } +/* + * Check for invalid doorbell write values + * See NVM Express Base Specification, revision 2.0 + * "Asynchronous Event Information - Error Status" for details + */ +static bool +pci_nvme_sq_doorbell_valid(struct nvme_submission_queue *sq, uint64_t value) +{ + uint64_t capacity; + + /* + * Queue empty : head == tail + * Queue full : head is one more than tail accounting for wrap + * Therefore, can never have more than (size - 1) entries + */ + if (sq->head == sq->tail) + capacity = sq->size - 1; + else if (sq->head > sq->tail) + capacity = sq->size - (sq->head - sq->tail) - 1; + else + capacity = sq->tail - sq->head - 1; + + if ((value == sq->tail) || /* same as previous */ + (value > capacity)) { /* exceeds queue capacity */ + EPRINTLN("%s: SQ size=%u head=%u tail=%u capacity=%lu value=%lu", + __func__, sq->size, sq->head, sq->tail, capacity, value); + return false; + } + + return true; +} + static void pci_nvme_handle_doorbell(struct pci_nvme_softc* sc, uint64_t idx, int is_sq, uint64_t value) @@ -2853,22 +2896,34 @@ pci_nvme_handle_doorbell(struct pci_nvme_softc* sc, WPRINTF("%s queue index %lu overflow from " "guest (max %u)", __func__, idx, sc->num_squeues); + pci_nvme_aen_post(sc, PCI_NVME_AE_TYPE_ERROR, + PCI_NVME_AEI_ERROR_INVALID_DB); + return; + } + + if (sc->submit_queues[idx].qbase == NULL) { + WPRINTF("%s write to SQ %lu before created", __func__, + idx); + pci_nvme_aen_post(sc, PCI_NVME_AE_TYPE_ERROR, + PCI_NVME_AEI_ERROR_INVALID_DB); + return; + } + + if (!pci_nvme_sq_doorbell_valid(&sc->submit_queues[idx], value)) { + EPRINTLN("%s write to SQ %lu of %lu invalid", __func__, + idx, value); + pci_nvme_aen_post(sc, PCI_NVME_AE_TYPE_ERROR, + PCI_NVME_AEI_ERROR_INVALID_DB_VALUE); return; } atomic_store_short(&sc->submit_queues[idx].tail, (uint16_t)value); - if (idx == 0) { + if (idx == 0) pci_nvme_handle_admin_cmd(sc, value); - } else { + else { /* submission queue; handle new entries in SQ */ - if (idx > sc->num_squeues) { - WPRINTF("%s SQ index %lu overflow from " - "guest (max %u)", - __func__, idx, sc->num_squeues); - return; - } pci_nvme_handle_io_cmd(sc, (uint16_t)idx); } } else { @@ -2876,6 +2931,16 @@ pci_nvme_handle_doorbell(struct pci_nvme_softc* sc, WPRINTF("%s queue index %lu overflow from " "guest (max %u)", __func__, idx, sc->num_cqueues); + pci_nvme_aen_post(sc, PCI_NVME_AE_TYPE_ERROR, + PCI_NVME_AEI_ERROR_INVALID_DB); + return; + } + + if (sc->compl_queues[idx].qbase == NULL) { + WPRINTF("%s write to CQ %lu before created", __func__, + idx); + pci_nvme_aen_post(sc, PCI_NVME_AE_TYPE_ERROR, + PCI_NVME_AEI_ERROR_INVALID_DB); return; } From nobody Sat Oct 19 18:53: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 4XW9hN5ZTPz5YwGN; Sat, 19 Oct 2024 18:53:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW9hN54M2z43c6; Sat, 19 Oct 2024 18:53:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729364020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bXav+LM4UD2YH4fMeCYlM7/kryu+W9HHogzOLW+qJuk=; b=jSEZYkl3g7MNUV3ugl3waIEebtNSHgLmNnanP5gNTkcOMlUCDho4XtwnTFNGLTKWAgIikx 1Sm7dy/P2AzdeQchAXrJkZXAjeWZ2jHT5IQ6kGxWEat2Bj3FbekYYWSOxygTkD/XpOyPey Ip3utskSnKqIc6WIam5Ery10T797cgxgerdWI0GJ4N6wHtqQacm0I6ydhb3ozPEvTcZweX 0JLZ4H+5/cRr7Tztllj/MJgdyyNDkw0T2KxYjdcgMKWgu7o6uFILo0xpHoZhd7J/uUu2jX XufS9rwj08JuDjREQ5OP6diu0E2m0zcBbMCf1vuljZJkg0NgXcJlN4qa8nCetA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729364020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bXav+LM4UD2YH4fMeCYlM7/kryu+W9HHogzOLW+qJuk=; b=xavmUVUBfY1Anwg/yd3lEE3tIcvEoQeJ/719p6T4y1NYlx1CixpZ39nCqvpwcty1388Tqe xz2X9pV8+3FO5wMiK36nBQFktRnAICxahETNH+k6JLH6/rbUA+KOxvet9iwWAnEjVfYHcq h+rm4LlrAW1NicXq2slIdbSbnG/RLkujHsivigaMLzwwTAF2OKSqtxfEMIOYNqa44epDMT uDnknKq48vM8lfkmIGM9bM4JfjcJ7NQz5pUXIimYGAOQLRbmNAlcnWcm6MqSnd+0sNgxKr KUnGjvfi4xCHcPE0Foc1XEHNZBtZgYFUMAUMf4dNHoSsC+0dWBasVa7+DtK0yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729364020; a=rsa-sha256; cv=none; b=W28cYBPPXJVTvXl9UzZDCSi6pbxqzf5Ebc72EaCC30+h7fCQPW4AniDkGKKIy8rimk0gzB AKwq2oki3Vru68NyqccYPOOEvYy74cLus/dhqO/66Jk6zQOOPTMpTyGNjoe0X6I4uz7yPt vFe+TsV8//VJiebp51IWMO14Abf8+kIubQMsIzRNpkZcnX1N5HIU7yMCkI2CMzyTHtzkoa ZfeZKoe1iHKdP8+jombLZZP8eKUvtAhz2ER/7VtcROQ5p0IBKTd6zgZyShqoAa633tNOkL zMRUW9xEjIsBZCJeBCUHlGuhomh386oarGVbgt85RJAQQK3lLwHQjBayq5cSMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW9hN4gk5zTGC; Sat, 19 Oct 2024 18:53:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JIreb8033419; Sat, 19 Oct 2024 18:53:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JIre10033416; Sat, 19 Oct 2024 18:53:40 GMT (envelope-from git) Date: Sat, 19 Oct 2024 18:53:40 GMT Message-Id: <202410191853.49JIre10033416@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: ef48b2954e24 - main - stand: Fix defaults file 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: ef48b2954e240312e489a06435ac66ed12694a7c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ef48b2954e240312e489a06435ac66ed12694a7c commit ef48b2954e240312e489a06435ac66ed12694a7c Author: Warner Losh AuthorDate: 2024-10-19 18:53:41 +0000 Commit: Warner Losh CommitDate: 2024-10-19 18:53:41 +0000 stand: Fix defaults file Currently, quotes in a comment lead to mal-formed lines warnings. Remove the quotes since it doesn't matter. The underlying bug likely should be fixed, but since stability week is neigh, workaround this. Fixes: 7df3e400ea687 Sponsored by: Netflix Reviewed by: bcran Differential Revision: https://reviews.freebsd.org/D47201 --- stand/defaults/loader.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index 8678c5c50d4f..d266c240955a 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -27,7 +27,7 @@ vesa_load="NO" # Set this to YES to load the vesa module bitmap_load="NO" # Set this to YES if you want splash screen! bitmap_name="splash.bmp" # Set this to the name of the file bitmap_type="splash_image_data" # and place it on the module_path -splash="/boot/images/freebsd-logo-rev.png" # Set boot_mute="YES" to load it +splash="/boot/images/freebsd-logo-rev.png" # Set boot_mute=YES to load it ### Screen saver modules ################################### # This is best done in rc.conf From nobody Sat Oct 19 20:18: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 4XWCZM5B7Xz5Z13R; Sat, 19 Oct 2024 20:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWCZM4RTnz4Gys; Sat, 19 Oct 2024 20:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729369115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j9YT8RLu6AGjUZbsrc87hg8vRU938U5EdQf4Pepr+HI=; b=kaui01Jw3vAlhpBAWiVLe56qKqiKq6voyuqXNmfQzz8NvdLVE4ey7BMsqZ1VxzGw1qoxpY i4j1pJzZ6do2w3h5ojrYYS3tdz2cl+u3AFe8GxxGl/0ZG9VBJH9ehuEQGmWliWmO2YXX9j 8ZyO2nXhHZaL0UTwf85Q5G2eh0RPVtAMesqVxReFfeddRkG5ji2B/TNRP1i3Z+A9s+TOml ubukZqUPPl/iWf1G1QvIDSgD7jBqLo694uHxdPEwLv0Yy06/6rl6an3ESKNd6AAGhTKXfU rgq3Zw1+bMZdR5TrFsHw3yfbCPvCPhBcwHWWP8R7JLBYFgkvOJSxl7tnubA9sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729369115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j9YT8RLu6AGjUZbsrc87hg8vRU938U5EdQf4Pepr+HI=; b=p0K+0SNZv4p4JAKu9L8GboHLndPdiq1dLKki6pNOpA0kKtN124PvBYqnPzFAYas63GPTXw vK7907k/DtgS7q620A8d8efmSI/t5xtDwT2WbfnN6bJ1agjwFaBIaWXe1r7oE08yPJrUvd O3iEeV0LK/fWXpAhjhV/TJdjBL2MmzDpOasSk28O28VO5n26Y7ry4zaMj78+z82cli1zqt iiTFHg1vTIdBH4QWHvHC1WaakQp4rmod8EuZ2tEpWRQiuhg8dbIRAY6OiGnAmCftUP4VzX brr9GvUaGxtDkKQcWHEkSz/xW4WpzDPRf+pUDCThZstdAYyxDViEYX3KPlgsDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729369115; a=rsa-sha256; cv=none; b=udiTKfn96TLgHRc/pVn2u3qxqAxXVzC1nwukIgUJZ4mpqEQYbRvn3xYTbtAyOPGMzuFSKa xPKbH9twQju+D+rcZmzeLZuUsQX5PmtRJ0TS4pJ/8QQKieGVqCrQ5ENr1HIHsWAq95QgTn tECk90DqMGxaMJvJaTNzTCm4Yen6Svnr7WTBwIybGw8XGsMmlujPANUy/LseP1/xHmTbq/ kQuCCi3W1cGCjefh7HEW10GMHs414zf6sK1RbkoZfUnWFB4Rd1D5AGQzqaerOcYzbwr3Wk tq8inAy6rnzG7YYeFFmLIpiwUk1G7VqBiOHYDfiw4XfUZ0ysXAiAqUmaJKpdRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWCZM3wGvzXpt; Sat, 19 Oct 2024 20:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JKIZ6X083678; Sat, 19 Oct 2024 20:18:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JKIZ4P083675; Sat, 19 Oct 2024 20:18:35 GMT (envelope-from git) Date: Sat, 19 Oct 2024 20:18:35 GMT Message-Id: <202410192018.49JKIZ4P083675@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: 92cd5abb64dd - main - membarrier: man page improvements 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: 92cd5abb64dd70c305535c9504c6a2b73552147f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=92cd5abb64dd70c305535c9504c6a2b73552147f commit 92cd5abb64dd70c305535c9504c6a2b73552147f Author: Ed Maste AuthorDate: 2024-10-09 18:50:07 +0000 Commit: Ed Maste CommitDate: 2024-10-19 20:18:18 +0000 membarrier: man page improvements Reported by: fernape (in D46967) Fixes: 1fc766e3b41d ("membarrier: Add manual page") Sponsored by: The FreeBSD Foundation --- lib/libsys/membarrier.2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libsys/membarrier.2 b/lib/libsys/membarrier.2 index fe2e6ff763d5..87db620975ef 100644 --- a/lib/libsys/membarrier.2 +++ b/lib/libsys/membarrier.2 @@ -60,7 +60,7 @@ This is an alias for .It Dv MEMBARRIER_CMD_GLOBAL_EXPEDITED Execute a memory barrier on all running threads of all processes registered with -.Dv MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED +.Dv MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED . .It Dv MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED Register the process to receive .Dv MEMBARRIER_CMD_GLOBAL_EXPEDITED @@ -102,8 +102,9 @@ The argument is ignored. .Sh RETURN VALUES If the -.Dv cmd -is MEMBARRIER_CMD_QUERY +.Fa cmd +is +.Dv MEMBARRIER_CMD_QUERY a bitmask of supported commands is returned. Otherwise, on success, .Nm From nobody Sat Oct 19 20:24:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XWCjc6j8Wz5Z14b; Sat, 19 Oct 2024 20:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWCjc4qfcz4HG0; Sat, 19 Oct 2024 20:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729369492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+vb8z47+5/hvnxvms0DWaAihI7RPhH7Oq0TJs60tbI=; b=g9q0joZsf9eK/aFaW2PJLWozsG2gIUrC1kMycHCyqaC4Jdv51wo9SqzBoREDq38Vx3EYJI 6exT55NboAGRP5PiLDfEOHanrb5f7pLVQ43EXm8fbnRWpW7BfUB2INAEbr1t63WQ6rUYjN e9ZPQyih4KUI6E4gu5yTXCYG1LYY2X4ujSJgTBZ1XUvc/isAMPyKNU62rXCIAcfG70l2Qr Q3HiraE1U7yNYuNB20x0zZ8cc8lBUwE698/1CiZTJMwg4Z1W35XwXY1g05plensJHEh4u+ PhjDwyFfpt0yxpFhr29SVUkkmOfjm2WDuuN1gQi/+4KW7n+LA9f+Nqqfg6SbrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729369492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+vb8z47+5/hvnxvms0DWaAihI7RPhH7Oq0TJs60tbI=; b=VdlNKuDYnilQjSmjc7upc2O2uhkyK0Ez0z/Mjhp8iPHQx54rMpnPIh16lc1m9tcClfsCWq PtL6NEPCoO/v/MqhBgiFt0BRSC/P75fUyneky8bXNoyLJIeGhtdLYE+q3TpJnPZE/EyUn7 ryFAGeigGR+RocZvm6HlB6RqpMxjCTPYYstATXi0nyh6INonv4ZkiiMgBLDmiZphP8x0wy et2JWlvhk4JNym1pZUmJZd5pR2B64qZV0OW9fL30DktEaYj5yLoXa6Ore+t85Qzp9TjbVd IM68mp84XgCHf1rzro8U+Ydt3V4qqvLiyiQ1W8bTKy5BY3uBQgTxKU/aMDVWbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729369492; a=rsa-sha256; cv=none; b=g/M+3ZD2yvFigiqffpT1Pa4KEmHO/cMtkEXaOxlHSHd1eidaYyCUpsoSCP+Sn58pgOej3m YN1grwKQcRUVi9SEawm1YA+k4lKyFuORVmkczqfIu+H6Wuvf+xOlI0G8+aCtOVvQ7JANqO gnlnLJ+Bz4Df+X0tELleob1Qz7GBukXjT53OTgtrOlgoqHT7FJRmHFBjjb0dLdDsRxz/ix V6/0UzSote09KnOmEmotlYhRNVtrDrbv63aWlFGwUwQjEoubfhfElxweldXbA0jOmm7D42 9LwfTIqrUdmGgvlUdH8mdTeW0h0EWNJXp4zE/vCmrouDUJ048dRA5Nxcjivbiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWCjc4RDXzY2H; Sat, 19 Oct 2024 20:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49JKOqrL001133; Sat, 19 Oct 2024 20:24:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49JKOq5d001130; Sat, 19 Oct 2024 20:24:52 GMT (envelope-from git) Date: Sat, 19 Oct 2024 20:24:52 GMT Message-Id: <202410192024.49JKOq5d001130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 6d42d5dbdd67 - main - vm_glue: use vm_page_alloc_domain_after 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d42d5dbdd677c3422bdb3867770639f48c6df7a Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=6d42d5dbdd677c3422bdb3867770639f48c6df7a commit 6d42d5dbdd677c3422bdb3867770639f48c6df7a Author: Doug Moore AuthorDate: 2024-10-19 20:22:20 +0000 Commit: Doug Moore CommitDate: 2024-10-19 20:22:20 +0000 vm_glue: use vm_page_alloc_domain_after Drop the function vm_page_alloc_domain, used only in vm_thread_stack_back, and replace it with vm_page_alloc_domain_after there, with the extra mpred argument either computed on the first iteration or retrieved from previous iterations. Define a function vm_page_mpred() for computing that first mpred argument. Reviewed by: bnovkov Differential Revision: https://reviews.freebsd.org/D47054 --- sys/vm/vm_glue.c | 5 +++-- sys/vm/vm_page.c | 27 +++++++++++++++------------ sys/vm/vm_page.h | 2 +- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 5128c46a1d9f..0090904785ab 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -623,8 +623,9 @@ vm_thread_stack_back(vm_offset_t ks, vm_page_t ma[], int npages, int req_class, m = vm_page_grab(obj, pindex + n, VM_ALLOC_NOCREAT | VM_ALLOC_WIRED); if (m == NULL) { - m = vm_page_alloc_domain(obj, pindex + n, domain, - req_class | VM_ALLOC_WIRED); + m = n > 0 ? ma[n - 1] : vm_page_mpred(obj, pindex); + m = vm_page_alloc_domain_after(obj, pindex + n, domain, + req_class | VM_ALLOC_WIRED, m); } if (m == NULL) break; diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index f2b3baf419a0..054832e3f19a 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -2013,6 +2013,18 @@ vm_page_rename(vm_page_t m, vm_object_t new_object, vm_pindex_t new_pindex) return (0); } +/* + * vm_page_mpred: + * + * Return the greatest page of the object with index <= pindex, + * or NULL, if there is none. Assumes object lock is held. + */ +vm_page_t +vm_page_mpred(vm_object_t object, vm_pindex_t pindex) +{ + return (vm_radix_lookup_le(&object->rtree, pindex)); +} + /* * vm_page_alloc: * @@ -2040,16 +2052,7 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) { return (vm_page_alloc_after(object, pindex, req, - vm_radix_lookup_le(&object->rtree, pindex))); -} - -vm_page_t -vm_page_alloc_domain(vm_object_t object, vm_pindex_t pindex, int domain, - int req) -{ - - return (vm_page_alloc_domain_after(object, pindex, domain, req, - vm_radix_lookup_le(&object->rtree, pindex))); + vm_page_mpred(object, pindex))); } /* @@ -2390,7 +2393,7 @@ vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, object)); KASSERT(npages > 0, ("vm_page_alloc_contig: npages is zero")); - mpred = vm_radix_lookup_le(&object->rtree, pindex); + mpred = vm_page_mpred(object, pindex); KASSERT(mpred == NULL || mpred->pindex != pindex, ("vm_page_alloc_contig: pindex already allocated")); for (;;) { @@ -5073,7 +5076,7 @@ vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, pflags = vm_page_grab_pflags(allocflags); i = 0; retrylookup: - m = vm_radix_lookup_le(&object->rtree, pindex + i); + m = vm_page_mpred(object, pindex + i); if (m == NULL || m->pindex != pindex + i) { mpred = m; m = NULL; diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index c7c1ec3872a8..b85342b784de 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -606,8 +606,8 @@ void vm_page_free_zero(vm_page_t m); void vm_page_activate (vm_page_t); void vm_page_advise(vm_page_t m, int advice); +vm_page_t vm_page_mpred(vm_object_t, vm_pindex_t); vm_page_t vm_page_alloc(vm_object_t, vm_pindex_t, int); -vm_page_t vm_page_alloc_domain(vm_object_t, vm_pindex_t, int, int); vm_page_t vm_page_alloc_after(vm_object_t, vm_pindex_t, int, vm_page_t); vm_page_t vm_page_alloc_domain_after(vm_object_t, vm_pindex_t, int, int, vm_page_t); From nobody Sat Oct 19 23:22: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 4XWHfG0DMzz5ZRXk; Sat, 19 Oct 2024 23:22:14 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWHfF5WlVz4Stj; Sat, 19 Oct 2024 23:22:13 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-6cbd550b648so24500816d6.0; Sat, 19 Oct 2024 16:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729380132; x=1729984932; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=u4uajAl6ubo0bXx5pO4jC1Yqf6X70C7bbyINRz1uSL0=; b=lq3nD1OGLcWgLF+gOFDig1cw6mBCvsnMLhsP/ose5mZPu4qCUv+ZswIGyimKsaaQwT NVyWmCMkiD0WxZOBlnYoiTfhQ+k+PCxzqXTJvgXgMGoqtcjSIq9iFFtfSX7ysnw+W7lU fPcoJyKbC10nVgOPo5tzOOHK9IstyjUvvnOvfrKQ3fcBAxWkZs9wcexuDthk7vlsAZa3 iKm/jUorV3jrZ7+xxs5MBg1vkDJLfkAkdrU/XUodc30X5cuEwP20hjX8DdVsuDiCIKUE fIZANmRosAAJD3RTZ2W67HM8Kexa72Bo/KiEotrgV+JvQ0rKdnfawpoRn8/mcyeYHklP lRcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729380132; x=1729984932; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u4uajAl6ubo0bXx5pO4jC1Yqf6X70C7bbyINRz1uSL0=; b=SVIkOBAuwf/yN3LLp7AQuIexD8A2o8G0pqlUulzCt92d7MVGutn2kCRiCVw9DJUnL4 06AoFEHKX6KQyh8N3Ej+IYdOc+OcE+NjZHgw7UGLJ1UYc82Ori048+/BKydqQbod0wiR StohgEkOvosTihCTcGmD4l2zV9nYCv4MjxILG3QNaYXjPbY0oehUmFal1ZGncvOvJXSE LuCOIWXjPQHxTTdM1wUJ8vhAjXLayDBc/+Y1IEEFK6fKG4XhiRvvo9cEJB2LUM54cvD5 ZNK1RV9cu6h6EII8uCNrt6qVB6Oeqae6+GR9QocAf10mcy35wVjLSyeCsPKUGqTmCu+F e7vA== X-Forwarded-Encrypted: i=1; AJvYcCUK5ZOUYFTr/HdxUBMH9KLbO01j4L9q6OP8yqG4DT+nzZl8r2i4rn1uBJvJb5MynbInrA6BfGbsDq/Mu7KGr6FwWKggJUU=@freebsd.org, AJvYcCW4IJxWG1HoZ0IlElGH8GD1vnsAAcrZNCJgGBXHRtL0cYNviyKoewANDZJjC2IJ6sQ/NJNXUFTXb9WUSVWBnfA=@freebsd.org, AJvYcCX1AHbdLs0CwvI6fijqOCqNDcIl1Xp2dO2hi7clrVSLsOzEXmW+rCJIbRHAqsrLEEODs9noy08wUEp1ItX30pQP7NLt@freebsd.org X-Gm-Message-State: AOJu0YyI/WujBh802Ugr79eKlRTlVQg6+F24D7LbfNjiLjxI6LSQ6L2A IfFEnLt66swlQi7vHERJYDR9/I1nObw96a1H6sVwb6gr6ZVsPugpft22PA== X-Google-Smtp-Source: AGHT+IEQWWLu0BlniKcOF0oYMY3hX1IzpqFPCMLb8kB+StYoTAOEVuVD+qDYaVwkpMDWm7q7uAud2A== X-Received: by 2002:a05:6214:5d0a:b0:6cb:9bc9:e24b with SMTP id 6a1803df08f44-6cde160bcc4mr90782156d6.43.1729380132368; Sat, 19 Oct 2024 16:22:12 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-460d3c3aff7sm2447071cf.12.2024.10.19.16.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2024 16:22:11 -0700 (PDT) Date: Sat, 19 Oct 2024 19:22:08 -0400 From: Mark Johnston To: Konstantin Belousov Cc: John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f4e35c044c89 - main - bus: Set the current VNET in device_attach() Message-ID: References: <202410191304.49JD4JoM084001@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XWHfF5WlVz4Stj X-Spamd-Bar: ---- On Sat, Oct 19, 2024 at 07:10:53PM +0300, Konstantin Belousov wrote: > On Sat, Oct 19, 2024 at 11:36:32AM -0400, John Baldwin wrote: > > On 10/19/24 09:04, Mark Johnston wrote: > > > The branch main has been updated by markj: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=f4e35c044c8988b7452cefbdcc417f5fd723e021 > > > > > > commit f4e35c044c8988b7452cefbdcc417f5fd723e021 > > > Author: Mark Johnston > > > AuthorDate: 2024-10-19 13:03:56 +0000 > > > Commit: Mark Johnston > > > CommitDate: 2024-10-19 13:03:56 +0000 > > > > > > bus: Set the current VNET in device_attach() > > > Some drivers, in particular anything which creates an ifnet during > > > attach, need to have the current VNET set, as if_attach_internal() and > > > its callees access VNET-global variables. > > > device_probe_and_attach() handles this, but this is not the only way to > > > arrive in DEVICE_ATTACH. In particular, bus drivers may invoke > > > device_attach() directly, as does devctl2's DEV_ENABLE ioctl handler. > > > So, set the current VNET in device_attach() instead. > > > I believe it is always safe to use vnet0, as devctl2 ioctls are not > > > permitted within a jail. > > > PR: 282168 > > > Reviewed by: zlei, kevans, bz, imp, glebius > > > MFC after: 1 week > > > Differential Revision: https://reviews.freebsd.org/D47174 > > > > Hmm, there was some other review I thought that had a completely different change. > > That change removed all the vnet stuff from new-bus and instead handled it in > > if.c. Specifically, that if_attach would set a default vnet to vnet0 if there > > wasn't an active vnet at the time. See all the discussion in > > https://reviews.freebsd.org/D42678 which has a patch that I think is correct > > in the comments. Gleb's proposal, described a bit in D47147, is to require device-based ifnet drivers to fully detach themselves from the parent bus in order to change VNETs. The intent is to eliminate the need for if_vmove() and all the complexity it entails. This would also eliminate the need for a "home" VNET, referenced in the patch that you reference here. > In fact, I think that bus level is better. At least, I know that detach > also might need something by vnet (e.g. mce(4) needs to clear the IPSEC > offload database on detach, although it still does not do). Shouldn't something like this be handled by if_detach()/ether_ifdetach()? Posed another way, why does device detach itself need to care about the VNET? I tend to agree that having VNET knowledge in subr_bus.c is a hack. My aim was just to fix the panic without making the hack worse. > It sounds as if bus_topo_lock() is the right place. May be some other > name for it is better, like bus_topo_changes_enter(). From nobody Sat Oct 19 23:50: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 4XWJHC0VRJz5ZSnL; Sat, 19 Oct 2024 23:50:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWJHC016Hz4VDF; Sat, 19 Oct 2024 23:50:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729381847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BMUAAqo+ub4HUhbGdTmGNtYGlr1Cf9fAfPwL8x/8Kb8=; b=Y3GhbDt613kNws5xzvXgyhhmefYtrF8p7IJ28ZMfRFSJZV5xkF5n3QW5gVT5znytABPQ4T W1Dws+7egyn9V/UMv7s16AttDTwgxaQp00HWL/a441S5WHjGSpMbVjfdyLLakcRQOfe7Qb rrxOfoHJvOp48zbA13c7IKQ8xi/Ap4/QINxL8SJbOVx2l61LkWuagzST4yhvSobOpA7ZGs gUEdB5ZyVgmRQWJlUpOj7D0T/NzSkDgXj+77WQnCf8lDCec1WMI8/W1qm6oEw1hwqZGgaQ ND3oD/4KkzXNH2m7jV0gXnJ+Utguh/uoW5vuNLmrbMFLOD/c0PrOLifRPMMCQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729381847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BMUAAqo+ub4HUhbGdTmGNtYGlr1Cf9fAfPwL8x/8Kb8=; b=cIh9p6l9yWOsCFd0SH0+q4H6EEzecLjL77JXTkiZ2mfh3ODbNpUfUztgaTVrkkLMz73/HV 4i2h8JiDn4s9+OpEzsmQFN1IKiYLjsvPDB/vKRv/KlTAbX9BojMijEJiGLqjuzW2VW2/TA bGp/iMgb4qZ3SJCctA7Z2xd+wzQH7TDqLMcLvCDZ+A4/qIqw2UOhaB3D/8MQ1ebLkC2k/y HyGYPFerTON7TMciookvJywcbW1oVLrv/kmhBKu0l4TKgmC6TcHdb2oyUdCHz3rql2Exbj hMlTXze3pyrGIZPb3d6mR3fo7xJNg+5zL/tKTe89Dqn60GjQ6eeozFJqeqsljQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729381847; a=rsa-sha256; cv=none; b=rG/XIxpYNeoZyHRAcxVuCA100rjlkEJYQNizyCeYEGzHPBkAGjQMm1ZDZDSve0h6ETibeY QU+QYLG0fVhbn60cV5gzxPr1gRwK1F6ZJ5aV9bQkJcn/4bufY5HNorP1Z60n2I6ACbfsmu Ve1CRhzOoM0U4pWevhL9VP0V8K3dufBixpmgdw+oezsMa9915bQ4RaN5SikYhoe+RnSfOl JgOk3j76g9Q+2XG4AwtMh2AILaY9UU0+q4XfrzkAOfd5Y7KMV3uIVXBMfuePQWIKO1rBUO TWw1dg2Lgpa6qkaI5vW+dNZKltXV4bBkmytLoogQprRXrT2nizJ7hS4PRDxwCw== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E5" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XWJHB55Yhz1B09; Sat, 19 Oct 2024 23:50:46 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id C7B06A64805; Sat, 19 Oct 2024 23:50:38 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 22D1F2D029D8; Sat, 19 Oct 2024 23:50:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id ko2asN4NCXVe; Sat, 19 Oct 2024 23:50:41 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C05082D029D2; Sat, 19 Oct 2024 23:50:41 +0000 (UTC) Date: Sat, 19 Oct 2024 23:50:40 +0000 (UTC) From: "Bjoern A. Zeeb" To: Mark Johnston cc: Konstantin Belousov , John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f4e35c044c89 - main - bus: Set the current VNET in device_attach() In-Reply-To: Message-ID: References: <202410191304.49JD4JoM084001@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Sat, 19 Oct 2024, Mark Johnston wrote: > On Sat, Oct 19, 2024 at 07:10:53PM +0300, Konstantin Belousov wrote: >> On Sat, Oct 19, 2024 at 11:36:32AM -0400, John Baldwin wrote: >>> On 10/19/24 09:04, Mark Johnston wrote: >>>> The branch main has been updated by markj: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=f4e35c044c8988b7452cefbdcc417f5fd723e021 >>>> >>>> commit f4e35c044c8988b7452cefbdcc417f5fd723e021 >>>> Author: Mark Johnston >>>> AuthorDate: 2024-10-19 13:03:56 +0000 >>>> Commit: Mark Johnston >>>> CommitDate: 2024-10-19 13:03:56 +0000 >>>> >>>> bus: Set the current VNET in device_attach() >>>> Some drivers, in particular anything which creates an ifnet during >>>> attach, need to have the current VNET set, as if_attach_internal() and >>>> its callees access VNET-global variables. >>>> device_probe_and_attach() handles this, but this is not the only way to >>>> arrive in DEVICE_ATTACH. In particular, bus drivers may invoke >>>> device_attach() directly, as does devctl2's DEV_ENABLE ioctl handler. >>>> So, set the current VNET in device_attach() instead. >>>> I believe it is always safe to use vnet0, as devctl2 ioctls are not >>>> permitted within a jail. >>>> PR: 282168 >>>> Reviewed by: zlei, kevans, bz, imp, glebius >>>> MFC after: 1 week >>>> Differential Revision: https://reviews.freebsd.org/D47174 >>> >>> Hmm, there was some other review I thought that had a completely different change. >>> That change removed all the vnet stuff from new-bus and instead handled it in >>> if.c. Specifically, that if_attach would set a default vnet to vnet0 if there >>> wasn't an active vnet at the time. See all the discussion in >>> https://reviews.freebsd.org/D42678 which has a patch that I think is correct >>> in the comments. There it was; thanks I didn't misremeber but couldn't find it. > Gleb's proposal, described a bit in D47147, is to require device-based > ifnet drivers to fully detach themselves from the parent bus in order to > change VNETs. The intent is to eliminate the need for if_vmove() and > all the complexity it entails. This would also eliminate the need for a > "home" VNET, referenced in the patch that you reference here. Will it? I asked for a discussion elsewhere but it seems we are having it here now... I am still inclined to ask: - how do you want a vnet to attach an unknown to itself device? From the outside? - How to you pass it to a child-vnet without escalating priviledges to outside of the host system (vnet0)? - Is, e.g., a vcc device [CXGBE(4)] a physical interface? - How do you pass a controlled set of other non-clonable devices in (or did we get rid of them all)? The inital idea was still that the "host" has somehow control over what child can create... { I recently tried tuntap in a vnet and it blew up badly by not going away } - exmaple: I really would love, e.g., a vlan interface to be passed to a vnet but but not the pyhsical interface. Can we? - How will we do with wlan interfaces (which are cloned) but may not own the hardware (kind-of similar to the vcc example)? I know there are special PRIV checks for those currently. - how does a detach in a vnet work and where will the physical interface re-appear for (automatic) attachment? just detached in that jail? vnet0? the parent jail? - what happens on vnet destroy? (same as last question)? - Are we just going to build a vmove on a layer which doesn't have anything to do with networking per-se as a special case for some interfaces but not others? >> In fact, I think that bus level is better. At least, I know that detach >> also might need something by vnet (e.g. mce(4) needs to clear the IPSEC >> offload database on detach, although it still does not do). > > Shouldn't something like this be handled by > if_detach()/ether_ifdetach()? Posed another way, why does device detach > itself need to care about the VNET? IPSec should probably be handled in the per-AF specific data of the interface and be cleared up automatically. If that needs downcalls into HW that's likely where they belong. It has nothing to do with ether(4); wrong layer. > I tend to agree that having VNET knowledge in subr_bus.c is a hack. My > aim was just to fix the panic without making the hack worse. > >> It sounds as if bus_topo_lock() is the right place. May be some other >> name for it is better, like bus_topo_changes_enter(). > -- Bjoern A. Zeeb r15:7 From nobody Sun Oct 20 00:19: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 4XWJwg3B3bz5ZVVT; Sun, 20 Oct 2024 00:19:47 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWJwf6WL4z4YFS; Sun, 20 Oct 2024 00:19:46 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x72a.google.com with SMTP id af79cd13be357-7b13fe8f4d0so236961285a.0; Sat, 19 Oct 2024 17:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729383585; x=1729988385; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=Waggl5AcbEDmS92nNLGGK8ioa7ic3rijA3i5QgoUFcc=; b=YLl/iM8voQ+tQL9aGzWdh2ChRrzOfEtcS3R/HpwyEJ0xPMJEYLtIhKge1eDtUleuKt a+bfQz43jkt9qc5WSM1kxJ3ougYe3G4kQ4An7mV2cHtac8an6LDBHlZchWH8lAO+CDjm 4tQM1zC/8TtfCeo7ZoxBCQM+8GIKrjkULz1WbY6z//hyXILFPgsh77xOjUjT6/VKge/y PCQNR60zHkJOgzg16EYRbxKYuOWJPoUCcTPdvnCmdJMAsMhVMJljpDT9OJA94mSTqjnx VBStDFjhZwqvU5O9fgeuDADNnRJY5g+aA1Pnb3gkUls8G1shzu+bc6lDIWbKpYw31mlW CtqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729383585; x=1729988385; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Waggl5AcbEDmS92nNLGGK8ioa7ic3rijA3i5QgoUFcc=; b=GtRAjaoS9Ot3AjOZHJNiZxn0VkNUurZvN43ZG806VKUu1UieKe4l6R7AxYPJrQOQ0Q jDVe7iaF80egVIPWUzrs6EUkqQTVZcU070Lv0sRgoiNQYkz/HU9JNLpt0iMloHuXu2jV NOnYYzq8jAlr9pWeSk7uggb/+kLvp8z9lV++OKuqon3efx58+qw/Z/dis9y7c4oZl0IK QzJE8p9Xws8CehfLkTJuvds1QwHcBm/Me7KCt/RBilzrpDhZckxZ3Wlg3vPRf0+kYMKd JDTRC5DhqA1y/XiizxNDoYvbT0TXEpzbSLQHZi2ctrVqXR2QfVerSuXCywC3cO9K8lFe Myaw== X-Forwarded-Encrypted: i=1; AJvYcCUAx2GHc8RKFQBdu9a3g0VmF7iEpnTOit2A8xmTc/TwmMyz/2dbLniMEaPl4kqB+4Y2/wc8@freebsd.org, AJvYcCVfYhXN083+2KINxALgDAf6HorBLKXNLSuzbL1tBs6KbVw+vXY+vyyJJjPOym3/igPrKTUrAG3An/qtujLfFT4S9NbL@freebsd.org, AJvYcCVpdHCDj2skAq1QgNHRzpIVqOLpK5CmUNAjC3Dk6obqQ+kNHhTKBS16y+c+0yXzIhy1FFiH4AhnYYVnNPLqkuotKAlWrZk=@freebsd.org, AJvYcCWXBzoegTxvoA8fAen/3QYgnCKEucwPWh1v5xPLx0AolNG66+d/+kIMApL6BrtZ8OoYRKojSDyVl25fhJWDArI=@freebsd.org X-Gm-Message-State: AOJu0Yx3PjyOKTNEasMmgIWvQ8FFXzPbhvwBfWATqeCcnEPOCEOBfi3B noYLKTiq+JPZQ2SkXO6BRocoNHZbpTAmlsjTeV69IMqBZqVN/PaN5j8jMEjT X-Google-Smtp-Source: AGHT+IET5xHO6eCEcmBZp7IRCbafRI71eguYpBkmCmuLA7XwQTji6QOMSROdSkRwgOt/1hNvd5HPJQ== X-Received: by 2002:a05:620a:4709:b0:7b1:48a5:9290 with SMTP id af79cd13be357-7b157be6bbcmr833014385a.50.1729383585030; Sat, 19 Oct 2024 17:19:45 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b165a5df50sm25593685a.97.2024.10.19.17.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2024 17:19:44 -0700 (PDT) Date: Sat, 19 Oct 2024 20:19:41 -0400 From: Mark Johnston To: "Bjoern A. Zeeb" Cc: Konstantin Belousov , John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f4e35c044c89 - main - bus: Set the current VNET in device_attach() Message-ID: References: <202410191304.49JD4JoM084001@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XWJwf6WL4z4YFS X-Spamd-Bar: ---- On Sat, Oct 19, 2024 at 11:50:40PM +0000, Bjoern A. Zeeb wrote: > On Sat, 19 Oct 2024, Mark Johnston wrote: > > > On Sat, Oct 19, 2024 at 07:10:53PM +0300, Konstantin Belousov wrote: > > > On Sat, Oct 19, 2024 at 11:36:32AM -0400, John Baldwin wrote: > > > > On 10/19/24 09:04, Mark Johnston wrote: > > > > > The branch main has been updated by markj: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=f4e35c044c8988b7452cefbdcc417f5fd723e021 > > > > > > > > > > commit f4e35c044c8988b7452cefbdcc417f5fd723e021 > > > > > Author: Mark Johnston > > > > > AuthorDate: 2024-10-19 13:03:56 +0000 > > > > > Commit: Mark Johnston > > > > > CommitDate: 2024-10-19 13:03:56 +0000 > > > > > > > > > > bus: Set the current VNET in device_attach() > > > > > Some drivers, in particular anything which creates an ifnet during > > > > > attach, need to have the current VNET set, as if_attach_internal() and > > > > > its callees access VNET-global variables. > > > > > device_probe_and_attach() handles this, but this is not the only way to > > > > > arrive in DEVICE_ATTACH. In particular, bus drivers may invoke > > > > > device_attach() directly, as does devctl2's DEV_ENABLE ioctl handler. > > > > > So, set the current VNET in device_attach() instead. > > > > > I believe it is always safe to use vnet0, as devctl2 ioctls are not > > > > > permitted within a jail. > > > > > PR: 282168 > > > > > Reviewed by: zlei, kevans, bz, imp, glebius > > > > > MFC after: 1 week > > > > > Differential Revision: https://reviews.freebsd.org/D47174 > > > > > > > > Hmm, there was some other review I thought that had a completely different change. > > > > That change removed all the vnet stuff from new-bus and instead handled it in > > > > if.c. Specifically, that if_attach would set a default vnet to vnet0 if there > > > > wasn't an active vnet at the time. See all the discussion in > > > > https://reviews.freebsd.org/D42678 which has a patch that I think is correct > > > > in the comments. > > There it was; thanks I didn't misremeber but couldn't find it. > > > > Gleb's proposal, described a bit in D47147, is to require device-based > > ifnet drivers to fully detach themselves from the parent bus in order to > > change VNETs. The intent is to eliminate the need for if_vmove() and > > all the complexity it entails. This would also eliminate the need for a > > "home" VNET, referenced in the patch that you reference here. > > Will it? > > I asked for a discussion elsewhere but it seems we are having it here now... I'm responding to John's question and Kostik's follow-up, nothing else. The inline patch in D42678 seems fine, I don't have strong feelings about it, but I believe it is not sufficient to fix the PR in question (it still assumes that the current vnet is already set). > I am still inclined to ask: > - how do you want a vnet to attach an unknown to itself device? From > the outside? > - How to you pass it to a child-vnet without escalating priviledges to > outside of the host system (vnet0)? > - Is, e.g., a vcc device [CXGBE(4)] a physical interface? > - How do you pass a controlled set of other non-clonable devices in (or > did we get rid of them all)? The inital idea was still that the > "host" has somehow control over what child can create... > { I recently tried tuntap in a vnet and it blew up badly by not going > away } > - exmaple: I really would love, e.g., a vlan interface to be passed to a > vnet but but not the pyhsical interface. Can we? > - How will we do with wlan interfaces (which are cloned) but may not own > the hardware (kind-of similar to the vcc example)? I know there are > special PRIV checks for those currently. > - how does a detach in a vnet work and where will the physical interface > re-appear for (automatic) attachment? just detached in that jail? > vnet0? the parent jail? > - what happens on vnet destroy? (same as last question)? > - Are we just going to build a vmove on a layer which doesn't have > anything to do with networking per-se as a special case for some > interfaces but not others? These are excellent questions which should be posed to Gleb when his proposal is fleshed out. In the meantime, I only aimed to fix an obvious shortcoming of an existing hack which has been around for over 10 years. From nobody Sun Oct 20 00:29: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 4XWK7c28jdz5ZVpL; Sun, 20 Oct 2024 00:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWK7c1Qrmz4YdD; Sun, 20 Oct 2024 00:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5GtyjPkQrdAQwZPYz0HRGiPBQhHQ10qfxrOja8AyD+g=; b=nA062y6kgxmz2BKVf37RMENFCwqP7HwqvAkoNW9jQxxX/6AAhQjaQFiFQKvaV3d0sUeNEF o1OaSVpisofJmh38MyOR7Cx4WhI++eUhUhHXHI+067/ZiEbPRu5i1PZlnKS6FY09iRXOUA uCslrNkrz4FVr94w5ISy68IDsfwBKaFSvLmouh2V2PkMSmBajmh4/NGkzok0Swx16aqshT J78pxRHsgsPacdvQraQvTZ+7vmq8eY/jvmUZHnLhNX01t2qD00JTpEiFIxbDRyeJjEAyCy /QBeHm3iGn3vrvvG/zelvfJ0Y4r34M9MYoPjaquldgD4wpiIqOBETGIOIUkY6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5GtyjPkQrdAQwZPYz0HRGiPBQhHQ10qfxrOja8AyD+g=; b=jmNtZ+FNyLwwXBXz52cDAivKX0/sd2Nl+f+u4N9QLc342e3Idqzz2b121SdKEex5ub0WiJ Patf3ek0NZaPu7etuz013/ImkVI/ZT/NXzrDtMO16jHHGLL3Q8GBqqvyzA+wAVNYGiaUyN k2nDVF07tzAbG18RXcZzFA372tJVjex6jWEikK9cYdY/eY01RNcQlfGdZReqGW4LjPdi07 3HanlYGv8tR08PunwhZKSsXyQswk4asvJAbDxYLfn1rkpV2DsGj4lVXP2syObh10oxHxnK T5BqZ3fBSm7zPpsts2yskzQpmsOkUJ0OopBW3+A1suCCA48TiIXuSdHQT7Tazw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729384156; a=rsa-sha256; cv=none; b=FX90vl92sKD+0Lj8rawqR1eDio3p8wXFUqDV9qG5BFyR6mqjnqkP2NvNa2dpzL+4Et+BYz IKbfE28d8EtF3YmQH6udckV5vvEyUwogldLI7wv94l5jfp2M29aQ2Ete6hSquAiqDfCUGv /xuYHOKneHzoNK+ITnbg5uV1WNk/+jXZ7Z9hkD0ZHcdd/dbRN4NduxlFGvXSEvl20P1yAW K34HEM1QuR5D7CKqgRisKSCESuZm2hGxe/4SCen9Z2Ck7pC7oJJ7dztubvlNnpYlXfl69w qj49/00XKweLJoaGRfMO9bYVhAVaHtit92IKezzw2mRDTFJ1I1V6DNYJ9bStTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWK7c12l9zfls; Sun, 20 Oct 2024 00:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K0TGJO043942; Sun, 20 Oct 2024 00:29:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K0TGnf043939; Sun, 20 Oct 2024 00:29:16 GMT (envelope-from git) Date: Sun, 20 Oct 2024 00:29:16 GMT Message-Id: <202410200029.49K0TGnf043939@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: 11dd4e797e5f - stable/14 - vmstat: Fix column header alignment in -o output 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: 11dd4e797e5f10d497f509d562e1b5b6c0462b06 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=11dd4e797e5f10d497f509d562e1b5b6c0462b06 commit 11dd4e797e5f10d497f509d562e1b5b6c0462b06 Author: Mark Johnston AuthorDate: 2024-10-13 14:26:47 +0000 Commit: Mark Johnston CommitDate: 2024-10-20 00:29:04 +0000 vmstat: Fix column header alignment in -o output MFC after: 1 week (cherry picked from commit 610fcb06ff0c972434f0b4b7a08947c038dd951e) --- usr.bin/vmstat/vmstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index ecffdc894e2e..0fee2395071f 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1573,7 +1573,7 @@ doobjstat(void) return; } xo_emit("{T:RES/%5s} {T:ACT/%5s} {T:INACT/%5s} {T:REF/%3s} {T:SHD/%3s} " - "{T:CM/%3s} {T:TP/%2s} {T:PATH/%s}\n"); + "{T:CM/%2s} {T:TP/%3s} {T:PATH/%s}\n"); xo_open_list("object"); for (i = 0; i < cnt; i++) display_object(&kvo[i]); From nobody Sun Oct 20 00:34: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 4XWKFx2nNyz5ZW67; Sun, 20 Oct 2024 00:34:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWKFx1s5Rz4ZGV; Sun, 20 Oct 2024 00:34:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWkbvpCM54RgWbhdi//LiTWOiPXub5lJn/roMO6Gj+s=; b=vDidN3HWDpPPebR9o2Hld3k45rgZr+3tCa9uFzv6dNdrYY4dwz/il0HrPIm2jMDBAyWqh+ SZzoQBj4wkf7MwsL69X0NfjiLBVjszjpbZRD5qAr3/puEBMXaBWFoqXaaajWY3FJf8F7YN nZ4mSAp3Ac2FwoZv8P3O1xg7qEp8H3DrSgiD0ku18wrNl3LR2Cr7heVT81WCGujoOuj3e1 IbniaW4/gTV2e/DH2Ez6HMlADr/BLLz6nyKmKxR6+QXWzqRl+jArLAJEW0GxvBBn7Th1F+ f5Minv8k/cviBUVLvqWWVhuhTTr6P2au6L0NfAhFgdB7FAIe1X4k7prXClk9lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWkbvpCM54RgWbhdi//LiTWOiPXub5lJn/roMO6Gj+s=; b=TqNksjfsniWnssV2M/WeF8gc7c9wMIe01sNKjXO8RSta6NhgRL6IZ/y+MDLs4KLGZWyyfX MaUCSE9o9KOO9563bwUb3Tiq970Y7HEcOeIM452c0S4IK82rZac6B7Lfm1OLd+OTrsUpbe rv68ro2Cg5KXBsSNMdbOikVlq367lb2PPN4ShOl+++nc8QMrliZ4ZgzLdleP+RC4nExR16 wEQCF7QxyMVZWxPTkgkzH7DdM8GGxPIk9fKFSHwUm5zH8vl5RkrQlXiP7G0hR//Scc+9lH ec8UCJgt4jc0jU8UH7RrBfd1UHxkasxBt2D4y/20/EKlnAjdaXbzkwnfog2okQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729384485; a=rsa-sha256; cv=none; b=O5u45GdKch2KOEbJxdPNR4TB1atWwCn09v6HySm2Q+P+QfBYk0ClqOqN2ula1EBoQFoPbN 9AmfZo+Jp15u8Aa9KqTFxufRQ9V0gJ6qZM8GF6UJfiwLbsrYuuEsRDQ9hyGKmPhcKyPv7A 1nwGvJA80ynSZFjiF918dLGcAzEQIZGVd0B0hSrIEoU74hIw6Mh081sq95hycL0nKQCScl A/tgwOatiyzJCzy+XSPYLqbYGhUtv2vat1m6V26ThBX5RuV5PE4RtIhqbJjFuyn5kK2xsu 8bBt/vCvnOLcpsAZl8N88vVq23xplu5d6q/CfkViRIT0ISVKMZQgoU1gpeb88Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWKFx1SrVzfMc; Sun, 20 Oct 2024 00:34:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K0Yjhj061290; Sun, 20 Oct 2024 00:34:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K0Yj3Z061287; Sun, 20 Oct 2024 00:34:45 GMT (envelope-from git) Date: Sun, 20 Oct 2024 00:34:45 GMT Message-Id: <202410200034.49K0Yj3Z061287@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: c0c550c1a366 - stable/14 - iommu.h: improve header self-sufficiency 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: c0c550c1a36691e55a25511c847931f62391242b Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c0c550c1a36691e55a25511c847931f62391242b commit c0c550c1a36691e55a25511c847931f62391242b Author: Konstantin Belousov AuthorDate: 2024-10-13 09:45:41 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-20 00:33:03 +0000 iommu.h: improve header self-sufficiency (cherry picked from commit 26ff9d2050a11449211644c6cb83cda7d94a785a) --- sys/dev/iommu/iommu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index 73d0a6f1279b..f425024117d3 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -31,9 +31,11 @@ #ifndef _DEV_IOMMU_IOMMU_H_ #define _DEV_IOMMU_IOMMU_H_ +#include #include #include #include +#include struct bus_dma_tag_common; struct iommu_map_entry; From nobody Sun Oct 20 00:34: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 4XWKFy5KmTz5ZW68; Sun, 20 Oct 2024 00:34:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWKFy38z5z4Zc1; Sun, 20 Oct 2024 00:34:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=63/6Sl8PFYcrbVbWy6LxwuZ3aXHa+OAdPrWvFrw4GI4=; b=wptV1N7+d9zPOMJbeTOeuxkBjU4jnEgfTVjNI0xX8Bljls+9HvYn5T39kk6AqqUNX+Uyd4 V+zNSri4iJ3n6OrH1li+XIyYYvDAsxYx8tYmmlRTtvDm6tRG3jkCB07mCK9NgY9a3r+I1+ I7e3j7lxhKGZmbC05up6i7XxkZduTnAShoHdNez331WgyBQMKxFwJHi8v7MZRAwlbxkyPj 9HFZPX5XmfC24lVJ9OGTJ+JJ9SkU3wkKhpUZvOS/wOzqBr1v3oCt+bTTZORETKub6F0zb4 63gtqWGGFoNhVPGo1Kxm47Bvlb8gGre9kiFB6VKZ82qqi5/rzCqlW5r50jojuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=63/6Sl8PFYcrbVbWy6LxwuZ3aXHa+OAdPrWvFrw4GI4=; b=J4CK/XfUbfTPCKYUCLF0chxgGhYg+O8TsYnhpP7uyANVotL/ec8njEQemV5qvxoGJmSpWX 2roRD04YSY/ahe8sXb4XYEMjNzT+MLEu8vlHuoPTwrPJ5NPBC7bx3j86Ac4sIvQ0+Ppik0 vAkdN2FdIhReJzRT/1OD35K6+K4NiqnvaPv/XmEnn7/58uDIrsOdg/KCd8VgTXOygju1N3 ypVkx7z6TmeG5r8aCvYjzloIZR6vOF3+3VVs6DD8qpFO6hxi5Vd1laK7qDs3us6qyU7yYD 2YkHw30KdUm4aAtFaTEVZt8uonlCKUqhkxUX1krst6KNzlXbRGcnyDK2CUsvzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729384486; a=rsa-sha256; cv=none; b=bgUV90R0Wf/K/5JxuQeW/EX9nXnH2CAlkWDbZ4ki+bf3PSkQtbjLca/lmBTuMtEC5bVIWl b8Cmp/2j6K5bw7fOBo63MUVDronPO7BpL/IIrw3o0aNlJO+MkvSetViUBpJz03IYws8v2c yDqD6njuzQoT4neqs0hVwvSapZ6trTM1W2i8E6/tEaqQQKp4rZYWYpyAbA3Es8laxpfCAG MioDuMM3hlVfsQNlP0fuzEbzMoovUhprs2KaZwR3Mx0VhexRbKFJuM/JugSvERu6TbDbAy n+OU7xIvd9IudVmc6xuXOc2McEnZfLGN1B40ixKTEdIbWiDnkQycZ4BOuHGcUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWKFy2lb2zgDD; Sun, 20 Oct 2024 00:34:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K0Ykhd061344; Sun, 20 Oct 2024 00:34:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K0YkeI061341; Sun, 20 Oct 2024 00:34:46 GMT (envelope-from git) Date: Sun, 20 Oct 2024 00:34:46 GMT Message-Id: <202410200034.49K0YkeI061341@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: c01a4b1fbc05 - stable/14 - iommu_get_requester(): do not panic if asked about non-pci device 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: c01a4b1fbc05333b9faefb8d381b903e122a4cea Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c01a4b1fbc05333b9faefb8d381b903e122a4cea commit c01a4b1fbc05333b9faefb8d381b903e122a4cea Author: Konstantin Belousov AuthorDate: 2024-10-13 10:04:32 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-20 00:33:03 +0000 iommu_get_requester(): do not panic if asked about non-pci device (cherry picked from commit 7896b03fff4d9c2e9c35ecf1dce2e0d672467a5a) --- sys/dev/iommu/busdma_iommu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c index f3b58306d6af..dbd4ee0ef0f1 100644 --- a/sys/dev/iommu/busdma_iommu.c +++ b/sys/dev/iommu/busdma_iommu.c @@ -127,6 +127,12 @@ iommu_get_requester(device_t dev, uint16_t *rid) pci_class = devclass_find("pci"); l = requester = dev; + pci = device_get_parent(dev); + if (pci == NULL || device_get_devclass(pci) != pci_class) { + *rid = 0; /* XXXKIB: Could be ACPI HID */ + return (requester); + } + *rid = pci_get_rid(dev); /* From nobody Sun Oct 20 00:34: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 4XWKFz6Dfqz5ZWCW; Sun, 20 Oct 2024 00:34:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWKFz4FnVz4ZGf; Sun, 20 Oct 2024 00:34:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LPz0lRo4QK/mZhYFChLbIagMhUnKl1lRXWs7VqkQyY=; b=gXD7VkVhay0LoDgwKWchEqOWeBrbv0QSSm1qgSZ+jfvN0h07GGZdWrLcVHID70yyEHAcMS /cSTfF7NepTOftOXwHC/x6rcnQp4jUUOfyf59K+ojwpp/0kijujaKJMZNeXre2lYVmkyzE XzuA9qkgI1jMGIl2SucsGLQGZ9Ysm+ZHU535T8Mi6NY8XbGgFRWCt+04olwENwMnXfq+0w 6XdpB66cgSdB5XggDgO366SOs3BpE/e8PMGCqh7wWs5TIreEMVyCEM8rdAv1+sHsWeAzrf vfD2fhjxHdf7iA2bm0H0wSwGv1WRpsBVTuXSbA2O0K1D8bOt+k9ABtq+iUWkbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LPz0lRo4QK/mZhYFChLbIagMhUnKl1lRXWs7VqkQyY=; b=QclA7K9NaIhDNLxrrxV0ISHw0N8BvzAfAQkMgRWQ0+KrSI4t+IeQ0BQpaBId8vPz/YkhrI 8hc3S6klOBrMrvFjOdahAMF6ihl6ijhj2XzCk2hH9yFMo85qgvBU3yzap9iCs337HsjVav peJ/yChMknHXd59SS3MEK3x2nXG0KMWi29YXCdMYCDYlDKqhWUxYB3yUXod5zZ3wMfE95a Sigggn4Y6O27Mq+d3HMSalJjJQBpxZcGU5bHa4Z2pve4B8Lv2hSZO6WoQXszYCl7545VYr NxJtEnMRt+P2PEAFbA/yzyIEsywPPPJ6BWDegv694y54SbBmNDBeGXNzwX37rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729384487; a=rsa-sha256; cv=none; b=eaeJOG5+Khophi+R4F53Nvvf2lCt5qe8n29toSHWvbnFpvG4ESQ4ipTnUG2YJAxJwOnATG OhlUmEwKVTuEX0BHkKNee2CYMqEzFKJqIAUFRTpoSBClRc6I94OVfJN4r6DIex/OSVMqqB /HDK66XiZPCQMnd4VZh24bjpUkYLCTau2rWu52XLTBkL8UnbRnTxTEVmAE+1Rph+q4f5Fs l2Ud4YuFNTlYqUxdrEXyHyPbBAXRPpMO+EFE6MQVT2O1Lud1owzjRtSEbPTicK70UC42Pc HV6fq3qPO7b76P1ruMzBzu+fhZ+H0oU974pJEvQyXjC3VSVUV3/Bef0hO8kecg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWKFz3phBzfcT; Sun, 20 Oct 2024 00:34:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K0Yl9n061403; Sun, 20 Oct 2024 00:34:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K0Ylo4061400; Sun, 20 Oct 2024 00:34:47 GMT (envelope-from git) Date: Sun, 20 Oct 2024 00:34:47 GMT Message-Id: <202410200034.49K0Ylo4061400@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: b38cff22720b - stable/14 - iommu: move context link and ref count into device-independent parts 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: b38cff22720b66d6c22b157487772091e3f3e8ee Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b38cff22720b66d6c22b157487772091e3f3e8ee commit b38cff22720b66d6c22b157487772091e3f3e8ee Author: Konstantin Belousov AuthorDate: 2024-10-12 19:56:14 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-20 00:33:04 +0000 iommu: move context link and ref count into device-independent parts (cherry picked from commit e9d948cfe0d21780d2e94137e322ecfe89f75d6a) --- sys/dev/iommu/iommu.h | 3 +++ sys/x86/iommu/intel_ctx.c | 38 ++++++++++++++-------------- sys/x86/iommu/intel_dmar.h | 3 --- sys/x86/iommu/intel_drv.c | 61 +++++++++------------------------------------ sys/x86/iommu/iommu_utils.c | 41 ++++++++++++++++++++++++++++++ sys/x86/iommu/x86_iommu.h | 3 +++ 6 files changed, 78 insertions(+), 71 deletions(-) diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index f425024117d3..b1858f0df9f7 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -121,11 +121,14 @@ struct iommu_domain { iommu_gaddr_t msi_base; /* (d) Arch-specific */ vm_paddr_t msi_phys; /* (d) Arch-specific */ u_int flags; /* (u) */ + LIST_HEAD(, iommu_ctx) contexts;/* (u) */ }; struct iommu_ctx { struct iommu_domain *domain; /* (c) */ struct bus_dma_tag_iommu *tag; /* (c) Root tag */ + LIST_ENTRY(iommu_ctx) link; /* (u) Member in the domain list */ + u_int refs; /* (u) References from tags */ u_long loads; /* atomic updates, for stat only */ u_long unloads; /* same */ u_int flags; /* (u) */ diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index bdb5f8740bf2..c7c7012e94ea 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -376,7 +376,7 @@ dmar_domain_alloc(struct dmar_unit *dmar, bool id_mapped) iodom = DOM2IODOM(domain); unit = DMAR2IOMMU(dmar); domain->domain = id; - LIST_INIT(&domain->contexts); + LIST_INIT(&iodom->contexts); iommu_domain_init(unit, iodom, &dmar_domain_map_ops); domain->dmar = dmar; @@ -431,7 +431,7 @@ dmar_ctx_alloc(struct dmar_domain *domain, uint16_t rid) ctx->context.tag = malloc(sizeof(struct bus_dma_tag_iommu), M_DMAR_CTX, M_WAITOK | M_ZERO); ctx->context.rid = rid; - ctx->refs = 1; + ctx->context.refs = 1; return (ctx); } @@ -447,7 +447,7 @@ dmar_ctx_link(struct dmar_ctx *ctx) domain->ctx_cnt)); domain->refs++; domain->ctx_cnt++; - LIST_INSERT_HEAD(&domain->contexts, ctx, link); + LIST_INSERT_HEAD(&domain->iodom.contexts, &ctx->context, link); } static void @@ -464,7 +464,7 @@ dmar_ctx_unlink(struct dmar_ctx *ctx) domain->refs, domain->ctx_cnt)); domain->refs--; domain->ctx_cnt--; - LIST_REMOVE(ctx, link); + LIST_REMOVE(&ctx->context, link); } static void @@ -477,7 +477,7 @@ dmar_domain_destroy(struct dmar_domain *domain) KASSERT(TAILQ_EMPTY(&domain->iodom.unload_entries), ("unfinished unloads %p", domain)); - KASSERT(LIST_EMPTY(&domain->contexts), + KASSERT(LIST_EMPTY(&iodom->contexts), ("destroying dom %p with contexts", domain)); KASSERT(domain->ctx_cnt == 0, ("destroying dom %p with ctx_cnt %d", domain, domain->ctx_cnt)); @@ -594,13 +594,13 @@ dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t dev, uint16_t rid, /* Nothing needs to be done to destroy ctx1. */ free(ctx1, M_DMAR_CTX); domain = CTX2DOM(ctx); - ctx->refs++; /* tag referenced us */ + ctx->context.refs++; /* tag referenced us */ } } else { domain = CTX2DOM(ctx); if (ctx->context.tag->owner == NULL) ctx->context.tag->owner = dev; - ctx->refs++; /* tag referenced us */ + ctx->context.refs++; /* tag referenced us */ } error = dmar_flush_for_ctx_entry(dmar, enable); @@ -738,15 +738,15 @@ dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx) struct dmar_domain *domain; DMAR_ASSERT_LOCKED(dmar); - KASSERT(ctx->refs >= 1, - ("dmar %p ctx %p refs %u", dmar, ctx, ctx->refs)); + KASSERT(ctx->context.refs >= 1, + ("dmar %p ctx %p refs %u", dmar, ctx, ctx->context.refs)); /* * If our reference is not last, only the dereference should * be performed. */ - if (ctx->refs > 1) { - ctx->refs--; + if (ctx->context.refs > 1) { + ctx->context.refs--; DMAR_UNLOCK(dmar); return; } @@ -763,15 +763,15 @@ dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx) TD_PREP_PINNED_ASSERT; ctxp = dmar_map_ctx_entry(ctx, &sf); DMAR_LOCK(dmar); - KASSERT(ctx->refs >= 1, - ("dmar %p ctx %p refs %u", dmar, ctx, ctx->refs)); + KASSERT(ctx->context.refs >= 1, + ("dmar %p ctx %p refs %u", dmar, ctx, ctx->context.refs)); /* * Other thread might have referenced the context, in which * case again only the dereference should be performed. */ - if (ctx->refs > 1) { - ctx->refs--; + if (ctx->context.refs > 1) { + ctx->context.refs--; DMAR_UNLOCK(dmar); iommu_unmap_pgtbl(sf); TD_PINNED_ASSERT; @@ -821,14 +821,14 @@ struct dmar_ctx * dmar_find_ctx_locked(struct dmar_unit *dmar, uint16_t rid) { struct dmar_domain *domain; - struct dmar_ctx *ctx; + struct iommu_ctx *ctx; DMAR_ASSERT_LOCKED(dmar); LIST_FOREACH(domain, &dmar->domains, link) { - LIST_FOREACH(ctx, &domain->contexts, link) { - if (ctx->context.rid == rid) - return (ctx); + LIST_FOREACH(ctx, &domain->iodom.contexts, link) { + if (ctx->rid == rid) + return (IOCTX2CTX(ctx)); } } return (NULL); diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h index fcdc915abcfd..c3163abf6f92 100644 --- a/sys/x86/iommu/intel_dmar.h +++ b/sys/x86/iommu/intel_dmar.h @@ -65,7 +65,6 @@ struct dmar_domain { u_int refs; /* (u) Refs, including ctx */ struct dmar_unit *dmar; /* (c) */ LIST_ENTRY(dmar_domain) link; /* (u) Member in the dmar list */ - LIST_HEAD(, dmar_ctx) contexts; /* (u) */ vm_object_t pgtbl_obj; /* (c) Page table pages */ u_int batch_no; }; @@ -73,8 +72,6 @@ struct dmar_domain { struct dmar_ctx { struct iommu_ctx context; uint64_t last_fault_rec[2]; /* Last fault reported */ - LIST_ENTRY(dmar_ctx) link; /* (u) Member in the domain list */ - u_int refs; /* (u) References from tags */ }; #define DMAR_DOMAIN_PGLOCK(dom) VM_OBJECT_WLOCK((dom)->pgtbl_obj) diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index cc16759ebe34..e973115df21b 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -1053,48 +1053,12 @@ dmar_instantiate_rmrr_ctxs(struct iommu_unit *unit) #include #include -static void -dmar_print_domain_entry(const struct iommu_map_entry *entry) -{ - struct iommu_map_entry *l, *r; - - db_printf( - " start %jx end %jx first %jx last %jx free_down %jx flags %x ", - entry->start, entry->end, entry->first, entry->last, - entry->free_down, entry->flags); - db_printf("left "); - l = RB_LEFT(entry, rb_entry); - if (l == NULL) - db_printf("NULL "); - else - db_printf("%jx ", l->start); - db_printf("right "); - r = RB_RIGHT(entry, rb_entry); - if (r == NULL) - db_printf("NULL"); - else - db_printf("%jx", r->start); - db_printf("\n"); -} - -static void -dmar_print_ctx(struct dmar_ctx *ctx) -{ - - db_printf( - " @%p pci%d:%d:%d refs %d flags %x loads %lu unloads %lu\n", - ctx, pci_get_bus(ctx->context.tag->owner), - pci_get_slot(ctx->context.tag->owner), - pci_get_function(ctx->context.tag->owner), ctx->refs, - ctx->context.flags, ctx->context.loads, ctx->context.unloads); -} - static void dmar_print_domain(struct dmar_domain *domain, bool show_mappings) { struct iommu_domain *iodom; struct iommu_map_entry *entry; - struct dmar_ctx *ctx; + struct iommu_ctx *ctx; iodom = DOM2IODOM(domain); @@ -1104,16 +1068,16 @@ dmar_print_domain(struct dmar_domain *domain, bool show_mappings) domain, domain->domain, domain->mgaw, domain->agaw, domain->pglvl, (uintmax_t)domain->iodom.end, domain->refs, domain->ctx_cnt, domain->iodom.flags, domain->pgtbl_obj, domain->iodom.entries_cnt); - if (!LIST_EMPTY(&domain->contexts)) { + if (!LIST_EMPTY(&iodom->contexts)) { db_printf(" Contexts:\n"); - LIST_FOREACH(ctx, &domain->contexts, link) - dmar_print_ctx(ctx); + LIST_FOREACH(ctx, &iodom->contexts, link) + iommu_db_print_ctx(ctx); } if (!show_mappings) return; db_printf(" mapped:\n"); RB_FOREACH(entry, iommu_gas_entries_tree, &iodom->rb_root) { - dmar_print_domain_entry(entry); + iommu_db_print_domain_entry(entry); if (db_pager_quit) break; } @@ -1121,7 +1085,7 @@ dmar_print_domain(struct dmar_domain *domain, bool show_mappings) return; db_printf(" unloading:\n"); TAILQ_FOREACH(entry, &domain->iodom.unload_entries, dmamap_link) { - dmar_print_domain_entry(entry); + iommu_db_print_domain_entry(entry); if (db_pager_quit) break; } @@ -1131,7 +1095,7 @@ DB_SHOW_COMMAND_FLAGS(dmar_domain, db_dmar_print_domain, CS_OWN) { struct dmar_unit *unit; struct dmar_domain *domain; - struct dmar_ctx *ctx; + struct iommu_ctx *ctx; bool show_mappings, valid; int pci_domain, bus, device, function, i, t; db_expr_t radix; @@ -1179,13 +1143,12 @@ DB_SHOW_COMMAND_FLAGS(dmar_domain, db_dmar_print_domain, CS_OWN) for (i = 0; i < dmar_devcnt; i++) { unit = device_get_softc(dmar_devs[i]); LIST_FOREACH(domain, &unit->domains, link) { - LIST_FOREACH(ctx, &domain->contexts, link) { + LIST_FOREACH(ctx, &domain->iodom.contexts, link) { if (pci_domain == unit->segment && - bus == pci_get_bus(ctx->context.tag->owner) && - device == - pci_get_slot(ctx->context.tag->owner) && - function == - pci_get_function(ctx->context.tag->owner)) { + bus == pci_get_bus(ctx->tag->owner) && + device == pci_get_slot(ctx->tag->owner) && + function == pci_get_function(ctx->tag-> + owner)) { dmar_print_domain(domain, show_mappings); goto out; diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c index db8f94eb584f..fde3f150947b 100644 --- a/sys/x86/iommu/iommu_utils.c +++ b/sys/x86/iommu/iommu_utils.c @@ -34,6 +34,7 @@ #else #include "opt_apic.h" #endif +#include "opt_ddb.h" #include #include @@ -756,3 +757,43 @@ pglvl_page_size(int total_pglvl, int lvl) KASSERT(rlvl < nitems(pg_sz), ("sizeof pg_sz lvl %d", lvl)); return (pg_sz[rlvl]); } + +#ifdef DDB +#include +#include + +void +iommu_db_print_domain_entry(const struct iommu_map_entry *entry) +{ + struct iommu_map_entry *l, *r; + + db_printf( + " start %jx end %jx first %jx last %jx free_down %jx flags %x ", + entry->start, entry->end, entry->first, entry->last, + entry->free_down, entry->flags); + db_printf("left "); + l = RB_LEFT(entry, rb_entry); + if (l == NULL) + db_printf("NULL "); + else + db_printf("%jx ", l->start); + db_printf("right "); + r = RB_RIGHT(entry, rb_entry); + if (r == NULL) + db_printf("NULL"); + else + db_printf("%jx", r->start); + db_printf("\n"); +} + +void +iommu_db_print_ctx(struct iommu_ctx *ctx) +{ + db_printf( + " @%p pci%d:%d:%d refs %d flags %#x loads %lu unloads %lu\n", + ctx, pci_get_bus(ctx->tag->owner), + pci_get_slot(ctx->tag->owner), + pci_get_function(ctx->tag->owner), ctx->refs, + ctx->flags, ctx->loads, ctx->unloads); +} +#endif diff --git a/sys/x86/iommu/x86_iommu.h b/sys/x86/iommu/x86_iommu.h index 4d0ac8351e2e..043935a3e0de 100644 --- a/sys/x86/iommu/x86_iommu.h +++ b/sys/x86/iommu/x86_iommu.h @@ -194,4 +194,7 @@ vm_pindex_t pglvl_pgtbl_get_pindex(int pglvl, iommu_gaddr_t base, int lvl); vm_pindex_t pglvl_max_pages(int pglvl); iommu_gaddr_t pglvl_page_size(int total_pglvl, int lvl); +void iommu_db_print_domain_entry(const struct iommu_map_entry *entry); +void iommu_db_print_ctx(struct iommu_ctx *ctx); + #endif From nobody Sun Oct 20 00:34: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 4XWKG074YSz5ZWcb; Sun, 20 Oct 2024 00:34:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWKG04pt2z4ZPd; Sun, 20 Oct 2024 00:34:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Dblnaa6N97Q/tWoZ5Dp+J9dpz8CGUbzT6zJ4T2z+O4=; b=uFBoetJOo/CsiRzGLNRy7F5xnVHXzAoAboxBTe9yOBI5M7UdrBxlmOiPHaPJYGllCOEDW/ q+bfBBeAW+ICA8nuqpkHtRP3l7N+kYso0OHdCsHqvYtP6BHpR+qNB2hJJUaxgaHftMvyCK J6xDlyYyqk/rWI8vzIvtpkCJ5xMesZJICwy0ZQwgK4krBtxH1SAWDzGXnSB+7wNmUzgZKZ zFP9LdRcBTS96aMGZPisN2ECSm3EfNZnGVxxgoocra0KZzG1WY+ANOQJo9ZbCytis8FNvD a0V9K3N1BLa9WrSpO0SM+VxXcFsJrZfKC1YRo6eH6lraxHWb/azm6jPDOgH3FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Dblnaa6N97Q/tWoZ5Dp+J9dpz8CGUbzT6zJ4T2z+O4=; b=EvW+F0xGNW5rN+2CIjUVKW52qdJqFc9YYlidwbNvuRL/pHr3Gaurm1Pf1U4d5SXJVr79md r7gk5xKguQGBskzLufUXK/xnfcXJZ9orBpzDq7U5BoaNl/6elg/uo0/fTJu+8tZuwCa4Aa lZIZv2agn0b26ULc0e6TkJXSV1k8BdeRyAdP9kaS1yywUQqhice0Hv3Vr8+eKuyleN3GiN l4YvTVZCyXzviMZa5hnb6B0IJ2F49gRegkx7mUvrrvMucOgLkL7scdQkE70dK5KW8gjvTJ ff0yzXKTPp37O2RxDYp4sNgIS44bjlJmv3/9cauGrnZae3wNGKRnScQViCkxkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729384488; a=rsa-sha256; cv=none; b=tkUj0USKDECKOUBA41RJdQhbvBu7jAjS+b0VwQbWNkDQ76kMlsRwWfwYFjFmpJ8NdJjNeF ZofUjSi5Gs0FeyCUpwOFAhTFuVlGPzYBj9ohmKiTio+1tJG6k/y+jD01+HnDbedf1dwdkH 5iq7AK+m2Jg4nGF3OorTITKbs6UJnAh/RUJC6CyCJ8p/fSBml7rn2Zrk0+cJxGy8i26rxY Fa9JhXYd6TYnvFwBChEZUrzT+AYNQQ4M9hvzmB8uwes4QkfWfDcScGKavtM4j8gRh2Og/I AIOtaT7XzDlYdl1AEenzlvu4laV6fekFZxXIxwmAb5Znqpsl1abwD9e1nAF8qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWKG04NJjzfmF; Sun, 20 Oct 2024 00:34:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K0YmvT061467; Sun, 20 Oct 2024 00:34:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K0YmqN061464; Sun, 20 Oct 2024 00:34:48 GMT (envelope-from git) Date: Sun, 20 Oct 2024 00:34:48 GMT Message-Id: <202410200034.49K0YmqN061464@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: d4bcad451f5d - stable/14 - iommu: extract driver-independent ddb context and mapping reporting 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: d4bcad451f5dc920748dda66b460a7985354b0da Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d4bcad451f5dc920748dda66b460a7985354b0da commit d4bcad451f5dc920748dda66b460a7985354b0da Author: Konstantin Belousov AuthorDate: 2024-10-12 20:18:05 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-20 00:33:04 +0000 iommu: extract driver-independent ddb context and mapping reporting (cherry picked from commit c9e22c749c0f3950b4526f630f6853ab104ab52f) --- sys/x86/iommu/intel_drv.c | 28 +++++----------------------- sys/x86/iommu/iommu_utils.c | 35 +++++++++++++++++++++++++++++++++++ sys/x86/iommu/x86_iommu.h | 2 ++ 3 files changed, 42 insertions(+), 23 deletions(-) diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index e973115df21b..ebc77879480b 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -1057,8 +1057,6 @@ static void dmar_print_domain(struct dmar_domain *domain, bool show_mappings) { struct iommu_domain *iodom; - struct iommu_map_entry *entry; - struct iommu_ctx *ctx; iodom = DOM2IODOM(domain); @@ -1068,27 +1066,11 @@ dmar_print_domain(struct dmar_domain *domain, bool show_mappings) domain, domain->domain, domain->mgaw, domain->agaw, domain->pglvl, (uintmax_t)domain->iodom.end, domain->refs, domain->ctx_cnt, domain->iodom.flags, domain->pgtbl_obj, domain->iodom.entries_cnt); - if (!LIST_EMPTY(&iodom->contexts)) { - db_printf(" Contexts:\n"); - LIST_FOREACH(ctx, &iodom->contexts, link) - iommu_db_print_ctx(ctx); - } - if (!show_mappings) - return; - db_printf(" mapped:\n"); - RB_FOREACH(entry, iommu_gas_entries_tree, &iodom->rb_root) { - iommu_db_print_domain_entry(entry); - if (db_pager_quit) - break; - } - if (db_pager_quit) - return; - db_printf(" unloading:\n"); - TAILQ_FOREACH(entry, &domain->iodom.unload_entries, dmamap_link) { - iommu_db_print_domain_entry(entry); - if (db_pager_quit) - break; - } + + iommu_db_domain_print_contexts(iodom); + + if (show_mappings) + iommu_db_domain_print_mappings(iodom); } DB_SHOW_COMMAND_FLAGS(dmar_domain, db_dmar_print_domain, CS_OWN) diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c index fde3f150947b..259c87403b07 100644 --- a/sys/x86/iommu/iommu_utils.c +++ b/sys/x86/iommu/iommu_utils.c @@ -796,4 +796,39 @@ iommu_db_print_ctx(struct iommu_ctx *ctx) pci_get_function(ctx->tag->owner), ctx->refs, ctx->flags, ctx->loads, ctx->unloads); } + +void +iommu_db_domain_print_contexts(struct iommu_domain *iodom) +{ + struct iommu_ctx *ctx; + + if (LIST_EMPTY(&iodom->contexts)) + return; + + db_printf(" Contexts:\n"); + LIST_FOREACH(ctx, &iodom->contexts, link) + iommu_db_print_ctx(ctx); +} + +void +iommu_db_domain_print_mappings(struct iommu_domain *iodom) +{ + struct iommu_map_entry *entry; + + db_printf(" mapped:\n"); + RB_FOREACH(entry, iommu_gas_entries_tree, &iodom->rb_root) { + iommu_db_print_domain_entry(entry); + if (db_pager_quit) + break; + } + if (db_pager_quit) + return; + db_printf(" unloading:\n"); + TAILQ_FOREACH(entry, &iodom->unload_entries, dmamap_link) { + iommu_db_print_domain_entry(entry); + if (db_pager_quit) + break; + } +} + #endif diff --git a/sys/x86/iommu/x86_iommu.h b/sys/x86/iommu/x86_iommu.h index 043935a3e0de..92ac993e7c9c 100644 --- a/sys/x86/iommu/x86_iommu.h +++ b/sys/x86/iommu/x86_iommu.h @@ -196,5 +196,7 @@ iommu_gaddr_t pglvl_page_size(int total_pglvl, int lvl); void iommu_db_print_domain_entry(const struct iommu_map_entry *entry); void iommu_db_print_ctx(struct iommu_ctx *ctx); +void iommu_db_domain_print_contexts(struct iommu_domain *iodom); +void iommu_db_domain_print_mappings(struct iommu_domain *iodom); #endif From nobody Sun Oct 20 00:34: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 4XWKG32TjVz5ZWCX; Sun, 20 Oct 2024 00:34:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWKG3052rz4ZkF; Sun, 20 Oct 2024 00:34:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jV9kMcvI9A345RApNFkVhcKZLl11hn1w27pyojP6NUo=; b=Msrh9xIxa3GZ7Hpm5lcvc8Yb6MyRtLP5/eVVjaZIKfd68wH4fDXm9+UxwgK37xS19Wmwwu HTNYX1GJnG/dwzzdMFm2F/BjmWvG2mjDUbaLSN8+69WK6v+0KWgiqEpxjsubonrrTDvMMg 1iXkDigDJqguxLc1KOci/Mz4cnl0X1W1nC4KHA/R3L5erQNRYJk0BRWGZt+HX1su6fiGDE o6DgX5jCgFM9U+/vM5g6OZUn3UebwF5Z0CsSUyMzhWmdtDdRLksBzoAUSEqqi6G4dUU04y wbWAXEvME0Gh9zNbhg1284U8McTVEF5eZejWg6GN+L1Kqjt2E4gGm4NMfKLEuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jV9kMcvI9A345RApNFkVhcKZLl11hn1w27pyojP6NUo=; b=wyZKhm7RxeZJxO3HfgNGhFyNlAEnW3cEqkki8P2H3gZuFXnpsreT0NP3iv14kTPjrbYmOi rhOo9iEhluWnAZm6WC6cjk2do9sk9hxlSoeae/lKxHJRLXusseacMhvpP/40Au5zfDTiNF bHkr7Pofo58H9w1pRToZZANvH/qnCr1Kh4yLYiJbrip/+8z7g3abcezTncKIi+wxWp9FPt 3gR9uyTTzMTujdraQRn0de2FnmIu1IUiWuJzOIzTHLWdKUMYQGm/V2E1bV3BcbOpXLmnWO Ppet7tfYVxxlsok09qaLklui230QR4RLZvYYNCEhlBc5BeWaLGNQpm8aCzYvuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729384491; a=rsa-sha256; cv=none; b=vXjAKIrmSEsXWvl2mJmj0KTP3Tg0Gc/KUPWBzygO2lDyKnHmOhvxZUm50xSDpDDvdjBZbb KQE+BZaqKV0SlDnyRTVZELSBaMWLj85tRX9dQP/SxEa1l8cnS33/5EJTFlhdOpDbxY9fag YghNi/upzcISuv6yO0cBn2wlgAnKngZ7cAfW30gsS+RuWQE4GaaxExmT+KUE/GyYS/gENG H7OxZmBo7JKtl+JkmqPD5JedgV4ou7W9KxP61/XSLCLJFOJWPIk14ejeTz3Q/rJhAwljWB I7ZkRPiSTrLKUAHaP2UP6cAZH9g7hxWPOWjtBOHhVcfuHkTwZTYrIi8hbsUR0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWKG26m2kzgBM; Sun, 20 Oct 2024 00:34:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K0Yod0061570; Sun, 20 Oct 2024 00:34:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K0Yo4D061567; Sun, 20 Oct 2024 00:34:50 GMT (envelope-from git) Date: Sun, 20 Oct 2024 00:34:50 GMT Message-Id: <202410200034.49K0Yo4D061567@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: def4322f9632 - stable/14 - ftime.3: fix typo in spelling of libutil 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: def4322f9632fddc1953df0210f278bd04026f9c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=def4322f9632fddc1953df0210f278bd04026f9c commit def4322f9632fddc1953df0210f278bd04026f9c Author: Keith White AuthorDate: 2024-10-18 12:49:30 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-20 00:33:44 +0000 ftime.3: fix typo in spelling of libutil PR: 282171 (cherry picked from commit 167bfde7057f38894c8fbd790a65136f0174368e) --- lib/libutil/ftime.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libutil/ftime.3 b/lib/libutil/ftime.3 index dbed25317115..d87743d8720d 100644 --- a/lib/libutil/ftime.3 +++ b/lib/libutil/ftime.3 @@ -34,7 +34,7 @@ .Nm ftime .Nd get date and time .Sh LIBRARY -.Lb libuitl +.Lb libutil .Sh SYNOPSIS .In sys/types.h .In sys/timeb.h From nobody Sun Oct 20 00:34: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 4XWKG20v1xz5ZWQG; Sun, 20 Oct 2024 00:34:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWKG162pFz4Zdd; Sun, 20 Oct 2024 00:34:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LamU7lY5Ew8IRPJyioY9eIi9u06RlOJ+EEhltU6C2to=; b=ODxkJHxYcawg2qas46a4nrEW/8uH0V5iw0oSJvkfnSbV57t7x2/GuapjalWf8vQoIH32ir GrMQAlCoOamCJq8pqU5HqkVitU/Woicu6f9JENGf52jcnhJ4BXie5ZFSkYAHadA4Dtpp4W z4EasgUm9mlfRz2jiy2toqxrfx/iBlHHIWw41lHeluYl4fkqiwhfDYpW9qHnnkczl7fn5r KYRL5TgmHNOPFZQJ7aJhwM/8vN+Pe4hmYOOdBxYMhGtjDyEuA8nX1WgSmdWyZR3xam9BnZ 948TzGHIANYRdR6aLeTtX3HIxwfsweFuvPFFjcJaene0RnDcZDSGjuM0oxTENQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729384489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LamU7lY5Ew8IRPJyioY9eIi9u06RlOJ+EEhltU6C2to=; b=IiqNgBLEQRkd1Vz33MtTvhxAdRBPjTbSnD8tJDqGABTNy2ZECi3i+GXg1wYtq1yYYoTQlQ zyLpCJjwYPtXNLicuBstbYFMIsBYlMSuh/Sl3OvW/ftAo8Ot4FeN/d+STIoFFFeJayj00R Bd/6H5lfQYFBlNrS9Kx8NYtTKpcPGq9fIraUKf97WTZmNPb/v0TF9O8YzJKdInAzR04o7Q W2kXQxPJsb9ALv6rzxhelofljj6QWkvhDybaNV3Fje3wp564SQMQgnoClXLT+PKKnxf0b5 JcoiZcJjPZCnONnkidJjA/YAaBB60J4oP/9awzJMKajvcihy6pg8KJsznMBmgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729384489; a=rsa-sha256; cv=none; b=P89p57WmFL5DUVMWzVKFCc0ahlCiqizj25AU2iqMC2FMLmMETmBKsdBpuz2D9wYZ8S2Hlu Qh4NBYwkj3e0VV83QhDENsX854F0kgQyyK2YbyUAQ2EDRBVlieKs6WLQvF409uHPTvfmlB v/H3P9LoUEdto00J2jbOPkhu8SBc0dkJ57bZFCFXQNCMoonEjYpjO05cITyXxlTYbywHqk g+wxj0eugvK+IZ0raxiS9teZnxY1LvlQHU2KjV0D+by6hMsI39ot4GAkT1AZAz3DX4IqJq PimJlvEM3zVhG2mcPx2AnN7WsXwwp9rQrhKXICWpzU37D9P2kYLmSI1+4IwWTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWKG15fzxzg01; Sun, 20 Oct 2024 00:34:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K0Yn7U061520; Sun, 20 Oct 2024 00:34:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K0YnnZ061517; Sun, 20 Oct 2024 00:34:49 GMT (envelope-from git) Date: Sun, 20 Oct 2024 00:34:49 GMT Message-Id: <202410200034.49K0YnnZ061517@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: 959f0d0cdb14 - stable/14 - md(4): always trim the last partial sector 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: 959f0d0cdb1482d754f24b7ae16bda0ac2e7b31a Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=959f0d0cdb1482d754f24b7ae16bda0ac2e7b31a commit 959f0d0cdb1482d754f24b7ae16bda0ac2e7b31a Author: Konstantin Belousov AuthorDate: 2024-10-13 21:28:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-20 00:33:04 +0000 md(4): always trim the last partial sector PR: 281978 (cherry picked from commit 4bf34c597c44a2393ac5ec483e9cecac128d8202) --- sys/dev/md/md.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 1d531b88193f..3285cfef830d 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1303,6 +1303,7 @@ mdinit(struct md_s *sc) { struct g_geom *gp; struct g_provider *pp; + unsigned remn; g_topology_lock(); gp = g_new_geomf(&g_md_class, "md%d", sc->unit); @@ -1311,6 +1312,13 @@ mdinit(struct md_s *sc) devstat_remove_entry(pp->stat); pp->stat = NULL; pp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; + /* Prune off any residual fractional sector. */ + remn = sc->mediasize % sc->sectorsize; + if (remn != 0) { + printf("md%d: truncating fractional last sector by %u bytes\n", + sc->unit, remn); + sc->mediasize -= remn; + } pp->mediasize = sc->mediasize; pp->sectorsize = sc->sectorsize; switch (sc->type) { @@ -1680,7 +1688,7 @@ kern_mdattach_locked(struct thread *td, struct md_req *mdr) { struct md_s *sc; unsigned sectsize; - int error, i; + int error; sx_assert(&md_sx, SA_XLOCKED); @@ -1752,10 +1760,6 @@ err_after_new: return (error); } - /* Prune off any residual fractional sector */ - i = sc->mediasize % sc->sectorsize; - sc->mediasize -= i; - mdinit(sc); return (0); } From nobody Sun Oct 20 00:48: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 4XWKZP193gz5ZWn9; Sun, 20 Oct 2024 00:49:01 +0000 (UTC) (envelope-from bz@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWKZP0gbgz4d2x; Sun, 20 Oct 2024 00:49:01 +0000 (UTC) (envelope-from bz@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729385341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xxF8zjJWG9c6EOc5HFwhYmStgiLu+pwLAaCnfwMA5QA=; b=yuHqDgyAsNkpB4tEqd7lKHefzB2d1JW4jxrbEZRjTOSqXkOBdrSYF4CUmtmNW6k3FMzX/6 W82TAOYnYNSHEpVUeULqZ+VZFFy927g25KpaBripGQkm0U2nPbhmGaC6sg6TfbWs8BseT5 K8Pkf5DLPoQgD8aDuqtrLWa9+8Besh7QAyBM4PDt085adZtie1PCdtFRRT2q+PkaybBZv5 evuZMQvRZlbkLPyPLL5Bkk4mthQVK01rA2gArSxeJKNmdJZDXOC+fXlapUo4QSdFyBqecy 26dRex6QncVnQf94xsj6ee4Z+Z87CA6WnSNyWgLwsTTHYBwlnN3sjL+Oy+FbSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729385341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xxF8zjJWG9c6EOc5HFwhYmStgiLu+pwLAaCnfwMA5QA=; b=f//Ld/qt6mY+ONHJyEPYUzTfPSxOuqOzbmylekutnYy8ZCGOaRXSTYYsepX7LO+6aeAcRH 1Ch+VGQ1cRyqVMyeua/npKjs9SezrHuagBBb22eD0C0W7yR1gI9VwThKBrbPOklWGQDeXk k1ewmvqQQyiQKVpZhUokCDhsiMfA1hIqN59f4WCZLCzSAqdZ4Kn6waw+F1mBN2xlAZ5A0Y Rk2apOhKU6dFOZS5fpxW/YOEee2gZCHQqGEy34CvvinIXDGxVklgWG7bu4s1SFErg8K2WM p3COEwm4/l5JD5bn34lIHn6z6NcebCmbtSHDeUBMzWw8xQmgFwhsaEtVYEODQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729385341; a=rsa-sha256; cv=none; b=KuCky3CqdQbe5b/FlMLsbyKaNHHqYMouTrBPm/8O272U+C+QNItCEQKrhILqXO5ZdnwhPZ ueI1t9KT8BQ0Q8ojzHwBgt46KySwwsPy9RRy+t3zobLm3uomAVgnNUNANg2S3TQKL9ms83 o2ncEbUAi5Hb1Hr10nZrs5uZIUfAYno27DrS+Ji6bTxXwH8slvo7barlOL0JQ4yO3pm5u2 57gnuHwrX8CUyQlVlkPZsTSAJWSZ8C3e7nP3Z5/bdrw88jUsKmgXqsu3jQdWisDYghg1R+ mdRlM6m/5GOJjEjZxW72bwNErUiNP1Pvlao7ETBMiLQsyTzfBiH0iBtZwbeShw== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E5" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XWKZN5fSTz19rP; Sun, 20 Oct 2024 00:49:00 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 49F52A64806; Sun, 20 Oct 2024 00:48:54 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id AF57E2D029D8; Sun, 20 Oct 2024 00:48:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id TOXHN9KTOpEh; Sun, 20 Oct 2024 00:48:57 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 3A4E22D029D2; Sun, 20 Oct 2024 00:48:57 +0000 (UTC) Date: Sun, 20 Oct 2024 00:48:56 +0000 (UTC) From: "Bjoern A. Zeeb" To: Mark Johnston cc: Konstantin Belousov , John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f4e35c044c89 - main - bus: Set the current VNET in device_attach() In-Reply-To: Message-ID: References: <202410191304.49JD4JoM084001@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Sat, 19 Oct 2024, Mark Johnston wrote: > On Sat, Oct 19, 2024 at 11:50:40PM +0000, Bjoern A. Zeeb wrote: >> On Sat, 19 Oct 2024, Mark Johnston wrote: >> >>> On Sat, Oct 19, 2024 at 07:10:53PM +0300, Konstantin Belousov wrote: >>>> On Sat, Oct 19, 2024 at 11:36:32AM -0400, John Baldwin wrote: >>>>> On 10/19/24 09:04, Mark Johnston wrote: >>>>>> The branch main has been updated by markj: >>>>>> >>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=f4e35c044c8988b7452cefbdcc417f5fd723e021 >>>>>> >>>>>> commit f4e35c044c8988b7452cefbdcc417f5fd723e021 >>>>>> Author: Mark Johnston >>>>>> AuthorDate: 2024-10-19 13:03:56 +0000 >>>>>> Commit: Mark Johnston >>>>>> CommitDate: 2024-10-19 13:03:56 +0000 >>>>>> >>>>>> bus: Set the current VNET in device_attach() >>>>>> Some drivers, in particular anything which creates an ifnet during >>>>>> attach, need to have the current VNET set, as if_attach_internal() and >>>>>> its callees access VNET-global variables. >>>>>> device_probe_and_attach() handles this, but this is not the only way to >>>>>> arrive in DEVICE_ATTACH. In particular, bus drivers may invoke >>>>>> device_attach() directly, as does devctl2's DEV_ENABLE ioctl handler. >>>>>> So, set the current VNET in device_attach() instead. >>>>>> I believe it is always safe to use vnet0, as devctl2 ioctls are not >>>>>> permitted within a jail. >>>>>> PR: 282168 >>>>>> Reviewed by: zlei, kevans, bz, imp, glebius >>>>>> MFC after: 1 week >>>>>> Differential Revision: https://reviews.freebsd.org/D47174 >>>>> >>>>> Hmm, there was some other review I thought that had a completely different change. >>>>> That change removed all the vnet stuff from new-bus and instead handled it in >>>>> if.c. Specifically, that if_attach would set a default vnet to vnet0 if there >>>>> wasn't an active vnet at the time. See all the discussion in >>>>> https://reviews.freebsd.org/D42678 which has a patch that I think is correct >>>>> in the comments. >> >> There it was; thanks I didn't misremeber but couldn't find it. >> >> >>> Gleb's proposal, described a bit in D47147, is to require device-based >>> ifnet drivers to fully detach themselves from the parent bus in order to >>> change VNETs. The intent is to eliminate the need for if_vmove() and >>> all the complexity it entails. This would also eliminate the need for a >>> "home" VNET, referenced in the patch that you reference here. >> >> Will it? >> >> I asked for a discussion elsewhere but it seems we are having it here now... > > I'm responding to John's question and Kostik's follow-up, nothing else. > The inline patch in D42678 seems fine, I don't have strong feelings > about it, but I believe it is not sufficient to fix the PR in question > (it still assumes that the current vnet is already set). > >> I am still inclined to ask: >> - how do you want a vnet to attach an unknown to itself device? From >> the outside? >> - How to you pass it to a child-vnet without escalating priviledges to >> outside of the host system (vnet0)? >> - Is, e.g., a vcc device [CXGBE(4)] a physical interface? >> - How do you pass a controlled set of other non-clonable devices in (or >> did we get rid of them all)? The inital idea was still that the >> "host" has somehow control over what child can create... >> { I recently tried tuntap in a vnet and it blew up badly by not going >> away } >> - exmaple: I really would love, e.g., a vlan interface to be passed to a >> vnet but but not the pyhsical interface. Can we? >> - How will we do with wlan interfaces (which are cloned) but may not own >> the hardware (kind-of similar to the vcc example)? I know there are >> special PRIV checks for those currently. >> - how does a detach in a vnet work and where will the physical interface >> re-appear for (automatic) attachment? just detached in that jail? >> vnet0? the parent jail? >> - what happens on vnet destroy? (same as last question)? >> - Are we just going to build a vmove on a layer which doesn't have >> anything to do with networking per-se as a special case for some >> interfaces but not others? > > These are excellent questions which should be posed to Gleb when his > proposal is fleshed out. In the meantime, I only aimed to fix an > obvious shortcoming of an existing hack which has been around for over > 10 years. ACK & ACK -- Bjoern A. Zeeb r15:7 From nobody Sun Oct 20 01:51: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 4XWLxy0yl5z5Zc5m; Sun, 20 Oct 2024 01:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWLxy0XBmz4mDV; Sun, 20 Oct 2024 01:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729389062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rSmvb3sdaa6WX/LqD5F+Y/+PVc9wWWTabXRIcJBcDB4=; b=QBGu47YbB/UPJKEc0YX3/zwtZTe0OntkRI9MXxPwZCUl8fjaSxKhqpHBY5AcsJOvR/tLLM pL12Ko3+3gTb8q7rEBw+iLiMCj7lThYE8q2Fv65F5jGBgmApQXXCO6NHphWEjXFHAopBrK lrHnndwURnBPDfxjlgVxbtN5+Fche2RQkHw63hyoa5rdcakkYlt5Gdi2HIBHK7CWqGmcWL TbltaAdoY37Ju/1KNebvqGJ+rfxBtmz170blXYDeWV5ragbz4gN/wsswtb5SEh3xi4hlJN 25ksxCdAcFBj+9RfhUD33Otm0Ve/EtBFwukDh+CIZpdb59M5GkEiHQ+qG6uOpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729389062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rSmvb3sdaa6WX/LqD5F+Y/+PVc9wWWTabXRIcJBcDB4=; b=Zg6ocxmoQhkQ/cGiXRRGuXmBZkDlsb9pMeQMSB+MUi11E/vtWFoxuUv54fP7TSCfC9fLiK oY9HnxHtGVFwEURKiHw5qwYu17g/DkTpmCvElfD8+QlI/uIK71l0iVVN+9thFGSyU7+p0x QPb8ycaSP5lg6UP+W18Nu8mgAPj0t9NR5bHgKAW4KkR/IXcfp8eNs6dxKPCzpJPLNKidl1 IVq3aJuKzsf7v46eZsMXWe/pReQAktnmIMqT00+0Ev4DgfWOb0+wPCukLuVZhM6c9ZhZc7 Nf3bhlGxbhlg6Q9sEYXFQJnwrDC7Qv06uwDo2AltdTFzpIo1UtLmGf3pYSworA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729389062; a=rsa-sha256; cv=none; b=SvrEYQtpLbsOfnWgDA+Cq4b3BAzVVgjZhzEPUjBqJfq577zMcJEkz4l/u5ibynd9RMz3Xa LFKZozAFhwrjmoetWpDr/oa54Xu5ToQUfdVHzkFuQaSMPRUyFEwVGIEYJHtI9fzOTH+Q0+ +KqA/6e2wej5VCF9WvL5agFU0ugaq5m0giISvIH5H7moDaoklAlbHaKkQqfl7pdlgxdRfD iMO650YGK/rG3mN6P59yVz4aNBfI9HZD4+9VZpGU3g5vx+JEb8GCX3SxE82zPBums+Do+/ P1U6cOIuP5GBkTUmhYsnG33WKeJpwwGdUBG38haJ3wMW50jSg79PAUxH2KG61A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWLxy07xvzj26; Sun, 20 Oct 2024 01:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K1p1CL001652; Sun, 20 Oct 2024 01:51:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K1p1n3001648; Sun, 20 Oct 2024 01:51:01 GMT (envelope-from git) Date: Sun, 20 Oct 2024 01:51:01 GMT Message-Id: <202410200151.49K1p1n3001648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 0077477f215c - main - tests/sys/fs/fusefs: include iomanip header 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0077477f215c851fe15c9ea12cfb005125c4238a Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=0077477f215c851fe15c9ea12cfb005125c4238a commit 0077477f215c851fe15c9ea12cfb005125c4238a Author: Enji Cooper AuthorDate: 2024-10-19 15:34:07 +0000 Commit: Enji Cooper CommitDate: 2024-10-20 01:50:48 +0000 tests/sys/fs/fusefs: include iomanip header io.cc relies on `std::setw(..)`, which is exported by the iomanip C++ header. Newer versions of GoogleTest don't export this header, so add the explicit include. This unbreaks the build with GoogleTest 1.15.2. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47194 --- tests/sys/fs/fusefs/io.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc index 99b5eae34e09..f8684ee02100 100644 --- a/tests/sys/fs/fusefs/io.cc +++ b/tests/sys/fs/fusefs/io.cc @@ -38,6 +38,8 @@ extern "C" { #include } +#include + #include "mockfs.hh" #include "utils.hh" From nobody Sun Oct 20 01:54: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 4XWM2M2T3Sz5ZcPJ; Sun, 20 Oct 2024 01:54:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWM2M206Fz4mxR; Sun, 20 Oct 2024 01:54:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729389291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mqKTjGPVS/7g3NUHUckdhq7duHs+bEdS888gBPM+n/M=; b=oLxh2KopMeeApQCf9VyHc8zmATpHUJjS22xCB5Olykv/7rwM/hMBzoyitdjPyaU2eZ9km1 BGd6d27mX3HFLRFbmZjXmmyW4RxCifdkYeNtbZ1qjcBOxC3Dl2d7cadxF5z31tjpdbfitK U9Uqp4pi0ukjZyVCjGFjPfLO/Vjhen8IAQouFnpDuHx37xYsj+nvF8vP6Dk3Xqwh8ySHfv CKQcytdZNPpkY2yeir7sI8RzSzN9bain2st8PZtumVSok2Z9ST2XvCKgU9nwKnS2j++VPh 8A2BqwCJjO9igHujA/NnX43wGD+WZe3+88nX+2IQntQM756u2Y3+15Ahs9fs2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729389291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mqKTjGPVS/7g3NUHUckdhq7duHs+bEdS888gBPM+n/M=; b=sQyIctAUxoBmYPOQgHWMfb15x9HClZYCeJzhXy7XcBw1MLf12foK7Ah4JaNzrOhHWWgHX4 WO72UKi05shX8rqyhHj4TgtjPMUyQFrCwSJyA/3+2nhaxlaHpez4rzwQ9zb3g55zgOj1F3 oVj3Q4jUBHJkgPnE3z20cDsLUV9h7nktNR3hc/XUaFoQ6us1zt6+2+zuaUYIqudFevVHKL Ohdi1DbywqlTjeD502dE1LaS+3CSmp0D8ojq0AOjXGLuBPBHLl/q0HFfcFWyDMJnphjCuc /FwLXityThgmrgu/NBcUCsiiOaIkpz6CvrTNmWhsoam4NhJJRo3ChAEvZ8pbvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729389291; a=rsa-sha256; cv=none; b=jSjOQm6Vs/Zfke9TXnPn4yB3cbQGAFk5byzMJKjLynuV7IwVI+bMvC27lpGrlor93c9Fyu 0iNOtf+9xcoGNKAuQAbJbN1hC0RUB+Vx3fmXfYyaLn/75sQbHxJNZWdhjPTMBWBYcwiDPC r3yW5WL6fu0aDWYggjGhy6IeMuh5ocI6PSHOlUTZNd9q8qTQBwGez+872/z3L93clS0MOr KBEgj8lI6r64n2kxyy/pU9kH6GDGHP5PQwbVVH7AomPW+x1RSBPThzGnUHtlO26uex/Rtu oGkM1VbRU+tYq5mTwl7HBNoWUmRmSW6T3aFd1B7Q/E2AL49Tlajt1tJYoazo7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWM2M1SZqzj8q; Sun, 20 Oct 2024 01:54:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K1spaa008557; Sun, 20 Oct 2024 01:54:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K1soeG008554; Sun, 20 Oct 2024 01:54:50 GMT (envelope-from git) Date: Sun, 20 Oct 2024 01:54:50 GMT Message-Id: <202410200154.49K1soeG008554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 5ca8c28cd8c7 - main - contrib/googletest: update from 1.14.0 to 1.15.2 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ca8c28cd8c725b81781201cfdb5f9969396f934 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=5ca8c28cd8c725b81781201cfdb5f9969396f934 commit 5ca8c28cd8c725b81781201cfdb5f9969396f934 Merge: 0077477f215c 14f7077fed7d Author: Enji Cooper AuthorDate: 2024-10-20 01:51:18 +0000 Commit: Enji Cooper CommitDate: 2024-10-20 01:54:01 +0000 contrib/googletest: update from 1.14.0 to 1.15.2 The changes between the two versions can be found in this diff of the two release tags: https://github.com/google/googletest/compare/v1.14.0...v1.15.2 One notable change is that GoogleTest 1.15.x now officially requires C++-14 (1.14.x required C++-11). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47197 Merge commit '14f7077fed7d82046bdcbe347004132f08aba886' contrib/googletest/BUILD.bazel | 17 ++ contrib/googletest/CMakeLists.txt | 13 +- contrib/googletest/CONTRIBUTING.md | 8 +- contrib/googletest/CONTRIBUTORS | 1 + contrib/googletest/MODULE.bazel | 69 +++++ contrib/googletest/README.md | 22 +- contrib/googletest/WORKSPACE | 29 +- contrib/googletest/WORKSPACE.bzlmod | 35 +++ contrib/googletest/ci/linux-presubmit.sh | 10 +- contrib/googletest/ci/macos-presubmit.sh | 3 +- contrib/googletest/ci/windows-presubmit.bat | 11 +- contrib/googletest/docs/advanced.md | 36 ++- contrib/googletest/docs/faq.md | 57 ++-- contrib/googletest/docs/gmock_cook_book.md | 41 ++- contrib/googletest/docs/gmock_for_dummies.md | 6 +- contrib/googletest/docs/primer.md | 39 ++- contrib/googletest/docs/reference/assertions.md | 2 +- contrib/googletest/docs/reference/mocking.md | 3 +- contrib/googletest/docs/reference/testing.md | 29 +- contrib/googletest/fake_fuchsia_sdk.bzl | 33 +++ contrib/googletest/googlemock/CMakeLists.txt | 27 +- contrib/googletest/googlemock/README.md | 6 +- .../googlemock/include/gmock/gmock-actions.h | 44 ++- .../include/gmock/gmock-function-mocker.h | 9 +- .../googlemock/include/gmock/gmock-matchers.h | 179 ++++++------- .../googlemock/include/gmock/gmock-more-actions.h | 7 +- .../googletest/googlemock/include/gmock/gmock.h | 15 +- .../include/gmock/internal/gmock-internal-utils.h | 14 +- .../googlemock/include/gmock/internal/gmock-port.h | 8 +- .../googlemock/src/gmock-internal-utils.cc | 5 +- .../googletest/googlemock/src/gmock-matchers.cc | 29 +- .../googlemock/src/gmock-spec-builders.cc | 3 +- .../test/gmock-matchers-comparisons_test.cc | 9 + .../test/gmock-matchers-containers_test.cc | 17 +- .../googlemock/test/gmock-more-actions_test.cc | 40 ++- .../googlemock/test/gmock-spec-builders_test.cc | 2 +- .../googletest/googlemock/test/gmock_link_test.h | 9 + contrib/googletest/googletest/CMakeLists.txt | 28 +- contrib/googletest/googletest/README.md | 4 +- .../googletest/googletest/cmake/Config.cmake.in | 4 + .../googletest/cmake/internal_utils.cmake | 42 +-- .../include/gtest/gtest-assertion-result.h | 2 +- .../googletest/include/gtest/gtest-death-test.h | 8 +- .../googletest/include/gtest/gtest-message.h | 19 +- .../googletest/include/gtest/gtest-param-test.h | 8 +- .../googletest/include/gtest/gtest-printers.h | 90 +++++-- .../googletest/include/gtest/gtest-typed-test.h | 126 ++++----- .../googletest/googletest/include/gtest/gtest.h | 55 ++-- .../gtest/internal/gtest-death-test-internal.h | 51 ++-- .../include/gtest/internal/gtest-filepath.h | 8 +- .../include/gtest/internal/gtest-internal.h | 99 +++---- .../include/gtest/internal/gtest-param-util.h | 154 +++++------ .../include/gtest/internal/gtest-port-arch.h | 2 + .../googletest/include/gtest/internal/gtest-port.h | 141 +++++++--- .../include/gtest/internal/gtest-type-util.h | 6 +- .../googletest/googletest/src/gtest-death-test.cc | 36 +-- .../googletest/googletest/src/gtest-filepath.cc | 2 +- .../googletest/googletest/src/gtest-internal-inl.h | 46 ++-- contrib/googletest/googletest/src/gtest-port.cc | 98 +++++-- contrib/googletest/googletest/src/gtest.cc | 294 ++++++++++++--------- .../googletest/test/googletest-color-test.py | 1 + .../googletest/test/googletest-death-test-test.cc | 78 +++--- .../test/googletest-json-output-unittest.py | 15 ++ .../googletest/test/googletest-options-test.cc | 5 +- .../test/googletest-output-test-golden-lin.txt | 5 - .../googletest/test/googletest-port-test.cc | 6 +- .../googletest/test/googletest-printers-test.cc | 16 ++ .../googletest/test/gtest_environment_test.cc | 96 ++++--- .../googletest/googletest/test/gtest_help_test.py | 64 ++--- .../googletest/test/gtest_json_test_utils.py | 3 + .../googletest/test/gtest_repeat_test.cc | 4 +- .../googletest/googletest/test/gtest_unittest.cc | 46 ++-- .../googletest/test/gtest_xml_output_unittest.py | 15 +- contrib/googletest/googletest_deps.bzl | 22 +- 74 files changed, 1564 insertions(+), 1022 deletions(-) diff --cc contrib/googletest/CONTRIBUTING.md index 8bed14b2666d,000000000000..ab5a47bf5530 mode 100644,000000..100644 --- a/contrib/googletest/CONTRIBUTING.md +++ b/contrib/googletest/CONTRIBUTING.md @@@ -1,141 -1,0 +1,141 @@@ +# How to become a contributor and submit your own code + +## Contributor License Agreements + +We'd love to accept your patches! Before we can take them, we have to jump a +couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + +* If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an + [individual CLA](https://developers.google.com/open-source/cla/individual). +* If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a + [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Are you a Googler? + +If you are a Googler, please make an attempt to submit an internal contribution +rather than a GitHub Pull Request. If you are not able to submit internally, a +PR is acceptable as an alternative. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the + [issue tracker](https://github.com/google/googletest/issues). +2. Please don't mix more than one logical change per submittal, because it + makes the history hard to follow. If you want to make a change that doesn't + have a corresponding issue in the issue tracker, please create one. +3. Also, coordinate with team members that are listed on the issue in question. + This ensures that work isn't being duplicated and communicating your plan + early also generally leads to better patches. +4. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement + ([see details above](#contributor-license-agreements)). +5. Fork the desired repo, develop and test your code changes. +6. Ensure that your code adheres to the existing style in the sample to which + you are contributing. +7. Ensure that your code has an appropriate set of unit tests which all pass. +8. Submit a pull request. + +## The Google Test and Google Mock Communities + +The Google Test community exists primarily through the - [discussion group](http://groups.google.com/group/googletestframework) and the ++[discussion group](https://groups.google.com/group/googletestframework) and the +GitHub repository. Likewise, the Google Mock community exists primarily through - their own [discussion group](http://groups.google.com/group/googlemock). You are - definitely encouraged to contribute to the discussion and you can also help us - to keep the effectiveness of the group high by following and promoting the ++their own [discussion group](https://groups.google.com/group/googlemock). You ++are definitely encouraged to contribute to the discussion and you can also help ++us to keep the effectiveness of the group high by following and promoting the +guidelines listed here. + +### Please Be Friendly + +Showing courtesy and respect to others is a vital part of the Google culture, +and we strongly encourage everyone participating in Google Test development to +join us in accepting nothing less. Of course, being courteous is not the same as +failing to constructively disagree with each other, but it does mean that we +should be respectful of each other when enumerating the 42 technical reasons +that a particular proposal may not be the best choice. There's never a reason to +be antagonistic or dismissive toward anyone who is sincerely trying to +contribute to a discussion. + +Sure, C++ testing is serious business and all that, but it's also a lot of fun. +Let's keep it that way. Let's strive to be one of the friendliest communities in +all of open source. + +As always, discuss Google Test in the official GoogleTest discussion group. You +don't have to actually submit code in order to sign up. Your participation +itself is a valuable contribution. + +## Style + +To keep the source consistent, readable, diffable and easy to merge, we use a +fairly rigid coding style, as defined by the +[google-styleguide](https://github.com/google/styleguide) project. All patches +will be expected to conform to the style outlined +[here](https://google.github.io/styleguide/cppguide.html). Use +[.clang-format](https://github.com/google/googletest/blob/main/.clang-format) to +check your formatting. + +## Requirements for Contributors + +If you plan to contribute a patch, you need to build Google Test, Google Mock, +and their own tests from a git checkout, which has further requirements: + +* [Python](https://www.python.org/) v3.6 or newer (for running some of the + tests and re-generating certain source files from templates) +* [CMake](https://cmake.org/) v2.8.12 or newer + +## Developing Google Test and Google Mock + +This section discusses how to make your own changes to the Google Test project. + +### Testing Google Test and Google Mock Themselves + +To make sure your changes work as intended and don't break existing +functionality, you'll want to compile and run Google Test and GoogleMock's own +tests. For that you can use CMake: + +``` +mkdir mybuild +cd mybuild +cmake -Dgtest_build_tests=ON -Dgmock_build_tests=ON ${GTEST_REPO_DIR} +``` + +To choose between building only Google Test or Google Mock, you may modify your +cmake command to be one of each + +``` +cmake -Dgtest_build_tests=ON ${GTEST_DIR} # sets up Google Test tests +cmake -Dgmock_build_tests=ON ${GMOCK_DIR} # sets up Google Mock tests +``` + +Make sure you have Python installed, as some of Google Test's tests are written +in Python. If the cmake command complains about not being able to find Python +(`Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)`), try telling it +explicitly where your Python executable can be found: + +``` +cmake -DPYTHON_EXECUTABLE=path/to/python ... +``` + +Next, you can build Google Test and / or Google Mock and all desired tests. On +\*nix, this is usually done by + +``` +make +``` + +To run the tests, do + +``` +make test +``` + +All tests should pass. diff --cc contrib/googletest/MODULE.bazel index 000000000000,61d5e2223512..61d5e2223512 mode 000000,100644..100644 --- a/contrib/googletest/MODULE.bazel +++ b/contrib/googletest/MODULE.bazel diff --cc contrib/googletest/README.md index 443e02069581,000000000000..f50c670534d5 mode 100644,000000..100644 --- a/contrib/googletest/README.md +++ b/contrib/googletest/README.md @@@ -1,146 -1,0 +1,142 @@@ +# GoogleTest + +### Announcements + +#### Live at Head + +GoogleTest now follows the +[Abseil Live at Head philosophy](https://abseil.io/about/philosophy#upgrade-support). +We recommend +[updating to the latest commit in the `main` branch as often as possible](https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#what-is-live-at-head-and-how-do-i-do-it). +We do publish occasional semantic versions, tagged with - `v${major}.${minor}.${patch}` (e.g. `v1.13.0`). ++`v${major}.${minor}.${patch}` (e.g. `v1.15.0`). + +#### Documentation Updates + +Our documentation is now live on GitHub Pages at +https://google.github.io/googletest/. We recommend browsing the documentation on +GitHub Pages rather than directly in the repository. + - #### Release 1.13.0 ++#### Release 1.15.0 + - [Release 1.13.0](https://github.com/google/googletest/releases/tag/v1.13.0) is ++[Release 1.15.0](https://github.com/google/googletest/releases/tag/v1.15.0) is +now available. + - The 1.13.x branch requires at least C++14. ++The 1.15.x branch requires at least C++14. + +#### Continuous Integration + - We use Google's internal systems for continuous integration. \ - GitHub Actions were added for the convenience of open-source contributors. They - are exclusively maintained by the open-source community and not used by the - GoogleTest team. ++We use Google's internal systems for continuous integration. + +#### Coming Soon + +* We are planning to take a dependency on + [Abseil](https://github.com/abseil/abseil-cpp). - * More documentation improvements are planned. + +## Welcome to **GoogleTest**, Google's C++ test framework! + +This repository is a merger of the formerly separate GoogleTest and GoogleMock +projects. These were so closely related that it makes sense to maintain and +release them together. + +### Getting Started + +See the [GoogleTest User's Guide](https://google.github.io/googletest/) for +documentation. We recommend starting with the +[GoogleTest Primer](https://google.github.io/googletest/primer.html). + +More information about building GoogleTest can be found at +[googletest/README.md](googletest/README.md). + +## Features + +* xUnit test framework: \ + Googletest is based on the [xUnit](https://en.wikipedia.org/wiki/XUnit) + testing framework, a popular architecture for unit testing +* Test discovery: \ + Googletest automatically discovers and runs your tests, eliminating the need + to manually register your tests +* Rich set of assertions: \ + Googletest provides a variety of assertions, such as equality, inequality, + exceptions, and more, making it easy to test your code +* User-defined assertions: \ + You can define your own assertions with Googletest, making it simple to + write tests that are specific to your code +* Death tests: \ + Googletest supports death tests, which verify that your code exits in a + certain way, making it useful for testing error-handling code +* Fatal and non-fatal failures: \ + You can specify whether a test failure should be treated as fatal or + non-fatal with Googletest, allowing tests to continue running even if a + failure occurs +* Value-parameterized tests: \ + Googletest supports value-parameterized tests, which run multiple times with + different input values, making it useful for testing functions that take + different inputs +* Type-parameterized tests: \ + Googletest also supports type-parameterized tests, which run with different + data types, making it useful for testing functions that work with different + data types +* Various options for running tests: \ + Googletest provides many options for running tests including running + individual tests, running tests in a specific order and running tests in + parallel + +## Supported Platforms + +GoogleTest follows Google's +[Foundational C++ Support Policy](https://opensource.google/documentation/policies/cplusplus-support). +See +[this table](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md) +for a list of currently supported versions of compilers, platforms, and build +tools. + +## Who Is Using GoogleTest? + +In addition to many internal projects at Google, GoogleTest is also used by the +following notable projects: + - * The [Chromium projects](http://www.chromium.org/) (behind the Chrome browser - and Chrome OS). - * The [LLVM](http://llvm.org/) compiler. ++* The [Chromium projects](https://www.chromium.org/) (behind the Chrome ++ browser and Chrome OS). ++* The [LLVM](https://llvm.org/) compiler. +* [Protocol Buffers](https://github.com/google/protobuf), Google's data + interchange format. - * The [OpenCV](http://opencv.org/) computer vision library. ++* The [OpenCV](https://opencv.org/) computer vision library. + +## Related Open Source Projects + +[GTest Runner](https://github.com/nholthaus/gtest-runner) is a Qt5 based +automated test-runner and Graphical User Interface with powerful features for +Windows and Linux platforms. + +[GoogleTest UI](https://github.com/ospector/gtest-gbar) is a test runner that +runs your test binary, allows you to track its progress via a progress bar, and +displays a list of test failures. Clicking on one shows failure text. GoogleTest +UI is written in C#. + +[GTest TAP Listener](https://github.com/kinow/gtest-tap-listener) is an event +listener for GoogleTest that implements the +[TAP protocol](https://en.wikipedia.org/wiki/Test_Anything_Protocol) for test +result output. If your test runner understands TAP, you may find it useful. + +[gtest-parallel](https://github.com/google/gtest-parallel) is a test runner that +runs tests from your binary in parallel to provide significant speed-up. + +[GoogleTest Adapter](https://marketplace.visualstudio.com/items?itemName=DavidSchuldenfrei.gtest-adapter) +is a VS Code extension allowing to view GoogleTest in a tree view and run/debug +your tests. + +[C++ TestMate](https://github.com/matepek/vscode-catch2-test-adapter) is a VS +Code extension allowing to view GoogleTest in a tree view and run/debug your +tests. + +[Cornichon](https://pypi.org/project/cornichon/) is a small Gherkin DSL parser +that generates stub code for GoogleTest. + +## Contributing Changes + +Please read +[`CONTRIBUTING.md`](https://github.com/google/googletest/blob/main/CONTRIBUTING.md) +for details on how to contribute to this project. + +Happy testing! diff --cc contrib/googletest/WORKSPACE.bzlmod index 000000000000,381432c5d0cb..381432c5d0cb mode 000000,100644..100644 --- a/contrib/googletest/WORKSPACE.bzlmod +++ b/contrib/googletest/WORKSPACE.bzlmod diff --cc contrib/googletest/fake_fuchsia_sdk.bzl index 000000000000,2024dc6c4d03..2024dc6c4d03 mode 000000,100644..100644 --- a/contrib/googletest/fake_fuchsia_sdk.bzl +++ b/contrib/googletest/fake_fuchsia_sdk.bzl From nobody Sun Oct 20 05:04: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 4XWRFX3GWPz5ZnPN; Sun, 20 Oct 2024 05:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWRFX2vYnz41DP; Sun, 20 Oct 2024 05:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729400688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rd4ZT8sE7c+Ve8kRXnAurv6kHU9eJkr4kW7tbaa7aFM=; b=KjRgeoFLYLa0rcLXaL1385yM9aa6Aa59Qis37IbDJVthsqdq0clX77ReUQIW1t6L8cp3Vp m0iNOpXCQHGDmJ76s3W5M8Di/Xmn/zsggk4DzasBuxwIu3Hc4ZIpALtAxlkab3Xd/bL+DT JdUUlaCpVgOgI9UCCQ+QdC0W2hcN+Iy0OfYxhpnQh+j8vyNnQxMiv3CWwekOq+HJ/FuCBW Itl1FClRZN9pLoo/w1ptslfYJCWY6NHa0UwP/P4T5UErA7NV/HiIdzy17vyDvnpOR5Lkxz ZrwxV6mbuU/TvoyX+A8xWm4DH9miPxT+7WUE+bC0QGXMV76+PF24lKMZG34fqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729400688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rd4ZT8sE7c+Ve8kRXnAurv6kHU9eJkr4kW7tbaa7aFM=; b=OlzwModKyw0Zrzn5woxvWIrTk36o8u+8WEV05GI0rrZboobfdNdwkTf1hN+Une6mRie1pj XAIPnWIrMv1xCnCc3hhEh11+fuDHPXHll29RB6bznS4v/8rQ6khV06b14XWw9L47B9bjcg 9pQLrNaYngHi9qjQDdjOoEvYb+dje+YBEipvcyXJ75DRMCE8Twfu0rxR1NobrSqd9/u0Cz 9n1cRLlUpZ1ZSEO0k2emV57HJ++FACnPZ4yerszvPUjWMsxXDMM7RrL2A6sjOQgv1CCZm5 y7IKtoWGHMjPcU0BRp7sgRnyQZar745kXNj9L726UWfn+UkSJilz5hiBmY9DnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729400688; a=rsa-sha256; cv=none; b=yM6v37RyoFMvUYvJvIHoeYKVa5aZxM9vZZVDrlXz5cMVXdkhmSJtr9E91DpzJBz2vjACVi VQYX5HuoyHNZXNhjIJQP8M1AyiK1sFX9AqcEiA+FzF/IAMyqXQBl7HFW9ySuWzkXv6R2WK qiqoxC96nUt5RVWIBPkLP1VSXMiBqqrautPwOTRb+q6Kter9V9pRijX8KkF73R9FqvvUW7 GHMR4ztwlpk96TcjNyUWtLZMnmwBPZrTr2yvVrnbywGuhS0b4TNleC+GgB0G1Ix1h5j6ax mPkqAsPegK12R7jM8QYkjoCjsFEn/A0H1EbF09RUyvbMeErOOSbiv6ov7l90pA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWRFX2Vgbznqc; Sun, 20 Oct 2024 05:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K54m62063023; Sun, 20 Oct 2024 05:04:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K54mha063020; Sun, 20 Oct 2024 05:04:48 GMT (envelope-from git) Date: Sun, 20 Oct 2024 05:04:48 GMT Message-Id: <202410200504.49K54mha063020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 472a0ccf847a - stable/14 - igc: Add AIM 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 472a0ccf847a2b9ca1199d0786ff46f2abf448b4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=472a0ccf847a2b9ca1199d0786ff46f2abf448b4 commit 472a0ccf847a2b9ca1199d0786ff46f2abf448b4 Author: Kevin Bowling AuthorDate: 2024-10-11 01:20:13 +0000 Commit: Kevin Bowling CommitDate: 2024-10-20 05:03:58 +0000 igc: Add AIM igc is derived from igb and has never had an AIM implementation. The same algorithm from e1000 is appropriate here. Upon more detailed study of the Linux driver which has a newer AIM implementation, it finally became clear to me this is actually a holdoff timer and not an interrupt limit as it is conventionally (statically) programmed and displayed as an interrupt rate. The data sheets also make this somewhat clear. Thus, AIM accomplishes two beneficial things for a wide variety of workloads[1]: 1. At low throughput/packet rates, it will significantly lower latency (by counter-intuitively "increasing" the interrupt rate.. better thought of as decreasing the holdoff timer because you will modulate down before coming anywhere near these interrupt rates). 2. At bulk data rates, it is tuned to achieve a lower interrupt rate (by increasing the holdoff timer) than the current static 8000/s. This decreases processing overhead and yields more headroom for other work such as packet filters or userland. For a single NIC this might be worth a few sys% on common CPUs, but may be meaningful when multiplied such as if_lagg, if_bridge and forwarding setups. The AIM algorithm was re-introduced from the older igb or out of tree driver, and then modernized with permission to use Intel code from other drivers. [1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/gbe-controllers-interrupt-moderation-appl-note.pdf Relnotes: yes Sponsored by: Rubicon Communications, LLC ("Netgate") Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47053 (cherry picked from commit bc9402abdd11630ced33cbecb79b0d72f203f08a) --- sys/dev/igc/if_igc.c | 232 +++++++++++++++++++++++++++++++++++++++++++++++-- sys/dev/igc/if_igc.h | 27 +++++- sys/dev/igc/igc_txrx.c | 4 + 3 files changed, 256 insertions(+), 7 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 006fecdab7b0..c4f5e82ff8c8 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -1,9 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * + * Copyright (c) 2001-2024, Intel Corporation * Copyright (c) 2016 Nicole Graziano - * All rights reserved. - * Copyright (c) 2021 Rubicon Communications, LLC (Netgate) + * Copyright (c) 2021-2024 Rubicon Communications, LLC (Netgate) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -125,6 +125,8 @@ static int igc_sysctl_debug_info(SYSCTL_HANDLER_ARGS); static int igc_get_rs(SYSCTL_HANDLER_ARGS); static void igc_print_debug_info(struct igc_adapter *); static int igc_is_valid_ether_addr(u8 *); +static void igc_neweitr(struct igc_adapter *, struct igc_rx_queue *, + struct tx_ring *, struct rx_ring *); /* Management and WOL Support */ static void igc_get_hw_control(struct igc_adapter *); static void igc_release_hw_control(struct igc_adapter *); @@ -238,10 +240,19 @@ static int igc_eee_setting = 1; SYSCTL_INT(_hw_igc, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &igc_eee_setting, 0, "Enable Energy Efficient Ethernet"); +/* + * AIM: Adaptive Interrupt Moderation + * which means that the interrupt rate is varied over time based on the + * traffic for that interrupt vector + */ +static int igc_enable_aim = 1; +SYSCTL_INT(_hw_igc, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &igc_enable_aim, + 0, "Enable adaptive interrupt moderation (1=normal, 2=lowlatency)"); + /* ** Tuneable Interrupt rate */ -static int igc_max_interrupt_rate = 20000; +static int igc_max_interrupt_rate = IGC_INTS_DEFAULT; SYSCTL_INT(_hw_igc, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &igc_max_interrupt_rate, 0, "Maximum interrupts per second"); @@ -444,6 +455,13 @@ igc_if_attach_pre(if_ctx_t ctx) OID_AUTO, "nvm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, igc_sysctl_nvm_info, "I", "NVM Information"); + adapter->enable_aim = igc_enable_aim; + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "enable_aim", CTLFLAG_RW, + &adapter->enable_aim, 0, + "Interrupt Moderation (1=normal, 2=lowlatency)"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, @@ -816,6 +834,142 @@ igc_if_init(if_ctx_t ctx) igc_set_eee_i225(&adapter->hw, true, true, true); } +enum eitr_latency_target { + eitr_latency_disabled = 0, + eitr_latency_lowest = 1, + eitr_latency_low = 2, + eitr_latency_bulk = 3 +}; +/********************************************************************* + * + * Helper to calculate next EITR value for AIM + * + *********************************************************************/ +static void +igc_neweitr(struct igc_adapter *sc, struct igc_rx_queue *que, + struct tx_ring *txr, struct rx_ring *rxr) +{ + struct igc_hw *hw = &sc->hw; + u32 neweitr; + u32 bytes; + u32 bytes_packets; + u32 packets; + u8 nextlatency; + + /* Idle, do nothing */ + if ((txr->tx_bytes == 0) && (rxr->rx_bytes == 0)) + return; + + neweitr = 0; + + if (sc->enable_aim) { + nextlatency = rxr->rx_nextlatency; + + /* Use half default (4K) ITR if sub-gig */ + if (sc->link_speed != 1000) { + neweitr = IGC_INTS_4K; + goto igc_set_next_eitr; + } + /* Want at least enough packet buffer for two frames to AIM */ + if (sc->shared->isc_max_frame_size * 2 > (sc->pba << 10)) { + neweitr = igc_max_interrupt_rate; + sc->enable_aim = 0; + goto igc_set_next_eitr; + } + + /* Get the largest values from the associated tx and rx ring */ + if (txr->tx_bytes && txr->tx_packets) { + bytes = txr->tx_bytes; + bytes_packets = txr->tx_bytes/txr->tx_packets; + packets = txr->tx_packets; + } + if (rxr->rx_bytes && rxr->rx_packets) { + bytes = max(bytes, rxr->rx_bytes); + bytes_packets = max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); + packets = max(packets, rxr->rx_packets); + } + + /* Latency state machine */ + switch (nextlatency) { + case eitr_latency_disabled: /* Bootstrapping */ + nextlatency = eitr_latency_low; + break; + case eitr_latency_lowest: /* 70k ints/s */ + /* TSO and jumbo frames */ + if (bytes_packets > 8000) + nextlatency = eitr_latency_bulk; + else if ((packets < 5) && (bytes > 512)) + nextlatency = eitr_latency_low; + break; + case eitr_latency_low: /* 20k ints/s */ + if (bytes > 10000) { + /* Handle TSO */ + if (bytes_packets > 8000) + nextlatency = eitr_latency_bulk; + else if ((packets < 10) || (bytes_packets > 1200)) + nextlatency = eitr_latency_bulk; + else if (packets > 35) + nextlatency = eitr_latency_lowest; + } else if (bytes_packets > 2000) { + nextlatency = eitr_latency_bulk; + } else if (packets < 3 && bytes < 512) { + nextlatency = eitr_latency_lowest; + } + break; + case eitr_latency_bulk: /* 4k ints/s */ + if (bytes > 25000) { + if (packets > 35) + nextlatency = eitr_latency_low; + } else if (bytes < 1500) + nextlatency = eitr_latency_low; + break; + default: + nextlatency = eitr_latency_low; + device_printf(sc->dev, "Unexpected neweitr transition %d\n", + nextlatency); + break; + } + + /* Trim itr_latency_lowest for default AIM setting */ + if (sc->enable_aim == 1 && nextlatency == eitr_latency_lowest) + nextlatency = eitr_latency_low; + + /* Request new latency */ + rxr->rx_nextlatency = nextlatency; + } else { + /* We may have toggled to AIM disabled */ + nextlatency = eitr_latency_disabled; + rxr->rx_nextlatency = nextlatency; + } + + /* ITR state machine */ + switch(nextlatency) { + case eitr_latency_lowest: + neweitr = IGC_INTS_70K; + break; + case eitr_latency_low: + neweitr = IGC_INTS_20K; + break; + case eitr_latency_bulk: + neweitr = IGC_INTS_4K; + break; + case eitr_latency_disabled: + default: + neweitr = igc_max_interrupt_rate; + break; + } + +igc_set_next_eitr: + neweitr = IGC_INTS_TO_EITR(neweitr); + + neweitr |= IGC_EITR_CNT_IGNR; + + if (neweitr != que->eitr_setting) { + que->eitr_setting = neweitr; + IGC_WRITE_REG(hw, IGC_EITR(que->msix), que->eitr_setting); + } +} + /********************************************************************* * * Fast Legacy/MSI Combined Interrupt Service routine @@ -825,10 +979,14 @@ int igc_intr(void *arg) { struct igc_adapter *adapter = arg; + struct igc_hw *hw = &adapter->hw; + struct igc_rx_queue *que = &adapter->rx_queues[0]; + struct tx_ring *txr = &adapter->tx_queues[0].txr; + struct rx_ring *rxr = &que->rxr; if_ctx_t ctx = adapter->ctx; u32 reg_icr; - reg_icr = IGC_READ_REG(&adapter->hw, IGC_ICR); + reg_icr = IGC_READ_REG(hw, IGC_ICR); /* Hot eject? */ if (reg_icr == 0xffffffff) @@ -856,6 +1014,14 @@ igc_intr(void *arg) if (reg_icr & IGC_ICR_RXO) adapter->rx_overruns++; + igc_neweitr(adapter, que, txr, rxr); + + /* Reset state */ + txr->tx_bytes = 0; + txr->tx_packets = 0; + rxr->rx_bytes = 0; + rxr->rx_packets = 0; + return (FILTER_SCHEDULE_THREAD); } @@ -888,9 +1054,20 @@ static int igc_msix_que(void *arg) { struct igc_rx_queue *que = arg; + struct igc_adapter *sc = que->adapter; + struct tx_ring *txr = &sc->tx_queues[que->msix].txr; + struct rx_ring *rxr = &que->rxr; ++que->irqs; + igc_neweitr(sc, que, txr, rxr); + + /* Reset state */ + txr->tx_bytes = 0; + txr->tx_packets = 0; + rxr->rx_bytes = 0; + rxr->rx_packets = 0; + return (FILTER_SCHEDULE_THREAD); } @@ -1395,7 +1572,7 @@ igc_configure_queues(struct igc_adapter *adapter) /* Set the starting interrupt rate */ if (igc_max_interrupt_rate > 0) - newitr = (4000000 / igc_max_interrupt_rate) & 0x7FFC; + newitr = IGC_INTS_TO_EITR(igc_max_interrupt_rate); newitr |= IGC_EITR_CNT_IGNR; @@ -1608,6 +1785,9 @@ igc_reset(if_ctx_t ctx) /* Setup DMA Coalescing */ igc_init_dmac(adapter, pba); + /* Save the final PBA off if it needs to be used elsewhere i.e. AIM */ + adapter->pba = pba; + IGC_WRITE_REG(hw, IGC_VET, ETHERTYPE_VLAN); igc_get_phy_info(hw); igc_check_for_link(hw); @@ -2380,6 +2560,40 @@ igc_sysctl_reg_handler(SYSCTL_HANDLER_ARGS) return (sysctl_handle_int(oidp, &val, 0, req)); } +/* Per queue holdoff interrupt rate handler */ +static int +igc_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) +{ + struct igc_rx_queue *rque; + struct igc_tx_queue *tque; + struct igc_hw *hw; + int error; + u32 reg, usec, rate; + + bool tx = oidp->oid_arg2; + + if (tx) { + tque = oidp->oid_arg1; + hw = &tque->adapter->hw; + reg = IGC_READ_REG(hw, IGC_EITR(tque->me)); + } else { + rque = oidp->oid_arg1; + hw = &rque->adapter->hw; + reg = IGC_READ_REG(hw, IGC_EITR(rque->msix)); + } + + usec = (reg & IGC_QVECTOR_MASK); + if (usec > 0) + rate = IGC_INTS_TO_EITR(usec); + else + rate = 0; + + error = sysctl_handle_int(oidp, &rate, 0, req); + if (error || !req->newptr) + return error; + return 0; +} + /* * Add sysctl variables, one per statistic, to the system. */ @@ -2436,6 +2650,10 @@ igc_add_hw_stats(struct igc_adapter *adapter) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "TX Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", + CTLTYPE_UINT | CTLFLAG_RD, tx_que, + true, igc_sysctl_interrupt_rate_handler, "IU", + "Interrupt Rate"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, IGC_TDH(txr->me), igc_sysctl_reg_handler, "IU", @@ -2456,6 +2674,10 @@ igc_add_hw_stats(struct igc_adapter *adapter) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "RX Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", + CTLTYPE_UINT | CTLFLAG_RD, rx_que, + false, igc_sysctl_interrupt_rate_handler, "IU", + "Interrupt Rate"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, IGC_RDH(rxr->me), igc_sysctl_reg_handler, "IU", diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index 727699baee5f..57949c3ad38a 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -1,8 +1,8 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * + * Copyright (c) 2001-2024, Intel Corporation * Copyright (c) 2016 Nicole Graziano - * All rights reserved. * Copyright (c) 2021 Rubicon Communications, LLC (Netgate) * * Redistribution and use in source and binary forms, with or without @@ -163,6 +163,17 @@ #define IGC_TX_PTHRESH 8 #define IGC_TX_HTHRESH 1 +/* Define the interrupt rates and EITR helpers */ +#define IGC_INTS_4K 4000 +#define IGC_INTS_20K 20000 +#define IGC_INTS_70K 70000 +#define IGC_INTS_DEFAULT 8000 +#define IGC_EITR_DIVIDEND 1000000 +#define IGC_EITR_SHIFT 2 +#define IGC_QVECTOR_MASK 0x7FFC +#define IGC_INTS_TO_EITR(i) (((IGC_EITR_DIVIDEND/i) & IGC_QVECTOR_MASK) << \ + IGC_EITR_SHIFT) + /* * TDBA/RDBA should be aligned on 16 byte boundary. But TDLEN/RDLEN should be * multiple of 128 bytes. So we align TDBA/RDBA on 128 byte boundary. This will @@ -218,7 +229,12 @@ struct tx_ring { /* Interrupt resources */ void *tag; struct resource *res; - unsigned long tx_irq; + + /* Soft stats */ + unsigned long tx_irq; + unsigned long tx_packets; + unsigned long tx_bytes; + /* Saved csum offloading context information */ int csum_flags; @@ -253,6 +269,9 @@ struct rx_ring { unsigned long rx_discarded; unsigned long rx_packets; unsigned long rx_bytes; + + /* Next requested ITR latency */ + u8 rx_nextlatency; }; struct igc_tx_queue { @@ -268,6 +287,7 @@ struct igc_rx_queue { u32 me; u32 msix; u32 eims; + u32 eitr_setting; struct rx_ring rxr; u64 irqs; struct if_irq que_irq; @@ -315,6 +335,8 @@ struct igc_adapter { u32 rx_mbuf_sz; + int enable_aim; + /* Management and WOL features */ u32 wol; @@ -328,6 +350,7 @@ struct igc_adapter { u16 link_duplex; u32 smartspeed; u32 dmac; + u32 pba; int link_mask; u64 que_mask; diff --git a/sys/dev/igc/igc_txrx.c b/sys/dev/igc/igc_txrx.c index 7601513a709e..cd7175f45f34 100644 --- a/sys/dev/igc/igc_txrx.c +++ b/sys/dev/igc/igc_txrx.c @@ -316,6 +316,10 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi) txd->read.cmd_type_len |= htole32(IGC_ADVTXD_DCMD_EOP | txd_flags); pi->ipi_new_pidx = i; + /* Sent data accounting for AIM */ + txr->tx_bytes += pi->ipi_len; + ++txr->tx_packets; + return (0); } From nobody Sun Oct 20 05:04: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 4XWRFY5hLgz5Zn53; Sun, 20 Oct 2024 05:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWRFY3w7zz41Vy; Sun, 20 Oct 2024 05:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729400689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QCqThZW3b2wnirOvuLQwUNyXmmsjO8g2iZE3ka2kH/g=; b=GuzKwMueHP7GMnQmWjfXuODdVvuMiFfFt1V+ofvi2YsqHCp8wemB4IRA3S689IfG45xiv3 h6fnXmrJFwMwiz8hgm6Jd9sKPHu+UNQvEtmu9/8KvljbokPStPwiLdMcIXpKOExU/u4WQK ZwMEYhSA0Kj5EOp9SfBjIAlSmhuikxDSZ9cuBfIASVuwpAlhdlwJC0H0gZIqfVWdypa16x IYtV/3q70eNt2BLe8bz2qvMMSpeYoxxV+YIzTZPXXtugVq3uhZ/XXLJWREn7piH4PbhRRE uihe2nz7NeKIU7V3KcIFN4JGhyouItsomu08e1BLAStp/DKrxGVbdeUJKmFh0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729400689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QCqThZW3b2wnirOvuLQwUNyXmmsjO8g2iZE3ka2kH/g=; b=GPb9KyJYkSOOzI0gl6iJCFKwaJIuGLgLaZLFLpC6X6umB5DQIlASqEvDK6HWC1hgguOMoH PBnAyMG8+y9/Ax8j+4UFdHfQOrh6ft3mC18aRxWPowJl0DyNNrWp4QRsGhJrm/IFqoxUj0 TEfUll9P+pxcDx+7euaPxiwxR/2El+tK3+fv1be1dVXhpzO4Pu4ARKwKdY+C7xN8kAIvEK Ffy5xuPV1so7zm/GqGAZ01CWMRXQWq6PL2RUP2bMAEYuEAb8xnMbg9ZN84lqSWXVqqM3/d Q8sJESUWm9YLoECoL3pNTS6T15lS3TLW30a03yyX0O9WHrwCg1neWqn9m4Vwmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729400689; a=rsa-sha256; cv=none; b=euOXZ18+iUQA6ExY8lRPvtA50Vf0rVd0W5Hxbsz2ULyrfP3yfFCkYN8H5JAzTo//OBY3yJ bTddZsZupGKPY4Yl9jnYOUfR6Z54VdNBeMd9GUzzWkUf60UIyZGw0IHT0XAgIMn55Ucczn 4op67zQyGCg9dweN+QOuO5NKaEWahD+q9MwfVp9M9XhKjqSqZCdPg4G7ChIjXCC3FQa/En ueCJi8aHpHZuIIHNWsg7zVNmWWYJAGLNskbB9Muovw9JuxtT1WyZulHg/7df14I8j1Gr/D lYa8ve6aEn9aqxJ1Y1JGIGDzsXZq14BJYUwm5kyaUpKntl0W6Tk8lGf/WZ2lJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWRFY3WhczpFv; Sun, 20 Oct 2024 05:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K54nNF063074; Sun, 20 Oct 2024 05:04:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K54nwa063071; Sun, 20 Oct 2024 05:04:49 GMT (envelope-from git) Date: Sun, 20 Oct 2024 05:04:49 GMT Message-Id: <202410200504.49K54nwa063071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 5882faed60d2 - stable/14 - igc: Improve a comment and update copyright dates 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5882faed60d2b43d6e188807930255f633f830fd Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=5882faed60d2b43d6e188807930255f633f830fd commit 5882faed60d2b43d6e188807930255f633f830fd Author: Kevin Bowling AuthorDate: 2024-10-12 07:53:57 +0000 Commit: Kevin Bowling CommitDate: 2024-10-20 05:04:16 +0000 igc: Improve a comment and update copyright dates (cherry picked from commit 516d92304a7fa9b869c934436aa3e1c5202f03c9) --- sys/dev/igc/if_igc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index 57949c3ad38a..94e41104f28e 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -3,7 +3,7 @@ * * Copyright (c) 2001-2024, Intel Corporation * Copyright (c) 2016 Nicole Graziano - * Copyright (c) 2021 Rubicon Communications, LLC (Netgate) + * Copyright (c) 2021-2024 Rubicon Communications, LLC (Netgate) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -270,7 +270,7 @@ struct rx_ring { unsigned long rx_packets; unsigned long rx_bytes; - /* Next requested ITR latency */ + /* Next requested EITR latency */ u8 rx_nextlatency; }; From nobody Sun Oct 20 05:04: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 4XWRFb1N8Jz5ZnB5; Sun, 20 Oct 2024 05:04:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWRFZ4zL8z41Xj; Sun, 20 Oct 2024 05:04:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729400690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PmbzPjhn7t6FrK8Z9veSzc3n0Jrrmglgzvp4/zMKd9Q=; b=wpJfV5CNvwiik6K009TfPWlzAoZYZjqs0BxbWTqZNsLD5/bW0JhBmTqIYIRcpLwPTCZeKy qTXvyulMs7fy1nxfD78HIgHp/ncsLqxRUeI6B4+Mr24PQJIXljR/Xmgnl0sMsheT9puRyl aHZ+yU7uBfGAtoar9SQnvv7OhmrkpHsja89hheHFNNfeo1pZ41pbC0HUR66RmK8XrDIEO9 OPmKuheNK/hj+0AnfVNhsiICh+a2LDc8uu3OfVBFh9cN7eE48MdweaQtaBUpxXjBZgEzrf 51XxcekYIKRfI1450s1rutW9tXwCwMhV7b07S2bgpacT00mP7JfCmAzZURdOPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729400690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PmbzPjhn7t6FrK8Z9veSzc3n0Jrrmglgzvp4/zMKd9Q=; b=k97YHQAdhk6WJEf/iTP0PQAKB30/p3wvAB18ClO7gr1SGEF5tY565+mMF7gefEE6nSpZBS f3XAtgZP18cLA0/2NihX9zOctcgn/9ohRToFe9uNYpzwZeGJ7r7lCpX5i6k42rTQ+So6PO W2ytt29kEI6+EQmWj8EGqll0fUE/3cqKfay+KFoRJYuMpYiZpKLzeDpgh9riF2JjAyuRO8 Cn0y0d0E+FcHZcfR2eXd0P/mwfmMAmCzD4xjzafQyfpZjJdFWM1lur48xxwSHKR07pFTNC 0aBiKSFNTUpOwWMi17i/fUdwoe+vEWLn+hLAs1pZqwRpc+FQOfxol/Re16vFTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729400690; a=rsa-sha256; cv=none; b=MfUd5S5+QqThbYGa5AXjIuz5z2nF4Zy5LT8h5sxFm+BEzQMjwIjwzk5VkLkmr4JRyrjyoF RsYv1yRsRir5ZdKF7LGRz8WygXJDVDE/GMAdJ6doDLZ35YcFZXTWi6JeKN9GdtPTBMbYZV 6rxOufqdg6SfMs8nnFwF78cCmQJrqxEd8EQu14M9WQ8Jw1CQ8T2NDhOIiSEhf9lvNif6B0 +/32782PtVrWFpTcTx3P43TFbpuSvKUQj7wnc2NZmgfsWRx3bg+gpfVrRnxH1P4oqu2IeV nqf9L+AlbOd0lJwhPsDICjRqIY2lg5boT6iDlz6agKc8YKx3P0JbNDJ8y1602A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWRFZ4XkFznCs; Sun, 20 Oct 2024 05:04:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K54oMC063123; Sun, 20 Oct 2024 05:04:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K54oM7063120; Sun, 20 Oct 2024 05:04:50 GMT (envelope-from git) Date: Sun, 20 Oct 2024 05:04:50 GMT Message-Id: <202410200504.49K54oM7063120@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 2a16654933ef - stable/14 - igc: Want AIM at 2.5G 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2a16654933ef35a00abab754ea82dad8f4bc94e7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2a16654933ef35a00abab754ea82dad8f4bc94e7 commit 2a16654933ef35a00abab754ea82dad8f4bc94e7 Author: Kevin Bowling AuthorDate: 2024-10-13 06:09:52 +0000 Commit: Kevin Bowling CommitDate: 2024-10-20 05:04:31 +0000 igc: Want AIM at 2.5G This should have been commited with bc9402a, need to account for link_speed of 2500 as well on igc. Sponsored by: Rubicon Communications, LLC ("Netgate") Sponsored by: BBOX.io (cherry picked from commit 669d26e5764f612cc60a4a61cdcf22ae46ddd360) --- sys/dev/igc/if_igc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index c4f5e82ff8c8..d964fbe4cf91 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -866,7 +866,7 @@ igc_neweitr(struct igc_adapter *sc, struct igc_rx_queue *que, nextlatency = rxr->rx_nextlatency; /* Use half default (4K) ITR if sub-gig */ - if (sc->link_speed != 1000) { + if (sc->link_speed < 1000) { neweitr = IGC_INTS_4K; goto igc_set_next_eitr; } From nobody Sun Oct 20 05: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 4XWRKv6py3z5Zndp; Sun, 20 Oct 2024 05: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWRKv6WXRz421y; Sun, 20 Oct 2024 05: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=1729400915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nzfOAl9QXMIR5UMKuzCAQkTwt+0+WIMfn5VAbpF/58c=; b=CDsB/8oPF1194gzaivW3VdkYMTcN1z4zk9YN2UB6Zb2wWfQO1hKMrka5w4QbUzF1JDWkzb pQozXcWxQQpk0bD+SgeTtqvEckip6ZV6j9WPM0ucvxq27fXhhqt4CiB27PPy9jvnPZk6po 7l92G+iUIEnD6mq7JndkDpbKpJNZfJP55VaeVnm2eLozsynQTy8JbKaw9m/nOiIa2vbUDH PsjGMIvcikAQGmUO8nXLikdEpbrkaowxZL2OWArxhKE6N5wbD82Wh24FF1dlBTOgbrWjEc 42c+O3FFQmq16jtfZrL6rH9K85qMtRpc6roWp4xLf/W+Le16N1WuppnqU3yg9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729400915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nzfOAl9QXMIR5UMKuzCAQkTwt+0+WIMfn5VAbpF/58c=; b=jRY2UIS3VT9V7O2waJzpMIrj6z2HXjBfUx5A3gPoHHYcZnB8fmTXBjMJxOHROHhuwvx6b7 mjmNpPKVjut1Tc+BOY3o4QNDfYBLaulIjRDZl5OAOGb97LDJBuc5bl0udqGLM7BBnlPwO4 KkWsmuCEbQBWdRpRFdCQb/94wjxzB2QIVA3+7w1XVMr3iVKlGXqMG+yJT5KJs52msdDxoO Afk/Wemft2RuFT/MhkBI8FmzaVyB+BQSzDJQQ9KSnxeOxXVLyIUc+rhWdk4sbpAgFkxsXx sKufCu/gR3/mzZ1vrQ8Le043mbYYG+X4K7iyiT1PcPmnyqBjn62wUsb/hjw/rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729400915; a=rsa-sha256; cv=none; b=QhxrWADl/t4JnsE9uHrP0y4uDzmTwJo0nLVts6ys1mccgspO/zG+ckJXiMYHoNcJnvn5+z CLSlcaDKH2WsjjZbS9FVIJGrQUenSq2KybW7+Bk7FcSpF/1gz3ZuuYVI47NyOq04OwjNsi /+qV/P6cUu9qHbprohmYrMaxAoAIctL/zfmHVYLlh4kYJdnuHNDR6p9Eqv5r1Ex5jv1t6T 1WDM6Y+9A0NZAYRsy7QbogByuLSymq9YiMu0RUQYEZgzVXUPIH22TRRO0upR6h2hF+IbKb LXGC3823AFLcVl75D9BOHRLtUzr0xFx+PtLtrRsNBQ5uz6bYLzrnsfyqUsj2Fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWRKv658Sznqd; Sun, 20 Oct 2024 05:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K58Zgc064315; Sun, 20 Oct 2024 05:08:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K58ZeX064312; Sun, 20 Oct 2024 05:08:35 GMT (envelope-from git) Date: Sun, 20 Oct 2024 05:08:35 GMT Message-Id: <202410200508.49K58ZeX064312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: eaa616f02193 - stable/13 - igc: Add AIM 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eaa616f0219351ab8b5ca0b07ae656b44dd5aed6 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=eaa616f0219351ab8b5ca0b07ae656b44dd5aed6 commit eaa616f0219351ab8b5ca0b07ae656b44dd5aed6 Author: Kevin Bowling AuthorDate: 2024-10-11 01:20:13 +0000 Commit: Kevin Bowling CommitDate: 2024-10-20 05:07:44 +0000 igc: Add AIM igc is derived from igb and has never had an AIM implementation. The same algorithm from e1000 is appropriate here. Upon more detailed study of the Linux driver which has a newer AIM implementation, it finally became clear to me this is actually a holdoff timer and not an interrupt limit as it is conventionally (statically) programmed and displayed as an interrupt rate. The data sheets also make this somewhat clear. Thus, AIM accomplishes two beneficial things for a wide variety of workloads[1]: 1. At low throughput/packet rates, it will significantly lower latency (by counter-intuitively "increasing" the interrupt rate.. better thought of as decreasing the holdoff timer because you will modulate down before coming anywhere near these interrupt rates). 2. At bulk data rates, it is tuned to achieve a lower interrupt rate (by increasing the holdoff timer) than the current static 8000/s. This decreases processing overhead and yields more headroom for other work such as packet filters or userland. For a single NIC this might be worth a few sys% on common CPUs, but may be meaningful when multiplied such as if_lagg, if_bridge and forwarding setups. The AIM algorithm was re-introduced from the older igb or out of tree driver, and then modernized with permission to use Intel code from other drivers. [1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/gbe-controllers-interrupt-moderation-appl-note.pdf Relnotes: yes Sponsored by: Rubicon Communications, LLC ("Netgate") Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47053 (cherry picked from commit bc9402abdd11630ced33cbecb79b0d72f203f08a) --- sys/dev/igc/if_igc.c | 232 +++++++++++++++++++++++++++++++++++++++++++++++-- sys/dev/igc/if_igc.h | 27 +++++- sys/dev/igc/igc_txrx.c | 4 + 3 files changed, 256 insertions(+), 7 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 1f06baee02e4..b55c1ddd26b0 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -1,9 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * + * Copyright (c) 2001-2024, Intel Corporation * Copyright (c) 2016 Nicole Graziano - * All rights reserved. - * Copyright (c) 2021 Rubicon Communications, LLC (Netgate) + * Copyright (c) 2021-2024 Rubicon Communications, LLC (Netgate) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -125,6 +125,8 @@ static int igc_sysctl_debug_info(SYSCTL_HANDLER_ARGS); static int igc_get_rs(SYSCTL_HANDLER_ARGS); static void igc_print_debug_info(struct igc_adapter *); static int igc_is_valid_ether_addr(u8 *); +static void igc_neweitr(struct igc_adapter *, struct igc_rx_queue *, + struct tx_ring *, struct rx_ring *); /* Management and WOL Support */ static void igc_get_hw_control(struct igc_adapter *); static void igc_release_hw_control(struct igc_adapter *); @@ -239,10 +241,19 @@ static int igc_eee_setting = 1; SYSCTL_INT(_hw_igc, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &igc_eee_setting, 0, "Enable Energy Efficient Ethernet"); +/* + * AIM: Adaptive Interrupt Moderation + * which means that the interrupt rate is varied over time based on the + * traffic for that interrupt vector + */ +static int igc_enable_aim = 1; +SYSCTL_INT(_hw_igc, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &igc_enable_aim, + 0, "Enable adaptive interrupt moderation (1=normal, 2=lowlatency)"); + /* ** Tuneable Interrupt rate */ -static int igc_max_interrupt_rate = 8000; +static int igc_max_interrupt_rate = IGC_INTS_DEFAULT; SYSCTL_INT(_hw_igc, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &igc_max_interrupt_rate, 0, "Maximum interrupts per second"); @@ -445,6 +456,13 @@ igc_if_attach_pre(if_ctx_t ctx) OID_AUTO, "nvm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, igc_sysctl_nvm_info, "I", "NVM Information"); + adapter->enable_aim = igc_enable_aim; + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "enable_aim", CTLFLAG_RW, + &adapter->enable_aim, 0, + "Interrupt Moderation (1=normal, 2=lowlatency)"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, @@ -817,6 +835,142 @@ igc_if_init(if_ctx_t ctx) igc_set_eee_i225(&adapter->hw, true, true, true); } +enum eitr_latency_target { + eitr_latency_disabled = 0, + eitr_latency_lowest = 1, + eitr_latency_low = 2, + eitr_latency_bulk = 3 +}; +/********************************************************************* + * + * Helper to calculate next EITR value for AIM + * + *********************************************************************/ +static void +igc_neweitr(struct igc_adapter *sc, struct igc_rx_queue *que, + struct tx_ring *txr, struct rx_ring *rxr) +{ + struct igc_hw *hw = &sc->hw; + u32 neweitr; + u32 bytes; + u32 bytes_packets; + u32 packets; + u8 nextlatency; + + /* Idle, do nothing */ + if ((txr->tx_bytes == 0) && (rxr->rx_bytes == 0)) + return; + + neweitr = 0; + + if (sc->enable_aim) { + nextlatency = rxr->rx_nextlatency; + + /* Use half default (4K) ITR if sub-gig */ + if (sc->link_speed != 1000) { + neweitr = IGC_INTS_4K; + goto igc_set_next_eitr; + } + /* Want at least enough packet buffer for two frames to AIM */ + if (sc->shared->isc_max_frame_size * 2 > (sc->pba << 10)) { + neweitr = igc_max_interrupt_rate; + sc->enable_aim = 0; + goto igc_set_next_eitr; + } + + /* Get the largest values from the associated tx and rx ring */ + if (txr->tx_bytes && txr->tx_packets) { + bytes = txr->tx_bytes; + bytes_packets = txr->tx_bytes/txr->tx_packets; + packets = txr->tx_packets; + } + if (rxr->rx_bytes && rxr->rx_packets) { + bytes = max(bytes, rxr->rx_bytes); + bytes_packets = max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); + packets = max(packets, rxr->rx_packets); + } + + /* Latency state machine */ + switch (nextlatency) { + case eitr_latency_disabled: /* Bootstrapping */ + nextlatency = eitr_latency_low; + break; + case eitr_latency_lowest: /* 70k ints/s */ + /* TSO and jumbo frames */ + if (bytes_packets > 8000) + nextlatency = eitr_latency_bulk; + else if ((packets < 5) && (bytes > 512)) + nextlatency = eitr_latency_low; + break; + case eitr_latency_low: /* 20k ints/s */ + if (bytes > 10000) { + /* Handle TSO */ + if (bytes_packets > 8000) + nextlatency = eitr_latency_bulk; + else if ((packets < 10) || (bytes_packets > 1200)) + nextlatency = eitr_latency_bulk; + else if (packets > 35) + nextlatency = eitr_latency_lowest; + } else if (bytes_packets > 2000) { + nextlatency = eitr_latency_bulk; + } else if (packets < 3 && bytes < 512) { + nextlatency = eitr_latency_lowest; + } + break; + case eitr_latency_bulk: /* 4k ints/s */ + if (bytes > 25000) { + if (packets > 35) + nextlatency = eitr_latency_low; + } else if (bytes < 1500) + nextlatency = eitr_latency_low; + break; + default: + nextlatency = eitr_latency_low; + device_printf(sc->dev, "Unexpected neweitr transition %d\n", + nextlatency); + break; + } + + /* Trim itr_latency_lowest for default AIM setting */ + if (sc->enable_aim == 1 && nextlatency == eitr_latency_lowest) + nextlatency = eitr_latency_low; + + /* Request new latency */ + rxr->rx_nextlatency = nextlatency; + } else { + /* We may have toggled to AIM disabled */ + nextlatency = eitr_latency_disabled; + rxr->rx_nextlatency = nextlatency; + } + + /* ITR state machine */ + switch(nextlatency) { + case eitr_latency_lowest: + neweitr = IGC_INTS_70K; + break; + case eitr_latency_low: + neweitr = IGC_INTS_20K; + break; + case eitr_latency_bulk: + neweitr = IGC_INTS_4K; + break; + case eitr_latency_disabled: + default: + neweitr = igc_max_interrupt_rate; + break; + } + +igc_set_next_eitr: + neweitr = IGC_INTS_TO_EITR(neweitr); + + neweitr |= IGC_EITR_CNT_IGNR; + + if (neweitr != que->eitr_setting) { + que->eitr_setting = neweitr; + IGC_WRITE_REG(hw, IGC_EITR(que->msix), que->eitr_setting); + } +} + /********************************************************************* * * Fast Legacy/MSI Combined Interrupt Service routine @@ -826,10 +980,14 @@ int igc_intr(void *arg) { struct igc_adapter *adapter = arg; + struct igc_hw *hw = &adapter->hw; + struct igc_rx_queue *que = &adapter->rx_queues[0]; + struct tx_ring *txr = &adapter->tx_queues[0].txr; + struct rx_ring *rxr = &que->rxr; if_ctx_t ctx = adapter->ctx; u32 reg_icr; - reg_icr = IGC_READ_REG(&adapter->hw, IGC_ICR); + reg_icr = IGC_READ_REG(hw, IGC_ICR); /* Hot eject? */ if (reg_icr == 0xffffffff) @@ -857,6 +1015,14 @@ igc_intr(void *arg) if (reg_icr & IGC_ICR_RXO) adapter->rx_overruns++; + igc_neweitr(adapter, que, txr, rxr); + + /* Reset state */ + txr->tx_bytes = 0; + txr->tx_packets = 0; + rxr->rx_bytes = 0; + rxr->rx_packets = 0; + return (FILTER_SCHEDULE_THREAD); } @@ -889,9 +1055,20 @@ static int igc_msix_que(void *arg) { struct igc_rx_queue *que = arg; + struct igc_adapter *sc = que->adapter; + struct tx_ring *txr = &sc->tx_queues[que->msix].txr; + struct rx_ring *rxr = &que->rxr; ++que->irqs; + igc_neweitr(sc, que, txr, rxr); + + /* Reset state */ + txr->tx_bytes = 0; + txr->tx_packets = 0; + rxr->rx_bytes = 0; + rxr->rx_packets = 0; + return (FILTER_SCHEDULE_THREAD); } @@ -1396,7 +1573,7 @@ igc_configure_queues(struct igc_adapter *adapter) /* Set the starting interrupt rate */ if (igc_max_interrupt_rate > 0) - newitr = (4000000 / igc_max_interrupt_rate) & 0x7FFC; + newitr = IGC_INTS_TO_EITR(igc_max_interrupt_rate); newitr |= IGC_EITR_CNT_IGNR; @@ -1609,6 +1786,9 @@ igc_reset(if_ctx_t ctx) /* Setup DMA Coalescing */ igc_init_dmac(adapter, pba); + /* Save the final PBA off if it needs to be used elsewhere i.e. AIM */ + adapter->pba = pba; + IGC_WRITE_REG(hw, IGC_VET, ETHERTYPE_VLAN); igc_get_phy_info(hw); igc_check_for_link(hw); @@ -2381,6 +2561,40 @@ igc_sysctl_reg_handler(SYSCTL_HANDLER_ARGS) return (sysctl_handle_int(oidp, &val, 0, req)); } +/* Per queue holdoff interrupt rate handler */ +static int +igc_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) +{ + struct igc_rx_queue *rque; + struct igc_tx_queue *tque; + struct igc_hw *hw; + int error; + u32 reg, usec, rate; + + bool tx = oidp->oid_arg2; + + if (tx) { + tque = oidp->oid_arg1; + hw = &tque->adapter->hw; + reg = IGC_READ_REG(hw, IGC_EITR(tque->me)); + } else { + rque = oidp->oid_arg1; + hw = &rque->adapter->hw; + reg = IGC_READ_REG(hw, IGC_EITR(rque->msix)); + } + + usec = (reg & IGC_QVECTOR_MASK); + if (usec > 0) + rate = IGC_INTS_TO_EITR(usec); + else + rate = 0; + + error = sysctl_handle_int(oidp, &rate, 0, req); + if (error || !req->newptr) + return error; + return 0; +} + /* * Add sysctl variables, one per statistic, to the system. */ @@ -2437,6 +2651,10 @@ igc_add_hw_stats(struct igc_adapter *adapter) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "TX Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", + CTLTYPE_UINT | CTLFLAG_RD, tx_que, + true, igc_sysctl_interrupt_rate_handler, "IU", + "Interrupt Rate"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, IGC_TDH(txr->me), igc_sysctl_reg_handler, "IU", @@ -2457,6 +2675,10 @@ igc_add_hw_stats(struct igc_adapter *adapter) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "RX Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", + CTLTYPE_UINT | CTLFLAG_RD, rx_que, + false, igc_sysctl_interrupt_rate_handler, "IU", + "Interrupt Rate"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, IGC_RDH(rxr->me), igc_sysctl_reg_handler, "IU", diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index ccebe04ff185..c0822f21685e 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -1,8 +1,8 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * + * Copyright (c) 2001-2024, Intel Corporation * Copyright (c) 2016 Nicole Graziano - * All rights reserved. * Copyright (c) 2021 Rubicon Communications, LLC (Netgate) * * Redistribution and use in source and binary forms, with or without @@ -163,6 +163,17 @@ #define IGC_TX_PTHRESH 8 #define IGC_TX_HTHRESH 1 +/* Define the interrupt rates and EITR helpers */ +#define IGC_INTS_4K 4000 +#define IGC_INTS_20K 20000 +#define IGC_INTS_70K 70000 +#define IGC_INTS_DEFAULT 8000 +#define IGC_EITR_DIVIDEND 1000000 +#define IGC_EITR_SHIFT 2 +#define IGC_QVECTOR_MASK 0x7FFC +#define IGC_INTS_TO_EITR(i) (((IGC_EITR_DIVIDEND/i) & IGC_QVECTOR_MASK) << \ + IGC_EITR_SHIFT) + /* * TDBA/RDBA should be aligned on 16 byte boundary. But TDLEN/RDLEN should be * multiple of 128 bytes. So we align TDBA/RDBA on 128 byte boundary. This will @@ -218,7 +229,12 @@ struct tx_ring { /* Interrupt resources */ void *tag; struct resource *res; - unsigned long tx_irq; + + /* Soft stats */ + unsigned long tx_irq; + unsigned long tx_packets; + unsigned long tx_bytes; + /* Saved csum offloading context information */ int csum_flags; @@ -253,6 +269,9 @@ struct rx_ring { unsigned long rx_discarded; unsigned long rx_packets; unsigned long rx_bytes; + + /* Next requested ITR latency */ + u8 rx_nextlatency; }; struct igc_tx_queue { @@ -268,6 +287,7 @@ struct igc_rx_queue { u32 me; u32 msix; u32 eims; + u32 eitr_setting; struct rx_ring rxr; u64 irqs; struct if_irq que_irq; @@ -315,6 +335,8 @@ struct igc_adapter { u32 rx_mbuf_sz; + int enable_aim; + /* Management and WOL features */ u32 wol; @@ -328,6 +350,7 @@ struct igc_adapter { u16 link_duplex; u32 smartspeed; u32 dmac; + u32 pba; int link_mask; u64 que_mask; diff --git a/sys/dev/igc/igc_txrx.c b/sys/dev/igc/igc_txrx.c index 7601513a709e..cd7175f45f34 100644 --- a/sys/dev/igc/igc_txrx.c +++ b/sys/dev/igc/igc_txrx.c @@ -316,6 +316,10 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi) txd->read.cmd_type_len |= htole32(IGC_ADVTXD_DCMD_EOP | txd_flags); pi->ipi_new_pidx = i; + /* Sent data accounting for AIM */ + txr->tx_bytes += pi->ipi_len; + ++txr->tx_packets; + return (0); } From nobody Sun Oct 20 05:08: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 4XWRKx1VQrz5ZnDp; Sun, 20 Oct 2024 05: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWRKx0Z8Mz42CJ; Sun, 20 Oct 2024 05: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=1729400917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VL7qXwRbqeBRB61YM4FOKrsDEDJlnNQVn5pIx0bScFA=; b=UJeRE8cZU2mzBmkqLSiawhuYiNZD+NzzPG1YFnatagi8HQkswGG9ERhBPx9i9P4B4j0WlM L02OCl2pO8yCFibFun38lkJGWP2wgeCzh8GYf9dTB9Q8YUXOjdu+MNW/kUe5RXiTcD5dec Ub+sJnLzT2/ohdXtqXeEaReQzgTPw43NXmjzYuaEYNpSto46QJYJeqSxgpAnOK9XhraPfa B8gX1aWIoiEwPiDVuuoq14KdoUln3cMbN8vdsHlaQt2FmuCLoUQDfB3KtI/KFGC6k5buJa pOte7ahAMeMSX+/QvP+P/eyOYGycTBZK/xQlN9bgh8Mt7zz6x8rydR85glL52A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729400917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VL7qXwRbqeBRB61YM4FOKrsDEDJlnNQVn5pIx0bScFA=; b=RpncDtnWNME50zng2o9Ccayw7hCu2Cl8yYW2IRWAg3/4DIxVT/Y6uzlJgefoSxv7VwvCWB 9nYz6anSWLCy+FgNFGGXBv7vKxZBtjktOPg25NmvFJ5uRr+x7BZViSLTcF3OPgLvNBNLVd ZPxSb70wABN5ANW2ApD207N74VvsTc7mmKmOc0ijcWxIgTU81u8edRDvnB3DPWWZ1Wwkco a2QDhdrWT9zXs2+K289FmJ88KnNM6kigy+pf6pMFHGbSv4DQR1/tX25FylFRvjQLO54dgq L0vumcNbnVvv+gKp9fjHGsdto1acjCes+AGFdoQQ0g6ZZZrP/NCuvTQVQjgIAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729400917; a=rsa-sha256; cv=none; b=GCIbvZYqttbPHRvIPgCBYjOti85MiBjiFSsGIuL7hh8UfVuk3l6tckF0XIEwe/wMX4tcO9 mszeyIQUBQZfKzD49gXfGws4KsF2wqaVREsuQJvNtx/A8Oss9jRSjlgeo7WoIODTrXePWE t1CE6+PduAnq0sBpr1Z51r+MLQN029wgQmubrbdMMwbod6Vaxyc7lHdCs9tSkfGD+m/gdL 57coViMC3AaI3nqx+8Yd3r8RGhDB9ydLouH2yP+5BHjYChHOLQ05Jt/mve/abcgNruI1Bh p2piMChhWUeiUJrLbzAS+SqsAM4x+eSOlB3ctZ5o9VpQBGLzWWLOl0re2McqVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWRKw72k2znqf; Sun, 20 Oct 2024 05:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K58aQ6064366; Sun, 20 Oct 2024 05:08:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K58acn064363; Sun, 20 Oct 2024 05:08:36 GMT (envelope-from git) Date: Sun, 20 Oct 2024 05:08:36 GMT Message-Id: <202410200508.49K58acn064363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: bc33b98dcbf9 - stable/13 - igc: Improve a comment and update copyright dates 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bc33b98dcbf92edb29863d3c44549dcd9d95e307 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=bc33b98dcbf92edb29863d3c44549dcd9d95e307 commit bc33b98dcbf92edb29863d3c44549dcd9d95e307 Author: Kevin Bowling AuthorDate: 2024-10-12 07:53:57 +0000 Commit: Kevin Bowling CommitDate: 2024-10-20 05:08:05 +0000 igc: Improve a comment and update copyright dates (cherry picked from commit 516d92304a7fa9b869c934436aa3e1c5202f03c9) --- sys/dev/igc/if_igc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index c0822f21685e..60aaf786d09a 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -3,7 +3,7 @@ * * Copyright (c) 2001-2024, Intel Corporation * Copyright (c) 2016 Nicole Graziano - * Copyright (c) 2021 Rubicon Communications, LLC (Netgate) + * Copyright (c) 2021-2024 Rubicon Communications, LLC (Netgate) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -270,7 +270,7 @@ struct rx_ring { unsigned long rx_packets; unsigned long rx_bytes; - /* Next requested ITR latency */ + /* Next requested EITR latency */ u8 rx_nextlatency; }; From nobody Sun Oct 20 05: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 4XWRKy348Cz5Znch; Sun, 20 Oct 2024 05: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWRKy1QQTz42CX; Sun, 20 Oct 2024 05: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=1729400918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5PvbXUornaMy/J8tdZ9BvWxH/gvymibyaaQgOrt0eak=; b=LqL3G+HAKcUqjZKKHMnBjLX70ewpeb9czC5mVG7303QbfQFrRzYWBVkjg2PPQ0K+DjEFRT G7YfDj6SBDVoSYCX4ZgArxqsM8Zw/hbXBhSgKiG1F6bFW9ePB10cPhC7/tMGWg9XPGxIA/ IMGqOCGKSAt8hfavILY/D3jRwl5BO6bW6cJlAv2Fc1hSIveAKYK7l/yysEA7bxqoe+iI/I 2amWdbwxGda+V4GQrHaDXmYYz/4ZC/P/fi0BlzBnSJm8IcDBZYigLHgZt67Y/YogyJkVQ5 8hZ7zeEJl+IBs9HGDUZldC2Hv8xEkRfGt9AyyPj3vIXDfrN1G90FunrFPXqLhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729400918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5PvbXUornaMy/J8tdZ9BvWxH/gvymibyaaQgOrt0eak=; b=xIxynDZpG6NOTHkIiPjR6TBdqDr9upnRfcEm6/cCt7gFcgyuAg1PbmxKgYmULDLoe4AsbZ is8+ARvX0pXBqKtHkSh2c1w2/FQonXmqpOJvkOujn30PTjecXQQ0yreCHAiEWEOaa1ZU93 NUCsbu/vcMeeU+T0NhM/tj4dWNxDe1xMjqNHM9wTQotbgdEicxnspxqE5eAE0YT0bv8RxN dinJIjk6vow/y5DuMBXu1WEitcIeA/PAm39Q65PccFK5Z0wfKxwFCOVR9YkeVad3kAYDSF +hGcsuCEMl+GXzFawZ9OWrh9vpV50gFvoCaMMAtSJvsFfXBAiMltWahO4rNVbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729400918; a=rsa-sha256; cv=none; b=ovnai2CbEcAhGXl27MrkMDQ1KiIqbYdGkC2ojKYXTrNrjQ8ZsutoQIgOKepnKWaU3U5U3j jaN0BG8jmeudxy2a/JWYl6RAJmKhImYj+E0+RMVyMOBM/UMuSyLnBBIqYa7mmEforXLLUr XYJ0XBv4vRX1CI4QlcBAQ8cCaSTjrkiAmcqD0DcLtwbeanKtzQQy8RElZCptc+Qc3+dO2Y /PnN7utRgSVu97P07tg7YZKSgMepKunuh6AFPy8LhIhWWJx3r8606VMeECg0AVw+uEt4Cx /LhmcW9qWiETTXjAkPsWOCx6H8NI8ee0GRQ5yZ1cyVTOoSDNNGA5uHhuC5mzmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWRKy0fs5znyT; Sun, 20 Oct 2024 05:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K58cm8064408; Sun, 20 Oct 2024 05:08:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K58csv064405; Sun, 20 Oct 2024 05:08:38 GMT (envelope-from git) Date: Sun, 20 Oct 2024 05:08:38 GMT Message-Id: <202410200508.49K58csv064405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 6b58c7c3aafb - stable/13 - igc: Want AIM at 2.5G 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6b58c7c3aafbde4176eea519f078e030ffd2596e Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6b58c7c3aafbde4176eea519f078e030ffd2596e commit 6b58c7c3aafbde4176eea519f078e030ffd2596e Author: Kevin Bowling AuthorDate: 2024-10-13 06:09:52 +0000 Commit: Kevin Bowling CommitDate: 2024-10-20 05:08:18 +0000 igc: Want AIM at 2.5G This should have been commited with bc9402a, need to account for link_speed of 2500 as well on igc. Sponsored by: Rubicon Communications, LLC ("Netgate") Sponsored by: BBOX.io (cherry picked from commit 669d26e5764f612cc60a4a61cdcf22ae46ddd360) --- sys/dev/igc/if_igc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index b55c1ddd26b0..7d95c2909b7a 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -867,7 +867,7 @@ igc_neweitr(struct igc_adapter *sc, struct igc_rx_queue *que, nextlatency = rxr->rx_nextlatency; /* Use half default (4K) ITR if sub-gig */ - if (sc->link_speed != 1000) { + if (sc->link_speed < 1000) { neweitr = IGC_INTS_4K; goto igc_set_next_eitr; } From nobody Sun Oct 20 09:30:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XWY8X5VTvz5b2b9; Sun, 20 Oct 2024 09:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWY8X4mHrz4M6Q; Sun, 20 Oct 2024 09:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729416652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ArZWQEpbQBQXUK4QBSnDPWF4H8+RTbzAHgSA/xLjXfk=; b=QUaaJm0IJQC8AFny9dQukqKzXcvv4C18IwhWAs1S+xFZ/S3eQ/WF1CpXTcvl5RzHsyY0bb GsLwoQRMQKXfDUMPA/yN5XJLPuFUzsxEQnHHFA//5ofSQDjOvuG7m30lfDRieg7QMI7Uxv 5NnB8w+crfQfQEIFBmUiWFDmV+oHtS0Ahp0y3GqPgHZNRUMrCNlWNkX0pEeKeF2Uw4r15p Z9O7sX3HS8oeh6Jr9bZNjaIP0bdyTRLRh0E47ZV9WT7rqkB1G93lEapRK0v9pa31V508mE hziGHHO+5lBuAhoK89Am8c0j3VfGiaJNnM+uuw2NkeLK1gbml9QVy35B01uFTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729416652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ArZWQEpbQBQXUK4QBSnDPWF4H8+RTbzAHgSA/xLjXfk=; b=lCiWR40r0QeR3CmJp+ibLSCVP6G/k4yTtVq+daugwJAnu0R53dhkofw/V7hriARODRFEFy kKHEYtDKlHyyeZr+2wGLzO6s0v6yXZKrEJW/02l8ppvEM8hKTgyS33sV3PmOlmTekB2tOl LRUz1pjWkHWdOBk0hHOiJEUR4Abn8Pw6f+MBawUoFNoSTI8utcGsZ6Vy5k279bJppAozpg 6E1wfAUkMirjo2KUpUTyEGIcYRxR5y0uWLsOvJwjrbx+XA1nxGeOXM5088l4UWKuZDpeej ehetQSGPMFmQN6tekoq6KIVHh972AHNKEAlLishzLG7iHPFMX7VQoCKliouINg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729416652; a=rsa-sha256; cv=none; b=Yv1gL9w0qf3hyzaTCVbuRh91uHgFkBTh2qENPljYOXIKauAubdzeTlD1KbORombFV/nziR GXpfZ+LYMKUV2wwpY5fd9HnDckt8fs9/XdU0aJ6xebU+oAY4E3/IFwsiHeYngnrQ04MFHW waMtFI+4bMFUEGVBbvUxomFx3hSF1rseo3EqD1dEdHZyCCXqEZ/yGUTqub1h11uAHBTapZ b95xKJRaZBV3J1l7TDr7KmaRTCMEpBMNVVD4I/c4dAPicFIjorsZAi+2LkI1XDWkP2PX3v 2dZCoHb2rt/pxcB86UIk+8BQCKzminlBVeCsgoVgm5CLi8Yc7VMI3nGgUPTbYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWY8X4M8bzw3M; Sun, 20 Oct 2024 09:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49K9Uq0G053055; Sun, 20 Oct 2024 09:30:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49K9Uq5p053052; Sun, 20 Oct 2024 09:30:52 GMT (envelope-from git) Date: Sun, 20 Oct 2024 09:30:52 GMT Message-Id: <202410200930.49K9Uq5p053052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: bd66c1b43e33 - main - libarchive: merge from vendor branch 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd66c1b43e33540205dbc1187c2f2a15c58b57ba Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=bd66c1b43e33540205dbc1187c2f2a15c58b57ba commit bd66c1b43e33540205dbc1187c2f2a15c58b57ba Merge: 5ca8c28cd8c7 eff4ff4791c8 Author: Martin Matuska AuthorDate: 2024-10-20 08:22:09 +0000 Commit: Martin Matuska CommitDate: 2024-10-20 08:24:02 +0000 libarchive: merge from vendor branch Libarchive 3.7.7 Security fixes: #2158 rpm: calculate huge header sizes correctly #2160 util: fix out of boundary access in mktemp functions #2168 uu: stop processing if lines are too long #2174 lzop: prevent integer overflow #2172 rar4: protect copy_from_lzss_window_to_unp() (CVE-2024-20696) #2175 unzip: unify EOF handling #2179 rar4: fix out of boundary access with large files #2203 rar4: fix OOB access with unicode filenames #2210 rar4: add boundary checks to rgb filter #2248 rar4: fix OOB in delta filter #2249 rar4: fix OOB in audio filter #2256 fix multiple vulnerabilities identified by SAST #2258 cpio: ignore out-of-range gid/uid/size/ino and harden AFIO parsing #2265 rar5: clear 'data ready' cache on window buffer reallocs #2269 rar4: fix CVE-2024-26256 (CVE-2024-26256) #2330 iso: be more cautious about parsing ISO-9660 timestamps #2343 tar: clean up linkpath between entries #2364 tar: don't crash on truncated tar archives #2366 gzip: prevent a hang when processing a malformed gzip inside a gzip #2377 tar: fix two leaks in tar header parsing Important bugfixes: #2096 rar5: report encrypted entries #2150 xar: fix another infinite loop and expat error handling #2173 shar: check strdup return value #2161 lha: fix integer truncation on 32-bit systems #2338 tar: fix memory leaks when processing symlinks or parsing pax headers #2245 7zip: fix issue when skipping first file in 7zip archive that is a multiple of 65536 bytes #2252 7-zip: read/write symlink paths as UTF-8 #2259 rar5: don't try to read rediculously long names #2290 ar: fix archive entries having no type #2360 tar: fix truncation of entry pathnames in specific archives CVE: CVE-2024-20696, CVE-2024-26256 PR: 282047 (exp-run) MFC after: 1 week contrib/libarchive/NEWS | 6 + contrib/libarchive/cat/bsdcat.1 | 26 +- contrib/libarchive/cat/bsdcat.c | 22 +- contrib/libarchive/cat/bsdcat.h | 22 +- contrib/libarchive/cat/bsdcat_platform.h | 24 +- contrib/libarchive/cat/cmdline.c | 22 +- contrib/libarchive/cat/test/test.h | 22 +- contrib/libarchive/cat/test/test_0.c | 22 +- contrib/libarchive/cat/test/test_empty_gz.c | 22 +- contrib/libarchive/cat/test/test_empty_lz4.c | 22 +- contrib/libarchive/cat/test/test_empty_xz.c | 22 +- contrib/libarchive/cat/test/test_empty_zstd.c | 22 +- contrib/libarchive/cat/test/test_error.c | 22 +- contrib/libarchive/cat/test/test_error_mixed.c | 22 +- contrib/libarchive/cat/test/test_expand_Z.c | 22 +- contrib/libarchive/cat/test/test_expand_bz2.c | 22 +- contrib/libarchive/cat/test/test_expand_gz.c | 22 +- contrib/libarchive/cat/test/test_expand_lz4.c | 22 +- contrib/libarchive/cat/test/test_expand_mixed.c | 22 +- contrib/libarchive/cat/test/test_expand_plain.c | 22 +- contrib/libarchive/cat/test/test_expand_xz.c | 22 +- contrib/libarchive/cat/test/test_expand_zstd.c | 22 +- contrib/libarchive/cat/test/test_help.c | 22 +- contrib/libarchive/cat/test/test_stdin.c | 22 +- contrib/libarchive/cat/test/test_version.c | 22 +- contrib/libarchive/cpio/bsdcpio.1 | 24 +- contrib/libarchive/cpio/cmdline.c | 76 +- contrib/libarchive/cpio/cpio.c | 70 +- contrib/libarchive/cpio/cpio.h | 30 +- contrib/libarchive/cpio/cpio_platform.h | 22 +- contrib/libarchive/cpio/test/test.h | 22 +- contrib/libarchive/cpio/test/test_0.c | 22 +- contrib/libarchive/cpio/test/test_basic.c | 22 +- contrib/libarchive/cpio/test/test_cmdline.c | 22 +- contrib/libarchive/cpio/test/test_extract_cpio_Z.c | 22 +- .../cpio/test/test_extract_cpio_absolute_paths.c | 53 + .../libarchive/cpio/test/test_extract_cpio_bz2.c | 22 +- .../libarchive/cpio/test/test_extract_cpio_grz.c | 22 +- .../libarchive/cpio/test/test_extract_cpio_gz.c | 22 +- .../libarchive/cpio/test/test_extract_cpio_lrz.c | 22 +- .../libarchive/cpio/test/test_extract_cpio_lz.c | 22 +- .../libarchive/cpio/test/test_extract_cpio_lz4.c | 22 +- .../libarchive/cpio/test/test_extract_cpio_lzma.c | 22 +- .../libarchive/cpio/test/test_extract_cpio_lzo.c | 22 +- .../libarchive/cpio/test/test_extract_cpio_xz.c | 22 +- .../libarchive/cpio/test/test_extract_cpio_zstd.c | 22 +- contrib/libarchive/cpio/test/test_format_newc.c | 28 +- contrib/libarchive/cpio/test/test_gcpio_compat.c | 22 +- contrib/libarchive/cpio/test/test_missing_file.c | 22 +- contrib/libarchive/cpio/test/test_option_0.c | 22 +- contrib/libarchive/cpio/test/test_option_B_upper.c | 22 +- contrib/libarchive/cpio/test/test_option_C_upper.c | 22 +- contrib/libarchive/cpio/test/test_option_J_upper.c | 22 +- contrib/libarchive/cpio/test/test_option_L_upper.c | 22 +- contrib/libarchive/cpio/test/test_option_Z_upper.c | 22 +- contrib/libarchive/cpio/test/test_option_a.c | 22 +- .../libarchive/cpio/test/test_option_b64encode.c | 22 +- contrib/libarchive/cpio/test/test_option_c.c | 30 +- contrib/libarchive/cpio/test/test_option_d.c | 24 +- contrib/libarchive/cpio/test/test_option_f.c | 22 +- contrib/libarchive/cpio/test/test_option_grzip.c | 22 +- contrib/libarchive/cpio/test/test_option_help.c | 22 +- contrib/libarchive/cpio/test/test_option_l.c | 22 +- contrib/libarchive/cpio/test/test_option_lrzip.c | 22 +- contrib/libarchive/cpio/test/test_option_lz4.c | 22 +- contrib/libarchive/cpio/test/test_option_lzma.c | 22 +- contrib/libarchive/cpio/test/test_option_lzop.c | 22 +- contrib/libarchive/cpio/test/test_option_m.c | 22 +- .../libarchive/cpio/test/test_option_passphrase.c | 22 +- contrib/libarchive/cpio/test/test_option_t.c | 29 +- contrib/libarchive/cpio/test/test_option_u.c | 22 +- .../libarchive/cpio/test/test_option_uuencode.c | 22 +- contrib/libarchive/cpio/test/test_option_version.c | 22 +- contrib/libarchive/cpio/test/test_option_xz.c | 22 +- contrib/libarchive/cpio/test/test_option_y.c | 22 +- contrib/libarchive/cpio/test/test_option_z.c | 22 +- contrib/libarchive/cpio/test/test_option_zstd.c | 22 +- contrib/libarchive/cpio/test/test_owner_parse.c | 112 +- .../libarchive/cpio/test/test_passthrough_dotdot.c | 22 +- .../cpio/test/test_passthrough_reverse.c | 22 +- contrib/libarchive/libarchive/archive.h | 4 +- contrib/libarchive/libarchive/archive_acl.c | 71 +- .../libarchive/libarchive/archive_acl_private.h | 2 + contrib/libarchive/libarchive/archive_crc32.h | 5 + contrib/libarchive/libarchive/archive_cryptor.c | 4 +- .../libarchive/archive_cryptor_private.h | 2 +- contrib/libarchive/libarchive/archive_entry.c | 300 ++- contrib/libarchive/libarchive/archive_entry.h | 8 +- .../libarchive/archive_entry_link_resolver.c | 15 + .../libarchive/libarchive/archive_entry_perms.3 | 1 + .../libarchive/libarchive/archive_entry_private.h | 4 +- .../libarchive/libarchive/archive_entry_sparse.c | 2 +- .../libarchive/libarchive/archive_entry_xattr.c | 2 +- contrib/libarchive/libarchive/archive_hmac.c | 2 +- .../libarchive/libarchive/archive_hmac_private.h | 2 +- contrib/libarchive/libarchive/archive_match.c | 2 +- .../libarchive/archive_openssl_evp_private.h | 2 +- .../libarchive/archive_openssl_hmac_private.h | 2 +- contrib/libarchive/libarchive/archive_ppmd7.c | 2 +- contrib/libarchive/libarchive/archive_ppmd8.c | 7 +- contrib/libarchive/libarchive/archive_private.h | 6 +- contrib/libarchive/libarchive/archive_read.c | 8 +- .../libarchive/archive_read_append_filter.c | 8 +- .../libarchive/archive_read_disk_entry_from_file.c | 1 + .../libarchive/archive_read_disk_posix.c | 2 +- .../libarchive/libarchive/archive_read_extract2.c | 2 +- .../libarchive/libarchive/archive_read_open_fd.c | 2 +- .../libarchive/libarchive/archive_read_open_file.c | 2 +- .../libarchive/archive_read_open_filename.c | 4 +- .../libarchive/archive_read_open_memory.c | 2 +- .../libarchive/archive_read_support_filter_bzip2.c | 4 +- .../archive_read_support_filter_compress.c | 2 +- .../libarchive/archive_read_support_filter_gzip.c | 18 +- .../libarchive/archive_read_support_filter_lz4.c | 6 +- .../libarchive/archive_read_support_filter_lzop.c | 5 +- .../archive_read_support_filter_program.c | 6 +- .../libarchive/archive_read_support_filter_rpm.c | 45 +- .../libarchive/archive_read_support_filter_uu.c | 16 +- .../libarchive/archive_read_support_filter_xz.c | 4 +- .../libarchive/archive_read_support_filter_zstd.c | 4 +- .../libarchive/archive_read_support_format_7zip.c | 93 +- .../libarchive/archive_read_support_format_ar.c | 10 +- .../libarchive/archive_read_support_format_cab.c | 12 +- .../libarchive/archive_read_support_format_cpio.c | 32 +- .../archive_read_support_format_iso9660.c | 305 ++- .../libarchive/archive_read_support_format_lha.c | 11 +- .../libarchive/archive_read_support_format_mtree.c | 2 +- .../libarchive/archive_read_support_format_rar.c | 128 +- .../libarchive/archive_read_support_format_rar5.c | 171 +- .../libarchive/archive_read_support_format_raw.c | 2 +- .../libarchive/archive_read_support_format_tar.c | 2221 +++++++++++++------- .../libarchive/archive_read_support_format_xar.c | 32 +- .../libarchive/archive_read_support_format_zip.c | 45 +- contrib/libarchive/libarchive/archive_string.c | 86 +- contrib/libarchive/libarchive/archive_util.c | 16 +- contrib/libarchive/libarchive/archive_write.c | 19 +- .../archive_write_add_filter_b64encode.c | 6 +- .../libarchive/archive_write_add_filter_bzip2.c | 5 +- .../libarchive/archive_write_add_filter_compress.c | 4 +- .../libarchive/archive_write_add_filter_gzip.c | 3 +- .../libarchive/archive_write_add_filter_uuencode.c | 2 +- .../libarchive/archive_write_add_filter_xz.c | 5 +- .../libarchive/archive_write_add_filter_zstd.c | 3 +- .../libarchive/archive_write_disk_posix.c | 16 +- .../libarchive/libarchive/archive_write_open_fd.c | 2 +- .../libarchive/archive_write_open_file.c | 2 +- .../libarchive/archive_write_open_filename.c | 2 +- .../libarchive/archive_write_open_memory.c | 2 +- .../libarchive/archive_write_set_format_7zip.c | 16 +- .../libarchive/archive_write_set_format_ar.c | 6 +- .../archive_write_set_format_cpio_binary.c | 5 +- .../archive_write_set_format_cpio_newc.c | 2 +- .../libarchive/archive_write_set_format_cpio_odc.c | 5 +- .../libarchive/archive_write_set_format_gnutar.c | 6 +- .../libarchive/archive_write_set_format_iso9660.c | 2 +- .../libarchive/archive_write_set_format_pax.c | 24 +- .../libarchive/archive_write_set_format_raw.c | 2 +- .../libarchive/archive_write_set_format_shar.c | 10 +- .../libarchive/archive_write_set_format_ustar.c | 8 +- .../libarchive/archive_write_set_format_v7tar.c | 4 +- .../libarchive/archive_write_set_format_xar.c | 26 +- .../libarchive/archive_write_set_format_zip.c | 10 +- .../libarchive/test/test_7zip_filename_encoding.c | 100 + contrib/libarchive/libarchive/test/test_ar_mode.c | 40 + .../libarchive/test/test_archive_match_time.c | 60 +- .../libarchive/libarchive/test/test_archive_read.c | 63 + .../test/test_archive_read_multiple_data_objects.c | 23 +- .../libarchive/test/test_archive_string.c | 2 +- .../test/test_archive_string_conversion.c | 135 ++ .../test/test_archive_write_add_filter_by_name.c | 2 +- .../libarchive/libarchive/test/test_compat_lzip.c | 2 +- .../test/test_compat_solaris_pax_sparse.c | 2 +- contrib/libarchive/libarchive/test/test_entry.c | 14 +- .../test/test_gnutar_filename_encoding.c | 102 + .../libarchive/test/test_link_resolver.c | 45 + .../libarchive/test/test_pax_filename_encoding.c | 152 ++ .../test/test_read_filter_gzip_recursive.c | 50 + .../test/test_read_filter_gzip_recursive.gz.uu | 19 + .../libarchive/test/test_read_format_7zip.c | 44 + .../test_read_format_7zip_extract_second.7z.uu | 11 + .../libarchive/test/test_read_format_cpio_afio.c | 30 +- .../libarchive/test/test_read_format_huge_rpm.c | 50 + .../test/test_read_format_huge_rpm.rpm.uu | 244 +++ .../test/test_read_format_iso_3.iso.Z.uu | 40 + .../libarchive/test/test_read_format_iso_Z.c | 122 +- .../libarchive/test/test_read_format_mtree.c | 2 +- .../test/test_read_format_rar4_encrypted.rar.uu | 10 + ...est_read_format_rar4_encrypted_filenames.rar.uu | 14 + .../test_read_format_rar4_solid_encrypted.rar.uu | 11 + ...ad_format_rar4_solid_encrypted_filenames.rar.uu | 13 + .../libarchive/test/test_read_format_rar5.c | 39 +- ...read_format_rar5_data_ready_pointer_leak.rar.uu | 28 + .../test/test_read_format_rar5_encrypted.rar.uu | 12 + ...est_read_format_rar5_encrypted_filenames.rar.uu | 19 + .../test_read_format_rar5_solid_encrypted.rar.uu | 14 + ...ad_format_rar5_solid_encrypted_filenames.rar.uu | 18 + .../test/test_read_format_rar_encryption.c | 176 ++ .../libarchive/test/test_read_format_tar.c | 2 +- .../test/test_read_format_tar_pax_large_attr.c | 65 + .../test_read_format_tar_pax_large_attr.tar.Z.uu | 149 ++ .../libarchive/test/test_read_format_xar.c | 37 +- ..._read_format_xar_duplicate_filename_node.xar.uu | 14 + .../libarchive/test/test_read_format_zip_nested.c | 2 +- ...t_read_format_zip_traditional_encryption_data.c | 2 +- .../test/test_read_format_zip_winzip_aes.c | 2 +- .../test/test_read_format_zip_winzip_aes_large.c | 2 +- .../libarchive/test/test_read_truncated_filter.c | 4 +- .../libarchive/libarchive/test/test_sparse_basic.c | 17 +- .../libarchive/libarchive/test/test_tar_large.c | 2 +- .../libarchive/test/test_ustar_filename_encoding.c | 102 + .../test/test_write_disk_secure_noabsolutepaths.c | 88 + .../libarchive/test/test_write_filter_b64encode.c | 4 +- .../libarchive/test/test_write_filter_bzip2.c | 4 +- .../libarchive/test/test_write_filter_compress.c | 4 +- .../libarchive/test/test_write_filter_gzip.c | 4 +- .../test/test_write_filter_gzip_timestamp.c | 4 +- .../libarchive/test/test_write_filter_lrzip.c | 4 +- .../libarchive/test/test_write_filter_lz4.c | 8 +- .../libarchive/test/test_write_filter_lzip.c | 4 +- .../libarchive/test/test_write_filter_lzma.c | 4 +- .../libarchive/test/test_write_filter_lzop.c | 4 +- .../libarchive/test/test_write_filter_uuencode.c | 4 +- .../libarchive/test/test_write_filter_xz.c | 4 +- .../libarchive/test/test_write_filter_zstd.c | 12 +- .../test/test_write_format_iso9660_filename.c | 2 +- .../libarchive/test/test_write_format_zip.c | 6 +- .../test/test_write_format_zip_entry_size_unset.c | 2 +- .../libarchive/test/test_write_format_zip_large.c | 2 +- .../libarchive/test/test_write_format_zip_stream.c | 5 + .../test/test_write_format_zip_windows_path.c | 100 + .../libarchive/test/test_zip_filename_encoding.c | 95 + contrib/libarchive/tar/bsdtar.1 | 24 +- contrib/libarchive/tar/bsdtar.c | 25 +- contrib/libarchive/tar/bsdtar.h | 22 +- contrib/libarchive/tar/bsdtar_platform.h | 24 +- contrib/libarchive/tar/cmdline.c | 22 +- contrib/libarchive/tar/creation_set.c | 24 +- contrib/libarchive/tar/read.c | 22 +- contrib/libarchive/tar/subst.c | 22 +- contrib/libarchive/tar/test/test.h | 22 +- contrib/libarchive/tar/test/test_0.c | 22 +- contrib/libarchive/tar/test/test_basic.c | 22 +- contrib/libarchive/tar/test/test_copy.c | 58 +- contrib/libarchive/tar/test/test_empty_mtree.c | 22 +- contrib/libarchive/tar/test/test_extract_tar_Z.c | 22 +- contrib/libarchive/tar/test/test_extract_tar_bz2.c | 22 +- contrib/libarchive/tar/test/test_extract_tar_grz.c | 22 +- contrib/libarchive/tar/test/test_extract_tar_gz.c | 22 +- contrib/libarchive/tar/test/test_extract_tar_lrz.c | 22 +- contrib/libarchive/tar/test/test_extract_tar_lz.c | 22 +- contrib/libarchive/tar/test/test_extract_tar_lz4.c | 22 +- .../libarchive/tar/test/test_extract_tar_lzma.c | 22 +- contrib/libarchive/tar/test/test_extract_tar_lzo.c | 22 +- contrib/libarchive/tar/test/test_extract_tar_xz.c | 22 +- .../libarchive/tar/test/test_extract_tar_zstd.c | 22 +- contrib/libarchive/tar/test/test_format_newc.c | 22 +- contrib/libarchive/tar/test/test_help.c | 22 +- contrib/libarchive/tar/test/test_leading_slash.c | 22 +- contrib/libarchive/tar/test/test_missing_file.c | 22 +- contrib/libarchive/tar/test/test_option_C_mtree.c | 30 +- contrib/libarchive/tar/test/test_option_C_upper.c | 22 +- contrib/libarchive/tar/test/test_option_H_upper.c | 40 +- contrib/libarchive/tar/test/test_option_L_upper.c | 40 +- contrib/libarchive/tar/test/test_option_O_upper.c | 22 +- contrib/libarchive/tar/test/test_option_P.c | 82 + contrib/libarchive/tar/test/test_option_T_upper.c | 22 +- contrib/libarchive/tar/test/test_option_U_upper.c | 22 +- contrib/libarchive/tar/test/test_option_X_upper.c | 22 +- contrib/libarchive/tar/test/test_option_a.c | 22 +- contrib/libarchive/tar/test/test_option_acls.c | 22 +- contrib/libarchive/tar/test/test_option_b.c | 22 +- .../libarchive/tar/test/test_option_b64encode.c | 22 +- contrib/libarchive/tar/test/test_option_exclude.c | 22 +- .../libarchive/tar/test/test_option_exclude_vcs.c | 24 +- contrib/libarchive/tar/test/test_option_fflags.c | 24 +- .../libarchive/tar/test/test_option_gid_gname.c | 22 +- contrib/libarchive/tar/test/test_option_group.c | 22 +- contrib/libarchive/tar/test/test_option_grzip.c | 22 +- .../libarchive/tar/test/test_option_ignore_zeros.c | 31 +- contrib/libarchive/tar/test/test_option_j.c | 22 +- contrib/libarchive/tar/test/test_option_k.c | 22 +- .../tar/test/test_option_keep_newer_files.c | 22 +- contrib/libarchive/tar/test/test_option_lrzip.c | 22 +- contrib/libarchive/tar/test/test_option_lz4.c | 22 +- contrib/libarchive/tar/test/test_option_lzma.c | 22 +- contrib/libarchive/tar/test/test_option_lzop.c | 22 +- contrib/libarchive/tar/test/test_option_n.c | 22 +- .../libarchive/tar/test/test_option_newer_than.c | 22 +- contrib/libarchive/tar/test/test_option_nodump.c | 22 +- .../libarchive/tar/test/test_option_older_than.c | 22 +- contrib/libarchive/tar/test/test_option_owner.c | 22 +- .../libarchive/tar/test/test_option_passphrase.c | 22 +- contrib/libarchive/tar/test/test_option_q.c | 22 +- contrib/libarchive/tar/test/test_option_r.c | 22 +- contrib/libarchive/tar/test/test_option_s.c | 22 +- .../libarchive/tar/test/test_option_safe_writes.c | 22 +- .../libarchive/tar/test/test_option_uid_uname.c | 22 +- contrib/libarchive/tar/test/test_option_uuencode.c | 22 +- contrib/libarchive/tar/test/test_option_xattrs.c | 24 +- contrib/libarchive/tar/test/test_option_xz.c | 22 +- contrib/libarchive/tar/test/test_option_z.c | 22 +- contrib/libarchive/tar/test/test_option_zstd.c | 22 +- contrib/libarchive/tar/test/test_patterns.c | 22 +- contrib/libarchive/tar/test/test_print_longpath.c | 22 +- contrib/libarchive/tar/test/test_stdio.c | 22 +- .../libarchive/tar/test/test_strip_components.c | 22 +- contrib/libarchive/tar/test/test_symlink_dir.c | 22 +- contrib/libarchive/tar/test/test_version.c | 22 +- contrib/libarchive/tar/util.c | 42 +- contrib/libarchive/tar/write.c | 35 +- contrib/libarchive/test_utils/test_common.h | 5 +- contrib/libarchive/test_utils/test_main.c | 101 +- contrib/libarchive/unzip/bsdunzip.1 | 25 +- contrib/libarchive/unzip/bsdunzip.c | 49 +- contrib/libarchive/unzip/bsdunzip.h | 22 +- contrib/libarchive/unzip/bsdunzip_platform.h | 24 +- contrib/libarchive/unzip/cmdline.c | 22 +- contrib/libarchive/unzip/la_getline.c | 26 +- contrib/libarchive/unzip/test/test.h | 22 +- contrib/libarchive/unzip/test/test_0.c | 22 +- contrib/libarchive/unzip/test/test_C.c | 23 +- contrib/libarchive/unzip/test/test_I.c | 40 +- contrib/libarchive/unzip/test/test_L.c | 23 +- contrib/libarchive/unzip/test/test_P_encryption.c | 25 +- contrib/libarchive/unzip/test/test_Z1.c | 23 +- contrib/libarchive/unzip/test/test_basic.c | 23 +- contrib/libarchive/unzip/test/test_d.c | 23 +- contrib/libarchive/unzip/test/test_doubledash.c | 23 +- contrib/libarchive/unzip/test/test_glob.c | 23 +- contrib/libarchive/unzip/test/test_j.c | 23 +- contrib/libarchive/unzip/test/test_n.c | 25 +- contrib/libarchive/unzip/test/test_not_exist.c | 25 +- contrib/libarchive/unzip/test/test_o.c | 25 +- contrib/libarchive/unzip/test/test_p.c | 23 +- contrib/libarchive/unzip/test/test_q.c | 23 +- contrib/libarchive/unzip/test/test_singlefile.c | 23 +- contrib/libarchive/unzip/test/test_t.c | 23 +- contrib/libarchive/unzip/test/test_t_bad.c | 23 +- contrib/libarchive/unzip/test/test_version.c | 22 +- contrib/libarchive/unzip/test/test_x.c | 23 +- lib/libarchive/tests/Makefile | 24 + usr.bin/cpio/tests/Makefile | 1 + usr.bin/tar/tests/Makefile | 1 + 343 files changed, 5857 insertions(+), 5333 deletions(-) diff --cc contrib/libarchive/cpio/test/test_extract_cpio_absolute_paths.c index 000000000000,66fc56641bd0..51650bc00f5a mode 000000,100644..100644 --- a/contrib/libarchive/cpio/test/test_extract_cpio_absolute_paths.c +++ b/contrib/libarchive/cpio/test/test_extract_cpio_absolute_paths.c @@@ -1,0 -1,53 +1,53 @@@ + /*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Mostyn Bramley-Moore + */ + + #include "test.h" + + #include + #include + + #if defined(_WIN32) && !defined(__CYGWIN__) + #define UNLINK _unlink + #else + #define UNLINK unlink + #endif + + DEFINE_TEST(test_extract_cpio_absolute_paths) + { + int r; + + // Create an absolute path for a test file inside testworkdir. - char *entry_suffix = "/cpio-noabs"; ++ const char *entry_suffix = "/cpio-noabs"; + size_t entry_suffix_length = strlen(entry_suffix); + size_t testworkdir_length = strlen(testworkdir); + size_t temp_absolute_file_name_length = testworkdir_length + entry_suffix_length; + char *temp_absolute_file_name = calloc(1, temp_absolute_file_name_length + 1); // +1 for null character. + assertEqualInt(snprintf(temp_absolute_file_name, temp_absolute_file_name_length + 1, "%s%s", testworkdir, entry_suffix), + temp_absolute_file_name_length); + + // Create the file. + const char *sample_data = "test file from test_extract_cpio_absolute_paths"; + assertMakeFile(temp_absolute_file_name, 0644, sample_data); + + // Create an archive with the test file, using an absolute path. + assertMakeFile("filelist", 0644, temp_absolute_file_name); + r = systemf("%s -o < filelist > archive.cpio 2> stderr1.txt", testprog); + assertEqualInt(r, 0); + + // Ensure that the temp file does not exist. + UNLINK(temp_absolute_file_name); + + // We should refuse to create the absolute path without --insecure. + r = systemf("%s -i < archive.cpio 2> stderr2.txt", testprog); + assert(r != 0); + assertFileNotExists(temp_absolute_file_name); + UNLINK(temp_absolute_file_name); // Cleanup just in case. + + // But if we specify --insecure then the absolute path should be created. + r = systemf("%s -i --insecure < archive.cpio 2> stderr3.txt", testprog); + assert(r == 0); + assertFileExists(temp_absolute_file_name); + } diff --cc contrib/libarchive/libarchive/test/test_7zip_filename_encoding.c index 000000000000,cf562d39fda7..cf562d39fda7 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_7zip_filename_encoding.c +++ b/contrib/libarchive/libarchive/test/test_7zip_filename_encoding.c diff --cc contrib/libarchive/libarchive/test/test_ar_mode.c index 000000000000,4f9feb1210d2..4f9feb1210d2 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_ar_mode.c +++ b/contrib/libarchive/libarchive/test/test_ar_mode.c diff --cc contrib/libarchive/libarchive/test/test_archive_read.c index 000000000000,583e5166a0be..583e5166a0be mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_archive_read.c +++ b/contrib/libarchive/libarchive/test/test_archive_read.c diff --cc contrib/libarchive/libarchive/test/test_read_filter_gzip_recursive.c index 000000000000,0042a0511d5a..0042a0511d5a mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_filter_gzip_recursive.c +++ b/contrib/libarchive/libarchive/test/test_read_filter_gzip_recursive.c diff --cc contrib/libarchive/libarchive/test/test_read_filter_gzip_recursive.gz.uu index 000000000000,14b0476bed40..14b0476bed40 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_filter_gzip_recursive.gz.uu +++ b/contrib/libarchive/libarchive/test/test_read_filter_gzip_recursive.gz.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_7zip_extract_second.7z.uu index 000000000000,aa3d6e235784..aa3d6e235784 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_7zip_extract_second.7z.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_7zip_extract_second.7z.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_huge_rpm.c index 000000000000,729c1e188d28..729c1e188d28 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_huge_rpm.c +++ b/contrib/libarchive/libarchive/test/test_read_format_huge_rpm.c diff --cc contrib/libarchive/libarchive/test/test_read_format_huge_rpm.rpm.uu index 000000000000,db2111859662..db2111859662 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_huge_rpm.rpm.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_huge_rpm.rpm.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_iso_3.iso.Z.uu index 000000000000,e7734ab33bf3..e7734ab33bf3 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_iso_3.iso.Z.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_iso_3.iso.Z.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_rar4_encrypted.rar.uu index 000000000000,584183b4a46f..584183b4a46f mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_rar4_encrypted.rar.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_rar4_encrypted.rar.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_rar4_encrypted_filenames.rar.uu index 000000000000,3d7aa806a86d..3d7aa806a86d mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_rar4_encrypted_filenames.rar.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_rar4_encrypted_filenames.rar.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_rar4_solid_encrypted.rar.uu index 000000000000,7d73ee86d9ef..7d73ee86d9ef mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_rar4_solid_encrypted.rar.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_rar4_solid_encrypted.rar.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_rar4_solid_encrypted_filenames.rar.uu index 000000000000,6c28e955d0e1..6c28e955d0e1 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_rar4_solid_encrypted_filenames.rar.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_rar4_solid_encrypted_filenames.rar.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_rar5_data_ready_pointer_leak.rar.uu index 000000000000,8c8c90778b9d..8c8c90778b9d mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_rar5_data_ready_pointer_leak.rar.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_rar5_data_ready_pointer_leak.rar.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_rar5_encrypted.rar.uu index 000000000000,0a52fa26bb3c..0a52fa26bb3c mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_rar5_encrypted.rar.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_rar5_encrypted.rar.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_rar5_encrypted_filenames.rar.uu index 000000000000,931240a16d49..931240a16d49 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_rar5_encrypted_filenames.rar.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_rar5_encrypted_filenames.rar.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_rar5_solid_encrypted.rar.uu index 000000000000,d3113a305917..d3113a305917 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_rar5_solid_encrypted.rar.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_rar5_solid_encrypted.rar.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_rar5_solid_encrypted_filenames.rar.uu index 000000000000,4f3dbfb33127..4f3dbfb33127 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_rar5_solid_encrypted_filenames.rar.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_rar5_solid_encrypted_filenames.rar.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_rar_encryption.c index 000000000000,a184b86b5ffe..a184b86b5ffe mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_rar_encryption.c +++ b/contrib/libarchive/libarchive/test/test_read_format_rar_encryption.c diff --cc contrib/libarchive/libarchive/test/test_read_format_tar_pax_large_attr.c index 000000000000,1c2b55f9c6fb..1c2b55f9c6fb mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_tar_pax_large_attr.c +++ b/contrib/libarchive/libarchive/test/test_read_format_tar_pax_large_attr.c diff --cc contrib/libarchive/libarchive/test/test_read_format_tar_pax_large_attr.tar.Z.uu index 000000000000,01eb55588ea7..01eb55588ea7 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_tar_pax_large_attr.tar.Z.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_tar_pax_large_attr.tar.Z.uu diff --cc contrib/libarchive/libarchive/test/test_read_format_xar_duplicate_filename_node.xar.uu index 000000000000,18cbcf5898df..18cbcf5898df mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_read_format_xar_duplicate_filename_node.xar.uu +++ b/contrib/libarchive/libarchive/test/test_read_format_xar_duplicate_filename_node.xar.uu diff --cc contrib/libarchive/libarchive/test/test_write_disk_secure_noabsolutepaths.c index 000000000000,df244727fe44..1c9254a42093 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_write_disk_secure_noabsolutepaths.c +++ b/contrib/libarchive/libarchive/test/test_write_disk_secure_noabsolutepaths.c @@@ -1,0 -1,88 +1,88 @@@ + /*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Mostyn Bramley-Moore + */ + + #include "test.h" + + #include + + #if defined(_WIN32) && !defined(__CYGWIN__) + #define UNLINK _unlink + #else + #include + #define UNLINK unlink + #endif + + /* + * Exercise security checks that should prevent writing absolute paths + * when extracting archives. + */ + DEFINE_TEST(test_write_disk_secure_noabsolutepaths) + { + struct archive *a, *ad; + struct archive_entry *ae; + + char buff[10000]; + + size_t used; + + // Create an archive_write object. + assert((a = archive_write_new()) != NULL); + assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_open_memory(a, buff, sizeof(buff), &used)); + + // Create an absolute path for a test file inside testworkdir. - char *entry_suffix = "/badfile"; ++ const char *entry_suffix = "/badfile"; + size_t entry_suffix_length = strlen(entry_suffix); + size_t testworkdir_length = strlen(testworkdir); + size_t temp_absolute_file_name_length = testworkdir_length + entry_suffix_length; + char *temp_absolute_file_name = calloc(1, temp_absolute_file_name_length + 1); // +1 for null character. + assertEqualInt(snprintf(temp_absolute_file_name, temp_absolute_file_name_length + 1, "%s%s", testworkdir, entry_suffix), + temp_absolute_file_name_length); + + // Convert to a unix-style path, so we can compare it to the entry + // path when reading back the archive. + for (char *p = temp_absolute_file_name; *p != '\0'; p++) + if (*p == '\\') *p = '/'; + + // Add a regular file entry with an absolute path. + assert((ae = archive_entry_new()) != NULL); + archive_entry_copy_pathname(ae, temp_absolute_file_name); + archive_entry_set_mode(ae, S_IFREG | 0777); + archive_entry_set_size(ae, 6); + assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae)); + archive_entry_free(ae); + assertEqualInt(6, archive_write_data(a, "hello", 6)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); + assertEqualInt(ARCHIVE_OK, archive_write_free(a)); + + // Now try to extract the data. + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_memory(a, buff, used)); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(temp_absolute_file_name, archive_entry_pathname(ae)); + assertEqualInt(AE_IFREG, archive_entry_filetype(ae)); + assertEqualInt(AE_IFREG | 0777, archive_entry_mode(ae)); + assertEqualInt(6, archive_entry_size(ae)); + + // This should succeed. + assertEqualInt(ARCHIVE_OK, archive_read_extract(a, ae, 0)); + UNLINK(temp_absolute_file_name); + + // This should fail, since the archive entry has an absolute path. + assert(ARCHIVE_OK != archive_read_extract(a, ae, ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS)); + + // This should also fail. + assert((ad = archive_write_new()) != NULL); + assertEqualInt(ARCHIVE_OK, archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS)); + assert(ARCHIVE_OK != archive_read_extract2(a, ae, ad)); + + assertEqualInt(ARCHIVE_OK, archive_write_free(ad)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + } diff --cc contrib/libarchive/libarchive/test/test_write_format_zip_windows_path.c index 000000000000,c8be48293638..c8be48293638 mode 000000,100644..100644 --- a/contrib/libarchive/libarchive/test/test_write_format_zip_windows_path.c +++ b/contrib/libarchive/libarchive/test/test_write_format_zip_windows_path.c diff --cc contrib/libarchive/tar/test/test_option_P.c index 000000000000,e63da3e0875c..e63da3e0875c mode 000000,100644..100644 --- a/contrib/libarchive/tar/test/test_option_P.c +++ b/contrib/libarchive/tar/test/test_option_P.c diff --cc lib/libarchive/tests/Makefile index dc3767c319c3,000000000000..2684d1661e57 mode 100644,000000..100644 --- a/lib/libarchive/tests/Makefile +++ b/lib/libarchive/tests/Makefile @@@ -1,689 -1,0 +1,713 @@@ +.include + +PACKAGE= tests + +WARNS?= 3 + +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive + +ATF_TESTS_SH+= functional_test + +TEST_METADATA.functional_test+= timeout="600" + +BINDIR= ${TESTSDIR} + +PROGS+= libarchive_test + +CFLAGS+= -I${.CURDIR} -I${.CURDIR:H} -I${.OBJDIR} +CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive -I${_LIBARCHIVEDIR}/libarchive/test +CFLAGS+= -I${_LIBARCHIVEDIR}/test_utils + +CFLAGS.test_utils.c+= -Wno-cast-align + +# Uncomment to link against dmalloc +#LDADD+= -L/usr/local/lib -ldmalloc +#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC + +.PATH: ${_LIBARCHIVEDIR}/libarchive/test +TESTS_SRCS= \ ++ test_7zip_filename_encoding.c \ + test_acl_nfs4.c \ + test_acl_pax.c \ + test_acl_platform_nfs4.c \ + test_acl_platform_posix1e.c \ + test_acl_posix1e.c \ + test_acl_text.c \ ++ test_ar_mode.c \ + test_archive_api_feature.c \ + test_archive_clear_error.c \ + test_archive_cmdline.c \ + test_archive_digest.c \ + test_archive_getdate.c \ + test_archive_match_time.c \ + test_archive_match_owner.c \ + test_archive_match_path.c \ + test_archive_pathmatch.c \ ++ test_archive_read.c \ + test_archive_read_add_passphrase.c \ + test_archive_read_close_twice.c \ + test_archive_read_close_twice_open_fd.c \ + test_archive_read_close_twice_open_filename.c \ + test_archive_read_multiple_data_objects.c \ + test_archive_read_next_header_empty.c \ + test_archive_read_next_header_raw.c \ + test_archive_read_open2.c \ + test_archive_read_set_filter_option.c \ + test_archive_read_set_format_option.c \ + test_archive_read_set_option.c \ + test_archive_read_set_options.c \ + test_archive_read_support.c \ + test_archive_set_error.c \ + test_archive_string.c \ + test_archive_string_conversion.c \ + test_archive_write_add_filter_by_name.c \ + test_archive_write_set_filter_option.c \ + test_archive_write_set_format_by_name.c \ + test_archive_write_set_format_filter_by_ext.c \ + test_archive_write_set_format_option.c \ + test_archive_write_set_option.c \ + test_archive_write_set_options.c \ + test_archive_write_set_passphrase.c \ + test_bad_fd.c \ + test_compat_bzip2.c \ + test_compat_cpio.c \ + test_compat_gtar.c \ + test_compat_gzip.c \ + test_compat_lz4.c \ + test_compat_lzip.c \ + test_compat_lzma.c \ + test_compat_lzop.c \ + test_compat_mac.c \ + test_compat_perl_archive_tar.c \ + test_compat_plexus_archiver_tar.c \ + test_compat_solaris_tar_acl.c \ + test_compat_solaris_pax_sparse.c \ + test_compat_star_acl.c \ + test_compat_tar_directory.c \ + test_compat_tar_hardlink.c \ + test_compat_uudecode.c \ + test_compat_uudecode_large.c \ + test_compat_xz.c \ + test_compat_zip.c \ + test_compat_zstd.c \ + test_empty_write.c \ + test_entry.c \ + test_entry_strmode.c \ + test_extattr_freebsd.c \ + test_filter_count.c \ + test_gnutar_filename_encoding.c \ + test_link_resolver.c \ + test_open_fd.c \ + test_open_failure.c \ + test_open_file.c \ + test_open_filename.c \ + test_pax_filename_encoding.c \ + test_pax_xattr_header.c \ + test_read_data_large.c \ + test_read_disk.c \ + test_read_disk_directory_traversals.c \ + test_read_disk_entry_from_file.c \ + test_read_extract.c \ + test_read_file_nonexistent.c \ + test_read_filter_compress.c \ + test_read_filter_grzip.c \ ++ test_read_filter_gzip_recursive.c \ + test_read_filter_lrzip.c \ + test_read_filter_lzop.c \ + test_read_filter_lzop_multiple_parts.c \ + test_read_filter_program.c \ + test_read_filter_program_signature.c \ + test_read_filter_uudecode.c \ + test_read_filter_uudecode_raw.c \ + test_read_format_7zip.c \ + test_read_format_7zip_encryption_data.c \ + test_read_format_7zip_encryption_header.c \ + test_read_format_7zip_encryption_partially.c \ + test_read_format_7zip_malformed.c \ + test_read_format_7zip_packinfo_digests.c \ + test_read_format_ar.c \ + test_read_format_cab.c \ + test_read_format_cab_filename.c \ + test_read_format_cpio_afio.c \ + test_read_format_cpio_bin.c \ + test_read_format_cpio_bin_Z.c \ + test_read_format_cpio_bin_be.c \ + test_read_format_cpio_bin_bz2.c \ + test_read_format_cpio_bin_gz.c \ + test_read_format_cpio_bin_le.c \ + test_read_format_cpio_bin_lzip.c \ + test_read_format_cpio_bin_lzma.c \ + test_read_format_cpio_bin_xz.c \ + test_read_format_cpio_filename.c \ + test_read_format_cpio_odc.c \ + test_read_format_cpio_svr4_gzip.c \ + test_read_format_cpio_svr4c_Z.c \ + test_read_format_cpio_svr4_bzip2_rpm.c \ + test_read_format_cpio_svr4_gzip_rpm.c \ + test_read_format_empty.c \ + test_read_format_gtar_filename.c \ + test_read_format_gtar_gz.c \ + test_read_format_gtar_lzma.c \ + test_read_format_gtar_sparse.c \ + test_read_format_gtar_sparse_skip_entry.c \ ++ test_read_format_huge_rpm.c \ + test_read_format_iso_Z.c \ + test_read_format_iso_multi_extent.c \ + test_read_format_iso_xorriso.c \ + test_read_format_isorr_rr_moved.c \ + test_read_format_isojoliet_bz2.c \ + test_read_format_isojoliet_long.c \ + test_read_format_isojoliet_rr.c \ + test_read_format_isojoliet_versioned.c \ + test_read_format_isorr_bz2.c \ + test_read_format_isorr_ce.c \ + test_read_format_isorr_new_bz2.c \ + test_read_format_isozisofs_bz2.c \ + test_read_format_lha.c \ + test_read_format_lha_bugfix_0.c \ + test_read_format_lha_filename.c \ + test_read_format_lha_filename_utf16.c \ + test_read_format_mtree.c \ + test_read_format_mtree_crash747.c \ + test_read_format_pax_bz2.c \ + test_read_format_rar.c \ + test_read_format_rar5.c \ ++ test_read_format_rar_encryption.c \ + test_read_format_rar_encryption_data.c \ + test_read_format_rar_encryption_header.c \ + test_read_format_rar_encryption_partially.c \ + test_read_format_rar_filter.c \ + test_read_format_rar_invalid1.c \ + test_read_format_raw.c \ + test_read_format_tar.c \ + test_read_format_tar_concatenated.c \ + test_read_format_tar_empty_filename.c \ + test_read_format_tar_empty_pax.c \ + test_read_format_tar_empty_with_gnulabel.c \ + test_read_format_tar_filename.c \ + test_read_format_tar_invalid_pax_size.c \ ++ test_read_format_tar_pax_large_attr.c \ + test_read_format_tbz.c \ + test_read_format_tgz.c \ + test_read_format_tlz.c \ + test_read_format_txz.c \ + test_read_format_tz.c \ + test_read_format_ustar_filename.c \ + test_read_format_warc.c \ + test_read_format_xar.c \ + test_read_format_xar_doublelink.c \ + test_read_format_zip.c \ + test_read_format_zip_7075_utf8_paths.c \ + test_read_format_zip_comment_stored.c \ + test_read_format_zip_encryption_data.c \ + test_read_format_zip_encryption_header.c \ + test_read_format_zip_encryption_partially.c \ + test_read_format_zip_extra_padding.c \ + test_read_format_zip_filename.c \ + test_read_format_zip_high_compression.c \ + test_read_format_zip_jar.c \ + test_read_format_zip_mac_metadata.c \ + test_read_format_zip_malformed.c \ + test_read_format_zip_msdos.c \ + test_read_format_zip_nested.c \ + test_read_format_zip_nofiletype.c \ + test_read_format_zip_padded.c \ + test_read_format_zip_sfx.c \ + test_read_format_zip_traditional_encryption_data.c \ + test_read_format_zip_winzip_aes.c \ + test_read_format_zip_winzip_aes_large.c \ + test_read_format_zip_with_invalid_traditional_eocd.c \ + test_read_format_zip_zip64.c \ + test_read_large.c \ + test_read_pax_xattr_rht_security_selinux.c \ + test_read_pax_xattr_schily.c \ + test_read_pax_truncated.c \ + test_read_position.c \ + test_read_set_format.c \ + test_read_too_many_filters.c \ + test_read_truncated.c \ + test_read_truncated_filter.c \ + test_short_writes.c \ + test_sparse_basic.c \ + test_tar_filenames.c \ + test_tar_large.c \ + test_warn_missing_hardlink_target.c \ + test_ustar_filenames.c \ + test_ustar_filename_encoding.c \ + test_write_disk.c \ + test_write_disk_appledouble.c \ + test_write_disk_failures.c \ + test_write_disk_fixup.c \ + test_write_disk_hardlink.c \ + test_write_disk_hfs_compression.c \ + test_write_disk_lookup.c \ + test_write_disk_mac_metadata.c \ + test_write_disk_no_hfs_compression.c \ + test_write_disk_perms.c \ + test_write_disk_secure.c \ ++ test_write_disk_secure_noabsolutepaths.c \ + test_write_disk_secure744.c \ + test_write_disk_secure745.c \ + test_write_disk_secure746.c \ + test_write_disk_sparse.c \ + test_write_disk_symlink.c \ + test_write_disk_times.c \ + test_write_filter_b64encode.c \ + test_write_filter_bzip2.c \ + test_write_filter_compress.c \ + test_write_filter_gzip.c \ + test_write_filter_gzip_timestamp.c \ + test_write_filter_lrzip.c \ + test_write_filter_lz4.c \ + test_write_filter_lzip.c \ + test_write_filter_lzma.c \ + test_write_filter_lzop.c \ + test_write_filter_program.c \ + test_write_filter_uuencode.c \ + test_write_filter_xz.c \ + test_write_filter_zstd.c \ + test_write_format_7zip.c \ + test_write_format_7zip_empty.c \ + test_write_format_7zip_large.c \ + test_write_format_ar.c \ + test_write_format_cpio.c \ + test_write_format_cpio_empty.c \ + test_write_format_cpio_newc.c \ + test_write_format_cpio_odc.c \ + test_write_format_gnutar.c \ + test_write_format_gnutar_filenames.c \ + test_write_format_iso9660.c \ + test_write_format_iso9660_boot.c \ + test_write_format_iso9660_empty.c \ + test_write_format_iso9660_filename.c \ + test_write_format_iso9660_zisofs.c \ + test_write_format_mtree.c \ + test_write_format_mtree_absolute_path.c \ + test_write_format_mtree_classic.c \ + test_write_format_mtree_classic_indent.c \ + test_write_format_mtree_fflags.c \ + test_write_format_mtree_no_separator.c \ + test_write_format_mtree_quoted_filename.c \ + test_write_format_pax.c \ + test_write_format_raw.c \ + test_write_format_raw_b64.c \ + test_write_format_shar_empty.c \ + test_write_format_tar.c \ + test_write_format_tar_empty.c \ + test_write_format_tar_sparse.c \ + test_write_format_tar_ustar.c \ + test_write_format_tar_v7tar.c \ + test_write_format_warc.c \ + test_write_format_warc_empty.c \ + test_write_format_xar.c \ + test_write_format_xar_empty.c \ + test_write_format_zip.c \ + test_write_format_zip_compression_store.c \ + test_write_format_zip_empty.c \ *** 675 LINES SKIPPED *** From nobody Sun Oct 20 11:21: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 4XWbc843nMz5YvTN; Sun, 20 Oct 2024 11:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbc83crzz4WZf; Sun, 20 Oct 2024 11:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2MVTgkikKvWMow8bc3Ycv7+jRx+lewBlupSVEv6wnIQ=; b=CKVCaFGmA5AMHT+Sv7SaAsjQm7oKMVZ4W4vKMzXeS3H3WSkM54yqpRq2+mLp+b223VV3VI +F36XFSCdpgxbxx2iFAeVhAW24zWqPdqaR1okfPf6o8mby8WFG2OiBSfxKxO5Etou5DgzI /icIu47DL3AryjrSmk93hGg36XdyPBJ4ncBh5qNe486aVJ2jQUN+2Mr91MrluMr9D6SF8w hji8BQsvRIyEQusPsYexRRKB9MnHtGVxi5LOoeFcuqkgWJrGvcpc9Kq/fVzLcrL9Iyz+2N dKLCAHIzZYJAbpE6AICaE3L5LlAN6oIxvj2yc574aaxBkmWPBlqMsrsZqOzWeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2MVTgkikKvWMow8bc3Ycv7+jRx+lewBlupSVEv6wnIQ=; b=tEWlIztyK6J8GbK8xa4ta3pAyc5LQPZcG2/XB5IvIHukxQIrAaTS/Vv+219fDYRXVf4sWY WSqUNmenQ7Itdij4GY0r8PArbxnHi5DFhErMOdPYFrP3pOGO/RBnbxG44SkAtKV1g2rafV ExFjYWDyTRCX6DoqSdtHo397HyMsB4gI8cnx/fZdqZwhNYG22pCFZjL726zuRJrSM05aFr eA6t91JSxgkfXvEgV+7HaCfN6fxYlxPiNyKCyJJYXM0yxh7gTS73GDC8I5UqoWXRrfxl9X +2MfdMXWFw6lpDAyjsahtNGhT36m//bLSqnkwuWK/CFvLxErf5EZuCJU18B41A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423288; a=rsa-sha256; cv=none; b=HIDbnJszJC+tmfpKoTYCgUw0iwSpoNdxU07iHYh2r7dSTwPqnKITU6+GdxXcVL0+t1xDHt v/VAbL+e87194DptsQbuZmr4iki9rsO/YSHOa50jZ7fRBrezO5HmyfwitXFuxlLF3ZxOd1 8Y7x1srjdTNjwzj35rEASL7R9X+ByecgEKqDXhffyOGKSxkkHNXRPPBF4Iv7ea65TwCpHX 2A8he/YN4nj6uLjbPwAPYfP88VhhzoAldy6/PODRZ6EIAH23F2Fn83gnkgoq3d4YhO0jbn CEKPgu0mVF9i8I85ag8jBuhvbCJku1+wnEDLgTZPpVobNHe7KydceZWlz0yAPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbc83DRyz10Dt; Sun, 20 Oct 2024 11:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLSVL061328; Sun, 20 Oct 2024 11:21:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLS8x061325; Sun, 20 Oct 2024 11:21:28 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:28 GMT Message-Id: <202410201121.49KBLS8x061325@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e1eaa312d592 - stable/14 - sound: Remove KASSERT from vchan_setnew() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e1eaa312d592a8cde8c9faf49e026a4d3f47489c Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e1eaa312d592a8cde8c9faf49e026a4d3f47489c commit e1eaa312d592a8cde8c9faf49e026a4d3f47489c Author: Christos Margiolis AuthorDate: 2024-10-18 08:38:31 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:04 +0000 sound: Remove KASSERT from vchan_setnew() This check is not really useful, and can in fact break things, if sysctl_dev_pcm_vchans() calls vchan_setnew() with a value that will not satisfy the KASSERT condition. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D46545 (cherry picked from commit 998de46c51452b046ecd9ba8ed592dd7c4f79f51) --- sys/dev/sound/pcm/vchan.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index fa4fa2023b71..c1ad9b9ec2ba 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -945,9 +945,6 @@ vchan_setnew(struct snddev_info *d, int direction, int newcnt) return (EINVAL); if (newcnt > vcnt) { - KASSERT((newcnt - 1) == vcnt, - ("bogus vchan_create() request newcnt=%d vcnt=%d", - newcnt, vcnt)); /* add new vchans - find a parent channel first */ ch = NULL; CHN_FOREACH(c, d, channels.pcm) { From nobody Sun Oct 20 11:21:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XWbc95Y5lz5YvJS; Sun, 20 Oct 2024 11:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbc94tXjz4WpS; Sun, 20 Oct 2024 11:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+madErfrGessyY7EkC3y4dEqp2kDUzfLSgFBshdhhFg=; b=KwGoVJul70aK41RcCiYgqKA+bHGBLJ2uK1uT7Vp+gI3KUBaiTNQryG7DhWjvtSTexonk7u 43ai44l6th0E0u+7t8yFuwzbI9/m9KTma6IjZYM22K/1NX8p1eXj8n0XOjaF89FB0kbkIJ PxbMAkmK8gTo/iS3cpR9PNgXSHP9RfBhAQ9iPt3+JaV461YsdatWdAJ5VHVu0ZtlH4ZvrM nOzTbArjhi/U23M1/vdoIEuG3seEPjBGoi8XK4VvSUa8bXnx8ux6wfSC76vvOL4xnQTZrz Pt9V8PtkWomgfs9NxqD6Mk5hch8d1DwKsQ2wivPDG5O1o1wB2iWqSPzVj5biyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+madErfrGessyY7EkC3y4dEqp2kDUzfLSgFBshdhhFg=; b=TFp0iRqx7loI2L4XTQsotHP1nasr0Bm9m6q5ZvuD2E4An6MWmFxCXKaw9bxK6mUiZ4XATq eqIp8bwhSZb6oRtwVZGrWl4T+r3rgak/89QoEK2NMBirjEuh2X9emO5uElqXs4d1uTHHxb VzfIa86KbxRarQa04yQDfS6gwa7MRRf9R8Jn3uotXhq4WRYsplCqmy/CIUrfXUrwsRokzV sYNa9Tq5i9n08fXrFlqr4VUbGivbWEGfPohp2N7p6dIcY66+AO2wC3Gmy5sN79TH7hAA1J r926Aff4EJYVzYl05V8ZU5lGNncZ3/GRzVm2VaGxOcOHz8+3lvTNcgq3N78iFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423289; a=rsa-sha256; cv=none; b=vEOSURFOgHtcot20hyKLZ9SkGRE+anXHNBA2KsOO6DwtO/8Vyhz3bBK9ltyXMDQ8fojoxb LrNZNXYSkIwQNrLMaQUiwNJ2MK9JYmdqIE5xiuJkegLcSu4ATb8GpZVl2B4ZqXtPgz2OJ4 4D1uN7qIQUeZOI7+Q6GTn9/2jDAqHFMu88vlVN+f4X+PdjsmLHNZDVNYtR9CXj1m58jffH yPA7ZhIQvvVNpZ87yikJbhkGVVvsQ1G6aSADLezdaszRrI1JvaLHLU7pKrvWyl9G8kwR+W kcmZjA7azEMRVtA0nyZNe8SXl5SdhT2PkkM4cIvQxPfepy9iEW/+jfhoIkWFXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbc94Btqz10Dv; Sun, 20 Oct 2024 11:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLTdB061385; Sun, 20 Oct 2024 11:21:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLTwR061382; Sun, 20 Oct 2024 11:21:29 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:29 GMT Message-Id: <202410201121.49KBLTwR061382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 9834b6fc77ff - stable/14 - sound: Get rid of pnum and max variables in chn_init() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9834b6fc77ff53e5303d142486de109d6b02219e Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9834b6fc77ff53e5303d142486de109d6b02219e commit 9834b6fc77ff53e5303d142486de109d6b02219e Author: Christos Margiolis AuthorDate: 2024-10-18 08:38:41 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:04 +0000 sound: Get rid of pnum and max variables in chn_init() The VCHAN count is checked in vchan_setnew(), and there is no reason to cap the hardware channels in the first place. This is part of a series of follow-up patches. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46521 (cherry picked from commit de8ee333388bf5e551e697b08823b3a6c262f609) --- sys/dev/sound/pcm/channel.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index e0fd24805a21..bf9c74e2ed1d 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1165,7 +1165,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, struct feeder_class *fc; struct snd_dbuf *b, *bs; char *dirs, buf[CHN_NAMELEN]; - int i, direction, *pnum, max, type, unit; + int i, direction, type, unit; PCM_BUSYASSERT(d); PCM_LOCKASSERT(d); @@ -1174,30 +1174,22 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, case PCMDIR_PLAY: dirs = "play"; direction = PCMDIR_PLAY; - pnum = &d->playcount; type = SND_DEV_DSPHW_PLAY; - max = SND_MAXHWCHAN; break; case PCMDIR_PLAY_VIRTUAL: dirs = "virtual_play"; direction = PCMDIR_PLAY; - pnum = &d->pvchancount; type = SND_DEV_DSPHW_VPLAY; - max = SND_MAXVCHANS; break; case PCMDIR_REC: dirs = "record"; direction = PCMDIR_REC; - pnum = &d->reccount; type = SND_DEV_DSPHW_REC; - max = SND_MAXHWCHAN; break; case PCMDIR_REC_VIRTUAL: dirs = "virtual_record"; direction = PCMDIR_REC; - pnum = &d->rvchancount; type = SND_DEV_DSPHW_VREC; - max = SND_MAXVCHANS; break; default: device_printf(d->dev, @@ -1206,23 +1198,11 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, return (NULL); } - if (*pnum >= max) { - device_printf(d->dev, "%s(): cannot allocate more channels " - "(max=%d)\n", __func__, max); - return (NULL); - } - unit = 0; CHN_FOREACH(c, d, channels.pcm) { if (c->type != type) continue; unit++; - if (unit >= max) { - device_printf(d->dev, "%s(): cannot allocate more " - "channels for type=%d (max=%d)\n", - __func__, type, max); - return (NULL); - } } PCM_UNLOCK(d); From nobody Sun Oct 20 11:21: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 4XWbcC29k7z5YvNr; Sun, 20 Oct 2024 11:21:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcB5hqgz4WsH; Sun, 20 Oct 2024 11:21:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRfJ0VHBpxopBuxBt13XuQSzYV25AvUowtenzBo2iE8=; b=ActX/9LyTmWWGcgDl58Y3kmr/dZWe1ABc+x+1X+eszRheFd6OGkVmWnjtSDBvmmsmkGlsV pxw4+loRbpc08FEvUAdRtPQLWU2L8QwbCMruHnMoXWl9WxdaVzbhYmuki4c8nxv3qVkzL2 7VPZXl7XvQtWXq2DYTQWki1y+dfWQOmmBWFiviXKRwyIrEm3LkrzpA9xpQoLT6NRQa8IqO dl92jB/Vfu18GC0pTfV+Xv4dO9aK/BZCLH+WOmK/kmCrwetdfwE8cJjQQf1M/zTg+t4arN czZJT3ewRuu6jYDlZlf9reMEy06XcCcKLy1Fq8/dY+j4BBQhvxwATm+zPhK57w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRfJ0VHBpxopBuxBt13XuQSzYV25AvUowtenzBo2iE8=; b=ZQXSzkNl9mpCBj3ry4b6tUtpI+CLQDcmy3LIr+HQAq74TroEFGJG0j25WC1oygVIBIzyfU oOBOd1DWwmBa9kW2TBWycMwUMEeGv/g2CF5/jEE5/cn5BB99JYn0r8SrPJCX/MAZco+R9T heBmYXvRxDpIhUJgTO40/iJxqawl1CKBJGaH8eYfw1wbqBOKKyA6KrEppY2NqHYfLKo/1g Bd5OvZw0KDpyU3io8xjSc1dxWfqwrfKVPo7pTRGDJPck7pt5BFrbvAr3cSIbrkxpNyVHb2 yPnzNbcTQjM/axRscVDxaPG4GsVO3kM6H5avrNuHI69rhB7X4hQqg4cR9oQt6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423290; a=rsa-sha256; cv=none; b=EdO6PwZGTgiAcLN168p5tOxx+9Pu+j2xRCkfGouurtTSsrtcdmcsjY8aP8+E9IXZIa8grh YwfbTRMlItHVLa6AYqsjIwIJcEnERGRXG9doL7NajwgFm1aDfB5XfeByD6O/NsrFoZG6Yu oYd/WByoLQUI/4QLZBXP0i/i9MjYsC0hCoHDemokfNCUe3/mGVAaJqqMpEf9pTtzSNBU9J B6SO1jMZVM3kL0YcdS3HjtMlHKRwBiRvu9FYT1NVjHIE8AS8ZxSHWiZ4SHC4xRl8JxuQ9a uw943fRQNHFRGtDRQ81lkJ3IXobpSg9R1t6oCIcnf90CsrUkje7wtVoy37TrHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcB5Cq0z10Jf; Sun, 20 Oct 2024 11:21:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLUD0061450; Sun, 20 Oct 2024 11:21:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLUJD061447; Sun, 20 Oct 2024 11:21:30 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:30 GMT Message-Id: <202410201121.49KBLUJD061447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 4cf4144d8f7f - stable/14 - sound: Simplify pcm_chnalloc() and fix infinite loop bug List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4cf4144d8f7fdd51562b45fa8f1f4aa16d444b3a Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4cf4144d8f7fdd51562b45fa8f1f4aa16d444b3a commit 4cf4144d8f7fdd51562b45fa8f1f4aa16d444b3a Author: Christos Margiolis AuthorDate: 2024-10-18 08:38:50 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:04 +0000 sound: Simplify pcm_chnalloc() and fix infinite loop bug Simplify logic to execute the following algorithm: 1. Search for a free (i.e not busy) channel and return successfully. 2. If no channel was found, either return an ENOTSUP if no VCHAN can be created (disabled or we reached the limit), or create one more VCHAN and scan for it again. 3. If the second scan failed again, return EBUSY. This patch also solves a bug where we'd end up in an infinite loop, calling vchan_setnew() with the same `newcnt` value indefinitely, after the following scenario: 1. Plug device. 2. Spawn X channels. 3. Kill all channels except _last_ opened. 4. Clean up all unused VCHANs. 5. Spawn X+1 channels. 6. Infinite loop in pcm_chnalloc(). I am not exactly sure which part of pcm_chnalloc() caused this bug, but the patch fixes it at least... Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46548 (cherry picked from commit b973a14d354f332a3428cbab8e9d4b72cb3e2d6e) --- sys/dev/sound/pcm/sound.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index b18b83468150..1aaf614078a4 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -109,13 +109,12 @@ snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand return bus_setup_intr(dev, res, flags, NULL, hand, param, cookiep); } -/* return error status and a locked channel */ int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, pid_t pid, char *comm) { struct pcm_channel *c; - int err, vchancount, vchan_num; + int err, vchancount; bool retry; KASSERT(d != NULL && ch != NULL && @@ -125,46 +124,38 @@ pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, PCM_BUSYASSERT(d); *ch = NULL; - vchan_num = 0; vchancount = (direction == PCMDIR_PLAY) ? d->pvchancount : d->rvchancount; - retry = false; + retry_chnalloc: - err = ENOTSUP; - /* scan for a free channel */ + /* Scan for a free channel. */ CHN_FOREACH(c, d, channels.pcm) { CHN_LOCK(c); - if (c->direction == direction && (c->flags & CHN_F_VIRTUAL)) { - if (vchancount < snd_maxautovchans && - vchan_num < c->unit) { - CHN_UNLOCK(c); - goto vchan_alloc; - } - vchan_num++; + if (c->direction != direction) { + CHN_UNLOCK(c); + continue; } - if (c->direction == direction && !(c->flags & CHN_F_BUSY)) { + if (!(c->flags & CHN_F_BUSY)) { c->flags |= CHN_F_BUSY; c->pid = pid; strlcpy(c->comm, (comm != NULL) ? comm : CHN_COMM_UNKNOWN, sizeof(c->comm)); *ch = c; + return (0); - } else if (c->direction == direction && (c->flags & CHN_F_BUSY)) - err = EBUSY; + } CHN_UNLOCK(c); } - - /* - * We came from retry_chnalloc and still didn't find a free channel. - */ + /* Maybe next time... */ if (retry) - return (err); + return (EBUSY); -vchan_alloc: - /* no channel available */ + /* No channel available. We also cannot create more VCHANs. */ if (!(vchancount > 0 && vchancount < snd_maxautovchans)) - return (err); + return (ENOTSUP); + + /* Increase the VCHAN count and try to get the new channel. */ err = vchan_setnew(d, direction, vchancount + 1); if (err == 0) { retry = true; From nobody Sun Oct 20 11:21: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 4XWbcD2RFvz5YvJY; Sun, 20 Oct 2024 11:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcD01Kdz4WsV; Sun, 20 Oct 2024 11:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyRS4bRjueDVo3PHLgViAP8Y6LJAKo4Gv8AIZNBWyI8=; b=PsNYFecJJgUmYGXMzSwLmiAov0E3p1u8vE+UJMimjusIV5/imk826JxWm4HI57rdkAuxLe czvy1m/XMiU8daP+J8vAJaNnR0jZwsWfyMqgpV1CQ3/8zTcpVMxqbQzTOtWe8P9o/JKyvs sf7ffOt8dZm4i3aoNuUVW5+jychrCZSy1f4ypV9aVFRx4VVCK/vwKlczmbiNV2naTCNfZ1 K8PU+Amiq7oga0IqBlWPOEMEQeY1S+n7mOJyRodAA8OwbzBJJ9gPwE32swLYe7JqD5u8/p aJ4InhHNonIOG9L2fBsbJyEgrNXi2NYwbFfao12oxQFYCP8ryIGBBmZMcMAouA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyRS4bRjueDVo3PHLgViAP8Y6LJAKo4Gv8AIZNBWyI8=; b=e3yicTP3mvQZwrDogbOrRDkH6N30F6rbqFEXllpFjxUlEBnosLY95omECmczPlkLNnNYDQ TReS+vgMerR+qYuCOio99xevcqK9OOzFz30wLBiTHb0+mhsmMH+zyq5hzI2RW/taomBMc7 l+t9aOXDXYaEjrhcxG/Bb/DxdRsUhZwGU/j5no7NpbSV9eR+DKMuaXXJQOWislfC/2lX7S /DUUheYVi3ouro2VsePEQTeiMQh7S8Z9JOTkEETffpK5+/lua3fAu7fn0MqSE3T+GROiAn x200b8WfKOK7dEIIv0WKVMxgZW24CqPj10X0Z8uJ10jwPvOqSmnti5f7xKokNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423292; a=rsa-sha256; cv=none; b=rTy0QWKdFSLSvlb05KuJSfksKVWo5o79MaQlOR2/hq6fcbmNi8UIqb4/iYZAj7zM6iUBht QVky12vlSYdMgrGvLn2gQwfrgXbCJXZl/HFLXGX6IplmIEFNJQJEswqIjj+lquWJjgjAsN JWlyhKQ+4zaSCpcihM5GLBMljyH9w7q+P92ENSoHtd/TmphDyTkSf0rbG3HfFal2zxYLX1 b0tovcEZtKdcqJKmfEhVbtVpE455MBowhaxDlmSyDyvjOKrpamvxmGVQVyb9ZPyOR02ECv 1rs9+IAto6gaxZZXFBAhR/Ogu+FGD5l0Vo/jSAL/lZYcEBODDYLgVlW10YwSJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcC5wB4z103C; Sun, 20 Oct 2024 11:21:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLV01062196; Sun, 20 Oct 2024 11:21:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLVM1062176; Sun, 20 Oct 2024 11:21:31 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:31 GMT Message-Id: <202410201121.49KBLVM1062176@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 30a64793aa6c - stable/14 - sound: Sort channels by unit number as well List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 30a64793aa6c5198bd755858da7f275ae0166249 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=30a64793aa6c5198bd755858da7f275ae0166249 commit 30a64793aa6c5198bd755858da7f275ae0166249 Author: Christos Margiolis AuthorDate: 2024-10-18 08:39:00 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:04 +0000 sound: Sort channels by unit number as well Refactor CHN_INSERT_SORT() to also take into account the unit number of each channel, while still prioritizing the type, to make the channel list easier to work with. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46549 (cherry picked from commit 142aca25b07c9a7067d8040ea98812c54b253bbf) --- sys/dev/sound/pcm/channel.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index 445882a62f0a..d146f51120d8 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -225,7 +225,8 @@ struct pcm_channel { #define CHN_INSERT_SORT(w, x, y, z) do { \ struct pcm_channel *t, *a = NULL; \ CHN_FOREACH(t, x, z) { \ - if ((y)->type w t->type) \ + if (((y)->type w t->type) || \ + (((y)->type == t->type) && ((y)->unit w t->unit))) \ a = t; \ else \ break; \ @@ -236,7 +237,7 @@ struct pcm_channel { CHN_INSERT_HEAD(x, y, z); \ } while (0) -#define CHN_INSERT_SORT_ASCEND(x, y, z) CHN_INSERT_SORT(>=, x, y, z) +#define CHN_INSERT_SORT_ASCEND(x, y, z) CHN_INSERT_SORT(>, x, y, z) #define CHN_INSERT_SORT_DESCEND(x, y, z) CHN_INSERT_SORT(<, x, y, z) #define CHN_BUF_PARENT(x, y) \ From nobody Sun Oct 20 11:21: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 4XWbcF3w1vz5Yvmx; Sun, 20 Oct 2024 11:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcF0vYsz4Wdn; Sun, 20 Oct 2024 11:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B530ySfvqRwTpmVYhVGrfyCuFH81G8wmmM6kxiA65dA=; b=C04QuBbts7huYcyBBAy5/wiVbJ7TC4pwtPuXjG6kLyJUcDHQU75MULOro7OEqMWsFNoYsv Kd9o3YyWNjDGa/nwGDLdKv0zYxLZ6bz2uEfm4DdDFDI2DbGqtxDV9WfHWvwu/tOiu2S0tG MVpI5jsujeQIWfd/gEpKVam28h4Yx5Xd2LM6tIgccTUn3oaqwAFk1dcaTZgLRXaz56wD+s +R79Ac0htejwkKH8XmMuu4x9tyG+JOW5jvKdQclpCfhHdl8snDqyxgclOWHORhvQTI+3Uw Ql2GfeBoFwTHHDVkiYzak8/lyCdcq1BdIFg1H2RGbv8e4wf3M0RwSvPfzhROsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B530ySfvqRwTpmVYhVGrfyCuFH81G8wmmM6kxiA65dA=; b=xTE38U6kfwV56XQjf83fGSualtDWBToYXhp0Zez4CV3KfZgKc5D7+PIn6E/qPQQgM2dnmJ fAe6erQk/IQ496f9WCiG8LGtV3hkZWYRWJnkmuPkGpyR6TnPkGkhT1wIYCwQn3utpfYhBL V30GI3bXF6n8wkXPaMYEU0fZChCHHJEHoxFI1yM2NwGFAUPuck6nf6NUnzH6BZ0MsnjOfw q4uJmDefyVPZjzLAaAqPmaacAuNzBMFz2A17RawTh2hyBIfhUKLPuI1BhphyDFt6F5Jksr Zuc6DKS+JMDL4pseOxP4wOwlQ7DTWnSwb/zzTG5qdabMnPVqWie5kd2PExWA2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423293; a=rsa-sha256; cv=none; b=U27T0cw7LBcI2R+8dF4YZY3FdNjnB6SXrCshh/hU89H5AE/Z/2yw5BonRq2ARetmqACh+o v/fgYD9rQvCpM5B3oxzsFBILxn0K9uLfL+E43kWl1LI+HnHD9ec+kO3m8JG1oNnkXnb/Oo vPkxB+Q1YYCI6Bdg2ODN9yNdZgKThzI/SisUw3SPL6dbzGQUaRy5D/TCnq8PCAJMtN3KDw y161ZjtfwKAw0PntMrJ4xO7zMiCvDfk2BC35fqJJvgfP/qYOYJ7l/g6PV+vD0wA9KTR2so OhkWJhDUeyNw8yzN52cmk1lAj+aYugqVif16qcdZF2GoyTnx1v1OKzcPi6Ck9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcF08T8z10Vl; Sun, 20 Oct 2024 11:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLWIe062621; Sun, 20 Oct 2024 11:21:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLWUO062617; Sun, 20 Oct 2024 11:21:32 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:32 GMT Message-Id: <202410201121.49KBLWUO062617@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 463eafcff98f - stable/14 - sound: Use unr(9) to produce unique channel unit numbers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 463eafcff98f8036cef0e2f7e00ecd0a8e5437d4 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=463eafcff98f8036cef0e2f7e00ecd0a8e5437d4 commit 463eafcff98f8036cef0e2f7e00ecd0a8e5437d4 Author: Christos Margiolis AuthorDate: 2024-10-18 08:39:08 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:04 +0000 sound: Use unr(9) to produce unique channel unit numbers Currently it is possible to assign a unit number that already exists. Suppose the following channel list: [vp2] If we create 3 channels, we'll end up with the following list: [vp0, vp1, vp2, vp2] This happens because chn_init() does not check if the unit number we are assigning already exists. While fixing this is trivial when the channel list is sorted in ascending order, it is way more involved when sorted in descending order. Even though sorting the list in descending order would require deliberately modifying pcm_chn_add(), and is most likely not going to happen, make the mechanism more robust by using a unr(9) allocator for each channel type. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46680 (cherry picked from commit ad4c8671bddaa30bf0413089c74dde6a618d9021) --- sys/dev/sound/pcm/channel.c | 31 ++++++++++++++++++++++--------- sys/dev/sound/pcm/sound.c | 12 ++++++++++++ sys/dev/sound/pcm/sound.h | 4 ++++ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index bf9c74e2ed1d..d1c9bc616dcf 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1157,6 +1157,24 @@ chn_reset(struct pcm_channel *c, uint32_t fmt, uint32_t spd) return r; } +static struct unrhdr * +chn_getunr(struct snddev_info *d, int type) +{ + switch (type) { + case SND_DEV_DSPHW_PLAY: + return (d->p_unr); + case SND_DEV_DSPHW_VPLAY: + return (d->vp_unr); + case SND_DEV_DSPHW_REC: + return (d->r_unr); + case SND_DEV_DSPHW_VREC: + return (d->vr_unr); + default: + __assert_unreachable(); + } + +} + struct pcm_channel * chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, int dir, void *devinfo) @@ -1165,7 +1183,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, struct feeder_class *fc; struct snd_dbuf *b, *bs; char *dirs, buf[CHN_NAMELEN]; - int i, direction, type, unit; + int i, direction, type; PCM_BUSYASSERT(d); PCM_LOCKASSERT(d); @@ -1198,13 +1216,6 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, return (NULL); } - unit = 0; - CHN_FOREACH(c, d, channels.pcm) { - if (c->type != type) - continue; - unit++; - } - PCM_UNLOCK(d); b = NULL; bs = NULL; @@ -1216,7 +1227,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, CHN_INIT(c, children.busy); c->direction = direction; c->type = type; - c->unit = unit; + c->unit = alloc_unr(chn_getunr(d, c->type)); c->format = SND_FORMAT(AFMT_U8, 1, 0); c->speed = DSP_DEFAULT_SPEED; c->pid = -1; @@ -1304,6 +1315,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, return (c); fail: + free_unr(chn_getunr(d, c->type), c->unit); feeder_remove(c); if (c->devinfo && CHANNEL_FREE(c->methods, c->devinfo)) sndbuf_free(b); @@ -1335,6 +1347,7 @@ chn_kill(struct pcm_channel *c) chn_trigger(c, PCMTRIG_ABORT); CHN_UNLOCK(c); } + free_unr(chn_getunr(c->parentsnddev, c->type), c->unit); feeder_remove(c); if (CHANNEL_FREE(c->methods, c->devinfo)) sndbuf_free(b); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 1aaf614078a4..f9c87facfeec 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -568,6 +568,10 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec) d->pvchanformat = 0; d->rvchanrate = 0; d->rvchanformat = 0; + d->p_unr = new_unrhdr(0, INT_MAX, NULL); + d->vp_unr = new_unrhdr(0, INT_MAX, NULL); + d->r_unr = new_unrhdr(0, INT_MAX, NULL); + d->vr_unr = new_unrhdr(0, INT_MAX, NULL); CHN_INIT(d, channels.pcm); CHN_INIT(d, channels.pcm.busy); @@ -653,6 +657,14 @@ pcm_unregister(device_t dev) cv_destroy(&d->cv); PCM_UNLOCK(d); snd_mtxfree(d->lock); + if (d->p_unr != NULL) + delete_unrhdr(d->p_unr); + if (d->vp_unr != NULL) + delete_unrhdr(d->vp_unr); + if (d->r_unr != NULL) + delete_unrhdr(d->r_unr); + if (d->vr_unr != NULL) + delete_unrhdr(d->vr_unr); if (snd_unit == device_get_unit(dev)) { snd_unit = pcm_best_unit(-1); diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 5f32dd767fe8..2de6ab29bd66 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -325,6 +325,10 @@ struct snddev_info { struct sysctl_ctx_list play_sysctl_ctx, rec_sysctl_ctx; struct sysctl_oid *play_sysctl_tree, *rec_sysctl_tree; struct cv cv; + struct unrhdr *p_unr; + struct unrhdr *vp_unr; + struct unrhdr *r_unr; + struct unrhdr *vr_unr; }; void sound_oss_sysinfo(oss_sysinfo *); From nobody Sun Oct 20 11:21: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 4XWbcG4chLz5YvRJ; Sun, 20 Oct 2024 11:21:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcG1XPjz4Wqj; Sun, 20 Oct 2024 11:21:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uzrmdk3KSb4szpy7c9sqpGpF93yDN01QdzKNE9CCuyQ=; b=l1LRySdneiM/sQ59xWAOS+56lnON5onYM9Qj1WtA5demrjNJM+y4o17TV40AR/8H37vEyg SicFK+0zArprkzWcSDAoxg466XLE8G7e3jBiXLrn0+W/8ZX29jFtBLgZCgw9rcvGtxrsVt DNjALIcKOOhuTJKok8rmCSUM7HqBH+DH3N1dLcGYC2PD0dIexm92lZGSc7aHZKHngncw5Z kDSrF0URfZQMI0mvQCij/mQJDaIHRpTbNxWJnIhab5jYM+Uhf1GwvOr6oddaHIGQGmRNb/ 53qfXIM0CrnrfGBbctKmddqmQGHQ6JiArX+jaRdpYY5+eJJMo5ky10EyTtcpjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uzrmdk3KSb4szpy7c9sqpGpF93yDN01QdzKNE9CCuyQ=; b=SR0hR8ksnxiGbMpSrDTt039GktGXFWHNXgFno2tORfocxjyaItyn+MUJC76ILeUV/NSI/m bQA0UqB3wVGPoKL+JXfiJ8P09dTLG/66ihXrs6xS4Ouw4akLbbalD/i7jCOfVR57Ui+oXV Db1tIR73wL2WwdJ58KD2qM1GUMOBqXR5vmxF/xzzNs7AJkau1m2iPDogQ+xFxWvBlwjEXn ZB0WiqOSKy1TO3zAGeFMsmkpjMhcRxnuOB/2bYz8Ntx0fVRgAPH+WtjaNwSLg+80In1mAm HzutOrwRtZjjmF+MBJPZcwjYLuhKVhsDKP8DRRkVOtFpfEWAXmCH66f3PkQJ+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423294; a=rsa-sha256; cv=none; b=BvLqEMBSLHHtQRNAeEgvAi24kLmOnSOgJ2KQgtY9JijSSb0hobCHNrsXaJrnjv/V3dLc2I 2KerSQYwbfQC1yYqk/0mxDEr+IacqyXIE5kcVQdMY36UWi1q89Yj2qKbbYn48iAYU4TY7w hAFU6jEdIk9J0ZpTgSvHUMoW8PqJC72y3/94r4e/ZX2wv6F9qdk5vKMl9104zLjXH1Ea7S QPjb2nRh4+kYUplfF61+KyXRGUthK/hp3wAQ1yW2g9kcwAPnvUefT5X9/P9SnOWozvIu/3 GA01tawjgO/3yv1UAm+WB5eAO5jr9KXfMEXokoYbYH+cqdnNmB7IPJPhqdVS8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcG171Fz108L; Sun, 20 Oct 2024 11:21:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLYaq062673; Sun, 20 Oct 2024 11:21:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLYxE062670; Sun, 20 Oct 2024 11:21:34 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:34 GMT Message-Id: <202410201121.49KBLYxE062670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 1b0acff71fe8 - stable/14 - sound: Fix indendation in sound_modevent() switch statement List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1b0acff71fe8dbaf62afc32b51d8eaa2fa39862d Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1b0acff71fe8dbaf62afc32b51d8eaa2fa39862d commit 1b0acff71fe8dbaf62afc32b51d8eaa2fa39862d Author: Christos Margiolis AuthorDate: 2024-10-18 08:39:15 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:04 +0000 sound: Fix indendation in sound_modevent() switch statement Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46856 (cherry picked from commit 41ff4177614562923a30e2541e2a15883a4ce32c) --- sys/dev/sound/pcm/sound.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index f9c87facfeec..330c99de14d1 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -836,20 +836,20 @@ sound_modevent(module_t mod, int type, void *data) ret = 0; switch (type) { - case MOD_LOAD: - pcm_devclass = devclass_create("pcm"); - pcmsg_unrhdr = new_unrhdr(1, INT_MAX, NULL); - break; - case MOD_UNLOAD: - if (pcmsg_unrhdr != NULL) { - delete_unrhdr(pcmsg_unrhdr); - pcmsg_unrhdr = NULL; - } - break; - case MOD_SHUTDOWN: - break; - default: - ret = ENOTSUP; + case MOD_LOAD: + pcm_devclass = devclass_create("pcm"); + pcmsg_unrhdr = new_unrhdr(1, INT_MAX, NULL); + break; + case MOD_UNLOAD: + if (pcmsg_unrhdr != NULL) { + delete_unrhdr(pcmsg_unrhdr); + pcmsg_unrhdr = NULL; + } + break; + case MOD_SHUTDOWN: + break; + default: + ret = ENOTSUP; } return ret; From nobody Sun Oct 20 11:21: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 4XWbcH5j5wz5YvYV; Sun, 20 Oct 2024 11:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcH2FVNz4WZ6; Sun, 20 Oct 2024 11:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qgCFa9J9ejPZnjZbWbk/0AkARVvmusytk2eX5JKc18I=; b=n7uP1OlPFnvE5Tm0igMweZHbQARypazuWESBkwIZruh1Us+szFV1cT9fPILGc5zBZcHgoy UTxwF5xEvU7Ncgd19aj+LtOeoSvQAUjHlu4repLWOb8DXmP883nUgeuuzNJp1+nNGxHS7t ciFYFdPrvE9+xZyJHKtSBBZgLnhzsKEO+HB5xxniz3X+VzmtR20l2V2aSHixo2Ca/VVnR9 Qh9gn+u/IXG49P3YcRl23CjdFHDb0YrJ7IvvNtbIw6tC3XTq1OSrzjQ2+0WOKjErzp5fv9 iFvx455MBuQ2j6JfpI/eho8bhgvG152cowmoJnSmjpK+TJoxFHRXW1Sz2wMPlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qgCFa9J9ejPZnjZbWbk/0AkARVvmusytk2eX5JKc18I=; b=xiEM4/nkpPXC/GBYj8/6Y+pOM/2wiW9yGc97IjZIlm+FgaGQA/7pEwCqdl68myjJQ4+Ph4 zZ5ViHmlKas/l8IH/lZUFCy7cbAav+LB8MobZSimNCKoJ3cKtDTxCxLc0m6ujrnfyM8v9t cLyZEX0+3pCU2eyBO/0m+9yWVgp0/N1M5eFaZ8fMagE8BOuUlA6RmaQ6bFVhubMuVWS0Zj KA3MseVsGF4s4BCh155xq2pgsvlLO1esnTN0MMzhv0vyXJgtK/hqoCHPDLmFJx6wJ2ACPp lRqmUpgVJF1l9PjLkc8bSDWLgd7oS1o9rJzMAeBCxF7s9xptIUrqjPuXCh8rGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423295; a=rsa-sha256; cv=none; b=agHnPlfVFzqR2/he04OC25epFm+yMZEW6bhSZYrQNuOg7uNcM99BkLqz9sVSVgPMpf23gw MoCJVk+3OyYPpxA2gZ7DGp+ElFlaFTmq+Ev29E0XfPVuA1C4zJdQa4PivQnRyHuux9NwMv EMjM5RykimeCxgw+8HNCSHDnvKOVITzU1Y1JkrnmUZ66/CkhKMsWTJvjpZVSCGGX2WwA/K KJnTGzNjEfA0XFPTULY9otrq38iq5gZFQoZuEE0xQR0e6meKxIXnMuFBEbRMV85xi4RRIp c9TwBEk5xqCT+HUnFSnPsIivIJ5X/Nr6Hob/AQAOEpg20/yqYXOBOMkZuXOViA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcH1rVLz108M; Sun, 20 Oct 2024 11:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLZvs062724; Sun, 20 Oct 2024 11:21:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLZc1062718; Sun, 20 Oct 2024 11:21:35 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:35 GMT Message-Id: <202410201121.49KBLZc1062718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 6cf4db422c21 - stable/14 - sound: Move global variable initialization to sound_modevent() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6cf4db422c21ab4a0c39ed3f7c5f5d864c8ea2a2 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6cf4db422c21ab4a0c39ed3f7c5f5d864c8ea2a2 commit 6cf4db422c21ab4a0c39ed3f7c5f5d864c8ea2a2 Author: Christos Margiolis AuthorDate: 2024-10-18 08:39:46 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:04 +0000 sound: Move global variable initialization to sound_modevent() There is no reason to initialize global variables in feeder_register(), as these variables are unrelated to what the function does. Instead, initialize them during sound(4) load. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D46749 (cherry picked from commit 0a0301deb5b6a9c66829dd20cff9d40c5ba9ad92) --- sys/dev/sound/pcm/feeder.c | 43 ------------------------------------------- sys/dev/sound/pcm/sound.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 43 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 716eb07feaae..87437c6d00b5 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -77,49 +77,6 @@ feeder_register(void *p) SLIST_INSERT_HEAD(&feedertab, fte, link); feedercnt++; - /* initialize global variables */ - - if (snd_verbose < 0 || snd_verbose > 4) - snd_verbose = 1; - - if (snd_unit < 0) - snd_unit = -1; - - if (snd_maxautovchans < 0 || - snd_maxautovchans > SND_MAXVCHANS) - snd_maxautovchans = 0; - - if (chn_latency < CHN_LATENCY_MIN || - chn_latency > CHN_LATENCY_MAX) - chn_latency = CHN_LATENCY_DEFAULT; - - if (chn_latency_profile < CHN_LATENCY_PROFILE_MIN || - chn_latency_profile > CHN_LATENCY_PROFILE_MAX) - chn_latency_profile = CHN_LATENCY_PROFILE_DEFAULT; - - if (feeder_rate_min < FEEDRATE_MIN || - feeder_rate_max < FEEDRATE_MIN || - feeder_rate_min > FEEDRATE_MAX || - feeder_rate_max > FEEDRATE_MAX || - !(feeder_rate_min < feeder_rate_max)) { - feeder_rate_min = FEEDRATE_RATEMIN; - feeder_rate_max = FEEDRATE_RATEMAX; - } - - if (feeder_rate_round < FEEDRATE_ROUNDHZ_MIN || - feeder_rate_round > FEEDRATE_ROUNDHZ_MAX) - feeder_rate_round = FEEDRATE_ROUNDHZ; - - if (bootverbose) - printf("%s: snd_unit=%d snd_maxautovchans=%d " - "latency=%d " - "feeder_rate_min=%d feeder_rate_max=%d " - "feeder_rate_round=%d\n", - __func__, snd_unit, snd_maxautovchans, - chn_latency, - feeder_rate_min, feeder_rate_max, - feeder_rate_round); - /* we've got our root feeder so don't veto pcm loading anymore */ pcm_veto_load = 0; diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 330c99de14d1..da28a267c81a 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -829,6 +829,51 @@ sound_oss_card_info(oss_card_info *si) /************************************************************************/ +static void +sound_global_init(void) +{ + if (snd_verbose < 0 || snd_verbose > 4) + snd_verbose = 1; + + if (snd_unit < 0) + snd_unit = -1; + + if (snd_maxautovchans < 0 || + snd_maxautovchans > SND_MAXVCHANS) + snd_maxautovchans = 0; + + if (chn_latency < CHN_LATENCY_MIN || + chn_latency > CHN_LATENCY_MAX) + chn_latency = CHN_LATENCY_DEFAULT; + + if (chn_latency_profile < CHN_LATENCY_PROFILE_MIN || + chn_latency_profile > CHN_LATENCY_PROFILE_MAX) + chn_latency_profile = CHN_LATENCY_PROFILE_DEFAULT; + + if (feeder_rate_min < FEEDRATE_MIN || + feeder_rate_max < FEEDRATE_MIN || + feeder_rate_min > FEEDRATE_MAX || + feeder_rate_max > FEEDRATE_MAX || + !(feeder_rate_min < feeder_rate_max)) { + feeder_rate_min = FEEDRATE_RATEMIN; + feeder_rate_max = FEEDRATE_RATEMAX; + } + + if (feeder_rate_round < FEEDRATE_ROUNDHZ_MIN || + feeder_rate_round > FEEDRATE_ROUNDHZ_MAX) + feeder_rate_round = FEEDRATE_ROUNDHZ; + + if (bootverbose) + printf("%s: snd_unit=%d snd_maxautovchans=%d " + "latency=%d " + "feeder_rate_min=%d feeder_rate_max=%d " + "feeder_rate_round=%d\n", + __func__, snd_unit, snd_maxautovchans, + chn_latency, + feeder_rate_min, feeder_rate_max, + feeder_rate_round); +} + static int sound_modevent(module_t mod, int type, void *data) { @@ -839,6 +884,7 @@ sound_modevent(module_t mod, int type, void *data) case MOD_LOAD: pcm_devclass = devclass_create("pcm"); pcmsg_unrhdr = new_unrhdr(1, INT_MAX, NULL); + sound_global_init(); break; case MOD_UNLOAD: if (pcmsg_unrhdr != NULL) { From nobody Sun Oct 20 11:21: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 4XWbcJ4V5sz5YvTY; Sun, 20 Oct 2024 11:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcJ3ZsQz4Wc5; Sun, 20 Oct 2024 11:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BZN6ijW9ZLddhDxkAplp2jQRoWR2H6glzmkV/T8sTio=; b=cd6WaU9H9YatXKEAUPqN5f455w8fKloN/8ROCY55ZdiSk/rIyHYgEyTBBN4cK61bRNX3Ta PBmB26YHfpn0XkXuyp/fDQd3h9/8aq8bhWu4kecGjgnpUQmuUnpL5sNssFabTzrhMUtfJZ y2bSSWcFyLr08yVneY14ZcTcXRMgRHKEFLpIWelS3Bmo0UuB8CHEFR16kG5X6kADdH19k+ F1q3Od3rKSNFUigUMXU/SOEnzlqUvfRqP4sNWPdQhqLi2Ah3CbaztECHcUqUfGQcZxpcVi qEECvK/KBM1T4aKEOKuR2HamoR2a8F6+4Br5wsCHQ3sRkEn1Cp0nTHzOxuYmdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BZN6ijW9ZLddhDxkAplp2jQRoWR2H6glzmkV/T8sTio=; b=wxQg9gGAeqrfkNf461cnJrp3I3QczvE9Bb1o0mPbak1rvqOTvOZY5ZkJiuyoCknwuzU2We PWBOcaRiAg3MISbD8Yx0NQ0UPou/SmUrECfRvjStVHW99chtagUoD9F+rc5fYmlYFkLl0l q2N/AOlS12spqGryc9Ely5e9eRIHH+kwZYgD53wLgyulCVZefuOmeqv1xAXS9b4NNTX2JC uVlBm3b8zFouWJrUfrzuvrN7lznBJDvYDp83VcTazbt0wX7Ng3YOykZTsyui1I6uM8yxS6 sqmuW3HV5P+LdY0n+bYzvq95qhLnEBroo2cNMgsp/B4vSVZSI1mK5SZX2YPr5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423296; a=rsa-sha256; cv=none; b=O5tQNn2NS3X7J6INO3biE83loXwvIJHOZnXGGNoakhyVnCghRQwK2vRO26dtvR4plx7Ffj BJ6G2zJk/2A5kJeCKPERG3zJ31n8v+5wELZSNevtxJCNkt54DByrZVcUzS8DjLBoC+mbtb Pt1P5JYMVz7HNBiGPm93tyrGFHvEsA5PSalG1EJgayUXy5oZgQUpXMc84hvI5XQDkirnRD I9uHxEV93xnTCDGnQPsvZQN9yVZOcnyhpCV/eFJ6F1qZ4xzIkJ+RN0A5ZicOYaCUROZUyo 1ZRqxZC49tX687eXsZjK8WanaCmQ/FPTYoid6hyO0jGtT/kM46T4YcvqsBi20g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcJ3CBPz108P; Sun, 20 Oct 2024 11:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLaiH062776; Sun, 20 Oct 2024 11:21:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLaEK062773; Sun, 20 Oct 2024 11:21:36 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:36 GMT Message-Id: <202410201121.49KBLaEK062773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 1f4d968a299e - stable/14 - sound: Move root feeder initialization to separate function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1f4d968a299ea74f10276761932c2ece28531975 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1f4d968a299ea74f10276761932c2ece28531975 commit 1f4d968a299ea74f10276761932c2ece28531975 Author: Christos Margiolis AuthorDate: 2024-10-18 08:39:58 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:05 +0000 sound: Move root feeder initialization to separate function feeder_register() is currently a SYSINIT in order to create the root feeder, which happens only when feedercnt is 0. Separating the root feeder registration makes the code more readable. No functional change intended. While here, fix some style errors. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, zlei, markj Differential Revision: https://reviews.freebsd.org/D46821 (cherry picked from commit 97570db05ced435f4fb1c6a67bdb16966ce5e4d9) --- sys/dev/sound/pcm/feeder.c | 69 +++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 87437c6d00b5..c6f93ac54036 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -48,51 +48,55 @@ struct feedertab_entry { int idx; }; static SLIST_HEAD(, feedertab_entry) feedertab; +static int feedercnt = 0; /*****************************************************************************/ -void -feeder_register(void *p) +static void +feeder_register_root(void *p) { - static int feedercnt = 0; - struct feeder_class *fc = p; struct feedertab_entry *fte; - int i; - - if (feedercnt == 0) { - KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name)); - - SLIST_INIT(&feedertab); - fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO); - if (fte == NULL) { - printf("can't allocate memory for root feeder: %s\n", - fc->name); - return; - } - fte->feederclass = fc; - fte->desc = NULL; - fte->idx = feedercnt; - SLIST_INSERT_HEAD(&feedertab, fte, link); - feedercnt++; - - /* we've got our root feeder so don't veto pcm loading anymore */ - pcm_veto_load = 0; + MPASS(feedercnt == 0); + KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name)); + SLIST_INIT(&feedertab); + fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO); + if (fte == NULL) { + printf("can't allocate memory for root feeder: %s\n", fc->name); return; } + fte->feederclass = fc; + fte->desc = NULL; + fte->idx = feedercnt; + SLIST_INSERT_HEAD(&feedertab, fte, link); + feedercnt++; + + /* we've got our root feeder so don't veto pcm loading anymore */ + pcm_veto_load = 0; +} + +void +feeder_register(void *p) +{ + struct feeder_class *fc = p; + struct feedertab_entry *fte; + int i; KASSERT(fc->desc != NULL, ("feeder '%s' has no descriptor", fc->name)); - /* beyond this point failure is non-fatal but may result in some translations being unavailable */ + /* + * beyond this point failure is non-fatal but may result in some + * translations being unavailable + */ i = 0; while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) { - /* printf("adding feeder %s, %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); */ fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO); if (fte == NULL) { - printf("can't allocate memory for feeder '%s', %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); - + printf("can't allocate memory for feeder '%s', " + "%x -> %x\n", + fc->name, fc->desc[i].in, fc->desc[i].out); return; } fte->feederclass = fc; @@ -103,8 +107,10 @@ feeder_register(void *p) i++; } feedercnt++; - if (feedercnt >= MAXFEEDERS) - printf("MAXFEEDERS (%d >= %d) exceeded\n", feedercnt, MAXFEEDERS); + if (feedercnt >= MAXFEEDERS) { + printf("MAXFEEDERS (%d >= %d) exceeded\n", + feedercnt, MAXFEEDERS); + } } static void @@ -469,5 +475,6 @@ static struct feeder_class feeder_root_class = { .desc = NULL, .data = NULL, }; -SYSINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_register, &feeder_root_class); +SYSINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_register_root, + &feeder_root_class); SYSUNINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_unregisterall, NULL); From nobody Sun Oct 20 11:21: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 4XWbcL6SZsz5YvWL; Sun, 20 Oct 2024 11:21:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcL5LPjz4WxY; Sun, 20 Oct 2024 11:21:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z1v+D+vo/LLfZr0JYEj0HxMQUcaeOTonCEyhUM5ijCY=; b=neu/tdyiHDyHVxKeDrVg4/O1Ql0hhRjQu8I8g0EZBNJEdBy/A/EOCiNC3IhC/dlcl5d2OU KL3xhnsuHY1t98YpcVBguD2g9FKcQDkPNeimZcW3Oi3hxecQKDFC5iEKyX+l+wV+azDsvH OE+yUIK3PaJabAf74xmqZcq7zbdPtfNUXpK2A983AL3mPq1wu9IQ/My+nBVUzfyzR107+H eMFQRuurmKEbMfj74EtTT+nVmglWtHRbW+zVr+0DdCBfO7AvruTqZu8XL+s9ZKQFmEJfyf aK8RVKJZecUbzetbSMvd/vZlPIwyCLMo+c0dp0hnB/QFNaO4ztw11kdKT1mgWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z1v+D+vo/LLfZr0JYEj0HxMQUcaeOTonCEyhUM5ijCY=; b=qr3QAXHt1wmEZai9ZAu/I9dQX3ebiyKjO7VoGEYOJoXA9l99IBoWTpcdLY+3y8erLYNAKL dm/xRjaixLDUYnkFW2OXb24lNvxi2V4dRWDtj8MkC4YjV6Ra43pmpNEYaYRNM6ditlZSOJ rZkVMyqrs091oI9fWJ3lBRQySL2FF7ZiiobOWVmGGlUXHLigUn8Eguo7dQ1+gqnOvuNWqN 6YFpQdw9QG9Zt3Xlb+hOnfGeaZuPEROMqcuQHjR68BvBKLO+JycCOcxjM2gN6udARYpX9I zGIebScY2LhrOJkpC9aOh/fK2Ni5GnMoDl8BPnGQbPlTItsX3TxsySbS3m8sRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423298; a=rsa-sha256; cv=none; b=B3NeIYfOvKk8tCRDUAH7NPEdYJJI/74mI8Bz2Cbf6YYE0ZQWPH5BdcIelpRZwDaX7uZ/XZ ANdC2aaPIpnmwmPqVjtKwz9KoA4eyvPP/wWLZpR/3nBJs9Z25D8QRVPNOUCWHmtcJrHYSf mh5NuUlCYlkDKPRsvhco9TAkFpie2JHX5RHTGc/I+vYrZ3aii3WMCnqBzbEcyndSfaMHvl SbEAIcL+mWafDwKwnGTXZmS2HEOOXrC1vHyNUiVLYBYrZBIIzTTONixmuCEWDZel4/WXD0 n3ecBV+S7p9NUl0d+/YOcIiSMLrp6tna4zRqDu67SFeKoGaoED+uU2AA8+47JQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcL4dJbz108Q; Sun, 20 Oct 2024 11:21:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLcYw062875; Sun, 20 Oct 2024 11:21:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLcwi062872; Sun, 20 Oct 2024 11:21:38 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:38 GMT Message-Id: <202410201121.49KBLcwi062872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: ebdf08844534 - stable/14 - sound: Retire SND_MAXHWCHAN List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ebdf0884453453a50b5c1c446e930d64407be27f Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ebdf0884453453a50b5c1c446e930d64407be27f commit ebdf0884453453a50b5c1c446e930d64407be27f Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:16 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:05 +0000 sound: Retire SND_MAXHWCHAN No longer used. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46522 (cherry picked from commit 248aced26eee6f569717618d097bc2205a93c800) --- sys/dev/sound/pcm/sound.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 2de6ab29bd66..51c9c91f6f20 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -99,11 +99,7 @@ struct snd_mixer; #define SOUND_PREFVER SOUND_MODVER #define SOUND_MAXVER SOUND_MODVER -/* - * By design, limit possible channels for each direction. - */ -#define SND_MAXHWCHAN 256 -#define SND_MAXVCHANS SND_MAXHWCHAN +#define SND_MAXVCHANS 256 #define SD_F_SIMPLEX 0x00000001 #define SD_F_AUTOVCHAN 0x00000002 From nobody Sun Oct 20 11:21: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 4XWbcL04gFz5YvJl; Sun, 20 Oct 2024 11:21:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcK49Jkz4X2W; Sun, 20 Oct 2024 11:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7AYKu8DrrfiwEVyVEvyzske1jdEgdBmTC+1VTko1S2A=; b=xf0JCZq3xJCApOEGF7IEu8L3xYp1crAgUM8rNUNKVxOYRjdDd+QSI8VTb7ZS2skD1PvGe6 gpIHK92EUTiOyBgHR+OtbecDBTooe6pOtbJ1n9tPlKAx5YV/ZL9h/wHeHK2JPCzKW4eYoY 4iLdtkqafISXMDr/owjajAIaP4e/nfWXSwkwoS/hBUJ4IpREOFl49nYC+Jbpyed53d8Ccl MwgJ+92dWA+BbtrC/vtCclmRlbW4ZrsYyiVPdP9qxX5cnimGAwFgSw75xwgRfxEZXqdJKj fdNElko35c0BErbdVODUcxlmlEnm3aFGUaA7sSkk/cF0HiMVI9LYeS3oNH4TZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7AYKu8DrrfiwEVyVEvyzske1jdEgdBmTC+1VTko1S2A=; b=C2ggFyQIuXcA2EcwI3k0mcdZK/sxfbUxfykkEkqrVflr634zNIDec3EVuU82qQhE/8cOAA XFDT7XP/1l2CUBy7pp1U+USaFyKeboDVXDNVrMmr7YL5hSqYx8hUFw0+5rN73EVMz+XCpJ hF94Kaepq+pHnKyePO84EgrHlQIj2SVwBRPULlPb0a50kRHXa6YsaHbypmX2YnrERrlvaR p3OpEzMp89WrhaP2ZcvzuyWWCuDLrTbFmy7N9a+na3mmFLJRJeJk/G1cw8N+E98JrOVc8U JyhfBvooxy3ETo6Td2qLwjPlvVNz/Mvf2rjsFA7tjNo+8YzySiFePssWckJLdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423297; a=rsa-sha256; cv=none; b=vtfLcy3yWlGCTBlL4/GsRXRGfktsoE3z9WI2U1DIqhfviVh1FTg3BpLzqRw/3E8TRFwpjF N8coKUHp7EJBf4p8iYaH7XOFjvI+nLzP1mh8rUUMZaPF948y7PBY1cYXl3hj4tqUMAApbs /WSpOV01fr8VqlBygc0q9uKNHdC/mzpeJss5WtxGNW2uf7qKfyIc3qWwiCCYfQh9boCSne e5b9OkW0N4g2JoHZAyLAHbu1HMZ2OasdWGLG0bdqeaZSjjHmY7E69hL8UjrYJVWLNtbaud KLFydETi9D1Rp+dJoTifkm63Qkf95ajCSqji+un6k1W3prSr4c1M5+X6z/zr9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcK3lkqz10Lm; Sun, 20 Oct 2024 11:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLba8062833; Sun, 20 Oct 2024 11:21:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLbIA062830; Sun, 20 Oct 2024 11:21:37 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:37 GMT Message-Id: <202410201121.49KBLbIA062830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 8065f1af82d1 - stable/14 - snd_dummy: Drain callout during detach List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8065f1af82d1443c83168a3e8dd82afc5f658d24 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8065f1af82d1443c83168a3e8dd82afc5f658d24 commit 8065f1af82d1443c83168a3e8dd82afc5f658d24 Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:08 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:05 +0000 snd_dummy: Drain callout during detach If we do not enter dummy_chan_trigger() before detaching, we'll get a use-after-free since the callout(9) callback might be called after having been detached. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D46715 (cherry picked from commit e42c8267821952407d4f4064026058aeaaa741ac) --- sys/dev/sound/dummy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index f8193a73fcc8..c1cd4dff15f9 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -327,6 +327,7 @@ dummy_detach(device_t dev) struct dummy_softc *sc = device_get_softc(dev); int err; + callout_drain(&sc->callout); err = pcm_unregister(dev); snd_mtxfree(sc->lock); From nobody Sun Oct 20 11:21: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 4XWbcN02wqz5YvTm; Sun, 20 Oct 2024 11:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcM6223z4X4q; Sun, 20 Oct 2024 11:21:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aZQe67AzrhKb0qdZDGoYFRupNxQjV1HGZpMPxs5v/mA=; b=D9PWO1scE3xhtOW76v2Y8oGom/SMr4Hat33ftKuVFVA5+DasCimtqCjhubXV01+9Ct870u Rr8B7atA7ZDkGxKF232cB9XmAQgA2vcig0s3kMQFlIaxQ+ruQArXyQzpQgXtCIVvulQh23 FzTKRXmcuieWso4CDVZg/wmCW8Bfc5nIOHX/oPM8vbNsyJSGIPUtYTvwFSL1BXn2rdVj8K DKyTsvsg+XMKMgwoV5q+Vixlt7rHg2GW64xedLOpksjKIpTYrEf0lxPXU2fFu0s/1akWv1 lZDIuvJII3cb9PgTdbDwgf3DxTwYopmkFl2E9SEc1kT5tAAOqZnIJlaoe7COyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aZQe67AzrhKb0qdZDGoYFRupNxQjV1HGZpMPxs5v/mA=; b=aRsmGKdzYpNTExSU4Y/f37uXT+JVgdI1iLCN6oJRS7dQdrMMiXrpflhHSnEl2hfzcca6VD WyuxYTx9+yD4ZhLzFNv4ACMyXfWjMwoRmpb24RMeoVeAmXUbUMAcSkKoDFGL9JTkEvzxNM nnYV3YyNi9BVAZZYhKp904a3cgo2bqbb7RB3gVNGgr+CSumFgWPLCZSlwVEjydcqwBm5vT gc4XZogGLWvXvbQwXMf7upUNUIk6wgAVXeGbn6Ltz0563ZjaB9saQYUB9+MaO8bnvvUnQD Sf+ekshymTOu+wmwn+jD9GkkIfjCrr9Nad6c7CFbYdLTMbYp3i1vthOYWVf/eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423299; a=rsa-sha256; cv=none; b=svpc0z9ZkCNgmLUtoJQBDb4as1HmDwCboqwLCNe5zxj0KPRlZTNYVqt+otw/cq5V3ThcxO LVeZFErn8/F0y0bRAJB7Djzld7DUiygCIeC5FIn09Cp4fzG+jQsQJgD6nZk/E5GnruEwN7 F+ZgFLQcabWPOktXFMxNv72RQHn8U8kNGWS0T0myQKI8vcfUpuNNx/E88spRh8zUWFjhyd Yo/OPoHWTZyuuERYMrgErr3hbGFKUE9XxZVH1wjJ1ZtXau8DJ0wXXkk0MbG4W4XOhxGx0k fqx521mEDOfIgT9ZD6u8JuU0aJfvfLI6L0v9v/NxNBi1EfMmjimpeg54wx2jNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcM5fSWz108R; Sun, 20 Oct 2024 11:21:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLd6u062917; Sun, 20 Oct 2024 11:21:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLdtO062914; Sun, 20 Oct 2024 11:21:39 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:39 GMT Message-Id: <202410201121.49KBLdtO062914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: bf058bde2bca - stable/14 - sound: Simplify vchan_create() error paths List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bf058bde2bca4d7be03713cadc53be5d5377e983 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=bf058bde2bca4d7be03713cadc53be5d5377e983 commit bf058bde2bca4d7be03713cadc53be5d5377e983 Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:23 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:05 +0000 sound: Simplify vchan_create() error paths Instead of checking the value of "ret" multiple times, just set a goto label and jump there immediately in case of an error. While here, remove a redundant assignment to "d". Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D46833 (cherry picked from commit 3cab66d12d439357b948093756ca1af87967c8cc) --- sys/dev/sound/pcm/vchan.c | 76 +++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index c1ad9b9ec2ba..9046c144b41b 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -674,8 +674,11 @@ vchan_create(struct pcm_channel *parent) struct pcm_channel *ch; struct pcmchan_caps *parent_caps; uint32_t vchanfmt, vchanspd; - int ret, direction, r, save; + int ret, direction, r; + bool save; + ret = 0; + save = false; d = parent->parentsnddev; PCM_BUSYASSERT(d); @@ -688,8 +691,6 @@ vchan_create(struct pcm_channel *parent) parent->direction == PCMDIR_REC)) return (EINVAL); - d = parent->parentsnddev; - CHN_UNLOCK(parent); PCM_LOCK(d); @@ -728,14 +729,13 @@ vchan_create(struct pcm_channel *parent) parent->flags |= CHN_F_HAS_VCHAN; - ret = 0; parent_caps = chn_getcaps(parent); - if (parent_caps == NULL) + if (parent_caps == NULL) { ret = EINVAL; + goto fail; + } - save = 0; - - if (ret == 0 && vchanfmt == 0) { + if (vchanfmt == 0) { const char *vfmt; CHN_UNLOCK(parent); @@ -752,10 +752,10 @@ vchan_create(struct pcm_channel *parent) } if (vchanfmt == 0) vchanfmt = VCHAN_DEFAULT_FORMAT; - save = 1; + save = true; } - if (ret == 0 && vchanspd == 0) { + if (vchanspd == 0) { /* * This is very sad. Few soundcards advertised as being * able to do (insanely) higher/lower speed, but in @@ -773,26 +773,25 @@ vchan_create(struct pcm_channel *parent) RANGE(vchanspd, parent_caps->minspeed, parent_caps->maxspeed); } - save = 1; + save = true; } - if (ret == 0) { - /* - * Limit the speed between feeder_rate_min <-> feeder_rate_max. - */ - RANGE(vchanspd, feeder_rate_min, feeder_rate_max); - - if (feeder_rate_round) { - RANGE(vchanspd, parent_caps->minspeed, - parent_caps->maxspeed); - vchanspd = CHANNEL_SETSPEED(parent->methods, - parent->devinfo, vchanspd); - } + /* + * Limit the speed between feeder_rate_min <-> feeder_rate_max. + */ + RANGE(vchanspd, feeder_rate_min, feeder_rate_max); - ret = chn_reset(parent, vchanfmt, vchanspd); + if (feeder_rate_round) { + RANGE(vchanspd, parent_caps->minspeed, + parent_caps->maxspeed); + vchanspd = CHANNEL_SETSPEED(parent->methods, + parent->devinfo, vchanspd); } - if (ret == 0 && save) { + if ((ret = chn_reset(parent, vchanfmt, vchanspd)) != 0) + goto fail; + + if (save) { /* * Save new value. */ @@ -809,23 +808,24 @@ vchan_create(struct pcm_channel *parent) * If the parent channel supports digital format, * enable passthrough mode. */ - if (ret == 0 && snd_fmtvalid(AFMT_PASSTHROUGH, parent_caps->fmtlist)) { + if (snd_fmtvalid(AFMT_PASSTHROUGH, parent_caps->fmtlist)) { parent->flags &= ~CHN_F_VCHAN_DYNAMIC; parent->flags |= CHN_F_VCHAN_PASSTHROUGH; } - if (ret != 0) { - CHN_REMOVE(parent, ch, children); - parent->flags &= ~CHN_F_HAS_VCHAN; - CHN_UNLOCK(parent); - PCM_LOCK(d); - if (pcm_chn_remove(d, ch) == 0) { - PCM_UNLOCK(d); - chn_kill(ch); - } else - PCM_UNLOCK(d); - CHN_LOCK(parent); - } + return (ret); + +fail: + CHN_REMOVE(parent, ch, children); + parent->flags &= ~CHN_F_HAS_VCHAN; + CHN_UNLOCK(parent); + PCM_LOCK(d); + if (pcm_chn_remove(d, ch) == 0) { + PCM_UNLOCK(d); + chn_kill(ch); + } else + PCM_UNLOCK(d); + CHN_LOCK(parent); return (ret); } From nobody Sun Oct 20 11:21: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 4XWbcP3BK6z5YvYd; Sun, 20 Oct 2024 11:21:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcN72y7z4Wtl; Sun, 20 Oct 2024 11:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yMVW7otu8ZqbTedaOtiU/xrwughhjkUbTuQ8AYsGumk=; b=Ji2yMaF5UqLKEpPsRzPL5EtN/MPImt1GhFYjpRoxHpwzomwUMtNVwNSfbo01Y8Ujpjrjkw 0rl2oGJqqb4rnikfJfOP4iupVcZaVii2Aj3CysJRtEqHeL/pO/VpwB29lg8z7g/ZNgp4vd UxBcws01d9WVRlgOpyQ/HnpvygT1J3NjpoU4O4MU7GZ2EUXmUbaakYBhZDrmCQQPGIg19S eIaL3x40lkv0af4W99BS1QzFFv+VpUrBA4AI6RcyvfnKHyOAT1INvcmn9Ym5XtKVOcSDoU cz9TIGkMhyd2QA1t5NRtLJbQLdpJqCvcKYIRTsOo7aTAIgZv0QHjhlug4aKlTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yMVW7otu8ZqbTedaOtiU/xrwughhjkUbTuQ8AYsGumk=; b=uof7WaZuhplRRkK8BwUaTwh5EEhpcVd4yNJGBuz6+WH+oPNGpQ+BM/HIZFzRYbvbf6NwWk ZAEQLSHiUKvKcumM5ab15aYObTEo9GAQ2uVUbMjCDTBL5biIuav88BC0YREAfhXX6DnB+o SceLEC4EpWKturgWQagpQVUvtabtYdEGZBwmv0io3OjqDFYqG/iWuJEI39BjtUSCyQpbvv F7MQql0y/lhjMbih/S76qubBlFQRJDyhz+LddIivSYA6toLYuXzp/P1kjF8gzibQ/jCO3k g1CVkT4LkeZC/4dtGN8pIYxIi7/UcTvDuqLepORsUERSusrCCziK9RBbO2/1rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423301; a=rsa-sha256; cv=none; b=O73wkqAC3C3S7iCOelSNbSBgUy3T7O/VV5CNC37gbX/nMGdKlo5BEhVIYxjMGBaD9FdKC3 ehr4yVjD7lrIAfEH7FoPcVzBR7jHugPEqTdye6NZNy42JnEvAPre6QY9cz8yPonXH3JE+X qgVt3JOVG9SHZt5q4jnNVWGej6HXqn/9JrMmJiMrk81hI8jGGAdp167GiDf27iv4QKPF71 gXAqj9SKiBz+SVqdytncqRB2b0Fh9OVHg0La0ln2Co9I3lueVHr63+qCmZ9AeETHjnQzkC Cu+E4MjJucCUcRj3CpA64cccQtRY8VGVp5UecboQ08hiR0WdeDXYwtn9GzOpDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcN6gFBz10F1; Sun, 20 Oct 2024 11:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLeoN062976; Sun, 20 Oct 2024 11:21:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLe7b062973; Sun, 20 Oct 2024 11:21:40 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:40 GMT Message-Id: <202410201121.49KBLe7b062973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 3b5b485d7436 - stable/14 - sound: Remove useless newspd check in sysctl_dev_pcm_vchanrate() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3b5b485d7436868da687b7e4bd6797c0c44e3528 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3b5b485d7436868da687b7e4bd6797c0c44e3528 commit 3b5b485d7436868da687b7e4bd6797c0c44e3528 Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:33 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:05 +0000 sound: Remove useless newspd check in sysctl_dev_pcm_vchanrate() feeder_rate_min functions as the lower boundary. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D46834 (cherry picked from commit f3092614bcae949332a8f21f7b78ba68b3ee5899) --- sys/dev/sound/pcm/vchan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index 9046c144b41b..8580eb679f35 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -508,8 +508,7 @@ sysctl_dev_pcm_vchanrate(SYSCTL_HANDLER_ARGS) return (ret); } - if (newspd < 1 || newspd < feeder_rate_min || - newspd > feeder_rate_max) { + if (newspd < feeder_rate_min || newspd > feeder_rate_max) { PCM_RELEASE_QUICK(d); return (EINVAL); } From nobody Sun Oct 20 11:21: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 4XWbcQ2wGkz5YvTw; Sun, 20 Oct 2024 11:21:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcQ11cQz4X9d; Sun, 20 Oct 2024 11:21:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4H5mrbY4Cen9FQJsVwzRT8vlq0nzKNBjneqQPraJAkg=; b=Kxfea9j+XXlhy5vKxjJX+MjcIEBpI6GvnWSsJSCUu0ayxUROSiIS29Mn1dyeXY7gU/DI9O 0JrNwisU/U3HNfXhx4XwaqtIU7AtKUwDA14SAHHly9WCAiEo6kMP/6zg5KIx99oo0aePWS SfHclejh1fAp8f+Alo6l3B9ljs/vD2WI6IlDbJMjU23NtY/DNdNCCst9y4bWB2DO3+UefI 7reJI8ko0TcI0szukIQtvJTqOfO/APVoZgRWrTr1Ipz32TSsWDihSyDei86CzZST+9k4FH eqctMbIZ/B+qoCbIIHwtPuD/4l9BvhA0agfVxTJmHocsaHmPwEgSHKjD7NQFew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4H5mrbY4Cen9FQJsVwzRT8vlq0nzKNBjneqQPraJAkg=; b=WZvyleDpGDQ2QGBhF8HZiENmvOi3Nv3boBIFWUwMSICgV+PwPa+Q13UQmRlWJ0OEiZCsHa kCU7z6qBbBuRaTFWALYzxGDgyaOzQvTkLeR7yM0+VBxnOA41IaIbvsYCW5mFk4gH4XMBvB apNmiGLUp2j9870IXHKFRALlWAewuM8N3Plih/HeJ6ekKWoChAzolgZfZePCRN0VPrJU7r m4ClbRptoWV5qt6ikR/CvSVXUDtqdfRb5BG7TWW3ge61blaF34PoHvYGyWXNSO7qCBGyaN OuMMqquOADOjG1V3eKYQpJcKV6KI0SYyR/JR8Z1limfyhgL7KgW0Id8UkGijsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423302; a=rsa-sha256; cv=none; b=ZwzQlO8jUkGJ8vLRMzWNCzHjRurnyRU0gzNkc2wD5n0dkCiQUsImlrgR93DkvNvdBA/3NO fpjiV+GH4FOu033+6J+ZkPRJri5M5JsT8VXxdi4JOItslXLqWvLeoEzJxCxuYqp90eg/Dr ozRl6/+Xtn0F6AHuKhN0vKPUTsAv/SvOMCEePGbIRZEvKClDMq4iCtgW3y/JVgoWgFUU2b wvOeIyu6//IEzlC/xKVtmCxLlsH8Oa34bI9safHL7YBf9yDTDywBAvHJPzem9VsshsmwFK 1CbpTCaTaCsaPGKwFphgql5ErbXNxNoYXe9zFnU/nfKybAZH0zF1M0dPmOHv0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcQ0YRxz10F3; Sun, 20 Oct 2024 11:21:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLfvF063030; Sun, 20 Oct 2024 11:21:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLf2r063027; Sun, 20 Oct 2024 11:21:41 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:41 GMT Message-Id: <202410201121.49KBLf2r063027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 86e10d11ca3c - stable/14 - sound: Simplify channel creation and deletion process List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 86e10d11ca3cbb66834da94426a17f6cc0177dac Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=86e10d11ca3cbb66834da94426a17f6cc0177dac commit 86e10d11ca3cbb66834da94426a17f6cc0177dac Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:41 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:05 +0000 sound: Simplify channel creation and deletion process Currently we create and destroy channels with the following consistent pattern: - chn_init() -> pcm_chn_add() - pcm_chn_remove() -> chn_kill() Instead of calling two separate functions, merge pcm_chn_add() with chn_init(), and pcm_chn_remove() with chn_kill(). Another benefit of this change is that we avoid the confusion caused by having pcm_chn_add(), as well as pcm_addchan(). Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D46835 (cherry picked from commit 9263f854e9a63cc326a3d5f6331b933c4a010abf) --- sys/dev/sound/pcm/channel.c | 40 +++++++++++++++++++++++ sys/dev/sound/pcm/sound.c | 78 +-------------------------------------------- sys/dev/sound/pcm/sound.h | 3 -- sys/dev/sound/pcm/vchan.c | 25 +++------------ 4 files changed, 45 insertions(+), 101 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index d1c9bc616dcf..5b0bb105c505 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1311,6 +1311,24 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, } PCM_LOCK(d); + CHN_INSERT_SORT_ASCEND(d, c, channels.pcm); + + switch (c->type) { + case SND_DEV_DSPHW_PLAY: + d->playcount++; + break; + case SND_DEV_DSPHW_VPLAY: + d->pvchancount++; + break; + case SND_DEV_DSPHW_REC: + d->reccount++; + break; + case SND_DEV_DSPHW_VREC: + d->rvchancount++; + break; + default: + __assert_unreachable(); + } return (c); @@ -1337,11 +1355,33 @@ fail: void chn_kill(struct pcm_channel *c) { + struct snddev_info *d = c->parentsnddev; struct snd_dbuf *b = c->bufhard; struct snd_dbuf *bs = c->bufsoft; PCM_BUSYASSERT(c->parentsnddev); + PCM_LOCK(d); + CHN_REMOVE(d, c, channels.pcm); + + switch (c->type) { + case SND_DEV_DSPHW_PLAY: + d->playcount--; + break; + case SND_DEV_DSPHW_VPLAY: + d->pvchancount--; + break; + case SND_DEV_DSPHW_REC: + d->reccount--; + break; + case SND_DEV_DSPHW_VREC: + d->rvchancount--; + break; + default: + __assert_unreachable(); + } + PCM_UNLOCK(d); + if (CHN_STARTED(c)) { CHN_LOCK(c); chn_trigger(c, PCMTRIG_ABORT); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index da28a267c81a..e25cb359f793 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -188,74 +188,6 @@ SYSCTL_PROC(_hw_snd, OID_AUTO, default_unit, sizeof(int), sysctl_hw_snd_default_unit, "I", "default sound device"); -void -pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch) -{ - PCM_BUSYASSERT(d); - PCM_LOCKASSERT(d); - KASSERT(ch != NULL && (ch->direction == PCMDIR_PLAY || - ch->direction == PCMDIR_REC), ("Invalid pcm channel")); - - CHN_INSERT_SORT_ASCEND(d, ch, channels.pcm); - - switch (ch->type) { - case SND_DEV_DSPHW_PLAY: - d->playcount++; - break; - case SND_DEV_DSPHW_VPLAY: - d->pvchancount++; - break; - case SND_DEV_DSPHW_REC: - d->reccount++; - break; - case SND_DEV_DSPHW_VREC: - d->rvchancount++; - break; - default: - __assert_unreachable(); - } -} - -int -pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch) -{ - struct pcm_channel *tmp; - - PCM_BUSYASSERT(d); - PCM_LOCKASSERT(d); - - tmp = NULL; - - CHN_FOREACH(tmp, d, channels.pcm) { - if (tmp == ch) - break; - } - - if (tmp != ch) - return (EINVAL); - - CHN_REMOVE(d, ch, channels.pcm); - - switch (ch->type) { - case SND_DEV_DSPHW_PLAY: - d->playcount--; - break; - case SND_DEV_DSPHW_VPLAY: - d->pvchancount--; - break; - case SND_DEV_DSPHW_REC: - d->reccount--; - break; - case SND_DEV_DSPHW_VREC: - d->rvchancount--; - break; - default: - __assert_unreachable(); - } - - return (0); -} - int pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo) { @@ -272,8 +204,6 @@ pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo) PCM_UNLOCK(d); return (ENODEV); } - - pcm_chn_add(d, ch); PCM_UNLOCK(d); return (0); @@ -283,7 +213,6 @@ static void pcm_killchans(struct snddev_info *d) { struct pcm_channel *ch; - int error; bool found; PCM_BUSYASSERT(d); @@ -316,12 +245,7 @@ pcm_killchans(struct snddev_info *d) pause_sbt("pcmkillchans", SBT_1MS * 5, 0, 0); continue; } - - PCM_LOCK(d); - error = pcm_chn_remove(d, ch); - PCM_UNLOCK(d); - if (error == 0) - chn_kill(ch); + chn_kill(ch); } while (!CHN_EMPTY(d, channels.pcm)); } diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 51c9c91f6f20..f96638081cb9 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -248,9 +248,6 @@ SYSCTL_DECL(_hw_snd); int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, pid_t pid, char *comm); -void pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch); -int pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch); - int pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo); unsigned int pcm_getbuffersize(device_t dev, unsigned int minbufsz, unsigned int deflt, unsigned int maxbufsz); int pcm_register(device_t dev, void *devinfo, int numplay, int numrec); diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index 8580eb679f35..4da6f83dc0a2 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -710,9 +710,6 @@ vchan_create(struct pcm_channel *parent) CHN_LOCK(parent); return (ENODEV); } - - /* add us to our grandparent's channel list */ - pcm_chn_add(d, ch); PCM_UNLOCK(d); CHN_LOCK(parent); @@ -818,12 +815,7 @@ fail: CHN_REMOVE(parent, ch, children); parent->flags &= ~CHN_F_HAS_VCHAN; CHN_UNLOCK(parent); - PCM_LOCK(d); - if (pcm_chn_remove(d, ch) == 0) { - PCM_UNLOCK(d); - chn_kill(ch); - } else - PCM_UNLOCK(d); + chn_kill(ch); CHN_LOCK(parent); return (ret); @@ -833,8 +825,6 @@ int vchan_destroy(struct pcm_channel *c) { struct pcm_channel *parent; - struct snddev_info *d; - int ret; KASSERT(c != NULL && c->parentchannel != NULL && c->parentsnddev != NULL, ("%s(): invalid channel=%p", @@ -842,10 +832,9 @@ vchan_destroy(struct pcm_channel *c) CHN_LOCKASSERT(c); - d = c->parentsnddev; parent = c->parentchannel; - PCM_BUSYASSERT(d); + PCM_BUSYASSERT(c->parentsnddev); CHN_LOCKASSERT(parent); CHN_UNLOCK(c); @@ -866,18 +855,12 @@ vchan_destroy(struct pcm_channel *c) CHN_UNLOCK(parent); - /* remove us from our grandparent's channel list */ - PCM_LOCK(d); - ret = pcm_chn_remove(d, c); - PCM_UNLOCK(d); - /* destroy ourselves */ - if (ret == 0) - chn_kill(c); + chn_kill(c); CHN_LOCK(parent); - return (ret); + return (0); } int From nobody Sun Oct 20 11:21: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 4XWbcR3P0Qz5YvPK; Sun, 20 Oct 2024 11:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcR1gBlz4XGl; Sun, 20 Oct 2024 11:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fTVdMLKXCSUIaUl/M8xBZL0WcODkF8+CJ5a6NnAQRlM=; b=Va+mFEBJZQkZipnrB8/0pM37crrfAhqrojwJg8hBMFZ36N4ITT13VGLMldX7Q4kwy9qPjZ 9JcRpvqFTLw4b19rsQ9sSaI+8EwwdlDmFrDqi8xlkRS1DnMU6CUQgaj5XLgEYIUgckCAiG +04kLQqPyshsrkPItETjfAqp8HXwME4EGsRNeeE8o5PEATpAdYTjX9SUdYfRkj83GcoNpG h5ABNMIYK5TGRBra8RQZSGTY+Wxmu3uAxfn7u36FFblzoLGCaRpTLIitml4k6CI9JNAWTz 7FMHWo683zQR4FPkSFcAIGFWi5KeyqZLDF9abWtgrQl4L9PbRRkuU9bnzv6Z4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fTVdMLKXCSUIaUl/M8xBZL0WcODkF8+CJ5a6NnAQRlM=; b=b0NPGQZs7qJw4ffikYAuzKc0Dp9qiYMEi+SG8+6HJGMZhj8m6TvbxFnrTaCo1VmusDIOK5 YkFkte2DROGQrfB5hQwKKY01DP5ukdH+IO1bDy2z/sWAbGKkOYrBM7rMx12Iao/B25xsgE sqStQ8/eHcfy1okwWTmtYqZdTlt0z5Rb4Hg+KGGMUNWoM8cpxRv61WEW5kUHx8dJdne1hF F+kp8dI2FOfuXPJLr1O4s+3xGhwwhAjX0UlLe/PowhjuKGPm6h+23cBCWWUfqIjwLzvqHq IYmUFeq7Y8hpTQ7OPaCpGq6VmLvd26ZkqHurxfXkR1JhbSewfghwfRaHhCBR9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423303; a=rsa-sha256; cv=none; b=tggRrF0zU81pQJrey4oBI9NeA5Ow5GHNpbF9xYiIXyN8qrv6Xdc3TJR7nWCpWwC4BYoI3S iwpprrMdUHNpBfp1FydxoavpuuSh0dXhx09ZJ31BIo+Haa16rWCEL7IncHVzjY0zR3XY0X aNVMDq6VIiHSUO1amCwPbNwVwN0hHz1sX2ly//JxmKBjunk4qkuCHWDUy4APX9H6CZ7EZ9 B7GQjqYgXcZUKumnTNt/1NGNY/M+PDpYzZQrNgw4OEYLETz05PSuJi80WIK/ZfpD7uQDVC gFjG5nwXaKqstjAg1+bvY2HUsV1hTSwQICXNKueqNppfrkSC9MgH0ZqqsmV+Ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcR18RJzy9n; Sun, 20 Oct 2024 11:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLh7S063071; Sun, 20 Oct 2024 11:21:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLhA2063068; Sun, 20 Oct 2024 11:21:43 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:43 GMT Message-Id: <202410201121.49KBLhA2063068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: f0eee0fbde8e - stable/14 - sound: Shorten channel names List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f0eee0fbde8e40e3b59e257b529697c1d07c55e7 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f0eee0fbde8e40e3b59e257b529697c1d07c55e7 commit f0eee0fbde8e40e3b59e257b529697c1d07c55e7 Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:50 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:05 +0000 sound: Shorten channel names The current channel naming convention is: pcmX:[virtual_]play|record:dspX.[v]p|rY - pcmX and dspX share the same unit numbers - "[v]p|r" gives us the same information as "[virtual_]play|record" Remove the redundant information, so that the channel names become more readable: dspX.[virtual_]play|record.Y Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46836 (cherry picked from commit c30f531ddb629ab51359fb540c8ef6068bab288b) --- sys/dev/sound/pcm/channel.c | 10 ++-------- sys/dev/sound/pcm/dsp.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 5b0bb105c505..1e68be161322 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1182,7 +1182,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, struct pcm_channel *c; struct feeder_class *fc; struct snd_dbuf *b, *bs; - char *dirs, buf[CHN_NAMELEN]; + char buf[CHN_NAMELEN]; int i, direction, type; PCM_BUSYASSERT(d); @@ -1190,22 +1190,18 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, switch (dir) { case PCMDIR_PLAY: - dirs = "play"; direction = PCMDIR_PLAY; type = SND_DEV_DSPHW_PLAY; break; case PCMDIR_PLAY_VIRTUAL: - dirs = "virtual_play"; direction = PCMDIR_PLAY; type = SND_DEV_DSPHW_VPLAY; break; case PCMDIR_REC: - dirs = "record"; direction = PCMDIR_REC; type = SND_DEV_DSPHW_REC; break; case PCMDIR_REC_VIRTUAL: - dirs = "virtual_record"; direction = PCMDIR_REC; type = SND_DEV_DSPHW_VREC; break; @@ -1239,9 +1235,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, c->dev = d->dev; c->trigger = PCMTRIG_STOP; - snprintf(c->name, sizeof(c->name), "%s:%s:%s", - device_get_nameunit(c->dev), dirs, - dsp_unit2name(buf, sizeof(buf), c)); + strlcpy(c->name, dsp_unit2name(buf, sizeof(buf), c), sizeof(c->name)); c->matrix = *feeder_matrix_id_map(SND_CHN_MATRIX_1_0); c->matrix.id = SND_CHN_MATRIX_PCMCHANNEL; diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 2b765bc8b115..bf68f64929c3 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -170,17 +170,17 @@ static const struct { char *sep; char *alias; } dsp_cdevs[] = { - { SND_DEV_DSP, "dsp", ".", NULL }, - { SND_DEV_DSPHW_PLAY, "dsp", ".p", NULL }, - { SND_DEV_DSPHW_VPLAY, "dsp", ".vp", NULL }, - { SND_DEV_DSPHW_REC, "dsp", ".r", NULL }, - { SND_DEV_DSPHW_VREC, "dsp", ".vr", NULL }, + { SND_DEV_DSP, "dsp", ".", NULL }, + { SND_DEV_DSPHW_PLAY, "dsp", ".play.", NULL }, + { SND_DEV_DSPHW_VPLAY, "dsp", ".virtual_play.", NULL }, + { SND_DEV_DSPHW_REC, "dsp", ".record.", NULL }, + { SND_DEV_DSPHW_VREC, "dsp", ".virtual_record.", NULL }, /* Low priority, OSSv4 aliases. */ - { SND_DEV_DSP, "dsp_ac3", ".", "dsp" }, - { SND_DEV_DSP, "dsp_mmap", ".", "dsp" }, - { SND_DEV_DSP, "dsp_multich", ".", "dsp" }, - { SND_DEV_DSP, "dsp_spdifout", ".", "dsp" }, - { SND_DEV_DSP, "dsp_spdifin", ".", "dsp" }, + { SND_DEV_DSP, "dsp_ac3", ".", "dsp" }, + { SND_DEV_DSP, "dsp_mmap", ".", "dsp" }, + { SND_DEV_DSP, "dsp_multich", ".", "dsp" }, + { SND_DEV_DSP, "dsp_spdifout", ".", "dsp" }, + { SND_DEV_DSP, "dsp_spdifin", ".", "dsp" }, }; static void From nobody Sun Oct 20 11:21: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 4XWbcS4mHBz5YvK0; Sun, 20 Oct 2024 11:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcS2RNRz4WvX; Sun, 20 Oct 2024 11:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xt5tFJ52uuOCK3KSbRkNQXjV6i9P36POMzrIamDFJXo=; b=OjPqWChd6B2x+BEojlBe+Fpuw/C0DNcBXVx7Kcgy583ArBbiAhBiwwGhju9Epb/sYgPHc6 b2mJ33jjc7NxcHmiQIwrL5c50xThK8adYMZO0fmzJ5Nc4qGnDd3N30XICMvQdribRjIZ8B UxX1OZV/l/v2MZdm0YuICu8sxRvow1+31WtbYce2TYPOvXSeLrExfs/Ky5n5NSZ0xvU8sq tq0sWC1aWPmtOrl/jsndM58kHuoYzZKNwEFaHthcjLwU0GUvmr70EETiwiQAs0ez1xcRvA zOOXqlq9C6juOU22JDHheQTw0frVoK9yPfuOysOyoHozfejKUkV4BH3VKn7ZVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xt5tFJ52uuOCK3KSbRkNQXjV6i9P36POMzrIamDFJXo=; b=UgGEZzkUqOBx+dVV5yhWzf8Gs9CZq9YCwhsojbEWkDsucmLpMvqFsEhHVSB8+QoQwZyUG/ UGhZMaHiwVlMLhUVTRDJUqFf9M3XEuRZzIL2OkqHaYpBGg4xRK+FIV+O+hpznafJCoMVNU AgZ3w+QuVelpjBceCsHJE94314voheDg8KH0TniYifTauuBb8AnHSRfIId7jc06TtCAm7X xBKFhFkES1kLdYP9E5CHeRx0srkDZkRzORfLJIAmq9HLRO4Lx/rWPFWdi/NNJAVZrg3ohs uvIyNGvzpt3szbLg3b/YkDZ9TARvkR1xGGueD1weF7DVuTb1Id+mLwUHMG1H0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423304; a=rsa-sha256; cv=none; b=T5qLWeXAWhluawYgT/0Zd/Oe4ff19AWTMEBM1170OYlwEDCipDoTyU67ZEZhJDSOmy3qgs xdvKCYH2wliNETHi3i5T6VYngW65uCXbfEG2iTVtTCuLHENW344LQQsEFrAbF4XOJ+F+zD zM6wlfz/jO8lnVTrOMojgK7iMbDY+/xcRFU/8OcqT3caPlOMJt51c4hT36lSSvdMYTffn7 6xst907GN0XGX2zzcZIlmPh10m60vyO4rtuhRJlVfKY/EZp9rnPtLQdz5vzuxKu3r2Drn3 AbfKIOcI00qn4Zkx13LVv1kUNtzoYILjz2aJHRdJZggSf1UfucJ5VmLL6IyEKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcS1z5mz10Vp; Sun, 20 Oct 2024 11:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLiDX063136; Sun, 20 Oct 2024 11:21:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLil1063133; Sun, 20 Oct 2024 11:21:44 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:44 GMT Message-Id: <202410201121.49KBLil1063133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 84f361c9e367 - stable/14 - sound: Do not cast return value of malloc(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 84f361c9e367d86f785f7f0f3591c9db1b3e1c55 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=84f361c9e367d86f785f7f0f3591c9db1b3e1c55 commit 84f361c9e367d86f785f7f0f3591c9db1b3e1c55 Author: Christos Margiolis AuthorDate: 2024-10-18 08:40:57 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:05 +0000 sound: Do not cast return value of malloc(9) No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, zlei, markj, emaste Differential Revision: https://reviews.freebsd.org/D46844 (cherry picked from commit 3cc01caa26e4bf0798d219b2d40429a2cc1a642a) --- sys/dev/sound/fdt/audio_soc.c | 2 +- sys/dev/sound/pci/hda/hdaa.c | 20 +++++++------------- sys/dev/sound/pci/maestro3.c | 2 +- sys/dev/sound/pci/spicds.c | 2 +- sys/dev/sound/pcm/dsp.c | 6 +++--- sys/dev/sound/pcm/sndstat.c | 2 +- 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/sys/dev/sound/fdt/audio_soc.c b/sys/dev/sound/fdt/audio_soc.c index 3e937720bb5b..92813a3079d8 100644 --- a/sys/dev/sound/fdt/audio_soc.c +++ b/sys/dev/sound/fdt/audio_soc.c @@ -367,7 +367,7 @@ audio_soc_init(void *arg) auxdev = OF_device_from_xref(aux_devs[i]); if (auxdev == NULL) device_printf(sc->dev, "warning: no driver attached to aux node\n"); - aux_node = (struct audio_soc_aux_node *)malloc(sizeof(*aux_node), M_DEVBUF, M_NOWAIT); + aux_node = malloc(sizeof(*aux_node), M_DEVBUF, M_NOWAIT); if (aux_node == NULL) { device_printf(sc->dev, "failed to allocate aux node struct\n"); return; diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index e8d9ee12fffc..c0eb1864f145 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -3033,8 +3033,7 @@ hdaa_audio_ctl_parse(struct hdaa_devinfo *devinfo) if (max < 1) return; - ctls = (struct hdaa_audio_ctl *)malloc( - sizeof(*ctls) * max, M_HDAA, M_ZERO | M_NOWAIT); + ctls = malloc(sizeof(*ctls) * max, M_HDAA, M_ZERO | M_NOWAIT); if (ctls == NULL) { /* Blekh! */ @@ -3186,8 +3185,7 @@ hdaa_audio_as_parse(struct hdaa_devinfo *devinfo) if (max < 1) return; - as = (struct hdaa_audio_as *)malloc( - sizeof(*as) * max, M_HDAA, M_ZERO | M_NOWAIT); + as = malloc(sizeof(*as) * max, M_HDAA, M_ZERO | M_NOWAIT); if (as == NULL) { /* Blekh! */ @@ -4077,8 +4075,7 @@ hdaa_audio_bind_as(struct hdaa_devinfo *devinfo) cnt += as[j].num_chans; } if (devinfo->num_chans == 0) { - devinfo->chans = (struct hdaa_chan *)malloc( - sizeof(struct hdaa_chan) * cnt, + devinfo->chans = malloc(sizeof(struct hdaa_chan) * cnt, M_HDAA, M_ZERO | M_NOWAIT); if (devinfo->chans == NULL) { device_printf(devinfo->dev, @@ -5490,10 +5487,8 @@ hdaa_prepare_pcms(struct hdaa_devinfo *devinfo) } devinfo->num_devs = max(ardev, apdev) + max(drdev, dpdev); - devinfo->devs = - (struct hdaa_pcm_devinfo *)malloc( - devinfo->num_devs * sizeof(struct hdaa_pcm_devinfo), - M_HDAA, M_ZERO | M_NOWAIT); + devinfo->devs = malloc(devinfo->num_devs * + sizeof(struct hdaa_pcm_devinfo), M_HDAA, M_ZERO | M_NOWAIT); if (devinfo->devs == NULL) { device_printf(devinfo->dev, "Unable to allocate memory for devices\n"); @@ -6625,9 +6620,8 @@ hdaa_attach(device_t dev) ); if (devinfo->nodecnt > 0) - devinfo->widget = (struct hdaa_widget *)malloc( - sizeof(*(devinfo->widget)) * devinfo->nodecnt, M_HDAA, - M_WAITOK | M_ZERO); + devinfo->widget = malloc(sizeof(*(devinfo->widget)) * + devinfo->nodecnt, M_HDAA, M_WAITOK | M_ZERO); else devinfo->widget = NULL; diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index 4d6dca310eea..f922aa5cec3f 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -1453,7 +1453,7 @@ m3_pci_attach(device_t dev) /* Create the buffer for saving the card state during suspend */ len = sizeof(u_int16_t) * (REV_B_CODE_MEMORY_LENGTH + REV_B_DATA_MEMORY_LENGTH); - sc->savemem = (u_int16_t*)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); + sc->savemem = malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); return 0; diff --git a/sys/dev/sound/pci/spicds.c b/sys/dev/sound/pci/spicds.c index 3b67101b8df0..da0e8d9da6d5 100644 --- a/sys/dev/sound/pci/spicds.c +++ b/sys/dev/sound/pci/spicds.c @@ -144,7 +144,7 @@ spicds_create(device_t dev, void *devinfo, int num, spicds_ctrl ctrl) #if(0) device_printf(dev, "spicds_create(dev, devinfo, %d, ctrl)\n", num); #endif - codec = (struct spicds_info *)malloc(sizeof *codec, M_SPICDS, M_NOWAIT); + codec = malloc(sizeof(*codec), M_SPICDS, M_NOWAIT); if (codec == NULL) return NULL; diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index bf68f64929c3..d4f7e3d6e63f 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2493,7 +2493,7 @@ dsp_oss_syncgroup(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_syncgr * syncgroup. */ if (group->id == 0) { - sg = (struct pcmchan_syncgroup *)malloc(sizeof(*sg), M_DEVBUF, M_NOWAIT); + sg = malloc(sizeof(*sg), M_DEVBUF, M_NOWAIT); if (sg != NULL) { SLIST_INIT(&sg->members); sg->id = alloc_unr(pcmsg_unrhdr); @@ -2520,7 +2520,7 @@ dsp_oss_syncgroup(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_syncgr * insert into syncgroup. */ if (group->mode & PCM_ENABLE_INPUT) { - smrd = (struct pcmchan_syncmember *)malloc(sizeof(*smrd), M_DEVBUF, M_NOWAIT); + smrd = malloc(sizeof(*smrd), M_DEVBUF, M_NOWAIT); if (smrd == NULL) { ret = ENOMEM; goto out; @@ -2536,7 +2536,7 @@ dsp_oss_syncgroup(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_syncgr } if (group->mode & PCM_ENABLE_OUTPUT) { - smwr = (struct pcmchan_syncmember *)malloc(sizeof(*smwr), M_DEVBUF, M_NOWAIT); + smwr = malloc(sizeof(*smwr), M_DEVBUF, M_NOWAIT); if (smwr == NULL) { ret = ENOMEM; goto out; diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 4c5efb72cc0a..993ca926070f 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -1109,7 +1109,7 @@ sndstat_line2userdev(struct sndstat_file *pf, const char *line, int n) if (e == NULL) goto fail; ud->nameunit = strndup(line, e - line, M_DEVBUF); - ud->devnode = (char *)malloc(e - line + 1, M_DEVBUF, M_WAITOK | M_ZERO); + ud->devnode = malloc(e - line + 1, M_DEVBUF, M_WAITOK | M_ZERO); strlcat(ud->devnode, ud->nameunit, e - line + 1); line = e + 1; From nobody Sun Oct 20 11:21: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 4XWbcT62H4z5YvRN; Sun, 20 Oct 2024 11:21:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcT3qpXz4XHT; Sun, 20 Oct 2024 11:21:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mOIyjnB10iw2jd0YWHkOmHbv+qwO0jCI3zqBKDTYBBI=; b=Nwhx2aKOtVC2ZCTsWnjYDji4M+hkPaYP6ItEL/K6QoH4mAAJSM04PAP+vY/w7Egp1VdrF/ BQKyV2m7l3EC3pYlwtVRAO9GfQzBfxo2ArSjcREEOGEeA5XW+/t4BCaRuCDN69e1wwL0sM 7Eei1X7eL/5mZkCGB4E4KLg8EgXP8kkxE9UYcnN22SM82DCfc+y7eFZOAHMI4DiicekLxJ 3A/dLi4PrUbwQCtyHOd132zWdVqW6lbwKAy0T8T1GLRij+ucJWbr1Xf8ElfUt66KrgcE87 I0GpXuONERwN4M8zCjPTq6B5FzLDT/K9WmTs3fVWhbldUNL2wZOSGWagt6GVPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mOIyjnB10iw2jd0YWHkOmHbv+qwO0jCI3zqBKDTYBBI=; b=NEf3K4AmFXYvS6UTfb60zA3Jx9TFYpouaL7AmxoZDfumHYDKG6JYYzfyLYEvaMV0DxiDBz ygqlsCII70XG3WKoX8L9c5hbOCdmiIE0mtk4p5NXqB0lXWW4ge+aads6ILbwXc8ni9mN+d 6OQ/NCXsT/qtFSwHBmc1Km4enOgvyodYHotdCYBtXa2++7fPCJtkeuq0ZBwL8sXVawpbNL EoNKWJohTHm/jaKortg1Ksq+UKJFBwmp+kQSoTTMr5DXPtOWqfJDcgF9mts6WWRG/vK10G Nyx1fqLiuWxk2PYtpFArRPyDsbRbTtE7rlBM0A3MAWCrrGQLygjy1Ret2TxYtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423305; a=rsa-sha256; cv=none; b=DJ1ToTctMO3Xik4qMxUM1hPBp5qP0uAr+QSs5zqVQaCcIf5uRCCWcKLadtzw3vFRLsyG1/ 1DrO1+7MaIBHEXhIZPfeL9T/WPdUvLaY158QPMd5PfRBnjw5cW29/udtDwT9gOmA3zh1SE MY8JrgMXh7Tusqw6GbLU6uRB+iKBx2AL1HjUuFy3VjWoLDPV6TpDtnd9vtVQ9xoiFfZ3rq 8GQ951Ss3n1xYX1MSC3VV9JzATpalC9BH3V0Vbu7mRh9Aj5S/wBQ+CbCGkCNVnJDwskVZ0 XUHup9n7+eSreKstpkRWgA/7ByJorfGTEeCMtFaFfRgelQRw7sk+rS2Lg/gPQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcT32zGz108V; Sun, 20 Oct 2024 11:21:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLjXF063178; Sun, 20 Oct 2024 11:21:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLjXr063175; Sun, 20 Oct 2024 11:21:45 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:45 GMT Message-Id: <202410201121.49KBLjXr063175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 28dc9f54efa9 - stable/14 - sound: Use M_WAITOK where possible List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 28dc9f54efa94c3a17b7cfd98c7a51d42e57893a Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=28dc9f54efa94c3a17b7cfd98c7a51d42e57893a commit 28dc9f54efa94c3a17b7cfd98c7a51d42e57893a Author: Christos Margiolis AuthorDate: 2024-10-18 08:41:05 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:05 +0000 sound: Use M_WAITOK where possible These malloc(9) calls are in contexts where sleeping is permitted. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, zlei, markj, emaste Differential Revision: https://reviews.freebsd.org/D46845 (cherry picked from commit 5e33eca8e8f359d4d48f4c50334a03748420a7da) --- sys/dev/sound/pcm/channel.c | 7 +------ sys/dev/sound/pcm/feeder.c | 14 ++------------ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 1e68be161322..6b8f00f9aa83 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1296,12 +1296,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, */ if (c->direction == PCMDIR_PLAY) { bs->sl = sndbuf_getmaxsize(bs); - bs->shadbuf = malloc(bs->sl, M_DEVBUF, M_NOWAIT); - if (bs->shadbuf == NULL) { - device_printf(d->dev, "%s(): failed to create shadow " - "buffer\n", __func__); - goto fail; - } + bs->shadbuf = malloc(bs->sl, M_DEVBUF, M_WAITOK); } PCM_LOCK(d); diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index c6f93ac54036..2b9599859102 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -62,11 +62,7 @@ feeder_register_root(void *p) KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name)); SLIST_INIT(&feedertab); - fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO); - if (fte == NULL) { - printf("can't allocate memory for root feeder: %s\n", fc->name); - return; - } + fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); fte->feederclass = fc; fte->desc = NULL; fte->idx = feedercnt; @@ -92,13 +88,7 @@ feeder_register(void *p) */ i = 0; while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) { - fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO); - if (fte == NULL) { - printf("can't allocate memory for feeder '%s', " - "%x -> %x\n", - fc->name, fc->desc[i].in, fc->desc[i].out); - return; - } + fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); fte->feederclass = fc; fte->desc = &fc->desc[i]; fte->idx = feedercnt; From nobody Sun Oct 20 11:21: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 4XWbcV6rB0z5Yvr7; Sun, 20 Oct 2024 11:21:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcV4Zy6z4XMd; Sun, 20 Oct 2024 11:21:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=01kvSu5YNmNvnLDRUKtm8x7icfH32Kf8QSxMj2vaPdE=; b=fiWCRAzWwtrJ7bk7/n3+IQdUp6FcvtUkuxmJxEMpzdx1oUGYO15/H72j1kgPYXg3W7j6Qn nQCwHn0z77yaBr4AeD4NWoeMyMo+1wWtcfTUQBXk/e3StN+RBe/2a0EeSpwA2SUke3DQ5E Iisr1w5kjap/bbJzXOUKYZjBW8nJgbWuZ4tSGHfnioOETpsbkxwwbGt6q0FkfL2WKnH5c+ 8zA4jw/s+I9bSnyOJ4LnF92q0GaHqRTyfYJ5AdnktMzXsvtKpNPSXihHjnc9Ehq7JNDqVj HI3D4z0x6AvBeiUb9bLPJInDay6Y5AYmrlJcPj7pFHrDrH0PREdkU2PL+/d5Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=01kvSu5YNmNvnLDRUKtm8x7icfH32Kf8QSxMj2vaPdE=; b=B9EC4iLw1DOnA8cqDr1wzx0+rmZKbWIKLByu7+YrmQNddp3iempfo00cltA8VS4efLNSJU 3P/bDMp7HUbKVV1iijQ0sNYq6a9u6+ryYVxHt8+nRJ8XL1oczjCNs5NoII6jMmDcoKf7ag tZ6sY6Gua4hO+vy5htm1310KJbi4q/G8XtWv3im83nekIM3NLhh2P54j9ItC52AzdyJKd+ M8dd1GGswvUltHSisJGMjTaHibBJAhwvyGxBOFeFSUlm59Ie97EE29xZGcDtBDg1pj55q+ RQA0DovVQWdRWzC6nOUTinRQZ0jmUd4UIPHFd4yMBzMlRC5q1681PfNwvkXzMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423306; a=rsa-sha256; cv=none; b=IUeUJiZz8jN9B3KFIn19UhjODjjX9S6QR8oqTtiznRBK2U/i46kv94fL0wTDytbvKRHFou ljpc2sFSI7Xnw6IG1v0GRCsvSvCEHTOfdC/hngsWYpRMP/CaEly3TdtgLxgP0/ZK20ycsZ oI8rfh7bW9bh+DmO6WWtagitQhoCnnFg5wv8ODo8MMKBRtPtOw1g6tviT+CkRq3c5h0GxD jLZn1d0BFeIUrI1pOz47ZJ5+YFaEMAKVTLeebSXwxAXGRV0UD7QdNsuSaLoOc56lnaSzcs qGUIt8HZwtYGOGkc4/D6o5odibNB/ob0vvyzULMEN+OCCqDhleIfkkWaGmT+UA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcV4B5Mz10F5; Sun, 20 Oct 2024 11:21:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLkQ8063241; Sun, 20 Oct 2024 11:21:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLkOB063238; Sun, 20 Oct 2024 11:21:46 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:46 GMT Message-Id: <202410201121.49KBLkOB063238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 7a7ba76aa6f0 - stable/14 - sound: Do not check for NULL if sbuf is allocated with SBUF_AUTOEXTEND List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7a7ba76aa6f0af34fd60b3d13d93ef28598f7e23 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7a7ba76aa6f0af34fd60b3d13d93ef28598f7e23 commit 7a7ba76aa6f0af34fd60b3d13d93ef28598f7e23 Author: Christos Margiolis AuthorDate: 2024-10-18 08:41:16 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:06 +0000 sound: Do not check for NULL if sbuf is allocated with SBUF_AUTOEXTEND Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D46846 (cherry picked from commit aaf84d0e96831cd886b8e1e4ae102b3ba703b90a) --- sys/dev/sound/midi/midi.c | 6 +----- sys/dev/sound/pcm/sndstat.c | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index d2b495ea04cd..cae030519285 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -951,12 +951,8 @@ midistat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) return EBUSY; } midistat_isopen = 1; - if (sbuf_new(&midistat_sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { - error = ENXIO; - goto out; - } + sbuf_new(&midistat_sbuf, NULL, 4096, SBUF_AUTOEXTEND); error = (midistat_prepare(&midistat_sbuf) > 0) ? 0 : ENOMEM; -out: if (error) midistat_isopen = 0; midistat_unlock(); diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 993ca926070f..bc51da083439 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -150,10 +150,7 @@ sndstat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) pf = malloc(sizeof(*pf), M_DEVBUF, M_WAITOK | M_ZERO); - if (sbuf_new(&pf->sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { - free(pf, M_DEVBUF); - return (ENOMEM); - } + sbuf_new(&pf->sbuf, NULL, 4096, SBUF_AUTOEXTEND); pf->fflags = flags; TAILQ_INIT(&pf->userdev_list); From nobody Sun Oct 20 11:21: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 4XWbcW6q9Lz5YvK6; Sun, 20 Oct 2024 11:21:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcW5Wk7z4XKl; Sun, 20 Oct 2024 11:21:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eSQHn2fVWqA6OuGjEI4GXlXA6jLHpAf7q+9nNb4Aozs=; b=k9QC7w2GoAdPqga3/zCMjCxcMFbSzJWbMfUTMHOlE5IdyNPmfucWdhT670L2Oo/KSN5x40 eUzkGJJBzhAppulPZFPHSrpuDqD4o+F9ivolrxwLEwMAEVOiazqWYC+vmZC/eAAAaU13cK XvcGS3EmzH+PG14aYha6W6Sdd3XAukowk25Nj5r78pTl9R5BFfpTDHRUm6MeG1vt6mbd5L KrlxRttB2+/jbEMmKjAzzDMAGSuBuJ8hXZe2ZO2yIZfjrdy5ei2NW0XWvyTRj/rdq2adxF jwAT+Ha46IQpet8hvgiqdQezgZmBPOXsL+lLOyDiGCOQUv1nmNW7iwLhyk9dMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eSQHn2fVWqA6OuGjEI4GXlXA6jLHpAf7q+9nNb4Aozs=; b=H225RtKBneNj3mbQmY+3mTWxoGJZ35fcDGNtSUNKtqE53//OukFGaItxnCKDyfBXNe4ZyC +S4W6qLJNoMfY+HoQxXn7fJ9k9ykShJBoT+XShhv7GPsrpgltNY7wEFh5l0JNvJpjfsSU5 tOp2PHMGQRZb3AIQup9HGZ4uBHHLs7+rdEKx90jwCkeOiMbTt7DVXgq7prAiiQH2Hdg1JN SzmVCBUd0GMDBjZkJ9HVZAQWLQdsdsgi8HtMB8vZDhioQG/ZZdxbcm65DBR3gze1JkF1DO EIh6MAJ5fA3ru0uD0F3k836yXK4sStiUKHEoWH4iQTEpUyrP/1oIL66KX8joqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423307; a=rsa-sha256; cv=none; b=tsRlWeysMe4tCQK9uFverwWGCaJLyg5swFAxZnKmzHtiWkmlL16Wr8Z6Xpdrx81wX6RqB0 rBEdqjkNclkyZPZEhqTv00FYebsikoZBQie/qp617hGTfnFC+TUssnBgMcPbyseLqEsM/W DxU5ctZ1UeMIoa1WKnWWXWUQKNUAk/WGJfJv0xS4hSNbC+Pmlkby1XsyTFuFc7gv8wNGc0 JGkrC1Eu9zYo+eSb/O3Bjj7Kn/Vhw7fw0HhBFx9ZEz7E44HIQC52kJxz3LMIOAKFzZn/yw BjDhkvA0pvieBft2mgQGgVnyRtTtEz53ML2XTJoJSMJ5057B4HwlMQC/HzWBHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcW56Xmzy9p; Sun, 20 Oct 2024 11:21:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLllr063286; Sun, 20 Oct 2024 11:21:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLlxY063283; Sun, 20 Oct 2024 11:21:47 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:47 GMT Message-Id: <202410201121.49KBLlxY063283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 565a9b8f86b2 - stable/14 - sound: Improve /dev/sndstat channel info readability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 565a9b8f86b203517e4e7210c912970adcf614f0 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=565a9b8f86b203517e4e7210c912970adcf614f0 commit 565a9b8f86b203517e4e7210c912970adcf614f0 Author: Christos Margiolis AuthorDate: 2024-10-18 08:41:23 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:06 +0000 sound: Improve /dev/sndstat channel info readability Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, zlei Differential Revision: https://reviews.freebsd.org/D46857 (cherry picked from commit 0ff0a8234f83e6b25e9a2f1b64623baaf723d6dc) --- sys/dev/sound/pcm/sndstat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index bc51da083439..b20b3f8f6158 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -1280,12 +1280,12 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) } sbuf_printf(s, "\n\t"); - sbuf_printf(s, "interrupts %d, ", c->interrupts); + sbuf_printf(s, "\tinterrupts %d, ", c->interrupts); if (c->direction == PCMDIR_REC) { sbuf_printf(s, "overruns %d, feed %u, hfree %d, " - "sfree %d [b:%d/%d/%d|bs:%d/%d/%d]", + "sfree %d\n\t\t[b:%d/%d/%d|bs:%d/%d/%d]", c->xruns, c->feedcount, sndbuf_getfree(c->bufhard), sndbuf_getfree(c->bufsoft), @@ -1298,7 +1298,7 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) } else { sbuf_printf(s, "underruns %d, feed %u, ready %d " - "[b:%d/%d/%d|bs:%d/%d/%d]", + "\n\t\t[b:%d/%d/%d|bs:%d/%d/%d]", c->xruns, c->feedcount, sndbuf_getready(c->bufsoft), sndbuf_getsize(c->bufhard), @@ -1310,14 +1310,14 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) } sbuf_printf(s, "\n\t"); - sbuf_printf(s, "channel flags=0x%b", c->flags, CHN_F_BITS); + sbuf_printf(s, "\tchannel flags=0x%b", c->flags, CHN_F_BITS); sbuf_printf(s, "\n\t"); if (c->parentchannel != NULL) { - sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + sbuf_printf(s, "\t{%s}", (c->direction == PCMDIR_REC) ? c->parentchannel->name : "userland"); } else { - sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + sbuf_printf(s, "\t{%s}", (c->direction == PCMDIR_REC) ? "hardware" : "userland"); } sbuf_printf(s, " -> "); From nobody Sun Oct 20 11:21: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 4XWbcZ1M4Fz5YvKB; Sun, 20 Oct 2024 11:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcY700Dz4XJT; Sun, 20 Oct 2024 11:21:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AFLBc53Vbr+aEZF6M+C36G75Pt5b0zjFa7CazGepRjM=; b=kgjdx4bdlfXHGn0Vy8+q9hJ939yGx6pi1G9kc+vVnThKpgX9e+WuJVrzgaxv1BD0dtOdK/ 3IbWMpapMya2l4E0F82zlYPYN2V2JmqpWrgLvjbYfxvowfycPYA4l2ciH+soXjjCMRVj7Y MV6Rru9QEqUa3NJJGu7JpPWipq+aFiPB9HNtzUZSBE+MibfzL40mdSDffjCzsLwh1UISkA IM0LyTCvc+UY3XhZQUm/CA8FuQGCIL51Ws+JxuP8zx3A1Js9v5CcKlhQldY+fAx8c6rCbm DslVS5GPOQUGcupCq1S3F1MVg0gGyWmU3CtYii+hqGorn3+98EFkOC0XfqlPuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AFLBc53Vbr+aEZF6M+C36G75Pt5b0zjFa7CazGepRjM=; b=aoRiDqLN52CPIJ9yzXceH6jaAutyOdQ317/v/QKOupDY68yFYts97+9tj8cqTy39RYeZ7i lHCgDMBbaX1OIGDzV3kxL588MCftwj+wGPodorEBcd8K2n8SMuAlG/F93/bGX6uDzlupXX R9btsn9DI+3encYRclDZoiKlQ+TNTYVOOd7Jsww44lqzrSKxtnJuiFwCVrGu+HREhYXpGx 0Bn+Whi4FTeZGDZfHCfC+SiQgshWlWc3sXaXC/blhD7IHmrlZVGnSwsk30l5eOIERpk1fX SXKI/U8s4uATsXT3XxgOKzUnDd5oF8RjiPpAVP6flGovMHG5XGl7kX8adh6STw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423310; a=rsa-sha256; cv=none; b=Vnm93Zi8ZnMSO4OPl5/CgDesH5olwYNmfeqYnfhDzw4mpLeneLJuGi2eJZXre/HJDaq8ET LuhTQnb4jafpLVA3/2xnk912z1Rh2nccsSPh6+XV0UwJd34s3M7IaQFhRySrsb6kwukWDG KVH42ulQyKmct1fNstdqMKoEoaezBQExC0Q7vyan0WPA8r25jWzGKRg1ZWRsm2ONjL9gBE T5FKO8MnaXdU32ZgirAyZHEOFENimNxx1F4ysV4X8gI1YPM8co9SlYN2Sm9/ZU1/LnoSRF RUk+/BiJmVBes9OyTm5DAeJtMx06rE2/ZsxEog3PW++f6gb28N0s4T768ruWxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcY6cS9z108Z; Sun, 20 Oct 2024 11:21:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLnct064306; Sun, 20 Oct 2024 11:21:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLn6x064303; Sun, 20 Oct 2024 11:21:49 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:49 GMT Message-Id: <202410201121.49KBLn6x064303@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 4f11a5312370 - stable/14 - snd_hda: Identify NVIDIA GM204 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4f11a5312370ee33784a34213c24974baeb77b0f Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4f11a5312370ee33784a34213c24974baeb77b0f commit 4f11a5312370ee33784a34213c24974baeb77b0f Author: Jani Salonen AuthorDate: 2024-10-18 08:41:44 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:06 +0000 snd_hda: Identify NVIDIA GM204 PR: 228615 MFC after: 2 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47166 (cherry picked from commit d643e82356d46a20a8f3f2f3c42573a6827d568a) --- sys/dev/sound/pci/hda/hdac.h | 1 + sys/dev/sound/pci/hda/hdacc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 91ddbcccc9ed..d00ad4e4705c 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -883,6 +883,7 @@ #define HDA_CODEC_NVIDIATEGRA124 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0028) #define HDA_CODEC_NVIDIATEGRA210 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0029) #define HDA_CODEC_NVIDIAMCP67 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0067) +#define HDA_CODEC_NVIDIAGM204 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0071) #define HDA_CODEC_NVIDIAMCP73 HDA_CODEC_CONSTRUCT(NVIDIA, 0x8001) #define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff) diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c index 81395a1a9ae7..a3a7b5950994 100644 --- a/sys/dev/sound/pci/hda/hdacc.c +++ b/sys/dev/sound/pci/hda/hdacc.c @@ -358,6 +358,7 @@ static const struct { { HDA_CODEC_NVIDIAMCP78_3, 0, "NVIDIA MCP78" }, { HDA_CODEC_NVIDIAMCP78_4, 0, "NVIDIA MCP78" }, { HDA_CODEC_NVIDIAMCP7A, 0, "NVIDIA MCP7A" }, + { HDA_CODEC_NVIDIAGM204, 0, "NVIDIA GM204" }, { HDA_CODEC_NVIDIAGT220, 0, "NVIDIA GT220" }, { HDA_CODEC_NVIDIAGT21X, 0, "NVIDIA GT21x" }, { HDA_CODEC_NVIDIAMCP89, 0, "NVIDIA MCP89" }, From nobody Sun Oct 20 11:21: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 4XWbcY16P5z5YvrD; Sun, 20 Oct 2024 11:21:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcX622Nz4X80; Sun, 20 Oct 2024 11:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nlYcCUMPRUC5k13njr7CInQq5yLBF0yTZuhiSo3f+qA=; b=PHo69zk1DJRAfCnR0NuIRsqoq2qtobObQUDOyB+WVItLc8bnMV2vwQIgSIsSCAZDWND0Un 5RUhgK7Zy5P2gCmb9yH62sO+GCB72tKwroJG/KtWZSl5Tidf7EOfKPbFUeMATY5DbSuWTM lx8uCMgyLAt12vLWrOCgnIgI+2DRPBAMMsKhwkheu+WNht+FDDrAVXrq6WeBiOYgR+fjZn p+R2tFGw8n941gqDYxoGaZxbdDUREocFcw+BAekpkLbQEceLiPylKoutFnHrMZfSFPpKlE 6mI7anBkjI5nQOlhhdmO0MnfnDvDWMHMLMwGbRnDzAhdrBrg7oCamImDDmbJ4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nlYcCUMPRUC5k13njr7CInQq5yLBF0yTZuhiSo3f+qA=; b=rjJREUV25TBgRncFWOWOBXrsIQ9VS3Dcxr2xZnP7V8+9RE+pWYve1CCTT25IAULVUI42yy 3rNhc85+UYub0v5Eq7bDYX5OqzgTlhg46VUQ4tDsLtdGoAKzwZGbrFBYisbeiz126bCFQ8 FtA+n53KOaiiKSOUrxd7dFLYzMYb3f29pBfiexAbXrTx9FYUH+sKA/srhGI5JeciTVyoNp nCsn/PnRBImIod/WNjOJi8TapnOEdBGxYSxOkbFycRhVqk+qjJq2S0AyKm8m9+7zKPfPjH jrnz1pQhivAUHf/U0gMWKWN1kbT4QbXz5uyPvlKcnWjg6onrZRoACEadslSACQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423308; a=rsa-sha256; cv=none; b=tTwfoeUdQ0fJP6xuBZdRBGOlBdgRT4nb0aqM0kbSFDJyniYkgADGyoVWEQ0eV1Swc69200 0QXoARrdm6tRgw8jw9MQ/gTXsAlJhRgZT2eemG7XHXZ7lj90S3cma5gK4oE0z78ouF1A1i J3Y3c1oEp0GOIpzIDJz+PSfLU6YBR8qKjbUVLAHdVWcW3knNtyb4wU07wmf7oxi7Jx3cuG AlyHurACnt/NHvc6rpUvRsYrGl+53AhqZSVZ1Jj1VDO2I5H1/b4ubUirh9k3crUlvEoQ8+ UqYG/mW4j2BxXI8BB7Dr8C1i+ezFiz/CS62CsUTdurnP9eofB9PDHa+FDwXQxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcX5f36z10Ln; Sun, 20 Oct 2024 11:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLmRb064021; Sun, 20 Oct 2024 11:21:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLmRY064018; Sun, 20 Oct 2024 11:21:48 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:48 GMT Message-Id: <202410201121.49KBLmRY064018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 867b2ee99995 - stable/14 - snd_hda: Remove duplicate HDA_INTEL_CMLK* entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 867b2ee999950ac5ef4c68d1edd9cd57a13519dc Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=867b2ee999950ac5ef4c68d1edd9cd57a13519dc commit 867b2ee999950ac5ef4c68d1edd9cd57a13519dc Author: Christos Margiolis AuthorDate: 2024-10-18 08:41:36 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:06 +0000 snd_hda: Remove duplicate HDA_INTEL_CMLK* entries No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D47152 (cherry picked from commit de009cf68ba68aa5823be3d6afeebb49a15b1251) --- sys/dev/sound/pci/hda/hdac.c | 2 -- sys/dev/sound/pci/hda/hdac.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 336602b6bbf4..c25f11ba1f23 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -106,8 +106,6 @@ static const struct { { HDA_INTEL_CMLKS, "Intel Comet Lake-S", 0, 0 }, { HDA_INTEL_CNLK, "Intel Cannon Lake", 0, 0 }, { HDA_INTEL_ICLK, "Intel Ice Lake", 0, 0 }, - { HDA_INTEL_CMLKLP, "Intel Comet Lake-LP", 0, 0 }, - { HDA_INTEL_CMLKH, "Intel Comet Lake-H", 0, 0 }, { HDA_INTEL_TGLK, "Intel Tiger Lake", 0, 0 }, { HDA_INTEL_TGLKH, "Intel Tiger Lake-H", 0, 0 }, { HDA_INTEL_GMLK, "Intel Gemini Lake", 0, 0 }, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 5e66e8eaed59..91ddbcccc9ed 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -95,8 +95,6 @@ #define HDA_INTEL_CMLKS HDA_MODEL_CONSTRUCT(INTEL, 0xa3f0) #define HDA_INTEL_CNLK HDA_MODEL_CONSTRUCT(INTEL, 0x9dc8) #define HDA_INTEL_ICLK HDA_MODEL_CONSTRUCT(INTEL, 0x34c8) -#define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) -#define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) #define HDA_INTEL_TGLKH HDA_MODEL_CONSTRUCT(INTEL, 0x43c8) #define HDA_INTEL_MTL HDA_MODEL_CONSTRUCT(INTEL, 0x7e28) From nobody Sun Oct 20 11:21:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XWbcc3S0Rz5Yvp0; Sun, 20 Oct 2024 11:21:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcc1tcXz4XSb; Sun, 20 Oct 2024 11:21:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m1G29NWlXfgf5iLMDi1nLgapP78GuDPNULu+ZKGWXBY=; b=gvSgOgYogDqr/bgfrwB/tdpnihFQNSU4bA5zxc/JkV7wrpDcRyljJpsL3gsFTapWJghrga 2XcUxJwywovb8NMOeAUJdTrtYTiJKtdYcP+UiehD0MbDSpLjzTV7A0DQwVXZxbzBIpD1da Hh38M2f+MaLDfTH6+zIQCQag1/FKyMsxztNUb+GytPJ+YsgalumSSwBOR73VcnwNyFT9JK uJh3Z/VWdzUFfPXMVnv5bSGthm7q/NzEsB6k2L/8fck9Igdes9LggwQf2WpsPM8OqnTIsQ KRMccwOcCosQ+quMuUQZ9Jrd3sC8DOggzlmkEywm5KNLocaD/cRs2mczV9O0Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m1G29NWlXfgf5iLMDi1nLgapP78GuDPNULu+ZKGWXBY=; b=oFQZUSHT4Sbh596pEt9zY9bCo9PRlykaTxOQaG8PNUB2neH8LRNo4HJSAwRkSY7sFBH3V6 wCNDnfOJYLIVdjS4Eqx0vnzqDziX71858DS9f3p3VxXZ0FPhWuC+q2ke2+v7hmeEvCspmW q9xFbRe4y+5/9yUn63pPcD6eBWtLXscLAj3EZzYfWE5RjFKs6sH+GfhY+iyrIv7QliKD/E rOuQUhmHkaQwlUeiLuTNKoq02VK5EedsH7++KIGpolYV6esXtwjVZOO2nLzUln4h1C4SN+ p4B2HrK7axQkcACuqC9j0rYZ/L6kiov4KSS/JH66WwpcEPCR/QaeOLEvvyugdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423312; a=rsa-sha256; cv=none; b=cStm3kmwkQ5Ir+Lnz9mxW6CdrD7EksaWrdAv8Ike7090mn7Yc3KHiA4jd4vDgvbBKSD81C Ms2iefx4OQkacKXEXRaHZu4epWjnFD5Q8cdMGrtEDgaw4wz3/j2gItWC6WALXNV4e4iJ/Q 3iW7g5mG7D46CqhmriesNpdHrmroC04m7R16JkRGYatgUiewjJ1Nc1jRQqHxnGRRYOlrIt e9TVrPQwmMnpn2/4IbxPIdTJNoIgeXb8XbLn54a5BdYMDdgjIaPkItU2jCrudH2fmyzCZ4 sjjr6e2+MLnl/8KKfalFOfBpeNrtjyNIHnmC/1QZ1d5bv+ifR3GKyLh4rlpyBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcc1W0Kz103G; Sun, 20 Oct 2024 11:21:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLq21064398; Sun, 20 Oct 2024 11:21:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLqgM064395; Sun, 20 Oct 2024 11:21:52 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:52 GMT Message-Id: <202410201121.49KBLqgM064395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 1a8cd08d8ae6 - stable/14 - vmm.4: Add ppt device detach example List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a8cd08d8ae6ad40405c2c0fd4199c01d9e9353b Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1a8cd08d8ae6ad40405c2c0fd4199c01d9e9353b commit 1a8cd08d8ae6ad40405c2c0fd4199c01d9e9353b Author: Christos Margiolis AuthorDate: 2024-10-18 08:42:05 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:06 +0000 vmm.4: Add ppt device detach example Showcase how to detach ppt from a PCI device and attach a host driver, and vice-versa. MFC after: 2 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46811 (cherry picked from commit 9ad2891558729b1c1ad4ba02377b157e404a3da2) --- share/man/man4/vmm.4 | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/share/man/man4/vmm.4 b/share/man/man4/vmm.4 index dfd7ad26fb98..7e4c9050021a 100644 --- a/share/man/man4/vmm.4 +++ b/share/man/man4/vmm.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 6, 2024 +.Dd September 27, 2024 .Dt VMM 4 .Os .Sh NAME @@ -108,11 +108,36 @@ bus 6 slot 5 function 0, and bus 6 slot 5 function 1. .Bd -literal -offset indent pptdevs="10/0/0 6/5/0 6/5/1" .Ed +.Pp +It is possible to detach +.Va ppt +from a PCI device without rebooting the host machine and then attach a host +driver, using the +.Xr devctl 8 +utility. +Suppose +.Va ppt +is currently attached to +.Va pci0:0:1:0 +and we want the host's +.Xr xhci 4 +driver to be attached instead: +.Bd -literal -offset indent +# devctl set driver -f pci0:0:1:0 xhci +.Ed +.Pp +The same can be applied to attach +.Va ppt +back: +.Bd -literal -offset indent +# devctl set driver -f pci0:0:1:0 ppt +.Ed .Sh SEE ALSO .Xr bhyve 4 , .Xr loader.conf 5 , .Xr bhyve 8 , .Xr bhyveload 8 , +.Xr devctl 8 , .Xr kldload 8 .Sh HISTORY .Nm vmm.ko From nobody Sun Oct 20 11:21: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 4XWbcb3Sr1z5YvKL; Sun, 20 Oct 2024 11:21:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWbcb0wqTz4XLP; Sun, 20 Oct 2024 11:21:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=05DwnL41fiauwhKS27C3MK7elmXORYGUBm8A0htMy3Q=; b=FZ85jv3O35vWRbNWJQuACT7+JGK5+2f1Vto3aCRWZ10STI82Z+s5/NpL2UIqMQ7zmmCS8R AGMyBvzxfcBbk6MaFhDG+LRJY0STm7mZp3DPOrmRqzbLCA1dJucGR2AL93+/KcoPpDJzrR /wl0kcgYixUeaHReOSbRydDgXqIP5K9S/3cgKSAzAjULKyB/mWIZuOwpIhPFMObpbu3yVj ktM2x7Ml5I1HVdAe5fmRY8k65zHhBHc8gFz4MI3Y/VaMkO2roba1Qmdyp+AISHSH4Rj7K5 duZCalR3FVL7UW9X3ncQNBe9r7J1oH9E61SV7D2+yytIPnme/RcL8N3s5ab/Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729423311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=05DwnL41fiauwhKS27C3MK7elmXORYGUBm8A0htMy3Q=; b=rjII3PT0GrrQA70dhrW5TZ5JQ1q0oaRrQvTT9GTmrZH1uBW5fTU+ckDhBRctVRQdR3w5bA QCPBb/XUpNrVrLVmXqo2ipITVhP0M1P7krFjg/m1Nz22nv/6KKBgp577xW3GeSZPiXBep7 9LjbHbI7BpvyyuK4V2g426arw8UbmHwGBZWsIJDK6j2RxGfHSRbZoZyhUo6ufsxERzt5uK s9WLiQPf6wsjYGVcUwadPxjfrZPCW2qHZ+QDQH9Qy2uS0y5i3i7Mn0IFo5ZBAcTyLW1ib7 x7g28YtE/bXa+84+FPDSlcJiLo+dEGJiargPcfJx6NzBlGGsvhiYSqPbwFllxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729423311; a=rsa-sha256; cv=none; b=TivtW+NegHBcq8Su5Cts4F7X4O70k6U4mCqLmYOFFUk+a0E+hL2dN22Li6marvGhNsWscw MX5nLm89Odgm6gmNE0KrTcfj7sdeVO5Xsuo0iIqgmXVRKCZl3EA2OnQZ/XJ+UPRIWg8RHN Ybfx30iWsc0JU3+m+3jgHEhpVctElbk5TymzOhJWYKnaZP8sfmLMHdKeJs9Jcjy5VF7KIa XRTzDD7VuOkg7MUkKo732HimgDLF4OeutEtTXUGKofERr1QWmTYEAt9pVzlygLY6hevQeq Sv5uIXwop0WCsX1TbAONI7h9Ccb82z4S+PF7B2F/fZHgTUEXYFlboDnTwRrAeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWbcb0VXjz10FB; Sun, 20 Oct 2024 11:21:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KBLonH064350; Sun, 20 Oct 2024 11:21:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KBLo30064347; Sun, 20 Oct 2024 11:21:50 GMT (envelope-from git) Date: Sun, 20 Oct 2024 11:21:50 GMT Message-Id: <202410201121.49KBLo30064347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e609dfa98fd3 - stable/14 - onyx: Remove unreachable if condition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e609dfa98fd349ed868f2d4d16bd1994fc53875f Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e609dfa98fd349ed868f2d4d16bd1994fc53875f commit e609dfa98fd349ed868f2d4d16bd1994fc53875f Author: Christos Margiolis AuthorDate: 2024-10-18 08:41:55 +0000 Commit: Christos Margiolis CommitDate: 2024-10-20 11:21:06 +0000 onyx: Remove unreachable if condition Both conditions are the same, so the second one is unreachable. PR: 229550 Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: andreast, markj Differential Revision: https://reviews.freebsd.org/D47167 (cherry picked from commit 6f96ef84b359137a51dc1e717887ca7d31ba7bad) --- sys/dev/sound/macio/onyx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/sound/macio/onyx.c b/sys/dev/sound/macio/onyx.c index 00c7b826f142..d13f3da92db6 100644 --- a/sys/dev/sound/macio/onyx.c +++ b/sys/dev/sound/macio/onyx.c @@ -197,7 +197,6 @@ onyx_probe(device_t dev) if (strcmp(name, "codec") == 0) { if (iicbus_get_addr(dev) != PCM3052_IICADDR) return (ENXIO); - } else if (strcmp(name, "codec") == 0) { compat = ofw_bus_get_compat(dev); if (compat == NULL || strcmp(compat, "pcm3052") != 0) return (ENXIO); From nobody Sun Oct 20 13:43: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 4XWfmH4cLmz5ZKWW; Sun, 20 Oct 2024 13:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWfmH3y2kz4tyB; Sun, 20 Oct 2024 13:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729431823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I9p7s2jj9lmuBK3HKJknIE6VMHSdijaffYIMXgIg0Y8=; b=jU4aSlrBXuFsVvzLTIxAzaog8WMyvFIKaDAuHIA2L9IineR4cNGRbC3C9vi3Y9QQVmhb0j 2k15khwaW76NZsden9f4Mvq6ssMbsT/PnoIT8ecGy9JUhR6AHSPMRnNAheCmKCZgum70b0 or72dRWD7lzWKBOYAEzjIlLEPS7hWHR1LyD/b3hEWzOIxju0ecyxWgwdkfs2Gu1CyhTxqa hSyYjPpcIr+bq6o98gKFLq03nrxoNHWkxVpsXkYPCR2Up21/p0K7eiXJ6n0YeiF6ruD3E7 jlWeNB0LY04hFxzLCD9eXVb4tUEycnlZW1X8HYiEDFwlLfMm+fVEwBpF6ZzrTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729431823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I9p7s2jj9lmuBK3HKJknIE6VMHSdijaffYIMXgIg0Y8=; b=Nc+iJArWbuWRT/fQ5gg3mUepWozCrQWqiB7gCENAYSfBYCTFUwqMlNRBWFP7h2QW51369j 1Pc6TVQmBdmQ8WsUZ1jtLKWCtYCKcJ3Xv9l1I0M4H7JPZIqldmXUDrfdByke2GSFiFlEfP mt05J+45VMNuURcfAzy4Wgf3xBUAp25QWBO8xUP/Dy2aer1D3eo/384HvpCu94yFV5yceF oO08ZfpxmdKRGPw2ZtUSbZnmfOaPqDDtAKz+UbKA6mekciRGcAAYWUxyNzPYixfh1UIWKJ k0TsKqUncP1/E+I9j4ghFC/UAOlUBwd2FK37l2e4UX7xHBKKWTrtsY2egSzA3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729431823; a=rsa-sha256; cv=none; b=ZdRE4TkEOAZ0bcLdve9mudyG7WrdjFFnJgXWJx4tZoYGAJ7OwzieCf26pg5RD9tyw8socz dTmhvf1UiwDhqwZc6v2mqKQwxzw3+4MFk8h8iMlIci2CejvsWTWgzybleliP/Zp83/U7QJ qAIGhtvB0zHK4QSN8afjj2AuwbVJkzwD/ykVB4yHb8bfJc5mqOQhLB10XrWj9ghdacsL20 XqyeCvXC/eShcJwVmCGz87h+d3ypPXhxX1Xk4onwVAx8urEc/FBg1Uux1gAO6Xxgg8XlQj evCNE12hbVnCuH5I3BAzNE8ZALPLbnGZRSNT4mdJLROtcI2U1WLSZTD/+3cyNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWfmH3FRBz148m; Sun, 20 Oct 2024 13:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KDhhj5024169; Sun, 20 Oct 2024 13:43:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KDhhcK024166; Sun, 20 Oct 2024 13:43:43 GMT (envelope-from git) Date: Sun, 20 Oct 2024 13:43:43 GMT Message-Id: <202410201343.49KDhhcK024166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 03f7680517c8 - stable/14 - if_enc(4): Use new KPI to create enc interface 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 03f7680517c88ec9b656f73e5382bcaf07791d2c Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=03f7680517c88ec9b656f73e5382bcaf07791d2c commit 03f7680517c88ec9b656f73e5382bcaf07791d2c Author: Zhenlei Huang AuthorDate: 2024-06-27 09:22:37 +0000 Commit: Zhenlei Huang CommitDate: 2024-10-20 13:43:01 +0000 if_enc(4): Use new KPI to create enc interface This driver allows only exactly one instance to be created. Clone creating additional interfaces, e.g. `ifconfig enc1 create`, will get error EEXIST which is somewhat confusing. Convert to new KPI for less confusing error ENOSPC. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45758 (cherry picked from commit eacad82f3ad0af7d74968e73ed383fc4531d1924) --- sys/net/if_enc.c | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c index 3c7ae38324c3..3c3f19661063 100644 --- a/sys/net/if_enc.c +++ b/sys/net/if_enc.c @@ -94,8 +94,9 @@ VNET_DEFINE_STATIC(struct if_clone *, enc_cloner); static int enc_ioctl(struct ifnet *, u_long, caddr_t); static int enc_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); -static int enc_clone_create(struct if_clone *, int, caddr_t); -static void enc_clone_destroy(struct ifnet *); +static int enc_clone_create(struct if_clone *, char *, size_t, + struct ifc_data *, struct ifnet **); +static int enc_clone_destroy(struct if_clone *, struct ifnet *, uint32_t); static void enc_add_hhooks(struct enc_softc *); static void enc_remove_hhooks(struct enc_softc *); @@ -139,11 +140,14 @@ SYSCTL_INT(_net_enc_out, OID_AUTO, ipsec_bpf_mask, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(bpf_mask_out), 0, "IPsec output bpf mask"); -static void -enc_clone_destroy(struct ifnet *ifp) +static int +enc_clone_destroy(struct if_clone *ifc, struct ifnet *ifp, uint32_t flags) { struct enc_softc *sc; + if (ifp->if_dunit == 0 && (flags & IFC_F_FORCE) == 0) + return (EINVAL); + sc = ifp->if_softc; KASSERT(sc == V_enc_sc, ("sc != ifp->if_softc")); @@ -151,31 +155,26 @@ enc_clone_destroy(struct ifnet *ifp) if_detach(ifp); if_free(ifp); free(sc, M_DEVBUF); - V_enc_sc = NULL; + return (0); } static int -enc_clone_create(struct if_clone *ifc, int unit, caddr_t params) +enc_clone_create(struct if_clone *ifc, char *name, size_t len, + struct ifc_data *ifd, struct ifnet **ifpp) { struct ifnet *ifp; struct enc_softc *sc; - sc = malloc(sizeof(struct enc_softc), M_DEVBUF, - M_WAITOK | M_ZERO); + sc = malloc(sizeof(struct enc_softc), M_DEVBUF, M_WAITOK | M_ZERO); ifp = sc->sc_ifp = if_alloc(IFT_ENC); - if (V_enc_sc != NULL) { - if_free(ifp); - free(sc, M_DEVBUF); - return (EEXIST); - } - V_enc_sc = sc; - if_initname(ifp, encname, unit); + if_initname(ifp, encname, ifd->unit); ifp->if_mtu = ENCMTU; ifp->if_ioctl = enc_ioctl; ifp->if_output = enc_output; ifp->if_softc = sc; if_attach(ifp); bpfattach(ifp, DLT_ENC, sizeof(struct enchdr)); + *ifpp = ifp; return (0); } @@ -375,10 +374,18 @@ enc_remove_hhooks(struct enc_softc *sc) static void vnet_enc_init(const void *unused __unused) { + struct ifnet *ifp; - V_enc_sc = NULL; - V_enc_cloner = if_clone_simple(encname, enc_clone_create, - enc_clone_destroy, 1); + struct if_clone_addreq req = { + .create_f = enc_clone_create, + .destroy_f = enc_clone_destroy, + .flags = IFC_F_AUTOUNIT | IFC_F_LIMITUNIT, + .maxunit = 0, + }; + V_enc_cloner = ifc_attach_cloner(encname, &req); + struct ifc_data ifd = { .unit = 0 }; + ifc_create_ifp(encname, &ifd, &ifp); + V_enc_sc = ifp->if_softc; } VNET_SYSINIT(vnet_enc_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_enc_init, NULL); @@ -398,7 +405,8 @@ vnet_enc_uninit(const void *unused __unused) { KASSERT(V_enc_sc != NULL, ("%s: V_enc_sc is %p\n", __func__, V_enc_sc)); - if_clone_detach(V_enc_cloner); + ifc_detach_cloner(V_enc_cloner); + V_enc_sc = NULL; } VNET_SYSUNINIT(vnet_enc_uninit, SI_SUB_INIT_IF, SI_ORDER_ANY, vnet_enc_uninit, NULL); From nobody Sun Oct 20 14:07: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 4XWgHD4513z5ZL60; Sun, 20 Oct 2024 14:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWgHD3Zg2z3wmf; Sun, 20 Oct 2024 14:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729433224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dDSxBC81FW4W3umH7eqylfj2gNGeWo5dgWu3oYMoz5Q=; b=L+w8tZyGLUc+YDhbuYd3cbmlMgtBfjNuR05sJN1p0DgGi8OYC9n1UZ1Xmdbyu5+szI1uBn ltFJeS8VBtkmtZCTJ0CEmt2J2RpOxW7cIC3jKMrIXJHT8E8m/X8Yni419oaJvDGmiksweo WC9X2lyDtIwCkAKOxg6R+Q5l+tIdU/Hr8LXVM9QVvnDyeFpbnGF9Ew8JADu+TqQGDS6ASX KYip/tqCCAIej3gmLP0tZ3KhDALvLZkW9ASGhobrmP5Y32ap6OhV/xQXAEVPBbHUazmM+A NwSlTBkHb9F6JaPZuIZR7niwTkldi0k2V4zMWNw5MRirmQH+7S8TyPU2wbFlIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729433224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dDSxBC81FW4W3umH7eqylfj2gNGeWo5dgWu3oYMoz5Q=; b=lSDmRu6FxGaIsCN54GUQewdHWbotxwe7Lma8VsFNLh5OMxxHBUCNC2lCYCZw4OOMKieitv Ca0Dl1hQpWefpnEhE2kXT/H3K1kmlgItkQFJKPxx9tVH4kcn+R5NAYWjXMjFHCj1PWwW0s 7wBztKzbg71irVICyStOqv7IUtqIHGPu3eVIwg9zznjW1Fgr/Tc/taisE6yLNVzhoepyNk JOyaM7Yj/Bxc8EyZVmvKBjBKyfiynQ2Du2GW788+GvqYueLinNY4RZ73JlSXX+eDpJyeyR NzIblAVMU46pB8acRauRxmm8S50AOmoiHgQ58dgo6wkLDht1Zg5VBPrN1s6s2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729433224; a=rsa-sha256; cv=none; b=nHH6HxRiqyJyPUUz8GqlyOcs4u+t29hNE8/WaCjLKVCq8O40V2tZoHmHhW9jf1iZIio7di Pk3xkwn9Yph1iuTqxC+TCayg+mppI3O9p1nTSLVtrvwKKU8TZx77m6ty/j9CdUfDvI9IId JMwEQkuWhY9fqH8UfBHkijtL+FYs+xsZ1jRRp11KKJvhz02foNGl0y4uDaz3BhsyjmbPwb GbqElSZDt9LX3Gg87njYeKl4UWA7NnMyT2P1OtmiIROoTiAbI+Rzu076pk/3VAbXZ90J6f FBgExZFDXHbXMSAJDDzbKKAC33EUNk/Ujk3zBGN5NWJbPCMTmiMFIEbag+6GJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWgHD39rWz14Sv; Sun, 20 Oct 2024 14:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KE74vQ062638; Sun, 20 Oct 2024 14:07:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KE74OS062635; Sun, 20 Oct 2024 14:07:04 GMT (envelope-from git) Date: Sun, 20 Oct 2024 14:07:04 GMT Message-Id: <202410201407.49KE74OS062635@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: 1c95ec17cae2 - main - ifconfig: Fix wrong indentation for the status of pfsync(4) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c95ec17cae22fb76d4e93c9eada78e03ca1bca6 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1c95ec17cae22fb76d4e93c9eada78e03ca1bca6 commit 1c95ec17cae22fb76d4e93c9eada78e03ca1bca6 Author: Zhenlei Huang AuthorDate: 2024-10-20 14:06:33 +0000 Commit: Zhenlei Huang CommitDate: 2024-10-20 14:06:33 +0000 ifconfig: Fix wrong indentation for the status of pfsync(4) The leading tab is always required, regardless of the configuration of `syncdev` or `syncpeer`, as `maxupd`, `defer` and `version` all require it. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47112 --- sbin/ifconfig/ifpfsync.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbin/ifconfig/ifpfsync.c b/sbin/ifconfig/ifpfsync.c index 33e4e5ac8cd3..264b1ecd5b56 100644 --- a/sbin/ifconfig/ifpfsync.c +++ b/sbin/ifconfig/ifpfsync.c @@ -374,8 +374,7 @@ pfsync_status(if_ctx *ctx) nvlist_destroy(nvl); - if (syncdev[0] != '\0' || syncpeer.ss_family != AF_UNSPEC) - printf("\t"); + printf("\t"); if (syncdev[0] != '\0') printf("syncdev: %s ", syncdev); From nobody Sun Oct 20 15:02:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XWhVj0KqHz5ZP8W; Sun, 20 Oct 2024 15:02:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWhVh6w2hz42Cx; Sun, 20 Oct 2024 15:02:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729436525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9U05s6AJm/nodoHg++lxkgaGd66kvCmiOU2ulPaFRLw=; b=wQD5ZrA1H4d0qeo4Zf1w3TLIRpZu4Z2hPFMrvN2CYYpsy665mwCgq3htkCdLu8HuXOp9Hs nL1teFyNUoMdzG8Kv9Jbljz5bgQaZv32olgjGcBaxSdMT8ONE2yIvJngrluctUGgdg9hbN XGJYajoEaGIYfNNOaZEcaoqGBtmEtS0fEXQ1zSK9Usu17AwGH1MR9p98yTCX7oZ5t9/ElH OFqbtf58RvQMFbwj//ZbVEepHS8z5V0t4ANZVYAgJzZfPYcI3XdemL2vDXMxipvpx7bG1p X7MrlABHDGc80b9Uzy8WNtAf937QRTzXPqUzZE9pyts6nLh0p2ipQAPJsSVBsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729436525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9U05s6AJm/nodoHg++lxkgaGd66kvCmiOU2ulPaFRLw=; b=lwLdyX0lu8yzuRFT+Z+MjS+IsGQYTrv34Qm/s56XEqq9mUtls0hreZYKSRibvV9JrPbvN6 325gaJkDWKpbIdIh/S6sQjFN7qZGhJqNIctTPVmrm6W6KYDqAay8CnHylC01znErCFsG50 1DPAjKpxSvBGUvBDiHP/XLARCmx4pjBcvq6O+NEg2uafO3ARJm4UlbWhCwGhvJlDCr7ddK f9h5aiAhwNzt8qSpVfJBzTy+OWgNgVbCsYW+zpbKJ68fdkNeGQ/35Ki8Cx+cUqAIPFSOIV eIinDKUUhv5tS5K9a0ztmbyN7RFwaTSneOvltcVzJra0Vihehu9BQxthazaz1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729436525; a=rsa-sha256; cv=none; b=txOhCWLTKNA7y3jbwFsSQATZW1lLKFAirI38uX5NDhBRgpsq/v88fYsu/Gf3DkDISwz4i3 PdD/TQYwd3lRtRWgB0fhFXD6186lTxw29vJA8faRTrB9tvAVYSzUJmLuterMfBOe4sU2ox Y26I+NHlfnuzTpu2715S/X7kEvsJxJY75HdrcD5HPF32FBIxs/+zreHBdCzjZYoCJUWXX4 /AvX07HEBBzyrh6iwrJGA9kVDmzm3PyadnOElP8Go1ryu90N8q348UOHOkLlM3UAtGlL+Q ziFFBgGd36wamCsHYpYDHUUWr0CXUee9wvkaAOyof6grcwtpBjGChOZly4gisw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWhVh6RL7z15fC; Sun, 20 Oct 2024 15:02:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KF246x069067; Sun, 20 Oct 2024 15:02:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KF24GW069064; Sun, 20 Oct 2024 15:02:04 GMT (envelope-from git) Date: Sun, 20 Oct 2024 15:02:04 GMT Message-Id: <202410201502.49KF24GW069064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: edbeda6b7594 - stable/14 - netstat.1: Clarify -d argument 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/stable/14 X-Git-Reftype: branch X-Git-Commit: edbeda6b759459a9c2c5e8e12b18294d41959270 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=edbeda6b759459a9c2c5e8e12b18294d41959270 commit edbeda6b759459a9c2c5e8e12b18294d41959270 Author: Bram AuthorDate: 2024-07-17 08:26:50 +0000 Commit: Zhenlei Huang CommitDate: 2024-10-20 14:59:46 +0000 netstat.1: Clarify -d argument The man page states that the -d flag can be used to show the dropped packets. But, the number of dropped input packets are always shown, independent of the -d flag. This commit clarifies that the -d flag will add the number of dropped output packets to the output. MFC after: 3 days Reviewed by: imp, Alexander Ziaee Pull Request: https://github.com/freebsd/freebsd-src/pull/1332 (cherry picked from commit 1d551845f3e864e618a10ec6427bd46d887d4280) --- usr.bin/netstat/netstat.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index c2c34deba8e3..0a1f3342168c 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -27,7 +27,7 @@ .\" .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" -.Dd August 14, 2023 +.Dd July 29, 2024 .Dt NETSTAT 1 .Os .Sh NAME @@ -314,7 +314,7 @@ address with which they are associated. .It Fl b Show the number of bytes in and out. .It Fl d -Show the number of dropped packets. +Show the number of dropped output packets. .It Fl h Print all counters in human readable form. .It Fl n @@ -383,7 +383,7 @@ Show IPv6 only. See .Sx GENERAL OPTIONS . .It Fl d -Show the number of dropped packets. +Show the number of dropped output packets. .It Fl M Use an alternative core. See From nobody Sun Oct 20 15:03: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 4XWhX65BBcz5ZPny; Sun, 20 Oct 2024 15:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWhX64VqFz42qw; Sun, 20 Oct 2024 15:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729436598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fUUizSNXHUomoiAcz0BE44W/VN1qJ6Kqn9hxBiWflUM=; b=mAICs5RnRF9u4qis1VPoikp21YDwGs/MUJLDwNlhDZqwDvOROkX+Y4Kh/8B9KhJa5k558V P4PaytrhLHN0i1yjFFq58JT1E1VRWfDiBDEZmQg0yuRFdVv1PRgd9VmpLLRV5TqBKjy6QF 20l/Ih5wP4SaC0T1LpP+5Ns7qO5TJrRSi/feUFR9IvX5c/pWdZm12LYs3Q1U1P56XjK0Yf CJMvM77IaJFqB/Q+YOztTUN4Jhub5JDt7WQhZyHKwRWzisff/mFklAzqJKsOwzWQ6pdvUb 9CNcSV8Z0sOLY+jYoZb7wfHmymfT9Iw6kaHQ/9jP2UxdQBHUXGpo42S07PMf6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729436598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fUUizSNXHUomoiAcz0BE44W/VN1qJ6Kqn9hxBiWflUM=; b=KlU+iEF0wNggD2UthUnSxdRxyAcwUG06VTAfVoeYWAnVuH6N5BnGjMPswKHt0u7jx+RNrd VpxuwP6Xq1ARU66+cUR1YuGABYJ9ZF1nvSqvhAMPa9+Jqhb4UzlZ/sFTmNm/jnea5Qp74e bNWv10JcwlzvyWJX+E+7jg8q6P+3ce/R0JXMy2u1bbGy3Pci4icQ54CfnpwHK8SrmURAbT FlcGaQKNcXZQ8vjZYWkGTdAZ3j4WzEKrfUqbkxVU0G3/DCF/1ydFnmpAERPuDaqeddqzXY snjZJgpXGgfF7MRXeP7aqgmQdOYWMBg7GT2wY6ftpWAKIksoQOKsCyFxW8czpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729436598; a=rsa-sha256; cv=none; b=lSCT2lADFwH/HRDZpaDy+SMNjrQbRtGw6xv9Uk/ZzrvZCi8aaW4FPiXSPOW1ziox43VgS4 1IJI9iPTTt/456rqTO3ROo55r22ZRDC4sZUqgOMIzchaLnKcK5yn93tBFjsvEL/3q6tHoh joMjuAwFKvwvkQG7T57SZCDA7OKvxooT2i9afzRy84NpOKCXOXSEaVl/KbKq6dTPflSx1e ETLHaXSDyUOOPxOer6pkzF3hj/4ewU8Fm6VrvFlKbA69+Fc4pkvKZut7lhNx9eL+Ypbovg lCoTNmb5Wi0J1qM2fYE/tcK5QogFju0w3qwqu+ROClzMsuRVtO1G84zUBdc+ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWhX645syz161G; Sun, 20 Oct 2024 15:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KF3IPR073110; Sun, 20 Oct 2024 15:03:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KF3ICV073107; Sun, 20 Oct 2024 15:03:18 GMT (envelope-from git) Date: Sun, 20 Oct 2024 15:03:18 GMT Message-Id: <202410201503.49KF3ICV073107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f6711b97b228 - stable/13 - netstat.1: Clarify -d argument 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/stable/13 X-Git-Reftype: branch X-Git-Commit: f6711b97b22899bc9b6d5cb0ef796ab79f4e8500 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f6711b97b22899bc9b6d5cb0ef796ab79f4e8500 commit f6711b97b22899bc9b6d5cb0ef796ab79f4e8500 Author: Bram AuthorDate: 2024-07-17 08:26:50 +0000 Commit: Zhenlei Huang CommitDate: 2024-10-20 15:02:18 +0000 netstat.1: Clarify -d argument The man page states that the -d flag can be used to show the dropped packets. But, the number of dropped input packets are always shown, independent of the -d flag. This commit clarifies that the -d flag will add the number of dropped output packets to the output. MFC after: 3 days Reviewed by: imp, Alexander Ziaee Pull Request: https://github.com/freebsd/freebsd-src/pull/1332 (cherry picked from commit 1d551845f3e864e618a10ec6427bd46d887d4280) (cherry picked from commit edbeda6b759459a9c2c5e8e12b18294d41959270) --- usr.bin/netstat/netstat.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index 97e7c854711d..6767d48a279e 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -27,7 +27,7 @@ .\" .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" -.Dd August 14, 2023 +.Dd July 29, 2024 .Dt NETSTAT 1 .Os .Sh NAME @@ -321,7 +321,7 @@ address with which they are associated. .It Fl b Show the number of bytes in and out. .It Fl d -Show the number of dropped packets. +Show the number of dropped output packets. .It Fl h Print all counters in human readable form. .It Fl n @@ -390,7 +390,7 @@ Show IPv6 only. See .Sx GENERAL OPTIONS . .It Fl d -Show the number of dropped packets. +Show the number of dropped output packets. .It Fl M Use an alternative core. See From nobody Sun Oct 20 15:24:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XWj0N2YZBz5ZQhM; Sun, 20 Oct 2024 15:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWj0N218xz44XC; Sun, 20 Oct 2024 15:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729437860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KSUzkbofLV/U+nZnWIqCB7UCMkAZeLUMCsBOKdNoEa0=; b=C/gd4kYLKr61w3cYwOJ92+iv7OG6K6Dlpy3IGBMSZFauXYBRzo6x8eeZxjEGzflLhCRczj uP64EBhqOPwEEZtzN2v3Fl0Ep2VhWuNmNJa9gXHW+tcLP6yHXPdzoB/xEI4spPPQYJFARx s/pveFPiJy8F80MyBO5ICMO5SWzwsAlb3KMz+1glwug+QuuMe3oHCu6Wp2lR0cMoVVSm6G 1V9Ki69snPBSxRIdS98fVKX5+hAP/9i034p79C8xIkugf30FVFg16DsC70cISeBglSYJaU gnIhzdtmiDl9YUUbeKHFChY0WKSrEHI4X0A1K+D2pAMSGaywqq03k17ZhhGfng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729437860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KSUzkbofLV/U+nZnWIqCB7UCMkAZeLUMCsBOKdNoEa0=; b=Z6FAHPCLIek22P1rFC/rJkPERzPOlZcKsR3mokn3bIhjltlWOGPT4rt26z1Ff6Ckg6irps swe06z7igHGKw0YiicEp8T5iFvf/CFW6+KNNRkUsRh7d8dQEiAFayvzMLyU6/I1GOXiF++ TX3J7CXbPs84c5KY/sjuQ6Nwhiu8copHrKxZMjVsN76tBRqL9O/NOza/ihWgwXYjK7T1RX woxkAXOKzy4iux4tjjbgcBffF+uu0t1ILXIHAnTsjM6zUbqkolVvEks0MSe5VhG3jomhAo kVG63srjV0cusbDknVihjrY7Dia1xR+KcAQvr6T1nvZUUCqCS+Np/OSr6DtO3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729437860; a=rsa-sha256; cv=none; b=JLRbNgrRgiHO1h0mxC56XJb608AY7TJu0V5FAK8LaV5JLDaUUlfdqU6KPWMYEdpsMPMV3Q F8D3zQq/QxxQ8wObP3Tz03nulElj3nvZjhZrI3SgEGG8XI47WQZWag7f/FnZci5/dkECr3 OmJyRucGdRltFl1EDZMcqktcc1yF9yc/ZEGZ25Xhihp6bzlHQVsCTnYakrcljxptkCaKBt nV+/rLUUo8rZaZ0ADk+xpjMICavTwnEH/UNxLymKXc+tkxMPlB+dN6Se8PugD+SqectnMX HsHctHVwY/jrK6YZbdTefV9LRSDyLlDWZ3oSe8DgaVd/bBy0cpF0tMt2l8yEPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWj0N1LpQz16lX; Sun, 20 Oct 2024 15:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KFOKlY009726; Sun, 20 Oct 2024 15:24:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KFOK8G009723; Sun, 20 Oct 2024 15:24:20 GMT (envelope-from git) Date: Sun, 20 Oct 2024 15:24:20 GMT Message-Id: <202410201524.49KFOK8G009723@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: 745965ffb69e - stable/14 - amdtemp: add support for AMD Family 19h Models 40h-4Fh 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: 745965ffb69e37101c8c0453a681ad4ae4b6ff9f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=745965ffb69e37101c8c0453a681ad4ae4b6ff9f commit 745965ffb69e37101c8c0453a681ad4ae4b6ff9f Author: Matthias Lanter AuthorDate: 2024-10-13 13:21:19 +0000 Commit: Mark Johnston CommitDate: 2024-10-20 15:22:41 +0000 amdtemp: add support for AMD Family 19h Models 40h-4Fh PR: 281962 MFC after: 2 weeks (cherry picked from commit ecbe99e1627627b6797153899e4d95fde3e230e2) --- sys/dev/amdtemp/amdtemp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c index 583ff80cac69..37ec49f6975b 100644 --- a/sys/dev/amdtemp/amdtemp.c +++ b/sys/dev/amdtemp/amdtemp.c @@ -115,6 +115,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_HOSTB17H_M30H_ROOT 0x1480 /* Also M70H, F19H M00H/M20H */ #define DEVICEID_AMD_HOSTB17H_M60H_ROOT 0x1630 #define DEVICEID_AMD_HOSTB19H_M10H_ROOT 0x14a4 +#define DEVICEID_AMD_HOSTB19H_M40H_ROOT 0x14b5 #define DEVICEID_AMD_HOSTB19H_M60H_ROOT 0x14d8 #define DEVICEID_AMD_HOSTB19H_M70H_ROOT 0x14e8 @@ -142,6 +143,7 @@ static const struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M30H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M60H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M10H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M40H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M60H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M70H_ROOT, false }, }; @@ -875,6 +877,7 @@ amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model) maxreg = 12; _Static_assert((int)NUM_CCDS >= 12, ""); break; + case 0x40 ... 0x4f: /* Zen3+ Ryzen "Rembrandt" */ case 0x60 ... 0x6f: /* Zen4 Ryzen "Raphael" */ case 0x70 ... 0x7f: /* Zen4 Ryzen "Phoenix" */ sc->sc_temp_base = AMDTEMP_ZEN4_CCD_TMP_BASE; From nobody Sun Oct 20 15:24: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 4XWj0P5Hdqz5ZQPn; Sun, 20 Oct 2024 15:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWj0P2r3qz44Nk; Sun, 20 Oct 2024 15:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729437861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Zp1/sL6PG4+Y1xmVOfsbm5fu6etNWbK2k28xBBQvVU=; b=aHFtio7Jkgkv7/JU2ufrnU4gCEQjTbIxDp7F77Elu4GgckCgbLl1YhMbC+zZJravX3ZPAD nXM0myD9ezDhNOG0yowdTI1zx1ecrBK9gf+bAZmcOEUXo4Y9iGF2Q2eM6hBL1XSrGaL11S Om/TxztzwQ131eaQyzKYPZtI6/dxrPZSeji00jRfd/yuHIcZEzcdnrvQzMFq72AaIgmouZ Mqd4IgEaOFQMY4uUAY4KrZhZv6RsCCWE7qNRtkPGSqCY0U1qqnKwL77ULeuP8A15/kpqmD 2tcHdn/K+9Wm7Qj3/ZcDqW2knCm6Q1cMTeBbJ72cE3VbsmGgZMo1a6K+owTCFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729437861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Zp1/sL6PG4+Y1xmVOfsbm5fu6etNWbK2k28xBBQvVU=; b=a+BXV52DI+aeKP0a8QkOsOFp7vU1DGA4+lciGy7d9Zn25+u8VPury8tFBtkeC49yms4rDb XyIlSloEZWnSJkWG+B1jT4Or/A2z5RDeIIaAln1KENClIPM8224OHKcJWu5ETR7cCwwWbG g0JEUUfZ7yE5CZZevOdOeLvJbhd05muDjg0bilsxEKNRHlxvkRWJv5An54gnJ1WrLzUX6x 6mxx1rKONuBb5rRX1fUEqSFSi3kYxRDZpeYFK5ElwSb29GgDU3DeoEXkcFmL6VOsmk3LN0 dRCxEGKczdSyVvZHgRElPHBK6v3MsVagxwqnj81PPPM12RKY7KgnKq9LBh2gWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729437861; a=rsa-sha256; cv=none; b=UaP9NIKE1WlyfRavMHpLZqYweltdAIaSnPGsxFO34haL7pb3Wh2cjPf4T/luZ8CNgy2YN9 YxSIgjF9IKBKmqJb7U6XIxyadlCiAKFwoQXBfpNyMfRcUWtpM+nvbCzDUWv/5mX+swBQgO 6fHJY/To4BXeNynlq/cv75c1EajCl6PIsYOS/Jdj442MXCzkmyXi0wp42ALd2f683QTb0j AhDyHddan10q36w3SgrgER0OupEdK1muTs03dGorsMjK8lZO+pnGnWN3MM5Ho/1ixLbfOW Y9THqqtWn7Jc7RyoMZt7w6G65P9p/VAyPTh7YgajzEVoQpbBD9rvq/ds3edjaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWj0P2RB3z16Sq; Sun, 20 Oct 2024 15:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KFOLtQ009780; Sun, 20 Oct 2024 15:24:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KFOL0m009777; Sun, 20 Oct 2024 15:24:21 GMT (envelope-from git) Date: Sun, 20 Oct 2024 15:24:21 GMT Message-Id: <202410201524.49KFOL0m009777@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: 6bd08ccc9b09 - stable/14 - amdsmn: add support for AMD Family 19h Models 40h-4Fh 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: 6bd08ccc9b09ae5da4cb2561244ab57576752cd1 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6bd08ccc9b09ae5da4cb2561244ab57576752cd1 commit 6bd08ccc9b09ae5da4cb2561244ab57576752cd1 Author: Matthias Lanter AuthorDate: 2024-10-13 13:20:01 +0000 Commit: Mark Johnston CommitDate: 2024-10-20 15:22:46 +0000 amdsmn: add support for AMD Family 19h Models 40h-4Fh PR: 281962 MFC after: 2 weeks (cherry picked from commit a76e28d10f8516a2e796bba3fff4257b150bc259) --- sys/dev/amdsmn/amdsmn.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c index a0a7b9db60f8..4f85c830b327 100644 --- a/sys/dev/amdsmn/amdsmn.c +++ b/sys/dev/amdsmn/amdsmn.c @@ -60,6 +60,7 @@ #define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 /* Also M70H, F19H M00H/M20H */ #define PCI_DEVICE_ID_AMD_17H_M60H_ROOT 0x1630 #define PCI_DEVICE_ID_AMD_19H_M10H_ROOT 0x14a4 +#define PCI_DEVICE_ID_AMD_19H_M40H_ROOT 0x14b5 #define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8 #define PCI_DEVICE_ID_AMD_19H_M70H_ROOT 0x14e8 @@ -111,6 +112,12 @@ static const struct pciid { .amdsmn_addr_reg = F17H_SMN_ADDR_REG, .amdsmn_data_reg = F17H_SMN_DATA_REG, }, + { + .amdsmn_vendorid = CPU_VENDOR_AMD, + .amdsmn_deviceid = PCI_DEVICE_ID_AMD_19H_M40H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, { .amdsmn_vendorid = CPU_VENDOR_AMD, .amdsmn_deviceid = PCI_DEVICE_ID_AMD_19H_M60H_ROOT, From nobody Sun Oct 20 15:52: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 4XWjdL3lcLz5ZSlP; Sun, 20 Oct 2024 15:52:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWjdL1qHfz46nj; Sun, 20 Oct 2024 15:52:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729439574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8S9Eb9WlWd7htdLGyoA1gEJmbQUNl5CE+vuUROSVag0=; b=E4y6NPqVqNQYkrOqlUWt+49h4658XC9Z5/IpSEUVSx0gK1sG1W+XOfciz8+MGP8sOGV2KT hEYuX1GAcoERGJ/s/23O/8YwWwr7Pzh6v5CiTd+XuEes/JbtiRe8ft6OyDrRem3EO2N9qm OkjYi/EsLfrWN3aK0CdoXB6OxnSDo6NPCdhfulKz7qANk3GGVYQ+fFPReAT2N/ZZACGEbG Oln1apSzy1lQ+MkAiNLzgixZ+dCyfbCZqP2J1GwaOnUJJ3/dj4PwMzX8W0MLleKzQYI4ZV bdgV6oaBIYTo1Qac6axqJJpxs9xeRKOPYMxjJlLknMPwvyjRFxluHhwy+KK+xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729439574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8S9Eb9WlWd7htdLGyoA1gEJmbQUNl5CE+vuUROSVag0=; b=oKhyvFc7PP3LmHW6BFaSJtJKMjqaZjax1xUqnPOvNi15Q2HJxcSCTrSZ3zhPfmYWhCfTm1 0HkjDdvHBB6UtJgkq4dCkCiZf4r1+cPDST0u+9z99MkWGOYABW/7w2IBZp2dj/hwzs27Ad tnhzAKq5cyoznmpIe2xyn9ieK62nGFf3kRgtA4DjiS2oohEdbazL5AfYLvtLRLMQEt3cwk JG2+wLMa+A+uw/OoaD54sens68UT/XEL2o2OnckOnm8whPlpR0Lfhe6GX64kqvpRd07fH2 M8l0McscO28ocZw2kgSdgydeErNCJtf979wpDxXV+tlmh+EqDPESPMR9s8Aipw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729439574; a=rsa-sha256; cv=none; b=pliASpbjn/Ya1GBpL35cWUJY57S++8w1WMkzCJ7Z57soogGWGaSl2ymtnX57keMd9xOpG+ t50haoD6c8jrd+jakfrnlXdFY1CBfZ/QifuuQYikoTYIv142vD5OPgrG4UgjosXfvJbHzc QGbPrtKA4sty55MAPx16TsibYvucmciqZ93kyBH0nsQEp/ctuNSMK946EZtq+tjrUhZmP2 MiTF16/oApC3WvDgK0L3qQyB7OIOiEXwqM1OiGliicDHTCacQNSTZOJr2wubxH9pKlae9a XdCc7fxMug5u/qvIzA/wOaj+ZsVdl0VWMChNzwv/OdKwPvZ7pWu3enieiTH7vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWjdL17Zwz17Lr; Sun, 20 Oct 2024 15:52:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KFqsMZ064089; Sun, 20 Oct 2024 15:52:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KFqsiA064085; Sun, 20 Oct 2024 15:52:54 GMT (envelope-from git) Date: Sun, 20 Oct 2024 15:52:54 GMT Message-Id: <202410201552.49KFqsiA064085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3dc6188294dd - main - cdefs: Use __has_feature to gate the definition of __nosanitize* 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/main X-Git-Reftype: branch X-Git-Commit: 3dc6188294dd4f907f5f63cc3f1a79ea20dba99f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3dc6188294dd4f907f5f63cc3f1a79ea20dba99f commit 3dc6188294dd4f907f5f63cc3f1a79ea20dba99f Author: Mark Johnston AuthorDate: 2024-10-19 13:55:12 +0000 Commit: Mark Johnston CommitDate: 2024-10-20 14:25:30 +0000 cdefs: Use __has_feature to gate the definition of __nosanitize* clang 12 does not implement the coverage sanitizer, and the build fails when __attribute__((no_sanitize("coverage"))) is used. Try to work around the problem by giving __nosanitize* a non-trivial definition only when the corresponding sanitizer is actually enabled in the build. Tested by reading disassembly of pmap_update_strided() and pmap_enter() in a kernel compiled with "options COVERAGE", and similar sanity checks for the other sanitizers. I also test-booted KASAN and KMSAN kernels in amd64 bhyve. Suggested by: jrtc27 Reviewed by: imp Fixes: a78bacf3b0ec ("cdefs: Add __nosanitizecoverage") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47193 --- sys/sys/cdefs.h | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 353090db6995..6521a34595cb 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -712,21 +712,33 @@ * GCC has the nosanitize attribute, but as a function attribute only, and * warns on use as a variable attribute. */ -#if __has_attribute(no_sanitize) && defined(__clang__) +#if __has_feature(address_sanitizer) && defined(__clang__) #ifdef _KERNEL -#define __nosanitizeaddress __attribute__((no_sanitize("kernel-address"))) -#define __nosanitizememory __attribute__((no_sanitize("kernel-memory"))) +#define __nosanitizeaddress __attribute__((no_sanitize("kernel-address"))) #else -#define __nosanitizeaddress __attribute__((no_sanitize("address"))) -#define __nosanitizememory __attribute__((no_sanitize("memory"))) +#define __nosanitizeaddress __attribute__((no_sanitize("address"))) #endif -#define __nosanitizecoverage __attribute__((no_sanitize("coverage"))) -#define __nosanitizethread __attribute__((no_sanitize("thread"))) #else -#define __nosanitizeaddress -#define __nosanitizecoverage -#define __nosanitizememory -#define __nosanitizethread +#define __nosanitizeaddress +#endif +#if __has_feature(coverage_sanitizer) && defined(__clang__) +#define __nosanitizecoverage __attribute__((no_sanitize("coverage"))) +#else +#define __nosanitizecoverage +#endif +#if __has_feature(memory_sanitizer) && defined(__clang__) +#ifdef _KERNEL +#define __nosanitizememory __attribute__((no_sanitize("kernel-memory"))) +#else +#define __nosanitizememory __attribute__((no_sanitize("memory"))) +#endif +#else +#define __nosanitizememory +#endif +#if __has_feature(thread_sanitizer) && defined(__clang__) +#define __nosanitizethread __attribute__((no_sanitize("thread"))) +#else +#define __nosanitizethread #endif /* From nobody Sun Oct 20 15:52:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XWjdM3pJrz5ZSTR; Sun, 20 Oct 2024 15:52:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWjdM27Dgz47GD; Sun, 20 Oct 2024 15:52:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729439575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LWnAksanBiWcvhEsou7NTaY25WYk/wGcDvV/tQthaZQ=; b=yEtKbEjzTP782XvlgoWBWNJ3CXmF2z4DGn/FfzYVFDbPLkUzNf0/U/YnZILnbzwBSXfsmb 8+75Bw8GpLuLWPZdFXL2l1+8eXjMuoDvkKq08mR+SDGuhwNp1VQTwyNz175OT7YIZk1GQB LWXfcTjrq5bxYmEGJZp0M7Yl2M5rXfJoUiXj8KrC/wcmhgYCYQLA+OUwVDwulQ4Sk9g+xf 8kbypE7UchHnjIiCzfD0/dw6bF8R1+G0bg9p1mQ7ULQjb6PMIyAAkc8Y62RkB9ni1sSixd E2kfnEhJ6gUU1um1qIHn3WKf0FT9pyIDjAo8o0DIlaNl/b2CDE2b7bQ7ZP+Zpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729439575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LWnAksanBiWcvhEsou7NTaY25WYk/wGcDvV/tQthaZQ=; b=bvfUs2QYX09erOQ4yrtbhJhkrhJWvneceQlyteEDg+gs+NxoRbGG/YxDrvK3jMnkkRbruK hZDzAAbCebHnrucds1YnTtgoRfXn7RDw9YFIM5nVGgqTTeIHf7H9n8NJLjK/FWr8buAmzV Dpvmjq3umTt34KrLSH+fITzOUB2Rl81SiNza3LQ1LK5Ug2ctrfBY+QMprFkaivVZiHnoRS gc7GppyyAcM3YFNrVXu86/WBInrahxixWOA4BzI2RorI4NOImX5x+ZRKZA3s0l8eXpt4v+ 2LSpvIYwBCqXbo4ynxy96h3iuPLCXCz++OTqH+O8/bvjGWRbPSCf3y1HywVBlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729439575; a=rsa-sha256; cv=none; b=DMEsUoK7mImUQwfmgZDpziAJ7SuTrpBhua8rrrk4b9mcOLyz/Iw5ObpK1+5V2IknNaSVES K+3HCNB0TnlR8KmDzUaNpQHlfD+LgsU+2HP/lCKktGAhyM5a8bYYncN3UXTx9xEYYDweuE /u5hU8oz9kZW6FNdwyZAMvdVAGM9d9fmiXPynIWefH1Xj1DOkfmvZSqMPontIhnP37QcVm rkuAzjnBO+17RaCVVGDIX8dw+3F4s3s2OQ6gsozT8mVEqOs5my1FgVuchyYzNUFrzUvZ/Y KwA4AKkK9jGgg81enqw00At9T0M7a7NVIb+oPDxhYlMB4UqGlgOSdAAUZUvT7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWjdM1lFdz16xL; Sun, 20 Oct 2024 15:52:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KFqtaN064155; Sun, 20 Oct 2024 15:52:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KFqta0064152; Sun, 20 Oct 2024 15:52:55 GMT (envelope-from git) Date: Sun, 20 Oct 2024 15:52:55 GMT Message-Id: <202410201552.49KFqta0064152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: eaab882600d3 - main - Revert "Reapply "sbin/ping: allow normal users to specify larger packets"" 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/main X-Git-Reftype: branch X-Git-Commit: eaab882600d3cf1562a4030e7c91ad3e0861937b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eaab882600d3cf1562a4030e7c91ad3e0861937b commit eaab882600d3cf1562a4030e7c91ad3e0861937b Author: Mark Johnston AuthorDate: 2024-10-20 14:27:25 +0000 Commit: Mark Johnston CommitDate: 2024-10-20 15:52:28 +0000 Revert "Reapply "sbin/ping: allow normal users to specify larger packets"" The value of MAXPAYLOAD in the re-applied commit is not right. Back this out until it's had a proper review. This reverts commit b88df1e893c455731c7915f72a3b97b078ab04e2. Requested by: maxim, glebius --- sbin/ping/ping.8 | 3 ++- sbin/ping/ping.c | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sbin/ping/ping.8 b/sbin/ping/ping.8 index 951049d0f252..0eaec196e1e3 100644 --- a/sbin/ping/ping.8 +++ b/sbin/ping/ping.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2024 +.Dd September 15, 2023 .Dt PING 8 .Os .Sh NAME @@ -312,6 +312,7 @@ with the 8 bytes of ICMP header data. .Pp +For IPv4, only the super-user may specify values more than default. This option cannot be used with ping sweeps. .Pp For IPv6, you may need to specify diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index e6b1247af497..d9d544bc75c8 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -96,8 +96,8 @@ #define DEFDATALEN 56 /* default data length */ #define FLOOD_BACKOFF 20000 /* usecs to back off if F_FLOOD mode */ /* runs out of buffer space */ -#define MAXIPLEN ((int)sizeof(struct ip) + MAX_IPOPTLEN) -#define MAXPAYLOAD (IP_MAXPACKET - MAXIPLEN - ICMP_MINLEN) +#define MAXIPLEN (sizeof(struct ip) + MAX_IPOPTLEN) +#define MAXICMPLEN (ICMP_ADVLENMIN + MAX_IPOPTLEN) #define MAXWAIT 10000 /* max ms to wait for response */ #define MAXALARM (60 * 60) /* max seconds for alarm timeout */ #define MAXTOS 255 @@ -458,10 +458,11 @@ ping(int argc, char *const *argv) errx(EX_USAGE, "invalid packet size: `%s'", optarg); datalen = (int)ltmp; - if (datalen > MAXPAYLOAD) { - errx(EX_USAGE, + if (uid != 0 && datalen > DEFDATALEN) { + errno = EPERM; + err(EX_NOPERM, "packet size too large: %d > %u", - datalen, MAXPAYLOAD); + datalen, DEFDATALEN); } break; case 'T': /* multicast TTL */ From nobody Sun Oct 20 17:00: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 4XWl7f5vYYz5ZWyZ; Sun, 20 Oct 2024 17:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWl7f5LRTz4Ffv; Sun, 20 Oct 2024 17:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729443646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JJkU3JA/sfUdyWVuXrHtyWD5nsTqraVK80nNt3pjiTo=; b=yjiwaC7RY2+5hfL64x+5lbHI0P5rx47x2TLhyqTN/IqIedqQiwmrv5iqhWElvBMvOgfnt0 8npNGB1QjaQXbd3mAIUzSr3PynbdX+XEUrMgwA0r0OKfrmDGbwGRMf6tQxkrKPym7IwMLf JNM9WO7/zHhe1LeAaSAwZf2yyd5J0OdGTwnTuzktV7aygqZgRBmV6S13yC1BJ4pNQFJPKD jlvT2R8IqA7Pb0edOq7Rk9w7G8NbmaZyiBisqjCOAhdNt7SXnqMyW7+EIeiqUPrYkzPzao av6IIrHzWC9juZAcZndCxl5e1uGJyNuc0hQG+Zj3KgS1dmP1CD7KwRhWVvP/lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729443646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JJkU3JA/sfUdyWVuXrHtyWD5nsTqraVK80nNt3pjiTo=; b=rGAzBvfyAAhyQNgPyEDgssCsxAdg1RKdcZSyxpkXE+Me5hRuaHpNc2UGoobHVzb4rDvKH3 hagY2L7TZE7pa1ypBeKWgmNaUNu2nHrdvRTpStElXDrpqlaYgzY3728loFIFKaCeLmDnsQ uvh5fr4GDYaOPYdiSwUoA46nuKeq+pDYdZ7nujIurTK+8yVXqxlEFjbhZWnrzC/FGqK6bi 2ulU94iOafD2ZdjJ3fqVm60eAUCnI6uY9JM5Pk0oW6mvuphavxwsQeHS8LzP9llxaAIVmW CuesyxD9X9ZzkO310pLf8QwEeq6kOZt2cXody5WtL9n6SOBEsmu3dT/So8QYRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729443646; a=rsa-sha256; cv=none; b=E4HWYOs05o5klsgOvgs1B1Sbd6HD6FFVtPwVlzP4KXTIJ59jB890OsPUtx0GmKXPcHD/ea P8AKAmqRABHGs1c9a4UkTVGn9zsbUbP+daDgqXhjg/rR6MrlLPseHEeGWcKAFYtIol//ac MMH9f2XdilecMklYwODLPItvWLRPx/6ZpjWapzcu8K4RnHXIPCWXhKNL4V6yqdTu24/AQF sMqgw8ptIB7tMpXDi2wiN8xbJ9bqOuPXAu/GjMLVJtfN3kMFWhByN3qlCtB3kN8AdIgdmG iKf3lxTiEg79O1Nws4qC+VtspPYqdhhrJkNsH47xXLcWpJSUYb1e7w4brJig9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWl7f4qtlz18H7; Sun, 20 Oct 2024 17:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KH0kVU088505; Sun, 20 Oct 2024 17:00:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KH0kDb088502; Sun, 20 Oct 2024 17:00:46 GMT (envelope-from git) Date: Sun, 20 Oct 2024 17:00:46 GMT Message-Id: <202410201700.49KH0kDb088502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6244b9dc4a03 - main - la57: explain how the trampoline works 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/main X-Git-Reftype: branch X-Git-Commit: 6244b9dc4a03e87246bad1c94067dfe54ff4cdbc Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6244b9dc4a03e87246bad1c94067dfe54ff4cdbc commit 6244b9dc4a03e87246bad1c94067dfe54ff4cdbc Author: Konstantin Belousov AuthorDate: 2024-10-20 15:47:50 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-20 17:00:23 +0000 la57: explain how the trampoline works Reviewed by: markj, imp (previous version) Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D47208 --- sys/amd64/amd64/locore.S | 61 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 1ed9085e655c..d39503adadf0 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -89,15 +89,36 @@ ENTRY(btext) 0: hlt jmp 0b -/* la57_trampoline(%rdi pml5) */ +/* + * void la57_trampoline(%rdi pml5) + * + * Entered in 4-level paging long mode on AP, hopefully returns alive in + * 5-level paging mode. The parameter is a pointer to a 5-level page + * table root. The passed 5-level page table, and the current 4-level page + * table, both must map the trampoline code page 1:1 physical, below 4G. + * The trampoline must be PIC because it is copied from kernel text into + * this page. + * + * The current paging level cannot be changed while paging is enabled, and + * paging cannot be disabled while in long mode. As consequence, code + * switches into the compat mode, then disables paging to descend into + * protected mode. There, the paging level bit CR4.LA57 can be changed, + * and code directly jumps back into long mode. + * + * Falling into the protected mode requires single-purpose GDT entries, + * which are provided by the private GDT. It is the caller's responsibility + * to + * - restore the GDT and %gsbase after the call + * - reset IDT back to long mode. + */ ENTRY(la57_trampoline) - movq %rsp,lst(%rip) - movq %rbx,lst+8(%rip) - movq %rbp,lst+0x10(%rip) + movq %rsp,lst(%rip) /* save registers into memeory */ + movq %rbx,lst+8(%rip) /* upper halves are not saved .. */ + movq %rbp,lst+0x10(%rip) /* by 64->32->64 switch */ movq %cr4,%rax - orq $CR4_LA57,%rax + orq $CR4_LA57,%rax /* 5-lvl %cr4 */ movq %rax,lst+0x18(%rip) - leaq la57_trampoline_end(%rip),%rsp + leaq la57_trampoline_end(%rip),%rsp /* priv stack */ movq %cr0,%rbp lgdtq la57_trampoline_gdt_desc(%rip) @@ -111,45 +132,45 @@ ENTRY(la57_trampoline) .code32 l1: movl $(3<<3),%eax - movl %eax,%ss + movl %eax,%ss /* 32bit paged, priv gdt and stack */ movl %cr4,%eax - andl $~(CR4_PGE | CR4_PCIDE),%eax + andl $~(CR4_PGE | CR4_PCIDE),%eax /* clear sensitive paging ctrls */ movl %eax,%cr4 movl %ebp,%eax - andl $~CR0_PG,%eax + andl $~CR0_PG,%eax /* protected mode */ movl %eax,%cr0 - movl $MSR_EFER,%ecx - rdmsr + movl $MSR_EFER,%ecx /* disable long mode bit */ + rdmsr /* to safer tweaking LA57 */ andl $~EFER_LME,%eax wrmsr - movl %cr4,%eax + movl %cr4,%eax /* finally safe to switch bit */ orl $CR4_LA57,%eax movl %eax,%cr4 - movl %edi,%cr3 + movl %edi,%cr3 /* and load the 5-level pgtable root */ rdmsr orl $EFER_LME,%eax - wrmsr + wrmsr /* prepare for ... */ - movl %ebp,%cr0 - jmp 1f + movl %ebp,%cr0 /* and jump back directly into long */ + jmp 1f /* mode from protected by enabling pg */ -1: pushl $(1<<3) +1: pushl $(1<<3) /* reload %cs */ pushl %ebx lretl .code64 -l2: movq lst(%rip),%rsp +l2: movq lst(%rip),%rsp /* back on C stack */ movq lst+8(%rip),%rbx movq lst+0x10(%rip),%rbp movq lst+0x18(%rip),%rax - movq %rax,%cr4 - retq + movq %rax,%cr4 /* re-enable paging controls */ + retq /* back to C */ .p2align 4,0 lst: .quad 0,0,0,0 ENTRY(la57_trampoline_gdt_desc) From nobody Sun Oct 20 18:07: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 4XWmcs55FRz5Zc0J for ; Sun, 20 Oct 2024 18:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWmcs4Y97z4Mwk; Sun, 20 Oct 2024 18:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729447661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EVIQ4qpU1LhTVG1Cl52Ovm9QuLeu6GIVCzcAi2r7reM=; b=YO28+idtYDa4XoJOAaNNUS52S0UUMvmOxK0uNFmI5SjO7fvotbnltvtOvGb+Xg+5GJLQHR r+WVP/EB3+DXTZPyyv8fCvOqsswmDOfvBfXb0bDZAIoDOfbrq9Db/K27RXPrBf4iTWd3yX s6OwWtKw8572PjL7iLuv5X92ngQP9fxFiErGJ8PkzVLfnvaT7YNW7CWTOBaAI7n5M+90yO G0cNJLwlncDiFbIkdKiSHehCky4gzWbveniCYni6IwoyTeSlUBXP2y0BFXbRLQBlj+/97l WTvJj1/A9oXTu282lsffBC7OmP5Aq1LSMeCkRAFx9iGm8+07vV8Ai2SHRKwIxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729447661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EVIQ4qpU1LhTVG1Cl52Ovm9QuLeu6GIVCzcAi2r7reM=; b=dQqWqa0QLwjHkv91uDdMODQIQQ3AyRZrp7NehbBBIXFnTsoaIMrgLgG8N7OZmQvAI3rbMb LyKo+JhXi2nT2wPSt8ok55hkSMIl1RncWu3blUHTvEwzBvErWQ5lYS5/zCa/ITjOQQDgDl RJxKpY+V9Z4lxzsfb5WOrXt9F1za1IKjIINo9juoBJOv6SR//so5lKNOt9Sl8C4DSNgPk4 OEdwaypPqOME0CELJVJhMWXThzAWKP1lj3Po3y/QUz3k6uW2szGSEPP2rRLlJ3VoGw+i8o rvc4nUjXXxJkglL9KonIKuULEaP0mZtzjVEE7tojX1yy3H7hJIRj8qOeZEjE7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729447661; a=rsa-sha256; cv=none; b=lx/oLVuf257qzyANEnxmilKZ5FBS8u/SCDdBFafwd2Jbr0aHqXTNrbmn40C+c1O9iLj7id rQmFe4knPJfc57PVGt6bVJYF3WGKdOHerwiAyRrPW8Q2WLIcwkYc4BHxasoq+i8UcJe9/m M6Gt9SklSYqlPWyLzz/3Vel63eUmJ5MKu5iBdJ+dk/jvNCJD4b/k/wDZYFYKeRAm0X6/ln SeufG8JPSreJMHswNV5G4q2L4TcRUlPiLqYnviiWbCCPHmr5Ho52b8lqMu0XOExejaNQd5 DOCT/ze2BtnqpIck84Fu0xGXQ/QZl6MwIFML4Do3/kRFk2L0FoHZ/+84hdmp9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWmcs48Sgz1BHr; Sun, 20 Oct 2024 18:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KI7f9J007024; Sun, 20 Oct 2024 18:07:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KI7fAP007022; Sun, 20 Oct 2024 18:07:41 GMT (envelope-from git) Date: Sun, 20 Oct 2024 18:07:41 GMT Message-Id: <202410201807.49KI7fAP007022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 3a9fca901b44..b2f6de7b58f8 - vendor/openzfs/master - vendor branch updated 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: b2f6de7b58f81a4894ba26d87865a15e6115a1c2 X-Git-Oldrev: 3a9fca901b4463760001644b83da60bf14f7b554 X-Git-Newrev: b2f6de7b58f81a4894ba26d87865a15e6115a1c2 Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=3a9fca901b44..b2f6de7b58f8 437227a9cccc Update META 87ca6ba9a8c5 ZTS: Remove FreeBSD 13.4-STABLE 995a3a61fdcf ZTS: Fix summary page creation again - second try 0b4dcbe5b425 Fix generation of kernel uevents for snapshot rename on linux c59d5495fe17 contrib/debian: add new manpages to installation list e8f0aa143e1b Bump SONAME of libzfs and libzpool ab777f436ce2 Return boolean_t in inline functions of lib/libspl/include/sys/uio.h ca0141f325ec zpool/zfs: restore -V & --version options 65a94ffa8046 Only serialize native-deb* targets 75dda92dc36a ZTS: resilver_restart_001.ksh restore defaults cefef28e9895 vdev_id: multi-lun disks & slot num zero pad 4319e714022a ztest: Fix scrub check in ztest_raidz_expand_check() efeb60b86a22 FreeBSD: ignore some includes when not building kernel b4e4cbeb2024 Always validate checksums for Direct I/O reads 7bf525530afd zpool/zfs: allow --json wherever -j is allowed 7e4be92750a3 zdb: fix printf format in dump_zap() 34efa8e2d884 CI: Stick with ubuntu-22.04 for CodeQL analysis 9f3f80c0cc62 ZTS: Slightly increase dedup_quota limit 97ba7c210c8f ZTS: Increase zpool_import_parallel_pos import margin 48dfe3974710 Fallback to strerror() when strerror_l() isn't available c642e985e596 Revert "Temporarily disable Direct IO by default" e7b64159f86c ZTS: Optimize Kernel Same-page Merging (KSM) e0bf43d64ed0 ZTS: Make use of optimal CPU pinning 38a04f0a7c17 freebsd: Use compiler.h from FreeBSD's base's linuxkpi 27e8f5610262 Fix inconsistent mount options for ZFS root 0a001f30888f libspl/backtrace: dump registers in libunwind backtraces c7e47b3d9ac3 libspl/backtrace: helper macros for output 2596a7530698 libspl/backtrace: rename and document hex conversion function b85c56416112 libspl/backtrace: comment and harden libunwind backtracer fba6a90696ea zfs_debug: Restore log size limit for userspace a9851ea3dd6a Fix compile-time warnings caused by duplicate struct typedefs b2f6de7b58f8 zdb: show bp in uberblock dump From nobody Sun Oct 20 18:50: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 4XWnZb3XQLz5ZfRh; Sun, 20 Oct 2024 18:50:47 +0000 (UTC) (envelope-from maxim@freebsd.org) Received: from maxim.int.ru (maxim.int.ru [167.71.75.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "maxim.int.ru", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWnZb0VySz4Whh; Sun, 20 Oct 2024 18:50:46 +0000 (UTC) (envelope-from maxim@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from localhost (maxim@localhost [127.0.0.1]) by maxim.int.ru (8.17.1/8.17.1) with ESMTPS id 49KIoep6068380 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 20 Oct 2024 18:50:40 GMT (envelope-from maxim@freebsd.org) Date: Sun, 20 Oct 2024 18:50:40 +0000 (UTC) From: Maxim Konovalov To: Mark Johnston cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: eaab882600d3 - main - Revert "Reapply "sbin/ping: allow normal users to specify larger packets"" In-Reply-To: <202410201552.49KFqta0064152@gitrepo.freebsd.org> Message-ID: <41459a48-cc3f-0bf4-fe35-22c52ca0063c@maxim.int.ru> References: <202410201552.49KFqta0064152@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:14061, ipnet:167.71.64.0/20, country:US] X-Rspamd-Queue-Id: 4XWnZb0VySz4Whh X-Spamd-Bar: ---- Thank you, Mark. Maxim -- Maxim Konovalov From nobody Sun Oct 20 18:54: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 4XWngN64VYz5ZfNQ for ; Sun, 20 Oct 2024 18:54:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWngN2NWTz4XRC for ; Sun, 20 Oct 2024 18:54:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-71e52582cf8so2560342b3a.2 for ; Sun, 20 Oct 2024 11:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1729450494; x=1730055294; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sFrIF4peyv1AUjExkZDa4gjXN3MUWnss/0S1gsY6DIQ=; b=HSiW6M1YvNBpwKqXq24nIW3lZooyK1es5tO6CdCO20UAn+yDlsmfTb8aJ4cRL18DS8 wS5wCSFXYOPHqajBP2SCKCbyCz5gnuM5V5/XI9tbuIkgWGRWiBtVLllkLrFs7inK8n27 UdctoaL2a2fumhI9PHvoFFiRxJaqs0pv/1Frmn9CizamJjcbKygiugqOMJSPv0xwiCRR vCnxbSLzl8m3LbEvBjkSlsCs8VbHvgW/NmEIHjaGqbDrGYPmrLfwL1S5IpkIO2cGpoJO 8OexRq1BRZ6GcGqyJSmuU78rmNm8s4fgBdZEvuVQlpEDkCqed5WSJLHnFHnE8im5YMao 51hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729450494; x=1730055294; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sFrIF4peyv1AUjExkZDa4gjXN3MUWnss/0S1gsY6DIQ=; b=k8u6774cB7fA5W2RNdoOsTcVmWietFoKjHgKweldAGTZ9Kshyq8DrAODfVV2gPXVeI rO/jWD0/NXGBT4V4oIoqbl99gYKqch2SAid4AZKz3GjMFYG61vfI1D59FsSUMHBHozCy XfF0RpD3T+m4rmn9/QrNqNO3xyBkCuugLBm45LJP3icyIS66tlrzEzgr2zbjqcixdnma V78CaxajeNHr7/SdLfpKoAwe7jtp03tVJim/45pGR+rJp3nThNLWP4bH0xbZ8RgN7yXJ rT4qWEr2D3KpttIOhKQTTZtR9h+XGYYXB9TAOtChy1yclkhonb4PrhaaWu47kR+7gGdw j+Nw== X-Forwarded-Encrypted: i=1; AJvYcCWnCYa4zviVTdPkAK8AvZ8gH1iAyBqAUivtuysgRHHWWAddAu/1vf8Wfsnr+TKU1rYnxF9Nh3T4UrRAJB9enmza4Xeq@freebsd.org X-Gm-Message-State: AOJu0Yw77ZNcn3HQU4tdScBWl0X7aba7xKp9zmsCG9jglddHXtjif3Ae WddcKJ9hxf2k/tpaDk8jQS4yQm1BaU3sqxH4q6anAc+JORjDoGVjjwI6mGR5dhf6//WyAtlMOkS q6gE05CuHgSSqzPe9gassRym9pPmor2Kphd+jxw== X-Google-Smtp-Source: AGHT+IHHR0PesUp0HxkPpiM3rf6lA7Cq6ewV9SbkKVx/J/GkV6E1P1XDM8nlBMOuSMBiPQ/+55Ou9KyyoH1y1MqcCfs= X-Received: by 2002:a62:f250:0:b0:71e:374c:b9aa with SMTP id d2e1a72fcca58-71ea323c111mr9685143b3a.27.1729450494368; Sun, 20 Oct 2024 11:54:54 -0700 (PDT) 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 References: <202410201552.49KFqta0064152@gitrepo.freebsd.org> <41459a48-cc3f-0bf4-fe35-22c52ca0063c@maxim.int.ru> In-Reply-To: <41459a48-cc3f-0bf4-fe35-22c52ca0063c@maxim.int.ru> From: Warner Losh Date: Sun, 20 Oct 2024 12:54:42 -0600 Message-ID: Subject: Re: git: eaab882600d3 - main - Revert "Reapply "sbin/ping: allow normal users to specify larger packets"" To: Maxim Konovalov Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000005fba340624ed12da" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XWngN2NWTz4XRC X-Spamd-Bar: ---- --0000000000005fba340624ed12da Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Oct 20, 2024 at 12:50=E2=80=AFPM Maxim Konovalov wrote: > Thank you, Mark. > The urgency, in case people missed it elsewhere, is that next week is the stabilization week so known, unresolved regressions need to be backed out before then to get the best testing possible from 'stab week'. Warner > Maxim > > -- > Maxim Konovalov > --0000000000005fba340624ed12da Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



On Sun, Oct 20, 2024 at 12:50=E2=80=AFPM Maxim Konovalov <maxim@freebsd.org> w= rote:
Thank you,= Mark.

The urgency, in case people miss= ed it elsewhere, is that next week is the stabilization week so known,
unresolved regressions need to be backed out before then to get the b= est testing possible from
'stab week'.=C2=A0
Warner
=C2=A0
Maxim

--
Maxim Konovalov
--0000000000005fba340624ed12da-- From nobody Sun Oct 20 19: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 4XWpWb4V9dz5ZhG9; Sun, 20 Oct 2024 19: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWpWb40lxz4b9M; Sun, 20 Oct 2024 19: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=1729452795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfUCt6NRNDsGcDz53a1hkKWCbwRhyvVMkCyI8SX0y18=; b=VkCN3OsDzqUDYy3riBxlpTgPrc8BHnfq4uupuMQkXBX2A2149t2YNZgks2NkWD7fAgiD8e pxiGgbpF0uDb/Rcip2uMURkIubYk6SF1LnGJWVi733H/06s4qGfMQOpg3+Kn+n7OtW+pZ+ gqQkYAjzE4Uyf3tjyNccvVJRrfOPAnjYY8sELuCIZnWNnLbtSDZMKQhDrQCwvb3vTVp+Po xtahrHXICP3vmQbCTxbVkON0bR1Okvvpx8P22oxkDapqQKBT3WCzvmq6FpN8WJt7GW2/sV rHLyMNk+NYlVBz0e0HrtOQ/nisEilWUILCrVbuCELGIIxA7JVYPzL9kmy/FYsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729452795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfUCt6NRNDsGcDz53a1hkKWCbwRhyvVMkCyI8SX0y18=; b=wuHgItlL36kRsunRM6kQ/RjJh9jG/VtJhzeSyGPUS0hnk4xDXjuRE4I6Ky15VakGyycIeb ZbylIfp041mPUG54O/H+krF5HHh41JhB7duusP3q0PDruwSi9MgFC8M3+cIoNYgM7EUJ9b e6jItQz3ROpOBQSqv0PPPOMihGrOZD1EM4p69+DtoFvtyrwCFteUaeBgZ3aAJ9K6SZ5DPq TT49A/dd8f4+VwxhrdbT7BfEbES9ZU702BiTNHJRFTCP5naXA8d8O+xio3Jwg+1NPndvWM HprCqgfoED7y37/Pzdw5BIuPQaFygPNp/IJB44j7G0kuI4MwkraPPQ9ymygTrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729452795; a=rsa-sha256; cv=none; b=aFQOclcfl6RU1jEjR1E2OOHGh6JpXwSpAw9+muv2U8GbkKnFX6rzOUVGKVbEPAs03R09Nf 4zaxhIOF1s+gKTrD564kpFrqh1mEjsXncNOFp6TiK/kC9oGC7skndmz3JuAFGsfBcf67h4 df019BUG2RBICup1KYE5TBFaZznXFEk5e4bSmGaYK61DNFObVCBRTZGDMGwx/lmCsmNVJw Gk3qVmgMzbi26KST3IhHwXFQvh61TMezPIcNpbs3nM4w1FIbLSUz5TKIPHnHh1YyjgnlJ1 06r25KqOvDDICg7wqYv5Hd0/e4e9h0J7nYkT/3UZk5SToUabv/leN/ERjQXFhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWpWb3ZJkz1DvS; Sun, 20 Oct 2024 19:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KJXFEI073122; Sun, 20 Oct 2024 19:33:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KJXFWH073119; Sun, 20 Oct 2024 19:33:15 GMT (envelope-from git) Date: Sun, 20 Oct 2024 19:33:15 GMT Message-Id: <202410201933.49KJXFWH073119@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: 2e4b1bef561d - stable/14 - libicp: unbreak for armv6 after recent OpenZFS import 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: 2e4b1bef561d6c5b0ffa64ba2e789cbd60b2fa4e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2e4b1bef561d6c5b0ffa64ba2e789cbd60b2fa4e commit 2e4b1bef561d6c5b0ffa64ba2e789cbd60b2fa4e Author: Dimitry Andric AuthorDate: 2023-12-08 23:09:36 +0000 Commit: Mark Johnston CommitDate: 2024-10-20 19:16:53 +0000 libicp: unbreak for armv6 after recent OpenZFS import The following upstream commit: 727497ccdfcc module/icp/asm-arm/sha2: enable non-SIMD asm kernels on armv5/6 does indeed enable sha2 asm for earlier arm CPUs, but since libicp's Makefile was not updated, this leads to: ld: error: undefined reference due to --no-allow-shlib-undefined: zfs_sha256_block_armv7 Fix it by compiling sha256-armv7.S and sha512-armv7.S for armv6 too. Fixes: 3494f7c019fc (cherry picked from commit fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa) --- cddl/lib/libicp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile index 2d9bb3c67cb4..085818f2371a 100644 --- a/cddl/lib/libicp/Makefile +++ b/cddl/lib/libicp/Makefile @@ -21,7 +21,7 @@ ASM_SOURCES_AS = \ asm-x86_64/blake3/blake3_sse41.S CFLAGS+= -D__amd64 -D_SYS_STACK_H -UHAVE_AES -.elif ${MACHINE_ARCH} == "armv7" +.elif ${MACHINE_ARCH} == "armv6" || ${MACHINE_ARCH} == "armv7" ASM_SOURCES_C = ASM_SOURCES_AS = \ asm-arm/sha2/sha256-armv7.S \ From nobody Sun Oct 20 19:33: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 4XWpWc5LGjz5ZhGF; Sun, 20 Oct 2024 19:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWpWc4c0lz4Zm4; Sun, 20 Oct 2024 19:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729452796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nkJzM8OPp7vr/V2RvbWT2kTQJyNnGRx5tz8yFpDQyyY=; b=iMrichC4Ny/jt8oXxCbg+OMOcQU9pv787rluvzZS+D88TdbC5dXWm8K9YTaTnHo4RyRmkx Ml1aHyVmeCX22uFOxVo8C8SFKtNKgEfZMHfcHA1Pv0TPzk5omLqp7G434EeWKDgsKXIxb+ CI/eDO64cGTv3fm8XGdDDRPgPxlcI6anFEf3jk+9BqX50goW9fxqmTUlq1tbF3qO/fwe8M 1EWWPyzt40/54yHVXJtLlmzlsZSsxvYapdnafblKTm6s5nNDF9jyxR9l+e/8oJ9GE9vKmE XQXWAmlLri4SLoqh7ZeDXh6+FPV+qtZaQFu/Vyzp7/ruuhLShLgcZIUIqub2Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729452796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nkJzM8OPp7vr/V2RvbWT2kTQJyNnGRx5tz8yFpDQyyY=; b=aLj9xnzQ7hTHXwuxGfd2vmzZUO1a/5xhudNhqF3+lb2HIs2bRFuu+ZY5BhqrUN+sBYhTHf htHyweSYMCbvmUa62h44hM7z3uZD8r2FR2CbxQiUiYg2Cx38AnOnD0H4Rv9w6wSEwUvPEu tJBMwxtOdezceXjfkkCT3wi/WKoTFUilLk3rYQw9jNRejPA9KQrf7rSQZJwpf+5uRlOZNG RBGjgbdx5R52RES19wLe1Je+ktWqjc5KPo/OlXd0nuWKjgmuUBi4tY1an80ZNTf6YY4Jv6 uh+fsM3YctWrJUe42sd7P2U/rCOZl6YUnNLMX8gnadKY38TCG6v2fRhfOlXMSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729452796; a=rsa-sha256; cv=none; b=pBo2vemkaueyEai0QCK/cODVq17OMriNYJUbE8t874nvwqkW1uzYyk0GjEeJM7XtV+cgmJ BuZwjp0XsT4S312h2Ym4OQ5Gk77Z+ZUqK6w3ufNAAK6qPZZMAqUq9yh7TMxcAZoYR6qv3c AKFZQEtY5Qgo/n/W/Zd5zZ7jGR+4fjVHH0ZBg5mNB/aPFIafpYRdY4X3snyZDDcE7U5375 Ur0Gpllq62jxE8vI/mAz0K8uaiG/LSpYvlOZ9AXoZqkJ/AUsQkXOgy6GyRC2aMUzTDEKTs YDppk5sl6C/dXDObvLVzvZFsBYZuJRc8ONSGHlWgHrmlHdPHHqGU78+AXRqwYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWpWc4CnTz1CyL; Sun, 20 Oct 2024 19:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KJXG8N073178; Sun, 20 Oct 2024 19:33:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KJXGJu073175; Sun, 20 Oct 2024 19:33:16 GMT (envelope-from git) Date: Sun, 20 Oct 2024 19:33:16 GMT Message-Id: <202410201933.49KJXGJu073175@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: 3176b94a480b - stable/14 - libicp_rescue: unbreak for armv6 after recent OpenZFS import 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: 3176b94a480bd51eab2fc20a7051ff6b515f5d74 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3176b94a480bd51eab2fc20a7051ff6b515f5d74 commit 3176b94a480bd51eab2fc20a7051ff6b515f5d74 Author: Dimitry Andric AuthorDate: 2023-12-09 11:51:50 +0000 Commit: Mark Johnston CommitDate: 2024-10-20 19:17:38 +0000 libicp_rescue: unbreak for armv6 after recent OpenZFS import Similar to fb17dfa0c83c, fix libicp_rescue to include asm versions of sha2 on armv6, to unbreak the build of rescue. Fixes: 3494f7c019fc (cherry picked from commit 1a4a9a50574d9b4b4db90a85bc253d340c93a8a0) --- cddl/lib/libicp_rescue/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile index e129a2f3e0f9..cb2c868e2bc1 100644 --- a/cddl/lib/libicp_rescue/Makefile +++ b/cddl/lib/libicp_rescue/Makefile @@ -20,7 +20,7 @@ ASM_SOURCES_AS = \ asm-x86_64/blake3/blake3_sse41.S CFLAGS+= -D__amd64 -D_SYS_STACK_H -.elif ${MACHINE_ARCH} == "armv7" +.elif ${MACHINE_ARCH} == "armv6" || ${MACHINE_ARCH} == "armv7" ASM_SOURCES_C = ASM_SOURCES_AS = \ asm-arm/sha2/sha256-armv7.S \ From nobody Sun Oct 20 19:33: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 4XWpWd6x1bz5ZhLJ; Sun, 20 Oct 2024 19:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWpWd691bz4b4w; Sun, 20 Oct 2024 19:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729452797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tcr1DDvXmCY0DewunpfZxAbhfduafA3a0oY+Zn4a6J4=; b=cVcjtYf5n30Hfq9bitbX4hIg9ykzCYL+513WaROK1zWpdRR0KUqGmtaOjtZNZhyRoBshDF UhPD0cZXmEi2vwm6N5rB7OUPeR0QRhA02UGMt7K4ax7EurHUI+FTdIGKsKQgh5ulezi2/9 uFn0A+ecl2tJiKGzj3QLlZJjHSprFEdG41LPwX8zW3DixKRyDUNZUDO4bLSxZzDqwAqQqL uLnaGs0YuKqpqDQ4+nHYAqiYKuIVv7begaiJv7K8wUY3sk7+SpYktnAfwpBOeEto3o+m+4 JD40PxguFmOlPU7w3z2KfFSojp2tOeXs7zcZQ3sBieHae3k/HWOcvrO3Lg6wJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729452797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tcr1DDvXmCY0DewunpfZxAbhfduafA3a0oY+Zn4a6J4=; b=g8P/D1XhQgxZvtscIm4vicRrPZ7qkKPNhU1LMvFxmBgOzURamOm5bRPH05NM9hM0Un4ycB s9ybj/r5Qw0pqsdQJ54eWvEJ0n0l7xS4bu9ZMsSfmqtgnAwMtarEccFmEYrg18GYIzjapQ uLWlVQPgYCQc8irsvUJKhuETnxeaayJw46gpiP+BIwDA1T8NC7CWyzreT29VbKQhgQQNDP eqPlhGK2u3pJy9AsT11i05FRt+CbpCFfGLoX+oeqmdLQJknnXy8D70eGa6naNuumyptGQe MS7daHcQjdbwuLI5CjS54b1a6DZvMa9B5jQvZRWeLA+3ByZ7jXMsoWr+yM3M7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729452797; a=rsa-sha256; cv=none; b=AeXOHE/Te4tcfz37aBaTvyRgM/J5RsIfYTJv7AZFIoB7+bowHirvQJvfk2/NvrSobRZXeU btqOVWksIMIWqTYWIdswEJxsKBMRGfpHRlfsOiIQVrptygBlxHvir/5O8R0FpU+W72LBWL HWKEATvdn1xExdhlzbI5m9XuMk5Yl9h9/euakPHCGJ1fAnS4WofXVZedzuM5nkGhP/SeaA cY3I3DceuvD8PesZ+rkdTjbnzKGG098G5Q5CSk55cA/n9jMQvlxDFqRyRqMu8VIjvsybvw ERvcnfWxRQtEG7d9JVM7syjM1vbIVUhKh8qD6csBJAnzYkjsdl64QGYhy3RIaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWpWd5Y6zz1DdH; Sun, 20 Oct 2024 19:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KJXHT5073232; Sun, 20 Oct 2024 19:33:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KJXHun073229; Sun, 20 Oct 2024 19:33:17 GMT (envelope-from git) Date: Sun, 20 Oct 2024 19:33:17 GMT Message-Id: <202410201933.49KJXHun073229@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: 052fe26f9c51 - stable/14 - libicp(_rescue)?: use asm versions for all 32-bit arm flavors 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: 052fe26f9c512e1fb0cba3d82611ee2af568e523 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=052fe26f9c512e1fb0cba3d82611ee2af568e523 commit 052fe26f9c512e1fb0cba3d82611ee2af568e523 Author: Dimitry Andric AuthorDate: 2023-12-13 18:59:31 +0000 Commit: Mark Johnston CommitDate: 2024-10-20 19:17:43 +0000 libicp(_rescue)?: use asm versions for all 32-bit arm flavors OpenZFS upstream refactored the asm versions of sha2 to be usable on all 32-bit arm flavors, so it is not necessary to limit this to armv6 and armv7. Suggested by: jhb (cherry picked from commit bc6051a060f7f39540e284f2934e61411590dbfd) --- cddl/lib/libicp/Makefile | 2 +- cddl/lib/libicp_rescue/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile index 085818f2371a..1dbe4ace88ed 100644 --- a/cddl/lib/libicp/Makefile +++ b/cddl/lib/libicp/Makefile @@ -21,7 +21,7 @@ ASM_SOURCES_AS = \ asm-x86_64/blake3/blake3_sse41.S CFLAGS+= -D__amd64 -D_SYS_STACK_H -UHAVE_AES -.elif ${MACHINE_ARCH} == "armv6" || ${MACHINE_ARCH} == "armv7" +.elif ${MACHINE_CPUARCH} == "arm" ASM_SOURCES_C = ASM_SOURCES_AS = \ asm-arm/sha2/sha256-armv7.S \ diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile index cb2c868e2bc1..196f96b1fcf8 100644 --- a/cddl/lib/libicp_rescue/Makefile +++ b/cddl/lib/libicp_rescue/Makefile @@ -20,7 +20,7 @@ ASM_SOURCES_AS = \ asm-x86_64/blake3/blake3_sse41.S CFLAGS+= -D__amd64 -D_SYS_STACK_H -.elif ${MACHINE_ARCH} == "armv6" || ${MACHINE_ARCH} == "armv7" +.elif ${MACHINE_CPUARCH} == "arm" ASM_SOURCES_C = ASM_SOURCES_AS = \ asm-arm/sha2/sha256-armv7.S \ From nobody Sun Oct 20 22:22:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XWtHM5py1z5Zrkh; Sun, 20 Oct 2024 22:22:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XWtHM3WCvz4w2D; Sun, 20 Oct 2024 22:22:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729462975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SLyd6x66V5yBjuvzD9XGbfJdlr1rjGaSE2Ud3H0IOXE=; b=fCro2SoZg8ec9xRCROb9pVgtaGjtHu8ica/uQL1+jnuIVK3uBci4Si/o3eSqJXI78e12VD NkW/qf8cuAgt5X2axiomdtt9lVkkkKAZsRUzAgqpgWdjcn0WAMCf5bn8oIkrsirnDlE8wm SucTSjcRmFivn2zy4dyN+MY41cPpZfnWBl5/0rx5nPzfoJIID53CG/TVyMOQAOGuubmYQe FutKq0UQO6CzN/7W7ogVGqLbY5IFPtUGuV61hjCMQrKj2YuBVGdik9ua/VhsTCUWj0wBRj fxzgmJRp+LBPWvVft2aYdBGpxeBQlEu9EYkw3Eu1jqzcZllO9p7BEdiWYu8WZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729462975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SLyd6x66V5yBjuvzD9XGbfJdlr1rjGaSE2Ud3H0IOXE=; b=fn1oWPiV/oVLbmbnDHQw8W/XlYCUqJXAjcrtyRwOAnXAmKQiw9xY5GgOfzDonj5OP8kGmt SieW9LdRMbns5YsTrgLpniTTqOY1Lu7Sntc5zPkjcrly2ehfjwZqDH3yahBy5F+rsGXgua ctlquQ4bT4PEJCZVXl/WQ28XjaefELvIhVuV3AkcdiO7K05OiFYV/MqQ3TzlDEeZDd0MPD FVCRmK3SRBWMiKyZ/Bk/AQoSnU+sNU45odcYjrdoCm7SdBNMmLbbd14bFtOQMcTPjA5Vd+ SvYaVeJR8DFGXoDjvh3D0i/v5S4fYdBoUaOQZyxSYAJ28mLOD5dpl0VMHbvC2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729462975; a=rsa-sha256; cv=none; b=enoKxaEzjIL6IYx6hFCe5Bf1caraBiY5AqYhWbTRIAGmb8RMJ4SjE4MafvvynXbYawJ+Bm KJKGjN8GUMd3quUwZXXe7PkSJLG/qc2VuYNbTDz4Kfz7qmaNX0tffFVkI0mfDFcAa+2g8L uoO5KZcMG5gsLKUQFNnb+FFvAzubzXSACIo0N0BgmUHKdPORdBkY1bbCiwWs2l4Ap3QNGz spJ1bzuraJZOU7fJ7aZvF0ULv8Ti7E4O6xM/oSOrjrGWLifBgfD3RHEiZXUbdVAW0lvg3s vkyvIRI56a/Qa74K0kEPlwZCVdFTN1rp98ftHmjOueMwrCWvw1kKeQcQ67L0wA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XWtHM2yMGz1KH6; Sun, 20 Oct 2024 22:22:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49KMMtm2085596; Sun, 20 Oct 2024 22:22:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49KMMqnm085568; Sun, 20 Oct 2024 22:22:52 GMT (envelope-from git) Date: Sun, 20 Oct 2024 22:22:52 GMT Message-Id: <202410202222.49KMMqnm085568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 87bf66d4a748 - main - zfs: merge openzfs/zfs@b2f6de7b5 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87bf66d4a7488c496af110d4d05cc0273d49f82e Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=87bf66d4a7488c496af110d4d05cc0273d49f82e commit 87bf66d4a7488c496af110d4d05cc0273d49f82e Merge: 6244b9dc4a03 b2f6de7b58f8 Author: Martin Matuska AuthorDate: 2024-10-20 18:08:55 +0000 Commit: Martin Matuska CommitDate: 2024-10-20 19:26:56 +0000 zfs: merge openzfs/zfs@b2f6de7b5 Notable upstream pull request merges: #16598 b4e4cbeb2 Always validate checksums for Direct I/O reads #16603 cefef28e9 vdev_id: multi-lun disks & slot num zero pad #16613 ab777f436 Return boolean_t in inline functions of lib/libspl/include/sys/uio.h #16616 efeb60b86 FreeBSD: ignore some includes when not building kernel #16617 ca0141f32 zpool/zfs: restore -V & --version options #16632 7bf525530 zpool/zfs: allow --json wherever -j is allowed #16635 7e4be9275 zdb: fix printf format in dump_zap() #16640 48dfe3974 Fallback to strerror() when strerror_l() isn't available #16650 38a04f0a7 freebsd: Use compiler.h from FreeBSD's base's linuxkpi #16664 fba6a9069 zfs_debug: Restore log size limit for userspace #16665 fba6a9069 Fix compile-time warnings caused by duplicate struct typedefs #16667 b2f6de7b5 zdb: show bp in uberblock dump Obtained from: OpenZFS OpenZFS commit: b2f6de7b58f81a4894ba26d87865a15e6115a1c2 sys/contrib/openzfs/.github/workflows/codeql.yml | 2 +- .../.github/workflows/scripts/qemu-1-setup.sh | 18 +- .../.github/workflows/scripts/qemu-2-start.sh | 32 ++- .../.github/workflows/scripts/qemu-5-setup.sh | 17 +- .../workflows/scripts/qemu-9-summary-page.sh | 4 +- sys/contrib/openzfs/.github/workflows/zfs-qemu.yml | 14 +- sys/contrib/openzfs/META | 4 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 4 + sys/contrib/openzfs/cmd/zfs/zfs_main.c | 30 ++- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 18 +- sys/contrib/openzfs/cmd/ztest.c | 19 +- sys/contrib/openzfs/config/deb.am | 20 +- sys/contrib/openzfs/config/user.m4 | 2 +- sys/contrib/openzfs/contrib/debian/Makefile.am | 8 +- sys/contrib/openzfs/contrib/debian/clean | 4 +- sys/contrib/openzfs/contrib/debian/control | 26 +-- .../{openzfs-libzfs4.docs => openzfs-libzfs6.docs} | 0 ...bzfs4.install.in => openzfs-libzfs6.install.in} | 0 ...enzfs-libzpool5.docs => openzfs-libzpool6.docs} | 0 ...ol5.install.in => openzfs-libzpool6.install.in} | 0 .../contrib/debian/openzfs-zfsutils.install | 2 + sys/contrib/openzfs/contrib/initramfs/scripts/zfs | 5 +- sys/contrib/openzfs/include/libzutil.h | 4 + .../openzfs/include/os/linux/spl/sys/taskq.h | 3 +- .../openzfs/include/os/linux/zfs/sys/abd_os.h | 12 +- .../include/os/linux/zfs/sys/zfs_vfsops_os.h | 1 + sys/contrib/openzfs/include/sys/fm/fs/zfs.h | 3 +- sys/contrib/openzfs/include/sys/vdev_raidz.h | 2 +- sys/contrib/openzfs/include/sys/zio.h | 29 +-- sys/contrib/openzfs/lib/libspl/backtrace.c | 219 +++++++++++++++++---- sys/contrib/openzfs/lib/libzfs/Makefile.am | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs.abi | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 2 +- sys/contrib/openzfs/lib/libzpool/Makefile.am | 2 +- sys/contrib/openzfs/lib/libzpool/zfs_debug.c | 18 ++ sys/contrib/openzfs/man/man4/zfs.4 | 2 +- sys/contrib/openzfs/man/man5/vdev_id.conf.5 | 10 +- sys/contrib/openzfs/man/man8/zfs-list.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-mount.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-program.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-set.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-events.8 | 5 +- sys/contrib/openzfs/man/man8/zpool-get.8 | 4 +- sys/contrib/openzfs/man/man8/zpool-list.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-status.8 | 10 +- sys/contrib/openzfs/module/os/freebsd/zfs/abd_os.c | 41 +++- sys/contrib/openzfs/module/os/linux/zfs/abd_os.c | 4 +- .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 109 +++++++++- .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 6 +- sys/contrib/openzfs/module/zcommon/zfs_valstr.c | 1 + sys/contrib/openzfs/module/zfs/dmu_direct.c | 2 +- sys/contrib/openzfs/module/zfs/dsl_dataset.c | 11 +- sys/contrib/openzfs/module/zfs/vdev_draid.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 14 ++ sys/contrib/openzfs/module/zfs/vdev_mirror.c | 21 ++ sys/contrib/openzfs/module/zfs/vdev_raidz.c | 44 ++++- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 33 +++- sys/contrib/openzfs/module/zfs/zio.c | 120 +++++++---- sys/contrib/openzfs/rpm/generic/zfs.spec.in | 45 +++-- sys/contrib/openzfs/tests/runfiles/common.run | 4 +- .../tests/zfs-tests/cmd/manipulate_user_buffer.c | 180 +++++++++++------ .../openzfs/tests/zfs-tests/tests/Makefile.am | 1 + .../tests/functional/cli_root/json/json_sanity.ksh | 51 +++-- .../zpool_import/zpool_import_parallel_pos.ksh | 4 +- .../tests/functional/dedup/dedup_quota.ksh | 2 +- .../zfs-tests/tests/functional/direct/dio.kshlib | 10 +- .../tests/functional/direct/dio_read_verify.ksh | 107 ++++++++++ .../functional/direct/dio_write_stable_pages.ksh | 6 +- .../tests/functional/direct/dio_write_verify.ksh | 18 +- .../replacement/resilver_restart_001.ksh | 3 + .../zvol/zvol_misc/zvol_misc_snapdev.ksh | 13 ++ sys/contrib/openzfs/udev/vdev_id | 18 +- sys/modules/zfs/zfs_config.h | 15 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 74 files changed, 1112 insertions(+), 344 deletions(-) diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/direct/dio_read_verify.ksh index 000000000000,456d429b1d99..456d429b1d99 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/direct/dio_read_verify.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/direct/dio_read_verify.ksh diff --cc sys/modules/zfs/zfs_config.h index 5dc43281242f,000000000000..91bb885be72f mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,840 -1,0 +1,831 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* __assign_str() has one arg */ +/* #undef HAVE_1ARG_ASSIGN_STR */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* backtrace() is available */ +/* #undef HAVE_BACKTRACE */ + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_file_open_by_path() exists */ +/* #undef HAVE_BDEV_FILE_OPEN_BY_PATH */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* bdev_nr_bytes() is available */ +/* #undef HAVE_BDEV_NR_BYTES */ + +/* bdev_open_by_path() exists */ +/* #undef HAVE_BDEV_OPEN_BY_PATH */ + +/* bdev_release() exists */ +/* #undef HAVE_BDEV_RELEASE */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* __blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS */ + +/* __blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS */ + +/* blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_FLAGS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() exists */ +/* #undef HAVE_BLKDEV_PUT */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* struct queue_limits has a features field */ +/* #undef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_disk() exists and takes 2 args */ +/* #undef HAVE_BLK_ALLOC_DISK_2ARG */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue hardware context is cached in struct request */ +/* #undef HAVE_BLK_MQ_RQ_HCTX */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* backing_dev_info is available through queue gendisk */ +/* #undef HAVE_BLK_QUEUE_DISK_BDI */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dequeue_signal() takes a task argument */ +/* #undef HAVE_DEQUEUE_SIGNAL_3ARG_TASK */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the 'execvpe' function. */ +#define HAVE_EXECVPE 1 + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* file->f_version exists */ +/* #undef HAVE_FILE_F_VERSION */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* GENHD_FL_EXT_DEVT flag is available */ +/* #undef HAVE_GENHD_FL_EXT_DEVT */ + +/* GENHD_FL_NO_PART flag is available */ +/* #undef HAVE_GENHD_FL_NO_PART */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the 'gettid' function. */ +/* #undef HAVE_GETTID */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* mnt_idmap does not have user_namespace */ +/* #undef HAVE_IDMAP_NO_USERNS */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_atime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_ATIME */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* inode_get_mtime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_MTIME */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_atime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_ATIME_TO_TS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_mtime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_MTIME_TO_TS */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_get_pages() is available */ +/* #undef HAVE_IOV_ITER_GET_PAGES */ + +/* iov_iter_get_pages2() is available */ +/* #undef HAVE_IOV_ITER_GET_PAGES2 */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* Define to 1 if you have the 'issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel defines intptr_t */ +/* #undef HAVE_KERNEL_INTPTR_T */ + +/* kernel has kernel_neon_* functions */ +/* #undef HAVE_KERNEL_NEON */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* strlcpy() exists */ +/* #undef HAVE_KERNEL_STRLCPY */ + +/* kernel has kmap_local_page */ +/* #undef HAVE_KMAP_LOCAL_PAGE */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [unwind] */ +/* #undef HAVE_LIBUNWIND */ + +/* libunwind has unw_get_elf_filename */ +/* #undef HAVE_LIBUNWIND_ELF */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* building against unsupported kernel version */ +/* #undef HAVE_LINUX_EXPERIMENTAL */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Define to 1 if you have the 'mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* PG_error flag is available */ +/* #undef HAVE_MM_PAGE_FLAG_ERROR */ + +/* page_mapping() is available */ +/* #undef HAVE_MM_PAGE_MAPPING */ + +/* page_size() is available */ +/* #undef HAVE_MM_PAGE_SIZE */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* proc_handler ctl_table arg is const */ +/* #undef HAVE_PROC_HANDLER_CTL_TABLE_CONST */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_sz exists */ +/* #undef HAVE_REGISTER_SYSCTL_SZ */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* shrinker_register exists */ +/* #undef HAVE_SHRINKER_REGISTER */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the 'strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the 'strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* have super_block s_shrink */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK */ + +/* have super_block s_shrink pointer */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the 'udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* invalidate_folio exists */ +/* #undef HAVE_VFS_INVALIDATE_FOLIO */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + - /* fops->iterate() is available */ - /* #undef HAVE_VFS_ITERATE */ - - /* fops->iterate_shared() is available */ - /* #undef HAVE_VFS_ITERATE_SHARED */ - - /* fops->readdir() is available */ - /* #undef HAVE_VFS_READDIR */ - +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* release_folio exists */ +/* #undef HAVE_VFS_RELEASE_FOLIO */ + +/* fops->remap_file_range() is available */ +/* #undef HAVE_VFS_REMAP_FILE_RANGE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* splice_copy_file_range() is available */ +/* #undef HAVE_VFS_SPLICE_COPY_FILE_RANGE */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +/* int (*writepage_t)() takes struct folio* */ +/* #undef HAVE_WRITEPAGE_T_FOLIO */ + +/* xattr_handler->get() wants dentry and inode and flags */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS */ + +/* xattr_handler->set() wants both dentry and inode */ +/* #undef HAVE_XATTR_SET_DENTRY_INODE */ + +/* xattr_handler->set() takes mnt_idmap */ +/* #undef HAVE_XATTR_SET_IDMAP */ + +/* xattr_handler->set() takes user_namespace */ +/* #undef HAVE_XATTR_SET_USERNS */ + +/* Define if host toolchain supports XSAVE */ +#define HAVE_XSAVE 1 + +/* Define if host toolchain supports XSAVEOPT */ +#define HAVE_XSAVEOPT 1 + +/* Define if host toolchain supports XSAVES */ +#define HAVE_XSAVES 1 + +/* ZERO_PAGE() is GPL-only */ +/* #undef HAVE_ZERO_PAGE_GPL_ONLY */ + +/* Define if you have [z] */ +#define HAVE_ZLIB 1 + +/* kernel exports FPU functions */ +/* #undef KERNEL_EXPORTS_X86_FPU */ + +/* TBD: fetch(3) support */ +#if 0 +/* whether the chosen libfetch is to be loaded at run-time */ +#define LIBFETCH_DYNAMIC 1 + +/* libfetch is fetch(3) */ +#define LIBFETCH_IS_FETCH 1 + +/* libfetch is libcurl */ +#define LIBFETCH_IS_LIBCURL 0 + +/* soname of chosen libfetch */ +#define LIBFETCH_SONAME "libfetch.so.6" +#endif + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* make_request_fn() return type */ +/* #undef MAKE_REQUEST_FN_RET */ + +/* using complete_and_exit() instead */ +/* #undef SPL_KTHREAD_COMPLETE_AND_EXIT */ + +/* Defined for legacy compatibility. */ +#define SPL_META_ALIAS ZFS_META_ALIAS + +/* Defined for legacy compatibility. */ +#define SPL_META_RELEASE ZFS_META_RELEASE + +/* Defined for legacy compatibility. */ +#define SPL_META_VERSION ZFS_META_VERSION + +/* pde_data() is PDE_DATA() */ +/* #undef SPL_PDE_DATA */ + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define SYSTEM_FREEBSD 1 + +/* True if ZFS is to be compiled for a Linux system */ +/* #undef SYSTEM_LINUX */ + +/* Version number of package */ +/* #undef ZFS_DEBUG */ + +/* /dev/zfs minor */ +/* #undef ZFS_DEVICE_MINOR */ + +/* Define the project alias string. */ - #define ZFS_META_ALIAS "zfs-2.3.0-rc1-FreeBSD_g3a9fca901" ++#define ZFS_META_ALIAS "zfs-2.3.99-31-FreeBSD_gb2f6de7b5" + +/* Define the project author. */ +#define ZFS_META_AUTHOR "OpenZFS" + +/* Define the project release date. */ +/* #undef ZFS_META_DATA */ + +/* Define the maximum compatible kernel version. */ +#define ZFS_META_KVER_MAX "6.11" + +/* Define the minimum compatible kernel version. */ +#define ZFS_META_KVER_MIN "4.18" + +/* Define the project license. */ +#define ZFS_META_LICENSE "CDDL" + +/* Define the libtool library 'age' version information. */ +/* #undef ZFS_META_LT_AGE */ + +/* Define the libtool library 'current' version information. */ +/* #undef ZFS_META_LT_CURRENT */ + +/* Define the libtool library 'revision' version information. */ +/* #undef ZFS_META_LT_REVISION */ + +/* Define the project name. */ +#define ZFS_META_NAME "zfs" + +/* Define the project release. */ - #define ZFS_META_RELEASE "rc1-FreeBSD_g3a9fca901" ++#define ZFS_META_RELEASE "31-FreeBSD_gb2f6de7b5" + +/* Define the project version. */ - #define ZFS_META_VERSION "2.3.0" ++#define ZFS_META_VERSION "2.3.99" + +/* count is located in percpu_ref.data */ +/* #undef ZFS_PERCPU_REF_COUNT_IN_DATA */ diff --cc sys/modules/zfs/zfs_gitrev.h index 3a1480d8dc66,000000000000..e090ccb924f2 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_gitrev.h +++ b/sys/modules/zfs/zfs_gitrev.h @@@ -1,1 -1,0 +1,1 @@@ - #define ZFS_META_GITREV "zfs-2.3.0-rc1-0-g3a9fca901" ++#define ZFS_META_GITREV "zfs-2.3.99-31-gb2f6de7b5"