From nobody Mon Oct 14 05:40:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 05:41:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 08:08:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:31:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 09:28:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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 14:29:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:32:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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 17:05:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XShK10NlTz5Ylcc; Tue, 15 Oct 2024 17:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShK05PK7z4ZMH; Tue, 15 Oct 2024 17:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gKnqjSTbIrkTCYdERujRH5BMn3xCsCu8ewEPD69gsbI=; b=wr3qF4dJZkNcBBdmd0DdSyHLMMlVKUK9831zhzGWfmi9YQ0psRE/i17JDpxgz+g4SWSeQO nPGMC6wIKKhR9fcQVezjdK7UTcRjWGbCpANZpAXIpmC9z3u1ikWEWNQLO4LNRFvzQ6C8FF Eze3BPMxNw/ER3x4xjUhQCZejWDBy0WdjmX/6BqkpY7XM0zKEU5q+HwSq8HmulSO6WAHdf wHqYIW97ptxpl8QmiqEhZAymwPDhn7po2N7D7wx/1anbEe90u8t3esHPjP0ub7C8zQzhZd 966EYmGskkbrTFdR5p46vvQZg32wmK4OiyTMFloEMAp/ws68uXEL+l5IKj91Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gKnqjSTbIrkTCYdERujRH5BMn3xCsCu8ewEPD69gsbI=; b=CDzUfj9QgkJBFuu4vIgfhXkr3lTro8q3z9nHI+o2jfwsPhUGAzEhG9Fazp69XGGmAnXvRF +k3lU3eT8dXlddTkh7uEr/8UzRVVGvvddoNzlUpw+GCm/qY+tc+gYO+wrpKRPrZkOa3bLq 6+rMEn9gJ4zYV7enVUeH0a6/EkgtheUdffrJj/6ie9Matp9QROMSU+w3Eyg75vknayll0J 0hojCW28FSui12M3QR0RQH7KoWtVcQdPx+cfujDpvFv/WY1tc5Y6d5pNoGsfGTqt9NYKSq D/WxDEMPA47Jb43H20HlXR7v4pTqR1pD0vbxSfP8BXeWsspD89+3eWdSzFHj9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014196; a=rsa-sha256; cv=none; b=lRVYyXpcHDGs2n6lWgzf5FAgm/9tYiJjhCEk6UO4LNC30TkgZ1MnSX2AFuTbBLVTGt53jh t/NF/wWOHRTR5MFTTfcJmQUxJLIl8A3qbfBRhnVFo7GoF6jBPID+lofkMihYZq14arCDHY p7X5ABSMJL26gOSaBIdt8dVsXyGVbppopKjYbJBgawTpbA/LzE4F16ageL7AgErUGqzqjf 03KY8+9fVVZRATgQALfwsNu0g9P4K4QFm126rbBdTJC3FmqSSPxzZSurZ2cCTWR3qrv86E AcMHWm7TpNMmfT3fk1muAECv2/bxVCTjiOopSXXsijt6639Wg+32V4ORh7bqbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XShK04yhpzXdD; Tue, 15 Oct 2024 17:43: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 49FHhGUR062551; Tue, 15 Oct 2024 17:43:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhG8U062548; Tue, 15 Oct 2024 17:43:16 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:16 GMT Message-Id: <202410151743.49FHhG8U062548@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: 2f17afd19a35 - main - ena: Clear NS_MOREFRAG flag for last netmap slot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f17afd19a3534dc1755c52edb0c2f70ea0eb1e4 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=2f17afd19a3534dc1755c52edb0c2f70ea0eb1e4 commit 2f17afd19a3534dc1755c52edb0c2f70ea0eb1e4 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:21 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +0000 ena: Clear NS_MOREFRAG flag for last netmap slot When processing packets within the rx-flow ena_netmap_rx_load_desc doesn't know the number of descriptors, so it sets NS_MOREFRAG to all the slots to indicate that there are more fragments for this packet. The code calls ena_netmap_rx_load_desc() for every descriptor in this packet to map the relevant buffer into the netmap shared memory. After ena_netmap_rx_load_desc() calls, we need to unset the NS_MOREFRAG for the last fragment to indicate that this is the last fragment, so we explicitly turn off NS_MOREFRAG flag. Current code overrides all other flags and sets NS_BUF_CHANGED. This patch unsets the relevant flag only. 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 eef8021b8569..8a220373ec3f 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -964,7 +964,7 @@ ena_netmap_rx_frame(struct ena_netmap_ctx *ctx) * It just set flag NS_MOREFRAG to all slots, then here flag of * last slot is cleared. */ - ctx->slots[nm_prev(ctx->nm_i, ctx->lim)].flags = NS_BUF_CHANGED; + ctx->slots[nm_prev(ctx->nm_i, ctx->lim)].flags &= ~NS_MOREFRAG; if (rc != 0) { goto rx_clear_desc; From nobody Tue Oct 15 17:43:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSjmT6RDxz5YqPV for ; Tue, 15 Oct 2024 18:48:41 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (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 4XSjmT1qN3z4ngc 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-x834.google.com with SMTP id d75a77b69052e-46042895816so68693171cf.0 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=VRJ3hazAdxWS0i1EEPTkVp2e8tvdX3l4RB5/XzKPNxKKvU3HixqWdVHU1NPTEVqdgA Gd6/ddOo9TlZ4aFsqGXcnW2G9fXOrXweFDOJIxoLrMP7B7AVZciBiig44AcU7wwCUNm7 Kk1wU3sSEbjspvGaDg1DWqlbGjVzXarani0upLTrhFzHCo9md/28qUDjOg0DxanZ+8kP IrY+iKigWVLuuLyf5jVxP4LsxtMZjtv8GkhuMZpqy68kM4LetIb+Hbfp6EbSGXDR8Biy /PEJgJNqnBgWyM5qqMFxFP1Gc9Aw8n4pposWqc+BqwHgyIXtUWXwicW/NKC/dyKUn1pZ DWew== X-Forwarded-Encrypted: i=1; AJvYcCXG9aWxQMzGZIctSiqkDn2JoEcjGJZelIg8gf0+qqDG4vGcgehAUZOqu4VWxRq5HR+2/ax2ht1oUxqL0oVSZwFgcM0JKw==@freebsd.org X-Gm-Message-State: AOJu0YyymhwBrWryz7l5YbM6Umhn9ePo+SWNzqqmkaXBiMX/L90SGu/H MsQ9x2tzanvc1Ev2Ctuwu2oyIkLhX92Pd55jsnbOQG3LAveuBcbZ49g9i5LVsdF4sFWjv+9B6GM zanNqtwhhcKGuRu73YRlT7yiN3nUzQpNWLQn9 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4XSjmT1qN3z4ngc 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:45:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 05:18:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSzlW6hmtz5ZW4W 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 4XSzlW5C89z4Wbx 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_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: 4XSzlW5C89z4Wbx 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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 14:08:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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 15:31:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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:34:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 13:10:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 14:04:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 17:28:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTx2q0LhXz5ZJvh for ; Thu, 17 Oct 2024 18:20:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) (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 4XTx2p2lQgz4KCR for ; Thu, 17 Oct 2024 18:20:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-7d4fa972cbeso1110447a12.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=D9cxd0RGJpAU94Bb3n7wCM58mCumXHYbshRlZALBa9PdVr26HMeAGMKdIhl0kybpdD 1e/ds6atoD3Xq8aVEQlA88pUue5rn7wKOHG9lrae+u7JBJZOn9jeosPGOJbBtMReUM3A 9fgAHZpHmAHGEdXmGS5uCuZJpUA+e88lG74dq8wXbr3s8G2ofyHNZDFk2T5R2/vPck70 YGhq5iKjKnlG/xF8OT9Pzz1NEND0y2KbuHPmglpqokT5aUs1Rqkep2c6NfiXNodUu5Me gKxaMETAqYCcgsRf3WeJcDsthXqohQfa4T6zI6VtXEVQBcTQZ7UtvbNTzI/jAIV8Qt5E zxRg== X-Forwarded-Encrypted: i=1; AJvYcCVkc9/wnFGE55OBq+UAoz0e/kWkqAw68M/C+6YhUQfRvz+92BsWTsDOuOwfnawkVJRj9AKPAmpY8ZHR0/RjVfcWtbAHuA==@freebsd.org X-Gm-Message-State: AOJu0YxvjgwBrFo2qlcWpsW7Wh7QbAt3wJwjWMRL0MsaKK0o3tiKz/Zq afEly8UMkYwS4QX5xjhX8pmMahGfoLOcPcstnyxF6hNJEQMOsrjUq31YhMs+1rWzwi1ZZZ4WH37 sgXSpQcY+bUJPXw2dZzkO0iLAfa4gkSeSIx1UfA== 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4XTx2p2lQgz4KCR 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTx9v3Msbz5ZKg4 for ; Thu, 17 Oct 2024 18:26:27 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 4XTx9t4Zjlz4KtJ 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-f54.google.com with SMTP id 5b1f17b1804b1-431137d12a5so13085705e9.1 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=sEg6E4dQqnDocgOerKcsLu4TJsQJEFydv7gnjlTkzxD3zaYObSYjKaMQ5xxQklYG8M g5hygicMkYH4CZ/dwHl0fDWlnfA4jRScbu7n//yHdC2lJKRNecSHKvoQi6pKBBQmfTNh FEB11VlbEbxjqDUGPCTCNYNFO+xlmBLqDcEcE472/PE5JDhtTy4uwW+XvSLhrSFlYvRm gktG+p2pBCLmmzl/gjXdEqcCPiqVJs8PuleatcqFa20atUXtM8xNAgk7IrcrcicIHUUH DDeW63iZUnKL4WoE4jwEZtC8CudGr5WBks49ghmJSa8og1X1ikK2jyzzp+IiJBlURPiD sIOg== X-Forwarded-Encrypted: i=1; AJvYcCXLh4/BCjn6wuR2gcHiIoIpXGiQiqoey9/EldGdqYS3ODzYduoj+K1oV7r/ovWBPUFzueFhwAhAU7ketPz9ifSOgWBH4g==@freebsd.org X-Gm-Message-State: AOJu0YxtSqodoO2zyfs6Ba0UmP++eDvWNOd7wXozLTolEI9GtL0l7Q1v QnEn6NVGtevoP0a3UNXZOYl8XnTBCDS55Z9k+xP6LlWk5GShvVlfLamfYVEuDIU= 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(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: 4XTx9t4Zjlz4KtJ 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTxrG6Nzmz5ZLh4 for ; Thu, 17 Oct 2024 18:56:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (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 4XTxrG2pMZz4Prb 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-x62e.google.com with SMTP id d9443c01a7336-20cdb889222so13921855ad.3 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=d5NwaRQzi6uCzoqRVtIGgGw9b7sek4ywWisi8Q1zt2HdONKpxWSeQ+zXQJWXOZKubc g7zl93gUQRzN7yQ7R60tAzsJasZ6ztV29XWqAyGKxOz4R1ZN6F8s9lOHtf+JqCMeBVt+ rakpQ6bu4yDz1/WIdBaTNj0Rx9c4Etx6lD3Z2ePa18kgGiwgTOvhDcyHqiKw6a8kTNYQ hbd5OK3kis75IRroMl0ZGECo+plL5adcnGUleoJnEVRxlFHuEi/yOapgrVllsOC4V5Ll DYhYe+GAOBOSzwB3KrrV9+Q9c/10xP6hNOZhUytq/cDr9oCkW0UOYZBu1dsIuCg4ZvRP 51Ww== X-Forwarded-Encrypted: i=1; AJvYcCX56llbVCUTH3lHSgDkjt3cfVTaulhwczGotmU7jh7l06bRWmhKu/Fn3M7JoUNhm2guYmcgi73DGE/mw0unDfMPM4dRbw==@freebsd.org X-Gm-Message-State: AOJu0YwYOaLermAadr2cu/5x5GKwrVfysmMOIql7on4WGZq5In9nQwJ/ NFXc9dHbZ48vFUBLQTr9x8qnobVCOkAUpTmJ/GE8g7ey0s6M20HPtrcJrXYgno6b4d5qVgabmfX AfLTK8kc7gNf5eQwYofPA6GTW8OA82HEx4JrmDg== 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4XTxrG2pMZz4Prb 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTyPP5zJrz5ZNvQ for ; Thu, 17 Oct 2024 19:21:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (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 4XTyPP4QLhz4b5P 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-x52b.google.com with SMTP id 41be03b00d2f7-7c1324be8easo1887079a12.1 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=wYSe2BIKyv200vURcQ4kpp4CIpcNfiYjaqAqXydImY/S5AC/nDjx01Hrv5SrNBGlOv vmcum089GXxwgG6veWeGh8jqkJv49OQWJnKBB59f9URy8M9oRcA0GW/uBwe3y5eiZZNX VVXt4ctIk+byxqVXpDQW5pXhK4JFeiawETW5LKYm8wsNSrltYcpiTrEcSOcWkQ/abAF4 R608VjTVmPmz/yyCncM0oI+F1LATKOFGFQDxwWqoXzoduS9wbTfI7JUdL/SlA1DjgyGg dmnWAykn4bDIXctr8OosT2AOOBYKxa3OZlCK3bkvbQhTypV43AGqbnsoHKhL0a/SEsCw P7yw== X-Forwarded-Encrypted: i=1; AJvYcCVOJQkNBQGXJsWUR6mBSkSZNITqGPndRaQAiFHGQHtwK8dIZmymTWflozV8sgxuw0zJdF77xGb34aEJ4ND8fPlMUGiqtg==@freebsd.org X-Gm-Message-State: AOJu0YzZheAr6F3ZbJpVc973WAimSP0iJlD3jm+bpYjPCSYlaS7AUm3M GNVrS2KJaz4Iol1QFNKcZRMRHaprpyTfVp/WcaUAEVAzz3lXEkAP37cjK5gZw2fs8kja/oOpMOz VQgLUZ1Q+KHzMRqtGUp6o4SFEi0JZwvLUt8XK1A== 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4XTyPP4QLhz4b5P 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 Fri Oct 18 08:44:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 08:45:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 12:51:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 14:24:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:15:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:49:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVcZP729Fz5YxDl for ; Fri, 18 Oct 2024 21:01:33 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 4XVcZP26W7z4LrP 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.51 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-f51.google.com with SMTP id ffacd0b85a97d-37d6a2aa748so1668741f8f.1 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=r6wOmrTMB7nml1heHKhxNmHrY6Dn8yqcjYEzWh2EAXBACGFatA0Odf1qyjO/d5G5mN NfiuQ0JrMySHXDycq4j8/rfPQ3nlZqjpysinhKP7gFJipiRlbkSE3M++XUYZOQrrqHRO R2vffM4F4kry6lxkhC8h4mvL9q7eCsPzcJBp3GOA72CHIFM4/o6nXhQGl4owmZAsfAO5 Ch58OerW2VXjt8jFVrjK+5CRQQf9EECcRlREFzC5HqFEw7owdZAotsTopKCgx7Y+SIKZ 8QAWAN1fQ1zYDdnrXStNTPeBUJ2yOWukKAy7Xsmb2qWjWGqtqCubiu1rSz6Y28c7BnxA ZmVw== X-Forwarded-Encrypted: i=1; AJvYcCVYt55bsRhhpJ6CkZAzSbcqH8Vy1WZMdPDFNLDjeMMFAYf+1L2nnRB3g1wNPHBYt0brLqVsiNZETa3dBRixbLTuD5ij+A==@freebsd.org X-Gm-Message-State: AOJu0Yx2sZz5XEAaq1e+I534OyUUwiTf+cPo7xg181mhmjRktWwO/T9s utdzeHcMXHr+GODc7aNh6fRdsMFna2Y/LVhJFaiZOxKXd5iGUqhfAh98wB7O2qc= 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(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-main@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.51:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.51:from] X-Rspamd-Queue-Id: 4XVcZP26W7z4LrP 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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 13:04:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 14:31:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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 16:10:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.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:53:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-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:48:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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 09:30:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 14:07:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:52:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:50:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XWngN2Xp9z5Zfhf for ; Sun, 20 Oct 2024 18:54:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (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 4XWngN0w96z4XP8 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-x429.google.com with SMTP id d2e1a72fcca58-71e4244fdc6so2582606b3a.0 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=T5oe40u+bYuIlfR/LRtV4R33HZjK92O5I3TBgrqXIHofZn8veAA3pV+Pj+vxeEVkbU codMW+xadC49NjZga/SHnFQH+2Jk4F+l77IBxBDPKzFuV1dhCDlSNbO6pghoyyuE3Vx0 RXfZe06UV9nXkHb06w+ysSGQQhbR5I0uaAj7HlwWyLr5RJ6sgVg115ARoxlCyEXM3ZVW I8LPddW2uusdtXPX2/vK1C1gN8eHsEKvseBHrEXXduXTUS3x9yd/LGisnBIk8KkK7GLb BrGnxeDauJtkx6jnIyVPPBGfk7kYAqujDtd3QVxDgPXfU6OWgIrfMsxI0wJo4KUSoYD/ 2KCQ== X-Forwarded-Encrypted: i=1; AJvYcCUm8nglOdsEL6k33FQ6mAs6oI9lv8KIHzoGrERBIjpx2U7qpshGBJiDzYKh88FbtlOKkSBb/Bj1LikJnBJeDJQrC8aUyw==@freebsd.org X-Gm-Message-State: AOJu0YxoVwt8r2Nr4V5PbKD1ogAiHYPmLldKQtCF9pmums39VrcUJhrj WkNiZrIcZVaKir023p169T/y/bieiX0PbCWKzNsP8rtCcVZvI+7WtcQISiowf/Xu6vREl3wIwGj /YPlZfKnbUOvZhOwrXE/Hxe4omMgGkPGTq9b5MA== 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4XWngN0w96z4XP8 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 22:22:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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"