From nobody Mon Nov 10 01:36:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4XMS1MxXz6GNVY; Mon, 10 Nov 2025 01:36: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4XMS0XPHz3V4N; Mon, 10 Nov 2025 01:36:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762738612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LF/zPO2pU1eQO5Bn45tsLvUVAHPIxNWHwqRkz8Ti+tI=; b=Mc0bvkVtMSJvy+mLajg79T2xqg+VJXYbipHo84tfZQaAUQi/KlWA/QI1z7nslYGSW4qa+K Y5nFh2MQw8uO05tRYtaCX5dyk6+8TS1YMHfP5I/qgSqocCaUUqRek8m8yia+4dNP8Ms2QF DVHmdBXMPPIrFv8k8x/FGDRPDsaYflInXtcluzaG1GFvsdpk7Fxl0qYX6HIkPRyQVNuMoH JEPMDoosoGFEX/lfIE2cM7W4BTyVHEUUoieV8OrbZJkDkc9qp/+Ga+w0g6EEMn0fzhFyLK deLuWVA7c13A5DdYqdYlE7m4tNFZMjbvYGCfuOIEAqfNDhJEcJdRwXv3MRwInQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762738612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LF/zPO2pU1eQO5Bn45tsLvUVAHPIxNWHwqRkz8Ti+tI=; b=eIfYKqAwkFYkXrS27cN00+mWwc6FmWQDWJiIbLS8X6Zl7eogyQZnshv9tDvu02ZfGLv42x eTksQcDisXH+X8VJJUM3hkwNC3pm9JdqZEd8nHKGXGjALaWGEsINd86YH6qVNmOMVh09wV 6KnxkzdQb1MjgH4L6ceekTJBS0BrsrWMiHTOFDusOgsFg+yGx2JySzJAwFyNW6iSW/NgGY U0fFLix4OguYTT2Z12QIVX00kmXbKKXi7m8H9+LRw5BFcOzoGD+xguXMvKp/uO6t9iCsy4 G23XyoiyxfsHfNapeRWhBzsPpbqIRDjdv16XCXjN48M8F212FIFC9aVT3L5AUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762738612; a=rsa-sha256; cv=none; b=WIVwVWECrajPdXzOO5UVnQ0xV6J6aOQYlMYg3qynGFWmc6US+mh6Kjw8VY9wey2w+5HFej l66cNN+tzFo+HGY0FrI080Tio81Ov41gOH11D6PxtqUlUelOaC0ROQKPOWebwh8YV9MD7v wdfBG7fbBHHi3aiHiKmd+alwcQ4s4E69/1SDv9trSl2AT2TVl5UIP93FrU3r70tZCf0dC+ RkId5SEvSh9vNNYSnC94Gc/4larGg2C4bgOErmulKeBQz+DaNjfAj4nTj9M+e7UDWjmdqx iwyV3dXclC57nM0BIY//Ak/GnaFAk8tiHBGYdCcsRwNDsObfknyyER1Ngv459Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4XMR6lZTzxh4; Mon, 10 Nov 2025 01:36: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 5AA1ap8x039684; Mon, 10 Nov 2025 01:36:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AA1ap44039681; Mon, 10 Nov 2025 01:36:51 GMT (envelope-from git) Date: Mon, 10 Nov 2025 01:36:51 GMT Message-Id: <202511100136.5AA1ap44039681@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 80ca573fc4e6 - main - geom_zero.4: typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80ca573fc4e65db6f17cb476b6e857fe06b2e3d8 Auto-Submitted: auto-generated The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=80ca573fc4e65db6f17cb476b6e857fe06b2e3d8 commit 80ca573fc4e65db6f17cb476b6e857fe06b2e3d8 Author: Maxim Konovalov AuthorDate: 2025-11-10 01:35:20 +0000 Commit: Maxim Konovalov CommitDate: 2025-11-10 01:35:20 +0000 geom_zero.4: typo --- share/man/man4/geom_zero.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/geom_zero.4 b/share/man/man4/geom_zero.4 index 8da09b1473c9..82e74618515f 100644 --- a/share/man/man4/geom_zero.4 +++ b/share/man/man4/geom_zero.4 @@ -78,7 +78,7 @@ If set to .Nm will not copy any data into the read data buffers and just return the read data buffers as they are without modifying them. -In particular, it will not not fill the read buffer with the value of +In particular, it will not fill the read buffer with the value of .Va kern.geom.zero.byte . This is useful for read benchmarking to reduce the measurement noise caused by extra memory initialization. From nobody Mon Nov 10 03:02:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4ZG60w7Rz6GTDD; Mon, 10 Nov 2025 03:02:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4ZG60841z3b3K; Mon, 10 Nov 2025 03:02:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762743742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eknf10YwHLh9JFe9poeJOQ0Bc6RZSjfORtEhcWkucYU=; b=xxYjsv4bYdNyBpArU+3IiNuPh/MHCQF9gfL/K/3odNcBqJ2iEfl+xSG99r+oTw8sewb2XA 5uTzBZjDN4VlMmmhIWUGllRjYqJ09bcRYJlrccyUzhMCpb3QdVAdYBkvdpadWSRIETAvIN 9+mABzLPxgXRkgBCG+x9QEk7boQunT2Cs9/akiUDAbsQgQ2kpjWIwk9CLQFZkyRrqqifIL G3jJkUPYVdbJqwoiCg5C+5vf4YpqlIM2r88t4Z4favfcF3JHWIIo7bItB7kbT3O0JDkV40 kFFcX+b9HFzpJBJal4tZJow6+WDHJQhAUeI76N884mqBu2KFTlBAq9jEo5fhMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762743742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eknf10YwHLh9JFe9poeJOQ0Bc6RZSjfORtEhcWkucYU=; b=MQJrYZb6KRFojuv0L5T1P5w8JBBzz0NLh0CF/2zLH812ZIqv7plkXuoM0zlLjYn17u8QVh KUKMrErsPI6D9EDKvmFdMnL64w4DIOrd0YS1KVsXOppkbwQH6/mDgVp4LAw4QiHzlm/ysm fypa8eoRwokquvH1QoBd/IK62BaXEEj4MW9ryArMkQ7NUUN5J2QFigpfu+ypWVG67MPU+a og9AW1pPrxFUXVySrSbMbTn9WoFoxSVX7tjcoI9nWXkRHoJ23hhOLWdAHHwAy+aLvO5mgo kQ6l+9enRTuJ2OSEE3AfpWi8BGeRg+3QpwvLgOEDGrFT2KoHc4tQeSJ/bUBYRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762743742; a=rsa-sha256; cv=none; b=qNNnqiR7GLrGCSeBcjOY5zV+SWiznTsBphMZdccfnFFcYcYV68I530HhnrW3UVhAAw9AMq 6m+yzdA9lbXB1p1kuhCjf+/oPJUFN2uk0fOvsZBDPzaPyV3HCqAegVBHpft5ekJ+9l7V8U B5FyP6RBny4WIWwkAc5+Qv8Piix7JWBkuHZ7BWnZIX4vR+xQvO/vkNI/tmBDCa/jiSnexA BUhumx7Ui38GqajCAetc2ilv7TjUEGY6bmHBbBJYP94Ou0ZCqRmrdj4WhoQBTWAPoEdnho M7pjIRN+q7Gw1yR9Z6NlZHvE73iw++Kuu7SQ9sL85l7P3gHiTGWLN7cxcHV1Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4ZG56nb3z10rl; Mon, 10 Nov 2025 03:02:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AA32LEf008360; Mon, 10 Nov 2025 03:02:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AA32LVa008357; Mon, 10 Nov 2025 03:02:21 GMT (envelope-from git) Date: Mon, 10 Nov 2025 03:02:21 GMT Message-Id: <202511100302.5AA32LVa008357@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: dbb34d496708 - main - newfs_msdos: Improve error messages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: dbb34d496708a37763d3d8bf6782991dee10d17e Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dbb34d496708a37763d3d8bf6782991dee10d17e commit dbb34d496708a37763d3d8bf6782991dee10d17e Author: Ed Maste AuthorDate: 2025-11-09 19:43:50 +0000 Commit: Ed Maste CommitDate: 2025-11-10 03:02:09 +0000 newfs_msdos: Improve error messages - Report overly long OEM string as too long, not just "bad". - Use warn instead of warnx for open or ftruncate failure to report the error string. Reviewed by: se Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53649 --- sbin/newfs_msdos/mkfs_msdos.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/newfs_msdos/mkfs_msdos.c b/sbin/newfs_msdos/mkfs_msdos.c index dcc2bb982efc..a570d92cd17b 100644 --- a/sbin/newfs_msdos/mkfs_msdos.c +++ b/sbin/newfs_msdos/mkfs_msdos.c @@ -264,7 +264,7 @@ mkfs_msdos(const char *fname, const char *dtype, const struct msdos_options *op) goto done; } if (o.OEM_string && strlen(o.OEM_string) > 8) { - warnx("%s: bad OEM string", o.OEM_string); + warnx("%s: OEM string too long", o.OEM_string); goto done; } if (o.create_size) { @@ -274,11 +274,11 @@ mkfs_msdos(const char *fname, const char *dtype, const struct msdos_options *op) } fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644); if (fd == -1) { - warnx("failed to create %s", fname); + warn("failed to create %s", fname); goto done; } if (ftruncate(fd, o.create_size)) { - warnx("failed to initialize %jd bytes", (intmax_t)o.create_size); + warn("failed to initialize %jd bytes", (intmax_t)o.create_size); goto done; } } else if ((fd = open(fname, o.no_create ? O_RDONLY : O_RDWR)) == -1) { From nobody Mon Nov 10 08:56:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4k6D07r7z6GQSB; Mon, 10 Nov 2025 08:56: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4k6C5Xcgz3C07; Mon, 10 Nov 2025 08:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762764963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oqt/9UQXsdqKgkdOMzk07BJZU79ypDgRHGOSOsYzHig=; b=dKy/sb/iyqthUYcWoveA7GshVBK+AM36qd/eNezvuR5AKnC2743ehxmSaSqcWtxPOijMxC +qJwHMa0LV5u1mw8ccumegX/RbX9i+xhezo5FNrX5G8fLPrO3VIiFayLYhn4TgCIeqdRdE 8N0MYFSpGWw+MI5uI92pkUiJiQ2hkE6rFl1j3k0rwqY9jyBAAqYA0b2IrDjGeQE40SQNhW 1PIoy9BnT6zOn7IuvGZGC3jM9CYZmiQ1G6bM0uq2vBnQupfmOTsX1FDtLjwFPcwmGcIeB8 Hvy903H3hpQ+2pxT7SZJk5VMn/MZ28BD55+BhUx9SZrrlhIjubMgIOaPyEydeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762764963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oqt/9UQXsdqKgkdOMzk07BJZU79ypDgRHGOSOsYzHig=; b=b+nGf95d4O53bEmHrN4yha2s6k5rIggvwUOp/xySvaK8RsQ0KBFaveEF4xUzZb+EPHsRoU TRYhOHfsxBaLz2QiwObgUJvDo6/V+O/aosElGktqLKL9TjQjdzieeZtFmc1FABHr/KnZbQ LdEiTiyImFvkHXXxI6KS/cZl7Yw4OZdVxnSYq4VQswwovRPmAkQojvnawhCN68eO6W3B2u +8u6Wuas31S/80bpkKhjZ1nkIFKSFjFkjOHgMeoBSVrgHf5dn2ljKTReUCs1Pu4CbLID48 aZjXyUjNBpE1IHGoKmMIvCr6qpfwC4RPCvqbqJOZtsbivrLm7tQHPCjiXMPGTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762764963; a=rsa-sha256; cv=none; b=x6pHuODHwuyS8gI2qxaxTMizMZHAsb+Z3oOaQov9jV9g2VLworhhtxKar7uxuHWzfSppiX 0LMiPsCm6OLfowd3okRPYXLqFiCVycyFLIUV7z7B/djOh5LJ+YqQOoQnNm7FQR7CvWxHSQ BoSJFJRF3W4LmyBh9rU4jGFo9GFGI89OfmcNh/4OWOq1KLEkgD4TtH/irVy7CH+CrYDvmL 0rUXTnxhUKVx3qPbWutAoIgoeumCQGwpRze0QoS9cK58EEBB/iKaU07MH2tbr6jMt/ZVH8 4kPptA+JpzwZIDeLWUfO4QK6A9lnKdfYcJf16BNhCz2HGFVnFVKYbpqy4hP9kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4k6C55vCz196Q; Mon, 10 Nov 2025 08:56: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 5AA8u3YY066520; Mon, 10 Nov 2025 08:56:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AA8u3oQ066517; Mon, 10 Nov 2025 08:56:03 GMT (envelope-from git) Date: Mon, 10 Nov 2025 08:56:03 GMT Message-Id: <202511100856.5AA8u3oQ066517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: d5cb458b4b58 - main - MFV: less v685. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5cb458b4b58b0f0b3c058a32439f232fd5455ca Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=d5cb458b4b58b0f0b3c058a32439f232fd5455ca commit d5cb458b4b58b0f0b3c058a32439f232fd5455ca Merge: dbb34d496708 a1320769a9f7 Author: Xin LI AuthorDate: 2025-11-10 08:55:06 +0000 Commit: Xin LI CommitDate: 2025-11-10 08:55:06 +0000 MFV: less v685. MFC after: 3 days contrib/less/NEWS | 39 ++++++++++++++++ contrib/less/ch.c | 4 -- contrib/less/charset.c | 48 +++++++++++++++++--- contrib/less/command.c | 40 +++++++++++++++++ contrib/less/compose.uni | 4 +- contrib/less/decode.c | 11 +++-- contrib/less/edit.c | 10 +++-- contrib/less/fmt.uni | 6 +-- contrib/less/forwback.c | 2 +- contrib/less/funcs.h | 12 ++++- contrib/less/help.c | 2 +- contrib/less/input.c | 72 +++++++++++++++++------------- contrib/less/less.h | 5 ++- contrib/less/less.nro | 110 ++++++++++++++++++++++++++++++++++++---------- contrib/less/lessecho.nro | 6 +-- contrib/less/lesskey.nro | 18 +++++--- contrib/less/lglob.h | 2 +- contrib/less/line.c | 106 +++++++++++++++++++++++++++++++++++++++----- contrib/less/lsystem.c | 2 +- contrib/less/main.c | 41 ++++++++++++----- contrib/less/mkutable | 21 ++++++++- contrib/less/omit.uni | 7 +++ contrib/less/optfunc.c | 18 ++++++++ contrib/less/opttbl.c | 6 +++ contrib/less/os.c | 51 ++++++++++++++++++--- contrib/less/pattern.c | 7 ++- contrib/less/screen.c | 30 +++++++++++++ contrib/less/search.c | 12 +++-- contrib/less/ubin.uni | 2 +- contrib/less/version.c | 14 +++++- contrib/less/wide.uni | 8 ++-- contrib/less/xbuf.c | 2 +- usr.bin/less/defines.h | 18 ++++++-- 33 files changed, 596 insertions(+), 140 deletions(-) diff --cc contrib/less/command.c index 3ec1f9b48358,000000000000..390385547385 mode 100644,000000..100644 --- a/contrib/less/command.c +++ b/contrib/less/command.c @@@ -1,2320 -1,0 +1,2360 @@@ +/* + * Copyright (C) 1984-2025 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ + + +/* + * User-level command processor. + */ + +#include "less.h" +#if MSDOS_COMPILER==WIN32C +#include +#endif +#include "position.h" +#include "option.h" +#include "cmd.h" + +extern int erase_char, erase2_char, kill_char; +extern int sigs; +extern int quit_if_one_screen; +extern int one_screen; +extern int sc_width; +extern int sc_height; +extern char *kent; +extern int swindow; +extern int jump_sline; +extern lbool quitting; +extern int wscroll; +extern int top_scroll; +extern int ignore_eoi; +extern int hshift; +extern int bs_mode; +extern int proc_backspace; +extern int show_attn; +extern int less_is_more; +extern int chopline; +extern POSITION highest_hilite; +extern char *every_first_cmd; +extern char version[]; +extern struct scrpos initial_scrpos; +extern IFILE curr_ifile; +extern void *ml_search; +extern void *ml_examine; +extern int wheel_lines; +extern int def_search_type; +extern lbool search_wrapped; ++extern lbool no_poll; +extern int no_paste; +extern lbool pasting; +extern int no_edit_warn; +extern POSITION soft_eof; ++extern POSITION search_incr_start; ++extern char *first_cmd_at_prompt; +#if SHELL_ESCAPE || PIPEC +extern void *ml_shell; +#endif +#if EDITOR +extern constant char *editproto; +#endif +#if OSC8_LINK +extern char *osc8_uri; +#endif +extern int shift_count; +extern int forw_prompt; +extern int incr_search; +extern int full_screen; +#if MSDOS_COMPILER==WIN32C +extern int utf_mode; +extern unsigned less_acp; +#endif + +#if SHELL_ESCAPE +static char *shellcmd = NULL; /* For holding last shell command for "!!" */ +#endif +static int mca; /* The multicharacter command (action) */ +static int search_type; /* The previous type of search */ +static int last_search_type; /* Type of last executed search */ +static LINENUM number; /* The number typed by the user */ +static long fraction; /* The fractional part of the number */ +static struct loption *curropt; +static lbool opt_lower; +static int optflag; +static lbool optgetname; +static POSITION bottompos; +static int save_hshift; +static int save_bs_mode; +static int save_proc_backspace; +static int screen_trashed_value = 0; +static lbool literal_char = FALSE; +static lbool ignoring_input = FALSE; ++static struct scrpos search_incr_pos = { NULL_POSITION, 0 }; ++static int search_incr_hshift; +#if HAVE_TIME +static time_type ignoring_input_time; +#endif +#if PIPEC +static char pipec; +#endif + +/* Stack of ungotten chars (via ungetcc) */ +struct ungot { + struct ungot *ug_next; + char ug_char; + lbool ug_end_command; +}; +static struct ungot* ungot = NULL; + +static void multi_search(constant char *pattern, int n, int silent); + +/* + * Move the cursor to start of prompt line before executing a command. + * This looks nicer if the command takes a long time before + * updating the screen. + */ +public void cmd_exec(void) +{ + clear_attn(); + clear_bot(); + flush(); +} + +/* + * Indicate we are reading a multi-character command. + */ +static void set_mca(int action) +{ + mca = action; + clear_bot(); + clear_cmd(); +} + +/* + * Indicate we are not reading a multi-character command. + */ +static void clear_mca(void) +{ + if (mca == 0) + return; + mca = 0; +} + +/* + * Set up the display to start a new multi-character command. + */ +static void start_mca(int action, constant char *prompt, void *mlist, int cmdflags) +{ + set_mca(action); + cmd_putstr(prompt); + set_mlist(mlist, cmdflags); +} + +public int in_mca(void) +{ + return (mca != 0 && mca != A_PREFIX); +} + +/* + * Set up the display to start a new search command. + */ +static void mca_search1(void) +{ + int i; + +#if HILITE_SEARCH + if (search_type & SRCH_FILTER) + set_mca(A_FILTER); + else +#endif + if (search_type & SRCH_FORW) + set_mca(A_F_SEARCH); + else + set_mca(A_B_SEARCH); + + if (search_type & SRCH_NO_MATCH) + cmd_putstr("Non-match "); + if (search_type & SRCH_FIRST_FILE) + cmd_putstr("First-file "); + if (search_type & SRCH_PAST_EOF) + cmd_putstr("EOF-ignore "); + if (search_type & SRCH_NO_MOVE) + cmd_putstr("Keep-pos "); + if (search_type & SRCH_NO_REGEX) + cmd_putstr("Regex-off "); + if (search_type & SRCH_WRAP) + cmd_putstr("Wrap "); + for (i = 1; i <= NUM_SEARCH_COLORS; i++) + { + if (search_type & SRCH_SUBSEARCH(i)) + { + char buf[INT_STRLEN_BOUND(int)+8]; + SNPRINTF1(buf, sizeof(buf), "Sub-%d ", i); + cmd_putstr(buf); + } + } + if (literal_char) + cmd_putstr("Lit "); + +#if HILITE_SEARCH + if (search_type & SRCH_FILTER) + cmd_putstr("&/"); + else +#endif + if (search_type & SRCH_FORW) + cmd_putstr("/"); + else + cmd_putstr("?"); + forw_prompt = 0; +} + +static void mca_search(void) +{ ++ if (incr_search) ++ { ++ /* Remember where the incremental search started. */ ++ get_scrpos(&search_incr_pos, TOP); ++ search_incr_start = search_pos(search_type); ++ search_incr_hshift = hshift; ++ } + mca_search1(); + set_mlist(ml_search, 0); +} + +/* + * Set up the display to start a new toggle-option command. + */ +static void mca_opt_toggle(void) +{ + int no_prompt = (optflag & OPT_NO_PROMPT); + int flag = (optflag & ~OPT_NO_PROMPT); + constant char *dash = (flag == OPT_NO_TOGGLE) ? "_" : "-"; + + set_mca(A_OPT_TOGGLE); + cmd_putstr(dash); + if (optgetname) + cmd_putstr(dash); + if (no_prompt) + cmd_putstr("(P)"); + switch (flag) + { + case OPT_UNSET: + cmd_putstr("+"); + break; + case OPT_SET: + cmd_putstr("!"); + break; + } + forw_prompt = 0; + set_mlist(NULL, CF_OPTION); +} + +/* + * Execute a multicharacter command. + */ +static void exec_mca(void) +{ + constant char *cbuf; + + cmd_exec(); + cbuf = get_cmdbuf(); + if (cbuf == NULL) + return; + + switch (mca) + { + case A_F_SEARCH: + case A_B_SEARCH: + multi_search(cbuf, (int) number, 0); + break; +#if HILITE_SEARCH + case A_FILTER: + search_type ^= SRCH_NO_MATCH; + set_filter_pattern(cbuf, search_type); + soft_eof = NULL_POSITION; + break; +#endif + case A_FIRSTCMD: + /* + * Skip leading spaces or + signs in the string. + */ + while (*cbuf == '+' || *cbuf == ' ') + cbuf++; + if (every_first_cmd != NULL) + free(every_first_cmd); + if (*cbuf == '\0') + every_first_cmd = NULL; + else + every_first_cmd = save(cbuf); + break; + case A_OPT_TOGGLE: + toggle_option(curropt, opt_lower, cbuf, optflag); + curropt = NULL; + break; + case A_F_BRACKET: + match_brac(cbuf[0], cbuf[1], 1, (int) number); + break; + case A_B_BRACKET: + match_brac(cbuf[1], cbuf[0], 0, (int) number); + break; +#if EXAMINE + case A_EXAMINE: { + char *p; + if (!secure_allow(SF_EXAMINE)) + break; + p = save(cbuf); + edit_list(p); + free(p); +#if TAGS + /* If tag structure is loaded then clean it up. */ + cleantags(); +#endif + break; } +#endif +#if SHELL_ESCAPE + case A_SHELL: { + /* + * !! just uses whatever is in shellcmd. + * Otherwise, copy cmdbuf to shellcmd, + * expanding any special characters ("%" or "#"). + */ + constant char *done_msg = (*cbuf == CONTROL('P')) ? NULL : "!done"; + if (done_msg == NULL) + ++cbuf; + if (*cbuf != '!') + { + if (shellcmd != NULL) + free(shellcmd); + shellcmd = fexpand(cbuf); + } + if (!secure_allow(SF_SHELL)) + break; + if (shellcmd == NULL) + shellcmd = ""; + lsystem(shellcmd, done_msg); + break; } + case A_PSHELL: { + constant char *done_msg = (*cbuf == CONTROL('P')) ? NULL : "#done"; + if (done_msg == NULL) + ++cbuf; + if (!secure_allow(SF_SHELL)) + break; + lsystem(pr_expand(cbuf), done_msg); + break; } +#endif +#if PIPEC + case A_PIPE: { + constant char *done_msg = (*cbuf == CONTROL('P')) ? NULL : "|done"; + if (done_msg == NULL) + ++cbuf; + if (!secure_allow(SF_PIPE)) + break; + (void) pipe_mark(pipec, cbuf); + if (done_msg != NULL) + error(done_msg, NULL_PARG); + break; } +#endif + } +} + +/* + * Is a character an erase or kill char? + */ +static lbool is_erase_char(char c) +{ + return (c == erase_char || c == erase2_char || c == kill_char); +} + +/* + * Is a character a carriage return or newline? + */ +static lbool is_newline_char(char c) +{ + return (c == '\n' || c == '\r'); +} + +/* + * Handle the first char of an option (after the initial dash). + */ +static int mca_opt_first_char(char c) +{ + int no_prompt = (optflag & OPT_NO_PROMPT); + int flag = (optflag & ~OPT_NO_PROMPT); + if (flag == OPT_NO_TOGGLE) + { + switch (c) + { + case '_': + /* "__" = long option name. */ + optgetname = TRUE; + mca_opt_toggle(); + return (MCA_MORE); + } + } else + { + switch (c) + { + case '+': + /* "-+" = UNSET. */ + optflag = no_prompt | ((flag == OPT_UNSET) ? + OPT_TOGGLE : OPT_UNSET); + mca_opt_toggle(); + return (MCA_MORE); + case '!': + /* "-!" = SET */ + optflag = no_prompt | ((flag == OPT_SET) ? + OPT_TOGGLE : OPT_SET); + mca_opt_toggle(); + return (MCA_MORE); + case CONTROL('P'): + optflag ^= OPT_NO_PROMPT; + mca_opt_toggle(); + return (MCA_MORE); + case '-': + /* "--" = long option name. */ + optgetname = TRUE; + mca_opt_toggle(); + return (MCA_MORE); + } + } + /* Char was not handled here. */ + return (NO_MCA); +} + +/* + * Add a char to a long option name. + * See if we've got a match for an option name yet. + * If so, display the complete name and stop + * accepting chars until user hits RETURN. + */ +static int mca_opt_nonfirst_char(char c) +{ + constant char *p; + constant char *oname; + lbool ambig; + struct loption *was_curropt; + + if (curropt != NULL) + { + /* Already have a match for the name. */ + if (is_erase_char(c)) + return (MCA_DONE); + /* {{ Checking for TAB here is ugly. + * Also doesn't extend well -- can't do BACKTAB this way + * because it's a multichar sequence. }} */ + if (c != '\t') + return (MCA_MORE); + } + /* + * Add char to cmd buffer and try to match + * the option name. + */ + if (cmd_char(c) == CC_QUIT) + return (MCA_DONE); + p = get_cmdbuf(); + if (p == NULL || p[0] == '\0') + return (MCA_MORE); + opt_lower = ASCII_IS_LOWER(p[0]); + was_curropt = curropt; + curropt = findopt_name(&p, &oname, &ambig); + if (curropt != NULL) + { + if (was_curropt == NULL) + { + /* + * Got a match. + * Remember the option and + * display the full option name. + */ + cmd_reset(); + mca_opt_toggle(); + cmd_setstring(oname, !opt_lower); + } + } else if (!ambig) + { + bell(); + } + return (MCA_MORE); +} + +/* + * Handle a char of an option toggle command. + */ +static int mca_opt_char(char c) +{ + PARG parg; + + /* + * This may be a short option (single char), + * or one char of a long option name, + * or one char of the option parameter. + */ + if (curropt == NULL && cmdbuf_empty()) + { + int ret = mca_opt_first_char(c); + if (ret != NO_MCA) + return (ret); + } + if (optgetname) + { + /* We're getting a long option name. */ + if (!is_newline_char(c) && c != '=') + return (mca_opt_nonfirst_char(c)); + if (curropt == NULL) + { + parg.p_string = get_cmdbuf(); + if (parg.p_string == NULL) + return (MCA_MORE); + error("There is no --%s option", &parg); + return (MCA_DONE); + } + optgetname = FALSE; + cmd_reset(); + } else + { + if (is_erase_char(c)) + return (NO_MCA); + if (curropt != NULL) + /* We're getting the option parameter. */ + return (NO_MCA); + curropt = findopt(c); + if (curropt == NULL) + { + parg.p_string = propt(c); + error("There is no %s option", &parg); + return (MCA_DONE); + } + opt_lower = ASCII_IS_LOWER(c); + } + /* + * If the option which was entered does not take a + * parameter, toggle the option immediately, + * so user doesn't have to hit RETURN. + */ + if ((optflag & ~OPT_NO_PROMPT) != OPT_TOGGLE || + !opt_has_param(curropt)) + { + toggle_option(curropt, opt_lower, "", optflag); + return (MCA_DONE); + } + /* + * Display a prompt appropriate for the option parameter. + */ + start_mca(A_OPT_TOGGLE, opt_prompt(curropt), NULL, CF_OPTION); + return (MCA_MORE); +} + +/* + * Normalize search type. + */ +public int norm_search_type(int st) +{ + /* WRAP and PAST_EOF are mutually exclusive. */ + if ((st & (SRCH_PAST_EOF|SRCH_WRAP)) == (SRCH_PAST_EOF|SRCH_WRAP)) + st ^= SRCH_PAST_EOF; + return st; +} + +/* + * Handle a char of a search command. + */ +static int mca_search_char(char c) +{ + int flag = 0; + + /* + * Certain characters as the first char of + * the pattern have special meaning: + * ! Toggle the NO_MATCH flag + * * Toggle the PAST_EOF flag + * @ Toggle the FIRST_FILE flag + */ + if (!cmdbuf_empty() || literal_char) + { + literal_char = FALSE; + return (NO_MCA); + } + + switch (c) + { + case '*': + if (less_is_more) + break; + case CONTROL('E'): /* ignore END of file */ + if (mca != A_FILTER) + flag = SRCH_PAST_EOF; + search_type &= ~SRCH_WRAP; + break; + case '@': + if (less_is_more) + break; + case CONTROL('F'): /* FIRST file */ + if (mca != A_FILTER) + flag = SRCH_FIRST_FILE; + break; + case CONTROL('K'): /* KEEP position */ + if (mca != A_FILTER) + flag = SRCH_NO_MOVE; + break; + case CONTROL('S'): { /* SUBSEARCH */ + char buf[INT_STRLEN_BOUND(int)+24]; + SNPRINTF1(buf, sizeof(buf), "Sub-pattern (1-%d):", NUM_SEARCH_COLORS); + clear_bot(); + cmd_putstr(buf); + flush(); + c = getcc(); + if (c >= '1' && c <= '0'+NUM_SEARCH_COLORS) + flag = SRCH_SUBSEARCH(c-'0'); + else + flag = -1; /* calls mca_search() below to repaint */ + break; } + case CONTROL('W'): /* WRAP around */ + if (mca != A_FILTER) + flag = SRCH_WRAP; + break; + case CONTROL('R'): /* Don't use REGULAR EXPRESSIONS */ + flag = SRCH_NO_REGEX; + break; + case CONTROL('N'): /* NOT match */ + case '!': + flag = SRCH_NO_MATCH; + break; + case CONTROL('L'): + literal_char = TRUE; + flag = -1; + break; + } + + if (flag != 0) + { + if (flag != -1) + search_type = norm_search_type(search_type ^ flag); + mca_search(); + return (MCA_MORE); + } + return (NO_MCA); +} + +/* + * Handle a character of a multi-character command. + */ +static int mca_char(char c) +{ + int ret; + + switch (mca) + { + case 0: + /* + * We're not in a multicharacter command. + */ + return (NO_MCA); + + case A_PREFIX: + /* + * In the prefix of a command. + * This not considered a multichar command + * (even tho it uses cmdbuf, etc.). + * It is handled in the commands() switch. + */ + return (NO_MCA); + + case A_DIGIT: + /* + * Entering digits of a number. + * Terminated by a non-digit. + */ + if ((c >= '0' && c <= '9') || c == '.') + break; + switch (editchar(c, ECF_PEEK|ECF_NOHISTORY|ECF_NOCOMPLETE|ECF_NORIGHTLEFT)) + { + case A_NOACTION: + /* + * Ignore this char and get another one. + */ + return (MCA_MORE); + case A_INVALID: + /* + * Not part of the number. + * End the number and treat this char + * as a normal command character. + */ + number = cmd_int(&fraction); + clear_mca(); + cmd_accept(); + return (NO_MCA); + } + break; + + case A_OPT_TOGGLE: + ret = mca_opt_char(c); + if (ret != NO_MCA) + return (ret); + break; + + case A_F_SEARCH: + case A_B_SEARCH: + case A_FILTER: + ret = mca_search_char(c); + if (ret != NO_MCA) + return (ret); + break; + + default: + /* Other multicharacter command. */ + break; + } + + /* + * The multichar command is terminated by a newline. + */ + if (is_newline_char(c)) + { + if (pasting && no_paste) + { + /* Ignore pasted input after (and including) the first newline */ + start_ignoring_input(); + return (MCA_MORE); + } + /* Execute the command. */ + exec_mca(); + return (MCA_DONE); + } + + /* + * Append the char to the command buffer. + */ + if (cmd_char(c) == CC_QUIT) + /* + * Abort the multi-char command. + */ + return (MCA_DONE); + + switch (mca) + { + case A_F_BRACKET: + case A_B_BRACKET: + if (len_cmdbuf() >= 2) + { + /* + * Special case for the bracket-matching commands. + * Execute the command after getting exactly two + * characters from the user. + */ + exec_mca(); + return (MCA_DONE); + } + break; + case A_F_SEARCH: + case A_B_SEARCH: + if (incr_search) + { + /* Incremental search: do a search after every input char. */ + int st = (search_type & (SRCH_FORW|SRCH_BACK|SRCH_NO_MATCH|SRCH_NO_REGEX|SRCH_NO_MOVE|SRCH_WRAP|SRCH_SUBSEARCH_ALL)); + ssize_t save_updown; + constant char *pattern = get_cmdbuf(); + if (pattern == NULL) + return (MCA_MORE); ++ /* Defer searching if more chars of the pattern are available. */ ++ if (ttyin_ready()) ++ return (MCA_MORE); + /* + * Must save updown_match because mca_search + * reinits it. That breaks history scrolling. + * {{ This is ugly. mca_search probably shouldn't call set_mlist. }} + */ + save_updown = save_updown_match(); + cmd_exec(); + if (*pattern == '\0') + { + /* User has backspaced to an empty pattern. */ + undo_search(1); ++ hshift = search_incr_hshift; ++ jump_loc(search_incr_pos.pos, search_incr_pos.ln); + } else + { ++ /* ++ * Suppress tty polling while searching. ++ * This avoids a problem where tty input ++ * can cause the search to be interrupted. ++ */ ++ no_poll = TRUE; + if (search(st | SRCH_INCR, pattern, 1) != 0) ++ { + /* No match, invalid pattern, etc. */ + undo_search(1); ++ hshift = search_incr_hshift; ++ jump_loc(search_incr_pos.pos, search_incr_pos.ln); ++ } ++ no_poll = FALSE; + } + /* Redraw the search prompt and search string. */ + if (is_screen_trashed() || !full_screen) + { + clear(); + repaint(); + } + mca_search1(); + restore_updown_match(save_updown); + cmd_repaint(NULL); + } + break; + } + + /* + * Need another character. + */ + return (MCA_MORE); +} + +/* + * Discard any buffered file data. + */ +static void clear_buffers(void) +{ + if (!(ch_getflags() & CH_CANSEEK)) + return; + ch_flush(); + clr_linenum(); +#if HILITE_SEARCH + clr_hilite(); +#endif ++ set_line_contig_pos(NULL_POSITION); +} + +public void screen_trashed_num(int trashed) +{ + screen_trashed_value = trashed; +} + +public void screen_trashed(void) +{ + screen_trashed_num(1); +} + +public int is_screen_trashed(void) +{ + return screen_trashed_value; +} + +/* + * Make sure the screen is displayed. + */ +static void make_display(void) +{ + /* + * If not full_screen, we can't rely on scrolling to fill the screen. + * We need to clear and repaint screen before any change. + */ + if (!full_screen && !(quit_if_one_screen && one_screen)) + clear(); + /* + * If nothing is displayed yet, display starting from initial_scrpos. + */ + if (empty_screen()) + { + if (initial_scrpos.pos == NULL_POSITION) + jump_loc(ch_zero(), 1); + else + jump_loc(initial_scrpos.pos, initial_scrpos.ln); + } else if (is_screen_trashed() || !full_screen) + { + int save_top_scroll = top_scroll; + int save_ignore_eoi = ignore_eoi; + top_scroll = 1; + ignore_eoi = 0; + if (is_screen_trashed() == 2) + { + /* Special case used by ignore_eoi: re-open the input file + * and jump to the end of the file. */ + reopen_curr_ifile(); + jump_forw(); + } + repaint(); + top_scroll = save_top_scroll; + ignore_eoi = save_ignore_eoi; + } +} + +/* + * Display the appropriate prompt. + */ +static void prompt(void) +{ + constant char *p; + + if (ungot != NULL && !ungot->ug_end_command) + { + /* + * No prompt necessary if commands are from + * ungotten chars rather than from the user. + */ + return; + } + + /* + * Make sure the screen is displayed. + */ + make_display(); + bottompos = position(BOTTOM_PLUS_ONE); + + /* + * If we've hit EOF on the last file and the -E flag is set, quit. + */ + if (get_quit_at_eof() == OPT_ONPLUS && + eof_displayed(FALSE) && !(ch_getflags() & CH_HELPFILE) && + next_ifile(curr_ifile) == NULL_IFILE) + quit(QUIT_OK); + + /* + * If the entire file is displayed and the -F flag is set, quit. + */ + if (quit_if_one_screen && + entire_file_displayed() && !(ch_getflags() & CH_HELPFILE) && + next_ifile(curr_ifile) == NULL_IFILE) + quit(QUIT_OK); + quit_if_one_screen = FALSE; /* only get one chance at this */ ++ if (first_cmd_at_prompt != NULL) ++ { ++ ungetsc(first_cmd_at_prompt); ++ first_cmd_at_prompt = NULL; ++ return; ++ } + +#if MSDOS_COMPILER==WIN32C + /* + * In Win32, display the file name in the window title. + */ *** 2619 LINES SKIPPED *** From nobody Mon Nov 10 11:06:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4n0T4ZwZz6GZFP; Mon, 10 Nov 2025 11:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4n0T3npLz3Vrq; Mon, 10 Nov 2025 11:06:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762772777; h=from:from:reply-to:subject:subject: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/UXVfZXDcEqxdkOehQhvQ57INGzFgOc7K7VYl+gxk=; b=slStHBExdNlGyTxF7KejcGDnUhkMIkbkpZntu8xxBEesGXMTr7fWuBRXq2bj3vwrqTUt7+ XqSu56pWFVmys14jN2i6hA/23PZe4GCPH0Mu3A/FBLMUYQ3DqA9VCOYFyRQvM7XbhSW1yK i9RLlHDxgn5FeIMjWVjShlc1gSWUonxjUaZanlKPa9Y3qIeNWRCxWrAYfg60vzFyR7RF4v 7dXMFivP+C0BUALQwGNFhHMnRA7wB10oyir8DsHACshSD5rKMG9+CtuB+6Eip0A+ZjMKsB fNZYS+z+QdcC6jCwEK8n/+HDi1bc28gOfOTZ2AAB8txmzg/yoNpRJtGlIfLayg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762772777; h=from:from:reply-to:subject:subject: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/UXVfZXDcEqxdkOehQhvQ57INGzFgOc7K7VYl+gxk=; b=XbHMCSzurz9ZXP5PvcnfOZZUo0kh++BBvWvE7TH9toyjXeCmGIs2XkeSlEpLEaMoTq+EE7 +uHOoy97ek5xAsnCknyuPw5aMSUAzeiZ7nliMfZrC8Y7JOm4EAhZL64TCHwe0liHQn8Ebj wxsZUzf+W2OorAZKHLAPuSBFUgD/qabdVNCeIKH5WEquP8qA5HIW7UB/pVWcxShqH8XD6Y BXzp8cXizepOuZ0HQ+v0umEysSjXxFbM/L8XeQ3oUWvpNtYJ4+3qUfCnUaNaQ6/u7yg/J0 gH+V4UVOBRAkEMY+azGatYoLBLjkvbxpJfwyU8E0/hEmxjOp00iEfFKRrHgmBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762772777; a=rsa-sha256; cv=none; b=lodt/MdC8YYw31TSWg9E1bpFwJVVZyKXJggQZhZ8vQ3LOPQuycIhGnTxleMo6KLPNlmhuy X4w7Ku65gqUiQ2X1o7By2/2Fyv0UEwJkyVHt9xvVM+BtfnPuW6rtf/l9v31CXd24UrlbIa fazRRiyVv9Hhw1nFv88OKDss4QmFHFQdxtVGX97jhMZuHZ/3IjyVE3ypzLTtfAIwu8Fhsv EkNliKZXrLScjZF2isxLwvqbragQtcjaj5kyyFeWSup2H2l4Q/tChbOm1amEA/N4R4oB8m pAZqIwF5JvJfniTaMmxtzcUwVPbhKg6fKzNhiClHFXt7TreBplq9GfSbGx/fTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4n0T2xzGzwl; Mon, 10 Nov 2025 11:06: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 5AAB6Hse011064; Mon, 10 Nov 2025 11:06:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAB6H7v011061; Mon, 10 Nov 2025 11:06:17 GMT (envelope-from git) Date: Mon, 10 Nov 2025 11:06:17 GMT Message-Id: <202511101106.5AAB6H7v011061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 9cf02c38e492 - main - libpam: Don't put man8 in the dev package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cf02c38e492dd16b70bfd8203b3f1bc6436e574 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=9cf02c38e492dd16b70bfd8203b3f1bc6436e574 commit 9cf02c38e492dd16b70bfd8203b3f1bc6436e574 Author: Lexi Winter AuthorDate: 2025-11-10 10:14:42 +0000 Commit: Lexi Winter CommitDate: 2025-11-10 10:17:06 +0000 libpam: Don't put man8 in the dev package These are user-facing manpages, but were installed in the runtime-dev package since the PAM modules use bsd.lib.mk. Use MANNODEV instead of MAN to put them in the base runtime package instead. Fixes: 031e711647c3 ("packages: Install development manpages in the -dev package") MFC after: 3 days Reviewed by: bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53601 --- lib/libpam/modules/pam_chroot/Makefile | 2 +- lib/libpam/modules/pam_deny/Makefile | 6 +++--- lib/libpam/modules/pam_echo/Makefile | 6 +++--- lib/libpam/modules/pam_exec/Makefile | 6 +++--- lib/libpam/modules/pam_ftpusers/Makefile | 6 +++--- lib/libpam/modules/pam_group/Makefile | 2 +- lib/libpam/modules/pam_guest/Makefile | 2 +- lib/libpam/modules/pam_krb5/Makefile | 10 +++++----- lib/libpam/modules/pam_ksu/Makefile | 7 ++++--- lib/libpam/modules/pam_lastlog/Makefile | 6 +++--- lib/libpam/modules/pam_login_access/Makefile | 6 +++--- lib/libpam/modules/pam_nologin/Makefile | 6 +++--- lib/libpam/modules/pam_passwdqc/Makefile | 6 +++--- lib/libpam/modules/pam_permit/Makefile | 6 +++--- lib/libpam/modules/pam_radius/Makefile | 7 ++++--- lib/libpam/modules/pam_rhosts/Makefile | 6 +++--- lib/libpam/modules/pam_rootok/Makefile | 6 +++--- lib/libpam/modules/pam_securetty/Makefile | 6 +++--- lib/libpam/modules/pam_self/Makefile | 6 +++--- lib/libpam/modules/pam_ssh/Makefile | 7 ++++--- lib/libpam/modules/pam_tacplus/Makefile | 6 +++--- lib/libpam/modules/pam_unix/Makefile | 6 +++--- lib/libpam/modules/pam_xdg/Makefile | 6 +++--- 23 files changed, 68 insertions(+), 65 deletions(-) diff --git a/lib/libpam/modules/pam_chroot/Makefile b/lib/libpam/modules/pam_chroot/Makefile index 206f8fa40a09..fcec5bd04473 100644 --- a/lib/libpam/modules/pam_chroot/Makefile +++ b/lib/libpam/modules/pam_chroot/Makefile @@ -1,5 +1,5 @@ LIB= pam_chroot SRCS= pam_chroot.c -MAN= pam_chroot.8 +MANNODEV= pam_chroot.8 .include diff --git a/lib/libpam/modules/pam_deny/Makefile b/lib/libpam/modules/pam_deny/Makefile index 862d1859d0d6..8ff2bfcee869 100644 --- a/lib/libpam/modules/pam_deny/Makefile +++ b/lib/libpam/modules/pam_deny/Makefile @@ -23,8 +23,8 @@ # SUCH DAMAGE. # -LIB= pam_deny -SRCS= pam_deny.c -MAN= pam_deny.8 +LIB= pam_deny +SRCS= pam_deny.c +MANNODEV= pam_deny.8 .include diff --git a/lib/libpam/modules/pam_echo/Makefile b/lib/libpam/modules/pam_echo/Makefile index 532d0a51b58e..9ea51b392e31 100644 --- a/lib/libpam/modules/pam_echo/Makefile +++ b/lib/libpam/modules/pam_echo/Makefile @@ -1,5 +1,5 @@ -LIB= pam_echo -SRCS= pam_echo.c -MAN= pam_echo.8 +LIB= pam_echo +SRCS= pam_echo.c +MANNODEV= pam_echo.8 .include diff --git a/lib/libpam/modules/pam_exec/Makefile b/lib/libpam/modules/pam_exec/Makefile index c2327a2860cd..a3e9948ab69b 100644 --- a/lib/libpam/modules/pam_exec/Makefile +++ b/lib/libpam/modules/pam_exec/Makefile @@ -1,6 +1,6 @@ -LIB= pam_exec -SRCS= pam_exec.c -MAN= pam_exec.8 +LIB= pam_exec +SRCS= pam_exec.c +MANNODEV= pam_exec.8 WARNS?= 1 diff --git a/lib/libpam/modules/pam_ftpusers/Makefile b/lib/libpam/modules/pam_ftpusers/Makefile index 07d37c8b17a8..e2326312426d 100644 --- a/lib/libpam/modules/pam_ftpusers/Makefile +++ b/lib/libpam/modules/pam_ftpusers/Makefile @@ -1,5 +1,5 @@ -LIB= pam_ftpusers -SRCS= pam_ftpusers.c -MAN= pam_ftpusers.8 +LIB= pam_ftpusers +SRCS= pam_ftpusers.c +MANNODEV= pam_ftpusers.8 .include diff --git a/lib/libpam/modules/pam_group/Makefile b/lib/libpam/modules/pam_group/Makefile index 0395b3a8f355..cbf902026d66 100644 --- a/lib/libpam/modules/pam_group/Makefile +++ b/lib/libpam/modules/pam_group/Makefile @@ -1,5 +1,5 @@ LIB= pam_group SRCS= pam_group.c -MAN= pam_group.8 +MANNODEV= pam_group.8 .include diff --git a/lib/libpam/modules/pam_guest/Makefile b/lib/libpam/modules/pam_guest/Makefile index 7128b513afbc..04eb249e4a79 100644 --- a/lib/libpam/modules/pam_guest/Makefile +++ b/lib/libpam/modules/pam_guest/Makefile @@ -1,5 +1,5 @@ LIB= pam_guest SRCS= pam_guest.c -MAN= pam_guest.8 +MANNODEV= pam_guest.8 .include diff --git a/lib/libpam/modules/pam_krb5/Makefile b/lib/libpam/modules/pam_krb5/Makefile index 7634930a7202..0c933f8f7e57 100644 --- a/lib/libpam/modules/pam_krb5/Makefile +++ b/lib/libpam/modules/pam_krb5/Makefile @@ -57,8 +57,8 @@ SRCS= account.c \ support.c \ vector.c -MAN= pam-krb5.8 -MLINKS= pam-krb5.8 pam_krb5.8 +MANNODEV= pam-krb5.8 +MANNODEVLINKS= pam-krb5.8 pam_krb5.8 CFLAGS= -I${SRCDIR} \ -I${.CURDIR} \ @@ -77,9 +77,9 @@ module_options.c: .PHONY .else PACKAGE= kerberos -LIB= pam_krb5 -SRCS= pam_krb5.c -MAN= pam_krb5.8 +LIB= pam_krb5 +SRCS= pam_krb5.c +MANNODEV= pam_krb5.8 .if defined(_FREEFALL_CONFIG) CFLAGS+=-D_FREEFALL_CONFIG WARNS?= 3 diff --git a/lib/libpam/modules/pam_ksu/Makefile b/lib/libpam/modules/pam_ksu/Makefile index 953ca23d1416..8b695384c13c 100644 --- a/lib/libpam/modules/pam_ksu/Makefile +++ b/lib/libpam/modules/pam_ksu/Makefile @@ -27,9 +27,10 @@ PACKAGE= kerberos .include -LIB= pam_ksu -SRCS= pam_ksu.c -MAN= pam_ksu.8 +LIB= pam_ksu +SRCS= pam_ksu.c +MANNODEV= pam_ksu.8 + WARNS?= 3 LIBADD+= krb5 diff --git a/lib/libpam/modules/pam_lastlog/Makefile b/lib/libpam/modules/pam_lastlog/Makefile index 1abf6f2b6304..ecaf013c504a 100644 --- a/lib/libpam/modules/pam_lastlog/Makefile +++ b/lib/libpam/modules/pam_lastlog/Makefile @@ -25,8 +25,8 @@ PACKAGE= runtime -LIB= pam_lastlog -SRCS= pam_lastlog.c -MAN= pam_lastlog.8 +LIB= pam_lastlog +SRCS= pam_lastlog.c +MANNODEV= pam_lastlog.8 .include diff --git a/lib/libpam/modules/pam_login_access/Makefile b/lib/libpam/modules/pam_login_access/Makefile index 43c025336354..41bc32212351 100644 --- a/lib/libpam/modules/pam_login_access/Makefile +++ b/lib/libpam/modules/pam_login_access/Makefile @@ -25,8 +25,8 @@ PACKAGE= runtime -LIB= pam_login_access -SRCS= pam_login_access.c login_access.c -MAN= login.access.5 pam_login_access.8 +LIB= pam_login_access +SRCS= pam_login_access.c login_access.c +MANNODEV= login.access.5 pam_login_access.8 .include diff --git a/lib/libpam/modules/pam_nologin/Makefile b/lib/libpam/modules/pam_nologin/Makefile index e4c3c5a35c1e..c4ccc27b8958 100644 --- a/lib/libpam/modules/pam_nologin/Makefile +++ b/lib/libpam/modules/pam_nologin/Makefile @@ -25,9 +25,9 @@ PACKAGE= runtime -LIB= pam_nologin -SRCS= pam_nologin.c -MAN= pam_nologin.8 +LIB= pam_nologin +SRCS= pam_nologin.c +MANNODEV= pam_nologin.8 LIBADD+= util diff --git a/lib/libpam/modules/pam_passwdqc/Makefile b/lib/libpam/modules/pam_passwdqc/Makefile index 91ce72928a66..9f2091d5403e 100644 --- a/lib/libpam/modules/pam_passwdqc/Makefile +++ b/lib/libpam/modules/pam_passwdqc/Makefile @@ -1,9 +1,9 @@ SRCDIR= ${SRCTOP}/contrib/pam_modules/pam_passwdqc .PATH: ${SRCDIR} -LIB= pam_passwdqc -SRCS= pam_passwdqc.c passwdqc_check.c passwdqc_random.c wordset_4k.c -MAN= pam_passwdqc.8 +LIB= pam_passwdqc +SRCS= pam_passwdqc.c passwdqc_check.c passwdqc_random.c wordset_4k.c +MANNODEV= pam_passwdqc.8 WARNS?= 2 CFLAGS+= -I${SRCDIR} diff --git a/lib/libpam/modules/pam_permit/Makefile b/lib/libpam/modules/pam_permit/Makefile index 5606fe1cf75a..cc3d9ca210f2 100644 --- a/lib/libpam/modules/pam_permit/Makefile +++ b/lib/libpam/modules/pam_permit/Makefile @@ -23,8 +23,8 @@ # SUCH DAMAGE. # -LIB= pam_permit -SRCS= pam_permit.c -MAN= pam_permit.8 +LIB= pam_permit +SRCS= pam_permit.c +MANNODEV= pam_permit.8 .include diff --git a/lib/libpam/modules/pam_radius/Makefile b/lib/libpam/modules/pam_radius/Makefile index ab39fedcee04..d1180af62324 100644 --- a/lib/libpam/modules/pam_radius/Makefile +++ b/lib/libpam/modules/pam_radius/Makefile @@ -23,9 +23,10 @@ # SUCH DAMAGE. # -LIB= pam_radius -SRCS= pam_radius.c -MAN= pam_radius.8 +LIB= pam_radius +SRCS= pam_radius.c +MANNODEV= pam_radius.8 + WARNS?= 3 LIBADD+= radius diff --git a/lib/libpam/modules/pam_rhosts/Makefile b/lib/libpam/modules/pam_rhosts/Makefile index 4cd25fe5dfa5..3aaefc9ca89b 100644 --- a/lib/libpam/modules/pam_rhosts/Makefile +++ b/lib/libpam/modules/pam_rhosts/Makefile @@ -1,5 +1,5 @@ -LIB= pam_rhosts -SRCS= pam_rhosts.c -MAN= pam_rhosts.8 +LIB= pam_rhosts +SRCS= pam_rhosts.c +MANNODEV= pam_rhosts.8 .include diff --git a/lib/libpam/modules/pam_rootok/Makefile b/lib/libpam/modules/pam_rootok/Makefile index 668eeef7f7d9..bb5889139c16 100644 --- a/lib/libpam/modules/pam_rootok/Makefile +++ b/lib/libpam/modules/pam_rootok/Makefile @@ -23,8 +23,8 @@ # SUCH DAMAGE. # -LIB= pam_rootok -SRCS= pam_rootok.c -MAN= pam_rootok.8 +LIB= pam_rootok +SRCS= pam_rootok.c +MANNODEV= pam_rootok.8 .include diff --git a/lib/libpam/modules/pam_securetty/Makefile b/lib/libpam/modules/pam_securetty/Makefile index 3a36a37b543c..6e5e7d929b7d 100644 --- a/lib/libpam/modules/pam_securetty/Makefile +++ b/lib/libpam/modules/pam_securetty/Makefile @@ -25,8 +25,8 @@ PACKAGE= runtime -LIB= pam_securetty -SRCS= pam_securetty.c -MAN= pam_securetty.8 +LIB= pam_securetty +SRCS= pam_securetty.c +MANNODEV= pam_securetty.8 .include diff --git a/lib/libpam/modules/pam_self/Makefile b/lib/libpam/modules/pam_self/Makefile index 0a58728fea52..ecf85b8de70a 100644 --- a/lib/libpam/modules/pam_self/Makefile +++ b/lib/libpam/modules/pam_self/Makefile @@ -25,8 +25,8 @@ PACKAGE= runtime -LIB= pam_self -SRCS= pam_self.c -MAN= pam_self.8 +LIB= pam_self +SRCS= pam_self.c +MANNODEV= pam_self.8 .include diff --git a/lib/libpam/modules/pam_ssh/Makefile b/lib/libpam/modules/pam_ssh/Makefile index 6652244a84af..eb817b559331 100644 --- a/lib/libpam/modules/pam_ssh/Makefile +++ b/lib/libpam/modules/pam_ssh/Makefile @@ -2,11 +2,12 @@ SSHDIR= ${SRCTOP}/crypto/openssh -LIB= pam_ssh -MAN= pam_ssh.8 -SRCS= pam_ssh.c PACKAGE= ssh +LIB= pam_ssh +MANNODEV= pam_ssh.8 +SRCS= pam_ssh.c + WARNS?= 5 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h SRCS+= ssh_namespace.h diff --git a/lib/libpam/modules/pam_tacplus/Makefile b/lib/libpam/modules/pam_tacplus/Makefile index 2b558d9f72b3..a29185f9bc23 100644 --- a/lib/libpam/modules/pam_tacplus/Makefile +++ b/lib/libpam/modules/pam_tacplus/Makefile @@ -23,9 +23,9 @@ # SUCH DAMAGE. # -LIB= pam_tacplus -SRCS= pam_tacplus.c -MAN= pam_tacplus.8 +LIB= pam_tacplus +SRCS= pam_tacplus.c +MANNODEV= pam_tacplus.8 LIBADD+= tacplus diff --git a/lib/libpam/modules/pam_unix/Makefile b/lib/libpam/modules/pam_unix/Makefile index 2e76f054c502..1bb1e6f2c71a 100644 --- a/lib/libpam/modules/pam_unix/Makefile +++ b/lib/libpam/modules/pam_unix/Makefile @@ -38,9 +38,9 @@ PACKAGE= runtime -LIB= pam_unix -SRCS= pam_unix.c -MAN= pam_unix.8 +LIB= pam_unix +SRCS= pam_unix.c +MANNODEV= pam_unix.8 LIBADD+= util crypt diff --git a/lib/libpam/modules/pam_xdg/Makefile b/lib/libpam/modules/pam_xdg/Makefile index df3948987da6..e119354d1297 100644 --- a/lib/libpam/modules/pam_xdg/Makefile +++ b/lib/libpam/modules/pam_xdg/Makefile @@ -1,5 +1,5 @@ -LIB= pam_xdg -SRCS= pam_xdg.c -MAN= pam_xdg.8 +LIB= pam_xdg +SRCS= pam_xdg.c +MANNODEV= pam_xdg.8 .include From nobody Mon Nov 10 11:06:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4n0V60LMz6GZ68; Mon, 10 Nov 2025 11:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4n0V3vctz3Vrr; Mon, 10 Nov 2025 11:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762772778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=La8Rr5+5RtFXgTEH8ML7DjgkMkvIiiG9H2iGKc2wVn0=; b=JJLU3tzwqp1J9BO7hnKeoClECd4y3W8xy9jsQRHtW/YMtkJ3ogps4jNc5aYRRSoTCTRUnf VpvJbybeOd/f7Tbh42Q663hLYCRNCZP8TwXwKE45yuND6hcrUdHnO74k2OM7CE+OwhhyHD C+06T5Iro7uYIbjAAaEOy1yFYD0nhpOSauWR1qxta035au0no4AHekdPX7cGAQKRLovArW K1Xl855j28u5GNOZPhBxr2rWfZpq9y7xtffAJrAaqQPJU/h6ifvnjCwE9S42UYJpHJobas fz3yRGDoW31gLhvKys+OfRYFeHSLPAdu6iM+COjs0kWTJ0+njOVSE3wBKy1OcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762772778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=La8Rr5+5RtFXgTEH8ML7DjgkMkvIiiG9H2iGKc2wVn0=; b=AD6SZJ4IbvlaBqwTepgfMpn4Dw/CqXRMIsCvjhAuNdrY0tM7YJgr8ttjKxes5NUdVwCHdl tzhYq+Olna/hoFnu8R4ZPFswL/zJ6ZOvAD2q1F3TKXkgRCbdYwLIXXsSSa/se3CZHQ8g3p VyiYayn7tl2jcy0qz4XxzjdP94P6oX4BZHEOcp0ACcx2o55V2PKgyXD7MrsB6IRL32ckSL W8YvJ+Xa3r8BbvzT1bjy14XzpLtD7f9zP3qCmVMC3c/awJS0IzjEI5zfZdWcG7aSyymOph VJfgRq1wIHWUGbdbKgj9pPOmnwDwuvAZbN1UgeLwRUwEK1udSJXyf4CIlaog/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762772778; a=rsa-sha256; cv=none; b=O/+fXgn7kW1NH28cRQ56m/9kbIskRXExD0iHUr2fNsQZPgR0HKyrAhYeJcI7G6hgVjY2mT 0EAo5xLAs0jk0fDqi33jbWyVwJLeyiRX0J95FOoeeY8A07uB4ZEhqENGVPWliaE3VqnaLK CuBDWlXC+22bEllcXN9Xwlpj3KkCBabTANhsw9wJddqHyjPwlrW2Gsz+tGQ5GbjM5qiits pJ7hwnGmIIBaeanQUe4MXXVqK80xOlv2T1oQt2fWmlhJ51Ze5jtuIgYtjeQI6dHO+8TIeb 6eQF2cOQ2JrS4ho5CtIar397Tp5glj6cyoH4lVq7YPdz5VZNTGwb8pYNy2llNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4n0V3PR6z1Ct; Mon, 10 Nov 2025 11:06: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 5AAB6IqH011096; Mon, 10 Nov 2025 11:06:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAB6I48011093; Mon, 10 Nov 2025 11:06:18 GMT (envelope-from git) Date: Mon, 10 Nov 2025 11:06:18 GMT Message-Id: <202511101106.5AAB6I48011093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 560af6b43e2a - main - libpam: Move to a new "pam" package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 560af6b43e2a86e591e94bea99777630cd5f84fd Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=560af6b43e2a86e591e94bea99777630cd5f84fd commit 560af6b43e2a86e591e94bea99777630cd5f84fd Author: Lexi Winter AuthorDate: 2025-11-10 10:20:33 +0000 Commit: Lexi Winter CommitDate: 2025-11-10 11:05:37 +0000 libpam: Move to a new "pam" package OpenPAM is a discrete, largely self-contained system component. Users may not need PAM for many use-cases (e.g. jails, containers), so move it to its own package. Use LIB_PACKAGE to create a separate pam-lib package for libpam, so that applications that support PAM don't need to bring in all the PAM modules if PAM isn't actually in use. Add pam to the minimal sets, since this is a core system component that people expect to be installed. This means all supported installation methods will install the PAM modules by default, so don't add explicit dependencies on the PAM modules from things that use PAM (e.g. runtime), allowing custom/embedded systems to omit these easily. This change adds a new package to the system so, until we have a proper policy on how to handle this in release/stable branches, it should not be MFC'd. MFC after: never Reviewed by: des, bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53602 --- UPDATING | 12 ++++++++++ lib/libpam/Makefile.inc | 2 ++ lib/libpam/libpam/Makefile | 2 +- lib/libpam/modules/pam_lastlog/Makefile | 2 -- lib/libpam/modules/pam_login_access/Makefile | 2 -- lib/libpam/modules/pam_nologin/Makefile | 2 -- lib/libpam/modules/pam_securetty/Makefile | 2 -- lib/libpam/modules/pam_self/Makefile | 2 -- lib/libpam/modules/pam_unix/Makefile | 2 -- lib/libpam/pam.d/Makefile | 20 ++++++---------- release/packages/ucl/pam-all.ucl | 35 ++++++++++++++++++++++++++++ 11 files changed, 57 insertions(+), 26 deletions(-) diff --git a/UPDATING b/UPDATING index 62a920e3a696..d6cbe66009f0 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,18 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.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".) +20251110: + OpenPAM (including libpam and the PAM modules) has moved to the new + "pam" package. The pam-lib subpackage, which includes libpam, will + be automatically installed when required. + + If you have set-minimal(-jail) installed, the pam base package which + contains the PAM modules will also be automatically installed. + If you don't, you MUST manually install the FreeBSD-pam package if you + need to authenticate users, otherwise you won't be able to log in. + + This change only affects pkgbase users. + 20251105: pf(4) now supports nat64 via the af-to keyword. diff --git a/lib/libpam/Makefile.inc b/lib/libpam/Makefile.inc index bec0687d1b7f..28630e46b949 100644 --- a/lib/libpam/Makefile.inc +++ b/lib/libpam/Makefile.inc @@ -23,6 +23,8 @@ # SUCH DAMAGE. # +PACKAGE?= pam + CFLAGS+= -DOPENPAM_DEBUG SHLIB_MAJOR= 6 diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile index c6db4992bb36..f220063971d7 100644 --- a/lib/libpam/libpam/Makefile +++ b/lib/libpam/libpam/Makefile @@ -42,7 +42,7 @@ OPENPAM= ${SRCTOP}/contrib/openpam SHLIB= pam .endif -PACKAGE= runtime +LIB_PACKAGE= SRCS= openpam_asprintf.c \ openpam_borrow_cred.c \ diff --git a/lib/libpam/modules/pam_lastlog/Makefile b/lib/libpam/modules/pam_lastlog/Makefile index ecaf013c504a..9d27f4779184 100644 --- a/lib/libpam/modules/pam_lastlog/Makefile +++ b/lib/libpam/modules/pam_lastlog/Makefile @@ -23,8 +23,6 @@ # SUCH DAMAGE. # -PACKAGE= runtime - LIB= pam_lastlog SRCS= pam_lastlog.c MANNODEV= pam_lastlog.8 diff --git a/lib/libpam/modules/pam_login_access/Makefile b/lib/libpam/modules/pam_login_access/Makefile index 41bc32212351..e31866395a94 100644 --- a/lib/libpam/modules/pam_login_access/Makefile +++ b/lib/libpam/modules/pam_login_access/Makefile @@ -23,8 +23,6 @@ # SUCH DAMAGE. # -PACKAGE= runtime - LIB= pam_login_access SRCS= pam_login_access.c login_access.c MANNODEV= login.access.5 pam_login_access.8 diff --git a/lib/libpam/modules/pam_nologin/Makefile b/lib/libpam/modules/pam_nologin/Makefile index c4ccc27b8958..38c9ea2b0a2a 100644 --- a/lib/libpam/modules/pam_nologin/Makefile +++ b/lib/libpam/modules/pam_nologin/Makefile @@ -23,8 +23,6 @@ # SUCH DAMAGE. # -PACKAGE= runtime - LIB= pam_nologin SRCS= pam_nologin.c MANNODEV= pam_nologin.8 diff --git a/lib/libpam/modules/pam_securetty/Makefile b/lib/libpam/modules/pam_securetty/Makefile index 6e5e7d929b7d..90740721a3f5 100644 --- a/lib/libpam/modules/pam_securetty/Makefile +++ b/lib/libpam/modules/pam_securetty/Makefile @@ -23,8 +23,6 @@ # SUCH DAMAGE. # -PACKAGE= runtime - LIB= pam_securetty SRCS= pam_securetty.c MANNODEV= pam_securetty.8 diff --git a/lib/libpam/modules/pam_self/Makefile b/lib/libpam/modules/pam_self/Makefile index ecf85b8de70a..8a6b3702b5a1 100644 --- a/lib/libpam/modules/pam_self/Makefile +++ b/lib/libpam/modules/pam_self/Makefile @@ -23,8 +23,6 @@ # SUCH DAMAGE. # -PACKAGE= runtime - LIB= pam_self SRCS= pam_self.c MANNODEV= pam_self.8 diff --git a/lib/libpam/modules/pam_unix/Makefile b/lib/libpam/modules/pam_unix/Makefile index 1bb1e6f2c71a..124a757eae9d 100644 --- a/lib/libpam/modules/pam_unix/Makefile +++ b/lib/libpam/modules/pam_unix/Makefile @@ -36,8 +36,6 @@ .include .include -PACKAGE= runtime - LIB= pam_unix SRCS= pam_unix.c MANNODEV= pam_unix.8 diff --git a/lib/libpam/pam.d/Makefile b/lib/libpam/pam.d/Makefile index a58c37b6c223..2cc5122b2ecc 100644 --- a/lib/libpam/pam.d/Makefile +++ b/lib/libpam/pam.d/Makefile @@ -1,7 +1,5 @@ .include -PACKAGE= runtime - NO_OBJ= CONFGROUPS= CONFS @@ -17,20 +15,16 @@ CONFDIR= /etc/pam.d CONFSMODE_README= 444 CONFGROUPS+= CRON -CRON+= cron +CRON= cron CRONPACKAGE= cron -.if ${MK_AT} != "no" -CONFGROUPS+= AT -AT+= atrun -ATPACKAGE+= at -.endif +CONFGROUPS.${MK_AT}+= AT +AT= atrun +ATPACKAGE= at -.if ${MK_FTP} != "no" -CONFGROUPS+= FTP -FTP+= ftp ftpd +CONFGROUPS.${MK_FTP}+= FTP +FTP= ftp ftpd # Do not put these in the ftp package, since ports also use them. -FTPPACKAGE= runtime -.endif +FTPPACKAGE= pam .include diff --git a/release/packages/ucl/pam-all.ucl b/release/packages/ucl/pam-all.ucl new file mode 100644 index 000000000000..c77b926532e6 --- /dev/null +++ b/release/packages/ucl/pam-all.ucl @@ -0,0 +1,35 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Modular user authentication facility" + +desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 978aaa72f319 - main - cd9660: Unbreak symbolic links List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 978aaa72f3196f5489630052762cac5a7863e774 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=978aaa72f3196f5489630052762cac5a7863e774 commit 978aaa72f3196f5489630052762cac5a7863e774 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-10 13:58:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-10 13:58:20 +0000 cd9660: Unbreak symbolic links Since the introduction of permission masks, cd9660_getattr() returns a size of zero for all symbolic links, because the code to retrieve the length of the link target (as required by POSIX) is dead, since we strip away the type bits before we try to use them to identify the file as a link. Address this by checking the vnode type instead. PR: 290556 MFC after: 3 days Fixes: 82f2275b73e5 ("cd9660: Add support for mask,dirmask,uid,gid options") Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D53598 --- sys/fs/cd9660/cd9660_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 4a2b80a7ccdd..92ea6d2b4501 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -193,8 +193,8 @@ cd9660_getattr(struct vop_getattr_args *ap) vap->va_ctime = ip->inode.iso_ctime; vap->va_rdev = VN_ISDEV(vp) ? ip->inode.iso_rdev : NODEV; - vap->va_size = (u_quad_t) ip->i_size; - if (ip->i_size == 0 && (vap->va_mode & S_IFMT) == S_IFLNK) { + vap->va_size = ip->i_size; + if (ip->i_size == 0 && vp->v_type == VLNK) { struct vop_readlink_args rdlnk; struct iovec aiov; struct uio auio; From nobody Mon Nov 10 14:53:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4t2g6QLcz6Gq2d; Mon, 10 Nov 2025 14:53:31 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4t2g5F1Dz3sMF; Mon, 10 Nov 2025 14:53:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762786411; h=from:from:reply-to:subject: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=E+ItOZm05l8aOpCAk444TzOC7fHGzZd4FSWluWcSLEo=; b=cgYKJQ7FxI3xeKsM6GMGusYYYPiGxc8shl6xpyy3ADq1rtkfI2+3hUq78x9VZNGqy4Q0iO dX083d+odVkyIRr8K0ikt7EfHriQwok74wEun87TRsEZrYMS2hM88gExT6qNe78xOJIvG+ +MXqLq+j6E2E07eA3KkMUBYRYB3zBLtm/namT4QDdUlbffOfKkNC5YDXKUyHhsFaf14zXJ FgjFHTz9cvMLYwErbmII3uAsE8OR+V/pndIUZmX2DkxtwUDkpPslOWue69pB3wv1qBkAdd 7sFTI7bGuEpVWUuZMEVhubtvcRbDLlFVhXdUge5JR9tWN7nOa69XyFXfT9NOSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762786411; h=from:from:reply-to:subject: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=E+ItOZm05l8aOpCAk444TzOC7fHGzZd4FSWluWcSLEo=; b=YAbNmsqE08j9r1p6tF2B33lFbb2hMDz/PwuP8/e16XrUyWUTIOYG0DJal0qN+YwUcti/sh INUjCowi5G3bmkKAKLFWAoTye/ef4EXPVxhNOB0w5ScOe+k9aITlQA9mJeB9N+QEtvspnY +D2V3hSeQrP6H8Z9B3d2eVr45apBLKQBU+IiOb1trIlpuvp0JDG7z4YK2Syds0ya+mk6KW X3yMPTTrow/4vpt3/pqGixg7NMHPsinrHF7mt7ue8SSP9mQHqsG8MV5ElacRJd6zma1g77 E7eubwsaQX1g9zdeF18WdYuvtGjZkWqI8Wn0DChqe98HwzP8RA5Juleb6pis2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762786411; a=rsa-sha256; cv=none; b=sB7+mZg6yYC6N/rKqBHyIM0yAHU6qXIKR5zoEar1mVLexoJ3Ii24IowTyxgvSH8TuhqgmD g5GKvLJzAJlrQBga1cSw1yEVOAgQnjoQoce9ZLG7qdOTngxcH3t9n7w9tsDquZ9LFiUsxI c+11bC7GZjXx4UZtBlFPcoKPnFDhcguXUAw0fYWHk4Xnazma4s3JLjGhfq/C4zBzJ/G5c+ ZCigEzsYQr5I9UW4ieP656OXG+EWQgUA0ntWsp8gUH9J+JAwjUD4MLO8fzN4dda8XPqn/h FxI1GW8b7rM9o2K7sYqm6vXxRVXbwQOzrRPkaZdeHD9A3OYrDE94A7idBQ4T0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:814a:eb0a:6a9f:127b] (unknown [IPv6:2601:5c0:4202:5670:814a:eb0a:6a9f:127b]) (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 4d4t2g3BGSzsP4; Mon, 10 Nov 2025 14:53:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 10 Nov 2025 09:53:30 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 9b7d2cee03e5 - main - safe(4): add gone_in 16.0 Content-Language: en-US To: "David E. O'Brien" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202511072012.5A7KC2Kx091262@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202511072012.5A7KC2Kx091262@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/7/25 15:12, David E. O'Brien wrote: > The branch main has been updated by obrien: > > URL: https://cgit.FreeBSD.org/src/commit/?id=9b7d2cee03e5d0b0723718047d4bc388d0745591 > > commit 9b7d2cee03e5d0b0723718047d4bc388d0745591 > Author: David E. O'Brien > AuthorDate: 2025-10-29 01:11:48 +0000 > Commit: David E. O'Brien > CommitDate: 2025-11-07 20:04:44 +0000 > > safe(4): add gone_in 16.0 > > Reviewed by: emaste > Differential Revision: https://reviews.freebsd.org/D53426 > --- > share/man/man4/safe.4 | 16 +++++++++++++++- > sys/dev/safe/safe.c | 2 ++ > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/sys/dev/safe/safe.c b/sys/dev/safe/safe.c > index c512f3fc62c0..569bbe51e125 100644 > --- a/sys/dev/safe/safe.c > +++ b/sys/dev/safe/safe.c > @@ -424,6 +424,8 @@ safe_attach(device_t dev) > #ifdef SAFE_DEBUG > safec = sc; /* for use by hw.safe.dump */ > #endif > + gone_in(16, "%s(4) is deprecated in 15.0 and removed in 16.0\n", > + safe_driver->name); > return (0); gone_in_dev(9) is the documented function to use in attach routines and is what we consistently have done for all other driver deprecations in the past decade or so. FreeBSD users generally understand that device driver manpages are in section 4 already. -- John Baldwin From nobody Mon Nov 10 15:30:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4trt0XHJz6Gs5Z; Mon, 10 Nov 2025 15:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4trt023hz3xWn; Mon, 10 Nov 2025 15:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762788606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fiD8qG7pcx8QwjdSfaC6PBBe4S/G3BdIlmAbmCztZX4=; b=KX/d7hsDmfAsCZu+H8YPfUukarMy3xIT2Tccl+K3Wqt1siYRD7asXzhUsZg+RHHOPeHewc VXlf6V9+QhfWGiHY57euczSVmj6fwyojRoV/e5aOlMfURJnX3ZtsvGzlXxJenoa2PUhDgp 96tEDS41OquNCxGmxGlj+gpsIUdBqtzUte5cw9TVyGzHhPIBElcsLkzOBEfJBGWDOHv1PA w65PadMNk0J/fkjvje13lvYArHyGV7PTSeip6/73N3erxZ0gghcMRDf2taKDVm4oAV95fn Si1bKV89zIld+OaRtN7fYlCtnOPURKQ8cW9pfLqDT67Q7ugnTaVQPinWC2S31Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762788606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fiD8qG7pcx8QwjdSfaC6PBBe4S/G3BdIlmAbmCztZX4=; b=TVxTec9+yySBJ9Nwhrt/o1DlUKEJeTNblhrEW0Q/X8yjbhLpsGr4/OEjC8bbRGLGTv1DwJ 4U+t+LqIL2S7taamLted4stHJpn8dpaYTYbG2HF3fNzHDdDMOyEpfaifnwqDzng3ynpQUl iRHgBH7LH97ggV72s4f+2fuIkJz/0HzIA8ENOqzQyPnTwU1HLJuJVRAP6CDlqL+Dkga5J+ G9LMoCPRWzesqNztn5dcJW5bYM/j05huIP7yxbXw03uQcYhCj77UwdvCcvjObbgDUWO+Yw QMnxS+WsSUaGHudWXfYP6UpFDvXmhIPnvSVLoq8uRsm1TAM8FJoLBQQowSDkrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762788606; a=rsa-sha256; cv=none; b=tsz2974pdAwNV3Q3cKd3VrWPXV2Uk1bzz7K9sqaSqetMgs8hX+wJS2V9bykvlpUaeIJOgr dlxRTPbwl9zRf5mBez0KFTD+p4gpzx2AhcgcA9531LkoyqFa0zgtU38OZ8gfQKHZ5M072L /0IDeZLfBJkmA5Zvr+oTWTuJ5cdsG2RQ3l0I3Ah6x9Ti9wTJbjfCY0/oEuamYg2IBktwfj Swp5TQYeLNY5akp9FMzLfdBkv353wi0huugHEl0JroVGM7SFAFpthq5NK9tZYOvbqXEd8z OL6iEqBDCT53721VHcD8idkk71bPwZKzcAGo7G3kGdGqX4a6++iinRujGHkfTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4trs6gzbz7Fx; Mon, 10 Nov 2025 15:30: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 5AAFU55L003112; Mon, 10 Nov 2025 15:30:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFU5vu003107; Mon, 10 Nov 2025 15:30:05 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:30:05 GMT Message-Id: <202511101530.5AAFU5vu003107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 836b3cd9d791 - main - vtnet: don't provide VIRTIO_NET_HDR_F_DATA_VALID List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 836b3cd9d7910aff5225e9e58189067ca03fae30 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=836b3cd9d7910aff5225e9e58189067ca03fae30 commit 836b3cd9d7910aff5225e9e58189067ca03fae30 Author: Michael Tuexen AuthorDate: 2025-11-10 15:28:04 +0000 Commit: Michael Tuexen CommitDate: 2025-11-10 15:28:04 +0000 vtnet: don't provide VIRTIO_NET_HDR_F_DATA_VALID According to section 5.1.6.2.1 of version 1.3 of the virtio specification, the driver MUST NOT set VIRTIO_NET_HDR_F_DATA_VALID in the flags. So don't do that. Reviewed by: Timo Völker MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53650 --- sys/dev/virtio/network/if_vtnet.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 471c6b3714b2..a61b0aac0bfa 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -2505,10 +2505,6 @@ vtnet_txq_offload(struct vtnet_txq *txq, struct mbuf *m, hdr->csum_start = vtnet_gtoh16(sc, csum_start); hdr->csum_offset = vtnet_gtoh16(sc, m->m_pkthdr.csum_data); txq->vtntx_stats.vtxs_csum++; - } else if ((flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) && - (proto == IPPROTO_TCP || proto == IPPROTO_UDP) && - (m->m_pkthdr.csum_data == 0xFFFF)) { - hdr->flags |= VIRTIO_NET_HDR_F_DATA_VALID; } if (flags & (CSUM_IP_TSO | CSUM_IP6_TSO)) { @@ -2622,8 +2618,7 @@ vtnet_txq_encap(struct vtnet_txq *txq, struct mbuf **m_head, int flags) m->m_flags &= ~M_VLANTAG; } - if (m->m_pkthdr.csum_flags & - (VTNET_CSUM_ALL_OFFLOAD | CSUM_DATA_VALID)) { + if (m->m_pkthdr.csum_flags & VTNET_CSUM_ALL_OFFLOAD) { m = vtnet_txq_offload(txq, m, hdr); if ((*m_head = m) == NULL) { error = ENOBUFS; From nobody Mon Nov 10 15:40:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4v5F6ctcz6GsKN; Mon, 10 Nov 2025 15:40: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4v5F5jWMz41Fy; Mon, 10 Nov 2025 15:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1AJkGI5SEPW/1TrgRkS+UPcOisxB/9nqzY06T5mZqhI=; b=VTKZ59x0g3Rcutq41I9s7Z3bZqoRO15WhsiWc5FuaBAmYoOXo+30nw9pwsfRsrmwoQAXf6 S8Vzbwg+Xu96CbfpF+VN2r0Zmp3o+OMs+nExm7RkA+Dkyx2d96PIDGfT5QkKbIeIVxvxHN j0cX2mGEv9R6UbyOtApTrHoxucCwbstcULKBLKeEV3KJ58OWw7YnHNZ/T3fd6Ukq/KsO5l nym05HDUSHfsnNAx5I8o5XZBge2qb1WIcUL71z0eyqgoPf4qbnS0ZkLQo9G0c0uYoq1lRV 6jinaTjdXq0iOMZlh5bmSgzO+vJsSY09Sgl/efVHPf+ySL1qeYqeqtTHeDsItg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1AJkGI5SEPW/1TrgRkS+UPcOisxB/9nqzY06T5mZqhI=; b=h4JETvPqAF0LTMc4XZG8SI5L4FoMC6OQFj7ocmcU8PuPA8u+MkxR+rEByicLffj+B10F22 7fN6K7XOCAeA2snADrJGHVyJc3im0q6LYMTGos+hrRF9AnyngXyk6/0ie4FjngXYd8fXyx h37v+JzuQ0Sq1xN80YXgRe0p7cmiVYAUxcL8ESDjU/AHIVEi5kQ9fY327puiT84jdjObu/ ZYPtR8LCQ4I4fCYJABs8N5zWZx4zuh/V5gHxxANW4cF5lNDJZn/wLW8YpLr70BfPWr/58g +TA9lTL1Ytbwor1GHfllhK/mdGq3SNu3JbBSrKBJGk4Y6n/LTRFVCe/tPCywhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789249; a=rsa-sha256; cv=none; b=oEjStydUA9qnfODDa0iF7xtBcgxGIP1kbfu8yaZPXqt0NZfNMVDuwUAe6eebukct6Zq5e5 rp9dtfTDExnKRToEMHLZb03RhnBcvpsmUvSEZxx7iD/Nw4YYh3YraRbdIMDMzCvk28j5m1 KbcFLhKpRxfISHVqFHSFlozC5eD+Zsi3ReZvVWCOKterShCl7QSp/wlcalIbohWW/Qqmej AHpgmswSZ6tPr0oXztDI9RpCcBL7KejQmQzLQUaxIhdnRUMwKjuNYfJGVdfMdNhlhdhF55 XPq3DwL5AVahHMp1TSpxJtRomN/x4VrnOBfvGRXHH93/MHK7q5CcW+GthvQtfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4v5F4Nkpz8DW; Mon, 10 Nov 2025 15:40: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 5AAFentO031372; Mon, 10 Nov 2025 15:40:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFeni4031369; Mon, 10 Nov 2025 15:40:49 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:40:49 GMT Message-Id: <202511101540.5AAFeni4031369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 4c50ac68166c - main - vtnet: fix enabling/disabling tso List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c50ac68166caf7e08c5a9984d63fa91490fa50d Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=4c50ac68166caf7e08c5a9984d63fa91490fa50d commit 4c50ac68166caf7e08c5a9984d63fa91490fa50d Author: Michael Tuexen AuthorDate: 2025-11-10 15:34:53 +0000 Commit: Michael Tuexen CommitDate: 2025-11-10 15:34:53 +0000 vtnet: fix enabling/disabling tso Transmit segment offloading depends on transmit checksum offloading. Enforce that constraint. This also fixes a bug, since if_hwassist bits are from the CSUM_ space, not from the IFCAP_ space. PR: 290773 Reviewed by: Timo Völker Tested by: lg@efficientip.com MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53629 --- sys/dev/virtio/network/if_vtnet.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index a61b0aac0bfa..d9daa5bfd70a 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1346,20 +1346,40 @@ vtnet_ioctl_ifcap(struct vtnet_softc *sc, struct ifreq *ifr) VTNET_CORE_LOCK_ASSERT(sc); if (mask & IFCAP_TXCSUM) { + if (if_getcapenable(ifp) & IFCAP_TXCSUM && + if_getcapenable(ifp) & IFCAP_TSO4) { + /* Disable tso4, because txcsum will be disabled. */ + if_setcapenablebit(ifp, 0, IFCAP_TSO4); + if_sethwassistbits(ifp, 0, CSUM_IP_TSO); + mask &= ~IFCAP_TSO4; + } if_togglecapenable(ifp, IFCAP_TXCSUM); if_togglehwassist(ifp, VTNET_CSUM_OFFLOAD); } if (mask & IFCAP_TXCSUM_IPV6) { + if (if_getcapenable(ifp) & IFCAP_TXCSUM_IPV6 && + if_getcapenable(ifp) & IFCAP_TSO6) { + /* Disable tso6, because txcsum6 will be disabled. */ + if_setcapenablebit(ifp, 0, IFCAP_TSO6); + if_sethwassistbits(ifp, 0, CSUM_IP6_TSO); + mask &= ~IFCAP_TSO6; + } if_togglecapenable(ifp, IFCAP_TXCSUM_IPV6); if_togglehwassist(ifp, VTNET_CSUM_OFFLOAD_IPV6); } if (mask & IFCAP_TSO4) { - if_togglecapenable(ifp, IFCAP_TSO4); - if_togglehwassist(ifp, IFCAP_TSO4); + if (if_getcapenable(ifp) & (IFCAP_TXCSUM | IFCAP_TSO4)) { + /* tso4 can only be enabled, if txcsum is enabled. */ + if_togglecapenable(ifp, IFCAP_TSO4); + if_togglehwassist(ifp, CSUM_IP_TSO); + } } if (mask & IFCAP_TSO6) { - if_togglecapenable(ifp, IFCAP_TSO6); - if_togglehwassist(ifp, IFCAP_TSO6); + if (if_getcapenable(ifp) & (IFCAP_TXCSUM_IPV6 | IFCAP_TSO6)) { + /* tso6 can only be enabled, if txcsum6 is enabled. */ + if_togglecapenable(ifp, IFCAP_TSO6); + if_togglehwassist(ifp, CSUM_IP6_TSO); + } } if (mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_LRO)) { From nobody Mon Nov 10 15:51:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vKP68yMz6GtJK; Mon, 10 Nov 2025 15:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vKP5Qr0z43hd; Mon, 10 Nov 2025 15:51:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bwJFhuOF7RlvAMA5ojO2ThaZ1oQJhaeF8ZGwz6JVyoc=; b=WdJsjhA5SiYW3eerIDx8UwNb/BaXanfS8fCAAmZp8MdqQ7WhrS5ViEgsUu6ap/lsp78DcW Q73WKzN3ChEma+n2aUIXLH+UTXi9qy0fGLUW8zoQ53wP89sHbaPVaKhKD5duQ0Jx3VMaJW 43jKjEN7YcaHxKMQ/c7vCXfFWflaSw+VsBzcrLj0zuPhSIC+ymP6jIUkK452QHY4Vhlt9o CNw6f4m2VdRq1F1smNzTfivqzypKr+CEHIFR1Fj47Oqksg/07Kp4bi1ydSGZr0zzusxl8V yf6qw9o6232GloUfPX2AMiqP8jGAWRo08eiFcVN04QvevoYkvwJmTVIXjWUzLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bwJFhuOF7RlvAMA5ojO2ThaZ1oQJhaeF8ZGwz6JVyoc=; b=IE1tn2mIxyk6rkI5zAzH/ki8PQznd5K6HIi9clAbR9ucTLQzkvArjeog5GkCb0FXwBGCHw hl0G5Cg6Ma5Ghb45juvHaNkLM9xAS12otJTd+gdVUaA9pIxj2sG3rllnM9+3fedlTx+j+s wA1BaJWC98ON5kfM/W6+tuI0pFF+AT5w6uAOO1GwmquX3tz9QQ/N9RGimLSnTpDhi/EVF8 OLXdaRFZbU3wjC/0aNHuDUpSzIDGnd0YqY99pmwqH3I1PnG2DdAivuomRJQfLjXWBG/RuQ N9FeT87n2P9PbcVX503ipzMELrrEY4oYgnBQjI5oOIcLRlnNAogIGvfFPXkHag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789881; a=rsa-sha256; cv=none; b=Cx1kz3qaRKyWH/qJ4PaU6K3V28wfgSWSowzxFmkyOozxtArwae5joSIv9N6WutNg/BzUsl 0xqnNClo00ZoXRnO1uaZ39laBJA/sFuFVVSE2i2FEK2vwWgjoR9K7eRB98pN4iUYQj5MpL tiZCfbUvJpVC1cpPpCXrsjyBGO6wJ6Nx6mb0QSGYyTrYWeJi7cPmTPjQg7jIo1HLmC1hSS OncbDPCTZq4Zx+E9FMWtJMdSLPkecvyxqwjvTQ6TnyXiQNNtggDOiD3nBwaHDqXnM7r/OH oJnqC/N987kMc4jKcCJTJiAoiPZCBIykZwtsK09Up1jJLHdMmkJXYy9ED1g1hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vKP52PZz7qp; Mon, 10 Nov 2025 15:51: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 5AAFpLre047977; Mon, 10 Nov 2025 15:51:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFpLoL047974; Mon, 10 Nov 2025 15:51:21 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:51:21 GMT Message-Id: <202511101551.5AAFpLoL047974@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: 01dd6a83b5ff - main - nvmf: Add a transport hook to limit the size of host data transfers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 01dd6a83b5ffce7a99ab8a7c2c9dcb82088357cd Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=01dd6a83b5ffce7a99ab8a7c2c9dcb82088357cd commit 01dd6a83b5ffce7a99ab8a7c2c9dcb82088357cd Author: John Baldwin AuthorDate: 2025-11-10 15:50:47 +0000 Commit: John Baldwin CommitDate: 2025-11-10 15:50:47 +0000 nvmf: Add a transport hook to limit the size of host data transfers Smart NIC offload transports may have a cap on the size of the largest data PDU that can be received. Allow these transports to enforce a cap on the size of an I/O request submitted by the nvmf(4) host. NB: The controller is able to advertise a maximum-supported PDU size during TCP negotiation, but there is no way in the protocol to advertise a maximum size that the host can receive. Sponsored by: Chelsio Communications --- sys/dev/nvmf/nvmf_tcp.c | 7 +++++++ sys/dev/nvmf/nvmf_transport.c | 6 ++++++ sys/dev/nvmf/nvmf_transport.h | 8 ++++++++ sys/dev/nvmf/nvmf_transport_internal.h | 3 +++ 4 files changed, 24 insertions(+) diff --git a/sys/dev/nvmf/nvmf_tcp.c b/sys/dev/nvmf/nvmf_tcp.c index e50d7ff48d2b..0e31c0495775 100644 --- a/sys/dev/nvmf/nvmf_tcp.c +++ b/sys/dev/nvmf/nvmf_tcp.c @@ -1602,6 +1602,12 @@ tcp_free_qpair(struct nvmf_qpair *nq) tcp_release_qpair(qp); } +static uint64_t +tcp_max_xfer_size(struct nvmf_qpair *nq) +{ + return (0); +} + static struct nvmf_capsule * tcp_allocate_capsule(struct nvmf_qpair *nq, int how) { @@ -1872,6 +1878,7 @@ tcp_send_controller_data(struct nvmf_capsule *nc, uint32_t data_offset, struct nvmf_transport_ops tcp_ops = { .allocate_qpair = tcp_allocate_qpair, .free_qpair = tcp_free_qpair, + .max_xfer_size = tcp_max_xfer_size, .allocate_capsule = tcp_allocate_capsule, .free_capsule = tcp_free_capsule, .transmit_capsule = tcp_transmit_capsule, diff --git a/sys/dev/nvmf/nvmf_transport.c b/sys/dev/nvmf/nvmf_transport.c index 1d3f5ea4cf69..d552393f7adf 100644 --- a/sys/dev/nvmf/nvmf_transport.c +++ b/sys/dev/nvmf/nvmf_transport.c @@ -188,6 +188,12 @@ nvmf_sqhd_valid(struct nvmf_capsule *nc) return (nc->nc_sqhd_valid); } +uint64_t +nvmf_max_xfer_size(struct nvmf_qpair *qp) +{ + return (qp->nq_ops->max_xfer_size(qp)); +} + uint8_t nvmf_validate_command_capsule(struct nvmf_capsule *nc) { diff --git a/sys/dev/nvmf/nvmf_transport.h b/sys/dev/nvmf/nvmf_transport.h index b192baeaccc1..38b661ab3c91 100644 --- a/sys/dev/nvmf/nvmf_transport.h +++ b/sys/dev/nvmf/nvmf_transport.h @@ -81,6 +81,14 @@ void *nvmf_capsule_sqe(struct nvmf_capsule *nc); void *nvmf_capsule_cqe(struct nvmf_capsule *nc); bool nvmf_sqhd_valid(struct nvmf_capsule *nc); +/* Host-specific APIs. */ + +/* + * Largest I/O request size for a single command supported by the + * transport. If the transport does not have a limit, returns 0. + */ +uint64_t nvmf_max_xfer_size(struct nvmf_qpair *qp); + /* Controller-specific APIs. */ /* diff --git a/sys/dev/nvmf/nvmf_transport_internal.h b/sys/dev/nvmf/nvmf_transport_internal.h index eb819a5c83b9..511aac120fdc 100644 --- a/sys/dev/nvmf/nvmf_transport_internal.h +++ b/sys/dev/nvmf/nvmf_transport_internal.h @@ -25,6 +25,9 @@ struct nvmf_transport_ops { const nvlist_t *nvl); void (*free_qpair)(struct nvmf_qpair *qp); + /* Limit on transfer size. */ + uint64_t (*max_xfer_size)(struct nvmf_qpair *qp); + /* Capsule operations. */ struct nvmf_capsule *(*allocate_capsule)(struct nvmf_qpair *qp, int how); From nobody Mon Nov 10 15:51:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vKR2Qzyz6GtFr; Mon, 10 Nov 2025 15:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vKQ6pfXz43hg; Mon, 10 Nov 2025 15:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GM+mar2GY5JPWhZueAkBxw2NOls9AsHZtcDpl424Xk0=; b=VKfb7epoXvVvottVGCGMRH4hLNaHFuoKXrgYaiERs3qGNWPF8PZtMh5k1TQ6VbhBu43IbQ v+8uRkpoXZ6DWNDccH0wNgbk8VylJtj9tgOBEoV/enJgIWGXZ4jAr+0zK6OdC7CwAE6PfM cy9XgNmOx1LjASx/xIhA0+sMcphRcydbufwCnSAwtRRIfXWPj+cAQXh92z0+x7vHuQzxfd KOjnqIxpqbAUuKnkC0WAtSJfL1ajNNDQH+iJNbY71PDkzMYrKh91xNi4pRwtUKVLoWCOyf /foHz0O2i/GsApGKOVp4jaqm5BEd9nU7zsy+ZSFjn35EkdTGxo1ufWckPchnKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GM+mar2GY5JPWhZueAkBxw2NOls9AsHZtcDpl424Xk0=; b=pnU9q8FCM5R9NJmdxpacJtrIg+ECFfBLf7zqVbw5MHOTY/Whg10OPqhqIIwwsjJqbfg5cu zpQfW5vtw2FSAhPicWI7MRxaH54s7BZYdAUFIXG6kpARzr7fHYsnCteJoy3rJACDWyTEAI hXempjSKAGrARisxWy6E+NRyM1XXyIVPfnAZUur16tahvHzAYgKKKWgt/PtfzSbFSJVf4P vGqd5GGam1uld9SF+EQXlBOH4q8OLp1UIjNM2F9O+LRydliXDk5lSoshyixFwDhO49qeOW d0/z798qbMDFDg6ek9PprysRowEz++TndGC7PiFbDVQVdmJK7bestBlStW7LiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789883; a=rsa-sha256; cv=none; b=M5kD1rTbJii+OqHNADNmpFjXTARG4O5atU3WsLO9GyED52V/KlOHm2X+seeG+TmugGro0K 3OKj8d10bNJ9/HqbEiVuuMyu/maSpqefo+8YGuDGG0KsJxZ9Tov2vbuGNn+4EzVfXkSiMz MJ3IFP+grvL6712Z6uy4kRcQZyxht6SRuw2kyEGCU2Ezh3cKCLueyhrRsTK0XqQFuRlIdd CBQyxU1VXCRKX2HSOO1N7tmmVhJdXnkhZE57rYR8bPf/lGgRgyFseF2yo7FEtpuUQOfFb4 bwnje7vWtgxW4K8ELvHbpnk3ldtH2V/hkPu8zW75j61r6s6EfR0vWr9CfGhgKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vKQ5yZTz8bj; Mon, 10 Nov 2025 15:51: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 5AAFpMqr048015; Mon, 10 Nov 2025 15:51:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFpMJC048012; Mon, 10 Nov 2025 15:51:22 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:51:22 GMT Message-Id: <202511101551.5AAFpMJC048012@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: 62caae230859 - main - nvmf: Honor any data transfer limit imposed by the transport List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 62caae230859423ae045b5d754f30d193ca628c0 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=62caae230859423ae045b5d754f30d193ca628c0 commit 62caae230859423ae045b5d754f30d193ca628c0 Author: John Baldwin AuthorDate: 2025-11-10 15:50:47 +0000 Commit: John Baldwin CommitDate: 2025-11-10 15:50:47 +0000 nvmf: Honor any data transfer limit imposed by the transport If the transport has a data transfer limit, restrict I/O transfers to the largest multiple of MPS that fits within the limit. Sponsored by: Chelsio Communications --- sys/dev/nvmf/host/nvmf.c | 13 ++++++++++--- sys/dev/nvmf/host/nvmf_qpair.c | 6 ++++++ sys/dev/nvmf/host/nvmf_var.h | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/sys/dev/nvmf/host/nvmf.c b/sys/dev/nvmf/host/nvmf.c index 1ac0d142443b..d6afdce54709 100644 --- a/sys/dev/nvmf/host/nvmf.c +++ b/sys/dev/nvmf/host/nvmf.c @@ -498,7 +498,7 @@ nvmf_attach(device_t dev) nvlist_t *nvl = device_get_ivars(dev); const nvlist_t * const *io; struct sysctl_oid *oid; - uint64_t val; + uint64_t mpsmin, val; u_int i; int error; @@ -545,13 +545,20 @@ nvmf_attach(device_t dev) sc->vs = val; /* Honor MDTS if it is set. */ + mpsmin = (uint64_t)1 << (NVME_MPS_SHIFT + + NVME_CAP_HI_MPSMIN(sc->cap >> 32)); sc->max_xfer_size = maxphys; if (sc->cdata->mdts != 0) { sc->max_xfer_size = ulmin(sc->max_xfer_size, - 1 << (sc->cdata->mdts + NVME_MPS_SHIFT + - NVME_CAP_HI_MPSMIN(sc->cap >> 32))); + mpsmin << sc->cdata->mdts); } + /* Honor any transfer size restriction imposed by the transport. */ + val = nvmf_max_xfer_size_qp(sc->io[0]); + if (val >= mpsmin) + sc->max_xfer_size = ulmin(sc->max_xfer_size, + rounddown2(val, mpsmin)); + io = nvlist_get_nvlist_array(nvl, "io", NULL); sc->max_pending_io = nvlist_get_number(io[0], "qsize") * sc->num_io_queues; diff --git a/sys/dev/nvmf/host/nvmf_qpair.c b/sys/dev/nvmf/host/nvmf_qpair.c index 2f511cf0406d..adb57e52d002 100644 --- a/sys/dev/nvmf/host/nvmf_qpair.c +++ b/sys/dev/nvmf/host/nvmf_qpair.c @@ -416,6 +416,12 @@ nvmf_destroy_qp(struct nvmf_host_qpair *qp) free(qp, M_NVMF); } +uint64_t +nvmf_max_xfer_size_qp(struct nvmf_host_qpair *qp) +{ + return (nvmf_max_xfer_size(qp->qp)); +} + void nvmf_submit_request(struct nvmf_request *req) { diff --git a/sys/dev/nvmf/host/nvmf_var.h b/sys/dev/nvmf/host/nvmf_var.h index 606245b3969c..9190da300d85 100644 --- a/sys/dev/nvmf/host/nvmf_var.h +++ b/sys/dev/nvmf/host/nvmf_var.h @@ -210,6 +210,7 @@ struct nvmf_host_qpair *nvmf_init_qp(struct nvmf_softc *sc, enum nvmf_trtype trtype, const nvlist_t *nvl, const char *name, u_int qid); void nvmf_shutdown_qp(struct nvmf_host_qpair *qp); void nvmf_destroy_qp(struct nvmf_host_qpair *qp); +uint64_t nvmf_max_xfer_size_qp(struct nvmf_host_qpair *qp); struct nvmf_request *nvmf_allocate_request(struct nvmf_host_qpair *qp, void *sqe, nvmf_request_complete_t *cb, void *cb_arg, int how); void nvmf_submit_request(struct nvmf_request *req); From nobody Mon Nov 10 15:51:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vKS5N3dz6GtSx; Mon, 10 Nov 2025 15:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vKS0ClBz43bb; Mon, 10 Nov 2025 15:51:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/+OUS4dz2G8wRIQ1ykRbYToCC5A+cIXvEpAy83Vj4U0=; b=asBjsLvtTVhz4l9uIAE7aCE3eoh1ekVCmnFKNX8QIybZBa/LO2ib3litfNmU0UVcaG9sDP aYG2GMq/+MxN3bObbzR3UAvfrRz/FXKa/Jk2tGa77TptmIK97brl8++ay9T4i3JbP6+9Yp skqLnuyb1hnX1Jh+SCWQW26VpFJ4uUgqHUdDA74HfzE5OH5aMa4aCRgTpCJsl26itdSIwS aSHaOMbd2TA9pEIdrmz6ig+Ra1S9pVQb8Ct4nPO10iZanTO9wY5n7I6jbIDhJNYrU/R2Ph wTvGVbRz7jfvVxmlIlZNxp5R9mC8LjlCE9UnOUUb+/+MeHUcjk16LbVnDgPDKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/+OUS4dz2G8wRIQ1ykRbYToCC5A+cIXvEpAy83Vj4U0=; b=HSc4PzYvLLGGdPF1jDGdOXXkT536bNIfSsrltwn0MYeacIQZD37oEvp7K4M2HNNEaKZTXW S+eyrqlA4C+KO/M9Ub3yOIXkHO9nND60OLdIK5UPbdNncnuKxlc46t7RyqCpBkc5tw6TiZ dmAoEj6frBfwkzvrz0w6prY55prvf5PAHdO1oefyN7rMg+H1fw74WVgnUzn/+gxK4oKUHY rBMJ5dvli1hQDoJZiNCRc3/dGTnQVyar5zzQCrtpnP5oJ3aJTpBh+DtBgh7V8jQMAikoAF BPgCS+0ZKnf720hUh/ndUVe6wjgW3/qZfnj7R2lh5ltm4GyKa4Mhs+pOU7rigg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789884; a=rsa-sha256; cv=none; b=FhYC8l/61hMNxIEvJde+tVWihS60BhACqs7ualeaktgOmYN51tJ82Q6Lv0gPzS7QlqL4dI 1MslNH5O5fOmqClx0ZICUSYqhhhtjRnyZGRpQT4hB1ixSsq2h+xwwmtlE5wP7oLpTSZpAw 7JTOmvlBaMhgUjss1mkvrVDcHgm+2f3GY8yXtktntNXFtCQR66BCV7+a3X00nGK4Ztqovv 9hfTELTmrAm9ZeNbnXP9Al6DsCRwSvIxSls1/owRQzxqpw+OYevDYFhyY5K/5BSKw0vcD0 N/DOOzPqvZCOlXV5jtvrklPyfFLhuzhxdqn+J4iTwa/xduYrhSALlkFv/zj4mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vKR6sJlz8YJ; Mon, 10 Nov 2025 15:51: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 5AAFpNEQ048052; Mon, 10 Nov 2025 15:51:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFpNtl048049; Mon, 10 Nov 2025 15:51:23 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:51:23 GMT Message-Id: <202511101551.5AAFpNtl048049@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: c1b3c5f5f3fa - main - nvmf: Add a transport hook to limit the maximum command capsule size List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: c1b3c5f5f3fab895df3d2e75ac3edee4e9aa6432 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c1b3c5f5f3fab895df3d2e75ac3edee4e9aa6432 commit c1b3c5f5f3fab895df3d2e75ac3edee4e9aa6432 Author: John Baldwin AuthorDate: 2025-11-10 15:50:47 +0000 Commit: John Baldwin CommitDate: 2025-11-10 15:50:47 +0000 nvmf: Add a transport hook to limit the maximum command capsule size NVMe controllers advertise the largest supported size of a command capsule in the controller data (IOCCSZ). Smart NIC offload transports may have a cap on the size of the largest data PDU that can be received. These transports can implement this hook to limit the advertised IOCCSZ to limit the in-capsule-data payload sent by remote hosts. Sponsored by: Chelsio Communications --- sys/dev/nvmf/nvmf_tcp.c | 7 +++++++ sys/dev/nvmf/nvmf_transport.c | 6 ++++++ sys/dev/nvmf/nvmf_transport.h | 6 ++++++ sys/dev/nvmf/nvmf_transport_internal.h | 3 +++ 4 files changed, 22 insertions(+) diff --git a/sys/dev/nvmf/nvmf_tcp.c b/sys/dev/nvmf/nvmf_tcp.c index 0e31c0495775..481c769cedcb 100644 --- a/sys/dev/nvmf/nvmf_tcp.c +++ b/sys/dev/nvmf/nvmf_tcp.c @@ -1602,6 +1602,12 @@ tcp_free_qpair(struct nvmf_qpair *nq) tcp_release_qpair(qp); } +static uint32_t +tcp_max_ioccsz(struct nvmf_qpair *nq) +{ + return (0); +} + static uint64_t tcp_max_xfer_size(struct nvmf_qpair *nq) { @@ -1878,6 +1884,7 @@ tcp_send_controller_data(struct nvmf_capsule *nc, uint32_t data_offset, struct nvmf_transport_ops tcp_ops = { .allocate_qpair = tcp_allocate_qpair, .free_qpair = tcp_free_qpair, + .max_ioccsz = tcp_max_ioccsz, .max_xfer_size = tcp_max_xfer_size, .allocate_capsule = tcp_allocate_capsule, .free_capsule = tcp_free_capsule, diff --git a/sys/dev/nvmf/nvmf_transport.c b/sys/dev/nvmf/nvmf_transport.c index d552393f7adf..92d71d1b13fd 100644 --- a/sys/dev/nvmf/nvmf_transport.c +++ b/sys/dev/nvmf/nvmf_transport.c @@ -194,6 +194,12 @@ nvmf_max_xfer_size(struct nvmf_qpair *qp) return (qp->nq_ops->max_xfer_size(qp)); } +uint32_t +nvmf_max_ioccsz(struct nvmf_qpair *qp) +{ + return (qp->nq_ops->max_ioccsz(qp)); +} + uint8_t nvmf_validate_command_capsule(struct nvmf_capsule *nc) { diff --git a/sys/dev/nvmf/nvmf_transport.h b/sys/dev/nvmf/nvmf_transport.h index 38b661ab3c91..495e0dbc8c37 100644 --- a/sys/dev/nvmf/nvmf_transport.h +++ b/sys/dev/nvmf/nvmf_transport.h @@ -91,6 +91,12 @@ uint64_t nvmf_max_xfer_size(struct nvmf_qpair *qp); /* Controller-specific APIs. */ +/* + * Largest I/O command capsule size (IOCCSZ) supported by the + * transport. If the transport does not have a limit, returns 0. + */ +uint32_t nvmf_max_ioccsz(struct nvmf_qpair *qp); + /* * A controller calls this function to check for any * transport-specific errors (invalid fields) in a received command diff --git a/sys/dev/nvmf/nvmf_transport_internal.h b/sys/dev/nvmf/nvmf_transport_internal.h index 511aac120fdc..9b459716168a 100644 --- a/sys/dev/nvmf/nvmf_transport_internal.h +++ b/sys/dev/nvmf/nvmf_transport_internal.h @@ -25,6 +25,9 @@ struct nvmf_transport_ops { const nvlist_t *nvl); void (*free_qpair)(struct nvmf_qpair *qp); + /* Limit on I/O command capsule size. */ + uint32_t (*max_ioccsz)(struct nvmf_qpair *qp); + /* Limit on transfer size. */ uint64_t (*max_xfer_size)(struct nvmf_qpair *qp); From nobody Mon Nov 10 15:51:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vKT4ZKCz6GtT1; Mon, 10 Nov 2025 15:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vKT1Dkgz43wC; Mon, 10 Nov 2025 15:51:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mu3dK6w4AKJybD9hC7Kux/QU8SoCRAe9wlt1da+u3P8=; b=tA1zT5AihH+AWqEnn4p8a1+mrCGJYIeLHaVDcB7IKmSZbFHenPy1nxTW5MGeG7/ALNvgg6 1sWYb9Y/5D3PcnPShVZAPgEcKVo7H/eOKQXgMa/t4iAmC1KWCyTJpfI2pX2GdeHs+Ozyab iWZJVbKjNfevMb6OiBqhipxFnVLpDQbi3S4pr6gWJCot8pwEt/xT2MIFdoUcKQOpUNqg/i Vb9+L4nhMusCpRZ3BsVYUGQ6fPtNlZ3vLknwQYh0QhXIZxby62LxgGFVw9W6BK4zLrXeed kV+f5rkOVKtagKNByXsBmm94F+USz6sFGPMbPk9v6QyfVbYxmxMShZoreU4XZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mu3dK6w4AKJybD9hC7Kux/QU8SoCRAe9wlt1da+u3P8=; b=lK3YhBM4OkgJiKWAm60eh8yXpVSZU3FQ0QUf6up6Lgcazj0seZTmVm+2lSxKr2n6iSVUp9 gIHbYliCgor+fpklJKUHFP7WJOG9+8tjlMEbiej0hPRx+k1tFm1yW9rSXgECTlaNEOnYJI bBlVIQFDQtN3M4ZsmmD3IRhbk21RMjtbQVU8+hPF524ste0D2MTeBtD+b3TZpV90TK9iIl 629cdXilKeQFBmWwcEb6vafp3Y6RT8x4zAC/jfxcnSEEKU9bW07dy/iOqPSAP8rGdA3dl/ jYZOM3IgW3ZSKCogpLj/oueWfOEedYkNkL3j4RtmRZII74jSzZWtp7mnTdHrxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789885; a=rsa-sha256; cv=none; b=Muzil8IynSGSrKxNY3+NZ4utHusstin/V+kE18Oa9kOYD4sLYfX9HQtoC+8ZHfm25JYGyt 1LLJYMtbjnOmXjmenHKuJrONZB0LXZcU+erloQxDropBdPftgxxca6b1bqisRM5erKksgC d5zFckkEk9Ug1zsyQ/x/zi8d8DfpffJGo03y+BhOJLlsRN2MMITII45N1CbHYjreok06g4 qIhe/OU0Y9o3F2+zFt9T4E8JJzm0aGOvxymaeXZTw1UE7OtNtfUC2A3vSvklZO52P6Y9Ay AdQgiBzabvf8+iQlIhnqjavAzv0eSNAERUn6cHNLcJLeAt71P4wz5O4sn1TiyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vKT0jsJz8YK; Mon, 10 Nov 2025 15:51:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AAFpP2o048086; Mon, 10 Nov 2025 15: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 5AAFpOPD048083; Mon, 10 Nov 2025 15:51:24 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:51:24 GMT Message-Id: <202511101551.5AAFpOPD048083@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: 8ced50767933 - main - nvmft: Honor any IOCCSZ limit imposed by the transport List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 8ced50767933f3e2949456367d4d9a64797daec3 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8ced50767933f3e2949456367d4d9a64797daec3 commit 8ced50767933f3e2949456367d4d9a64797daec3 Author: John Baldwin AuthorDate: 2025-11-10 15:50:47 +0000 Commit: John Baldwin CommitDate: 2025-11-10 15:50:47 +0000 nvmft: Honor any IOCCSZ limit imposed by the transport Sponsored by: Chelsio Communications --- sys/dev/nvmf/controller/nvmft_controller.c | 14 ++++++++++++++ sys/dev/nvmf/controller/nvmft_qpair.c | 6 ++++++ sys/dev/nvmf/controller/nvmft_var.h | 1 + 3 files changed, 21 insertions(+) diff --git a/sys/dev/nvmf/controller/nvmft_controller.c b/sys/dev/nvmf/controller/nvmft_controller.c index e618972f46cf..1618c1f96dac 100644 --- a/sys/dev/nvmf/controller/nvmft_controller.c +++ b/sys/dev/nvmf/controller/nvmft_controller.c @@ -103,6 +103,19 @@ nvmft_keep_alive_timer(void *arg) callout_schedule_sbt(&ctrlr->ka_timer, ctrlr->ka_sbt, 0, C_HARDCLOCK); } +static void +nvmft_update_cdata(struct nvmft_controller *ctrlr) +{ + uint32_t ioccsz, val; + + val = nvmft_max_ioccsz(ctrlr->admin); + if (val != 0) { + ioccsz = le32toh(ctrlr->cdata.ioccsz) * 16; + if (val < ioccsz) + ctrlr->cdata.ioccsz = htole32(val / 16); + } +} + int nvmft_handoff_admin_queue(struct nvmft_port *np, enum nvmf_trtype trtype, const nvlist_t *params, const struct nvmf_fabric_connect_cmd *cmd, @@ -160,6 +173,7 @@ nvmft_handoff_admin_queue(struct nvmft_port *np, enum nvmf_trtype trtype, (int)sizeof(data->hostnqn), data->hostnqn); ctrlr->admin = qp; ctrlr->trtype = trtype; + nvmft_update_cdata(ctrlr); /* * The spec requires a non-zero KeepAlive timer, but allow a diff --git a/sys/dev/nvmf/controller/nvmft_qpair.c b/sys/dev/nvmf/controller/nvmft_qpair.c index 73c7bb280780..1300c9ec91fc 100644 --- a/sys/dev/nvmf/controller/nvmft_qpair.c +++ b/sys/dev/nvmf/controller/nvmft_qpair.c @@ -182,6 +182,12 @@ nvmft_qpair_name(struct nvmft_qpair *qp) return (qp->name); } +uint32_t +nvmft_max_ioccsz(struct nvmft_qpair *qp) +{ + return (nvmf_max_ioccsz(qp->qp)); +} + static int _nvmft_send_response(struct nvmft_qpair *qp, const void *cqe) { diff --git a/sys/dev/nvmf/controller/nvmft_var.h b/sys/dev/nvmf/controller/nvmft_var.h index 85032b2dc55f..b3a5278a639c 100644 --- a/sys/dev/nvmf/controller/nvmft_var.h +++ b/sys/dev/nvmf/controller/nvmft_var.h @@ -145,6 +145,7 @@ struct nvmft_controller *nvmft_qpair_ctrlr(struct nvmft_qpair *qp); void nvmft_qpair_datamove(struct nvmft_qpair *qp, union ctl_io *io); uint16_t nvmft_qpair_id(struct nvmft_qpair *qp); const char *nvmft_qpair_name(struct nvmft_qpair *qp); +uint32_t nvmft_max_ioccsz(struct nvmft_qpair *qp); void nvmft_command_completed(struct nvmft_qpair *qp, struct nvmf_capsule *nc); int nvmft_send_response(struct nvmft_qpair *qp, const void *cqe); From nobody Mon Nov 10 15:51:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vKV6P7Hz6GtFw; Mon, 10 Nov 2025 15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vKV2q62z44CN; Mon, 10 Nov 2025 15: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=1762789886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1PNGzexlcp6IAmOWoTETGB0BTBHqBZptWOBgr/RTRRg=; b=LwBbVqmvcdlh9HMLZzLe3aHEpGslmct/kA4WCmFRn4mwMcy5zaD7VHW1PmLhpXj2W+da0G 2BptfWavi1MgK9gT6HAxaIndhhwwO9xq6N2Ltlq44GvOX51OcJjRD1Vvdx+SaqpDgZwWLr EZluB71M0BHWDzXIcjOgq7WAcXa2PMHzm/BsgnUT2bxwdGqDfBtz0E3UjC2Km/wpqZ1pBY PvcXPpzVmfzRm8+b2koEdhCoOG7mbBW3p3TdedduD3bgjr9XcfBWCwDOo6Hfg/ZVpf8SpV oEMIJARsYAf9OzkfCEOG8xk70dhZBBVxH2D4NfDdppHqG+vlXDW6kRnN3yXN8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1PNGzexlcp6IAmOWoTETGB0BTBHqBZptWOBgr/RTRRg=; b=pyIdmTjIZr72HroAsSkpx6NbWpYPHO8b8sJPwcZFe7c4V5d/t/jW0QXF/z0h9kEexZo5CQ hGwKpY9VDvzER94hWgw4kKqcuHChsUXo85blU5Iv121CsDvxCBulkELx6XldRkkWxUGuVG MfCM0PwO3x4c4VRQqrUQshlPhVDtAwmBL7SnUs1/+RIMm3KosNDw0WCFkIeoDCNse7ShM9 zFlbvQBScZO5Feld4TvU3bMxv1gWMrVCRQm86O8Ylc3SNpT19+UJqT7Ie4Xv9c/PHfO104 lR5Rizh3iS5vWHib3Vw3KmcowKZfmO1bfNMBeCiGovsl5KTAC+jWZlriBGbXPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789886; a=rsa-sha256; cv=none; b=WhDzv+4OWm319VgSCP2jGReuo1xRm48DbwhIKc2UyPX7fFueF6siRiJfeasGwhKYQ0JAkJ 4XtBHl6//7WWh1u1mTHTrGJdfMwbdn2yThY+n67+dF6PaxvpoN87R3p1bdmzCystpRSL2v 898EG8u3YaqwmhH6EW4sFg50oyC1MT5SL63dE0i4OEciL+EvAMom3uJj8FNDj2W3gOxTjv tuneaFumgfk7h9KNdPSotL3DnfAdFcOF8U6cvYhaVqVnVTHTR/rTAWduw2HWRA5X3veFWP 5AYB8SG4zH5QvN1jn9XkkhUcHxRzage814aQjTh0XvCQaRgtK2RJSoT2CUa5pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vKV1phwz8nN; Mon, 10 Nov 2025 15: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 5AAFpQ1e048119; Mon, 10 Nov 2025 15:51:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFpQq9048116; Mon, 10 Nov 2025 15:51:26 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:51:26 GMT Message-Id: <202511101551.5AAFpQq9048116@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: adaa1470777b - main - cxgbe: Extend support for NVMe capabilities List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: adaa1470777b7b392960661e317577bf23fe029a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=adaa1470777b7b392960661e317577bf23fe029a commit adaa1470777b7b392960661e317577bf23fe029a Author: John Baldwin AuthorDate: 2025-11-10 15:50:47 +0000 Commit: John Baldwin CommitDate: 2025-11-10 15:50:47 +0000 cxgbe: Extend support for NVMe capabilities - Default to enabling all NVMe capabilities. Currently, NVMe/TCP PDU offload is supported by T7 adapters. - Fetch relevant parameters from the firmware if NVMe support is enabled. A few parameters are shared with RDMA support, so the RDMA parameters section is now split into handling for parameters used by both vs parameters used only by RDMA. Sponsored by: Chelso Communications --- sys/dev/cxgbe/t4_main.c | 83 +++++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 22d2f504c257..5bc503e48bf2 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -611,7 +611,7 @@ static int t4_switchcaps_allowed = FW_CAPS_CONFIG_SWITCH_INGRESS | SYSCTL_INT(_hw_cxgbe, OID_AUTO, switchcaps_allowed, CTLFLAG_RDTUN, &t4_switchcaps_allowed, 0, "Default switch capabilities"); -static int t4_nvmecaps_allowed = 0; +static int t4_nvmecaps_allowed = -1; SYSCTL_INT(_hw_cxgbe, OID_AUTO, nvmecaps_allowed, CTLFLAG_RDTUN, &t4_nvmecaps_allowed, 0, "Default NVMe capabilities"); @@ -5408,6 +5408,7 @@ apply_cfg_and_initialize(struct adapter *sc, char *cfg_file, caps.toecaps = 0; caps.rdmacaps = 0; caps.iscsicaps = 0; + caps.nvmecaps = 0; } caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | @@ -5881,61 +5882,63 @@ get_params__post_init(struct adapter *sc) * that will never be used. */ sc->iscsicaps = 0; + sc->nvmecaps = 0; sc->rdmacaps = 0; } - if (sc->rdmacaps) { + if (sc->nvmecaps || sc->rdmacaps) { param[0] = FW_PARAM_PFVF(STAG_START); param[1] = FW_PARAM_PFVF(STAG_END); - param[2] = FW_PARAM_PFVF(RQ_START); - param[3] = FW_PARAM_PFVF(RQ_END); - param[4] = FW_PARAM_PFVF(PBL_START); - param[5] = FW_PARAM_PFVF(PBL_END); - rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val); + param[2] = FW_PARAM_PFVF(PBL_START); + param[3] = FW_PARAM_PFVF(PBL_END); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 4, param, val); if (rc != 0) { device_printf(sc->dev, - "failed to query RDMA parameters(1): %d.\n", rc); + "failed to query NVMe/RDMA parameters: %d.\n", rc); return (rc); } sc->vres.stag.start = val[0]; sc->vres.stag.size = val[1] - val[0] + 1; - sc->vres.rq.start = val[2]; - sc->vres.rq.size = val[3] - val[2] + 1; - sc->vres.pbl.start = val[4]; - sc->vres.pbl.size = val[5] - val[4] + 1; - - param[0] = FW_PARAM_PFVF(SQRQ_START); - param[1] = FW_PARAM_PFVF(SQRQ_END); - param[2] = FW_PARAM_PFVF(CQ_START); - param[3] = FW_PARAM_PFVF(CQ_END); - param[4] = FW_PARAM_PFVF(OCQ_START); - param[5] = FW_PARAM_PFVF(OCQ_END); + sc->vres.pbl.start = val[2]; + sc->vres.pbl.size = val[3] - val[2] + 1; + } + if (sc->rdmacaps) { + param[0] = FW_PARAM_PFVF(RQ_START); + param[1] = FW_PARAM_PFVF(RQ_END); + param[2] = FW_PARAM_PFVF(SQRQ_START); + param[3] = FW_PARAM_PFVF(SQRQ_END); + param[4] = FW_PARAM_PFVF(CQ_START); + param[5] = FW_PARAM_PFVF(CQ_END); rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val); if (rc != 0) { device_printf(sc->dev, - "failed to query RDMA parameters(2): %d.\n", rc); + "failed to query RDMA parameters(1): %d.\n", rc); return (rc); } - sc->vres.qp.start = val[0]; - sc->vres.qp.size = val[1] - val[0] + 1; - sc->vres.cq.start = val[2]; - sc->vres.cq.size = val[3] - val[2] + 1; - sc->vres.ocq.start = val[4]; - sc->vres.ocq.size = val[5] - val[4] + 1; - - param[0] = FW_PARAM_PFVF(SRQ_START); - param[1] = FW_PARAM_PFVF(SRQ_END); - param[2] = FW_PARAM_DEV(MAXORDIRD_QP); - param[3] = FW_PARAM_DEV(MAXIRD_ADAPTER); - rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 4, param, val); + sc->vres.rq.start = val[0]; + sc->vres.rq.size = val[1] - val[0] + 1; + sc->vres.qp.start = val[2]; + sc->vres.qp.size = val[3] - val[2] + 1; + sc->vres.cq.start = val[4]; + sc->vres.cq.size = val[5] - val[4] + 1; + + param[0] = FW_PARAM_PFVF(OCQ_START); + param[1] = FW_PARAM_PFVF(OCQ_END); + param[2] = FW_PARAM_PFVF(SRQ_START); + param[3] = FW_PARAM_PFVF(SRQ_END); + param[4] = FW_PARAM_DEV(MAXORDIRD_QP); + param[5] = FW_PARAM_DEV(MAXIRD_ADAPTER); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val); if (rc != 0) { device_printf(sc->dev, - "failed to query RDMA parameters(3): %d.\n", rc); + "failed to query RDMA parameters(2): %d.\n", rc); return (rc); } - sc->vres.srq.start = val[0]; - sc->vres.srq.size = val[1] - val[0] + 1; - sc->params.max_ordird_qp = val[2]; - sc->params.max_ird_adapter = val[3]; + sc->vres.ocq.start = val[0]; + sc->vres.ocq.size = val[1] - val[0] + 1; + sc->vres.srq.start = val[2]; + sc->vres.srq.size = val[3] - val[2] + 1; + sc->params.max_ordird_qp = val[4]; + sc->params.max_ird_adapter = val[5]; } if (sc->iscsicaps) { param[0] = FW_PARAM_PFVF(ISCSI_START); @@ -13694,6 +13697,9 @@ tweak_tunables(void) FW_CAPS_CONFIG_ISCSI_T10DIF; } + if (t4_nvmecaps_allowed == -1) + t4_nvmecaps_allowed = FW_CAPS_CONFIG_NVME_TCP; + if (t4_tmr_idx_ofld < 0 || t4_tmr_idx_ofld >= SGE_NTIMERS) t4_tmr_idx_ofld = TMR_IDX_OFLD; @@ -13705,6 +13711,9 @@ tweak_tunables(void) if (t4_iscsicaps_allowed == -1) t4_iscsicaps_allowed = 0; + + if (t4_nvmecaps_allowed == -1) + t4_nvmecaps_allowed = 0; #endif #ifdef DEV_NETMAP From nobody Mon Nov 10 15:51:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vKW5FH1z6Gt9H; Mon, 10 Nov 2025 15:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vKW3FTQz43wx; Mon, 10 Nov 2025 15:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e4ov0JTM7bhfEGFm5v97NhvQ7MXP4/ZWz+Z1D/o8Wdo=; b=HwixXMLHAuew6MwCRakQY6NAtY3deDYFkFXwXQk93/SUlveXSXJixX1EHQCRrmQwi3u3y1 zsT+AD8x5Gux/J/FwLncV5VzCLO/GBv0nQ/XJkjA7QKTill737vBNdOXgtyvCb6rrQ/mSB ImZQYXF/2J65TdKBOqP/4skBBS47hy8bppnFBm6cQHu05zEWTKMnM/RUGJGNaZcqZVLVWC 2aUQMAx+xdlPRZfajqleMHjbJwnaDXxyEsBXEXNYno4AUrY2Gpfhz3IKSW8KSLrjPmiWfj PHGokroCdz+na/J3Zl0gm5L61CsG0yYo/A+QHC4BOpQK9n7ngnaQ04GdE1vdQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e4ov0JTM7bhfEGFm5v97NhvQ7MXP4/ZWz+Z1D/o8Wdo=; b=bGjsJluXFBjIAEnF327hZ7ddDJLdWh3o/stYh5+7aoCN7XlUEi007bhe4ky8AeavHpy9nE uDoHkE1m6GI+N4b63lhp2ofoS8U0rKZt9AmdEhE3ZQAELQtm8X0dTC1nphshcShja844vP RMDgydDQQW3mMdH2PNT2vHmVEmmREMuTNEnwU2aWEE1zDE7wqoe2F2E0aoYbq0Z73pTKtl T4IsEe4DiAt9fzU0fijSWkswKkdwreOp1WKP2eK223MMSKyG0Xpm+KXlr22TtTApuDP+YQ 96Fh3dZVaGsqu6pD5Cbc4IMuEmkhIBNijOb3CvL4cats1npPD4y9OhsEzEr/Ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789887; a=rsa-sha256; cv=none; b=tzeIyqDxaiKmQUFu9nCM5VfGg/mAjvIBzJcC8OI7qx8S9kKvgqNDmWmDQYUj0CG/9BItgi sX2vYLN2x0FQnUf6NWOS3+VP3J5pOdwmqodhSSsvRE6nK4FuLECcCMlss3ZpAL2ZAHWRyi mSF4h6HaYSE48YInnIdakMuqeRvHlA1NRHFAFbmnzkb1z+5vfC7BKe/vtHlxdCEspnQDcf Cd4e+0bh69MGUSKsQXXyLBrzmKPhY5ULMIo7p6tSbPgKZ922u37uSWiq6RCro9fboK9qR8 k2wqHEzAa864BueEmZ+jqak3uoyTGGMKLwH2kRCdpYTzIWr7FBpwXQu/XNfMBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vKW2ZMZz8YM; Mon, 10 Nov 2025 15:51: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 5AAFpReC048155; Mon, 10 Nov 2025 15:51:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFpRN1048152; Mon, 10 Nov 2025 15:51:27 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:51:27 GMT Message-Id: <202511101551.5AAFpRN1048152@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: a4cd88b604de - main - cxgbe: Add ULD_NVME for NVMe/TCP offload List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: a4cd88b604def2b59b0871e612bd6ad04b22520e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a4cd88b604def2b59b0871e612bd6ad04b22520e commit a4cd88b604def2b59b0871e612bd6ad04b22520e Author: John Baldwin AuthorDate: 2025-11-10 15:50:47 +0000 Commit: John Baldwin CommitDate: 2025-11-10 15:50:47 +0000 cxgbe: Add ULD_NVME for NVMe/TCP offload NVMe/TCP offload depends on TOE similar to iSCSI and iWARP offloads. Sponsored by: Chelsio Communications --- sys/dev/cxgbe/offload.h | 3 ++- sys/dev/cxgbe/t4_main.c | 7 ++++++- sys/dev/cxgbe/tom/t4_tom.c | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/cxgbe/offload.h b/sys/dev/cxgbe/offload.h index 91a43785aaca..d63accf86e2a 100644 --- a/sys/dev/cxgbe/offload.h +++ b/sys/dev/cxgbe/offload.h @@ -196,7 +196,8 @@ enum { ULD_TOM = 0, ULD_IWARP, ULD_ISCSI, - ULD_MAX = ULD_ISCSI + ULD_NVME, + ULD_MAX = ULD_NVME }; struct adapter; diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 5bc503e48bf2..4d9c94789a37 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -13412,11 +13412,16 @@ toe_capability(struct vi_info *vi, bool enable) ("%s: TOM activated but flag not set", __func__)); } - /* Activate iWARP and iSCSI too, if the modules are loaded. */ + /* + * Activate iWARP, iSCSI, and NVMe too, if the modules + * are loaded. + */ if (!uld_active(sc, ULD_IWARP)) (void) t4_activate_uld(sc, ULD_IWARP); if (!uld_active(sc, ULD_ISCSI)) (void) t4_activate_uld(sc, ULD_ISCSI); + if (!uld_active(sc, ULD_NVME)) + (void) t4_activate_uld(sc, ULD_NVME); if (pi->uld_vis++ == 0) setbit(&sc->offload_map, pi->port_id); diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 53a945f8b4cc..8dfffd465345 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -1990,8 +1990,10 @@ t4_tom_deactivate(struct adapter *sc) if (td == NULL) return (0); /* XXX. KASSERT? */ - if (uld_active(sc, ULD_IWARP) || uld_active(sc, ULD_ISCSI)) - return (EBUSY); /* both iWARP and iSCSI rely on the TOE. */ + /* These ULDs rely on the TOE. */ + if (uld_active(sc, ULD_IWARP) || uld_active(sc, ULD_ISCSI) || + uld_active(sc, ULD_NVME)) + return (EBUSY); if (sc->offload_map != 0) { for_each_port(sc, i) { From nobody Mon Nov 10 15:51:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vKZ05kPz6GtCl; Mon, 10 Nov 2025 15:51:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vKY4z9Rz449h; Mon, 10 Nov 2025 15:51:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WJ6gfo+DTSMsKf9P2LrOGX2ehXQAXb84OR72PR6ptWY=; b=gleSQh48UKZB5gyfZmFaiIRjiqFuQ/uUWe5876sc4C5Ubk/HHUCwEEI0d50P16cnxpJW3m qyKNDUJg1FbulFrgFp07ct17kflAeLYC+FdhuJi6r4BWWytj0y+JzDNfO6kTCJwSpYkp/T WrWrd//ok1prpoyEezqvDB5zzRihWNG4SiPLZq/s7uN3cVDdTsxR8NaG6nCPAKqGFZYNPm gxPUTSWw92BTtmEK0IOYcBu3qrRJH7EduYG0vuhuC9Owu65BapsbHzf9RuzE2q+87iSk6a fTn6T2ZWNjxV4lwXCdIz7uX+RS70M3y5kxR/h3jVEfVyOMpfNfNisDlrRccPTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WJ6gfo+DTSMsKf9P2LrOGX2ehXQAXb84OR72PR6ptWY=; b=jqk0/qzTKfdd7R1IatUrHniY0od5dvwjn2MnP4AEqJSMJMWFRKQppiu+armz+MLgS3zWRJ Xx+JdVmTex+/ykdkyqPaXzMzZxuW7ZsI+txJ+nK09g2RW6jp9pPrLJgASqSic9HwoB0kHB 3M2iGAx42slBOi/ggIF/BdWJmAK/wgPLqDPKik3GKCsEJlJSsFCLHxJXrkIef9PIdIFXLR RebZDPwie3ksxMbslWLeODknJJ0/bEcLHAT4yEKNOF0SuORAnTs/fgvZkFftd5Nt5dqAae 7n3PDmzddiX3JoCrkbynLF2ZDY2NyyxIfrbllPuyRkNIL16IhDtQe5QvWDnH6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789889; a=rsa-sha256; cv=none; b=lyBfxFPl0uAjWn/gt5IifRv6XZtxDs3I4wtNeSdm+pHAeQV1sYQjh8qqybkqs60XXFrIQR Npc1k1NtzgV6jlej1cOBfTGzNJOZs7gJYi77mYH8kyWqjszqX0jgtfjK2Nhi/tvx7PDVdx jyL+5qiozDoQ7xL4dgNbQg05uh6kAqH5LW+eN7CUxEsUOD2mPKHXxGNgv085RVjfP2S0aw 6S4EYHVBMkI7jop2/LIxuNnRPh2hHoYlbuAl9hgpNzPWDD4zeSUbvFlxQwYy3FTNSG1C/O b8Fg9k22g7Awa/yjELVtAgVfYEdBV1ozXk7qcIMPxmETPAMFqmPqzDlmmJWhqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vKY4RKhz7qr; Mon, 10 Nov 2025 15:51: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 5AAFpT34048223; Mon, 10 Nov 2025 15:51:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFpTcb048220; Mon, 10 Nov 2025 15:51:29 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:51:29 GMT Message-Id: <202511101551.5AAFpTcb048220@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: 71d82199a111 - main - cxgbe: Add support to the base driver for NVMe/TCP PDU offload List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 71d82199a111af67cba73e32a27a900d74c1a1cc Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=71d82199a111af67cba73e32a27a900d74c1a1cc commit 71d82199a111af67cba73e32a27a900d74c1a1cc Author: John Baldwin AuthorDate: 2025-11-10 15:50:48 +0000 Commit: John Baldwin CommitDate: 2025-11-10 15:50:48 +0000 cxgbe: Add support to the base driver for NVMe/TCP PDU offload - Adds various per-queue counters similar to iSCSI PDU offload as well as a hook in the adapter softc for a reference to the NVMe/TCP softc. - Instruct the firmware to include a DDP indicator in the status field for NVMe/TCP PDU completion messages. This flag indicates if the payload data for a PDU has been received in the free list or if it was placed directly into a kernel I/O data buffer via DDP. Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 11 ++++++++ sys/dev/cxgbe/t4_main.c | 16 ++++++++++++ sys/dev/cxgbe/t4_sge.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 93 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 57618b1ceb15..0946c3110817 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -723,6 +723,16 @@ struct sge_ofld_rxq { uint64_t rx_iscsi_padding_errors; uint64_t rx_iscsi_header_digest_errors; uint64_t rx_iscsi_data_digest_errors; + counter_u64_t rx_nvme_ddp_setup_ok; + counter_u64_t rx_nvme_ddp_setup_no_stag; + counter_u64_t rx_nvme_ddp_setup_error; + counter_u64_t rx_nvme_ddp_pdus; + counter_u64_t rx_nvme_ddp_octets; + counter_u64_t rx_nvme_fl_pdus; + counter_u64_t rx_nvme_fl_octets; + counter_u64_t rx_nvme_invalid_headers; + counter_u64_t rx_nvme_header_digest_errors; + counter_u64_t rx_nvme_data_digest_errors; uint64_t rx_aio_ddp_jobs; uint64_t rx_aio_ddp_octets; u_long rx_toe_tls_records; @@ -1000,6 +1010,7 @@ struct adapter { void *iwarp_softc; /* (struct c4iw_dev *) */ struct iw_tunables iwt; void *iscsi_ulp_softc; /* (struct cxgbei_data *) */ + void *nvme_ulp_softc; /* (struct nvmf_che_adapter *) */ struct l2t_data *l2t; /* L2 table */ struct smt_data *smt; /* Source MAC Table */ struct tid_info tids; diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 2f6eb6062c20..6133d810c003 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -13009,6 +13009,22 @@ clear_stats(struct adapter *sc, u_int port_id) ofld_rxq->rx_iscsi_ddp_octets = 0; ofld_rxq->rx_iscsi_fl_pdus = 0; ofld_rxq->rx_iscsi_fl_octets = 0; + counter_u64_zero( + ofld_rxq->rx_nvme_ddp_setup_ok); + counter_u64_zero( + ofld_rxq->rx_nvme_ddp_setup_no_stag); + counter_u64_zero( + ofld_rxq->rx_nvme_ddp_setup_error); + counter_u64_zero(ofld_rxq->rx_nvme_ddp_pdus); + counter_u64_zero(ofld_rxq->rx_nvme_ddp_octets); + counter_u64_zero(ofld_rxq->rx_nvme_fl_pdus); + counter_u64_zero(ofld_rxq->rx_nvme_fl_octets); + counter_u64_zero( + ofld_rxq->rx_nvme_invalid_headers); + counter_u64_zero( + ofld_rxq->rx_nvme_header_digest_errors); + counter_u64_zero( + ofld_rxq->rx_nvme_data_digest_errors); ofld_rxq->rx_aio_ddp_jobs = 0; ofld_rxq->rx_aio_ddp_octets = 0; ofld_rxq->rx_toe_tls_records = 0; diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 8cd5b0543d8a..4932a3abdeca 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -852,6 +852,11 @@ t4_tweak_chip_settings(struct adapter *sc) /* We use multiple DDP page sizes both in plain-TOE and ISCSI modes. */ m = v = F_TDDPTAGTCB | F_ISCSITAGTCB; + if (sc->nvmecaps != 0) { + /* Request DDP status bit for NVMe PDU completions. */ + m |= F_NVME_TCP_DDP_VAL_EN; + v |= F_NVME_TCP_DDP_VAL_EN; + } t4_set_reg_field(sc, A_ULP_RX_CTL, m, v); m = V_INDICATESIZE(M_INDICATESIZE) | F_REARMDDPOFFSET | @@ -4170,6 +4175,20 @@ alloc_ofld_rxq(struct vi_info *vi, struct sge_ofld_rxq *ofld_rxq, int idx, ofld_rxq->rx_iscsi_ddp_setup_ok = counter_u64_alloc(M_WAITOK); ofld_rxq->rx_iscsi_ddp_setup_error = counter_u64_alloc(M_WAITOK); + ofld_rxq->rx_nvme_ddp_setup_ok = counter_u64_alloc(M_WAITOK); + ofld_rxq->rx_nvme_ddp_setup_no_stag = + counter_u64_alloc(M_WAITOK); + ofld_rxq->rx_nvme_ddp_setup_error = + counter_u64_alloc(M_WAITOK); + ofld_rxq->rx_nvme_ddp_octets = counter_u64_alloc(M_WAITOK); + ofld_rxq->rx_nvme_ddp_pdus = counter_u64_alloc(M_WAITOK); + ofld_rxq->rx_nvme_fl_octets = counter_u64_alloc(M_WAITOK); + ofld_rxq->rx_nvme_fl_pdus = counter_u64_alloc(M_WAITOK); + ofld_rxq->rx_nvme_invalid_headers = counter_u64_alloc(M_WAITOK); + ofld_rxq->rx_nvme_header_digest_errors = + counter_u64_alloc(M_WAITOK); + ofld_rxq->rx_nvme_data_digest_errors = + counter_u64_alloc(M_WAITOK); ofld_rxq->ddp_buffer_alloc = counter_u64_alloc(M_WAITOK); ofld_rxq->ddp_buffer_reuse = counter_u64_alloc(M_WAITOK); ofld_rxq->ddp_buffer_free = counter_u64_alloc(M_WAITOK); @@ -4207,6 +4226,16 @@ free_ofld_rxq(struct vi_info *vi, struct sge_ofld_rxq *ofld_rxq) MPASS(!(ofld_rxq->iq.flags & IQ_SW_ALLOCATED)); counter_u64_free(ofld_rxq->rx_iscsi_ddp_setup_ok); counter_u64_free(ofld_rxq->rx_iscsi_ddp_setup_error); + counter_u64_free(ofld_rxq->rx_nvme_ddp_setup_ok); + counter_u64_free(ofld_rxq->rx_nvme_ddp_setup_no_stag); + counter_u64_free(ofld_rxq->rx_nvme_ddp_setup_error); + counter_u64_free(ofld_rxq->rx_nvme_ddp_octets); + counter_u64_free(ofld_rxq->rx_nvme_ddp_pdus); + counter_u64_free(ofld_rxq->rx_nvme_fl_octets); + counter_u64_free(ofld_rxq->rx_nvme_fl_pdus); + counter_u64_free(ofld_rxq->rx_nvme_invalid_headers); + counter_u64_free(ofld_rxq->rx_nvme_header_digest_errors); + counter_u64_free(ofld_rxq->rx_nvme_data_digest_errors); counter_u64_free(ofld_rxq->ddp_buffer_alloc); counter_u64_free(ofld_rxq->ddp_buffer_reuse); counter_u64_free(ofld_rxq->ddp_buffer_free); @@ -4218,12 +4247,12 @@ static void add_ofld_rxq_sysctls(struct sysctl_ctx_list *ctx, struct sysctl_oid *oid, struct sge_ofld_rxq *ofld_rxq) { - struct sysctl_oid_list *children; + struct sysctl_oid_list *children, *top; if (ctx == NULL || oid == NULL) return; - children = SYSCTL_CHILDREN(oid); + top = children = SYSCTL_CHILDREN(oid); SYSCTL_ADD_U64(ctx, children, OID_AUTO, "rx_aio_ddp_jobs", CTLFLAG_RD, &ofld_rxq->rx_aio_ddp_jobs, 0, "# of aio_read(2) jobs completed via DDP"); @@ -4280,6 +4309,41 @@ add_ofld_rxq_sysctls(struct sysctl_ctx_list *ctx, struct sysctl_oid *oid, SYSCTL_ADD_U64(ctx, children, OID_AUTO, "data_digest_errors", CTLFLAG_RD, &ofld_rxq->rx_iscsi_data_digest_errors, 0, "# of PDUs with invalid data digests"); + + oid = SYSCTL_ADD_NODE(ctx, top, OID_AUTO, "nvme", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "TOE NVMe statistics"); + children = SYSCTL_CHILDREN(oid); + + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "ddp_setup_ok", + CTLFLAG_RD, &ofld_rxq->rx_nvme_ddp_setup_ok, + "# of times DDP buffer was setup successfully"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "ddp_setup_no_stag", + CTLFLAG_RD, &ofld_rxq->rx_nvme_ddp_setup_no_stag, + "# of times STAG was not available for DDP buffer setup"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "ddp_setup_error", + CTLFLAG_RD, &ofld_rxq->rx_nvme_ddp_setup_error, + "# of times DDP buffer setup failed"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "ddp_octets", + CTLFLAG_RD, &ofld_rxq->rx_nvme_ddp_octets, + "# of octets placed directly"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "ddp_pdus", + CTLFLAG_RD, &ofld_rxq->rx_nvme_ddp_pdus, + "# of PDUs with data placed directly"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "fl_octets", + CTLFLAG_RD, &ofld_rxq->rx_nvme_fl_octets, + "# of data octets delivered in freelist"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "fl_pdus", + CTLFLAG_RD, &ofld_rxq->rx_nvme_fl_pdus, + "# of PDUs with data delivered in freelist"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "invalid_headers", + CTLFLAG_RD, &ofld_rxq->rx_nvme_invalid_headers, + "# of PDUs with invalid header field"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "header_digest_errors", + CTLFLAG_RD, &ofld_rxq->rx_nvme_header_digest_errors, + "# of PDUs with invalid header digests"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "data_digest_errors", + CTLFLAG_RD, &ofld_rxq->rx_nvme_data_digest_errors, + "# of PDUs with invalid data digests"); } #endif From nobody Mon Nov 10 15:51:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vKX6fd7z6Gt9N; Mon, 10 Nov 2025 15:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vKX3vMCz43xF; Mon, 10 Nov 2025 15:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DF3ACX4KoVtHMWOTCc8wsmS5VGBmqvx4zH/w10NOl98=; b=y0RsJp1+8cwLYkH6csMMir+MzHN42m1lyTLdhVs6BLeo+ljjKsTXV9Ve1wDr9s+HsKFa0H 3hnCuAc8Hz6Gz2fDFSUbqprwXOmgVxGfkLPwZCkcVWBELDVxyUl75BEc0haZf5kEYME774 WHq7zyIYzMFChqm3ZS9vg9aWu8EiveeeUhKMZN9fbKjBIrYtfO+ys2/O9R6hxIw088Ssx/ VvjEFdwss3Kmrwho7ff5oVkFBsc/PHsNllIzcypPzQR16EBWp3cB9WiFufVP70YuC3noWb DNZNkHKXg4Gdf95M3DoT9Lw0G+tYIJmPPQQpl1RUjvrQ7ghEkKETSaujtbeZlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DF3ACX4KoVtHMWOTCc8wsmS5VGBmqvx4zH/w10NOl98=; b=jU9s2weCLE1fra2cn6/t45I0cfLM23SCJ4XL+d0iqwNb/UME7aMj5X4kEi8a/JPStWGDoh x8XM/OwldVDIpx5LsVMvJFBPS5AcNiBI525l3RriKy8xOdAp9LIN3WE96GRBGM9OpO2L/v HfwMHmo9dYOgGvQs3b1b+cU/nDvov3gHdIuLYgRzXec/qhDCcscatAGRxFLXhNHBdmy+0f 3ZYk+2S5+DDyJ6bEQksB9cjqjW7uErhQiii3sM1IlitmcxDyKsEg1UiVb9Y2qd9SjIwvsx XlSvZ3qbjYDyKDrsrjJW62gqqLSxnCbElZji8m3VVpvteh09m0JuSNNmwdPvtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789888; a=rsa-sha256; cv=none; b=cvUmxH6Y0MvRwFl/3wPQITZBT7IsHE1PEs17OoY0gZTbTCs+i4TxpC2vORAcYy+3rULgPo 5n6Ck3EUSA3H6z6GpHHUYJgpWv7bIxCmECA/RFlIMU79jrHOZc216K1queQoRM6aJWC0v5 h/bWRIhfVlDeMcKd9Yp46moRgVM7Pj70EmvxMYAsD8hBmheeqJgWEZC39g0WB99k3nWHuy 8XaTGasyCNogItMn9SJ3M6jRVp7VguuBFD70k5elEsBK8vCYzka9yqPQwb6gL33GXE0684 qGYYNYNS/lTWKWXnuPKinw1Y6xOnIXYWtB1jCSu/piYI1D3vmknEOYH888XSTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vKX3Mknz87m; Mon, 10 Nov 2025 15:51: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 5AAFpSUX048188; Mon, 10 Nov 2025 15:51:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFpSw6048185; Mon, 10 Nov 2025 15:51:28 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:51:28 GMT Message-Id: <202511101551.5AAFpSw6048185@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: fd3581e4ddde - main - cxgbe tom: Add support for sending NVMe/TCP PDUs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: fd3581e4ddde4166d6ba6ce264a63833ded35483 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fd3581e4ddde4166d6ba6ce264a63833ded35483 commit fd3581e4ddde4166d6ba6ce264a63833ded35483 Author: John Baldwin AuthorDate: 2025-11-10 15:50:48 +0000 Commit: John Baldwin CommitDate: 2025-11-10 15:50:48 +0000 cxgbe tom: Add support for sending NVMe/TCP PDUs These work requests are largely similar to the same work requests for iSCSI offload but use a newer tx_data work request structure. This includes initial support for ISO where a large C2H_DATA or H2C_DATA PDU is split into multiple PDUs on the wire. Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 3 + sys/dev/cxgbe/t4_main.c | 3 + sys/dev/cxgbe/t4_sge.c | 15 ++ sys/dev/cxgbe/tom/t4_cpl_io.c | 344 ++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 356 insertions(+), 9 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 55f09fefb7e3..57618b1ceb15 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -795,6 +795,9 @@ struct sge_ofld_txq { counter_u64_t tx_iscsi_pdus; counter_u64_t tx_iscsi_octets; counter_u64_t tx_iscsi_iso_wrs; + counter_u64_t tx_nvme_pdus; + counter_u64_t tx_nvme_octets; + counter_u64_t tx_nvme_iso_wrs; counter_u64_t tx_aio_jobs; counter_u64_t tx_aio_octets; counter_u64_t tx_toe_tls_records; diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 4d9c94789a37..2f6eb6062c20 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -12987,6 +12987,9 @@ clear_stats(struct adapter *sc, u_int port_id) counter_u64_zero(ofld_txq->tx_iscsi_pdus); counter_u64_zero(ofld_txq->tx_iscsi_octets); counter_u64_zero(ofld_txq->tx_iscsi_iso_wrs); + counter_u64_zero(ofld_txq->tx_nvme_pdus); + counter_u64_zero(ofld_txq->tx_nvme_octets); + counter_u64_zero(ofld_txq->tx_nvme_iso_wrs); counter_u64_zero(ofld_txq->tx_aio_jobs); counter_u64_zero(ofld_txq->tx_aio_octets); counter_u64_zero(ofld_txq->tx_toe_tls_records); diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 2f9cb1a4ebb5..8cd5b0543d8a 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -4957,6 +4957,9 @@ alloc_ofld_txq(struct vi_info *vi, struct sge_ofld_txq *ofld_txq, int idx) ofld_txq->tx_iscsi_pdus = counter_u64_alloc(M_WAITOK); ofld_txq->tx_iscsi_octets = counter_u64_alloc(M_WAITOK); ofld_txq->tx_iscsi_iso_wrs = counter_u64_alloc(M_WAITOK); + ofld_txq->tx_nvme_pdus = counter_u64_alloc(M_WAITOK); + ofld_txq->tx_nvme_octets = counter_u64_alloc(M_WAITOK); + ofld_txq->tx_nvme_iso_wrs = counter_u64_alloc(M_WAITOK); ofld_txq->tx_aio_jobs = counter_u64_alloc(M_WAITOK); ofld_txq->tx_aio_octets = counter_u64_alloc(M_WAITOK); ofld_txq->tx_toe_tls_records = counter_u64_alloc(M_WAITOK); @@ -5000,6 +5003,9 @@ free_ofld_txq(struct vi_info *vi, struct sge_ofld_txq *ofld_txq) counter_u64_free(ofld_txq->tx_iscsi_pdus); counter_u64_free(ofld_txq->tx_iscsi_octets); counter_u64_free(ofld_txq->tx_iscsi_iso_wrs); + counter_u64_free(ofld_txq->tx_nvme_pdus); + counter_u64_free(ofld_txq->tx_nvme_octets); + counter_u64_free(ofld_txq->tx_nvme_iso_wrs); counter_u64_free(ofld_txq->tx_aio_jobs); counter_u64_free(ofld_txq->tx_aio_octets); counter_u64_free(ofld_txq->tx_toe_tls_records); @@ -5029,6 +5035,15 @@ add_ofld_txq_sysctls(struct sysctl_ctx_list *ctx, struct sysctl_oid *oid, SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "tx_iscsi_iso_wrs", CTLFLAG_RD, &ofld_txq->tx_iscsi_iso_wrs, "# of iSCSI segmentation offload work requests"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "tx_nvme_pdus", + CTLFLAG_RD, &ofld_txq->tx_nvme_pdus, + "# of NVMe PDUs transmitted"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "tx_nvme_octets", + CTLFLAG_RD, &ofld_txq->tx_nvme_octets, + "# of payload octets in transmitted NVMe PDUs"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "tx_nvme_iso_wrs", + CTLFLAG_RD, &ofld_txq->tx_nvme_iso_wrs, + "# of NVMe segmentation offload work requests"); SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "tx_aio_jobs", CTLFLAG_RD, &ofld_txq->tx_aio_jobs, "# of zero-copy aio_write(2) jobs transmitted"); diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 84e31efa8b58..10f4f91f8db6 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -66,6 +66,7 @@ #include #include +#include #include "common/common.h" #include "common/t4_msg.h" @@ -495,6 +496,9 @@ t4_close_conn(struct adapter *sc, struct toepcb *toep) #define MIN_ISO_TX_CREDITS (howmany(sizeof(struct cpl_tx_data_iso), 16)) #define MIN_TX_CREDITS(iso) \ (MIN_OFLD_TX_CREDITS + ((iso) ? MIN_ISO_TX_CREDITS : 0)) +#define MIN_OFLD_TX_V2_CREDITS (howmany(sizeof(struct fw_ofld_tx_data_v2_wr) + 1, 16)) +#define MIN_TX_V2_CREDITS(iso) \ + (MIN_OFLD_TX_V2_CREDITS + ((iso) ? MIN_ISO_TX_CREDITS : 0)) _Static_assert(MAX_OFLD_TX_CREDITS <= MAX_OFLD_TX_SDESC_CREDITS, "MAX_OFLD_TX_SDESC_CREDITS too small"); @@ -542,6 +546,46 @@ max_dsgl_nsegs(int tx_credits, int iso) return (nseg); } +/* Maximum amount of immediate data we could stuff in a WR */ +static inline int +max_imm_payload_v2(int tx_credits, int iso) +{ + const int iso_cpl_size = iso ? sizeof(struct cpl_tx_data_iso) : 0; + + KASSERT(tx_credits >= 0 && + tx_credits <= MAX_OFLD_TX_CREDITS, + ("%s: %d credits", __func__, tx_credits)); + + if (tx_credits < MIN_TX_V2_CREDITS(iso)) + return (0); + + return (tx_credits * 16 - sizeof(struct fw_ofld_tx_data_v2_wr) - + iso_cpl_size); +} + +/* Maximum number of SGL entries we could stuff in a WR */ +static inline int +max_dsgl_nsegs_v2(int tx_credits, int iso, int imm_payload) +{ + int nseg = 1; /* ulptx_sgl has room for 1, rest ulp_tx_sge_pair */ + int sge_pair_credits = tx_credits - MIN_TX_V2_CREDITS(iso); + + KASSERT(tx_credits >= 0 && + tx_credits <= MAX_OFLD_TX_CREDITS, + ("%s: %d credits", __func__, tx_credits)); + + if (tx_credits < MIN_TX_V2_CREDITS(iso) || + sge_pair_credits <= howmany(imm_payload, 16)) + return (0); + sge_pair_credits -= howmany(imm_payload, 16); + + nseg += 2 * (sge_pair_credits * 16 / 24); + if ((sge_pair_credits * 16) % 24 == 16) + nseg++; + + return (nseg); +} + static inline void write_tx_wr(void *dst, struct toepcb *toep, int fw_wr_opcode, unsigned int immdlen, unsigned int plen, uint8_t credits, int shove, @@ -569,6 +613,35 @@ write_tx_wr(void *dst, struct toepcb *toep, int fw_wr_opcode, } } +static inline void +write_tx_v2_wr(void *dst, struct toepcb *toep, int fw_wr_opcode, + unsigned int immdlen, unsigned int plen, uint8_t credits, int shove, + int ulp_submode) +{ + struct fw_ofld_tx_data_v2_wr *txwr = dst; + uint32_t flags; + + memset(txwr, 0, sizeof(*txwr)); + txwr->op_to_immdlen = htobe32(V_WR_OP(fw_wr_opcode) | + V_FW_WR_IMMDLEN(immdlen)); + txwr->flowid_len16 = htobe32(V_FW_WR_FLOWID(toep->tid) | + V_FW_WR_LEN16(credits)); + txwr->plen = htobe32(plen); + flags = V_TX_ULP_MODE(ULP_MODE_NVMET) | V_TX_ULP_SUBMODE(ulp_submode) | + V_TX_URG(0) | V_TX_SHOVE(shove); + + if (toep->params.tx_align > 0) { + if (plen < 2 * toep->params.emss) + flags |= F_FW_OFLD_TX_DATA_WR_LSODISABLE; + else + flags |= F_FW_OFLD_TX_DATA_WR_ALIGNPLD | + (toep->params.nagle == 0 ? 0 : + F_FW_OFLD_TX_DATA_WR_ALIGNPLDSHOVE); + } + + txwr->lsodisable_to_flags = htobe32(flags); +} + /* * Generate a DSGL from a starting mbuf. The total number of segments and the * maximum segments in any one mbuf are provided. @@ -982,8 +1055,8 @@ rqdrop_locked(struct mbufq *q, int plen) #define ULP_ISO G_TX_ULP_SUBMODE(F_FW_ISCSI_TX_DATA_WR_ULPSUBMODE_ISO) static void -write_tx_data_iso(void *dst, u_int ulp_submode, uint8_t flags, uint16_t mss, - int len, int npdu) +write_iscsi_tx_data_iso(void *dst, u_int ulp_submode, uint8_t flags, + uint16_t mss, int len, int npdu) { struct cpl_tx_data_iso *cpl; unsigned int burst_size; @@ -1147,7 +1220,7 @@ write_iscsi_mbuf_wr(struct toepcb *toep, struct mbuf *sndptr) adjusted_plen, credits, shove, ulp_submode | ULP_ISO); cpl_iso = (struct cpl_tx_data_iso *)(txwr + 1); MPASS(plen == sndptr->m_pkthdr.len); - write_tx_data_iso(cpl_iso, ulp_submode, + write_iscsi_tx_data_iso(cpl_iso, ulp_submode, mbuf_iscsi_iso_flags(sndptr), iso_mss, plen, npdu); p = cpl_iso + 1; } else { @@ -1183,21 +1256,269 @@ write_iscsi_mbuf_wr(struct toepcb *toep, struct mbuf *sndptr) return (wr); } +static void +write_nvme_tx_data_iso(void *dst, u_int ulp_submode, u_int iso_type, + uint16_t mss, int len, int npdu, int pdo) +{ + struct cpl_t7_tx_data_iso *cpl; + unsigned int burst_size; + + /* + * TODO: Need to figure out how the LAST_PDU and SUCCESS flags + * are handled. + * + * - Does len need padding bytes? (If so, does padding need + * to be in DSGL input?) + * + * - burst always 0? + */ + burst_size = 0; + + cpl = (struct cpl_t7_tx_data_iso *)dst; + cpl->op_to_scsi = htonl(V_CPL_T7_TX_DATA_ISO_OPCODE(CPL_TX_DATA_ISO) | + V_CPL_T7_TX_DATA_ISO_FIRST(1) | + V_CPL_T7_TX_DATA_ISO_LAST(1) | + V_CPL_T7_TX_DATA_ISO_CPLHDRLEN(0) | + V_CPL_T7_TX_DATA_ISO_HDRCRC(!!(ulp_submode & ULP_CRC_HEADER)) | + V_CPL_T7_TX_DATA_ISO_PLDCRC(!!(ulp_submode & ULP_CRC_DATA)) | + V_CPL_T7_TX_DATA_ISO_IMMEDIATE(0) | + V_CPL_T7_TX_DATA_ISO_SCSI(iso_type)); + + cpl->nvme_tcp_pkd = F_CPL_T7_TX_DATA_ISO_NVME_TCP; + cpl->ahs = 0; + cpl->mpdu = htons(DIV_ROUND_UP(mss, 4)); + cpl->burst = htonl(DIV_ROUND_UP(burst_size, 4)); + cpl->size = htonl(len); + cpl->num_pi_bytes_seglen_offset = htonl(0); + cpl->datasn_offset = htonl(0); + cpl->buffer_offset = htonl(0); + cpl->reserved3 = pdo; +} + +static struct wrqe * +write_nvme_mbuf_wr(struct toepcb *toep, struct mbuf *sndptr) +{ + struct mbuf *m; + const struct nvme_tcp_common_pdu_hdr *hdr; + struct fw_v2_nvmet_tx_data_wr *txwr; + struct cpl_tx_data_iso *cpl_iso; + void *p; + struct wrqe *wr; + u_int plen, nsegs, credits, max_imm, max_nsegs, max_nsegs_1mbuf; + u_int adjusted_plen, imm_data, ulp_submode; + struct inpcb *inp = toep->inp; + struct tcpcb *tp = intotcpcb(inp); + int tx_credits, shove, npdu, wr_len; + uint16_t iso_mss; + bool iso, nomap_mbuf_seen; + + M_ASSERTPKTHDR(sndptr); + + tx_credits = min(toep->tx_credits, MAX_OFLD_TX_CREDITS); + if (mbuf_raw_wr(sndptr)) { + plen = sndptr->m_pkthdr.len; + KASSERT(plen <= SGE_MAX_WR_LEN, + ("raw WR len %u is greater than max WR len", plen)); + if (plen > tx_credits * 16) + return (NULL); + + wr = alloc_wrqe(roundup2(plen, 16), &toep->ofld_txq->wrq); + if (__predict_false(wr == NULL)) + return (NULL); + + m_copydata(sndptr, 0, plen, wrtod(wr)); + return (wr); + } + + /* + * The first mbuf is the PDU header that is always sent as + * immediate data. + */ + imm_data = sndptr->m_len; + + iso = mbuf_iscsi_iso(sndptr); + max_imm = max_imm_payload_v2(tx_credits, iso); + + /* + * Not enough credits for the PDU header. + */ + if (imm_data > max_imm) + return (NULL); + + max_nsegs = max_dsgl_nsegs_v2(tx_credits, iso, imm_data); + iso_mss = mbuf_iscsi_iso_mss(sndptr); + + plen = imm_data; + nsegs = 0; + max_nsegs_1mbuf = 0; /* max # of SGL segments in any one mbuf */ + nomap_mbuf_seen = false; + for (m = sndptr->m_next; m != NULL; m = m->m_next) { + int n; + + if (m->m_flags & M_EXTPG) + n = sglist_count_mbuf_epg(m, mtod(m, vm_offset_t), + m->m_len); + else + n = sglist_count(mtod(m, void *), m->m_len); + + nsegs += n; + plen += m->m_len; + + /* + * This mbuf would send us _over_ the nsegs limit. + * Suspend tx because the PDU can't be sent out. + */ + if ((nomap_mbuf_seen || plen > max_imm) && nsegs > max_nsegs) + return (NULL); + + if (m->m_flags & M_EXTPG) + nomap_mbuf_seen = true; + if (max_nsegs_1mbuf < n) + max_nsegs_1mbuf = n; + } + + if (__predict_false(toep->flags & TPF_FIN_SENT)) + panic("%s: excess tx.", __func__); + + /* + * We have a PDU to send. All of it goes out in one WR so 'm' + * is NULL. A PDU's length is always a multiple of 4. + */ + MPASS(m == NULL); + MPASS((plen & 3) == 0); + MPASS(sndptr->m_pkthdr.len == plen); + + shove = !(tp->t_flags & TF_MORETOCOME); + + /* + * plen doesn't include header digests, padding, and data + * digests which are generated and inserted in the right + * places by the TOE, but they do occupy TCP sequence space + * and need to be accounted for. + * + * To determine the overhead, check the PDU header in sndptr. + * Note that only certain PDU types can use digests and + * padding, and PDO accounts for all but the data digests for + * those PDUs. + */ + MPASS((sndptr->m_flags & M_EXTPG) == 0); + ulp_submode = mbuf_ulp_submode(sndptr); + hdr = mtod(sndptr, const void *); + switch (hdr->pdu_type) { + case NVME_TCP_PDU_TYPE_H2C_TERM_REQ: + case NVME_TCP_PDU_TYPE_C2H_TERM_REQ: + MPASS(ulp_submode == 0); + MPASS(!iso); + break; + case NVME_TCP_PDU_TYPE_CAPSULE_RESP: + case NVME_TCP_PDU_TYPE_R2T: + MPASS((ulp_submode & ULP_CRC_DATA) == 0); + /* FALLTHROUGH */ + case NVME_TCP_PDU_TYPE_CAPSULE_CMD: + MPASS(!iso); + break; + case NVME_TCP_PDU_TYPE_H2C_DATA: + case NVME_TCP_PDU_TYPE_C2H_DATA: + if (le32toh(hdr->plen) + ((ulp_submode & ULP_CRC_DATA) != 0 ? + sizeof(uint32_t) : 0) == plen) + MPASS(!iso); + break; + default: + __assert_unreachable(); + } + + if (iso) { + npdu = howmany(plen - hdr->hlen, iso_mss); + adjusted_plen = hdr->pdo * npdu + (plen - hdr->hlen); + if ((ulp_submode & ULP_CRC_DATA) != 0) + adjusted_plen += npdu * sizeof(uint32_t); + } else { + npdu = 1; + adjusted_plen = le32toh(hdr->plen); + } + wr_len = sizeof(*txwr); + if (iso) + wr_len += sizeof(struct cpl_tx_data_iso); + if (plen <= max_imm && !nomap_mbuf_seen) { + /* Immediate data tx for full PDU */ + imm_data = plen; + wr_len += plen; + nsegs = 0; + } else { + /* DSGL tx for PDU data */ + wr_len += roundup2(imm_data, 16); + wr_len += sizeof(struct ulptx_sgl) + + ((3 * (nsegs - 1)) / 2 + ((nsegs - 1) & 1)) * 8; + } + + wr = alloc_wrqe(roundup2(wr_len, 16), &toep->ofld_txq->wrq); + if (wr == NULL) { + /* XXX: how will we recover from this? */ + return (NULL); + } + txwr = wrtod(wr); + credits = howmany(wr->wr_len, 16); + + if (iso) { + write_tx_v2_wr(txwr, toep, FW_V2_NVMET_TX_DATA_WR, + imm_data + sizeof(struct cpl_tx_data_iso), + adjusted_plen, credits, shove, ulp_submode | ULP_ISO); + cpl_iso = (struct cpl_tx_data_iso *)(txwr + 1); + MPASS(plen == sndptr->m_pkthdr.len); + write_nvme_tx_data_iso(cpl_iso, ulp_submode, + (hdr->pdu_type & 0x1) == 0 ? 1 : 2, iso_mss, plen, npdu, + hdr->pdo); + p = cpl_iso + 1; + } else { + write_tx_v2_wr(txwr, toep, FW_V2_NVMET_TX_DATA_WR, imm_data, + adjusted_plen, credits, shove, ulp_submode); + p = txwr + 1; + } + + /* PDU header (and immediate data payload). */ + m_copydata(sndptr, 0, imm_data, p); + if (nsegs != 0) { + p = roundup2((char *)p + imm_data, 16); + write_tx_sgl(p, sndptr->m_next, NULL, nsegs, max_nsegs_1mbuf); + if (wr_len & 0xf) { + uint64_t *pad = (uint64_t *)((uintptr_t)txwr + wr_len); + *pad = 0; + } + } + + KASSERT(toep->tx_credits >= credits, + ("%s: not enough credits: credits %u " + "toep->tx_credits %u tx_credits %u nsegs %u " + "max_nsegs %u iso %d", __func__, credits, + toep->tx_credits, tx_credits, nsegs, max_nsegs, iso)); + + tp->snd_nxt += adjusted_plen; + tp->snd_max += adjusted_plen; + + counter_u64_add(toep->ofld_txq->tx_nvme_pdus, npdu); + counter_u64_add(toep->ofld_txq->tx_nvme_octets, plen); + if (iso) + counter_u64_add(toep->ofld_txq->tx_nvme_iso_wrs, 1); + + return (wr); +} + void t4_push_pdus(struct adapter *sc, struct toepcb *toep, int drop) { struct mbuf *sndptr, *m; struct fw_wr_hdr *wrhdr; struct wrqe *wr; - u_int plen, credits; + u_int plen, credits, mode; struct inpcb *inp = toep->inp; struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; struct mbufq *pduq = &toep->ulp_pduq; INP_WLOCK_ASSERT(inp); + mode = ulp_mode(toep); KASSERT(toep->flags & TPF_FLOWC_WR_SENT, ("%s: flowc_wr not sent for tid %u.", __func__, toep->tid)); - KASSERT(ulp_mode(toep) == ULP_MODE_ISCSI, + KASSERT(mode == ULP_MODE_ISCSI || mode == ULP_MODE_NVMET, ("%s: ulp_mode %u for toep %p", __func__, ulp_mode(toep), toep)); if (__predict_false(toep->flags & TPF_ABORT_SHUTDOWN)) @@ -1230,7 +1551,7 @@ t4_push_pdus(struct adapter *sc, struct toepcb *toep, int drop) if (sbu > 0) { /* * The data transmitted before the - * tid's ULP mode changed to ISCSI is + * tid's ULP mode changed to ISCSI/NVMET is * still in so_snd. Incoming credits * should account for so_snd first. */ @@ -1243,7 +1564,10 @@ t4_push_pdus(struct adapter *sc, struct toepcb *toep, int drop) } while ((sndptr = mbufq_first(pduq)) != NULL) { - wr = write_iscsi_mbuf_wr(toep, sndptr); + if (mode == ULP_MODE_ISCSI) + wr = write_iscsi_mbuf_wr(toep, sndptr); + else + wr = write_nvme_mbuf_wr(toep, sndptr); if (wr == NULL) { toep->flags |= TPF_TX_SUSPENDED; return; @@ -1302,7 +1626,8 @@ static inline void t4_push_data(struct adapter *sc, struct toepcb *toep, int drop) { - if (ulp_mode(toep) == ULP_MODE_ISCSI) + if (ulp_mode(toep) == ULP_MODE_ISCSI || + ulp_mode(toep) == ULP_MODE_NVMET) t4_push_pdus(sc, toep, drop); else if (toep->flags & TPF_KTLS) t4_push_ktls(sc, toep, drop); @@ -2008,7 +2333,8 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) SOCKBUF_LOCK(sb); sbu = sbused(sb); - if (ulp_mode(toep) == ULP_MODE_ISCSI) { + if (ulp_mode(toep) == ULP_MODE_ISCSI || + ulp_mode(toep) == ULP_MODE_NVMET) { if (__predict_false(sbu > 0)) { /* * The data transmitted before the From nobody Mon Nov 10 15:51:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vKb30RHz6GtCr; Mon, 10 Nov 2025 15:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vKZ5r6lz449t; Mon, 10 Nov 2025 15:51:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Kk0gR5OXFn2MFCJ36euZTv+tpj0FPcgj6XDMhhU6ls=; b=UsCnIKlvZGtFAFN9HRjQzCbD6sIOgG9AvEjTO5eBACEMWTj4mSswg2HvSrp3v0yiHwQ/uF KpxMSNzLUQ9oaJ9mcpjwQVyXzLtShcSeHA8g78OpI2LPevAMmadgtcCVfSGQ35Q2Y1CdaR 6XNERu5ZfyOqM2EU1TBkjPqbun9TXdpsE9vEZvULbA+F+8unZnaEWN0x1gSDoT9gbrgafe kyYw7bPFEOFGW9ktJ6An2zknxUNj7xmy2PYLQ/OOFrxPT60OdhWeybM+bGKzqKcSJkn/47 orqpdceR8AX/TGR1uREwH20GnIMxur3T7klnh2wi1LKFAbXPogff7FaOzkXl/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Kk0gR5OXFn2MFCJ36euZTv+tpj0FPcgj6XDMhhU6ls=; b=swJscN3v2TAm5sSQfbzr2cyrNlM34gmMQaHkrPm2t0mIAe28BylEfglpf2LucLg5xGaHf3 a5Y1zFnycH/PzX3qpLbBvlkviIayP6lAkUgvwCIwJPNjZDOlOveXZXlzVpYx0gqyOCiOwk +CPBxgrB62b8/aorSaIXHi7cFIIDwSVG2tJ6m63Wfk/DHbn2id131BvqPqt618ZJ6l4NtH AxsoULenSw2ZIqDeKB9kcqkTnfPIXgfWv3rWP+m66ckQN6Un1LeK3H1FiS4UN/UAgg0955 G5MJAqq7pGpxL6BUBfxYur6UEX4HuK5GwaXfTOmsi0cXL2Vo1pfgSmbpYlvigg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789890; a=rsa-sha256; cv=none; b=AZmEqe2SO4c2fw6PUzACdaA8H1H3yxVc94UKeslz/pmuZaP0Spu3JnyUqVRsXDcftSSEAS XS3YVlVHbFPKF4JHPvo6qpCDuTbMgyTeVsYNEtc3fFpf9T3YXdSaXHctpISPTjcUygyGze 9ssXQqPloTfNaaDbEJ3ewqwS7NLe+Dw3f9OCcjRjPXrhj2rLQXRMkLa3GtlpwxkSeu22/a WhscCxhDhVw1JVNOzP4pQD/Xk6howOHdUc7jBCDFZtX2WS89Oz32kpchHao7h375wW0Elp 9K9TmsvubqOo4Iu9baf1+2/AAPSqJkmmmZ3IF/kFmOtsE9+UB9BgYcUv16/fBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vKZ5LXCz8YN; Mon, 10 Nov 2025 15:51: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 5AAFpUVB048260; Mon, 10 Nov 2025 15:51:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFpUHW048257; Mon, 10 Nov 2025 15:51:30 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:51:30 GMT Message-Id: <202511101551.5AAFpUHW048257@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: fca740e2d210 - main - cxgbe tom: Don't require exact match for TCP seqno for FIN for NVMe offload List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: fca740e2d21008faec0d81426259470b452704e6 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fca740e2d21008faec0d81426259470b452704e6 commit fca740e2d21008faec0d81426259470b452704e6 Author: John Baldwin AuthorDate: 2025-11-10 15:50:48 +0000 Commit: John Baldwin CommitDate: 2025-11-10 15:50:48 +0000 cxgbe tom: Don't require exact match for TCP seqno for FIN for NVMe offload Similar to iSCSI on T6+, additional DDP data might have been received without a completion posted if a connection was closed in the middle of a transfer. Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_cpl_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 10f4f91f8db6..4f0dbb07061b 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -1787,7 +1787,8 @@ do_peer_close(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) socantrcvmore(so); if (ulp_mode(toep) == ULP_MODE_RDMA || - (ulp_mode(toep) == ULP_MODE_ISCSI && chip_id(sc) >= CHELSIO_T6)) { + (ulp_mode(toep) == ULP_MODE_ISCSI && chip_id(sc) >= CHELSIO_T6) || + ulp_mode(toep) == ULP_MODE_NVMET) { /* * There might be data received via DDP before the FIN * not reported to the driver. Just assume the From nobody Mon Nov 10 15:51:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vKc2JbRz6GtP5; Mon, 10 Nov 2025 15:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vKb6gGBz44KP; Mon, 10 Nov 2025 15:51:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RE8Auugz718RF+1cD7/9Mby6J9cI9lOnKgk6L9KpX+k=; b=o6csMDxVg/BQJuIOyyGC39ML5HHa6u6Ugh2/R6JgAgJsAEdaAAJQe9a/+c6yvu0vexCdRw eUyN11Ilb0hR/0jKfZtDRaITgsMtP8t/ZqUTpU8SZHWAuE71gN7TXmdGYlSdceLAoBCFvo 24zUUl0wZCdUTtHIWDxTnhts8iMYRw3ZklBFB9ZN51HEvW+NLPHVjo/CvsGp+c+pFl3fJz 147+zcw1C71wC49+hbYUlE2RCg4x6CQY0TvpNhX/zyvq1/SZFXoA1dqZoJU8BTxxFf4Zxz fOWv/lx22Fj4Ka/XDusmqhejXsFtEXHRH6pDhBcN0Z/t9dulfLrrwAgCbx8g0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762789891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RE8Auugz718RF+1cD7/9Mby6J9cI9lOnKgk6L9KpX+k=; b=DAYrs98VNdqreia9FJuvISa3tpWo1Ao8XeuqZOk14Gx9F3ugsALQG5c5rStUgfLQIXBC2Y KZ/YvT31W6JpVKT2XB3jTgBeeb0uk3XHt1GerYtzWiu/Rzvz9vFGBPc2sGOZR+IyCOTBqQ gqoAGFdWMGVr5R81Hq9CHKU6DMubr056QiEvy/16tusOxuvcffz9fiV9/j/L3N4tPMjTbP DcOGJ4lY41yjDr7RHLmqY49QkJYEiFpZ+c8i0ta20R5Kky+nlVg7ZBwSMr+i3lMBScnBUa qAETEv7X1g61V+5i2OA8S9ddG+heBGl3cN6t8c8jBhVHHrOVSGA+UfZRy8HKTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762789891; a=rsa-sha256; cv=none; b=sLpdW0HWdCBn3y+v6cbuyX1/utnHvh7+qEGYevibDLeUJ8dz6YwAzvczG8rMhihrd8A8+v ew2UhTbiZV3gboosLp8X08mcpqH1c3iSGLqq50ymKCDLp9qgI3vUoqzzM9/8KvUjXpCu+K 7LcsvkPvYLdFlBmQlCXovwDbWxK1l1qP9PtySl0AVxzTKmO1C6nn2jHi7A9IQE4qPX5dVW sX1YoYGO75K5D48Uw6MXc4yUhSaz+ccVzmYPjXAIeqJRFHzdNInVqzeFVTbyBDHzGPp6A3 RX8qCTZYBoaiBjlT0uUSed+hYrud1PpB2GA1lucWzEqtNztC9YjxRwRCfDzMag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vKb630Mz8mJ; Mon, 10 Nov 2025 15:51: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 5AAFpVO3048294; Mon, 10 Nov 2025 15:51:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFpVQN048291; Mon, 10 Nov 2025 15:51:31 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:51:31 GMT Message-Id: <202511101551.5AAFpVQN048291@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: ec0cd287f55f - main - nvmf_che: NVMe-TCP offload support for Chelsio T7 adapters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: ec0cd287f55f7ea93ff4ccfa4de0f70eca5fef75 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ec0cd287f55f7ea93ff4ccfa4de0f70eca5fef75 commit ec0cd287f55f7ea93ff4ccfa4de0f70eca5fef75 Author: John Baldwin AuthorDate: 2025-11-10 15:50:48 +0000 Commit: John Baldwin CommitDate: 2025-11-10 15:50:48 +0000 nvmf_che: NVMe-TCP offload support for Chelsio T7 adapters This provides an alternative NVMe over TCP transport which uses PDU offload for TOE connections on a T7. Similar to iSCSI offload via cxgbei.ko, nvmf_che uses DDP when possible to enable the NIC to DMA received data directly into I/O data buffers (pages from a struct bio on the host side, pages from a CTL I/O requests on the controller side) to avoid copying data on the host CPU. nvmf_che is also able to receive a stream of C2H or H2C PDUs for a single data transfer when using DDP without processing the header of each PDU. Unlike cxgbei, nvmf_che aims to be mostly transparent to end users. Notably, neither nvmecontrol or ctld have to be explicitly asked to use an offload. Instead, TCP queue pairs are claimed by this driver whenever they are eligible (e.g., using TOE). The main restriction of nvmf_che compared to the software TCP transport is that Chelsio adapters have a restriction on the largest PDU that can be sent and received. When sending data, nvmf_che is able to split large C2H or H2C data requests across multiple PDUs without affecting nvmf(4) or nvmft(4). To avoid overly large PDUs when using nvmf(4), nvmf_che reports a data transfer limit that is honored by nvmf(4). This ensures that the remote controller's PDUs will never be too large (since the command transfer size is limited to one PDU) and also ensures that nvmf(4) will never to try to send a command PDU with ICD that is too large. For nvmft(4), overly large command PDUs due to ICD are avoided by clamping the size of the reported IOCCSZ in the controller data. However, to ensure that H2C PDUs are sufficiently small, nvmf_che will only claim queue pairs which advertised a suitable MAXH2CDATA parameter during queue negotiation. For ctld(8), this can be achieved by setting the MAXH2CDATA option in a transport-group, e.g. for T7: transport-group tg0 { discovery-auth-group no-authentication listen tcp 0.0.0.0 listen tcp [::] listen discovery-tcp 0.0.0.0 listen discovery-tcp [::] option MAXH2CDATA 32488 } Sponsored by: Chelsio Communications --- sys/dev/cxgbe/nvmf/nvmf_che.c | 3330 +++++++++++++++++++++++++++++++++++ sys/modules/cxgbe/Makefile | 2 + sys/modules/cxgbe/nvmf_che/Makefile | 12 + 3 files changed, 3344 insertions(+) diff --git a/sys/dev/cxgbe/nvmf/nvmf_che.c b/sys/dev/cxgbe/nvmf/nvmf_che.c new file mode 100644 index 000000000000..88d59b5e75aa --- /dev/null +++ b/sys/dev/cxgbe/nvmf/nvmf_che.c @@ -0,0 +1,3330 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Chelsio Communications, Inc. + * Written by: John Baldwin + * + * 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 "opt_inet.h" + +#include +#include +#include +#include + +#ifdef TCP_OFFLOAD +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "common/common.h" +#include "common/t4_regs.h" +#include "common/t4_tcb.h" +#include "tom/t4_tom.h" + +/* Status code values in CPL_NVMT_CMP. */ +#define CMP_STATUS_ERROR_MASK 0x7f +#define CMP_STATUS_NO_ERROR 0 +#define CMP_STATUS_HEADER_DIGEST 1 +#define CMP_STATUS_DIRECTION_MISMATCH 2 +#define CMP_STATUS_DIGEST_FLAG_MISMATCH 3 +#define CMP_STATUS_SUCCESS_NOT_LAST 4 +#define CMP_STATUS_BAD_DATA_LENGTH 5 +#define CMP_STATUS_USER_MODE_UNALLOCATED 6 +#define CMP_STATUS_RQT_LIMIT 7 +#define CMP_STATUS_RQT_WRAP 8 +#define CMP_STATUS_RQT_BOUND 9 +#define CMP_STATUS_TPT_LIMIT 16 +#define CMP_STATUS_TPT_INVALID 17 +#define CMP_STATUS_TPT_COLOUR_MISMATCH 18 +#define CMP_STATUS_TPT_MISC 19 +#define CMP_STATUS_TPT_WRAP 20 +#define CMP_STATUS_TPT_BOUND 21 +#define CMP_STATUS_TPT_LAST_PDU_UNALIGNED 22 +#define CMP_STATUS_PBL_LIMIT 24 +#define CMP_STATUS_DATA_DIGEST 25 +#define CMP_STATUS_DDP 0x80 + +/* + * Transfer tags and CIDs with the MSB set are "unallocated" tags that + * pass data through to the freelist without using DDP. + */ +#define CHE_FL_TAG_MASK 0x8000 +#define CHE_MAX_FL_TAG 0x7fff +#define CHE_NUM_FL_TAGS (CHE_MAX_FL_TAG + 1) + +#define CHE_TAG_IS_FL(ttag) (((ttag) & CHE_FL_TAG_MASK) == CHE_FL_TAG_MASK) +#define CHE_RAW_FL_TAG(ttag) ((ttag) & ~CHE_FL_TAG_MASK) +#define CHE_DDP_TAG(stag_idx, color) ((stag_idx) << 4 | (color)) +#define CHE_STAG_COLOR(stag) ((stag) & 0xf) +#define CHE_STAG_IDX(stag) ((stag) >> 4) +#define CHE_DDP_MAX_COLOR 0xf + +#define CHE_DDP_NO_TAG 0xffff + +/* + * A bitmap of non-DDP CIDs in use on the host. Since there is no + * _BIT_FFC (find first clear), the bitset is inverted so that a clear + * bit indicates an in-use CID. + */ +BITSET_DEFINE(fl_cid_set, CHE_NUM_FL_TAGS); +#define FL_CID_INIT(p) __BIT_FILL(CHE_NUM_FL_TAGS, p) +#define FL_CID_BUSY(n, p) __BIT_CLR(CHE_NUM_FL_TAGS, n, p) +#define FL_CID_ISACTIVE(n, p) !__BIT_ISSET(CHE_NUM_FL_TAGS, n, p) +#define FL_CID_FREE(n, p) __BIT_SET(CHE_NUM_FL_TAGS, n, p) +#define FL_CID_FINDFREE_AT(p, start) __BIT_FFS_AT(CHE_NUM_FL_TAGS, p, start) + +/* + * The TCP sequence number of both CPL_NVMT_DATA and CPL_NVMT_CMP + * mbufs are saved here while the mbuf is in qp->rx_data and qp->rx_pdus. + */ +#define nvmf_tcp_seq PH_loc.thirtytwo[0] + +/* + * The CPL status of CPL_NVMT_CMP mbufs are saved here while the mbuf + * is in qp->rx_pdus. + */ +#define nvmf_cpl_status PH_loc.eight[4] + +struct nvmf_che_capsule; +struct nvmf_che_qpair; + +struct nvmf_che_adapter { + struct adapter *sc; + + u_int ddp_threshold; + u_int max_transmit_pdu; + u_int max_receive_pdu; + bool nvmt_data_iqe; + + struct sysctl_ctx_list ctx; /* from uld_activate to deactivate */ +}; + +struct nvmf_che_command_buffer { + struct nvmf_che_qpair *qp; + + struct nvmf_io_request io; + size_t data_len; + size_t data_xfered; + uint32_t data_offset; + + u_int refs; + int error; + + bool ddp_ok; + uint16_t cid; + uint16_t ttag; + uint16_t original_cid; /* Host only */ + + TAILQ_ENTRY(nvmf_che_command_buffer) link; + + /* Fields used for DDP. */ + struct fw_ri_tpte tpte; + uint64_t *pbl; + uint32_t pbl_addr; + uint32_t pbl_len; + + /* Controller only */ + struct nvmf_che_capsule *cc; +}; + +struct nvmf_che_command_buffer_list { + TAILQ_HEAD(, nvmf_che_command_buffer) head; + struct mtx lock; +}; + +struct nvmf_che_qpair { + struct nvmf_qpair qp; + + struct socket *so; + struct toepcb *toep; + struct nvmf_che_adapter *nca; + + volatile u_int refs; /* Every allocated capsule holds a reference */ + uint8_t txpda; + uint8_t rxpda; + bool header_digests; + bool data_digests; + uint32_t maxr2t; + uint32_t maxh2cdata; /* Controller only */ + uint32_t max_rx_data; + uint32_t max_tx_data; + uint32_t max_icd; /* Host only */ + uint32_t max_ioccsz; /* Controller only */ + union { + uint16_t next_fl_ttag; /* Controller only */ + uint16_t next_cid; /* Host only */ + }; + uint16_t next_ddp_tag; + u_int num_fl_ttags; /* Controller only */ + u_int active_fl_ttags; /* Controller only */ + u_int num_ddp_tags; + u_int active_ddp_tags; + bool send_success; /* Controller only */ + uint8_t ddp_color; + uint32_t tpt_offset; + + /* Receive state. */ + struct thread *rx_thread; + struct cv rx_cv; + bool rx_shutdown; + int rx_error; + struct mbufq rx_data; /* Data received via CPL_NVMT_DATA. */ + struct mbufq rx_pdus; /* PDU headers received via CPL_NVMT_CMP. */ + + /* Transmit state. */ + struct thread *tx_thread; + struct cv tx_cv; + bool tx_shutdown; + STAILQ_HEAD(, nvmf_che_capsule) tx_capsules; + + struct nvmf_che_command_buffer_list tx_buffers; + struct nvmf_che_command_buffer_list rx_buffers; + + /* + * For the controller, an RX command buffer can be in one of + * three locations, all protected by the rx_buffers.lock. If + * a receive request is waiting for either an R2T slot for its + * command (due to exceeding MAXR2T), or a transfer tag it is + * placed on the rx_buffers list. When a request is allocated + * an active transfer tag, it moves to either the + * open_ddp_tags[] or open_fl_ttags[] array (indexed by the + * tag) until it completes. + * + * For the host, an RX command buffer using DDP is in + * open_ddp_tags[], otherwise it is in rx_buffers. + */ + struct nvmf_che_command_buffer **open_ddp_tags; + struct nvmf_che_command_buffer **open_fl_ttags; /* Controller only */ + + /* + * For the host, CIDs submitted by nvmf(4) must be rewritten + * to either use DDP or not use DDP. The CID in response + * capsules must be restored to their original value. For + * DDP, the original CID is stored in the command buffer. + * These variables manage non-DDP CIDs. + */ + uint16_t *fl_cids; /* Host only */ + struct fl_cid_set *fl_cid_set; /* Host only */ + struct mtx fl_cid_lock; /* Host only */ +}; + +struct nvmf_che_rxpdu { + struct mbuf *m; + const struct nvme_tcp_common_pdu_hdr *hdr; + uint32_t data_len; + bool data_digest_mismatch; + bool ddp; +}; + +struct nvmf_che_capsule { + struct nvmf_capsule nc; + + volatile u_int refs; + + struct nvmf_che_rxpdu rx_pdu; + + uint32_t active_r2ts; /* Controller only */ +#ifdef INVARIANTS + uint32_t tx_data_offset; /* Controller only */ + u_int pending_r2ts; /* Controller only */ +#endif + + STAILQ_ENTRY(nvmf_che_capsule) link; +}; + +#define CCAP(nc) ((struct nvmf_che_capsule *)(nc)) +#define CQP(qp) ((struct nvmf_che_qpair *)(qp)) + +static void che_release_capsule(struct nvmf_che_capsule *cc); +static void che_free_qpair(struct nvmf_qpair *nq); + +SYSCTL_NODE(_kern_nvmf, OID_AUTO, che, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Chelsio TCP offload transport"); + +static u_int che_max_transmit_pdu = 32 * 1024; +SYSCTL_UINT(_kern_nvmf_che, OID_AUTO, max_transmit_pdu, CTLFLAG_RWTUN, + &che_max_transmit_pdu, 0, + "Maximum size of a transmitted PDU"); + +static u_int che_max_receive_pdu = 32 * 1024; +SYSCTL_UINT(_kern_nvmf_che, OID_AUTO, max_receive_pdu, CTLFLAG_RWTUN, + &che_max_receive_pdu, 0, + "Maximum size of a received PDU"); + +static int use_dsgl = 1; +SYSCTL_INT(_kern_nvmf_che, OID_AUTO, use_dsgl, CTLFLAG_RWTUN, &use_dsgl, 0, + "Use DSGL for PBL/FastReg (default=1)"); + +static int inline_threshold = 256; +SYSCTL_INT(_kern_nvmf_che, OID_AUTO, inline_threshold, CTLFLAG_RWTUN, + &inline_threshold, 0, + "inline vs dsgl threshold (default=256)"); + +static int ddp_tags_per_qp = 128; +SYSCTL_INT(_kern_nvmf_che, OID_AUTO, ddp_tags_per_qp, CTLFLAG_RWTUN, + &ddp_tags_per_qp, 0, + "Number of DDP tags to reserve for each queue pair"); + +static MALLOC_DEFINE(M_NVMF_CHE, "nvmf_che", "Chelsio NVMe-TCP offload"); + +/* + * PBL regions consist of N full-sized pages. TPT entries support an + * initial offset into the first page (FBO) and can handle a partial + * length on the last page. + */ +static bool +che_ddp_io_check(struct nvmf_che_qpair *qp, const struct nvmf_io_request *io) +{ + const struct memdesc *mem = &io->io_mem; + struct bus_dma_segment *ds; + int i; + + if (io->io_len < qp->nca->ddp_threshold) { + return (false); + } + + switch (mem->md_type) { + case MEMDESC_VADDR: + case MEMDESC_PADDR: + case MEMDESC_VMPAGES: + return (true); + case MEMDESC_VLIST: + case MEMDESC_PLIST: + /* + * Require all but the first segment to start on a + * page boundary. Require all but the last segment to + * end on a page boundary. + */ + ds = mem->u.md_list; + for (i = 0; i < mem->md_nseg; i++, ds++) { + if (i != 0 && ds->ds_addr % PAGE_SIZE != 0) + return (false); + if (i != mem->md_nseg - 1 && + (ds->ds_addr + ds->ds_len) % PAGE_SIZE != 0) + return (false); + } + return (true); + default: + /* + * Other types could be validated with more work, but + * they aren't used currently by nvmf(4) or nvmft(4). + */ + return (false); + } +} + +static u_int +che_fbo(struct nvmf_che_command_buffer *cb) +{ + struct memdesc *mem = &cb->io.io_mem; + + switch (mem->md_type) { + case MEMDESC_VADDR: + return ((uintptr_t)mem->u.md_vaddr & PAGE_MASK); + case MEMDESC_PADDR: + return (mem->u.md_paddr & PAGE_MASK); + case MEMDESC_VMPAGES: + return (mem->md_offset); + case MEMDESC_VLIST: + case MEMDESC_PLIST: + return (mem->u.md_list[0].ds_addr & PAGE_MASK); + default: + __assert_unreachable(); + } +} + +static u_int +che_npages(struct nvmf_che_command_buffer *cb) +{ + return (howmany(che_fbo(cb) + cb->io.io_len, PAGE_SIZE)); +} + +static struct nvmf_che_command_buffer * +che_alloc_command_buffer(struct nvmf_che_qpair *qp, + const struct nvmf_io_request *io, uint32_t data_offset, size_t data_len, + uint16_t cid) +{ + struct nvmf_che_command_buffer *cb; + + cb = malloc(sizeof(*cb), M_NVMF_CHE, M_WAITOK); + cb->qp = qp; + cb->io = *io; + cb->data_offset = data_offset; + cb->data_len = data_len; + cb->data_xfered = 0; + refcount_init(&cb->refs, 1); + cb->error = 0; + cb->ddp_ok = che_ddp_io_check(qp, io); + cb->cid = cid; + cb->ttag = 0; + cb->original_cid = 0; + cb->cc = NULL; + cb->pbl = NULL; + + return (cb); +} + +static void +che_hold_command_buffer(struct nvmf_che_command_buffer *cb) +{ + refcount_acquire(&cb->refs); +} + +static void +che_free_command_buffer(struct nvmf_che_command_buffer *cb) +{ + nvmf_complete_io_request(&cb->io, cb->data_xfered, cb->error); + if (cb->cc != NULL) + che_release_capsule(cb->cc); + MPASS(cb->pbl == NULL); + free(cb, M_NVMF_CHE); +} + +static void +che_release_command_buffer(struct nvmf_che_command_buffer *cb) +{ + if (refcount_release(&cb->refs)) + che_free_command_buffer(cb); +} + +static void +che_add_command_buffer(struct nvmf_che_command_buffer_list *list, + struct nvmf_che_command_buffer *cb) +{ + mtx_assert(&list->lock, MA_OWNED); + TAILQ_INSERT_HEAD(&list->head, cb, link); +} + +static struct nvmf_che_command_buffer * +che_find_command_buffer(struct nvmf_che_command_buffer_list *list, + uint16_t cid) +{ + struct nvmf_che_command_buffer *cb; + + mtx_assert(&list->lock, MA_OWNED); + TAILQ_FOREACH(cb, &list->head, link) { + if (cb->cid == cid) + return (cb); + } + return (NULL); +} + +static void +che_remove_command_buffer(struct nvmf_che_command_buffer_list *list, + struct nvmf_che_command_buffer *cb) +{ + mtx_assert(&list->lock, MA_OWNED); + TAILQ_REMOVE(&list->head, cb, link); +} + +static void +che_purge_command_buffer(struct nvmf_che_command_buffer_list *list, + uint16_t cid) +{ + struct nvmf_che_command_buffer *cb; + + mtx_lock(&list->lock); + cb = che_find_command_buffer(list, cid); + if (cb != NULL) { + che_remove_command_buffer(list, cb); + mtx_unlock(&list->lock); + che_release_command_buffer(cb); + } else + mtx_unlock(&list->lock); +} + +static int +che_write_mem_inline(struct adapter *sc, struct toepcb *toep, uint32_t addr, + uint32_t len, void *data, struct mbufq *wrq) +{ + struct mbuf *m; + char *cp; + int copy_len, i, num_wqe, wr_len; + +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, "%s: addr 0x%x len %u", __func__, addr << 5, len); +#endif + num_wqe = DIV_ROUND_UP(len, T4_MAX_INLINE_SIZE); + cp = data; + for (i = 0; i < num_wqe; i++) { + copy_len = min(len, T4_MAX_INLINE_SIZE); + wr_len = T4_WRITE_MEM_INLINE_LEN(copy_len); + + m = alloc_raw_wr_mbuf(wr_len); + if (m == NULL) + return (ENOMEM); + t4_write_mem_inline_wr(sc, mtod(m, void *), wr_len, toep->tid, + addr, copy_len, cp, 0); + if (cp != NULL) + cp += T4_MAX_INLINE_SIZE; + addr += T4_MAX_INLINE_SIZE >> 5; + len -= T4_MAX_INLINE_SIZE; + + mbufq_enqueue(wrq, m); + } + return (0); +} + +static int +che_write_mem_dma_aligned(struct adapter *sc, struct toepcb *toep, + uint32_t addr, uint32_t len, void *data, struct mbufq *wrq) +{ + struct mbuf *m; + vm_offset_t va; + u_int todo; + int wr_len; + + /* First page. */ + va = (vm_offset_t)data; + todo = min(PAGE_SIZE - (va % PAGE_SIZE), len); + wr_len = T4_WRITE_MEM_DMA_LEN; + m = alloc_raw_wr_mbuf(wr_len); + if (m == NULL) + return (ENOMEM); + t4_write_mem_dma_wr(sc, mtod(m, void *), wr_len, toep->tid, addr, + todo, pmap_kextract(va), 0); + mbufq_enqueue(wrq, m); + len -= todo; + addr += todo >> 5; + va += todo; + + while (len > 0) { + MPASS(va == trunc_page(va)); + todo = min(PAGE_SIZE, len); + m = alloc_raw_wr_mbuf(wr_len); + if (m == NULL) + return (ENOMEM); + t4_write_mem_dma_wr(sc, mtod(m, void *), wr_len, toep->tid, + addr, todo, pmap_kextract(va), 0); + mbufq_enqueue(wrq, m); + len -= todo; + addr += todo >> 5; + va += todo; + } + return (0); +} + +static int +che_write_adapter_mem(struct nvmf_che_qpair *qp, uint32_t addr, uint32_t len, + void *data) +{ + struct adapter *sc = qp->nca->sc; + struct toepcb *toep = qp->toep; + struct socket *so = qp->so; + struct inpcb *inp = sotoinpcb(so); + struct mbufq mq; + int error; + + mbufq_init(&mq, INT_MAX); + if (!use_dsgl || len < inline_threshold || data == NULL) + error = che_write_mem_inline(sc, toep, addr, len, data, &mq); + else + error = che_write_mem_dma_aligned(sc, toep, addr, len, data, + &mq); + if (__predict_false(error != 0)) + goto error; + + INP_WLOCK(inp); + if ((inp->inp_flags & INP_DROPPED) != 0) { + INP_WUNLOCK(inp); + error = ECONNRESET; + goto error; + } + mbufq_concat(&toep->ulp_pduq, &mq); + INP_WUNLOCK(inp); + return (0); + +error: + mbufq_drain(&mq); + return (error); +} + +static bool +che_alloc_pbl(struct nvmf_che_qpair *qp, struct nvmf_che_command_buffer *cb) +{ + struct adapter *sc = qp->nca->sc; + struct memdesc *mem = &cb->io.io_mem; + uint64_t *pbl; + uint32_t addr, len; + u_int i, npages; + int error; + + MPASS(cb->pbl == NULL); + MPASS(cb->ddp_ok); + + /* Hardware limit? iWARP only enforces this for T5. */ + if (cb->io.io_len >= (8 * 1024 * 1024 * 1024ULL)) + return (false); + + npages = che_npages(cb); + len = roundup2(npages, 4) * sizeof(*cb->pbl); + addr = t4_pblpool_alloc(sc, len); + if (addr == 0) + return (false); + + pbl = malloc(len, M_NVMF_CHE, M_NOWAIT | M_ZERO); + if (pbl == NULL) { + t4_pblpool_free(sc, addr, len); + return (false); + } + + switch (mem->md_type) { + case MEMDESC_VADDR: + { + vm_offset_t va; + + va = trunc_page((uintptr_t)mem->u.md_vaddr); + for (i = 0; i < npages; i++) + pbl[i] = htobe64(pmap_kextract(va + i * PAGE_SIZE)); + break; + } + case MEMDESC_PADDR: + { + vm_paddr_t pa; + + pa = trunc_page(mem->u.md_paddr); + for (i = 0; i < npages; i++) + pbl[i] = htobe64(pa + i * PAGE_SIZE); + break; + } + case MEMDESC_VMPAGES: + for (i = 0; i < npages; i++) + pbl[i] = htobe64(VM_PAGE_TO_PHYS(mem->u.md_ma[i])); + break; + case MEMDESC_VLIST: + { + struct bus_dma_segment *ds; + vm_offset_t va; + vm_size_t len; + u_int j, k; + + i = 0; + ds = mem->u.md_list; + for (j = 0; j < mem->md_nseg; j++, ds++) { + va = trunc_page((uintptr_t)ds->ds_addr); + len = ds->ds_len; + if (ds->ds_addr % PAGE_SIZE != 0) + len += ds->ds_addr % PAGE_SIZE; + for (k = 0; k < howmany(len, PAGE_SIZE); k++) { + pbl[i] = htobe64(pmap_kextract(va + + k * PAGE_SIZE)); + i++; + } + } + MPASS(i == npages); + break; + } + case MEMDESC_PLIST: + { + struct bus_dma_segment *ds; + vm_paddr_t pa; + vm_size_t len; + u_int j, k; + + i = 0; + ds = mem->u.md_list; + for (j = 0; j < mem->md_nseg; j++, ds++) { + pa = trunc_page((vm_paddr_t)ds->ds_addr); + len = ds->ds_len; + if (ds->ds_addr % PAGE_SIZE != 0) + len += ds->ds_addr % PAGE_SIZE; + for (k = 0; k < howmany(len, PAGE_SIZE); k++) { + pbl[i] = htobe64(pa + k * PAGE_SIZE); + i++; + } + } + MPASS(i == npages); + break; + } + default: + __assert_unreachable(); + } + + error = che_write_adapter_mem(qp, addr >> 5, len, pbl); + if (error != 0) { + t4_pblpool_free(sc, addr, len); + free(pbl, M_NVMF_CHE); + return (false); + } + + cb->pbl = pbl; + cb->pbl_addr = addr; + cb->pbl_len = len; + + return (true); +} + +static void +che_free_pbl(struct nvmf_che_command_buffer *cb) +{ + free(cb->pbl, M_NVMF_CHE); + t4_pblpool_free(cb->qp->nca->sc, cb->pbl_addr, cb->pbl_len); + cb->pbl = NULL; + cb->pbl_addr = 0; + cb->pbl_len = 0; +} + +static bool +che_write_tpt_entry(struct nvmf_che_qpair *qp, + struct nvmf_che_command_buffer *cb, uint16_t stag) +{ + uint32_t tpt_addr; + int error; + + cb->tpte.valid_to_pdid = htobe32(F_FW_RI_TPTE_VALID | + V_FW_RI_TPTE_STAGKEY(CHE_STAG_COLOR(stag)) | + F_FW_RI_TPTE_STAGSTATE | + V_FW_RI_TPTE_STAGTYPE(FW_RI_STAG_NSMR) | + V_FW_RI_TPTE_PDID(0)); + cb->tpte.locread_to_qpid = htobe32( + V_FW_RI_TPTE_PERM(FW_RI_MEM_ACCESS_REM_WRITE) | + V_FW_RI_TPTE_ADDRTYPE(FW_RI_ZERO_BASED_TO) | + V_FW_RI_TPTE_PS(PAGE_SIZE) | + V_FW_RI_TPTE_QPID(qp->toep->tid)); +#define PBL_OFF(qp, a) ((a) - (qp)->nca->sc->vres.pbl.start) + cb->tpte.nosnoop_pbladdr = + htobe32(V_FW_RI_TPTE_PBLADDR(PBL_OFF(qp, cb->pbl_addr) >> 3)); + cb->tpte.len_lo = htobe32(cb->data_len); + cb->tpte.va_hi = 0; + cb->tpte.va_lo_fbo = htobe32(che_fbo(cb)); + cb->tpte.dca_mwbcnt_pstag = 0; + cb->tpte.len_hi = htobe32(cb->data_offset); + + tpt_addr = qp->tpt_offset + CHE_STAG_IDX(stag) + + (qp->nca->sc->vres.stag.start >> 5); + + error = che_write_adapter_mem(qp, tpt_addr, sizeof(cb->tpte), + &cb->tpte); + return (error == 0); +} + +static void +che_clear_tpt_entry(struct nvmf_che_qpair *qp, uint16_t stag) +{ + uint32_t tpt_addr; + + tpt_addr = qp->tpt_offset + CHE_STAG_IDX(stag) + + (qp->nca->sc->vres.stag.start >> 5); + + (void)che_write_adapter_mem(qp, tpt_addr, sizeof(struct fw_ri_tpte), + NULL); +} + +static uint16_t +che_alloc_ddp_stag(struct nvmf_che_qpair *qp, + struct nvmf_che_command_buffer *cb) +{ + uint16_t stag_idx; + + mtx_assert(&qp->rx_buffers.lock, MA_OWNED); + MPASS(cb->ddp_ok); + + if (qp->active_ddp_tags == qp->num_ddp_tags) + return (CHE_DDP_NO_TAG); + + MPASS(qp->num_ddp_tags != 0); + + stag_idx = qp->next_ddp_tag; + for (;;) { + if (qp->open_ddp_tags[stag_idx] == NULL) + break; + if (stag_idx == qp->num_ddp_tags - 1) { + stag_idx = 0; + if (qp->ddp_color == CHE_DDP_MAX_COLOR) + qp->ddp_color = 0; + else + qp->ddp_color++; + } else + stag_idx++; + MPASS(stag_idx != qp->next_ddp_tag); + } + if (stag_idx == qp->num_ddp_tags - 1) + qp->next_ddp_tag = 0; + else + qp->next_ddp_tag = stag_idx + 1; + + qp->active_ddp_tags++; + qp->open_ddp_tags[stag_idx] = cb; + + return (CHE_DDP_TAG(stag_idx, qp->ddp_color)); +} + +static void +che_free_ddp_stag(struct nvmf_che_qpair *qp, struct nvmf_che_command_buffer *cb, + uint16_t stag) +{ + MPASS(!CHE_TAG_IS_FL(stag)); + + mtx_assert(&qp->rx_buffers.lock, MA_OWNED); + + MPASS(qp->open_ddp_tags[CHE_STAG_IDX(stag)] == cb); + + qp->open_ddp_tags[CHE_STAG_IDX(stag)] = NULL; + qp->active_ddp_tags--; +} + +static uint16_t +che_alloc_ddp_tag(struct nvmf_che_qpair *qp, + struct nvmf_che_command_buffer *cb) +{ + uint16_t stag; + + mtx_assert(&qp->rx_buffers.lock, MA_OWNED); + + if (!cb->ddp_ok) + return (CHE_DDP_NO_TAG); + + stag = che_alloc_ddp_stag(qp, cb); + if (stag == CHE_DDP_NO_TAG) { + counter_u64_add(qp->toep->ofld_rxq->rx_nvme_ddp_setup_no_stag, + 1); + return (CHE_DDP_NO_TAG); + } + + if (!che_alloc_pbl(qp, cb)) { + che_free_ddp_stag(qp, cb, stag); + counter_u64_add(qp->toep->ofld_rxq->rx_nvme_ddp_setup_error, 1); + return (CHE_DDP_NO_TAG); + } + + if (!che_write_tpt_entry(qp, cb, stag)) { + che_free_pbl(cb); + che_free_ddp_stag(qp, cb, stag); + counter_u64_add(qp->toep->ofld_rxq->rx_nvme_ddp_setup_error, 1); + return (CHE_DDP_NO_TAG); + } + + counter_u64_add(qp->toep->ofld_rxq->rx_nvme_ddp_setup_ok, 1); + return (stag); +} + +static void +che_free_ddp_tag(struct nvmf_che_qpair *qp, struct nvmf_che_command_buffer *cb, + uint16_t stag) +{ + MPASS(!CHE_TAG_IS_FL(stag)); + + mtx_assert(&qp->rx_buffers.lock, MA_OWNED); + + MPASS(qp->open_ddp_tags[CHE_STAG_IDX(stag)] == cb); + + che_clear_tpt_entry(qp, stag); + che_free_pbl(cb); + che_free_ddp_stag(qp, cb, stag); +} + +static void +nvmf_che_write_pdu(struct nvmf_che_qpair *qp, struct mbuf *m) +{ + struct epoch_tracker et; + struct socket *so = qp->so; + struct inpcb *inp = sotoinpcb(so); + struct toepcb *toep = qp->toep; + + CURVNET_SET(so->so_vnet); + NET_EPOCH_ENTER(et); + INP_WLOCK(inp); + if (__predict_false(inp->inp_flags & INP_DROPPED) || + __predict_false((toep->flags & TPF_ATTACHED) == 0)) { + m_freem(m); + } else { + mbufq_enqueue(&toep->ulp_pduq, m); + t4_push_pdus(toep->vi->adapter, toep, 0); + } + INP_WUNLOCK(inp); + NET_EPOCH_EXIT(et); + CURVNET_RESTORE(); +} + +static void +nvmf_che_report_error(struct nvmf_che_qpair *qp, uint16_t fes, uint32_t fei, + struct mbuf *rx_pdu, u_int hlen) +{ + struct nvme_tcp_term_req_hdr *hdr; + struct mbuf *m; + + if (hlen != 0) { + hlen = min(hlen, NVME_TCP_TERM_REQ_ERROR_DATA_MAX_SIZE); + hlen = min(hlen, m_length(rx_pdu, NULL)); + } + + m = m_get2(sizeof(*hdr) + hlen, M_WAITOK, MT_DATA, M_PKTHDR); + m->m_len = sizeof(*hdr) + hlen; + m->m_pkthdr.len = m->m_len; + hdr = mtod(m, void *); + memset(hdr, 0, sizeof(*hdr)); + hdr->common.pdu_type = qp->qp.nq_controller ? + NVME_TCP_PDU_TYPE_C2H_TERM_REQ : NVME_TCP_PDU_TYPE_H2C_TERM_REQ; + hdr->common.hlen = sizeof(*hdr); + hdr->common.plen = sizeof(*hdr) + hlen; + hdr->fes = htole16(fes); + le32enc(hdr->fei, fei); + if (hlen != 0) + m_copydata(rx_pdu, 0, hlen, (caddr_t)(hdr + 1)); + + nvmf_che_write_pdu(qp, m); +} + +static int +nvmf_che_validate_pdu(struct nvmf_che_qpair *qp, struct nvmf_che_rxpdu *pdu) +{ + const struct nvme_tcp_common_pdu_hdr *ch; + struct mbuf *m = pdu->m; + uint32_t data_len, fei, plen, rx_digest; + u_int hlen, cpl_error; + int error; *** 2448 LINES SKIPPED *** From nobody Mon Nov 10 16:15:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4vsf0xFSz6GwG8; Mon, 10 Nov 2025 16:15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4vsf0Kqsz4Db6; Mon, 10 Nov 2025 16:15:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762791350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OAUGb4GVpa0Pc7jW1kc63dWVBlrM4FgpaAAWhKyVFlY=; b=e8hM21DvMNwAJRO0fAycWEeY70uw1XQv/VvsC8gr7e4No1ZX6Z82+po0E0/4I6GFhAjy5l LsrpfmR8Dzu2/JK40AHC/Vg7UvhU40Mj/WGwVyOhf0orKM7ZJoynjT3VBJQKh2k+H1zqgn rbJXPl6BGL7kavcP2SdlAvUa3dNuVPeKMUA+v4Q98rv3+EbfSzZqkdjLrQR4KwHF6/STGo Z99gDtT3s+/E+DdlEEp9VSXw7B9dMCqzFdwnRoIY+0NjKp5xm0VlP/UAJtCg5jINcrbQF2 nOs8NZQhqpc0qQLygSOsS7j4N5e8/AaaeQoyiAo7r/IxpCiP8Sz+pUzk5ns7MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762791350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OAUGb4GVpa0Pc7jW1kc63dWVBlrM4FgpaAAWhKyVFlY=; b=K29VEpwMCcam07tW0lzKZKXkf4LUXRpy4V1bGQUUz/pUEDn4gqieL1+p0bf/yeF9R3D4FR OlascjAn4+DUGyhVbiYAmglKeUis6FMd74TbGfrmVZHm5DHbMTBMdlmCtEDctsK77bA1N4 7ixKUEIZvrZ3NXNwOYje4rHS+1QKouaf5i+IRWXb2jrSCACzZCoZESk/yh9v7camDrZsls py3vSAcubO4FXdFpDKT0Zu6o9kOM8BXIq9vXpD+/RLflHMdRAgZvP8maVm5dmjO+x42Ghc 8aUkbEW1rTPfRnh8Luz1K/W3XGQVo1mVtgEKBBx8jxdHhthW8e5PNTc2FUWPZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762791350; a=rsa-sha256; cv=none; b=y4bYR9E+/jdMAzHOsKjSvrVirbvD4eE2KxNCOM9u6JtXm/PlNhypQ54iAyp0a3OpsssOj3 J2y614hZBek4rdnNRiWSzK6D1oApiRLaN5lI6ogsodMJCVDm+yNKuVJ2BuRxuEogi/z27Z UTc4FDMB+dMtsKzRMkDmIh5ePf48Jt7RPXGi/eGgRcn4Nlt+mIE6vcK+1mZ59QjrVXvY/7 qtCj064W9eHxEHb+snKXxWaBWX24zV6zY2x/x3uoV8RA5Qu1J7cFxbJb6SjC0SqMTwCRWo JOyEyDshnDcKA1SLebkr445LPfLjbuoZ8O83hjdsmrTjMNkmbqaZQFnA0hLPTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4vsd5zBQz96N; Mon, 10 Nov 2025 16:15: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 5AAGFn35094066; Mon, 10 Nov 2025 16:15:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAGFnnm094063; Mon, 10 Nov 2025 16:15:49 GMT (envelope-from git) Date: Mon, 10 Nov 2025 16:15:49 GMT Message-Id: <202511101615.5AAGFnnm094063@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: 59d7865d3c20 - main - sound: Clarify userland/vchan relationship in sndstat feeder chain List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 59d7865d3c20e86b3c42096f4a8c06a5e2eebd29 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=59d7865d3c20e86b3c42096f4a8c06a5e2eebd29 commit 59d7865d3c20e86b3c42096f4a8c06a5e2eebd29 Author: Christos Margiolis AuthorDate: 2025-11-10 16:15:36 +0000 Commit: Christos Margiolis CommitDate: 2025-11-10 16:15:36 +0000 sound: Clarify userland/vchan relationship in sndstat feeder chain When vchans are enabled, the primary channels do not interact with userland, but with the vchans. With vchans enabled: $ sndctl feederchain dsp0.play.0.feederchain=[vchans -> [...] -> hardware] dsp0.record.0.feederchain=[hardware -> [...] -> vchans] With vchans disabled: $ sndctl feederchain dsp0.play.0.feederchain=[userland -> [...] -> hardware] dsp0.record.0.feederchain=[hardware -> [...] -> userland] Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53504 --- sys/dev/sound/pcm/sndstat.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 51d0fb3bb686..1a5bccd718b5 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -524,7 +524,8 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) c->parentchannel->name : "userland"); } else { sbuf_printf(&sb, "[%s", (c->direction == PCMDIR_REC) ? - "hardware" : "userland"); + "hardware" : + ((d->flags & SD_F_PVCHANS) ? "vchans" : "userland")); } sbuf_printf(&sb, " -> "); f = c->feeder; @@ -561,7 +562,8 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) "userland" : c->parentchannel->name); } else { sbuf_printf(&sb, "%s]", (c->direction == PCMDIR_REC) ? - "userland" : "hardware"); + ((d->flags & SD_F_RVCHANS) ? "vchans" : "userland") : + "hardware"); } CHN_UNLOCK(c); @@ -1320,7 +1322,8 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) c->parentchannel->name : "userland"); } else { sbuf_printf(s, "\t{%s}", (c->direction == PCMDIR_REC) ? - "hardware" : "userland"); + "hardware" : + ((d->flags & SD_F_PVCHANS) ? "vchans" : "userland")); } sbuf_printf(s, " -> "); f = c->feeder; @@ -1358,7 +1361,8 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) "userland" : c->parentchannel->name); } else { sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? - "userland" : "hardware"); + ((d->flags & SD_F_RVCHANS) ? "vchans" : "userland") : + "hardware"); } CHN_UNLOCK(c); From nobody Mon Nov 10 19:54:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d50jw4ZLcz63L5W; Mon, 10 Nov 2025 19:54: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d50jw44zwz3YFr; Mon, 10 Nov 2025 19:54:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762804468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7GR9iOke8WhKVcVKHJ97UrW8NJR7+EW7E5l6UHpIOwM=; b=DWqm+q4o5U0ivI0d8Ds7/2qS0XSAHBtEBUeodJPnuHyRX5kBf0yo/8CaQsctNBmDdQ0DRR 6fhcgENdNzPsNcxXauw7M5lkVrtF/zO9jADuNR3IFrlJ1M59tTAiXJC82a8gDlhIzgXYrb /88nXwG9MvABvbTDPsxEIE331YRcBvBFe+h750ahBNWxIFnnWTL6ZrXV+elsaP6438TfsU 1Q3qfFltL5TogBbJJMqHJ2kNaXe0hHl2uphF+rVTdG0HUuWWd6Ax7SDLEe/NX40CnlGBmR gpjr9VGVUHPZD3JNl3s/qUPtf6Heif3omKBo1hBAtq5HBGM1phSzFLQH6YVgNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762804468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7GR9iOke8WhKVcVKHJ97UrW8NJR7+EW7E5l6UHpIOwM=; b=JvoD1usMixac0SVQGffAW8VIXVeskqW9lydooKytWZXwwc9plskIjgYTng3xb6h9FH7G5Z Kn5I1Z9sW8M7G/VozOXN0DI5ewwJogTO/m4v8cDfGrwq7W+ohwLun4Kwo5oMN/m5d69KfZ 9qnWNWLjSaXDH61iw6F371WU/ABxptVsRfLnmh9vUKsXZPwChJYQWt26BkJzZzqbuK2avN Ft0XaB22WEwTG37k4QhG6hsNMNmlpKdymznZNy7aTRuoMaXYWQVNbU6xIQ6ZY913L4fWq5 agE3PfDpOS5aoXlDIlgjW6ws0aeeMHR6OyC/5j/m9Vw7gvmKt0JbHXz6pGzozQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762804468; a=rsa-sha256; cv=none; b=IalqGn+Pc/x/XsBkk+PtWzflNZ3hB00sZ5zG2rwNnWKrb2nHgP6m6bTjAv5dKOgW++sHrJ F4pL9NYwxm4vtuS7ApxY02C79/iHb93J0ab/3hVoctfkkdB0n7iShKLewvOIzej3mLMvgu /x4Unmn34djZqxi2aBxVpYuuLxvjpY9M/d2Fl4FA2oFJxf6zq6TpioH3mZcWpLjy1aG99B dyRG23AApHLCI4o9YYgMTiJKFxEBzfeWzrvaY5vixwO32/g2NnZYKvHfZqRz5f6BzWeKy+ PekngVN/mWwpFLLL9nun4PniNWB1AY2fuW+u+hlwrU/i0RUGqImLUXEMjh03Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d50jw37h2zXVJ; Mon, 10 Nov 2025 19:54: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 5AAJsSiB007734; Mon, 10 Nov 2025 19:54:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAJsSN0007731; Mon, 10 Nov 2025 19:54:28 GMT (envelope-from git) Date: Mon, 10 Nov 2025 19:54:28 GMT Message-Id: <202511101954.5AAJsSN0007731@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: b568711f8ef1 - main - LinuxKPI: 802.11: clear CONF_IDLE earlier List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: b568711f8ef1afd7c86ea2d8bd2f94f399f54dc1 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b568711f8ef1afd7c86ea2d8bd2f94f399f54dc1 commit b568711f8ef1afd7c86ea2d8bd2f94f399f54dc1 Author: Bjoern A. Zeeb AuthorDate: 2025-11-10 19:41:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-11-10 19:41:08 +0000 LinuxKPI: 802.11: clear CONF_IDLE earlier When starting to scan and ending a scan we clear/set the hardware to idle. Similarly we set the hw to idle when we remove the channel context but when starting we only set it to non-idle when we went from assoc to run. This apparently was not a problem most of the time as the switch from a failed hardware scan to a software scan was racing against net80211. ad4ddc83ebf8 fixed that specifically for rtw88 and while we were more consistently scanning, this broke authentication as the setting of idle at the end of the scan was now happening reliably. Move the unsetting of idle from assoc_to_run to scan_to_auth for when we create the chanctx to keep it symmetrical. This makes authentication work again for rtw88. This likely also fixes the problems in the listed PRs. iwlwifi(4) mvm and mld driver parts do not use this information at all and were never affected. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reported by: Oleg Nauman (oleg.nauman gmail.com) PR: 290850, 288186, 281979 PR: 272145 (the non skb-mem-limit parts) --- sys/compat/linuxkpi/common/src/linux_80211.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 0dc3b2631804..f025f191a3bd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2308,6 +2308,10 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); } else { + /* The device is no longer idle. */ + IMPROVE("Once we do multi-vif, only do for 1st chanctx"); + lkpi_hw_conf_idle(hw, false); + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { vif->bss_conf.chanreq.oper.chan = chanctx_conf->def.chan; @@ -3081,8 +3085,6 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta->in_mgd = false; } - lkpi_hw_conf_idle(hw, false); - /* * And then: * - (more packets)? From nobody Mon Nov 10 20:06:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d50zy5vW2z63MX7; Mon, 10 Nov 2025 20:06:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d50zy4q0Gz3fDF; Mon, 10 Nov 2025 20:06:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762805198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6P0OTCZj08xmQvVUVOFw9J67wpysiRCQFuR184xxdzk=; b=sqDmQfCMSHf55593CGn9jHiR7Wcdn3/9vNcrarXGjWWTE0Oy6+3P0uYAht0TRR06Vxx3wg KX4tzZBIL407a6jCjK+vROhBl0ViwOmfKZvyX144WkVknT9biGT3LlpOPg96a5aGg5aVYk cZyRyiN9eZHJr4g0drsC9aeidL4mTNR4YBzOJ2Di5vvlR1IO1S+M0MPskPTt03GnCJCqX/ ZYv6qd1q+tTHGnszLrr7rtgI0mdNrgrZylay2+/ql+dSkXm2V+97sY5Zrrrak1E0dqTmAF P45R8uER6+3itZG6JddpHfVk2K2VrML9VwX5k/Yb1N9BYLQcnv3+T8lh5k5QCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762805198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6P0OTCZj08xmQvVUVOFw9J67wpysiRCQFuR184xxdzk=; b=L6Um1rjbDmTOmWis8s5PFGAOonaD9cLX0I15VHqogAHomtnM3LGfMbevaYX/Is9n8MXE64 NnRW+r5BXqg1MSWEOAVcubUwD4gbH+BmlmhDJNyN+W6sPwyMuIeVl7XfK5MJYF9i2z8nh3 dECJsHnlR5kCFhMKmdepGTcOlAiB3YC5p9UrhhH95AEOSMQxhgY/8BGMMU5/gSwOH2l2IZ 29MZbJT9hYA7XzTbdiYEuCy9akBR+SS31nBvZ3bnG/7L9EM5jbAkL9DyO1Julo4gsiWJWk HFiIKexZ5KsebBgFt9MfVhstHYwIm9tb6iLr+NaalC6bF70+SKfeA8spdZJqLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762805198; a=rsa-sha256; cv=none; b=mCODd2980k+7+s42DkGndeYemrJHSvDzMSsIgVBRV9ravVdFjpVSlH8ZNKAmvAAYL2xwYo tXmaG+bsz4VTZf8/Q1jcSybAzOpsbAgobuKPB9Xl/Z7gHn9JYiill3ErWIOmVlZnTliM6f G/fKoNTmiu4Bqo/mqevyZ8kENi6XBgu4aA9H20om3zVgOEyzhuSx0dqVmlHUb8C4r1CwgR 0F5gXV3rVD2p+VlQd7DYu/OhsNTVAr4eXHoENjF0JThCjS2CoKNTsShlpPCZi4MX1dFwqr 2PXf6kUVK0+Z/DZFuT5JRLC4lmVQ/r4z8qz/gqwgCd0iGsYEspmSaTh79ttadA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d50zy46g1zYN5; Mon, 10 Nov 2025 20:06: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 5AAK6cXp029367; Mon, 10 Nov 2025 20:06:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAK6cjU029364; Mon, 10 Nov 2025 20:06:38 GMT (envelope-from git) Date: Mon, 10 Nov 2025 20:06:38 GMT Message-Id: <202511102006.5AAK6cjU029364@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: abd53b16c03f - main - ix.4: Add E610 to HARDWARE section List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: abd53b16c03f77c12bb8b77d9e2e4cf392745361 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=abd53b16c03f77c12bb8b77d9e2e4cf392745361 commit abd53b16c03f77c12bb8b77d9e2e4cf392745361 Author: Yogesh Bhosale AuthorDate: 2025-11-10 19:23:46 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-10 20:06:32 +0000 ix.4: Add E610 to HARDWARE section MFC after: 3 days Reviewed by: ziaee Fixes: dea5f973d0c8 (new Intel Ethernet E610 family) Differential Revision: https://reviews.freebsd.org/D52990 --- share/man/man4/ix.4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4 index 418b6e1188ab..e6f4276e1a77 100644 --- a/share/man/man4/ix.4 +++ b/share/man/man4/ix.4 @@ -29,7 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd October 26, 2024 +.Dd November 10, 2025 .Dt IX 4 .Os .Sh NAME @@ -78,6 +78,8 @@ including: .Pp .Bl -bullet -compact .It +Intel(R) Ethernet E610 +.It Intel(R) Ethernet X553 .It Intel(R) Ethernet X552 From nobody Tue Nov 11 00:30:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d56s032PKz63kCc; Tue, 11 Nov 2025 00:31: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d56s00tRRz3G4j; Tue, 11 Nov 2025 00:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762821060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=coIryeXruseRQOutFXdbQkYqyWcV1NqRe/PvCQpLR7E=; b=ll8RYJUm403UKg4d4Cx0LZuiQZeBAF071n9F1SlZ8RgGuEUfNIofhiEDmKJdeX7Dlmengh wOq03Xw8gzGjaiussUO4DjIR3kXMrKC1BN+7r2uYMw3l0NbXySqXJwXUP/aZmVlhiR+sjN 9EsbZmO8tvimVwG5W8AUzwkNPqr1biembAajHl8kRPCImMuel5jfhhUz6bu0Z/gTtmwV8q QNt0G+PyOva8Eaqe0KED7cEbsSD05hhVjFNi2jDheY3k3EUICYRipLazGKRuVyCkbo3n3r 7u1Nyn/QplnMju9khY6crjMtGS5QWfsm7uGjWasutQUIcFLk2xeKEsM2o4DDOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762821060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=coIryeXruseRQOutFXdbQkYqyWcV1NqRe/PvCQpLR7E=; b=XulWV2j9y0+Hx4jTL50sEndbnaN9QxT2JmC+omuwNuWy4VKp+ff+jgbTgfUmtuEpI6J7VK 4XTbWNdQ4jAimmd6S9cb6dGvfaOqTJVV5QbojOWNhQQn6L+piBrIFhrMog5KbKwJufvSrJ extMsweIym1BTrzhPer0Vphl/Sp4dqd2abkGqAHyKXwznhAnBfn0EnDTmaONsxm0GcXJ5c IpiumbJnxvSRCFaGszsaU/iKqPpY5+p1a0LtqeGIuf0ZRrgrAvi/mQMQjR6f1S8I9XcKtr LKvWvg+IAyUgr8v71LOAG3so+Kz/qRogiqo184lfEfEpNh/gyGxlrh381lQEcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762821060; a=rsa-sha256; cv=none; b=uOFOce12jMH+cNv+1R5+VfvLXbigv+JdQdYAyKdEwzFEdJebT2a86pqPo4yxu+p5u2NOD3 +prDvw9MQdQs863sGKW9/CmMrAVQ8OA5J14qJr3fP8PldBPfydd+yG6Qq9G75Jpw8ZICXY U6Qa9M198MXYCX/syF5Zz2pidksEiBbn3m4W+L7IRw1YZLX54oi+RYCC+k3Vrkh207xVjt 6Tc04q3B7eQJ52fIHafkjC/m1Z4Tq+uTj0F8EERw/DWtWg8Hp1rFAG42P2A+MDnXTGmHh+ q5OFqLs3CaAHpXDEy0OLkcUgm/hZMhrOIj5Hj89ygeMzS35l8XE89OWzV+oABQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d56s00Bljzhkt; Tue, 11 Nov 2025 00:31: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 5AB0UxsC027194; Tue, 11 Nov 2025 00:30:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AB0UxVW027191; Tue, 11 Nov 2025 00:30:59 GMT (envelope-from git) Date: Tue, 11 Nov 2025 00:30:59 GMT Message-Id: <202511110030.5AB0UxVW027191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: 3deb21f1afd5 - main - random: TPM_HARVEST should have been named RANDOM_ENABLE_TPM List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3deb21f1afd5c4abfd9cb93ca120097a841536c5 Auto-Submitted: auto-generated The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=3deb21f1afd5c4abfd9cb93ca120097a841536c5 commit 3deb21f1afd5c4abfd9cb93ca120097a841536c5 Author: David E. O'Brien AuthorDate: 2025-10-28 03:53:43 +0000 Commit: David E. O'Brien CommitDate: 2025-11-10 20:54:48 +0000 random: TPM_HARVEST should have been named RANDOM_ENABLE_TPM * Enable RANDOM_ENABLE_TPM by default * The commit of TPM_HARVEST failed to add it to NOTES so that the LINT kernel would build the code. Fixes: 4ee7d3b0118c82e651712bb65da53d08e78cd7b1 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53460 --- share/man/man4/random.4 | 1 + sys/amd64/conf/GENERIC | 6 +++++- sys/amd64/conf/MINIMAL | 6 +++++- sys/arm/conf/GENERIC | 4 ++++ sys/arm64/conf/std.arm64 | 4 ++++ sys/conf/NOTES | 2 ++ sys/conf/options | 1 + sys/dev/tpm/tpm20.c | 10 +++++----- sys/riscv/conf/GENERIC | 4 ++++ 9 files changed, 31 insertions(+), 7 deletions(-) diff --git a/share/man/man4/random.4 b/share/man/man4/random.4 index 04d46e4d32aa..457f49f3d3ce 100644 --- a/share/man/man4/random.4 +++ b/share/man/man4/random.4 @@ -30,6 +30,7 @@ .Sh SYNOPSIS .Cd "options RANDOM_LOADABLE" .Cd "options RANDOM_ENABLE_ETHER" +.Cd "options RANDOM_ENABLE_TPM" .Cd "options RANDOM_ENABLE_UMA" .Sh DESCRIPTION The diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index fb8473505128..1de895a5b333 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -309,7 +309,6 @@ device wpi # Intel 3945ABG wireless NICs. device crypto # core crypto support device aesni # AES-NI OpenCrypto module device loop # Network loopback -device rdrand_rng # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tuntap # Packet tunnel. @@ -323,6 +322,11 @@ device xz # lzma decompression # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter +# random(4) +device rdrand_rng # Intel Bull Mountain RNG +device tpm # Trusted Platform Module +options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 + # USB support options USB_DEBUG # enable debug msgs device uhci # UHCI PCI->USB interface diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index 61c713c609a4..2bd8851ab20c 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -113,7 +113,6 @@ device uart # Generic UART driver # Pseudo devices. device loop # Network loopback -device rdrand_rng # Intel Bull Mountain RNG device ether # Ethernet support # The `bpf' device enables the Berkeley Packet Filter. @@ -121,6 +120,11 @@ device ether # Ethernet support # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter +# random(4) +device rdrand_rng # Intel Bull Mountain RNG +device tpm # Trusted Platform Module +options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 + # VirtIO support device virtio # Generic VirtIO bus (required) device virtio_pci # VirtIO PCI device diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 22bb75993834..0d741a7e584a 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -216,6 +216,10 @@ device ffec # Freescale Fast Ethernet Controller device neta # Marvell 10/100/1000 Network controller device smsc # SMSC LAN91C111 +# random(4) +device tpm # Trusted Platform Module +options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 + # Sound support device sound diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index a0568466cfaf..003f13c8f1cc 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -106,3 +106,7 @@ device efirtc # EFI RTC # SMBIOS -- all EFI platforms device smbios + +# random(4) +device tpm # Trusted Platform Module +options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 diff --git a/sys/conf/NOTES b/sys/conf/NOTES index df71aa60099d..71d14dc8915f 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2825,6 +2825,8 @@ options RANDOM_ENABLE_UMA # slab allocator # environment. options RANDOM_ENABLE_ETHER # ether_input +options RANDOM_ENABLE_TPM # implies TPM_HARVEST + # Module to enable execution of application via emulators like QEMU options IMGACT_BINMISC diff --git a/sys/conf/options b/sys/conf/options index b00b381d1da1..963263e8a732 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -956,6 +956,7 @@ RANDOM_LOADABLE opt_global.h # the uma slab allocator. RANDOM_ENABLE_UMA opt_global.h RANDOM_ENABLE_ETHER opt_global.h +RANDOM_ENABLE_TPM opt_global.h # This options turns TPM into entropy source. TPM_HARVEST opt_tpm.h diff --git a/sys/dev/tpm/tpm20.c b/sys/dev/tpm/tpm20.c index 067e7ccae8f9..6c587818058d 100644 --- a/sys/dev/tpm/tpm20.c +++ b/sys/dev/tpm/tpm20.c @@ -42,7 +42,7 @@ MALLOC_DEFINE(M_TPM20, "tpm_buffer", "buffer for tpm 2.0 driver"); static void tpm20_discard_buffer(void *arg); -#ifdef TPM_HARVEST +#if defined TPM_HARVEST || defined RANDOM_ENABLE_TPM static void tpm20_harvest(void *arg, int unused); #endif static int tpm20_save_state(device_t dev, bool suspend); @@ -184,7 +184,7 @@ tpm20_ioctl(struct cdev *dev, u_long cmd, caddr_t data, return (ENOTTY); } -#ifdef TPM_HARVEST +#if defined TPM_HARVEST || defined RANDOM_ENABLE_TPM static const struct random_source random_tpm = { .rs_ident = "TPM", .rs_source = RANDOM_PURE_TPM, @@ -212,7 +212,7 @@ tpm20_init(struct tpm_sc *sc) if (result != 0) tpm20_release(sc); -#ifdef TPM_HARVEST +#if defined TPM_HARVEST || defined RANDOM_ENABLE_TPM random_source_register(&random_tpm); TIMEOUT_TASK_INIT(taskqueue_thread, &sc->harvest_task, 0, tpm20_harvest, sc); @@ -227,7 +227,7 @@ void tpm20_release(struct tpm_sc *sc) { -#ifdef TPM_HARVEST +#if defined TPM_HARVEST || defined RANDOM_ENABLE_TPM if (device_is_attached(sc->dev)) taskqueue_drain_timeout(taskqueue_thread, &sc->harvest_task); random_source_deregister(&random_tpm); @@ -254,7 +254,7 @@ tpm20_shutdown(device_t dev) return (tpm20_save_state(dev, false)); } -#ifdef TPM_HARVEST +#if defined TPM_HARVEST || defined RANDOM_ENABLE_TPM /* * Get TPM_HARVEST_SIZE random bytes and add them * into system entropy pool. diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index a8500fe80019..a7e1200e3884 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -204,6 +204,10 @@ options FDT device iicbus # Bus support, required for iicoc below. device iicoc # OpenCores I2C controller support +# random(4) +device tpm # Trusted Platform Module +options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 + # Include SoC specific configuration include "std.allwinner" include "std.cvitek" From nobody Tue Nov 11 00:56:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d57QR2Gb6z64GLq; Tue, 11 Nov 2025 00:56:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d57QR1bXMz3HW4; Tue, 11 Nov 2025 00: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=1762822591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DS3L0zTmY/lJUmMmSBUmb3vv9WEm+Gisx2oeuOuRSOs=; b=ijKsFRHfQiStRyo0wzcxG4gjIkRI/pgkuMKxg9T3er4o2y9gYhu5qnt2ImoU4+NA/gK9WO smgxBGrYjxf70ua6qQ3tXLZXrTOIFkNuRZQmgPtrGW0aGURb049Uc2ChCtmSBm/bvxGkAr 2DImh2eA6tYrewJXSXkjLpJXjTvT5Co4FKQqdg87Vd6tbyQy9HLbGMK2cB7xkSwHNr8yKG gxHpF+/xDXBRNuQS7hKaPJDo5SfSWcRd8LlLV6WZd4CC4yg5h3cD2XDYf8XYMJWrdYB4ch pOhpl3JxEFF3az+mx/n+JjYKPKl0KLZza5iiGzA6Vs4FVTfwTBH4ZmTnQj+SpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762822591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DS3L0zTmY/lJUmMmSBUmb3vv9WEm+Gisx2oeuOuRSOs=; b=CGZHOdDfJbq0OLwB6q5l0sYCXVEyTXv3LdDucG3ah7JijK+8GxESHIhrovKDMc3vb0hTRD V+0CU9Pmt1zIs9E+55jBXOUxcntHOs4cMpd3tLRhNANiahUGE4DVVtC/EcCwC3UI5eE52+ XKX9z7Za9vsI85GQJF9kJTxKtx6BRKjSs6a4Amev0fRShwdCp2WOrQ6CYHlKe7q41F/4d4 f2+f6a/spWZ+LGuO/Dtjwn0mBLCPKYbRg2EW5j2UhKCde+DDsEGJQSWkhYijU6wgykz/1Z ooqU7K1ORNIGO0DTXUJqTt3X5XDobpm3jvw1ntxdFqMXzhG95c11p7xTpe03wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762822591; a=rsa-sha256; cv=none; b=hsBT3hFFZyEraYTLlGNGX4Nt43I9hIGX5IHai5IFglH17jp3pj94Csfi0DMnUwhsVorxxJ hxQuSzey9s3NvvB+Xmcga49FGvPxYfQHr6TyRs1xqMCuYB6JnUa/LSyvAtDpkdFHLBx6k5 AQCRiszBL/U+kWm3nF4Y+L1Pb0Jz2GuC5VXKd8+i+HQx0rUG9vTSkgkmglhVB7gT2LtHFM IywHOIfEN0C2/rvMRGLB48BVEdpyNnGJdaHkxmdEOi/x+Nt1cUJ0NMiuxNNDZHRTbsOpXJ HYwB8y0GWPbaLbJP20fVfPZ4M9Mh+3S0Wmi9yhbSG7RayZYsMVu6HWEAsozG1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d57QR16Y4zj9y; Tue, 11 Nov 2025 00: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 5AB0uVZc071666; Tue, 11 Nov 2025 00: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 5AB0uV1e071663; Tue, 11 Nov 2025 00:56:31 GMT (envelope-from git) Date: Tue, 11 Nov 2025 00:56:31 GMT Message-Id: <202511110056.5AB0uV1e071663@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: d18ed8e19c3c - main - stand: Try to parse vdisk correctly List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: d18ed8e19c3cb264340987bdc191615108d8413a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d18ed8e19c3cb264340987bdc191615108d8413a commit d18ed8e19c3cb264340987bdc191615108d8413a Author: Warner Losh AuthorDate: 2025-11-11 00:41:52 +0000 Commit: Warner Losh CommitDate: 2025-11-11 00:56:11 +0000 stand: Try to parse vdisk correctly PR: 289306 Sponsored by: Netflix Reviewed by: dab MFC After: 5 days Differential Revision: https://reviews.freebsd.org/D52500 --- stand/common/disk.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/stand/common/disk.c b/stand/common/disk.c index c1650f0fa1ec..47f882d5a532 100644 --- a/stand/common/disk.c +++ b/stand/common/disk.c @@ -417,7 +417,18 @@ disk_parsedev(struct devdesc **idev, const char *devspec, const char **path) char *cp; struct disk_devdesc *dev; - np = devspec + 4; /* Skip the leading 'disk' */ + /* + * disk names look approximately like: + * v?disk([0-9]+(p[0-9]+|s[a-z])?)?: + * so skip over the initial bit. We don't have access to the devsw + * to check the name. + */ + if (strncmp(devspec, "disk", 4) == 0) + np = devspec + 4; + else if (strncmp(devspec, "vdisk", 5) == 0) + np = devspec + 5; + else + return (EINVAL); unit = -1; /* * If there is path/file info after the device info, then any missing From nobody Tue Nov 11 01:06:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d57fP0CYZz64HG3; Tue, 11 Nov 2025 01:06:53 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) 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 (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E8" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d57fN4z0Wz3KGB; Tue, 11 Nov 2025 01:06:52 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Authentication-Results: mx1.freebsd.org; none 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 5565EA64805; Tue, 11 Nov 2025 01:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zabbadoz.net; s=20240622; t=1762823187; bh=4PAFU6jn9ZRj6kkPRz1wJOzv/tyf3NYt9PZL7Nx8EyI=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=Ehcikz2xhUI3SF7TkN48eghNedRAfDuQRLcAw0DtrzNrvLj80Ya/rQhNR2NaxXGfa iRf46+5lOyIQDuUaXAAXxONJYKcuxQx0IHyLYHv6pUP0o2SBV0P+lk0KsUnJTrV3cN 7lMD9Q6z59+RuVTdLg/FMWzAvzW9sgo1oJyssb9PZON31cggoJqmu267wJYlc7TmJS rUQcloFkD1lJNScE2PJI2DxAf9sEppWMOH0PoYphsFpxixe5bOHISW5o5qbB3BrKFV UNfGAcEJaN1CZou0kgMK0KTJ0x4Gr9wbCL3pnSBP2mEgbjGNYq/6qrtXQGif/lL0QB gZkc/dYvmUREmnxPU8AGhpXkr4uGoAwcck0hIwTULkZcmsVHLWyTp9FFB6qGaRh+1i B93X5WOL8lGiwSY5rR47BvrSsgEVC9m81JhlAX2W5afKmOh2tF/DnPDsXm6wFoXJxX H/DogbErcjovLYZiNGLGJ0N75vdeIfELOC7GsKCNCDAEXzUk64Y1HL7+ht4881jNqR eyaYLtvIKeHvxvAVrtaI1UJZ7yGdObIOfrKkXOaAFUPn9hNGeb6Gv4Jf/ua6PEB6qD dMM2oQyR8eZ7yAhOefaCXhPF4spT6AD8nG+utP0pZC/xMhe2aEk7lVsaZdSpX9FavV gMX4mHK+G4OFoC6Ws+6Xzhak= 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 652F62D029E6; Tue, 11 Nov 2025 01:06:39 +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 yL5cwZ-y6rx4; Tue, 11 Nov 2025 01:06:38 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using 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 4A2C72D029D8; Tue, 11 Nov 2025 01:06:38 +0000 (UTC) Date: Tue, 11 Nov 2025 01:06:38 +0000 (UTC) From: "Bjoern A. Zeeb" To: "David E. O'Brien" cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 3deb21f1afd5 - main - random: TPM_HARVEST should have been named RANDOM_ENABLE_TPM In-Reply-To: <202511110030.5AB0UxVW027191@gitrepo.freebsd.org> Message-ID: References: <202511110030.5AB0UxVW027191@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 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3320, ipnet:2003::/19, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4d57fN4z0Wz3KGB On Tue, 11 Nov 2025, David E. O'Brien wrote: > The branch main has been updated by obrien: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3deb21f1afd5c4abfd9cb93ca120097a841536c5 > > commit 3deb21f1afd5c4abfd9cb93ca120097a841536c5 > Author: David E. O'Brien > AuthorDate: 2025-10-28 03:53:43 +0000 > Commit: David E. O'Brien > CommitDate: 2025-11-10 20:54:48 +0000 > > random: TPM_HARVEST should have been named RANDOM_ENABLE_TPM > > * Enable RANDOM_ENABLE_TPM by default > > * The commit of TPM_HARVEST failed to add it to NOTES > so that the LINT kernel would build the code. > > Fixes: 4ee7d3b0118c82e651712bb65da53d08e78cd7b1 > Reviewed by: imp > Differential Revision: https://reviews.freebsd.org/D53460 This breaks the build: https://ci.freebsd.org/job/FreeBSD-main-amd64-build/33701/console -- Bjoern A. Zeeb r15:7 From nobody Tue Nov 11 02:46:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d59sW6ZHDz64QTx; Tue, 11 Nov 2025 02:46: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d59sW5wQyz3Xcy; Tue, 11 Nov 2025 02:46:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762829199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TmNhK8Q4sGMlcqqvlJpKfkHJXB+qiTOXvZDYqjgNIqc=; b=fDoKZrXcnNl0ZBYHeuN6lFpnU20zSnpLsnczY1NqEHmRTuXVYuwpkcOUOV4IZvtNe64DeG mt+2sgCPbL5UiqVRdjjPrdOZREM8vVTfjtUirdvPt5IFh09eXLjQ5XcZIGEKHrLnFFX/iJ 4yeisXJITMjKF3QFKX2LPIDyER+A0Af3bNNao4Swrvnk8P69uB0WcwtSP2VPaNngt344OD YSLEmQcA6QHChsEpaciRiRsY1saMEK6CbkFDEk/5te00PHY8D4/Gq1l7iZa4yaLuquTnl0 UP9wWBNTbXvnBjXV9j98S2ii7vP4ftBNrJrwb9BRm6LCvE0cTALe9XNj8uTUkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762829199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TmNhK8Q4sGMlcqqvlJpKfkHJXB+qiTOXvZDYqjgNIqc=; b=Q/qhKsKCL0nqvJ622uMYR8i9r7kz4tO5hO/BRrsvlOCIwfPigedYumN6wSE3/sT2vRMIDk XUgfrWEwG3in/Tae0cxY+H1U1UosqMWO37lcK+DDsnSOnDSkEbdIYEwfhwZuNGLEDmQ8+T b658X0jOY3r9AVp8UTjInVrGa0bhI9f1SqxmPNo+26c8px4eVwXxRHBOZGooLAa6hjQaO+ Xna7y0D/c6hx5KBqaaao+DqlvBsXHhpFcTVj449JTY5yvEn8d37XR4glTiuzSPiJLJVxg9 KVzpU1zo7P9KOhuYqLL9ige4X9HGMQdlsuu/4BaKZPpEc7UCTPHBB9jYhiiiCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762829199; a=rsa-sha256; cv=none; b=XFPouaqfj3gewRs86kJppqjZGFotCwNSWBznHinCcjFsdDXVspfSzhyXewdij7M3FRXhXN w51Z6YqmY8o/2mwdM30w971kCXsQa/Y/3knRU4YOkY2bnQv3sNxidoqn8QJq6wr/IajEEK 1CEA94Q0gFEPOHSXhdCR5ZRD+ywEZEkKFuNimAUMO+0L6XYXw+D4rueCnODccG9PZv/Z9R cN4dzI7vLh+VJ778U5NmIwC3y/+T4QOxj3GpwQV+HzhaSkXEcYn+r3kt53bF31iqluiY2d HjqjrrY6FoLjwSTJyLh1+JB8kg1suezD6I7SHIBdR/ickBMwhs6uoZA77U/VPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d59sW5TC2zl3X; Tue, 11 Nov 2025 02:46: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 5AB2kd9T077404; Tue, 11 Nov 2025 02:46:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AB2kdQc077401; Tue, 11 Nov 2025 02:46:39 GMT (envelope-from git) Date: Tue, 11 Nov 2025 02:46:39 GMT Message-Id: <202511110246.5AB2kdQc077401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: f1b9c1aafd84 - main - random: git'o in RANDOM_ENABLE_TPM List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1b9c1aafd8496c5bfdbc2be57bcfecfe58f12a8 Auto-Submitted: auto-generated The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=f1b9c1aafd8496c5bfdbc2be57bcfecfe58f12a8 commit f1b9c1aafd8496c5bfdbc2be57bcfecfe58f12a8 Author: David E. O'Brien AuthorDate: 2025-11-11 02:37:28 +0000 Commit: David E. O'Brien CommitDate: 2025-11-11 02:46:31 +0000 random: git'o in RANDOM_ENABLE_TPM Fixes: 3deb21f1a --- sys/dev/tpm/tpm20.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/tpm/tpm20.h b/sys/dev/tpm/tpm20.h index 7c2ccd30143a..b2cfcd4f25bd 100644 --- a/sys/dev/tpm/tpm20.h +++ b/sys/dev/tpm/tpm20.h @@ -128,7 +128,7 @@ struct tpm_sc { lwpid_t owner_tid; struct callout discard_buffer_callout; -#ifdef TPM_HARVEST +#if defined TPM_HARVEST || defined RANDOM_ENABLE_TPM struct timeout_task harvest_task; #endif From nobody Tue Nov 11 04:18:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5Cv45Qt0z66mty; Tue, 11 Nov 2025 04:18: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5Cv44q2gz3hD0; Tue, 11 Nov 2025 04:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762834688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3b4JmI3t/5vwVy/+jRVR5kebFm177yOrh0+yJ1/SrT8=; b=J7+9z5EU++ctSBFl7iDJ7bxNeWXsm1vGzrpaeiElTdoFtxidmz7bX+lM1bFem1i4Fa7cgG 4Gkt3YrK8vapel7AgLCWDiGIIE6v4wcNM5tSPjN0CHuBAjvI4pWnWoi01UGAzJ3NgMaGoK BZVD2VN468hxQH8rlXnlQj2tVMiJIHNe2ygBR+EtLPXgsyRbs/x645TLuIwq95DC8irIjr iUe1PtGvmkLQYVODZXL8PRbJ5nr0z11AZKDaN7IhHrOdvcsmS093PLzpu3ilxWWhz9w32C qUTExxJWDVgVxpPjEt7CYKDX/eqWRHtA+JKc0OfSEwWtikBOaP73gzQIi+duEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762834688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3b4JmI3t/5vwVy/+jRVR5kebFm177yOrh0+yJ1/SrT8=; b=oen9jP1op/uiTLFZJ37fiYasOYC65Xomf8YEQn7wCJ0+IQuNWKLpjtwAsP0iDAHTMNNYso 8FkHnyCjHgmmPNZW0Gq7WK5GWlYqQXZcznmRpOH4EgDRTXnwKCESBA7m+Ar/OUSpkCm07b ASxldsxLAjJScaUZ3aJqjfa8jWq2FXSjIN+EPe+7udcgMPPMRWlsnLXbLBintYMrrqoxLa iF69H9QQsb3Bh+d/scjovUeWFs0nEi9sKzVE//UxKES5Yhon/Z34oGiQLu68NVdGHbd31/ xW5vnnvOuTPpU6m8iZ80T7NtZvNj5zizdNjAcqAC101FQaRKSKWWwHxE0ioPrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762834688; a=rsa-sha256; cv=none; b=PGBbWI8Ke1CUfocHDbKtiK6yOb6slY29p7kUY7VdyY6awCkXZglhLprWGL5uqlm971zGEb dCg9vPKF3EP9gSpmV+QWq2J2PI4sJlLVUVAukUDorbDZTCT8pgjdEh9V6OYDe4zjWt6tu4 y9O6aylxN6FqRtRc/eMv7zB2glhVRVdqvuhqoo3KACFmrjzGH3xR7lA2pDBq+keIwSv5Zf Q4sTg+jAPngsU68jLoY2+1wXYEhahfuoONYwChaST10DwyfoD9ZMgcHegUop912s8S78o4 gZW5icBJn51k6jBO0kpFQwRCZ9l/X3WWqnqYWUfU52tt8wXD3w03/Gr21bGpew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5Cv44JJtzp9x; Tue, 11 Nov 2025 04:18: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 5AB4I8Ub049255; Tue, 11 Nov 2025 04:18:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AB4I8VT049252; Tue, 11 Nov 2025 04:18:08 GMT (envelope-from git) Date: Tue, 11 Nov 2025 04:18:08 GMT Message-Id: <202511110418.5AB4I8VT049252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: d6f10a5d013f - main - random: allow disabling of entropy harvesting from keyboard & mice List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6f10a5d013fdcc92847644ffbaf65cbf491bb39 Auto-Submitted: auto-generated The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=d6f10a5d013fdcc92847644ffbaf65cbf491bb39 commit d6f10a5d013fdcc92847644ffbaf65cbf491bb39 Author: David E. O'Brien AuthorDate: 2025-10-28 02:57:21 +0000 Commit: David E. O'Brien CommitDate: 2025-11-11 02:47:41 +0000 random: allow disabling of entropy harvesting from keyboard & mice Reviewed by: jmg Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D53390 --- sys/amd64/conf/GENERIC | 2 ++ sys/amd64/conf/MINIMAL | 2 ++ sys/arm/conf/GENERIC | 2 ++ sys/arm64/conf/std.arm64 | 2 ++ sys/conf/NOTES | 2 ++ sys/conf/options | 2 ++ sys/dev/vt/vt_core.c | 2 ++ sys/dev/vt/vt_sysmouse.c | 3 ++- sys/powerpc/conf/GENERIC64 | 4 ++++ sys/powerpc/conf/GENERIC64LE | 4 ++++ sys/riscv/conf/GENERIC | 4 ++++ 11 files changed, 28 insertions(+), 1 deletion(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 1de895a5b333..4e710e47fdae 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -326,6 +326,8 @@ device bpf # Berkeley packet filter device rdrand_rng # Intel Bull Mountain RNG device tpm # Trusted Platform Module options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 +options RANDOM_ENABLE_KBD +options RANDOM_ENABLE_MOUSE # USB support options USB_DEBUG # enable debug msgs diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index 2bd8851ab20c..8df3349b4c34 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -124,6 +124,8 @@ device bpf # Berkeley packet filter device rdrand_rng # Intel Bull Mountain RNG device tpm # Trusted Platform Module options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 +options RANDOM_ENABLE_KBD +options RANDOM_ENABLE_MOUSE # VirtIO support device virtio # Generic VirtIO bus (required) diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 0d741a7e584a..89841947713d 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -219,6 +219,8 @@ device smsc # SMSC LAN91C111 # random(4) device tpm # Trusted Platform Module options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 +options RANDOM_ENABLE_KBD +options RANDOM_ENABLE_MOUSE # Sound support device sound diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index 003f13c8f1cc..02bdd25f2d52 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -110,3 +110,5 @@ device smbios # random(4) device tpm # Trusted Platform Module options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 +options RANDOM_ENABLE_KBD +options RANDOM_ENABLE_MOUSE diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 71d14dc8915f..3d5f7dd8a71b 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2825,6 +2825,8 @@ options RANDOM_ENABLE_UMA # slab allocator # environment. options RANDOM_ENABLE_ETHER # ether_input +options RANDOM_ENABLE_KBD +options RANDOM_ENABLE_MOUSE options RANDOM_ENABLE_TPM # implies TPM_HARVEST # Module to enable execution of application via emulators like QEMU diff --git a/sys/conf/options b/sys/conf/options index 963263e8a732..2437c2c6908a 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -956,6 +956,8 @@ RANDOM_LOADABLE opt_global.h # the uma slab allocator. RANDOM_ENABLE_UMA opt_global.h RANDOM_ENABLE_ETHER opt_global.h +RANDOM_ENABLE_KBD opt_global.h +RANDOM_ENABLE_MOUSE opt_global.h RANDOM_ENABLE_TPM opt_global.h # This options turns TPM into entropy source. diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index bcf67ddc9689..a1376be954ee 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -876,7 +876,9 @@ vt_processkey(keyboard_t *kbd, struct vt_device *vd, int c) { struct vt_window *vw = vd->vd_curwindow; +#ifdef RANDOM_ENABLE_KBD random_harvest_queue(&c, sizeof(c), RANDOM_KEYBOARD); +#endif #if VT_ALT_TO_ESC_HACK if (c & RELKEY) { switch (c & ~RELKEY) { diff --git a/sys/dev/vt/vt_sysmouse.c b/sys/dev/vt/vt_sysmouse.c index f2f5a0fa5c3a..873dce123f7a 100644 --- a/sys/dev/vt/vt_sysmouse.c +++ b/sys/dev/vt/vt_sysmouse.c @@ -32,7 +32,6 @@ * SUCH DAMAGE. */ -#include #include "opt_evdev.h" #include @@ -222,7 +221,9 @@ sysmouse_process_event(mouse_info_t *mi) unsigned char buf[MOUSE_SYS_PACKETSIZE]; int x, y, iy, z; +#ifdef RANDOM_ENABLE_MOUSE random_harvest_queue(mi, sizeof *mi, RANDOM_MOUSE); +#endif mtx_lock(&sysmouse_lock); switch (mi->operation) { diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 91c91d58d058..e215651e4c3d 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -207,6 +207,10 @@ device xz # lzma decompression # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter +# random(4) +options RANDOM_ENABLE_KBD +options RANDOM_ENABLE_MOUSE + # USB support options USB_DEBUG # enable debug msgs device uhci # UHCI PCI->USB interface diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index 5fb9715de655..4759b70a3d1f 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -203,6 +203,10 @@ device xz # lzma decompression # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter +# random(4) +options RANDOM_ENABLE_KBD +options RANDOM_ENABLE_MOUSE + # USB support options USB_DEBUG # enable debug msgs device uhci # UHCI PCI->USB interface diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index a7e1200e3884..36e3fcd41970 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -197,6 +197,10 @@ device mmcsd # MMC/SD flash cards # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter +# random(4) +options RANDOM_ENABLE_KBD +options RANDOM_ENABLE_MOUSE + # Flattened Device Tree options FDT From nobody Tue Nov 11 06:56:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5HQD0t8Dz6Fvxd; Tue, 11 Nov 2025 06:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5HQC752Cz3vwY; Tue, 11 Nov 2025 06:56:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762844212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PBfSQLz3wUtY6cXJrVUTVs5lV8/Z9SqkQkNFf7Osjzk=; b=ktwRgNyZsfiIP8QEw0Lrh6rTQ4reCHdfXgV9UaZZlhuuz6hw3tAGvulAUSxClWmH8pfhLx /IWQ6ArN6l8ZPjE14J+5Ax3sM534G9EhCooBCo2X0rFXm4LOcKBvRWlAAkMgoDNV/AhKSg HQe22rWg/tMZqrM6fP/ClLL3QbQJbqr7TuCdNJIPjT/h1TlxlgTUL9Whl/LBgYjhm3L6t/ dxUunGhhNwkM66UizC7YdrIVtY9ypLlS7G4X5VE1LArYUMsN4G+u8xxL8kmBM0Z3ZZzNiB tMN5jaFvr6V/frlTdktvkYdSFLp1+BTvo7W5BBwjmSv/w5/qLGdJLHMfXdtMdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762844212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PBfSQLz3wUtY6cXJrVUTVs5lV8/Z9SqkQkNFf7Osjzk=; b=rA3zQTaeui/YhRpcmKUWF1PCis9lJebRP09hvvI661ISZxxEDcHWeH1QYQqIpwN2phn5XE XG94fVDa7wQF9vqB1s6Mm7Z0LSLJq2BBveSvLbOzfQqul2by8AQStSEbqIcRQqcqhi4DZt gZbulNgTwhMhFU/PTjD2m3rRTaMPyH6EliSoYVh2ymsSOLG/TL9iCxf4kDr5Mie6+QLUmD CnZ2wYp7wGFxhsNgMDR67YR3bAgnuJLfKOeHjvciSSoHSofFFpjKb4MvRU9733GemgeA8T J+Iidtd6Lg/qkdqTY9YX8bSmk7QdHMcvA6MyJM/zORcbKvQ339GPOeX+pZGIqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762844212; a=rsa-sha256; cv=none; b=NeEK9qOPoNilFCE37n0RR6TnsksT+LwGUkziGhenHgdOyl7FldWOixP3oQS4D8LB5d8DmL VFngEYKYZjU0+qMFAkwCuLiG2JG5RunZcq5rbG1mbhnUmAaV9yXXIRHsD1kpfY5mwuQ/MV IddUMzieNfBWTuBtWFewfjZu68eTjsq0aQkR0y0A+lMueVM9fV7z7gDRlR3g1yDav/4Z8c nvpQyc+0fZudVyG8D+eBfN0lvz8/bWCCQqIpClcPwRozymL9B6MFahWGlxDlzewtRSpwAk NiiIuA2rqIGDePNoFQ34hsTYXUbkO1Up+YU43n6h1B0n2dzYAJzwC+zfz6jjPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5HQC6g4Tzsyp; Tue, 11 Nov 2025 06:56: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 5AB6upcq048050; Tue, 11 Nov 2025 06:56:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AB6uprR048046; Tue, 11 Nov 2025 06:56:51 GMT (envelope-from git) Date: Tue, 11 Nov 2025 06:56:51 GMT Message-Id: <202511110656.5AB6uprR048046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: df84867e8af4 - main - Azure: Fix image 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df84867e8af49437bdc76a0df41d78f5a362cd24 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=df84867e8af49437bdc76a0df41d78f5a362cd24 commit df84867e8af49437bdc76a0df41d78f5a362cd24 Author: Colin Percival AuthorDate: 2025-11-11 02:33:54 +0000 Commit: Colin Percival CommitDate: 2025-11-11 06:56:30 +0000 Azure: Fix image names We need to specify the correct image names -- *.vhdf, not *.vhd -- in order for them to upload. 15.0 candidate Reviewed by: lwhsu MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53684 --- release/Makefile.azure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.azure b/release/Makefile.azure index 09dcde6af636..577221ee3899 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -39,7 +39,7 @@ azure-check-depends: .endif .for _FS in ${AZURE_FSLIST} -AZURE_IMG_${_FS}= ${.OBJDIR}/azure.${_FS}.vhd +AZURE_IMG_${_FS}= ${.OBJDIR}/azure.${_FS}.vhdf AZURE_TARGET_${_FS}= ${OSRELEASE}-${_FS}${SNAPSHOT_DATE} azure-do-upload-${_FS}: From nobody Tue Nov 11 08:54:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5L1v5nLNz6G55Y; Tue, 11 Nov 2025 08:54: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5L1v5CR9z3DMV; Tue, 11 Nov 2025 08:54:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762851267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vpb+rTSgHT6SHQOvUszOvD/8rxnsElhU9hCJzEzflYM=; b=NTNMnVIjVSxUaXTkU+EsFV0FJ6xPsVrCY1QloFQh9pxfqIamseqHfx1Yg1eLkgITAzMpcL V3Yg9C9DQOE8MnsDMBgMAXEHAs+iTDiniIwx8jVZMjb5U0SXriB+ERgh4TWjmDl0X97SNe OPPcvbfmnnjU7Y1CISObm375HOC+Lv0efuG8x0mn6vw0nCZCmcx2m9pGp64g7gZ+rxVR/R 7COAE0bJRzF1T3nPn+BiEPCPn8GYtbthW+DUqY834VzNMec3MBqNrwa86KDRIasY7aB/oA Jv2TW+qN1dJ/p3nnO/4dk83YH6uUw7L6cZyL8djewxHCKX6peLaNBMKUZFJ1HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762851267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vpb+rTSgHT6SHQOvUszOvD/8rxnsElhU9hCJzEzflYM=; b=hqojcQhPxx1PUZwVC6XlWge8ht4Hndw4sjqdX5d0Fv9wTz+t0ltw74+LpTAwoV2Wh7owhz Tsetu1qJh2uh6C0pM/AgBu4tNtIT58rij+pjzTfAfUMyxw3v/VeckVKW2t32R0MvuzbY9Z C4yTg6YI/M83SpJtF6fZea21GUuIQS7Ro2EqCANhlE6uN9vpeInlE/hrqAT6PzIfUgvT4h vo9vdSuulHNPT/8DsjEzJj7B5ehJAQk1PR+OSSdQ4F/ZHbkiB+FhRLETVA4R3IhMAtXip8 i6e0gS9B4IC3f2Jb0DaPtay3oUlM+iqHZVgv+qthLNLaDRo1X+ZryWSYWEWWJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762851267; a=rsa-sha256; cv=none; b=BvSnmPAaBT8fLr7/bA2+XbKxXsThNR1yJRq0+5vsgsigIVs65mUF0qYnwP9cegvcblH1rl C3pDx3Xn7b7TarceTaWZg1nIoq5AB6NWAmnAsf4sBORaGmcUzxiD2/1jon+Q9nMMMr6fHP g4Z+f4yL0TahOeNubXb5DUFX/Lu1V5hd4QTJ5xJCoemnf1U4vVTYPedv/hs53tpXeizgLH J21eV5awDkvt67k6ZHX74/jrtaUOtxKIxrF6hKokRBLhjYoT2Ty24XcX/4+D3FuXLExShS JxtEIqthVe/62eTXIFY7XGeHUdW4FswkZctpb1B1aFyfQdcTvoLp8n4vSJg87A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5L1v4hTYzxWH; Tue, 11 Nov 2025 08:54: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 5AB8sRXh073439; Tue, 11 Nov 2025 08:54:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AB8sRog073436; Tue, 11 Nov 2025 08:54:27 GMT (envelope-from git) Date: Tue, 11 Nov 2025 08:54:27 GMT Message-Id: <202511110854.5AB8sRog073436@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: e1c6f4cb9bd2 - main - kern_thread: thread_suspend_check(1) must never suspend List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: e1c6f4cb9bd29358c2b2fe249af9a2f9626b0670 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e1c6f4cb9bd29358c2b2fe249af9a2f9626b0670 commit e1c6f4cb9bd29358c2b2fe249af9a2f9626b0670 Author: Konstantin Belousov AuthorDate: 2025-11-06 19:25:23 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-11 08:54:05 +0000 kern_thread: thread_suspend_check(1) must never suspend Reported by: bdrewery Reviewed by: bdrewery, markj Tested by: bdrewery, pho PR: 290843 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53624 --- sys/kern/kern_thread.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 3180c66cb42b..4f9053460455 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -1446,6 +1446,14 @@ thread_suspend_check(int return_instead) return (TD_SBDRY_INTR(td) ? TD_SBDRY_ERRNO(td) : 0); } + /* + * We might get here with return_instead == 1 if + * other checks missed it. Then we must not suspend + * regardless of P_SHOULDSTOP() or debugger request. + */ + if (return_instead) + return (EINTR); + /* * If the process is waiting for us to exit, * this thread should just suicide. @@ -1481,10 +1489,9 @@ thread_suspend_check(int return_instead) * gets taken off all queues. */ thread_suspend_one(td); - if (return_instead == 0) { - p->p_boundary_count++; - td->td_flags |= TDF_BOUNDARY; - } + MPASS(!return_instead); + p->p_boundary_count++; + td->td_flags |= TDF_BOUNDARY; PROC_SUNLOCK(p); mi_switch(SW_INVOL | SWT_SUSPEND); PROC_LOCK(p); From nobody Tue Nov 11 12:07:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QK862sMz6GL7l; Tue, 11 Nov 2025 12:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QK85XHCz3bL9; Tue, 11 Nov 2025 12:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pcXxqrwzwAefv5LUmikjgXBB+9qVEW0NlFbBn2fuyAo=; b=q6e7XpWg9ZkmfuuX3bniWks6lxkqMXuk0K6+3ANoraLp0j94I5p+Gwi99lHchpBrep0o+S hv1VU3wxwlLdI8yas8HXaCYDpLACJb4XhEImeZC3qTrBpI0AvpVIYJHDMH0ZQBMZyohiYb x+mNcL2VPXWzhJKiYCXtELheHtrlTnd7ey3+ufDkKP1M0I9Bu90lLOuo4RCnF4mJw6NBAn a5IKTnPG4S/xXcnFZjjDxucrt9Izy8OqcTrBnD8usr7dJOE0s7QcOBeRXkNbgKKRl87gpk lOuwndmRcThO00ArQckLQD90R5OJuLxoNIMu4o60h1OLF2ixeVo5zHpuWWfIqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pcXxqrwzwAefv5LUmikjgXBB+9qVEW0NlFbBn2fuyAo=; b=MKULcPp3zuIR4WCftBuhC8HrTkk+UdxjsXf/JDiKMge2Tnb1p+//9z6LTy+eFx+vsvTLhQ O5V4uun/O7TwhoZ3q4rUrCUCvG+43dBVEbtKB7JW2NiUlvOuKL/P+Yyjkx8A4Bsz7AXmVK SoooxclO33bR7OuSh3aurvra349e34jNjPX3LXgM0aQPZmKyKNjLpGdWoVflUaOYpxwW+P hw/jKIrCAl+uE1Ctz6j74YswhCsJN+OuyOij479oJTAXPSJZnBTL09yR909/ive+8bQRCv in+fVdGmsdu6h3IpRcikLiLEReL7s30v81+gbj6gWdlyHCO1k78wQMcccroFYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862876; a=rsa-sha256; cv=none; b=rQzxnBYMMtnIhiVqYrxmIFyTA53NUUuPlYPKCEQHvQCquE+VSnifreXF+YcIOYDGVquk+I dfmW1eaGrUBhNeIqKWtEKAV2hJ+MpRf3RrdL6IUZlgnxwk5knZ5hbKhJnzT3B6Y5h9MLv6 xxKjja7HqWA8Wv3RK4aLibHkkOUD5cfojGEXuu3/+uyVbYB7Ht7vPRx+hwd38wY2AT+V97 pObBg6Fes0PRilcLh3wHalaiXflnhI99YMXDHNi89waA6yfHaAQds9nlYkRKf5oZjFFj2H I1eer1XlHkXKKBNXQMgk8zqGQVeHizwV7PAWdbwQpA6pVRrDMsLaLRpE+rvlyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QK8526xz13Zf; Tue, 11 Nov 2025 12:07: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 5ABC7ulK034653; Tue, 11 Nov 2025 12:07:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC7uL2034650; Tue, 11 Nov 2025 12:07:56 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:07:56 GMT Message-Id: <202511111207.5ABC7uL2034650@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: 4181bf9d1816 - main - sound: Add kqueue 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4181bf9d18166c4061bfa137b8a46972a5a55f67 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4181bf9d18166c4061bfa137b8a46972a5a55f67 commit 4181bf9d18166c4061bfa137b8a46972a5a55f67 Author: Christos Margiolis AuthorDate: 2025-11-11 12:04:45 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:04:45 +0000 sound: Add kqueue support Co-authored by: meka@tilda.center Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53029 --- sys/dev/sound/pcm/channel.c | 9 +++-- sys/dev/sound/pcm/channel.h | 1 + sys/dev/sound/pcm/dsp.c | 82 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 4d13f20a5262..062eeb251a5b 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -271,7 +271,7 @@ chn_lockdestroy(struct pcm_channel *c) * @retval 1 = ready for I/O * @retval 0 = not ready for I/O */ -static int +int chn_polltrigger(struct pcm_channel *c) { struct snd_dbuf *bs = c->bufsoft; @@ -313,6 +313,7 @@ chn_wakeup(struct pcm_channel *c) bs = c->bufsoft; if (CHN_EMPTY(c, children.busy)) { + KNOTE_LOCKED(&bs->sel.si_note, 0); if (SEL_WAITING(sndbuf_getsel(bs)) && chn_polltrigger(c)) selwakeuppri(sndbuf_getsel(bs), PRIBIO); CHN_BROADCAST(&c->intr_cv); @@ -1277,6 +1278,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, } c->bufhard = b; c->bufsoft = bs; + knlist_init_mtx(&bs->sel.si_note, c->lock); c->devinfo = CHANNEL_INIT(c->methods, devinfo, b, c, direction); if (c->devinfo == NULL) { @@ -1373,8 +1375,11 @@ chn_kill(struct pcm_channel *c) feeder_remove(c); if (c->devinfo && CHANNEL_FREE(c->methods, c->devinfo)) sndbuf_free(b); - if (bs) + if (bs) { + knlist_clear(&bs->sel.si_note, 0); + knlist_destroy(&bs->sel.si_note); sndbuf_destroy(bs); + } if (b) sndbuf_destroy(b); CHN_LOCK(c); diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index 9ad21d219001..15180bc8f0b6 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -261,6 +261,7 @@ int chn_read(struct pcm_channel *c, struct uio *buf); u_int32_t chn_start(struct pcm_channel *c, int force); int chn_sync(struct pcm_channel *c, int threshold); int chn_flush(struct pcm_channel *c); +int chn_polltrigger(struct pcm_channel *c); int chn_poll(struct pcm_channel *c, int ev, struct thread *td); char *chn_mkname(char *buf, size_t len, struct pcm_channel *c); diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 27d5b740b90b..1b205d7229fc 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -81,6 +81,7 @@ static d_ioctl_t dsp_ioctl; static d_poll_t dsp_poll; static d_mmap_t dsp_mmap; static d_mmap_single_t dsp_mmap_single; +static d_kqfilter_t dsp_kqfilter; struct cdevsw dsp_cdevsw = { .d_version = D_VERSION, @@ -89,6 +90,7 @@ struct cdevsw dsp_cdevsw = { .d_write = dsp_write, .d_ioctl = dsp_ioctl, .d_poll = dsp_poll, + .d_kqfilter = dsp_kqfilter, .d_mmap = dsp_mmap, .d_mmap_single = dsp_mmap_single, .d_name = "dsp", @@ -2962,6 +2964,86 @@ dsp_oss_getchannelmask(struct pcm_channel *wrch, struct pcm_channel *rdch, return (ret); } +static void +dsp_kqdetach(struct knote *kn) +{ + struct pcm_channel *ch = kn->kn_hook; + + if (ch == NULL) + return; + CHN_LOCK(ch); + knlist_remove(&ch->bufsoft->sel.si_note, kn, 1); + CHN_UNLOCK(ch); +} + +static int +dsp_kqevent(struct knote *kn, long hint) +{ + struct pcm_channel *ch = kn->kn_hook; + + CHN_LOCKASSERT(ch); + if (ch->flags & CHN_F_DEAD) { + kn->kn_flags |= EV_EOF; + return (1); + } + kn->kn_data = 0; + if (chn_polltrigger(ch)) { + if (kn->kn_filter == EVFILT_READ) + kn->kn_data = sndbuf_getready(ch->bufsoft); + else + kn->kn_data = sndbuf_getfree(ch->bufsoft); + } + + return (kn->kn_data > 0); +} + +static const struct filterops dsp_filtops = { + .f_isfd = 1, + .f_detach = dsp_kqdetach, + .f_event = dsp_kqevent, +}; + +static int +dsp_kqfilter(struct cdev *dev, struct knote *kn) +{ + struct dsp_cdevpriv *priv; + struct snddev_info *d; + struct pcm_channel *ch; + int err = 0; + + if ((err = devfs_get_cdevpriv((void **)&priv)) != 0) + return (err); + + d = priv->sc; + if (!DSP_REGISTERED(d)) + return (EBADF); + PCM_GIANT_ENTER(d); + switch (kn->kn_filter) { + case EVFILT_READ: + ch = priv->rdch; + break; + case EVFILT_WRITE: + ch = priv->wrch; + break; + default: + kn->kn_hook = NULL; + err = EINVAL; + ch = NULL; + break; + } + if (ch != NULL) { + kn->kn_fop = &dsp_filtops; + CHN_LOCK(ch); + knlist_add(&ch->bufsoft->sel.si_note, kn, 1); + CHN_UNLOCK(ch); + kn->kn_hook = ch; + } else + err = EINVAL; + PCM_GIANT_LEAVE(d); + + return (err); +} + #ifdef OSSV4_EXPERIMENT /** * @brief Retrieve an audio device's label From nobody Tue Nov 11 12:07:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKB1lx9z6GL7r; Tue, 11 Nov 2025 12:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKB0Gttz3bCM; Tue, 11 Nov 2025 12:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u7d7SpoKVRz5qSLBph3EE300IVCkyuOccc1uTwvXtA0=; b=gVZH/4mV5Zsd9Hysf/jmKgzikS4mK0x31h0P1h9sM8q+c7NK4t22iGZ/HIWCYFoUZa+muy 03p5X9kWBkCoNWg1BUXttxuZ6vyzOT1ex4mpb20lusTJiWq2LBO9VSlsxLcJ239u+WY1UN prdQjE8hsX2vlj3kBLexRLwsS22OnNbL2Xlot5HWGJ4eGmB/Tpe5gnxZWp9//mscWClR4U D1Z9H0gcYM0/KeYf+PFznwADItBkKLp0wDeDZGB6QSWiWafFGb/2xj2GdzLcYyu8JWvjjo hhBqRNMWaTipbfBFdOUWDJJvlvePFTYlbWmYeDG4j7CpNNrG09POys/0dPxudw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u7d7SpoKVRz5qSLBph3EE300IVCkyuOccc1uTwvXtA0=; b=LT+sdu5hs0rA5Eb6G+sSIsJCkduuhjWscWRbr0ls1cb4tCFhtyg0bOhJDkOrfZ8xqvYJ6z /NfvALAk/GtUv+OKTG24R+Tf/fkZPeyyZVn2ZnyPWUGNjrSyjWwaLWuFvs5PzfbU6mSMJx Rh1c93B1GggA8UGoX9bSNe1eHaYZPl+zEwzpmCQBxrTfNEh0AohcOmTtUVbJLWjNJbyJwb JuZScozWi4UKSgwxH+L6FeNKmV8rAkxLfDVm8dIjrp+gCtK/AHJgcuwPqFz2miePwHaDDY ybvnX7Woit9lhuxY+leFj0QpyQ2w+UGWwVhWJEUXr9TD11HMJdv4zkzLbjP8kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862878; a=rsa-sha256; cv=none; b=wQGzeXTj0Y8dFOQwXc6dbhtFy3wTkwnbQwSuz7aMAsLz/muYwwfqlIECcXl9b/UPe+hGHa qn5xr51622Y7/i5CXxq43v0n58EGIkPtfMgGIrjnx/Xml3p0GEKb+4fTPchubd+URG2y8c 5D7smi+8p6NBD3yfsWKxxnYgazFdBHKvzJH7w9mHTQ0cONFVtKVEa72/Mu2tVLPC1savos 9YjLIvyuIji4UTBKw8COnM26MSZmulMap1ntFO2OpLr5kFOEwsgCbhIH3J4s6ZPFT0jiqY Ku8Uql11O8tA/vWUr4j+N3SVZVv8Mp5cepMT5kqBxTMoiNXNXbck90RhvpQv8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QK96zVzz13C4; Tue, 11 Nov 2025 12:07: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 5ABC7vUi034694; Tue, 11 Nov 2025 12:07:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC7vhD034691; Tue, 11 Nov 2025 12:07:57 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:07:57 GMT Message-Id: <202511111207.5ABC7vhD034691@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: dd81b19ef236 - main - sound tests: Test polling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: dd81b19ef23622d03d7c75935e11c2b2af3f4cb8 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=dd81b19ef23622d03d7c75935e11c2b2af3f4cb8 commit dd81b19ef23622d03d7c75935e11c2b2af3f4cb8 Author: Christos Margiolis AuthorDate: 2025-11-11 12:04:54 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:04:54 +0000 sound tests: Test polling Co-authored by: meka@tilda.center Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53188 --- tests/sys/sound/Makefile | 1 + tests/sys/sound/polling.c | 204 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 205 insertions(+) diff --git a/tests/sys/sound/Makefile b/tests/sys/sound/Makefile index 74a0765a0540..ab52a7aad386 100644 --- a/tests/sys/sound/Makefile +++ b/tests/sys/sound/Makefile @@ -3,6 +3,7 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/sound ATF_TESTS_C+= pcm_read_write +ATF_TESTS_C+= polling ATF_TESTS_C+= sndstat CFLAGS+= -I${SRCTOP}/sys diff --git a/tests/sys/sound/polling.c b/tests/sys/sound/polling.c new file mode 100644 index 000000000000..eefe5d174549 --- /dev/null +++ b/tests/sys/sound/polling.c @@ -0,0 +1,204 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 The FreeBSD Foundation + * + * This software was developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include +#include +#include +#include +#include + +#define FMT_ERR(s) s ": %s", strerror(errno) + +static int +oss_init(void) +{ + int fd, tmp, rc; + + fd = open("/dev/dsp.dummy", O_RDWR); + ATF_REQUIRE_MSG(fd >= 0, FMT_ERR("open")); + + tmp = 2; + rc = ioctl(fd, SNDCTL_DSP_CHANNELS, &tmp); + ATF_REQUIRE_EQ_MSG(rc, 0, FMT_ERR("ioctl")); + + tmp = AFMT_S16_LE; + rc = ioctl(fd, SNDCTL_DSP_SETFMT, &tmp); + ATF_REQUIRE_EQ_MSG(rc, 0, FMT_ERR("ioctl")); + + tmp = 48000; + rc = ioctl(fd, SNDCTL_DSP_SPEED, &tmp); + ATF_REQUIRE_EQ_MSG(rc, 0, FMT_ERR("ioctl")); + + /* + * See http://manuals.opensound.com/developer/SNDCTL_DSP_SETTRIGGER.html + */ + tmp = PCM_ENABLE_INPUT | PCM_ENABLE_OUTPUT; + rc = ioctl(fd, SNDCTL_DSP_SETTRIGGER, &tmp); + ATF_REQUIRE_EQ_MSG(rc, 0, FMT_ERR("ioctl")); + + return (fd); +} + +ATF_TC(poll_kqueue); +ATF_TC_HEAD(poll_kqueue, tc) +{ + atf_tc_set_md_var(tc, "descr", "kqueue(2) test"); + atf_tc_set_md_var(tc, "require.kmods", "snd_dummy"); +} + +ATF_TC_BODY(poll_kqueue, tc) +{ + struct kevent ev; + int16_t buf[32]; + int fd, kq; + + fd = oss_init(); + + kq = kqueue(); + ATF_REQUIRE_MSG(kq >= 0, FMT_ERR("kqueue")); + EV_SET(&ev, fd, EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, 0); + ATF_REQUIRE_MSG(kevent(kq, &ev, 1, NULL, 0, NULL) == 0, + FMT_ERR("kevent")); + + ATF_REQUIRE_MSG(kevent(kq, NULL, 0, &ev, 1, NULL) == 1, + FMT_ERR("kevent")); + ATF_REQUIRE_MSG((ev.flags & EV_ERROR) == 0, "EV_ERROR is set"); + ATF_REQUIRE_MSG(ev.data != 0, "data is %ld", ev.data); + ATF_REQUIRE_MSG(read(fd, buf, sizeof(buf)) > 0, FMT_ERR("read")); + + EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, 0); + close(kq); + + kq = kqueue(); + ATF_REQUIRE_MSG(kq >= 0, FMT_ERR("kqueue")); + EV_SET(&ev, fd, EVFILT_WRITE, EV_ADD | EV_CLEAR, 0, 0, 0); + ATF_REQUIRE_MSG(kevent(kq, &ev, 1, NULL, 0, NULL) == 0, + FMT_ERR("kevent")); + + ATF_REQUIRE_MSG(kevent(kq, NULL, 0, &ev, 1, NULL) == 1, + FMT_ERR("kevent")); + ATF_REQUIRE_MSG((ev.flags & EV_ERROR) == 0, "EV_ERROR is set"); + ATF_REQUIRE_MSG(ev.data != 0, "data is %ld", ev.data); + ATF_REQUIRE_MSG(write(fd, buf, sizeof(buf)) > 0, FMT_ERR("write")); + + EV_SET(&ev, fd, EVFILT_WRITE, EV_DELETE, 0, 0, 0); + close(kq); + + close(fd); +} + +ATF_TC(poll_poll); +ATF_TC_HEAD(poll_poll, tc) +{ + atf_tc_set_md_var(tc, "descr", "poll(2) test"); + atf_tc_set_md_var(tc, "require.kmods", "snd_dummy"); +} + +ATF_TC_BODY(poll_poll, tc) +{ + struct pollfd pfd[2]; + int16_t buf[32]; + int fd; + bool rd = false; + bool wr = false; + + fd = oss_init(); + + while (!rd || !wr) { + pfd[0].fd = fd; + pfd[0].events = POLLIN; + pfd[1].fd = fd; + pfd[1].events = POLLOUT; + ATF_REQUIRE_MSG(poll(pfd, sizeof(pfd) / sizeof(struct pollfd), + -1) > 0, FMT_ERR("poll")); + + if (pfd[0].revents) { + ATF_REQUIRE_MSG(read(fd, buf, sizeof(buf)) > 0, + FMT_ERR("read")); + rd = true; + } + if (pfd[1].revents) { + ATF_REQUIRE_MSG(write(fd, buf, sizeof(buf)) > 0, + FMT_ERR("write")); + wr = true; + } + } + close(fd); +} + +ATF_TC(poll_select); +ATF_TC_HEAD(poll_select, tc) +{ + atf_tc_set_md_var(tc, "descr", "select(2) test"); + atf_tc_set_md_var(tc, "require.kmods", "snd_dummy"); +} + +ATF_TC_BODY(poll_select, tc) +{ + fd_set fds[2]; + int16_t buf[32]; + int fd; + bool rd = false; + bool wr = false; + + fd = oss_init(); + + while (!rd || !wr) { + FD_ZERO(&fds[0]); + FD_ZERO(&fds[1]); + FD_SET(fd, &fds[0]); + FD_SET(fd, &fds[1]); + ATF_REQUIRE_MSG(select(fd + 1, &fds[0], &fds[1], NULL, NULL) > 0, + FMT_ERR("select")); + if (FD_ISSET(fd, &fds[0])) { + ATF_REQUIRE_MSG(read(fd, buf, sizeof(buf)) > 0, + FMT_ERR("read")); + rd = true; + } + if (FD_ISSET(fd, &fds[1])) { + ATF_REQUIRE_MSG(write(fd, buf, sizeof(buf)) > 0, + FMT_ERR("write")); + wr = true; + } + } + close(fd); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, poll_kqueue); + ATF_TP_ADD_TC(tp, poll_poll); + ATF_TP_ADD_TC(tp, poll_select); + + return (atf_no_error()); +} From nobody Tue Nov 11 12:07:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKC3Ddsz6GL1k; Tue, 11 Nov 2025 12:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKC0HJ0z3bNJ; Tue, 11 Nov 2025 12:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=93fhhe5wDbp4pRasfef1wA7RotmEKrgYj7h2fiNbv48=; b=JwZ1F5SXQfxh6hiGi5Lj0ODaK+oZgA6suzAOZ7dAulXxyYx0QPZXTNubzIa+TgRxE6z045 U9urTIcTx0y2iBnqXnBanHVsb9DY1D2f5A4bS4uf5sMUuytqsDIZDo9ElaKm1HwvXBjl1O XEz/NeQN345PT/0G0RcSGAY9GqmMzUT/RnE/V4AX5u3LhAJ5fPZqHqYTsTG9Ikz3hl/g3x JoxVs5uqlYfJQW90IE+IDtxY/UDAviIifyXOv/i9KJA+6Yx+JU2uAWXikynJstal4ZeEKF DRo5C5KVMKXRjJOEvTEIX7ji7NXCP87NUG7F8ZfoeesxkYB+AuphvV4tQ3xtDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=93fhhe5wDbp4pRasfef1wA7RotmEKrgYj7h2fiNbv48=; b=aYUVw4CWrDpev2kgaRVtYq7mZMUpgo5VEHXsIwnOoM4qb5LBySyHOPW0mU/cqtHMvuYs1B RZXeJn6otW9x5Sg9p4k9nrtsUZGE3bRHsBbDX5GMkBFEoPUihsCTZsA4tHU1+A80BL/+WS OGWFxI/1nSZu+dgLqh0aKdEPt+JHMeX4GJrGOPZ+lBcJyUtSiAZkuEU2sL9fXy8+IRANi6 2I+RPwFacbls+iPeEY/Wa8DxQQRXVHwa98NJWlIHemz9ATqzSfV5Iu0naY7q94VTqls+qY sgXDceNnBzq01nFQehm2QnhvQ6tm6clJAXHtVp2Yu2R5Mmuq7VZlnIdpI1oUgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862879; a=rsa-sha256; cv=none; b=rKmx9hgrBYOw0HXwtCwWnpr1B9eUAlWf5rl99R/4SE8Jq4EDSekpyV2JewCV3hdbK1wftK ChkhEYsl6gW4LWGwWkvkqTCl34RZski7pChnN27r5btdxD8sg5jrfc/rXSNaY0cX+3yFP1 FHVGUAaYvZ01bLsqy6XPvYooJu6iT+o2QN/nXiWBSeWnGk74iDUIUixu8pt8+dTwr5+TyT VWVAdSlPABvfx/KiU8cDasYZ509mLgiRvD+iSFJOumVsGZ/Ni6DudUDlqXzBHC1knHdHsy W9qpnUYmEhGSgAw/z4fM9sbQZPfsr3c+4klQYXcd4bBwoNJCKHj0nNUFKrVUCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKB6w8Tz13nY; Tue, 11 Nov 2025 12:07: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 5ABC7wQf034736; Tue, 11 Nov 2025 12:07:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC7wu8034733; Tue, 11 Nov 2025 12:07:58 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:07:58 GMT Message-Id: <202511111207.5ABC7wu8034733@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: 3ba4e3d352e5 - main - sound: Retire unused snd_dbuf->dir List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 3ba4e3d352e5fbc550645a76064ca16460616d86 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3ba4e3d352e5fbc550645a76064ca16460616d86 commit 3ba4e3d352e5fbc550645a76064ca16460616d86 Author: Christos Margiolis AuthorDate: 2025-11-11 12:04:58 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:04:58 +0000 sound: Retire unused snd_dbuf->dir Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53518 --- sys/dev/sound/pcm/buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/buffer.h b/sys/dev/sound/pcm/buffer.h index ddf4083ec19f..841bfb85af3c 100644 --- a/sys/dev/sound/pcm/buffer.h +++ b/sys/dev/sound/pcm/buffer.h @@ -41,7 +41,7 @@ struct snd_dbuf { volatile int rl; /* length of ready area */ volatile int hp; volatile u_int64_t total, prev_total; - int dmachan, dir; /* dma channel */ + int dmachan; /* dma channel */ u_int32_t fmt, spd, bps, align; unsigned int blksz, blkcnt; int xrun; From nobody Tue Nov 11 12:07:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKD3RZmz6GKfq; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKD1NY1z3bR2; Tue, 11 Nov 2025 12:08:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f1W1BdIM2F3uh64oldvgQB4vuNCqL69kTeqMK1L/K44=; b=F8gItfn74Udfvy/FmR8Nc8CTmxv6LUFcYWtU8CWH2tlUCyoJjOhy4AVe/4t/dEcMBdWZek 16KaAFFfj7IQJ0NSVgCc12dg6Pm+Z2OaHskL3Yh/cCWPR6OHUeefg8iaCXCjM4Cz5LAT7S DcZUXermI1Xq5DzxlBV+KV6M7dyjP4795V3Q7jcDNxieFQ6NDXmaFmX4IjG8Ews8oM0x7o LeHNau+lp9C9xmIPShzPxpDtWj8icnxMoc5XbebgMBsvSFHasrbg0SQ7SknpvrpmjC31ET L/b6l7z2ifZ4xpzWftBOw44cyalX745nMieopoZNDvTdmag6ilecD7/M4z1yBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f1W1BdIM2F3uh64oldvgQB4vuNCqL69kTeqMK1L/K44=; b=RfySmNpclIjG0QiOZvZIkohPyp4YpRNheTgzYMcstVRy5q9OUbFjDhNplVpj10wptoqB+p 1W8/97iG8XBP6hjSra01P6GSi4pzglcY4Rh02ClvcQoJPle62qgF4f4oW1T7oaWo7eX2O0 0MVKG3anYkTA0AyKHMsfulf8xtU5RYDnNA0ZdpBSIkEP4qwu1tHleRZNGt1860MRlheeSj 1QqAwqyp81SB+zUR2rBzbU4WScJuqlCZS3UcGEa0+XSgCHjHzFXYbLo4Fe4e/4v+Uua/rQ 3xV+NlktWy/k+oWOdTUHHzUBo1LxpTcuUh2CnOohYST6YAy8moqCwRaUU4HU4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862880; a=rsa-sha256; cv=none; b=b2NXmKcWODEeDVdKdymnPzL6r19AzQj5D/1L6kv0TxbB9/eE6/lHwbP6NCAu3/4Qnc/gsZ N9VT6WHaZ0x+vdnFzvjCD8XiYSh25tKW1dTPnEYNHDPG8a/Onbx9tSngck+lzkalQ+EbMT cpV8FE/c5GPRlZTBG7+EmApxzbbJMkFvdErGACUZRjPGUHG0jzQPr0/8oazeDLL0gZJGzd ZuThzH1vA0VgCwfa4MB03u8RZy7xnTZLjZXq8PIMF9o2g+zi0qR5hybBF2KoMV7NRwdvW1 233onYOA3mCzwG1Q14a3Pj+QkRGEB1eLFEWuW00++hEa1IojM8qQ+vzThK2IVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKD0SBgz13Lc; Tue, 11 Nov 2025 12:08: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 5ABC7xNv034771; Tue, 11 Nov 2025 12:07:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC7x9p034768; Tue, 11 Nov 2025 12:07:59 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:07:59 GMT Message-Id: <202511111207.5ABC7x9p034768@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: 55540ebc33ad - main - sound: Retire snd_dbuf->dev List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 55540ebc33ad9a52bc4de121cb598243153981a8 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=55540ebc33ad9a52bc4de121cb598243153981a8 commit 55540ebc33ad9a52bc4de121cb598243153981a8 Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:03 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:03 +0000 sound: Retire snd_dbuf->dev Redundant, and if we at some point really need this, we can fetch it from snd_dbuf->channel->dev. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53519 --- sys/dev/sound/pcm/buffer.c | 5 ++--- sys/dev/sound/pcm/buffer.h | 3 +-- sys/dev/sound/pcm/channel.c | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index de535ec2dcba..0b77ab599aed 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -41,13 +41,12 @@ #include "snd_fxdiv_gen.h" struct snd_dbuf * -sndbuf_create(device_t dev, char *drv, char *desc, struct pcm_channel *channel) +sndbuf_create(char *drv, char *desc, struct pcm_channel *channel) { struct snd_dbuf *b; b = malloc(sizeof(*b), M_DEVBUF, M_WAITOK | M_ZERO); snprintf(b->name, SNDBUF_NAMELEN, "%s:%s", drv, desc); - b->dev = dev; b->channel = channel; return b; @@ -72,7 +71,7 @@ sndbuf_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error) struct snd_dbuf *b = (struct snd_dbuf *)arg; if (snd_verbose > 3) { - device_printf(b->dev, "sndbuf_setmap %lx, %lx; ", + printf("sndbuf_setmap %lx, %lx; ", (u_long)segs[0].ds_addr, (u_long)segs[0].ds_len); printf("%p -> %lx\n", b->buf, (u_long)segs[0].ds_addr); } diff --git a/sys/dev/sound/pcm/buffer.h b/sys/dev/sound/pcm/buffer.h index 841bfb85af3c..eaca6d8f313d 100644 --- a/sys/dev/sound/pcm/buffer.h +++ b/sys/dev/sound/pcm/buffer.h @@ -31,7 +31,6 @@ #define SNDBUF_NAMELEN 48 struct snd_dbuf { - device_t dev; u_int8_t *buf, *tmpbuf; u_int8_t *shadbuf; /**< shadow buffer used w/ S_D_SILENCE/SKIP */ volatile int sl; /**< shadbuf ready length in # of bytes */ @@ -55,7 +54,7 @@ struct snd_dbuf { char name[SNDBUF_NAMELEN]; }; -struct snd_dbuf *sndbuf_create(device_t dev, char *drv, char *desc, struct pcm_channel *channel); +struct snd_dbuf *sndbuf_create(char *drv, char *desc, struct pcm_channel *channel); void sndbuf_destroy(struct snd_dbuf *b); void sndbuf_dump(struct snd_dbuf *b, char *s, u_int32_t what); diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 062eeb251a5b..e7c0779ea2df 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1269,8 +1269,8 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, goto fail; } - b = sndbuf_create(c->dev, c->name, "primary", c); - bs = sndbuf_create(c->dev, c->name, "secondary", c); + b = sndbuf_create(c->name, "primary", c); + bs = sndbuf_create(c->name, "secondary", c); if (b == NULL || bs == NULL) { device_printf(d->dev, "%s(): failed to create %s buffer\n", __func__, b == NULL ? "hardware" : "software"); From nobody Tue Nov 11 12:08:01 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKF3gvzz6GL9v; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKF1QTcz3bCy; Tue, 11 Nov 2025 12:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0FEn/DHgHxeVEzh1JeMkkrFB3e6ZaK0+2gzvAITF/Ds=; b=JsLd+BVftDOqexgJC+806mLQEozQ7OU9vnD+JPLoa7yxePN7cyCye25WwPhaV2L0CK7jjw 8wJ6CZ3ByhzaD2FIK3enpfn/xPJomgmG+YXEtssDzDykpC33BE8FsFyadCqICrIxjCPn9D OMN7j3NlH85d3QcWpmYv6BTLsOV7AkT63N4lOhru55vmsgn4U0jSI/QHuwt6nh6k45HFV3 c/vK0hzqfDJ8ZOcZoQHixlxeYaP6AoxidAMwXB1+f9jilMJ3wlRrlqoR/HFpszwNioiMkD g5Q3vpu6eWQospVR57Y0mOjQe8WmKA47S+WoGsLJND5XdD2fQl9CpvjIr+vg+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0FEn/DHgHxeVEzh1JeMkkrFB3e6ZaK0+2gzvAITF/Ds=; b=J41HvxO9Zh4vh8M5WzUoxPMchqsGsrYRd+mK1RvCORxXu6RoUM3SO2GsjkzaqTD7ycCBlu mVep4Nl5gdAkTCQQlcwUUgJrSOpe8qF5fH+R0Kb7MoqK7sFFEhGIskWp3WqdgJjpMOZnM6 RDwCwOaB6yZuTezNaUeGf+mbf9EocprUQb8t4hYlBwsrONacYZIyYtrgBvXLADCqVT/VJZ HRCLtddW/Z5nj2uFqpU9igXhOIoPf3NJJi01BXgkhVcpknnhq3woIzdK0TMYhBGwW+rMT4 RWSUPL43AF/+AUdbqduQDm6Q6FaUUGtUGuoKH9SGWBmM6pquLxk7KUe4huhS2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862881; a=rsa-sha256; cv=none; b=RbbLgqf45vexrH5Yu9hVB+2j22HMAmc3xxCfHp09AwylkguUk9VUoEJ6BUErjJsYWpULQP oRmsh5p8e2ZSytHjIhTF2PJvhHHGRCMl29usahezlMAbLN6UHEzKPD6fqyR/IJTD9XdLjz e76ikJ1wI9h/tPjP3TLNP3jiKPFakDmwHYK8UCZdDHqopaJl35p4/pmaldNvirHwppRSRh pIF3YcJJBTgpHfzEgslp2ZvZ89Cb9B0q8xWk+YLQpBYoCjFJUy4YXFfydbPGFkd3pC/YrX FBHAC2obr8/XAMcJZAXvGNn148uyequTtydwtsOaIuEFfj656ddmikRnCY4zPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKF11zHz13Zg; Tue, 11 Nov 2025 12:08: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 5ABC81LK034812; Tue, 11 Nov 2025 12:08:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC81dC034809; Tue, 11 Nov 2025 12:08:01 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:01 GMT Message-Id: <202511111208.5ABC81dC034809@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: 482d0d978855 - main - sound: Re-arrange sndbuf_create() arguments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 482d0d97885506a5eb2b1f2501f65e7e4fca6fdc Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=482d0d97885506a5eb2b1f2501f65e7e4fca6fdc commit 482d0d97885506a5eb2b1f2501f65e7e4fca6fdc Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:07 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:07 +0000 sound: Re-arrange sndbuf_create() arguments Since we always use the channel name as the "drv" argument, we can just get rid of it and fetch it in sndbuf_create(). Also, put the "channel" argument first, as it is more intuitive. No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53520 --- sys/dev/sound/pcm/buffer.c | 4 ++-- sys/dev/sound/pcm/buffer.h | 2 +- sys/dev/sound/pcm/channel.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index 0b77ab599aed..b162da97f9e2 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -41,12 +41,12 @@ #include "snd_fxdiv_gen.h" struct snd_dbuf * -sndbuf_create(char *drv, char *desc, struct pcm_channel *channel) +sndbuf_create(struct pcm_channel *channel, const char *desc) { struct snd_dbuf *b; b = malloc(sizeof(*b), M_DEVBUF, M_WAITOK | M_ZERO); - snprintf(b->name, SNDBUF_NAMELEN, "%s:%s", drv, desc); + snprintf(b->name, SNDBUF_NAMELEN, "%s:%s", channel->name, desc); b->channel = channel; return b; diff --git a/sys/dev/sound/pcm/buffer.h b/sys/dev/sound/pcm/buffer.h index eaca6d8f313d..329a41d0b0a5 100644 --- a/sys/dev/sound/pcm/buffer.h +++ b/sys/dev/sound/pcm/buffer.h @@ -54,7 +54,7 @@ struct snd_dbuf { char name[SNDBUF_NAMELEN]; }; -struct snd_dbuf *sndbuf_create(char *drv, char *desc, struct pcm_channel *channel); +struct snd_dbuf *sndbuf_create(struct pcm_channel *channel, const char *desc); void sndbuf_destroy(struct snd_dbuf *b); void sndbuf_dump(struct snd_dbuf *b, char *s, u_int32_t what); diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index e7c0779ea2df..749ee4d9cdba 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1269,8 +1269,8 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, goto fail; } - b = sndbuf_create(c->name, "primary", c); - bs = sndbuf_create(c->name, "secondary", c); + b = sndbuf_create(c, "primary"); + bs = sndbuf_create(c, "secondary"); if (b == NULL || bs == NULL) { device_printf(d->dev, "%s(): failed to create %s buffer\n", __func__, b == NULL ? "hardware" : "software"); From nobody Tue Nov 11 12:08:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKG5GNwz6GLGS; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKG2YLhz3bRQ; Tue, 11 Nov 2025 12:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=17OOs5bIU6Emk4dCKi87OXXPYsjUYHx+OmNmeePQsC0=; b=TYEFz9EWQX3XOXzggBgif1ftc3gBenJFkOvEv8lfPvtJkqv+AOzlBKwYhQ6MNE9HOHVE6h VQbTmvYbtJm1lq15YEoDXAFkLPFG1U9V1yZKm7N48FY0u1WhiOC+lbnU4rq36mNzaqg+G1 dE82BXROxmXNgJM1I3ufP6AU7rXTgBGLy968EHYwddB9HzEU/qY6437l1PWuvyqB6Wy6Gs /fB1junhvM4xZd6twGGglYm9bOo3APrH2PE9W0E1ztD/2uR//JjHs/Pm2gRhI8FMp5voMX TdGbgQs7fJdH58jK+/AvrROag+fnaA6FRACwy9P53YcKvIt0O3ueReIKj8Cozw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=17OOs5bIU6Emk4dCKi87OXXPYsjUYHx+OmNmeePQsC0=; b=YILRTNdW8NmmpF/4MEF92ylyWBpyiYlRl6NNNU0Imyx11wjd3x3Z1kWd3hquA6I2pQuRPZ KEXZJ+UzFr91/3953fVPSR64NwUWO8baxHFVY8wTufx4whkaIWyudsVtbG3amN0Thbb0p3 4bEoc1i1fGsTNaLt3wqnU6blIOymCqIvyNfspgLNgvK1F1JrtxnEyagoskPLX2MNY6sm02 RuCuTgbdYlYHbDHmK/3+t7ueATT2GQoUv0ezunF8zqyyZjZpfPV+C/r+UZIKWEAzb7YgVf fvxtQEkpQXBFhkm8SHKQ6fHPQYue5qBfE40C8agGnL/9ol8Qqz0PAjSrkbWhMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862882; a=rsa-sha256; cv=none; b=ROEknB+lx20Tgny7bo2l00/iHSdBGLFx/yHr6ojQPSzMvFo7DjWnkIVmD9mLkjj8V46tGV l8vqSNC55ESJbf45pYOv7zdzMy6hS9XrkQfxVmPakHjeEiLITsBzVKJUPtLiMNvvv3R6PB W5s0fdWZSLi5ybmi3gXT7sWhujPVaayeNcf/ATyxnPqp/5xDlZGpTaEuxpNiz38bIfY6xn 8m5ibUcgUAzLiiSmN9VPbO+0LwvN6R8KHHVqlrd2WSsgnGDTpVJ8tun8QnhhrR8OUnIwrV 4Tt5HQjQ6FRlN/WQruFE2y9NrhOZQti5ieoC6AWH6BNQKlyWlY592mQvC3ko8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKG24Gmz13cN; Tue, 11 Nov 2025 12:08: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 5ABC82oo034854; Tue, 11 Nov 2025 12:08:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8252034851; Tue, 11 Nov 2025 12:08:02 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:02 GMT Message-Id: <202511111208.5ABC8252034851@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: d159b023de52 - main - sound: Define SNDBUF_F_MANAGED as 0x00000001 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: d159b023de52570800d5a5292318de4bce3c9978 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=d159b023de52570800d5a5292318de4bce3c9978 commit d159b023de52570800d5a5292318de4bce3c9978 Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:12 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:12 +0000 sound: Define SNDBUF_F_MANAGED as 0x00000001 It's the only flag anyway. No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D53521 --- sys/dev/sound/pcm/buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/buffer.h b/sys/dev/sound/pcm/buffer.h index 329a41d0b0a5..1e1cfd570b36 100644 --- a/sys/dev/sound/pcm/buffer.h +++ b/sys/dev/sound/pcm/buffer.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ -#define SNDBUF_F_MANAGED 0x00000008 +#define SNDBUF_F_MANAGED 0x00000001 #define SNDBUF_NAMELEN 48 From nobody Tue Nov 11 12:08:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKH5Tz3z6GLGW; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKH3SLVz3bM6; Tue, 11 Nov 2025 12:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OYA/s7NbrTLA1uBNNvEOI9KYRFtlZBcaiZvKeRyaHpM=; b=x9JY5fvroTTZ6uBA4+H8e3022eGHg+AvK73/Sk8S7EMs7Tl5Z2+OXt+QDv2PFXWDoXzbs/ wH7xVp6fJB0KN6d54RDRgaU8mlFR7k274QO0S6VTKyjJscr6UKSOS6Bw+w1FU0hbmr6Vs6 eZ1MMePSwhtP6gItyH/Hf9JViZ4OxZcyzFmKOS7Og8W9djhesjc+5Szm0HvJvSyhb4Akle s0/ojG8BBRIxgI8d+FQD3BoqjHcy/hnqvxtVLqfA2grkCGNWLH0+ICjiVVkh5KC6WB6jVm EhhnQ25SiMGkIS9LlMNy9vr03vXnfuo6S+fBA30m9Sk9cWB8X6ix/sgZ5fDItQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OYA/s7NbrTLA1uBNNvEOI9KYRFtlZBcaiZvKeRyaHpM=; b=PjSlBooHlOaQe19p3g8+ttAsqE5CKtDT+xP4+pV9VhpAyW0MsoCfr10B1qkL+L4WIjhc0n 3yt4JpRGL3YLDX2KffHptUYM4jpQBymosopj/x5nKrCcaWKrYZtu9HXPQB6c60KG6btiga 16UuAUipT94/U5aqS8i/PUb8t2ttsc7iE33fGCl2f/B7B7GJgkDygZL6jRh0bO4F7rwFz3 s1pxqMbdSvsAeRSKMirpVjBny9tj8wIdn2gV/g4K/8fcwPQXyPjOp2j/8tyXB614T7wKTA IYxFuPPyjuZLPtSioHOuaECsQAmZR2Meg6mLiAbyCBcVD1ICvhrgR2WZex08vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862883; a=rsa-sha256; cv=none; b=f5IbBFTWHPBpvzccvfwJB9TEh9wO9ku5eKY/5ben/+NCLw8uivwmM9Ssy+aKoVNFUI7fQy 9kEVSxTFodJNimWnF3wakBEBwRIjgcpfCQZy+PVmNPu+xAxLb0O8sXi9Ttcd7pw9ggfUK2 x9Oc5Dbx3Rhx+KCXwxgcQ00Z90//UfhpdnRde0pZuKeL5cshDjujGsBrc2fEuRzTMlyMO8 QQd2mOu4P+A/poB8k9FIwymy10YSS+ZF0S4iUF9N5LRnms4eQhN0qNMdXqDypVeLBlFbFk Ug+B3tKR4q+/6UXUO7dqChzVIi5BDQNHC8UDgi9jOurXjVHx9uBP4T288DMM1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKH2ySJz13C5; Tue, 11 Nov 2025 12:08: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 5ABC833B034904; Tue, 11 Nov 2025 12:08:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC83r9034900; Tue, 11 Nov 2025 12:08:03 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:03 GMT Message-Id: <202511111208.5ABC83r9034900@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: 6d6eb25d0b19 - main - sound: Retire unused sndbuf_dump() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 6d6eb25d0b19443089749e288f091bf26fc58f70 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6d6eb25d0b19443089749e288f091bf26fc58f70 commit 6d6eb25d0b19443089749e288f091bf26fc58f70 Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:16 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:16 +0000 sound: Retire unused sndbuf_dump() Fixes: e4e61333ffa4e90360de2dd1e4e0146f7cbf0afb Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D53522 --- sys/dev/sound/pcm/buffer.c | 20 -------------------- sys/dev/sound/pcm/buffer.h | 2 -- 2 files changed, 22 deletions(-) diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index b162da97f9e2..ab3c8d447b21 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -694,26 +694,6 @@ sndbuf_feed(struct snd_dbuf *from, struct snd_dbuf *to, struct pcm_channel *chan return (0); } -/************************************************************/ - -void -sndbuf_dump(struct snd_dbuf *b, char *s, u_int32_t what) -{ - printf("%s: [", s); - if (what & 0x01) - printf(" bufsize: %d, maxsize: %d", b->bufsize, b->maxsize); - if (what & 0x02) - printf(" dl: %d, rp: %d, rl: %d, hp: %d", b->dl, b->rp, b->rl, b->hp); - if (what & 0x04) - printf(" total: %ju, prev_total: %ju, xrun: %d", (uintmax_t)b->total, (uintmax_t)b->prev_total, b->xrun); - if (what & 0x08) - printf(" fmt: 0x%x, spd: %d", b->fmt, b->spd); - if (what & 0x10) - printf(" blksz: %d, blkcnt: %d, flags: 0x%x", b->blksz, b->blkcnt, b->flags); - printf(" ]\n"); -} - -/************************************************************/ u_int32_t sndbuf_getflags(struct snd_dbuf *b) { diff --git a/sys/dev/sound/pcm/buffer.h b/sys/dev/sound/pcm/buffer.h index 1e1cfd570b36..6c16c0c1f2d5 100644 --- a/sys/dev/sound/pcm/buffer.h +++ b/sys/dev/sound/pcm/buffer.h @@ -57,8 +57,6 @@ struct snd_dbuf { struct snd_dbuf *sndbuf_create(struct pcm_channel *channel, const char *desc); void sndbuf_destroy(struct snd_dbuf *b); -void sndbuf_dump(struct snd_dbuf *b, char *s, u_int32_t what); - int sndbuf_alloc(struct snd_dbuf *b, bus_dma_tag_t dmatag, int dmaflags, unsigned int size); int sndbuf_setup(struct snd_dbuf *b, void *buf, unsigned int size); void sndbuf_free(struct snd_dbuf *b); From nobody Tue Nov 11 12:08:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKJ73NXz6GL5l; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKJ48b1z3bKG; Tue, 11 Nov 2025 12:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQ5IJVv9sd/TvzjTaY2dvFvmKFxthIWXLNQdiuNQGeM=; b=h2d+UFO1/gdB0eZJ2WeUdYCRBtDLG2Y6sDPfFxhXxsP7dSGclpnG//hNkm9tcswOY2nxzc vEe2GOKiPCp6LSS8B1Fm80vJiilWnawzzPx6MIZQ32gN+ICcjKZNoZ3081GoidIpSbvFYk DCHOOl4PvUIyJSWFgc6iPxnJqXR46W3ho2wKa4dAz+vYuXOGlg3+UE5v7pVcQ73HuhM5bK zu/0m804NiFPtEKZyUdEUoct0h+GwydOBUaIEfk7SMznOfSPWsT6xlfJXzW7w4DcBxR73m sCvNh6EDJAFXeDncNCCR0Po+JFrffpeJC6QLNVkdXu7XTw0jYks0LB7UKeZcQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQ5IJVv9sd/TvzjTaY2dvFvmKFxthIWXLNQdiuNQGeM=; b=qW+Y6jQ+xhAa91zQKmt2r0t0otpFLj7rDbqLTNfbu3/FIdiKoyqgSekaytB4UrTE9+DHKa rsBndAxehU8xL8H5lJE6TT3wrbnQZcBcOu0jUYiR/1MAXiS9p99z2/BYEYrhsPoEGFcAt7 HBfojDzeKMhRyfvGqw0VvHljgIYI59sywwcziBzUmbHu3e3f0u515MiPop/TdtnzCf+0MH RTcIWW+QWTHIX5gialopwxeAGshUKQQjvzaIZpM1/9fbE3wKhWvhnH+0QpHEEDhna2XNYw U05AordmZ1XTrpRarl5lkLkVrF6uzqO6hrAOWZPjhbfXFqwb1Aecfs1hWfOqIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862884; a=rsa-sha256; cv=none; b=M01uiyAqmU3/AeTw+TQWcmJBrKLM2xQKVlFVamwPHYnkHRriLY8L8Fyc5bXetY92REMliH O1E0NGyIW3vIhaQAecsZbc2o+uJskUAOBEtbRl0aQqcqqS/0ummfL+bVYEIbSV2c2zRfiP lwUkhVN7xoQQ0PUloJ3pP3EVhz2wtzrY5cc7sIYkwzIKCR/nOL/+b+XOBt/QWTn1cmWEZP yDJbrnVvGq3XyNO/6cWQpshhJ0BTojIEQn6DcfwMRvsbdR4VoM/Ii/IYeovNWDoYFG5gp6 WwAzuj+6SbzbRYihnoiqZpGVG/Vbwdowyq8xEC83+7xCQ0miJQFxLuvb0Mq3eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKJ3cDmz13cP; Tue, 11 Nov 2025 12:08: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 5ABC84c5034938; Tue, 11 Nov 2025 12:08:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC84At034935; Tue, 11 Nov 2025 12:08:04 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:04 GMT Message-Id: <202511111208.5ABC84At034935@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: 06eb65e11d7a - main - sound: Retire unused sndbuf_getflags() and sndbuf_setflags() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 06eb65e11d7a66caec358966dcf892c9f4c2e411 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=06eb65e11d7a66caec358966dcf892c9f4c2e411 commit 06eb65e11d7a66caec358966dcf892c9f4c2e411 Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:20 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:20 +0000 sound: Retire unused sndbuf_getflags() and sndbuf_setflags() Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53525 --- sys/dev/sound/pcm/buffer.c | 14 -------------- sys/dev/sound/pcm/buffer.h | 3 --- 2 files changed, 17 deletions(-) diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index ab3c8d447b21..e3d2f27f9f81 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -694,20 +694,6 @@ sndbuf_feed(struct snd_dbuf *from, struct snd_dbuf *to, struct pcm_channel *chan return (0); } -u_int32_t -sndbuf_getflags(struct snd_dbuf *b) -{ - return b->flags; -} - -void -sndbuf_setflags(struct snd_dbuf *b, u_int32_t flags, int on) -{ - b->flags &= ~flags; - if (on) - b->flags |= flags; -} - /** * @brief Clear the shadow buffer by filling with samples equal to zero. * diff --git a/sys/dev/sound/pcm/buffer.h b/sys/dev/sound/pcm/buffer.h index 6c16c0c1f2d5..421db261566d 100644 --- a/sys/dev/sound/pcm/buffer.h +++ b/sys/dev/sound/pcm/buffer.h @@ -111,9 +111,6 @@ int sndbuf_acquire(struct snd_dbuf *b, u_int8_t *from, unsigned int count); int sndbuf_dispose(struct snd_dbuf *b, u_int8_t *to, unsigned int count); int sndbuf_feed(struct snd_dbuf *from, struct snd_dbuf *to, struct pcm_channel *channel, struct pcm_feeder *feeder, unsigned int count); -u_int32_t sndbuf_getflags(struct snd_dbuf *b); -void sndbuf_setflags(struct snd_dbuf *b, u_int32_t flags, int on); - #ifdef OSSV4_EXPERIMENT void sndbuf_getpeaks(struct snd_dbuf *b, int *lp, int *rp); #endif From nobody Tue Nov 11 12:08:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKL0SbFz6GL3n; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKK5PmRz3bS6; Tue, 11 Nov 2025 12:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k+JcwE41eYdR7tC1dLVyaHjtbwhmdjth/ysSzC7rwS4=; b=dARMTdg6Zvpl95/nB29iBN6fEwlIp52w9K99Tqk3Awnbe2K0XvgUHgRRKApJbxb58mUPkb pfjHngJ+5K7ETqJu8WrRz7RzOD0tMSoaRSTkD49xXMkYjMjzY/ztxlg5sg2Oll6gH/QIis F64+D8dpe/JcYnPG9rlRCIyvVkoKDl8WexnVL5l2Zvs6UTQ0FazHMkpPWfVRlpCiGFVEKw SiFUEfEfnhN+0t6Yd0yHNMZfXd2qLOT6eyjCJbcnQFFhkAXJt5v0Ibx38nvhwvUXoF+NZ0 mmcy/YzrYRqNWx4nVmw7fKXD+BmZWfBEiUAkxZq5K5U4gcWu+cLFE1NCi0uZhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k+JcwE41eYdR7tC1dLVyaHjtbwhmdjth/ysSzC7rwS4=; b=frgt4uTa96yCfDo9SQj8Gd+ZkkjEtruhPtemnOPC/hdWMnra/GNRDB3b5QPDmbBjiAt9Nb h6vvRWBJpLT1e5BFShxB8CtEhXkiICuzsknrqediDh/kagLDMzo+W7RsAk29slHPsGMAAD n2RRwRZwhYfwuDNyNcUBEYvcxNYMj3YU6jbqYZW78ZlMDHxlsGGS4Bq627VnYERJK/5R6A Q8eXRf3gp4RJAfXr9CC0Oh7Jsm51qZUjXg6AihjvVXRTLzPAsWphvL4656y/L+PyMxKz+d Y4exJUqlC436gKYjGUH45eWfbMqK6d9vu9ICy8plRaEjvGBUAtIr5pEplXrpVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862885; a=rsa-sha256; cv=none; b=WldHsDdQmxI1a9sZVqe1b5ibZ6+glE8EZk3JKuv1YG6meFx5u8GSL4OmHJhII/9J9I28sU 3yQ6HFDKJ3TCvQmi0hB+owzUZZAo7CH6yJ2P6ZP/dnkymscGYvZyc5u46K3Uq3dpT0LZ60 Q8IheTPgoZpkdNtPKAa9+m3zCElaTOUZmDUdDYjHofjT4jTnyGMnTuonw09Na1NqvLpUaY Hzc9wdsKZxIeKHI9lwWIH7It+/aXsewFFFa9IptYIGyJY94Bphp13NpFW0CnaNbF7RF1kX LFe0NnvRAUcjhsfMd10P0RCKWJDclo4LRD+aDJjr875o6a6Tm4JllhjnU4Y2Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKK4s9Lz13rV; Tue, 11 Nov 2025 12:08: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 5ABC85Nb034971; Tue, 11 Nov 2025 12:08:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC85wR034968; Tue, 11 Nov 2025 12:08:05 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:05 GMT Message-Id: <202511111208.5ABC85wR034968@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: c0e96595a4da - main - sound: Simplify sndbuf_clear() loop List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: c0e96595a4da90d890be88881a5dc3381da59dd7 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=c0e96595a4da90d890be88881a5dc3381da59dd7 commit c0e96595a4da90d890be88881a5dc3381da59dd7 Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:24 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:24 +0000 sound: Simplify sndbuf_clear() loop Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53526 --- sys/dev/sound/pcm/buffer.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index e3d2f27f9f81..0cfa04fc3167 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -276,16 +276,10 @@ sndbuf_clear(struct snd_dbuf *b, unsigned int length) length = b->bufsize; data = sndbuf_zerodata(b->fmt); - i = sndbuf_getfreeptr(b); p = sndbuf_getbuf(b); - while (length > 0) { - p[i] = data; - length--; - i++; - if (i >= b->bufsize) - i = 0; - } + for (; length > 0; length--, i++) + p[i % b->bufsize] = data; } /** From nobody Tue Nov 11 12:08:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKM1WT3z6GLK9; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKL6MqWz3bSL; Tue, 11 Nov 2025 12:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J1hKVe7fKUOGD9CzBShI5m1RWgYf5CloSjaVyMDjQuw=; b=Jh2ufGA1+lw2UWRyQL0S8OgG5rEin3I62MOzg60r0V8Kepjfq6HheUKc4Jkc6/cAxe6oox IeYEz62y+b1Og26NDwtCLchS85j1FZdKEfXoPje+3b8SDyxvc1R/XOxZ/iwDuTjm/NehR/ Pd+CQOYcaBp3x6VKvrQtWGXCRHDDLqifqpzYHXqtLAR8Fsvmiw8Pl/5fbZ2UY/sj64oHrb xBxZvOOKrbT3pyEU50zBRC1bAZTOrCaM+LxVRd5Kkjq704TgfKQbh981DOpAAAyPOAMJEN Nqbc5LDq6axQlGNfV+HFj0DFEfFvV4RVbGJy4ZyIVQ4wP83LzT4GiMmHY0IsWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J1hKVe7fKUOGD9CzBShI5m1RWgYf5CloSjaVyMDjQuw=; b=cIHFANssmBYfBo52KaWdHiYDyPlxe95AAN9XkXzX80+RTS5NLpHP472AYKuz9F/Bb0CND5 9Mhm0V0LVqBjMuq1Y+LJ5xgF66+xw3uzkGPNf20bLj/euLMJluWlE2ZiRgoMJh1gM0kbK9 MxhQlLa4LiGwPLULChS5RSMnEuQIN14R5MKnUssyufAs1TselsFr2pGlT4vDhhQtX+809P 9kXBZycHsv89GahhO6yTwJfRaHiKftMla62sfaihsoSYrJ2KUQBDgpAgXl7dPsjYrsA6mN 7Ut3p7KITdJftWnjcXNIlUdt/00Zu2C05ug6csC1N27VgURENozDNuvUPqQrEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862886; a=rsa-sha256; cv=none; b=wwiCDaPop4nOYFdzF55L5m3LPIPExhjKYqEGYsf5UMSz5sECi1g1r1mc8d9VoOCe9FRfLV RP5Okytus/I8U1LCW5ezjy5Hbx+lWlYvpw01b9SYJwewiq70x/yLOzbFOXtVtixWnqewPf Ya6Ro0iyuck1Yjni/hUnTblaKoRBamjnNNS1rQEfQHMI43jJwBX9JqAYTvI5l9tFXFmvs3 0q3aGYWS9ZV9hfBKy4DQipi8JXOmOfIE8xPyUe7BSPIZrplRqT3a4Wpoi3YpiliLPlRnAY bkFkfb3xF1JvDKFmvh7EgGCOj7g3yJ9HxmHqU5vJuEqEZNtJck+gAfMTOLzt4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKL5p74z13Wt; Tue, 11 Nov 2025 12:08: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 5ABC86D9035004; Tue, 11 Nov 2025 12:08:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC86Mi035001; Tue, 11 Nov 2025 12:08:06 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:06 GMT Message-Id: <202511111208.5ABC86Mi035001@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: ad28c6a13a45 - main - sound: Remove redundant sndbuf_free() in chn_kill() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: ad28c6a13a45746f32cbc832b3fe58748fae0d19 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ad28c6a13a45746f32cbc832b3fe58748fae0d19 commit ad28c6a13a45746f32cbc832b3fe58748fae0d19 Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:30 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:30 +0000 sound: Remove redundant sndbuf_free() in chn_kill() If b exists, it will get destroyed by sndbuf_destroy() (which calls sndbuf_free()) a few lines below, so the additional sndbuf_free() here is redundant. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53527 --- sys/dev/sound/pcm/channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 749ee4d9cdba..54d8976d46bf 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1373,8 +1373,8 @@ chn_kill(struct pcm_channel *c) } free_unr(chn_getunr(d, c->type), c->unit); feeder_remove(c); - if (c->devinfo && CHANNEL_FREE(c->methods, c->devinfo)) - sndbuf_free(b); + if (c->devinfo) + CHANNEL_FREE(c->methods, c->devinfo); if (bs) { knlist_clear(&bs->sel.si_note, 0); knlist_destroy(&bs->sel.si_note); From nobody Tue Nov 11 12:08:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKN22Jcz6GL63; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKN07Vwz3bb3; Tue, 11 Nov 2025 12:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HnN7mDVdWuj3Mk4Qq/JCvM+GEuyMPhCVuOj1lDMq93I=; b=pKCpMAMluqi4xaFF+BKva3xWvWrJY3/Hj7pp2a7E+a6LPLIq/6F6HfLvV/mhwR5uYt18/B 75uY2c7Jg/NccuC+9V3MTIZD5F1zYVEDgbEcTpp54c9kONHnrEwyl54CN303JRWYfp1hnj ElGFe8yb7IIwC/FUA4Gdlu8urOadW/7eYdtfzxb8A+u6fDcS8PabU3i7ZmHJpL8rwkWF99 JRI3kB15XqTwbwjH+z2VJdROHnNckni0ZIph5KLEEJfNNIiYYPmFT4AIcoB8ba6pABpHbZ lhz1Ye3VaaRigPdeKk04gLfzwd30YOaZQ5aqUqwI68aE+YDKtqtc01yFBMSBrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HnN7mDVdWuj3Mk4Qq/JCvM+GEuyMPhCVuOj1lDMq93I=; b=dyZS5lVxeEjanv3dv/OPUKtQ48giU86f0BAoVEQjoQzrJA1twNxWucHT5K8lXKFzZM6WKw uOuuVme5q81Zgjkmh1Kq4SlcNtpxSKLZFLfx/ohntqRcq6jhfbqMlL8FMTRgo5iE6M5QXu EgVxQ/lAXFxCafEnCJgMJ3QbVCiYON8k7WRkBWOjjRy5St1G7JcGh9DowQifBo/bYk0r3x 5omFc78QyFW1PtT+Vp4OoKA7x87adEEA0Pmq+kMG2dtNzHJDiB3z9hNDTKcLnmg1vr43iJ Ybsm0PwpUAtJpye4owLj9NKoqBUTvEm+iqCpZagnV70+2hNleHlhy624aeRKHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862888; a=rsa-sha256; cv=none; b=pHoKs1PghJloOXDTqGkCL8izn/yFlYZ2NhTtF8H704KUoCwI/WDCraM2l8O0JQ52NgL18E dj77yp8OllDFD8Q3pAryOuaK/JP4Vf1YY2uobDzAEmlZiy2XDoSAwvc2HL/Jl1lm00mnKw Jd6tyc4XmnzCo+xPkBDeQILLE7Wqv8+XfN2GUF+qU2M7S3Hm1akbbr0hLZWpeig457RYFV Tejq2rlHAidkTKo4xBJbDRLi5SHGm4D3vFwJLPOQV9ocyq8nfIILIsBpC+9a69mOx6AcVx OGLBp736lgiYlTQbUVMlzX6RneK+gXplraeUnYYXgC2HJuMPsFdPdTzRDDTMbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKM6jY9z13rW; Tue, 11 Nov 2025 12:08: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 5ABC87cT035037; Tue, 11 Nov 2025 12:08:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC873Q035034; Tue, 11 Nov 2025 12:08:07 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:07 GMT Message-Id: <202511111208.5ABC873Q035034@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: 78c5026ae13b - main - sound: Get rid of useless sndbuf getters and setters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 78c5026ae13b2d30b479f9bc892ecdb6f5a5bc0b Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=78c5026ae13b2d30b479f9bc892ecdb6f5a5bc0b commit 78c5026ae13b2d30b479f9bc892ecdb6f5a5bc0b Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:34 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:34 +0000 sound: Get rid of useless sndbuf getters and setters No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53528 --- sys/arm/allwinner/a10_codec.c | 2 +- sys/arm/allwinner/aw_i2s.c | 8 +- sys/arm/broadcom/bcm2835/bcm2835_audio.c | 9 +- sys/arm/freescale/imx/imx6_ssi.c | 10 +-- sys/arm/freescale/vybrid/vf_sai.c | 2 +- sys/arm64/rockchip/rk_i2s.c | 8 +- sys/dev/sound/dummy.c | 8 +- sys/dev/sound/fdt/audio_soc.c | 2 +- sys/dev/sound/macio/aoa.c | 4 +- sys/dev/sound/pci/als4000.c | 10 +-- sys/dev/sound/pci/atiixp.c | 25 +++--- sys/dev/sound/pci/cmi.c | 6 +- sys/dev/sound/pci/cs4281.c | 8 +- sys/dev/sound/pci/csapcm.c | 8 +- sys/dev/sound/pci/emu10k1.c | 8 +- sys/dev/sound/pci/emu10kx-pcm.c | 12 +-- sys/dev/sound/pci/es137x.c | 24 +++--- sys/dev/sound/pci/fm801.c | 2 +- sys/dev/sound/pci/hda/hdaa.c | 18 ++-- sys/dev/sound/pci/hdsp-pcm.c | 2 +- sys/dev/sound/pci/hdspe-pcm.c | 2 +- sys/dev/sound/pci/ich.c | 16 ++-- sys/dev/sound/pci/maestro3.c | 20 ++--- sys/dev/sound/pci/neomagic.c | 2 +- sys/dev/sound/pci/solo.c | 3 +- sys/dev/sound/pci/t4dwave.c | 10 +-- sys/dev/sound/pci/via8233.c | 26 +++--- sys/dev/sound/pci/via82c686.c | 6 +- sys/dev/sound/pci/vibes.c | 12 +-- sys/dev/sound/pcm/buffer.c | 144 ++----------------------------- sys/dev/sound/pcm/buffer.h | 22 ----- sys/dev/sound/pcm/channel.c | 133 ++++++++++++++-------------- sys/dev/sound/pcm/dsp.c | 44 +++++----- sys/dev/sound/pcm/feeder.c | 8 +- sys/dev/sound/pcm/feeder_chain.c | 4 +- sys/dev/sound/pcm/feeder_mixer.c | 14 +-- sys/dev/sound/pcm/sndstat.c | 55 ++++++------ sys/dev/sound/pcm/vchan.c | 4 +- sys/dev/sound/pcm/vchan.h | 4 +- 39 files changed, 272 insertions(+), 433 deletions(-) diff --git a/sys/arm/allwinner/a10_codec.c b/sys/arm/allwinner/a10_codec.c index 12d389d24243..0a4ba7aa31b2 100644 --- a/sys/arm/allwinner/a10_codec.c +++ b/sys/arm/allwinner/a10_codec.c @@ -680,7 +680,7 @@ a10codec_dmaintr(void *priv) struct a10codec_chinfo *ch = priv; unsigned bufsize; - bufsize = sndbuf_getsize(ch->buffer); + bufsize = ch->buffer->bufsize; ch->pos += ch->blocksize; if (ch->pos >= bufsize) diff --git a/sys/arm/allwinner/aw_i2s.c b/sys/arm/allwinner/aw_i2s.c index 87dfb109363f..31c6d9854171 100644 --- a/sys/arm/allwinner/aw_i2s.c +++ b/sys/arm/allwinner/aw_i2s.c @@ -530,10 +530,10 @@ aw_i2s_dai_intr(device_t dev, struct snd_dbuf *play_buf, struct snd_dbuf *rec_bu val = I2S_READ(sc, DA_FSTA); empty = DA_FSTA_TXE_CNT(val); count = sndbuf_getready(play_buf); - size = sndbuf_getsize(play_buf); + size = play_buf->bufsize; readyptr = sndbuf_getreadyptr(play_buf); - samples = (uint8_t*)sndbuf_getbuf(play_buf); + samples = play_buf->buf; written = 0; if (empty > count / 2) empty = count / 2; @@ -556,9 +556,9 @@ aw_i2s_dai_intr(device_t dev, struct snd_dbuf *play_buf, struct snd_dbuf *rec_bu available = DA_FSTA_RXA_CNT(val); count = sndbuf_getfree(rec_buf); - size = sndbuf_getsize(rec_buf); + size = rec_buf->bufsize; freeptr = sndbuf_getfreeptr(rec_buf); - samples = (uint8_t*)sndbuf_getbuf(rec_buf); + samples = rec_buf->buf; recorded = 0; if (available > count / 2) available = count / 2; diff --git a/sys/arm/broadcom/bcm2835/bcm2835_audio.c b/sys/arm/broadcom/bcm2835/bcm2835_audio.c index 2df6ac76124f..06bbc67bd7bd 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_audio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_audio.c @@ -575,7 +575,7 @@ bcm2835_audio_worker(void *data) continue; count = sndbuf_getready(ch->buffer); - size = sndbuf_getsize(ch->buffer); + size = ch->buffer->bufsize; readyptr = sndbuf_getreadyptr(ch->buffer); BCM2835_AUDIO_LOCK(sc); @@ -588,11 +588,12 @@ bcm2835_audio_worker(void *data) if (count < VCHIQ_AUDIO_PACKET_SIZE) continue; - buf = (uint8_t*)sndbuf_getbuf(ch->buffer) + readyptr; + buf = ch->buffer->buf + readyptr; bcm2835_audio_write_samples(ch, buf, count); BCM2835_AUDIO_LOCK(sc); - ch->unsubmittedptr = (ch->unsubmittedptr + count) % sndbuf_getsize(ch->buffer); + ch->unsubmittedptr = (ch->unsubmittedptr + count) % + ch->buffer->bufsize; ch->available_space -= count; ch->submitted_samples += count; KASSERT(ch->available_space >= 0, ("ch->available_space == %d\n", ch->available_space)); @@ -662,7 +663,7 @@ bcmchan_free(kobj_t obj, void *data) struct bcm2835_audio_chinfo *ch = data; void *buffer; - buffer = sndbuf_getbuf(ch->buffer); + buffer = ch->buffer->buf; if (buffer) free(buffer, M_DEVBUF); diff --git a/sys/arm/freescale/imx/imx6_ssi.c b/sys/arm/freescale/imx/imx6_ssi.c index cb77f1454e63..5a0e671f15a2 100644 --- a/sys/arm/freescale/imx/imx6_ssi.c +++ b/sys/arm/freescale/imx/imx6_ssi.c @@ -398,7 +398,7 @@ ssichan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) setup_dma(scp); - return (sndbuf_getblksz(ch->buffer)); + return (ch->buffer->blksz); } uint32_t @@ -415,7 +415,7 @@ ssi_dma_intr(void *arg, int chn) sc = scp->sc; conf = sc->conf; - bufsize = sndbuf_getsize(ch->buffer); + bufsize = ch->buffer->bufsize; sc->pos += conf->period; if (sc->pos >= bufsize) @@ -487,8 +487,8 @@ setup_dma(struct sc_pcminfo *scp) conf->saddr = sc->buf_base_phys; conf->daddr = rman_get_start(sc->res[0]) + SSI_STX0; conf->event = sc->sdma_ev_tx; /* SDMA TX event */ - conf->period = sndbuf_getblksz(ch->buffer); - conf->num_bd = sndbuf_getblkcnt(ch->buffer); + conf->period = ch->buffer->blksz; + conf->num_bd = ch->buffer->blkcnt; /* * Word Length @@ -497,7 +497,7 @@ setup_dma(struct sc_pcminfo *scp) * SSI supports 24 at max. */ - fmt = sndbuf_getfmt(ch->buffer); + fmt = ch->buffer->fmt; if (fmt & AFMT_16BIT) { conf->word_length = 16; diff --git a/sys/arm/freescale/vybrid/vf_sai.c b/sys/arm/freescale/vybrid/vf_sai.c index e895529c4810..9c0125768fee 100644 --- a/sys/arm/freescale/vybrid/vf_sai.c +++ b/sys/arm/freescale/vybrid/vf_sai.c @@ -369,7 +369,7 @@ saichan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) sndbuf_resize(ch->buffer, sc->dma_size / blocksize, blocksize); - sc->period = sndbuf_getblksz(ch->buffer); + sc->period = ch->buffer->blksz; return (sc->period); } diff --git a/sys/arm64/rockchip/rk_i2s.c b/sys/arm64/rockchip/rk_i2s.c index 5f1b6bbdeabf..856fa20e6ce4 100644 --- a/sys/arm64/rockchip/rk_i2s.c +++ b/sys/arm64/rockchip/rk_i2s.c @@ -403,10 +403,10 @@ rk_i2s_dai_intr(device_t dev, struct snd_dbuf *play_buf, struct snd_dbuf *rec_bu count = sndbuf_getready(play_buf); if (count > FIFO_SIZE - 1) count = FIFO_SIZE - 1; - size = sndbuf_getsize(play_buf); + size = play_buf->bufsize; readyptr = sndbuf_getreadyptr(play_buf); - samples = (uint8_t*)sndbuf_getbuf(play_buf); + samples = play_buf->buf; written = 0; for (; level < count; level++) { val = (samples[readyptr++ % size] << 0); @@ -426,9 +426,9 @@ rk_i2s_dai_intr(device_t dev, struct snd_dbuf *play_buf, struct snd_dbuf *rec_bu uint8_t *samples; uint32_t count, size, freeptr, recorded; count = sndbuf_getfree(rec_buf); - size = sndbuf_getsize(rec_buf); + size = rec_buf->bufsize; freeptr = sndbuf_getfreeptr(rec_buf); - samples = (uint8_t*)sndbuf_getbuf(rec_buf); + samples = rec_buf->buf; recorded = 0; if (level > count / 4) level = count / 4; diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index 39214a141bf9..0a2717ec418c 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -105,8 +105,8 @@ dummy_chan_io(void *arg) if (!ch->run) continue; if (ch->dir == PCMDIR_PLAY) { - ch->ptr += sndbuf_getblksz(ch->buf); - ch->ptr %= sndbuf_getsize(ch->buf); + ch->ptr += ch->buf->blksz; + ch->ptr %= ch->buf->bufsize; } else sndbuf_fillsilence(ch->buf); snd_mtxunlock(sc->lock); @@ -123,7 +123,7 @@ dummy_chan_free(kobj_t obj, void *data) struct dummy_chan *ch =data; uint8_t *buf; - buf = sndbuf_getbuf(ch->buf); + buf = ch->buf->buf; if (buf != NULL) free(buf, M_DEVBUF); @@ -190,7 +190,7 @@ dummy_chan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct dummy_chan *ch = data; - return (sndbuf_getblksz(ch->buf)); + return (ch->buf->blksz); } static int diff --git a/sys/dev/sound/fdt/audio_soc.c b/sys/dev/sound/fdt/audio_soc.c index c2bdea399364..84867cb3d781 100644 --- a/sys/dev/sound/fdt/audio_soc.c +++ b/sys/dev/sound/fdt/audio_soc.c @@ -249,7 +249,7 @@ audio_soc_chan_free(kobj_t obj, void *data) ausoc_chan = (struct audio_soc_channel *)data; - buffer = sndbuf_getbuf(ausoc_chan->buf); + buffer = ausoc_chan->buf->buf; if (buffer) free(buffer, M_DEVBUF); diff --git a/sys/dev/sound/macio/aoa.c b/sys/dev/sound/macio/aoa.c index 9861bbd92a0c..e0a6206c19a6 100644 --- a/sys/dev/sound/macio/aoa.c +++ b/sys/dev/sound/macio/aoa.c @@ -73,8 +73,8 @@ aoa_dma_set_program(struct aoa_dma *dma) u_int32_t addr; int i; - addr = (u_int32_t) sndbuf_getbufaddr(dma->buf); - KASSERT(dma->bufsz == sndbuf_getsize(dma->buf), ("bad size")); + addr = (u_int32_t)dma->buf->buf_addr; + KASSERT(dma->bufsz == dma->buf->bufsize, ("bad size")); dma->slots = dma->bufsz / dma->blksz; diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c index 9d86713b379e..75fbefe27633 100644 --- a/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -281,7 +281,7 @@ alschan_getptr(kobj_t obj, void *data) snd_mtxlock(sc->lock); pos = als_gcr_rd(ch->parent, ch->gcr_fifo_status) & 0xffff; snd_mtxunlock(sc->lock); - sz = sndbuf_getsize(ch->buffer); + sz = ch->buffer->bufsize; return (2 * sz - pos - 1) % sz; } @@ -348,8 +348,8 @@ als_playback_start(struct sc_chinfo *ch) struct sc_info *sc = ch->parent; u_int32_t buf, bufsz, count, dma_prog; - buf = sndbuf_getbufaddr(ch->buffer); - bufsz = sndbuf_getsize(ch->buffer); + buf = ch->buffer->buf_addr; + bufsz = ch->buffer->bufsize; count = bufsz / 2; if (ch->format & AFMT_16BIT) count /= 2; @@ -451,8 +451,8 @@ als_capture_start(struct sc_chinfo *ch) struct sc_info *sc = ch->parent; u_int32_t buf, bufsz, count, dma_prog; - buf = sndbuf_getbufaddr(ch->buffer); - bufsz = sndbuf_getsize(ch->buffer); + buf = ch->buffer->buf_addr; + bufsz = ch->buffer->bufsize; count = bufsz / 2; if (ch->format & AFMT_16BIT) count /= 2; diff --git a/sys/dev/sound/pci/atiixp.c b/sys/dev/sound/pci/atiixp.c index 90e5742e6523..30f061fd9388 100644 --- a/sys/dev/sound/pci/atiixp.c +++ b/sys/dev/sound/pci/atiixp.c @@ -535,8 +535,8 @@ atiixp_chan_setfragments(kobj_t obj, void *data, blksz &= ATI_IXP_BLK_ALIGN; - if (blksz > (sndbuf_getmaxsize(ch->buffer) / ATI_IXP_DMA_CHSEGS_MIN)) - blksz = sndbuf_getmaxsize(ch->buffer) / ATI_IXP_DMA_CHSEGS_MIN; + if (blksz > (ch->buffer->maxsize / ATI_IXP_DMA_CHSEGS_MIN)) + blksz = ch->buffer->maxsize / ATI_IXP_DMA_CHSEGS_MIN; if (blksz < ATI_IXP_BLK_MIN) blksz = ATI_IXP_BLK_MIN; if (blkcnt > ATI_IXP_DMA_CHSEGS_MAX) @@ -544,7 +544,7 @@ atiixp_chan_setfragments(kobj_t obj, void *data, if (blkcnt < ATI_IXP_DMA_CHSEGS_MIN) blkcnt = ATI_IXP_DMA_CHSEGS_MIN; - while ((blksz * blkcnt) > sndbuf_getmaxsize(ch->buffer)) { + while ((blksz * blkcnt) > ch->buffer->maxsize) { if ((blkcnt >> 1) >= ATI_IXP_DMA_CHSEGS_MIN) blkcnt >>= 1; else if ((blksz >> 1) >= ATI_IXP_BLK_MIN) @@ -553,14 +553,14 @@ atiixp_chan_setfragments(kobj_t obj, void *data, break; } - if ((sndbuf_getblksz(ch->buffer) != blksz || - sndbuf_getblkcnt(ch->buffer) != blkcnt) && + if ((ch->buffer->blksz != blksz || + ch->buffer->blkcnt != blkcnt) && sndbuf_resize(ch->buffer, blkcnt, blksz) != 0) device_printf(sc->dev, "%s: failed blksz=%u blkcnt=%u\n", __func__, blksz, blkcnt); - ch->blksz = sndbuf_getblksz(ch->buffer); - ch->blkcnt = sndbuf_getblkcnt(ch->buffer); + ch->blksz = ch->buffer->blksz; + ch->blkcnt = ch->buffer->blkcnt; return (0); } @@ -583,7 +583,7 @@ atiixp_buildsgdt(struct atiixp_chinfo *ch) uint32_t addr, blksz, blkcnt; int i; - addr = sndbuf_getbufaddr(ch->buffer); + addr = ch->buffer->buf_addr; if (sc->polling != 0) { blksz = ch->blksz * ch->blkcnt; @@ -610,7 +610,7 @@ atiixp_dmapos(struct atiixp_chinfo *ch) volatile uint32_t ptr; reg = ch->dt_cur_bit; - addr = sndbuf_getbufaddr(ch->buffer); + addr = ch->buffer->buf_addr; sz = ch->blkcnt * ch->blksz; retry = ATI_IXP_DMA_RETRY_MAX; @@ -739,8 +739,7 @@ atiixp_chan_trigger(kobj_t obj, void *data, int go) ch->ptr = 0; ch->prevptr = 0; pollticks = ((uint64_t)hz * ch->blksz) / - ((uint64_t)sndbuf_getalign(ch->buffer) * - sndbuf_getspd(ch->buffer)); + ((uint64_t)ch->buffer->align * ch->buffer->spd); pollticks >>= 2; if (pollticks > hz) pollticks = hz; @@ -781,8 +780,8 @@ atiixp_chan_trigger(kobj_t obj, void *data, int go) else ch = &sc->rch; pollticks = ((uint64_t)hz * ch->blksz) / - ((uint64_t)sndbuf_getalign(ch->buffer) * - sndbuf_getspd(ch->buffer)); + ((uint64_t)ch->buffer->align * + ch->buffer->spd); pollticks >>= 2; if (pollticks > hz) pollticks = hz; diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index 22f1e76a4d1f..a1356f58b567 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -255,10 +255,10 @@ cmi_dma_prog(struct sc_info *sc, struct sc_chinfo *ch, u_int32_t base) { u_int32_t s, i, sz; - ch->phys_buf = sndbuf_getbufaddr(ch->buffer); + ch->phys_buf = ch->buffer->buf_addr; cmi_wr(sc, base, ch->phys_buf, 4); - sz = (u_int32_t)sndbuf_getsize(ch->buffer); + sz = (u_int32_t)ch->buffer->bufsize; s = sz / ch->bps - 1; cmi_wr(sc, base + 4, s, 2); @@ -525,7 +525,7 @@ cmichan_getptr(kobj_t obj, void *data) } snd_mtxunlock(sc->lock); - sz = sndbuf_getsize(ch->buffer); + sz = ch->buffer->bufsize; bufptr = (physptr - ch->phys_buf + sz - ch->bps) % sz; return bufptr; diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index 7a25f7f4c08d..af2b4da76aba 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -328,7 +328,7 @@ cs4281chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channe ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); ch->spd = DSP_DEFAULT_SPEED; ch->bps = 1; - ch->blksz = sndbuf_getsize(ch->buffer); + ch->blksz = ch->buffer->bufsize; ch->dma_chan = (dir == PCMDIR_PLAY) ? CS4281_DMA_PLAY : CS4281_DMA_REC; ch->dma_setup = 0; @@ -412,7 +412,7 @@ cs4281chan_getptr(kobj_t obj, void *data) u_int32_t dba, dca, ptr; int sz; - sz = sndbuf_getsize(ch->buffer); + sz = ch->buffer->bufsize; dba = cs4281_rd(sc, CS4281PCI_DBA(ch->dma_chan)); dca = cs4281_rd(sc, CS4281PCI_DCA(ch->dma_chan)); ptr = (dca - dba + sz) % sz; @@ -493,9 +493,9 @@ adcdac_prog(struct sc_chinfo *ch) if (!ch->dma_setup) { go = adcdac_go(ch, 0); cs4281_wr(sc, CS4281PCI_DBA(ch->dma_chan), - sndbuf_getbufaddr(ch->buffer)); + ch->buffer->buf_addr); cs4281_wr(sc, CS4281PCI_DBC(ch->dma_chan), - sndbuf_getsize(ch->buffer) / ch->bps - 1); + ch->buffer->bufsize / ch->bps - 1); ch->dma_setup = 1; adcdac_go(ch, go); } diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c index a966a2e66402..688aee6400d8 100644 --- a/sys/dev/sound/pci/csapcm.c +++ b/sys/dev/sound/pci/csapcm.c @@ -483,7 +483,7 @@ csa_setupchan(struct csa_chinfo *ch) if (ch->dir == PCMDIR_PLAY) { /* direction */ - csa_writemem(resp, BA1_PBA, sndbuf_getbufaddr(ch->buffer)); + csa_writemem(resp, BA1_PBA, ch->buffer->buf_addr); /* format */ csa->pfie = csa_readmem(resp, BA1_PFIE) & ~0x0000f03f; @@ -512,7 +512,7 @@ csa_setupchan(struct csa_chinfo *ch) csa_setplaysamplerate(resp, ch->spd); } else if (ch->dir == PCMDIR_REC) { /* direction */ - csa_writemem(resp, BA1_CBA, sndbuf_getbufaddr(ch->buffer)); + csa_writemem(resp, BA1_CBA, ch->buffer->buf_addr); /* format */ csa_writemem(resp, BA1_CIE, (csa_readmem(resp, BA1_CIE) & ~0x0000003f) | 0x00000001); @@ -602,11 +602,11 @@ csachan_getptr(kobj_t obj, void *data) resp = &csa->res; if (ch->dir == PCMDIR_PLAY) { - ptr = csa_readmem(resp, BA1_PBA) - sndbuf_getbufaddr(ch->buffer); + ptr = csa_readmem(resp, BA1_PBA) - ch->buffer->buf_addr; if ((ch->fmt & AFMT_U8) != 0 || (ch->fmt & AFMT_S8) != 0) ptr >>= 1; } else { - ptr = csa_readmem(resp, BA1_CBA) - sndbuf_getbufaddr(ch->buffer); + ptr = csa_readmem(resp, BA1_CBA) - ch->buffer->buf_addr; if ((ch->fmt & AFMT_U8) != 0 || (ch->fmt & AFMT_S8) != 0) ptr >>= 1; } diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index e4b2c22f4f07..a85031977f4b 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -413,7 +413,7 @@ emu_settimer(struct sc_info *sc) for (i = 0; i < sc->nchans; i++) { pch = &sc->pch[i]; if (pch->buffer) { - tmp = (pch->spd * sndbuf_getalign(pch->buffer)) + tmp = (pch->spd * pch->buffer->align) / pch->blksz; if (tmp > rate) rate = tmp; @@ -423,7 +423,7 @@ emu_settimer(struct sc_info *sc) for (i = 0; i < 3; i++) { rch = &sc->rch[i]; if (rch->buffer) { - tmp = (rch->spd * sndbuf_getalign(rch->buffer)) + tmp = (rch->spd * rch->buffer->align) / rch->blksz; if (tmp > rate) rate = tmp; @@ -838,7 +838,7 @@ emupchan_free(kobj_t obj, void *data) int r; snd_mtxlock(sc->lock); - r = emu_memfree(sc, sndbuf_getbuf(ch->buffer)); + r = emu_memfree(sc, ch->buffer->buf); snd_mtxunlock(sc->lock); return r; @@ -985,7 +985,7 @@ emurchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, return NULL; else { snd_mtxlock(sc->lock); - emu_wrptr(sc, 0, ch->basereg, sndbuf_getbufaddr(ch->buffer)); + emu_wrptr(sc, 0, ch->basereg, ch->buffer->buf_addr); emu_wrptr(sc, 0, ch->sizereg, 0); /* off */ snd_mtxunlock(sc->lock); return ch; diff --git a/sys/dev/sound/pci/emu10kx-pcm.c b/sys/dev/sound/pci/emu10kx-pcm.c index c280b64892f6..a93d48ba71b1 100644 --- a/sys/dev/sound/pci/emu10kx-pcm.c +++ b/sys/dev/sound/pci/emu10kx-pcm.c @@ -773,7 +773,7 @@ emupchan_setblocksize(kobj_t obj __unused, void *c_devinfo, uint32_t blocksize) blocksize = ch->pcm->bufsz; snd_mtxlock(sc->lock); ch->blksz = blocksize; - emu_timer_set(sc->card, ch->timer, ch->blksz / sndbuf_getalign(ch->buffer)); + emu_timer_set(sc->card, ch->timer, ch->blksz / ch->buffer->align); snd_mtxunlock(sc->lock); return (ch->blksz); } @@ -795,7 +795,8 @@ emupchan_trigger(kobj_t obj __unused, void *c_devinfo, int go) else emu_vroute(sc->card, &(sc->rt_mono), ch->master); emu_vwrite(sc->card, ch->master); - emu_timer_set(sc->card, ch->timer, ch->blksz / sndbuf_getalign(ch->buffer)); + emu_timer_set(sc->card, ch->timer, ch->blksz / + ch->buffer->align); emu_timer_enable(sc->card, ch->timer, 1); } /* PCM interrupt handler will handle PCMTRIG_STOP event */ @@ -878,7 +879,7 @@ emurchan_init(kobj_t obj __unused, void *devinfo, struct snd_dbuf *b, struct pcm return (NULL); else { ch->timer = emu_timer_create(sc->card); - emu_wrptr(sc->card, 0, ch->basereg, sndbuf_getbufaddr(ch->buffer)); + emu_wrptr(sc->card, 0, ch->basereg, ch->buffer->buf_addr); emu_wrptr(sc->card, 0, ch->sizereg, 0); /* off */ return (ch); } @@ -930,7 +931,8 @@ emurchan_setblocksize(kobj_t obj __unused, void *c_devinfo, uint32_t blocksize) * (and use) timer interrupts. Otherwise channel will be marked dead. */ if (ch->blksz < (ch->pcm->bufsz / 2)) { - emu_timer_set(sc->card, ch->timer, ch->blksz / sndbuf_getalign(ch->buffer)); + emu_timer_set(sc->card, ch->timer, ch->blksz / + ch->buffer->align); emu_timer_enable(sc->card, ch->timer, 1); } else { emu_timer_enable(sc->card, ch->timer, 0); @@ -1059,7 +1061,7 @@ emufxrchan_init(kobj_t obj __unused, void *devinfo, struct snd_dbuf *b, struct p if (sndbuf_alloc(ch->buffer, emu_gettag(sc->card), 0, sc->bufsz) != 0) return (NULL); else { - emu_wrptr(sc->card, 0, ch->basereg, sndbuf_getbufaddr(ch->buffer)); + emu_wrptr(sc->card, 0, ch->basereg, ch->buffer->buf_addr); emu_wrptr(sc->card, 0, ch->sizereg, 0); /* off */ return (ch); } diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index 3c1bea09b5d1..eb546de81f65 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -508,21 +508,21 @@ eschan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, es_wr(es, ES1370_REG_MEMPAGE, ES1370_REG_DAC1_FRAMEADR >> 8, 1); es_wr(es, ES1370_REG_DAC1_FRAMEADR & 0xff, - sndbuf_getbufaddr(ch->buffer), 4); + ch->buffer->buf_addr, 4); es_wr(es, ES1370_REG_DAC1_FRAMECNT & 0xff, (ch->bufsz >> 2) - 1, 4); } else { es_wr(es, ES1370_REG_MEMPAGE, ES1370_REG_DAC2_FRAMEADR >> 8, 1); es_wr(es, ES1370_REG_DAC2_FRAMEADR & 0xff, - sndbuf_getbufaddr(ch->buffer), 4); + ch->buffer->buf_addr, 4); es_wr(es, ES1370_REG_DAC2_FRAMECNT & 0xff, (ch->bufsz >> 2) - 1, 4); } } else { es_wr(es, ES1370_REG_MEMPAGE, ES1370_REG_ADC_FRAMEADR >> 8, 1); es_wr(es, ES1370_REG_ADC_FRAMEADR & 0xff, - sndbuf_getbufaddr(ch->buffer), 4); + ch->buffer->buf_addr, 4); es_wr(es, ES1370_REG_ADC_FRAMECNT & 0xff, (ch->bufsz >> 2) - 1, 4); } @@ -637,8 +637,8 @@ eschan_setfragments(kobj_t obj, void *data, uint32_t blksz, uint32_t blkcnt) blksz &= ES_BLK_ALIGN; - if (blksz > (sndbuf_getmaxsize(ch->buffer) / ES_DMA_SEGS_MIN)) - blksz = sndbuf_getmaxsize(ch->buffer) / ES_DMA_SEGS_MIN; + if (blksz > (ch->buffer->maxsize / ES_DMA_SEGS_MIN)) + blksz = ch->buffer->maxsize / ES_DMA_SEGS_MIN; if (blksz < ES_BLK_MIN) blksz = ES_BLK_MIN; if (blkcnt > ES_DMA_SEGS_MAX) @@ -646,7 +646,7 @@ eschan_setfragments(kobj_t obj, void *data, uint32_t blksz, uint32_t blkcnt) if (blkcnt < ES_DMA_SEGS_MIN) blkcnt = ES_DMA_SEGS_MIN; - while ((blksz * blkcnt) > sndbuf_getmaxsize(ch->buffer)) { + while ((blksz * blkcnt) > ch->buffer->maxsize) { if ((blkcnt >> 1) >= ES_DMA_SEGS_MIN) blkcnt >>= 1; else if ((blksz >> 1) >= ES_BLK_MIN) @@ -655,15 +655,15 @@ eschan_setfragments(kobj_t obj, void *data, uint32_t blksz, uint32_t blkcnt) break; } - if ((sndbuf_getblksz(ch->buffer) != blksz || - sndbuf_getblkcnt(ch->buffer) != blkcnt) && + if ((ch->buffer->blksz != blksz || + ch->buffer->blkcnt != blkcnt) && sndbuf_resize(ch->buffer, blkcnt, blksz) != 0) device_printf(es->dev, "%s: failed blksz=%u blkcnt=%u\n", __func__, blksz, blkcnt); - ch->bufsz = sndbuf_getsize(ch->buffer); - ch->blksz = sndbuf_getblksz(ch->buffer); - ch->blkcnt = sndbuf_getblkcnt(ch->buffer); + ch->bufsz = ch->buffer->bufsize; + ch->blksz = ch->buffer->blksz; + ch->blkcnt = ch->buffer->blkcnt; return (0); } @@ -762,7 +762,7 @@ eschan_trigger(kobj_t obj, void *data, int go) return 0; ES_LOCK(es); - cnt = (ch->blksz / sndbuf_getalign(ch->buffer)) - 1; + cnt = (ch->blksz / ch->buffer->align) - 1; if (ch->fmt & AFMT_16BIT) b |= 0x02; if (AFMT_CHANNEL(ch->fmt) > 1) diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c index 3537c7807ded..39d12f8505d1 100644 --- a/sys/dev/sound/pci/fm801.c +++ b/sys/dev/sound/pci/fm801.c @@ -440,7 +440,7 @@ fm801ch_trigger(kobj_t obj, void *data, int go) { struct fm801_chinfo *ch = data; struct fm801_info *fm801 = ch->parent; - u_int32_t baseaddr = sndbuf_getbufaddr(ch->buffer); + u_int32_t baseaddr = ch->buffer->buf_addr; u_int32_t k1; DPRINT("fm801ch_trigger go %d , ", go); diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 5dbb5c4f4453..14231107e17a 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -2081,10 +2081,10 @@ hdaa_channel_setfragments(kobj_t obj, void *data, { struct hdaa_chan *ch = data; - blksz -= blksz % lcm(HDA_DMA_ALIGNMENT, sndbuf_getalign(ch->b)); + blksz -= blksz % lcm(HDA_DMA_ALIGNMENT, ch->b->align); - if (blksz > (sndbuf_getmaxsize(ch->b) / HDA_BDL_MIN)) - blksz = sndbuf_getmaxsize(ch->b) / HDA_BDL_MIN; + if (blksz > (ch->b->maxsize / HDA_BDL_MIN)) + blksz = ch->b->maxsize / HDA_BDL_MIN; if (blksz < HDA_BLK_MIN) blksz = HDA_BLK_MIN; if (blkcnt > HDA_BDL_MAX) @@ -2092,7 +2092,7 @@ hdaa_channel_setfragments(kobj_t obj, void *data, if (blkcnt < HDA_BDL_MIN) blkcnt = HDA_BDL_MIN; - while ((blksz * blkcnt) > sndbuf_getmaxsize(ch->b)) { + while ((blksz * blkcnt) > ch->b->maxsize) { if ((blkcnt >> 1) >= HDA_BDL_MIN) blkcnt >>= 1; else if ((blksz >> 1) >= HDA_BLK_MIN) @@ -2101,14 +2101,14 @@ hdaa_channel_setfragments(kobj_t obj, void *data, break; } - if ((sndbuf_getblksz(ch->b) != blksz || - sndbuf_getblkcnt(ch->b) != blkcnt) && + if ((ch->b->blksz != blksz || + ch->b->blkcnt != blkcnt) && sndbuf_resize(ch->b, blkcnt, blksz) != 0) device_printf(ch->devinfo->dev, "%s: failed blksz=%u blkcnt=%u\n", __func__, blksz, blkcnt); - ch->blksz = sndbuf_getblksz(ch->b); - ch->blkcnt = sndbuf_getblkcnt(ch->b); + ch->blksz = ch->b->blksz; + ch->blkcnt = ch->b->blkcnt; return (0); } @@ -2169,7 +2169,7 @@ hdaa_channel_start(struct hdaa_chan *ch) ch->dir == PCMDIR_PLAY ? 1 : 0, ch->sid); HDAC_STREAM_START(device_get_parent(devinfo->dev), devinfo->dev, ch->dir == PCMDIR_PLAY ? 1 : 0, ch->sid, - sndbuf_getbufaddr(ch->b), ch->blksz, ch->blkcnt); + ch->b->buf_addr, ch->blksz, ch->blkcnt); ch->flags |= HDAA_CHN_RUNNING; return (0); } diff --git a/sys/dev/sound/pci/hdsp-pcm.c b/sys/dev/sound/pci/hdsp-pcm.c index 5ac571e64fde..bc11199f15e8 100644 --- a/sys/dev/sound/pci/hdsp-pcm.c +++ b/sys/dev/sound/pci/hdsp-pcm.c @@ -971,7 +971,7 @@ hdspchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) hdsp_write_4(sc, HDSP_FREQ_REG, hdsp_freq_reg_value(sc->speed)); end: - return (sndbuf_getblksz(ch->buffer)); + return (ch->buffer->blksz); } static uint32_t hdsp_bkp_fmt[] = { diff --git a/sys/dev/sound/pci/hdspe-pcm.c b/sys/dev/sound/pci/hdspe-pcm.c index 09bbbe22dacf..1c0a92e45b7a 100644 --- a/sys/dev/sound/pci/hdspe-pcm.c +++ b/sys/dev/sound/pci/hdspe-pcm.c @@ -962,7 +962,7 @@ hdspechan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) (sc->period * 4)); end: - return (sndbuf_getblksz(ch->buffer)); + return (ch->buffer->blksz); } static uint32_t hdspe_bkp_fmt[] = { diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c index 500d6d95daac..53f4db3332a8 100644 --- a/sys/dev/sound/pci/ich.c +++ b/sys/dev/sound/pci/ich.c @@ -301,15 +301,15 @@ ich_filldtbl(struct sc_chinfo *ch) uint32_t base; int i; - base = sndbuf_getbufaddr(ch->buffer); - if ((ch->blksz * ch->blkcnt) > sndbuf_getmaxsize(ch->buffer)) - ch->blksz = sndbuf_getmaxsize(ch->buffer) / ch->blkcnt; - if ((sndbuf_getblksz(ch->buffer) != ch->blksz || - sndbuf_getblkcnt(ch->buffer) != ch->blkcnt) && + base = ch->buffer->buf_addr; + if ((ch->blksz * ch->blkcnt) > ch->buffer->maxsize) + ch->blksz = ch->buffer->maxsize / ch->blkcnt; + if ((ch->buffer->blksz != ch->blksz || + ch->buffer->blkcnt != ch->blkcnt) && sndbuf_resize(ch->buffer, ch->blkcnt, ch->blksz) != 0) device_printf(sc->dev, "%s: failed blksz=%u blkcnt=%u\n", __func__, ch->blksz, ch->blkcnt); - ch->blksz = sndbuf_getblksz(ch->buffer); + ch->blksz = ch->buffer->blksz; for (i = 0; i < ICH_DTBL_LENGTH; i++) { ch->dtbl[i].buffer = base + (ch->blksz * (i % ch->blkcnt)); @@ -491,7 +491,7 @@ ichchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) ); if (sc->flags & ICH_HIGH_LATENCY) - blocksize = sndbuf_getmaxsize(ch->buffer) / ch->blkcnt; + blocksize = ch->buffer->maxsize / ch->blkcnt; if (blocksize < ICH_MIN_BLKSZ) blocksize = ICH_MIN_BLKSZ; @@ -734,7 +734,7 @@ ich_calibrate(void *arg) ch->blkcnt = 2; sc->flags |= ICH_CALIBRATE_DONE; ICH_UNLOCK(sc); - ichchan_setblocksize(0, ch, sndbuf_getmaxsize(ch->buffer) >> 1); + ichchan_setblocksize(0, ch, ch->buffer->maxsize >> 1); ICH_LOCK(sc); sc->flags &= ~ICH_CALIBRATE_DONE; diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index 2d102fcd6dbe..ee39f5f3c90d 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -444,10 +444,10 @@ m3_pchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel return (NULL); } M3_LOCK(sc); - ch->bufsize = sndbuf_getsize(ch->buffer); + ch->bufsize = ch->buffer->bufsize; /* host dma buffer pointers */ - bus_addr = sndbuf_getbufaddr(ch->buffer); + bus_addr = ch->buffer->buf_addr; if (bus_addr & 3) { device_printf(sc->dev, "m3_pchan_init unaligned bus_addr\n"); bus_addr = (bus_addr + 4) & ~3; @@ -595,7 +595,7 @@ m3_pchan_setblocksize(kobj_t kobj, void *chdata, u_int32_t blocksize) M3_DEBUG(CHANGE, ("m3_pchan_setblocksize(dac=%d, blocksize=%d)\n", ch->dac_idx, blocksize)); - return (sndbuf_getblksz(ch->buffer)); + return (ch->buffer->blksz); } static int @@ -709,7 +709,7 @@ m3_pchan_getptr_internal(struct sc_pchinfo *ch) struct sc_info *sc = ch->parent; u_int32_t hi, lo, bus_base, bus_crnt; - bus_base = sndbuf_getbufaddr(ch->buffer); + bus_base = ch->buffer->buf_addr; hi = m3_rd_assp_data(sc, ch->dac_data + CDATA_HOST_SRC_CURRENTH); lo = m3_rd_assp_data(sc, ch->dac_data + CDATA_HOST_SRC_CURRENTL); bus_crnt = lo | (hi << 16); @@ -823,10 +823,10 @@ m3_rchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel return (NULL); } M3_LOCK(sc); - ch->bufsize = sndbuf_getsize(ch->buffer); + ch->bufsize = ch->buffer->bufsize; /* host dma buffer pointers */ - bus_addr = sndbuf_getbufaddr(ch->buffer); + bus_addr = ch->buffer->buf_addr; if (bus_addr & 3) { device_printf(sc->dev, "m3_rchan_init unaligned bus_addr\n"); bus_addr = (bus_addr + 4) & ~3; @@ -968,7 +968,7 @@ m3_rchan_setblocksize(kobj_t kobj, void *chdata, u_int32_t blocksize) M3_DEBUG(CHANGE, ("m3_rchan_setblocksize(adc=%d, blocksize=%d)\n", ch->adc_idx, blocksize)); - return (sndbuf_getblksz(ch->buffer)); + return (ch->buffer->blksz); } static int @@ -1061,7 +1061,7 @@ m3_rchan_getptr_internal(struct sc_rchinfo *ch) struct sc_info *sc = ch->parent; u_int32_t hi, lo, bus_base, bus_crnt; - bus_base = sndbuf_getbufaddr(ch->buffer); + bus_base = ch->buffer->buf_addr; hi = m3_rd_assp_data(sc, ch->adc_data + CDATA_HOST_SRC_CURRENTH); lo = m3_rd_assp_data(sc, ch->adc_data + CDATA_HOST_SRC_CURRENTL); bus_crnt = lo | (hi << 16); @@ -1162,7 +1162,7 @@ m3_handle_channel_intr: pch->ptr = m3_pchan_getptr_internal(pch); delta = pch->bufsize + pch->ptr - pch->prevptr; delta %= pch->bufsize; - if (delta < sndbuf_getblksz(pch->buffer)) + if (delta < pch->buffer->blksz) continue; pch->prevptr = pch->ptr; M3_UNLOCK(sc); @@ -1176,7 +1176,7 @@ m3_handle_channel_intr: rch->ptr = m3_rchan_getptr_internal(rch); delta = rch->bufsize + rch->ptr - rch->prevptr; delta %= rch->bufsize; - if (delta < sndbuf_getblksz(rch->buffer)) + if (delta < rch->buffer->blksz) continue; rch->prevptr = rch->ptr; M3_UNLOCK(sc); diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c index d7824c990a52..1fee943d9364 100644 --- a/sys/dev/sound/pci/neomagic.c +++ b/sys/dev/sound/pci/neomagic.c @@ -362,7 +362,7 @@ nmchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c sndbuf_setup(ch->buffer, (u_int8_t *)rman_get_virtual(sc->buf) + chnbuf, NM_BUFFSIZE); if (bootverbose) device_printf(sc->dev, "%s buf %p\n", (dir == PCMDIR_PLAY)? - "play" : "rec", sndbuf_getbuf(ch->buffer)); + "play" : "rec", ch->buffer->buf); ch->parent = sc; ch->channel = c; ch->dir = dir; diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c index 90dd2e26ad41..8229b0cffdae 100644 --- a/sys/dev/sound/pci/solo.c +++ b/sys/dev/sound/pci/solo.c @@ -584,7 +584,8 @@ esschan_trigger(kobj_t obj, void *data, int go) ess_lock(sc); switch (go) { case PCMTRIG_START: - ess_dmasetup(sc, ch->hwch, sndbuf_getbufaddr(ch->buffer), sndbuf_getsize(ch->buffer), ch->dir); + ess_dmasetup(sc, ch->hwch, ch->buffer->buf_addr, + ch->buffer->bufsize, ch->dir); ess_dmatrigger(sc, ch->hwch, 1); ess_start(ch); break; diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index 07b9e1004573..874d1c7a2e2a 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -555,9 +555,9 @@ trpchan_trigger(kobj_t obj, void *data, int go) ch->fms = 0; ch->ec = 0; ch->alpha = 0; - ch->lba = sndbuf_getbufaddr(ch->buffer); + ch->lba = ch->buffer->buf_addr; ch->cso = 0; - ch->eso = (sndbuf_getsize(ch->buffer) / sndbuf_getalign(ch->buffer)) - 1; + ch->eso = (ch->buffer->bufsize / ch->buffer->align) - 1; ch->rvol = ch->cvol = 0x7f; ch->gvsel = 0; ch->pan = 0; @@ -581,7 +581,7 @@ trpchan_getptr(kobj_t obj, void *data) struct tr_chinfo *ch = data; tr_rdch(ch); - return ch->cso * sndbuf_getalign(ch->buffer); + return ch->cso * ch->buffer->align; } static struct pcmchan_caps * @@ -680,7 +680,7 @@ trrchan_trigger(kobj_t obj, void *data, int go) i = tr_rd(tr, TR_REG_DMAR11, 1) & 0x03; tr_wr(tr, TR_REG_DMAR11, i | 0x54, 1); /* set up base address */ - tr_wr(tr, TR_REG_DMAR0, sndbuf_getbufaddr(ch->buffer), 4); + tr_wr(tr, TR_REG_DMAR0, ch->buffer->buf_addr, 4); /* set up buffer size */ i = tr_rd(tr, TR_REG_DMAR4, 4) & ~0x00ffffff; tr_wr(tr, TR_REG_DMAR4, i | (sndbuf_runsz(ch->buffer) - 1), 4); @@ -703,7 +703,7 @@ trrchan_getptr(kobj_t obj, void *data) struct tr_info *tr = ch->parent; /* return current byte offset of channel */ - return tr_rd(tr, TR_REG_DMAR0, 4) - sndbuf_getbufaddr(ch->buffer); + return tr_rd(tr, TR_REG_DMAR0, 4) - ch->buffer->buf_addr; } static struct pcmchan_caps * diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c index 243353805b94..47caa7ea4459 100644 --- a/sys/dev/sound/pci/via8233.c +++ b/sys/dev/sound/pci/via8233.c @@ -385,7 +385,7 @@ via_buildsgdt(struct via_chinfo *ch) uint32_t phys_addr, flag; int i; - phys_addr = sndbuf_getbufaddr(ch->buffer); + phys_addr = ch->buffer->buf_addr; for (i = 0; i < ch->blkcnt; i++) { flag = (i == ch->blkcnt - 1) ? VIA_DMAOP_EOL : VIA_DMAOP_FLAG; @@ -568,8 +568,8 @@ via8233chan_setfragments(kobj_t obj, void *data, blksz &= VIA_BLK_ALIGN; - if (blksz > (sndbuf_getmaxsize(ch->buffer) / VIA_SEGS_MIN)) - blksz = sndbuf_getmaxsize(ch->buffer) / VIA_SEGS_MIN; + if (blksz > (ch->buffer->maxsize / VIA_SEGS_MIN)) + blksz = ch->buffer->maxsize / VIA_SEGS_MIN; if (blksz < VIA_BLK_MIN) blksz = VIA_BLK_MIN; if (blkcnt > VIA_SEGS_MAX) @@ -577,7 +577,7 @@ via8233chan_setfragments(kobj_t obj, void *data, if (blkcnt < VIA_SEGS_MIN) blkcnt = VIA_SEGS_MIN; *** 1195 LINES SKIPPED *** From nobody Tue Nov 11 12:08:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKP4CLsz6GLGk; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKP15V5z3bYg; Tue, 11 Nov 2025 12:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nUCaZqXqnOq3aqkduCaFat1codH/SMhyzaF2bi3/5Xk=; b=YmiWC6GUliIIiAxi0shaMsJ6ddyJzgiFafT8EwcbI/gkl1jYWVk1gWGCg8HeBDR2FuHr0n PAAMbjEQEpdcL+vu6K+97awGR7FgLCcxsUw3YxvD59dg/Hl3EDT+b9Hhg8ncDEapI5ia4A I6PryILKXmBZ2OFcCECxKGnEMKe061D8QeWjmIIE2EJJ+QDgLW/PpRyktECUC6H8L1C6ch aEnpQCjwyyghHk/ypVNkK8xFJv4yFR2WNJCQTxCgtJ6RAbshB4GQ6mqkdN73XNtRk7Yxdi Mb5rD4EObHgExiUNn6Pzh+s3n9JetDLj8gnJ3oZtbxVo5teH8yVRsUzab6emlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nUCaZqXqnOq3aqkduCaFat1codH/SMhyzaF2bi3/5Xk=; b=LgQCkTnhz+2xH24LZsBQmzFyhJh8bxut0y8GhiGmr91UxFEizjxwzhl6x2IWFF6B+mCX2u 57g2pw1F93vBTyToEy8oVVhDz2iBolwGAVcJqojNWZNlQJwXfBxMj+cXYzm+bcfuBZfDxz YgFV356jjCb0KxoMk7eDh8/YOiA0Gcjfd04ASAKq4yt1d+E94oIB1e1Kd4PBiFvKvn6aie 3NjjKrlqFGCXByQeK0TqAL199ATHxULl2S1kUAJPcQ5MzloO0Az3dSvgL/stJsPtlF/ELh FSh67ysnbUV+bnIBOibM8QczgIGTSrjR9JnS3M9Zyza/IwrH+k7l20OniZ+SRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862889; a=rsa-sha256; cv=none; b=TehtiT0cbJsHYL9Imm2XGbwmY5bLYed5Usb91bM+WYOO9fEDbdJqOEqexZCTFZK1WjAT+U ojbeUSZtOGmH0eascuIv7RbpIj78/ftBoNTQKl+3hMhfeJfyYvWYanaGbjmqNTrgzQiaQo nzAcM60REQeXWIXcyNF0Wq/W48+E5WIkqE/4Rdvn0h06PrCZCbks1peyo8l1Ym5DvgGTv4 Y7Jb7i7bRoCqsY5+JV0ANLQKxdmpSfVJVMhyGbdURxlVVJQevtseX54fEkPJTOJCGAa5q4 j6YVamoK8IVa1ZcuBfaJe6B3AXDKSF3s7PAxYk6WYKrxkejPsShN/qlFv/kngg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKP0c3sz13pP; Tue, 11 Nov 2025 12:08: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 5ABC88Fx035071; Tue, 11 Nov 2025 12:08:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC88cb035068; Tue, 11 Nov 2025 12:08:08 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:08 GMT Message-Id: <202511111208.5ABC88cb035068@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: 4e2bf54d9f2e - main - sound: Add to pcm/buffer.* copyright List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 4e2bf54d9f2e9a2a51dbdcebf079089615102f1c Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4e2bf54d9f2e9a2a51dbdcebf079089615102f1c commit 4e2bf54d9f2e9a2a51dbdcebf079089615102f1c Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:37 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:37 +0000 sound: Add to pcm/buffer.* copyright Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/dev/sound/pcm/buffer.c | 4 ++++ sys/dev/sound/pcm/buffer.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index 841fc5b0d8a9..eb2cbe667bf3 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -5,6 +5,10 @@ * Portions Copyright (c) Ryan Beasley - GSoC 2006 * Copyright (c) 1999 Cameron Grant * All rights reserved. + * Copyright (c) 2025 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/sys/dev/sound/pcm/buffer.h b/sys/dev/sound/pcm/buffer.h index 5509256ea433..371ba2dd94ce 100644 --- a/sys/dev/sound/pcm/buffer.h +++ b/sys/dev/sound/pcm/buffer.h @@ -3,6 +3,10 @@ * * Copyright (c) 1999 Cameron Grant * All rights reserved. + * Copyright (c) 2025 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From nobody Tue Nov 11 12:08:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKQ4Zqwz6GLDM; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKQ27vdz3bmN; Tue, 11 Nov 2025 12:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0BAy1d77Y2RyCB17lRNQ6O6YMr+07PhvjOY0We2HFs=; b=WWfe638sdNhu1bijlYWdAIDo8ulfJWck6f/IbPnPe95blASefaSlF87CssjhTePxwbkwKy i/WXYBOoezeIgSyR7zlx3bQuYVrAhhvTzOjFuJjXHDJtrw0NYr285dy0/pXgfiY7J20615 oLan5z7Yvzea7PEmLjGx8gTuYkPeJ3KN0QWbnmqgL7aUnrtciElPaE6olK+eW1bdV8otmx HBIvl9alJ/jShXrVzA2CkJ7bY8EllDozx+C0U0nTLEOSsyzKibY7/3HAJf/RbXrYJiGfRl UrhjOV3zzwUZUnzJZJDgJSYqvWsNMGT3sbbGqRIs/fRQwB3u2n9DB1x5bGyfAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0BAy1d77Y2RyCB17lRNQ6O6YMr+07PhvjOY0We2HFs=; b=oRtQ4Qt9zdn6BiVGXDFcbqTMyfvXHnDOxqwVW9sUdegCCaMV0Lwk9ME3NeVuqLQKozsnNK f6j/cJyx7hniWDXkWjSxdM6dHIbGaHt8PpzI0aRXsJsr9z+IANE3Xv9mcfIdECT3Kquebw rhzo+qrqNUNuyujg7FpzJ0MG/EOaIeCkysPAF42mMYAUjqEiY3jvQvSXW4Pv5LBWOq9q0n zy1vWoJSZZvH+cT8PZaiJtmlij3Y+ODKgjV6i/6xULLW9frZLqhnNzbmMwuwGvfsODghNM IpllqrtNelg8n6fwPW2pE1lJ4nEAHP6qkQzNp4bbs/IR2fyVdPlW+x5SFCJCBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862890; a=rsa-sha256; cv=none; b=TncoDuuvJePePq37OSljwFY21i9SDz16291EwLQgA7t1KBq8RlU4yjSdJ642vUtUl6olR6 atWrInTS58kfyvtYV6V90zE1X2tPX36NrO88bjkks0bEBlY/DpOWFUixQjHbjWv+MdIJB1 pWA8xFq2CXL8Pl16UjkVBJw3cdZ6BjyKmzVXmPERKa4OAkEVtxxgJyXe9vOIwZbHD6y5Dy 8iGCJ85x7FE+4l8823VG/J2FJ4pP3AbTKL52/lkG/yVD38qN9cl0E3pWWCW5ZEV5QUoACK df2tRcKR04JzsKxRdjaxxrsFzwvxiz2e4Zpc0AGa/Gp85qXiHsfQqNhXJJOgBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKQ1ZYJz13Zh; Tue, 11 Nov 2025 12:08: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 5ABC8AxK035107; Tue, 11 Nov 2025 12:08:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8Aj7035104; Tue, 11 Nov 2025 12:08:10 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:10 GMT Message-Id: <202511111208.5ABC8Aj7035104@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: f1157508b37d - main - sound: Retire unused {pcm_feederdesc,feedertab_entry}->idx List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: f1157508b37d66c0e038b2a3346858999bcd5984 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f1157508b37d66c0e038b2a3346858999bcd5984 commit f1157508b37d66c0e038b2a3346858999bcd5984 Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:42 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:42 +0000 sound: Retire unused {pcm_feederdesc,feedertab_entry}->idx Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53547 --- sys/dev/sound/pcm/feeder.c | 8 +------- sys/dev/sound/pcm/feeder.h | 1 - sys/dev/sound/pcm/feeder_eq.c | 4 ++-- sys/dev/sound/pcm/feeder_format.c | 4 ++-- sys/dev/sound/pcm/feeder_matrix.c | 4 ++-- sys/dev/sound/pcm/feeder_mixer.c | 4 ++-- sys/dev/sound/pcm/feeder_rate.c | 4 ++-- sys/dev/sound/pcm/feeder_volume.c | 4 ++-- 8 files changed, 13 insertions(+), 20 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 2ec0ee6fb3fd..3f6b35c9197d 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -48,8 +48,6 @@ struct feedertab_entry { SLIST_ENTRY(feedertab_entry) link; struct feeder_class *feederclass; struct pcm_feederdesc *desc; - - int idx; }; static SLIST_HEAD(, feedertab_entry) feedertab; static int feedercnt = 0; @@ -69,7 +67,6 @@ feeder_register_root(void *p) fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); fte->feederclass = fc; fte->desc = NULL; - fte->idx = feedercnt; SLIST_INSERT_HEAD(&feedertab, fte, link); feedercnt++; } @@ -92,8 +89,6 @@ feeder_register(void *p) fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); fte->feederclass = fc; fte->desc = &fc->desc[i]; - fte->idx = feedercnt; - fte->desc->idx = feedercnt; SLIST_INSERT_HEAD(&feedertab, fte, link); i++; } @@ -156,7 +151,6 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) f->desc->in = 0; f->desc->out = 0; f->desc->flags = 0; - f->desc->idx = 0; } err = FEEDER_INIT(f); @@ -394,7 +388,7 @@ feeder_printchain(struct pcm_feeder *head) printf("feeder chain (head @%p)\n", head); f = head; while (f != NULL) { - printf("%s/%d @ %p\n", f->class->name, f->desc->idx, f); + printf("%s @ %p\n", f->class->name, f); f = f->source; } printf("[end]\n\n"); diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index 60b8280e59ef..e417d68fea71 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -31,7 +31,6 @@ struct pcm_feederdesc { u_int32_t type; u_int32_t in, out; u_int32_t flags; - int idx; }; struct feeder_class { diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index 23e27b922486..88a083a3bfd1 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -420,8 +420,8 @@ feed_eq_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, } static struct pcm_feederdesc feeder_eq_desc[] = { - { FEEDER_EQ, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } + { FEEDER_EQ, 0, 0, 0 }, + { 0, 0, 0, 0 } }; static kobj_method_t feeder_eq_methods[] = { diff --git a/sys/dev/sound/pcm/feeder_format.c b/sys/dev/sound/pcm/feeder_format.c index 0feac43374b8..c9679cfeba44 100644 --- a/sys/dev/sound/pcm/feeder_format.c +++ b/sys/dev/sound/pcm/feeder_format.c @@ -173,8 +173,8 @@ feed_format_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, } static struct pcm_feederdesc feeder_format_desc[] = { - { FEEDER_FORMAT, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } + { FEEDER_FORMAT, 0, 0, 0 }, + { 0, 0, 0, 0 } }; static kobj_method_t feeder_format_methods[] = { diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c index 43258a311d82..a0af32b887ce 100644 --- a/sys/dev/sound/pcm/feeder_matrix.c +++ b/sys/dev/sound/pcm/feeder_matrix.c @@ -399,8 +399,8 @@ feed_matrix_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, } static struct pcm_feederdesc feeder_matrix_desc[] = { - { FEEDER_MATRIX, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } + { FEEDER_MATRIX, 0, 0, 0 }, + { 0, 0, 0, 0 } }; static kobj_method_t feeder_matrix_methods[] = { diff --git a/sys/dev/sound/pcm/feeder_mixer.c b/sys/dev/sound/pcm/feeder_mixer.c index ab67a14711d3..028e9366aa8e 100644 --- a/sys/dev/sound/pcm/feeder_mixer.c +++ b/sys/dev/sound/pcm/feeder_mixer.c @@ -359,8 +359,8 @@ feed_mixer_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, } static struct pcm_feederdesc feeder_mixer_desc[] = { - { FEEDER_MIXER, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } + { FEEDER_MIXER, 0, 0, 0 }, + { 0, 0, 0, 0 } }; static kobj_method_t feeder_mixer_methods[] = { diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index 9c29142b9d6b..166165e95e65 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -1706,8 +1706,8 @@ z_resampler_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, } static struct pcm_feederdesc feeder_rate_desc[] = { - { FEEDER_RATE, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 }, + { FEEDER_RATE, 0, 0, 0 }, + { 0, 0, 0, 0 }, }; static kobj_method_t feeder_rate_methods[] = { diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c index ddcbf29804f3..119ab1b288d8 100644 --- a/sys/dev/sound/pcm/feeder_volume.c +++ b/sys/dev/sound/pcm/feeder_volume.c @@ -307,8 +307,8 @@ feed_volume_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, } static struct pcm_feederdesc feeder_volume_desc[] = { - { FEEDER_VOLUME, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } + { FEEDER_VOLUME, 0, 0, 0 }, + { 0, 0, 0, 0 } }; static kobj_method_t feeder_volume_methods[] = { From nobody Tue Nov 11 12:08:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKR5LgCz6GLGq; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKR2tB9z3bT4; Tue, 11 Nov 2025 12:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGAsgz1kfsfpn1P+QpW1MiUprZcl7/vLxtQe0HzDUoc=; b=wBlnEI5YKPYbgwcL5XolGWJP7nSnseqc0ddByXv5RIN4r6YYM6J72FbaBLz1NdShnN0hsq j18IRFYziKGBN0lfg4pNXyG8FEWYslb9hbxCvlqkw3Wbs7HymVS7rs6YyQnRSJFDdjnaeW EcWOQMpelncozJcvzv1ybCvOKCSVusHJSKq8efm/OquJyBIkCnJ6cEk/tgLQ+PmwbwLg1l KOsaLSEYQUkznDd7yaISah8z+/urbd8ImQ3FlBHsspmm5LMEKikBjHImrdTGiI1HV+pxGe MHrVYQN37h8zQuqj9UrOCh9oyWrPj/oQra3hwZHW99fHVAEumVzkwuZXzsdJ/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGAsgz1kfsfpn1P+QpW1MiUprZcl7/vLxtQe0HzDUoc=; b=Aiagn1bIBBkDXcfaSXZJwtwcHLejZmF56YAJHntoVSrD0TH2jJJROOx/FrElgQ93RvKPhL nljkfacKW1UzBGIB5BhTFNkpHl1SGO42VcXAuqhVpx6o0D6CWhZRW52yS7uYR1yR1lAFT1 rT69Ylg443ZDTIlVNAYTnCR4sl2CPJF1Q+Tkjy1iZKJe4eDmbuJHhWpJvWkFNVLrgSXkkK Ua+beOs567XoK1g+l6T1+mFmNSD19FSvXhQUXyYgAnsHu9Unywyns7yCRLNweKN3FoM+DP 83kvDTYfpEWKChACuEZF+pq7UEchVq0MlSh1IdvsOLkPAJNjY+bsnS82wn/t3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862891; a=rsa-sha256; cv=none; b=BWtQmqbQ+i8N3+hmSYbvGo8lB1SmjAPu/n6qlU03dy7RfIChMPYA/oQoNoiKCdEc7Z9q28 GduEguTbPV45LZ8JzrcFzQL4jLbeHfqINBGJhDpF4x9+Bj7OCQad5t0JloBWvJ1XaA+4lu y/EKnvKV5+hys2M8OWeRz5hU+ovxtTzBmnNaIUwdCSNQE+Il7inSJoeNgRvfmIP3M87Nfu rcqTcQSNq5vzmxinNhSePYA2+pWCmFmpJa2Mh74n3n3+y+G41/5PU5kvp0cqQcw+FkTmB1 qx9jZtRmBNAgEKkNDyUH5c4fUJfNzGtRtvNmh+HQK4SuQYpB5Y0K+isWYaCfLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKR2SmHz13Zj; Tue, 11 Nov 2025 12:08: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 5ABC8BMY035139; Tue, 11 Nov 2025 12:08:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8BpS035136; Tue, 11 Nov 2025 12:08:11 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:11 GMT Message-Id: <202511111208.5ABC8BpS035136@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: 84282785cc49 - main - sound: Retire MAXFEEDERS and feedercnt List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 84282785cc497c3fb798502899f880e15d063233 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=84282785cc497c3fb798502899f880e15d063233 commit 84282785cc497c3fb798502899f880e15d063233 Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:47 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:47 +0000 sound: Retire MAXFEEDERS and feedercnt Apart from the fact that it's unrealistic to reach MAXFEEDERS (256), since sound(4) comes with maximum 7 feeders (including feeder_root), there is also no reason to cap it. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53549 --- sys/dev/sound/pcm/feeder.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 3f6b35c9197d..2e19577bfde3 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -42,15 +42,12 @@ static MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); -#define MAXFEEDERS 256 - struct feedertab_entry { SLIST_ENTRY(feedertab_entry) link; struct feeder_class *feederclass; struct pcm_feederdesc *desc; }; static SLIST_HEAD(, feedertab_entry) feedertab; -static int feedercnt = 0; /*****************************************************************************/ @@ -60,7 +57,6 @@ feeder_register_root(void *p) struct feeder_class *fc = p; struct feedertab_entry *fte; - MPASS(feedercnt == 0); KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name)); SLIST_INIT(&feedertab); @@ -68,7 +64,6 @@ feeder_register_root(void *p) fte->feederclass = fc; fte->desc = NULL; SLIST_INSERT_HEAD(&feedertab, fte, link); - feedercnt++; } void @@ -85,18 +80,13 @@ feeder_register(void *p) * translations being unavailable */ i = 0; - while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) { + while (fc->desc[i].type > 0) { fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); fte->feederclass = fc; fte->desc = &fc->desc[i]; SLIST_INSERT_HEAD(&feedertab, fte, link); i++; } - feedercnt++; - if (feedercnt >= MAXFEEDERS) { - printf("MAXFEEDERS (%d >= %d) exceeded\n", - feedercnt, MAXFEEDERS); - } } static void From nobody Tue Nov 11 12:08:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKS6k0Dz6GLMS; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKS4C0Vz3bkk; Tue, 11 Nov 2025 12:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NvIpe0ENoObIzpmsZjwAliRHpAOZbNE02Lqaxc6BR6w=; b=ExX5IC+lqx9dBLmuPF1H4pQUQNTZCJV2LTj5cmTcKib4MfgBfiHycnyA9ZL8oWL0IwR99y dH5H39g5aDJk1Vn4E5zfD4UinpaHnmW1m+oJlqo72oUODfLl5BFGyi/IGd9xvo3c5gcocE W+woP4Q9dyZh2WvJKeX1mp4xngDK8biUwCwGD5L2/iAorpGWGJ5Eg8NDmSPDf6WMRzoeC7 z6tG6vXnsF5Ok0AFKxlxL5OMq6YEFtwdNUD9YvbpJHomOgug/XqiW/WM9oXtZ3bh+Q1K8b J3dG0E8W+0Wfhcg9WQE04YoFPtm/rIdtENzflYp64ANKm3vK0UfCjHycjF0MbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NvIpe0ENoObIzpmsZjwAliRHpAOZbNE02Lqaxc6BR6w=; b=C2Csc6Ml5TJVwA6eN1q3k1W500QZ8+BVTUZath5GtmLwjztvshLwEM5aKH8Ev/xdP1CfhF jX+mDyLzm/3iqTRJp1WkkVJSGqQuDCx57dmfBIaL40Rk966UhQSUOuowMif4Hr2lfJ34kF v+qS3QpcPUdohMLCddT4OWk40EIlB8fFA406EfNuD2gdRaAB/joLvoSlVBmhv7vv/qCBiO MQAz6BfLy3BGlwhQkZjeAF7YujxiWWJ6RnqMFq/aqn3S++SguW8l1MO/bOnykoEw6sCYGU tIatjEzkq9KmKv2tQah8Ws21yZ+ZiAxjo2TY/DoJz9Cg7C3WkS6p7LjD5Xpltg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862892; a=rsa-sha256; cv=none; b=jwMui0KMMjrv1E7B/EG9B0wcxSbdTpaXlW2jcsIAlDirlZ/NwllTK7kcJNuUn4KVF0PmZo Co9NJEk2cKzL7pFkrVr0VC7HhrUMtS2i/kQnMXAUHRPdX+btWFfuSGceLPmWNX/ZJYibhc iehRdGRyklgQF6T7WQZwUVWxXM0v+x5Sub2hWUqpD6aYsquiq66jGvZ1L5GlIDZSMlEE+0 mlgSt+9NnerBjhd+125yo8c8g6/whhBUOpMFRDG9Ur1JqujXyLnNqdec4HnMnE3qf1dtwa hDn8A1dm4g3WojG5cLMhXN0NUOxpN49dpTxgRZ8MX6B6M4h3BsulOnExNvSC5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKS3NZtz13cQ; Tue, 11 Nov 2025 12:08: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 5ABC8CY4035178; Tue, 11 Nov 2025 12:08:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8Cee035174; Tue, 11 Nov 2025 12:08:12 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:12 GMT Message-Id: <202511111208.5ABC8Cee035174@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: 6049209f35c3 - main - sound: Remove unnecessary pcm/vchan.h include from pcm/feeder.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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6049209f35c39823f6f9a756953b361d52658812 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6049209f35c39823f6f9a756953b361d52658812 commit 6049209f35c39823f6f9a756953b361d52658812 Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:51 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:05:51 +0000 sound: Remove unnecessary pcm/vchan.h include from pcm/feeder.c Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53550 --- sys/dev/sound/pcm/feeder.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 2e19577bfde3..e94e742b263f 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -36,7 +36,6 @@ #endif #include -#include #include "feeder_if.h" From nobody Tue Nov 11 12:08:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKT69Mzz6GLDj; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKT4c3Mz3bf7; Tue, 11 Nov 2025 12:08:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gcTovBEp0b2tsYonyieNe9AAUEDDSFK1bbex1j4LT60=; b=jX/uvcw5+G2mO7ihV3u8bsKWi9WFDomf3GHDvWlTvokKHLV5Ree5P/rCoZws5Oy0kref9Y 7JrqXTyPCqIjYxjmRaLAFZmxfB7kme4FDW5jQSI7xM+zJnW1jGyQpwcGpkkpg68PzQ8A/R GaJomrYYA5BD5tpfRNRjNhserIp7D00hCI0awyqo2qmwa82P26n9ezaS2BTKS5Z08mHpus tpeArgChCRy3y2Y6sXraWXanXhDMuyxyZCuMcKGnk4AC/I4bViTWpuhOwVS8dnxCr/VN2c fzkBM2vMwW7T6OjNDNCJMDpckiBd9R1W56gBweEempEuWLcG8hia+hzKgGeH1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gcTovBEp0b2tsYonyieNe9AAUEDDSFK1bbex1j4LT60=; b=FsnWbdEc9BozDVgOoEHlY5AipxjpquKBZSdol4xEBex+pAptMUoQTUNGy2i0x0RWaUNj6u 1kLon6BP4OypX77uAkA5dn9oz2sOJZ44TpCwu/IYRxOWJWJnaPOLOffLrPHvfpIZk8zfev HNdOJ2olFrtVC3iX+7oqf+5GFUI/J/qf21AmcPWF5PJ6fbtNlHVxCAlQw28XiPJ81BhlL1 WEBFx/bThWvc9H3bzqJ9OGJMjmWMeRH/PZi+p77Jj6Vwxtr1EIktGdfSpc4Ebjo0G3h57n CId6CI+PU2DcHegJD511Lu/UDmzsRRAKHl2sesdAwR5ytIDBFi/hxy86w+sW2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862893; a=rsa-sha256; cv=none; b=ldZYj92DmscYVRqybFyJ4tEg2jKERtHwGN69n9nu7pt6GTPkxbUswoiUSqcmJ58GF8xDl/ TWvZu0tXNVepULFXjYbHe92Ycs+lSQCBAULumhFIJcSjCVA+y9cJ7bvyQhHm0LYYqBKPg8 y3ICm/eooH5y/Jvvj7dodELNdWRrP97nPSI9O/H/S5OWEhhgR4CTPBjg/LBF1kBQ/JVHB9 fSg7rmiYTeE8mG+LzlW2PINL+BarJH+2SEuSUFL+Liq9Yc0WgGwny5Oklzec4mhH8y4T+W aLiIlF0bmGX70crICaGlBVsReEVVM/5EvE+nMpg/QWZUtRXabrbXsku+ZxRZsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKT440qz13pR; Tue, 11 Nov 2025 12:08: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 5ABC8DVm035210; Tue, 11 Nov 2025 12:08:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8D4l035207; Tue, 11 Nov 2025 12:08:13 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:13 GMT Message-Id: <202511111208.5ABC8D4l035207@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: 7d33c3d65190 - main - sound: Simplify pcm_feederdesc initialization List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 7d33c3d651901c97a683689916c810cf4e26a057 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7d33c3d651901c97a683689916c810cf4e26a057 commit 7d33c3d651901c97a683689916c810cf4e26a057 Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:01 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:01 +0000 sound: Simplify pcm_feederdesc initialization Currently we initialize a pcm_feederdesc array for every feeder, which is then used by FEEDER_DECLARE(). However, there is no reason for this to be an array, as each feeder has only one description. Additionally, since the only thing we define in that array is the feeder type, remove the pcm_feederdesc definitions altogether, and instead pass their type to FEEDER_DECLARE() directly, which will then initialize the pcm_feederdesc. This also simplifies feeder_register(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53551 --- sys/dev/sound/pcm/feeder.c | 23 +++++++---------------- sys/dev/sound/pcm/feeder.h | 6 +++--- sys/dev/sound/pcm/feeder_eq.c | 7 +------ sys/dev/sound/pcm/feeder_format.c | 7 +------ sys/dev/sound/pcm/feeder_matrix.c | 7 +------ sys/dev/sound/pcm/feeder_mixer.c | 7 +------ sys/dev/sound/pcm/feeder_rate.c | 7 +------ sys/dev/sound/pcm/feeder_volume.c | 7 +------ 8 files changed, 16 insertions(+), 55 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index e94e742b263f..0dddfa84543d 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -70,22 +70,13 @@ 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 - */ - i = 0; - while (fc->desc[i].type > 0) { - fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); - fte->feederclass = fc; - fte->desc = &fc->desc[i]; - SLIST_INSERT_HEAD(&feedertab, fte, link); - i++; - } + KASSERT(fc->desc.type != 0, ("feeder '%s' has no descriptor", fc->name)); + + fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); + fte->feederclass = fc; + fte->desc = &fc->desc; + SLIST_INSERT_HEAD(&feedertab, fte, link); } static void @@ -442,7 +433,7 @@ static struct feeder_class feeder_root_class = { .name = "feeder_root", .methods = feeder_root_methods, .size = sizeof(struct pcm_feeder), - .desc = NULL, + .desc = { 0 }, .data = NULL, }; /* diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index e417d68fea71..d8760f1c87ab 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -35,7 +35,7 @@ struct pcm_feederdesc { struct feeder_class { KOBJ_CLASS_FIELDS; - struct pcm_feederdesc *desc; + struct pcm_feederdesc desc; void *data; }; @@ -64,12 +64,12 @@ struct pcm_feeder *feeder_find(struct pcm_channel *c, u_int32_t type); void feeder_printchain(struct pcm_feeder *head); int feeder_chain(struct pcm_channel *); -#define FEEDER_DECLARE(feeder, pdata) \ +#define FEEDER_DECLARE(feeder, type, pdata) \ static struct feeder_class feeder ## _class = { \ .name = #feeder, \ .methods = feeder ## _methods, \ .size = sizeof(struct pcm_feeder), \ - .desc = feeder ## _desc, \ + .desc = { type, 0, 0, 0 }, \ .data = pdata, \ }; \ SYSINIT(feeder, SI_SUB_DRIVERS, SI_ORDER_ANY, feeder_register, \ diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index 88a083a3bfd1..05f5a5b82290 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -419,11 +419,6 @@ feed_eq_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, return (dst - b); } -static struct pcm_feederdesc feeder_eq_desc[] = { - { FEEDER_EQ, 0, 0, 0 }, - { 0, 0, 0, 0 } -}; - static kobj_method_t feeder_eq_methods[] = { KOBJMETHOD(feeder_init, feed_eq_init), KOBJMETHOD(feeder_free, feed_eq_free), @@ -432,7 +427,7 @@ static kobj_method_t feeder_eq_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_eq, NULL); +FEEDER_DECLARE(feeder_eq, FEEDER_EQ, NULL); static int32_t feed_eq_scan_preamp_arg(const char *s) diff --git a/sys/dev/sound/pcm/feeder_format.c b/sys/dev/sound/pcm/feeder_format.c index c9679cfeba44..21b54fcafcd7 100644 --- a/sys/dev/sound/pcm/feeder_format.c +++ b/sys/dev/sound/pcm/feeder_format.c @@ -172,11 +172,6 @@ feed_format_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, return (dst - b); } -static struct pcm_feederdesc feeder_format_desc[] = { - { FEEDER_FORMAT, 0, 0, 0 }, - { 0, 0, 0, 0 } -}; - static kobj_method_t feeder_format_methods[] = { KOBJMETHOD(feeder_init, feed_format_init), KOBJMETHOD(feeder_free, feed_format_free), @@ -185,4 +180,4 @@ static kobj_method_t feeder_format_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_format, NULL); +FEEDER_DECLARE(feeder_format, FEEDER_FORMAT, NULL); diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c index a0af32b887ce..69c7e5962268 100644 --- a/sys/dev/sound/pcm/feeder_matrix.c +++ b/sys/dev/sound/pcm/feeder_matrix.c @@ -398,11 +398,6 @@ feed_matrix_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, return (dst - b); } -static struct pcm_feederdesc feeder_matrix_desc[] = { - { FEEDER_MATRIX, 0, 0, 0 }, - { 0, 0, 0, 0 } -}; - static kobj_method_t feeder_matrix_methods[] = { KOBJMETHOD(feeder_init, feed_matrix_init), KOBJMETHOD(feeder_free, feed_matrix_free), @@ -410,7 +405,7 @@ static kobj_method_t feeder_matrix_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_matrix, NULL); +FEEDER_DECLARE(feeder_matrix, FEEDER_MATRIX, NULL); /* External */ int diff --git a/sys/dev/sound/pcm/feeder_mixer.c b/sys/dev/sound/pcm/feeder_mixer.c index 028e9366aa8e..3c2a58ba145f 100644 --- a/sys/dev/sound/pcm/feeder_mixer.c +++ b/sys/dev/sound/pcm/feeder_mixer.c @@ -358,11 +358,6 @@ feed_mixer_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, return (rcnt); } -static struct pcm_feederdesc feeder_mixer_desc[] = { - { FEEDER_MIXER, 0, 0, 0 }, - { 0, 0, 0, 0 } -}; - static kobj_method_t feeder_mixer_methods[] = { KOBJMETHOD(feeder_init, feed_mixer_init), KOBJMETHOD(feeder_free, feed_mixer_free), @@ -371,4 +366,4 @@ static kobj_method_t feeder_mixer_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_mixer, NULL); +FEEDER_DECLARE(feeder_mixer, FEEDER_MIXER, NULL); diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index 166165e95e65..173a0c1fcd39 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -1705,11 +1705,6 @@ z_resampler_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, return (count - left); } -static struct pcm_feederdesc feeder_rate_desc[] = { - { FEEDER_RATE, 0, 0, 0 }, - { 0, 0, 0, 0 }, -}; - static kobj_method_t feeder_rate_methods[] = { KOBJMETHOD(feeder_init, z_resampler_init), KOBJMETHOD(feeder_free, z_resampler_free), @@ -1719,4 +1714,4 @@ static kobj_method_t feeder_rate_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_rate, NULL); +FEEDER_DECLARE(feeder_rate, FEEDER_RATE, NULL); diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c index 119ab1b288d8..942f1a273edf 100644 --- a/sys/dev/sound/pcm/feeder_volume.c +++ b/sys/dev/sound/pcm/feeder_volume.c @@ -306,11 +306,6 @@ feed_volume_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, return (dst - b); } -static struct pcm_feederdesc feeder_volume_desc[] = { - { FEEDER_VOLUME, 0, 0, 0 }, - { 0, 0, 0, 0 } -}; - static kobj_method_t feeder_volume_methods[] = { KOBJMETHOD(feeder_init, feed_volume_init), KOBJMETHOD(feeder_free, feed_volume_free), @@ -319,7 +314,7 @@ static kobj_method_t feeder_volume_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_volume, NULL); +FEEDER_DECLARE(feeder_volume, FEEDER_VOLUME, NULL); /* Extern */ From nobody Tue Nov 11 12:08:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKW0GZwz6GL9D; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKV5w58z3bcV; Tue, 11 Nov 2025 12:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QqQZv+gKQiG34euzDfaW9Dc5UA6ljvIa8vIvy4FCbgU=; b=mFUNa0/iTGIJQaY/gxBuHaoEl2WEssK4X02I4cq94cXXKJ7VNTlIPT94yHKQUgidimv2qv XAGmFq8YJu0kOz5bOyk520eDa+zlVwaWGIcFTB+oP8RNf/MdHh8IzpuRNOGLlY05rrTiE+ lbQmJ4Obdw0BkuRI15zPEXFcQcK80krnW5bRt7Mtfs3yS/bbvl+c0BXTnTsMd13Iintifj rdUslQ+LJnovol0+RyZFOcArs2zxfECAIkCFpSai/X7b434IlWDcqIlwsDOfukJIlo5Ub9 aRnkuCWat4S/pHJUBYAvDr3rKsgW7LQ4uCYJyPhHMXF4JHNep8mYSpEOiTOVLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QqQZv+gKQiG34euzDfaW9Dc5UA6ljvIa8vIvy4FCbgU=; b=Qrbny+Dk8lgcdr9gBXqJnwaarUbOMW5wUcfSRh0vw4d7/I9zkjdCSpcVbHeD0Yplfqu2L4 auw0GUQoPnpprzQ3FzKuKOz3MtlabbqF1QfjVtSYk9MCkONxTfgp3sc/7WHI4Qq7fII82A rlxJhfQuD4C9Djfh/EX79DXmTCMqyU4QEXYi8z5pj7PggCCnFJyHt8J1TScVjx63VmTL1v Miw7C8LiMxKvDd50oWpAEZoGnWL3HK/WDIKEe4BT8N19lAtN4HTqlHM0sKdBpIyMgCquF5 h16PQyseTjt7aWzOLcLpLUPOJwd1iMoOdcd3OzjtT0mMHlOVfhjjZgSYX81NoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862894; a=rsa-sha256; cv=none; b=iSUV1GOZzZSivUPhOlf1yKebS4OQtrkwey93ZDYwrVHkB4HOZejdZ0IENJ1csmeIb1hHl0 b18P8fISSN+peng/jg/PS5V/N6UBIR9w45ek3zqtrG8Ee/N2aLMMv+PeggRlHuNQ2ROpsq RQwveE9BzkHusHBhAjhcwEC8iJqRpIPuhCiTWsBjhgKh0O8CobFmMvTVsCxKHXSuq/noEF ARbTVjzjZNzjdIRvSauenq76/YXJVOGmEMsWp4TQzlh6B/hPRr2/MKwIPHUzcUlwNpX/jB /3g96gTuw6JEtfB/dU1yoW0/ysP0MLm6EB8lFjYVXVS59IS9RT9TA6nU8xbLtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKV4YjZz13C6; Tue, 11 Nov 2025 12:08: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 5ABC8Ein035242; Tue, 11 Nov 2025 12:08:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8ECD035239; Tue, 11 Nov 2025 12:08:14 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:14 GMT Message-Id: <202511111208.5ABC8ECD035239@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: 0e9e222518dc - main - sound: Retire unused pcm_feederdesc->flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 0e9e222518dc543e34f891c00d2a6a1dd93c3fc2 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0e9e222518dc543e34f891c00d2a6a1dd93c3fc2 commit 0e9e222518dc543e34f891c00d2a6a1dd93c3fc2 Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:05 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:05 +0000 sound: Retire unused pcm_feederdesc->flags Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53552 --- sys/dev/sound/pcm/feeder.c | 4 +--- sys/dev/sound/pcm/feeder.h | 3 +-- sys/dev/sound/pcm/feeder_chain.c | 6 ------ 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 0dddfa84543d..6b7c7f43903c 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -97,8 +97,7 @@ cmpdesc(struct pcm_feederdesc *n, struct pcm_feederdesc *m) { return ((n->type == m->type) && ((n->in == 0) || (n->in == m->in)) && - ((n->out == 0) || (n->out == m->out)) && - (n->flags == m->flags)); + ((n->out == 0) || (n->out == m->out))); } static void @@ -130,7 +129,6 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) f->desc->type = FEEDER_ROOT; f->desc->in = 0; f->desc->out = 0; - f->desc->flags = 0; } err = FEEDER_INIT(f); diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index d8760f1c87ab..86cabb3e9925 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -30,7 +30,6 @@ struct pcm_feederdesc { u_int32_t type; u_int32_t in, out; - u_int32_t flags; }; struct feeder_class { @@ -69,7 +68,7 @@ static struct feeder_class feeder ## _class = { \ .name = #feeder, \ .methods = feeder ## _methods, \ .size = sizeof(struct pcm_feeder), \ - .desc = { type, 0, 0, 0 }, \ + .desc = { type, 0, 0 }, \ .data = pdata, \ }; \ SYSINIT(feeder, SI_SUB_DRIVERS, SI_ORDER_ANY, feeder_register, \ diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 8b5d50760b32..f5075bf76a49 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -147,7 +147,6 @@ feeder_build_format(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->type = FEEDER_FORMAT; desc->in = 0; desc->out = 0; - desc->flags = 0; fc = feeder_getclass(desc); if (fc == NULL) { @@ -220,7 +219,6 @@ feeder_build_rate(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->type = FEEDER_RATE; desc->in = 0; desc->out = 0; - desc->flags = 0; fc = feeder_getclass(desc); if (fc == NULL) { @@ -298,7 +296,6 @@ feeder_build_matrix(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->type = FEEDER_MATRIX; desc->in = 0; desc->out = 0; - desc->flags = 0; fc = feeder_getclass(desc); if (fc == NULL) { @@ -355,7 +352,6 @@ feeder_build_volume(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->type = FEEDER_VOLUME; desc->in = 0; desc->out = 0; - desc->flags = 0; fc = feeder_getclass(desc); if (fc == NULL) { @@ -423,7 +419,6 @@ feeder_build_eq(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->type = FEEDER_EQ; desc->in = 0; desc->out = 0; - desc->flags = 0; fc = feeder_getclass(desc); if (fc == NULL) { @@ -503,7 +498,6 @@ feeder_build_mixer(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->type = FEEDER_MIXER; desc->in = 0; desc->out = 0; - desc->flags = 0; fc = feeder_getclass(desc); if (fc == NULL) { From nobody Tue Nov 11 12:08:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKX4Hb6z6GLR6; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKW5WNRz3bhh; Tue, 11 Nov 2025 12:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JkaSNoia1Tt/5V2GxmGpvNJq3I+/fSUJGBUwofVdOd0=; b=FNabEQF5nD6KkhfTRVM1GlhdKJeqmPf+mOatriMmbGG1VBNt7thXGRGhhzF9cQhtPBUIXs jAwSpWojZEV++3+GhYFjsAGiYyK7LX37B3U6lEVssMsOVQrHOBuDVn3e1NvbNIt1Cr2hst O3RGJ9sq6/zNPgjxHf4kOV7tq5QKmJh+VY8L409+MFlds94izRlitCG0StZlT5b+gQdFMB 1AAvzfBHixHEPcPED5RlKQRXsjxSMP/LWR95ajy6Eqtwb/MP89Xm9WOg9OHHGAtV50SFZ3 esOIG1llCVESytyP4cFksSdvVO07kxjneJBY7TcB2Bq15teGirgOEV9ucA0xKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JkaSNoia1Tt/5V2GxmGpvNJq3I+/fSUJGBUwofVdOd0=; b=FKCsxiiKVoVGTTncDn+bEGnc9qLy0UPh6J1EiNgazO4/VMvzhr8abLQJBYmx+Y2Hcsd8K/ kO+UmQf+JVI2JZWQOPI8Y4jaeD4FHWIIMfgXMN5nPEp2cTIzEyqZ+ws0JFhVLViClkRCwM 9VwjSKm6idwT8WYdWftEwF4wHMEe2nG9mhgo/ZSsXfiOpdC9DdazTBeGdwrKPGCbIiov0S oDDL6nBivblvK2K64Jxut2qT4NRQcuWTjmULccOrxuNcwywkGuvgDd9jWbFfRY9m//gJ63 pjN8wRJqPeuU+sujapYsYnnhgVb5wRvJuSVqGQrIiZNvYY6w0Hybn8Qkq4WvGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862895; a=rsa-sha256; cv=none; b=oQyUvWHTwXOi3I2dz6qqRfDYW5WjDu+b8cbL4mIoQnEvfC9gclD8FZLpHA02Cva5iGtdbq 82ayJ0d3jlEv2G7Ip1JTWisBLoPnQjT2WGC+eFiXq3snjE8IEHF1BTnrQ3LXZMv2A25XW3 3PNHuDrfZCNl0GTIFEYoCyjzouw9+KFdse9A0AuPbKJRxJK7SkC0Wl2Ewtq4gfy6jgeH9z K+0FFDVC4atbkIxBEQRuirSr+Fz7yDWsXonx6WQxl08aWy71CjO3ZQtRMUJw3nZTNuTcYk x4qeuSRLmP4ZWg2ZZZ/Klp9GCSXhssUmFQ6U+cU+8Yc+c31wUuoAvMc7u/UpKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKW55lSz13pS; Tue, 11 Nov 2025 12:08: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 5ABC8FkH035280; Tue, 11 Nov 2025 12:08:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8FW9035277; Tue, 11 Nov 2025 12:08:15 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:15 GMT Message-Id: <202511111208.5ABC8FW9035277@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: 441a411853e4 - main - sound: Simplify feeder_getclass() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 441a411853e48719d4aa6a36bba0a4c4cbca3a4f Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=441a411853e48719d4aa6a36bba0a4c4cbca3a4f commit 441a411853e48719d4aa6a36bba0a4c4cbca3a4f Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:09 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:09 +0000 sound: Simplify feeder_getclass() With the parameters we provide feeder_getclass(), the only thing we really care about is the feeder's class type. We can simplify (and make the code more readable) that by simply passing the type to feeder_getclass(). Apart from being simpler, we can now also retire feedertab_entry->desc and cmpdesc(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53553 --- sys/dev/sound/pcm/channel.c | 2 +- sys/dev/sound/pcm/feeder.c | 26 +++++++------------------- sys/dev/sound/pcm/feeder.h | 2 +- sys/dev/sound/pcm/feeder_chain.c | 14 +++++++------- 4 files changed, 16 insertions(+), 28 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index fda4cd2314a6..f29a819ce0ae 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1257,7 +1257,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, chn_vpc_reset(c, SND_VOL_C_PCM, 1); CHN_UNLOCK(c); - fc = feeder_getclass(NULL); + fc = feeder_getclass(FEEDER_ROOT); if (fc == NULL) { device_printf(d->dev, "%s(): failed to get feeder class\n", __func__); diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 6b7c7f43903c..e818ed4a1a5d 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -44,7 +44,6 @@ static MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); struct feedertab_entry { SLIST_ENTRY(feedertab_entry) link; struct feeder_class *feederclass; - struct pcm_feederdesc *desc; }; static SLIST_HEAD(, feedertab_entry) feedertab; @@ -56,12 +55,12 @@ feeder_register_root(void *p) struct feeder_class *fc = p; struct feedertab_entry *fte; - KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name)); + KASSERT(fc->desc.type == FEEDER_ROOT, + ("first feeder not root: %s", fc->name)); SLIST_INIT(&feedertab); fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); fte->feederclass = fc; - fte->desc = NULL; SLIST_INSERT_HEAD(&feedertab, fte, link); } @@ -75,7 +74,6 @@ feeder_register(void *p) fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); fte->feederclass = fc; - fte->desc = &fc->desc; SLIST_INSERT_HEAD(&feedertab, fte, link); } @@ -92,14 +90,6 @@ feeder_unregisterall(void *p) } } -static int -cmpdesc(struct pcm_feederdesc *n, struct pcm_feederdesc *m) -{ - return ((n->type == m->type) && - ((n->in == 0) || (n->in == m->in)) && - ((n->out == 0) || (n->out == m->out))); -} - static void feeder_destroy(struct pcm_feeder *f) { @@ -143,17 +133,15 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) } struct feeder_class * -feeder_getclass(struct pcm_feederdesc *desc) +feeder_getclass(u_int32_t type) { struct feedertab_entry *fte; SLIST_FOREACH(fte, &feedertab, link) { - if ((desc == NULL) && (fte->desc == NULL)) - return fte->feederclass; - if ((fte->desc != NULL) && (desc != NULL) && cmpdesc(desc, fte->desc)) - return fte->feederclass; + if (fte->feederclass->desc.type == type) + return (fte->feederclass); } - return NULL; + return (NULL); } int @@ -431,7 +419,7 @@ static struct feeder_class feeder_root_class = { .name = "feeder_root", .methods = feeder_root_methods, .size = sizeof(struct pcm_feeder), - .desc = { 0 }, + .desc = { FEEDER_ROOT, 0, 0 }, .data = NULL, }; /* diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index 86cabb3e9925..e883083f7504 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -49,7 +49,7 @@ struct pcm_feeder { }; void feeder_register(void *p); -struct feeder_class *feeder_getclass(struct pcm_feederdesc *desc); +struct feeder_class *feeder_getclass(u_int32_t type); u_int32_t snd_fmtscore(u_int32_t fmt); u_int32_t snd_fmtbestbit(u_int32_t fmt, u_int32_t *fmts); diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index f5075bf76a49..6d896364e3ca 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -148,7 +148,7 @@ feeder_build_format(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = 0; desc->out = 0; - fc = feeder_getclass(desc); + fc = feeder_getclass(FEEDER_FORMAT); if (fc == NULL) { device_printf(c->dev, "%s(): can't find feeder_format\n", __func__); @@ -220,7 +220,7 @@ feeder_build_rate(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = 0; desc->out = 0; - fc = feeder_getclass(desc); + fc = feeder_getclass(FEEDER_RATE); if (fc == NULL) { device_printf(c->dev, "%s(): can't find feeder_rate\n", __func__); @@ -297,7 +297,7 @@ feeder_build_matrix(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = 0; desc->out = 0; - fc = feeder_getclass(desc); + fc = feeder_getclass(FEEDER_MATRIX); if (fc == NULL) { device_printf(c->dev, "%s(): can't find feeder_matrix\n", __func__); @@ -353,7 +353,7 @@ feeder_build_volume(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = 0; desc->out = 0; - fc = feeder_getclass(desc); + fc = feeder_getclass(FEEDER_VOLUME); if (fc == NULL) { device_printf(c->dev, "%s(): can't find feeder_volume\n", __func__); @@ -420,7 +420,7 @@ feeder_build_eq(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = 0; desc->out = 0; - fc = feeder_getclass(desc); + fc = feeder_getclass(FEEDER_EQ); if (fc == NULL) { device_printf(c->dev, "%s(): can't find feeder_eq\n", __func__); @@ -462,7 +462,7 @@ feeder_build_root(struct pcm_channel *c, struct feeder_chain_desc *cdesc) struct feeder_class *fc; int ret; - fc = feeder_getclass(NULL); + fc = feeder_getclass(FEEDER_ROOT); if (fc == NULL) { device_printf(c->dev, "%s(): can't find feeder_root\n", __func__); @@ -499,7 +499,7 @@ feeder_build_mixer(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = 0; desc->out = 0; - fc = feeder_getclass(desc); + fc = feeder_getclass(FEEDER_MIXER); if (fc == NULL) { device_printf(c->dev, "%s(): can't find feeder_mixer\n", __func__); From nobody Tue Nov 11 12:08:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKY0qmvz6GLW7; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKX5qnFz3byd; Tue, 11 Nov 2025 12:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hPGWrkfExSgQYsfR6JcwfO+jbwi8P/EUGhUmCb7Q9Go=; b=Eu+7xegYxCskR9nVd5CBMRuEjwbrnhFV4FytmX/adlEhTc1f6SffdXfycRFansLosr5IBT eipOoatzGY7eKygzOxR27ht/IcEZxSQ1FCPYiMl4FlaotwWMkUuvTfr+TY0E6y48pxJUSV /prbp0HADldJ8RE3A3OUxIpyJUoOh04VoKwGx6eBJiQ+cCoGFUNa+1UrNhzD3m9UDL36X5 nL2ga9uhAON6S34/UnCBeizmTHIwNyAPAYOaGZteIoA/PcFTnQIMzyI9EqVHQOilDR6TJs 1x3Ub7chHt7W33d8P2o7xqjbY63pj+lae6/XWCwolBqfiWAvgojmwoiSgxHBxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hPGWrkfExSgQYsfR6JcwfO+jbwi8P/EUGhUmCb7Q9Go=; b=A/5p+oIDMF5EWxzeP9Cq0vw2MNaNPR9z+BbB2lfSKa9SF2yI0c4+ZPw8OMuVIJmJxkRe9g aWdOOKEV82bHhEHO+mMQ57RVrcXOVu+UNiKZymHkkeW/n9psmshTAudZGBD3B8QO950und m00pRNYli/p/sgZm9UOn3c8iVAIdQCo2sv9gMMl5J0zr0z2aJPYcfz0N18/J0pfY8JZ074 39pMh1Y76yDTuwD+dPLrcimXu6Lw7vDEEdQSTLze7v62lwMnhO0zhP5nh+IiEfJmYgkBlC RAnDYUtAwlwUVLc3wWJ/j4IMc+NaoTKb1O0vqpndj5zx8SD22vM6ODOhRRoniQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862896; a=rsa-sha256; cv=none; b=T/AEpMLWaXNpAUK9XVfJrtiRfUHlZ7Li4hOKRuHrjfsZPI58vzagfr7rGzSzYMxHe8r70j +Ip5z1ze9G0kKNZCZ8zQVSvjgTXvdgmwbpGED2xn7IDe6BBpN9ehQprPNbCrwEubw730pJ CDrRoSrNOMSK7Axu2UgJq6pVcQ5o1BlCZV1SsyamQO/uZmt0ElDB8/UbDVesQ6qyTn1WGA 2HAxG97vK0zXe0Y5y1D1D19c8kGu6durcOaZvjR2JRm+HEE+AxJzx/6VRF52uQk1SFJAEn BEzXWW5Cwe/BIlzRzkpmc0yOlfG7wyPTFO6V9VpeWhF3KriuoC13kgqhYnk2xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKX5Mt8z13cR; Tue, 11 Nov 2025 12:08: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 5ABC8GxS035312; Tue, 11 Nov 2025 12:08:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8GOX035309; Tue, 11 Nov 2025 12:08:16 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:16 GMT Message-Id: <202511111208.5ABC8GOX035309@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: c24ca02c4c85 - main - sound: Retire feedertab_entry List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: c24ca02c4c85d0b691a6100fd3006b1f23061858 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=c24ca02c4c85d0b691a6100fd3006b1f23061858 commit c24ca02c4c85d0b691a6100fd3006b1f23061858 Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:14 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:14 +0000 sound: Retire feedertab_entry Have an SLIST of feeder_class directly. This way we simplify the code, and also avoid the additional malloc()/free() for each entry. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53554 --- sys/dev/sound/pcm/feeder.c | 37 +++++++++---------------------------- sys/dev/sound/pcm/feeder.h | 1 + 2 files changed, 10 insertions(+), 28 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index e818ed4a1a5d..6f7b225af3b9 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -41,53 +41,34 @@ static MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); -struct feedertab_entry { - SLIST_ENTRY(feedertab_entry) link; - struct feeder_class *feederclass; -}; -static SLIST_HEAD(, feedertab_entry) feedertab; - -/*****************************************************************************/ +static SLIST_HEAD(, feeder_class) feedertab; static void feeder_register_root(void *p) { struct feeder_class *fc = p; - struct feedertab_entry *fte; KASSERT(fc->desc.type == FEEDER_ROOT, ("first feeder not root: %s", fc->name)); SLIST_INIT(&feedertab); - fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); - fte->feederclass = fc; - SLIST_INSERT_HEAD(&feedertab, fte, link); + SLIST_INSERT_HEAD(&feedertab, fc, link); } void feeder_register(void *p) { struct feeder_class *fc = p; - struct feedertab_entry *fte; KASSERT(fc->desc.type != 0, ("feeder '%s' has no descriptor", fc->name)); - fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); - fte->feederclass = fc; - SLIST_INSERT_HEAD(&feedertab, fte, link); + SLIST_INSERT_HEAD(&feedertab, fc, link); } static void -feeder_unregisterall(void *p) +feeder_unregisterall(void *p __unused) { - struct feedertab_entry *fte, *next; - - next = SLIST_FIRST(&feedertab); - while (next != NULL) { - fte = next; - next = SLIST_NEXT(fte, link); - free(fte, M_FEEDER); - } + SLIST_INIT(&feedertab); } static void @@ -135,11 +116,11 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) struct feeder_class * feeder_getclass(u_int32_t type) { - struct feedertab_entry *fte; + struct feeder_class *fc; - SLIST_FOREACH(fte, &feedertab, link) { - if (fte->feederclass->desc.type == type) - return (fte->feederclass); + SLIST_FOREACH(fc, &feedertab, link) { + if (fc->desc.type == type) + return (fc); } return (NULL); } diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index e883083f7504..5ac92bf13735 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -36,6 +36,7 @@ struct feeder_class { KOBJ_CLASS_FIELDS; struct pcm_feederdesc desc; void *data; + SLIST_ENTRY(feeder_class) link; }; struct pcm_feeder { From nobody Tue Nov 11 12:08:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKZ38Dwz6GLNM; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKY6gvrz3byt; Tue, 11 Nov 2025 12:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3J48MFEqr5dImUGSsVk6E2Tz+jbJW2f/Fh/uIWwmog=; b=R4tSm6Xwj8kP9okf8cEgsg4YNSLHzwFUVS+Dt1OgAUUIsvuwCF7nrE3xOtkBtin4abJQ7l a03gZe3Sf/eoGcx3cgUErjG14gGdJ8IbtqNYWxWdFbbesG+y5kGpu2qiuIYK+vIS84h4SP EyfW5Q25/tFhyhGyzGZNqQ/h47mlBV11GLsCJ/lpBVsLnKlg1D7K50TmUnKxgHkASDZ8Lz opHakx5ldoWkcukqwS39ee1rRHVzxSMs4ereQwWOVe+fz27noZShG6YQTa4Zn1Y8Mh+rLw Ypzfl1lFUm9gJ/gvjtkzTS2wqKwtHSgKq4Ysvzybth9bgdXS7eVXFClT87+t3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3J48MFEqr5dImUGSsVk6E2Tz+jbJW2f/Fh/uIWwmog=; b=o0eiZNv3DSUzH6UOo4aza1i+kUgbhArN/4U3iHAPDymPoGoE7ZsP9INN6AxQIAusibmiU6 2oikyaB129WWS72ICgoNztV+izQIOoiwe+RbnvZhHd1+13eKx02IldFU1yupk9POCBdDSQ rbUXcL1TpHAdef5KBhNW2v8rXM235PjLE3mYMbfRWyOYwn6c8rswbEkvbw4HsyCEaLxn0G OND4lxslxPopy+ixDAYKnQB/gEn5R+hEffTaWCludzScaigAP4g715fmqsGz9Yy2boZcWp mHW9/ZXR5vshIAjdSbtSmnzX87Avq5vp+PQzn6c+0O3yATJFt5jFO+o1TULqPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862897; a=rsa-sha256; cv=none; b=ebTfJIIyCPGfqDSVpBXC4nuEpH3EXGph7eznNkEVTORsLQXVkMx0YP8S+84pZ2n7n9NQX7 1baNAbQPINP3FfpZttF3yjVMNFS134SOtKzp29X5k1LsCd9/5iRYXZDtLzdocUy8qlOEDz 5vly+Meya3EDn3fuUdZSrjbWg5Ry6MvQnu15kRt0jng5otwzQTKkZ7/+vln3CSt6XqoRHZ Ibmsu6gfq37dk7nynLw0xpy5tWXOq7lbFHwtb/8pbzD1O5i14h5vI267v19KsUN9RktTLb uZD0okug2ci7smQwB0d+NfMVD0JRh9EKLuWNEnjnqwUPQ4aZq00mm+63CdPhRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKY6G31z13pT; Tue, 11 Nov 2025 12:08: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 5ABC8H6K035344; Tue, 11 Nov 2025 12:08:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8HKl035341; Tue, 11 Nov 2025 12:08:17 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:17 GMT Message-Id: <202511111208.5ABC8HKl035341@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: 762f8e6f515a - main - sound: Retire feeder_class->data List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 762f8e6f515a33274503872cf597e0895ff706bc Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=762f8e6f515a33274503872cf597e0895ff706bc commit 762f8e6f515a33274503872cf597e0895ff706bc Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:18 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:18 +0000 sound: Retire feeder_class->data It's always NULL. No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53555 --- sys/dev/sound/pcm/feeder.c | 3 +-- sys/dev/sound/pcm/feeder.h | 4 +--- sys/dev/sound/pcm/feeder_eq.c | 2 +- sys/dev/sound/pcm/feeder_format.c | 2 +- sys/dev/sound/pcm/feeder_matrix.c | 2 +- sys/dev/sound/pcm/feeder_mixer.c | 2 +- sys/dev/sound/pcm/feeder_rate.c | 2 +- sys/dev/sound/pcm/feeder_volume.c | 2 +- 8 files changed, 8 insertions(+), 11 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 6f7b225af3b9..f55c3e5992e1 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -88,7 +88,7 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) if (f == NULL) return NULL; - f->data = fc->data; + f->data = NULL; f->source = NULL; f->parent = NULL; f->class = fc; @@ -401,7 +401,6 @@ static struct feeder_class feeder_root_class = { .methods = feeder_root_methods, .size = sizeof(struct pcm_feeder), .desc = { FEEDER_ROOT, 0, 0 }, - .data = NULL, }; /* * Register the root feeder first so that pcm_addchan() and subsequent diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index 5ac92bf13735..f89652ab9635 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -35,7 +35,6 @@ struct pcm_feederdesc { struct feeder_class { KOBJ_CLASS_FIELDS; struct pcm_feederdesc desc; - void *data; SLIST_ENTRY(feeder_class) link; }; @@ -64,13 +63,12 @@ struct pcm_feeder *feeder_find(struct pcm_channel *c, u_int32_t type); void feeder_printchain(struct pcm_feeder *head); int feeder_chain(struct pcm_channel *); -#define FEEDER_DECLARE(feeder, type, pdata) \ +#define FEEDER_DECLARE(feeder, type) \ static struct feeder_class feeder ## _class = { \ .name = #feeder, \ .methods = feeder ## _methods, \ .size = sizeof(struct pcm_feeder), \ .desc = { type, 0, 0 }, \ - .data = pdata, \ }; \ SYSINIT(feeder, SI_SUB_DRIVERS, SI_ORDER_ANY, feeder_register, \ &feeder ## _class) diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index 05f5a5b82290..3838328fb0bb 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -427,7 +427,7 @@ static kobj_method_t feeder_eq_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_eq, FEEDER_EQ, NULL); +FEEDER_DECLARE(feeder_eq, FEEDER_EQ); static int32_t feed_eq_scan_preamp_arg(const char *s) diff --git a/sys/dev/sound/pcm/feeder_format.c b/sys/dev/sound/pcm/feeder_format.c index 21b54fcafcd7..d2c4d7618ab4 100644 --- a/sys/dev/sound/pcm/feeder_format.c +++ b/sys/dev/sound/pcm/feeder_format.c @@ -180,4 +180,4 @@ static kobj_method_t feeder_format_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_format, FEEDER_FORMAT, NULL); +FEEDER_DECLARE(feeder_format, FEEDER_FORMAT); diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c index 69c7e5962268..7319b10930de 100644 --- a/sys/dev/sound/pcm/feeder_matrix.c +++ b/sys/dev/sound/pcm/feeder_matrix.c @@ -405,7 +405,7 @@ static kobj_method_t feeder_matrix_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_matrix, FEEDER_MATRIX, NULL); +FEEDER_DECLARE(feeder_matrix, FEEDER_MATRIX); /* External */ int diff --git a/sys/dev/sound/pcm/feeder_mixer.c b/sys/dev/sound/pcm/feeder_mixer.c index 3c2a58ba145f..10de42ba727a 100644 --- a/sys/dev/sound/pcm/feeder_mixer.c +++ b/sys/dev/sound/pcm/feeder_mixer.c @@ -366,4 +366,4 @@ static kobj_method_t feeder_mixer_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_mixer, FEEDER_MIXER, NULL); +FEEDER_DECLARE(feeder_mixer, FEEDER_MIXER); diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index 173a0c1fcd39..c2c232a97177 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -1714,4 +1714,4 @@ static kobj_method_t feeder_rate_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_rate, FEEDER_RATE, NULL); +FEEDER_DECLARE(feeder_rate, FEEDER_RATE); diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c index 942f1a273edf..a45003849034 100644 --- a/sys/dev/sound/pcm/feeder_volume.c +++ b/sys/dev/sound/pcm/feeder_volume.c @@ -314,7 +314,7 @@ static kobj_method_t feeder_volume_methods[] = { KOBJMETHOD_END }; -FEEDER_DECLARE(feeder_volume, FEEDER_VOLUME, NULL); +FEEDER_DECLARE(feeder_volume, FEEDER_VOLUME); /* Extern */ From nobody Tue Nov 11 12:08:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKb2X7Zz6GLSf; Tue, 11 Nov 2025 12:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKb0Ntzz3c03; Tue, 11 Nov 2025 12:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sAmdw6dbk7XnZWEmjVNZ6PyiCvIOg5L8H1+p3PVkSf8=; b=ZljacWl8R5sCPXKqY8GBCkaYFsTrxWHf/4Xup/Nl+w/uYMJYA7ivIzuodB80nIAfPRygHH DGkY5D8uPuP+GqbjXG79xNr/lBU0052SkbW9jZFLUDQTMDUbAMubp8XgMIcsdrlxEEqnXl ECqvl8gLUnTtlIh8Gs4cwYxPULIyh+gwUTeR/fqQmGZK3LEphPTiZ+RU0PYk6lFGqGapFw YBoONEbvkac3m6VPy215wRfc+a96WXqzQ3mPdpMpCwPUp1J7rvSqoAr37i6IIxXwD1StXK pteZYIhmoPZwCMayfbVGsquj/MQkL2buN40fXI4OhTExJZtcreDkb+j/85mu1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sAmdw6dbk7XnZWEmjVNZ6PyiCvIOg5L8H1+p3PVkSf8=; b=gMXOKPp4LN0qIOYdd9C7YgqflpGeqVIj2kdTpCOFil3nprl3nNp7/oVPDIM0eanw7ZJJAt Tu9pwMkzo0VPeDIdYwvWVw/hRex8POwSq4Dfh2S9Z7OXkOzK/LY9tuoGzNJnyW54llIVVT JEuhZj19AeyRrU4QFLn6QuqQqLLswVUIZLpyQryfe+P/YP7ElT+IvJXhAli5g4m7zklBES vRVXSOrcZwhRLSvgF2yTTR1AkDrqtvKff2H7s16ESt4yC1+NvMdCO2UQHQODjHGfk4DPkV W1epIZeY+wv1FRxKw31TKpDC62nIoXjmjjZZzd/QfPH/W/9c0ccTVVd5FcuzDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862899; a=rsa-sha256; cv=none; b=MccASeDnFEmmNrzGO/R6+NuViKbk8MwvEl48Lhl+L0LKK+nJhZf1+aOn+kZ2yobLV2H4x7 Anpkrh7JkQhZmKsDD3nzRUW805W3G65RZjK+zsY1gC8nQCxyNkWNT7Gcqrv4Gsef2xpQAw ipK+l1luq+8YtCRaSNORqJoMEjpPZFnbQNvy6crZBGPV3SK4G4l/qUiJA5JEIN96QQIoWb K65WakVJLETw8vpII4aoRROdxaZsqGE4NGNsaSF+O/kVCFpMfJiO9BuHfp2HltkJGBzpXB 6IzlhEYHYMcxWM1E5Djt7e0BlqVIsty9R/1EeepHuWg6Z4X0FqGZzh0MPYxegw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKZ728wz13rX; Tue, 11 Nov 2025 12:08: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 5ABC8IR5035376; Tue, 11 Nov 2025 12:08:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8IT0035373; Tue, 11 Nov 2025 12:08:18 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:18 GMT Message-Id: <202511111208.5ABC8IT0035373@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: 91fcc0132d0b - main - sound: Retire feeder_class->desc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 91fcc0132d0b192f07f9b67626c9af2ad8759857 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=91fcc0132d0b192f07f9b67626c9af2ad8759857 commit 91fcc0132d0b192f07f9b67626c9af2ad8759857 Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:24 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:24 +0000 sound: Retire feeder_class->desc The only field we care about is pcm_feederdesc->type, so keep that one only and do not embed the whole pcm_feederdesc. While here, make the feeder type enum into a named one and use it as feeder_class->type's type. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53556 --- sys/dev/sound/pcm/feeder.c | 8 ++++---- sys/dev/sound/pcm/feeder.h | 28 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index f55c3e5992e1..acc9e374e718 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -48,7 +48,7 @@ feeder_register_root(void *p) { struct feeder_class *fc = p; - KASSERT(fc->desc.type == FEEDER_ROOT, + KASSERT(fc->type == FEEDER_ROOT, ("first feeder not root: %s", fc->name)); SLIST_INIT(&feedertab); @@ -60,7 +60,7 @@ feeder_register(void *p) { struct feeder_class *fc = p; - KASSERT(fc->desc.type != 0, ("feeder '%s' has no descriptor", fc->name)); + KASSERT(fc->type != 0, ("feeder '%s' has no descriptor", fc->name)); SLIST_INSERT_HEAD(&feedertab, fc, link); } @@ -119,7 +119,7 @@ feeder_getclass(u_int32_t type) struct feeder_class *fc; SLIST_FOREACH(fc, &feedertab, link) { - if (fc->desc.type == type) + if (fc->type == type) return (fc); } return (NULL); @@ -400,7 +400,7 @@ static struct feeder_class feeder_root_class = { .name = "feeder_root", .methods = feeder_root_methods, .size = sizeof(struct pcm_feeder), - .desc = { FEEDER_ROOT, 0, 0 }, + .type = FEEDER_ROOT, }; /* * Register the root feeder first so that pcm_addchan() and subsequent diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index f89652ab9635..171168d66e4e 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -27,6 +27,17 @@ * SUCH DAMAGE. */ +enum feeder_type { + FEEDER_ROOT, + FEEDER_FORMAT, + FEEDER_MIXER, + FEEDER_RATE, + FEEDER_EQ, + FEEDER_VOLUME, + FEEDER_MATRIX, + FEEDER_LAST, +}; + struct pcm_feederdesc { u_int32_t type; u_int32_t in, out; @@ -34,7 +45,7 @@ struct pcm_feederdesc { struct feeder_class { KOBJ_CLASS_FIELDS; - struct pcm_feederdesc desc; + enum feeder_type type; SLIST_ENTRY(feeder_class) link; }; @@ -63,27 +74,16 @@ struct pcm_feeder *feeder_find(struct pcm_channel *c, u_int32_t type); void feeder_printchain(struct pcm_feeder *head); int feeder_chain(struct pcm_channel *); -#define FEEDER_DECLARE(feeder, type) \ +#define FEEDER_DECLARE(feeder, ctype) \ static struct feeder_class feeder ## _class = { \ .name = #feeder, \ .methods = feeder ## _methods, \ .size = sizeof(struct pcm_feeder), \ - .desc = { type, 0, 0 }, \ + .type = ctype, \ }; \ SYSINIT(feeder, SI_SUB_DRIVERS, SI_ORDER_ANY, feeder_register, \ &feeder ## _class) -enum { - FEEDER_ROOT, - FEEDER_FORMAT, - FEEDER_MIXER, - FEEDER_RATE, - FEEDER_EQ, - FEEDER_VOLUME, - FEEDER_MATRIX, - FEEDER_LAST, -}; - /* feeder_format */ enum { FEEDFORMAT_CHANNELS From nobody Tue Nov 11 12:08:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKc2dRKz6GLBs; Tue, 11 Nov 2025 12:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKc10qpz3bg8; Tue, 11 Nov 2025 12:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=shAXg4na4ZrD4zftU5h11NkGcVZ6NooknOsd8nZDUR8=; b=yTFhiBk/Z6jwxNZZPwo+1lVmPhhFP2qjuchuPD99wRMYxIAhaCowpz/IZVDtmY6ZXh3g9/ MXZJqWm6E5JLUW3pv9pxPHiB9uI6IJhAtDwHrV9oiWtvUelFX3zG2mXBUkJV5lRJBMxV0Y 9TRpvbm7lyb9IBgxw32z0QirfS1LFd0yerWHbmuiDgsMq/aBQ2JAGfplcY6rhp240OhNxF Q7nNPyiNJwQWrNMwfLT1GyHBxgwFlDWIpfyeGM+S8Qnp8vQQP1Fap5cd/zGs4ABhcz8Jvn WRMQE//enlw5a3UM3BNIun5swdArZDyn0FUh2KaYt2/LzqpZVU8JCaeyRs9KMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=shAXg4na4ZrD4zftU5h11NkGcVZ6NooknOsd8nZDUR8=; b=iUpo6/tKOxOpsgXXNOekSBh5XeeHYSPAetmkbl6XrSFBYPX4/OzuYGZ4u3QGTzJ1ii90TE fuA4rC9tP+Xh59+z8PLGw0qLPofeBlNskDA9yz/HhEX2BSkPXNR5bYNdueIvQ9qXSKOD5s IXWLD+RlkDK3eJ2r4A4/6RkucBtL/O7ysDIWfzJAkF6HYz0zGjKvgDjSz1ytPpKdjLt60n 0iziZhfNhBk9zTb+yda7yWOCGyQLtlnDSeSz+KZJPBhvGaZIkMFPSOSytC6bj6bRIIoQyy ClYH+lcEsG9iYXQgsDoVazdiELfVzrq5b6ioxN+lZkGjqQ1ATMPzE/LbszgJ8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862900; a=rsa-sha256; cv=none; b=Q82meiteJ1SQ45mcKSY3hsTI0s+LjG3tM4zmBFcW/9BcLMKaKA/lsWAUxVi2k6RQCbicR/ HMCvp8AmOjjFmQobPnJFA9SWsIE+1vLFDwFe+zwwVXMHgExxe+XtW13eTOD1lGjyIZhwrU HQTE1rHZkmvjRWg8nAfR7YY3DKWPpZnCfG+xYreyv3otAHebSId1kehIZ/2BjXBOEs8OmX QEhNMrIKOvP5YWYxQf89xzz7WIKpkq62Um0BwsjwVvhYDrp05d+hav/O+p/h5ZZt0GIx8b WNE2aP0N3t5TToaRJGAp/lfuB3R5lmdNaiq4EyUkfrcIy8MtsxC+Nfa0iVrxsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKc0Yrlz13cS; Tue, 11 Nov 2025 12:08: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 5ABC8Jwb035409; Tue, 11 Nov 2025 12:08:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8J6T035406; Tue, 11 Nov 2025 12:08:19 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:19 GMT Message-Id: <202511111208.5ABC8J6T035406@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: 92dcd20222a2 - main - sound: Retire pcm_feederdesc->type List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92dcd20222a2674ba31ae09865da19d948992994 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=92dcd20222a2674ba31ae09865da19d948992994 commit 92dcd20222a2674ba31ae09865da19d948992994 Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:28 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:28 +0000 sound: Retire pcm_feederdesc->type This is always accessed from pcm_feeder->desc->type. Instead of duplicating this field, we can remove it from pcm_feederdesc, and access it through pcm_feeder->class->type. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53557 --- sys/dev/sound/pcm/feeder.c | 4 ++-- sys/dev/sound/pcm/feeder.h | 1 - sys/dev/sound/pcm/feeder_chain.c | 6 ------ sys/dev/sound/pcm/feeder_matrix.c | 2 +- sys/dev/sound/pcm/feeder_volume.c | 2 +- sys/dev/sound/pcm/sndstat.c | 12 ++++++------ 6 files changed, 10 insertions(+), 17 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index acc9e374e718..874148cd9ab0 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -97,7 +97,7 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) if (desc) { *(f->desc) = *desc; } else { - f->desc->type = FEEDER_ROOT; + f->class->type = FEEDER_ROOT; f->desc->in = 0; f->desc->out = 0; } @@ -162,7 +162,7 @@ feeder_find(struct pcm_channel *c, u_int32_t type) f = c->feeder; while (f != NULL) { - if (f->desc->type == type) + if (f->class->type == type) return f; f = f->source; } diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index 171168d66e4e..d191edd201e9 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -39,7 +39,6 @@ enum feeder_type { }; struct pcm_feederdesc { - u_int32_t type; u_int32_t in, out; }; diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 6d896364e3ca..32dd4ca14faf 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -144,7 +144,6 @@ feeder_build_format(struct pcm_channel *c, struct feeder_chain_desc *cdesc) int ret; desc = &(cdesc->desc); - desc->type = FEEDER_FORMAT; desc->in = 0; desc->out = 0; @@ -216,7 +215,6 @@ feeder_build_rate(struct pcm_channel *c, struct feeder_chain_desc *cdesc) return (ret); desc = &(cdesc->desc); - desc->type = FEEDER_RATE; desc->in = 0; desc->out = 0; @@ -293,7 +291,6 @@ feeder_build_matrix(struct pcm_channel *c, struct feeder_chain_desc *cdesc) return (ret); desc = &(cdesc->desc); - desc->type = FEEDER_MATRIX; desc->in = 0; desc->out = 0; @@ -349,7 +346,6 @@ feeder_build_volume(struct pcm_channel *c, struct feeder_chain_desc *cdesc) return (ret); desc = &(cdesc->desc); - desc->type = FEEDER_VOLUME; desc->in = 0; desc->out = 0; @@ -416,7 +412,6 @@ feeder_build_eq(struct pcm_channel *c, struct feeder_chain_desc *cdesc) return (ret); desc = &(cdesc->desc); - desc->type = FEEDER_EQ; desc->in = 0; desc->out = 0; @@ -495,7 +490,6 @@ feeder_build_mixer(struct pcm_channel *c, struct feeder_chain_desc *cdesc) int ret; desc = &(cdesc->desc); - desc->type = FEEDER_MIXER; desc->in = 0; desc->out = 0; diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c index 7319b10930de..2c7a3e04690d 100644 --- a/sys/dev/sound/pcm/feeder_matrix.c +++ b/sys/dev/sound/pcm/feeder_matrix.c @@ -413,7 +413,7 @@ feeder_matrix_setup(struct pcm_feeder *f, struct pcmchan_matrix *m_in, struct pcmchan_matrix *m_out) { - if (f == NULL || f->desc == NULL || f->desc->type != FEEDER_MATRIX || + if (f == NULL || f->desc == NULL || f->class->type != FEEDER_MATRIX || f->data == NULL) return (EINVAL); diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c index a45003849034..101cc7ba003b 100644 --- a/sys/dev/sound/pcm/feeder_volume.c +++ b/sys/dev/sound/pcm/feeder_volume.c @@ -332,7 +332,7 @@ feeder_volume_apply_matrix(struct pcm_feeder *f, struct pcmchan_matrix *m) struct feed_volume_info *info; uint32_t i; - if (f == NULL || f->desc == NULL || f->desc->type != FEEDER_VOLUME || + if (f == NULL || f->desc == NULL || f->class->type != FEEDER_VOLUME || f->data == NULL || m == NULL || m->channels < SND_CHN_MIN || m->channels > SND_CHN_MAX) return (EINVAL); diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index b5e52aa13a19..a7c53ac85eb8 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -533,12 +533,12 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) f = f->source; while (f != NULL) { sbuf_printf(&sb, "%s", f->class->name); - if (f->desc->type == FEEDER_FORMAT) { + if (f->class->type == FEEDER_FORMAT) { snd_afmt2str(f->desc->in, buf, sizeof(buf)); sbuf_printf(&sb, "(%s -> ", buf); snd_afmt2str(f->desc->out, buf, sizeof(buf)); sbuf_printf(&sb, "%s)", buf); - } else if (f->desc->type == FEEDER_MATRIX) { + } else if (f->class->type == FEEDER_MATRIX) { sbuf_printf(&sb, "(%d.%dch -> %d.%dch)", AFMT_CHANNEL(f->desc->in) - AFMT_EXTCHANNEL(f->desc->in), @@ -546,7 +546,7 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) AFMT_CHANNEL(f->desc->out) - AFMT_EXTCHANNEL(f->desc->out), AFMT_EXTCHANNEL(f->desc->out)); - } else if (f->desc->type == FEEDER_RATE) { + } else if (f->class->type == FEEDER_RATE) { sbuf_printf(&sb, "(%d -> %d)", FEEDER_GET(f, FEEDRATE_SRC), FEEDER_GET(f, FEEDRATE_DST)); @@ -1328,10 +1328,10 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) f = f->source; while (f != NULL) { sbuf_printf(s, "%s", f->class->name); - if (f->desc->type == FEEDER_FORMAT) { + if (f->class->type == FEEDER_FORMAT) { sbuf_printf(s, "(0x%08x -> 0x%08x)", f->desc->in, f->desc->out); - } else if (f->desc->type == FEEDER_MATRIX) { + } else if (f->class->type == FEEDER_MATRIX) { sbuf_printf(s, "(%d.%d -> %d.%d)", AFMT_CHANNEL(f->desc->in) - AFMT_EXTCHANNEL(f->desc->in), @@ -1339,7 +1339,7 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) AFMT_CHANNEL(f->desc->out) - AFMT_EXTCHANNEL(f->desc->out), AFMT_EXTCHANNEL(f->desc->out)); - } else if (f->desc->type == FEEDER_RATE) { + } else if (f->class->type == FEEDER_RATE) { sbuf_printf(s, "(0x%08x q:%d %d -> %d)", f->desc->out, From nobody Tue Nov 11 12:08:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKd56n7z6GLFX; Tue, 11 Nov 2025 12:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKd20WHz3c28; Tue, 11 Nov 2025 12:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j9LVnXGhR4qSpGySL6NMY8qJgi7W0xVGMibwV8LxBdQ=; b=O5mZBwcOMr4fMLsm0XlkD++tQgzznBknBexRQ2MS9C3sJmaQuoTNzd/uNdH6n7Y2cEsiP7 N5E8kvQzGaBXjjTrJipKAy4bAaXiZBgvtLuYoZojK4oITgq5XgtXLBUxU0AXFvwZLALJxh INOe9vN+Eo7xbaNTLRuy3Qi9beKLvMa4re0cBduVPK9G0omIA6G9xctL3NanjZUC/mUF0k KmaSRTgz1n31uQg83Ru4wBXa/393wZJoYfmrEOlzBlUn9Ng+SVkh0rHgulG9iCKbxeAfqk HNDXxw2y5ZDyvqlobGj4EZxEaVU9uYpGZOGrxFioCQcUAxPOAIHubl025+f7NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j9LVnXGhR4qSpGySL6NMY8qJgi7W0xVGMibwV8LxBdQ=; b=kchjpf/NS/daxMj51KdJ4jBrG2BFN/dQTgr7qMBOVkYMbDr2qOPd/vuJQVQZEJVe9g1UiO ph/YBv2SZGNkEi2sz0U2schh5Ok7JqAdIIkF4hv2KwerAixL8RKGIxNGU2qTvUB9k2ANEt PVzDvfPdSOYXu/1xqiCvE/jMQgDuJOpEBy23TTV44xkOoElERZ9HF4KKSi66lqzP2MCq11 XvgI+nXuk/tBQV0J8zfXRCj85jXx65p6kI4X9BQ1IS/4HMCTp3sfNXQyhpMO7kQ6YzIg40 Tr5CXmM3R97yKO08UjkfPBQeWhZFvVdrHGJWPScx9drtCowCaCmBuTDw5+EdgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862901; a=rsa-sha256; cv=none; b=InxyRFXecCO6oduW5t7vWPGRx8C3p4NgChkJHBk8Ul/JJGFQhLYlHyXsgwTAqTDg66P9FH igxs7t1FI1LICqhOjyxfrDM55ZiAxFNeCMDPsVhvoJ8EcAADqK5wUilqKIlEiTaYA8c7Rp lcDwrADZE29JUZIXe95JlXdU7xDWgMeFvtFKHCV5RwK3uOw6mWL5OgshYq34F12btpyVtv iiHgH4TLz6QxkxTiaPkKTN+hC6yVLOJSm/UPEunFkVtMmWLp+3XXgRje3GXFf/UuvVF5+j iEXU/sYoRQutawbGNzLRhJjJW+dWQHZsgOaJ4jD86q0D0k4aUpKhmaYxY0gocQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKd1Zrpz13Wv; Tue, 11 Nov 2025 12:08: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 5ABC8LSL035442; Tue, 11 Nov 2025 12:08:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8Lie035439; Tue, 11 Nov 2025 12:08:21 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:21 GMT Message-Id: <202511111208.5ABC8Lie035439@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: 699fd108c50c - main - sound: Remove unnecessary initializations in feeder_create() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 699fd108c50ccbd576476a2c95fa03e16492f2f9 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=699fd108c50ccbd576476a2c95fa03e16492f2f9 commit 699fd108c50ccbd576476a2c95fa03e16492f2f9 Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:32 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:32 +0000 sound: Remove unnecessary initializations in feeder_create() We do not need to zero out fields since the struct is allocated with M_ZERO. Also we no longer need to have a special case for the root feeder. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53558 --- sys/dev/sound/pcm/feeder.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 874148cd9ab0..75c0f0405040 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -88,19 +88,10 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) if (f == NULL) return NULL; - f->data = NULL; - f->source = NULL; - f->parent = NULL; f->class = fc; f->desc = &(f->desc_static); - - if (desc) { + if (desc != NULL) *(f->desc) = *desc; - } else { - f->class->type = FEEDER_ROOT; - f->desc->in = 0; - f->desc->out = 0; - } err = FEEDER_INIT(f); if (err) { From nobody Tue Nov 11 12:08:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKf5wwTz6GLM6; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKf2zkwz3c7C; Tue, 11 Nov 2025 12:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8XSnDlgeJDVILcyz1UZY/YI1nEflXC025MI0gRUvptk=; b=jpfID97QD/XuTRGHG7DGlG1Xn8YylHWgoXqvDAA8z8EkvXivrJep52LjRJXlfKvMpYNWAM QD1LzoxMKk+kclch+ioVD60CA9NRvHramAaiE81NT0wCsn38uowzyZkA46nHLIR7RFGjsM pEVeMva596X5RZ5lmOgWUDc0JTJ6Bdw3GFZmnClUojMDnqufsI1YRyDMKsA1B2NOEIIa2Z gzCBuZORK58rS+h6DnwAOPp0BijzPpXC7CRKSBPpRUEf6p4O3nvEBtExI7i7WVtCkPGEf+ 4uZggRgqNuw8oU5q2eo69oI7XSAhRBFQsPVL0jLzmyuQubK8nf7TITyVQeanog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8XSnDlgeJDVILcyz1UZY/YI1nEflXC025MI0gRUvptk=; b=dQVVaPZCfmVpA1bY58ULbe3OqLN0XZ+uGHEf04/yW0Zzh9cuaBsK0GSs1lGz1yhp3CXJ/l f/8zxG9ZLXo/0dzqBdFbjO95s9HymZQye1aQ9gtUxjBEnA0B08whi9x4YtDyY3UerCUwSU v71EMpOdh8gbs6K1uRfTJdnbNpLU/f0Mn1tchHeJBN9eeTEYitBJVnmMxTN7AC/WNnZGDX vDadbpjIHljSOt6UtgFHx6NataG96oMoGeOGNoMwBDp7W7nExZghy1ueH2XGcJY1CZ5oo5 NOt/AHHeJqmnBj8GGZogIPl/ryInQoNtSbgCgUHFglt976RCIKoofrE233InKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862902; a=rsa-sha256; cv=none; b=mihcVSb4jyTq4VemjZTrtrBXxf9PBMo9dnaXPtN+ChQnv/KYcMiG40Xb0/aHwfRHyKmHkO pBSKEVoE0M/YxWci3knMf0Vvi2o3zs1T2lSgWaa15jAFFhPvTYJfZUwd0XvwMqWJa33Ll9 JO1zOpPvpeAfEtdiTzamDzfnOpIARPE8Fk1nM/8ldaI7e1CvzhNZenKlWnxRhUDqYa4blF wNIXDkaBNGvXqoOfW2g/IrCi9wPOpsSgGLy/83w4usONiNdqguM17iMYYHaalayPhJwsbF jBQKwQ/k4LxmZRMgg54ipR+w6X6RW26brxiygaO4xybATlEd6ah4jS8g9bnvgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKf2Y4gz13rY; Tue, 11 Nov 2025 12:08: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 5ABC8MQc035481; Tue, 11 Nov 2025 12: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 5ABC8MmR035478; Tue, 11 Nov 2025 12:08:22 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:22 GMT Message-Id: <202511111208.5ABC8MmR035478@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: f4819a1b6c44 - main - sound: Retire unused feeder_printchain() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: f4819a1b6c441f804d66d710678bf5558ee29eee Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f4819a1b6c441f804d66d710678bf5558ee29eee commit f4819a1b6c441f804d66d710678bf5558ee29eee Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:37 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:37 +0000 sound: Retire unused feeder_printchain() We can print it with "sndctl feederchain". Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53559 --- sys/dev/sound/pcm/feeder.c | 16 ---------------- sys/dev/sound/pcm/feeder.h | 1 - 2 files changed, 17 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 75c0f0405040..e2d05f307f4d 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -318,22 +318,6 @@ snd_fmtbest(u_int32_t fmt, u_int32_t *fmts) return best2; } -void -feeder_printchain(struct pcm_feeder *head) -{ - struct pcm_feeder *f; - - printf("feeder chain (head @%p)\n", head); - f = head; - while (f != NULL) { - printf("%s @ %p\n", f->class->name, f); - f = f->source; - } - printf("[end]\n\n"); -} - -/*****************************************************************************/ - static int feed_root(struct pcm_feeder *feeder, struct pcm_channel *ch, u_int8_t *buffer, u_int32_t count, void *source) { diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index d191edd201e9..f1c96d86fda0 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -70,7 +70,6 @@ int feeder_add(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederdesc *desc); void feeder_remove(struct pcm_channel *c); struct pcm_feeder *feeder_find(struct pcm_channel *c, u_int32_t type); -void feeder_printchain(struct pcm_feeder *head); int feeder_chain(struct pcm_channel *); #define FEEDER_DECLARE(feeder, ctype) \ From nobody Tue Nov 11 12:08:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKg5fzZz6GLJc; Tue, 11 Nov 2025 12: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKg4DW4z3bph; Tue, 11 Nov 2025 12: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=1762862903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y90/DcDFgPVlmaqLX4o8+tyOyDQ4wmgBauZCV6mbt5Y=; b=JQinOoCl9Exw6dE3Ye+Ycedlum3pE+Jg+9nTlVpazvsF21ZVgy08Cxar6TLQO4OrlEMhKm XrQPg7UWwYAX9gFWjjo62d4yMtK99Fyu/2gKu4H2htiMxKcNvAGbnd2iXpEVcs34wqrh3a UkebdJyaW9a+Yi+U6MNNPxJ3uLxXMAhQLJ7N+xC+vDlS62PkhWwarRbbOBuT2YHLJsz85f bEYVMD7vv4PM4a6v558dxUK2e6A3g55hz3pHg8n2nJ37ZIRxbEmjuYJ7Wz28lj2wbefGD7 PujBqiPntp8ydwV4vue/NqZVOXBLppL4z5qc0gjY4gsKwWVCyPZYGLsFwCY4sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y90/DcDFgPVlmaqLX4o8+tyOyDQ4wmgBauZCV6mbt5Y=; b=qFL51JchpbGb8C5c5QdLTVsFsSbnXaycsRqIHCijZAhqW+uWpSVGsTVEn47rYFaOWdAir3 Q+GhlxaCkot7GA3iQMLBm6l5vJs2YHMMd3KNSRfvCx/NF+3y4FkMfSAzz/42B4E6pyzAzV 2TwTVehcsxTU1IxQwdXxmtyd8O1C9mMUEKsqAzT+UntYCAEsffLoCTCv9YlyC0aVEwq64y kF/cwixIPZ+LzMM/LJQjz+eM5UmpPlBt1/Lvyw/m0TT3Nkd2HqEa6j/x1MEt0g+QCOtsuj t75phwLJ6h6lUV2YIP+LIrHI3WhdsSF32kL5/idsmf44cKxznSvbO72/vB4JNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862903; a=rsa-sha256; cv=none; b=mi8pT0WtGF0hMiI0v1y2QMjjW2XVzwSk717SySoZ0LUar/m95ahVqg5eznnE6b9RGKghui aIKh7zTe/ZvAwgLGb9iCihphZf0hS5RBExtXhbOpwBxQeRavI138Fbn7+pWeHpo2VU5bSq vBGdjPv7IijuyyuWnO2spBmqehoBhzO06R/9HN2UH3Vxh/p6d5daNRyZs4n+lS5cyIQ5BA 0i1tdQDBYhMdQETBwudRQjFTaJ/7FicKy0B0Bq9+J8LKU2ft1t2VvQcgDKRKHLoWs4m2A5 9nNe2UIVFTxxEW3uPyPMJ+Av58urmekCw5nUcNeaYTzNMqjxIxc01oJpFXaqUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKg3WNWz13pV; Tue, 11 Nov 2025 12: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 5ABC8NtZ035517; Tue, 11 Nov 2025 12:08:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8NOu035514; Tue, 11 Nov 2025 12:08:23 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:23 GMT Message-Id: <202511111208.5ABC8NOu035514@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: 2ba68208390a - main - sound: Retire feeder_register_root() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 2ba68208390a2c091039eb6731cdc2ebe280f89a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2ba68208390a2c091039eb6731cdc2ebe280f89a commit 2ba68208390a2c091039eb6731cdc2ebe280f89a Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:41 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:41 +0000 sound: Retire feeder_register_root() We can now use feeder_register(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53560 --- sys/dev/sound/pcm/feeder.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index e2d05f307f4d..fa4e4e16a133 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -41,27 +41,13 @@ static MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); -static SLIST_HEAD(, feeder_class) feedertab; - -static void -feeder_register_root(void *p) -{ - struct feeder_class *fc = p; - - KASSERT(fc->type == FEEDER_ROOT, - ("first feeder not root: %s", fc->name)); - - SLIST_INIT(&feedertab); - SLIST_INSERT_HEAD(&feedertab, fc, link); -} +static SLIST_HEAD(, feeder_class) feedertab = SLIST_HEAD_INITIALIZER(feedertab); void feeder_register(void *p) { struct feeder_class *fc = p; - KASSERT(fc->type != 0, ("feeder '%s' has no descriptor", fc->name)); - SLIST_INSERT_HEAD(&feedertab, fc, link); } @@ -381,6 +367,6 @@ static struct feeder_class feeder_root_class = { * Register the root feeder first so that pcm_addchan() and subsequent * functions can use it. */ -SYSINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_register_root, +SYSINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_register, &feeder_root_class); SYSUNINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_unregisterall, NULL); From nobody Tue Nov 11 12:08:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKj1DZNz6GLFg; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKh4vm5z3cD7; Tue, 11 Nov 2025 12:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ws5596UlrBcktNZX023pFEK0aqfPbHkONU/rrMyAsYA=; b=BxnTTUG12S0adFnQlT/sIjl+NZ7EGyihs6u2ZJvWTLpOElEpW7FV9Kvv0Tb3WWM6A+GyYO jLig4MiJvNgHPxp00ztxEVh2JUORrnWqmKJbf+kAN/i1c+YmXk0I1wShL1A108l7zZn0Pi rQcfhKM55vUFQYTj2Drkyp5+era5wl5dpb5csMZmUo2pez/IvbArblouq9D2JfukVztEDE e/jAWr1RkXqzY+ivBnegnyw00JGn+x0OSbZIYxcAjoN2sHQwR6WwJtWynQrwtOkTZbwjGQ 6Iiim5UOrOHFwEimVkGFyCOGdt6L46vHLaBxTlhfWP+2CjT9Ww1Xf3mkIAkm6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ws5596UlrBcktNZX023pFEK0aqfPbHkONU/rrMyAsYA=; b=HaZ64w4KY9x5uuJ+Tr+kdryt90NQhABcCpw2zNz0MVrVLHLhKkW9ioBA1f/a2YmynSiL9e 0vKmn7pAp/30FZfJ2LMbG1g01gKBTrJvfkELAgJ+xNHyPubh+ISQpxHSnWza2GA+MtWWoq bFXVuDa3UI3PTfNiVq8isTi39iktgyVZZoRZuu4+R32WJUFixO7/9zjRDw9vUCjQiqj++S 9XVBVGKJ4EP7H9vCdgvrS2DBR/2xSeIhN97IVKPuwXhxoIwxHHIR7Nh89kDq5whJDHt0xo PuI2AsQ31dtOcWLjhQpthG9Wog/4cpWZDUIK3IRwPR0BjZD3jykA8cjD143XWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862904; a=rsa-sha256; cv=none; b=ctgFtMBKWxhnMNLaP0ECeqP0W6Px0uIkq3IM+v0ATrIXUVilwEuOWCCSKxqicSZ2kXr6fu XOvSka6Gn0a+j4TMeW4XWvCl/uRaPbRNBtm0zhzR2qvMEdxLDnGMxNsVi2XmOT59ZJodSX HcK1DgHolgV9Dk6zf9o9CydmOCEsWf+YeG9Usbcg3c3Z+CfKHjbEiZQDxiahmpb49DRREw TormcOeSyZNwE896EX8QB9Pc/L/xMWbq8+sUgq3hbTupHKfKgywMJPC4mHDPneKnP/9KsI PccbUm3K2BPH75yjOhOBVtw5sGy+aUrEKA5gNtiK5GTjADv3ZDoHaJtV4L5RDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKh4SC0z13Ww; Tue, 11 Nov 2025 12:08: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 5ABC8O2f035550; Tue, 11 Nov 2025 12:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8ObC035547; Tue, 11 Nov 2025 12:08:24 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:24 GMT Message-Id: <202511111208.5ABC8ObC035547@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: 16ae4c2398c8 - main - sound: Retire DSP_DEFAULT_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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16ae4c2398c89dcc5c03f1aac72a2fce2a60e724 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=16ae4c2398c89dcc5c03f1aac72a2fce2a60e724 commit 16ae4c2398c89dcc5c03f1aac72a2fce2a60e724 Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:47 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:47 +0000 sound: Retire DSP_DEFAULT_SPEED Only a few drivers use this, but this is not really our "default" speed. And even those drivers most likely override that value at some point once CHANNEL_SETSPEED() has been called. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53562 --- sys/dev/sound/pci/als4000.c | 2 +- sys/dev/sound/pci/cmi.c | 2 +- sys/dev/sound/pci/cs4281.c | 2 +- sys/dev/sound/pci/es137x.c | 2 +- sys/dev/sound/pci/maestro3.c | 4 ++-- sys/dev/sound/pci/vibes.c | 2 +- sys/dev/sound/pcm/sound.h | 2 -- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c index 75fbefe27633..a8c3303af74f 100644 --- a/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -221,7 +221,7 @@ alschan_init(kobj_t obj, void *devinfo, ch->channel = c; ch->bps = 1; ch->format = SND_FORMAT(AFMT_U8, 1, 0); - ch->speed = DSP_DEFAULT_SPEED; + ch->speed = 8000; ch->buffer = b; snd_mtxunlock(sc->lock); diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index a1356f58b567..28427d449c8d 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -352,7 +352,7 @@ cmichan_init(kobj_t obj, void *devinfo, ch->channel = c; ch->bps = 1; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); - ch->spd = DSP_DEFAULT_SPEED; + ch->spd = 8000; ch->buffer = b; ch->dma_active = 0; if (sndbuf_alloc(ch->buffer, sc->parent_dmat, 0, sc->bufsz) != 0) { diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index af2b4da76aba..5b0b229a021b 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -326,7 +326,7 @@ cs4281chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channe ch->channel = c; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); - ch->spd = DSP_DEFAULT_SPEED; + ch->spd = 8000; ch->bps = 1; ch->blksz = ch->buffer->bufsize; diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index eb546de81f65..6b2093e16246 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -987,7 +987,7 @@ es1370_init(struct es_info *es) es->escfg = ES_SET_FIXED_RATE(es->escfg, fixed_rate); else { es->escfg = ES_SET_FIXED_RATE(es->escfg, 0); - fixed_rate = DSP_DEFAULT_SPEED; + fixed_rate = 8000; } if (single_pcm) es->escfg = ES_SET_SINGLE_PCM_MIX(es->escfg, 1); diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index ee39f5f3c90d..bad2b4eee1cd 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -437,7 +437,7 @@ m3_pchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel ch->parent = sc; ch->channel = c; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); - ch->spd = DSP_DEFAULT_SPEED; + ch->spd = 8000; M3_UNLOCK(sc); /* XXX */ if (sndbuf_alloc(ch->buffer, sc->parent_dmat, 0, sc->bufsz) != 0) { device_printf(sc->dev, "m3_pchan_init chn_allocbuf failed\n"); @@ -816,7 +816,7 @@ m3_rchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel ch->parent = sc; ch->channel = c; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); - ch->spd = DSP_DEFAULT_SPEED; + ch->spd = 8000; M3_UNLOCK(sc); /* XXX */ if (sndbuf_alloc(ch->buffer, sc->parent_dmat, 0, sc->bufsz) != 0) { device_printf(sc->dev, "m3_rchan_init chn_allocbuf failed\n"); diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index 6df76306b28f..1b7353464503 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -204,7 +204,7 @@ svchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c } ch->buffer = b; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); - ch->spd = DSP_DEFAULT_SPEED; + ch->spd = 8000; ch->dma_active = ch->dma_was_active = 0; return ch; diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 6bd435d0ea25..19da1a22871a 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -148,8 +148,6 @@ struct snd_mixer; #define RANGE(var, low, high) (var) = \ (((var)<(low))? (low) : ((var)>(high))? (high) : (var)) -#define DSP_DEFAULT_SPEED 8000 - extern int snd_unit; extern int snd_verbose; extern devclass_t pcm_devclass; From nobody Tue Nov 11 12:08:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKk0lXMz6GLRk; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKj5nlNz3bsJ; Tue, 11 Nov 2025 12:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0b04bWryOnPXOq9sYXLN+k+MzEHsMiRGAufmuBHW34M=; b=hsiip0L+NeyemXgh8Ybbfs2DR/dAzUU3Nej6luaDkOsWeOeHqUXmR6Lqvjxfbozx54R+ZD Ju7awURX3Gy94bCbFSzbPqDaBGZJ+2kdSJeAIViPFkWX/gyhqeBk+qdrao/ZlkxcKezcTH DOiOXwTnHo9nsC8TdZI57H0AuuWbVZcBjJHqUjrVw0tNen5HbI/yEKqV1vboM8B1evwTjX pNXmqJFpRIVvCz9hSzF8hcKAtb9q/bYUqhE0DfV6glqyB1kV8W25ofzoT6pu3m09jdhrUH haKgR4iGy7DT1U2NbbnfmKdP3r99YKFJiV6UZmzmGCRMEpNglSwqrYhBogvJzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0b04bWryOnPXOq9sYXLN+k+MzEHsMiRGAufmuBHW34M=; b=hFs1WG+OEfEesP2nOUY+2At9GuCEeNo+1k+PuP1342VJBwCSwpn2TNeOyunMw13F43wb4i dndMbqbRG+wCCgT/LS/hgZELOA/+uPEiIq7+JYOhW3hVMFn19jjsKRZ/ORXdivtoeJG2e1 /TOvpTeqzSwsbB+Z1RlXPMQExrStfs8agNjydFZDMRz53c3H7sNQAZrUrm3HxGM0nJeykz R2He5RVgMmkK1z8g+7WbCu2tXuM0X5egIrluboLmeaobpfsdf/Q0v9fLV4M7do2BFYi6Tu Jzn3PBC72FydwzC9CvaPwoaeLOdR4NUi3ap2mHOaOvf3sY9l2NUwHyhN2Kh+9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862905; a=rsa-sha256; cv=none; b=gvIlWOk0jc0ghMubz5+PUc5065UquGzrwpqnegn0sXTvwxFENwZdwkiB3rkO/M00tqYrnJ onQbqLwGKqgg5O20YmqveFxJFC2DzGB13RMuN1W7N94jqTTPpkfxS7rGTuXZ+7wRwsX+M/ wcJaYKZbH7zoBllD/YU3gPA+wub3x11e2vqfJFEkNDC/GH7pv16tx+3Yi40LFVf+4o6VoM zdm9af4TbGkk5Sr33Np7EQ0FJFW58QqbMVrl8CNQApizGMU0sjI0DSEg8X21OK7s3J7pzN RTtwMiJUub+RTBC0XYwURJ9HIQccbLZQn438Wu2N3YKGAMCmeeDOWv1PGF/EEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKj53h0z13Zl; Tue, 11 Nov 2025 12:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5ABC8PfX035583; Tue, 11 Nov 2025 12:08:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8Pnh035580; Tue, 11 Nov 2025 12:08:25 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:25 GMT Message-Id: <202511111208.5ABC8Pnh035580@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: 7dc58828f494 - main - sound: Retire unused SCF_SYNTH List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 7dc58828f494ae8fc06ef014b01b2dbea855091b Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7dc58828f494ae8fc06ef014b01b2dbea855091b commit 7dc58828f494ae8fc06ef014b01b2dbea855091b Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:55 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:55 +0000 sound: Retire unused SCF_SYNTH Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/dev/sound/pcm/sound.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 19da1a22871a..75fb57e33733 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -184,7 +184,6 @@ int sndstat_unregister(device_t dev); enum { SCF_PCM, SCF_MIDI, - SCF_SYNTH, }; /* From nobody Tue Nov 11 12:08:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKl0lNLz6GLSw; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKk6VG7z3c1g; Tue, 11 Nov 2025 12:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gGx2Y/iAmUjH/uxp0OFNnP8OIzfEqkrwSX2xCH5pFRI=; b=qxaVoa1qTHX1b9XqtnW0/Zdiy89nxLoBItoktKL4yLsN+cL/C4TMCeRQ3cWAU7REgThmFe f1i8NmuUv1UjqX3vM/W6vX82xUouew8EY+MSHmrG7PgaYf50xNMmEVMuOOsXNVJbs/Q9aO cCFKQ6n4psV7S9EPPRs4/M/rcmRhnWlndsAp0/kkR5ap6bi6ljVW9u9fBvi3/aSnLZ6T/2 88Hs04bvVLhpRCtE/DSQSu84LeMja/0UWdRmqsFfG/V2lwOZYw8fllexxeEzcnj7c/bIRI cuFArOsFVsdJ2uGaKtPnklksFSIDqxW73KQix+bXecALt/Qu8jXfhO8b3KD6LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gGx2Y/iAmUjH/uxp0OFNnP8OIzfEqkrwSX2xCH5pFRI=; b=Q1jDxbYfenFe6xuh8KrUoft4sv/g9QTRjJPlB7SHJl2trZRipc00/iX5HzZ+QmpLuFMa9W Ceu7xU911h/t5bgbS8qZ7wk/rmYikgVsYNrlKaAaSsHFnuBgU3uCoVIUqt1WPTLZNz2rFl Lyd5jwXNwViW3pFK3oD5ESzNeMS9SKd08YJvlnWa8vqdidMmwehQxeevLI/agrq/+Zmgsz EsJcnJ9LIKnEuAmUteM0BXl+k/hnNlHu9TENIj/JhHqm8B8s2GpAj8fQvCljTvmKXc33yT Hi1T7y/AahHCqb/0eVpQu6HdQAaiBnVGK0a/AZ+iPhZ0RDbcGGwJPty0YO62og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862906; a=rsa-sha256; cv=none; b=CoDb1Liz3p9tqrJghsAY3Ewmq4wMnYOSprs9xxFTVcMgIuucWPbb+JdbM1734qbSGw4WBp +Vs/J/w/YVyqlmYuWbX1oy/NFnBGyV9kNjCNJi+Kr5K6NHAGMmMpeIgTExPdgOwAAQ3J+y NWz9qEaF0MdFzGc0PIdQz2+Ut7KlAHCk15hTpcehamY9BFUUZBzUwMYUA0E8NEvM09Fv5i 9BrxrleAjMdXnBCxPY4sliLqWeUdr+Y7ajdOr/s4aBY17tQW3/iuAbMmDUo/yOF29TugMl ZOnYfFlEFrueWaXbQ0ZnkQNeBOBdJymOr6361jHkDwhUw+0zZRuPiGpQIefyFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKk5Zrcz13pW; Tue, 11 Nov 2025 12:08: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 5ABC8QiZ035616; Tue, 11 Nov 2025 12:08:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8QAG035613; Tue, 11 Nov 2025 12:08:26 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:26 GMT Message-Id: <202511111208.5ABC8QAG035613@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: ac2aa9e869a1 - main - rc: virtual_oss: Use required_modules instead of load_kld List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: ac2aa9e869a16b28095364b2e14683df9885ac34 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ac2aa9e869a16b28095364b2e14683df9885ac34 commit ac2aa9e869a16b28095364b2e14683df9885ac34 Author: Christos Margiolis AuthorDate: 2025-11-11 12:07:36 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:07:36 +0000 rc: virtual_oss: Use required_modules instead of load_kld Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: imp, markj, emaste Differential Revision: https://reviews.freebsd.org/D53616 --- libexec/rc/rc.d/virtual_oss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss index b9c830617385..b8f1e7620582 100644 --- a/libexec/rc/rc.d/virtual_oss +++ b/libexec/rc/rc.d/virtual_oss @@ -20,6 +20,8 @@ start_cmd="${name}_start" stop_cmd="${name}_stop" status_cmd="${name}_status" +required_modules="cuse" + configs= pidpath="/var/run/${name}" virtual_oss_default_args="\ @@ -53,7 +55,6 @@ virtual_oss_pids() virtual_oss_precmd() { /usr/bin/install -d -m 0755 -o root "${pidpath}" - load_kld cuse } start_instance() From nobody Tue Nov 11 12:08:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKm32JCz6GLMN; Tue, 11 Nov 2025 12:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKl6WDLz3cGl; Tue, 11 Nov 2025 12:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ws+CYpVMXdvDFs3mG+hPajWMIz5AfyLSB6SDsErZ/iA=; b=W9rPJHhBywE9lplIS/jB+9I3WJrHj25mY8NUv9PN6RunVhuG7ajEhjfmnqyRjBbQvZ8Hd5 DPIZMVvGGA/sDfOZwHyLlNa5EqgFQt9ead2ixL6HSj3d64OlWYI1Ck27DFD5KzeDIprQam XMYnvRZsanKub7xOOtG1q7DwJa0rJIP1VEpTuYB1bH+2wYl9clTvHGoEV36ZzcIykqDyWZ p3j3cOmFPHO3qSYKK1MrXgWBpq+j0kDO5yWPF0rBBUnm/IyMG1PxgtVyjx3i907NiDeq1V qZSMYqWCKxCATo6tPNklfYPUonBoKj+2o6KM5NgBQ0Ubyr//3CmjXKfrE1zDjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ws+CYpVMXdvDFs3mG+hPajWMIz5AfyLSB6SDsErZ/iA=; b=T+wZ5x0zERK0VqQruJ9TMpkqWrXRSh3R7tdJxFAjUv+fv9VXJ4WVf/9zRUeGpkSeKRtPXA 7lcGYuANHo8KAyiuneLq2EnJU/dAOBCCesAiuku6YuKhdGaTvnJGl9VDpDtR/EQQTtJY5w L3/OA+m7/mq4cUAq6fG9PRcoJa5rvMK9V/AuPeJrF5TpvsxNTN26ySlQnoVWAhGkvaKtVI ZlcwpiiAZK6uDYyD9zZOBKA+vpr5kr9kqh1v65e9B3X7g7c9uXxqoohiItjxO8JdKwww0n 6RdYH6Oi+K8dkYBABzm5PBs0UreiGgbofvncyAowwIcFBaOKjbViQw0c5zQ6hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862907; a=rsa-sha256; cv=none; b=g+ieHz4WXBH5XpjWoqhCqmJJVJEr7w9QxXw1BFTExl0tnzzQIoYFAxABtCOiNkUmVxjpm5 mRNEyEaxxY/C21+A6hg8mTuj6/6ECivLM3ZidDsSBKtsqF3/os0ARbTTskhCW1pVAqdJ4R WP0V4+Xul8QlUXFxDfL6taWh7tHtnAQQ02NfmpMKllDwHVnWiOkcelQDaw5Od6za8TE3Ba 7oC/5wG2pMuk5Xt2Bxjfag+nJqkmp+jW4zTMckqW2c1tQPo8XNrNpyqjBQohmsEQkDUF4s qGvggAUa+WJRJ8SIs5ITUSuA/C0We3udgZwKXQVSyHG2kWCUdW8/AgRq+hX1uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKl66s2z13rZ; Tue, 11 Nov 2025 12:08: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 5ABC8R0I035653; Tue, 11 Nov 2025 12:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8RCb035650; Tue, 11 Nov 2025 12:08:27 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:27 GMT Message-Id: <202511111208.5ABC8RCb035650@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: 7bedc4634d89 - main - virtual_oss(8): Use kldload(2) instead of system(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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bedc4634d893174b9cef06c7c13e5f1cb24808b Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7bedc4634d893174b9cef06c7c13e5f1cb24808b commit 7bedc4634d893174b9cef06c7c13e5f1cb24808b Author: Christos Margiolis AuthorDate: 2025-11-11 12:07:40 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:07:40 +0000 virtual_oss(8): Use kldload(2) instead of system(3) Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: imp, markj, emaste Differential Revision: https://reviews.freebsd.org/D53617 --- usr.sbin/virtual_oss/virtual_oss/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/main.c b/usr.sbin/virtual_oss/virtual_oss/main.c index afa4ad0727ca..f2fd085664ed 100644 --- a/usr.sbin/virtual_oss/virtual_oss/main.c +++ b/usr.sbin/virtual_oss/virtual_oss/main.c @@ -26,12 +26,14 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -2539,11 +2541,8 @@ main(int argc, char **argv) atomic_init(); - /* automagically load the cuse.ko module, if any */ - if (feature_present("cuse") == 0) { - if (system("kldload cuse") == -1) - warn("Failed to kldload cuse"); - } + if (kldload("cuse.ko") < 0 && errno != EEXIST) + err(1, "Failed to load cuse kernel module"); if (cuse_init() != 0) errx(EX_USAGE, "Could not connect to cuse module"); From nobody Tue Nov 11 12:08:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKn2KRVz6GLT5; Tue, 11 Nov 2025 12:08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKn050Gz3cBT; Tue, 11 Nov 2025 12:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sHuKWHmZnVmfNjW+nMt2Q0YNLyJvcdmJPWcmWDK3guk=; b=cealz/Ib0x37Z6qs3htFbzhIB2Nc5Fsabm9C+co9ZEvzll9wL0OsJxymAkzTSuQbza5zng lFwQZ+nPB676PX++MDveE7QVKbreSYbZllqtMrPomtPApw9/HXv0SyrQZEHMUzbPTUQMj4 ORsqMZ0H9dL9Mpax3VQZqMyfgMYFIDixi+kzcgt8v5o9hwO5+ZXGVzl+vG/mRW9z0VryQw AR1TpzQ1IgceZDdvNTiiXpz48MFuwy1s+Nci5e54vd8Ny+eozDrYTcQ/He7w2H6xZ+S4Pq Z+0TmnocAdvOjhi1Tn6NKXLfoNWMA2OF3ORrJ996da4QUnXCeUhoTffhjV+MMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sHuKWHmZnVmfNjW+nMt2Q0YNLyJvcdmJPWcmWDK3guk=; b=gTJTUDQxzCIPmrKjwYTqaK1G9XKB71XpUUIESloHd8xh2eAur7CvE+b0Dz5u61Y1TbqYXZ Z20/Q+ZRidLuBGGLtuO/WTDN+v7F4xTpMcPDaFftVbB1sghqYs6sV6Le9nQJdadbucTOz4 429DQopVormVaQOnlFwKxSKG3Cw1TBEzzqrBdQrYcYI2XuJMXQb0ZfcaAfoP6Ey+AJbPpI 38jMDNBuRW4NmiawBEMHYYMI1m6kM4+3xHJpWaAHvNKMp5y7fIYEU/mytykbu19Fj9KcWX N06wSNifKu+YXrR9apCPYiPbmgX8y669kA7aEJ4YZRYiOoMhJO7MTCDPBt0iiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862909; a=rsa-sha256; cv=none; b=Bip2lbKsPKzPkvXC9V9D0XyRqIupESc4DpZqIM9MJ7eXgN2fPKZVkHso/L/cCLMpD4X074 90YPgGIasT5sHEvUgfH/xltfDJt35Vqkyx0x8+VQQ7BUAppa6oE2vpvkd8ICWeMp5URv1c 6+ZkuBwtCC8/OXxh5H7yrZSMOOcfRIuwvpN/AiMNUVbRPWVR9hwsSoJPfnF+2DK4gx2XTt jKg8eItN2R/PwpQk7B7kUIo/fCdVk7tTJ9+0FHGbn5j/o7tOjOM+8AcApbOzHJkKq3US4E DtVhtZuCJFOF9WHJ2ThNKeCzSxJVAW2cDtGc0McuyJ/v+1KsScih642JeXR5nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKm6lxyz13Zm; Tue, 11 Nov 2025 12:08: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 5ABC8Sk5035688; Tue, 11 Nov 2025 12:08:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8S2J035685; Tue, 11 Nov 2025 12:08:28 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:28 GMT Message-Id: <202511111208.5ABC8S2J035685@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: e5c0d7020f3d - main - virtual_oss(8): Improve hw.snd.basename_clone handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: e5c0d7020f3d040b28dc7ca0cda9926e07e5aaf4 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e5c0d7020f3d040b28dc7ca0cda9926e07e5aaf4 commit e5c0d7020f3d040b28dc7ca0cda9926e07e5aaf4 Author: Christos Margiolis AuthorDate: 2025-11-11 12:07:44 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:07:44 +0000 virtual_oss(8): Improve hw.snd.basename_clone handling If we request a /dev/dsp virtual_oss(8) device, we have to replace the sound(4) one by first disabling hw.snd.basename_clone. This sysctl tells sound(4) to not create the /dev/dsp alias for the default device. There are currently two issues with the way this is handled by virtual_oss(8), however: 1. It uses system(3) instead of sysctlbyname(3). 2. It does not restore hw.snd.basename_clone to its original value, so if prior to virtual_oss(8) running, hw.snd.basename_clone was enabled (which is the case by default), and it is closed at some point, hw.snd.basename_clone stays disabled, which is annoying, because users have to manually restore it, otherwise applications that open the default device (i.e., most) will not work. Fix both issues. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53621 --- usr.sbin/virtual_oss/virtual_oss/main.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/main.c b/usr.sbin/virtual_oss/virtual_oss/main.c index f2fd085664ed..28095880c201 100644 --- a/usr.sbin/virtual_oss/virtual_oss/main.c +++ b/usr.sbin/virtual_oss/virtual_oss/main.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -52,6 +53,8 @@ #include "int.h" #include "virtual_oss.h" +#define SYSCTL_BASECLONE "hw.snd.basename_clone" + pthread_mutex_t atomic_mtx; pthread_cond_t atomic_cv; @@ -1617,6 +1620,7 @@ volatile sig_atomic_t voss_exit = 0; static int voss_dsp_perm = 0666; static int voss_do_background; +static int voss_baseclone = 0; static const char *voss_pid_path; uint32_t voss_dsp_rx_refresh; @@ -1739,6 +1743,20 @@ usage(void) exit(EX_USAGE); } +/* + * Restore hw.snd.basename_clone if it was disabled by us. + */ +static void +restore_baseclone(void) +{ + if (voss_baseclone) { + if (sysctlbyname(SYSCTL_BASECLONE, NULL, NULL, &voss_baseclone, + sizeof(int)) < 0) + warn("Could not enable " SYSCTL_BASECLONE); + printf(SYSCTL_BASECLONE ": 0 -> %d\n", voss_baseclone); + } +} + static void init_compressor(struct virtual_profile *pvp) { @@ -1883,8 +1901,18 @@ dup_profile(vprofile_t *pvp, int *pamp, int pol, int rx_mute, * Detect /dev/dsp creation and try to disable system * basename cloning automatically: */ - if (strcmp(ptr->oss_name, "dsp") == 0) - system("sysctl hw.snd.basename_clone=0"); + if (strcmp(ptr->oss_name, "dsp") == 0) { + size_t size; + + x = 0; + size = sizeof(int); + if (sysctlbyname(SYSCTL_BASECLONE, &voss_baseclone, + &size, &x, size) < 0) + return ("Could not disable " SYSCTL_BASECLONE); + printf(SYSCTL_BASECLONE ": %d -> 0\n", voss_baseclone); + if (atexit(restore_baseclone) < 0) + return ("Could not set atexit callback"); + } /* create DSP character device */ pdev = cuse_dev_create(&vclient_oss_methods, ptr, NULL, From nobody Tue Nov 11 12:24:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5Qgt59q1z6GMp7; Tue, 11 Nov 2025 12:24: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5Qgt3HyCz3t3n; Tue, 11 Nov 2025 12:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762863850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnD2qSIRwksVjlCYXWY3N7Pfvi85fS7cn8dsgBpYVxk=; b=J88NjPfZS4YVi8+jsW0yjv2/qnMWXooMvYPx/kb8O+lsE4mMmxEG7zW6NkI7TdmDts3DJ5 vM7UfCCGBroDGtAs434G1rg3kg448h/A921k5VDcOBLUhZlRYqAWSMBGmGyKQNa7I2H3mY rwX50iNAfGpfRADOTE3nzDMVFid2AItKzOUG+HZGkP4TxxYSyHz0Pdu2ByW6h7xRFaDAhP r00OeQSr+EVrvgv+C2zxGCWUXZw7ba2Kl/zm6ryEIkVtLO0a3wpi9RpRatGWc7/8LE5jVN tKMgLBpDZaQDO3SudKXV2GOyA8fwYyFkSa3Ek6l6ip6u5WyFbahL4bSatd7Y5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762863850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnD2qSIRwksVjlCYXWY3N7Pfvi85fS7cn8dsgBpYVxk=; b=qg4mtLBHTxbsrgM2Sh6smUg7qA1y61I3TYqwUu6w56jYwCrUSN9qYjGbVP+D5Jwy8iiNH4 AeHF57SkenJtjLMPG3U0jk9PAPer+enb2Tat32J87PPZHY5eX9inqf55eCYYmDMmrs0jlQ 0YtZFKOdc5vmTTIb6zHkcaShpHWCQzCmS7qv/ipNTdsydz/Y2+zldYHChm8uwvpwRXo2M9 nEqThBGe0fVIfCAcIUzdidu2LTpATtfzcy1FlfJWF4T7iKl0tPFhtuiObWoYOJOaCjNn7t ZVlFggPtNfpoI+I4cRgqs9N2SO22B3KRejAaaANdhWNO1BYOaVEwVlZK+xaoDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762863850; a=rsa-sha256; cv=none; b=Y5WNhD65+qqJGqYCClPPNq+sRp12tp+9Hqcn3KnsxkrpY0OtxeeYPLNj5jqW2iNYJR64QG 1G89jI/BNiFaY2px1pMDFy/zwFMwKsem3bpnBd1mLJQCLxctXNgWCelRKXz7g69DynodPo 4SUnJh8MQXEy4Y1Po2lFUwz4vNxO23rtlDsrk8Gx+9EZKtAsFk21V6Oub7mM0RGtO2njEq FX8D16xQpdEInUwQ9HZJNu6F+R3Ukr0og0mpghCbToM68nQpcYkLzuEgUWz//4ebgwHswk xZvHJK5JN64VJAOk97O1I3/VqQCouJ4YewURtZAW6Q3IwsbL6qOCmq3ICCRq+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5Qgt2jM5z144G; Tue, 11 Nov 2025 12:24: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 5ABCOAGe072665; Tue, 11 Nov 2025 12:24:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABCOA65072662; Tue, 11 Nov 2025 12:24:10 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:24:10 GMT Message-Id: <202511111224.5ABCOA65072662@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: 41f2ec3be93a - main - sound tests: Fix select(2) arguments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41f2ec3be93a2981e5afcc2569e6abcc64414437 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=41f2ec3be93a2981e5afcc2569e6abcc64414437 commit 41f2ec3be93a2981e5afcc2569e6abcc64414437 Author: Christos Margiolis AuthorDate: 2025-11-11 12:22:13 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:23:58 +0000 sound tests: Fix select(2) arguments Fixes: dd81b19ef236 ("sound tests: Test polling") Sponsored by: The FreeBSD Foundation MFC after: 1 week --- tests/sys/sound/polling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/sound/polling.c b/tests/sys/sound/polling.c index eefe5d174549..79b731fee00a 100644 --- a/tests/sys/sound/polling.c +++ b/tests/sys/sound/polling.c @@ -178,7 +178,7 @@ ATF_TC_BODY(poll_select, tc) FD_ZERO(&fds[1]); FD_SET(fd, &fds[0]); FD_SET(fd, &fds[1]); - ATF_REQUIRE_MSG(select(fd + 1, &fds[0], &fds[1], NULL, NULL) > 0, + ATF_REQUIRE_MSG(select(fd + 2, &fds[0], &fds[1], NULL, NULL) > 0, FMT_ERR("select")); if (FD_ISSET(fd, &fds[0])) { ATF_REQUIRE_MSG(read(fd, buf, sizeof(buf)) > 0, From nobody Tue Nov 11 13:22:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5RzX0NQFz6GRCr; Tue, 11 Nov 2025 13:22: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5RzW6qWXz441t; Tue, 11 Nov 2025 13:22:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762867368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+v/HWNNHDrzujnBQZ1VYRvmfdbLJFNJp2BhBOr4fQzc=; b=rxq1BrlDe7ulShArMMZ8j0DNIItCbVx9vYV6fztLCwk2l7mte3LsX8W/Qag/XhqNK6e1HL f84OZHAP4P+uDb766e78km4/d+BVrpeOQ8chEFrZVGOJlH/yEBIbYoIfzjWwuxz7bNSdgw pki6yVS0A/kU71zQ3+RpmC3eYSo02IWqehd50kezKLGhFCr0HtP++F1Srnw250FRUfeAmQ dSytrI1/BekkHhdp8Upj9ps+CY1fAGYnHxTpURakDNpZ1ViAD0VEIDB/NE4C+ATyz1dMmO hlu9LrNmYJWA4oTj2UFR9cZU3KEMo8SfgmbXs7jMibNjGX7CXUK0qT24f3aHjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762867368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+v/HWNNHDrzujnBQZ1VYRvmfdbLJFNJp2BhBOr4fQzc=; b=yIfEa3L3v0p4hkDp/MS0Rcvk6QMFR8VYPLcOaeeyipkDwPg28pU6m3DNiBaUu+o/QSWKiT DZGDaWXQUegtkdwri3BRC40pWBNYdstAas1rqAihZl4RDVrxL982YEePzB/NyXjWL4nW6S Lg+KZ5zXS8X4nXzl5CtozMRV37Hsb+BT2dahxU98RH5EtrUfkXVdkT+AaZxnkb+DkRPL6C Wsjkhw/qorr8MuRv0Yc39Mpr6Krd9/F0f5OHdiW39W6eyPiBqkT2bMChDnB/JzoIIsaW5k hVns9cptGT/Qy0XmR/GmdObcEVRMsf8wGdZs4wbw73o7bCN5W8iE2RsBBoFtXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762867368; a=rsa-sha256; cv=none; b=gorR/GHizIx3W6a1I8dEapMcehBOZkUjwAFs+N+6UUfbfOlhhUiXH9LH+1CUvFJgwlz3l/ m6HpEbh+DfCY3r5wBnpjDBOgrU0cOcsd0IG1Wg7XK5zIcq0V+xeSKPH+H3xUSqdsZBJ/+0 Mr8pPGtPPyptkG5B+6iLVf70CHvJ5p4tJclPXtI6KJogxVXIQ6tv7sn/KM8rqYOK6YYLJ6 JIfOa6G5ODOL7YKY8jOWotMYgTx6rKzr8NEGFg0rKr9/blV8gIwtxG31N3Pe/kxwDgUbvQ yx45Tn/dCAoi79jSkwFaC/YlasRXutFlOpIxoHx8v/mz0QeXJqCaCVckTHMjjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5RzW6Dr5z15vs; Tue, 11 Nov 2025 13:22: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 5ABDMlGN084913; Tue, 11 Nov 2025 13:22:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABDMlde084910; Tue, 11 Nov 2025 13:22:47 GMT (envelope-from git) Date: Tue, 11 Nov 2025 13:22:47 GMT Message-Id: <202511111322.5ABDMlde084910@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: eb95b990f8eb - main - sound tests: Fix format specified for kevent.data List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: eb95b990f8ebfb85ce6e4d7d16305746b5eddcde Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=eb95b990f8ebfb85ce6e4d7d16305746b5eddcde commit eb95b990f8ebfb85ce6e4d7d16305746b5eddcde Author: Christos Margiolis AuthorDate: 2025-11-11 13:21:22 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 13:22:28 +0000 sound tests: Fix format specified for kevent.data Reported by: CI Fixes: dd81b19ef236 ("sound tests: Test polling") Sponsored by: The FreeBSD Foundation MFC after: 1 week --- tests/sys/sound/polling.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/sound/polling.c b/tests/sys/sound/polling.c index 79b731fee00a..a2cecb47a27c 100644 --- a/tests/sys/sound/polling.c +++ b/tests/sys/sound/polling.c @@ -93,7 +93,7 @@ ATF_TC_BODY(poll_kqueue, tc) ATF_REQUIRE_MSG(kevent(kq, NULL, 0, &ev, 1, NULL) == 1, FMT_ERR("kevent")); ATF_REQUIRE_MSG((ev.flags & EV_ERROR) == 0, "EV_ERROR is set"); - ATF_REQUIRE_MSG(ev.data != 0, "data is %ld", ev.data); + ATF_REQUIRE_MSG(ev.data != 0, "data is %lld", ev.data); ATF_REQUIRE_MSG(read(fd, buf, sizeof(buf)) > 0, FMT_ERR("read")); EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, 0); @@ -108,7 +108,7 @@ ATF_TC_BODY(poll_kqueue, tc) ATF_REQUIRE_MSG(kevent(kq, NULL, 0, &ev, 1, NULL) == 1, FMT_ERR("kevent")); ATF_REQUIRE_MSG((ev.flags & EV_ERROR) == 0, "EV_ERROR is set"); - ATF_REQUIRE_MSG(ev.data != 0, "data is %ld", ev.data); + ATF_REQUIRE_MSG(ev.data != 0, "data is %lld", ev.data); ATF_REQUIRE_MSG(write(fd, buf, sizeof(buf)) > 0, FMT_ERR("write")); EV_SET(&ev, fd, EVFILT_WRITE, EV_DELETE, 0, 0, 0); From nobody Tue Nov 11 14:58:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5V6D1xPkz6GYXc; Tue, 11 Nov 2025 14:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5V6D1LCvz3LVt; Tue, 11 Nov 2025 14:58:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762873124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tXCgMZP+W/CxFLEZVpn4gNk1NG9KXPQFqh86idzAi4M=; b=tXFuL5BXpJTRTYTYsuKR/Tu3CVRi1VBhgOyFtNWeUTMTW8vf5xa3ESpBi/8RY/RHxSZh0y 1SKBTAnpJnwjSaDDDivu1W+tOYGBMKnLrIPZ2LQoq3VGDdIw5YLDSJR54y8PDOBFYTcF1A p48jaa2e5A+inyBm/rYK5G6gXVJIWoK+JpcmLqjga9HeRjbltUDV2oPmLVVkLd1dxl9bWt CGSdcPY20AVYpWvLuHSbv1GzwmCRkysQ5H2BmlgpVaDLuQHVQmtSdhQG7tZBWlPnYHsPTF NUT9A5Dh82x0L1ZPVyZN+GHaCB3c7vc+RuStdYn/fYf80+KfgXz2hxO9TiT4Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762873124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tXCgMZP+W/CxFLEZVpn4gNk1NG9KXPQFqh86idzAi4M=; b=XWgVPitXUhCOpR8PmQEYrL/AG1Tv4O3DmeR0PsSwp6vK91jKFVPfqUpZB3FFrmzDU7nIsp 541yx9LQB61jCIRUhhVUhEUcgsACExnJlvwFYjdHNNjyHTqquOEwwJn7zO5a3r7tGUm2Rj DGfSp8wSdMoIaPF1BftZV4sZd15mwO7bKKABPi15073MwTOpVSbovwoR/wMvgSRShBnuPX uG4IOs4v55PGT6yj6crvTB3TlZnyiQSd3vOc0lQY4aZhJmuCzfiP16/wWinm8DPRKNcyur /GxThEDgeu8ntup6fHphgD5hJbezwiQ2NroeXL0ijHWykntHbwVDA8/j72TxPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762873124; a=rsa-sha256; cv=none; b=EUYcps4y9j92QMLze9RVsSdp9Ory/EVScuFXEcz5q5ubhqQ73fjx7yylkOEfxExum0ru2I omd1oZbIUTNT598VZ00ltLEndCoXXnOHX8jOTXrRgSlCSlmzZ3Vk+CxZ71q5RQx4eneTLA +31lzBxoUqV9D07yaCWnm4izO3BmEjtMwhpzUFtF/Bki5wKpS9FyLNn+/VFzDNGaucSke9 Dd9hT05786j124SNfc8pjZtcE180Wdah8O6CokeNbEbmRiMDUDjdiwBUGtesuAOPRe+Xoc uO/TICpMcU4zN15Y3MPVz16u/z8e4SiMoNpFOGZD//IGsZoBTAy1kgyKSLtaLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5V6D0fPFz17fd; Tue, 11 Nov 2025 14:58: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 5ABEwhno055946; Tue, 11 Nov 2025 14:58:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABEwhKh055943; Tue, 11 Nov 2025 14:58:43 GMT (envelope-from git) Date: Tue, 11 Nov 2025 14:58:43 GMT Message-Id: <202511111458.5ABEwhKh055943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 38839c872e7a - main - date: Improve nanosecond 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38839c872e7af6a1424009bf07d6b4450e9ca61d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=38839c872e7af6a1424009bf07d6b4450e9ca61d commit 38839c872e7af6a1424009bf07d6b4450e9ca61d Author: Dag-Erling Smørgrav AuthorDate: 2025-11-11 14:58:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-11 14:58:35 +0000 date: Improve nanosecond support Add support for a field width, which defaults to 9 if unspecified or zero. If the width is not exactly 9, we have to either cut off digits or append zeroes to make up the difference. If the width is a dash, we pick a width based on the clock's reported resolution. This brings us in line with GNU coreutils. PR: 287080 MFC after: 1 week Reviewed by: 0mp Differential Revision: https://reviews.freebsd.org/D53667 --- bin/date/date.1 | 50 ++++++++++-- bin/date/date.c | 148 ++++++++++++++++++++++++----------- bin/date/tests/format_string_test.sh | 2 + 3 files changed, 147 insertions(+), 53 deletions(-) diff --git a/bin/date/date.1 b/bin/date/date.1 index f68892bd408d..374a687fcbdc 100644 --- a/bin/date/date.1 +++ b/bin/date/date.1 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 5, 2025 +.Dd November 10, 2025 .Dt DATE 1 .Os .Sh NAME @@ -186,7 +186,7 @@ Print the date and time represented by .Ar seconds , where .Ar seconds -is the number of seconds since the Epoch +is the number of seconds since the Unix Epoch (00:00:00 UTC, January 1, 1970; see .Xr time 3 ) , @@ -321,20 +321,43 @@ Refer to the examples below for further details. .Pp An operand with a leading plus .Pq Sq + -sign signals a user-defined format string +sign specifies a user-defined format string which specifies the format in which to display the date and time. The format string may contain any of the conversion specifications described in the .Xr strftime 3 -manual page and -.Ql \&%N -for nanoseconds, as well as any arbitrary text. +manual page, as well as any arbitrary text. +.Pp +The following extensions to the regular +.Xr strftime 3 +syntax are supported: +.Bl -tag -width "xxxx" +.It Cm \&% Ns Ar n Ns Cm N +Replaced by the +.Ar n Ns +-digit fractional part of the number of seconds since the Unix Epoch. +If +.Ar n +is omitted or zero, a default value of 9 is used, resulting in a +number with nanosecond resolution (hence the choice of the letter +.Sq N +for this conversion). +Note that the underlying clock may not necessarily support nanosecond +resolution. +.It Cm \&%-N +As above, but automatically choose the precision based on the reported +resolution of the underlying clock. +If the +.Fl r +option was specified, the default precision of 9 digits is used. +.El +.Pp A newline .Pq Ql \en character is always output after the characters specified by the format string. The format string for the default display is -.Dq +%+ . +.Dq %+ . .Pp If an operand does not have a leading plus sign, it is interpreted as a value for setting the system's notion of the current date and time. @@ -448,6 +471,13 @@ The utility exits 0 on success, 1 if unable to set the date, and 2 if able to set the local date, but unable to set it globally. .Sh EXAMPLES +The command +.Pp +.Dl "date +%s.%3N" +.Pp +will print the time elapsed since the Unix Epoch with millisecond +precision. +.Pp The command: .Pp .Dl "date ""+DATE: %Y-%m-%d%nTIME: %H:%M:%S""" @@ -619,3 +649,9 @@ The .Ql \&%N conversion specification was added in .Fx 14.1 . +Support for the +.Ql \&% Ns Ar n Ns Cm N +and +.Ql \&%-N +variants was added in +.Fx 15.1 . diff --git a/bin/date/date.c b/bin/date/date.c index 01797084c0d6..9a40ac43d58b 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -55,10 +56,10 @@ static void badformat(void); static void iso8601_usage(const char *) __dead2; static void multipleformats(void); static void printdate(const char *); -static void printisodate(struct tm *, long); +static void printisodate(struct tm *, long, long); static void setthetime(const char *, const char *, int, struct timespec *); static size_t strftime_ns(char * __restrict, size_t, const char * __restrict, - const struct tm * __restrict, long); + const struct tm * __restrict, long, long); static void usage(void) __dead2; static const struct iso8601_fmt { @@ -78,26 +79,24 @@ static const char *rfc2822_format = "%a, %d %b %Y %T %z"; int main(int argc, char *argv[]) { - struct timespec ts; + struct timespec ts = { 0, 0 }, tres = { 0, 1 }; int ch, rflag; bool Iflag, jflag, Rflag; const char *format; char buf[1024]; - char *fmt, *outzone = NULL; - char *tmp; + char *end, *fmt, *outzone = NULL; struct vary *v; const struct vary *badv; struct tm *lt; struct stat sb; size_t i; + intmax_t number; v = NULL; fmt = NULL; (void) setlocale(LC_TIME, ""); rflag = 0; Iflag = jflag = Rflag = 0; - ts.tv_sec = 0; - ts.tv_nsec = 0; while ((ch = getopt(argc, argv, "f:I::jnRr:uv:z:")) != -1) switch((char)ch) { case 'f': @@ -131,13 +130,15 @@ main(int argc, char *argv[]) break; case 'r': /* user specified seconds */ rflag = 1; - ts.tv_sec = strtoq(optarg, &tmp, 0); - if (*tmp != 0) { - if (stat(optarg, &sb) == 0) { - ts.tv_sec = sb.st_mtim.tv_sec; - ts.tv_nsec = sb.st_mtim.tv_nsec; - } else - usage(); + number = strtoimax(optarg, &end, 0); + if (end > optarg && *end == '\0') { + ts.tv_sec = number; + ts.tv_nsec = 0; + } else if (stat(optarg, &sb) == 0) { + ts.tv_sec = sb.st_mtim.tv_sec; + ts.tv_nsec = sb.st_mtim.tv_nsec; + } else { + usage(); } break; case 'u': /* do everything in UTC */ @@ -155,8 +156,12 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - if (!rflag && clock_gettime(CLOCK_REALTIME, &ts) == -1) - err(1, "clock_gettime"); + if (!rflag) { + if (clock_gettime(CLOCK_REALTIME, &ts) == -1) + err(1, "clock_gettime"); + if (clock_getres(CLOCK_REALTIME, &tres) == -1) + err(1, "clock_getres"); + } format = "%+"; @@ -191,14 +196,14 @@ main(int argc, char *argv[]) badv = vary_apply(v, lt); if (badv) { fprintf(stderr, "%s: Cannot apply date adjustment\n", - badv->arg); + badv->arg); vary_destroy(v); usage(); } vary_destroy(v); if (Iflag) - printisodate(lt, ts.tv_nsec); + printisodate(lt, ts.tv_nsec, tres.tv_nsec); if (format == rfc2822_format) /* @@ -208,7 +213,8 @@ main(int argc, char *argv[]) setlocale(LC_TIME, "C"); - (void)strftime_ns(buf, sizeof(buf), format, lt, ts.tv_nsec); + (void)strftime_ns(buf, sizeof(buf), format, lt, + ts.tv_nsec, tres.tv_nsec); printdate(buf); } @@ -222,7 +228,7 @@ printdate(const char *buf) } static void -printisodate(struct tm *lt, long nsec) +printisodate(struct tm *lt, long nsec, long res) { const struct iso8601_fmt *it; char fmtbuf[64], buf[64], tzbuf[8]; @@ -231,10 +237,10 @@ printisodate(struct tm *lt, long nsec) for (it = iso8601_fmts; it <= iso8601_selected; it++) strlcat(fmtbuf, it->format_string, sizeof(fmtbuf)); - (void)strftime_ns(buf, sizeof(buf), fmtbuf, lt, nsec); + (void)strftime_ns(buf, sizeof(buf), fmtbuf, lt, nsec, res); if (iso8601_selected > iso8601_fmts) { - (void)strftime_ns(tzbuf, sizeof(tzbuf), "%z", lt, nsec); + (void)strftime_ns(tzbuf, sizeof(tzbuf), "%z", lt, nsec, res); memmove(&tzbuf[4], &tzbuf[3], 3); tzbuf[3] = ':'; strlcat(buf, tzbuf, sizeof(buf)); @@ -370,16 +376,17 @@ setthetime(const char *fmt, const char *p, int jflag, struct timespec *ts) */ static size_t strftime_ns(char * __restrict s, size_t maxsize, const char * __restrict format, - const struct tm * __restrict t, long nsec) + const struct tm * __restrict t, long nsec, long res) { - size_t prefixlen; size_t ret; char *newformat; char *oldformat; const char *prefix; const char *suffix; const char *tok; - bool seen_percent; + long number; + int i, len, prefixlen, width, zeroes; + bool seen_percent, seen_dash, seen_width; seen_percent = false; if ((newformat = strdup(format)) == NULL) @@ -392,36 +399,85 @@ strftime_ns(char * __restrict s, size_t maxsize, const char * __restrict format, * If the previous token was a percent sign, * then there are two percent tokens in a row. */ - if (seen_percent) + if (seen_percent) { seen_percent = false; - else + } else { seen_percent = true; + seen_dash = seen_width = false; + prefixlen = tok - newformat; + width = 0; + } break; case 'N': - if (seen_percent) { - oldformat = newformat; - prefix = oldformat; - prefixlen = tok - oldformat - 1; - suffix = tok + 1; + if (!seen_percent) + break; + oldformat = newformat; + prefix = oldformat; + suffix = tok + 1; + /* + * Prepare the number we are about to print. If + * the requested width is less than 9, we need to + * cut off the least significant digits. If it is + * more than 9, we will have to append zeroes. + */ + if (seen_dash) { /* - * Construct a new format string from the - * prefix (i.e., the part of the old format - * from its beginning to the currently handled - * "%N" conversion specification), the - * nanoseconds, and the suffix (i.e., the part - * of the old format from the next token to the - * end). + * Calculate number of singificant digits + * based on res which is the clock's + * resolution in nanoseconds. */ - if (asprintf(&newformat, "%.*s%.9ld%s", - (int)prefixlen, prefix, nsec, - suffix) < 0) { - err(1, "asprintf"); - } - free(oldformat); - tok = newformat + prefixlen + 9; + for (width = 9, number = res; + width > 0 && number > 0; + width--, number /= 10) + /* nothing */; + } + number = nsec; + zeroes = 0; + if (width == 0) { + width = 9; + } else if (width > 9) { + zeroes = width - 9; + width = 9; + } else { + for (i = 0; i < 9 - width; i++) + number /= 10; } + /* + * Construct a new format string from the prefix + * (i.e., the part of the old format from its + * beginning to the currently handled "%N" + * conversion specification), the nanoseconds, and + * the suffix (i.e., the part of the old format + * from the next token to the end). + */ + asprintf(&newformat, "%.*s%.*ld%.*d%n%s", prefixlen, + prefix, width, number, zeroes, 0, &len, suffix); + if (newformat == NULL) + err(1, "asprintf"); + free(oldformat); + tok = newformat + len - 1; seen_percent = false; break; + case '-': + if (seen_percent) { + if (seen_dash || seen_width) { + seen_percent = false; + break; + } + seen_dash = true; + } + break; + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + if (seen_percent) { + if (seen_dash) { + seen_percent = false; + break; + } + width = width * 10 + *tok - '0'; + seen_width = true; + } + break; default: seen_percent = false; break; diff --git a/bin/date/tests/format_string_test.sh b/bin/date/tests/format_string_test.sh index c2fe2111373f..5f199a3b5fd6 100755 --- a/bin/date/tests/format_string_test.sh +++ b/bin/date/tests/format_string_test.sh @@ -132,6 +132,8 @@ atf_init_test_cases() format_string_test M M 04 20 format_string_test m m 02 11 format_string_test N N 000000000 000000000 + format_string_test 3N 3N 000 000 + format_string_test 12N 12N 000000000000 000000000000 format_string_test p p AM PM format_string_test R R 07:04 21:20 format_string_test r r "07:04:03 AM" "09:20:00 PM" From nobody Tue Nov 11 14:59:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5V6h3QcVz6GYCs; Tue, 11 Nov 2025 14:59: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5V6h2tSZz3M2l; Tue, 11 Nov 2025 14:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762873148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lu9wdZfTlTAxZ+z3YhPNs2oNJ8gvFF1dyEq0A5FE48k=; b=WFssp/ASGNue2ZE0DfkkgZczAwqhsPZB0ZzGFBqZBn2Kif6bmi85IQh4xEoV/kh66Lz6dT bDgg4BZbzCQqxp53gXgTExc0GsSpaUL9x/ELD+9mQXgxoMHIfiQQo1QJbvDk+ldVCDS/A0 M/IafywTYWwU8/Gl4Ky69ZAC+KRj+RU5m6qogJRno67yqMlXSr3ZicyZ/qbVkcC+2vP+Lo r8xRGldmyjw/P7W1S1PGj8eUPJYumZfoc88EXR2zcTEWpS8Z0AqVyo230Rp5flfBVpGFfW iMDCvNc2YnNlEeTCvB2pVzz+OHIxUhqAAcvnWJX4Jq7HH6fvVgtsGNP8v2CAYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762873148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lu9wdZfTlTAxZ+z3YhPNs2oNJ8gvFF1dyEq0A5FE48k=; b=AUteuj+Q/RZaKjjAcRH/ySDWqzuKgOt2wxC6d+jQA1A2It/N0HWJxDeWqV/Yidr2qw2XYp PZrUaqOSXpLkUZTWfqK8iJpWEAPoCBpoXcWM579lX2mkREWXyOZ4lPcIPmSj1GVO4kbnGt /6st8x71Snno6BhWD1lL9zH1I5H7TepBJnkolHDA8LUT0rMqxCUBvG1TgRQqpT9IxNMLth mIDIy+ixk3+Nm0sLqWSoali5ZJCvele22w4CzatntW6igus3FmQoBV/ivSP5fEdvWh0gFT GZTgEuMEjHNbU7YOOhA4mHd2+MPcLqBwOOk29IaaCNUCfJMYAZc0SAc+p+5tfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762873148; a=rsa-sha256; cv=none; b=wfXuGZKUXu/J4QGvtxa7RaxCJIZgdTvHzXB9hlnMSrq/Jh2dCrxzK/1I4M+rSmBjhWgyWM p5CcGsnugQPl+6VZB0Pv1clhL16+2NNLw4f63PcXQbk3AaQXhNiFA4PqYND5Cs8dr5pMH3 uNpdSXxgxiITPZ+gQzwZcAea3xH5tkRd+i4g6qJiQjVYJ9cxu2cpjfq/y8k28omOxhRJv3 gUIeN+H9ZQ4Etkf0SZ5AXA1UcWE8HJc1RvFSDCNbMptyNlSEqMi3LqBvDeajgSzJzbidsW hu4SHKkqVkUU5FmWFLi0xV7tL+v0hWQLf2VQB9SColRSHIROhAWydcJNRF4cmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5V6h29QRz17xH; Tue, 11 Nov 2025 14:59: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 5ABEx8E6056217; Tue, 11 Nov 2025 14:59:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABEx8Co056214; Tue, 11 Nov 2025 14:59:08 GMT (envelope-from git) Date: Tue, 11 Nov 2025 14:59:08 GMT Message-Id: <202511111459.5ABEx8Co056214@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: 99cb3dca4773 - main - vnode: Rework vput() to avoid holding the vnode lock after decrementing List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3 commit 99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3 Author: Mark Johnston AuthorDate: 2025-11-11 14:47:06 +0000 Commit: Mark Johnston CommitDate: 2025-11-11 14:58:59 +0000 vnode: Rework vput() to avoid holding the vnode lock after decrementing It is not safe to modify the vnode structure after releasing one's reference. Modify vput() to avoid this. Use refcount_release_if_last() to opportunistically call vput_final() with the vnode lock held since we need the vnode lock in order to deactivate the vnode, and it's silly to drop the vnode lock and immediately reacquire it in this common case. Note that vunref() has a similar flaw. D52628 aims to fix the problem more holistically, but this change fixes observable panics in the meantime. Reported by: syzbot+6676b3ff282d590b0fb3@syzkaller.appspotmail.com Reported by: syzbot+38e26cf6f959e886f110@syzkaller.appspotmail.com Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52608 --- sys/kern/vfs_subr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 58975f7ac932..9cf983f6f89d 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3713,11 +3713,12 @@ vput(struct vnode *vp) ASSERT_VOP_LOCKED(vp, __func__); ASSERT_VI_UNLOCKED(vp, __func__); - if (!refcount_release(&vp->v_usecount)) { - VOP_UNLOCK(vp); + if (refcount_release_if_last(&vp->v_usecount)) { + vput_final(vp, VPUT); return; } - vput_final(vp, VPUT); + VOP_UNLOCK(vp); + vrele(vp); } /* From nobody Tue Nov 11 15:26:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5Vkn4fZTz6GbPD; Tue, 11 Nov 2025 15:26: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5Vkn3hBLz3QGC; Tue, 11 Nov 2025 15:26:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762874817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXU6AZYGvZ8rZUoQgCr7ycs7301XVzJxKvR9VttRcbM=; b=m+QC5qJ8tUaJYr0HvGHbvCd+FGOoPZgds7FokCOWD3wsQlyIDWVvZkn2kf98kuNn/ggE3i jTkV0o7yxopPAMgEKhPai6E7+wPGBp/6zIzPzcOfqEQL1Jacbtd0KLrpZ9gSSseYVBa03N JygkBMSXjzvwGNvq8MtYFED1GTLlVa6X6LZ1yoWGil0RFDW+ktIfyQrETiQYptryKraWZp syjQIfKV0B1WRY1re5dIEa6Cd8lI2jyatN/5lt0Q/BspDmnU+4A5A5Q/dtyENUn8MqIrnu oUF2cHzkmPCR/edGKUOlTCF5P71DJNqaFW6JaTijc/nUvApO83fJOaNNS1PQ6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762874817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXU6AZYGvZ8rZUoQgCr7ycs7301XVzJxKvR9VttRcbM=; b=Ox7iGxHVwYXC0AUoWOmLn6C1hN9zU8/HsiiNEdHG1TiJwUiPOxiyfr1bArWPRJpmRojn4q +skbrCQO5uinWe8oLOgUXO8iwdIb6e2LdP7TxkF5CWZvXFj8fD3bgUo6DpSMCyNdFTWBJX vFHBczObD/pkufMCERVIHthfRY87fe82vhckCgeQuZw/+vMoNensdlZon6vXIN6/gNtzqI X7Ab6OBnEEaW7HCHGipCsQLz5J67ALp+StXG0xXGDu5u6hb182FJvVDQ3iGsztodnVKX6T 3LvVJfQDvHKepmH5fdYLr9y1EevQhf8czVrKJuuQuGlqwG/wKpQcJNYXI+eSfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762874817; a=rsa-sha256; cv=none; b=bVkuTuZfzbG+/zjn3xV8flxVdY5zYlWnnUdhXNqttlpHF9x5u+kAwFFu6vLXc2NyPbpnOT gr4dYlBnl9HsHcFtvn3KANWP1oEzG3RXQmJrfdZ4l19qDT2Ml2mGndBFM8Uwgh3eRhMFh6 bprmlZjzc658zxhkO8pu86sYXeKcPyn9CapCPXn63y9PsHv9245Yq1OtdVP3c6GFONgMnm ONcJsabd9VdvArACOiN4f6FimZAPvQkyVgk8kdnTpPZpUM2r8I/QbWX7yFfVveNupQ34T1 +D8149bf7Nu0S3Wj5PeApsxLACaGQacsH36n9nbcGRw2LX/OGoSy3Iburw2bVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5Vkn3BM4z18KZ; Tue, 11 Nov 2025 15:26: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 5ABFQvxB012590; Tue, 11 Nov 2025 15:26:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABFQvoO012586; Tue, 11 Nov 2025 15:26:57 GMT (envelope-from git) Date: Tue, 11 Nov 2025 15:26:57 GMT Message-Id: <202511111526.5ABFQvoO012586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: fb99c0ba60dc - main - sound tests: Actually fix format strings List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb99c0ba60dc464aab2102c4395791e151d438c6 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=fb99c0ba60dc464aab2102c4395791e151d438c6 commit fb99c0ba60dc464aab2102c4395791e151d438c6 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-11 15:25:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-11 15:25:41 +0000 sound tests: Actually fix format strings Fixes: eb95b990f8eb ("sound tests: Fix format specified for kevent.data") --- tests/sys/sound/polling.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/sys/sound/polling.c b/tests/sys/sound/polling.c index a2cecb47a27c..b7a328d13d4c 100644 --- a/tests/sys/sound/polling.c +++ b/tests/sys/sound/polling.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -93,7 +94,7 @@ ATF_TC_BODY(poll_kqueue, tc) ATF_REQUIRE_MSG(kevent(kq, NULL, 0, &ev, 1, NULL) == 1, FMT_ERR("kevent")); ATF_REQUIRE_MSG((ev.flags & EV_ERROR) == 0, "EV_ERROR is set"); - ATF_REQUIRE_MSG(ev.data != 0, "data is %lld", ev.data); + ATF_REQUIRE_MSG(ev.data != 0, "data is %" PRId64, ev.data); ATF_REQUIRE_MSG(read(fd, buf, sizeof(buf)) > 0, FMT_ERR("read")); EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, 0); @@ -108,7 +109,7 @@ ATF_TC_BODY(poll_kqueue, tc) ATF_REQUIRE_MSG(kevent(kq, NULL, 0, &ev, 1, NULL) == 1, FMT_ERR("kevent")); ATF_REQUIRE_MSG((ev.flags & EV_ERROR) == 0, "EV_ERROR is set"); - ATF_REQUIRE_MSG(ev.data != 0, "data is %lld", ev.data); + ATF_REQUIRE_MSG(ev.data != 0, "data is %" PRId64, ev.data); ATF_REQUIRE_MSG(write(fd, buf, sizeof(buf)) > 0, FMT_ERR("write")); EV_SET(&ev, fd, EVFILT_WRITE, EV_DELETE, 0, 0, 0); From nobody Tue Nov 11 15:40:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5W2m2nyWz6Gch5 for ; Tue, 11 Nov 2025 15:40:48 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (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 4d5W2l5WTDz3TJv for ; Tue, 11 Nov 2025 15:40:47 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-io1-xd34.google.com with SMTP id ca18e2360f4ac-94880628ffaso24420239f.0 for ; Tue, 11 Nov 2025 07:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1762875645; x=1763480445; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=0h7GHGnhRsHBxSIc9M1T+vNlb33clJw5Cejnatc0obE=; b=jQkwHTqejASh3d0f4NyrKTtlwUNT+qML7JFkLMMf4GV8JGeu9ymob7VtvF93L1zo0w odpYpRbB6z1HDPJA2JA9ee9Jw+8Hiqm3Gp/s8korER6zt6gxOj2AcKzfBjjxyJorziug pnXhL7POrIHa75oPXqBXcGugnJUsQyZHgUiyr6TxlMfuFLHrwUNrDHZkKGn7cTATLb75 oywwt5UvVrlbq79EAdLUCoU5OPAec4nbmifSG+qIqlB0jhXvoblg3TIJl7skA5SBuxA2 HHgoGlYRq0U17F2fRd51P0YCKFMEq8D7JzKndVlfTrd6x0k3Qn/lzcutfb0qdY4hpTK6 B+zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762875645; x=1763480445; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0h7GHGnhRsHBxSIc9M1T+vNlb33clJw5Cejnatc0obE=; b=WSh/+Z+cG2Flf0rWQS8lqw3L+3RWphmsSAotCLLjs+6/7o0gVW/Z2L3jskzhcs6AP7 zx+1pFw6IAKDxXfncAca2830NORwSIoJVo/S0i0Ry5JPVR8cJ9uhUcIysdDTMb0WY512 v36apkHVwNCZurOjlflSPMhIm+cJAHGpwHjttTHIe/mSa6b6ge2ZxwECvPaGNpmFSTn6 fW6KKFN7XLZCW8EUa7hmXsFNRby1mc/ogiuZ+eTK/WXnex3k41hL+c4HMAzhRnDObQAI pptXOlmOuyQjcEPPhz6cAVzZHdW+Gcerlp5ROEzTrOfnPdvcNfD2RgprLpUE11mEXY8R 3GoQ== X-Forwarded-Encrypted: i=1; AJvYcCUXMlm18FyqJU1QKZZ8/EkYvxeobuzxtbO6645Py+gQl/Fh6g+bwK68F+9JKWo82ndvBZjd53e/XcvkIBdKXikSNeiTeA==@freebsd.org X-Gm-Message-State: AOJu0YxvEpx9Mkvv9oJdCeEGVL8Muk3ixvj4Yd2fhjt3DlRAeyqGDpM2 1qPiYLsMdCNwraHtdTy6GEVmSN0GDR+XkLxUom9dGOAIlh8iDhaUASmtPDLt4HQsrUE= X-Gm-Gg: ASbGncttn6ktSozGgQ06ioA3xaQShCNN3TLSZ4RkeKUTH30OzHnjwv1vb+WS6zIdjTu KJ0LEdJLvVTDPsnBL073m4jrvniywma5/0vJHpySj6uC+flolq1Lg2S0dKAp/kVHi0WPknJvR/7 C+jwn9yHmO3icFu75NHcQ1ogdsW5AHLX8CyOP3zukMFkCETQf3Wes1PPhsRmP57mSxfWta2pGyx rTXAi4axMUsorxjLMktqy7rqANBY80bX2wuK3qU4OWB3v4FAU4EapbxDTupJnavb1TUv9+BTL8R cHeK9C8Gt1mF/34W4HyAXrTKSZ3/c6+9S/mazgK+uaYcoIA27ZQxe1uLo94xQGyugrq9I5jVXBx EiFHnLzGaVseWZdz+BRyw8prjMY7fO/hyFqmiMqj9BRZyfZc2lsmkwPYLjg== X-Google-Smtp-Source: AGHT+IEpLmOCwdDws22GEwiyZRmvq4RFfppUedplpC6Gq/jrFFYwj126F1gO2SKRfASapVOrUWjyTQ== X-Received: by 2002:a92:ca8b:0:b0:433:7508:6a0d with SMTP id e9e14a558f8ab-4338bd8dc74mr41618995ab.0.1762875644717; Tue, 11 Nov 2025 07:40:44 -0800 (PST) Received: from mutt-hbsd ([2001:470:4001:1::95]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-5b7aaf59fb0sm6426173.13.2025.11.11.07.40.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Nov 2025 07:40:44 -0800 (PST) Date: Tue, 11 Nov 2025 15:40:43 +0000 From: Shawn Webb To: "David E. O'Brien" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f1b9c1aafd84 - main - random: git'o in RANDOM_ENABLE_TPM Message-ID: X-Operating-System: FreeBSD mutt-hbsd 14.3-STABLE-HBSD FreeBSD 14.3-STABLE-HBSD HARDENEDBSD-14-STABLE amd64 X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202511110246.5AB2kdQc077401@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sltrz4ndl67lnkqu" Content-Disposition: inline In-Reply-To: <202511110246.5AB2kdQc077401@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4d5W2l5WTDz3TJv --sltrz4ndl67lnkqu Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: git: f1b9c1aafd84 - main - random: git'o in RANDOM_ENABLE_TPM MIME-Version: 1.0 On Tue, Nov 11, 2025 at 02:46:39AM +0000, David E. O'Brien wrote: > The branch main has been updated by obrien: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3Df1b9c1aafd8496c5bfdbc2be57= bcfecfe58f12a8 >=20 > commit f1b9c1aafd8496c5bfdbc2be57bcfecfe58f12a8 > Author: David E. O'Brien > AuthorDate: 2025-11-11 02:37:28 +0000 > Commit: David E. O'Brien > CommitDate: 2025-11-11 02:46:31 +0000 >=20 > random: git'o in RANDOM_ENABLE_TPM > =20 > Fixes: 3deb21f1a > --- > sys/dev/tpm/tpm20.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/sys/dev/tpm/tpm20.h b/sys/dev/tpm/tpm20.h > index 7c2ccd30143a..b2cfcd4f25bd 100644 > --- a/sys/dev/tpm/tpm20.h > +++ b/sys/dev/tpm/tpm20.h > @@ -128,7 +128,7 @@ struct tpm_sc { > lwpid_t owner_tid; > =20 > struct callout discard_buffer_callout; > -#ifdef TPM_HARVEST > +#if defined TPM_HARVEST || defined RANDOM_ENABLE_TPM All the examples that use `#if defined...` in the style(9) manual page show using parenthesis, though I'm not sure that equates to a style(9) rule. It seems awkward here not to use parenthesis when they are used (nearly?) everywhere else. Is this something that warrants clarification in style(9)? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Signal Username: shawn_webb.74 Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --sltrz4ndl67lnkqu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmkTWPQACgkQ/y5nonf4 4fpLgBAAoPcgYjx4Mq3t65bZiBseX/6usXXUcV+jxuGl0RajyEiMfb7d4AA2od4H gKQgUUCXdr6xZLf0Lj5bCbLhp7U58rN+jbqKNg/EZr9EgZVIenVQG/9F3M0Xwr7w 9Ut+7apldvDF73WEY9YVDtr80EPSVBcIPUqnZG6nrzEa+T1AT1mLamumUvyzK63D pX3vXB5tulFZ7xC2uRGguKNzGtYwZHRnT7schGR+utLlOdEUVb+Q4BWIsH59k7yN iQaBZxyUm55vdGuxSM0jawAKtAPKjgbyvMPXuvm9+x19n7r4gM6gJF1MZfODaAy/ N5Qhf+v9qb3RpUzsnAhl4auJ4F2x68OhXZ8ErHCIsW/2hawnPY0orfvAgliKobuL Y/xnC/fPaYq/u2SnLRQLfh3Hws8igV8nCr6DNsPSpcTYk/foeMaIyP1hwQdaziPN 5bdGpzvOq0KozBC64wZa9agfTiN6GZKx/S9JAnnUdiJG+CC/K+ri8LnTNMnNqTEt v03TsdtJypumhsrBQkbKM8/T7KmLdJ9vyV6XcN8KuP94f3cjhRtmRMbgrMAMPn7t nxxlHLXk+MyjbzrX6BF0A++HHjvU3JQUy57wG6Jbfh26Bylt2hY+WFi5A717CmFC gZGVHiUagIwoYHjs33W4pYvzHvSIfwQFRp/wAdGezojEaKQSZWs= =Srti -----END PGP SIGNATURE----- --sltrz4ndl67lnkqu-- From nobody Tue Nov 11 16:06:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5Wcj3dwgz6Gdj3; Tue, 11 Nov 2025 16:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5Wcj1Ykmz3XrR; Tue, 11 Nov 2025 16:06:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762877205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=84VE8xuzQMwl6k1IopACdv3+F+U3HKyuZprM/2Er0ZI=; b=MR1vd3vE9ZPaTegjZUx1NVnpKapUKnLZ/Bhg2Q7lvkmpbykEuVT2xzeg+ZUjf+NhbheGnV xPEA3SweHuKCDFN6Ix9E3h2yYWk/BCJ0w+nZd+BtmLEUrvEnsGGeaEu64GbSj4VMxydPF2 J0TNEvET/LhFHd03/laXBnpIUBBChCIr7dkwjiR+TbRDTJ5roAuY0Dl3V7OlvkboPHs+2h Q87swTVqetTIebcHR4BgJkSzSqrp5AOyDIe29AdWObuiYgRgHLypus7KWEDLZCmAKWseV4 3Hoyumhd25wUzZgrxQmzPcvWHt3Ixqb0ry619xLNtcT/gjfH+HgiHIZ4bn3LTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762877205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=84VE8xuzQMwl6k1IopACdv3+F+U3HKyuZprM/2Er0ZI=; b=DS6CMsOr0R7yjrXlDNuBoKAu1+hZODEt+VAOsTFrWSYjYG29nzsQ9qS4c/hy2+jus4HCuh AbvmH+6tsylU588vt3OuqcN4aW7Ap7auwL1Elpm/1L6eLuVZk1ZNDIFRqrDG3tp7DSQ7H6 9E3IR0gMcDIvMcwgN0VrnuDpIKDS0QvF1v1MsS8bBShgHvQswJ5EuvxvJmWCOZrhCxCyCA nIyUbKLILAgKCBNEgyiCwQUFsjVaweaeyrl/6t4lwcr2FWqi0CwUnYAWz7LuTygdl5ICka UdW42/LRgx2zUhn64BQzUzro9dw1ACp3X4dpeJ/51A7P5Br2LIzwk7BPMm8VXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762877205; a=rsa-sha256; cv=none; b=Pe+wcAIwSvpzDhelAZDe4ymbL49vl2BdJVzb35CY3Ni4H8KpqHDYfq+SmQv9NQIedMphk0 sGVKZ04/FljPnVMINkb5gF0OvjbekH/Hh5Ibvd4cfn9AZ9unCWnyqdkNDpjG7GXmOAzNOT ZxQyF96xBh4nsVqBcWqjM9Qp/KdFZ063XuEQdMOGcpItwrvm2oI3yRB7dznGvl7ORTvIHQ Vh/rxmb/mcyARTSkOAtzPtaBYEolbjuii1QIz8aNimOMawM2YkMllq/cRcNQLEPr6lQh5h 5Dy6GxHJK8vGfguboZ1pIJ6GcS1F/0Uv7qJPinkuvQESWJgjqyD0tVjl4WOaJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5Wcj0tXZz19mt; Tue, 11 Nov 2025 16:06: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 5ABG6iV4088408; Tue, 11 Nov 2025 16:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABG6iiD088405; Tue, 11 Nov 2025 16:06:44 GMT (envelope-from git) Date: Tue, 11 Nov 2025 16:06:44 GMT Message-Id: <202511111606.5ABG6iiD088405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: c5f7cb19f527 - main - iwx: migrate to using net80211 crypto key methods List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5f7cb19f527eb845660c98feb4e5e3cbf05dce5 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=c5f7cb19f527eb845660c98feb4e5e3cbf05dce5 commit c5f7cb19f527eb845660c98feb4e5e3cbf05dce5 Author: Adrian Chadd AuthorDate: 2025-09-12 23:11:36 +0000 Commit: Adrian Chadd CommitDate: 2025-11-11 16:05:41 +0000 iwx: migrate to using net80211 crypto key methods In preparation for further MFP key work, migrate iwx away from using IEEE80211_KEY_GROUP and pointer arithmetic. This is a hold over from ye olde days. Locally tested: * (STA mode, CCMP/CCMP network) * iwx0: mem 0x84c00000-0x84c03fff at device 0.0 on pci4 Differential Revision: https://reviews.freebsd.org/D52523 --- sys/dev/iwx/if_iwx.c | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 04ed09f04604..eb5b4a42e616 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -10942,23 +10942,15 @@ iwx_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, if (k->wk_cipher->ic_cipher == IEEE80211_CIPHER_AES_CCM) { return 1; } - if (!(&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { - /* - * Not in the global key table, the driver should handle this - * by allocating a slot in the h/w key table/cache. In - * lieu of that return key slot 0 for any unicast key - * request. We disallow the request if this is a group key. - * This default policy does the right thing for legacy hardware - * with a 4 key table. It also handles devices that pass - * packets through untouched when marked with the WEP bit - * and key index 0. - */ - if (k->wk_flags & IEEE80211_KEY_GROUP) - return 0; + + if (ieee80211_is_key_unicast(vap, k)) { *keyix = 0; /* NB: use key index 0 for ucast key */ - } else { + } else if (ieee80211_is_key_global(vap, k)) { *keyix = ieee80211_crypto_get_key_wepidx(vap, k); + } else { + net80211_vap_printf(vap, "%s: invalid crypto key type\n", + __func__); + return (0); } *rxkeyix = IEEE80211_KEYIX_NONE; /* XXX maybe *keyix? */ return 1; @@ -10978,7 +10970,6 @@ iwx_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) return 1; } - IWX_LOCK(sc); /* * Keys are stored in 'ni' so 'k' is valid if 'ni' is valid. * Currently we only implement station mode where 'ni' is always @@ -10987,26 +10978,33 @@ iwx_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) memset(&cmd, 0, sizeof(cmd)); - if (k->wk_flags & IEEE80211_KEY_GROUP) { + if (ieee80211_is_key_global(vap, k)) { + id = ieee80211_crypto_get_key_wepidx(vap, k); DPRINTF(("%s: adding group key\n", __func__)); - } else { + } else if (ieee80211_is_key_unicast(vap, k)) { DPRINTF(("%s: adding key\n", __func__)); + id = 0; /* net80211 currently only supports unicast key 0 */ + } else { + net80211_vap_printf(vap, "%s: unknown key type\n", __func__); + return (ENXIO); } - if (k >= &vap->iv_nw_keys[0] && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) - id = (k - vap->iv_nw_keys); - else - id = (0); + + IWX_LOCK(sc); + DPRINTF(("%s: setting keyid=%i\n", __func__, id)); cmd.common.key_flags = htole16(IWX_STA_KEY_FLG_CCM | IWX_STA_KEY_FLG_WEP_KEY_MAP | ((id << IWX_STA_KEY_FLG_KEYID_POS) & IWX_STA_KEY_FLG_KEYID_MSK)); - if (k->wk_flags & IEEE80211_KEY_GROUP) { + if (ieee80211_is_key_global(vap, k)) { cmd.common.key_offset = 1; cmd.common.key_flags |= htole16(IWX_STA_KEY_MULTICAST); - } else { + } else if (ieee80211_is_key_unicast(vap, k)) { cmd.common.key_offset = 0; + } else { + net80211_vap_printf(vap, "%s: unknown key type\n", __func__); + IWX_UNLOCK(sc); + return (ENXIO); } memcpy(cmd.common.key, k->wk_key, MIN(sizeof(cmd.common.key), k->wk_keylen)); From nobody Tue Nov 11 16:06:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5Wck44nnz6Gf0y; Tue, 11 Nov 2025 16:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5Wck2DY8z3Xls; Tue, 11 Nov 2025 16:06:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762877206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=075QlQQWYoUjCiwfeUej9jpdeifhdMRBgpCUHJV51Lo=; b=w440heJtdu9dxRKvkILaX3Ir6SRKD3JfURFo9w9hfiyNDsw658IY3V9huGlmlHSbKzjPbY q3u/F0E2PyQbLa48DtUMkfI8/7+iLl8qylqrKoI8i6OBQT/YzwHirYHZQoGlTaclNwgwOr FutWzvNR2kJim3bdxC4ZJheOIaIM0KuRkTl9bm5P76qRF+tCueBqS/5SvEb4pX9vCewe3S ogkrdzan3YdAIYxJvSRtu/GGfEwn/+SlvKa660SaK6dxQu48Ce5Qntx+b+bVFVPuBFU13K Ngh91c09mAq34aY1lSFAHMJw7VVEj2OtfL6SUD+aBUR/VmsV3/FQWbVMOPN3gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762877206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=075QlQQWYoUjCiwfeUej9jpdeifhdMRBgpCUHJV51Lo=; b=jrjCEx7NefIqA41R1DzBjUALnUpNY9UJugLd9VsH71mn45RgXR3tjRQRf2OkUbC6WjQlvF RdRIhOEKQEi7oSLvH7lOw9Qah6h3LWex4GUgpRUxYQMvob44k2WECBIFPWS545rtyuFCe5 vjetbp3s8gdRAWbdG8M15hzzZTYrTfbZA5A5CpKeD7b3di/o0lpIDpE56dcMXjpBRn4/ec hYCUZzt27opBML/nE3EB3Lfbczr6luXm9hnIHNU4Yfyrtk2GD8T+U3X6Pz0A02Jb78IyEn N0qBUTFnoE4Z24Pqnv9Uq9k0Cd0KLzcfqdBJbZivT5iI9L10AjCZnOKHNo10dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762877206; a=rsa-sha256; cv=none; b=eUj8iTWmnk1o/FMMQTByqeD3IkWbIB2ORBkLJ5cntTgoz9xetVOOYdKV6GooiUQUaMfnH9 4BTkfoR9YNM8MM2EoAxrzEf+VrUujeZ7gkVtpZLe7PeiWH7grondEN0AOBkbVuOd4WtuWG 9OuRAobbZ+qU+t19Rj5Fql6sp2wcsj3PyWtOWokbgNfy6RlspnHDteY1UssfP02YnTrLBc 5OH42DjND+sxc3NczraoVtTbrJ+2Kg+t1zE29j7W/RkhK7/4LTCFnvGFq55Hblp8d3vNBg iiA7aZTmy1YHDWoRAngQO8UR74ncLGgi+U3TaRCAVj2zOYTy0nXA/08rAt8Vbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5Wck1XyRz19kT; Tue, 11 Nov 2025 16:06: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 5ABG6kWB088442; Tue, 11 Nov 2025 16:06:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABG6kMe088439; Tue, 11 Nov 2025 16:06:46 GMT (envelope-from git) Date: Tue, 11 Nov 2025 16:06:46 GMT Message-Id: <202511111606.5ABG6kMe088439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 77b1e4f32f31 - main - net80211: create accessors for accessing the ieee80211_key key/mic data List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77b1e4f32f31b219c238c81b726d079a003b465c Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=77b1e4f32f31b219c238c81b726d079a003b465c commit 77b1e4f32f31b219c238c81b726d079a003b465c Author: Adrian Chadd AuthorDate: 2025-09-24 15:30:47 +0000 Commit: Adrian Chadd CommitDate: 2025-11-11 16:06:29 +0000 net80211: create accessors for accessing the ieee80211_key key/mic data Add some accessors to the key data, key length and MIC data. Document exactly what these mean. There's at least a couple of drivers that access the key data field directly and assume that the TX/RX MIC is available directly after the data pointer, which bakes in the "key size is 128 bits" in subtle ways. The goal here is to migrate the drivers and net80211 code to use these methods rather than accessing wk_key directly and making assumptions about wk_key and the copied key length (which the ioctl path definitely does.) Once that's done, it should be a lot easier to change the key API for larger keys. Differential Revision: https://reviews.freebsd.org/D52711 Reviewed by: thj --- sys/net80211/ieee80211_crypto.h | 105 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/sys/net80211/ieee80211_crypto.h b/sys/net80211/ieee80211_crypto.h index 89b8b4f9daa4..48115da586b5 100644 --- a/sys/net80211/ieee80211_crypto.h +++ b/sys/net80211/ieee80211_crypto.h @@ -94,6 +94,7 @@ struct ieee80211_key { ieee80211_keyix wk_keyix; /* h/w key index */ ieee80211_keyix wk_rxkeyix; /* optional h/w rx key index */ + /* TODO: deprecate direct access to wk_key, wk_txmic, wk_rxmic */ uint8_t wk_key[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE]; #define wk_txmic wk_key+IEEE80211_KEYBUF_SIZE+0 /* XXX can't () right */ #define wk_rxmic wk_key+IEEE80211_KEYBUF_SIZE+8 /* XXX can't () right */ @@ -300,5 +301,109 @@ void ieee80211_notify_michael_failure(struct ieee80211vap *, uint16_t ieee80211_crypto_init_aad(const struct ieee80211_frame *, uint8_t *, int); +/** + * @brief Return the key data. + * + * This returns a pointer to the key data. Note it does not + * guarantee the TX/RX MIC will be immediately after the key. + * Callers must use ieee80211_crypto_get_key_txmic_data() + * and ieee80211_crypto_get_key_rxmic_data() for that. + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns NULL if no key data is available, or a pointer + * to the key data. + */ +static inline const uint8_t * +ieee80211_crypto_get_key_data(const struct ieee80211_key *k) +{ + return (k->wk_key); +} + +/** + * @brief Return the key length in bytes. + * + * This doesn't include any TX/RX MIC (eg from TKIP). + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns the key length (without any MIC) in bytes + */ +static inline const uint16_t +ieee80211_crypto_get_key_len(const struct ieee80211_key *k) +{ + return (k->wk_keylen); +} + +/** + * @brief Return the TX MIC data. + * + * This returns a pointer to the TX MIC data. + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns NULL if no key data is available, or a pointer + * to the TX MIC data. + */ +static inline const uint8_t * +ieee80211_crypto_get_key_txmic_data(const struct ieee80211_key *k) +{ + return (k->wk_txmic); +} + +/** + * @brief Return the TX MIC length in bytes. + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns the TX MIC length in bytes + */ +static inline const uint16_t +ieee80211_crypto_get_key_txmic_len(const struct ieee80211_key *k) +{ + return (k->wk_cipher->ic_miclen); +} + +/** + * @brief Return the RX MIC data. + * + * This returns a pointer to the RX MIC data. + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns NULL if no key data is available, or a pointer + * to the RX MIC data. + */ +static inline const uint8_t * +ieee80211_crypto_get_key_rxmic_data(const struct ieee80211_key *k) +{ + return (k->wk_rxmic); +} + +/** + * @brief Return the RX MIC length in bytes. + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns the RX MIC length in bytes + */ +static inline const uint16_t +ieee80211_crypto_get_key_rxmic_len(const struct ieee80211_key *k) +{ + return (k->wk_cipher->ic_miclen); +} + #endif /* defined(__KERNEL__) || defined(_KERNEL) */ #endif /* _NET80211_IEEE80211_CRYPTO_H_ */ From nobody Tue Nov 11 16:07:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5Wdn2lDMz6GfPk; Tue, 11 Nov 2025 16:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5Wdn1zzmz3Yjj; Tue, 11 Nov 2025 16:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762877261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F9Vgeu6e+PSEK12x0kRQt8ondOFhb9lKzWY+6wEq7Dg=; b=l/HpXWOOToCtpIiQx4xr9o2jxqStTBeEGIHOYfkcXep97oNjfqx+6UIREm/fg+60vqv4jW d6WfgvBdl3XGyBmHSChb4I+O8kg/ZDJjS+3StoQM6qYc4yyYyr5YwPycWylwMLdlPoqkZc N/E14vukqIRCnPybsKutcUuYmR5dFcm3zxvc4lYUfoBR6/+aYDWm2EStrbytJw/5zKh/Ex 9/+LYkuZVgfKMpmq8FLEqF0SdfSzZ98RFiKoJjTxzYeb0nG/h/cBJZg+uOaYsQsB0NK+vD Sm68DzSlXRdPcVlmYllEo0415MrcZSWufs+mADOUZF32Dgs2BY6BXY0J6ZkMsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762877261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F9Vgeu6e+PSEK12x0kRQt8ondOFhb9lKzWY+6wEq7Dg=; b=gl+rlOIQNBoDO7vT00DWiAUlcTZ+TrgH5kjHy3ykqXSAkvIW3I13BVqsvlR//v7J83yFR8 2olgAkiuXpF/RbfTxrfl677qKRH5W5ChC177xV317r2PUZarzdBoZnfSeocThAuv0cJRO5 FeY46vfI7ZUZ5HcU4OkCSUzxD6A9J+M8bfWV/72yIP/+HWP/LS0y7DDge7hpvDRZzqQ9cd v+/zThkp24BCT8kM27Ph5MIo5YeYTfiEl7NmvQCpaIgN02qDy22Oc6ZhhCgfr8HcCiYybw /xHhPFm2djz/KBrN8AbIL2XE9lTLEoDZarbUKY7syPEJL8sGy4U0EMBy3j3dpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762877261; a=rsa-sha256; cv=none; b=Dpci213l1Hsv2nSbqQIugwDPIXYjYAqzFy/XL2khcDMFpsUBgvwVIbWJW+bRmll5LNkkTt x7Sc361i68mZime8iq/LbVXiHWBivbCb1/DZcqaI+/S1/299BqzzwBVfKlYhjSQrH4nlbB qsoKLnz0V8ZK8xhGaS9I/63FHck4EaCC4Ut7OiHwhc7MHIa6g4csEQuENrhSc3HagGjOlH XRT0CKONOuBsnnIPZV8Fs0YVlEBZUNYFZxPHb5qxMwwREKhxCzs9AjS+a3BlpCJvONzIAc 19nA/eWYpvmi1vqAY4rP4jcBU6miqaaX8n99xNuCzhh7C8PX3wMHBIiVS5d+KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5Wdn1R6Zz19vM; Tue, 11 Nov 2025 16:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5ABG7f6F088848; Tue, 11 Nov 2025 16:07:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABG7flM088845; Tue, 11 Nov 2025 16:07:41 GMT (envelope-from git) Date: Tue, 11 Nov 2025 16:07:41 GMT Message-Id: <202511111607.5ABG7flM088845@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: d01183fddf37 - main - geom/zero: Add support for unmapped I/O List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: d01183fddf37b15da7ab3d69039e7759ae144451 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=d01183fddf37b15da7ab3d69039e7759ae144451 commit d01183fddf37b15da7ab3d69039e7759ae144451 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2025-09-26 07:08:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2025-11-11 16:06:59 +0000 geom/zero: Add support for unmapped I/O This patch adds support for unmapped I/O to gzero(4). Let's consider the following script to illustrate the change in gzero(4)'s behavior: ``` dd="dd if=/dev/gzero of=/dev/null bs=512 count=100000" dtrace -q -c "$dd" -n ' fbt::pmap_qenter:entry, fbt::uiomove_fromphys:entry, fbt::memset:entry /execname == "dd"/ { @[probefunc] = count(); } ' ``` Let's run that script 4 times: ``` ==> 1: unmapped I/O not supported (fallback to mapped I/O), kern.geom.zero.clear=1 51200000 bytes transferred in 1.795809 secs (28510829 bytes/sec) pmap_qenter 100000 memset 400011 ==> 2: unmapped I/O not supported (fallback to mapped I/O), kern.geom.zero.clear=0 51200000 bytes transferred in 0.701079 secs (73030337 bytes/sec) memset 300011 ==> 3: unmapped I/O supported, kern.geom.zero.clear=1 51200000 bytes transferred in 0.771680 secs (66348750 bytes/sec) uiomove_fromphys 100000 memset 300011 ==> 4: unmapped I/O supported, kern.geom.zero.clear=0 51200000 bytes transferred in 0.621303 secs (82407407 bytes/sec) memset 300011 ``` If kern.geom.zero.clear=0, then nothing really changes as no copying takes place. Otherwise, we see by adding unmapped I/O support we avoid calls to pmap_qenter(), which was called by GEOM to turn unmapped I/O requests into mapped ones before passing them for processing to gzero(4). Reviewed by: bnovkov, markj Approved by: bnovkov (mentor), markj (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52998 --- sys/geom/zero/g_zero.c | 82 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 63 insertions(+), 19 deletions(-) diff --git a/sys/geom/zero/g_zero.c b/sys/geom/zero/g_zero.c index 7952147d660a..25d462a9f918 100644 --- a/sys/geom/zero/g_zero.c +++ b/sys/geom/zero/g_zero.c @@ -3,6 +3,7 @@ * * Copyright (c) 2005 Pawel Jakub Dawidek * All rights reserved. + * Copyright (c) 2025 Mateusz Piotrowski <0mp@FreeBSD.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,53 +35,97 @@ #include #include #include +#include +#include #include #define G_ZERO_CLASS_NAME "ZERO" -static int g_zero_clear_sysctl(SYSCTL_HANDLER_ARGS); +static int g_zero_byte_sysctl(SYSCTL_HANDLER_ARGS); SYSCTL_DECL(_kern_geom); static SYSCTL_NODE(_kern_geom, OID_AUTO, zero, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "GEOM_ZERO stuff"); static int g_zero_clear = 1; -SYSCTL_PROC(_kern_geom_zero, OID_AUTO, clear, - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &g_zero_clear, 0, - g_zero_clear_sysctl, "I", +SYSCTL_INT(_kern_geom_zero, OID_AUTO, clear, + CTLFLAG_RWTUN, &g_zero_clear, 0, "Clear read data buffer"); static int g_zero_byte = 0; -SYSCTL_INT(_kern_geom_zero, OID_AUTO, byte, CTLFLAG_RWTUN, &g_zero_byte, 0, +static uint8_t g_zero_buffer[PAGE_SIZE]; +SYSCTL_PROC(_kern_geom_zero, OID_AUTO, byte, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &g_zero_byte, 0, + g_zero_byte_sysctl, "I", "Byte (octet) value to clear the buffers with"); static struct g_provider *gpp; static int -g_zero_clear_sysctl(SYSCTL_HANDLER_ARGS) +g_zero_byte_sysctl(SYSCTL_HANDLER_ARGS) { int error; - error = sysctl_handle_int(oidp, &g_zero_clear, 0, req); + // XXX: Confirm that this is called on module load as well. + // XXX: Shouldn't we lock here to avoid changing the byte value if the + // driver is in the process of handling I/O? + error = sysctl_handle_int(oidp, &g_zero_byte, 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (gpp == NULL) - return (ENXIO); - if (g_zero_clear) - gpp->flags &= ~G_PF_ACCEPT_UNMAPPED; - else - gpp->flags |= G_PF_ACCEPT_UNMAPPED; + memset(g_zero_buffer, g_zero_byte, PAGE_SIZE); return (0); } +static void +g_zero_fill_pages(struct bio *bp) +{ + struct iovec aiovec; + struct uio auio; + size_t length; + vm_offset_t offset; + + aiovec.iov_base = g_zero_buffer; + aiovec.iov_len = PAGE_SIZE; + auio.uio_iov = &aiovec; + auio.uio_iovcnt = 1; + auio.uio_offset = 0; + auio.uio_segflg = UIO_SYSSPACE; + auio.uio_rw = UIO_WRITE; + auio.uio_td = curthread; + + /* + * To handle the unmapped I/O request, we need to fill the pages in the + * bp->bio_ma array with the g_zero_byte value. However, instead of + * setting every byte individually, we use uiomove_fromphys() to fill a + * page at a time with g_zero_buffer. + */ + bp->bio_resid = bp->bio_length; + offset = bp->bio_ma_offset & PAGE_MASK; + for (int i = 0; i < bp->bio_ma_n && bp->bio_resid > 0; i++) { + length = MIN(PAGE_SIZE - offset, bp->bio_resid); + auio.uio_resid = length; + + (void)uiomove_fromphys(&bp->bio_ma[i], offset, length, &auio); + + offset = 0; + bp->bio_resid -= length; + } +} + + static void g_zero_start(struct bio *bp) { - int error = ENXIO; + int error; switch (bp->bio_cmd) { case BIO_READ: - if (g_zero_clear && (bp->bio_flags & BIO_UNMAPPED) == 0) - memset(bp->bio_data, g_zero_byte, bp->bio_length); + if (g_zero_clear) { + if ((bp->bio_flags & BIO_UNMAPPED) != 0) + g_zero_fill_pages(bp); + else + memset(bp->bio_data, g_zero_byte, + bp->bio_length); + } /* FALLTHROUGH */ case BIO_DELETE: case BIO_WRITE: @@ -106,9 +151,8 @@ g_zero_init(struct g_class *mp) gp->start = g_zero_start; gp->access = g_std_access; gpp = pp = g_new_providerf(gp, "%s", gp->name); - pp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; - if (!g_zero_clear) - pp->flags |= G_PF_ACCEPT_UNMAPPED; + pp->flags |= G_PF_ACCEPT_UNMAPPED | G_PF_DIRECT_SEND | + G_PF_DIRECT_RECEIVE; pp->mediasize = 1152921504606846976LLU; pp->sectorsize = 512; g_error_provider(pp, 0); From nobody Tue Nov 11 17:00:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5Xq93ClJz6GjcV; Tue, 11 Nov 2025 17:00: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5Xq92XjLz3m0W; Tue, 11 Nov 2025 17:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762880453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vR5i8bsSyN0eB0i1hxzx71o2YgQhsj0vKwPHeUroRg4=; b=hS1d5/MDs/Xfd2+eF69TQ74QysBdbMjAaXQXbvMPWYufgJ3rBjmKBC7nHg7W3io+i+XzdR sdxD1zILlBbYzpFA+vKBsXWB8g56NS8uYwAiAqGZw0k4dyOqWE3LubdrwuG+UxBa2qRP1B b5FsiGIcrn+gnmxud2PrGnOrBos7+gZT7GwUNiYM+JCuONTDQ64zJJUM9J2t07FTOnz0gt dZux2HR9sJycOTRvfT2s8r1SGfZeG7/9X1sy7bmQIPa/3kWR5I/Bk4OIZHfxK/HNpmF8Xo b+HITke80pIzNkR2qh4d+cMB8cZOkWLtaUP5XyUV4mbKFLndhezDtKahTmxlyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762880453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vR5i8bsSyN0eB0i1hxzx71o2YgQhsj0vKwPHeUroRg4=; b=kKTxXPuPk01Ziml0cO+Li/TOnmGOXaTqRsc7eIJKSQI9QCLJMeZycrepC/InVWak8QmZWd tTrjH2OMK+Ma5pTZYeb5X7YWc9IIEL5l08/tzIpsHVDIle21Atzwzn2lx29f/U4fPL5rTw 5tmj9adFdCB34pxqRQg04PTpB/4IWba0HZ0qIdWZGD+uTVoURxuzPHBHiItapnQADgtpma udQPv3P7fD1zWjt96ePgFIqZMIImeKMcveuDq9lr6XTTH6HBPo6j2TSbOpDcnI8Fq/KqKO MzP9L6XKyn3PEbvsmJD31TWzdQKdjxCi1AlnTF9L8ZJRlllyMjaDTl2t7V21zQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762880453; a=rsa-sha256; cv=none; b=mrXEfB9tC2U/PhLKXdI5e8Z/8kTJcUwTvTEBHDduolcwDzeS+0M2WsdFQNrFPBnFqZiysy TJSUs+eMBxKYJL7VnFYtolU4a3y4oNal0/HF320Vit62IzHSpiwPlYiKyOEs5gW7k/4FyH x1HLZuu7H4hpfTv3XqH6jstWoxTrXdVkOUhTc8y5wY7A68NRrUFmdiDWLoKxaU9/XCfpnQ Rii67A2YRhcVR3H8XD6m8TdYyKoaazPRF0HKmWdTB/bwztCHxwcUSkfIhZaUrUnY4LQs1J SfdXmbP7tBr4ueJFeP7zzD3pT94FX0rds5kIhXP8xjeMTNkfO8fo+XEX8LDnMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5Xq925mGz1Bmh; Tue, 11 Nov 2025 17:00: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 5ABH0rDB092201; Tue, 11 Nov 2025 17:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABH0rR0092198; Tue, 11 Nov 2025 17:00:53 GMT (envelope-from git) Date: Tue, 11 Nov 2025 17:00:53 GMT Message-Id: <202511111700.5ABH0rR0092198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: c9e4643da132 - main - iflib: remove transmit prefetching List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9e4643da132c50f082a474c540108d7afee2d18 Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=c9e4643da132c50f082a474c540108d7afee2d18 commit c9e4643da132c50f082a474c540108d7afee2d18 Author: Andrew Gallatin AuthorDate: 2025-11-11 16:46:28 +0000 Commit: Andrew Gallatin CommitDate: 2025-11-11 16:56:54 +0000 iflib: remove transmit prefetching Remove prefetching from the transmit path of iflib in the interest of increased performance and reduced complexity. Details regarding the performance penalties of prefetching can be found in the differential review. Note this prefetching was only done on link speeds of 10Gb/s and above, so the change is a no-op (or perhaps slight performance improvement simply due to the code simplification) for slower interfaces. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D53674 Reviewed by: kbowling, markj, mjg --- sys/net/iflib.c | 46 ++-------------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index d2625da19cd2..ad2be119da7c 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -3449,25 +3449,6 @@ iflib_remove_mbuf(iflib_txq_t txq) return (m); } -static inline caddr_t -calc_next_txd(iflib_txq_t txq, int cidx, uint8_t qid) -{ - qidx_t size; - int ntxd; - caddr_t start, end, cur, next; - - ntxd = txq->ift_size; - size = txq->ift_txd_size[qid]; - start = txq->ift_ifdi[qid].idi_vaddr; - - if (__predict_false(size == 0)) - return (start); - cur = start + size * cidx; - end = start + size * ntxd; - next = CACHE_PTR_NEXT(cur); - return (next < end ? next : start); -} - /* * Pad an mbuf to ensure a minimum ethernet frame size. * min_frame_size is the frame size (less CRC) to pad the mbuf to @@ -3521,37 +3502,22 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) bus_dma_tag_t buf_tag; bus_dma_segment_t *segs; struct mbuf *m_head, **ifsd_m; - void *next_txd; bus_dmamap_t map; struct if_pkt_info pi; int remap = 0; - int err, nsegs, ndesc, max_segs, pidx, cidx, next, ntxd; + int err, nsegs, ndesc, max_segs, pidx; ctx = txq->ift_ctx; sctx = ctx->ifc_sctx; scctx = &ctx->ifc_softc_ctx; segs = txq->ift_segs; - ntxd = txq->ift_size; m_head = *m_headp; map = NULL; /* * If we're doing TSO the next descriptor to clean may be quite far ahead */ - cidx = txq->ift_cidx; pidx = txq->ift_pidx; - if (ctx->ifc_flags & IFC_PREFETCH) { - next = (cidx + CACHE_PTR_INCREMENT) & (ntxd - 1); - if (!(ctx->ifc_flags & IFLIB_HAS_TXCQ)) { - next_txd = calc_next_txd(txq, cidx, 0); - prefetch(next_txd); - } - - /* prefetch the next cache line of mbuf pointers and flags */ - prefetch(&txq->ift_sds.ifsd_m[next]); - prefetch(&txq->ift_sds.ifsd_map[next]); - next = (cidx + CACHE_LINE_SIZE) & (ntxd - 1); - } map = txq->ift_sds.ifsd_map[pidx]; ifsd_m = txq->ift_sds.ifsd_m; @@ -3737,24 +3703,16 @@ defrag_failed: static void iflib_tx_desc_free(iflib_txq_t txq, int n) { - uint32_t qsize, cidx, mask, gen; + uint32_t qsize, cidx, gen; struct mbuf *m, **ifsd_m; - bool do_prefetch; cidx = txq->ift_cidx; gen = txq->ift_gen; qsize = txq->ift_size; - mask = qsize - 1; ifsd_m = txq->ift_sds.ifsd_m; - do_prefetch = (txq->ift_ctx->ifc_flags & IFC_PREFETCH); while (n-- > 0) { - if (do_prefetch) { - prefetch(ifsd_m[(cidx + 3) & mask]); - prefetch(ifsd_m[(cidx + 4) & mask]); - } if ((m = ifsd_m[cidx]) != NULL) { - prefetch(&ifsd_m[(cidx + CACHE_PTR_INCREMENT) & mask]); if (m->m_pkthdr.csum_flags & CSUM_TSO) { bus_dmamap_sync(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[cidx], From nobody Tue Nov 11 18:18:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5ZXL0skGz6GqN0; Tue, 11 Nov 2025 18:18: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5ZXL0M7Hz3xp4; Tue, 11 Nov 2025 18:18:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762885090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fOfdaX60dBew9pJ2qz/5/6AN4tAxXpO82e4Vba6Spsc=; b=cDDO7+mv8PuuwvkHJZLkpi31xfbiwkq+M/YUsM54/l7TJl5oOsfRvMziGkAzVc5ODyvCLH S+mSez/hgeR7oLqHZVPKs+brobDZ/RYfJwxItUdH5UDE1fwTb3YyxeyiAah/5HXdqNQfXv d4nX8nYXJVrCnSBXQOwb6rfbBG36DpI/hOk/vkP/PALj+ViGZ5BX/Cs05PAOEbl5PPaCEh v8rlZrv9KhZ55c1HHsq+TpRDHI6MNjFFrfHgEQ+4QjGJFpuT1bsSHcsIw2dgcRdgI1go8V 4QRd6guUAsSGaF9m6c5fvT2jWdDHLBZH7+Bytvi/YEiYwW1X5nkfgg2tKLh0Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762885090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fOfdaX60dBew9pJ2qz/5/6AN4tAxXpO82e4Vba6Spsc=; b=XtciH6AjwmyaWX9qwmDY1T+h56S/PCzSGEJQ34Q81YvN9AlSd8Ws51k3FvITpA21vMKsrL 51kXFQECHKHn7yLrIAXTtaApEvxlPWqJQqWvjQOGpqz8qwg/XmOuzm9VIFzhSNzaHUnNrU jZUZ164VrxU60gSGnkh8dRt6hKBfc535NuKw5b9GlHEell1a8VdcSO7qdtsz0A1Mg8429R KaJoZHzbakWRRcJgM0JF7A3348NskqsO5fy0BxOw/kjvBoxiIjBCdz7iBPevKhtc+oaYZw 6oPgne8QDOKOTlwR+6g4kIcZKTyNknX5EhRIWj8fqVXaukhci0YeygltwKjMdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762885090; a=rsa-sha256; cv=none; b=XNU1cyETcAJAd4wJOJkW0naEdZV526hd8TOJvU2whwW44fRsnPtn/GAaPdYaBlb+CqW3ox ILK/cl0qLW57HGcefrDBdZNordZ7DciPRPca5VFJ6t4EvFQzegiZb4lRiakiwepKTTo/yd sl0M0dvBZuD5Fk4RprqdK7OwVxQAx3dvWGap1qLOBSo6LlUaG3V2THuQyN/SPkpR+24mC2 UmiXc3LPhJHMx2KNjYtBoLtH0pwr/plqfnefXRLWWUUNSSzZfX/YU+rKkKirBMxWUW1ulu PqLiXqTm07n2D1Lgb7HgIVhaVkVeDwZUJINwgZVi4QXdD4Y9oRH9MlzJhnMIbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5ZXK713Zz1DwV; Tue, 11 Nov 2025 18:18: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 5ABII9vw033394; Tue, 11 Nov 2025 18:18:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABII96W033391; Tue, 11 Nov 2025 18:18:09 GMT (envelope-from git) Date: Tue, 11 Nov 2025 18:18:09 GMT Message-Id: <202511111818.5ABII96W033391@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: 4109cdf0f817 - main - bsdinstall: Use fat32 EFI system partition for ZFS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 4109cdf0f817162cf3032aa589dd180dfa910025 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4109cdf0f817162cf3032aa589dd180dfa910025 commit 4109cdf0f817162cf3032aa589dd180dfa910025 Author: Ed Maste AuthorDate: 2025-11-07 22:48:30 +0000 Commit: Ed Maste CommitDate: 2025-11-11 18:17:56 +0000 bsdinstall: Use fat32 EFI system partition for ZFS This is consistent with other operating systems and with bsdinstall's UFS config and with bsdinstall's ZFS config prior to commit 0b7472b3d8d2. Fixes: 0b7472b3d8d2 ("Mount the EFI system partition (ESP) on newly-installed systems.") Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53642 --- usr.sbin/bsdinstall/scripts/zfsboot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 9ea6ec3a4ac9..a4c9220a709c 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -216,7 +216,7 @@ KLDLOAD='kldload %s' LN_SF='ln -sf "%s" "%s"' MKDIR_P='mkdir -p "%s"' MOUNT_TYPE='mount -t %s "%s" "%s"' -NEWFS_ESP='newfs_msdos "%s"' +NEWFS_ESP='newfs_msdos -F 32 -c 1 "%s"' PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\"" PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"' SHELL_TRUNCATE=':> "%s"' From nobody Tue Nov 11 20:45:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5dpD38W7z6H1bD; Tue, 11 Nov 2025 20:45: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5dpD2SL6z4Kgf; Tue, 11 Nov 2025 20:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762893924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sh4NWwvnD8OcsJTrQ0ihXFXf7R8shQTwcRfa9f4PRuM=; b=VVPUlnHrOmcycgvAFUQv6yA1xEX3ZrWpVKmpK6Kq7vZGzXRYm2S7YaBnK4DUZeCuaky9QX js8Oq1Q8vBjawMzqVs1oW/q76dIu3f8aYpX8b/HLpQHFljmq9jTbjQ0Q2ZCYZvpMFXKBDZ auxO+jYGAlVJazmwvnzoIjWn2fOu4pvFdF251l+UKzDnvTseTBewE+obFVob/YwLs61X62 p0Y1uCW4omvJ2TP3q0Iha9nFg184TOdHDzyEVTRbXD3sNHjsBvL6bLAnbt6BX3NcfvfdX7 B6clvBDjsYY2EgdPbdUYnqUZNJodFNXaxHqKC/3IEnbpI6Mmu+7e1vTJz8yqrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762893924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sh4NWwvnD8OcsJTrQ0ihXFXf7R8shQTwcRfa9f4PRuM=; b=EH0KY32eIietSnmIJURqqh8gMl8PshIywyLjPE4SbvQgo0gMHnrd//cz5FPTbqJAVpUPYt tjFMUdUhVw4wUNuWf8u9TD/j3bizl68jEGkJVkbxSE+Kn4TT4kratJoJVUBNTJLRzAu3Za waLs0cJ3dp9Ei2UU8X+TF4AXiPHjrWgP1l2+RRg2lUTf4r5FtrAHs5lNMg7Ec6e+ypWJeh 4EbXe6N6W+qb9RRb4sxFHBtiWMRX5qJvYZDM7v/zIFJ69zc95I9U19L/YtQ3YZUqs0DcnD SOdA3IEP1rHiVTyKqBv2pkGD9oMIK+NBJyB4R79CJ3sJ4nigjWlUxzeYstF8nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762893924; a=rsa-sha256; cv=none; b=PK/yzeyhF1UrjZ3mUMIcNacUVanDnL/6Op3o+0zSsWqvvBq8p+X94/MneA1rMz0vOwKYGV YBQJDTSP27uoL9EU1/R8zapUABpjhLDyM5W08NaaweaEqrfBVqNcBJ0pZyYWjE51HLPEdT 5aI0I5oZgf6pChQNQYJ/YoXPiUSwH/8c1ZyI/CeQhhpDlqw0Z57NkSwMWyvBVVwDZ/rHgX vy8txkokjgcaVca2FYJbi8WWvpk+V+/eIipwVsL5mg/LYvw3lSUEbimEyZRdfusrOJonNH yW7Z5g8x1yzQCrbGoCbfrZyvS/3SWAeIhR3qsn0VllIy8vqHwtWuj4PSmY7/iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5dpD1RG1z1K0s; Tue, 11 Nov 2025 20:45: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 5ABKjOep014166; Tue, 11 Nov 2025 20:45:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABKjOpp014163; Tue, 11 Nov 2025 20:45:24 GMT (envelope-from git) Date: Tue, 11 Nov 2025 20:45:24 GMT Message-Id: <202511112045.5ABKjOpp014163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 53880f09fb1b - main - acpi: add counters for cumulative time spent in each sleep 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: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53880f09fb1b485cf5c4af2b81081112e0c7cea3 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=53880f09fb1b485cf5c4af2b81081112e0c7cea3 commit 53880f09fb1b485cf5c4af2b81081112e0c7cea3 Author: Adrian Chadd AuthorDate: 2025-11-07 03:45:24 +0000 Commit: Adrian Chadd CommitDate: 2025-11-11 20:45:09 +0000 acpi: add counters for cumulative time spent in each sleep state. Add this so it can be consumed/graphed. Differential Revision: https://reviews.freebsd.org/D53633 Reviewed by: gallatin, imp --- sys/dev/acpica/acpi_cpu.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c index f9b9a386c0c5..2cd6c8bd4758 100644 --- a/sys/dev/acpica/acpi_cpu.c +++ b/sys/dev/acpica/acpi_cpu.c @@ -92,6 +92,7 @@ struct acpi_cpu_softc { int cpu_non_c2; /* Index of lowest non-C2 state. */ int cpu_non_c3; /* Index of lowest non-C3 state. */ u_int cpu_cx_stats[MAX_CX_STATES];/* Cx usage history. */ + uint64_t cpu_cx_duration[MAX_CX_STATES];/* Cx cumulative sleep */ /* Values for sysctl. */ struct sysctl_ctx_list cpu_sysctl_ctx; struct sysctl_oid *cpu_sysctl_tree; @@ -185,6 +186,7 @@ static void acpi_cpu_quirks(void); static void acpi_cpu_quirks_piix4(void); static int acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_usage_counters_sysctl(SYSCTL_HANDLER_ARGS); +static int acpi_cpu_duration_counters_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_global_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); @@ -1055,6 +1057,12 @@ acpi_cpu_startup_cx(struct acpi_cpu_softc *sc) "cx_usage_counters", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, (void *)sc, 0, acpi_cpu_usage_counters_sysctl, "A", "Cx sleep state counters"); + SYSCTL_ADD_PROC(&sc->cpu_sysctl_ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->cpu_dev)), OID_AUTO, + "cx_duration_counters", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + (void *)sc, 0, acpi_cpu_duration_counters_sysctl, "A", + "Cx sleep duration cumulative time"); + #if defined(__i386__) || defined(__amd64__) SYSCTL_ADD_PROC(&sc->cpu_sysctl_ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(sc->cpu_dev)), OID_AUTO, @@ -1168,6 +1176,7 @@ acpi_cpu_idle(sbintime_t sbt) if (!cx_next->do_mwait && curthread->td_critnest == 0) end_time = min(end_time, 500000 / hz); sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + end_time) / 4; + sc->cpu_cx_duration[cx_next_idx] += end_time; return; } @@ -1224,6 +1233,7 @@ acpi_cpu_idle(sbintime_t sbt) else end_time = ((end_ticks - start_ticks) << 20) / cpu_tickrate(); sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + end_time) / 4; + sc->cpu_cx_duration[cx_next_idx] += end_time; } #endif @@ -1408,6 +1418,26 @@ acpi_cpu_usage_counters_sysctl(SYSCTL_HANDLER_ARGS) return (error); } +static int +acpi_cpu_duration_counters_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct acpi_cpu_softc *sc = (struct acpi_cpu_softc *)arg1; + struct sbuf sb; + char buf[128]; + int error, i; + + sbuf_new_for_sysctl(&sb, buf, sizeof(buf), req); + for (i = 0; i < sc->cpu_cx_count; i++) { + if (i > 0) + sbuf_putc(&sb, ' '); + sbuf_printf(&sb, "%ju", (uintmax_t) sc->cpu_cx_duration[i]); + } + error = sbuf_finish(&sb); + sbuf_delete(&sb); + return (error); +} + + #if defined(__i386__) || defined(__amd64__) static int acpi_cpu_method_sysctl(SYSCTL_HANDLER_ARGS) From nobody Wed Nov 12 08:33:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5xWN1jTNz6GdqL; Wed, 12 Nov 2025 08:33: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5xWN11drz49hc; Wed, 12 Nov 2025 08:33:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762936416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SNgeuWb7tKk9NrBVv7H/y/uoYoxZp0tWNPXHb01gKkg=; b=RWdgr4LoUGya6cLnhhWXC+xrPD2D998nRmeymVZj6aHUrIvauhjX4/GS2DoGWWRri+qgfU qaY+Ke138dNPKmshdEeC+rvE3oWf4e8Z0qnnsLiqJmaCmCdflTws+n41wk+IllWi9yosvM EBxxpycRGHjlOm76IGOP5xPQSEQNr2zCDKmTJoAOQqahvFTgB+LPLhDBl1xADrkcJA3bK4 FQu0JSgmLXdepoCHE5xyFGCPZwjt6KgIxpUHHHYL/Xvn+0+x/2K6BYEHy7dwO8oGQc2qR7 ItSfJFJGpgDMjEZlk7DmEHZMdaAxtCHOMrWnGMAZdHo+2h+SSggFlpk4yAr6pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762936416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SNgeuWb7tKk9NrBVv7H/y/uoYoxZp0tWNPXHb01gKkg=; b=xxEuN7pvQjD4S8+hmUYZkp+e4K1srfCz0/pr6QuUQJdrkK8xzCxseaVTUIOi+vEWfdtjfn Fqxl4/CweyIlAE/f01drw4chlBHjGv9ydlbItYLJq5hZ8jWhl5vLZu5ZjpkO69ivwkeTlo fYo1TBCT6dCegDbvJMxXsyYOejxWf6n6XHDyVYfjuxMl622BP1vffJVmjw4q8mHO0qpXmM Li+rVjXNj9pD+7dezyqrL2a1Cqv2Whhr8nM+oFzv+ptFF7+An+zHtdvK6IsSDTGLhlpp26 CYK23H2WhxPrK2dPphAgeklbvZmKfQIoYttxABqSWa/cz5Ix7qWhr0tZ+bT5Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762936416; a=rsa-sha256; cv=none; b=NMrRsoZVldumKfXTQ28g9A0NEMg0lz08ApVXL+5m5l4zcMJ0AfYRMyeX4KGGSnoKn7EYD9 uxhYB5xUVnv8fSqTHAI7CLNHcvqjWgY+w/BG7ATtHcJNW1JhtjzxOTmCHlADiufPGqlaqX KI0yl4fMvwEn9OMplwWqduel2ZbuT46qUOM7BvUbn+FqQ2BqQIrd5itZVIcqP2tTcgjbHi ai9JXQKpS1RHrir/gdPAhVPszRPENR1OGJGg+qTvFRXYYmLmqwIW2JnqY+73GW20hVEznt dX1INIb3k/mkFgXARK+4yFL9opuDu7GlYA9+Imy4YOYTetJN1td4TIBE40VjpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5xWN0R4Kz9rt; Wed, 12 Nov 2025 08:33: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 5AC8XZdj045421; Wed, 12 Nov 2025 08:33:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AC8XZdw045418; Wed, 12 Nov 2025 08:33:35 GMT (envelope-from git) Date: Wed, 12 Nov 2025 08:33:35 GMT Message-Id: <202511120833.5AC8XZdw045418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 539726e86d69 - main - stress2: Added a syzkaller reproducer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 539726e86d69efdb3003128ff1e0e739aba5f36e Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=539726e86d69efdb3003128ff1e0e739aba5f36e commit 539726e86d69efdb3003128ff1e0e739aba5f36e Author: Peter Holm AuthorDate: 2025-11-12 08:33:15 +0000 Commit: Peter Holm CommitDate: 2025-11-12 08:33:15 +0000 stress2: Added a syzkaller reproducer --- tools/test/stress2/misc/syzkaller87.sh | 384 +++++++++++++++++++++++++++++++++ 1 file changed, 384 insertions(+) diff --git a/tools/test/stress2/misc/syzkaller87.sh b/tools/test/stress2/misc/syzkaller87.sh new file mode 100755 index 000000000000..5dc77c55c419 --- /dev/null +++ b/tools/test/stress2/misc/syzkaller87.sh @@ -0,0 +1,384 @@ +#!/bin/sh + +# panic: freevnode: cannot lock vp 0xfffffe01634e4de0 for pollinfo destroy +# cpuid = 7 +# time = 1762875612 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00ffce8bd0 +# vpanic() at vpanic+0x136/frame 0xfffffe00ffce8d00 +# panic() at panic+0x43/frame 0xfffffe00ffce8d60 +# freevnode() at freevnode+0x536/frame 0xfffffe00ffce8dc0 +# vput_final() at vput_final+0x96/frame 0xfffffe00ffce8e10 +# inotify_reap() at inotify_reap+0x6e/frame 0xfffffe00ffce8e40 +# taskqueue_run_locked() at taskqueue_run_locked+0x1c2/frame 0xfffffe00ffce8ec0 +# taskqueue_thread_loop() at taskqueue_thread_loop+0xd3/frame 0xfffffe00ffce8ef0 +# fork_exit() at fork_exit+0x82/frame 0xfffffe00ffce8f30 +# fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00ffce8f30 +# --- trap 0, rip = 0, rsp = 0, rbp = 0 --- +# KDB: enter: panic +# [ thread pid 0 tid 100045 ] +# Stopped at $0,0x12129d2(%rip) +# db> x/s version +# version: FreeBSD 16.0-CURRENT #0 main-n281796-e1c6f4cb9bd2-dirty: Tue Nov 11 10:53:40 CET 2025 +# pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO +# db> + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg +set -u +prog=$(basename "$0" .sh) +cat > /tmp/$prog.c < + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SYS___specialfd +#define SYS___specialfd 577 +#endif +#ifndef SYS_inotify_add_watch_at +#define SYS_inotify_add_watch_at 593 +#endif + +static __thread int clone_ongoing; +static __thread int skip_segv; +static __thread jmp_buf segv_env; + +static void segv_handler(int sig, siginfo_t* info, void* ctx __unused) +{ + if (__atomic_load_n(&clone_ongoing, __ATOMIC_RELAXED) != 0) { + exit(sig); + } + uintptr_t addr = (uintptr_t)info->si_addr; + const uintptr_t prog_start = 1 << 20; + const uintptr_t prog_end = 100 << 20; + int skip = __atomic_load_n(&skip_segv, __ATOMIC_RELAXED) != 0; + int valid = addr < prog_start || addr > prog_end; + if (sig == SIGBUS) + valid = 1; + if (skip && valid) { + _longjmp(segv_env, 1); + } + exit(sig); +} + +static void install_segv_handler(void) +{ + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = segv_handler; + sa.sa_flags = SA_NODEFER | SA_SIGINFO; + sigaction(SIGSEGV, &sa, NULL); + sigaction(SIGBUS, &sa, NULL); +} + +#define NONFAILING(...) \ + ({ \ + int ok = 1; \ + __atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \ + if (_setjmp(segv_env) == 0) { \ + __VA_ARGS__; \ + } else \ + ok = 0; \ + __atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \ + ok; \ + }) + +static void kill_and_wait(int pid, int* status) +{ + kill(pid, SIGKILL); + while (waitpid(-1, status, 0) != pid) { + } +} + +static void sleep_ms(uint64_t ms) +{ + usleep(ms * 1000); +} + +static uint64_t current_time_ms(void) +{ + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts)) + exit(1); + return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; +} + +static void use_temporary_dir(void) +{ + char tmpdir_template[] = "./syzkaller.XXXXXX"; + char* tmpdir = mkdtemp(tmpdir_template); + if (!tmpdir) + exit(1); + if (chmod(tmpdir, 0777)) + exit(1); + if (chdir(tmpdir)) + exit(1); +} + +static void reset_flags(const char* filename) +{ + struct stat st; + if (lstat(filename, &st)) + exit(1); + st.st_flags &= ~(SF_NOUNLINK | UF_NOUNLINK | SF_IMMUTABLE | UF_IMMUTABLE | + SF_APPEND | UF_APPEND); + if (lchflags(filename, st.st_flags)) + exit(1); +} +static void __attribute__((noinline)) remove_dir(const char* dir) +{ + DIR* dp = opendir(dir); + if (dp == NULL) { + if (errno == EACCES) { + if (rmdir(dir)) + exit(1); + return; + } + exit(1); + } + struct dirent* ep = 0; + while ((ep = readdir(dp))) { + if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) + continue; + char filename[FILENAME_MAX]; + snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); + struct stat st; + if (lstat(filename, &st)) + exit(1); + if (S_ISDIR(st.st_mode)) { + remove_dir(filename); + continue; + } + if (unlink(filename)) { + if (errno == EPERM) { + reset_flags(filename); + reset_flags(dir); + if (unlink(filename) == 0) + continue; + } + exit(1); + } + } + closedir(dp); + while (rmdir(dir)) { + if (errno == EPERM) { + reset_flags(dir); + if (rmdir(dir) == 0) + break; + } + exit(1); + } +} + +static void execute_one(void); + +#define WAIT_FLAGS 0 + +static void loop(void) +{ + int iter = 0; + for (;; iter++) { + char cwdbuf[32]; + sprintf(cwdbuf, "./%d", iter); + if (mkdir(cwdbuf, 0777)) + exit(1); + int pid = fork(); + if (pid < 0) + exit(1); + if (pid == 0) { + if (chdir(cwdbuf)) + exit(1); + execute_one(); + exit(0); + } + int status = 0; + uint64_t start = current_time_ms(); + for (;;) { + sleep_ms(10); + if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) + break; + if (current_time_ms() - start < 5000) + continue; + kill_and_wait(pid, &status); + break; + } + remove_dir(cwdbuf); + } +} + +uint64_t r[1] = {0xffffffffffffffff}; + +void execute_one(void) +{ + intptr_t res = 0; + if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { + } + // openat\$evdev arguments: [ + // fd: const = 0xffffffffffffff9c (8 bytes) + // file: ptr[in, buffer] { + // buffer: {2f 64 65 76 2f 69 6e 70 75 74 2f 65 76 65 6e 74 4e 00} + // (length 0x12) + // } + // flags: open_flags = 0x100 (8 bytes) + // mode: const = 0x0 (8 bytes) + // ] + // returns fd_evdev + NONFAILING(memcpy((void*)0x200000000040, "/dev/input/eventN\000", 18)); + syscall(SYS_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000040ul, + /*flags=O_NOFOLLOW*/ 0x100ul, /*mode=*/0ul); + // kqueue arguments: [ + // ] + // returns kqueue + syscall(SYS_kqueue); + // pipe2 arguments: [ + // pipefd: ptr[out, pipefd] { + // pipefd { + // rfd: fd (resource) + // wfd: fd (resource) + // } + // } + // flags: pipe_flags = 0x0 (8 bytes) + // ] + syscall(SYS_pipe2, /*pipefd=*/0x200000000480ul, /*flags=*/0ul); + // socket\$unix arguments: [ + // domain: const = 0x1 (8 bytes) + // type: unix_socket_type = 0x5 (8 bytes) + // proto: const = 0x0 (1 bytes) + // ] + // returns sock_unix + syscall(SYS_socket, /*domain=*/1ul, /*type=SOCK_SEQPACKET*/ 5ul, /*proto=*/0); + // kqueue arguments: [ + // ] + // returns kqueue + syscall(SYS_kqueue); + // mprotect arguments: [ + // addr: VMA[0x2000] + // len: len = 0x2000 (8 bytes) + // prot: mmap_prot = 0x5 (8 bytes) + // ] + syscall(SYS_mprotect, /*addr=*/0x200000000000ul, /*len=*/0x2000ul, + /*prot=PROT_READ|PROT_EXEC*/ 5ul); + // symlink arguments: [ + // old: ptr[in, buffer] { + // buffer: {2e 00} (length 0x2) + // } + // new: ptr[in, buffer] { + // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) + // } + // ] + NONFAILING(memcpy((void*)0x200000000000, ".\000", 2)); + NONFAILING(memcpy((void*)0x200000000040, "./file0\000", 8)); + syscall(SYS_symlink, /*old=*/0x200000000000ul, /*new=*/0x200000000040ul); + // __specialfd\$inotify arguments: [ + // type: const = 0x2 (8 bytes) + // req: ptr[in, specialfd_inotify] { + // specialfd_inotify { + // flags: inotify_flags = 0x0 (4 bytes) + // } + // } + // len: len = 0x4 (8 bytes) + // ] + // returns fd_inotify + NONFAILING(*(uint32_t*)0x200000000180 = 0); + res = syscall(SYS___specialfd, /*type=*/2ul, /*req=*/0x200000000180ul, + /*len=*/4ul); + if (res != -1) + r[0] = res; + // inotify_add_watch_at arguments: [ + // fd: fd_inotify (resource) + // dfd: fd_dir (resource) + // file: ptr[in, buffer] { + // buffer: {2e 2f 66 69 6c 65 30 61 61 61 61 61 61 61 61 61 61 61 61 61 + // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 2f 66 + // 69 6c 65 30 00} (length 0xff) + // } + // mask: inotify_mask = 0x82000204 (8 bytes) + // ] + // returns inotifydesc + NONFAILING( + memcpy((void*)0x200000000040, + "./" + "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/file0\000", + 255)); + syscall(SYS_inotify_add_watch_at, /*fd=*/r[0], /*dfd=*/(intptr_t)-1, + /*file=*/0x200000000040ul, + /*mask=IN_ONESHOT|IN_DONT_FOLLOW|IN_DELETE|IN_ATTRIB*/ 0x82000204ul); + // unlink arguments: [ + // path: ptr[in, buffer] { + // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) + // } + // ] + NONFAILING(memcpy((void*)0x200000000040, "./file0\000", 8)); + syscall(SYS_unlink, /*path=*/0x200000000040ul); +} +int main(void) +{ + syscall(SYS_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, + /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, + /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x1012ul, + /*fd=*/(intptr_t)-1, /*offset=*/0ul); + const char* reason; + (void)reason; + install_segv_handler(); + use_temporary_dir(); + loop(); + return 0; +} +EOF +mycc -o /tmp/$prog -Wall -Wextra -O0 /tmp/$prog.c -lpthread || exit 1 + +(cd ../testcases/swap; ./swap -t 3m -i 30 -l 100 > /dev/null 2>&1) & +sleep 5 + +work=/tmp/$prog.dir +rm -rf $work +mkdir $work +cd /tmp/$prog.dir +for i in `jot 30`; do + ( + mkdir d$i + cd d$i + timeout 3m /tmp/$prog > /dev/null 2>&1 & + ) +done +while pgrep -q $prog; do sleep 2; done +while pkill swap; do :; done +wait + +rm -rf /tmp/$prog /tmp/$prog.c /tmp/$prog.core /tmp/syzkaller.?????? $work +exit 0 From nobody Wed Nov 12 10:26:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d601H6nyKz6GmdK; Wed, 12 Nov 2025 10:26: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d601H6Dlzz3QgW; Wed, 12 Nov 2025 10:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762943171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzPmI06pVEriEHaL7TgtwYwATGtfeOcJEIfa9sP4tsg=; b=Qm7vmgpni66jk36G4rmw6GGTSfIo0Kftzs//9i8WZH5u1PH/7HsmZ1l1eflVLEsMbrWwAd U6aXYSDT6P0MS32RGpeR0n8Q3g520ubd1SGx6RBAqQhk0G2hlFM5TeDDyPNzTyak9VF2rc Va8css6URarifeYz6JwZ2zyMZi7WHTn+9Sf3hXbCET7DdFok8BmPEr2IzDPIcVlJeKcnRZ /6oEx1TwnjL1Uo7Rpoe6IAFP9rS4OQYacvGVWuTK59jA63lG5hc3GRQ62BotF2tWfP2Uvz WN0WlJ0IeKavpGFir6TfopzOSvERHRCFmtSfgfmWpvGQbdu5q7fdCMZ4F2QsKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762943171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzPmI06pVEriEHaL7TgtwYwATGtfeOcJEIfa9sP4tsg=; b=IRt6Ig5G8OSU/E+ktk4jRbiUMbigiGjdWgzMzxbUSwmge68qftvASU51U/DiRvT2Lkf3ZT 7dFKePTeUWuRWbplZWxfZzNJFVo4yBrThwvvRA1AtHq8NHFh9ZXnfb5fEhPRZ0l3h4JsnE QYlcxfh31MOvY6hS54b8XHRAUHvz6ZfeaTw7m5aJNGAD43XjneYfzT+Jz1HQxDlNPYKsnG TKnmcvTDpsInjLRjOuipB83ZTk7TgqM/eD9D+3qZMHkiB11FkgLIhXAW5syfTehNDnIAPJ 8sp9YBloqGP91mdfdrA90yxA8jAnOmZaKreXcknZOObqtACnW3Jng9mCfUjUDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762943171; a=rsa-sha256; cv=none; b=U01C7Ekqu3OZ+679KU3xbOcmZdhSm9ftfMd8WbWfXxRTeuRrsWxUVwy4Mx4aple5a4kNyk nUiCv3ZFKxvJZLYdfcOGV08/T93l7/+mCzVvBGMhLz5NsTrDPXpwDT57VueMlxuAz0qXzm FjLERChSnSaZchGjfMuLQ7PGfmQRMQ9FJRryswRbNZBFweJiEqhE2P/OhpiC7wfIj2eqBn UcBkeUP+yAMx4QKpPQEn4US9Jgru2APBQ3cBQomt5OinJ290wh8Q4UAcLoNHYMEWk/5NtM XKuXOTcCb6KJSKTvzdby0KA8XPJAf7QiXm80ccpS7RXH84ugIKC071j6FCWlXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d601H5YFCzVNG; Wed, 12 Nov 2025 10:26: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 5ACAQBAF053330; Wed, 12 Nov 2025 10:26:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACAQBFq053327; Wed, 12 Nov 2025 10:26:11 GMT (envelope-from git) Date: Wed, 12 Nov 2025 10:26:11 GMT Message-Id: <202511121026.5ACAQBFq053327@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: 4ab2d625e146 - main - nuageinit.7: fix cloud-config header line List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ab2d625e1462e9a78cb8086906c1a3da3aa6713 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=4ab2d625e1462e9a78cb8086906c1a3da3aa6713 commit 4ab2d625e1462e9a78cb8086906c1a3da3aa6713 Author: Jonathan Matthews AuthorDate: 2025-11-12 09:24:24 +0000 Commit: Baptiste Daroussin CommitDate: 2025-11-12 10:24:28 +0000 nuageinit.7: fix cloud-config header line This updates the nuageinit man page by aligning mentions of the cloud-config header line with the cloud-init documentation[0], removing an unwanted "!" character. [0] https://docs.cloud-init.io/en/latest/explanation/about-cloud-config.html#how-do-i-create-a-cloud-config-file Signed-off-by: Jonathan Matthews Differential Revision: https://reviews.freebsd.org/D53706 --- libexec/nuageinit/nuageinit.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/nuageinit/nuageinit.7 b/libexec/nuageinit/nuageinit.7 index b527c984970c..445902ccf2c0 100644 --- a/libexec/nuageinit/nuageinit.7 +++ b/libexec/nuageinit/nuageinit.7 @@ -129,12 +129,12 @@ If this file starts with a it will be executed at the end of the boot via .Cm nuageinit_user_data_script . If this file starts with -.Qq #!cloud-config , +.Qq #cloud-config , it will be parsed as a YAML configuration file. All other cases will be ignored. .Pp The -.Qq #!cloud-config +.Qq #cloud-config configuration entries supported by .Nm : .Bl -tag -width "config-2" From nobody Wed Nov 12 12:24:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d62f9486bz6GvRN; Wed, 12 Nov 2025 12:24: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d62f93d0Rz3dP8; Wed, 12 Nov 2025 12:24:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762950289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W5wI7qdZGX6XfjGUDSlY95aiiOEsRFA3ZJXpZ89Qmjk=; b=XXBxm3aVYP8LXm2CMSiJ+kc8OASYINI9WNEhJQZ/6qjBLStd/+Oj7435Q2VL2Lg3TnDg1m pQLSyNhVv/FPhEcxmmiuaX5tSo5y6adN+l14Y6LeEE2sVl1LFcgDVmUtFlvdQXFEwdhAra uBtjd6oV7vLnDl9AVRROYAm/BIrMmt0oEQE+DwMaDyaQ1NY/rnqmBQQl2dyW7Rf0Zr84pO C6xFr1NaMRLebEO/m12ELfjxoeIQoySJnoJbAHTLuXhe46w0Z5hAp23GzaB4V7zBD/s8sN yZR8GwPCjexUZnFzr1UvoqlkvU7M4YY1dMzTaBW8KVLKNxa7IyIrSkN77ex9Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762950289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W5wI7qdZGX6XfjGUDSlY95aiiOEsRFA3ZJXpZ89Qmjk=; b=dGahMlV+JY6KWNBFNMuaAkJiA19b3sUnZPQtEEVbCO8zY19guzhuX8wf1Nm2C33jkLvkck +e/hwoVNOqMTPK+fj+tUGKf9T8qNtu4uZSVmz4OnISBHJssTH5PZQ0BLa5z4xuBVrrnbfw hZPjMd1kT6tGQrSr+sIduvMMzuBhPyX5cMFQzmvPV5WZNZmU+GfGQBtxqzZu7CN4GL4D6j cd8TBfu5g80wJE46X6anO/G9qbD6hfgy7uP+7l4iVk34wCrb/1hqgmUdRDHTjhPgXeKtpo J06FYFcZrGw08l5W6dZrVrKSWi78WOm2YO0sUy21yMZvbwE990EiO3lHu6mh1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762950289; a=rsa-sha256; cv=none; b=ww/ofyllrrdgYBMEGhGSOjKCT7nh+rOBJeD2888kcllA2iq5ng/5BsjUjfPXgh/bc/iHCj /aQ877g1ONhSQDXaGdCzMFi3Slx1A5uJrrcNeq8HgIEAZEFpXlTZa3Jr8slUw25koomQrP asyvVJgDgJJKWh6kzBp8fVYTIyKiqHpq85tMn1Fg/soXifXZE0c8VV6cOQVhwmPeg8qgwF aRtgyw9jrGYzq+VahrVP0dVhaKtmhmR64v8qXWWzq0RZJHxRec5DCdxmL+/19nyODJsYkQ jBiTa+mx6DpkcxbiLiBgEYSfl5MAP0nerp+I4au4/9vzjkVF48xcjPTnPw5HCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d62f93D87zbP4; Wed, 12 Nov 2025 12:24: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 5ACCOnIW079539; Wed, 12 Nov 2025 12:24:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACCOnIv079536; Wed, 12 Nov 2025 12:24:49 GMT (envelope-from git) Date: Wed, 12 Nov 2025 12:24:49 GMT Message-Id: <202511121224.5ACCOnIv079536@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: 6c57e368eb17 - main - lib/libc: implement C23 memalignment() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 6c57e368eb1777f6097158eeca2fcc175d068dba Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=6c57e368eb1777f6097158eeca2fcc175d068dba commit 6c57e368eb1777f6097158eeca2fcc175d068dba Author: Robert Clausecker AuthorDate: 2025-11-10 17:54:41 +0000 Commit: Robert Clausecker CommitDate: 2025-11-12 12:23:09 +0000 lib/libc: implement C23 memalignment() This new function computes the alignment of a pointer. It is part of ISO/IEC 9899:2024, the new C standard. If the pointer is a null pointer, null is returned. I have tried to write an implementation that can cope with traditional address-based architectures, even if size_t and uintptr_t are of different length. Adjustments may be needed for CHERI though. A man page is provided, too. No unit test for now. Reviewed by: kib, imp, ziaee (manpages), pauamma@gundo.com Approved by: markj (mentor) MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D53673 --- include/stdlib.h | 8 +++++++ lib/libc/stdlib/Makefile.inc | 4 ++-- lib/libc/stdlib/Symbol.map | 1 + lib/libc/stdlib/memalignment.3 | 53 ++++++++++++++++++++++++++++++++++++++++++ lib/libc/stdlib/memalignment.c | 28 ++++++++++++++++++++++ 5 files changed, 92 insertions(+), 2 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index 784cb63bfc5b..3e54b5feb6de 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -167,6 +167,14 @@ int at_quick_exit(void (*)(void)) __noexcept; _Noreturn void quick_exit(int) /* __noexcept -- not ready ABI issues? */; #endif /* __ISO_C_VISIBLE >= 2011 */ + +/* + * C23 extensions + */ +#if __ISO_C_VISIBLE >= 2023 +size_t memalignment(const void *) __pure2; +#endif /* __ISO_C_VISIBLE >= 2023 */ + /* * Extensions made by POSIX relative to C. */ diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index e7b9955b9646..b878a7625e9f 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -7,7 +7,7 @@ MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ div.c exit.c getenv.c getopt.c getopt_long.c \ getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \ hsearch_r.c imaxabs.c imaxdiv.c \ - insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \ + insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c memalignment.c \ merge.c mergesort_b.c ptsname.c qsort.c qsort_r.c qsort_r_compat.c \ qsort_s.c quick_exit.c radixsort.c rand.c \ random.c reallocarray.c reallocf.c realpath.c recallocarray.c remque.c \ @@ -35,7 +35,7 @@ MAN+= a64l.3 abort.3 abs.3 atexit.3 atof.3 \ atoi.3 atol.3 at_quick_exit.3 bsearch.3 \ div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \ hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \ - lsearch.3 memory.3 ptsname.3 qsort.3 \ + lsearch.3 memalignment.3 memory.3 ptsname.3 qsort.3 \ quick_exit.3 \ radixsort.3 rand.3 random.3 reallocarray.3 reallocf.3 realpath.3 \ set_constraint_handler_s.3 \ diff --git a/lib/libc/stdlib/Symbol.map b/lib/libc/stdlib/Symbol.map index 53d71bcafb7d..8b7e97c3cbdc 100644 --- a/lib/libc/stdlib/Symbol.map +++ b/lib/libc/stdlib/Symbol.map @@ -132,6 +132,7 @@ FBSD_1.8 { }; FBSD_1.9 { + memalignment; recallocarray; }; diff --git a/lib/libc/stdlib/memalignment.3 b/lib/libc/stdlib/memalignment.3 new file mode 100644 index 000000000000..4a2269a82c81 --- /dev/null +++ b/lib/libc/stdlib/memalignment.3 @@ -0,0 +1,53 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 10, 2025 +.Dt MEMALIGNMENT 3 +.Os +.Sh NAME +.Nm memalignment +.Nd find the memory alignment of an object +.Sh SYNOPSIS +.Lb libc +.In stdlib.h +.Ft size_t +.Fn memalignment "const void *ptr" +.Sh DESCRIPTION +The +.Fn memalignment +function determines the alignment of the object pointed to by +.Fa ptr . +This alignment is a power of\~2, and may be larger than the range +supported by the +.Sy alignof +operator. +The value returned can be compared to the result of +.Sy alignof , +and if it is greater or equal, the alignment requirement of the operand +is satisfied. +.Sh RETURN VALUES +Returns the alignment of +.Fa ptr +as a power of\~2. +If +.Fa ptr +is a null pointer, an alignment of zero is returned. +An alignment of zero indicates that the tested pointer cannot be used to +access an object of any type. +.Sh SEE ALSO +.Xr aligned_alloc 3 , +.Xr posix_memalign 3 +.Sh STANDARDS +The +.Fn memalignment +function conforms to +.St -isoC-2023 . +.Sh HISTORY +The +.Fn memalignment +function was added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/lib/libc/stdlib/memalignment.c b/lib/libc/stdlib/memalignment.c new file mode 100644 index 000000000000..771ddc2f5253 --- /dev/null +++ b/lib/libc/stdlib/memalignment.c @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +size_t +memalignment(const void *p) +{ + uintptr_t align; + + if (p == NULL) + return (0); + + align = (uintptr_t)p; + align &= -align; + +#if UINTPTR_MAX > SIZE_MAX + /* if alignment overflows size_t, return maximum possible */ + if (align > SIZE_MAX) + align = SIZE_MAX - SIZE_MAX/2; +#endif + + return (align); +} From nobody Wed Nov 12 13:40:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d64KY2gW5z6H19p; Wed, 12 Nov 2025 13:40: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d64KY2Gdkz3q1l; Wed, 12 Nov 2025 13:40:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762954833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wd3wWbkyUpKPeAw5/KETB9vss0Od6LPHztlkGu4xxo=; b=JyMvpoH6vAGFn68mttbsoUsH0Vs2wBmbARxvIauuxwBPGP+Tb/YLX0VzKOjVX2wQtNaAmK jqh7mLzNgXswPAeCSoGf27KQ4E3pyZ8P5V7CZvgOu7eUbp99ItI9klPqujy4aId0zIpBSw DJWfJmxWKOWixYCPmnQZhxbOWblzW+C/w4ZM05LKLLwSMjKbyLJcb2/dJ2aXR/ZQZ0h2ZC bmlH8res9saxacKKRgGkV/tXyecgdf3ZtVJlcISTXvneGCwEkK/DOT0Jb/AvncJ2UiuuwU 7Ys8Aunrkjp/WhpvrtyrsBgEZkdOUUwmc8WUVht+G62QYcNYu240vsWxQW0T5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762954833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wd3wWbkyUpKPeAw5/KETB9vss0Od6LPHztlkGu4xxo=; b=iJ4JXuySCChhHwirdpQNqbZmEPTXflSqJtBxOtvNFCH7lGlJHzNbV5jrWGTHCZ0XvpfpoU WYHRE7Hrlyhbarl3+lTJnXwmmpK+0vNOYUeq1U7MBxjKAyJbRsnNRTsilG1xDc/OtMRUO/ 9XQa2Y5VbFi5zTkrT6Hi4Ri7FgSsuQRIWKHBCvbez2oEnv9h4JAT+x/CGzmb7Ned5jGZoR 63ZNsuX+4UBPTjbwBcAnhD4tiFVXo9LhKJn/BVkeQwcVW9z6c6j4m09lpSAletJwyq7vxx irF0mq6OlScOahZyHs1Bze1GMtijXdYJtcedU3Y9bFgqbovDIwV1+1wsnSQUig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762954833; a=rsa-sha256; cv=none; b=WHlCUwJjrboqTobVmDA0Nq16nCxPG3LwF3JwmkXYA6PgBlc0LvPXnhaGD4dBzxS0DnscDT pnCDsfzOb1XQTl7dsjZW8KXpX3xvEihq+UAtakSF5JABp2qKh7uNBvodoNscaBCO4KmGUN FU+nJLt022/pxN4fgtbqhTcMDf0iIJ2s39g6vp9KzYcaSN4U3C6dnqPWOPq2FtbkeeNoAM eSpybFDHXP+W4pbuytNqN9A/caPdQ2hzQlpsyB76N9wTFwPNFsS9dY7pVMYzINALnkbiuu Pr3Kue74d9OhKUAiZ/fcxJvVFyBXoh0aEwJ/TUNjZKNlGY9mxrSEFEklWkSptw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d64KY1Q9Lzcsq; Wed, 12 Nov 2025 13:40: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 5ACDeXUF021937; Wed, 12 Nov 2025 13:40:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACDeX3h021934; Wed, 12 Nov 2025 13:40:33 GMT (envelope-from git) Date: Wed, 12 Nov 2025 13:40:33 GMT Message-Id: <202511121340.5ACDeX3h021934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 8225ed665eea - main - ix.4: Document E610 debug dump List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8225ed665eea69b3df3ea57009cf8fe61863c1fc Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=8225ed665eea69b3df3ea57009cf8fe61863c1fc commit 8225ed665eea69b3df3ea57009cf8fe61863c1fc Author: Yogesh Bhosale AuthorDate: 2025-11-10 18:03:54 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-12 13:38:41 +0000 ix.4: Document E610 debug dump Explain how to collect E610 device debug dump data with sysctl for troubleshooting with Intel Customer Support. Fixes: 2170400142b9 (Add support for debug dump) Reviewed by: bcr, erj (previous version), ziaee Signed-off-by: Yogesh Bhosale Differential Revision: https://reviews.freebsd.org/D52990 --- share/man/man4/ix.4 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4 index e6f4276e1a77..09af85f5c4a7 100644 --- a/share/man/man4/ix.4 +++ b/share/man/man4/ix.4 @@ -132,6 +132,35 @@ Enable Adaptive Interrupt Moderation (AIM). Vary the interrupt rate over time based on the traffic for that interrupt vector. .El +.Sh SYSCTL VARIABLES +The +.Nm +driver supports the following +.Xr sysctl 8 +variables: +.Bl -tag -width "dev.ix.?.debug.dump.clusters" +.It Va dev.ix.?.debug.dump.clusters +Specify a bitmask to select firmware event clusters +to be included in the debug dump. +Possible values include: +.Pp +.Bl -tag -compact +.It 0 +All clusters excluding Manageability Transactions +.It 0x1 +Link cluster +.It 0x2 +Full CSR Space excluding RCW registers +.El +.Pp +This feature is only supported on E610 devices. +.It Va dev.ix.?.debug.dump.dump +Specify 1 to generate a per-device debugging snapshot. +Output must be redirected to a file +and decoded by Intel Customer Support. +.Pp +This feature is only supported on E610. +.El .Sh DIAGNOSTICS .Bl -diag .It "ix%d: Unable to allocate bus resource: memory" From nobody Wed Nov 12 13:40:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d64KZ4t54z6H1Gg; Wed, 12 Nov 2025 13:40: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d64KZ29NMz3qHy; Wed, 12 Nov 2025 13:40:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762954834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QfI7teXk78cCHTChPXGYGtgtAujQIIyygTEsF6kJZ1k=; b=NcNBgTKxUzB0E7+zo3U7arjiSeZZ8+3GV//DAISprC9JhZaMtEvtBcLPVE0VGrkk1Twd6J 1y3W+cYPNdB0Pm6VJGqmV5cz8Xey63gW0OH6nn3B29DoMnAlTy7VeFdDVrlJQjJAEQY5P7 8FzWxlfKGk5U/9csTV7oCxydM2qKBDxP8Q9bbglB9WUF913uUNAjE9dA3SGbAOatC30KUo 2yNNFjC+Wt6VQBHFLWQD/5jbTrliIqVLQjJ8nxyN6U+WKJWgV3NXTZLtYvA4XhtsxnHaqK SuGT+WxfpnRsnYd2um11GhaaEX9AiIK2vcU6pwZiXtH4eYFzkTV1p33cdUjvOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762954834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QfI7teXk78cCHTChPXGYGtgtAujQIIyygTEsF6kJZ1k=; b=XR93YjGhng9xqTxFqOERQ9rc9SUwrLQ2LsyWetotIaWOFEAO5cXE8/okGlp6kwcno3FMJg iiHNNFvDf293gTPsIno+R04MB3F53xDed6JxOb/6x+cX1N5J2JtvRVNcCWDs3mVdUKDDvQ xXA4vmaPw/aBAgbhTckS6wcP34dIBrW+kaVgt1cXFNNfBh9n6cRd3JaAJwf280hk0J+QWM esqDBCyEAeYiZZqRP6e8uABqh7PxORG7A6ITKoboR6itoiYI6EwJxspMHryPi/DofSI7LT yixL3JCc69ya/1xbHnaRu0SsYbIRZ8lB7FFpr/enrJvuQyds3qUZYFEPMUXcCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762954834; a=rsa-sha256; cv=none; b=Rd5emwucMnWq3emYlRpYV/Kp4qXvepdMJYV8NzLo6n2VIAKKIC5Qg441CkE/YscPlbmkrR lnq7YEfqsbuqdxo1nMUx3k6opJ/ZYlrDJPH0JBLCDWIJrLQxrHTx/aaQQatAy7slD187z8 HF5XCFv/1z6/Yyj2lE6W+LJ8DjCYGCgvKp3XxJN4jW40TGFIurtyj8pEz0BYjMFwchpX2/ FxpIkxipstBEc6IWQY+XwPoUB/PXnfuk57w8kAHOyXu0LOOP9qOS0h8hZtPr7NClRh0RzI GxcrA/HiPRh10LkiDM/Ktn6ED7JkNrbfutvBejWiDHfZicQqUk1rNYQfHG5pGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d64KZ1mkPzclQ; Wed, 12 Nov 2025 13:40: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 5ACDeYS2021971; Wed, 12 Nov 2025 13:40:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACDeY0Y021968; Wed, 12 Nov 2025 13:40:34 GMT (envelope-from git) Date: Wed, 12 Nov 2025 13:40:34 GMT Message-Id: <202511121340.5ACDeY0Y021968@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: dee8e38f5226 - main - sbp.4: Add a hardware section, fix markup nits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dee8e38f52266d9b2fa837607ff3a78f240a806d Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=dee8e38f52266d9b2fa837607ff3a78f240a806d commit dee8e38f52266d9b2fa837607ff3a78f240a806d Author: Alexander Ziaee AuthorDate: 2025-11-11 18:38:04 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-12 13:39:24 +0000 sbp.4: Add a hardware section, fix markup nits + tag SPDX + add sysctl to apropos database + fix markup of examples and reflow a overly long line + add a hardware section for hw relnotes MFC after: 3 days --- share/man/man4/sbp.4 | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/share/man/man4/sbp.4 b/share/man/man4/sbp.4 index 2255fa2993ae..1daffd104a2c 100644 --- a/share/man/man4/sbp.4 +++ b/share/man/man4/sbp.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-4-Clause +.\" .\" Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa .\" All rights reserved. .\" @@ -29,7 +32,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 8, 2012 +.Dd November 11, 2025 .Dt SBP 4 .Os .Sh NAME @@ -62,19 +65,27 @@ might wonder why the device is not detached at the CAM layer when the device is unplugged. It is detached only if the device has not been plugged again during several bus resets. -This is for preventing to detach an active file system -even when the device cannot be probed correctly for some reason after a bus reset +This is for preventing to detach an active file system even when the +device cannot be probed correctly for some reason after a bus reset or when the device is temporary disconnected because the user changes the bus topology. If you want to force to detach the device, run -.Dq Nm fwcontrol Fl r -several times or set hw.firewire.hold_count=0 by +.Ql fwcontrol -r +several times or set +.Va hw.firewire.hold_count=0 +by .Xr sysctl 8 . .Pp Some (broken) HDDs do not work well with tagged queuing. If you have problems with such drives, try -.Dq Nm camcontrol [device id] tags -N 1 +.Ql camcontrol [device id] tags -N 1 to disable tagged queuing. +.Sh HARDWARE +The +.Nm +driver supports FireWire Serial Bus Protocol 2 +.Pq SBP-2 +storage devices. .Sh SEE ALSO .Xr cam 4 , .Xr firewire 4 , From nobody Wed Nov 12 13:40:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d64Kb6rVXz6H13b; Wed, 12 Nov 2025 13:40: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d64Kb3fLvz3q90; Wed, 12 Nov 2025 13:40:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762954835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8IHLaMxF2YdYBj8MyNYhqwsfG+jMSe7ty1e063fsxCY=; b=NZoOvwFb2VyhG9cbsyYbypLNzRgEzrauqvEV0FFHWwVRQPiWeCrp1njV6+7leYttNSQOQJ JbHlvfgWJAIrFlauksHEAUuliPDPsXy++w+DHjEWIlLBC6zwwomvpYo76bud2bwk2SnuP9 OcphS7Fl8EsC52RFglHxAMCOQOwR8pthNpP3F2XZEuAb/eEZPOfHrPjXFce3GKHfkB7y+a 7h/otabjcpGPqV7fwKZAaZvZp1oBSaRYYDxYpw+tJE24fl/6XWFzkIZtEvWGvbjlsKDmeM Bm3xMjCqu6BX8y1snV+iHuLmEokGFDdZ4ekIY+UxTfchPPdFctXHmHzYLTHYrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762954835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8IHLaMxF2YdYBj8MyNYhqwsfG+jMSe7ty1e063fsxCY=; b=qtZbhig/g+zmWcO18rE75tQd4bPmKNHILyFjT3DBf0iTVLUZduAHkpKJrLYZ/TO7W1J1uE +6K9stI4fC9tdSBjOyxHpZrPPSBK2GEmG8GrfjtFEZcd3eSVqsI/iyPF30WEZ5KxB/14Af EtaOg6y4ZTyn1Dq6KFNHzgXhDjfR/NPxI9wlZyYtnX8Df5Zw4oE/x8kil3JI/5wYoi+MKO d2epxD0M8z439fQrwIix6M2VDjmP6IjLXABJW+vQ9KLxgGU/Xh1wScB61IxC3E+dTEnZoj wN5fTwsk3MZ0gFOPqok18h/E21jtZ0ZdgERhHMAgrY9iUpq6XjcoNYJGGO2JVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762954835; a=rsa-sha256; cv=none; b=icBJViiMj0/KWoskQ8zxs79BSieElpsFePXMhu/kIic8H98ScCL5n3cYkA05F0T5UKC2co eMZ078pygmeH/KV+U4YtSjlQCMp66AbtoPbHLi13U7a/4ZSfHKNVQpdqdLPtnjM9nkJIoZ t9CdpdJRMLIIvubqvnQKeH418M2Km3hX0qawCK8RFGCEGL6KG/gEJxsWRVqd3+ZfZrmOKw 01l53sGLvKwat79Ucc9E+Dj4jdG6kEmLroe5ZKr0lHqVqbJ2PswTQqmAQNFhEUtrZX5uow Prwe7vM+cI3wGiv0lKQLyGr4VXQPbY+kcK2+tNWzj1DGGF01pLcIe8iIeU1AlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d64Kb2jcvzdG7; Wed, 12 Nov 2025 13:40: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 5ACDeZFV022005; Wed, 12 Nov 2025 13:40:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACDeZOU022002; Wed, 12 Nov 2025 13:40:35 GMT (envelope-from git) Date: Wed, 12 Nov 2025 13:40:35 GMT Message-Id: <202511121340.5ACDeZOU022002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 6f73950475ce - main - mx25l.4: Describe better and tag spdx List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f73950475ce6b56974b7cd08cdf0ea771165c50 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=6f73950475ce6b56974b7cd08cdf0ea771165c50 commit 6f73950475ce6b56974b7cd08cdf0ea771165c50 Author: Alexander Ziaee AuthorDate: 2025-11-11 18:56:40 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-12 13:39:24 +0000 mx25l.4: Describe better and tag spdx MFC after: 3 days --- share/man/man4/mx25l.4 | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/share/man/man4/mx25l.4 b/share/man/man4/mx25l.4 index 5dffdebcf43e..bbfc9846c5d8 100644 --- a/share/man/man4/mx25l.4 +++ b/share/man/man4/mx25l.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2019 Ian Lepore .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,26 +24,18 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 11, 2024 +.Dd November 11, 2025 .Dt MX25L 4 .Os .Sh NAME .Nm mx25l -.Nd driver for SpiFlash(tm) compatible non-volatile storage devices +.Nd SpiFlash compatible non-volatile storage devices driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following line in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device mx25l" -.Ed +.Cd device mx25l .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +In .Xr loader.conf 5 : -.Bd -literal -offset indent -mx25l_load="YES" -.Ed +.Cd mx25l_load="YES" .Sh DESCRIPTION The .Nm @@ -67,7 +61,7 @@ modules as with any disk device. .Sh HARDWARE The .Nm -driver provides support for the following devices: +driver supports the following spi flash memory devices: .Pp .Bl -bullet -compact .It From nobody Wed Nov 12 13:40:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d64Kc5Hmpz6H185; Wed, 12 Nov 2025 13:40:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d64Kc3p1kz3qLd; Wed, 12 Nov 2025 13:40:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762954836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HSeqbthWbNPup6Tww0kF/RzQbgpuTSrg+6uOyZHMACE=; b=sptMSRVn+BXGtEke049j7PfiIWGn3Q7HNAsiHzwpicKg4fj5/XsOZD/O1RMYG+L6t9jv5K BRLtS0x64/Xk+wwCk/wSInbq2rdsKprLGltsfQjgC36VTFGSa0x/kS3ktQ7yEguHKUAgug NMXif1So6b0+rqfTJ2U4CuqHBge4VBccn0b/SUCbwyWrBcXe69VdlSDU5SNbW+E0GXHb3D SL8bjk3Vrp/F9vgu5kixgkdubN2nPrQHU+6HETcLgD8+5EBkdKI+eVV1jN1p/gCGRdEzgW uM72IW0Or1ySxypJDtmlslS+brygYScR+R2zAeZQ1N7bfYwCJgBqDCMhgpyVRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762954836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HSeqbthWbNPup6Tww0kF/RzQbgpuTSrg+6uOyZHMACE=; b=lOgb9oGpElD5h1Zul0vXczTc0NQgPwpNNzKiMWxce219zV+DQPQbqkabiuZgVAf2WCtApf 2WCCfL3eqjCnHIYb6SNXi7y026Ei1vIAH1vk9TLEPYY04BKs/Fy1iCMth98y71txEuNyaR R3YOiSqT2rUE+C71ZqpPAs7fhfkN36CP5odaJ5vXu7VsXimQydgpsmmEj14VUQ9HDmbvzv tAyu0zKOFo2bsHNOF7ioaQXwF7SJCwRgyZh4YW6cFDIFark31IPQljasr4hkPvkk/LCxO+ uOu76N9KxrycQixA9DlAdBO6c3jysBkE5qbnLO6qbdTXfQLJUs03dURg6xxP1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762954836; a=rsa-sha256; cv=none; b=urtJWRP3w6KLw3U0/nc+ArACyooxaWJ0yCcTcQZAB9Sdm/OqKU8S3MriGcCBZZQ8BITpme pBmt8tXyEPqQ79ITpRMzSI46zsydqOUlvf65FW9RAETcu/WXhLbbQ4uYoQHG6Okr9LCkqm SQuqL5waSkP+rp5EEy8AlHau5HNl0TCJkFWw2b+7Tylz7Cwhn8v65GttS88GoZKHncEQ/o yS2vT8i29njpWPx/5gr8XAj4BsmFTIHNwnw047OeRPAzxptJGs7QhOPTO5m2DE7nxYBAjL H2Gtpg20pWtabVceZic0dScL8UaA6MKj4UlhXTVBI3fGpJgQaz9rIWkfmAxHCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d64Kc3MVdzd1g; Wed, 12 Nov 2025 13:40: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 5ACDeafQ022042; Wed, 12 Nov 2025 13:40:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACDea8q022039; Wed, 12 Nov 2025 13:40:36 GMT (envelope-from git) Date: Wed, 12 Nov 2025 13:40:36 GMT Message-Id: <202511121340.5ACDea8q022039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 595fcd71a89e - main - mx25l.4: Add n25q64 to hardware list List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 595fcd71a89e8c2d9039528d58b073f5ca712b68 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=595fcd71a89e8c2d9039528d58b073f5ca712b68 commit 595fcd71a89e8c2d9039528d58b073f5ca712b68 Author: Alexander Ziaee AuthorDate: 2025-11-11 18:58:19 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-12 13:39:24 +0000 mx25l.4: Add n25q64 to hardware list MFC after: 3 days Fixes: 76735c74398923a (flash: Add "n25q64" to mx25l driver) --- share/man/man4/mx25l.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/man4/mx25l.4 b/share/man/man4/mx25l.4 index bbfc9846c5d8..a48b153e91ec 100644 --- a/share/man/man4/mx25l.4 +++ b/share/man/man4/mx25l.4 @@ -93,6 +93,8 @@ MX25LL32 .It MX25LL64 .It +N25Q64 +.It S25FL032 .It S25FL064 From nobody Wed Nov 12 14:29:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d65Q2306Dz6H4Hf; Wed, 12 Nov 2025 14:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d65Q20D7Fz437h; Wed, 12 Nov 2025 14:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762957770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kKfEgOK2w9syLUdMmOtKMbTcDRYYurECLsjZ2PFPQYU=; b=c2EsFjF7IuEhqA400G2VYJQiNxG8wHVB4sG0vedTSqr7G/WV6nffs7TkLY18HZl3kxWMso QeyGqNFzaoT9Nkr6XZpiZeuDTzoSNqSktR0wml7Wre+xQQxHqSWdKCjpwq70UgvC/9AFkw iDU9Gcadw+tokR18GRG32tDyhtdz2tt4vhihK+diI9Jv7xOBUQhV8DSXEJ9gmv1w+Lt/8j cbKGIgRtbjZPaDZlx2yo3our/Tp/D2GEuqmU/zWUIljOHtey2YDbmYsmTZWzURdB+dAXks 5L4zYopMNyOm2TLLhFM5jTJeROhweYnipghhwWL6se9X6LiKtpamZ6NqNjoXLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762957770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kKfEgOK2w9syLUdMmOtKMbTcDRYYurECLsjZ2PFPQYU=; b=tvGINbfGpgAiIS5gqTb7hTvc9sFtiHsdNDbbg7fVxw2SPcP9zsR1Th8sG23bnJl8eN0h0W ze05WK8l5rnjsfgjOVF9Mp7yZqjlI7gxoU5o6N5jFWlOTqIJsUu/SrmrigHkB7Bxoq8QHH 27x8sDvHdRLwdto330TAqgWKrMw9to6HHFYe4noF/EnPABZE1fbQtpxH5RVz17/Q1/m4d1 BYuJBxFbHXbuyKkdmdU1jZrJBZGWPDlPR/hjwaQo539IBiW6cWj2EYat8Wdf3oDFNmI0V9 eeh//6A1o3s+c+aPZhBS69VSYh744ZfJ7KCjHYN+51GdPd/Hejbl9QsJqgEgSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762957770; a=rsa-sha256; cv=none; b=cMl2tmPuDhVJgnFRUnxLLdCFmsFJpgIjre1fMEAAcL9M5WniUE+K6CbiYArfb3v0ufmTr0 pviB26H72BpDgdt7CMyKYAjtARK/RWCgFfYOW0fp2H4HU4/OsoZgAXpVbXPvIu/xvkBoqU 3flFVPMvjPmS5IAZmkjp5aF3Bln8eQ9r9Uh9mLaS+dc6NUJCyxh6zU+wLfnf2DN7ZRpW5L WmOcxeoqzHWUJRLe3mPmu3JTSqS472mfqFE/GaoD+i1i2Fcu6X14Q1bd27g0iptOjoWjVc tYqlUO4SjtgKB0y4B7g31BFAYtyk491DwX8oInhoxUG0I44creo2aLKtNDOqMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d65Q16rbCzfTZ; Wed, 12 Nov 2025 14:29: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 5ACETTFP008802; Wed, 12 Nov 2025 14:29:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACETTqt008799; Wed, 12 Nov 2025 14:29:29 GMT (envelope-from git) Date: Wed, 12 Nov 2025 14:29:29 GMT Message-Id: <202511121429.5ACETTqt008799@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: 6bf611ada212 - main - kmod.mk: Remove a trailing reference to pccarddevs.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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bf611ada21216aefcd830ba71fbf0b5d776ea47 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6bf611ada21216aefcd830ba71fbf0b5d776ea47 commit 6bf611ada21216aefcd830ba71fbf0b5d776ea47 Author: John Baldwin AuthorDate: 2025-11-12 14:29:04 +0000 Commit: John Baldwin CommitDate: 2025-11-12 14:29:04 +0000 kmod.mk: Remove a trailing reference to pccarddevs.h Fixes: 31b35400cf77 ("pccard: Remove more of the PC Card infrastructure") --- sys/conf/kmod.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 0fd2d4050cf1..6e20dce0653f 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -472,7 +472,7 @@ CLEANFILES+= ${_i} .m.h: ${SYSDIR}/tools/makeobjops.awk ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -h -.for _i in mii pccard +.for _i in mii .if !empty(SRCS:M${_i}devs.h) CLEANFILES+= ${_i}devs.h ${_i}devs.h: ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs From nobody Wed Nov 12 14:52:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d65wR2MrZz6H5Lg; Wed, 12 Nov 2025 14:52: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d65wQ3HSzz46Mc; Wed, 12 Nov 2025 14:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762959142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+dvPpbkZBeY6O9neN3VskwSVCnCC5MBMnlgNk4iPtE=; b=gmwxT2Wo9OJjkaNPGOl6nAwtLugYidOicIJHCqxXLvVD5VKU9tfyTs5YTe/svj6Z6BsFxM TK8CDUgsAFU+6I7/64Q/vZBJ7DgOr7GjDv6zavi0pQIskqZtXw2Sb4jhT3GLhQ08CBWcKN k720f2Nnpe4M73GBfEKX7MsSuVoZNRfHYEyFBFZ721C7/xHIfCpeyGbbcV5c1GODa+3dUe F/kO5Qw/JsMAeA32pY+MvgNwtaUPHJmS+bsuLyvvClPQlnv9fR7Xz3R1u5WiOMJ38mG8Wk TXaTzLZ8qO/cakLtJA391vfA/1Z0B7eTa40t4OoErXZad5Z4WWFr9mnINhcXyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762959142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+dvPpbkZBeY6O9neN3VskwSVCnCC5MBMnlgNk4iPtE=; b=OpB69RhMoNbr4yhFEX+kp8+sxNKM42xpH/T94nOat1fJO0i6NlQYM8WR0aXHjkZRA1cc3X RwtOXJ4Dd0xRTzEWI2naW85Vb01GDloyT65+Gh7cbxHsxRqTkbEIsuhL0C4/CXcsY9QwR9 SMbT9qHZuQDKE5X/UYvPbDmEqMN+HUgno0zrT/JnAUWzHWNA/i+FB6XHFJEN0JQzROFgD2 zLj+Q36yTv+jNExVT7sZ46DfmQeCBzMjoxrCmv7YX5h988bjjUKb4NkTb0UNvYkYLmkBBj uwCoO7MG8hvgqu7lRutEKjEctUo8z2mThnltDTboSJf6mHhHfAWSQW6qQSZFdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762959142; a=rsa-sha256; cv=none; b=Nf1BsVET3gAUOKE8tzQDTLd7kyp5XCluHFHVA/iNEJuBMe1+kCeVBeij4Z5809/4KPaLAX 8qDv/lFJgHw3KmRiDo6yyIIShlzPTA5CYFBwALuRf5nfmvTS7Uk3uKEwMZD0AuJgvDXWz0 tCqX/KYMe5sQ+yxqyTNawzW9Onogj8jBiabA+Qv7N053NkjYxMoXP1/rD+plXkR1GCDW1X 937nMEqbdFRvHZeJ2LxbBNZhLTh9nlU/dZXpQyhkGy4W94rjp1ktAhbcAchWxjdT84Y8qN 7TTMEuDtUTaRybMI5BfBDfNEsziSE89wYsGTbqMLDJpvwfTXjGQ2XK/Vow1uVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d65wQ2nM1zgG2; Wed, 12 Nov 2025 14:52: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 5ACEqMdQ063097; Wed, 12 Nov 2025 14:52:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACEqMGg063094; Wed, 12 Nov 2025 14:52:22 GMT (envelope-from git) Date: Wed, 12 Nov 2025 14:52:22 GMT Message-Id: <202511121452.5ACEqMGg063094@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: 7bcd3a04c869 - main - dtrace_priv.4: Document the DTrace priv provider List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 7bcd3a04c8695d797665289ed48ff2d84afb8ac4 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=7bcd3a04c8695d797665289ed48ff2d84afb8ac4 commit 7bcd3a04c8695d797665289ed48ff2d84afb8ac4 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2025-11-06 23:43:19 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2025-11-12 14:51:37 +0000 dtrace_priv.4: Document the DTrace priv provider Fixes: 6efcc2f26ab0 Add static tracing for privilege checking MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53630 --- cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 | 3 +- share/man/man4/Makefile | 1 + share/man/man4/dtrace_priv.4 | 59 ++++++++++++++++++++++++++++ share/man/man9/priv.9 | 3 +- 4 files changed, 64 insertions(+), 2 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 index 5115d16a1286..86887bbe8dd9 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 @@ -20,7 +20,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 8, 2025 +.Dd November 12, 2025 .Dt DTRACE 1 .Os .Sh NAME @@ -1309,6 +1309,7 @@ in .Xr dtrace_lockstat 4 , .Xr dtrace_pid 4 , .Xr dtrace_proc 4 , +.Xr dtrace_priv 4 , .Xr dtrace_profile 4 , .Xr dtrace_sched 4 , .Xr dtrace_sctp 4 , diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 752ae9f165ca..31e3d67e93eb 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1014,6 +1014,7 @@ _dtrace_provs= dtrace_audit.4 \ dtrace_kinst.4 \ dtrace_lockstat.4 \ dtrace_pid.4 \ + dtrace_priv.4 \ dtrace_proc.4 \ dtrace_profile.4 \ dtrace_sched.4 \ diff --git a/share/man/man4/dtrace_priv.4 b/share/man/man4/dtrace_priv.4 new file mode 100644 index 000000000000..97bd4c20eb2c --- /dev/null +++ b/share/man/man4/dtrace_priv.4 @@ -0,0 +1,59 @@ +.\" +.\" Copyright (c) 2025 Mateusz Piotrowski <0mp@FreeBSD.org> +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 12, 2025 +.Dt DTRACE_PRIV 4 +.Os +.Sh NAME +.Nm dtrace_priv +.Nd a DTrace provider for the kernel privilege checking API +.Sh SYNOPSIS +.Nm priv Ns Cm :kernel:priv_check:priv-ok +.Nm priv Ns Cm :kernel:priv_check:priv-err +.Sh DESCRIPTION +The +.Nm priv +provider allows for tracing the +.Xr priv 9 +API. +.Pp +The +.Nm priv Ns Cm :kernel:priv_check:priv-ok +probe fires upon a successful kernel privilege check. +.Pp +The +.Nm priv Ns Cm :kernel:priv_check:priv-err +probe fires upon a failed kernel privilege check. +.Pp +The only argument to the +.Nm priv +probes, +.Fa args[0] , +is the requested privilege number +.Ft int priv . +.Sh EXAMPLES +.Ss Example 1: Tracing Kernel Privilege Check Failures +The following script captures an array of counters, +one for each stack trace leading to a failed kernel privilege check: +.Bd -literal -offset 2n +priv:::priv-err +{ + @traces[stack()] = count(); +} +.Ed +.Sh SEE ALSO +.Xr dtrace 1 , +.Xr tracing 7 , +.Xr priv 9 , +.Xr SDT 9 +.Sh AUTHORS +.An -nosplit +The +.Nm priv +provider was written by +.An Robert N. M. Watson Aq Mt rwatson@FreeBSD.org . +.Pp +This manual page was written by +.An Mateusz Piotrowski Aq Mt 0mp@FreeBSD.org . diff --git a/share/man/man9/priv.9 b/share/man/man9/priv.9 index 80d0542e9bdf..6343940c89fb 100644 --- a/share/man/man9/priv.9 +++ b/share/man/man9/priv.9 @@ -26,7 +26,7 @@ .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 19, 2018 +.Dd November 12, 2025 .Dt PRIV 9 .Os .Sh NAME @@ -106,6 +106,7 @@ privilege checks, and the caller is unable to tell if an access control failure occurred. .Sh SEE ALSO .Xr jail 2 , +.Xr dtrace_priv 4 , .Xr mac 9 , .Xr ucred 9 .Sh AUTHORS From nobody Wed Nov 12 15:43:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d67342qHtz6G9gM; Wed, 12 Nov 2025 15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d67341t5pz3DdH; Wed, 12 Nov 2025 15: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=1762962192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9oIsH+MhcGzkGM5+/MvxeXUyYs7dQaS/qaOb49ZwpJQ=; b=dOtrDAsv9mv9Zf5ADXMd8kqvBR6HnN1/Kukw3YEDqIIupn495z/ZrYpXg+XLrh4gP2q1RS bHnZdpnKf/9rliSN9K79tTp70z1cemOI/IRRlDuz2FE+zKjxJjuuq+r0xKDicaDY4sbYqh bu8bTI2B+zMhRl03+A97j9VIyy5q9BZ5OXy8QirdISv9+j75QaZ3hJWGOJrJ44r3CRAsP9 SV6DUlSbrZNL5rtO3mC05wPzilskDa64QT8EKI/WpNuZ71cCm0ryCyiKjTuu0QqA94dqlv iY3WJwSRXbBp6dd/omVl6ZUdDkiDkXkR3BWOkB2DYUg0laXZ3jJhp1ylQydd1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762962192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9oIsH+MhcGzkGM5+/MvxeXUyYs7dQaS/qaOb49ZwpJQ=; b=me3Ky3inD5nKM8JD4z/RUe+llg3f1B3iGSb/c43b3ii/Vw5U5AnQ/6E/dB4sl519y9S/li hx3kq9XR4qZsMSIFyptCd+rq3mpiO07ByDHvaEk6svGVCLTlAGttdAAeL+Ljkeuddlimf3 8Da/xcbx5ftTwLptipOAcdVIT0U4nmrwbZ1a3wJ1Gp52uHnaMUUPjCEly/vq34IZOg49iZ EaHopT+Hu1BUADp3oNhok0RGY3CewXjDKSy7YS3LeBVp3yoJo1yXsTUGMaoCAYyCZ7gv1g rUJAFg8BXcFyX0rX29fNVsob+ma25+B98Idzmg3uEwtElppSm2WGE7dDE8wNGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762962192; a=rsa-sha256; cv=none; b=jYXqGKueswAyb/ZVJjkLOZXAOjgCw0nxL2seUXU83jJyIc3lgAD9Mo7HfL7EN51hfqcxCF n3L31kSvPkB0aAurs/KEJq2y6zPEVRQu5NtbYcvOqWU8kWtQ8dIuGmvHlQd6NTuxPq7EZm RillBFYuHRxcRrnD1FJBTcQi6quX95SlOhw152GLJC2GfY0l4D11gVkmnV1E6SavVBegnn GGg0tbVUf2NH7wz5UHx3Hf1Vo9JDrFmYN5xvSgIL/xx8MB/J5ryL2ip9JTNFXxK/JSza6V wx9RsiyYTfAFdauj9K74ceR5Lg/gG2mjDFFFazDBV7aLJwf/iC1MgpgemZZhCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d67341PwwzhQ4; Wed, 12 Nov 2025 15: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 5ACFhCAd057511; Wed, 12 Nov 2025 15:43:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACFhCe7057508; Wed, 12 Nov 2025 15:43:12 GMT (envelope-from git) Date: Wed, 12 Nov 2025 15:43:12 GMT Message-Id: <202511121543.5ACFhCe7057508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Tuffli Subject: git: 6e68cd8666e1 - main - vmm: Initialize AMD IOMMU command buffers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chuck X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e68cd8666e14db265f00e9ee59b670ca2964e0d Auto-Submitted: auto-generated The branch main has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=6e68cd8666e14db265f00e9ee59b670ca2964e0d commit 6e68cd8666e14db265f00e9ee59b670ca2964e0d Author: Chuck Tuffli AuthorDate: 2025-11-12 15:39:29 +0000 Commit: Chuck Tuffli CommitDate: 2025-11-12 15:39:29 +0000 vmm: Initialize AMD IOMMU command buffers The driver communicates with the AMD IOMMU by writing to the tail of a fixed length command ring buffer. After issuing cmd_max commands, the tail pointer wraps back to the beginning of the ring buffer. Now, each command buffer entry will contain content from previous commands which may set bits in fields marked as Reserved for the current command. In some cases, the hardware will return an ILLEGAL_COMMAND_ERROR event when this occurs. Fix is to memset the command buffer prior to use. PR: 270966 Reviewed by: corvink, kib, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53692 --- sys/amd64/vmm/amd/amdvi_hw.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sys/amd64/vmm/amd/amdvi_hw.c b/sys/amd64/vmm/amd/amdvi_hw.c index 831c31277570..4dd0339654a9 100644 --- a/sys/amd64/vmm/amd/amdvi_hw.c +++ b/sys/amd64/vmm/amd/amdvi_hw.c @@ -274,6 +274,7 @@ amdvi_get_cmd_tail(struct amdvi_softc *softc) tail = (struct amdvi_cmd *)((uint8_t *)softc->cmd + ctrl->cmd_tail); + memset(tail, 0, sizeof(*tail)); return (tail); } @@ -316,7 +317,6 @@ amdvi_cmd_cmp(struct amdvi_softc *softc, const uint64_t data) uint64_t pa; cmd = amdvi_get_cmd_tail(softc); - KASSERT(cmd != NULL, ("Cmd is NULL")); pa = vtophys(&softc->cmp_data); cmd->opcode = AMDVI_CMP_WAIT_OPCODE; @@ -334,7 +334,6 @@ amdvi_cmd_inv_dte(struct amdvi_softc *softc, uint16_t devid) struct amdvi_cmd *cmd; cmd = amdvi_get_cmd_tail(softc); - KASSERT(cmd != NULL, ("Cmd is NULL")); cmd->opcode = AMDVI_INVD_DTE_OPCODE; cmd->word0 = devid; amdvi_update_cmd_tail(softc); @@ -352,7 +351,6 @@ amdvi_cmd_inv_iommu_pages(struct amdvi_softc *softc, uint16_t domain_id, struct amdvi_cmd *cmd; cmd = amdvi_get_cmd_tail(softc); - KASSERT(cmd != NULL, ("Cmd is NULL")); cmd->opcode = AMDVI_INVD_PAGE_OPCODE; cmd->word1 = domain_id; @@ -383,7 +381,6 @@ amdvi_cmd_inv_iotlb(struct amdvi_softc *softc, uint16_t devid) qlen, RID2PCI_STR(devid)); } cmd = amdvi_get_cmd_tail(softc); - KASSERT(cmd != NULL, ("Cmd is NULL")); #ifdef AMDVI_DEBUG_CMD device_printf(softc->dev, "Invalidate IOTLB devID 0x%x" @@ -406,7 +403,6 @@ amdvi_cmd_inv_intr_map(struct amdvi_softc *softc, struct amdvi_cmd *cmd; cmd = amdvi_get_cmd_tail(softc); - KASSERT(cmd != NULL, ("Cmd is NULL")); cmd->opcode = AMDVI_INVD_INTR_OPCODE; cmd->word0 = devid; amdvi_update_cmd_tail(softc); @@ -420,10 +416,6 @@ amdvi_cmd_inv_intr_map(struct amdvi_softc *softc, static void amdvi_inv_domain(struct amdvi_softc *softc, uint16_t domain_id) { - struct amdvi_cmd *cmd __diagused; - - cmd = amdvi_get_cmd_tail(softc); - KASSERT(cmd != NULL, ("Cmd is NULL")); /* * See section 3.3.3 of IOMMU spec rev 2.0, software note From nobody Wed Nov 12 16:52:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d68bR24Stz6GGyV; Wed, 12 Nov 2025 16:52: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d68bR11dtz3Pqm; Wed, 12 Nov 2025 16:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762966371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j7WaQrCPogH1pW5PbKDVET40qn5cAJAkVT2gpKxBTjo=; b=G/G8n1fQIZJivB1FHC6gr0m3D24mmPum2uNZ+KB56XNX8vnoMs26dGlxn7+C5UkcHrhTOQ bFAdHOmi4t2ZgTpzz38Vx3cG9pSgMWGQxeOUrmHdsT3P7eurrZo5flui+kvPjYdEq9khnl ijrQvlL+VQjn1vzKMq5Qy0ypurdLovphfRRsAOsHn4o3y8aGuefu9OoGnPz5oSdxG0pBld 5SErnPeDe65wj2j7AskKKAGMnvzPtHvn+l2LXH3DpAW47pchIfj3G9ScKKbCtYxOHU3jrm J4J0NsJg5kLAdZDUW/i0QM/yiA6DKU7etfKIi/cySjAUJddUVfW4IoKmmYNzqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762966371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j7WaQrCPogH1pW5PbKDVET40qn5cAJAkVT2gpKxBTjo=; b=LmYcchxjJv74yqJEQB78R94rVWoKhe+/fPoswaRLCD3HU9steYrUec3Z6DjtrZqeJzmnxt 5Q3bWEg8fkRE2pZ8QldkBA26/6pUxzNzHBhOE8mSgEOS3Y7cgcckumIzrDrJRX0CDDtUZQ SfLQBDvMVSjjVsUwAajb2TnGVWDmo0M1F2xDzm7N6is7qMAS4Y3uxJ0QsYn9f8TmUksuIA 3/HXAoY0gqEsH9k1ImIjTWp7Yy6wWHlGJ8EqHk6OBjVRquzb6vHhyFF3a8hMhnJ0o+4ejk ZEf9hesldFLQEPO7lkGOEUkrL6EsfhxpzAQmNxkZHIQsbjJDVlaRa80Mh0bnug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762966371; a=rsa-sha256; cv=none; b=jy+Njdoc1vOKgkGFnGOJoEQyrbh2Req4w2UYqAn5USPhuaRCVwJM6WFrqXpIwYPyxPVNiC H3TG/Y1b+2rwwHnsoM57Ps5SC+lak8Ig2U7W5ezI0/vtKN5ucwNTZf2pc4VEpSXq6ME6dv VApW59h1qqnbokwY0iXiYBFfoW/CW03j+xQtg2aPqlvlG4pO7v/o0/Wc40El0dJo2MKwx1 r40QzOzpKRh0r5blC6cuJnb/C/PY75urypM9k2N7wvwjB67afsZkS5cG7rsissf0GBHFdI kqlb39wbhyrHQnE1m7qk1YP//ZlNy2by12vVQUOpPh3mpAX9ls/tyK1MAiInxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d68bR0clrzjcf; Wed, 12 Nov 2025 16:52: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 5ACGqpbk088585; Wed, 12 Nov 2025 16:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACGqpmI088582; Wed, 12 Nov 2025 16:52:51 GMT (envelope-from git) Date: Wed, 12 Nov 2025 16:52:51 GMT Message-Id: <202511121652.5ACGqpmI088582@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: b6f25aca11c9 - main - arm64/vmm: Fix handling of MDCR_EL2.TDE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: b6f25aca11c98acc49f111f2899ecd4e96c7debd Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b6f25aca11c98acc49f111f2899ecd4e96c7debd commit b6f25aca11c98acc49f111f2899ecd4e96c7debd Author: Mark Johnston AuthorDate: 2025-11-12 15:19:07 +0000 Commit: Mark Johnston CommitDate: 2025-11-12 16:44:58 +0000 arm64/vmm: Fix handling of MDCR_EL2.TDE TDE (make EL2 the target EL for debug exceptions) is set both when setting guest breakpoints and when single-stepping the guest. In some cases we may configure both capabilities, and when subsequently disabling one of them we need to take care to avoid clearing TDE if the other is still configured. MFC after: 3 days Fixes: 75cb949228bb ("arm64/vmm: Add breakpoint and single-stepping support") Sponsored by: CHERI Research Centre (EPSRC grant UKRI3001) --- sys/arm64/vmm/vmm_arm64.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index 991b0d2bc345..aa1361049f49 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -1364,7 +1364,7 @@ vmmops_setcap(void *vcpui, int num, int val) break; if (val != 0) hypctx->mdcr_el2 |= MDCR_EL2_TDE; - else + else if ((hypctx->setcaps & (1ul << VM_CAP_SS_EXIT)) == 0) hypctx->mdcr_el2 &= ~MDCR_EL2_TDE; break; case VM_CAP_SS_EXIT: @@ -1385,7 +1385,8 @@ vmmops_setcap(void *vcpui, int num, int val) hypctx->mdscr_el1 &= ~MDSCR_SS; hypctx->mdscr_el1 |= hypctx->debug_mdscr; hypctx->debug_mdscr &= ~MDSCR_SS; - hypctx->mdcr_el2 &= ~MDCR_EL2_TDE; + if ((hypctx->setcaps & (1ul << VM_CAP_BRK_EXIT)) == 0) + hypctx->mdcr_el2 &= ~MDCR_EL2_TDE; } break; case VM_CAP_MASK_HWINTR: From nobody Wed Nov 12 16:52:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d68bQ1KJMz6GGY1; Wed, 12 Nov 2025 16:52: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d68bQ0TVDz3Q59; Wed, 12 Nov 2025 16:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762966370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ItUp8/bnA9twHH7AaNFMARcwEnZsBDHtZcag7RI2do=; b=kdi9i1I6jUM4Z4VDyh5lbHwIRWCXVIUMjGVu+u8+60nZ2TA4nVu4BWqxu4P0zDHxjeSIXa 5+YlgvBsPGGgnMDaQ+y3e4fNndQQKnssIG+Q78nZn38jDb7HhXQSCFfo1QLYBq5bDpnxNj plVlpU7qJRQDVN0ttU7hVa6AIdeGYAsSEGQ8dmTr+zxZVOsoROZVJXMjHpi2V/RRINn396 CGwyZhfba47Ymdo2zdT8O0d2oYCsrU3VEApZcyDy9d2QhTbAvMiM/6+ZCKYrPVD37vlbSx P3RNCdw3A4+OfS8O68vPgH2VPfbMrli7rmpvT2W1FpS8UPrp3B4l7JPzSIc+wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762966370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ItUp8/bnA9twHH7AaNFMARcwEnZsBDHtZcag7RI2do=; b=u045u44sWpDhVKxzrMsJ8FDYSQgupIK5rJPs4Mbh3TWlrkjzcNW1V2AUKE6q3xIAtGX2pp MhMFdlqqms7GdZ/1DMyI8AP41fk9ZObIn3l3NC1ns8E+ChZAHsMTihGXLq3EblL4+N5gs9 ITi+p4O775ax273ftGyssIgnPLHWrJQFHtUStfh4MK6C4e4A4tN6ew+d9e0hct6IbHEEm3 bjeMUbDsAzs0wOeT5kFI2rw7d/LNgJ3wLMNPJ8VG7+IREzQXbj53a2XzV367w7QuHMOu7k ZEibTxgnpOoN79dkhdAc3Vc2pfanCi4VHXtR+Hu3/gySAmJzhHyULH4SPWCRsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762966370; a=rsa-sha256; cv=none; b=DW6XTuuenBilGsWU/zQX4pDbednb/qJm01wpwXrVvzR8QkurtumLBzzp5Wv+fLUtfhpdzk vHb3hOd+sOzHGxeJtTK6zdoyHakeMiOo1cYY38L+Arrvk5/RQQZStUf62PnHT35cXKA4Iw WnAPmdftnu5G152PBsJlqoEFMVIVMTMG1zjAbI78q6jPJme7eTye9IT+zwOLO4Mz2BdcAh KRmBjKzB4F2YdeJyMksydGj5OGTNwvW1olR/sCUporydbreW3CSal5dnZYU1wR6dyo0Voz n9ajL97AE+Sxcha67dXRe8sorMzErBaVp9jd9xqJWpiLKajyD87MpoZbucKImg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d68bQ04kyzkGs; Wed, 12 Nov 2025 16:52: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 5ACGqn0g088544; Wed, 12 Nov 2025 16:52:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACGqn6a088542; Wed, 12 Nov 2025 16:52:49 GMT (envelope-from git) Date: Wed, 12 Nov 2025 16:52:49 GMT Message-Id: <202511121652.5ACGqn6a088542@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: ac0032344ca2 - main - arm64/vmm: Don't set MDSCR_EL1.KDE when enabling single-stepping List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: ac0032344ca256f758a5eeb0fd6089dd647b0496 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ac0032344ca256f758a5eeb0fd6089dd647b0496 commit ac0032344ca256f758a5eeb0fd6089dd647b0496 Author: Mark Johnston AuthorDate: 2025-11-05 20:54:30 +0000 Commit: Mark Johnston CommitDate: 2025-11-12 16:09:08 +0000 arm64/vmm: Don't set MDSCR_EL1.KDE when enabling single-stepping When VHE mode is enabled, this results in a hang on the host. In particular, when MDSCR_EL2.KDE is set to 1 and the CPU is executing at EL_D, i.e., EL2, debug exceptions are enabled. In non-VHE mode, we call into the guest by trapping to EL2, which implicitly masks debug exceptions by setting PSTATE.D. However, in VHE mode, PSTATE.D remains clear, so when the guest's MDSCR_EL1 value is loaded, we immediately begin single-stepping. In non-VHE mode there is no need to set KDE either, so just stop setting it. Reviewed by: andrew MFC after: 3 days Sponsored by: CHERI Research Centre (EPSRC grant UKRI3001) Differential Revision: https://reviews.freebsd.org/D48965 --- sys/arm64/vmm/vmm_arm64.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index 006239431f29..991b0d2bc345 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -1373,19 +1373,18 @@ vmmops_setcap(void *vcpui, int num, int val) if (val != 0) { hypctx->debug_spsr |= (hypctx->tf.tf_spsr & PSR_SS); - hypctx->debug_mdscr |= hypctx->mdscr_el1 & - (MDSCR_SS | MDSCR_KDE); + hypctx->debug_mdscr |= (hypctx->mdscr_el1 & MDSCR_SS); hypctx->tf.tf_spsr |= PSR_SS; - hypctx->mdscr_el1 |= MDSCR_SS | MDSCR_KDE; + hypctx->mdscr_el1 |= MDSCR_SS; hypctx->mdcr_el2 |= MDCR_EL2_TDE; } else { hypctx->tf.tf_spsr &= ~PSR_SS; hypctx->tf.tf_spsr |= hypctx->debug_spsr; hypctx->debug_spsr &= ~PSR_SS; - hypctx->mdscr_el1 &= ~(MDSCR_SS | MDSCR_KDE); + hypctx->mdscr_el1 &= ~MDSCR_SS; hypctx->mdscr_el1 |= hypctx->debug_mdscr; - hypctx->debug_mdscr &= ~(MDSCR_SS | MDSCR_KDE); + hypctx->debug_mdscr &= ~MDSCR_SS; hypctx->mdcr_el2 &= ~MDCR_EL2_TDE; } break; From nobody Wed Nov 12 17:09:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d68yd0pHKz6GHBl; Wed, 12 Nov 2025 17:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d68yd01bpz3Rt4; Wed, 12 Nov 2025 17:09:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762967369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lQd7Bv8GMx9FNaRnd8WPtBBJLyGFWjo7jOiu0F4J0MY=; b=Y++3x35q24p1jaBn9SxtSfjHG2jxDAdsNTlfrny5bo28Kf0EMj8mVF2E3BEmAnGE9NKrBm aTqODrsTfVi29/SbNecVFpUIn1b21Yq2WJa2LOjJBBFDx+/aq7t/jx1KGGk/wU2VZrqR84 EW+9pjxVoCGWdz7IIcrgiShBzMMSC9PLG+y6nTpIZ88dfnltd3wg/OOutCRgeuk2aU/kBg oDbsyEUjQ23LY+9H43YTiPbk3MuU8NTXNR8luvEGjYOBGp/fr/OQYZNhFJAlFdKNg12ZFr tuc1oO4vM/7GXbz7YNfWDG2AXxhjkqyB1ua6M5ybdamZJYd8x1hrIDRnPr9h+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762967369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lQd7Bv8GMx9FNaRnd8WPtBBJLyGFWjo7jOiu0F4J0MY=; b=dJN7UEo/zubhNhyg3M/F7WcXpUmh2CiBtGzLcarDkBIn435fplcwtjIpDkQmaeGPsPjfs+ Y7PZOr9Q/GGXWjKXsaLbXWNB+Ico8XFLxyiQ6MipQh7nU7wOt+evJe2HToz7fZ1PFW4UJW tJnj0K5GChG6PEf9baEoiq2FVe10swU8XS7kPcWOCSCMayk0ROb3Zw1jXyOziIvQMel7xF luklul+TVT/ZAQC5DBe7vdvT1Ebj/JQ4B9sZaxQXhBkhF+919LBuDQQyoHHqTFTCDl91mA QKTHJ2Mnst2rD1I5JJDghKkgXWVWMuqdAUCH5Jz77cWoGgHBxm8oRQRsl0x0DQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762967369; a=rsa-sha256; cv=none; b=namVziYngm49aVffj9ym211S4VoIEDcJzcZhJJa4i6WeHa62+sjr97QDfb/sONQSD9kdso Ev2CQGzjFWFKg/4ntFyx4Y2ntN5UyKWVfpskMiXSyEBCaJPnqYjh94loDRzbeoaeJS1w5S 1zhlu31gRcsMEUAzHYsYs79H+qXE+TQdb7zFZ8iEV4jiqvwuOYmuuJ1hclHnwoRRHE8leE Z2kpFwFmIboUZCejC4LYQOZE8R6RMTrDOquBfMjdH7ruC9tOb4mRaXHtDw6qCG3TQpCVZy xqJAmicjCxINWOMDXoqTCkO4lH1x/0P7wKwmax9yrVdUBWUmYsDiYpvHwT7Xsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d68yc6ZhRzk47; Wed, 12 Nov 2025 17:09: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 5ACH9SGQ010685; Wed, 12 Nov 2025 17:09:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACH9S1x010681; Wed, 12 Nov 2025 17:09:28 GMT (envelope-from git) Date: Wed, 12 Nov 2025 17:09:28 GMT Message-Id: <202511121709.5ACH9S1x010681@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: 5b9fba1cb0d8 - main - Retire pccard(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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b9fba1cb0d84ee297908ec4d575c33cf1f68ad5 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5b9fba1cb0d84ee297908ec4d575c33cf1f68ad5 commit 5b9fba1cb0d84ee297908ec4d575c33cf1f68ad5 Author: Muhammad Moinur Rahman AuthorDate: 2025-11-12 17:01:18 +0000 Commit: Ed Maste CommitDate: 2025-11-12 17:09:09 +0000 Retire pccard(4) pccard has been declared obsolete for a long time and also the support has been removed but the man page still exists. It mentions being scheduled to be removed before 13.0 but it still exists in the tree. [Extracted from review D53434] Reviewed by: emaste Fixes: 31b35400c ("pccard: Remove more of the PC Card infrastructure") --- ObsoleteFiles.inc | 3 ++ share/man/man4/Makefile | 1 - share/man/man4/cardbus.4 | 1 - share/man/man4/pccard.4 | 78 ------------------------------------- share/man/man4/pccbb.4 | 3 +- share/man/man4/xl.4 | 1 - share/man/man9/DEVICE_DETACH.9 | 5 +-- share/man/man9/bus_alloc_resource.9 | 5 --- usr.sbin/dumpcis/dumpcis.8 | 3 +- 9 files changed, 6 insertions(+), 94 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index e415c2c5f9fe..ad3d1fe955e3 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20251112: Remove pccard(4) +OLD_FILES+=share/man/man4/pccard.4 + # 20251028: Remove hifn(4) OLD_FILES+=share/man/man4/hifn.4 diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 31e3d67e93eb..3b64af5fd898 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -459,7 +459,6 @@ MAN= aac.4 \ p9fs.4 \ pass.4 \ pca954x.4 \ - pccard.4 \ pccbb.4 \ pcf.4 \ pcf8574.4 \ diff --git a/share/man/man4/cardbus.4 b/share/man/man4/cardbus.4 index 3b422b44c464..fa4bce65e095 100644 --- a/share/man/man4/cardbus.4 +++ b/share/man/man4/cardbus.4 @@ -52,5 +52,4 @@ Non-zero value causes the CIS parsing of the 32-bit CardBus card to be much more verbose and include a complete CIS dump. .El .Sh SEE ALSO -.Xr pccard 4 , .Xr pccbb 4 diff --git a/share/man/man4/pccard.4 b/share/man/man4/pccard.4 deleted file mode 100644 index cec07b2336cb..000000000000 --- a/share/man/man4/pccard.4 +++ /dev/null @@ -1,78 +0,0 @@ -.\" -.\" Copyright (c) 2002 M. Warner Losh -.\" -.\" 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. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" 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 August 18, 2020 -.Dt PCCARD 4 -.Os -.Sh NAME -.Nm pccard -.Nd PC Card bus driver -.Sh SYNOPSIS -.Cd device pccard -.Sh DEPRECATION NOTICE -This driver is scheduled for removal prior to the release of -.Fx 13.0 . -.Sh DESCRIPTION -The -.Nm -driver implements the PC Card bus. -The -.Nm -driver supports all PC Card bridges in the system. -.Sh TUNABLES -The driver supports the following tunable parameters, which may be -added to -.Pa /boot/loader.conf -or set via the -.Xr sysctl 8 -command: -.Bl -tag -width ".Cm hw.pccard.cis_debug" -compact -.It Cm hw.pccard.debug -Non-zero values cause more verbose information to be printed when a -16-bit PC Card is inserted or removed. -.It Cm hw.pccard.cis_debug -Non-zero value causes the CIS parsing of the 16-bit PC Card to be much -more verbose and include a complete CIS dump. -.El -.Sh FILES -.Bl -tag -width ".Pa /dev/pccard0.cis" -compact -.It Pa /dev/pccard0.cis -This exclusive-use device will report all the CIS chains present in a -PC Card, if a 16-bit PC Card is inserted in the slot. -Only one user at a time may access the CIS. -The CIS is presented as the relevant byte stream from the PC Card. -For CIS tuples in Attribute Memory (the default), only the even -locations are presented (the ODD locations are undefined per the -standard). -For CIS tuples in Common Memory, every byte is presented to the user. -Decoding of the CIS tuples is done via a userland program. -All tuples are presented to the user. -.El -.Sh SEE ALSO -.Xr cardbus 4 , -.\" .Xr mecia 4 , -.Xr pccbb 4 -.\" .Xr tcic 4 -.Rs -.%T "PC Card Standard, Release 8" -.Re diff --git a/share/man/man4/pccbb.4 b/share/man/man4/pccbb.4 index 3200e8b2d2e2..1c6cb2045033 100644 --- a/share/man/man4/pccbb.4 +++ b/share/man/man4/pccbb.4 @@ -176,5 +176,4 @@ debugging problems with the bridge chipset. .El .Sh SEE ALSO .Xr cardbus 4 , -.Xr exca 4 , -.Xr pccard 4 +.Xr exca 4 diff --git a/share/man/man4/xl.4 b/share/man/man4/xl.4 index 309434154f4e..591703ac93cb 100644 --- a/share/man/man4/xl.4 +++ b/share/man/man4/xl.4 @@ -253,7 +253,6 @@ It is probably safe to ignore them. .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , -.Xr pccard 4 , .Xr polling 4 , .Xr ifconfig 8 .Sh HISTORY diff --git a/share/man/man9/DEVICE_DETACH.9 b/share/man/man9/DEVICE_DETACH.9 index 5f1bf7a3295f..856c6138ed4c 100644 --- a/share/man/man9/DEVICE_DETACH.9 +++ b/share/man/man9/DEVICE_DETACH.9 @@ -41,9 +41,7 @@ Detach a device. This can be called if the user is replacing the driver software or if a device is about to be physically removed from -the system (e.g.\& for -.Xr pccard 4 -devices). +the system. .Pp The method should deallocate any system resources allocated during the .Xr DEVICE_ATTACH 9 @@ -52,7 +50,6 @@ etc.) .Sh RETURN VALUES Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO -.Xr pccard 4 , .Xr device 9 , .Xr DEVICE_ATTACH 9 , .Xr DEVICE_IDENTIFY 9 , diff --git a/share/man/man9/bus_alloc_resource.9 b/share/man/man9/bus_alloc_resource.9 index 5d309229a34e..210abb3074e1 100644 --- a/share/man/man9/bus_alloc_resource.9 +++ b/share/man/man9/bus_alloc_resource.9 @@ -157,11 +157,6 @@ resource permits contemporaneous sharing. It should always be set unless you know that the resource cannot be shared. It is the bus driver's task to filter out the flag if the bus does not support sharing. -For example, -.Xr pccard 4 -cannot share IRQs while -.Xr cardbus 4 -can. .It Dv RF_UNMAPPED do not establish implicit mapping when activated via .Xr bus_activate_resource 9 . diff --git a/usr.sbin/dumpcis/dumpcis.8 b/usr.sbin/dumpcis/dumpcis.8 index c40e5fe75d40..9da5ed9f3bdf 100644 --- a/usr.sbin/dumpcis/dumpcis.8 +++ b/usr.sbin/dumpcis/dumpcis.8 @@ -38,8 +38,7 @@ The utility translates a raw CIS stream into human readable form. .Sh SEE ALSO .Xr cardbus 4 , -.Xr cbb 4 , -.Xr pccard 4 +.Xr cbb 4 .Sh AUTHORS The original version was written by .An Warner Losh Aq Mt imp@FreeBSD.org . From nobody Wed Nov 12 17:48:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d69ql6jkRz6GM2w; Wed, 12 Nov 2025 17:48: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d69ql5tnWz3VkH; Wed, 12 Nov 2025 17:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762969715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kCH1qhPsx9HJrmGivEj3QRZ1zaW9YEznfENcIszjKbY=; b=oBJdP9xPkqhS1BHvdNzhoGvLWXz+6hcIeeDuSHgEsgTbMoaik1O9I5evIoUXj7Tq/+XCVN nIK9e3rI+jeB04/XdTNmV4+Hn5QTxU53HLDq1zn0AOD5XfbIU2OfegDnQONz1j+SZSqePD zOPgY3VfyUFYxA29P/u9Pvht9wLXw6j+ubPVyxcy4ntY/+n7w7GArWCwDFp2sahQlQi9dI CNNHUE00mXi6UUkF3jbLng56gBiK6l7yjy1QQXXb0jBX+fD397W8K+2GbN5Ew1YkCqjvMD CdJOBl9d4VQztHZJM9f7kN8TFuCQPg3Y/O9y0Hjgp59cK2fdtaoYZAL+kdURFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762969715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kCH1qhPsx9HJrmGivEj3QRZ1zaW9YEznfENcIszjKbY=; b=ftLu53kLcseAS/RnAMDRyNbJ6+9tSnlgbawlaHMLq6D/LMaVQS7461D2T6D68Rk65nqFAA nB9OIhDxCEIbcht7Vg9kIpa1Q03x5WDINN4WJFOfNzUfgnnlhcb/dFz9qIPO9UDYzxL5Sw 7vrWJoIxeLEuDdIaxNejcFoqAdi1FtGnSngUMF5FOrZfUdv7huKS0Lce8bqdmEuQXuuLkO NxG/avpav9JDFbJSDXzM/MR8JUOWDBuB5Vxg9mRT2mc5f1LF1xhg/KANnCkcjWUmjmA0iW gcsgWL4JGPr+DjKucCNAq6onmNyZdq3oDL4d6Mrm5Uqsm2aqDKhmuKxBRXFPMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762969715; a=rsa-sha256; cv=none; b=EkNS7+6OJZAVfJHgXABK22RcIoTYstgAFzldoeUqKKytC3tVC3LKFuy6G7+n1XprTWhlz2 25tssJL125wEIRdPSiULjgpUKJuhC50lDtmKN2rK+w2vJkWk3upNgKZHb1StkiUbf0rT7C rz4JJaPtHtl343Bze/QsbjXsMzO4dw2Ojgau8kpOYykvl08KHC4dfNPQeAvxcpvHFyoAtc B0R+BrBaH++sj2wRLt+lN5+/K7XFPwRwiy3Q94io3SYn4WUKqo4DvH4sn3KOY1nRxE8vR+ 1jtcF14X0vvJvhTDEUKijriNdCZcueQiKVxHS4CmthCb5NYMYF03TNso1MJHHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d69ql5RT2zl83; Wed, 12 Nov 2025 17:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5ACHmZeV084372; Wed, 12 Nov 2025 17:48:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACHmZE6084369; Wed, 12 Nov 2025 17:48:35 GMT (envelope-from git) Date: Wed, 12 Nov 2025 17:48:35 GMT Message-Id: <202511121748.5ACHmZE6084369@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: 736b7ec362a3 - main - arm64: Add the PMBSR_MSS_BSC_BUFFER_FILLED define List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 736b7ec362a3db58007361ecbbb62dfb4bb3031e Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=736b7ec362a3db58007361ecbbb62dfb4bb3031e commit 736b7ec362a3db58007361ecbbb62dfb4bb3031e Author: Sarah Walker AuthorDate: 2025-11-12 16:55:28 +0000 Commit: Andrew Turner CommitDate: 2025-11-12 17:15:44 +0000 arm64: Add the PMBSR_MSS_BSC_BUFFER_FILLED define This will be used by the SPE driver. (commit message by andrew@) Reviewed by: andrew Sponsored by: Arm Ltd --- sys/arm64/include/armreg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index aa9b672ad85a..27b02c44cd76 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -2251,6 +2251,7 @@ #define PMBSR_MSS_SHIFT 0 #define PMBSR_MSS_MASK (UL(0xffff) << PMBSR_MSS_SHIFT) #define PMBSR_MSS_BSC_MASK (UL(0x3f) << PMBSR_MSS_SHIFT) +#define PMBSR_MSS_BSC_BUFFER_FILLED (UL(0x01) << PMBSR_MSS_SHIFT) #define PMBSR_MSS_FSC_MASK (UL(0x3f) << PMBSR_MSS_SHIFT) #define PMBSR_COLL_SHIFT 16 #define PMBSR_COLL (UL(0x1) << PMBSR_COLL_SHIFT) From nobody Wed Nov 12 17:48:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d69qn0xHrz6GMJZ; Wed, 12 Nov 2025 17:48: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d69qm6nwxz3VY8; Wed, 12 Nov 2025 17:48:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762969717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eD44yuxAGt6QJxy1cTFOXirWblZrhvPDfI8Ev61NyrQ=; b=vctFMG2omD3JFzFrPMJRbF2NvURVAc4BIfW+y2HwCDLLsUYGLsztzOi9ndNsufYj7nbJv0 jylw99b9CLxfBFH8UeCaGC25fTZDtSr1LgStp8FgfBNghRERKv5XjKj4HpWbnDnRfH3CUJ IuL53ZWP8C8uRCQWUhjpjl+UmM1oGUZf1FfzbWu/hl5kUQYOmgV7XSpxsMVPb+U8COmTVJ 4dll2eMeMfPvvQcrHNjEMl6OcBJcMqhCuw8OHnJrN1pv0a+KgC7aUj+TwZbZRe2I6ZRSHn p7E0omgYtmOtwA7VQQO1R7EST1+4OdQX20gYcaLWPyCuZ+hJi6g5/tNzDICLnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762969717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eD44yuxAGt6QJxy1cTFOXirWblZrhvPDfI8Ev61NyrQ=; b=k4xcz3Yk4PH/H8gXs4fvn517Ub1VuvSXj8WqRkLESiDgUom8+2y4A1RaHK4gWVHO8kt2Jm ZTAUdNavadA79+zu99sHN+PQBgfuJYN8VSRaGQ5P3Jb6H1tvC8NCIHEVJ/AF9SKC8n24b5 vQVjjmj61BS4JEHpKCpoPDjFfHHX/aH6n3H3lf9ohu0bt/de91oWcV+qWDjvVciwfdJ5ao Je3/B9QucvoOfPAAlV4RntZZZayUeb0ExpNm52WZilJAgJ4/tUHgcflkYXRIr3KcwyD1/9 D6E3JQuli4mF5t+3cpnXDcv+Wy5He7/AdXcDy/66P9d4d5Ru2lEt/6rCTj52Lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762969717; a=rsa-sha256; cv=none; b=YCL682bYbg4W3TmFVrl1PsP2uZ1bYOji9jlJ0UJG79sf0BGRfbeFe0VU1mXb7Cx/6zNAx0 CbeUWESl4J15Soc/Mhw9No8YDDhwZkKNPNv/1iUMqsWN0E0OGS027qW7OjaGt2CCtUb6rk G8IuH6eNOygIzSrNDbj4ywjvyKG4LJLZ3tZ1dRa9Ls1FFS1u4ySsUellWLhofAlyiUDgda kqYLONezC7o0VQxqh+xNK5wTUhOGtx+s0ma0npdXZUmZW6WqPGzH1wEVrElOas65ctKYdq hrMLpjI0NADysHXyqZdWUnTNcUzQgVBVw+NDCUjtnB+oAgOgpirKawOeDxI8yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d69qm6NzVzkxf; Wed, 12 Nov 2025 17:48: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 5ACHmaZe084410; Wed, 12 Nov 2025 17:48:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACHmaQd084407; Wed, 12 Nov 2025 17:48:36 GMT (envelope-from git) Date: Wed, 12 Nov 2025 17:48:36 GMT Message-Id: <202511121748.5ACHmaQd084407@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: be0ded8d64e3 - main - arm64: Add a define for MDCR_EL2_E2PB_EL1_0_NO_TRAP List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: be0ded8d64e3e8c7bf6bf59b236a086f6a98e7b6 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=be0ded8d64e3e8c7bf6bf59b236a086f6a98e7b6 commit be0ded8d64e3e8c7bf6bf59b236a086f6a98e7b6 Author: Sarah Walker AuthorDate: 2025-11-12 16:57:29 +0000 Commit: Andrew Turner CommitDate: 2025-11-12 17:15:44 +0000 arm64: Add a define for MDCR_EL2_E2PB_EL1_0_NO_TRAP This will be used by the SPE driver. (commit message by andrew@) Reviewed by: andrew Sponsored by: Arm Ltd --- sys/arm64/include/hypervisor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/include/hypervisor.h b/sys/arm64/include/hypervisor.h index 7d405e63cd8d..f3d7027269c9 100644 --- a/sys/arm64/include/hypervisor.h +++ b/sys/arm64/include/hypervisor.h @@ -268,6 +268,7 @@ #define MDCR_EL2_TDRA (0x1UL << MDCR_EL2_TDRA_SHIFT) #define MDCR_EL2_E2PB_SHIFT 12 #define MDCR_EL2_E2PB_MASK (0x3UL << MDCR_EL2_E2PB_SHIFT) +#define MDCR_EL2_E2PB_EL1_0_NO_TRAP (0x3UL << MDCR_EL2_E2PB_SHIFT) #define MDCR_EL2_TPMS_SHIFT 14 #define MDCR_EL2_TPMS (0x1UL << MDCR_EL2_TPMS_SHIFT) #define MDCR_EL2_EnSPM_SHIFT 15 From nobody Wed Nov 12 17:48:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d69qp1qRPz6GM5T; Wed, 12 Nov 2025 17:48:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d69qp0nHlz3Vgy; Wed, 12 Nov 2025 17:48:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762969718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tcfVHOZw8ZVeakBAdb7wyPYoIcLRjb7ZjnLaQWQeKE=; b=Gl0qnwPDJCZoquytBDVS/iGEC1gL4OrkQccDivIGrcUdAYGHiOusuHBNtLpeYeFXaZygrw fIAlOJvzN0YZQTzEmx1RZ3F5b1SepzSUahF9Aw/U1yEhKqXkH4gs2Am0zQb9jBfkbSFl+V tp5iBKdX9xRmiTaZW5XeILRRVzSo2Dpj2GPo7Ju1A6SBmnWSsnmduoTgdcnwnKAOPFx0Us UhhgZnMCshSufk5jImUuJ4L87I0Q8FkrPNMFPSMktPEG1/lBSE6MMIn0cY2I/LHG7ViLBD M+ygBDcrWBQWYMUGAY/EKn8bJKbamzuA+KBveDbbTCt4sLSme14rXKhDTeexIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762969718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tcfVHOZw8ZVeakBAdb7wyPYoIcLRjb7ZjnLaQWQeKE=; b=bF9M0SFTPXOGXijYutANPHv1cymK/se6tBNufyPnhRvqofM8TjH+ydDgb1+ddw4YbV85oQ 10A7SxaCIgcwH7YxZU7qGzgQMJ8sIujg/fOZizPHfuOn55bYMmPIArpDVfaR2WAe6uk8WL msc3OQ2DDVpemXI917CUYGUBjakkg9TuOSvCMWxWT0I4Ox1ngz2j2vSzMt3+ryQ8hW2DOs sU4F6tPsrya8Sk/Z5XL7Xtfx0PWN9xDZ5IR2tXJsPhotGqLU8/LN/N7ONhnIbE+59/Trch 0KWGiYwWANFD/QJnhqTR5aqoPgJusWhQe3/e6NafJjsoc/7r7ab0ib9+N7+3tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762969718; a=rsa-sha256; cv=none; b=auCMLMrCBDgqaGn+o0H8ZrwEdtnq+TKUpYhA/4zHr9Qy9AUEys8xlpZ3ZVQIgN+EpX1DUi 94L9/4UVsCqaK86OO/9kwW+Dh+4HBs2NM07so+ot+mWaMMM+DhQx37QirWmpzEQ9NYdmVf 02QGlhJfX5mk1ObYF3eI/ww8nCi9/4uENFKolLEuKFzj/Kdn6sGhwNBTaJwIpsJtPwafRw bOZ6eN7gkP+9SAVBhiGg/bPT+n+ySnZH4+pzF3RuGKb7jCsLN3pSsO/zGw76d8M7MRsx+u CWnhaksy6kVpCNNhFKL17Qsk2QfNREx//UqL4IrjWVG0DTMeBTBTG2vwTwGkiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d69qn6nthzl5l; Wed, 12 Nov 2025 17:48: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 5ACHmbQL084447; Wed, 12 Nov 2025 17:48:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACHmbWU084441; Wed, 12 Nov 2025 17:48:37 GMT (envelope-from git) Date: Wed, 12 Nov 2025 17:48:37 GMT Message-Id: <202511121748.5ACHmbWU084441@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: 68f185ccc9f8 - main - arm64: Add Arm SPE 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68f185ccc9f8f9498d536f4737d888b37cf11882 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=68f185ccc9f8f9498d536f4737d888b37cf11882 commit 68f185ccc9f8f9498d536f4737d888b37cf11882 Author: Zachary Leaf AuthorDate: 2025-11-12 16:35:05 +0000 Commit: Andrew Turner CommitDate: 2025-11-12 17:40:41 +0000 arm64: Add Arm SPE support Add support for the Arm Statistical Profiling Extension (SPE). This is an optional extension added in Armv8.1 to provide profiling of software using randomised instruction sampling. This adds the initial driver, and attached it to the hardware tracing framework, hwt(4), in CPU mode to allow tracing of all threads on a given CPU. (commit message by andrew@) Co-authored-by: Sarah Walker Co-authored-by: Andrew Turner Reviewed by: andrew Sponsored by: Arm Ltd Sponsored by: The FreeBSD Foundation (early driver) Differential Revision: https://reviews.freebsd.org/D46241 --- sys/arm64/arm64/locore.S | 4 + sys/arm64/spe/arm_spe.h | 77 ++++++ sys/arm64/spe/arm_spe_acpi.c | 146 ++++++++++ sys/arm64/spe/arm_spe_backend.c | 586 ++++++++++++++++++++++++++++++++++++++++ sys/arm64/spe/arm_spe_dev.c | 323 ++++++++++++++++++++++ sys/arm64/spe/arm_spe_dev.h | 162 +++++++++++ sys/arm64/spe/arm_spe_fdt.c | 75 +++++ sys/conf/files.arm64 | 4 + sys/modules/Makefile | 5 + sys/modules/spe/Makefile | 24 ++ 10 files changed, 1406 insertions(+) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 3ec12140f139..c22d5fe76468 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -445,6 +445,10 @@ LENTRY(enter_kernel_el) ldr x3, =(CNTHCTL_EL1PCTEN_NOTRAP | CNTHCTL_EL1PCEN_NOTRAP) ldr x5, =(PSR_DAIF | PSR_M_EL1h) + /* Enable SPE at EL1 via Monitor Debug Configuration Register */ + mov x6, MDCR_EL2_E2PB_EL1_0_NO_TRAP + msr mdcr_el2, x6 + .Ldone_vhe: msr cptr_el2, x2 diff --git a/sys/arm64/spe/arm_spe.h b/sys/arm64/spe/arm_spe.h new file mode 100644 index 000000000000..5dba20673a77 --- /dev/null +++ b/sys/arm64/spe/arm_spe.h @@ -0,0 +1,77 @@ +/*- + * 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. + */ + +#ifndef _ARM64_ARM_SPE_H_ +#define _ARM64_ARM_SPE_H_ + +/* kqueue events */ +#define ARM_SPE_KQ_BUF 138 +#define ARM_SPE_KQ_SHUTDOWN 139 +#define ARM_SPE_KQ_SIGNAL 140 + +/* spe_backend_read() u64 data encoding */ +#define KQ_BUF_POS_SHIFT 0 +#define KQ_BUF_POS (1 << KQ_BUF_POS_SHIFT) +#define KQ_PARTREC_SHIFT 1 +#define KQ_PARTREC (1 << KQ_PARTREC_SHIFT) +#define KQ_FINAL_BUF_SHIFT 2 +#define KQ_FINAL_BUF (1 << KQ_FINAL_BUF_SHIFT) + +enum arm_spe_ctx_field { + ARM_SPE_CTX_NONE, + ARM_SPE_CTX_PID, + ARM_SPE_CTX_CPU_ID +}; + +enum arm_spe_profiling_level { + ARM_SPE_KERNEL_AND_USER, + ARM_SPE_KERNEL_ONLY, + ARM_SPE_USER_ONLY +}; +struct arm_spe_config { + /* Minimum interval is IMP DEF up to maximum 24 bit value */ + uint32_t interval; + + /* Profile kernel (EL1), userspace (EL0) or both */ + enum arm_spe_profiling_level level; + + /* + * Configure context field in SPE records to store either the + * current PID, the CPU ID or neither + * + * In PID mode, kernel threads without a process context are + * logged as PID 0 + */ + enum arm_spe_ctx_field ctx_field; +}; + +struct arm_spe_svc_buf { + uint32_t ident; + uint8_t buf_idx : 1; +}; + +#endif /* _ARM64_ARM_SPE_H_ */ diff --git a/sys/arm64/spe/arm_spe_acpi.c b/sys/arm64/spe/arm_spe_acpi.c new file mode 100644 index 000000000000..b9f40448d940 --- /dev/null +++ b/sys/arm64/spe/arm_spe_acpi.c @@ -0,0 +1,146 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Arm Ltd + * Copyright (c) 2022 The FreeBSD Foundation + * + * Portions of this software were developed by Andrew Turner 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 + +static device_identify_t arm_spe_acpi_identify; +static device_probe_t arm_spe_acpi_probe; + +static device_method_t arm_spe_acpi_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, arm_spe_acpi_identify), + DEVMETHOD(device_probe, arm_spe_acpi_probe), + + DEVMETHOD_END, +}; + +DEFINE_CLASS_1(spe, arm_spe_acpi_driver, arm_spe_acpi_methods, + sizeof(struct arm_spe_softc), arm_spe_driver); + +DRIVER_MODULE(spe, acpi, arm_spe_acpi_driver, 0, 0); + +struct madt_data { + u_int irq; + bool found; + bool valid; +}; + +static void +madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg) +{ + ACPI_MADT_GENERIC_INTERRUPT *intr; + struct madt_data *madt_data; + u_int irq; + + madt_data = (struct madt_data *)arg; + + /* Exit early if we are have decided to not attach */ + if (!madt_data->valid) + return; + + switch(entry->Type) { + case ACPI_MADT_TYPE_GENERIC_INTERRUPT: + intr = (ACPI_MADT_GENERIC_INTERRUPT *)entry; + irq = intr->SpeInterrupt; + + if (irq == 0) { + madt_data->valid = false; + } else if (!madt_data->found) { + madt_data->found = true; + madt_data->irq = irq; + } else if (madt_data->irq != irq) { + madt_data->valid = false; + } + break; + + default: + break; + } +} + +static void +arm_spe_acpi_identify(driver_t *driver, device_t parent) +{ + struct madt_data madt_data; + ACPI_TABLE_MADT *madt; + device_t dev; + vm_paddr_t physaddr; + + physaddr = acpi_find_table(ACPI_SIG_MADT); + if (physaddr == 0) + return; + + madt = acpi_map_table(physaddr, ACPI_SIG_MADT); + if (madt == NULL) { + device_printf(parent, "spe: Unable to map the MADT\n"); + return; + } + + madt_data.irq = 0; + madt_data.found = false; + madt_data.valid = true; + + acpi_walk_subtables(madt + 1, (char *)madt + madt->Header.Length, + madt_handler, &madt_data); + + if (!madt_data.found || !madt_data.valid) + goto out; + + MPASS(madt_data.irq != 0); + + dev = BUS_ADD_CHILD(parent, 0, "spe", -1); + if (dev == NULL) { + device_printf(parent, "add spe child failed\n"); + goto out; + } + + BUS_SET_RESOURCE(parent, dev, SYS_RES_IRQ, 0, madt_data.irq, 1); + +out: + acpi_unmap_table(madt); +} + +static int +arm_spe_acpi_probe(device_t dev) +{ + device_set_desc(dev, "ARM Statistical Profiling Extension"); + return (BUS_PROBE_NOWILDCARD); +} diff --git a/sys/arm64/spe/arm_spe_backend.c b/sys/arm64/spe/arm_spe_backend.c new file mode 100644 index 000000000000..b4e1132f9cbc --- /dev/null +++ b/sys/arm64/spe/arm_spe_backend.c @@ -0,0 +1,586 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Arm Ltd + * Copyright (c) 2022 The FreeBSD Foundation + * + * Portions of this software were developed by Andrew Turner 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. + */ + +/* + * Arm Statistical Profiling Extension (SPE) backend + * + * Basic SPE operation + * + * SPE is enabled and configured on a per-core basis, with each core requiring + * separate code to enable and configure. Each core also requires a separate + * buffer passed as config where the CPU will write profiling data. When the + * profiling buffer is full, an interrupt will be taken on the same CPU. + * + * Driver Design + * + * - HWT allocates a large single buffer per core. This buffer is split in half + * to create a 2 element circular buffer (aka ping-pong buffer) where the + * kernel writes to one half while userspace is copying the other half + * - SMP calls are used to enable and configure each core, with SPE initially + * configured to write to the first half of the buffer + * - When the first half of the buffer is full, a buffer full interrupt will + * immediately switch writing to the second half. The kernel adds the details + * of the half that needs copying to a FIFO STAILQ and notifies userspace via + * kqueue by sending a ARM_SPE_KQ_BUF kevent with how many buffers on the + * queue need servicing + * - The kernel responds to HWT_IOC_BUFPTR_GET ioctl by sending details of the + * first item from the queue + * - The buffers pending copying will not be overwritten until an + * HWT_IOC_SVC_BUF ioctl is received from userspace confirming the data has + * been copied out + * - In the case where both halfs of the buffer are full, profiling will be + * paused until notification via HWT_IOC_SVC_BUF is received + * + * Future improvements and limitations + * + * - Using large buffer sizes should minimise pauses and loss of profiling + * data while kernel is waiting for userspace to copy out data. Since it is + * generally expected that consuming (copying) this data is faster than + * producing it, in practice this has not so far been an issue. If it does + * prove to be an issue even with large buffer sizes then additional buffering + * i.e. n element circular buffers might be required. + * + * - kqueue can only notify and queue one kevent of the same type, with + * subsequent events overwriting data in the first event. The kevent + * ARM_SPE_KQ_BUF can therefore only contain the number of buffers on the + * STAILQ, incrementing each time a new buffer is full. In this case kqueue + * serves just as a notification to userspace to wake up and query the kernel + * with the appropriate ioctl. An alternative might be custom kevents where + * the kevent identifier is encoded with something like n+cpu_id or n+tid. In + * this case data could be sent directly with kqueue via the kevent data and + * fflags elements, avoiding the extra ioctl. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include + +MALLOC_DECLARE(M_ARM_SPE); + +extern u_int mp_maxid; +extern struct taskqueue *taskqueue_arm_spe; + +int spe_backend_disable_smp(struct hwt_context *ctx); + +static device_t spe_dev; +static struct hwt_backend_ops spe_ops; +static struct hwt_backend backend = { + .ops = &spe_ops, + .name = "spe", + .kva_req = 1, +}; + +static struct arm_spe_info *spe_info; + +static int +spe_backend_init_thread(struct hwt_context *ctx) +{ + return (ENOTSUP); +} + +static void +spe_backend_init_cpu(struct hwt_context *ctx) +{ + struct arm_spe_info *info; + struct arm_spe_softc *sc = device_get_softc(spe_dev); + char lock_name[32]; + char *tmp = "Arm SPE lock/cpu/"; + int cpu_id; + + spe_info = malloc(sizeof(struct arm_spe_info) * mp_ncpus, + M_ARM_SPE, M_WAITOK | M_ZERO); + + sc->spe_info = spe_info; + + CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { + info = &spe_info[cpu_id]; + info->sc = sc; + info->ident = cpu_id; + info->buf_info[0].info = info; + info->buf_info[0].buf_idx = 0; + info->buf_info[1].info = info; + info->buf_info[1].buf_idx = 1; + snprintf(lock_name, sizeof(lock_name), "%s%d", tmp, cpu_id); + mtx_init(&info->lock, lock_name, NULL, MTX_SPIN); + } +} + +static int +spe_backend_init(struct hwt_context *ctx) +{ + struct arm_spe_softc *sc = device_get_softc(spe_dev); + int error = 0; + + /* + * HWT currently specifies buffer size must be a multiple of PAGE_SIZE, + * i.e. minimum 4KB + the maximum PMBIDR.Align is 2KB + * This should never happen but it's good to sense check + */ + if (ctx->bufsize % sc->kva_align != 0) + return (EINVAL); + + /* + * Since we're splitting the buffer in half + PMBLIMITR needs to be page + * aligned, minimum buffer size needs to be 2x PAGE_SIZE + */ + if (ctx->bufsize < (2 * PAGE_SIZE)) + return (EINVAL); + + sc->ctx = ctx; + sc->kqueue_fd = ctx->kqueue_fd; + sc->hwt_td = ctx->hwt_td; + + if (ctx->mode == HWT_MODE_THREAD) + error = spe_backend_init_thread(ctx); + else + spe_backend_init_cpu(ctx); + + return (error); +} + +#ifdef ARM_SPE_DEBUG +static void hex_dump(uint8_t *buf, size_t len) +{ + size_t i; + + printf("--------------------------------------------------------------\n"); + for (i = 0; i < len; ++i) { + if (i % 8 == 0) { + printf(" "); + } + if (i % 16 == 0) { + if (i != 0) { + printf("\r\n"); + } + printf("\t"); + } + printf("%02X ", buf[i]); + } + printf("\r\n"); +} +#endif + +static int +spe_backend_deinit(struct hwt_context *ctx) +{ +#ifdef ARM_SPE_DEBUG + struct arm_spe_info *info; + int cpu_id; + + CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { + info = &spe_info[cpu_id]; + hex_dump((void *)info->kvaddr, 128); + hex_dump((void *)(info->kvaddr + (info->buf_size/2)), 128); + } +#endif + + if (ctx->state == CTX_STATE_RUNNING) { + spe_backend_disable_smp(ctx); + ctx->state = CTX_STATE_STOPPED; + } + + free(spe_info, M_ARM_SPE); + + return (0); +} + +static uint64_t +arm_spe_min_interval(struct arm_spe_softc *sc) +{ + /* IMPLEMENTATION DEFINED */ + switch (PMSIDR_Interval_VAL(sc->pmsidr)) + { + case PMSIDR_Interval_256: + return (256); + case PMSIDR_Interval_512: + return (512); + case PMSIDR_Interval_768: + return (768); + case PMSIDR_Interval_1024: + return (1024); + case PMSIDR_Interval_1536: + return (1536); + case PMSIDR_Interval_2048: + return (2048); + case PMSIDR_Interval_3072: + return (3072); + case PMSIDR_Interval_4096: + return (4096); + default: + return (4096); + } +} + +static inline void +arm_spe_set_interval(struct arm_spe_info *info, uint64_t interval) +{ + uint64_t min_interval = arm_spe_min_interval(info->sc); + + interval = MAX(interval, min_interval); + interval = MIN(interval, 1 << 24); /* max 24 bits */ + + dprintf("%s %lu\n", __func__, interval); + + info->pmsirr &= ~(PMSIRR_INTERVAL_MASK); + info->pmsirr |= (interval << PMSIRR_INTERVAL_SHIFT); +} + +static int +spe_backend_configure(struct hwt_context *ctx, int cpu_id, int session_id) +{ + struct arm_spe_info *info = &spe_info[cpu_id]; + struct arm_spe_config *cfg; + int err = 0; + + mtx_lock_spin(&info->lock); + info->ident = cpu_id; + /* Set defaults */ + info->pmsfcr = 0; + info->pmsevfr = 0xFFFFFFFFFFFFFFFFUL; + info->pmslatfr = 0; + info->pmsirr = + (arm_spe_min_interval(info->sc) << PMSIRR_INTERVAL_SHIFT) + | PMSIRR_RND; + info->pmsicr = 0; + info->pmscr = PMSCR_TS | PMSCR_PA | PMSCR_CX | PMSCR_E1SPE | PMSCR_E0SPE; + + if (ctx->config != NULL && + ctx->config_size == sizeof(struct arm_spe_config) && + ctx->config_version == 1) { + cfg = (struct arm_spe_config *)ctx->config; + if (cfg->interval) + arm_spe_set_interval(info, cfg->interval); + if (cfg->level == ARM_SPE_KERNEL_ONLY) + info->pmscr &= ~(PMSCR_E0SPE); /* turn off user */ + if (cfg->level == ARM_SPE_USER_ONLY) + info->pmscr &= ~(PMSCR_E1SPE); /* turn off kern */ + if (cfg->ctx_field) + info->ctx_field = cfg->ctx_field; + } else + err = (EINVAL); + mtx_unlock_spin(&info->lock); + + return (err); +} + + +static void +arm_spe_enable(void *arg __unused) +{ + struct arm_spe_info *info = &spe_info[PCPU_GET(cpuid)]; + uint64_t base, limit; + + dprintf("%s on cpu:%d\n", __func__, PCPU_GET(cpuid)); + + mtx_lock_spin(&info->lock); + + if (info->ctx_field == ARM_SPE_CTX_CPU_ID) + WRITE_SPECIALREG(CONTEXTIDR_EL1_REG, PCPU_GET(cpuid)); + + WRITE_SPECIALREG(PMSFCR_EL1_REG, info->pmsfcr); + WRITE_SPECIALREG(PMSEVFR_EL1_REG, info->pmsevfr); + WRITE_SPECIALREG(PMSLATFR_EL1_REG, info->pmslatfr); + + /* Set the sampling interval */ + WRITE_SPECIALREG(PMSIRR_EL1_REG, info->pmsirr); + isb(); + + /* Write 0 here before enabling sampling */ + WRITE_SPECIALREG(PMSICR_EL1_REG, info->pmsicr); + isb(); + + base = info->kvaddr; + limit = base + (info->buf_size/2); + /* Enable the buffer */ + limit &= PMBLIMITR_LIMIT_MASK; /* Zero lower 12 bits */ + limit |= PMBLIMITR_E; + /* Set the base and limit */ + WRITE_SPECIALREG(PMBPTR_EL1_REG, base); + WRITE_SPECIALREG(PMBLIMITR_EL1_REG, limit); + isb(); + + /* Enable sampling */ + WRITE_SPECIALREG(PMSCR_EL1_REG, info->pmscr); + isb(); + + info->enabled = true; + + mtx_unlock_spin(&info->lock); +} + +static int +spe_backend_enable_smp(struct hwt_context *ctx) +{ + struct arm_spe_info *info; + struct hwt_vm *vm; + int cpu_id; + + HWT_CTX_LOCK(ctx); + CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { + vm = hwt_cpu_get(ctx, cpu_id)->vm; + + info = &spe_info[cpu_id]; + + mtx_lock_spin(&info->lock); + info->kvaddr = vm->kvaddr; + info->buf_size = ctx->bufsize; + mtx_unlock_spin(&info->lock); + } + HWT_CTX_UNLOCK(ctx); + + cpu_id = CPU_FFS(&ctx->cpu_map) - 1; + info = &spe_info[cpu_id]; + if (info->ctx_field == ARM_SPE_CTX_PID) + arm64_pid_in_contextidr = true; + else + arm64_pid_in_contextidr = false; + + smp_rendezvous_cpus(ctx->cpu_map, smp_no_rendezvous_barrier, + arm_spe_enable, smp_no_rendezvous_barrier, NULL); + + return (0); +} + +void +arm_spe_disable(void *arg __unused) +{ + struct arm_spe_info *info = &spe_info[PCPU_GET(cpuid)]; + struct arm_spe_buf_info *buf = &info->buf_info[info->buf_idx]; + + if (!info->enabled) + return; + + dprintf("%s on cpu:%d\n", __func__, PCPU_GET(cpuid)); + + /* Disable profiling */ + WRITE_SPECIALREG(PMSCR_EL1_REG, 0x0); + isb(); + + /* Drain any remaining tracing data */ + psb_csync(); + dsb(nsh); + + /* Disable the profiling buffer */ + WRITE_SPECIALREG(PMBLIMITR_EL1_REG, 0); + isb(); + + /* Clear interrupt status reg */ + WRITE_SPECIALREG(PMBSR_EL1_REG, 0x0); + + /* Clear PID/CPU_ID from context ID reg */ + WRITE_SPECIALREG(CONTEXTIDR_EL1_REG, 0); + + mtx_lock_spin(&info->lock); + buf->pmbptr = READ_SPECIALREG(PMBPTR_EL1_REG); + info->enabled = false; + mtx_unlock_spin(&info->lock); +} + +int +spe_backend_disable_smp(struct hwt_context *ctx) +{ + struct kevent kev; + struct arm_spe_info *info; + struct arm_spe_buf_info *buf; + int cpu_id; + int ret; + + /* Disable and send out remaining data in bufs */ + smp_rendezvous_cpus(ctx->cpu_map, smp_no_rendezvous_barrier, + arm_spe_disable, smp_no_rendezvous_barrier, NULL); + + CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { + info = &spe_info[cpu_id]; + buf = &info->buf_info[info->buf_idx]; + arm_spe_send_buffer(buf, 0); + } + + arm64_pid_in_contextidr = false; + + /* + * Tracing on all CPUs has been disabled, and we've sent write ptr + * offsets for all bufs - let userspace know it can shutdown + */ + EV_SET(&kev, ARM_SPE_KQ_SHUTDOWN, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL); + ret = kqfd_register(ctx->kqueue_fd, &kev, ctx->hwt_td, M_WAITOK); + if (ret) + dprintf("%s kqfd_register ret:%d\n", __func__, ret); + + return (0); +} + +static void +spe_backend_stop(struct hwt_context *ctx) +{ + spe_backend_disable_smp(ctx); +} + +static void +arm_spe_reenable(void *arg __unused) +{ + struct arm_spe_info *info = &spe_info[PCPU_GET(cpuid)];; + + WRITE_SPECIALREG(PMSCR_EL1_REG, info->pmscr); + isb(); +} + +static int +spe_backend_svc_buf(struct hwt_context *ctx, void *data, size_t data_size, + int data_version) +{ + struct arm_spe_info *info; + struct arm_spe_buf_info *buf; + struct arm_spe_svc_buf *s; + int err = 0; + cpuset_t cpu_set; + + if (data_size != sizeof(struct arm_spe_svc_buf)) + return (E2BIG); + + if (data_version != 1) + return (EINVAL); + + s = (struct arm_spe_svc_buf *)data; + if (s->buf_idx > 1) + return (ENODEV); + if (s->ident >= mp_ncpus) + return (EINVAL); + + info = &spe_info[s->ident]; + mtx_lock_spin(&info->lock); + + buf = &info->buf_info[s->buf_idx]; + + if (!info->enabled) { + err = ENXIO; + goto end; + } + + /* Clear the flag the signals buffer needs servicing */ + buf->buf_svc = false; + + /* Re-enable profiling if we've been waiting for this notification */ + if (buf->buf_wait) { + CPU_SETOF(s->ident, &cpu_set); + + mtx_unlock_spin(&info->lock); + smp_rendezvous_cpus(cpu_set, smp_no_rendezvous_barrier, + arm_spe_reenable, smp_no_rendezvous_barrier, NULL); + mtx_lock_spin(&info->lock); + + buf->buf_wait = false; + } + +end: + mtx_unlock_spin(&info->lock); + return (err); +} + +static int +spe_backend_read(struct hwt_vm *vm, int *ident, vm_offset_t *offset, + uint64_t *data) +{ + struct arm_spe_queue *q; + struct arm_spe_softc *sc = device_get_softc(spe_dev); + int error = 0; + + mtx_lock_spin(&sc->sc_lock); + + /* Return the first pending buffer that needs servicing */ + q = STAILQ_FIRST(&sc->pending); + if (q == NULL) { + error = ENOENT; + goto error; + } + *ident = q->ident; + *offset = q->offset; + *data = (q->buf_idx << KQ_BUF_POS_SHIFT) | + (q->partial_rec << KQ_PARTREC_SHIFT) | + (q->final_buf << KQ_FINAL_BUF_SHIFT); + + STAILQ_REMOVE_HEAD(&sc->pending, next); + sc->npending--; + +error: + mtx_unlock_spin(&sc->sc_lock); + if (error) + return (error); + + free(q, M_ARM_SPE); + return (0); +} + +static struct hwt_backend_ops spe_ops = { + .hwt_backend_init = spe_backend_init, + .hwt_backend_deinit = spe_backend_deinit, + + .hwt_backend_configure = spe_backend_configure, + .hwt_backend_svc_buf = spe_backend_svc_buf, + .hwt_backend_stop = spe_backend_stop, + + .hwt_backend_enable_smp = spe_backend_enable_smp, + .hwt_backend_disable_smp = spe_backend_disable_smp, + + .hwt_backend_read = spe_backend_read, +}; + +int +spe_register(device_t dev) +{ + spe_dev = dev; + + return (hwt_backend_register(&backend)); +} diff --git a/sys/arm64/spe/arm_spe_dev.c b/sys/arm64/spe/arm_spe_dev.c new file mode 100644 index 000000000000..54623eebda21 --- /dev/null +++ b/sys/arm64/spe/arm_spe_dev.c @@ -0,0 +1,323 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Arm Ltd + * Copyright (c) 2022 The FreeBSD Foundation + * + * Portions of this software were developed by Andrew Turner under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +MALLOC_DEFINE(M_ARM_SPE, "armspe", "Arm SPE tracing"); + +/* + * taskqueue(9) used for sleepable routines called from interrupt handlers + */ +TASKQUEUE_FAST_DEFINE_THREAD(arm_spe); + +void arm_spe_send_buffer(void *, int); +static void arm_spe_error(void *, int); +static int arm_spe_intr(void *); +device_attach_t arm_spe_attach; + +static device_method_t arm_spe_methods[] = { + /* Device interface */ + DEVMETHOD(device_attach, arm_spe_attach), + + DEVMETHOD_END, +}; + +DEFINE_CLASS_0(spe, arm_spe_driver, arm_spe_methods, + sizeof(struct arm_spe_softc)); + +#define ARM_SPE_KVA_MAX_ALIGN UL(2048) + +int +arm_spe_attach(device_t dev) +{ + struct arm_spe_softc *sc; + int error, rid; + + sc = device_get_softc(dev); + sc->dev = dev; + + sc->pmbidr = READ_SPECIALREG(PMBIDR_EL1_REG); + sc->pmsidr = READ_SPECIALREG(PMSIDR_EL1_REG); + device_printf(dev, "PMBIDR_EL1: %#lx\n", sc->pmbidr); + device_printf(dev, "PMSIDR_EL1: %#lx\n", sc->pmsidr); + if ((sc->pmbidr & PMBIDR_P) != 0) { + device_printf(dev, "Profiling Buffer is owned by a higher Exception level\n"); + return (EPERM); + } + + sc->kva_align = 1 << ((sc->pmbidr & PMBIDR_Align_MASK) >> PMBIDR_Align_SHIFT); + if (sc->kva_align > ARM_SPE_KVA_MAX_ALIGN) { + device_printf(dev, "Invalid PMBIDR.Align value of %d\n", sc->kva_align); + return (EINVAL); + } + *** 542 LINES SKIPPED *** From nobody Wed Nov 12 18:06:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6BDJ0kdbz6GNZQ; Wed, 12 Nov 2025 18:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6BDH74Qgz3Y96; Wed, 12 Nov 2025 18:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762970784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sG3DFuEeZ5rzFBF+FZXbNzrTDTc+ASNT1ARQBb98b2M=; b=PKTj5uL8u/jchVK1oxDpM5Iq/0Nq8zFILsQ6eCqupWtWrd7iEMir2AKuuuW7hvWeuqeXfP 5a+vijafboTuw37FW5w0dOQTExhAA+V5q2xoLCbTvaLDzQUPJe4p62RYNINXlEYpjN/UQR yeJNZ0UxFhKbeiIypnE+/FfAetU5HIbzYls4hA8hgedMBty58AdgMZl5DSB+7HXaaoXv8H Kpfw07/ZaXSDT5QDvP5hybvkoMI2KeGhI23HCxYvSWew4BczcEdzUpytBso2hx0aBxhR82 Vk3CoxoD2Vg4LQGS3OLrSbuNSCyfARfC6yyKodU8M8naXU30BukbD/24p/jUaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762970784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sG3DFuEeZ5rzFBF+FZXbNzrTDTc+ASNT1ARQBb98b2M=; b=ivR/1sl9NeR5/K4Xrbt3VwuDn5IFL03ISP2t300gNoIYuSs8BOeUNq4QYYXFInvQGQ2myT kTG0sJBuB1Kf6vzqet1QGk2Ikz5gRJ18sQr4PrsNka3C5uBvYzIcNqR3RAFYla4e1GNU0o 7R93HasdiyxE2xkO4msKiF+e7T+ZRBVhYhO7Gc80UApgFTfpXhg5rpAwQoqzFW514vI31u tQ5pYw22T5+PgLlMDNkUlOu7ErS61KPO7PRW1R6acVe/qOb+/pfYbwEuBB3r6sLP7O4xns RMfFwqkwUu8qpS1WWWgdq5dfam9p9a6Qx7H07JjhVnk2/EqmzWajyg5Kz4esGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762970784; a=rsa-sha256; cv=none; b=SDZLtcmyEdiHOwshdFlDYc4etWaEVeOfLNTQgRij3cBSy9AlEwgYsCYsId0HFUO0floo0c tzO4w9NQxtJ8f2GX1qUbAXDaT6G+PyfSStYAmyH6BBV1RkEi/Lf0HMQU5DHIJ3UISA7InS Ck64gvbumVpLHj7D+8lN1PS7UZnMwSESGXwQr+3lLBWm8OKHMT44z2vZtFoS05bFogTSZq LBHea26GtyG1ojTX+gs1Pp3CDd6J95kLBMnvWCsZzmb1/5KSE2E88sMqkQyecirg3l8WY3 9Fyc2juc+QoPz0mPhFkU1KaXg6Af6nk/LFIATnTCKnvsWOWHzjF0xxVyrxDADg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6BDH6NrWzlcQ; Wed, 12 Nov 2025 18:06: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 5ACI6NgL023116; Wed, 12 Nov 2025 18:06:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACI6Nua023113; Wed, 12 Nov 2025 18:06:23 GMT (envelope-from git) Date: Wed, 12 Nov 2025 18:06:23 GMT Message-Id: <202511121806.5ACI6Nua023113@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 1d9f2db7c0b9 - main - pcic.4: Remove stale manual List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d9f2db7c0b981bf5d45e3ef17dda13b953e1c97 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=1d9f2db7c0b981bf5d45e3ef17dda13b953e1c97 commit 1d9f2db7c0b981bf5d45e3ef17dda13b953e1c97 Author: Muhammad Moinur Rahman AuthorDate: 2025-11-12 17:33:05 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-12 18:05:37 +0000 pcic.4: Remove stale manual MFC after: 2 days Reviewed by: ziaee Fixes: 31b35400c (pccard: Remove more of the PC Card) Discussed with: bsdimp, emaste, jhb Extracted from: https://reviews.freebsd.org/D53434 --- share/man/man4/Makefile | 1 - share/man/man4/ath.4 | 1 - share/man/man4/exca.4 | 3 +- share/man/man4/pcic.4 | 100 ------------------------------------------------ 4 files changed, 1 insertion(+), 104 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 3b64af5fd898..722ee2bc9334 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -466,7 +466,6 @@ MAN= aac.4 \ ${_pchtherm.4} \ pci.4 \ pcib.4 \ - pcic.4 \ pcm.4 \ ${_pf.4} \ ${_pflog.4} \ diff --git a/share/man/man4/ath.4 b/share/man/man4/ath.4 index e731277e4e75..b40ccbd16f09 100644 --- a/share/man/man4/ath.4 +++ b/share/man/man4/ath.4 @@ -258,7 +258,6 @@ This should not happen. .Xr ath_hal 4 , .Xr cardbus 4 , .Xr intro 4 , -.Xr pcic 4 , .Xr wlan 4 , .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , diff --git a/share/man/man4/exca.4 b/share/man/man4/exca.4 index 555e459b7db4..d43d359bfb25 100644 --- a/share/man/man4/exca.4 +++ b/share/man/man4/exca.4 @@ -33,5 +33,4 @@ The module is used to implement the Intel ExCA interface to PC Cards. .Sh SEE ALSO -.Xr pccbb 4 , -.Xr pcic 4 +.Xr pccbb 4 diff --git a/share/man/man4/pcic.4 b/share/man/man4/pcic.4 deleted file mode 100644 index 1c5b0fc35554..000000000000 --- a/share/man/man4/pcic.4 +++ /dev/null @@ -1,100 +0,0 @@ -.\" -.\" Copyright (c) 2001-2002 M. Warner Losh -.\" -.\" 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. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" 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 July 9, 2002 -.Dt PCIC 4 -.Os -.Sh NAME -.Nm pcic -.Nd PC Card bridge driver -.Sh SYNOPSIS -.Cd device pcic -.Cd device pccard -.Sh DESCRIPTION -The -.Nm -driver provides support for older ISA and non-Yenta PCI PC Card bridges. -The -.Nm -driver supports most -.Tn ExCA -devices attached to the -.Tn ISA -bus or -.Tn PCI -devices that do not conform to the Yenta specification. -.Pp -The following -.Tn ISA -devices, or true clones, are supported in the current code. -.Pp -.Bl -tag -width "Intel i82365SL Step A" -compact -.It Intel i82365SL Step A -.It Intel i82365SL Step B -.It Intel i82365SL Step C -.Tn Intel Ns 's -original 16-bit PC Card controller. -.It Intel i82365SL-DF -.Tn Intel Ns 's -last version of this device. -3.3V support was added. -.It VLSI 82C146 -An older VLSI part with some issues on some machines. -.It Cirrus Logic PD-6710 -.It Cirrus Logic PD-6720 -.It Cirrus Logic PD-6722 -Cirrus Logic's pcic controller. -Compatible with the i82365SL Step C with the addition of a different -3.3V control. -.It Ricoh RF5C296 -.It Ricoh RF5C396 -Ricoh's PC Card bridge chips. -These are compatible with the i82365SL Step C, but with yet another -different 3.3V control. -.It Vadem 365 -.It Vadem 465 -Compatible with i82365SL Step C. -.It Vadem 468 -.It Vadem 469 -Like the earlier Vadem models, but with Vadem's own, incompatible, 3.3V -control system. -.It IBM PCIC -.Tn IBM -clone of the original i82365SL part, with its own ID register value. -Has no 3.3V ability. -.El -.Pp -Many other vendors made parts in this arena, but most of them were -compatible with one of the above chipsets. -.Pp -The following PCI pcmcia bridges are supported: -.Pp -.Bl -tag -width "Intel i82365SL Step A" -compact -.It Cirrus Logic PD6729 -.It Cirrus Logic PD6730 -.Pp -.It O2micro OZ6729 -.It O2micro OZ6730 -.El -.Sh BUGS -This does not work at all at the moment. From nobody Wed Nov 12 18:17:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6BSl56DBz6GP9b; Wed, 12 Nov 2025 18:17: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6BSl44wkz3ZHK; Wed, 12 Nov 2025 18:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762971431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xx6PkBeAD1DaQJdopDY0LebXWOuGoo9o5RbmAXmYTe4=; b=hnSaspFdX/clOFOF+zLA/nSj52Q7s5Kfujn37tapenS+2peoqcBmBExqGty6G258znM/uI P/VVQYB9swYXVITlF31HjbGOb5r8MkddcUM7zPuW3dFg11gCqYQjtPDu2anXjgq1OKfdAB Tt7ySz/d7+8BNsh2AMqEGU6H/sfk79wQlSzw7U3sccqmIb4YaXmqvL0j9uEoxxl0+zVC3u R8ZCwVvGqYi5JPqbBKL8tivbcUjMuk5O4XiIMUIJwPlSFteeTgq5KTfGIotO1W1fKTZZtd yNQdet7Cvb9qR/JxUVvxQWqyoz01GdqdN8RS5Tsl0BuWi7TLTF1tBoH8hxwfCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762971431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xx6PkBeAD1DaQJdopDY0LebXWOuGoo9o5RbmAXmYTe4=; b=NWGwbg7YQ+vYZUEWb5B+S2zs5iErSkFjcLu4kHonVqHoclG7B1jEFYnHJAtKIfYu771dID 1y0dh53+sqxeEepN4yIfhFmW7yh6+S56wDIJZnyL37znhBtkYSNid7NjeeZEm4DdUh2lMY VkgL0F5nu2ORWY6EEhMw7XnhqLOxCyFPsGKGHH74iOU1ux0GYYwKM7bmr7tfWAvJirKHcX EOT/FuRAdhKoWG8i2qZtsKfp5x59keWoy12OIH7vnnMtikojOf9yHfAfEm5XDuVBlZZHtW 1tbp0pQ5AcOncBv/zTdU7Kotr+aXleHkbmKNCArTS4Cx0Etf28FtmPdbuyzCvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762971431; a=rsa-sha256; cv=none; b=H/BWtujL69yDRmOlUZofkjEuQd5JdONgogGebJnO6MKLpt3T5+ZZ2Dg77Az9iiBn9z7Zxt uhrntD6/vnd5oB63ATpKtAYqw+cBy6q9DKk3gPJFGyobQGi+Tsg7aQqrp9/b7xfNYlNEVG 45AEg/fnxNcG3KeB6SYQJXTlK4Q7EDKrNe25JoVcyaNdonVzZ8vT8H5IoVzsMhY7cOkO1e QA71nw56R3qz6BSOUk4vwQp0kTCNn8B04H225IUHHHgMT/2/vmXphjd3A2ylKDF0eKVidE +IPRHmwIhjImTvEVQ7Pf1Can2oBrUGeWyi4YrHAlyeF8nWaU+YC23/zEzBDS3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6BSl33FJzls3; Wed, 12 Nov 2025 18:17: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 5ACIHBgD041707; Wed, 12 Nov 2025 18:17:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACIHBZa041703; Wed, 12 Nov 2025 18:17:11 GMT (envelope-from git) Date: Wed, 12 Nov 2025 18:17:11 GMT Message-Id: <202511121817.5ACIHBZa041703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 3cf85a69ae7d - main - hifn.4: Really remove List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cf85a69ae7dd909de30ca2b6c95bd2434dc3ce6 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=3cf85a69ae7dd909de30ca2b6c95bd2434dc3ce6 commit 3cf85a69ae7dd909de30ca2b6c95bd2434dc3ce6 Author: Alexander Ziaee AuthorDate: 2025-11-12 18:16:25 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-12 18:16:26 +0000 hifn.4: Really remove Fixes: a38a42ed9a975 (random: remove hifn(4)) Fixes: 685a78570b359 (random: remove hifn(4)) --- ObsoleteFiles.inc | 2 +- share/man/man4/crypto.4 | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ad3d1fe955e3..8113b502abb1 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -55,7 +55,7 @@ OLD_FILES+=share/man/man4/pccard.4 # 20251028: Remove hifn(4) -OLD_FILES+=share/man/man4/hifn.4 +OLD_FILES+=share/man/man4/hifn.4.gz # 20251006: Remove libnss_tacplus.a (it never should have been installed) OLD_FILES+=usr/lib/libnss_tacplus.a diff --git a/share/man/man4/crypto.4 b/share/man/man4/crypto.4 index b1423752718e..4242a6631352 100644 --- a/share/man/man4/crypto.4 +++ b/share/man/man4/crypto.4 @@ -346,7 +346,6 @@ Destroys the session identified by .El .Sh SEE ALSO .Xr aesni 4 , -.Xr hifn 4 , .Xr ipsec 4 , .Xr padlock 4 , .Xr safe 4 , From nobody Wed Nov 12 18:39:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6Byv1dKwz6GPx6; Wed, 12 Nov 2025 18:39: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6Byv157mz3cf2; Wed, 12 Nov 2025 18:39:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762972791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v3/yvWIuA1+MLfjrgcODBgv9yMOfSiY25jtqC83ASmc=; b=r8y2SDCq67WK8MYYXKRGjnAibRAw/3RBASHf2xgdDmRXCTtOJDRMiU9FnqiqvPOuVLRJaR LT7xiiUTi/BVEbwktI96rSFdfJFAYKPZnk6C54vSxwIKJw8LIgzq4HcdOPjWUasNI70Y+5 TlwPTlJ3vGZbDWh3yJgtuxNdF25P362SG4qgO+vSgy7aWjdVlohCnLNwUVm+siMpyZ84hq llklch8JxkEy1EO47NydJR0kXd0lzWXgaWi+yS56WrhCxYkr3OWZEbdHPC3SGn6Y7uSOBI zPYNgzkVmAtsEIKm6qtCci/5e8EOZLYJpKsdBpqCVFDCxQmaDxv/xoe3S1pyLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762972791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v3/yvWIuA1+MLfjrgcODBgv9yMOfSiY25jtqC83ASmc=; b=xk2vn3RJ+/0PFiD0T5hDitzymLukmmqz8KKB8xluJHzOam8jR5uo1cbmyNfkL8ol/zGXi0 Y4mlxQLicyJPdOPN6lCyLxT2YYZ0iGZaKoUeASGZRdUujWnDJeAIJuNvN7hnVlHU34h3Bs lM3NNvjaGBivzuui3otPeSskKc+6ped90CsFshCmlhDM4E662oXNclbAm95Mu9Uz7G1uBr qcFGfGelfuMI1jKdhZ9qI4Qc51lUu1GLNd2y+zYPbfh9OXaovjbSU5Td8Zb81ZdHg7rIgz +U7mbXp0GlJB7KVzYSFF9n8+7rtmk+O/loi3BWHwajMMHR/OPYdBP+S5CqdnXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762972791; a=rsa-sha256; cv=none; b=mVeLaqn0R0ypvj4zmULcrQL4G0olkZSOZ2am9wh4pWTIiOgofZwxB3lMYg5NLNr1nijSqc epYt/MnzcY+LyFZkrTeMwWKbvO5kOMaV9lX8dlpuyPfklroYImQn8kx5kcRERfeAcpW37l 2d+6PoMxqJYEMg1DRYWT/JsuW1R0LyyNNO+qaDWyFBG9dDvZJnUeBp2XuECoycEXB2SqiV 9xPm/IW3XlEN37Tef4nQIBh1mY895GVfjiiArEUbR7jH7JFfFGx67g+H2roDiD4Yaz3ncC nY5CkLRZOteXUnONUC7I/MA2IbGqa1G3QXpVfUdfibRChFJJsks/DqyLpbvdDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6Byv0MFpzmgx; Wed, 12 Nov 2025 18:39: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 5ACIdoeL079435; Wed, 12 Nov 2025 18:39:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACIdoJQ079432; Wed, 12 Nov 2025 18:39:50 GMT (envelope-from git) Date: Wed, 12 Nov 2025 18:39:50 GMT Message-Id: <202511121839.5ACIdoJQ079432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 8a8c58f71e80 - main - pccard.4: Really remove List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a8c58f71e80e186da3679266eef54f4180e4d11 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=8a8c58f71e80e186da3679266eef54f4180e4d11 commit 8a8c58f71e80e186da3679266eef54f4180e4d11 Author: Alexander Ziaee AuthorDate: 2025-11-12 18:22:12 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-12 18:22:14 +0000 pccard.4: Really remove Fixes: 5b9fba1cb (Retire pccard(4)) Fixes: 31b35400c (Remove more of the PC Card infrastructure) Discussed with: emaste, jhb --- ObsoleteFiles.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 8113b502abb1..a7f87221ed89 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,7 +52,7 @@ # done # 20251112: Remove pccard(4) -OLD_FILES+=share/man/man4/pccard.4 +OLD_FILES+=share/man/man4/pccard.4.gz # 20251028: Remove hifn(4) OLD_FILES+=share/man/man4/hifn.4.gz From nobody Wed Nov 12 18:39:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6Byw42Z1z6GQJd; Wed, 12 Nov 2025 18:39: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6Byw1YF9z3cpT; Wed, 12 Nov 2025 18:39:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762972792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VF947+FK7JW4VOcqD9P7BTPtbX1QW3OSZTS5lB7f+yg=; b=Jj+OtlctvE825m9tJBKMzamOPN35D9UJICgC89qpEAiv52DmT8TAvuWDOgu2GaoVCeThvt No08HkP60rf8fmyuat3hbEst3kNLorSuXTObd7/U2ymBfgVGu2hMbU3kSUWZFTTuFdz5o/ aPOafyrq8qRQkNGNJR1WbBDPLVbFh5BhpyevWx+9ao9k47HXXV0/ZKe7rYVOqbpOk8JdsV gByKij/eqIc0Q/lFOhjWJJwzrZyHk6ZIK7cI396FkIXz4LyB/6yrnK3y12qi3v0zXJ28Mf QLrF9WpO64rakS8vGMCFeQ06/mxsoPxeF9f7eQ+u8dyEJZzgeVA9Q7gt/KWekw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762972792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VF947+FK7JW4VOcqD9P7BTPtbX1QW3OSZTS5lB7f+yg=; b=S5y8d9gD4wJYdC510IqQCl0Aat0V4b3p0RJqzWwCrAWzn42scnSihgFtmB9y6FgpEBZg/d Nt8cl+IE2YeS4pibjMfr6NSrsqljXgO6Il0+hCRfch374C3hQATv7z93hlV1WCLePLGWoC 7hQ9jhOuKPeVGKsJ7X6dHPIGbcYnqc5pig1bol7+tUdaQr7zcN/EsMGmVrqkkS7xF+xfJN OYfelSkk3ZecMEbD7KVidtEPQo7fr/XD6OfElB+slwOhMdkTrHm46C6ZOjCaHdcea4+F5J T5XcUNkrYcjdRxtmkoBF8ed2L54jSI3vsbTPnRHnqDFxfaEbuIOpdKNRcnGpTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762972792; a=rsa-sha256; cv=none; b=Z9xFO1aQrWyE1LDvDD+glyMWo2CUUho4NHW2NtiECdAwtgLbYaTsawzcnRo2USmo0nr3ei TF8XH2nkkaLBxW5pE6z/qiDc99B3EUbYAQHRrqWIO/KvwvKsd3HPI8EEnsVwCGBFetB2O+ eMAuVHvIund+748v6u53q8smwsQBZBelP6zeNxvXVksZ6dcvUVYaJqkpK8G+0idya5OVoH KMK5FKegTVraPSiND4pT+ndutA6ZWc+3LM/2t0qss2y1lLkDxlbzmdN38UZBUpUCxXecmd 6kapVhYx6GVUZLTzffERGBB32I63oIGHvt6qGxZ7b+urOwHCtRtL1t4YGg8ovg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6Byw11sQzm7C; Wed, 12 Nov 2025 18:39: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 5ACIdqok079477; Wed, 12 Nov 2025 18:39:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACIdq0e079474; Wed, 12 Nov 2025 18:39:52 GMT (envelope-from git) Date: Wed, 12 Nov 2025 18:39:52 GMT Message-Id: <202511121839.5ACIdq0e079474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 6aaf184dc4e2 - main - pcic.4: Really remove List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6aaf184dc4e294779db7133629b7ae953b4da285 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=6aaf184dc4e294779db7133629b7ae953b4da285 commit 6aaf184dc4e294779db7133629b7ae953b4da285 Author: Alexander Ziaee AuthorDate: 2025-11-12 18:38:10 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-12 18:39:39 +0000 pcic.4: Really remove MFC after: 2 days Fixes: 1d9f2db7c (pcic.4: Remove stale manual) Fixes: 31b35400c (pccard: Remove more of the PC Card) Reported by: emaste --- ObsoleteFiles.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index a7f87221ed89..1654ee06941f 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,8 +51,9 @@ # xargs -n1 | sort | uniq -d; # done -# 20251112: Remove pccard(4) +# 20251112: Remove pccard(4) and related OLD_FILES+=share/man/man4/pccard.4.gz +OLD_FILES+=share/man/man4/pcic.4.gz # 20251028: Remove hifn(4) OLD_FILES+=share/man/man4/hifn.4.gz From nobody Wed Nov 12 19:42:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6DMQ5XsXz6GVfN; Wed, 12 Nov 2025 19:42: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6DMQ52M6z3x6v; Wed, 12 Nov 2025 19:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762976562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KbwnlBAHbvbuN0zj8gsxJ5fZwr5/CTK3kXqDb5DSt5w=; b=eqauUCGd9TCusCleQmH72BcZUekpuYnOOJCFDT1PD2K6vad7ezG2rF+RGH9SeVK6FbGgzc pytQLAPpv5/H0o22gLmjdW6nuptk3oHhpf8k8rtkimLKXKt4G/vy5DBLnIXbMvIAYEqGhp jtAZ95Q5tNbOmhqf/x2q4Ims2qiYq3vv20dCw3M1jVkQvYE4lBV/l1EsG7kGCuFt1HYEC8 Aej8d+WiP5FTQePjeJELU5qi9ZwpcutpxECA1rZY8W3cPFUzlVV2uMdqXRHFpitn7DY0qZ qMEP2rq4GfnJxX7Jg4P5CUIakRN5Y6Gsu6A2UgIVITOQR1zo3EJ/uFNJdce4ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762976562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KbwnlBAHbvbuN0zj8gsxJ5fZwr5/CTK3kXqDb5DSt5w=; b=PhCFKnRt89lJjZoLVpvEefkwGTW8wkMPllWbisHBLb7KvjMdXWQsd8VD883c3NJFKOrQ+K mjTRrtjs6pe8M1HMoFxdcCk9UuaJwdRaMk7qnnWi2Jgg5dbq+zKW7PywnfPJvgzmG3w0Bh 8s28vwO43dM5IGDu98On5xCA746o0QnM4+RueAAvR0gzWVphvkHyvbal//HVKP+QisJg2o pT3owpxznERhCFs2/VhPuFWioAsbH+6cqDvMPNh2EmiPkO4WruxMOmMgIZmFzdkYP0rICD gS9ePkfakxSI2TrZc+dE9R042/BeOo18KOiGoIl0pJI+6EoDwnAtk/5BRxNDaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762976562; a=rsa-sha256; cv=none; b=nOA4pxYAbogY8/+6J3+BPC9GvKxrCaM3Udhi4Sv1lr6KV9mBVys1ANd4gCJY45HPpghHBE g0xXCUH0sH/UMrjn/8jcOl9RHO0kc1tMTp46WtvptfZFFKfKts2PrfgkSnYaTDDpClgYbs MZSaIrp19KhVBfx0z5rXDuoX2qXT+IFYiTo/29SAyUrCoVBTqXBwF+v6+OjKBEiwnkPecw FTSEpl2X1CI0FMMoTRinqso1DC8l02OjBvnuKasxqc1IaRxUPg1LvTHoibsr5gBdSEbPzu Ls9GwJm8Nr9wC1nH//Y/UpPPyO3bgbTb7htJL6CN4D8QIE5AR1GaBUzaq4OAqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6DMQ4Zy8zpYm; Wed, 12 Nov 2025 19:42: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 5ACJggmA008820; Wed, 12 Nov 2025 19:42:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACJggCQ008817; Wed, 12 Nov 2025 19:42:42 GMT (envelope-from git) Date: Wed, 12 Nov 2025 19:42:42 GMT Message-Id: <202511121942.5ACJggCQ008817@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: a6ae6090bb3d - main - cxgbe KTLS tx: Distribute FW6_PLD replies across rx queues List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: a6ae6090bb3dc14eda750aa53650fccf4c0bf818 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=a6ae6090bb3dc14eda750aa53650fccf4c0bf818 commit a6ae6090bb3dc14eda750aa53650fccf4c0bf818 Author: Navdeep Parhar AuthorDate: 2025-10-21 17:29:28 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-12 19:40:26 +0000 cxgbe KTLS tx: Distribute FW6_PLD replies across rx queues If the connection flowid is available then the replies are requested on the rx queue that is receiving wire traffic for the connection. This reduces contention for the txq lock. Reviewed by: jhb MFC after: 3 days Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D53385 --- sys/dev/cxgbe/crypto/t7_kern_tls.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/dev/cxgbe/crypto/t7_kern_tls.c b/sys/dev/cxgbe/crypto/t7_kern_tls.c index 217459126361..d9710b5bd13f 100644 --- a/sys/dev/cxgbe/crypto/t7_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t7_kern_tls.c @@ -141,7 +141,8 @@ alloc_tlspcb(struct ifnet *ifp, struct vi_info *vi, int flags) tlsp->tx_key_addr = -1; tlsp->ghash_offset = -1; tlsp->rx_chid = pi->rx_chan; - tlsp->rx_qid = sc->sge.rxq[pi->vi->first_rxq].iq.abs_id; + tlsp->rx_qid = -1; + tlsp->txq = NULL; mbufq_init(&tlsp->pending_mbufs, INT_MAX); return (tlsp); @@ -157,7 +158,8 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, struct vi_info *vi; struct inpcb *inp; struct sge_txq *txq; - int error, iv_size, keyid, mac_first; + int error, iv_size, keyid, mac_first, qidx; + uint32_t flowid; tls = params->tls.tls; @@ -250,11 +252,15 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, goto failed; } - txq = &sc->sge.txq[vi->first_txq]; if (inp->inp_flowtype != M_HASHTYPE_NONE) - txq += ((inp->inp_flowid % (vi->ntxq - vi->rsrv_noflowq)) + - vi->rsrv_noflowq); - tlsp->txq = txq; + flowid = inp->inp_flowid; + else + flowid = arc4random(); + qidx = flowid % vi->nrxq + vi->first_rxq; + tlsp->rx_qid = sc->sge.rxq[qidx].iq.abs_id; + qidx = (flowid % (vi->ntxq - vi->rsrv_noflowq)) + vi->rsrv_noflowq + + vi->first_txq; + tlsp->txq = txq = &sc->sge.txq[qidx]; INP_RUNLOCK(inp); error = ktls_setup_keys(tlsp, tls, txq); From nobody Wed Nov 12 20:11:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6F0h3063z6GXN8; Wed, 12 Nov 2025 20:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6F0h2Lx2z40Z3; Wed, 12 Nov 2025 20:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762978292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RUBhAQrMKdkFGZnl8LRLXYvH+ZK5yzmCHaF2pHBh0EI=; b=GVhmOHUBfA50OyKkQ2dh8oaUza1+rqE86OMWgwdkMzvFcJW1kcJ9VK+O4FxnSCGwINYL4U gNSbWhfzaD4Od3/WwTrMz8qllcSEZUUF1mb8BnQkTepRS4uMYu1mFarN+OohkMmin6QZMs yj3TXcQx5FaUTMkalkfV2W4sCYZsfSXFV+azuQkfWktO4hb5QnwEia4tHxaZD8q8X6/pje g7ng3+ivW3uqoQqyVfFJn5qm9pZBpLLds8jJBlviCnR4tG8G28MVzLs5b14lgm0NpAFvYa NZacLtLGx5TRAe/v48nmzxwUv02m+rPj5imgwikA/xU6BPGXwjLNj9jA10kzxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762978292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RUBhAQrMKdkFGZnl8LRLXYvH+ZK5yzmCHaF2pHBh0EI=; b=XNWIz/iGR1axV+TVDxturceEjDzIr3TZIHzufrKcJpbmDQK+IbGWAU9ppi9MEpnO/ZF2jd i8FSxP+tqwwfJX87yzgfnGYFspHhGQfgz1Jqo4uT6Y9VbiMH4YDsOvGrLMF9nx7XogDgso 6AZwRIiExVVaBt3bOM3TCgZmsT2AljDVjMbbQxRLXyzD/q97VoJofFGmESofzNSpjqZP+U brHB/bzRWc+KQGa9T3logyQRDCjKLsWC4reVHN/6My4eyIA0+3jOawOFyCV/eXgorcBOY4 ory0HpxBxjmiY5mtOpQs3iT7UH6QQQ/o6bBmmZhfDATNb5KA2FKmVSZ9XEMkGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762978292; a=rsa-sha256; cv=none; b=fxVCGrMdMjaSb83nqPOaqbHmGvgxyiqMXw/gVv+gEMeKUa2WoCyfPIZiIxqW3O3/7Fz4Z4 wlXjIUiD6oRP9/9FSf7C6dUdQ1Hh+J+oOeHT9nXZ29AdJK+hu33m3M/913BUCoGLSGCqni y4TRkNip1KVtBYg/juAJlZzMFaA+CbhLX3YEpyy9ZJQVjp+b7lgeekhvi8fXboBvbaocNY t1Tsipa1ixVWy1t8AgV4rcepx0ejm/lv4iar5+4SgUSWYu8uwxfStOGdwFDfbN7EJK9c7R vXP/dbDDImvr5AS+qi45uVzQasmK+wFhn4ZYm4Za6i55v5OEwOkHiO5+6tcYrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6F0h1vd0zqXC; Wed, 12 Nov 2025 20:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5ACKBWDr060628; Wed, 12 Nov 2025 20:11:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACKBW7s060625; Wed, 12 Nov 2025 20:11:32 GMT (envelope-from git) Date: Wed, 12 Nov 2025 20:11:32 GMT Message-Id: <202511122011.5ACKBW7s060625@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: e353cb88d458 - main - nvmf_che: Fix amd64 LINT-NOVIMAGE 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e353cb88d4581303a4d9af090974ec88463802e6 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=e353cb88d4581303a4d9af090974ec88463802e6 commit e353cb88d4581303a4d9af090974ec88463802e6 Author: Navdeep Parhar AuthorDate: 2025-11-12 20:04:48 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-12 20:04:48 +0000 nvmf_che: Fix amd64 LINT-NOVIMAGE build Fixes: ec0cd287f55f nvmf_che: NVMe-TCP offload support for Chelsio T7 adapters Sponsored by: Chelsio Communications --- sys/dev/cxgbe/nvmf/nvmf_che.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/cxgbe/nvmf/nvmf_che.c b/sys/dev/cxgbe/nvmf/nvmf_che.c index 88d59b5e75aa..5c2174b8a40b 100644 --- a/sys/dev/cxgbe/nvmf/nvmf_che.c +++ b/sys/dev/cxgbe/nvmf/nvmf_che.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include From nobody Wed Nov 12 20:17:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6F7M3cJFz6GY1h; Wed, 12 Nov 2025 20:17: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6F7M3K75z41KN; Wed, 12 Nov 2025 20:17:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762978639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5QJGPRhNp0AQ190ch7liAxT9d7isNlxgW1T5usTKwro=; b=pet+OJIEoRNcgnLArv6I3um1eIuAT3KP1GwSlBnWeIqwt5LeE/fv2/tN59vovPESVN1y24 2GR2v3dSjjalOYjWp5nuQfVwysg1BGCcnOU25jFG8vrz9UEpeMCw2uq+Y1WRy0PS3UI+hY vmJJ+oXVOtLzO1rsdhFNnXC8SMMSpdZ7WtYXI8yFC2FHDgENlroIZSkpKn7djmhitOcqJf uxDpR8S5WJFu8lMMIdBE2jGbWeahTP1jfIRButgBLPK6yThcPfoZs0NezmHKEQrY7FExJR uLwunsoY7ootjOvAkiN96vjFBBpp+CSWTiVOL38ON++lKL8WVze+n7jT5pBeQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762978639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5QJGPRhNp0AQ190ch7liAxT9d7isNlxgW1T5usTKwro=; b=iHISuLfb1QSb5zmPikuahqVgpAx4dxs0X2vm+UnioVuhgqnlraQOUedhVuTjHSilfjHnL9 E3HYu6OFVIdM8+Cufct75Ykb9ncmPwYHms4Re3kFwwK/vbCQV7GJgTBvVbci1g0xXcY9NG j38dmcWfnN5n1XGGLcEzPpSiWG9Rdf0tdJPpnum/VKM5tl3U5dlkev5kvJXuk1GXbAUz1M rq7xjK/HE/zHqzgKhd8ZjrODQmMo+Z8vYj+uJcyO76T+TCUFMnvclDJZkyOQ69JLhT92uf jxCvOryT0er2JMbn+wln3dTJQLNprhtvrapdBGNyThfXmk2DJBMP/VC3KTbmpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762978639; a=rsa-sha256; cv=none; b=JyFGGfwrOWcXCrGjde7+BoLkxLu3QUgpDYxj+aOFPJLAzOBCsl8AaSYDhuSzJQxQ8sRr9s 6wsXGKQjVtQGvSO8B65ERaLB5eW1eC6Db9S09a18Y42wvwEcAB1VsMMlzSFfsfbgBUL+VH i3KV2HRjm5Q7jzvNQU3hf+TaXxPVfnPlHm9OzOQKfnjSdZwKX7sjYFRf4INPYKw6mmGgtc usyuDrKxpJHLP30L3M5eY0/vXTvfpJp1JR6o+arKlTz9dI8YeMGf67Xkuc37jD5Q2dA8P5 1PBv1ekqRSZyrbtHHoYT/hLiDa860TnWDhaG03xDJUpJMp5PbHPRnoURbF4s1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6F7M2tMlzq7Y; Wed, 12 Nov 2025 20:17: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 5ACKHJIN067051; Wed, 12 Nov 2025 20:17:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACKHJt5067048; Wed, 12 Nov 2025 20:17:19 GMT (envelope-from git) Date: Wed, 12 Nov 2025 20:17:19 GMT Message-Id: <202511122017.5ACKHJt5067048@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: 6a569666868b - main - sound examples: Extend and clean up List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 6a569666868b36f5f436eea9d66789b6df191b8a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6a569666868b36f5f436eea9d66789b6df191b8a commit 6a569666868b36f5f436eea9d66789b6df191b8a Author: Goran Mekić AuthorDate: 2025-11-12 20:15:59 +0000 Commit: Christos Margiolis CommitDate: 2025-11-12 20:15:59 +0000 sound examples: Extend and clean up - Simplify directory and file structure. - Clean up and improve code. Add more comments. - Add polling examples. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D53353 --- share/examples/Makefile | 14 +- share/examples/sound/kqueue.c | 79 ++++++++++ share/examples/sound/oss.h | 222 ++++++++++++++++++++++++++++ share/examples/sound/oss/README | 66 --------- share/examples/sound/oss/audio.c | 310 --------------------------------------- share/examples/sound/poll.c | 70 +++++++++ share/examples/sound/select.c | 70 +++++++++ share/examples/sound/simple.c | 147 +++++++++++++++++++ 8 files changed, 595 insertions(+), 383 deletions(-) diff --git a/share/examples/Makefile b/share/examples/Makefile index 0a65b8c40d39..09bbf820e574 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -319,13 +319,13 @@ SE_SCSI_TARGET= \ SE_DIRS+= sound SE_SOUND= \ - sndstat_nv.c \ - midi.c - -SE_DIRS+= sound/oss -SE_SOUND_OSS= \ - README \ - audio.c + kqueue.c \ + midi.c \ + oss.h \ + poll.c \ + select.c \ + simple.c \ + sndstat_nv.c SE_DIRS+= sunrpc SE_SUNRPC= Makefile diff --git a/share/examples/sound/kqueue.c b/share/examples/sound/kqueue.c new file mode 100644 index 000000000000..9117d7a389bb --- /dev/null +++ b/share/examples/sound/kqueue.c @@ -0,0 +1,79 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Goran Mekić + * + * 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 "oss.h" + +int +main(int argc, char *argv[]) +{ + struct config config = { + .device = "/dev/dsp", + .mode = O_RDWR, + .format = AFMT_S32_NE, + .sample_rate = 48000, + }; + struct kevent event = {}; + int rc, bytes, kq; + + oss_init(&config); + bytes = config.buffer_info.bytes; + + if ((kq = kqueue()) < 0) + err(1, "Failed to allocate kqueue"); + EV_SET(&event, config.fd, EVFILT_WRITE, EV_ADD | EV_CLEAR, 0, 0, 0); + if (kevent(kq, &event, 1, NULL, 0, NULL) < 0) + err(1, "Failed to register kevent"); + for (;;) { + if (kevent(kq, NULL, 0, &event, 1, NULL) < 0) { + warn("Event error"); + break; + } + if (event.flags & EV_ERROR) { + warn("Event error: %s", strerror(event.data)); + break; + } + if ((rc = read(config.fd, config.buf, bytes)) < bytes) { + warn("Requested %d bytes, but read %d!\n", bytes, rc); + break; + } + if ((rc = write(config.fd, config.buf, bytes)) < bytes) { + warn("Requested %d bytes, but wrote %d!\n", bytes, rc); + break; + } + } + EV_SET(&event, config.fd, EVFILT_WRITE, EV_DELETE, 0, 0, 0); + if (kevent(kq, &event, 1, NULL, 0, NULL) < 0) + err(1, "Failed to unregister kevent"); + close(kq); + + free(config.buf); + close(config.fd); + + return (0); +} diff --git a/share/examples/sound/oss.h b/share/examples/sound/oss.h new file mode 100644 index 000000000000..437c6d69d454 --- /dev/null +++ b/share/examples/sound/oss.h @@ -0,0 +1,222 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Goran Mekić + * + * 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 + +/* + * Minimal configuration for OSS. For real world applications, this structure + * will probably contain many more fields + */ +struct config { + char *device; + int mode; + int fd; + int format; + int sample_count; + int sample_rate; + int sample_size; + int chsamples; + int mmap; + void *buf; + oss_audioinfo audio_info; + audio_buf_info buffer_info; +}; + +/* + * The buffer size used by OSS is (2 ^ exponent) * number_of_fragments. + * Exponent values range between 4 and 16, so this function looks for the + * smallest exponent which can fit a buffer of size "x". The fragments + * determine in how many chunks the buffer will be sliced into, hence if the + * exponent is 4, and number of fragments is 2, the requested size will be 2^4 + * * 2 = 32. Please note that the buffer size is in bytes, not samples. For + * example, a 24-bit sample will be represented with 3 bytes. If you're porting + * an audio application from Linux, you should be aware that 24-bit samples on + * it are represented with 4 bytes (usually int). The idea of a total buffer + * size that holds number of fragments is to allow application to be + * number_of_fragments - 1 late. That's called jitter tolerance. + * + * Official OSS development howto: + * http://manuals.opensound.com/developer/DSP.html + */ +static inline int +size2exp(int x) +{ + int exp = 0; + + while ((1 << exp) < x) + exp++; + + return (exp); +} + +static void +oss_init(struct config *config) +{ + unsigned long request = SNDCTL_DSP_GETOSPACE; + int tmp = 0; + + if ((config->fd = open(config->device, config->mode)) < 0) + err(1, "Error opening the device %s", config->device); + + /* Get device information */ + if (ioctl(config->fd, SNDCTL_ENGINEINFO, &config->audio_info) < 0) + err(1, "Unable to get device info"); + + /* Get device capabilities */ + if (ioctl(config->fd, SNDCTL_DSP_GETCAPS, &config->audio_info.caps) < 0) + err(1, "Unable to get capabilities"); + + /* Check if device supports triggering */ + if (!(config->audio_info.caps & PCM_CAP_TRIGGER)) + errx(1, "Device doesn't support triggering!\n"); + + /* Handle memory mapped mode */ + if (config->mmap) { + if (!(config->audio_info.caps & PCM_CAP_MMAP)) + errx(1, "Device doesn't support mmap mode!\n"); + tmp = 0; + if (ioctl(config->fd, SNDCTL_DSP_COOKEDMODE, &tmp) < 0) + err(1, "Unable to set cooked mode"); + } + + /* Set sample format */ + if (ioctl(config->fd, SNDCTL_DSP_SETFMT, &config->format) < 0) + err(1, "Unable to set sample format"); + + /* Set sample channels */ + if (ioctl(config->fd, SNDCTL_DSP_CHANNELS, &config->audio_info.max_channels) < 0) + err(1, "Unable to set channels"); + + /* Set sample rate */ + if (ioctl(config->fd, SNDCTL_DSP_SPEED, &config->sample_rate) < 0) + err(1, "Unable to set sample rate"); + + /* Calculate sample size */ + switch (config->format) { + case AFMT_S8: + case AFMT_U8: + config->sample_size = 1; + break; + case AFMT_S16_BE: + case AFMT_S16_LE: + case AFMT_U16_BE: + case AFMT_U16_LE: + config->sample_size = 2; + break; + case AFMT_S24_BE: + case AFMT_S24_LE: + case AFMT_U24_BE: + case AFMT_U24_LE: + config->sample_size = 3; + break; + case AFMT_S32_BE: + case AFMT_S32_LE: + case AFMT_U32_BE: + case AFMT_U32_LE: + case AFMT_F32_BE: + case AFMT_F32_LE: + config->sample_size = 4; + break; + default: + errx(1, "Invalid audio format %d", config->format); + break; + } + + /* + * Set fragment and sample size. This part is optional as OSS has + * default values. From the kernel's perspective, there are few things + * OSS developers should be aware of: + * + * - For each sound(4)-created channel, there is a software-facing + * buffer, and a hardware-facing one. + * - The sizes of the buffers can be listed in the console with "sndctl + * swbuf hwbuf". + * - OSS ioctls only concern software-facing buffer fragments, not + * hardware. + * + * For USB sound cards, the block size is set according to the + * hw.usb.uaudio.buffer_ms sysctl, meaning 2ms at 48kHz gives 0.002 * + * 48000 = 96 samples per block. Block size should be set as multiple + * of 96, in this case. The OSS driver insists on reading/writing a + * certain number of samples at a time, one fragment full of samples. + * It is bound to do so at a fixed time frame, to avoid under- and + * overruns during communication with the hardware. + */ + config->buffer_info.fragments = 2; + tmp = size2exp(config->sample_size * config->audio_info.max_channels); + tmp = ((config->buffer_info.fragments) << 16) | tmp; + if (ioctl(config->fd, SNDCTL_DSP_SETFRAGMENT, &tmp) < 0) + err(1, "Unable to set fragment size"); + + /* Get buffer info */ + if ((config->mode & O_ACCMODE) == O_RDONLY) + request = SNDCTL_DSP_GETISPACE; + if (ioctl(config->fd, request, &config->buffer_info) < 0) + err(1, "Unable to get buffer info"); + if (config->buffer_info.fragments < 1) + config->buffer_info.fragments = config->buffer_info.fragstotal; + if (config->buffer_info.bytes < 1) + config->buffer_info.bytes = config->buffer_info.fragstotal * config->buffer_info.fragsize; + if (config->buffer_info.bytes < 1) { + errx(1, "OSS buffer error: buffer size can not be %d\n", + config->buffer_info.bytes); + } + config->sample_count = config->buffer_info.bytes / config->sample_size; + config->chsamples = config->sample_count / config->audio_info.max_channels; + config->buf = malloc(config->buffer_info.bytes); + + printf("bytes: %d, fragments: %d, fragsize: %d, fragstotal: %d, " + "samples: %d\n", + config->buffer_info.bytes, config->buffer_info.fragments, + config->buffer_info.fragsize, config->buffer_info.fragstotal, + config->sample_count); + + /* Set the trigger */ + switch (config->mode & O_ACCMODE) { + case O_RDONLY: + tmp = PCM_ENABLE_INPUT; + break; + case O_WRONLY: + tmp = PCM_ENABLE_OUTPUT; + break; + case O_RDWR: + tmp = PCM_ENABLE_INPUT | PCM_ENABLE_OUTPUT; + break; + default: + errx(1, "Invalid mode %d", config->mode); + break; + } + if (ioctl(config->fd, SNDCTL_DSP_SETTRIGGER, &tmp) < 0) + err(1, "Failed to set trigger"); +} diff --git a/share/examples/sound/oss/README b/share/examples/sound/oss/README deleted file mode 100644 index 0188a26348c8..000000000000 --- a/share/examples/sound/oss/README +++ /dev/null @@ -1,66 +0,0 @@ -Briefly summarised, a general audio application will: -- open(2) -- ioctl(2) -- read(2) -- write(2) -- close(2) - -In this example, read/write will be called in a loop for a duration of -record/playback. Usually, /dev/dsp is the device you want to open, but it can -be any OSS compatible device, even user space one created with virtual_oss. For -configuring sample rate, bit depth and all other configuring of the device -ioctl is used. As devices can support multiple sample rates and formats, what -specific application should do in case there's an error issuing ioctl, as not -all errors are fatal, is upon the developer to decide. As a general guideline -Official OSS development howto should be used. FreeBSD OSS and virtual_oss are -different to a small degree. - -For more advanced OSS and real-time applications, developers need to handle -buffers more carefully. The size of the buffer in OSS is selected using fragment -size size_selector and the buffer size is 2^size_selector for values between 4 -and 16. The formula on the official site is: - -int frag = (max_fragments << 16) | (size_selector); -ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &frag); - -The max_fragments determines in how many fragments the buffer will be, hence if -the size_selector is 4, the requested size is 2^4 = 16 and for the -max_fragments of 2, the total buffer size will be - -(2 ^ size_selector) * max_fragments - -or in this case 32 bytes. Please note that size of buffer is in bytes not -samples. For example, 24bit sample will be represented with 3 bytes. If you're -porting audio app from Linux, you should be aware that 24 bit samples are -represented with 4 bytes (usually int). - -FreeBSD kernel will round up max_fragments and size of fragment/buffer, so the -last thing any OSS code should do is get info about buffer with audio_buf_info -and SNDCTL_DSP_GETOSPACE. That also means that not all values of max_fragments -are permitted. - -From kernel perspective, there are few points OSS developers should be aware of: -- There is a software facing buffer (bs) and a hardware driver buffer (b) -- The sizes can be seen with cat /dev/sndstat as [b:_/_/_] [bs:_/_/_] (needed: - sysctl hw.snd.verbose=2) -- OSS ioctl only concern software buffer fragments, not hardware - -For USB the block size is according to hw.usb.uaudio.buffer_ms sysctl, meaning -2ms at 48kHz gives 0.002 * 48000 = 96 samples per block, all multiples of this -work well. Block size for virtual_oss, if used, should be set accordingly. - -OSS driver insists on reading / writing a certain number of samples at a time, -one fragment full of samples. It is bound to do so in a fixed time frame, to -avoid under- and overruns in communication with the hardware. - -The idea of a total buffer size that holds max_fragments fragments is to give -some slack and allow application to be about max_fragments - 1 fragments late. -Let's call this the jitter tolerance. The jitter tolerance may be much less if -there is a slight mismatch between the period and the samples per fragment. - -Jitter tolerance gets better if we can make either the period or the samples -per fragment considerably smaller than the other. In our case that means we -divide the total buffer size into smaller fragments, keeping overall latency at -the same level. - -Official OSS development howto: http://manuals.opensound.com/developer/DSP.html diff --git a/share/examples/sound/oss/audio.c b/share/examples/sound/oss/audio.c deleted file mode 100644 index 4dd3c8b82575..000000000000 --- a/share/examples/sound/oss/audio.c +++ /dev/null @@ -1,310 +0,0 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2021 Goran Mekić - * 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. - */ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#ifndef SAMPLE_SIZE -#define SAMPLE_SIZE 16 -#endif - -/* Format can be unsigned, in which case replace S with U */ -#if SAMPLE_SIZE == 32 -typedef int32_t sample_t; -int format = AFMT_S32_NE; /* Signed 32bit native endian format */ -#elif SAMPLE_SIZE == 16 -typedef int16_t sample_t; -int format = AFMT_S16_NE; /* Signed 16bit native endian format */ -#elif SAMPLE_SIZE == 8 -typedef int8_t sample_t; -int format = AFMT_S8_NE; /* Signed 8bit native endian format */ -#else -#error Unsupported sample format! -typedef int32_t sample_t; -int format = AFMT_S32_NE; /* Not a real value, just silencing - * compiler errors */ -#endif - -/* - * Minimal configuration for OSS - * For real world applications, this structure will probably contain many - * more fields - */ -typedef struct config { - char *device; - int channels; - int fd; - int format; - int frag; - int sample_count; - int sample_rate; - int sample_size; - int chsamples; - int mmap; - oss_audioinfo audio_info; - audio_buf_info buffer_info; -} config_t; - -/* - * Error state is indicated by value=-1 in which case application exits with - * error - */ -static inline void -check_error(const int value, const char *message) -{ - if (value == -1) - err(1, "OSS error: %s\n", message); -} - - -/* Calculate frag by giving it minimal size of buffer */ -static inline int -size2frag(int x) -{ - int frag = 0; - - while ((1 << frag) < x) - ++frag; - - return (frag); -} - -/* - * Split input buffer into channels. Input buffer is in interleaved format - * which means if we have 2 channels (L and R), this is what the buffer of 8 - * samples would contain: L,R,L,R,L,R,L,R. The result are two channels - * containing: L,L,L,L and R,R,R,R. - */ -static void -oss_split(config_t *config, sample_t *input, sample_t *output) -{ - int channel, index, i; - - for (i = 0; i < config->sample_count; ++i) { - channel = i % config->channels; - index = i / config->channels; - output[channel * index] = input[i]; - } -} - -/* - * Convert channels into interleaved format and place it in output - * buffer - */ -static void -oss_merge(config_t *config, sample_t *input, sample_t *output) -{ - int channel, index; - - for (channel = 0; channel < config->channels; ++channel) { - for (index = 0; index < config->chsamples; ++index) { - output[index * config->channels + channel] = - input[channel * index]; - } - } -} - -static void -oss_init(config_t *config) -{ - int error, tmp, min_frag; - - /* Open the device for read and write */ - config->fd = open(config->device, O_RDWR); - check_error(config->fd, "open"); - - /* Get device information */ - config->audio_info.dev = -1; - error = ioctl(config->fd, SNDCTL_ENGINEINFO, &(config->audio_info)); - check_error(error, "SNDCTL_ENGINEINFO"); - printf("min_channels: %d\n", config->audio_info.min_channels); - printf("max_channels: %d\n", config->audio_info.max_channels); - printf("latency: %d\n", config->audio_info.latency); - printf("handle: %s\n", config->audio_info.handle); - if (config->audio_info.min_rate > config->sample_rate || - config->sample_rate > config->audio_info.max_rate) { - errx(1, "%s doesn't support chosen samplerate of %dHz!\n", - config->device, config->sample_rate); - } - if (config->channels < 1) - config->channels = config->audio_info.max_channels; - - /* - * If device is going to be used in mmap mode, disable all format - * conversions. Official OSS documentation states error code should not - * be checked. - * http://manuals.opensound.com/developer/mmap_test.c.html#LOC10 - */ - if (config->mmap) { - tmp = 0; - ioctl(config->fd, SNDCTL_DSP_COOKEDMODE, &tmp); - } - - /* - * Set number of channels. If number of channels is chosen to the value - * near the one wanted, save it in config - */ - tmp = config->channels; - error = ioctl(config->fd, SNDCTL_DSP_CHANNELS, &tmp); - check_error(error, "SNDCTL_DSP_CHANNELS"); - /* Or check if tmp is close enough? */ - if (tmp != config->channels) { - errx(1, "%s doesn't support chosen channel count of %d set " - "to %d!\n", config->device, config->channels, tmp); - } - config->channels = tmp; - - /* Set format, or bit size: 8, 16, 24 or 32 bit sample */ - tmp = config->format; - error = ioctl(config->fd, SNDCTL_DSP_SETFMT, &tmp); - check_error(error, "SNDCTL_DSP_SETFMT"); - if (tmp != config->format) { - errx(1, "%s doesn't support chosen sample format!\n", - config->device); - } - - /* Most common values for samplerate (in kHz): 44.1, 48, 88.2, 96 */ - tmp = config->sample_rate; - error = ioctl(config->fd, SNDCTL_DSP_SPEED, &tmp); - check_error(error, "SNDCTL_DSP_SPEED"); - - /* Get and check device capabilities */ - error = ioctl(config->fd, SNDCTL_DSP_GETCAPS, &(config->audio_info.caps)); - check_error(error, "SNDCTL_DSP_GETCAPS"); - if (!(config->audio_info.caps & PCM_CAP_DUPLEX)) - errx(1, "Device doesn't support full duplex!\n"); - - if (config->mmap) { - if (!(config->audio_info.caps & PCM_CAP_TRIGGER)) - errx(1, "Device doesn't support triggering!\n"); - if (!(config->audio_info.caps & PCM_CAP_MMAP)) - errx(1, "Device doesn't support mmap mode!\n"); - } - - /* - * If desired frag is smaller than minimum, based on number of channels - * and format (size in bits: 8, 16, 24, 32), set that as frag. Buffer - * size is 2^frag, but the real size of the buffer will be read when - * the configuration of the device is successful - */ - min_frag = size2frag(config->sample_size * config->channels); - - if (config->frag < min_frag) - config->frag = min_frag; - - /* - * Allocate buffer in fragments. Total buffer will be split in number - * of fragments (2 by default) - */ - if (config->buffer_info.fragments < 0) - config->buffer_info.fragments = 2; - tmp = ((config->buffer_info.fragments) << 16) | config->frag; - error = ioctl(config->fd, SNDCTL_DSP_SETFRAGMENT, &tmp); - check_error(error, "SNDCTL_DSP_SETFRAGMENT"); - - /* When all is set and ready to go, get the size of buffer */ - error = ioctl(config->fd, SNDCTL_DSP_GETOSPACE, &(config->buffer_info)); - check_error(error, "SNDCTL_DSP_GETOSPACE"); - if (config->buffer_info.bytes < 1) { - errx(1, "OSS buffer error: buffer size can not be %d\n", - config->buffer_info.bytes); - } - config->sample_count = config->buffer_info.bytes / config->sample_size; - config->chsamples = config->sample_count / config->channels; -} - -int -main(int argc, char *argv[]) -{ - int ret, bytes; - int8_t *ibuf, *obuf; - config_t config = { - .device = "/dev/dsp", - .channels = -1, - .format = format, - .frag = -1, - .sample_rate = 48000, - .sample_size = sizeof(sample_t), - .buffer_info.fragments = -1, - .mmap = 0, - }; - - /* Initialize device */ - oss_init(&config); - - /* - * Allocate input and output buffers so that their size match frag_size - */ - bytes = config.buffer_info.bytes; - ibuf = malloc(bytes); - obuf = malloc(bytes); - sample_t *channels = malloc(bytes); - - printf("bytes: %d, fragments: %d, fragsize: %d, fragstotal: %d, " - "samples: %d\n", - bytes, config.buffer_info.fragments, - config.buffer_info.fragsize, config.buffer_info.fragstotal, - config.sample_count); - - /* Minimal engine: read input and copy it to the output */ - for (;;) { - ret = read(config.fd, ibuf, bytes); - if (ret < bytes) { - fprintf(stderr, "Requested %d bytes, but read %d!\n", - bytes, ret); - break; - } - oss_split(&config, (sample_t *)ibuf, channels); - /* All processing will happen here */ - oss_merge(&config, channels, (sample_t *)obuf); - ret = write(config.fd, obuf, bytes); - if (ret < bytes) { - fprintf(stderr, "Requested %d bytes, but wrote %d!\n", - bytes, ret); - break; - } - } - - /* Cleanup */ - free(channels); - free(obuf); - free(ibuf); - close(config.fd); - - return (0); -} diff --git a/share/examples/sound/poll.c b/share/examples/sound/poll.c new file mode 100644 index 000000000000..53bdf572e991 --- /dev/null +++ b/share/examples/sound/poll.c @@ -0,0 +1,70 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Goran Mekić + * + * 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 "oss.h" + +int +main(int argc, char *argv[]) +{ + struct config config = { + .device = "/dev/dsp", + .mode = O_RDWR, + .format = AFMT_S32_NE, + .sample_rate = 48000, + }; + struct pollfd pfds[1]; + int rc, bytes; + + oss_init(&config); + bytes = config.buffer_info.bytes; + + for (;;) { + pfds[0].fd = config.fd; + pfds[0].events = POLLOUT; + if (poll(pfds, sizeof(pfds) / sizeof(struct pollfd), -1) < 0) + err(1, "poll"); + if (pfds[0].revents != 0) { + if ((rc = read(config.fd, config.buf, bytes)) < bytes) { + warn("Requested %d bytes, but read %d!\n", + bytes, rc); + break; + } + if ((rc = write(config.fd, config.buf, bytes)) < bytes) { + err(1, "Requested %d bytes, but wrote %d!\n", + bytes, rc); + break; + } + } + } + + free(config.buf); + close(config.fd); + + return (0); +} diff --git a/share/examples/sound/select.c b/share/examples/sound/select.c new file mode 100644 index 000000000000..762d0b2b86a7 --- /dev/null +++ b/share/examples/sound/select.c @@ -0,0 +1,70 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Goran Mekić + * + * 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 "oss.h" + +int +main(int argc, char *argv[]) +{ + struct config config = { + .device = "/dev/dsp", + .mode = O_RDWR, + .format = AFMT_S32_NE, + .sample_rate = 48000, + }; + fd_set fds; + int rc, bytes; + + oss_init(&config); + bytes = config.buffer_info.bytes; + + for (;;) { + FD_ZERO(&fds); + FD_SET(config.fd, &fds); + if (select(config.fd + 1, &fds, NULL, NULL, NULL) < 0) + err(1, "select"); + if (FD_ISSET(config.fd, &fds)) { + if ((rc = read(config.fd, config.buf, bytes)) < bytes) { + warn("Requested %d bytes, but read %d!\n", + bytes, rc); + break; + } + if ((rc = write(config.fd, config.buf, bytes)) < bytes) { + warn("Requested %d bytes, but wrote %d!\n", + bytes, rc); + break; + } + } + } + + free(config.buf); + close(config.fd); + + return (0); +} diff --git a/share/examples/sound/simple.c b/share/examples/sound/simple.c new file mode 100644 index 000000000000..e458841f596a --- /dev/null +++ b/share/examples/sound/simple.c @@ -0,0 +1,147 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * Copyright (c) 2025 Goran Mekić + * + * 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. + */ + +#include "oss.h" + +/* + * Split input buffer into channels. The input buffer is in interleaved format, + * which means if we have 2 channels (L and R), this is what the buffer of 8 + * samples would contain: L,R,L,R,L,R,L,R. The result of this function is a + * buffer containing: L,L,L,L,R,R,R,R. + */ +static void +to_channels(struct config *config, void *output) +{ + uint8_t *in = config->buf; + uint8_t *out = output; + int i, channel, index, offset, byte; + + /* Iterate over bytes in the input buffer */ + for (byte = 0; byte < config->buffer_info.bytes; + byte += config->sample_size) { + /* + * Get index of a sample in the input buffer measured in + * samples + */ + i = byte / config->sample_size; + + /* Get which channel is being processed */ + channel = i % config->audio_info.max_channels; + + /* Get offset of the sample inside a single channel */ + offset = i / config->audio_info.max_channels; + + /* Get index of a sample in the output buffer */ + index = (channel * config->chsamples + offset) * + config->sample_size; + + /* Copy singe sample from input to output */ + memcpy(out+index, in+byte, config->sample_size); + } +} + +/* + * Convert channels into interleaved format and put into output buffer *** 75 LINES SKIPPED *** From nobody Wed Nov 12 20:31:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6FRQ1Kysz6GYfH; Wed, 12 Nov 2025 20:31: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6FRQ0VDCz42Xc; Wed, 12 Nov 2025 20:31:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762979474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ws8EEjZLoD6eP2Xiru+ZiE/0JF0L4NCVgqzG5TmjJPY=; b=oVDUYsWKVV+FB17QMARdmsRrhxSv91cafK23FQXEfWoHSX/8In2rke3wZNiNGLJ4YK8CJ5 7koU93Od4IvysmpUTXYPXWlL5vf9vt1q+KOcPrWibO5FdUI4BdaHw3/EiRqJUHmjsFBYId sHSaH3q+qFkZEoFG4wOhCMkg8nu43/4MVt/5ahKKjE4uzPWlCbvLoWECegHkUGI5TyzqHP Fb50PqV1ZynnlcpW2XJ92HlAJ7qbbWlnF31FgStTmd6w32WlJsLSGfcBvCas7Uj+OXCqqB 3GzNQ6XjV4ptHFbQi2POdiGqU5RFbR+J2TgIHFpga1JbHqYQMi9JzyUfpjlpcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762979474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ws8EEjZLoD6eP2Xiru+ZiE/0JF0L4NCVgqzG5TmjJPY=; b=Mw59vRNYYmbc0ABm8kejL8vyJUTuza/J8Vbbx1ba/z71t1w7onWviKh4AsrLVcUyu7taXx polX3CoIdmkiUe7Z4R7uzjWmLnzFgsT09Exu3jy2C5cLkThc60NHxdCJskzbzSQyO2JQO7 fhPXWOKq/XDYKRJnCdxE99V/CATN28XOCCz9F9S3rsrFT0KXLDH6Atqtg7OogvmTP7i84x qQc432iewu14MQv2mwMGIl6rGXeKOMrcP8VKx5CPYMtpA4vUBaf4qinfz0OE0HqI5A4IyM dLaf0p7LlX1jUYP1zHrwo9zq6hCBRYX4QQHH+ISudoYmAwwA5bcRy7NIEOb+ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762979474; a=rsa-sha256; cv=none; b=gWwK6VdR4N4R/zngO0H1+mEt2PS70TKeyi9KJxDyx3+pZWN6tVrCdsIcaw3Dl/klYoi/xL VXsJtFpzJdxff3o2iem6YxM6NLf5oqqK8I/S74fFjrTQMpqxQ7m6S8MOyceqZGfpgp9W+i SZuFJY1eh90zrXzp4OJt+2Lrxrjqyi7plO+6cYy/52ikunff17MRzN7+K4oRbtUi1A1bJ0 Aj8Kziyuk+KFoExh2A6D4GfGA8QXITS/QTYYUF2+YQLfBc3Zd9EUFkM4w3bPyfiM+Vgo79 vB1FLLRSkoZ5klEjA5S38yIPDYBrHI4zBxckcd3o3HUc5Y+XI68b/IjW3UvKjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6FRQ05jfzqmy; Wed, 12 Nov 2025 20:31: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 5ACKVD9p000081; Wed, 12 Nov 2025 20:31:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACKVDVP000078; Wed, 12 Nov 2025 20:31:13 GMT (envelope-from git) Date: Wed, 12 Nov 2025 20:31:13 GMT Message-Id: <202511122031.5ACKVDVP000078@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: 4c05ff1d5ad2 - main - sound: Remove KOBJMETHOD_END re-definitions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 4c05ff1d5ad206d6074151f747a1dd272487555c Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4c05ff1d5ad206d6074151f747a1dd272487555c commit 4c05ff1d5ad206d6074151f747a1dd272487555c Author: Christos Margiolis AuthorDate: 2025-11-12 20:30:58 +0000 Commit: Christos Margiolis CommitDate: 2025-11-12 20:30:58 +0000 sound: Remove KOBJMETHOD_END re-definitions No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D53696 --- sys/dev/sound/midi/midi.c | 4 ---- sys/dev/sound/midi/mpu401.c | 4 ---- sys/dev/sound/pcm/sound.h | 4 ---- 3 files changed, 12 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 6753f864ba9c..eed7ce89a919 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -62,10 +62,6 @@ #include MALLOC_DEFINE(M_MIDI, "midi buffers", "Midi data allocation area"); -#ifndef KOBJMETHOD_END -#define KOBJMETHOD_END { NULL, NULL } -#endif - #define MIDI_DEV_MIDICTL 12 enum midi_states { diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c index 224ebb1b01f4..af3149ec8180 100644 --- a/sys/dev/sound/midi/mpu401.c +++ b/sys/dev/sound/midi/mpu401.c @@ -49,10 +49,6 @@ #include "mpu_if.h" #include "mpufoi_if.h" -#ifndef KOBJMETHOD_END -#define KOBJMETHOD_END { NULL, NULL } -#endif - #define MPU_DATAPORT 0 #define MPU_CMDPORT 1 #define MPU_STATPORT 1 diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 75fb57e33733..c5107d5fba1c 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -76,10 +76,6 @@ #include #include -#ifndef KOBJMETHOD_END -#define KOBJMETHOD_END { NULL, NULL } -#endif - struct pcm_channel; struct pcm_feeder; struct snd_dbuf; From nobody Wed Nov 12 21:31:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6Gmw5f4mz6GdSf; Wed, 12 Nov 2025 21:31: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6Gmw57tjz49N5; Wed, 12 Nov 2025 21:31:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762983088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLZRCfGuFx3AAj4LSXC1uzOtJYT2r4xDY3xaFWHW+3I=; b=pJPXrCRF4wiy3YfBJgd3pxI1QNp/a5MVKNg8cIBn8Mi9OBQ6viQ6LTgJEw78+a61p6ljaA d+g0eUFvumQW5FdR5Zb7CoCYdHnc1mnm3IjoOjzrBQxXAhUgwqpCjgPVLGtFwDTE0w6hal 8waI5ARVPkPjbTdxpxId1UH6d7yV7N3Sp7oxeNYoyPsP/vjPLk3bcRNjtoFSwkuPD/l40f 4TK7mGNiMOmbkl8OTXkhgaiH+QRNcqQaArMSxW7iv7ksUf2OIgvaIqmR63GpcAiOGQ9Unv +xN4F/BaY1CS8mf2Xh+R+/lLVCnkQ+EQwpAmgGbYX8wVP298wjBYcz1cczQZGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762983088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLZRCfGuFx3AAj4LSXC1uzOtJYT2r4xDY3xaFWHW+3I=; b=fNa3QdMVSIMmOstebdJHe5CyPlwN9uu3sLf1bNvt7/FcViyacJ5O3gMX/IFh5gbO7ZLm1r o1eqi2JXXen4CybRC3ilJ7XzX4zu7rb31lZv5RQcIxh16vIf/jAVm2N9kbIe1o2Fhtgisy M34N8M8rxMDm7SmOujiQSVMGovZmSyv9OuxpejwuJfWj3nobG0DBfbhFKiBPQnRO7sG2Rp hzI6PzUn0P/W59cE4YxhoalbcNBkYrKfeyv2Zh/9SHYJkoFKMyptm3awwcsmB98uW+Gb0d IElbh2c9MbBfQEtJuAdryqhRUQ3WvJ019EKyKuVxYAHuAuGXq5oDObjqHiKZ0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762983088; a=rsa-sha256; cv=none; b=qJbJ0B9ultD7tz0xmdi5WQnqvdsK5Vj4NV3SGAjgUporSbYEvv9/gTMWx2nN/jj0Nl2Lib F2IbvC3xF8+w28OD22q0ayS1bF+Ko6+OSdhXliwkB1rSG6y1qnZ+waev9WNOnnTtq5PURp VcOT6EuzNslV62cR/iUkNKunDsV5VHLIvuCaawZDOUIKJV4v5mWAr8kokGJ61AlCv38aYi RSlVuANIOPpZEPI6PJGAJXt/iYyp243p++Mt8xI+TwH8Tks9Ny8qQbyeVTqTLNNL09JxFS Q3X4qJqcKcerc2KLz9BLBW0xLU4afqaSHRvJU9dqaOhWavICBq6YsTWWweUJGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6Gmw4bjnzs3K; Wed, 12 Nov 2025 21:31: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 5ACLVSOh016548; Wed, 12 Nov 2025 21:31:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ACLVSoI016545; Wed, 12 Nov 2025 21:31:28 GMT (envelope-from git) Date: Wed, 12 Nov 2025 21:31:28 GMT Message-Id: <202511122131.5ACLVSoI016545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a34a57d4b4eb - main - tarfs: Fix support for large 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a34a57d4b4eba88dfa5541d7d77b63b01c1a1a9a Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a34a57d4b4eba88dfa5541d7d77b63b01c1a1a9a commit a34a57d4b4eba88dfa5541d7d77b63b01c1a1a9a Author: Dag-Erling Smørgrav AuthorDate: 2025-11-12 21:23:49 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-12 21:24:43 +0000 tarfs: Fix support for large files * When fast-forwarding through a zstd frame, we incorrectly used the min() inline function instead of the MIN() macro. The function truncates the result to unsigned int, resulting in a decompression error when trying to seek more than 4 GB into the frame. * POSIX states that a size extended header record overrides the size field in the header if present, and that one must be included if the size of the file exceeds 8 GB (the size field maxes out at 64 GB). * Reduce repetition in the exthdr parser by deduplicating the syntax error handler. MFC after: 1 week Sponsored by: Klara, Inc. Fixes: 69d94f4c7608 ("Add tarfs, a filesystem backed by tarballs.") Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D53718 --- sys/fs/tarfs/tarfs_io.c | 2 +- sys/fs/tarfs/tarfs_vfsops.c | 48 +++++++++++++++++++--------------------- tests/sys/fs/tarfs/tarfs_test.sh | 27 ++++++++++++++++++++++ 3 files changed, 51 insertions(+), 26 deletions(-) diff --git a/sys/fs/tarfs/tarfs_io.c b/sys/fs/tarfs/tarfs_io.c index a3d8df62d7df..e250c5cbce5a 100644 --- a/sys/fs/tarfs/tarfs_io.c +++ b/sys/fs/tarfs/tarfs_io.c @@ -444,7 +444,7 @@ tarfs_zread_zstd(struct tarfs_zio *zio, struct uio *uiop) } if (zio->opos < off) { /* to be discarded */ - zob.size = min(off - zio->opos, len); + zob.size = MIN(off - zio->opos, len); zob.pos = 0; } else { zob.size = len; diff --git a/sys/fs/tarfs/tarfs_vfsops.c b/sys/fs/tarfs/tarfs_vfsops.c index 4cc70e4d5781..cae780cb71e5 100644 --- a/sys/fs/tarfs/tarfs_vfsops.c +++ b/sys/fs/tarfs/tarfs_vfsops.c @@ -441,7 +441,7 @@ tarfs_alloc_one(struct tarfs_mount *tmp, size_t *blknump) int endmarker = 0; char *namep, *sep; struct tarfs_node *parent, *tnp, *other; - size_t namelen = 0, linklen = 0, realsize = 0, sz; + size_t namelen = 0, linklen = 0, realsize = 0, extsize = 0, sz; ssize_t res; dev_t rdev; gid_t gid; @@ -588,10 +588,7 @@ again: char *eol, *key, *value, *sep; size_t len = strtoul(line, &sep, 10); if (len == 0 || sep == line || *sep != ' ') { - TARFS_DPF(ALLOC, "%s: exthdr syntax error\n", - __func__); - error = EINVAL; - goto bad; + goto syntax; } if ((uintptr_t)line + len < (uintptr_t)line || line + len > exthdr + sz) { @@ -606,16 +603,18 @@ again: key = sep + 1; sep = strchr(key, '='); if (sep == NULL) { - TARFS_DPF(ALLOC, "%s: exthdr syntax error\n", - __func__); - error = EINVAL; - goto bad; + goto syntax; } *sep = '\0'; value = sep + 1; TARFS_DPF(ALLOC, "%s: exthdr %s=%s\n", __func__, key, value); - if (strcmp(key, "path") == 0) { + if (strcmp(key, "size") == 0) { + extsize = strtol(value, &sep, 10); + if (sep != eol) { + goto syntax; + } + } else if (strcmp(key, "path") == 0) { name = value; namelen = eol - value; } else if (strcmp(key, "linkpath") == 0) { @@ -625,47 +624,42 @@ again: sparse = true; major = strtol(value, &sep, 10); if (sep != eol) { - printf("exthdr syntax error\n"); - error = EINVAL; - goto bad; + goto syntax; } } else if (strcmp(key, "GNU.sparse.minor") == 0) { sparse = true; minor = strtol(value, &sep, 10); if (sep != eol) { - printf("exthdr syntax error\n"); - error = EINVAL; - goto bad; + goto syntax; } } else if (strcmp(key, "GNU.sparse.name") == 0) { sparse = true; name = value; namelen = eol - value; if (namelen == 0) { - printf("exthdr syntax error\n"); - error = EINVAL; - goto bad; + goto syntax; } } else if (strcmp(key, "GNU.sparse.realsize") == 0) { sparse = true; realsize = strtoul(value, &sep, 10); if (sep != eol) { - printf("exthdr syntax error\n"); - error = EINVAL; - goto bad; + goto syntax; } } else if (strcmp(key, "SCHILY.fflags") == 0) { flags |= tarfs_strtofflags(value, &sep); if (sep != eol) { - printf("exthdr syntax error\n"); - error = EINVAL; - goto bad; + goto syntax; } } } goto again; } + /* do we have a size from an exthdr? */ + if (extsize > 0) { + sz = extsize; + } + /* sparse file consistency checks */ if (sparse) { TARFS_DPF(ALLOC, "%s: %s: sparse %ld.%ld (%zu bytes)\n", __func__, @@ -832,6 +826,10 @@ skip: sbuf_delete(namebuf); } return (0); +syntax: + TARFS_DPF(ALLOC, "%s: exthdr syntax error\n", __func__); + error = EINVAL; + goto bad; eof: TARFS_DPF(IO, "%s: premature end of file\n", __func__); error = EIO; diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh index d4de71271985..505bfc5325f0 100644 --- a/tests/sys/fs/tarfs/tarfs_test.sh +++ b/tests/sys/fs/tarfs/tarfs_test.sh @@ -396,6 +396,32 @@ tarfs_git_archive_cleanup() { tarfs_cleanup } +atf_test_case tarfs_large cleanup +tarfs_large_head() { + atf_set "descr" "Test support for large files" + atf_set "require.user" "root" + atf_set "require.kmods" "tarfs" + atf_set "timeout" "600" +} +tarfs_large_body() { + tarfs_setup + local tarball="${PWD}/tarfs_test.tar.zst" + local exp off + for exp in 31 32 33 34 35 36 ; do + for off in 1 0 ; do + local size=$(((1< To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 2d608a4cebbd - main - if_media.h: Add 400GBase-SR8 and 400GBase-CR8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 2d608a4cebbd5b9e648f86e52f115c02fac52d88 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=2d608a4cebbd5b9e648f86e52f115c02fac52d88 commit 2d608a4cebbd5b9e648f86e52f115c02fac52d88 Author: Navdeep Parhar AuthorDate: 2025-11-12 22:10:04 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-12 22:13:53 +0000 if_media.h: Add 400GBase-SR8 and 400GBase-CR8 Reviewed by: bz (network) MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D53387 --- sys/net/ieee8023ad_lacp.c | 2 ++ sys/net/if_media.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c index 9ebdd11f70f3..77b5a5d53a67 100644 --- a/sys/net/ieee8023ad_lacp.c +++ b/sys/net/ieee8023ad_lacp.c @@ -1264,6 +1264,8 @@ lacp_compose_key(struct lacp_port *lp) case IFM_400G_DR4: case IFM_400G_AUI8_AC: case IFM_400G_AUI8: + case IFM_400G_SR8: + case IFM_400G_CR8: key = IFM_400G_FR8; break; default: diff --git a/sys/net/if_media.h b/sys/net/if_media.h index a2cac00550ef..8196a54c8ba9 100644 --- a/sys/net/if_media.h +++ b/sys/net/if_media.h @@ -260,6 +260,8 @@ uint64_t ifmedia_baudrate(int); #define IFM_40G_LM4 IFM_X(119) /* 40GBase-LM4 */ #define IFM_100_BX IFM_X(120) /* 100Base-BX */ #define IFM_1000_BX IFM_X(121) /* 1000Base-BX */ +#define IFM_400G_SR8 IFM_X(122) /* 400GBase-SR8 */ +#define IFM_400G_CR8 IFM_X(123) /* 400GBase-CR8 */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -550,6 +552,8 @@ struct ifmedia_description { { IFM_400G_DR4, "400GBase-DR4" }, \ { IFM_400G_AUI8_AC, "400G-AUI8-AC" }, \ { IFM_400G_AUI8, "400G-AUI8" }, \ + { IFM_400G_SR8, "400GBase-SR8" }, \ + { IFM_400G_SR8, "400GBase-CR8" }, \ { 0, NULL }, \ } @@ -897,6 +901,8 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_400G_DR4, IF_Gbps(400ULL) }, \ { IFM_ETHER | IFM_400G_AUI8_AC, IF_Gbps(400ULL) }, \ { IFM_ETHER | IFM_400G_AUI8, IF_Gbps(400ULL) }, \ + { IFM_ETHER | IFM_400G_SR8, IF_Gbps(400ULL) }, \ + { IFM_ETHER | IFM_400G_CR8, IF_Gbps(400ULL) }, \ \ { IFM_IEEE80211 | IFM_IEEE80211_FH1, IF_Mbps(1) }, \ { IFM_IEEE80211 | IFM_IEEE80211_FH2, IF_Mbps(2) }, \ From nobody Thu Nov 13 00:29:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6Lk75b5Pz6Gr5J; Thu, 13 Nov 2025 00:29: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6Lk74sF9z3HDY; Thu, 13 Nov 2025 00:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762993759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPMjDVqx2a5OhSjpl6Arpekbrq8h76/s9TU5DPDAxY0=; b=Qp1ImKn4KAcJmC8Fp2whm8PneQzC09U/dgCSsr2GhBxPFS1SIyk5Q5fTku8eZtgU+MNXui O1cpgVjROdrhS8kpE664pI6qpr/2RfohLWMsogAuY0B+cXlO/YzTQO6Id0s9HBfP319lZG nAdrMRr7TNNihLf8z2TZprJK5g96ZcuwkLrPejboB8aOgpnA+iQ4odiNFd6Ig39Jb7b+bv +9K5efSzkkiiTQS6ZyWsrDO5Al/+GaPtFXMzNCvOk1JCa4qEN2ZamJEKxZTT84dTpqbCo+ nDxwKrnQp7/3EnzYUSBBAqgy1l+UpxuC4s8ys8un12dqWgqeSRFFPJNany8Slg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762993759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPMjDVqx2a5OhSjpl6Arpekbrq8h76/s9TU5DPDAxY0=; b=FV7W4Bh7d4rNiC7nR2aEwQYgB2JT1KSwF6zjIV0Ib8kFcoesUBsv/Bv0CLo44vJEpoMqrZ QRQmZshw+QN21Nv3vCysSP+xS8Du+5uVgMyvGx1nQTPXhxBepu/2fWdVTT3eTl68ST/Qv4 j3ONcflznyuQIt1TSLd7XLjLyzLGysWmGqWHQyimGGbYvdM5gG5XGcbI3QfrmWMW22kUeI 0EWXAjGuMHYvUNWEIFhEtXRh7/lJPsdIsHuw36fVHQgboLb3EhTzwT0zxSUp6/3ADVH292 E8dSnmRh4ywm7fKRzxpbmCoLK2xPRSLPlmhaw1K8X+NENJN3akRluHanYNkNkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762993759; a=rsa-sha256; cv=none; b=cECH6eeHn5T/a9CZG/tbJIFUOaX7sOj2lU+tHCGDzFzRLFah2YWxMqSPGVkxoEkRrL4s1e KWcqTT27CmWWj6Jf1Z+MMSALvxXtFk7+HNRyFaue1FiX/H5MOr3PUmhN33WynJwjAQYMEo Ff5fpE5SuhGGJGBo189K1UE+8wCpxa3qU3D16zee/PbJY5pcn/OsCPRxL0OInQ9jszX9tU KFpyvTKTcvoRG7XcSkzeBGeVu4MB/IbYOVJ5ZWrM6wXV147QehvJCX2yGDGqFuNpsm+JrL p8uQukM6Ta0uJ9NuscCCbK53leNvoPqc7rs+tb82M4f1AcCTOnwpY39nthWL/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6Lk74Rl7zxpR; Thu, 13 Nov 2025 00:29: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 5AD0TJr7044830; Thu, 13 Nov 2025 00:29:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AD0TJ5u044827; Thu, 13 Nov 2025 00:29:19 GMT (envelope-from git) Date: Thu, 13 Nov 2025 00:29:19 GMT Message-Id: <202511130029.5AD0TJ5u044827@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: 4b17bb0edea0 - main - cxgbe(4): Add support for QSFP-DD connector and 400G transceivers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 4b17bb0edea0341d81eba3d369bd7739e5683d4b Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=4b17bb0edea0341d81eba3d369bd7739e5683d4b commit 4b17bb0edea0341d81eba3d369bd7739e5683d4b Author: Navdeep Parhar AuthorDate: 2025-10-16 18:23:49 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-13 00:11:47 +0000 cxgbe(4): Add support for QSFP-DD connector and 400G transceivers Tested with SR8 and DR4 transceivers. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/firmware/t4fw_interface.h | 7 ++++--- sys/dev/cxgbe/t4_main.c | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/sys/dev/cxgbe/firmware/t4fw_interface.h b/sys/dev/cxgbe/firmware/t4fw_interface.h index 5874f0343b03..b11552dce021 100644 --- a/sys/dev/cxgbe/firmware/t4fw_interface.h +++ b/sys/dev/cxgbe/firmware/t4fw_interface.h @@ -8967,9 +8967,10 @@ enum fw_port_type { FW_PORT_TYPE_SFP28 = 20, /* No, 1, 25G/10G/1G */ FW_PORT_TYPE_KR_SFP28 = 21, /* No, 1, 25G/10G/1G using Backplane */ FW_PORT_TYPE_KR_XLAUI = 22, /* No, 4, 40G/10G/1G, No AN*/ - FW_PORT_TYPE_SFP56 = 26, - FW_PORT_TYPE_QSFP56 = 27, - FW_PORT_TYPE_NONE = M_FW_PORT_CMD_PTYPE + FW_PORT_TYPE_SFP56 = 26, /* No, 1, 50G/25G */ + FW_PORT_TYPE_QSFP56 = 27, /* No, 4, 200G/100G/50G/25G */ + FW_PORT_TYPE_QSFPDD = 34, /* No, 8, 400G/200G/100G/50G */ + FW_PORT_TYPE_NONE = M_FW_PORT_CMD_PORTTYPE32 }; static inline bool diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 6133d810c003..99d9cad9f013 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -3652,6 +3652,7 @@ port_mword(struct port_info *pi, uint32_t speed) case FW_PORT_TYPE_SFP28: case FW_PORT_TYPE_SFP56: case FW_PORT_TYPE_QSFP56: + case FW_PORT_TYPE_QSFPDD: /* Pluggable transceiver */ switch (pi->mod_type) { case FW_PORT_MOD_TYPE_LR: @@ -3671,6 +3672,8 @@ port_mword(struct port_info *pi, uint32_t speed) return (IFM_100G_LR4); case FW_PORT_CAP32_SPEED_200G: return (IFM_200G_LR4); + case FW_PORT_CAP32_SPEED_400G: + return (IFM_400G_LR8); } break; case FW_PORT_MOD_TYPE_SR: @@ -3689,6 +3692,8 @@ port_mword(struct port_info *pi, uint32_t speed) return (IFM_100G_SR4); case FW_PORT_CAP32_SPEED_200G: return (IFM_200G_SR4); + case FW_PORT_CAP32_SPEED_400G: + return (IFM_400G_SR8); } break; case FW_PORT_MOD_TYPE_ER: @@ -3712,6 +3717,8 @@ port_mword(struct port_info *pi, uint32_t speed) return (IFM_100G_CR4); case FW_PORT_CAP32_SPEED_200G: return (IFM_200G_CR4_PAM4); + case FW_PORT_CAP32_SPEED_400G: + return (IFM_400G_CR8); } break; case FW_PORT_MOD_TYPE_LRM: @@ -3723,10 +3730,12 @@ port_mword(struct port_info *pi, uint32_t speed) return (IFM_100G_DR); if (speed == FW_PORT_CAP32_SPEED_200G) return (IFM_200G_DR4); + if (speed == FW_PORT_CAP32_SPEED_400G) + return (IFM_400G_DR4); break; case FW_PORT_MOD_TYPE_NA: MPASS(0); /* Not pluggable? */ - /* fall throough */ + /* fall through */ case FW_PORT_MOD_TYPE_ERROR: case FW_PORT_MOD_TYPE_UNKNOWN: case FW_PORT_MOD_TYPE_NOTSUPPORTED: @@ -3735,6 +3744,10 @@ port_mword(struct port_info *pi, uint32_t speed) return (IFM_NONE); } break; + case M_FW_PORT_CMD_PTYPE: /* FW_PORT_TYPE_NONE for old firmware */ + if (chip_id(pi->adapter) >= CHELSIO_T7) + return (IFM_UNKNOWN); + /* fall through */ case FW_PORT_TYPE_NONE: return (IFM_NONE); } From nobody Thu Nov 13 00:41:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6M0H0vYcz6GrTy; Thu, 13 Nov 2025 00:41: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6M0H0cyZz3J23; Thu, 13 Nov 2025 00:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762994495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mgfj+AFFR+gTCkSxaS6m+DATF+VZhHBJ/X0n7SlUnR8=; b=Z38EVszFxKzWm1dgpdFo6H2ARDxFLoP/vAyKcrJUNYQRAzmuSVAsMir6FBHVkVpWGIB9im w7eUIdJMvCMYO9G3jKtQEwz6p94qZmUXj98BldTJJyE5fNj35l6c+m92oia/APIMe4U9XV MB15zE6X9OeMtiFlysJ4UCs3IqKiliJLp2YzNQQvrZXocL/YRnyq4zSn3OqTyJ5V6aN0Ye w10UV3LDs6gLwzjHmz7OuOd4jJbVVFUYK8ALkL5wSmRRy1/feNslaOfMSwABXT1ZT3571Q fQYY25jup9oBXs5HACc6MoF2DSwpfMvetopjvfEg6zClKjbaEzkIuohrHL/UaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762994495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mgfj+AFFR+gTCkSxaS6m+DATF+VZhHBJ/X0n7SlUnR8=; b=okKWi0rYgMmgTCX91Srb9VAc4dNRd16E1+0xDeOyI4xlRiULHMzHuTV6RdnsORiUqNYdHf QzSPQClui49yGX+EpR/Q5H9kKsuhJ6MMpLp0i/9svHsCQvW4YJG/L04n4FSQeVVfxpvYhl zFgw/T0KwXytuswoQlXVEZs1hqui6kNwdrCU6DUQVTFEr5egTdOzi6oA4446Xmq7QXXVQb ytiKnXhrjNEgFMR+NF+E9SSfvk9djEiroL+veZ6BWANwN/gaF8DMzzT1otgeY/NBFEk/J0 eV8He4qcwoFeoAQ6s1vFdUIop1pxBvkPA6fiynbCErS4dmyaY+wOWv5JOh5LTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762994495; a=rsa-sha256; cv=none; b=tymgCXSOQTgDG91+Viq7vf4yKjDBx5BpUgXeCNPYzarVd3ighjZ3ue7BcqAQ7OuUit34za VjfW5HnGZtvGk9qFAYsQuFVrX7cROXQOyLm+XPxU3GoEOu4xvNCj7Pk7lAnWvtCDv6qf71 GzfONVsV6Pk7k4J38+wiGs7lAK602hnWIS4OTXaMLSdadttDgvyZZNx86SunlChEI1fMKx 8Xyaymt0iNdWl+4QUpndCUCaMFiS2nRx5mbpRFV8JIOCNsoON5v681yyctjwbc8LdTkt0N 1WtrdnhYWXxrHM18dmAq7ndFCy8pFp149GXxsOIqfpdT+vK639oDF670fxprwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6M0H08rszyBM; Thu, 13 Nov 2025 00:41: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 5AD0fY1C077226; Thu, 13 Nov 2025 00:41:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AD0fYXA077222; Thu, 13 Nov 2025 00:41:34 GMT (envelope-from git) Date: Thu, 13 Nov 2025 00:41:34 GMT Message-Id: <202511130041.5AD0fYXA077222@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: 17b4a0acfaf5 - main - cxgbe(4): T7 related updates to shared code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 17b4a0acfaf5e58a04232c756a79d73649ead231 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=17b4a0acfaf5e58a04232c756a79d73649ead231 commit 17b4a0acfaf5e58a04232c756a79d73649ead231 Author: Navdeep Parhar AuthorDate: 2025-10-15 19:29:06 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-13 00:32:38 +0000 cxgbe(4): T7 related updates to shared code - Avoid some more registers with read side-effects during regdump. - mps_tcam_size is 3x the size of T6/T5. - Update rss_rd_row to work with T7. Obtained from: Chelsio Communications MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/t4_hw.c | 98 +++++-- sys/dev/cxgbe/common/t4_msg.h | 566 +++++++++++++++++++++++++++++++++------ sys/dev/cxgbe/common/t4_regs.h | 100 ++++++- sys/dev/cxgbe/tom/t4_cpl_io.c | 2 +- usr.sbin/cxgbetool/reg_defs_t7.c | 126 +++++---- 5 files changed, 723 insertions(+), 169 deletions(-) diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index eb7ea9acc108..1fd1c36c1f25 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -84,6 +84,41 @@ static inline int t4_wait_op_done(struct adapter *adapter, int reg, u32 mask, delay, NULL); } + /** + * t7_wait_sram_done - wait until an operation is completed + * @adapter: the adapter performing the operation + * @reg: the register to check for completion + * @result_reg: register that holds the result value + * @attempts: number of check iterations + * @delay: delay in usecs between iterations + * @valp: where to store the value of the result register at completion time + * + * Waits until a specific bit in @reg is cleared, checking up to + * @attempts times.Once the bit is cleared, reads from @result_reg + * and stores the value in @valp if it is not NULL. Returns 0 if the + * operation completes successfully and -EAGAIN if it times out. + */ +static int t7_wait_sram_done(struct adapter *adap, int reg, int result_reg, + int attempts, int delay, u32 *valp) +{ + while (1) { + u32 val = t4_read_reg(adap, reg); + + /* Check if SramStart (bit 19) is cleared */ + if (!(val & (1 << 19))) { + if (valp) + *valp = t4_read_reg(adap, result_reg); + return 0; + } + + if (--attempts == 0) + return -EAGAIN; + + if (delay) + udelay(delay); + } +} + /** * t4_set_reg_field - set a register field to a value * @adapter: the adapter to program @@ -578,14 +613,15 @@ int t4_mc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *ecc) mc_bist_cmd_len_reg = A_MC_BIST_CMD_LEN; mc_bist_status_rdata_reg = A_MC_BIST_STATUS_RDATA; mc_bist_data_pattern_reg = A_MC_BIST_DATA_PATTERN; - } else { + } else if (chip_id(adap) < CHELSIO_T7) { mc_bist_cmd_reg = MC_REG(A_MC_P_BIST_CMD, idx); mc_bist_cmd_addr_reg = MC_REG(A_MC_P_BIST_CMD_ADDR, idx); mc_bist_cmd_len_reg = MC_REG(A_MC_P_BIST_CMD_LEN, idx); - mc_bist_status_rdata_reg = MC_REG(A_MC_P_BIST_STATUS_RDATA, - idx); - mc_bist_data_pattern_reg = MC_REG(A_MC_P_BIST_DATA_PATTERN, - idx); + mc_bist_status_rdata_reg = MC_REG(A_MC_P_BIST_STATUS_RDATA, idx); + mc_bist_data_pattern_reg = MC_REG(A_MC_P_BIST_DATA_PATTERN, idx); + } else { + /* Need to figure out split mode and the rest. */ + return (-ENOTSUP); } if (t4_read_reg(adap, mc_bist_cmd_reg) & F_START_BIST) @@ -636,21 +672,13 @@ int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *ecc) edc_bist_status_rdata_reg = EDC_REG(A_EDC_BIST_STATUS_RDATA, idx); } else { -/* - * These macro are missing in t4_regs.h file. - * Added temporarily for testing. - */ -#define EDC_STRIDE_T5 (EDC_T51_BASE_ADDR - EDC_T50_BASE_ADDR) -#define EDC_REG_T5(reg, idx) (reg + EDC_STRIDE_T5 * idx) - edc_bist_cmd_reg = EDC_REG_T5(A_EDC_H_BIST_CMD, idx); - edc_bist_cmd_addr_reg = EDC_REG_T5(A_EDC_H_BIST_CMD_ADDR, idx); - edc_bist_cmd_len_reg = EDC_REG_T5(A_EDC_H_BIST_CMD_LEN, idx); - edc_bist_cmd_data_pattern = EDC_REG_T5(A_EDC_H_BIST_DATA_PATTERN, + edc_bist_cmd_reg = EDC_T5_REG(A_EDC_H_BIST_CMD, idx); + edc_bist_cmd_addr_reg = EDC_T5_REG(A_EDC_H_BIST_CMD_ADDR, idx); + edc_bist_cmd_len_reg = EDC_T5_REG(A_EDC_H_BIST_CMD_LEN, idx); + edc_bist_cmd_data_pattern = EDC_T5_REG(A_EDC_H_BIST_DATA_PATTERN, idx); - edc_bist_status_rdata_reg = EDC_REG_T5(A_EDC_H_BIST_STATUS_RDATA, + edc_bist_status_rdata_reg = EDC_T5_REG(A_EDC_H_BIST_STATUS_RDATA, idx); -#undef EDC_REG_T5 -#undef EDC_STRIDE_T5 } if (t4_read_reg(adap, edc_bist_cmd_reg) & F_START_BIST) @@ -2662,10 +2690,9 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size) 0x173c, 0x1760, 0x1800, 0x18fc, 0x3000, 0x3044, - 0x3060, 0x3064, 0x30a4, 0x30b0, 0x30b8, 0x30d8, - 0x30e0, 0x30fc, + 0x30e0, 0x30e8, 0x3140, 0x357c, 0x35a8, 0x35cc, 0x35e0, 0x35ec, @@ -2680,7 +2707,7 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size) 0x480c, 0x4814, 0x4890, 0x489c, 0x48a4, 0x48ac, - 0x48b8, 0x48c4, + 0x48b8, 0x48bc, 0x4900, 0x4924, 0x4ffc, 0x4ffc, 0x5500, 0x5624, @@ -2698,8 +2725,10 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size) 0x5a60, 0x5a6c, 0x5a80, 0x5a8c, 0x5a94, 0x5a9c, - 0x5b94, 0x5bfc, - 0x5c10, 0x5e48, + 0x5b94, 0x5bec, + 0x5bf8, 0x5bfc, + 0x5c10, 0x5c40, + 0x5c4c, 0x5e48, 0x5e50, 0x5e94, 0x5ea0, 0x5eb0, 0x5ec0, 0x5ec0, @@ -2708,7 +2737,8 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size) 0x5ef0, 0x5ef0, 0x5f00, 0x5f04, 0x5f0c, 0x5f10, - 0x5f20, 0x5f88, + 0x5f20, 0x5f78, + 0x5f84, 0x5f88, 0x5f90, 0x5fd8, 0x6000, 0x6020, 0x6028, 0x6030, @@ -3084,7 +3114,7 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size) 0x38140, 0x38140, 0x38150, 0x38154, 0x38160, 0x381c4, - 0x381f0, 0x38204, + 0x381d0, 0x38204, 0x3820c, 0x38214, 0x3821c, 0x3822c, 0x38244, 0x38244, @@ -3156,6 +3186,10 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size) 0x3a000, 0x3a004, 0x3a050, 0x3a084, 0x3a090, 0x3a09c, + 0x3a93c, 0x3a93c, + 0x3b93c, 0x3b93c, + 0x3c93c, 0x3c93c, + 0x3d93c, 0x3d93c, 0x3e000, 0x3e020, 0x3e03c, 0x3e05c, 0x3e100, 0x3e120, @@ -6439,9 +6473,15 @@ int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid, /* Read an RSS table row */ static int rd_rss_row(struct adapter *adap, int row, u32 *val) { - t4_write_reg(adap, A_TP_RSS_LKP_TABLE, 0xfff00000 | row); - return t4_wait_op_done_val(adap, A_TP_RSS_LKP_TABLE, F_LKPTBLROWVLD, 1, - 5, 0, val); + if (chip_id(adap) < CHELSIO_T7) { + t4_write_reg(adap, A_TP_RSS_LKP_TABLE, 0xfff00000 | row); + return t4_wait_op_done_val(adap, A_TP_RSS_LKP_TABLE, + F_LKPTBLROWVLD, 1, 5, 0, val); + } else { + t4_write_reg(adap, A_TP_RSS_CONFIG_SRAM, 0xB0000 | row); + return t7_wait_sram_done(adap, A_TP_RSS_CONFIG_SRAM, + A_TP_RSS_LKP_TABLE, 5, 0, val); + } } /** @@ -10178,7 +10218,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .vfcount = 256, .sge_fl_db = 0, .sge_ctxt_size = SGE_CTXT_SIZE_T7, - .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, + .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES * 3, .rss_nentries = T7_RSS_NENTRIES, .cim_la_size = CIMLA_SIZE_T6, }, diff --git a/sys/dev/cxgbe/common/t4_msg.h b/sys/dev/cxgbe/common/t4_msg.h index 0d12ccf2e910..214080964fbb 100644 --- a/sys/dev/cxgbe/common/t4_msg.h +++ b/sys/dev/cxgbe/common/t4_msg.h @@ -30,6 +30,7 @@ #define T4_MSG_H enum cpl_opcodes { + CPL_TLS_TX_SCMD_FMT = 0x0, CPL_PASS_OPEN_REQ = 0x1, CPL_PASS_ACCEPT_RPL = 0x2, CPL_ACT_OPEN_REQ = 0x3, @@ -48,6 +49,8 @@ enum cpl_opcodes { CPL_RTE_READ_REQ = 0x11, CPL_L2T_WRITE_REQ = 0x12, CPL_L2T_READ_REQ = 0x13, + CPL_GRE_TABLE_REQ = 0x1b, + CPL_GRE_TABLE_RPL = 0xbb, CPL_SMT_WRITE_REQ = 0x14, CPL_SMT_READ_REQ = 0x15, CPL_TAG_WRITE_REQ = 0x16, @@ -130,6 +133,7 @@ enum cpl_opcodes { CPL_TX_TLS_SFO = 0x89, CPL_TX_SEC_PDU = 0x8A, CPL_TX_TLS_ACK = 0x8B, + CPL_TX_QUIC_ENC = 0x8d, CPL_RCB_UPD = 0x8C, CPL_SGE_FLR_FLUSH = 0xA0, @@ -258,6 +262,7 @@ enum { ULP_MODE_TCPDDP = 5, ULP_MODE_FCOE = 6, ULP_MODE_TLS = 8, + ULP_MODE_DTLS = 9, ULP_MODE_RDMA_V2 = 10, ULP_MODE_NVMET = 11, }; @@ -1149,23 +1154,36 @@ struct cpl_get_tcb { #define V_QUEUENO(x) ((x) << S_QUEUENO) #define G_QUEUENO(x) (((x) >> S_QUEUENO) & M_QUEUENO) -#define S_T7_QUEUENO 0 -#define M_T7_QUEUENO 0xFFF -#define V_T7_QUEUENO(x) ((x) << S_T7_QUEUENO) -#define G_T7_QUEUENO(x) (((x) >> S_T7_QUEUENO) & M_T7_QUEUENO) - #define S_REPLY_CHAN 14 #define V_REPLY_CHAN(x) ((x) << S_REPLY_CHAN) #define F_REPLY_CHAN V_REPLY_CHAN(1U) +#define S_NO_REPLY 15 +#define V_NO_REPLY(x) ((x) << S_NO_REPLY) +#define F_NO_REPLY V_NO_REPLY(1U) + +struct cpl_t7_get_tcb { + WR_HDR; + union opcode_tid ot; + __be16 rxchan_queue; + __be16 cookie_pkd; +}; + #define S_T7_REPLY_CHAN 12 #define M_T7_REPLY_CHAN 0x7 #define V_T7_REPLY_CHAN(x) ((x) << S_T7_REPLY_CHAN) #define G_T7_REPLY_CHAN(x) (((x) >> S_T7_REPLY_CHAN) & M_T7_REPLY_CHAN) -#define S_NO_REPLY 15 -#define V_NO_REPLY(x) ((x) << S_NO_REPLY) -#define F_NO_REPLY V_NO_REPLY(1U) +#define S_T7_QUEUENO 0 +#define M_T7_QUEUENO 0xFFF +#define V_T7_QUEUENO(x) ((x) << S_T7_QUEUENO) +#define G_T7_QUEUENO(x) (((x) >> S_T7_QUEUENO) & M_T7_QUEUENO) + +#define S_CPL_GET_TCB_COOKIE 0 +#define M_CPL_GET_TCB_COOKIE 0xff +#define V_CPL_GET_TCB_COOKIE(x) ((x) << S_CPL_GET_TCB_COOKIE) +#define G_CPL_GET_TCB_COOKIE(x) \ + (((x) >> S_CPL_GET_TCB_COOKIE) & M_CPL_GET_TCB_COOKIE) struct cpl_get_tcb_rpl { RSS_HDR @@ -1234,6 +1252,16 @@ struct cpl_close_con_rpl { __be32 rcv_nxt; }; +struct cpl_t7_close_con_rpl { + RSS_HDR + union opcode_tid ot; + __be16 rto; + __u8 rsvd; + __u8 status; + __be32 snd_nxt; + __be32 rcv_nxt; +}; + struct cpl_close_listsvr_req { WR_HDR; union opcode_tid ot; @@ -1340,6 +1368,24 @@ struct cpl_abort_rpl_rss { __u8 status; }; +struct cpl_t7_abort_rpl_rss { + RSS_HDR + union opcode_tid ot; + __be32 idx_status; +}; + +#define S_CPL_ABORT_RPL_RSS_IDX 8 +#define M_CPL_ABORT_RPL_RSS_IDX 0xffffff +#define V_CPL_ABORT_RPL_RSS_IDX(x) ((x) << S_CPL_ABORT_RPL_RSS_IDX) +#define G_CPL_ABORT_RPL_RSS_IDX(x) \ + (((x) >> S_CPL_ABORT_RPL_RSS_IDX) & M_CPL_ABORT_RPL_RSS_IDX) + +#define S_CPL_ABORT_RPL_RSS_STATUS 0 +#define M_CPL_ABORT_RPL_RSS_STATUS 0xff +#define V_CPL_ABORT_RPL_RSS_STATUS(x) ((x) << S_CPL_ABORT_RPL_RSS_STATUS) +#define G_CPL_ABORT_RPL_RSS_STATUS(x) \ + (((x) >> S_CPL_ABORT_RPL_RSS_STATUS) & M_CPL_ABORT_RPL_RSS_STATUS) + struct cpl_abort_rpl_rss6 { RSS_HDR union opcode_tid ot; @@ -1444,6 +1490,11 @@ struct cpl_tx_data { #define V_TX_ULP_MODE(x) ((x) << S_TX_ULP_MODE) #define G_TX_ULP_MODE(x) (((x) >> S_TX_ULP_MODE) & M_TX_ULP_MODE) +#define S_T7_TX_ULP_MODE 10 +#define M_T7_TX_ULP_MODE 0xf +#define V_T7_TX_ULP_MODE(x) ((x) << S_T7_TX_ULP_MODE) +#define G_T7_TX_ULP_MODE(x) (((x) >> S_T7_TX_ULP_MODE) & M_T7_TX_ULP_MODE) + #define S_TX_FORCE 13 #define V_TX_FORCE(x) ((x) << S_TX_FORCE) #define F_TX_FORCE V_TX_FORCE(1U) @@ -1881,14 +1932,6 @@ struct cpl_tx_pkt_xt { (((x) >> S_CPL_TX_PKT_XT_ROCEIPHDRLEN_HI) & \ M_CPL_TX_PKT_XT_ROCEIPHDRLEN_HI) -#define S_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO 30 -#define M_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO 0x3 -#define V_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO(x) \ - ((x) << S_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO) -#define G_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO(x) \ - (((x) >> S_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO) & \ - M_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO) - /* cpl_tx_pkt_xt.core.ctrl2 fields */ #define S_CPL_TX_PKT_XT_CHKINSRTOFFSET_LO 30 #define M_CPL_TX_PKT_XT_CHKINSRTOFFSET_LO 0x3 @@ -1898,6 +1941,14 @@ struct cpl_tx_pkt_xt { (((x) >> S_CPL_TX_PKT_XT_CHKINSRTOFFSET_LO) & \ M_CPL_TX_PKT_XT_CHKINSRTOFFSET_LO) +#define S_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO 30 +#define M_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO 0x3 +#define V_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO(x) \ + ((x) << S_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO) +#define G_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO(x) \ + (((x) >> S_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO) & \ + M_CPL_TX_PKT_XT_ROCEIPHDRLEN_LO) + #define S_CPL_TX_PKT_XT_CHKSTARTOFFSET 20 #define M_CPL_TX_PKT_XT_CHKSTARTOFFSET 0x3ff #define V_CPL_TX_PKT_XT_CHKSTARTOFFSET(x) \ @@ -2190,7 +2241,8 @@ struct cpl_t7_tx_data_iso { __be32 num_pi_bytes_seglen_offset; __be32 datasn_offset; __be32 buffer_offset; - __be32 reserved3; + __be32 pdo_pkd; + /* encapsulated CPL_TX_DATA follows here */ }; #define S_CPL_T7_TX_DATA_ISO_OPCODE 24 @@ -2274,6 +2326,12 @@ struct cpl_t7_tx_data_iso { (((x) >> S_CPL_T7_TX_DATA_ISO_DATASEGLENOFFSET) & \ M_CPL_T7_TX_DATA_ISO_DATASEGLENOFFSET) +#define S_CPL_TX_DATA_ISO_PDO 0 +#define M_CPL_TX_DATA_ISO_PDO 0xff +#define V_CPL_TX_DATA_ISO_PDO(x) ((x) << S_CPL_TX_DATA_ISO_PDO) +#define G_CPL_TX_DATA_ISO_PDO(x) \ + (((x) >> S_CPL_TX_DATA_ISO_PDO) & M_CPL_TX_DATA_ISO_PDO) + struct cpl_iscsi_hdr { RSS_HDR union opcode_tid ot; @@ -2419,6 +2477,74 @@ struct cpl_rx_data_ack_core { #define V_RX_DACK_CHANGE(x) ((x) << S_RX_DACK_CHANGE) #define F_RX_DACK_CHANGE V_RX_DACK_CHANGE(1U) +struct cpl_rx_phys_addr { + __be32 RSS[2]; + __be32 op_to_tid; + __be32 pci_rlx_order_to_len; + __be64 phys_addr; +}; + +#define S_CPL_RX_PHYS_ADDR_OPCODE 24 +#define M_CPL_RX_PHYS_ADDR_OPCODE 0xff +#define V_CPL_RX_PHYS_ADDR_OPCODE(x) ((x) << S_CPL_RX_PHYS_ADDR_OPCODE) +#define G_CPL_RX_PHYS_ADDR_OPCODE(x) \ + (((x) >> S_CPL_RX_PHYS_ADDR_OPCODE) & M_CPL_RX_PHYS_ADDR_OPCODE) + +#define S_CPL_RX_PHYS_ADDR_ISRDMA 23 +#define M_CPL_RX_PHYS_ADDR_ISRDMA 0x1 +#define V_CPL_RX_PHYS_ADDR_ISRDMA(x) ((x) << S_CPL_RX_PHYS_ADDR_ISRDMA) +#define G_CPL_RX_PHYS_ADDR_ISRDMA(x) \ + (((x) >> S_CPL_RX_PHYS_ADDR_ISRDMA) & M_CPL_RX_PHYS_ADDR_ISRDMA) +#define F_CPL_RX_PHYS_ADDR_ISRDMA V_CPL_RX_PHYS_ADDR_ISRDMA(1U) + +#define S_CPL_RX_PHYS_ADDR_TID 0 +#define M_CPL_RX_PHYS_ADDR_TID 0xfffff +#define V_CPL_RX_PHYS_ADDR_TID(x) ((x) << S_CPL_RX_PHYS_ADDR_TID) +#define G_CPL_RX_PHYS_ADDR_TID(x) \ + (((x) >> S_CPL_RX_PHYS_ADDR_TID) & M_CPL_RX_PHYS_ADDR_TID) + +#define S_CPL_RX_PHYS_ADDR_PCIRLXORDER 31 +#define M_CPL_RX_PHYS_ADDR_PCIRLXORDER 0x1 +#define V_CPL_RX_PHYS_ADDR_PCIRLXORDER(x) \ + ((x) << S_CPL_RX_PHYS_ADDR_PCIRLXORDER) +#define G_CPL_RX_PHYS_ADDR_PCIRLXORDER(x) \ + (((x) >> S_CPL_RX_PHYS_ADDR_PCIRLXORDER) & M_CPL_RX_PHYS_ADDR_PCIRLXORDER) +#define F_CPL_RX_PHYS_ADDR_PCIRLXORDER V_CPL_RX_PHYS_ADDR_PCIRLXORDER(1U) + +#define S_CPL_RX_PHYS_ADDR_PCINOSNOOP 30 +#define M_CPL_RX_PHYS_ADDR_PCINOSNOOP 0x1 +#define V_CPL_RX_PHYS_ADDR_PCINOSNOOP(x) \ + ((x) << S_CPL_RX_PHYS_ADDR_PCINOSNOOP) +#define G_CPL_RX_PHYS_ADDR_PCINOSNOOP(x) \ + (((x) >> S_CPL_RX_PHYS_ADDR_PCINOSNOOP) & M_CPL_RX_PHYS_ADDR_PCINOSNOOP) +#define F_CPL_RX_PHYS_ADDR_PCINOSNOOP V_CPL_RX_PHYS_ADDR_PCINOSNOOP(1U) + +#define S_CPL_RX_PHYS_ADDR_PCITPHINTEN 29 +#define M_CPL_RX_PHYS_ADDR_PCITPHINTEN 0x1 +#define V_CPL_RX_PHYS_ADDR_PCITPHINTEN(x) \ + ((x) << S_CPL_RX_PHYS_ADDR_PCITPHINTEN) +#define G_CPL_RX_PHYS_ADDR_PCITPHINTEN(x) \ + (((x) >> S_CPL_RX_PHYS_ADDR_PCITPHINTEN) & M_CPL_RX_PHYS_ADDR_PCITPHINTEN) +#define F_CPL_RX_PHYS_ADDR_PCITPHINTEN V_CPL_RX_PHYS_ADDR_PCITPHINTEN(1U) + +#define S_CPL_RX_PHYS_ADDR_PCITPHINT 27 +#define M_CPL_RX_PHYS_ADDR_PCITPHINT 0x3 +#define V_CPL_RX_PHYS_ADDR_PCITPHINT(x) ((x) << S_CPL_RX_PHYS_ADDR_PCITPHINT) +#define G_CPL_RX_PHYS_ADDR_PCITPHINT(x) \ + (((x) >> S_CPL_RX_PHYS_ADDR_PCITPHINT) & M_CPL_RX_PHYS_ADDR_PCITPHINT) + +#define S_CPL_RX_PHYS_ADDR_DCAID 16 +#define M_CPL_RX_PHYS_ADDR_DCAID 0x7ff +#define V_CPL_RX_PHYS_ADDR_DCAID(x) ((x) << S_CPL_RX_PHYS_ADDR_DCAID) +#define G_CPL_RX_PHYS_ADDR_DCAID(x) \ + (((x) >> S_CPL_RX_PHYS_ADDR_DCAID) & M_CPL_RX_PHYS_ADDR_DCAID) + +#define S_CPL_RX_PHYS_ADDR_LEN 0 +#define M_CPL_RX_PHYS_ADDR_LEN 0xffff +#define V_CPL_RX_PHYS_ADDR_LEN(x) ((x) << S_CPL_RX_PHYS_ADDR_LEN) +#define G_CPL_RX_PHYS_ADDR_LEN(x) \ + (((x) >> S_CPL_RX_PHYS_ADDR_LEN) & M_CPL_RX_PHYS_ADDR_LEN) + struct cpl_rx_ddp_complete { RSS_HDR union opcode_tid ot; @@ -4059,13 +4185,6 @@ struct cpl_rdma_cqe_ext { #define G_CPL_RDMA_CQE_EXT_QPID(x) \ (((x) >> S_CPL_RDMA_CQE_EXT_QPID) & M_CPL_RDMA_CQE_EXT_QPID) -#define S_CPL_RDMA_CQE_EXT_EXTMODE 11 -#define M_CPL_RDMA_CQE_EXT_EXTMODE 0x1 -#define V_CPL_RDMA_CQE_EXT_EXTMODE(x) ((x) << S_CPL_RDMA_CQE_EXT_EXTMODE) -#define G_CPL_RDMA_CQE_EXT_EXTMODE(x) \ - (((x) >> S_CPL_RDMA_CQE_EXT_EXTMODE) & M_CPL_RDMA_CQE_EXT_EXTMODE) -#define F_CPL_RDMA_CQE_EXT_EXTMODE V_CPL_RDMA_CQE_EXT_EXTMODE(1U) - #define S_CPL_RDMA_CQE_EXT_GENERATION_BIT 10 #define M_CPL_RDMA_CQE_EXT_GENERATION_BIT 0x1 #define V_CPL_RDMA_CQE_EXT_GENERATION_BIT(x) \ @@ -4109,6 +4228,13 @@ struct cpl_rdma_cqe_ext { #define G_CPL_RDMA_CQE_EXT_WR_TYPE_EXT(x) \ (((x) >> S_CPL_RDMA_CQE_EXT_WR_TYPE_EXT) & M_CPL_RDMA_CQE_EXT_WR_TYPE_EXT) +#define S_CPL_RDMA_CQE_EXT_EXTMODE 23 +#define M_CPL_RDMA_CQE_EXT_EXTMODE 0x1 +#define V_CPL_RDMA_CQE_EXT_EXTMODE(x) ((x) << S_CPL_RDMA_CQE_EXT_EXTMODE) +#define G_CPL_RDMA_CQE_EXT_EXTMODE(x) \ + (((x) >> S_CPL_RDMA_CQE_EXT_EXTMODE) & M_CPL_RDMA_CQE_EXT_EXTMODE) +#define F_CPL_RDMA_CQE_EXT_EXTMODE V_CPL_RDMA_CQE_EXT_EXTMODE(1U) + #define S_CPL_RDMA_CQE_EXT_SRQ 0 #define M_CPL_RDMA_CQE_EXT_SRQ 0xfff #define V_CPL_RDMA_CQE_EXT_SRQ(x) ((x) << S_CPL_RDMA_CQE_EXT_SRQ) @@ -4161,14 +4287,6 @@ struct cpl_rdma_cqe_fw_ext { #define G_CPL_RDMA_CQE_FW_EXT_QPID(x) \ (((x) >> S_CPL_RDMA_CQE_FW_EXT_QPID) & M_CPL_RDMA_CQE_FW_EXT_QPID) -#define S_CPL_RDMA_CQE_FW_EXT_EXTMODE 11 -#define M_CPL_RDMA_CQE_FW_EXT_EXTMODE 0x1 -#define V_CPL_RDMA_CQE_FW_EXT_EXTMODE(x) \ - ((x) << S_CPL_RDMA_CQE_FW_EXT_EXTMODE) -#define G_CPL_RDMA_CQE_FW_EXT_EXTMODE(x) \ - (((x) >> S_CPL_RDMA_CQE_FW_EXT_EXTMODE) & M_CPL_RDMA_CQE_FW_EXT_EXTMODE) -#define F_CPL_RDMA_CQE_FW_EXT_EXTMODE V_CPL_RDMA_CQE_FW_EXT_EXTMODE(1U) - #define S_CPL_RDMA_CQE_FW_EXT_GENERATION_BIT 10 #define M_CPL_RDMA_CQE_FW_EXT_GENERATION_BIT 0x1 #define V_CPL_RDMA_CQE_FW_EXT_GENERATION_BIT(x) \ @@ -4215,6 +4333,14 @@ struct cpl_rdma_cqe_fw_ext { (((x) >> S_CPL_RDMA_CQE_FW_EXT_WR_TYPE_EXT) & \ M_CPL_RDMA_CQE_FW_EXT_WR_TYPE_EXT) +#define S_CPL_RDMA_CQE_FW_EXT_EXTMODE 23 +#define M_CPL_RDMA_CQE_FW_EXT_EXTMODE 0x1 +#define V_CPL_RDMA_CQE_FW_EXT_EXTMODE(x) \ + ((x) << S_CPL_RDMA_CQE_FW_EXT_EXTMODE) +#define G_CPL_RDMA_CQE_FW_EXT_EXTMODE(x) \ + (((x) >> S_CPL_RDMA_CQE_FW_EXT_EXTMODE) & M_CPL_RDMA_CQE_FW_EXT_EXTMODE) +#define F_CPL_RDMA_CQE_FW_EXT_EXTMODE V_CPL_RDMA_CQE_FW_EXT_EXTMODE(1U) + #define S_CPL_RDMA_CQE_FW_EXT_SRQ 0 #define M_CPL_RDMA_CQE_FW_EXT_SRQ 0xfff #define V_CPL_RDMA_CQE_FW_EXT_SRQ(x) ((x) << S_CPL_RDMA_CQE_FW_EXT_SRQ) @@ -4267,14 +4393,6 @@ struct cpl_rdma_cqe_err_ext { #define G_CPL_RDMA_CQE_ERR_EXT_QPID(x) \ (((x) >> S_CPL_RDMA_CQE_ERR_EXT_QPID) & M_CPL_RDMA_CQE_ERR_EXT_QPID) -#define S_CPL_RDMA_CQE_ERR_EXT_EXTMODE 11 -#define M_CPL_RDMA_CQE_ERR_EXT_EXTMODE 0x1 -#define V_CPL_RDMA_CQE_ERR_EXT_EXTMODE(x) \ - ((x) << S_CPL_RDMA_CQE_ERR_EXT_EXTMODE) -#define G_CPL_RDMA_CQE_ERR_EXT_EXTMODE(x) \ - (((x) >> S_CPL_RDMA_CQE_ERR_EXT_EXTMODE) & M_CPL_RDMA_CQE_ERR_EXT_EXTMODE) -#define F_CPL_RDMA_CQE_ERR_EXT_EXTMODE V_CPL_RDMA_CQE_ERR_EXT_EXTMODE(1U) - #define S_CPL_RDMA_CQE_ERR_EXT_GENERATION_BIT 10 #define M_CPL_RDMA_CQE_ERR_EXT_GENERATION_BIT 0x1 #define V_CPL_RDMA_CQE_ERR_EXT_GENERATION_BIT(x) \ @@ -4323,6 +4441,14 @@ struct cpl_rdma_cqe_err_ext { (((x) >> S_CPL_RDMA_CQE_ERR_EXT_WR_TYPE_EXT) & \ M_CPL_RDMA_CQE_ERR_EXT_WR_TYPE_EXT) +#define S_CPL_RDMA_CQE_ERR_EXT_EXTMODE 23 +#define M_CPL_RDMA_CQE_ERR_EXT_EXTMODE 0x1 +#define V_CPL_RDMA_CQE_ERR_EXT_EXTMODE(x) \ + ((x) << S_CPL_RDMA_CQE_ERR_EXT_EXTMODE) +#define G_CPL_RDMA_CQE_ERR_EXT_EXTMODE(x) \ + (((x) >> S_CPL_RDMA_CQE_ERR_EXT_EXTMODE) & M_CPL_RDMA_CQE_ERR_EXT_EXTMODE) +#define F_CPL_RDMA_CQE_ERR_EXT_EXTMODE V_CPL_RDMA_CQE_ERR_EXT_EXTMODE(1U) + #define S_CPL_RDMA_CQE_ERR_EXT_SRQ 0 #define M_CPL_RDMA_CQE_ERR_EXT_SRQ 0xfff #define V_CPL_RDMA_CQE_ERR_EXT_SRQ(x) ((x) << S_CPL_RDMA_CQE_ERR_EXT_SRQ) @@ -5040,6 +5166,58 @@ struct cpl_tx_tnl_lso { #define G_CPL_TX_TNL_LSO_SIZE(x) \ (((x) >> S_CPL_TX_TNL_LSO_SIZE) & M_CPL_TX_TNL_LSO_SIZE) +#define S_CPL_TX_TNL_LSO_BTH_OPCODE 24 +#define M_CPL_TX_TNL_LSO_BTH_OPCODE 0xff +#define V_CPL_TX_TNL_LSO_BTH_OPCODE(x) ((x) << S_CPL_TX_TNL_LSO_BTH_OPCODE) +#define G_CPL_TX_TNL_LSO_BTH_OPCODE(x) \ + (((x) >> S_CPL_TX_TNL_LSO_BTH_OPCODE) & \ + M_CPL_TX_TNL_LSO_BTH_OPCODE) + +#define S_CPL_TX_TNL_LSO_TCPSEQOFFSET_PSN 0 +#define M_CPL_TX_TNL_LSO_TCPSEQOFFSET_PSN 0xffffff +#define V_CPL_TX_TNL_LSO_TCPSEQOFFSET_PSN(x) \ + ((x) << S_CPL_TX_TNL_LSO_TCPSEQOFFSET_PSN) +#define G_CPL_TX_TNL_LSO_TCPSEQOFFSET_PSN(x) \ + (((x) >> S_CPL_TX_TNL_LSO_TCPSEQOFFSET_PSN) & \ + M_CPL_TX_TNL_LSO_TCPSEQOFFSET_PSN) + +#define S_CPL_TX_TNL_LSO_MSS_TVER 8 +#define M_CPL_TX_TNL_LSO_MSS_TVER 0xf +#define V_CPL_TX_TNL_LSO_MSS_TVER(x) ((x) << S_CPL_TX_TNL_LSO_MSS_TVER) +#define G_CPL_TX_TNL_LSO_MSS_TVER(x) \ + (((x) >> S_CPL_TX_TNL_LSO_MSS_TVER) & M_CPL_TX_TNL_LSO_MSS_TVER) + +#define S_CPL_TX_TNL_LSO_MSS_M 7 +#define M_CPL_TX_TNL_LSO_MSS_M 0x1 +#define V_CPL_TX_TNL_LSO_MSS_M(x) ((x) << S_CPL_TX_TNL_LSO_MSS_M) +#define G_CPL_TX_TNL_LSO_MSS_M(x) \ + (((x) >> S_CPL_TX_TNL_LSO_MSS_M) & M_CPL_TX_TNL_LSO_MSS_M) + +#define S_CPL_TX_TNL_LSO_MSS_PMTU 4 +#define M_CPL_TX_TNL_LSO_MSS_PMTU 0x7 +#define V_CPL_TX_TNL_LSO_MSS_PMTU(x) ((x) << S_CPL_TX_TNL_LSO_MSS_PMTU) +#define G_CPL_TX_TNL_LSO_MSS_PMTU(x) \ + (((x) >> S_CPL_TX_TNL_LSO_MSS_PMTU) & M_CPL_TX_TNL_LSO_MSS_PMTU) + +#define S_CPL_TX_TNL_LSO_MSS_RR_MSN_INCR 3 +#define M_CPL_TX_TNL_LSO_MSS_RR_MSN_INCR 0x1 +#define V_CPL_TX_TNL_LSO_MSS_RR_MSN_INCR(x) \ + ((x) << S_CPL_TX_TNL_LSO_MSS_RR_MSN_INCR) +#define G_CPL_TX_TNL_LSO_MSS_RR_MSN_INCR(x) \ + (((x) >> S_CPL_TX_TNL_LSO_MSS_RR_MSN_INCR) & M_CPL_TX_TNL_LSO_MSS_RR_MSN_INCR) + +#define S_CPL_TX_TNL_LSO_MSS_ACKREQ 1 +#define M_CPL_TX_TNL_LSO_MSS_ACKREQ 0x3 +#define V_CPL_TX_TNL_LSO_MSS_ACKREQ(x) ((x) << S_CPL_TX_TNL_LSO_MSS_ACKREQ) +#define G_CPL_TX_TNL_LSO_MSS_ACKREQ(x) \ + (((x) >> S_CPL_TX_TNL_LSO_MSS_ACKREQ) & M_CPL_TX_TNL_LSO_MSS_ACKREQ) + +#define S_CPL_TX_TNL_LSO_MSS_SE 0 +#define M_CPL_TX_TNL_LSO_MSS_SE 0x1 +#define V_CPL_TX_TNL_LSO_MSS_SE(x) ((x) << S_CPL_TX_TNL_LSO_MSS_SE) +#define G_CPL_TX_TNL_LSO_MSS_SE(x) \ + (((x) >> S_CPL_TX_TNL_LSO_MSS_SE) & M_CPL_TX_TNL_LSO_MSS_SE) + struct cpl_rx_mps_pkt { __be32 op_to_r1_hi; __be32 r1_lo_length; @@ -5839,10 +6017,10 @@ struct cpl_tx_tls_ack { #define G_CPL_TX_TLS_ACK_OPCODE(x) \ (((x) >> S_CPL_TX_TLS_ACK_OPCODE) & M_CPL_TX_TLS_ACK_OPCODE) -#define S_T7_CPL_TX_TLS_ACK_RXCHID 22 -#define M_T7_CPL_TX_TLS_ACK_RXCHID 0x3 -#define V_T7_CPL_TX_TLS_ACK_RXCHID(x) ((x) << S_T7_CPL_TX_TLS_ACK_RXCHID) -#define G_T7_CPL_TX_TLS_ACK_RXCHID(x) \ +#define S_T7_CPL_TX_TLS_ACK_RXCHID 22 +#define M_T7_CPL_TX_TLS_ACK_RXCHID 0x3 +#define V_T7_CPL_TX_TLS_ACK_RXCHID(x) ((x) << S_T7_CPL_TX_TLS_ACK_RXCHID) +#define G_T7_CPL_TX_TLS_ACK_RXCHID(x) \ (((x) >> S_T7_CPL_TX_TLS_ACK_RXCHID) & M_T7_CPL_TX_TLS_ACK_RXCHID) #define S_CPL_TX_TLS_ACK_RXCHID 22 @@ -5905,11 +6083,245 @@ struct cpl_tx_tls_ack { #define G_CPL_TX_TLS_ACK_PLDLEN(x) \ (((x) >> S_CPL_TX_TLS_ACK_PLDLEN) & M_CPL_TX_TLS_ACK_PLDLEN) +struct cpl_tx_quic_enc { + __be32 op_to_hdrlen; + __be32 hdrlen_to_pktlen; + __be32 r4[2]; +}; + +#define S_CPL_TX_QUIC_ENC_OPCODE 24 +#define M_CPL_TX_QUIC_ENC_OPCODE 0xff +#define V_CPL_TX_QUIC_ENC_OPCODE(x) ((x) << S_CPL_TX_QUIC_ENC_OPCODE) +#define G_CPL_TX_QUIC_ENC_OPCODE(x) \ + (((x) >> S_CPL_TX_QUIC_ENC_OPCODE) & M_CPL_TX_QUIC_ENC_OPCODE) + +#define S_CPL_TX_QUIC_ENC_KEYSIZE 22 +#define M_CPL_TX_QUIC_ENC_KEYSIZE 0x3 +#define V_CPL_TX_QUIC_ENC_KEYSIZE(x) ((x) << S_CPL_TX_QUIC_ENC_KEYSIZE) +#define G_CPL_TX_QUIC_ENC_KEYSIZE(x) \ + (((x) >> S_CPL_TX_QUIC_ENC_KEYSIZE) & M_CPL_TX_QUIC_ENC_KEYSIZE) + +#define S_CPL_TX_QUIC_ENC_PKTNUMSIZE 20 +#define M_CPL_TX_QUIC_ENC_PKTNUMSIZE 0x3 +#define V_CPL_TX_QUIC_ENC_PKTNUMSIZE(x) ((x) << S_CPL_TX_QUIC_ENC_PKTNUMSIZE) +#define G_CPL_TX_QUIC_ENC_PKTNUMSIZE(x) \ + (((x) >> S_CPL_TX_QUIC_ENC_PKTNUMSIZE) & M_CPL_TX_QUIC_ENC_PKTNUMSIZE) + +#define S_CPL_TX_QUIC_ENC_HDRTYPE 19 +#define M_CPL_TX_QUIC_ENC_HDRTYPE 0x1 +#define V_CPL_TX_QUIC_ENC_HDRTYPE(x) ((x) << S_CPL_TX_QUIC_ENC_HDRTYPE) +#define G_CPL_TX_QUIC_ENC_HDRTYPE(x) \ + (((x) >> S_CPL_TX_QUIC_ENC_HDRTYPE) & M_CPL_TX_QUIC_ENC_HDRTYPE) +#define F_CPL_TX_QUIC_ENC_HDRTYPE V_CPL_TX_QUIC_ENC_HDRTYPE(1U) + +#define S_CPL_TX_QUIC_ENC_HDRSTARTOFFSET 4 +#define M_CPL_TX_QUIC_ENC_HDRSTARTOFFSET 0xfff +#define V_CPL_TX_QUIC_ENC_HDRSTARTOFFSET(x) \ + ((x) << S_CPL_TX_QUIC_ENC_HDRSTARTOFFSET) +#define G_CPL_TX_QUIC_ENC_HDRSTARTOFFSET(x) \ + (((x) >> S_CPL_TX_QUIC_ENC_HDRSTARTOFFSET) & \ + M_CPL_TX_QUIC_ENC_HDRSTARTOFFSET) + +#define S_CPL_TX_QUIC_ENC_HDRLENGTH_HI 0 +#define M_CPL_TX_QUIC_ENC_HDRLENGTH_HI 0x3 +#define V_CPL_TX_QUIC_ENC_HDRLENGTH_HI(x) \ + ((x) << S_CPL_TX_QUIC_ENC_HDRLENGTH_HI) +#define G_CPL_TX_QUIC_ENC_HDRLENGTH_HI(x) \ + (((x) >> S_CPL_TX_QUIC_ENC_HDRLENGTH_HI) & M_CPL_TX_QUIC_ENC_HDRLENGTH_HI) + +#define S_CPL_TX_QUIC_ENC_HDRLENGTH_LO 24 +#define M_CPL_TX_QUIC_ENC_HDRLENGTH_LO 0xff +#define V_CPL_TX_QUIC_ENC_HDRLENGTH_LO(x) \ + ((x) << S_CPL_TX_QUIC_ENC_HDRLENGTH_LO) +#define G_CPL_TX_QUIC_ENC_HDRLENGTH_LO(x) \ + (((x) >> S_CPL_TX_QUIC_ENC_HDRLENGTH_LO) & M_CPL_TX_QUIC_ENC_HDRLENGTH_LO) + +#define S_CPL_TX_QUIC_ENC_NUMPKT 16 +#define M_CPL_TX_QUIC_ENC_NUMPKT 0xff +#define V_CPL_TX_QUIC_ENC_NUMPKT(x) ((x) << S_CPL_TX_QUIC_ENC_NUMPKT) +#define G_CPL_TX_QUIC_ENC_NUMPKT(x) \ + (((x) >> S_CPL_TX_QUIC_ENC_NUMPKT) & M_CPL_TX_QUIC_ENC_NUMPKT) + +#define S_CPL_TX_QUIC_ENC_PKTLEN 0 +#define M_CPL_TX_QUIC_ENC_PKTLEN 0xffff +#define V_CPL_TX_QUIC_ENC_PKTLEN(x) ((x) << S_CPL_TX_QUIC_ENC_PKTLEN) +#define G_CPL_TX_QUIC_ENC_PKTLEN(x) \ + (((x) >> S_CPL_TX_QUIC_ENC_PKTLEN) & M_CPL_TX_QUIC_ENC_PKTLEN) + +struct cpl_tls_tx_scmd_fmt { + __be32 op_to_num_ivs; + __be32 enb_dbgId_to_hdrlen; + __be32 seq_num[2]; +}; + +#define S_CPL_TLS_TX_SCMD_FMT_OPCODE 31 +#define M_CPL_TLS_TX_SCMD_FMT_OPCODE 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_OPCODE(x) ((x) << S_CPL_TLS_TX_SCMD_FMT_OPCODE) +#define G_CPL_TLS_TX_SCMD_FMT_OPCODE(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_OPCODE) & M_CPL_TLS_TX_SCMD_FMT_OPCODE) +#define F_CPL_TLS_TX_SCMD_FMT_OPCODE V_CPL_TLS_TX_SCMD_FMT_OPCODE(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_SEQNUMBERCTRL 29 +#define M_CPL_TLS_TX_SCMD_FMT_SEQNUMBERCTRL 0x3 +#define V_CPL_TLS_TX_SCMD_FMT_SEQNUMBERCTRL(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_SEQNUMBERCTRL) +#define G_CPL_TLS_TX_SCMD_FMT_SEQNUMBERCTRL(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_SEQNUMBERCTRL) & \ + M_CPL_TLS_TX_SCMD_FMT_SEQNUMBERCTRL) + +#define S_CPL_TLS_TX_SCMD_FMT_PROTOVERSION 24 +#define M_CPL_TLS_TX_SCMD_FMT_PROTOVERSION 0xf +#define V_CPL_TLS_TX_SCMD_FMT_PROTOVERSION(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_PROTOVERSION) +#define G_CPL_TLS_TX_SCMD_FMT_PROTOVERSION(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_PROTOVERSION) & \ + M_CPL_TLS_TX_SCMD_FMT_PROTOVERSION) + +#define S_CPL_TLS_TX_SCMD_FMT_ENCDECCTRL 23 +#define M_CPL_TLS_TX_SCMD_FMT_ENCDECCTRL 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_ENCDECCTRL(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_ENCDECCTRL) +#define G_CPL_TLS_TX_SCMD_FMT_ENCDECCTRL(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_ENCDECCTRL) & \ + M_CPL_TLS_TX_SCMD_FMT_ENCDECCTRL) +#define F_CPL_TLS_TX_SCMD_FMT_ENCDECCTRL V_CPL_TLS_TX_SCMD_FMT_ENCDECCTRL(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_CIPHAUTHSEQCTRL 22 +#define M_CPL_TLS_TX_SCMD_FMT_CIPHAUTHSEQCTRL 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_CIPHAUTHSEQCTRL(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_CIPHAUTHSEQCTRL) +#define G_CPL_TLS_TX_SCMD_FMT_CIPHAUTHSEQCTRL(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_CIPHAUTHSEQCTRL) & \ + M_CPL_TLS_TX_SCMD_FMT_CIPHAUTHSEQCTRL) +#define F_CPL_TLS_TX_SCMD_FMT_CIPHAUTHSEQCTRL \ + V_CPL_TLS_TX_SCMD_FMT_CIPHAUTHSEQCTRL(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_CIPHMODE 18 +#define M_CPL_TLS_TX_SCMD_FMT_CIPHMODE 0xf +#define V_CPL_TLS_TX_SCMD_FMT_CIPHMODE(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_CIPHMODE) +#define G_CPL_TLS_TX_SCMD_FMT_CIPHMODE(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_CIPHMODE) & M_CPL_TLS_TX_SCMD_FMT_CIPHMODE) + +#define S_CPL_TLS_TX_SCMD_FMT_AUTHMODE 14 +#define M_CPL_TLS_TX_SCMD_FMT_AUTHMODE 0xf +#define V_CPL_TLS_TX_SCMD_FMT_AUTHMODE(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_AUTHMODE) +#define G_CPL_TLS_TX_SCMD_FMT_AUTHMODE(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_AUTHMODE) & M_CPL_TLS_TX_SCMD_FMT_AUTHMODE) + +#define S_CPL_TLS_TX_SCMD_FMT_HMACCTRL 11 +#define M_CPL_TLS_TX_SCMD_FMT_HMACCTRL 0x7 +#define V_CPL_TLS_TX_SCMD_FMT_HMACCTRL(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_HMACCTRL) +#define G_CPL_TLS_TX_SCMD_FMT_HMACCTRL(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_HMACCTRL) & M_CPL_TLS_TX_SCMD_FMT_HMACCTRL) + +#define S_CPL_TLS_TX_SCMD_FMT_IVSIZE 7 +#define M_CPL_TLS_TX_SCMD_FMT_IVSIZE 0xf +#define V_CPL_TLS_TX_SCMD_FMT_IVSIZE(x) ((x) << S_CPL_TLS_TX_SCMD_FMT_IVSIZE) +#define G_CPL_TLS_TX_SCMD_FMT_IVSIZE(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_IVSIZE) & M_CPL_TLS_TX_SCMD_FMT_IVSIZE) + +#define S_CPL_TLS_TX_SCMD_FMT_NUMIVS 0 +#define M_CPL_TLS_TX_SCMD_FMT_NUMIVS 0x7f +#define V_CPL_TLS_TX_SCMD_FMT_NUMIVS(x) ((x) << S_CPL_TLS_TX_SCMD_FMT_NUMIVS) +#define G_CPL_TLS_TX_SCMD_FMT_NUMIVS(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_NUMIVS) & M_CPL_TLS_TX_SCMD_FMT_NUMIVS) + +#define S_CPL_TLS_TX_SCMD_FMT_ENBDBGID 31 +#define M_CPL_TLS_TX_SCMD_FMT_ENBDBGID 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_ENBDBGID(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_ENBDBGID) +#define G_CPL_TLS_TX_SCMD_FMT_ENBDBGID(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_ENBDBGID) & M_CPL_TLS_TX_SCMD_FMT_ENBDBGID) +#define F_CPL_TLS_TX_SCMD_FMT_ENBDBGID V_CPL_TLS_TX_SCMD_FMT_ENBDBGID(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_IVGENCTRL 30 +#define M_CPL_TLS_TX_SCMD_FMT_IVGENCTRL 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_IVGENCTRL(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_IVGENCTRL) +#define G_CPL_TLS_TX_SCMD_FMT_IVGENCTRL(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_IVGENCTRL) & \ + M_CPL_TLS_TX_SCMD_FMT_IVGENCTRL) + +#define S_CPL_TLS_TX_SCMD_FMT_MOREFRAGS 20 +#define M_CPL_TLS_TX_SCMD_FMT_MOREFRAGS 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_MOREFRAGS(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_MOREFRAGS) +#define G_CPL_TLS_TX_SCMD_FMT_MOREFRAGS(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_MOREFRAGS) & \ + M_CPL_TLS_TX_SCMD_FMT_MOREFRAGS) +#define F_CPL_TLS_TX_SCMD_FMT_MOREFRAGS V_CPL_TLS_TX_SCMD_FMT_MOREFRAGS(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_LASTFRAGS 19 +#define M_CPL_TLS_TX_SCMD_FMT_LASTFRAGS 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_LASTFRAGS(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_LASTFRAGS) +#define G_CPL_TLS_TX_SCMD_FMT_LASTFRAGS(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_LASTFRAGS) & \ + M_CPL_TLS_TX_SCMD_FMT_LASTFRAGS) +#define F_CPL_TLS_TX_SCMD_FMT_LASTFRAGS V_CPL_TLS_TX_SCMD_FMT_LASTFRAGS(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_TLSCOMPPDU 18 +#define M_CPL_TLS_TX_SCMD_FMT_TLSCOMPPDU 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_TLSCOMPPDU(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_TLSCOMPPDU) +#define G_CPL_TLS_TX_SCMD_FMT_TLSCOMPPDU(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_TLSCOMPPDU) & \ + M_CPL_TLS_TX_SCMD_FMT_TLSCOMPPDU) +#define F_CPL_TLS_TX_SCMD_FMT_TLSCOMPPDU V_CPL_TLS_TX_SCMD_FMT_TLSCOMPPDU(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_PAYLOADONLY 17 +#define M_CPL_TLS_TX_SCMD_FMT_PAYLOADONLY 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_PAYLOADONLY(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_PAYLOADONLY) +#define G_CPL_TLS_TX_SCMD_FMT_PAYLOADONLY(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_PAYLOADONLY) & \ + M_CPL_TLS_TX_SCMD_FMT_PAYLOADONLY) +#define F_CPL_TLS_TX_SCMD_FMT_PAYLOADONLY \ + V_CPL_TLS_TX_SCMD_FMT_PAYLOADONLY(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_TLSFRAGENABLE 16 +#define M_CPL_TLS_TX_SCMD_FMT_TLSFRAGENABLE 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_TLSFRAGENABLE(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_TLSFRAGENABLE) +#define G_CPL_TLS_TX_SCMD_FMT_TLSFRAGENABLE(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_TLSFRAGENABLE) & \ + M_CPL_TLS_TX_SCMD_FMT_TLSFRAGENABLE) +#define F_CPL_TLS_TX_SCMD_FMT_TLSFRAGENABLE \ + V_CPL_TLS_TX_SCMD_FMT_TLSFRAGENABLE(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_MACONLY 15 +#define M_CPL_TLS_TX_SCMD_FMT_MACONLY 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_MACONLY(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_MACONLY) +#define G_CPL_TLS_TX_SCMD_FMT_MACONLY(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_MACONLY) & M_CPL_TLS_TX_SCMD_FMT_MACONLY) +#define F_CPL_TLS_TX_SCMD_FMT_MACONLY V_CPL_TLS_TX_SCMD_FMT_MACONLY(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_AADIVDROP 14 +#define M_CPL_TLS_TX_SCMD_FMT_AADIVDROP 0x1 +#define V_CPL_TLS_TX_SCMD_FMT_AADIVDROP(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_AADIVDROP) +#define G_CPL_TLS_TX_SCMD_FMT_AADIVDROP(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_AADIVDROP) & \ + M_CPL_TLS_TX_SCMD_FMT_AADIVDROP) +#define F_CPL_TLS_TX_SCMD_FMT_AADIVDROP V_CPL_TLS_TX_SCMD_FMT_AADIVDROP(1U) + +#define S_CPL_TLS_TX_SCMD_FMT_HDRLENGTH 0 +#define M_CPL_TLS_TX_SCMD_FMT_HDRLENGTH 0x3fff +#define V_CPL_TLS_TX_SCMD_FMT_HDRLENGTH(x) \ + ((x) << S_CPL_TLS_TX_SCMD_FMT_HDRLENGTH) +#define G_CPL_TLS_TX_SCMD_FMT_HDRLENGTH(x) \ + (((x) >> S_CPL_TLS_TX_SCMD_FMT_HDRLENGTH) & \ + M_CPL_TLS_TX_SCMD_FMT_HDRLENGTH) + struct cpl_rcb_upd { __be32 op_to_tid; __be32 opcode_psn; __u8 nodata_to_cnprepclr; - __u8 r0; + __u8 rsp_nak_seqclr_pkd; __be16 wrptr; __be32 length; }; @@ -6202,13 +6614,6 @@ struct cpl_roce_cqe { #define G_CPL_ROCE_CQE_QPID(x) \ (((x) >> S_CPL_ROCE_CQE_QPID) & M_CPL_ROCE_CQE_QPID) -#define S_CPL_ROCE_CQE_EXTMODE 11 -#define M_CPL_ROCE_CQE_EXTMODE 0x1 -#define V_CPL_ROCE_CQE_EXTMODE(x) ((x) << S_CPL_ROCE_CQE_EXTMODE) -#define G_CPL_ROCE_CQE_EXTMODE(x) \ - (((x) >> S_CPL_ROCE_CQE_EXTMODE) & M_CPL_ROCE_CQE_EXTMODE) -#define F_CPL_ROCE_CQE_EXTMODE V_CPL_ROCE_CQE_EXTMODE(1U) - #define S_CPL_ROCE_CQE_GENERATION_BIT 10 #define M_CPL_ROCE_CQE_GENERATION_BIT 0x1 #define V_CPL_ROCE_CQE_GENERATION_BIT(x) \ @@ -6249,6 +6654,13 @@ struct cpl_roce_cqe { #define G_CPL_ROCE_CQE_WR_TYPE_EXT(x) \ (((x) >> S_CPL_ROCE_CQE_WR_TYPE_EXT) & M_CPL_ROCE_CQE_WR_TYPE_EXT) +#define S_CPL_ROCE_CQE_EXTMODE 23 +#define M_CPL_ROCE_CQE_EXTMODE 0x1 +#define V_CPL_ROCE_CQE_EXTMODE(x) ((x) << S_CPL_ROCE_CQE_EXTMODE) +#define G_CPL_ROCE_CQE_EXTMODE(x) \ + (((x) >> S_CPL_ROCE_CQE_EXTMODE) & M_CPL_ROCE_CQE_EXTMODE) +#define F_CPL_ROCE_CQE_EXTMODE V_CPL_ROCE_CQE_EXTMODE(1U) + #define S_CPL_ROCE_CQE_SRQ 0 #define M_CPL_ROCE_CQE_SRQ 0xfff #define V_CPL_ROCE_CQE_SRQ(x) ((x) << S_CPL_ROCE_CQE_SRQ) @@ -6304,13 +6716,6 @@ struct cpl_roce_cqe_fw { #define G_CPL_ROCE_CQE_FW_QPID(x) \ (((x) >> S_CPL_ROCE_CQE_FW_QPID) & M_CPL_ROCE_CQE_FW_QPID) -#define S_CPL_ROCE_CQE_FW_EXTMODE 11 -#define M_CPL_ROCE_CQE_FW_EXTMODE 0x1 -#define V_CPL_ROCE_CQE_FW_EXTMODE(x) ((x) << S_CPL_ROCE_CQE_FW_EXTMODE) -#define G_CPL_ROCE_CQE_FW_EXTMODE(x) \ - (((x) >> S_CPL_ROCE_CQE_FW_EXTMODE) & M_CPL_ROCE_CQE_FW_EXTMODE) -#define F_CPL_ROCE_CQE_FW_EXTMODE V_CPL_ROCE_CQE_FW_EXTMODE(1U) - #define S_CPL_ROCE_CQE_FW_GENERATION_BIT 10 #define M_CPL_ROCE_CQE_FW_GENERATION_BIT 0x1 #define V_CPL_ROCE_CQE_FW_GENERATION_BIT(x) \ @@ -6353,6 +6758,14 @@ struct cpl_roce_cqe_fw { #define G_CPL_ROCE_CQE_FW_WR_TYPE_EXT(x) \ (((x) >> S_CPL_ROCE_CQE_FW_WR_TYPE_EXT) & M_CPL_ROCE_CQE_FW_WR_TYPE_EXT) +#define S_CPL_ROCE_CQE_FW_EXTMODE 23 +#define M_CPL_ROCE_CQE_FW_EXTMODE 0x1 +#define V_CPL_ROCE_CQE_FW_EXTMODE(x) ((x) << S_CPL_ROCE_CQE_FW_EXTMODE) +#define G_CPL_ROCE_CQE_FW_EXTMODE(x) \ + (((x) >> S_CPL_ROCE_CQE_FW_EXTMODE) & M_CPL_ROCE_CQE_FW_EXTMODE) +#define F_CPL_ROCE_CQE_FW_EXTMODE V_CPL_ROCE_CQE_FW_EXTMODE(1U) + + #define S_CPL_ROCE_CQE_FW_SRQ 0 #define M_CPL_ROCE_CQE_FW_SRQ 0xfff #define V_CPL_ROCE_CQE_FW_SRQ(x) ((x) << S_CPL_ROCE_CQE_FW_SRQ) @@ -6360,16 +6773,16 @@ struct cpl_roce_cqe_fw { (((x) >> S_CPL_ROCE_CQE_FW_SRQ) & M_CPL_ROCE_CQE_FW_SRQ) struct cpl_roce_cqe_err { - __be32 op_to_CQID; - __be32 Tid_FlitCnt; - __be32 QPID_to_WR_type; - __be32 Length; - __be32 TAG; - __be32 MSN; - __be32 SE_to_SRQ; - __be32 RQE; - __be32 ExtInfoMS[2]; - __be32 ExtInfoLS[2]; + __be32 op_to_cqid; + __be32 tid_flitcnt; + __be32 qpid_to_wr_type; + __be32 length; + __be32 tag; + __be32 msn; + __be32 se_to_srq; + __be32 rqe; + __be32 extinfoms[2]; + __be32 extinfols[2]; }; #define S_CPL_ROCE_CQE_ERR_OPCODE 24 @@ -6408,13 +6821,6 @@ struct cpl_roce_cqe_err { #define G_CPL_ROCE_CQE_ERR_QPID(x) \ (((x) >> S_CPL_ROCE_CQE_ERR_QPID) & M_CPL_ROCE_CQE_ERR_QPID) -#define S_CPL_ROCE_CQE_ERR_EXTMODE 11 -#define M_CPL_ROCE_CQE_ERR_EXTMODE 0x1 -#define V_CPL_ROCE_CQE_ERR_EXTMODE(x) ((x) << S_CPL_ROCE_CQE_ERR_EXTMODE) -#define G_CPL_ROCE_CQE_ERR_EXTMODE(x) \ - (((x) >> S_CPL_ROCE_CQE_ERR_EXTMODE) & M_CPL_ROCE_CQE_ERR_EXTMODE) -#define F_CPL_ROCE_CQE_ERR_EXTMODE V_CPL_ROCE_CQE_ERR_EXTMODE(1U) - #define S_CPL_ROCE_CQE_ERR_GENERATION_BIT 10 #define M_CPL_ROCE_CQE_ERR_GENERATION_BIT 0x1 #define V_CPL_ROCE_CQE_ERR_GENERATION_BIT(x) \ @@ -6458,6 +6864,14 @@ struct cpl_roce_cqe_err { #define G_CPL_ROCE_CQE_ERR_WR_TYPE_EXT(x) \ *** 380 LINES SKIPPED *** From nobody Thu Nov 13 01:36:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6NCQ0dXQz6GwNB; Thu, 13 Nov 2025 01:36: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6NCQ06yFz3ScD; Thu, 13 Nov 2025 01:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762997778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xhngaYQv9NX2zlFMpTIUwhSPE33eqFWgBaaTnWjl6OA=; b=SnGbasz3TV/sB77oUsYRWFdTfujLpHUzqUGnJCdU/mkKEgG8gRRz1yj9nnZnCLPktk2KK5 7Rsv6oArK4uMMrC4YrM6k/3N0FEgYoYPY8C5FpSgU9X6+0sa/d/DyR52oDI+fYk3eyT57D EAEYARxyjHMte/FfhIVg++SuB1nTjRjeGJctHSUsWkkAObTmr7nGZnofkSC26kH4jlEqIN Uzd3mNFI63KPjhg8wLS29+Xoi6I66WKVP0RUwkXiuSFsnlIA+Nh1tADNwfP16mde3SKc0F FZyJJuM5kKm1RoeN6WXFdmS8QoB3ixzejpKMSk4XlsYkQl3HIHM+ugFOVn4DUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762997778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xhngaYQv9NX2zlFMpTIUwhSPE33eqFWgBaaTnWjl6OA=; b=qEpsvWkdhCARKy8mQiDn59k0k4xyU4i9TaGcE2+ncC+vCH2UUmbH8wjGIq5yZ07K2g1Y2Z cDD0vJxNW4Zwwsp/KXU16jY4n6eWVkW8ZFXG1fBvcOuabMzMeu5aXiOvIRSvxiN21UgGAo 3SuKNOT5NxC6OH3Eh+ihYhWuNg/EHqUVvZVdGATio0OiD76Y3FUlFkBnLvBT7ZcXI82prW e5FpHLiF8yop1+uYC3TzWfW7wUsolmT5o26/Eknzn9lBbusgEHBsZynAfobwIhuETbznmy 04waIENjrVpZfC1omezEG+49t6HRSeLe4ynqJsYIOCoeIhZMJLNKR2zaEWzDAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762997778; a=rsa-sha256; cv=none; b=kLiaCpKI0OWzZC/4me275a4uIDepM+T5EmmbAf4nm6F5jbqqtDFGbuDrjSLc0vb4bc53mK EXNvI6aG1eOT7Q4AuLdIls7yMsJ7Kxt7qRozsCFv4spqIlxN2MobsxPs0Un0II3lzW4OWS jZIgRe59fZpfAY8+zg8DqUJfKo+bV7kP8qN+cjOLNQHPURDVCbyStJEOCsyJgwaOe3BlDr ErWcCt/1UH9zdccLMsW6w+DbyqWZNYycdDgzfSj78uNNnOnxqbTcvzdfvMoDcH94rVziAO xIvLMF+4W00pHgW87/askpQbASSAWC8qLaMmNVartYgETHSo+NtVt/yZtNKRhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6NCP6g3vz10ht; Thu, 13 Nov 2025 01:36: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 5AD1aHGG075611; Thu, 13 Nov 2025 01:36:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AD1aHRg075608; Thu, 13 Nov 2025 01:36:17 GMT (envelope-from git) Date: Thu, 13 Nov 2025 01:36:17 GMT Message-Id: <202511130136.5AD1aHRg075608@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: 564cad5638d2 - main - cxgbe(4): fix nvmf_che module 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: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 564cad5638d219d5712a8ac61dafa6f804518cab Auto-Submitted: auto-generated The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=564cad5638d219d5712a8ac61dafa6f804518cab commit 564cad5638d219d5712a8ac61dafa6f804518cab Author: David E. O'Brien AuthorDate: 2025-11-13 01:28:57 +0000 Commit: David E. O'Brien CommitDate: 2025-11-13 01:34:00 +0000 cxgbe(4): fix nvmf_che module build Fixes: ec0cd28 --- sys/modules/cxgbe/nvmf_che/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/modules/cxgbe/nvmf_che/Makefile b/sys/modules/cxgbe/nvmf_che/Makefile index f44b92562588..143904d61c71 100644 --- a/sys/modules/cxgbe/nvmf_che/Makefile +++ b/sys/modules/cxgbe/nvmf_che/Makefile @@ -4,8 +4,12 @@ CXGBE = ${SRCTOP}/sys/dev/cxgbe KMOD= nvmf_che -SRCS= nvmf_che.c -SRCS+= opt_inet.h +SRCS= \ + nvmf_che.c \ + opt_inet.h \ + bus_if.h \ + device_if.h \ + pci_if.h \ CFLAGS+= -I${CXGBE} From nobody Thu Nov 13 02:38:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6PbT2yQZz6H19Y; Thu, 13 Nov 2025 02:38: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6PbT2R5Vz3Y6K; Thu, 13 Nov 2025 02:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763001525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R2sL4kt6XauMYabRbKuJSYi8Al9pScflQCyymKZqgUM=; b=gFuiYRNx1zQr+hjJNVQpq1gBOY+BY3aMQXrQZBECcazED9/HmQkS9/XRzb87P/kcKmngZj g7KY+39tiwLGg5+qYLR1jNDm3ML8olnQsZWBKu9uMXRtbJCaYbJZwWsV321Cmaq0qs1XoV KZmrQpF5lqtJWNzIs0dkypdZ7tBYFJjyccFa6kykysctDX0CAH+4f8NowsBCIV6b0tMFjP iofblWstdr0BQRAdLUY1j39KhPZK/sg17vUiD4gW5aHBio0AU6QKj0NVoVOoSy10J2Jdgk Wmd1GxVw62tvABlBg9qgmxHP50XXdpLwDEDq2bcjfYk3tZD5EdlwTQ9wJ91R0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763001525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R2sL4kt6XauMYabRbKuJSYi8Al9pScflQCyymKZqgUM=; b=UO5jFPqmiwHPAK+slT8Zwm8+hrDStE1JPbo+hNuULgJR9ozQLsdf6eV7FZO9k/VQag92MQ IOlp4PKvQUVd7PRY1IDOS6nix6N2yqSMXDTB8l5PkCS7Gh4/6HfbZ0gR8xAWCoGmlMpzC0 cvHIWlREdNVwMV/ph/1RqUsEN336p+jLnI1kqc+W9SXE2m+qvM3aliX7B3lNL+1+egkTv5 Y/lkigl7HhiRv0R7rBHbiSgH2aNPQpfIc1KNikly5jTDPbRLmx6B8K+yZnnNKx4pYCPD0u v2iU+voKolCR78Hvo6eaRIoOQEXgXvIoN33/G22z2QD0whXNre7vr/7rKXGIQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763001525; a=rsa-sha256; cv=none; b=ecGrtsPEqruuQP3FcCXm6veCUGDREZ5p0tYBNIZTHRjHQHaWDUVdlC1Br8UVDjrn0DqSR1 wH3Owh0nhEKa3B8tsuWhhkaJx/ttGB0mjOvbNmjNQR6g0sY2B6ZetidUe579fJ7A8R05cG rru+UVkYkPo1Q2YePe57/8+zN2Qr2FPmUol4lq1Qk6vz7iDoaq+ERAvyZfGspPNM/QGGND aE3A3o0oYFTGfXaRvgGUCc3S4ke3Nt8BGRLF9uOmWHP7xIeH/vV+XLOu8qulQ2RMEIauHs JUKeBZabMY32LaaEDIZ8dfgvrEygiJ5Fb+fMpzUW72Fl/O0mBvULDROQq7LP8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6PbT1mpwz11lX; Thu, 13 Nov 2025 02:38: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 5AD2cj58088905; Thu, 13 Nov 2025 02:38:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AD2cjTP088902; Thu, 13 Nov 2025 02:38:45 GMT (envelope-from git) Date: Thu, 13 Nov 2025 02:38:45 GMT Message-Id: <202511130238.5AD2cjTP088902@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: daa1f9b415f3 - main - apm(8): Drop MLINK to apmconf(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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: daa1f9b415f3bca82cc7a6e555c9c56e1b1c44f5 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=daa1f9b415f3bca82cc7a6e555c9c56e1b1c44f5 commit daa1f9b415f3bca82cc7a6e555c9c56e1b1c44f5 Author: John Baldwin AuthorDate: 2025-11-13 02:36:14 +0000 Commit: John Baldwin CommitDate: 2025-11-13 02:38:35 +0000 apm(8): Drop MLINK to apmconf(8) apmconf(8) was merged into apm(8) back in 2000 and this note and MLINK were added as a transition aid, but that aid is no longer needed. --- ObsoleteFiles.inc | 3 +++ usr.sbin/apm/Makefile | 1 - usr.sbin/apm/apm.8 | 9 +-------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 1654ee06941f..6ce096ac92d1 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20251112: Remove old MLINK to apmconf(8) +OLD_FILES+=share/man/man8/apmconf.8.gz + # 20251112: Remove pccard(4) and related OLD_FILES+=share/man/man4/pccard.4.gz OLD_FILES+=share/man/man4/pcic.4.gz diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile index f6c42194401f..f9b3e11d22fa 100644 --- a/usr.sbin/apm/Makefile +++ b/usr.sbin/apm/Makefile @@ -1,6 +1,5 @@ PROG= apm MAN= apm.8 -MLINKS= apm.8 apmconf.8 MANSUBDIR= /${MACHINE_CPUARCH} PACKAGE=apm diff --git a/usr.sbin/apm/apm.8 b/usr.sbin/apm/apm.8 index d6ede22066da..e295ec989a73 100644 --- a/usr.sbin/apm/apm.8 +++ b/usr.sbin/apm/apm.8 @@ -9,7 +9,7 @@ .\" the author assume any responsibility for damages incurred with its .\" use. .\" -.Dd December 22, 2009 +.Dd November 12, 2025 .Dt APM 8 i386 .Os .Sh NAME @@ -120,13 +120,6 @@ If no options are specified, displays information and current status of APM in verbose mode. If multiple display options are given, the values are displayed one per line in the order given here. -.Sh NOTES -.Xr apmconf 8 -has been merged in -.Nm -and thus -.Nm -replaces all of its functionality. .Sh SEE ALSO .Xr apm 4 , .Xr zzz 8 From nobody Thu Nov 13 10:28:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6c21741Gz6GdPQ; Thu, 13 Nov 2025 10:28: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6c216Vj4z3YWK; Thu, 13 Nov 2025 10:28:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763029737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1MQZTC1bcpz+oRKRBCpj+eelJ2vulatoyYDcZuMmcOE=; b=kjWy3qqQQzgTcxexlSGyuaKgtE9z0xEmw2gfZSj7GptF43+S2LjwvQ0AmslQHJ3G+ZDnPV /6c40aB6veiTK6aOv8JQNYtjgHYuAKD+r1q/FVQ4X3ntBYn1q4dgLtgcrOpQatcAx6v1HB jlfBv46jd1ebIo3plF2KbuTgOk8os+WMlgY0zS1Mo8huAlGQK7J3smsyFUDJ2IBqn30Wy4 GKyq9D7Y5Gz36ip3opSRDlV1Xoso5eJPvMvvHzyJutvFkaGCI6c/EXZlK9vhQo6e8ebL1o yiylJd60OMlceIvBs/OkkdKjCrvfZoMCPffnZGEZEIA/trlLQS5wSF6ZHLQHQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763029737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1MQZTC1bcpz+oRKRBCpj+eelJ2vulatoyYDcZuMmcOE=; b=L7wcqWe4dDO7pur81246sXUlmVRy9i/6Cwq1TWvYbrEVH9yzBZZQvMpK6kXmzQbZ1n4Z/u pN2XUztf+JHact22QNc1IS3slU+yER1bfi/yz+JoMNXNnELwnvIMjPJwPvB5owg+YICx41 lmHuPnMni/E2IyFEuHyhSuECImpqisOTAJyCBRzcUBAhcL641kprcZmII8SVA8L61YLOHr vcdGMG1HSjLJABGbTNBTL0gx4Gs3mdgj8jQwPJdB1GvllOng+RZLR4oeootYb2E1pvvpIk etIQLYMTkkk9MLNhs4aDlvoUe2sSYnwz92dO2n1coI7x5LM5v2VvN0otsHlozQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763029737; a=rsa-sha256; cv=none; b=nIk1hbyxtnerlSoxjne1OtB9qZkV1ZfVkUjO7QX5nmlfyc+d1lsXv/ubJO8y/fDx3K82lh jpykI2M4HF3PvmwKgL9tvniYFSc+ZC9l4E0D+t8+Kbg3NGsNn8pSg0po4h7EVeDMlOCr13 cXd4OIpvZAehOsAdVY1cUbR8ovy/9hp+Z+T2NZILTIQUvJ24nKGMiVwW1hrTjdnX+pkbZi cD4JVh/3S18Elo+e9bstHU8l9rTfetiykr+c4hWs3SEnWJWS5en0bdvCl7iI4a4mLDsIod 1uY9BIGaNzE663IyAYjbkyN/5cmJhAc45Er2WvhSTaNTxLLOowCfKwL8epreTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6c215s3dz29N; Thu, 13 Nov 2025 10:28: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 5ADASvCN074805; Thu, 13 Nov 2025 10:28:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADASvJ4074802; Thu, 13 Nov 2025 10:28:57 GMT (envelope-from git) Date: Thu, 13 Nov 2025 10:28:57 GMT Message-Id: <202511131028.5ADASvJ4074802@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: 9d17b61b2fd2 - main - ministat: Clean up usage message, manual page, and chameleon List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 9d17b61b2fd254b418f3dd6b7a64afbc861a57f8 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=9d17b61b2fd254b418f3dd6b7a64afbc861a57f8 commit 9d17b61b2fd254b418f3dd6b7a64afbc861a57f8 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2025-11-12 15:06:06 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2025-11-13 10:27:23 +0000 ministat: Clean up usage message, manual page, and chameleon In the manual page: - Fix synopsis and use better argument names - Improve description of flags. - In EXAMPLES, list the contents of iguana and chameleon files. - Use Rs to reference The Cartoon Guide to Statistics - Fix misc indentation and style issues - Tag SPDX MFC after: 1 week Reviewed by: bcr, ziaee Differential Revision: https://reviews.freebsd.org/D53710 --- usr.bin/ministat/chameleon | 2 +- usr.bin/ministat/ministat.1 | 146 +++++++++++++++++++++++++++++--------------- usr.bin/ministat/ministat.c | 2 +- 3 files changed, 98 insertions(+), 52 deletions(-) diff --git a/usr.bin/ministat/chameleon b/usr.bin/ministat/chameleon index ed1bfdbc4773..dfb1923c000f 100644 --- a/usr.bin/ministat/chameleon +++ b/usr.bin/ministat/chameleon @@ -1,5 +1,5 @@ 150 400 -720 +720 500 930 diff --git a/usr.bin/ministat/ministat.1 b/usr.bin/ministat/ministat.1 index cef7caa7b9d9..437fd66a1ddc 100644 --- a/usr.bin/ministat/ministat.1 +++ b/usr.bin/ministat/ministat.1 @@ -1,6 +1,7 @@ .\" -.\" Copyright (c) 2007 Poul-Henning Kamp -.\" All rights reserved. +.\" Copyright (c) 2007 Poul-Henning Kamp. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 10, 2012 +.Dd November 13, 2025 .Dt MINISTAT 1 .Os .Sh NAME @@ -33,9 +34,9 @@ .Nm .Op Fl Anqs .Op Fl C Ar column -.Op Fl c Ar confidence_level -.Op Fl d Ar delimiter -.Op Fl w Op width +.Op Fl c Ar confidence +.Op Fl d Ar delimiters +.Op Fl w Ar width .Op Ar .Sh DESCRIPTION The @@ -44,10 +45,26 @@ command calculates fundamental statistical properties of numeric data in the specified files or, if no file is specified, standard input. .Pp The options are as follows: -.Bl -tag -width Fl +.Bl -tag -width "-c confidence" .It Fl A Just report the statistics of the input and relative comparisons, suppress the ASCII-art plot. +.It Fl C Ar column +Specify which column of data to use. +By default the first column in the input file(s) is used. +.It Fl c Ar confidence +Specify desired confidence level for Student's T analysis. +Possible percent values are +.Cm 80 , 90 , 95 , 98 , 99 , +and +.Cm 99.5 . +.It Fl d Ar delimiters +Specify the column delimiter characters, default is +.Ql \ \et +.Pq i.e., a space and a tab . +See +.Xr strtok 3 +for details. .It Fl n Just report the raw statistics of the input, suppress the ASCII-art plot and the relative comparisons. @@ -58,75 +75,104 @@ alongside .It Fl s Print the average/median/stddev bars on separate lines in the ASCII-art plot, to avoid overlap. -.It Fl C Ar column -Specify which column of data to use. -By default the first column in the input file(s) are used. -.It Fl c Ar confidence_level -Specify desired confidence level for Student's T analysis. -Possible values are 80, 90, 95, 98, 99 and 99.5 % -.It Fl d Ar delimiter -Specifies the column delimiter characters, default is SPACE and TAB. -See -.Xr strtok 3 -for details. .It Fl w Ar width -Width of ASCII-art plot in characters. +Set the width of the ASCII-art plot in characters. The default is the terminal width, or 74 if standard output is not a terminal. .El .Pp +.Nm +accepts up to seven input files. +.Pp +Each dataset must contain at least three values. +.Sh EXIT STATUS +.Ex -std +.Sh EXAMPLES +Let's consider two input files. +The first one will be +.Dq iguana : +.Bd -literal -offset indent +50 +200 +150 +400 +750 +400 +150 +.Ed +.Pp +The second one will be +.Dq chameleon : +.Bd -literal -offset indent +150 +400 +720 +500 +930 +.Ed +.Pp A sample output could look like this: .Bd -literal -offset indent - $ ministat -s -w 60 iguana chameleon - x iguana - + chameleon - +------------------------------------------------------------+ - |x * x * + + x +| - | |________M______A_______________| | - | |________________M__A___________________| | - +------------------------------------------------------------+ - N Min Max Median Avg Stddev - x 7 50 750 200 300 238.04761 - + 5 150 930 500 540 299.08193 - No difference proven at 95.0% confidence +$ ministat -s -w 60 iguana chameleon +x iguana ++ chameleon ++------------------------------------------------------------+ +|x * x * + + x +| +| |________M______A_______________| | +| |________________M__A___________________| | ++------------------------------------------------------------+ + N Min Max Median Avg Stddev +x 7 50 750 200 300 238.04761 ++ 5 150 930 500 540 299.08193 +No difference proven at 95.0% confidence .Ed .Pp If .Nm tells you, as in the example above, that there is no difference -proven at 95% confidence, the two data sets you gave it are for +proven at 95% confidence, the two datasets you gave it are for all statistical purposes identical. .Pp You have the option of lowering your standards by specifying a lower confidence level: .Bd -literal -offset indent - $ ministat -s -w 60 -c 80 iguana chameleon - x iguana - + chameleon - +------------------------------------------------------------+ - |x * x * + + x +| - | |________M______A_______________| | - | |________________M__A___________________| | - +------------------------------------------------------------+ - N Min Max Median Avg Stddev - x 7 50 750 200 300 238.04761 - + 5 150 930 500 540 299.08193 - Difference at 80.0% confidence - 240 +/- 212.215 - 80% +/- 70.7384% - (Student's t, pooled s = 264.159) +$ ministat -s -w 60 -c 80 iguana chameleon +x iguana ++ chameleon ++------------------------------------------------------------+ +|x * x * + + x +| +| |________M______A_______________| | +| |________________M__A___________________| | ++------------------------------------------------------------+ + N Min Max Median Avg Stddev +x 7 50 750 200 300 238.04761 ++ 5 150 930 500 540 299.08193 +Difference at 80.0% confidence + 240 +/- 212.215 + 80% +/- 70.7384% + (Student's t, pooled s = 264.159) .Ed .Pp But a lower standard does not make your data any better, and the example is only included here to show the format of the output when a statistical difference is proven according to Student's T method. .Sh SEE ALSO -Any mathematics text on basic statistics, for instances Larry Gonicks -excellent "Cartoon Guide to Statistics" which supplied the above example. +Any mathematics text on basic statistics, for instance the following book, +which supplied the above example: +.Rs +.%A Larry Gonick +.%A Woollcott Smith +.%B The Cartoon Guide to Statistics +.%D 1993 +.%I HarperPerennial +.%O ISBN 0-06-273102-5 +.Re .Sh HISTORY The .Nm -command was written by Poul-Henning Kamp out of frustration +command was written by +.An Poul-Henning Kamp +out of frustration over all the bogus benchmark claims made by people with no understanding of the importance of uncertainty and statistics. .Pp diff --git a/usr.bin/ministat/ministat.c b/usr.bin/ministat/ministat.c index 6967841a339f..7d3232370121 100644 --- a/usr.bin/ministat/ministat.c +++ b/usr.bin/ministat/ministat.c @@ -530,7 +530,7 @@ usage(char const *whine) fprintf(stderr, "%s\n", whine); fprintf(stderr, - "Usage: ministat [-C column] [-c confidence] [-d delimiter(s)] [-Anqs] [-w width] [file [file ...]]\n"); + "Usage: ministat [-Anqs] [-C column] [-c confidence] [-d delimiter(s)] [-w width] [file ...]]\n"); fprintf(stderr, "\tconfidence = {"); for (i = 0; i < NCONF; i++) { fprintf(stderr, "%s%g%%", From nobody Thu Nov 13 12:10:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6fHK0Vvsz6GlyW; Thu, 13 Nov 2025 12:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6fHJ72qsz3pkh; Thu, 13 Nov 2025 12:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763035837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96b0kjcdbV2I9LIgK8v5rfQt3kvaT1pDThxNcEAPTyo=; b=WiU+BhBOQR8+sDTWm3t8nhHiJCwytAJElI9ob4dw3IKYetQpsQSm76HOvmoeCd9k9FCdnT uNHgnR2zVuySxx2+yySN/N4dtod1+ZTQOYZnzgNEKUM6TxW/7GOs33HHVWvc84iyIHtqmN Rou1u6Dhqu/+Lv5ywjbpfCVEwTGaKToceP3PtS0nnSP1YRn3ZU8yAr1OCGTpZHH6fSYqep Ojl26Owlg0J/zisQ6xs3fFA42Sm2U+dptNSxXl6fpPCm6SMknYvXQpbB5I36S6NvkFDYEY EPTMs+jFMcNEGP34NPbhzWmA+nxLtpeAWWQ0ePa44Ze5iPqAeq92I3ggG4VGSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763035837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96b0kjcdbV2I9LIgK8v5rfQt3kvaT1pDThxNcEAPTyo=; b=DWelvXPRhBnfu1WpVgxkjSV7TY3K59lrCbcy5ThpTOGI6qgBkx0oLbFHj0uHOKPB/9mNp9 4NUzLQtc2fL7R+l0SXaqgNeW4kAa8pGdef8R+gwC6kKubvNn/5Ve9xoXtLLBHjnsZRdv50 USgoEOv5UrmeW2Q4YAAoQ303SFxhFw4+T/ugEIIUEVq2e5NU1Wek9SUzK0I4OnzsBKU6V6 9Q3DBViQLnZ1oiZflD5K1kN8UyiuZqt1Lwy1sWpuD6n590JEB0aqNnAWNcY45CGu4YO9nP QU9+wrmdlATngac+8hMfiqoWDL4CY7LuPDaXw42XtJ2uxCOqMjDvj7Ckyb8TtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763035837; a=rsa-sha256; cv=none; b=CMeHol1EAqehRCXgpJRn05guN5XWUJ/vUJ9tjL1OEwu0wUKOu6IXuZsc1PT5zVG4dJOR9y WMTOy7/S5/UADdaGg87vlnSwM9om9o9L7ij9pn13s/mmRv4qnNuFyZB5y8cMyPuL+SbPEh ppKVBkDmZxnsZ63aknKzx1Lkj6BZyEhdkq2gjkB2WAgOJrAJLMhy0WlzZUk1keoSJqB8vf nbDxaKZBhcSpiBL7L8e46VAr2hCsC9Y1HNF2AJd0Cz/uNkEy0+gwYvRkjSuUUdJ25Gez9H 9/xLQgrzlTrIPMVLLm1vdI8o5Is8/t3Tgo09ob+5fdsOz9DJlOxTpxDZGnHJPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6fHJ6Hhkz4hf; Thu, 13 Nov 2025 12:10: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 5ADCAada072799; Thu, 13 Nov 2025 12:10:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADCAa4i072796; Thu, 13 Nov 2025 12:10:36 GMT (envelope-from git) Date: Thu, 13 Nov 2025 12:10:36 GMT Message-Id: <202511131210.5ADCAa4i072796@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: e4b31985b54b - main - sound: Remove dead midi code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: e4b31985b54b626b2bbf486a82dd789f3dd381db Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e4b31985b54b626b2bbf486a82dd789f3dd381db commit e4b31985b54b626b2bbf486a82dd789f3dd381db Author: Christos Margiolis AuthorDate: 2025-11-13 12:10:04 +0000 Commit: Christos Margiolis CommitDate: 2025-11-13 12:10:04 +0000 sound: Remove dead midi code Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/dev/sound/midi/midi.c | 137 +++++----------------------------------------- 1 file changed, 14 insertions(+), 123 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index eed7ce89a919..b39288675ea6 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -62,12 +62,6 @@ #include MALLOC_DEFINE(M_MIDI, "midi buffers", "Midi data allocation area"); -#define MIDI_DEV_MIDICTL 12 - -enum midi_states { - MIDI_IN_START, MIDI_IN_SYSEX, MIDI_IN_DATA -}; - #define MIDI_NAMELEN 16 struct snd_midi { KOBJ_FIELDS; @@ -86,12 +80,6 @@ struct snd_midi { struct selinfo rsel, wsel; int hiwat; /* QLEN(outq)>High-water -> disable * writes from userland */ - enum midi_states inq_state; - int inq_status, inq_left; /* Variables for the state machine in - * Midi_in, this is to provide that - * signals only get issued only - * complete command packets. */ - struct proc *async; struct cdev *dev; TAILQ_ENTRY(snd_midi) link; }; @@ -326,10 +314,8 @@ static int midi_lengths[] = {2, 2, 2, 2, 1, 1, 2, 0}; int midi_in(struct snd_midi *m, uint8_t *buf, int size) { - /* int i, sig, enq; */ int used; - /* uint8_t data; */ MIDI_DEBUG(5, printf("midi_in: m=%p size=%d\n", m, size)); /* @@ -341,111 +327,22 @@ midi_in(struct snd_midi *m, uint8_t *buf, int size) used = 0; mtx_lock(&m->qlock); -#if 0 - /* - * Don't bother queuing if not in read mode. Discard everything and - * return size so the caller doesn't freak out. - */ - - if (!(m->flags & M_RX)) - return size; - - for (i = sig = 0; i < size; i++) { - data = buf[i]; - enq = 0; - if (data == MIDI_ACK) - continue; - - switch (m->inq_state) { - case MIDI_IN_START: - if (MIDI_IS_STATUS(data)) { - switch (data) { - case 0xf0: /* Sysex */ - m->inq_state = MIDI_IN_SYSEX; - break; - case 0xf1: /* MTC quarter frame */ - case 0xf3: /* Song select */ - m->inq_state = MIDI_IN_DATA; - enq = 1; - m->inq_left = 1; - break; - case 0xf2: /* Song position pointer */ - m->inq_state = MIDI_IN_DATA; - enq = 1; - m->inq_left = 2; - break; - default: - if (MIDI_IS_COMMON(data)) { - enq = 1; - sig = 1; - } else { - m->inq_state = MIDI_IN_DATA; - enq = 1; - m->inq_status = data; - m->inq_left = MIDI_LENGTH(data); - } - break; - } - } else if (MIDI_IS_STATUS(m->inq_status)) { - m->inq_state = MIDI_IN_DATA; - if (!MIDIQ_FULL(m->inq)) { - used++; - MIDIQ_ENQ(m->inq, &m->inq_status, 1); - } - enq = 1; - m->inq_left = MIDI_LENGTH(m->inq_status) - 1; - } - break; - /* - * End of case MIDI_IN_START: - */ - - case MIDI_IN_DATA: - enq = 1; - if (--m->inq_left <= 0) - sig = 1;/* deliver data */ - break; - case MIDI_IN_SYSEX: - if (data == MIDI_SYSEX_END) - m->inq_state = MIDI_IN_START; - break; - } - - if (enq) - if (!MIDIQ_FULL(m->inq)) { - MIDIQ_ENQ(m->inq, &data, 1); - used++; - } - /* - * End of the state machines main "for loop" - */ + MIDI_DEBUG(6, printf("midi_in: len %jd avail %jd\n", + (intmax_t)MIDIQ_LEN(m->inq), + (intmax_t)MIDIQ_AVAIL(m->inq))); + if (MIDIQ_AVAIL(m->inq) > size) { + used = size; + MIDIQ_ENQ(m->inq, buf, size); + } else { + MIDI_DEBUG(4, printf("midi_in: Discarding data qu\n")); + mtx_unlock(&m->qlock); + return 0; } - if (sig) { -#endif - MIDI_DEBUG(6, printf("midi_in: len %jd avail %jd\n", - (intmax_t)MIDIQ_LEN(m->inq), - (intmax_t)MIDIQ_AVAIL(m->inq))); - if (MIDIQ_AVAIL(m->inq) > size) { - used = size; - MIDIQ_ENQ(m->inq, buf, size); - } else { - MIDI_DEBUG(4, printf("midi_in: Discarding data qu\n")); - mtx_unlock(&m->qlock); - return 0; - } - if (m->rchan) { - wakeup(&m->rchan); - m->rchan = 0; - } - selwakeup(&m->rsel); - if (m->async) { - PROC_LOCK(m->async); - kern_psignal(m->async, SIGIO); - PROC_UNLOCK(m->async); - } -#if 0 + if (m->rchan) { + wakeup(&m->rchan); + m->rchan = 0; } -#endif + selwakeup(&m->rsel); mtx_unlock(&m->qlock); return used; } @@ -480,11 +377,6 @@ midi_out(struct snd_midi *m, uint8_t *buf, int size) m->wchan = 0; } selwakeup(&m->wsel); - if (m->async) { - PROC_LOCK(m->async); - kern_psignal(m->async, SIGIO); - PROC_UNLOCK(m->async); - } } mtx_unlock(&m->qlock); return used; @@ -526,7 +418,6 @@ midi_open(struct cdev *i_dev, int flags, int mode, struct thread *td) m->rchan = 0; m->wchan = 0; - m->async = 0; if (flags & FREAD) { m->flags |= M_RX | M_RXEN; From nobody Thu Nov 13 12:11:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6fJ06ctqz6Gly3; Thu, 13 Nov 2025 12:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6fJ04ngPz3qY3; Thu, 13 Nov 2025 12:11:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763035872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qNVVZR93X30QQQEKq4qeYufe61kCdigiMNiujcz6hwU=; b=VR7yrmbmKo9kcmRV+mpAPVHlqeK8TSwwjxJKX7bTabbcnRSwQesQoY1tyqD1tRJQH1Q0Pw FAw7WV3qW3cVTgnmFl5ZezgO6ta3kx4XlY8DZPpGnxVGMF34jG2Q/3uajgey+A2X//kDsB ng/KmfFQYaCBC3lJZ0TGUsjXFZyCGS+Xr6mVIcYsSXB3tY0Nyz04owO+Jbx8sVTVlBikcV jR8en37+dZIKDd9MdogUXRw1YtavJmifzuSgEH6Y5dX4sFIimLQqkTN2S87ILBYR+lWq7I ocVUaRVt97Haqf9kPJ67JmOTngGpD0/nb/E3KKlFFd5x9TwTqlTuSVJfpn/XBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763035872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qNVVZR93X30QQQEKq4qeYufe61kCdigiMNiujcz6hwU=; b=kSNTcBDrdBYD0XK4P1s2Bkk+l6ncxZrDgYazNvoFUGJBL5sYGBxXoSyWC3r9k4/Y0z/3qh CS304zwkBoFVFwqXG/OwSHcxLRZCPZD5qz4IaPkVVjoJ932N1xkvzXPZzka1d8+REDdvKt PwNBsDHjhU8Kuu36e+jAkjCbgOkf7diZ0RlWPb+TsAzYbJm1pT2C1h0gr4Gx0EFPu3a4DP ZUDKs5+vDLY8I/RzRM5wj7S4T5yZdytXQUVOJhHxLrbVSuugpIgXorbV1rcNNeW5X8YIOH x694r9d2YMU7f3myVausKdsMtSn1cfuhawpf2IyKkKO/3kyNQZIc2SSXtZveow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763035872; a=rsa-sha256; cv=none; b=dglmeWXjdNBj5J6VRVG8tK/1XWN5zUkCm2tEAChwsg4MqoD+hiUOyEiLgY+PhWKmV8taGv XKbUfVe5Dv0VrNbDU5XhL7/lOyQcPA/1BUdyJ6he4mSilGg0e1NSJ0QPVzpTG+2bAbAj8a pcAAOVT/1o/9+MmI/B7vy+eaLEn+5kiVUZXkJtdtRHAju93LtwS7EKhQvlFBNWhAA74maY bptCfccPQrrkSfjDUj9FOhrahZf07Sk3elaX9fOAJT7VHoT1mhtEORl3iM34nZfRg8hDWL CJOFOnOV/NiIrwmrXqXxbtlEE1JvPLZVR4dgHOEjBjvlgo+kexHNGjLxjRJHsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6fJ04KF9z542; Thu, 13 Nov 2025 12:11: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 5ADCBC7p073139; Thu, 13 Nov 2025 12:11:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADCBCTf073136; Thu, 13 Nov 2025 12:11:12 GMT (envelope-from git) Date: Thu, 13 Nov 2025 12:11:12 GMT Message-Id: <202511131211.5ADCBCTf073136@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: 634e578ac7b0 - main - cuse: Fix cdevpriv bugs in cuse_client_open() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 634e578ac7b0a03ae25427c723c0da27e894a340 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=634e578ac7b0a03ae25427c723c0da27e894a340 commit 634e578ac7b0a03ae25427c723c0da27e894a340 Author: Christos Margiolis AuthorDate: 2025-11-13 12:11:06 +0000 Commit: Christos Margiolis CommitDate: 2025-11-13 12:11:06 +0000 cuse: Fix cdevpriv bugs in cuse_client_open() If devfs_set_cdevpriv() fails, we will panic when we enter the cuse_client_free() callback, for a number of reasons: - pcc->server is not yet assigned, so we'll use a NULL pointer. - pcc has not yet been added to the pcs->hcli TAILQ, but we'll try to remove it. - pccmd->sx and pccmd->cv are not yet initializated, but we'll try to destroy them. Even if we'd get past all these somehow, we'd still get two errors in the devfs_set_cdevpriv() failure block: - We'll unref the server twice, once in cuse_client_free(), and again in cuse_client_open(). - A double-free panic, since we'd be trying to free(pcc), which has already been freed in cuse_client_free(). Fix all those issues. While here, also get rid of some unnecessary devfs_clear_cdevpriv(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D53708 --- sys/fs/cuse/cuse.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sys/fs/cuse/cuse.c b/sys/fs/cuse/cuse.c index b2524324584a..b914b2d5017c 100644 --- a/sys/fs/cuse/cuse.c +++ b/sys/fs/cuse/cuse.c @@ -1516,13 +1516,6 @@ cuse_client_open(struct cdev *dev, int fflags, int devtype, struct thread *td) } pcc = malloc(sizeof(*pcc), M_CUSE, M_WAITOK | M_ZERO); - if (devfs_set_cdevpriv(pcc, &cuse_client_free)) { - printf("Cuse: Cannot set cdevpriv.\n"); - /* drop reference on server */ - cuse_server_unref(pcs); - free(pcc, M_CUSE); - return (ENOMEM); - } pcc->fflags = fflags; pcc->server_dev = pcsd; pcc->server = pcs; @@ -1553,10 +1546,12 @@ cuse_client_open(struct cdev *dev, int fflags, int devtype, struct thread *td) } cuse_server_unlock(pcs); - if (error) { - devfs_clear_cdevpriv(); /* XXX bugfix */ + if (error != 0) return (error); - } + + if ((error = devfs_set_cdevpriv(pcc, &cuse_client_free)) != 0) + return (error); + pccmd = &pcc->cmds[CUSE_CMD_OPEN]; cuse_cmd_lock(pccmd); @@ -1575,9 +1570,6 @@ cuse_client_open(struct cdev *dev, int fflags, int devtype, struct thread *td) cuse_cmd_unlock(pccmd); - if (error) - devfs_clear_cdevpriv(); /* XXX bugfix */ - return (error); } From nobody Thu Nov 13 12:53:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6gDj6BvRz6Gpqy; Thu, 13 Nov 2025 12:53: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6gDj3nrwz41Q3; Thu, 13 Nov 2025 12:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763038405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A0y2HGLdyTIg9LRcyC4gySGPL7hMH1T7i4yvO74MSfw=; b=hXIRD47oUAp1NC9lGc5tS6/7zFDPU0jJKoxZVRiqfuwP81Ifs8yJJLI172nxYGp+o9iwAd rKHmexteqVWdUhR0xiLd6SHgfniLCHPr4oXqU2Qr0RH/im16GQizBPbMOp+uEpYeMSJuW+ N24uVVCytD8U4mMvgJLdFwOLXAf+tRJhkOzAe4+og8CJcHWTP9GkOMl1/cIIiJzab4+E0B 6dozTKhYmto2QV7UUC+K4xD6+OHY2FdfNXrPVBWzwQ0LaS2FJX/OA80NA4x1uKrAaEVHUP igzvzn2vSIVTkUYRKRuCZUcN2ZhJdbrNG5xYbwfnFiQRssvuVEI/SrGAC3QWlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763038405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A0y2HGLdyTIg9LRcyC4gySGPL7hMH1T7i4yvO74MSfw=; b=b09b3FxW356FgOIjsSRVpA8es66v6avDpk66hYEooq1tts4Y6iRK4ISsgKtfawpBM8XNVf PoUKVoyiBmxmTkRpGQ4hPHd2K4cp9tfK0O29gFZxhYRZEY5xa7AgqFlLp99Y3BrUsZtqDa 2RAATuNz5mGeOXxru+cXskyXWE2gJtcWrcxQ1lETPPcn7JJVXWphx2cvcnd79QdnYvLWP6 tJGBtDj0UEpqZuKkrIgd2HPOEaCLCKFKR5rTgz6uQ/UPRoTqLaFXKLUJr6dg1safi/lnn8 eWlDbQtsnYdPn1xQYjEaoKFMAksBu1b6R795YXwz/GMxLpTNH3MgdRZBSwZMdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763038405; a=rsa-sha256; cv=none; b=QWSMdfJkwfPqForj530VREXYY9Pu6ofdjgfQX4l+/DlJMStUTmpQqtoHDytdjB+pFJSvAn vn3W6+VUCH4mGJEngoyB3PoTX2GOwqjInmStukUHfBrzvLM8hJfhdIc9K4Gm8rKqI46L1F +07wHNKCYmFdSpejzCGDPaIqWmXjR2HpZXUv95iKUETitSfqPR9IXEmsHQhFlsVKQ52W93 sonFYh5HfijPMfT2IMszDSrx69CTAEALc0RceAEEjNqAnu6r2phWHkSxOum8Tcg6GZyDSU k5abEfS+NBVq1ia4EcGvWrFLoAUZM4GHu0SCwza3kZdym4tVbDiePIY8d53wJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6gDj3BQyz6Bc; Thu, 13 Nov 2025 12:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5ADCrPpw056707; Thu, 13 Nov 2025 12:53:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADCrPam056704; Thu, 13 Nov 2025 12:53:25 GMT (envelope-from git) Date: Thu, 13 Nov 2025 12:53:25 GMT Message-Id: <202511131253.5ADCrPam056704@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: b55adf9b261b - main - sound: Retire unused mixer functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: b55adf9b261b91ddd3c7293720bbbbfb4ffe7066 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b55adf9b261b91ddd3c7293720bbbbfb4ffe7066 commit b55adf9b261b91ddd3c7293720bbbbfb4ffe7066 Author: Christos Margiolis AuthorDate: 2025-11-13 12:53:18 +0000 Commit: Christos Margiolis CommitDate: 2025-11-13 12:53:18 +0000 sound: Retire unused mixer functions No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/dev/sound/pcm/mixer.c | 43 ------------------------------------------- sys/dev/sound/pcm/mixer.h | 4 ---- 2 files changed, 47 deletions(-) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index f281dff36248..5fa3ff5cc83c 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -608,14 +608,6 @@ mix_getparent(struct snd_mixer *m, u_int32_t dev) return m->parent[dev]; } -u_int32_t -mix_getchild(struct snd_mixer *m, u_int32_t dev) -{ - if (m == NULL || dev >= SOUND_MIXER_NRDEVICES) - return 0; - return m->child[dev]; -} - u_int32_t mix_getdevs(struct snd_mixer *m) { @@ -1024,14 +1016,6 @@ mix_getrecsrc(struct snd_mixer *m) return (ret); } -int -mix_get_type(struct snd_mixer *m) -{ - KASSERT(m != NULL, ("NULL snd_mixer")); - - return (m->type); -} - device_t mix_get_dev(struct snd_mixer *m) { @@ -1573,30 +1557,3 @@ mixer_get_lock(struct snd_mixer *m) } return (m->lock); } - -int -mix_get_locked(struct snd_mixer *m, u_int dev, int *pleft, int *pright) -{ - int level; - - level = mixer_get(m, dev); - if (level < 0) { - *pright = *pleft = -1; - return (-1); - } - - *pleft = level & 0xFF; - *pright = (level >> 8) & 0xFF; - - return (0); -} - -int -mix_set_locked(struct snd_mixer *m, u_int dev, int left, int right) -{ - int level; - - level = (left & 0xFF) | ((right & 0xFF) << 8); - - return (mixer_set(m, dev, m->mutedevs, level)); -} diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index 7139a766b392..c47247ab570d 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -47,13 +47,10 @@ void mixer_hwvol_step(device_t dev, int left_step, int right_step); int mixer_busy(struct snd_mixer *m); -int mix_get_locked(struct snd_mixer *m, u_int dev, int *pleft, int *pright); -int mix_set_locked(struct snd_mixer *m, u_int dev, int left, int right); int mix_set(struct snd_mixer *m, u_int dev, u_int left, u_int right); int mix_get(struct snd_mixer *m, u_int dev); int mix_setrecsrc(struct snd_mixer *m, u_int32_t src); u_int32_t mix_getrecsrc(struct snd_mixer *m); -int mix_get_type(struct snd_mixer *m); device_t mix_get_dev(struct snd_mixer *m); void mix_setdevs(struct snd_mixer *m, u_int32_t v); @@ -65,7 +62,6 @@ u_int32_t mix_getmutedevs(struct snd_mixer *m); void mix_setparentchild(struct snd_mixer *m, u_int32_t parent, u_int32_t childs); void mix_setrealdev(struct snd_mixer *m, u_int32_t dev, u_int32_t realdev); u_int32_t mix_getparent(struct snd_mixer *m, u_int32_t dev); -u_int32_t mix_getchild(struct snd_mixer *m, u_int32_t dev); void *mix_getdevinfo(struct snd_mixer *m); struct mtx *mixer_get_lock(struct snd_mixer *m); From nobody Thu Nov 13 13:33:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6h752nRkz6GsmQ; Thu, 13 Nov 2025 13:33: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6h7524J1z49fW; Thu, 13 Nov 2025 13:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763040817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lDFw/cu6NZkyNW5ydrjl3m/woneSUKLZVuWt770MeoI=; b=YqrslIxvcJSw7J1bdPK/Ym0Znm83JUU3QcIU8gVVG/QBsmHCTDTen31Z7GbKz4H9AmZhOj 6eiWVg9/Hbq3SSoxHBKOBifAhV2H4/p8Bx80uOJDZfmr8ANWirta8UMn75VZx+Pgz2zfrc gLjVMZoRqgr0PLi9knY8wdq2YZuxYfi2/Eg3qvYJonLuogllasfUJRao7U9JNZ0gToYOwi x0W8AA8vYs1NaVdUXk5Icc7BSNloyrISYLPs22eiuRMKrAMAgsH0k7HL79vnTW4YaeHX3n Aby/FgV6FdZygRP7FHmTDqaXZT9OnRmovsjJoUXHmhVgm12mYy7bt7h/XWq5KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763040817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lDFw/cu6NZkyNW5ydrjl3m/woneSUKLZVuWt770MeoI=; b=GoCTqQg9Zy8XmB3ncMJAeZ1DLULTyZUv4iH6Xbv452hhjI63kUBHveKKAB2OhSqRTadZmM bJx7eMdIzGrzPas2Txbib1HkSJxSsxHw4rveAh+iOQyB5z2k9LA16++sRd6Uv9ntG+VdUx krZcFvt1fyZTk7Mo8SZMyeWdywlFdG+JGVWo30MVED/d5uHLbbTGmSmUcjMtTaQ34HhA+S +WFmS2kt6mwfDuQZLWWwEflYWO/grbgxq3J+ddiIh6l1HA5+RMmhfM/GACblmeTSKN9MFY 2z3QBxiRVItLD9rsnYWmZIM5wKlNpq1JfAyG5MvT66ac2mQLUfEtg2wyFQ8O8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763040817; a=rsa-sha256; cv=none; b=Fk+eqVnkRpDpcfRy5GohaFYB5QnBSA3NSCjvTVatRGMR7wU7A19ZgdsyXButItIMWtg1r9 51WoklHe8Md7zPZ1SME0iTfeRsAeLdzUrc8nwrgidp3mvO2oCGnqynL0tMEKyGGAkXy+yA lIoYqY2+c2XZjekjEnYNihGNKJ2X4bQGVdoB6kMnwr/KXk4JzI0aKzzJ7tf8UrI7vBgKCp aTXF5Viu25niHE/LxHWgSrjCn1m/UKYcup4aWfzU0r1l6eY5Cm/uHsZ+aewyqr3TKnUQ47 0oY7N3qFNrCoABhYuv/O5FLrJDpYe3uBbSJb1D5If4BcmeEqpH3eT8WuJl7iIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6h751XcVz7NP; Thu, 13 Nov 2025 13:33: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 5ADDXb4s031916; Thu, 13 Nov 2025 13:33:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADDXbRN031913; Thu, 13 Nov 2025 13:33:37 GMT (envelope-from git) Date: Thu, 13 Nov 2025 13:33:37 GMT Message-Id: <202511131333.5ADDXbRN031913@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: 15d77c1fdcb1 - main - sound: Move mixer->modify_counter to more appropriate 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15d77c1fdcb1c7f022a21892dcb78990986f1a3c Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=15d77c1fdcb1c7f022a21892dcb78990986f1a3c commit 15d77c1fdcb1c7f022a21892dcb78990986f1a3c Author: Christos Margiolis AuthorDate: 2025-11-13 13:33:24 +0000 Commit: Christos Margiolis CommitDate: 2025-11-13 13:33:24 +0000 sound: Move mixer->modify_counter to more appropriate place No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/dev/sound/pcm/mixer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 5fa3ff5cc83c..adbde195c34c 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -65,11 +65,6 @@ struct snd_mixer { char name[MIXER_NAMELEN]; struct mtx *lock; oss_mixer_enuminfo enuminfo; - /** - * Counter is incremented when applications change any of this - * mixer's controls. A change in value indicates that persistent - * mixer applications should update their displays. - */ int modify_counter; }; @@ -1474,6 +1469,11 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) mi->dev = i; snprintf(mi->id, sizeof(mi->id), "mixer%d", i); strlcpy(mi->name, m->name, sizeof(mi->name)); + /** + * Counter is incremented when applications change any of this + * mixer's controls. A change in value indicates that + * persistent mixer applications should update their displays. + */ mi->modify_counter = m->modify_counter; mi->card_number = i; /* From nobody Thu Nov 13 13:33:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6h764jt6z6GsT2; Thu, 13 Nov 2025 13:33:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6h762y51z49vn; Thu, 13 Nov 2025 13:33:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763040818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T+edotYIPSREPq920BDTRzLs+gEHvux+FSBgTR+XzjA=; b=JwJ61oJQiVK9p6b+M6fhonoBTTuOTKwM6aFAEwRcWxzW6MKfvJnO1ZcBIgQGspw7uSOocG qnbD+TT/qEvbRtVB9xTmrbweCQ9OpHXrYzdzzSa/UjqM1LBlLSWOQrCUlVZtJ9RNv/hSMN 6ZmCSPwnbB5ub2li3bCAMd45o0b52Qil2EBNyCBMk19UqKeNfvohHQTZO/7ryJYLzYxBue hby92nm8Lmtr7O65vGwnH+Q6Q4zlyOQhUcnScvPo8osS6oEONKd1qRL9miKBFiJIfUKwNG n6VNLxjzqC9U68qDtBLrWv18qQdg6Dmq/Z9gDuS5RxJvPboe+mIurXKTj+z1Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763040818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T+edotYIPSREPq920BDTRzLs+gEHvux+FSBgTR+XzjA=; b=diV6M1ZaLYnJtmbL0doMWTA8Cne+jI6CuHL8tuKhE7fbp0vAk+ci/pXLkggcvE5CF56kgH tsHY1m2ZoobQLePaWfZNgbf0X9VQpMuD6pCnDnXnyER49LHc6YJLoIiGScnSDDu2OxRj/6 kv485epkRxz98/rBUMBBEMJeEaS4VUuEMapYgU5yI9FPcdTh7BT8ruNXn5ZaZlxg20BtYx eJm4PJZG/Y0V031Kudfzk+IbqREsMLpE44Vbh6HSbIHW3VblGzP0JSak1KdWdWYHQYI0aj U4ThV/cIpuIRucP934JOAtdRiM/FitkotiXncgkuKOW28OuXH4FXTpR5myc4/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763040818; a=rsa-sha256; cv=none; b=P2iIhrIeZry3mUa1ltlnhRmRCAlaASHSTBxVHkYHxPxwuDG16y6z+jr3ACAgksVEmuZMel nBWE4coax0LMLAji/27si/VUsaYejOADq1fNUe+OgArfut2ZT0LuHiXOBhl6qG7NA+WmTa opkLt94EsJzSULHolFMV49vaa/l7LtGHHPo5fJ97XbyrbUMogAWZ5cBeKYGd0OzNM8xnYe HdYdD690YFT1PBjq1rpYZRV6TqU0atJYxMBlAHkAXP9NEGHkLiNdagXnHS0gVhEoAtokvN 7dGPYSit80GZs6lnT4MxlC8YowlB4GjiJQB/qb6OC9gtcMReSKSyFHJFIjJH+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6h762T5Qz7Gt; Thu, 13 Nov 2025 13:33: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 5ADDXcPF031950; Thu, 13 Nov 2025 13:33:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADDXc0F031947; Thu, 13 Nov 2025 13:33:38 GMT (envelope-from git) Date: Thu, 13 Nov 2025 13:33:38 GMT Message-Id: <202511131333.5ADDXc0F031947@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: 1fe7bfd6c701 - main - sound: Retire OLDPCM_IOCTL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 1fe7bfd6c70160c064237eac104e7d9c71390c4f Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1fe7bfd6c70160c064237eac104e7d9c71390c4f commit 1fe7bfd6c70160c064237eac104e7d9c71390c4f Author: Christos Margiolis AuthorDate: 2025-11-13 13:33:28 +0000 Commit: Christos Margiolis CommitDate: 2025-11-13 13:33:28 +0000 sound: Retire OLDPCM_IOCTL It is defined by default, and there is no reason to have a switch for it. While here, also get rid of some unnecessary comments and ioctl definitions. No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/dev/sound/pcm/dsp.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index d0ed405fb25b..429586e64aef 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -72,8 +72,6 @@ SYSCTL_INT(_hw_snd, OID_AUTO, basename_clone, CTLFLAG_RWTUN, #define DSP_F_READ(x) ((x) & FREAD) #define DSP_F_WRITE(x) ((x) & FWRITE) -#define OLDPCM_IOCTL - static d_open_t dsp_open; static d_read_t dsp_read; static d_write_t dsp_write; @@ -808,10 +806,6 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, } switch(cmd) { -#ifdef OLDPCM_IOCTL - /* - * we start with the new ioctl interface. - */ case AIONWRITE: /* how many bytes can write ? */ if (wrch) { CHN_LOCK(wrch); @@ -1028,10 +1022,6 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, printf("AIOSYNC chan 0x%03lx pos %lu unimplemented\n", ((snd_sync_parm *)arg)->chan, ((snd_sync_parm *)arg)->pos); break; -#endif - /* - * here follow the standard ioctls (filio.h etc.) - */ case FIONREAD: /* get # bytes to read */ if (rdch) { CHN_LOCK(rdch); @@ -1070,11 +1060,6 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, } break; - /* - * Finally, here is the linux-compatible ioctl interface - */ -#define THE_REAL_SNDCTL_DSP_GETBLKSIZE _IOWR('P', 4, int) - case THE_REAL_SNDCTL_DSP_GETBLKSIZE: case SNDCTL_DSP_GETBLKSIZE: chn = wrch ? wrch : rdch; if (chn) { From nobody Thu Nov 13 13:56:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6hcw6FrYz6GvGD; Thu, 13 Nov 2025 13:56: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6hcw5lTpz3HF2; Thu, 13 Nov 2025 13:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763042160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=toTIzjw10yWZVfRrNIQtgERYN/WYkRv2T5FQ9+tCQqc=; b=RTDOCgJz5XxF+0eK/G4/kdjG5ip5PqEUUju46t63wqlqyEyP70M/wXEzcZFCac1wzE/Oz2 OC1DhF4kXoIfhJjeliCt6OhqYBKae7kyplK6PgYU1uKO3EtDZ3nLCBBGMtpg4gOGin8j7T pzEHhqDRe2yYrosWWVnb5QQuFD5j8F7EoRARm2Y+WotlW3SMRB7O76BHO02rI43Zw18ClB g4LVkqr8cLHBZ/D8PdgWZXbQ8P0bIBKB+/MqzYNWKoCHXaKjNYVhBRhWuk/IPNOxfOUepC PMVNkhSVSiPuwnX/Lk/SCD9quC28k/RxZWrNfrLycR9UximG5kTty59lROQRVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763042160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=toTIzjw10yWZVfRrNIQtgERYN/WYkRv2T5FQ9+tCQqc=; b=f8WHlkamhNcLrP7IsjKYfZKVjdgRDbFj4dDFqnQ1Oc2IhILfsLpi/eejT9j77hYKLWh0Ax 2B2AA7aOGMH1UKzHVXDk/MacIVn26BAt48v/qQu1L/QKx3JW56izBjWrFY4a3On39Kx94e d6V7bJZZBB0Qf0HoHnwFyhvahGcQGkq8ZPscgjperNvCUCHYsVwRsYf19Amxc63a9SC6tx filkOgxe4eXfemznzhhv772CA8QXlhRIg/i721KJ255cegVjjxYEMp+ZuuWJ1h8Ru7Moku khGw2NrW9mtCM/OOtrZD7PqIRkNKBvnsp7Ahj5LvN/KvcPYFYfbP8X2VxcHJnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763042160; a=rsa-sha256; cv=none; b=tVaHHNeWafiI40SvpOcxwJVma9oijIGSI+BMwUKG/rwOrLpCrLl9B7/yBUsaGpVPglPGup 1JU/LEmBBSpI/Xmu48Tlod0U3CGxOTQ4njFmmfv+3iOxfg/x1/CVy4CFo3qReGZHbdosn7 aQs5kkTSF2x7AV9pY/OV7dFtHEENCLKn0V2NXRn/dnB4UxlMlsv30R7FVpqrcIa1A3CoLp 9uRIw9eXKxik30MjJe7Fc9Li3xmDVOk6V23jnD+7DgX7pZWV4kuAa2vPeRrrr8dOll1u+f JLoVwsQ7qXSlK+3oCzxMBDOOLbXf9O9kaPDvQtn4LCTpZ3wJnAMviiav1zOKow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6hcw58Ttz7YB; Thu, 13 Nov 2025 13:56: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 5ADDu0hf070332; Thu, 13 Nov 2025 13:56:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADDu0mX070329; Thu, 13 Nov 2025 13:56:00 GMT (envelope-from git) Date: Thu, 13 Nov 2025 13:56:00 GMT Message-Id: <202511131356.5ADDu0mX070329@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: a1b9b97d9679 - main - arm64/spe: Fix the GENERIC-NODEBUG 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1b9b97d9679c9c4d31d86c924f1d6f06f972579 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a1b9b97d9679c9c4d31d86c924f1d6f06f972579 commit a1b9b97d9679c9c4d31d86c924f1d6f06f972579 Author: Mark Johnston AuthorDate: 2025-11-13 13:54:53 +0000 Commit: Mark Johnston CommitDate: 2025-11-13 13:54:53 +0000 arm64/spe: Fix the GENERIC-NODEBUG build Fixes: 68f185ccc9f8 ("arm64: Add Arm SPE support") --- sys/arm64/spe/arm_spe_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/spe/arm_spe_dev.c b/sys/arm64/spe/arm_spe_dev.c index 54623eebda21..8a834197eeef 100644 --- a/sys/arm64/spe/arm_spe_dev.c +++ b/sys/arm64/spe/arm_spe_dev.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include From nobody Thu Nov 13 14:36:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6jW85Nl9z6GxSR; Thu, 13 Nov 2025 14:36: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6jW84vM2z3MLT; Thu, 13 Nov 2025 14:36:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763044564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/fxRqM4hWhZd8EYBvYEeavGf9swDW9mlrj2kvwoBu+A=; b=VEumqjUX077rO7sFPksrMdYkjMRa+lmCNu2P73JS2Vv+uwwS+1bj5x5ZkBAR/rNljxNwEa jWrGFkoJffXW3DWbpfy/qWA9f5wXVSUQ0i+GLABuATw2Q9eMFBZOELG3f/7K0mOCwtH299 KV4xpmdFl0uf7CAwmiYzK5DIrPRi+L3xzNjy00yxm80rw4hX90RBmpM2SaFAKsS7ePeYQr g9esxaNmimajEUpAFr/WWgJ5tcHHIEaHf2mW4ViqDbp+ZlXXKliQPy4LgtHxXWIVkGiCXS pW0NA+cPt+VeQqnxiF8jeDKkDhWGEl+UvIbnwXCQO1Se2eM67NjlGD3MTvrNfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763044564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/fxRqM4hWhZd8EYBvYEeavGf9swDW9mlrj2kvwoBu+A=; b=jdN96VLI1ypIlwwfqeLIdIZ6jNJky2beBAop+yxJGjYcjPDVE4Z25GK3Mzt8VHOXEcEw/d rC7A/qTKcPjTAkIbeqApHH4w7E4yzvmvyhbD4qVhD/144u1r9HPNWAU7q0z1R2eDV+Zzjf MgpiRF2Tt/LQajCYI3qKKvsRQiBk99T7WlwAmPZvXEbORhHV+oq6KGoxn93hv97hp9dZWt gAEXA6xIWU6M8kgnb4uPYTx9J03Bj0zleYN3sbLdhL5JzBflHfqAwuRiyNEey8Z+oppobn vTzNBgdrJydDZNCV5LxX1WwYtdX01Fy9Sch4PnNAyd2tcqNmrBggXG9ki43SMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763044564; a=rsa-sha256; cv=none; b=dQwQ4i05geSja5z2arEbN4c3N6mavQ05hxOjYZsFsl2yOpH1IfwXcsbTPhgLJ2Nqt4lWO8 dlpaGXu4QFhUiRfdFwKw6v6uzzhqbPPUawhggrhAon5nqqZ8S+smmFHy94lh39+0nsAqHN NXy60OJvRPwnsM5MLsQxHI2hjHHJ5XXCnvu6y37fBjT9Jtne9TAMUmNpOxwmBaTyUex1+W pW3hbVamTa2Vlqfp4CxgI96UxFU3Xyz9Qddmhb+aXha8THJx0lj41v7oUGybfjFAtdNDiG YO7Y5pMJTCrpTQaF8i4h5wtXm5HjlVrdqLyXRQVfj2grMDzJz8ATuCzHjNph7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6jW84VfTz8YT; Thu, 13 Nov 2025 14:36: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 5ADEa463045691; Thu, 13 Nov 2025 14:36:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADEa4V8045688; Thu, 13 Nov 2025 14:36:04 GMT (envelope-from git) Date: Thu, 13 Nov 2025 14:36:04 GMT Message-Id: <202511131436.5ADEa4V8045688@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: 6b5431941c10 - main - sound: Remove unnecessary uio checks in dsp_io_ops() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 6b5431941c10b6fdf164ad9d3dfa4b4f1b2edc22 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6b5431941c10b6fdf164ad9d3dfa4b4f1b2edc22 commit 6b5431941c10b6fdf164ad9d3dfa4b4f1b2edc22 Author: Christos Margiolis AuthorDate: 2025-11-13 14:35:48 +0000 Commit: Christos Margiolis CommitDate: 2025-11-13 14:35:48 +0000 sound: Remove unnecessary uio checks in dsp_io_ops() uiomove_faultflag() takes care of that already. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D53733 --- sys/dev/sound/pcm/dsp.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 429586e64aef..f7188fd16356 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -467,10 +467,6 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) int prio, ret; pid_t runpid; - KASSERT(buf != NULL && - (buf->uio_rw == UIO_READ || buf->uio_rw == UIO_WRITE), - ("%s(): io train wreck!", __func__)); - d = priv->sc; if (!DSP_REGISTERED(d)) return (EBADF); @@ -488,9 +484,6 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) ch = &priv->wrch; chn_io = chn_write; break; - default: - panic("invalid/corrupted uio direction: %d", buf->uio_rw); - break; } runpid = buf->uio_td->td_proc->p_pid; From nobody Thu Nov 13 14:36:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6jW96c0mz6Gxvt; Thu, 13 Nov 2025 14:36: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6jW95ydVz3M4F; Thu, 13 Nov 2025 14:36:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763044565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BQYAu3MFJzEWhaPJRktfVyjNQ7ZZVWCNXmiM0uYxRwE=; b=wbYev/dGf7kud6raMtjEaWEQq4QWdbD0SVaeP0oQK/GF0y+mSjyObS07UlEhcqxhE1wSvm HihjPkE2KNKlMl+FIKXO23FUYjcwX8/MXlQAQ7Y/Gf/qhLk2amZovkvBHfQhvelPOdbrzB L6d9UnBqJYEyCBdq+1lg6q8zAPi69chmNyDz1uiIhXQOChYbmtfA/6z02Qiw1E05lfm0ao QocxlClsiSG3C5lMkm+drjLbppmHWuW2+7Z8Gr6M5zE+nH2pnAWEuPWXiVy2xOMNTO0g0Y r7XVSjlSHLJGq0c6Wviv4r6ksHBp+NBTWXCnHzJsplay+MP1XhGa3CQBQ0cNDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763044565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BQYAu3MFJzEWhaPJRktfVyjNQ7ZZVWCNXmiM0uYxRwE=; b=UsOPgBHSmyuyV4yzyq5wf5w71HQs0PpXu5Y0isLa/j2hT2dSwOA72tGApvOYrHPEPtRxvm JVzDQvHXvriKhI0H423QxrTaSmYlDKlfyx+8WtvHzDrMhX6ic5eMM+QIUfemlLjjcteqNQ AVINzmpIA7N0l42L4eFgd9+U0q+MBD9qF54dWL8ZOFfBLdTSMWpz/BXC3DFy6I7Mxv7DgJ tOp2rswPbyFt0IYZbBLjCkhVg5dnlOUZTtdxSSagwcBZHw1idtcgutCIxFVvflQsLCav2E rYuyex7YN0n/5dWF9sAfWPNqL+iDfVKwQwvm/a3vfp1WaRClzg3Zox0P3xyK4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763044565; a=rsa-sha256; cv=none; b=UxLhLGoS79IK95u54+mih5Cns+UUmLoAI+IZvkrcB/mA/8vcVk8udqSfTiqWlczkBonSao 4Pc6eN/wvGLsvPNZioTM61MTv+ldSLf0MlcwIJpDvr76b9PZNdanzePN+cTpGsIQKreVfV mjpB4KtvoWbLil9oQLpDU3wM/vzuuvsCYx5cKfI7UBoL0Re/WVT4h2q006V3A6qdBEBD1P BNmp9+XPV3wmM2ygW/3ffGPeLkKfjJb9vkGc9WiXhA31WAuNDd7aXIVnmtBPWtLnB2OLR5 a8vpy2wWht0LjPipMmf1aBVLFuAznuKC/vCgLFznZ3s1zgLqNhuapZQ59KlzNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6jW95RfGz97p; Thu, 13 Nov 2025 14:36: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 5ADEa5h9045724; Thu, 13 Nov 2025 14:36:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADEa5RN045721; Thu, 13 Nov 2025 14:36:05 GMT (envelope-from git) Date: Thu, 13 Nov 2025 14:36:05 GMT Message-Id: <202511131436.5ADEa5RN045721@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: fa7bc9830766 - main - sound: Do not use double pointer in dsp_io_ops() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: fa7bc983076661e85107970e39de66a1e54d87d1 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=fa7bc983076661e85107970e39de66a1e54d87d1 commit fa7bc983076661e85107970e39de66a1e54d87d1 Author: Christos Margiolis AuthorDate: 2025-11-13 14:35:53 +0000 Commit: Christos Margiolis CommitDate: 2025-11-13 14:35:53 +0000 sound: Do not use double pointer in dsp_io_ops() No reason to do so. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D53734 --- sys/dev/sound/pcm/dsp.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index f7188fd16356..1ae090f252c2 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -462,7 +462,7 @@ static __inline int dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) { struct snddev_info *d; - struct pcm_channel **ch; + struct pcm_channel *ch; int (*chn_io)(struct pcm_channel *, struct uio *); int prio, ret; pid_t runpid; @@ -476,12 +476,12 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) switch (buf->uio_rw) { case UIO_READ: prio = FREAD; - ch = &priv->rdch; + ch = priv->rdch; chn_io = chn_read; break; case UIO_WRITE: prio = FWRITE; - ch = &priv->wrch; + ch = priv->wrch; chn_io = chn_write; break; } @@ -490,21 +490,21 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) dsp_lock_chans(priv, prio); - if (*ch == NULL || !((*ch)->flags & CHN_F_BUSY)) { + if (ch == NULL || !(ch->flags & CHN_F_BUSY)) { if (priv->rdch != NULL || priv->wrch != NULL) dsp_unlock_chans(priv, prio); PCM_GIANT_EXIT(d); return (EBADF); } - if (((*ch)->flags & (CHN_F_MMAP | CHN_F_DEAD)) || - (((*ch)->flags & CHN_F_RUNNING) && (*ch)->pid != runpid)) { + if (ch->flags & (CHN_F_MMAP | CHN_F_DEAD) || + (ch->flags & CHN_F_RUNNING && ch->pid != runpid)) { dsp_unlock_chans(priv, prio); PCM_GIANT_EXIT(d); return (EINVAL); - } else if (!((*ch)->flags & CHN_F_RUNNING)) { - (*ch)->flags |= CHN_F_RUNNING; - (*ch)->pid = runpid; + } else if (!(ch->flags & CHN_F_RUNNING)) { + ch->flags |= CHN_F_RUNNING; + ch->pid = runpid; } /* @@ -512,11 +512,11 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) * from/to userland, so up the "in progress" counter to make sure * someone else doesn't come along and muss up the buffer. */ - ++(*ch)->inprog; - ret = chn_io(*ch, buf); - --(*ch)->inprog; + ch->inprog++; + ret = chn_io(ch, buf); + ch->inprog--; - CHN_BROADCAST(&(*ch)->cv); + CHN_BROADCAST(&ch->cv); dsp_unlock_chans(priv, prio); From nobody Thu Nov 13 14:36:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6jWC2Xp3z6Gxqp; Thu, 13 Nov 2025 14:36:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6jWB6dZCz3M77; Thu, 13 Nov 2025 14:36:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763044566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5ZVB5BjJhXG3N/AAARdYIUkXuZ9oJYwSe06Ogso6pI=; b=XLuIbri+9tnbbWuocz+jtjLBSpDESPTahXn5ykeUmjbtWSlrHu/nn9qiQoH4B5LlskBwoJ VXDAfjxB2ZAxonS4ACxltj74BUtWYfMiBqwAdN7X48jiL485bV6Dpb3QguSzlGpg1Kbe6g +uNTFbm5mAqXaaNr5wT7re58EFr2JAiDF0dt21fbCAaLkhDvPVE4JgVL3Y1226d/3PUnnY yL2s56Sm+0xMNQN21dQa6vUtT5PPR++xJBXdp0Uaw7/EGL+PRoyhar1euYw5tCrWX37BTr 08lp2UcJS6C6ysKtWPPJdqZqhXetvqCJEUj37sLRFW19dPg5O4GSO+oBGQf4pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763044566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5ZVB5BjJhXG3N/AAARdYIUkXuZ9oJYwSe06Ogso6pI=; b=cOdFCuTsG3cNrb9IqOICP/yJQhMl4CpJZhAGTa7AT7zDESvVkQfOdykAf+/el30l3QQVuc +0FPlR5CU1B5A2S5vawnc4MaUta6iXBHehSCg5lPSYp5BzYW3H+dGtG/215kb0A36kGkdO DPkJOlZhVZVI1ry9NwcmGElbxLWStSlkE7q02qX6EvYuOI9DeQvQSUG7nZ8CvnGmN4x8CH +PHxqnh/aJRxB7uyy5KXjU56YPrD4MIE6GeX26QgwH64OCaU4z+FfPHoWfs2DxlyhpGRyE gNzKmL+7A+AxnCblM/8a6/A4NwVOVKXjYoBPkLZfo2rb0t/JSzb57b7JE/Y8vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763044566; a=rsa-sha256; cv=none; b=KhxjMjAmr8lNdxuT/pt7s5GZGKGQlG1yC3fu1isEWv5WvH+5kJBMMG9RVaeQiICIeegxqR bQGEOLq3LeY2VoXpB+JOBs2N5fbFi6f8Fy0iIYZmMvvCvhjBSEgU9p2CiARgAasWw9OKFd cZG/t7p/RX3xIQUtArxQzr9M8oGAQAi7Z0wFgRsxdaDNwVAhFCMuoTIxJYNjPqEiwYAsfu ktIy+WlS325ciCEbDkgqNdrRzkD3LWFA+R9ruwGLNxoKn/M4EgVuJntBnGvfcYCsGfc4WG f9sN7O8vM5KvfSICQyTxijUIeJibgQ8/gBHLKIiOA9bm/IjZYm56UwCO7ktcdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6jWB64Wbz95Y; Thu, 13 Nov 2025 14:36: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 5ADEa6QE045757; Thu, 13 Nov 2025 14:36:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADEa6KT045754; Thu, 13 Nov 2025 14:36:06 GMT (envelope-from git) Date: Thu, 13 Nov 2025 14:36:06 GMT Message-Id: <202511131436.5ADEa6KT045754@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: b19e61f223a1 - main - sound: Retire SND_DIAGNOSTIC PCM locking 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b19e61f223a1982cce103b9716568391a071892a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b19e61f223a1982cce103b9716568391a071892a commit b19e61f223a1982cce103b9716568391a071892a Author: Christos Margiolis AuthorDate: 2025-11-13 14:35:58 +0000 Commit: Christos Margiolis CommitDate: 2025-11-13 14:35:58 +0000 sound: Retire SND_DIAGNOSTIC PCM locking macros Disabled by default, but also redundant, since most of the errors they catch will be caught anyway by WITNESS and the locking subsystem. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D53735 --- sys/dev/sound/pcm/sound.h | 103 ---------------------------------------------- 1 file changed, 103 deletions(-) diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index c5107d5fba1c..8542a96ccb14 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -251,108 +251,6 @@ int sound_oss_card_info(oss_card_info *); * For PCM_[WAIT | ACQUIRE | RELEASE], be sure to surround these * with PCM_LOCK/UNLOCK() sequence, or I'll come to gnaw upon you! */ -#ifdef SND_DIAGNOSTIC -#define PCM_WAIT(x) do { \ - if (!PCM_LOCKOWNED(x)) \ - panic("%s(%d): [PCM WAIT] Mutex not owned!", \ - __func__, __LINE__); \ - while ((x)->flags & SD_F_BUSY) { \ - if (snd_verbose > 3) \ - device_printf((x)->dev, \ - "%s(%d): [PCM WAIT] calling cv_wait().\n", \ - __func__, __LINE__); \ - cv_wait(&(x)->cv, (x)->lock); \ - } \ -} while (0) - -#define PCM_ACQUIRE(x) do { \ - if (!PCM_LOCKOWNED(x)) \ - panic("%s(%d): [PCM ACQUIRE] Mutex not owned!", \ - __func__, __LINE__); \ - if ((x)->flags & SD_F_BUSY) \ - panic("%s(%d): [PCM ACQUIRE] " \ - "Trying to acquire BUSY cv!", __func__, __LINE__); \ - (x)->flags |= SD_F_BUSY; \ -} while (0) - -#define PCM_RELEASE(x) do { \ - if (!PCM_LOCKOWNED(x)) \ - panic("%s(%d): [PCM RELEASE] Mutex not owned!", \ - __func__, __LINE__); \ - if ((x)->flags & SD_F_BUSY) { \ - (x)->flags &= ~SD_F_BUSY; \ - cv_broadcast(&(x)->cv); \ - } else \ - panic("%s(%d): [PCM RELEASE] Releasing non-BUSY cv!", \ - __func__, __LINE__); \ -} while (0) - -/* Quick version, for shorter path. */ -#define PCM_ACQUIRE_QUICK(x) do { \ - if (PCM_LOCKOWNED(x)) \ - panic("%s(%d): [PCM ACQUIRE QUICK] Mutex owned!", \ - __func__, __LINE__); \ - PCM_LOCK(x); \ - PCM_WAIT(x); \ - PCM_ACQUIRE(x); \ - PCM_UNLOCK(x); \ -} while (0) - -#define PCM_RELEASE_QUICK(x) do { \ - if (PCM_LOCKOWNED(x)) \ - panic("%s(%d): [PCM RELEASE QUICK] Mutex owned!", \ - __func__, __LINE__); \ - PCM_LOCK(x); \ - PCM_RELEASE(x); \ - PCM_UNLOCK(x); \ -} while (0) - -#define PCM_BUSYASSERT(x) do { \ - if (!((x) != NULL && ((x)->flags & SD_F_BUSY))) \ - panic("%s(%d): [PCM BUSYASSERT] " \ - "Failed, snddev_info=%p", __func__, __LINE__, x); \ -} while (0) - -#define PCM_GIANT_ENTER(x) do { \ - int _pcm_giant = 0; \ - if (PCM_LOCKOWNED(x)) \ - panic("%s(%d): [GIANT ENTER] PCM lock owned!", \ - __func__, __LINE__); \ - if (mtx_owned(&Giant) != 0 && snd_verbose > 3) \ - device_printf((x)->dev, \ - "%s(%d): [GIANT ENTER] Giant owned!\n", \ - __func__, __LINE__); \ - if (!((x)->flags & SD_F_MPSAFE) && mtx_owned(&Giant) == 0) \ - do { \ - mtx_lock(&Giant); \ - _pcm_giant = 1; \ - } while (0) - -#define PCM_GIANT_EXIT(x) do { \ - if (PCM_LOCKOWNED(x)) \ - panic("%s(%d): [GIANT EXIT] PCM lock owned!", \ - __func__, __LINE__); \ - if (!(_pcm_giant == 0 || _pcm_giant == 1)) \ - panic("%s(%d): [GIANT EXIT] _pcm_giant screwed!", \ - __func__, __LINE__); \ - if ((x)->flags & SD_F_MPSAFE) { \ - if (_pcm_giant == 1) \ - panic("%s(%d): [GIANT EXIT] MPSAFE Giant?", \ - __func__, __LINE__); \ - if (mtx_owned(&Giant) != 0 && snd_verbose > 3) \ - device_printf((x)->dev, \ - "%s(%d): [GIANT EXIT] Giant owned!\n", \ - __func__, __LINE__); \ - } \ - if (_pcm_giant != 0) { \ - if (mtx_owned(&Giant) == 0) \ - panic("%s(%d): [GIANT EXIT] Giant not owned!", \ - __func__, __LINE__); \ - _pcm_giant = 0; \ - mtx_unlock(&Giant); \ - } \ -} while (0) -#else /* !SND_DIAGNOSTIC */ #define PCM_WAIT(x) do { \ PCM_LOCKASSERT(x); \ while ((x)->flags & SD_F_BUSY) \ @@ -422,7 +320,6 @@ int sound_oss_card_info(oss_card_info *); mtx_unlock(&Giant); \ } \ } while (0) -#endif /* SND_DIAGNOSTIC */ #define PCM_GIANT_LEAVE(x) \ PCM_GIANT_EXIT(x); \ From nobody Thu Nov 13 14:58:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6k0q0skrz6H06w; Thu, 13 Nov 2025 14:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6k0p494pz3Qhq; Thu, 13 Nov 2025 14:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763045898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VdMwVgqtl0wMIBwPiOcTdswrBIOjW1e8PPIAY/eS8ZQ=; b=tuPadCbcezzdNU3zaDVxKrU2HEABC6zz8ZrLUcRMMBHx3OwFA3rHUKG6yyeROCrPyLTCed wAHIiqqad/uUxPN0cppce4nmH4SC6e0gGjcfP3woCCav0Xw3ZTq3zsEsoDFIiMPx2qJ3/t gYRzHQuiZ49/owra4L5nKE0Bi22+jgcuwcsPLKQA6840b96y9PAsTBssHeyqpb1250s6v6 Uk7kSeik2gx1JwYxoY5afLLcP60FbkwuC0I1h+vrXT0sV2HsBZuffP1A0JrZBHjz5FmL42 VD1ihdSzFU3w/wuQPiWV9YzyG+JcGZcN10XcKqYMe/vhEOuAHyXG1DdVc9wApg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763045898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VdMwVgqtl0wMIBwPiOcTdswrBIOjW1e8PPIAY/eS8ZQ=; b=gYK0BTgB0Zb6gR8quHxvGlS7g/Jc2XM2HEyKj48cobTtp7kWeoZIIJSKMx95sHBFz1grm6 BSMZ9KvIrOfCtz5CGLAgoawIZCC53Ke8OtctsvEQU7e92Xe/6kUQ3DubRKvYuNwYIIdYGd muH2/Ojz+vMzWD8VKGrU8UkFgcoT2SUE6DfdD+/ZDNWhPxoksCkC6lzqgWYd5QoK1dzOB3 ahUZUYVfPemThDu0HeH0yH9Oo04KEfWEZrAV/grYI80iecrMxDIoDS7WOgAzYny9CHmzoZ iJ03gO3vxV+Kyxhc67djOItbQtYmTuf83gCdgBD2udYBjs0ufeM8KGv1e8207A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763045898; a=rsa-sha256; cv=none; b=tTfgHYFqSZh+j6v9zpSq7ks+zGDIdsIAqc/6TgxrQXBlmzMg0wCHMYmF1yDFN6o/cb/Phz 6AzRj06ydaD+rS3cESiLQUQkYyO81yEz4q+iL5ke3U3ANA8EY+6DAxy0ikh3tRhKBWpkE1 lVPdfQOY3BMxCALE/vXEUfGA4CSH/YnrfXH6KgtIY4VvkPSgVo6puNoJTZYhZZ9Xc33/Lo 944LQ/bmPAm/R3lgv5kNysArlTpufqxoekT7Wfx6rrn9pIl5k5mtj3p+OZulxh6BAj/KO7 /0sLNbzL8guvfEXtBRJiBwdD3Fhcde/zuKl5AzZ39rJ8xemCRGjzCtHREuxWBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6k0p3QcBz9M6; Thu, 13 Nov 2025 14:58: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 5ADEwIxX082970; Thu, 13 Nov 2025 14:58:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADEwIdX082967; Thu, 13 Nov 2025 14:58:18 GMT (envelope-from git) Date: Thu, 13 Nov 2025 14:58:18 GMT Message-Id: <202511131458.5ADEwIdX082967@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: 587490dabc64 - main - arm64: Fix calculating kernel size for preload metadata List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 587490dabc649b58f0c7966e749aa80a0f16796b Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=587490dabc649b58f0c7966e749aa80a0f16796b commit 587490dabc649b58f0c7966e749aa80a0f16796b Author: Hesham Almatary AuthorDate: 2025-11-13 14:57:54 +0000 Commit: John Baldwin CommitDate: 2025-11-13 14:57:54 +0000 arm64: Fix calculating kernel size for preload metadata Cast &end to vm_offset_t before subtracting VM_MIN_KERNEL_ADDRESS to ensure the resulting size is correct for PRELOAD_PUSH_VALUE. Previously the correct size was effectively divided by sizeof(void *). Reviewed by: andrew Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D53699 --- sys/arm64/arm64/machdep_boot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/machdep_boot.c b/sys/arm64/arm64/machdep_boot.c index 83bd74ea7317..1c5e8189e436 100644 --- a/sys/arm64/arm64/machdep_boot.c +++ b/sys/arm64/arm64/machdep_boot.c @@ -106,7 +106,8 @@ fake_preload_metadata(void *dtb_ptr, size_t dtb_size) PRELOAD_PUSH_VALUE(uint32_t, MODINFO_SIZE); PRELOAD_PUSH_VALUE(uint32_t, sizeof(size_t)); - PRELOAD_PUSH_VALUE(uint64_t, (size_t)(&end - VM_MIN_KERNEL_ADDRESS)); + PRELOAD_PUSH_VALUE(uint64_t, + (size_t)((vm_offset_t)&end - VM_MIN_KERNEL_ADDRESS)); if (dtb_ptr != NULL) { /* Copy DTB to KVA space and insert it into module chain. */ From nobody Thu Nov 13 19:27:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6qzg0sy3z6HKBV; Thu, 13 Nov 2025 19:27: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6qzg0Xyyz40FP; Thu, 13 Nov 2025 19:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763062063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL5UgaQnxRUIDMIEDyf4nUB6WkwwghuF8FacS0R9tMI=; b=wznxuGpjqaPHbFOLUcqfNDltNPG7vYBic8IHjBr1swQHTMHs47XptvWu4UhDJ5y9hyjVDQ ODZko4NBqHEAEAVK8Adj/egyOTpSVxpCM91iQcktTvLETrWJdrG8MwEYy2oHb92APZnAeJ KOisVifd0D/SJO7D9monrN0YdmERNdPGomK5Gd/oVogkQiVcdYf0seYVDVH9SOlWp1RYh2 1HY/9haWEoIRmOlG6XwGoHr5clBPt4HIPx1idHf52n2C60JhMuH83jKa7RJJwq3Om2BVr/ ZbZg6ga67rSqI1nvA6mtqKKrX0JgJuvdTs1V4UFuM91K09voFZfqf+1xEAev9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763062063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL5UgaQnxRUIDMIEDyf4nUB6WkwwghuF8FacS0R9tMI=; b=IscUdfr0k4/UwZS86hL9fi1j02RK/7O4/1T1WlljJRoG0RySPuXgZrPtbq0UAeKjf1LNGb N3nTNOzrfYXTAYxDRYZ9LI0fVDLfQIs8N08CutlvtKXBefNi3JSbiq/TBRkoGmRzl4ZzcY pDIAz3R6cHyziMHTXFZASCkzDCm6fMjmAZUFGzjNbNYPE1dksk8nFQgGysnagf/A7TDJEI IZV8602ms47jFZkPXwzOlfu6hKxOw+/Z2fNqga0imTLMhzqMF51+L3ccqkMVeGgx6lEGQz BjMC5k28L/dVcaR7Dgnagi7OeGip6E2AiMxAow5pSCK+bKdjZa7Zj8yWSddekw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763062063; a=rsa-sha256; cv=none; b=U4vhAh7UoqJ1fMEyq2fbVL7g1BoG1NFWbbRhmJyO2CloGalycANFIe2c9jcvBvuh2b0Anx YQkXGp0IbZCvz8Cfpdd5dP+se0YwdNOmLeJPjhHu7kIKDMUSXE0fjQcqmoQcdAzSgViF9i RwkK+lDhWQa+jVEUUBB1PlV+6+6syOd3QLNjxrGTvO3j4Vk13iSRqhRCk3AelV0+1DCkC6 5aTXYvjc3zGN37CTBz6hULIrCRfkyfJ38Lnoppi8tg3cqiloKeck6CF99WVxjpGnSD/5AZ 0j3bmLo3PeZFEnhd0H6LhgoiCLFcioulB0L0YvVtf1GKh3dCx0Ape35W9cp8kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6qzf71GJzZwx; Thu, 13 Nov 2025 19:27: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 5ADJRgLH090930; Thu, 13 Nov 2025 19:27:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADJRgtE090927; Thu, 13 Nov 2025 19:27:42 GMT (envelope-from git) Date: Thu, 13 Nov 2025 19:27:42 GMT Message-Id: <202511131927.5ADJRgtE090927@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: 7b80c8b7d8d9 - main - cxgbe(4): Expanded interrupt handling for T7 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 7b80c8b7d8d9a4a634c5fd5334a9fe40f9ca0b3b Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=7b80c8b7d8d9a4a634c5fd5334a9fe40f9ca0b3b commit 7b80c8b7d8d9a4a634c5fd5334a9fe40f9ca0b3b Author: Navdeep Parhar AuthorDate: 2025-11-12 01:27:40 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-13 19:11:58 +0000 cxgbe(4): Expanded interrupt handling for T7 - Catch up with the new cause/perr registers. The high level approach is the same but the T7 has an extra top level INT_CAUSE concentrator and a PERR_CAUSE concentrator with a changed layout. - Add various flags to control the interrupt handlers' behavior. - Implement a t4_intr_clear that internally use the slow handler as an iterator over known cause/perr registers. This lets the driver clear all of the interrupt sources that it knows about. The firmware sets up the interrupt enables and clears the causes normally so this call should be redundant. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 12 +- sys/dev/cxgbe/common/common.h | 3 +- sys/dev/cxgbe/common/t4_hw.c | 1486 +++++++++++++++++++++++++++++++++-------- sys/dev/cxgbe/t4_main.c | 9 +- sys/dev/cxgbe/t4_sge.c | 3 +- 5 files changed, 1214 insertions(+), 299 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 0946c3110817..38875b535067 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -184,7 +184,16 @@ enum { DF_LOAD_FW_ANYTIME = (1 << 1), /* Allow LOAD_FW after init */ DF_DISABLE_TCB_CACHE = (1 << 2), /* Disable TCB cache (T6+) */ DF_DISABLE_CFG_RETRY = (1 << 3), /* Disable fallback config */ - DF_VERBOSE_SLOWINTR = (1 << 4), /* Chatty slow intr handler */ + + /* adapter intr handler flags */ + IHF_INTR_CLEAR_ON_INIT = (1 << 0), /* Driver calls t4_intr_clear */ + IHF_NO_SHOW = (1 << 1), /* Do not display intr info */ + IHF_VERBOSE = (1 << 2), /* Display extra intr info */ + IHF_FATAL_IFF_ENABLED = (1 << 3), /* Fatal only if enabled */ + IHF_IGNORE_IF_DISABLED = (1 << 4), /* Ignore if disabled */ + IHF_CLR_ALL_SET = (1 << 5), /* Clear all set bits */ + IHF_CLR_ALL_UNIGNORED = (1 << 6), /* Clear all unignored bits */ + IHF_RUN_ALL_ACTIONS = (1 << 7), /* As if all cause are set */ }; #define IS_DETACHING(vi) ((vi)->flags & VI_DETACHING) @@ -1027,6 +1036,7 @@ struct adapter { int flags; int debug_flags; int error_flags; /* Used by error handler and live reset. */ + int intr_flags; /* Used by interrupt setup/handlers. */ char ifp_lockname[16]; struct mtx ifp_lock; diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index 6b36832a7464..2033967ffb94 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -684,9 +684,10 @@ u32 t4_hw_pci_read_cfg4(adapter_t *adapter, int reg); struct fw_filter_wr; +void t4_intr_clear(struct adapter *adapter); void t4_intr_enable(struct adapter *adapter); void t4_intr_disable(struct adapter *adapter); -bool t4_slow_intr_handler(struct adapter *adapter, bool verbose); +bool t4_slow_intr_handler(struct adapter *adapter, int flags); int t4_hash_mac_addr(const u8 *addr); int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port, diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 1fd1c36c1f25..0f25c73b99d4 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -570,11 +570,11 @@ static int t4_edc_err_read(struct adapter *adap, int idx) edc_bist_status_rdata_reg = EDC_T5_REG(A_EDC_H_BIST_STATUS_RDATA, idx); CH_WARN(adap, - "edc%d err addr 0x%x: 0x%x.\n", + " edc%d err addr 0x%x: 0x%x.\n", idx, edc_ecc_err_addr_reg, t4_read_reg(adap, edc_ecc_err_addr_reg)); CH_WARN(adap, - "bist: 0x%x, status %llx %llx %llx %llx %llx %llx %llx %llx %llx.\n", + " bist: 0x%x, status %llx %llx %llx %llx %llx %llx %llx %llx %llx.\n", edc_bist_status_rdata_reg, (unsigned long long)t4_read_reg64(adap, edc_bist_status_rdata_reg), (unsigned long long)t4_read_reg64(adap, edc_bist_status_rdata_reg + 8), @@ -4777,10 +4777,9 @@ struct intr_details { struct intr_action { u32 mask; int arg; - bool (*action)(struct adapter *, int, bool); + bool (*action)(struct adapter *, int, int); }; -#define NONFATAL_IF_DISABLED 1 struct intr_info { const char *name; /* name of the INT_CAUSE register */ int cause_reg; /* INT_CAUSE register */ @@ -4803,73 +4802,78 @@ intr_alert_char(u32 cause, u32 enable, u32 fatal) } static void -t4_show_intr_info(struct adapter *adap, const struct intr_info *ii, u32 cause) +show_intr_info(struct adapter *sc, const struct intr_info *ii, uint32_t cause, + uint32_t ucause, uint32_t enabled, uint32_t fatal, int flags) { - u32 enable, fatal, leftover; + uint32_t leftover, msgbits; const struct intr_details *details; char alert; + const bool verbose = flags & IHF_VERBOSE; - enable = t4_read_reg(adap, ii->enable_reg); - if (ii->flags & NONFATAL_IF_DISABLED) - fatal = ii->fatal & t4_read_reg(adap, ii->enable_reg); - else - fatal = ii->fatal; - alert = intr_alert_char(cause, enable, fatal); - CH_ALERT(adap, "%c %s 0x%x = 0x%08x, E 0x%08x, F 0x%08x\n", - alert, ii->name, ii->cause_reg, cause, enable, fatal); + if (verbose || ucause != 0 || flags & IHF_RUN_ALL_ACTIONS) { + alert = intr_alert_char(cause, enabled, fatal); + CH_ALERT(sc, "%c %s 0x%x = 0x%08x, E 0x%08x, F 0x%08x\n", alert, + ii->name, ii->cause_reg, cause, enabled, fatal); + } - leftover = cause; + leftover = verbose ? cause : ucause; for (details = ii->details; details && details->mask != 0; details++) { - u32 msgbits = details->mask & cause; + msgbits = details->mask & leftover; if (msgbits == 0) continue; - alert = intr_alert_char(msgbits, enable, ii->fatal); - CH_ALERT(adap, " %c [0x%08x] %s\n", alert, msgbits, - details->msg); + alert = intr_alert_char(msgbits, enabled, fatal); + CH_ALERT(sc, " %c [0x%08x] %s\n", alert, msgbits, details->msg); leftover &= ~msgbits; } - if (leftover != 0 && leftover != cause) - CH_ALERT(adap, " ? [0x%08x]\n", leftover); + if (leftover != 0 && leftover != (verbose ? cause : ucause)) + CH_ALERT(sc, " ? [0x%08x]\n", leftover); } /* * Returns true for fatal error. */ static bool -t4_handle_intr(struct adapter *adap, const struct intr_info *ii, - u32 additional_cause, bool verbose) +t4_handle_intr(struct adapter *sc, const struct intr_info *ii, uint32_t acause, + int flags) { - u32 cause, fatal; + uint32_t cause, ucause, enabled, fatal; bool rc; const struct intr_action *action; - /* - * Read and display cause. Note that the top level PL_INT_CAUSE is a - * bit special and we need to completely ignore the bits that are not in - * PL_INT_ENABLE. - */ - cause = t4_read_reg(adap, ii->cause_reg); - if (ii->cause_reg == A_PL_INT_CAUSE) - cause &= t4_read_reg(adap, ii->enable_reg); - if (verbose || cause != 0) - t4_show_intr_info(adap, ii, cause); - fatal = cause & ii->fatal; - if (fatal != 0 && ii->flags & NONFATAL_IF_DISABLED) - fatal &= t4_read_reg(adap, ii->enable_reg); - cause |= additional_cause; - if (cause == 0) - return (false); + cause = t4_read_reg(sc, ii->cause_reg); + enabled = t4_read_reg(sc, ii->enable_reg); + flags |= ii->flags; + fatal = ii->fatal & cause; + if (flags & IHF_FATAL_IFF_ENABLED) + fatal &= enabled; + ucause = cause; + if (flags & IHF_IGNORE_IF_DISABLED) + ucause &= enabled; + if (!(flags & IHF_NO_SHOW)) + show_intr_info(sc, ii, cause, ucause, enabled, fatal, flags); rc = fatal != 0; for (action = ii->actions; action && action->mask != 0; action++) { - if (!(action->mask & cause)) + if (action->action == NULL) continue; - rc |= (action->action)(adap, action->arg, verbose); + if (action->mask & (ucause | acause) || + flags & IHF_RUN_ALL_ACTIONS) { + bool rc1 = (action->action)(sc, action->arg, flags); + if (action->mask & ucause) + rc |= rc1; + } } /* clear */ - t4_write_reg(adap, ii->cause_reg, cause); - (void)t4_read_reg(adap, ii->cause_reg); + if (cause != 0) { + if (flags & IHF_CLR_ALL_SET) { + t4_write_reg(sc, ii->cause_reg, cause); + (void)t4_read_reg(sc, ii->cause_reg); + } else if (ucause != 0 && flags & IHF_CLR_ALL_UNIGNORED) { + t4_write_reg(sc, ii->cause_reg, ucause); + (void)t4_read_reg(sc, ii->cause_reg); + } + } return (rc); } @@ -4877,7 +4881,7 @@ t4_handle_intr(struct adapter *adap, const struct intr_info *ii, /* * Interrupt handler for the PCIE module. */ -static bool pcie_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool pcie_intr_handler(struct adapter *adap, int arg, int flags) { static const struct intr_details sysbus_intr_details[] = { { F_RNPP, "RXNP array parity error" }, @@ -4990,21 +4994,43 @@ static bool pcie_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_PCIE_INT_CAUSE, .enable_reg = A_PCIE_INT_ENABLE, .fatal = 0xffffffff, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + struct intr_info pcie_int_cause_ext = { + .name = "PCIE_INT_CAUSE_EXT", + .cause_reg = A_PCIE_INT_CAUSE_EXT, + .enable_reg = A_PCIE_INT_ENABLE_EXT, + .fatal = 0, + .flags = 0, + .details = NULL, + .actions = NULL, + }; + struct intr_info pcie_int_cause_x8 = { + .name = "PCIE_INT_CAUSE_X8", + .cause_reg = A_PCIE_INT_CAUSE_X8, + .enable_reg = A_PCIE_INT_ENABLE_X8, + .fatal = 0, + .flags = 0, .details = NULL, .actions = NULL, }; bool fatal = false; if (is_t4(adap)) { - fatal |= t4_handle_intr(adap, &sysbus_intr_info, 0, verbose); - fatal |= t4_handle_intr(adap, &pcie_port_intr_info, 0, verbose); + fatal |= t4_handle_intr(adap, &sysbus_intr_info, 0, flags); + fatal |= t4_handle_intr(adap, &pcie_port_intr_info, 0, flags); pcie_intr_info.details = pcie_intr_details; } else { pcie_intr_info.details = t5_pcie_intr_details; } - fatal |= t4_handle_intr(adap, &pcie_intr_info, 0, verbose); + fatal |= t4_handle_intr(adap, &pcie_intr_info, 0, flags); + if (chip_id(adap) > CHELSIO_T6) { + fatal |= t4_handle_intr(adap, &pcie_int_cause_ext, 0, flags); + fatal |= t4_handle_intr(adap, &pcie_int_cause_x8, 0, flags); + } return (fatal); } @@ -5012,7 +5038,7 @@ static bool pcie_intr_handler(struct adapter *adap, int arg, bool verbose) /* * TP interrupt handler. */ -static bool tp_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool tp_intr_handler(struct adapter *adap, int arg, int flags) { static const struct intr_details tp_intr_details[] = { { 0x3fffffff, "TP parity error" }, @@ -5024,25 +5050,90 @@ static bool tp_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_TP_INT_CAUSE, .enable_reg = A_TP_INT_ENABLE, .fatal = 0x7fffffff, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = tp_intr_details, .actions = NULL, }; + static const struct intr_info tp_inic_perr_cause = { + .name = "TP_INIC_PERR_CAUSE", + .cause_reg = A_TP_INIC_PERR_CAUSE, + .enable_reg = A_TP_INIC_PERR_ENABLE, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info tp_c_perr_cause = { + .name = "TP_C_PERR_CAUSE", + .cause_reg = A_TP_C_PERR_CAUSE, + .enable_reg = A_TP_C_PERR_ENABLE, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info tp_e_eg_perr_cause = { + .name = "TP_E_EG_PERR_CAUSE", + .cause_reg = A_TP_E_EG_PERR_CAUSE, + .enable_reg = A_TP_E_EG_PERR_ENABLE, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info tp_e_in0_perr_cause = { + .name = "TP_E_IN0_PERR_CAUSE", + .cause_reg = A_TP_E_IN0_PERR_CAUSE, + .enable_reg = A_TP_E_IN0_PERR_ENABLE, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info tp_e_in1_perr_cause = { + .name = "TP_E_IN1_PERR_CAUSE", + .cause_reg = A_TP_E_IN1_PERR_CAUSE, + .enable_reg = A_TP_E_IN1_PERR_ENABLE, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info tp_o_perr_cause = { + .name = "TP_O_PERR_CAUSE", + .cause_reg = A_TP_O_PERR_CAUSE, + .enable_reg = A_TP_O_PERR_ENABLE, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + bool fatal; - return (t4_handle_intr(adap, &tp_intr_info, 0, verbose)); + fatal = t4_handle_intr(adap, &tp_intr_info, 0, flags); + if (chip_id(adap) > CHELSIO_T6) { + fatal |= t4_handle_intr(adap, &tp_inic_perr_cause, 0, flags); + fatal |= t4_handle_intr(adap, &tp_c_perr_cause, 0, flags); + fatal |= t4_handle_intr(adap, &tp_e_eg_perr_cause, 0, flags); + fatal |= t4_handle_intr(adap, &tp_e_in0_perr_cause, 0, flags); + fatal |= t4_handle_intr(adap, &tp_e_in1_perr_cause, 0, flags); + fatal |= t4_handle_intr(adap, &tp_o_perr_cause, 0, flags); + } + + return (fatal); } /* * SGE interrupt handler. */ -static bool sge_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool sge_intr_handler(struct adapter *adap, int arg, int flags) { static const struct intr_info sge_int1_info = { .name = "SGE_INT_CAUSE1", .cause_reg = A_SGE_INT_CAUSE1, .enable_reg = A_SGE_INT_ENABLE1, .fatal = 0xffffffff, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = NULL, .actions = NULL, }; @@ -5051,7 +5142,7 @@ static bool sge_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_SGE_INT_CAUSE2, .enable_reg = A_SGE_INT_ENABLE2, .fatal = 0xffffffff, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = NULL, .actions = NULL, }; @@ -5149,7 +5240,7 @@ static bool sge_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_SGE_INT_CAUSE5, .enable_reg = A_SGE_INT_ENABLE5, .fatal = 0xffffffff, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = NULL, .actions = NULL, }; @@ -5162,7 +5253,24 @@ static bool sge_intr_handler(struct adapter *adap, int arg, bool verbose) .details = NULL, .actions = NULL, }; - + static const struct intr_info sge_int7_info = { + .name = "SGE_INT_CAUSE7", + .cause_reg = A_SGE_INT_CAUSE7, + .enable_reg = A_SGE_INT_ENABLE7, + .fatal = 0, + .flags = 0, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info sge_int8_info = { + .name = "SGE_INT_CAUSE8", + .cause_reg = A_SGE_INT_CAUSE8, + .enable_reg = A_SGE_INT_ENABLE8, + .fatal = 0, + .flags = 0, + .details = NULL, + .actions = NULL, + }; bool fatal; u32 v; @@ -5173,14 +5281,18 @@ static bool sge_intr_handler(struct adapter *adap, int arg, bool verbose) } fatal = false; - fatal |= t4_handle_intr(adap, &sge_int1_info, 0, verbose); - fatal |= t4_handle_intr(adap, &sge_int2_info, 0, verbose); - fatal |= t4_handle_intr(adap, &sge_int3_info, 0, verbose); - fatal |= t4_handle_intr(adap, &sge_int4_info, 0, verbose); + fatal |= t4_handle_intr(adap, &sge_int1_info, 0, flags); + fatal |= t4_handle_intr(adap, &sge_int2_info, 0, flags); + fatal |= t4_handle_intr(adap, &sge_int3_info, 0, flags); + fatal |= t4_handle_intr(adap, &sge_int4_info, 0, flags); if (chip_id(adap) >= CHELSIO_T5) - fatal |= t4_handle_intr(adap, &sge_int5_info, 0, verbose); + fatal |= t4_handle_intr(adap, &sge_int5_info, 0, flags); if (chip_id(adap) >= CHELSIO_T6) - fatal |= t4_handle_intr(adap, &sge_int6_info, 0, verbose); + fatal |= t4_handle_intr(adap, &sge_int6_info, 0, flags); + if (chip_id(adap) >= CHELSIO_T7) { + fatal |= t4_handle_intr(adap, &sge_int7_info, 0, flags); + fatal |= t4_handle_intr(adap, &sge_int8_info, 0, flags); + } v = t4_read_reg(adap, A_SGE_ERROR_STATS); if (v & F_ERROR_QID_VALID) { @@ -5197,7 +5309,7 @@ static bool sge_intr_handler(struct adapter *adap, int arg, bool verbose) /* * CIM interrupt handler. */ -static bool cim_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool cim_intr_handler(struct adapter *adap, int arg, int flags) { static const struct intr_details cim_host_intr_details[] = { /* T6+ */ @@ -5242,7 +5354,7 @@ static bool cim_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_CIM_HOST_INT_CAUSE, .enable_reg = A_CIM_HOST_INT_ENABLE, .fatal = 0x007fffe6, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = cim_host_intr_details, .actions = NULL, }; @@ -5293,7 +5405,7 @@ static bool cim_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_CIM_HOST_UPACC_INT_CAUSE, .enable_reg = A_CIM_HOST_UPACC_INT_ENABLE, .fatal = 0x3fffeeff, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = cim_host_upacc_intr_details, .actions = NULL, }; @@ -5306,6 +5418,15 @@ static bool cim_intr_handler(struct adapter *adap, int arg, bool verbose) .details = NULL, .actions = NULL, }; + static const struct intr_info cim_perr_cause = { + .name = "CIM_PERR_CAUSE", + .cause_reg = A_CIM_PERR_CAUSE, + .enable_reg = A_CIM_PERR_ENABLE, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; u32 val, fw_err; bool fatal; @@ -5324,9 +5445,11 @@ static bool cim_intr_handler(struct adapter *adap, int arg, bool verbose) } fatal = (fw_err & F_PCIE_FW_ERR) != 0; - fatal |= t4_handle_intr(adap, &cim_host_intr_info, 0, verbose); - fatal |= t4_handle_intr(adap, &cim_host_upacc_intr_info, 0, verbose); - fatal |= t4_handle_intr(adap, &cim_pf_host_intr_info, 0, verbose); + fatal |= t4_handle_intr(adap, &cim_host_intr_info, 0, flags); + fatal |= t4_handle_intr(adap, &cim_host_upacc_intr_info, 0, flags); + fatal |= t4_handle_intr(adap, &cim_pf_host_intr_info, 0, flags); + if (chip_id(adap) > CHELSIO_T6) + fatal |= t4_handle_intr(adap, &cim_perr_cause, 0, flags); if (fatal) t4_os_cim_err(adap); @@ -5336,7 +5459,7 @@ static bool cim_intr_handler(struct adapter *adap, int arg, bool verbose) /* * ULP RX interrupt handler. */ -static bool ulprx_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool ulprx_intr_handler(struct adapter *adap, int arg, int flags) { static const struct intr_details ulprx_intr_details[] = { /* T5+ */ @@ -5354,7 +5477,7 @@ static bool ulprx_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_ULP_RX_INT_CAUSE, .enable_reg = A_ULP_RX_INT_ENABLE, .fatal = 0x07ffffff, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = ulprx_intr_details, .actions = NULL, }; @@ -5367,10 +5490,53 @@ static bool ulprx_intr_handler(struct adapter *adap, int arg, bool verbose) .details = NULL, .actions = NULL, }; + static const struct intr_info ulprx_int_cause_pcmd = { + .name = "ULP_RX_INT_CAUSE_PCMD", + .cause_reg = A_ULP_RX_INT_CAUSE_PCMD, + .enable_reg = A_ULP_RX_INT_ENABLE_PCMD, + .fatal = 0, + .flags = 0, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info ulprx_int_cause_data = { + .name = "ULP_RX_INT_CAUSE_DATA", + .cause_reg = A_ULP_RX_INT_CAUSE_DATA, + .enable_reg = A_ULP_RX_INT_ENABLE_DATA, + .fatal = 0, + .flags = 0, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info ulprx_int_cause_arb = { + .name = "ULP_RX_INT_CAUSE_ARB", + .cause_reg = A_ULP_RX_INT_CAUSE_ARB, + .enable_reg = A_ULP_RX_INT_ENABLE_ARB, + .fatal = 0, + .flags = 0, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info ulprx_int_cause_intf = { + .name = "ULP_RX_INT_CAUSE_INTERFACE", + .cause_reg = A_ULP_RX_INT_CAUSE_INTERFACE, + .enable_reg = A_ULP_RX_INT_ENABLE_INTERFACE, + .fatal = 0, + .flags = 0, + .details = NULL, + .actions = NULL, + }; bool fatal = false; - fatal |= t4_handle_intr(adap, &ulprx_intr_info, 0, verbose); - fatal |= t4_handle_intr(adap, &ulprx_intr2_info, 0, verbose); + fatal |= t4_handle_intr(adap, &ulprx_intr_info, 0, flags); + if (chip_id(adap) < CHELSIO_T7) + fatal |= t4_handle_intr(adap, &ulprx_intr2_info, 0, flags); + else { + fatal |= t4_handle_intr(adap, &ulprx_int_cause_pcmd, 0, flags); + fatal |= t4_handle_intr(adap, &ulprx_int_cause_data, 0, flags); + fatal |= t4_handle_intr(adap, &ulprx_int_cause_arb, 0, flags); + fatal |= t4_handle_intr(adap, &ulprx_int_cause_intf, 0, flags); + } return (fatal); } @@ -5378,7 +5544,7 @@ static bool ulprx_intr_handler(struct adapter *adap, int arg, bool verbose) /* * ULP TX interrupt handler. */ -static bool ulptx_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool ulptx_intr_handler(struct adapter *adap, int arg, int flags) { static const struct intr_details ulptx_intr_details[] = { { F_PBL_BOUND_ERR_CH3, "ULPTX channel 3 PBL out of bounds" }, @@ -5393,32 +5559,98 @@ static bool ulptx_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_ULP_TX_INT_CAUSE, .enable_reg = A_ULP_TX_INT_ENABLE, .fatal = 0x0fffffff, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = ulptx_intr_details, .actions = NULL, }; - static const struct intr_info ulptx_intr2_info = { + static const struct intr_info ulptx_intr_info2 = { .name = "ULP_TX_INT_CAUSE_2", .cause_reg = A_ULP_TX_INT_CAUSE_2, .enable_reg = A_ULP_TX_INT_ENABLE_2, - .fatal = 0xf0, - .flags = NONFATAL_IF_DISABLED, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info ulptx_intr_info3 = { + .name = "ULP_TX_INT_CAUSE_3", + .cause_reg = A_ULP_TX_INT_CAUSE_3, + .enable_reg = A_ULP_TX_INT_ENABLE_3, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info ulptx_intr_info4 = { + .name = "ULP_TX_INT_CAUSE_4", + .cause_reg = A_ULP_TX_INT_CAUSE_4, + .enable_reg = A_ULP_TX_INT_ENABLE_4, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info ulptx_intr_info5 = { + .name = "ULP_TX_INT_CAUSE_5", + .cause_reg = A_ULP_TX_INT_CAUSE_5, + .enable_reg = A_ULP_TX_INT_ENABLE_5, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info ulptx_intr_info6 = { + .name = "ULP_TX_INT_CAUSE_6", + .cause_reg = A_ULP_TX_INT_CAUSE_6, + .enable_reg = A_ULP_TX_INT_ENABLE_6, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info ulptx_intr_info7 = { + .name = "ULP_TX_INT_CAUSE_7", + .cause_reg = A_ULP_TX_INT_CAUSE_7, + .enable_reg = A_ULP_TX_INT_ENABLE_7, + .fatal = 0, + .flags = 0, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info ulptx_intr_info8 = { + .name = "ULP_TX_INT_CAUSE_8", + .cause_reg = A_ULP_TX_INT_CAUSE_8, + .enable_reg = A_ULP_TX_INT_ENABLE_8, + .fatal = 0, + .flags = 0, .details = NULL, .actions = NULL, }; bool fatal = false; - fatal |= t4_handle_intr(adap, &ulptx_intr_info, 0, verbose); - fatal |= t4_handle_intr(adap, &ulptx_intr2_info, 0, verbose); + fatal |= t4_handle_intr(adap, &ulptx_intr_info, 0, flags); + if (chip_id(adap) > CHELSIO_T4) + fatal |= t4_handle_intr(adap, &ulptx_intr_info2, 0, flags); + if (chip_id(adap) > CHELSIO_T6) { + fatal |= t4_handle_intr(adap, &ulptx_intr_info3, 0, flags); + fatal |= t4_handle_intr(adap, &ulptx_intr_info4, 0, flags); + fatal |= t4_handle_intr(adap, &ulptx_intr_info5, 0, flags); + fatal |= t4_handle_intr(adap, &ulptx_intr_info6, 0, flags); + fatal |= t4_handle_intr(adap, &ulptx_intr_info7, 0, flags); + fatal |= t4_handle_intr(adap, &ulptx_intr_info8, 0, flags); + } return (fatal); } -static bool pmtx_dump_dbg_stats(struct adapter *adap, int arg, bool verbose) +static bool pmtx_dump_dbg_stats(struct adapter *adap, int arg, int flags) { int i; u32 data[17]; + if (flags & IHF_NO_SHOW) + return (false); + t4_read_indirect(adap, A_PM_TX_DBG_CTRL, A_PM_TX_DBG_DATA, &data[0], ARRAY_SIZE(data), A_PM_TX_DBG_STAT0); for (i = 0; i < ARRAY_SIZE(data); i++) { @@ -5432,13 +5664,9 @@ static bool pmtx_dump_dbg_stats(struct adapter *adap, int arg, bool verbose) /* * PM TX interrupt handler. */ -static bool pmtx_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool pmtx_intr_handler(struct adapter *adap, int arg, int flags) { - static const struct intr_action pmtx_intr_actions[] = { - { 0xffffffff, 0, pmtx_dump_dbg_stats }, - { 0 }, - }; - static const struct intr_details pmtx_intr_details[] = { + static const struct intr_details pmtx_int_cause_fields[] = { { F_PCMD_LEN_OVFL0, "PMTX channel 0 pcmd too large" }, { F_PCMD_LEN_OVFL1, "PMTX channel 1 pcmd too large" }, { F_PCMD_LEN_OVFL2, "PMTX channel 2 pcmd too large" }, @@ -5455,25 +5683,29 @@ static bool pmtx_intr_handler(struct adapter *adap, int arg, bool verbose) { F_C_PCMD_PAR_ERROR, "PMTX c_pcmd parity error" }, { 0 } }; - static const struct intr_info pmtx_intr_info = { + static const struct intr_action pmtx_int_cause_actions[] = { + { 0xffffffff, -1, pmtx_dump_dbg_stats }, + { 0 }, + }; + static const struct intr_info pmtx_int_cause = { .name = "PM_TX_INT_CAUSE", .cause_reg = A_PM_TX_INT_CAUSE, .enable_reg = A_PM_TX_INT_ENABLE, .fatal = 0xffffffff, .flags = 0, - .details = pmtx_intr_details, - .actions = pmtx_intr_actions, + .details = pmtx_int_cause_fields, + .actions = pmtx_int_cause_actions, }; - return (t4_handle_intr(adap, &pmtx_intr_info, 0, verbose)); + return (t4_handle_intr(adap, &pmtx_int_cause, 0, flags)); } /* * PM RX interrupt handler. */ -static bool pmrx_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool pmrx_intr_handler(struct adapter *adap, int arg, int flags) { - static const struct intr_details pmrx_intr_details[] = { + static const struct intr_details pmrx_int_cause_fields[] = { /* T6+ */ { 0x18000000, "PMRX ospi overflow" }, { F_MA_INTF_SDC_ERR, "PMRX MA interface SDC parity error" }, @@ -5495,25 +5727,25 @@ static bool pmrx_intr_handler(struct adapter *adap, int arg, bool verbose) { F_E_PCMD_PAR_ERROR, "PMRX e_pcmd parity error"}, { 0 } }; - static const struct intr_info pmrx_intr_info = { + static const struct intr_info pmrx_int_cause = { .name = "PM_RX_INT_CAUSE", .cause_reg = A_PM_RX_INT_CAUSE, .enable_reg = A_PM_RX_INT_ENABLE, .fatal = 0x1fffffff, - .flags = NONFATAL_IF_DISABLED, - .details = pmrx_intr_details, + .flags = IHF_FATAL_IFF_ENABLED, + .details = pmrx_int_cause_fields, .actions = NULL, }; - return (t4_handle_intr(adap, &pmrx_intr_info, 0, verbose)); + return (t4_handle_intr(adap, &pmrx_int_cause, 0, flags)); } /* * CPL switch interrupt handler. */ -static bool cplsw_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool cplsw_intr_handler(struct adapter *adap, int arg, int flags) { - static const struct intr_details cplsw_intr_details[] = { + static const struct intr_details cplsw_int_cause_fields[] = { /* T5+ */ { F_PERR_CPL_128TO128_1, "CPLSW 128TO128 FIFO1 parity error" }, { F_PERR_CPL_128TO128_0, "CPLSW 128TO128 FIFO0 parity error" }, @@ -5527,17 +5759,17 @@ static bool cplsw_intr_handler(struct adapter *adap, int arg, bool verbose) { F_ZERO_SWITCH_ERROR, "CPLSW no-switch error" }, { 0 } }; - static const struct intr_info cplsw_intr_info = { + static const struct intr_info cplsw_int_cause = { .name = "CPL_INTR_CAUSE", .cause_reg = A_CPL_INTR_CAUSE, .enable_reg = A_CPL_INTR_ENABLE, - .fatal = 0xff, - .flags = NONFATAL_IF_DISABLED, - .details = cplsw_intr_details, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = cplsw_int_cause_fields, .actions = NULL, }; - return (t4_handle_intr(adap, &cplsw_intr_info, 0, verbose)); + return (t4_handle_intr(adap, &cplsw_int_cause, 0, flags)); } #define T4_LE_FATAL_MASK (F_PARITYERR | F_UNKNOWNCMD | F_REQQPARERR) @@ -5549,11 +5781,12 @@ static bool cplsw_intr_handler(struct adapter *adap, int arg, bool verbose) #define T6_LE_FATAL_MASK (T6_LE_PERRCRC_MASK | F_T6_UNKNOWNCMD | \ F_TCAMACCFAIL | F_HASHTBLACCFAIL | F_CMDTIDERR | F_CMDPRSRINTERR | \ F_TOTCNTERR | F_CLCAMFIFOERR | F_CLIPSUBERR) +#define T7_LE_FATAL_MASK (T6_LE_FATAL_MASK | F_CACHESRAMPERR | F_CACHEINTPERR) /* * LE interrupt handler. */ -static bool le_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool le_intr_handler(struct adapter *adap, int arg, int flags) { static const struct intr_details le_intr_details[] = { { F_REQQPARERR, "LE request queue parity error" }, @@ -5590,7 +5823,7 @@ static bool le_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_LE_DB_INT_CAUSE, .enable_reg = A_LE_DB_INT_ENABLE, .fatal = 0, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = NULL, .actions = NULL, }; @@ -5600,16 +5833,19 @@ static bool le_intr_handler(struct adapter *adap, int arg, bool verbose) le_intr_info.fatal = T5_LE_FATAL_MASK; } else { le_intr_info.details = t6_le_intr_details; - le_intr_info.fatal = T6_LE_FATAL_MASK; + if (chip_id(adap) < CHELSIO_T7) + le_intr_info.fatal = T6_LE_FATAL_MASK; + else + le_intr_info.fatal = T7_LE_FATAL_MASK; } - return (t4_handle_intr(adap, &le_intr_info, 0, verbose)); + return (t4_handle_intr(adap, &le_intr_info, 0, flags)); } /* * MPS interrupt handler. */ -static bool mps_intr_handler(struct adapter *adap, int arg, bool verbose) +static bool mps_intr_handler(struct adapter *adap, int arg, int flags) { static const struct intr_details mps_rx_perr_intr_details[] = { { 0xffffffff, "MPS Rx parity error" }, @@ -5620,10 +5856,55 @@ static bool mps_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_MPS_RX_PERR_INT_CAUSE, .enable_reg = A_MPS_RX_PERR_INT_ENABLE, .fatal = 0xffffffff, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = mps_rx_perr_intr_details, .actions = NULL, }; + static const struct intr_info mps_rx_perr_intr_info2 = { + .name = "MPS_RX_PERR_INT_CAUSE2", + .cause_reg = A_MPS_RX_PERR_INT_CAUSE2, + .enable_reg = A_MPS_RX_PERR_INT_ENABLE2, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info mps_rx_perr_intr_info3 = { + .name = "MPS_RX_PERR_INT_CAUSE3", + .cause_reg = A_MPS_RX_PERR_INT_CAUSE3, + .enable_reg = A_MPS_RX_PERR_INT_ENABLE3, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info mps_rx_perr_intr_info4 = { + .name = "MPS_RX_PERR_INT_CAUSE4", + .cause_reg = A_MPS_RX_PERR_INT_CAUSE4, + .enable_reg = A_MPS_RX_PERR_INT_ENABLE4, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info mps_rx_perr_intr_info5 = { + .name = "MPS_RX_PERR_INT_CAUSE5", + .cause_reg = A_MPS_RX_PERR_INT_CAUSE5, + .enable_reg = A_MPS_RX_PERR_INT_ENABLE5, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info mps_rx_perr_intr_info6 = { + .name = "MPS_RX_PERR_INT_CAUSE6", + .cause_reg = A_MPS_RX_PERR_INT_CAUSE6, + .enable_reg = A_MPS_RX_PERR_INT_ENABLE6, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; static const struct intr_details mps_tx_intr_details[] = { { F_PORTERR, "MPS Tx destination port is disabled" }, { F_FRMERR, "MPS Tx framing error" }, @@ -5640,10 +5921,37 @@ static bool mps_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_MPS_TX_INT_CAUSE, .enable_reg = A_MPS_TX_INT_ENABLE, .fatal = 0x1ffff, - .flags = NONFATAL_IF_DISABLED, + .flags = IHF_FATAL_IFF_ENABLED, .details = mps_tx_intr_details, .actions = NULL, }; + static const struct intr_info mps_tx_intr_info2 = { + .name = "MPS_TX_INT2_CAUSE", + .cause_reg = A_MPS_TX_INT2_CAUSE, + .enable_reg = A_MPS_TX_INT2_ENABLE, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info mps_tx_intr_info3 = { + .name = "MPS_TX_INT3_CAUSE", + .cause_reg = A_MPS_TX_INT3_CAUSE, + .enable_reg = A_MPS_TX_INT3_ENABLE, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; + static const struct intr_info mps_tx_intr_info4 = { + .name = "MPS_TX_INT4_CAUSE", + .cause_reg = A_MPS_TX_INT4_CAUSE, + .enable_reg = A_MPS_TX_INT4_ENABLE, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; static const struct intr_details mps_trc_intr_details[] = { { F_MISCPERR, "MPS TRC misc parity error" }, { V_PKTFIFO(M_PKTFIFO), "MPS TRC packet FIFO parity error" }, @@ -5660,14 +5968,23 @@ static bool mps_intr_handler(struct adapter *adap, int arg, bool verbose) .actions = NULL, }; static const struct intr_info t7_mps_trc_intr_info = { - .name = "T7_MPS_TRC_INT_CAUSE", + .name = "MPS_TRC_INT_CAUSE", .cause_reg = A_T7_MPS_TRC_INT_CAUSE, .enable_reg = A_T7_MPS_TRC_INT_ENABLE, - .fatal = F_MISCPERR | V_PKTFIFO(M_PKTFIFO) | V_FILTMEM(M_FILTMEM), - .flags = 0, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, .details = mps_trc_intr_details, .actions = NULL, }; + static const struct intr_info t7_mps_trc_intr_info2 = { + .name = "MPS_TRC_INT_CAUSE2", + .cause_reg = A_MPS_TRC_INT_CAUSE2, + .enable_reg = A_MPS_TRC_INT_ENABLE2, + .fatal = 0xffffffff, + .flags = IHF_FATAL_IFF_ENABLED, + .details = NULL, + .actions = NULL, + }; static const struct intr_details mps_stat_sram_intr_details[] = { { 0xffffffff, "MPS statistics SRAM parity error" }, { 0 } @@ -5677,7 +5994,7 @@ static bool mps_intr_handler(struct adapter *adap, int arg, bool verbose) .cause_reg = A_MPS_STAT_PERR_INT_CAUSE_SRAM, .enable_reg = A_MPS_STAT_PERR_INT_ENABLE_SRAM, .fatal = 0x1fffffff, *** 1291 LINES SKIPPED *** From nobody Thu Nov 13 20:38:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6sXs1jNzz6GB8p; Thu, 13 Nov 2025 20:38: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6sXs0zkvz4Ddc; Thu, 13 Nov 2025 20:38:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763066285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tMvY30nLpDp4LtvrFC9c7cLFJsazVyqPzrn5mBra3EA=; b=MRofXp2NQp0fKdr+GTd9aRmv/ps8S72yzf5pTfSEz0NVp10jhhT5EqWX/DpQ8tHjw+m7rZ fy83jYCEZcNJNiWZ6rH6+bitcEiE1bbU7jOuw90E/CGVDD53ntEZO21SCCTqu7SPbPLdUO pHhosCYm03a39TePTjv4RptZzNjlPC6g9ioObkeqmZqHMh9LOpeuHtVoOI8k9F85cmnnMD MWfKAGYuLctt5lHTZHNLDlERDbKxy//XXXmguKTqMHWpqBbWm5L7CjyXcH74hhAfqUknId LAhqjfn3Yy79vJb2XkdHAA4tKnQJ2sErQiXaoQSJAXZDmcLOqmZBBb70HPAzzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763066285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tMvY30nLpDp4LtvrFC9c7cLFJsazVyqPzrn5mBra3EA=; b=bFyHHcPbMJTrt4XyOWosHmMXt1BGHcXYkCfjEYt2ehdvV2pD0l/Ne/RrsR5R9fLswLabyt J8u7vbMe6QfxchJFCmqNIy5nGsvJ90Wr9axIlwa8b0CkYQErdYkjLL8toCw+cTvTBqZIA5 xMcGr95wz0/7A9gQaSKOqubM3PwvGZoNfJNzUAT9HneHsJiUPVGyZ6wAHdUQTO0LipvU4A XOougr2hOTsGhKkKuVBB0pqWQliyBQpoMBNddYj3Z6RbNx2HxqJa+UM0Q1/bDBRUHTO5Iv NqHaQr1Vgr2471ejic99zjIvoCrfbceorCTk/l+a316O5YyECTdUyIHhTHHQew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763066285; a=rsa-sha256; cv=none; b=YA32W7ppbrVHcFNFRJ9hyRhv39Qt3qrbNXRQelmoFewSHYpRncHNqIHmYT2VCy3SFoopJS NHGIb0jX8Er4IZelTwFMWG8TKnJ6BwAYnxi5WI2n7G5SvpBrxT9bC4b7mMidUXFYdWNLAM kjZVFQjfT9OA80+OvYdo2xBrLn3uMFoRHL5GlfJIDnp9QcAluLHoq67DGkCodHzGIF+6mm LKqyIVOIEb7WAilO90lrwq3bxZXTI9skl9TMJBQqcyDfh8NAoUIumWZbJGzHfbCMd69mzp z5O6emJBeKELbc/hfwhguSlcZfg77Etzmj7yIc5hVM/xTEYq+ksIfvBi42FLIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6sXs0SzmzcPg; Thu, 13 Nov 2025 20:38: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 5ADKc4ej022403; Thu, 13 Nov 2025 20:38:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADKc4P9022400; Thu, 13 Nov 2025 20:38:04 GMT (envelope-from git) Date: Thu, 13 Nov 2025 20:38:04 GMT Message-Id: <202511132038.5ADKc4P9022400@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: 3a572775bfc3 - main - drm2: update gone_in to 16 from 13 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a572775bfc3b1dc127e2db1a7c95ca776ff5245 Auto-Submitted: auto-generated The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=3a572775bfc3b1dc127e2db1a7c95ca776ff5245 commit 3a572775bfc3b1dc127e2db1a7c95ca776ff5245 Author: David E. O'Brien AuthorDate: 2025-11-13 20:37:19 +0000 Commit: David E. O'Brien CommitDate: 2025-11-13 20:37:19 +0000 drm2: update gone_in to 16 from 13 --- sys/dev/drm2/drm_os_freebsd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/drm2/drm_os_freebsd.h b/sys/dev/drm2/drm_os_freebsd.h index ec1042f8f0d4..ef417e950a62 100644 --- a/sys/dev/drm2/drm_os_freebsd.h +++ b/sys/dev/drm2/drm_os_freebsd.h @@ -158,7 +158,7 @@ typedef void irqreturn_t; #else #define DRM_MSG "WARNING! drm2 module is deprecated.\n" #endif -#define DRM_OBSOLETE(dev) gone_in_dev(dev, 13, DRM_MSG) +#define DRM_OBSOLETE(dev) gone_in_dev(dev, 16, DRM_MSG) #endif /* __arm__ */ /* DRM_READMEMORYBARRIER() prevents reordering of reads. From nobody Thu Nov 13 21:58:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6vKv3bDTz6GJJy; Thu, 13 Nov 2025 21:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6vKv2YrPz4M1y; Thu, 13 Nov 2025 21:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763071123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e6++dJAgBq8c+0//8tNb3GBV1efPFusasYvyU3x7mzM=; b=y0Bt4wRbyRQYScRxVZJpUzovFv34jicW4dPMl/XlzXpq6rmK32vU8yA0HD+85kStZVNsCh KfHfkFjj6kAkvcRTDf/qOlHt5RBtuEmD9nkuU+5suQskUpTr1wzOBADGU9oWlay3p4r07n ow0j1c2beQuN3miMq80ld+7ySQlTeAdPSR9Oi+wNwbBNNqsxRrqnj4F4UOHxeods+/zTAs OUUN+ly71X6pu96jbARIQXEjV5IoWV8OUxFEt2ArUFUFzM5HdolvLn3ZGwqvgjKBJ9d1bF T7hLYXNYenIVpTU1c/PGXjX3VvgY4ID00FB57QlFXC35osUUuIIuswgUzdOYvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763071123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e6++dJAgBq8c+0//8tNb3GBV1efPFusasYvyU3x7mzM=; b=bI+0D2SuEB/2B8b95f5raXclYVUOlV1n8B8M5SkNxeTruAJawpnS4FMQGwj5Eh5GyfSfMy 0jJolh1m5TowgAD5BP6lZeH7UMGFHWmKoO0fi6TCrlEpwX/nJxdF47SmEZkaC4o+i98UYm 8goNoqLZNJYOmkzAD5P5znPKVi0WkBjYRXkjq/ymBYzIIhYxcskrRZIj1Z4S6cp9Z/y0uX 5W+R46bDEnzvOu1iON72jhNYpRGKGROrsTnFC7mvoIkEKonpmshmh4L587+qgdFkMY66fw eGftjcuj8tuI3q/DfFKPrsQ0NvWRikF08GjM6JGaAFxhUZTUYO6bKVhKef5pxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763071123; a=rsa-sha256; cv=none; b=iMYi112WXTVN5bOH8hMknvKyaDKmkLg8nqnT/szh3K1ssmIk5u/hevZ+WStygU64BHO6Lk Psnun8AXZhGjT5q1vFNg4HOGyNDV0jVf8Zs9m2TCJytDOB/AMroIygHRabwzfyhKEjR4mT cCWQ8PyH9+XRc/Bqtr+TOTOjVVWwoL42jU16lmt8NhU+k23nkVLsDYGvPJExFWUGDzWT5U woni6qEqW1irHqPL9r3MiSXx63g2IR0gH9yOTNz1gt/pi13ebZL5GljudSCl7OFWr4gf9w 9s1NrUNtQ8q6GEJL1tdgbiVl9Pa4lBCIBfXklJYauN2PXgHiwv1NKqkrYiEkiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6vKv1qxNzfym; Thu, 13 Nov 2025 21:58: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 5ADLwhYx071905; Thu, 13 Nov 2025 21:58:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADLwhIh071902; Thu, 13 Nov 2025 21:58:43 GMT (envelope-from git) Date: Thu, 13 Nov 2025 21:58:43 GMT Message-Id: <202511132158.5ADLwhIh071902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: c56a26643467 - main - mlx5: Fix compilation error when not building with KERN_TLS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c56a266434678faf961d737714d47291b88a3f9e Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=c56a266434678faf961d737714d47291b88a3f9e commit c56a266434678faf961d737714d47291b88a3f9e Author: Andrew Gallatin AuthorDate: 2025-11-13 21:55:17 +0000 Commit: Andrew Gallatin CommitDate: 2025-11-13 21:57:10 +0000 mlx5: Fix compilation error when not building with KERN_TLS Reported by: np Fixes: 9349214a2815 mlx5: Preallocate ktls tags asynchronously Sponsored by: Netflix --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index ee9c53bb0a60..4658bebb7845 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -3335,8 +3335,10 @@ mlx5e_open_locked(if_t ifp) mlx5e_update_carrier(priv); +#ifdef KERN_TLS if ((if_getcapenable(ifp) & (IFCAP_TXTLS4 | IFCAP_TXTLS6)) != 0) mlx5e_tls_prealloc_tags(priv); +#endif return (0); From nobody Thu Nov 13 22:54:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6wYn4jMqz6GNkB; Thu, 13 Nov 2025 22:54: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6wYn3WDBz3Jl5; Thu, 13 Nov 2025 22:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763074445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r6V41xRzJUx8oNAKBg1uHVWOt2SeXWFMRCcIWYglIfI=; b=LtibMggE4GVwXriRzZfBPPFxeTkD8iJHDaM4HffeFvrXqr219FjlacUgXUttQs5E40ZBqy 1GpSHMrSR+xeHUuo+7hW2HovnORtICazhA0SNH7DiJYidFJQzCI9RZ43RHtf2rrhBVtCWs YRIS6WCmHQ9S50jSzVso36PA9LyaWNfHaPG0LEiGMtLSCpV8DxIAdiTiTVDTc9ztzS+H5m on9hb7VD8pTGnu+mzYUTq7xgPhCaEBLW3gM4Q9v567bA4Y6BF4Ob/wVL3MHwTCoDhHX9FM k+55MvX3+/qaeb9AvA7HFqq3zonUy5xGulDy4fKDEQ9xYcR6+mEMv/xaN4UuyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763074445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r6V41xRzJUx8oNAKBg1uHVWOt2SeXWFMRCcIWYglIfI=; b=Inzyuc1PmcDfqCts448LjP8HepFMEYqo10EpfIlQg8IfV3F0u+2GmUftH8xH3beXZqFGVQ JGZZLycZdBJcLEHivM2TKA9FrYFyKKmqA9wpnNZIbHx03sMKIImub9xCroFsDPJmjS8h8n 5UPHx47WyeuiBXBFXv8WJKmqL4DyyUkF/6U8SryoN3459VQa5dnDbD2w11c6TqGgC40q48 nbXYdiC3ttZ5ifLHkZ7eGJIDgqHmxyEAk034TovIAxDCyYxibV20/3aAubOdZn18pp+9kv t21X1xIP+Pkx5YaVoeO/NADAeayBaQJa9hg4yreu3ib1GH2X3JfS4sFG9gz1hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763074445; a=rsa-sha256; cv=none; b=MjK2CPpBPIFDxVdljaEP67oa11kiBDtVXWp+cLzCgqK94l+esHgNV1sBOlpBPLjj+bhIv+ m4HVhGmN0pmG41unO9x7Uie0AQY0AX9wL9S8/FzN7U3mnQaF1rk+TMsNx4sgw3mv7WLVke UUFBi1qAowDCrbUfmDLb6x9RTiAHJPFColQUxeI37IUvzTjP4jHeKt+bhJA2Z4VBv60IqA F5a4I6n/jMYqVDEZxd2/icOAU4fIlOT/jvyEJTluXimxW1TZCdDZt5UVdkiL6SuQ1TAhCb r/FSD1AV76CD5iDdJUpfkQxqU3v368Y4GOQ0AnUtmQygx16FpVMg6CF7J7d1Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6wYn2wJ9zhVh; Thu, 13 Nov 2025 22:54: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 5ADMs5Hb083889; Thu, 13 Nov 2025 22:54:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADMs5tS083886; Thu, 13 Nov 2025 22:54:05 GMT (envelope-from git) Date: Thu, 13 Nov 2025 22:54:05 GMT Message-Id: <202511132254.5ADMs5tS083886@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: b676b5e5e07f - main - cxgbe(4): Skip non-existent blocks in the interrupt handler List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b676b5e5e07fde53e6dafd0fa6c360ca56ac7154 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=b676b5e5e07fde53e6dafd0fa6c360ca56ac7154 commit b676b5e5e07fde53e6dafd0fa6c360ca56ac7154 Author: Navdeep Parhar AuthorDate: 2025-11-13 21:14:01 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-13 22:49:16 +0000 cxgbe(4): Skip non-existent blocks in the interrupt handler Fixes: 7b80c8b7d8d9 cxgbe(4): Expanded interrupt handling for T7 MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/t4_hw.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 0f25c73b99d4..65292486cbc8 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -6134,8 +6134,11 @@ static bool mem_intr_handler(struct adapter *adap, int idx, int flags) fatal |= t4_handle_intr(adap, &ii, 0, flags); } break; - case MEM_MC1: i = 1; - /* fall through */ + case MEM_MC1: + if (is_t4(adap) || is_t6(adap)) + return (false); + i = 1; + /* fall through */ case MEM_MC0: snprintf(rname, sizeof(rname), "MC%u_INT_CAUSE", i); if (is_t4(adap)) { @@ -6387,6 +6390,9 @@ static bool mac_intr_handler(struct adapter *adap, int port, int flags) struct intr_info ii; bool fatal = false; + if (port > 1 && is_t6(adap)) + return (false); + if (is_t4(adap)) { snprintf(name, sizeof(name), "XGMAC_PORT%u_INT_CAUSE", port); ii.name = &name[0]; From nobody Thu Nov 13 23:58:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6y020C2Zz6GStm; Thu, 13 Nov 2025 23:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6y016pTBz3TYY; Thu, 13 Nov 2025 23:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763078306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Ba023WVbuzl1gxHtfXinWsUcw2CXcQ+unJhiKLVCGA=; b=i25FFjsGzs4SUXrBkLvIgfUh2GLTU5zzBcLtPmIskjYea/XPyG9qixVv6k+oqHTzJjHhOC pSu9qjZaTtLzcie/1Oo+oEW6MLaOP1nDFj0Loomyr9nXcKOL+h+5WzPj+xyqDjWsgapzBc /EwYquWDHoqscAj1CgMBSslU/lq7rk8o7CFS412LV2jZHjTw5fz00sLr9Ir99f527cjq9Y AjFxLCyEtLxjnmOT9Tx1BK3KFajb8jG8eY2D5ZhmVoSWmncI3t4pSi2sLPUXElIo09s3n2 afB2HGrmtAzcn8PgK0CauZDv//kCncXMGtOCerhMrQagTbLSgcyU9A6KM8NdYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763078306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Ba023WVbuzl1gxHtfXinWsUcw2CXcQ+unJhiKLVCGA=; b=N/T3mK1hrqcaC5j2fLHmg1Kh5M1y6b92YeLp2vxtllSryFKuz9k4iPcGve1WORKHLhAprH uOcBeSWMEn+N39qvO5qPbhZUYu/9AINiqFHlu0RpTqJ07HujPtO5GUVpToxYApE5SS4cXB WIye7RLHzE67beFZ/fNbQvrLNYxy72t3xtKka9BZQljnYPcnWcGa6FI6xj8aksqpk/pXeH 8j7s0inLyVPyqpOWNZTPNdJBpwjEHgaHnBayBjiCvY9rtrB9Q4GEa9RLUhEgCoVySs3Ww9 NcVa2GQjQfemJ2EbZ3zESN62s6Dl2EYKLef2+hq6Y/MLBoKebcVU48Poopy6Jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763078306; a=rsa-sha256; cv=none; b=akzlT64S6xWtplxCaYHsNOlgMpe3sYoFE3Lm9SHxiZ8bM79/Z3EJXYhCmrqKL0LP7sjogH /piSN2+1Lv4AXS4xLoQ6c9Jxt17ouKCY/YBkWYR7CGU78Ho+HWXkZvhqL8G60pjiEmi/1d 9Kbjex6YBH228HmUWuNQ981/i0xw5IX/Tuvnb2rcfWS7PUIamfI+xpf9yLNeCCpCrUO4k+ dt8aU3/MiLwajYAMDYwp0CQDZP+qvnWGajaM8ZQjX8Zw/QiPwKzFeuwQ8CobxVyaUUnTVW 4zBoAXF/i8PChBj3Uquc+04S5ULSoM2hsRq6sgPyQPrmQRzJVrT2X2j1/MHheQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6y016BBfzjWS; Thu, 13 Nov 2025 23:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5ADNwPnh098801; Thu, 13 Nov 2025 23:58:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADNwPAQ098798; Thu, 13 Nov 2025 23:58:25 GMT (envelope-from git) Date: Thu, 13 Nov 2025 23:58:25 GMT Message-Id: <202511132358.5ADNwPAQ098798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: c0c8d812b560 - main - hgame.4: Polish List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0c8d812b560a3e89656c026022a44631f88e233 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=c0c8d812b560a3e89656c026022a44631f88e233 commit c0c8d812b560a3e89656c026022a44631f88e233 Author: Alexander Ziaee AuthorDate: 2025-11-13 21:13:45 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-13 23:57:59 +0000 hgame.4: Polish Explain driver loading and application access in the body of the manual. Crossreference other game controller driver manuals, and devfs.rules to hint about how to configure application access. Add a common dongle to supported hardware. Add evdev a few places to make it really clear how it works. MFC after: immediately for inclusion in 15.0R Reviewed by: wulf Differential Revision: https://reviews.freebsd.org/D53290 --- share/man/man4/hgame.4 | 90 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 32 deletions(-) diff --git a/share/man/man4/hgame.4 b/share/man/man4/hgame.4 index 3309833c1720..f816d2a442d0 100644 --- a/share/man/man4/hgame.4 +++ b/share/man/man4/hgame.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Vladimir Kondratyev .\" .\" Redistribution and use in source and binary forms, with or without @@ -21,45 +24,62 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 14, 2020 +.Dd November 12, 2025 .Dt HGAME 4 .Os .Sh NAME .Nm hgame -.Nd Generic HID game controller (joystick/gamepad) driver +.Nd generic HID gamepad, joystick, and controller evdev driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device hgame" -.Cd "device hid" -.Cd "device hidbus" -.Cd "device hidmap" -.Cd "device evdev" -.Ed +.Cd device hgame +.Cd device hid +.Cd device hidbus +.Cd device hidmap +.Cd device evdev +.Pp +In +.Xr sysctl.conf 5 : +.Cd dev.hgame.X.debug .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +In .Xr loader.conf 5 : -.Bd -literal -offset indent -hgame_load="YES" -.Ed +.Cd hw.hid.hgame.debug +.Cd hgame_load .Sh DESCRIPTION The .Nm -driver provides support for generic game controllers (joysticks/gamepads) -that attach to the HID transport backend. -See -.Xr iichid 4 -or -.Xr usbhid 4 . +driver supports generic game controllers +that attach to the HID transport backend, +and presents them to applications over the +.Sy evdev +interface. .Pp -The +If the appropriate hardware is detected, +the driver will be loaded automatically by +.Xr devmatch 8 . +To load the driver manually at boot time, set the +.Va hgame_load +variable to +.Ar YES +at the +.Xr loader 8 +prompt, or add it to +.Xr loader.conf 5 . +.Pp +To give user applications access to the game controllers, +allow user access to the .Pa /dev/input/event* -device presents the game controller as a -.Ar evdev -type device. +nodes with +.Xr devfs.rules 5 . +.Sh HARDWARE +The +.Nm +driver supports HID gamepads, joysticks, and controllers such as: +.Pp +.Bl -bullet -compact +.It +8bitdo USB Wireless Adapter 2 +.El .Sh SYSCTL VARIABLES The following variable is available as both .Xr sysctl 8 @@ -68,8 +88,9 @@ variable and tunable: .Bl -tag -width indent .It Va dev.hgame.X.debug -Debug output level, where 0 is debugging disabled and larger values increase -debug message verbosity. +Debug output level, +where 0 is debugging disabled and +larger values increase debug message verbosity. Default is 0. .El .Pp @@ -80,13 +101,18 @@ tunable: .It Va hw.hid.hgame.debug .El .Sh FILES -.Bl -tag -width /dev/input/event* -compact +.Bl -tag -width "/dev/input/event*" -compact .It Pa /dev/input/event* -input event device node. +input event device +.Pq Sy evdev +node .El .Sh SEE ALSO .Xr iichid 4 , -.Xr usbhid 4 +.Xr ps4dshock 4 , +.Xr usbhid 4 , +.Xr xb360gp 4 , +.Xr devfs.rules 5 .Sh HISTORY The .Nm From nobody Thu Nov 13 23:58:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6y034BJVz6GStn; Thu, 13 Nov 2025 23:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6y031KHhz3Tqg; Thu, 13 Nov 2025 23:58:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763078307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pErevHLFVViqyxKtoW/XL3wDKh1vAMrPlO/QkskVcSY=; b=gW1K7tCcfUzIVmOE0VH+C1yBPFChNfeYiGSe71mOOABiRWhlc2WabTxfO5jmNLkIDuxj3L FIDEE/M+di/v9qlWlz/NiVcQJPTofBaqkQRHP2Wujd1d5WW5ZwdAQJs2aNlVROFdup/pSr oGkrqy0VE0zc/NRMU0FbX+DXUj8/TvQ0jOC9Zy5Z0qWPyQ5LHE1slHb0TQwcIHl02wUIc8 ou3GcNtjNmHjgiLew6XryWs1q6KYmCe4bNNkmBd8gxsQ5mSgmBX0ApRkRBhFbBUS5ZUbnn abp6yWReyDzqJmcgxvhQzlJOJmMGHYOrIRxSO0ZKYdBLty/aO25gKX7hIqQykQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763078307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pErevHLFVViqyxKtoW/XL3wDKh1vAMrPlO/QkskVcSY=; b=OjgO1xhrtzQ5gT7i/LpjfrCHGM1DXQlBHju0slKUwMI77WhjXDSlTPyxmx19IPwyys2BG2 tKqhUgWyCINsOGjd9qVsbwUMCoGskCGS+FAS1r78umYhsTojqtmNLeiZKPbCZlpEA6age3 TwQ1nbeWPuItVXJZ5o+2er0NewT7DulCF2DMFgIyBpxKF5I6tDpFkop/dum4Cbf/eVA2u5 m9OsX2UqogvDdKPTkeKrledxdYv/9DgYU8sjrrFhvY2VBxgD78hngADxyfSulA4EGtBGnv u/9+ZQFXTEmzucf57kqAT9Suy+Y//8Dy9gv+mMsVUAbcUrCEpiGHgizL4vNvAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763078307; a=rsa-sha256; cv=none; b=uOU+gm3X3rIY5MZ9kHbEG0jG3QdUZ6N9OuA4Mv/W7NDsVOmWXAHtcOm3HWI7AOzXeUwA5q SDciJpExWverRbxpXermrJtfV/y0MBGFu0I8d1mIwyz4YE9DnoXiu3imyr2HjU0MejxHes lIQl+UcUQFcxH1ORNVJC5VQrp3UMv349VQMZye6pRwhY8/aCWaErUI2sdRhjPChj0BUidW qWa1Q8luIN2KgT0PFUYZGjHZ+nVGeO3ZJcwQ8ojhXYKrPyaskLciY6k4OfeGmLvrGfKK0f y3MytlSoG6dPam8R6/ive8lkVFXawLqoDkpSrJJfef9RPtJZOs2265ukm8kevg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6y026mCRzk28; Thu, 13 Nov 2025 23:58: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 5ADNwQWJ098835; Thu, 13 Nov 2025 23:58:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADNwQnq098832; Thu, 13 Nov 2025 23:58:26 GMT (envelope-from git) Date: Thu, 13 Nov 2025 23:58:26 GMT Message-Id: <202511132358.5ADNwQnq098832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 477799750abd - main - jail.8: Add creating a jail from package base List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 477799750abd5702a02f7f8065e6235d7db75188 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=477799750abd5702a02f7f8065e6235d7db75188 commit 477799750abd5702a02f7f8065e6235d7db75188 Author: Alexander Ziaee AuthorDate: 2025-11-13 21:25:06 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-13 23:58:00 +0000 jail.8: Add creating a jail from package base MFC after: immediately for inclusion in 15.0R Reported by: ivy Differential Revision: https://reviews.freebsd.org/D53745 --- usr.sbin/jail/jail.8 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index 3a925bda8174..6098010ebbc4 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 6, 2025 +.Dd November 13, 2025 .Dt JAIL 8 .Os .Sh NAME @@ -1147,6 +1147,13 @@ D=/here/is/the/jail mkdir -p $D tar -xf /usr/freebsd-dist/base.txz -C $D --unlink .Ed +.Ss Setting up a Jail Directory Tree from System Packages +To set up a jail directory tree containing an selectable +.Fx +distribution with the packages tech preview, +the following command can be used: +.Pp +.Dl bsdinstall jail /here/is/the/jail .Pp In many cases these examples would put far more in the jail than needed. In the other extreme case a jail might contain only one file: From nobody Fri Nov 14 00:46:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6z3D0SlDz6GXch; Fri, 14 Nov 2025 00:46: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6z3C6syJz3dmK; Fri, 14 Nov 2025 00:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763081176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EjdMCp63JYCQerSGAH2OaLfdCz1rgvi0PiXgKGV6yjI=; b=vW2dD6FilJwH05xkr7WYpRVVd7UUbccS4ZLhJUS+HQyTUPelcZScxQ5lCMc3R3WVKDYqiE izcZZb2L61y48tyxFV833300iPdMvFy6Lf1s633RbJrOXQ/KZJkc8tWiSW85tpCJbx7Tla 1nqXxOQj0vspgixYr0WgNkBOp7kFZAujuah7R6mcpvrTGQyiMM3KlurCb/pLvrdTSSxo1i EpU2iy00hYkpHeP01YKax0C33ndo/W1DeW53cVTXX95Ti/FEVRmGGu/1VhrBSP15b5JIxC UUm+YSZSEYWuv+ZS6n/nFrgteY/J5Ssm82GgotNZmuLK+iTJhSCgvQ7KFR7qKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763081176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EjdMCp63JYCQerSGAH2OaLfdCz1rgvi0PiXgKGV6yjI=; b=cIAt2qNF8tZ32pXKWVMPk6IosuaNt72jqzE7JMrH03/LNa3dbyzwfOsv1R8WZG/Yh+aRHB TYemxzGR4mOqThiiSSFQ8kxoAHaFSFqe1/Ma+U8qEdiBFsJjbx4hvSiEWrOXZoa9OoH6+v vAhOq3o/uerWp4iHHAueLEY1khl/OsUok+QCbWKPG4itoSxnY2CXIWrGHagawCIWAyX/f2 7TnKJNPiKdMa4OLEaa1xz6b080i0Wr2iwiZXuXIO2uNF9BnicQNgnmLYwmmVIb+I3oxnxq jWCPg4tk7cG305B9H7Fje+wY0RSuYc1RweKhMtJHLLkppBbOaa84UKkHqA5RfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763081176; a=rsa-sha256; cv=none; b=yccz/D0vXwyOenVdsXl1mPcjxEpz3Qc9xJ9H9XNngPTBe6c9+ozNo/+g0WbAxCT0Tp9/sQ hUJcv97vw7lg++qV1e6bI1JEs5duJ+Ij3yyTVWwRPrKPQZgsvwiakGSlFA16k3xJMcvCB5 fYTt/qBryF+03f7izYpKxfpEf5vaMVZ5AJNvC2VZplINlw+RGw0p9xNvYfzjcs9s9u8Uil 5+L6GsYbaAA6l4/DwzqjCbhhb8iadI1nfy8YE8A2xqdCyO1h7LLkpZE2o7UkwyEc1NF9pY B9ZnGxtR91jgmTFz0UUTGNTjybb4etP8elLrrMTWqUQJbVNRLWqRB4T7//dKNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6z3C6T0lzl0D; Fri, 14 Nov 2025 00:46: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 5AE0kFlX092914; Fri, 14 Nov 2025 00:46:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE0kFJ3092911; Fri, 14 Nov 2025 00:46:15 GMT (envelope-from git) Date: Fri, 14 Nov 2025 00:46:15 GMT Message-Id: <202511140046.5AE0kFJ3092911@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: 9d9fa9a2c22f - main - unix: Fix handling of listening sockets during garbage collection List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 9d9fa9a2c22f67d5f8afec18106c9f0072d6b3d4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9d9fa9a2c22f67d5f8afec18106c9f0072d6b3d4 commit 9d9fa9a2c22f67d5f8afec18106c9f0072d6b3d4 Author: Mark Johnston AuthorDate: 2025-11-13 22:56:15 +0000 Commit: Mark Johnston CommitDate: 2025-11-14 00:43:38 +0000 unix: Fix handling of listening sockets during garbage collection socantrcvmore() and unp_dispose() assume that the socket's socket buffers are initialized, which isn't the case for listening sockets. Reported by: syzbot+a62883292a5c257703be@syzkaller.appspotmail.com MFC after: 1 week Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D53743 --- sys/kern/uipc_usrreq.c | 10 ++++++---- tests/sys/kern/unix_passfd_test.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 807271488af2..8c9fa4c012e4 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -4208,10 +4208,12 @@ unp_gc(__unused void *arg, int pending) struct socket *so; so = unref[i]->f_data; - CURVNET_SET(so->so_vnet); - socantrcvmore(so); - unp_dispose(so); - CURVNET_RESTORE(); + if (!SOLISTENING(so)) { + CURVNET_SET(so->so_vnet); + socantrcvmore(so); + unp_dispose(so); + CURVNET_RESTORE(); + } } /* diff --git a/tests/sys/kern/unix_passfd_test.c b/tests/sys/kern/unix_passfd_test.c index 7dc4541ad402..66bb406ea14e 100644 --- a/tests/sys/kern/unix_passfd_test.c +++ b/tests/sys/kern/unix_passfd_test.c @@ -1189,6 +1189,34 @@ ATF_TC_CLEANUP(cross_jail_dirfd, tc) err(1, "jail_remove"); } +ATF_TC_WITHOUT_HEAD(listening_socket); +ATF_TC_BODY(listening_socket, tc) +{ + struct sockaddr_un sun; + int error, ls, s[2]; + + ls = socket(AF_UNIX, SOCK_STREAM, 0); + ATF_REQUIRE(ls != -1); + + memset(&sun, 0, sizeof(sun)); + sun.sun_len = sizeof(sun); + sun.sun_family = AF_UNIX; + snprintf(sun.sun_path, sizeof(sun.sun_path), "listen.sock"); + error = bind(ls, (struct sockaddr *)&sun, sizeof(sun)); + ATF_REQUIRE_MSG(error == 0, "bind failed: %s", strerror(errno)); + error = listen(ls, 0); + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, s); + ATF_REQUIRE_MSG(error == 0, "socketpair failed: %s", strerror(errno)); + + sendfd(s[0], ls); + sendfd(s[0], s[0]); + sendfd(s[0], s[1]); + close(ls); + close(s[0]); + close(s[1]); +} + ATF_TP_ADD_TCS(tp) { @@ -1211,6 +1239,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, empty_rights_message); ATF_TP_ADD_TC(tp, control_creates_records); ATF_TP_ADD_TC(tp, cross_jail_dirfd); + ATF_TP_ADD_TC(tp, listening_socket); return (atf_no_error()); } From nobody Fri Nov 14 00:46:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6z3F1bB6z6GXhY; Fri, 14 Nov 2025 00:46: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6z3F0wv4z3dpZ; Fri, 14 Nov 2025 00:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763081177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fejBfEz9eKaVwkgI0jHuMnbBNFcuresv6zWPanPc/I8=; b=A8yJ0hG6K79EfgcVP6sDBHzL2JWaS5XktaVnUOqJOfr98M+8SdlsAtZUb057GhP8DTeoo0 J0HcRitXpfbtom38alll9rzdnBE/2DxIwblntGjIhu6pyVg7+S89roBOWs9AmD2jm9WfR3 xwNuxrLiD3yIyM4EqB6ypa0sawIEbJrjZ7bZjO3ohy3Mls0olLTD0xDcVs7SCZS36JG8f4 gj3+9uySnVj3PIcLG1xyRa9+XPbwYLKzkdTSyNXxqErA6sDUiVSJEgkKJduB1l4dNYJ8NL GR+Iv2NR2OWVYteAMRndGIGeQlQO9brIzvuf5cU1yZhbytOoZvOlNOK3JKBfig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763081177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fejBfEz9eKaVwkgI0jHuMnbBNFcuresv6zWPanPc/I8=; b=DSLvILitRfnlypU5oR187WL40zbNjjErEZnKfvOlQUR42L1tPvo4+YX+34Tly2QCeegQRY UsqC1XRmE2LJduVyzxMmxvSImu522DV4UAe2S1Dmzv1gccR90p1WSSowS/YD3UckiE6Ro5 r22t6CjglGxZUfYvgr5tvifM2z59NQmRXpoAveG0brwA3hD9wVuyWONi+6w2ZIgpjTJdNA uuTSi3QQtrQK1/qipg5GcMIXHHPe+tsaSQmgDEBMlWfLRuaYDskzstVt5ghNS8fmjFkQMJ PgSqHk/AIPopPFjSxLq/R5+sBCH3WzSvw9XVZ80K6o8IOQYxqour6/yvcpENbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763081177; a=rsa-sha256; cv=none; b=vGulRNjPVrig9eHT0UNw5r5oMAa+SndXWUtqupCG6M4sju3hiGcgVOe76j6QeNSeOjd89F QKyD9qfrgaBsvEhHUsuGjOG6ux6ZCUR61lVVG5wdf0AyuQm9+t5OEDr7fuCaY3JtduDQOt FEH30NPYRrArEfNzENN+BZt3UiOszKSNpLq5/Sb/ah2AtKoa4WXgtg8kFGh6+7w4ZMHRMq woCtv60Taj7e/IK7AtTt05ySgeZ3i6s/3F8vuRWhFS6pu0HIr3E10U6f+XyE2/rXGYe+Pi YAKqKrCFWIVKjkGp5qDbcqeaULg1Y0Y7wN17t+idHbVuNX1NV+lN4olLpx03Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6z3F0J4lzlJL; Fri, 14 Nov 2025 00:46: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 5AE0kGnp092946; Fri, 14 Nov 2025 00:46:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE0kGf3092943; Fri, 14 Nov 2025 00:46:16 GMT (envelope-from git) Date: Fri, 14 Nov 2025 00:46:16 GMT Message-Id: <202511140046.5AE0kGf3092943@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: ce5692bf009e - main - unix: Remove an always-false null pointer 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce5692bf009ed5607d3b880eec4055697479c13d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ce5692bf009ed5607d3b880eec4055697479c13d commit ce5692bf009ed5607d3b880eec4055697479c13d Author: Mark Johnston AuthorDate: 2025-11-13 22:57:35 +0000 Commit: Mark Johnston CommitDate: 2025-11-14 00:43:38 +0000 unix: Remove an always-false null pointer check No functional change intended. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53453 --- sys/kern/uipc_usrreq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 8c9fa4c012e4..86e1694fb869 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -3216,11 +3216,9 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2) #endif LIST_REMOVE(unp, unp_reflink); UNP_REF_LIST_UNLOCK(); - if (so) { - SOCK_LOCK(so); - so->so_state &= ~SS_ISCONNECTED; - SOCK_UNLOCK(so); - } + SOCK_LOCK(so); + so->so_state &= ~SS_ISCONNECTED; + SOCK_UNLOCK(so); break; case SOCK_STREAM: From nobody Fri Nov 14 01:03:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d6zQz1pNRz6GZ4Y; Fri, 14 Nov 2025 01:03: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d6zQz1FRHz3k3q; Fri, 14 Nov 2025 01:03:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763082203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejS0muBbhWWP5omxMIUi2WfSJUapONMFpT/rAdBClAo=; b=Nh03b8PapxCOEuhGxqktHKfxPGtN5i78z88MvnfQkHcax3/EM3hFYe0yQtHLIrFa2ocxSy gTkTR50cch5Z6zNWMd+lpxnl6F/Mu5+6Yg1Uyh4GAIKC0m7S7YCukoyQJdlpMN2sfXpMCb 3ij0+Pf5YNLNrVxY2Ix7Q/bFzZz5hSOsCPLQE6LsPijDo/b0VRXIg/eJZ85QXTrdqnBmC7 QOJnTWPhe2f8zKIjXmaESkMfj+UbTlrSzb4WjXvpEndjdfFS+EMkgjBCyy6wlTtF/ww/Ff rwIMxrr4ND+H23lAwtfyt+jfhhqq8q3czSq9pGTm6id0RteYuFm35L2Da7mEhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763082203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejS0muBbhWWP5omxMIUi2WfSJUapONMFpT/rAdBClAo=; b=TPhjt+uJQxW14CASiO4PyajVC2rH0ASvaIHeEyAwAwF8Qt3woSwHIey1c+e3xAhR5EQ/YJ imeHEx6ikX9fC/xVNSVfuO6KnDqw3tnCRaChOcN948yyKHyon20OvNub1kMO2JnRCGR/VP eNFtbrXCAuY7bkBpKfCOt7ZvnX8ynPamH0cEz9dnTaSAMp6T/BZwzA6U/pkmyw6ws8pDfb tGOKDXvP/1+GYvnYOQ+kFTNLWbP2BoKHsF5SBAx7fWsnotg6nCTwGYEZSnZM4FpeJAdDGK figIrkM0EElRnW3yIT3sIo3btp14L3cxvCGLj7LccMBD/cHtidcihUBeS82JyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763082203; a=rsa-sha256; cv=none; b=eglfhBYDsrivwhcauDcdD+6T4E4NHTFvnnrfJdl8+mDmf895gaC69ByYmzK2CFwIm/GVRQ 1e7GTkI6/YD4kzK5xyg3cgZhHSOfwUA/ZDOXNQW2AkgEd0XoXD59P5zLyEa1ydHT6KnwgP Al3gXrEPgX3qykiUN4AhMuNcx/+olwSizGbopkTZjk9pNHdemZ2OpxXqZPe13u1Gp2j2KX W5ezssaTftgIZUOZvxXypje1MBi0e3Yb9GQBGtGohI3duQDa+jv0FsPTjPWuzot8OVnvOR 84hFDFrHA0E66koWvG9Dgv9o23ircIo7FRA2TlDD/9sy2jD18vySnvsHeVombA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d6zQz0cp1zlH9; Fri, 14 Nov 2025 01:03: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 5AE13M1o030138; Fri, 14 Nov 2025 01:03:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE13M7e030135; Fri, 14 Nov 2025 01:03:22 GMT (envelope-from git) Date: Fri, 14 Nov 2025 01:03:22 GMT Message-Id: <202511140103.5AE13M7e030135@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: f0af21824331 - main - aio: fix alignment of struct (o)aiocb32 on non-amd64 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: f0af21824331648a41b4e5d3323bea9216bcb7e2 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=f0af21824331648a41b4e5d3323bea9216bcb7e2 commit f0af21824331648a41b4e5d3323bea9216bcb7e2 Author: Robert Clausecker AuthorDate: 2025-11-14 00:55:59 +0000 Commit: Robert Clausecker CommitDate: 2025-11-14 00:56:12 +0000 aio: fix alignment of struct (o)aiocb32 on non-amd64 Only i386 has a four-byte alignment for uint64_t, others have eight-byte alignment. This causes the structure to mismatch on armv7 binaries running under aarch64, breaking the aio interface. Fixes: 3858a1f4f501d00000447309aae14029f8133946 Approved by: markj (mentor) Reported by: Mark Millard Discussed with: jrtc27 PR: 290962 MFC after: immediately (for 15.0) --- sys/kern/vfs_aio.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 02d4b8426757..2a790237d30e 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -2752,7 +2752,11 @@ struct __aiocb_private32 { #ifdef COMPAT_FREEBSD6 typedef struct oaiocb32 { int aio_fildes; /* File descriptor */ +#ifdef __amd64__ uint64_t aio_offset __packed; /* File offset for I/O */ +#else + uint64_t aio_offset; /* File offset for I/O */ +#endif uint32_t aio_buf; /* I/O buffer in process space */ uint32_t aio_nbytes; /* Number of bytes for I/O */ struct osigevent32 aio_sigevent; /* Signal to deliver */ @@ -2764,7 +2768,11 @@ typedef struct oaiocb32 { typedef struct aiocb32 { int32_t aio_fildes; /* File descriptor */ +#ifdef __amd64__ uint64_t aio_offset __packed; /* File offset for I/O */ +#else + uint64_t aio_offset; /* File offset for I/O*/ +#endif uint32_t aio_buf; /* I/O buffer in process space */ uint32_t aio_nbytes; /* Number of bytes for I/O */ int __spare__[2]; From nobody Fri Nov 14 02:26:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d71Gj63mDz6GhdC; Fri, 14 Nov 2025 02:26: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d71Gj5Tgqz3rst; Fri, 14 Nov 2025 02:26:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HPhWutu4UdaRP+lI9XANBOLpyGbkXHdy0CJAyWXh45w=; b=Pivuqk+IgTjWMJideI1oB3fi54mOH1I2CDVA2h99ln2BnZkkk3er4/VAso6ONBL8sLDpQ+ 658DoS04NmwMcVYqfkhqyhLhRw+1+r4bUHY9xARPzgif+PyCzwFYSERqctEVAlIB3A5p9F c5Trh46qYyYfBp+mPB+iNLFRUjttZ8+SQi5HFLn1krlebO/bYDUk6eq+yW+Na1uafMbUKI If0JPyHmWMuca0RDztWw2no54q4FLXRvZHVuJou3FG49Oy+3fOp4ymWSihTo7AzzuB9Qp7 scCtbODhe91H3fJoAvUhfYT5UUoNCj6O/uSk9qIQM9jUEcMa9zU5ZYDJsfAGdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HPhWutu4UdaRP+lI9XANBOLpyGbkXHdy0CJAyWXh45w=; b=Wm9ha6S8tIkxvAlXIhUlg4iSesh84NsH6I86WOxZS4+KTB8wH/RQUjLtcBRG+UNhN5y9VY E4JI/ySE5erpoGSN6aCNd1Go4uMP3Jieck7EKkUImX2iv5c1ZNZTzB0EjtDzfehFXvLZpz vk+40eiKquy7rxY7WTQ5fa2P79Zapi2RqW7taFx7Ol+C6XNs2ouOZ4YI1uo3MyyJGfiSSA Vt6wgq8muSJkIvGbSjibbLh29MWNc9vM3ZTUV5yCRSdKrDiF2pnUZ+ezoa3G0mcXIMjIt/ HvW+9KvRf5xOK4cMnky5Wt7TYl0UCj628XsmEUDyBSBoOzroSYPxcNBUbep2dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763087181; a=rsa-sha256; cv=none; b=OfGmVG4DFtoNtIwM7AiXxYP8jzH7uaqOo2mk+tPUKSNRzUy830HDaeH2OmjRct8qvXA2k+ NQuhg2Sxti0H1AhYUgz1a5uVavaOSi0uc5ia/dxoCxMjQak7HovHUvqB3C5BQxf4cO7Zil VSlSeHVtKvPK9fejsrL7LrhFtXLsEq6x0TccstjHQE0resBhdDsqxQyn3Dq1EVC6ZmClVD b3M5C09hI6eDIySJpk7iG8p28slHuS5H67TNvZWBRM6wj/LMdplG3FjYVZf98z96qB+DQC RheHNUcGXbIFcYoA5OKrv47x49/Nngq0SMpWbwRoLJzSVYpv7gwgawaGP39EcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d71Gj53l9znVZ; Fri, 14 Nov 2025 02:26: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 5AE2QLHI080715; Fri, 14 Nov 2025 02:26:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE2QLJC080712; Fri, 14 Nov 2025 02:26:21 GMT (envelope-from git) Date: Fri, 14 Nov 2025 02:26:21 GMT Message-Id: <202511140226.5AE2QLJC080712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 333eb58deeda - main - rtwn: migrate to new ieee80211 key data accessors List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 333eb58deeda6cc5a5a908b92301f833ba8750fa Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=333eb58deeda6cc5a5a908b92301f833ba8750fa commit 333eb58deeda6cc5a5a908b92301f833ba8750fa Author: Adrian Chadd AuthorDate: 2025-09-24 15:36:46 +0000 Commit: Adrian Chadd CommitDate: 2025-11-14 02:25:25 +0000 rtwn: migrate to new ieee80211 key data accessors Migrate to the ieee80211_crypto_key_*() routines. Should be no functional change. Locally tested: * RTL8821AU, STA mode Differential Revision: https://reviews.freebsd.org/D52712 --- sys/dev/rtwn/if_rtwn_cam.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/rtwn/if_rtwn_cam.c b/sys/dev/rtwn/if_rtwn_cam.c index d142cd0476e4..83f774b56814 100644 --- a/sys/dev/rtwn/if_rtwn_cam.c +++ b/sys/dev/rtwn/if_rtwn_cam.c @@ -182,6 +182,7 @@ end: static int rtwn_key_set_cb0(struct rtwn_softc *sc, const struct ieee80211_key *k) { + const char *key_data; uint8_t algo, keyid; int i, error; @@ -194,7 +195,7 @@ rtwn_key_set_cb0(struct rtwn_softc *sc, const struct ieee80211_key *k) /* Map net80211 cipher to HW crypto algorithm. */ switch (k->wk_cipher->ic_cipher) { case IEEE80211_CIPHER_WEP: - if (k->wk_keylen < 8) + if (ieee80211_crypto_get_key_len(k) < 8) algo = R92C_CAM_ALGO_WEP40; else algo = R92C_CAM_ALGO_WEP104; @@ -211,11 +212,18 @@ rtwn_key_set_cb0(struct rtwn_softc *sc, const struct ieee80211_key *k) return (EINVAL); } + /* Get key data. */ + key_data = ieee80211_crypto_get_key_data(k); + if (key_data == NULL) { + error = ENXIO; + goto fail; + } + RTWN_DPRINTF(sc, RTWN_DEBUG_KEY, "%s: keyix %u, keyid %u, algo %u/%u, flags %04X, len %u, " "macaddr %s\n", __func__, k->wk_keyix, keyid, - k->wk_cipher->ic_cipher, algo, k->wk_flags, k->wk_keylen, - ether_sprintf(k->wk_macaddr)); + k->wk_cipher->ic_cipher, algo, k->wk_flags, + ieee80211_crypto_get_key_len(k), ether_sprintf(k->wk_macaddr)); /* Clear high bits. */ rtwn_cam_write(sc, R92C_CAM_CTL6(k->wk_keyix), 0); @@ -224,7 +232,7 @@ rtwn_key_set_cb0(struct rtwn_softc *sc, const struct ieee80211_key *k) /* Write key. */ for (i = 0; i < 4; i++) { error = rtwn_cam_write(sc, R92C_CAM_KEY(k->wk_keyix, i), - le32dec(&k->wk_key[i * 4])); + le32dec(&key_data[i * 4])); if (error != 0) goto fail; } From nobody Fri Nov 14 02:26:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d71Gl0GwYz6Gh8n; Fri, 14 Nov 2025 02:26: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d71Gk60jbz3rqc; Fri, 14 Nov 2025 02:26:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MDBxt6hCURneLSHGsfp7oQy/EnOVrOSHw/jwujKwg6w=; b=AZ2yw0XtjMRE+nUtFK+gUSnpTx8I79XkeqCOsNeLVRPrDuf09itieR7s9uxcIm9z683DJA dfUM6skbENUNB4OBWfq3bKkhA5teQpdYqtV2fVjjJEuXTfCfq+dqhkRIoaZfQPM4D6+L/3 116aC4NOt/ysCxnaD0ierRcseEnQIuanUDZR2k6cCT+AT+11Hza/5mdDos3UJv2C9wpPLC VQntc60RIT67o0qQSi/qMX+flpA7zTRJ8ixMrk+IfrpVSJLUHVAIAq8vwFF1qAI/2sJ2EQ DRslPmtKAu5t1sPsF9PTsPV1D8pf+XLdMtJRzvqS1i1aYum2/iqQfBLBvqa5+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MDBxt6hCURneLSHGsfp7oQy/EnOVrOSHw/jwujKwg6w=; b=BGtF6J0B+lBt6sPj0k3q1T8/FZPLZb48V/28YFeEml92uL/RXkUTB4zAwXczUVG4RlLv8a iLZGwp1LsNttiqrGv7kpAZNfaoHFabRxkacEnOOd2eWNAKqdXEdZpFIMhwnwD4+o5EMrVf bp9Mbe81TPhkUzUWFXKzq3W99HV1G5gNgIC8miTFFvweKmr0ZHBsDRxXd/eh9ovhT2e6yX qxV5H3PoAMJrSp4QQC/50lO7nvdQckweaTtykUwDgaSay7akuDlrDKj2UDnWdpJov24zri L6jtGEKPBj8LfWQSRnVpCtnQaoqxw1vIQu6xGj690rqZJhTmDyNHLd2k5XwQfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763087182; a=rsa-sha256; cv=none; b=iqHKT8ti++A2dkK8EU9M4Cg2gBKgUy7lx70Sp44OplfPYFIAHJheRwmYzaBpQSMMqnOoHl XgrgGkcrg/G+gfJPQnqjDjIuQA0rdXNtlNo7HNtKVDpgfzD8+rozAbDJPMzXX0chRoDfKz o8YW2wkBKPCrFuEYQOejXrZm9Hy62u5ok9A0sG6DFePw+7sYmvcoo3RoJ/5f+U0BVpKx5o OHKtCJbWmx//GwC78380dKk+hQztOxjhBZz9f1oG065iVLNUw7PryuQXnrtTMZxnknFvG3 7ho4Pqzr0CWOsgKrEdS2AEpuMHL1erW7FM66t4iM0wcy8SZtiqKSZfsSWYNwaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d71Gk5Z3TznWv; Fri, 14 Nov 2025 02:26: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 5AE2QM4i080748; Fri, 14 Nov 2025 02:26:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE2QM0a080745; Fri, 14 Nov 2025 02:26:22 GMT (envelope-from git) Date: Fri, 14 Nov 2025 02:26:22 GMT Message-Id: <202511140226.5AE2QM0a080745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 5431dafdb965 - main - mtw: convert to new net80211 crypto key API List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5431dafdb9659fb578fa2b9944005e15f50d4038 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=5431dafdb9659fb578fa2b9944005e15f50d4038 commit 5431dafdb9659fb578fa2b9944005e15f50d4038 Author: Adrian Chadd AuthorDate: 2025-09-25 18:29:00 +0000 Commit: Adrian Chadd CommitDate: 2025-11-14 02:25:34 +0000 mtw: convert to new net80211 crypto key API * constify mtw_write_region_1()'s data field * convert to use ieee80211_crypto_get_*() * .. note that rx/tx mic data routines are explicitly being called, as this NIC is doing TKIP + MIC offload Differential Revision: https://reviews.freebsd.org/D53704 Reviewed by: bz --- sys/dev/usb/wlan/if_mtw.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/sys/dev/usb/wlan/if_mtw.c b/sys/dev/usb/wlan/if_mtw.c index 6967e5081542..8384c0a2d9fc 100644 --- a/sys/dev/usb/wlan/if_mtw.c +++ b/sys/dev/usb/wlan/if_mtw.c @@ -174,7 +174,7 @@ static int mtw_read(struct mtw_softc *, uint16_t, uint32_t *); static int mtw_read_region_1(struct mtw_softc *, uint16_t, uint8_t *, int); static int mtw_write_2(struct mtw_softc *, uint16_t, uint16_t); static int mtw_write(struct mtw_softc *, uint16_t, uint32_t); -static int mtw_write_region_1(struct mtw_softc *, uint16_t, uint8_t *, int); +static int mtw_write_region_1(struct mtw_softc *, uint16_t, const uint8_t *, int); static int mtw_set_region_4(struct mtw_softc *, uint16_t, uint32_t, int); static int mtw_efuse_read_2(struct mtw_softc *, uint16_t, uint16_t *); static int mtw_bbp_read(struct mtw_softc *, uint8_t, uint8_t *); @@ -1277,7 +1277,8 @@ mtw_write(struct mtw_softc *sc, uint16_t reg, uint32_t val) } static int -mtw_write_region_1(struct mtw_softc *sc, uint16_t reg, uint8_t *buf, int len) +mtw_write_region_1(struct mtw_softc *sc, uint16_t reg, const uint8_t *buf, + int len) { usb_device_request_t req; @@ -1286,7 +1287,8 @@ mtw_write_region_1(struct mtw_softc *sc, uint16_t reg, uint8_t *buf, int len) USETW(req.wValue, 0); USETW(req.wIndex, reg); USETW(req.wLength, len); - return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, buf)); + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, + __DECONST(uint8_t *, buf))); } static int @@ -1911,7 +1913,7 @@ mtw_key_set_cb(void *arg) /* map net80211 cipher to RT2860 security mode */ switch (cipher) { case IEEE80211_CIPHER_WEP: - if (k->wk_keylen < 8) + if (ieee80211_crypto_get_key_len(k) < 8) mode = MTW_MODE_WEP40; else mode = MTW_MODE_WEP104; @@ -1936,13 +1938,19 @@ mtw_key_set_cb(void *arg) } if (cipher == IEEE80211_CIPHER_TKIP) { - mtw_write_region_1(sc, base, k->wk_key, 16); - mtw_write_region_1(sc, base + 16, &k->wk_key[24], 8); - mtw_write_region_1(sc, base + 24, &k->wk_key[16], 8); + /* TODO: note the direct use of tx/rx mic offsets! ew! */ + mtw_write_region_1(sc, base, + ieee80211_crypto_get_key_data(k), 16); + /* rxmic */ + mtw_write_region_1(sc, base + 16, + ieee80211_crypto_get_key_rxmic_data(k), 8); + /* txmic */ + mtw_write_region_1(sc, base + 24, + ieee80211_crypto_get_key_txmic_data(k), 8); } else { /* roundup len to 16-bit: XXX fix write_region_1() instead */ mtw_write_region_1(sc, base, k->wk_key, - (k->wk_keylen + 1) & ~1); + (ieee80211_crypto_get_key_len(k) + 1) & ~1); } if (!(k->wk_flags & IEEE80211_KEY_GROUP) || From nobody Fri Nov 14 02:37:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d71Wg10kLz6GjFH; Fri, 14 Nov 2025 02:37: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d71Wf6jnRz3xF3; Fri, 14 Nov 2025 02:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xaS9JC5hDunGMR4h6fkq5meQ0KawbXzBvBU6Lav9ap8=; b=uipWxDvu456GJEkOb3KH9s7MtWm9xRwFCn2yh4s5KQRxm3JCy46yHNocW4AxSP4Q8Dxv9m rVawxoE0TQ51iZW7owlPPrRt+EhwBjLuI2euqkPaMhxDz+i+K8LUmhQDU0zMBV5qveVFox PpxTSPPNCn8ysfYbZjbE1C5MbDLQW6yN7urlOnGp/uEWVd1rfjEpx95+vr8DhdEMd94UZQ 9/aLlgBlyAXSEcMW/kPWa0qy5h8xRppz1oPGi0NyxG2dJ4JICvTyJHcaQwSEIi8MsTfPTh la+ddz0C3ONbt3fdqDNfkfUrIng7J8s5+lwWR3nLAwSX3JqpSVwhLb+IZGs2lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xaS9JC5hDunGMR4h6fkq5meQ0KawbXzBvBU6Lav9ap8=; b=ei+PSMSgcD3t5XS6ZJXwO5D8SNUYnf5OG08UQj/FYYPMBhTj0I6s9ZFwo8W+997tsY8xyQ 8c+YSGc6Aty/iqTmnr/AA2wF0mfa5/ihAnyvJvN0tFGyQ+Rqx2i3jak6A6qvhm+5tXAkDs dkJgCF3G/3mp93zHY6hBbkrGVhTkODeL0WVkmmMj/62jqY6aCMkafc81SdYnYMWv/cZX9o 2HsfBvJ5AvqSkpb6MVL+pYtk0rfX2MvehK3rblp9Y/Kz59qihfxMSJiXIvByckXl1/jirx fW3zPWnx309x7Ya8mqKXBnrN22eJ8DTt25N+bfleRfVKFz2FHAsEDIYU4kykow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763087855; a=rsa-sha256; cv=none; b=TzTE4hx9SgJqKnMMBnGPAzrKygfDxle+uhV2Zekx8HNHO8kQ7iGTpfLJ3JHqeVcur7PPS6 V/wVSro61EV/TULU8U/4Eg8fwl/w+4nO/umhaKWcLgUX8G9AaVFKWrVqBAEB1lgnowno3n Ry+iQxhIiafkGCfkJvKbN7aAzdTRyuxTDyVs+pSB38BV9e42eJOtdR15EXUHlpPjTACcC3 KE76x/VTfeTnnbGpXxfgWZOL299GGARvSINi/2y5tSsYXlczAfvq5HNanOdM6wfthJjhnk fp9pQMcnVajyWMBeWd7oHEKSVYuXlfCPVPnfzC3O5e2FWsdFQFMgafdU6RJQBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d71Wf6J37zp42; Fri, 14 Nov 2025 02:37: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 5AE2bYIe001241; Fri, 14 Nov 2025 02:37:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE2bY2C001238; Fri, 14 Nov 2025 02:37:34 GMT (envelope-from git) Date: Fri, 14 Nov 2025 02:37:34 GMT Message-Id: <202511140237.5AE2bY2C001238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 7d88ac0eb2d2 - main - iwx: clean up debugging around key add/set; comments on delete List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d88ac0eb2d2e81ac121dd4a32229494594ec44c Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=7d88ac0eb2d2e81ac121dd4a32229494594ec44c commit 7d88ac0eb2d2e81ac121dd4a32229494594ec44c Author: Adrian Chadd AuthorDate: 2025-11-12 02:49:10 +0000 Commit: Adrian Chadd CommitDate: 2025-11-14 02:28:47 +0000 iwx: clean up debugging around key add/set; comments on delete * Add IWN_DEBUG_KEYMGMT as a debug flag * Convert DPRINTF(()) in key add/set to IWN_DPRINTF() * printf() -> net80211_vap_printf() * add braces around return value Differential Revision: https://reviews.freebsd.org/D53703 Reviewed by: thj --- sys/dev/iwx/if_iwx.c | 38 ++++++++++++++++++++++++-------------- sys/dev/iwx/if_iwx_debug.h | 3 ++- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index eb5b4a42e616..91f5baee9680 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -10940,7 +10940,7 @@ iwx_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, { if (k->wk_cipher->ic_cipher == IEEE80211_CIPHER_AES_CCM) { - return 1; + return (1); } if (ieee80211_is_key_unicast(vap, k)) { @@ -10953,7 +10953,7 @@ iwx_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, return (0); } *rxkeyix = IEEE80211_KEYIX_NONE; /* XXX maybe *keyix? */ - return 1; + return (1); } static int @@ -10980,9 +10980,11 @@ iwx_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) if (ieee80211_is_key_global(vap, k)) { id = ieee80211_crypto_get_key_wepidx(vap, k); - DPRINTF(("%s: adding group key\n", __func__)); + IWX_DPRINTF(sc, IWX_DEBUG_KEYMGMT, "%s: adding group key\n", + __func__); } else if (ieee80211_is_key_unicast(vap, k)) { - DPRINTF(("%s: adding key\n", __func__)); + IWX_DPRINTF(sc, IWX_DEBUG_KEYMGMT, "%s: adding key\n", + __func__); id = 0; /* net80211 currently only supports unicast key 0 */ } else { net80211_vap_printf(vap, "%s: unknown key type\n", __func__); @@ -10991,7 +10993,6 @@ iwx_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) IWX_LOCK(sc); - DPRINTF(("%s: setting keyid=%i\n", __func__, id)); cmd.common.key_flags = htole16(IWX_STA_KEY_FLG_CCM | IWX_STA_KEY_FLG_WEP_KEY_MAP | ((id << IWX_STA_KEY_FLG_KEYID_POS) & @@ -11008,14 +11009,14 @@ iwx_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) } memcpy(cmd.common.key, k->wk_key, MIN(sizeof(cmd.common.key), k->wk_keylen)); - DPRINTF(("%s: wk_keylen=%i\n", __func__, k->wk_keylen)); - for (int i=0; iwk_keylen; i++) { - DPRINTF(("%s: key[%d]=%x\n", __func__, i, k->wk_key[i])); - } + IWX_DPRINTF(sc, IWX_DEBUG_KEYMGMT, "%s: key: id=%d, len=%i, key=%*D\n", + __func__, id, k->wk_keylen, k->wk_keylen, + (const unsigned char *) k->wk_key, ""); cmd.common.sta_id = IWX_STATION_ID; cmd.transmit_seq_cnt = htole64(k->wk_keytsc); - DPRINTF(("%s: k->wk_keytsc=%lu\n", __func__, k->wk_keytsc)); + IWX_DPRINTF(sc, IWX_DEBUG_KEYMGMT, "%s: k->wk_keytsc=%lu\n", __func__, + k->wk_keytsc); status = IWX_ADD_STA_SUCCESS; err = iwx_send_cmd_pdu_status(sc, IWX_ADD_STA_KEY, sizeof(cmd), &cmd, @@ -11023,19 +11024,28 @@ iwx_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) if (!err && (status & IWX_ADD_STA_STATUS_MASK) != IWX_ADD_STA_SUCCESS) err = EIO; if (err) { - printf("%s: can't set wpa2 keys (error %d)\n", __func__, err); + net80211_vap_printf(vap, + "%s: can't set wpa2 keys (error %d)\n", __func__, err); IWX_UNLOCK(sc); return err; } else - DPRINTF(("%s: key added successfully\n", __func__)); + IWX_DPRINTF(sc, IWX_DEBUG_KEYMGMT, + "%s: key added successfully\n", __func__); IWX_UNLOCK(sc); - return 1; + return (1); } static int iwx_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) { - return 1; + /* + * Note: since there's no key allocations to track - it's either + * the 4 static WEP keys or the single unicast key - there's nothing + * else to do here. + * + * This would need some further work to support IBSS/mesh/AP modes. + */ + return (1); } static device_method_t iwx_pci_methods[] = { diff --git a/sys/dev/iwx/if_iwx_debug.h b/sys/dev/iwx/if_iwx_debug.h index 0079a7e7e753..ab8284a59e0f 100644 --- a/sys/dev/iwx/if_iwx_debug.h +++ b/sys/dev/iwx/if_iwx_debug.h @@ -37,7 +37,8 @@ enum { IWX_DEBUG_FW = 0x00200000, /* Firmware management */ IWX_DEBUG_LAR = 0x00400000, /* Location Aware Regulatory */ IWX_DEBUG_TE = 0x00800000, /* Time Event handling */ - /* 0x0n000000 are available */ + IWX_DEBUG_KEYMGMT = 0x01000000, /* Encryption key management */ + /* 0x0e000000 are available */ IWX_DEBUG_NI = 0x10000000, /* Not Implemented */ IWX_DEBUG_REGISTER = 0x20000000, /* print chipset register */ IWX_DEBUG_TRACE = 0x40000000, /* Print begin and start driver function */ From nobody Fri Nov 14 02:37:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d71Wh2Gc2z6Gj3s; Fri, 14 Nov 2025 02:37: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d71Wh0Sc6z3xHN; Fri, 14 Nov 2025 02:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=erhPDfs5N4SqgH+XjvW49+94gh3M1MNsHJ+MYJD0AhU=; b=LqZzz62xqAJg30QcO2hO04lLR0IKgt6mDab8fKfTxE8UmMK7GmrFeevkv4fBa5Fe2xYgSU ZsrRTD8vsZ2SoEVZuCN6HiGzTvhS2Lwkodck63LhdV3EszlDg5AH/ptT73RR4yKuHbaZ5W vsEmLhX8MMwhvnAQ3ahOHfXN7IqIusDAJdzE8fFMpQ4CC1TIJDtDzXYNqQO7isxplhf0yA tv70040J63Xnmv9P0Ay5IOwvOOnVzW3l9aIFnpSPdXVhn2E1fXunqZOKSSuOqDylx4zBPc XticwQvfL6rlPTJWTrqYLRqPUogXy+bbmUCUv1/ul5Sjclpi2BVKxdA6ykd+fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=erhPDfs5N4SqgH+XjvW49+94gh3M1MNsHJ+MYJD0AhU=; b=d0YUVLxo69n2Z0TQ23khyQ+49ecsOlKRbkYs0jjleZ+2ccL2pFizM0jZ2oj2nywGlH14QZ I/DFwc2MYz2alIp2cIiZ1ESbz5MPmX6IxJGczSuEdZptjxarai4nKUmjj8sy7ytPajkfFi 9r1htRvIznoUhe6LWJUgAIC2ursjW381UOacQ35R9yMWAIcq84xu4cVKE5NwxHr8xLCvEl x4RWlUe+4JNUblhUerzHPbqPl+iZXEb6A0Ymo6pBHZsbe8fRTQHgAsZAGyRYIAneuewzo/ CpfmCJAIWvI5B3vGpE2Vi8kK40CmUxaZspGo280NWrNmGDmXOMI5eWXIWH5Lpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763087856; a=rsa-sha256; cv=none; b=j7h+yYvwKz5tu2N6aYvvbSXE5kiMlT4YNYSi/7HBbB609rW+Z2Eah4Z9PRZHi/3ZuHIB4z 9EfXeRsqTOFX6nmUu157lcQnvwbR86DZPyrPvn3QoxyxUdVlebAbSVhs8fP304kprU4QVO 2CIZwPXOr5XOKiTX+AO4r3beFop3ilbyWHYIqqiz1Z+2I2e/DL17mQqGASdsctYFv0mCcj 4D0qxS0Pd9L/9Qbd8LZwNE6p8QL90HxQfBhcovD7pN4AQeEE6LAV8LwBZsv3Q0uGydK0Pi 2YE2AahbTf5NXVQt2s36xW9pDQbZJwt1VDQ9AWcixgcY+xBRlOxa1wnFu9fx8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d71Wg6tVpzp0g; Fri, 14 Nov 2025 02:37: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 5AE2bZNb001281; Fri, 14 Nov 2025 02:37:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE2bZZ9001278; Fri, 14 Nov 2025 02:37:35 GMT (envelope-from git) Date: Fri, 14 Nov 2025 02:37:35 GMT Message-Id: <202511140237.5AE2bZZ9001278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: b4c35d4622d5 - main - iwx: fix and clean up suspend/resume path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4c35d4622d522c92bb080ee51e4a351e9d71897 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=b4c35d4622d522c92bb080ee51e4a351e9d71897 commit b4c35d4622d522c92bb080ee51e4a351e9d71897 Author: Adrian Chadd AuthorDate: 2025-11-12 21:01:40 +0000 Commit: Adrian Chadd CommitDate: 2025-11-14 02:36:25 +0000 iwx: fix and clean up suspend/resume path I noticed a couple of things were happening: * during suspend, I'd get a timeout in the NIC lock path (which sets a bit on the NIC to say that the host wants to talk to it); * resume wouldn't come back - scan commands would fail, and you'd have to reinit the NIC again for it to work. The thing is: * the suspend path should already shut down the NIC by shutting down all the VAPs (and the last VAP should call ic_parent to bring it down), and * the resume path should already bring up the NIC by bringing up each VAP, and the first VAP to be brought up calls ic_parent to bring it up. So instead, I've shuffled around the code to just double check the hardware state is consistent /before/ ieee80211_suspend_all() and ieee80211_resume_all() is called. This both fixes the errant hardware timeout during suspend, and it fixes resume to work. Locally tested: * AX210, STA mode, both hardware ACPI suspend/resume and devctl suspend and devctl resume Differential Revision: https://reviews.freebsd.org/D53721 Reviewed by: thj --- sys/dev/iwx/if_iwx.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 91f5baee9680..dac1c563c593 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -10711,9 +10711,13 @@ iwx_suspend(device_t dev) struct iwx_softc *sc = device_get_softc(dev); struct ieee80211com *ic = &sc->sc_ic; - if (sc->sc_flags & IWX_FLAG_HW_INITED) { - ieee80211_suspend_all(ic); + /* + * Suspend everything first, then shutdown hardware if it's + * still up. + */ + ieee80211_suspend_all(ic); + if (sc->sc_flags & IWX_FLAG_HW_INITED) { iwx_stop(sc); sc->sc_flags &= ~IWX_FLAG_HW_INITED; } @@ -10725,7 +10729,6 @@ iwx_resume(device_t dev) { struct iwx_softc *sc = device_get_softc(dev); struct ieee80211com *ic = &sc->sc_ic; - int err; /* * We disable the RETRY_TIMEOUT register (0x41) to keep @@ -10735,15 +10738,15 @@ iwx_resume(device_t dev) IWX_LOCK(sc); - err = iwx_init(sc); - if (err) { - iwx_stop_device(sc); - IWX_UNLOCK(sc); - return err; + /* Stop the hardware here if it's still thought of as "up" */ + if (sc->sc_flags & IWX_FLAG_HW_INITED) { + iwx_stop(sc); + sc->sc_flags &= ~IWX_FLAG_HW_INITED; } IWX_UNLOCK(sc); + /* Start the VAPs, which will bring the hardware back up again */ ieee80211_resume_all(ic); return (0); } From nobody Fri Nov 14 02:37:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d71Wj4Bq8z6GjFK; Fri, 14 Nov 2025 02:37: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d71Wj1JSBz3xFC; Fri, 14 Nov 2025 02:37:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YNFlOy4hLVwHyAvKA0EBIhNfiL6xSPWppjLQVKlp2l4=; b=UBtKde+dVMNldTShp3N1/PZzNRU5nk0Zroda50gXfFfAEiC/LrhiJw/v55Nn0l0FWA6hqB prBRhEgtxpIryIGdJG+mFw8FG7Z/n4M3iqPp6HbEkK3qLl3ChdVbrBTfLVFlqvR6iMkcpZ 5jQY7rUgpE8VvEdPtuVQVmEKzwQVfXQ6Cj5nTkS0KBXz8A1DAIWfNo0aG6fw5LPhMjq34W FBz52fS0hQcBJRkMBKarLuvu2ww3ET695TrNElg4N8j3mD5y2mCThIvGyL4xpD5hLG/AB5 gadayVKbwm9QkXUmhsZ14voYjX2EzvHbwcOYNyj1ciPD1XhZDEkxdFxKxeq3hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YNFlOy4hLVwHyAvKA0EBIhNfiL6xSPWppjLQVKlp2l4=; b=xNPt500LdbpD2+OT1WPoospB8WvRmMqjEgTkhWv3U5cAFIkFEAPHdofRsC+PHfY78Fk2hf pcnSDtyoiFNGofrLVlQq/spmAAkO/GmXiKsY5vsybffyyH78nbUkj3zUmJA+JnbDucjfQT 7d4H8+Zi6Z2QfyCvnSbZMmJbxAFjtG7QhQmzBtSQjpFGHzfx9yx4O3Gvc04mmi9t1pX0SG p0oY9fVs03koaG3Q/G83Q+skqM5xyWbQ4Yl6DP0x9SrNsfeBMupZFdW7jZxgDa1oYuXzuz 8KKi6XG1m/CsgKXUSexh7KvaSQIXVrxo5NwydCwK/iLE4am36liUW6lQ4bPcbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763087857; a=rsa-sha256; cv=none; b=EhPbRu4E+AU9vasl66rNSSjQrg7qCLKAu+UVOeux3MyZ1YW8oGojs0IdGPVkUALdLwGjob 8U5kJFQpTpLOAryP/ZeRjCc9BKwrH2mMkSPqgA7X28dY/5efebWfix/rZ8QdcQrrBDZZ3X CNQGl7NgoLiHA0X45Ck7vvYg5KprzgMIXUjjaMvmU3QuBpLTmKxj5e8gCgibYfU0yXFM44 kYJYNkign4x4hyS3Z6TkDkP7vWhFQhCCjWoOlUFtpbAdALXvHtYb1WzAUUHbgHrdb+gHYw XL+vCO0ST5xW+mv1us8RlG00fZiWkZsxGhfS83GGcwb0YXtwieE5suusz4Bh1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d71Wj0q2bznXP; Fri, 14 Nov 2025 02:37: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 5AE2bbVI001315; Fri, 14 Nov 2025 02:37:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE2baZq001312; Fri, 14 Nov 2025 02:37:36 GMT (envelope-from git) Date: Fri, 14 Nov 2025 02:37:36 GMT Message-Id: <202511140237.5AE2baZq001312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 00b4d712e2be - main - iwx: clean up TX AMPDU session establishment and checking List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00b4d712e2be54b8c87a7fd7f215ad5ef7845d5b Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=00b4d712e2be54b8c87a7fd7f215ad5ef7845d5b commit 00b4d712e2be54b8c87a7fd7f215ad5ef7845d5b Author: Adrian Chadd AuthorDate: 2025-11-13 04:33:52 +0000 Commit: Adrian Chadd CommitDate: 2025-11-14 02:37:16 +0000 iwx: clean up TX AMPDU session establishment and checking * Send a TX A-MPDU exchange successfully; we were allocating the A-MPDU TX queue but returning 0 to net80211 was telling it to not establish the TX A-MPDU session and none of the BA session tracking stuff would work. * Clean up the TX A-MPDU queue lookup in the transmit path - only QoS data frames are allowed, not qos null-data, cf/ack/etc frames; only send them if the A-MPDU session is established. * Tell net80211 that we've established the TX A-MPDU session once the firmware queue has been created. * Check to make sure we're not double (or more) creating TX AMDPU sessions - only allocate a qid if we're not doing A-MPDU yet. * Delete IWX_FLAG_A-MPDUTX - it's now being properly tracked! Locally tested: * AX210, STA mode - gets 50/50mbit on 2GHz HT20, and 100/100mbit on 5GHz VHT/40. Differential Revision: https://reviews.freebsd.org/D53725 Reviewed by: thj --- sys/dev/iwx/if_iwx.c | 109 ++++++++++++++++++++++++++++++++++----------- sys/dev/iwx/if_iwx_debug.h | 3 +- sys/dev/iwx/if_iwxvar.h | 1 - 3 files changed, 85 insertions(+), 28 deletions(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index dac1c563c593..e317ff9e271c 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -3429,6 +3429,14 @@ iwx_sta_rx_agg(struct iwx_softc *sc, struct ieee80211_node *ni, uint8_t tid, sc->sc_rx_ba_sessions--; } +/** + * @brief Allocate an A-MPDU / aggregation session for the given node and TID. + * + * This allocates a TX queue specifically for that TID. + * + * Note that this routine currently doesn't return any status/errors, + * so the caller can't know if the aggregation session was setup or not. + */ static void iwx_sta_tx_agg_start(struct iwx_softc *sc, struct ieee80211_node *ni, uint8_t tid) @@ -3502,6 +3510,14 @@ iwx_ba_rx_task(void *arg, int npending __unused) IWX_UNLOCK(sc); } +/** + * @brief Task called to setup a deferred block-ack session. + * + * This sets up any/all pending blockack sessions as defined + * in sc->ba_tx.start_tidmask. + * + * Note: the call to iwx_sta_tx_agg_start() isn't being error checked. + */ static void iwx_ba_tx_task(void *arg, int npending __unused) { @@ -3509,22 +3525,38 @@ iwx_ba_tx_task(void *arg, int npending __unused) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); struct ieee80211_node *ni = vap->iv_bss; + uint32_t started_mask = 0; int tid; IWX_LOCK(sc); for (tid = 0; tid < IWX_MAX_TID_COUNT; tid++) { + const struct ieee80211_tx_ampdu *tap; + if (sc->sc_flags & IWX_FLAG_SHUTDOWN) break; + tap = &ni->ni_tx_ampdu[tid]; + if (IEEE80211_AMPDU_RUNNING(tap)) + break; if (sc->ba_tx.start_tidmask & (1 << tid)) { - DPRINTF(("%s: ampdu tx start for tid %i\n", __func__, - tid)); + IWX_DPRINTF(sc, IWX_DEBUG_AMPDU_MGMT, + "%s: ampdu tx start for tid %i\n", __func__, tid); iwx_sta_tx_agg_start(sc, ni, tid); sc->ba_tx.start_tidmask &= ~(1 << tid); - sc->sc_flags |= IWX_FLAG_AMPDUTX; + started_mask |= (1 << tid); } } IWX_UNLOCK(sc); + + /* Iterate over the sessions we started; mark them as active */ + for (tid = 0; tid < IWX_MAX_TID_COUNT; tid++) { + if (started_mask & (1 << tid)) { + IWX_DPRINTF(sc, IWX_DEBUG_AMPDU_MGMT, + "%s: informing net80211 to start ampdu on tid %i\n", + __func__, tid); + ieee80211_ampdu_tx_request_active_ext(ni, tid, 1); + } + } } static void @@ -5627,7 +5659,6 @@ iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni) u_int hdrlen; uint32_t rate_n_flags; uint16_t num_tbs, flags, offload_assist = 0; - uint8_t type, subtype; int i, totlen, err, pad, qid; #define IWM_MAX_SCATTER 20 bus_dma_segment_t *seg, segs[IWM_MAX_SCATTER]; @@ -5638,38 +5669,32 @@ iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni) IWX_ASSERT_LOCKED(sc); wh = mtod(m, struct ieee80211_frame *); - type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; - subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; hdrlen = ieee80211_anyhdrsize(wh); qid = sc->first_data_qid; /* Put QoS frames on the data queue which maps to their TID. */ - if (IEEE80211_QOS_HAS_SEQ(wh) && (sc->sc_flags & IWX_FLAG_AMPDUTX)) { + if (IEEE80211_QOS_HAS_SEQ(wh)) { uint16_t qos = ieee80211_gettid(wh); uint8_t tid = qos & IEEE80211_QOS_TID; -#if 0 + struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[tid]; + /* - * XXX-THJ: TODO when we enable ba we need to manage the - * mappings + * Note: we're currently putting all frames into one queue + * except for A-MPDU queues. We should be able to choose + * other WME queues but first we need to verify they've been + * correctly setup for data. */ - struct ieee80211_tx_ba *ba; - ba = &ni->ni_tx_ba[tid]; - if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && - type == IEEE80211_FC0_TYPE_DATA && - subtype != IEEE80211_FC0_SUBTYPE_NODATA && - subtype != IEEE80211_FC0_SUBTYPE_BAR && - sc->aggqid[tid] != 0 /*&& - ba->ba_state == IEEE80211_BA_AGREED*/) { - qid = sc->aggqid[tid]; -#else - if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && - type == IEEE80211_FC0_TYPE_DATA && - subtype != IEEE80211_FC0_SUBTYPE_NODATA && + /* + * Only QoS data goes into an A-MPDU queue; + * don't add QoS null, the other data types, etc. + */ + if (IEEE80211_AMPDU_RUNNING(tap) && + IEEE80211_IS_QOSDATA(wh) && + !IEEE80211_IS_MULTICAST(wh->i_addr1) && sc->aggqid[tid] != 0) { qid = sc->aggqid[tid]; -#endif } } @@ -10903,6 +10928,26 @@ iwx_ampdu_rx_stop(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap) return; } +/** + * @brief Called by net80211 to request an A-MPDU session be established. + * + * This is called by net80211 to see if an A-MPDU session can be established. + * However, the iwx(4) firmware will take care of establishing the BA + * session for us. net80211 doesn't have to send any action frames here; + * it just needs to plumb up the ampdu session once the BA has been sent. + * + * If we return 0 here then the firmware will set up the state but net80211 + * will not; so it's on us to actually complete it via a call to + * ieee80211_ampdu_tx_request_active_ext() . + * + * @param ni ieee80211_node to establish A-MPDU session for + * @param tap pointer to the per-TID state struct + * @param dialogtoken dialogtoken field from the BA request + * @param baparamset baparamset field from the BA request + * @param batimeout batimeout field from the BA request + * + * @returns 0 so net80211 doesn't send the BA action frame to establish A-MPDU. + */ static int iwx_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, int dialogtoken, int baparamset, int batimeout) @@ -10911,10 +10956,22 @@ iwx_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, int tid; tid = _IEEE80211_MASKSHIFT(le16toh(baparamset), IEEE80211_BAPS_TID); - DPRINTF(("%s: tid=%i\n", __func__, tid)); + IWX_DPRINTF(sc, IWX_DEBUG_AMPDU_MGMT, + "%s: queuing AMPDU start on tid %i\n", __func__, tid); + + /* There's no nice way right now to tell net80211 that we're in the + * middle of an asynchronous ADDBA setup session. So, bump the timeout + * to hz ticks, hopefully we'll get a response by then. + */ + tap->txa_nextrequest = ticks + hz; + + IWX_LOCK(sc); sc->ba_tx.start_tidmask |= (1 << tid); + IWX_UNLOCK(sc); + taskqueue_enqueue(sc->sc_tq, &sc->ba_tx_task); - return 0; + + return (0); } diff --git a/sys/dev/iwx/if_iwx_debug.h b/sys/dev/iwx/if_iwx_debug.h index ab8284a59e0f..5fc127d986a9 100644 --- a/sys/dev/iwx/if_iwx_debug.h +++ b/sys/dev/iwx/if_iwx_debug.h @@ -38,7 +38,8 @@ enum { IWX_DEBUG_LAR = 0x00400000, /* Location Aware Regulatory */ IWX_DEBUG_TE = 0x00800000, /* Time Event handling */ IWX_DEBUG_KEYMGMT = 0x01000000, /* Encryption key management */ - /* 0x0e000000 are available */ + IWX_DEBUG_AMPDU_MGMT = 0x02000000, /* AMPDU TX/RX management */ + /* 0x0c000000 are available */ IWX_DEBUG_NI = 0x10000000, /* Not Implemented */ IWX_DEBUG_REGISTER = 0x20000000, /* print chipset register */ IWX_DEBUG_TRACE = 0x40000000, /* Print begin and start driver function */ diff --git a/sys/dev/iwx/if_iwxvar.h b/sys/dev/iwx/if_iwxvar.h index 1ac0bc24577c..5ed749db631e 100644 --- a/sys/dev/iwx/if_iwxvar.h +++ b/sys/dev/iwx/if_iwxvar.h @@ -290,7 +290,6 @@ struct iwx_rx_ring { #define IWX_FLAG_BGSCAN 0x200 /* background scan in progress */ #define IWX_FLAG_TXFLUSH 0x400 /* Tx queue flushing in progress */ #define IWX_FLAG_HW_INITED 0x800 /* Hardware initialized */ -#define IWX_FLAG_AMPDUTX 0x1000 struct iwx_ucode_status { uint32_t uc_lmac_error_event_table[2]; From nobody Fri Nov 14 02:40:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d71Zy3TzQz6GjdX; Fri, 14 Nov 2025 02:40: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d71Zy2kDsz40V8; Fri, 14 Nov 2025 02:40:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763088026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53xqrcdIAp5PP1AqagSbaMVLRlOKYkGggJ/y7mmAMSQ=; b=HVrHDMeBDwMmQC97ijegTCSVuoz6WhneOjeoteTuO9qHlZNRdQN9Lk80782J/79AVJhT0h h3rn63ajdedmT/bUieGcH2VgL5IHHxAXn/qP4kdVrhFrSjNuZODHrN3SMkZ7MMPXHTC4Du 5p83shh86Z2PrdHevgn+oTG7CejSMF+hNGBB0PTxs5L8MlNTkRH9UPPEuGBzg8JXfqm7d9 NdDijwBZ4SASDmYPWVHOsN/PxJPOv7V3TL9MvJy5tqERc1/Rx8zkGqE0BgTTqJYcayuMJz EO6mFp1nkr81o/aXYfuBro3u4ucppvhZUwzfR/3LxDozB6gbG2XLnSKk1hlSIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763088026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53xqrcdIAp5PP1AqagSbaMVLRlOKYkGggJ/y7mmAMSQ=; b=CWWlqDfaUp7rX+QGCZvO80JgQ3ybCT9s5iZlzfNx+kX46RsFo3gbT3cWvSaxIrT9i1d1sm lej0MWWG+lLS5CLZ3PXc4u0s+rRv11abFDpRVXeshH430eo7wcLjGmhuAPcbXifvN/YWtu PttToJam9mSohllOpEm1Aj27PsXUsOIGNhL30kOR91e7WIb3Eaxsxbi6NxMn7zobs5bmL3 WzRWaTb0TE/oSevzwhPxQEMizMTJRj4SayyIFNTdWsD7Mea+QCQDnPxwVjBiJxsGhWjQAF XYFSJYsxbAOoNmHD3BGB2I2XEp4JO6e4N25XaPLmzxPnbH/TM5bHJGTW3b6MMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763088026; a=rsa-sha256; cv=none; b=GaBfbUV162YT6yGRgHK3WL5HayF0Njz5Foo7mrF9kEOGDLBEiDaScSwb/zgYEIanbQOCLL 3ibqeZjCPnvq4mcR0RrhWAJ+MGqy08AI6CDfe10bsyTsJgufmsLCc/w0402vnHmyFbm2BV 2Dwv5Ewy+MONnKxn2Xw6j7BwiP7l1KYiLwykmzN/CtkUFaRGD8OTHr9hGcAOlQyTyltJ05 F5cNaJOOdJxXuU4kacFZhPxgJm8a/69qLY0yOQQUiiYYav8Rd7RYOL5xCZpoZTup9PMtB2 aPSPEtP/Q9zWdieFkSvHwC/2XRMWTiI8pNOljYn8YPZXcfdsV6pAYz49KdLkbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d71Zy22j7znMg; Fri, 14 Nov 2025 02:40: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 5AE2eQaA011063; Fri, 14 Nov 2025 02:40:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE2eQmY011060; Fri, 14 Nov 2025 02:40:26 GMT (envelope-from git) Date: Fri, 14 Nov 2025 02:40:26 GMT Message-Id: <202511140240.5AE2eQmY011060@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: 69f61cee2efb - main - unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 69f61cee2efb1eec0640ca7de9b2d51599569a5d Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=69f61cee2efb1eec0640ca7de9b2d51599569a5d commit 69f61cee2efb1eec0640ca7de9b2d51599569a5d Author: Gleb Smirnoff AuthorDate: 2025-11-14 02:39:48 +0000 Commit: Gleb Smirnoff CommitDate: 2025-11-14 02:39:48 +0000 unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR The pr_soreceive method first scans the buffer holding the both I/O sx(9) and socket buffer mutex(9) and after figuring out how much needs to be copied out drops the mutex. Since the other side may only append to the buffer, it is safe to continue the operation holding the sx(9) only. However, the code had a bug that it used pointer in the very last mbuf as marker of the place where to stop. This worked both in a case when we drain a buffer completely (marker points at NULL) and in a case when we wanted to stop at MSG_EOR (marker points at next mbuf after MSG_EOR). However, this pointer is not consistent after we dropped the socket buffer mutex. Rewrite the logic to use the data length as bounds for the copyout cycle. Provide a test case that reproduces the race. Note that the race is very hard to hit, thus test will pass on unmodified kernel as well. In a virtual machine I needed to add tsleep(9) for 10 nanoseconds into the middle of function to be able to reproduce. PR: 290658 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53632 Fixes: d15792780760ef94647af9b377b5f0a80e1826bc --- sys/kern/uipc_usrreq.c | 87 +++++++++++++++++------------------- tests/sys/kern/unix_seqpacket_test.c | 62 +++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 46 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 86e1694fb869..b1cb6de98b5b 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1372,8 +1372,8 @@ uipc_soreceive_stream_or_seqpacket(struct socket *so, struct sockaddr **psa, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp) { struct sockbuf *sb = &so->so_rcv; - struct mbuf *control, *m, *first, *last, *next; - u_int ctl, space, datalen, mbcnt, lastlen; + struct mbuf *control, *m, *first, *part, *next; + u_int ctl, space, datalen, mbcnt, partlen; int error, flags; bool nonblock, waitall, peek; @@ -1457,22 +1457,16 @@ restart: control = NULL; /* - * Find split point for the next copyout. On exit from the loop: - * last == NULL - socket to be flushed - * last != NULL - * lastlen > last->m_len - uio to be filled, last to be adjusted - * lastlen == 0 - MT_CONTROL, M_EOR or M_NOTREADY encountered + * Find split point for the next copyout. On exit from the loop, + * 'next' points to the new head of the buffer STAILQ and 'datalen' + * contains the amount of data we will copy out at the end. The + * copyout is protected by the I/O lock only, as writers can only + * append to the buffer. We need to record the socket buffer state + * and do all length adjustments before dropping the socket buffer lock. */ - space = uio->uio_resid; - datalen = 0; - for (m = first, last = sb->uxst_fnrdy, lastlen = 0; - m != sb->uxst_fnrdy; + for (space = uio->uio_resid, m = next = first, part = NULL, datalen = 0; + space > 0 && m != sb->uxst_fnrdy && m->m_type == MT_DATA; m = STAILQ_NEXT(m, m_stailq)) { - if (m->m_type != MT_DATA) { - last = m; - lastlen = 0; - break; - } if (space >= m->m_len) { space -= m->m_len; datalen += m->m_len; @@ -1480,29 +1474,29 @@ restart: if (m->m_flags & M_EXT) mbcnt += m->m_ext.ext_size; if (m->m_flags & M_EOR) { - last = STAILQ_NEXT(m, m_stailq); - lastlen = 0; flags |= MSG_EOR; + next = STAILQ_NEXT(m, m_stailq); break; } } else { datalen += space; - last = m; - lastlen = space; + partlen = space; + if (!peek) { + m->m_len -= partlen; + m->m_data += partlen; + } + next = part = m; break; } + next = STAILQ_NEXT(m, m_stailq); } - UIPC_STREAM_SBCHECK(sb); if (!peek) { - if (last == NULL) + STAILQ_FIRST(&sb->uxst_mbq) = next; +#ifdef INVARIANTS + if (next == NULL) STAILQ_INIT(&sb->uxst_mbq); - else { - STAILQ_FIRST(&sb->uxst_mbq) = last; - MPASS(last->m_len > lastlen); - last->m_len -= lastlen; - last->m_data += lastlen; - } +#endif MPASS(sb->sb_acc >= datalen); sb->sb_acc -= datalen; sb->sb_ccc -= datalen; @@ -1629,33 +1623,34 @@ restart: } } - for (m = first; m != last; m = next) { + for (m = first; datalen > 0; m = next) { + void *data; + u_int len; + next = STAILQ_NEXT(m, m_stailq); - error = uiomove(mtod(m, char *), m->m_len, uio); + if (m == part) { + data = peek ? + mtod(m, char *) : mtod(m, char *) - partlen; + len = partlen; + } else { + data = mtod(m, char *); + len = m->m_len; + } + error = uiomove(data, len, uio); if (__predict_false(error)) { - SOCK_IO_RECV_UNLOCK(so); if (!peek) - for (; m != last; m = next) { + for (; m != part && datalen > 0; m = next) { next = STAILQ_NEXT(m, m_stailq); + MPASS(datalen >= m->m_len); + datalen -= m->m_len; m_free(m); } - return (error); - } - if (!peek) - m_free(m); - } - if (last != NULL && lastlen > 0) { - if (!peek) { - MPASS(!(m->m_flags & M_PKTHDR)); - MPASS(last->m_data - M_START(last) >= lastlen); - error = uiomove(mtod(last, char *) - lastlen, - lastlen, uio); - } else - error = uiomove(mtod(last, char *), lastlen, uio); - if (__predict_false(error)) { SOCK_IO_RECV_UNLOCK(so); return (error); } + datalen -= len; + if (!peek && m != part) + m_free(m); } if (waitall && !(flags & MSG_EOR) && uio->uio_resid > 0) goto restart; diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index b9a6be015241..27bd430430b4 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -1314,6 +1314,67 @@ ATF_TC_BODY(random_eor_and_waitall, tc) free(params.records); } +/* See bug 290658. */ +#define PEEK_RACE_SIZE 10 +#define PEEK_RACE_TRIES 10000 +static void * +peek_race_writer(void *args) +{ + struct timespec ts = {}; + u_short seed[3]; + char buf[PEEK_RACE_SIZE]; + int fd = *(int *)args; + + arc4random_buf(seed, sizeof(seed)); + for (u_int i = 0; i < PEEK_RACE_TRIES; i++) { + ATF_REQUIRE_EQ(PEEK_RACE_SIZE, + send(fd, buf, sizeof(buf), MSG_EOR)); + ts.tv_nsec = nrand48(seed) % 20; + (void)clock_nanosleep(CLOCK_MONOTONIC_FAST, 0, &ts, NULL); + } + + return (NULL); +} + +static void * +peek_race_peeker(void *args) +{ + char buf[PEEK_RACE_SIZE * 10]; + int fd = *(int *)args; + + for (u_int i = 0; i < PEEK_RACE_TRIES; i++) { + ssize_t rcvd; + + while ((rcvd = recv(fd, buf, sizeof(buf), + MSG_PEEK | MSG_DONTWAIT)) == -1) + ATF_REQUIRE(errno == EAGAIN); + ATF_REQUIRE(rcvd == PEEK_RACE_SIZE); + + ATF_REQUIRE_EQ(PEEK_RACE_SIZE, + recv(fd, buf, sizeof(buf), 0)); + } + + return (NULL); +} + +ATF_TC_WITHOUT_HEAD(peek_race); +ATF_TC_BODY(peek_race, tc) +{ + pthread_t peeker, writer; + int sv[2]; + + do_socketpair(sv); + + ATF_REQUIRE_EQ(0, pthread_create(&writer, NULL, peek_race_writer, + &sv[0])); + ATF_REQUIRE_EQ(0, pthread_create(&peeker, NULL, peek_race_peeker, + &sv[1])); + ATF_REQUIRE_EQ(0, pthread_join(writer, NULL)); + ATF_REQUIRE_EQ(0, pthread_join(peeker, NULL)); + close(sv[0]); + close(sv[1]); +} + /* * Main. */ @@ -1370,6 +1431,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, pipe_128k_8k); ATF_TP_ADD_TC(tp, pipe_128k_128k); ATF_TP_ADD_TC(tp, random_eor_and_waitall); + ATF_TP_ADD_TC(tp, peek_race); return atf_no_error(); } From nobody Fri Nov 14 04:15:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d73j64yV8z6Gry2; Fri, 14 Nov 2025 04:15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d73j63cSPz3Jdg; Fri, 14 Nov 2025 04:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763093754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDmnW+ICjdP2es31ht06G3b3hiWgjLmPwTqCf/U8t+8=; b=JNp4MGVysTaRfcwP5iHyOGlzin+pSs+8FdCp4sRAaMeWwFf66EM7cCykgYtk4shImCpXJE tJq4Dylt0UjbWgJj1dW95H4rbDNh/6dlViHxyFksUMMtOIlz6n4A0lVh1ngdapX79egQSK orwOBtxthC4vzfGALQN+s5No90uzzDlvO/WV9IN0Jl3IpSCYbuhJoGAMeiiO042oZVI8Lq QxZC6M9RBZ/vQ7/XPT3oXQjemdfJi8k9C856gh4IaPdom8UtkDucpPotJ1DlP9c+kwAm7Z 2vj9YZ0MvBUGaq6bBnjWx/LLy3jSt/N4p3GMGR6QyaN+u0p+NBEUeCPdwxMB7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763093754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDmnW+ICjdP2es31ht06G3b3hiWgjLmPwTqCf/U8t+8=; b=mHWxhoNgJJLGiFZusdgZ1p4PjCMvCbjmwaArRd1kkzQlY9Q6RVsWnG9M2QFHbCNYFac3r1 pnVp4CS5pO5byukQbV05BjZhXMMm42HclAIao044EE3T2MGEkM7s/2fs07krnZ7knYyuGi Ai7sbpd1H7Omonr0QiSGX5z/ZfbpyOxP2UtQe/q8eViBFx9s3dMs9335sL8UN2KVYueHuZ 2MyNRv6mwUQPd8oJTMUxNhu3GkApuzFpBf0R9inVSb/UZMTmddptm4xhVF/+GMrcjbWHVR VzsVR84ZgXAkdy3+rSVceU8JWlIeS8JSdAEx3oOuVysxzLcDEZawuqXLjVGyyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763093754; a=rsa-sha256; cv=none; b=hY5Q/e72t4BcDr39wwesAIW9KN7+Sr4KXcGrAZ2O7ZZVxtCSDZuBp2pA/32DuS5jq1BTiF DEkUpbGUKbwD4qGdSue29VeLBsmTm58wvSk99k3sKsoS+NBAJHBEkY+AQH9h1hGNYKp/dn 57Zq4xWhm4trqQTA1TKfS/YK/wk0MmqIAZznJISNgzkY0BNAty17t6l2g4REwX3h4QCG+K wE6xtnyKc2ADkujT0kIdossyGv1oiKnX77Af2zd3sjyyzUaNP0cuyMxccHucj45dXVZPdx 9h02zDC3/Sy4bBK7UClt7DLGKhzPZ2JzRGhYiAOObjELlzECjHYnM2Lr/noxJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d73j637H1zrK2; Fri, 14 Nov 2025 04:15: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 5AE4Fsjq091719; Fri, 14 Nov 2025 04:15:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE4FsDL091716; Fri, 14 Nov 2025 04:15:54 GMT (envelope-from git) Date: Fri, 14 Nov 2025 04:15:54 GMT Message-Id: <202511140415.5AE4FsDL091716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 8cd9c39195b5 - main - hgame.4: typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cd9c39195b5fa35ef126a0153d23fbfd60729cf Auto-Submitted: auto-generated The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=8cd9c39195b5fa35ef126a0153d23fbfd60729cf commit 8cd9c39195b5fa35ef126a0153d23fbfd60729cf Author: Maxim Konovalov AuthorDate: 2025-11-14 04:13:27 +0000 Commit: Maxim Konovalov CommitDate: 2025-11-14 04:13:27 +0000 hgame.4: typo --- share/man/man4/hgame.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/hgame.4 b/share/man/man4/hgame.4 index f816d2a442d0..94ad4f5ff4a4 100644 --- a/share/man/man4/hgame.4 +++ b/share/man/man4/hgame.4 @@ -94,7 +94,7 @@ larger values increase debug message verbosity. Default is 0. .El .Pp -It's default value is set with +Its default value is set with .Xr loader 8 tunable: .Bl -tag -width indent From nobody Fri Nov 14 06:11:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d76Gz1KYqz6H2QM; Fri, 14 Nov 2025 06:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d76Gy5yntz3Sbw; Fri, 14 Nov 2025 06:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763100714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXwHt8bM5LTxCRoXpTUeZF4jI+aCdUOM96Ugobs3yD8=; b=stlPkP1kAR5S+U1UzTr/0Jn18Lbpji72sptrWNqwKopKgNHmSQ4Us++4PBRuE2YPTmEjrF LgSEfjSWp1JEwtTY2qYIe0gtK7u2890315Bywd/o2SrpIHMf7FJP4qVs2eEIoIN0K0vpVC q3/CTqOR2V+o6GIo33BO+0bm2elqhQzxng7MpaLgubDdXUp/z08YTlNNk687kJLtGlSju5 jsNBYgPQ/JrbRstM98Bxm91tD9jEDl9g8qjJxin2gcap9/Vj168UQRhZhzk7bYS8Rfcc6c gfcDqpXd2WW4DanS4zwAtgK5TSemVNtdYDMULDWNakBpIuW/SYP7AIQKLojsGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763100714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXwHt8bM5LTxCRoXpTUeZF4jI+aCdUOM96Ugobs3yD8=; b=Sw8FizGEo2EIykC9okgQgy8nRiSZS4sHkdjgWjbUK3JJcsiqQxIH+3sae65d9iwHM76ESR s2DYDgZqW+Gg/FT8BBECsOT3Q3NZXFc4Q25zDXDXx9V+//O8E8YTCvV9hzd24kDR5AgPI1 IF+QCBVBJtVY4sX8VdIp3k2dXSm7cDTXpK5QbPLgnxDuv3lGXbMSVrQVD0EYxVOz1kvQYm UtUjfv+p168UiGUctcSQQaWPXCa2J5pjVv7JIab5UA/cM+EHC2luLNCc9IyJe2qpt5dNkr /WNjgOEqHdrWCWF3lbxM2bUmsZer4Dt15ZDwmxL+hhGxOEI8lWDL0HwlLac2oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763100714; a=rsa-sha256; cv=none; b=BtGqokS1BCoVPvg6JlmHMNwxfBXttBwmX2/sRlxWFNsTHMQwNqpPODgjytGjDCxuZdCLPf Wzm36LJol2Eyt9FC29UscYyInMNHiYa12IMDKmgMZTdQ9jnXZ2/RKr5FyT63UJH7/Un0cp VLRezEtOwJFw6d17CWgoJ1efe2HtA05ewDOzmNBTzhMx6oux8dz4W0AkyAb/K/fmkAIaPi kgCHNLDQXZmP5I9Y3smuSUhU+5gSMUF3CDnLbJgfBQCumU1ShPHrv7SCtnX6Dzj925IaYy waOPSxZtMFoDCeanwoFGB29Bt7N7+a9CJsK3olgYEdThE8/Ig/0LsVcQKB5p3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d76Gy5CxmzvPX; Fri, 14 Nov 2025 06:11: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 5AE6BsgH013718; Fri, 14 Nov 2025 06:11:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE6BsXT013715; Fri, 14 Nov 2025 06:11:54 GMT (envelope-from git) Date: Fri, 14 Nov 2025 06:11:54 GMT Message-Id: <202511140611.5AE6BsXT013715@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: 4d2d65cad497 - main - Fix typo in recently added 400G media List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 4d2d65cad49765a084819195d81a7c0043f1938c Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=4d2d65cad49765a084819195d81a7c0043f1938c commit 4d2d65cad49765a084819195d81a7c0043f1938c Author: Navdeep Parhar AuthorDate: 2025-11-14 06:02:28 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-14 06:10:35 +0000 Fix typo in recently added 400G media Reported by: glebius Fixes: 2d608a4cebbd if_media.h: Add 400GBase-SR8 and 400GBase-CR8 MFC after: 1 week Sponsored by: Chelsio Communications --- sys/net/if_media.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_media.h b/sys/net/if_media.h index 8196a54c8ba9..892b7d1e3e52 100644 --- a/sys/net/if_media.h +++ b/sys/net/if_media.h @@ -553,7 +553,7 @@ struct ifmedia_description { { IFM_400G_AUI8_AC, "400G-AUI8-AC" }, \ { IFM_400G_AUI8, "400G-AUI8" }, \ { IFM_400G_SR8, "400GBase-SR8" }, \ - { IFM_400G_SR8, "400GBase-CR8" }, \ + { IFM_400G_CR8, "400GBase-CR8" }, \ { 0, NULL }, \ } From nobody Fri Nov 14 08:44:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d79fZ41Q9z6HF1Y; Fri, 14 Nov 2025 08:44: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d79fZ2FtJz3kJr; Fri, 14 Nov 2025 08:44:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763109846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N+V9RCHXcfbyvsynrZHuks1kl8lQYwKw3NdDdKuuwsE=; b=jWPYGH4XCdq6TImIJEKnNFcF+7Ts94xDb3LsccvTnypMpI3nF0MtgZUoqqgS9xt56cAs8S 8Q50fxAIR1FpGBhnJm+C1gSnjiMaN0aNFaaib0I6yzK/VVl+knp83kw25D+2gGI24UpnqG ScVdrvQ5Nwf0Snv/M2bYa4bMyYLM6Xx2UQQoaT7Z7nyaNaAcxp1XQd9/5BVen97HzbEwZ7 ZpfWy0mnGMEe5wcQ0WPEEKJIcSTksoFcR5ZBnofWeh/lnFp+cUckPRK+Uq2sWHEF5mP2r+ 2k5fIMBR6Y1kAElv5HIEk9dz6DXXIsKlvOABOC1kI+0GWYA+TE4NoGgYbjlorQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763109846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N+V9RCHXcfbyvsynrZHuks1kl8lQYwKw3NdDdKuuwsE=; b=Eijviege/ZtXQZ6OHOfZqyWk/rhin8U2wO1uxEnWL938Oq5lC8Z8q+tnq1F3do3DRz0kCZ IEIq+L3eW8HlKGpiw9PF5nginGPHEpqs9vO+Sa7uyzgu4vErsfMdYvFPWf2R+USTYDOQ+0 4dIBR36kilBCGuaGfO8uuCBnRMBFUkCWCcUWIZM6/K523zyNAw3P88Um08E3m9QPrY29In +tERzZ8MiOKSrgs7SwMPdMAulKZ4MX2E52BI2UNAJRs5rs0BWGI0kDREta/RPep5LzCz9/ 3gWoTfnq5qnltXZl9U0xbB+16orZm3fQvd8jJFKnF5kZtfPB9pizEX/duXuoHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763109846; a=rsa-sha256; cv=none; b=fM224mIsyw0K0QAw/IyVOl+XYhf8FmZnDTzVczqUOJs6Xmllp/427dnpWWvYpztz+Hc+Ag +Xo9T0GGY7q6PvR8E4sFx1SpAFERU/iw6u1Tkr7MJ83kWUHh4ua8Rr50tN/Z1WzijeQN+Z fmvcWZwdzohlffIlYRkut9XA8gUX7W2BqGjb/mbOk+RyYvwLw4bfdEqiW1pISAfY+oQ665 +gQPetPWB72uk3jhfaYFWfcQqzalLkszSJuTyye4On+R+UOxwCtL47cG+2mpcQbeCBuhDr zE6R9HRprdA3H1IRpo/ppcXUQGP/61lVI7ThXio0PFqc2aRNISpQXV8Lpf0Asg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d79fZ1sSvz10by; Fri, 14 Nov 2025 08:44: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 5AE8i6Rn098044; Fri, 14 Nov 2025 08:44:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE8i6iC098040; Fri, 14 Nov 2025 08:44:06 GMT (envelope-from git) Date: Fri, 14 Nov 2025 08:44:06 GMT Message-Id: <202511140844.5AE8i6iC098040@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: b0cfa27c91c4 - main - cxgbe(4): Avoid racy access to requested_fec in sysctl_requested_fec List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: b0cfa27c91c400dcf3e8441cc04f9e5300c7c3af Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=b0cfa27c91c400dcf3e8441cc04f9e5300c7c3af commit b0cfa27c91c400dcf3e8441cc04f9e5300c7c3af Author: Navdeep Parhar AuthorDate: 2025-11-14 07:45:59 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-14 07:45:59 +0000 cxgbe(4): Avoid racy access to requested_fec in sysctl_requested_fec PR: 289121 Reported by: Qiu-ji Chen MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D52199 --- sys/dev/cxgbe/t4_main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 4ce8d71ed86f..9bd5e02fabf0 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -9007,7 +9007,7 @@ sysctl_requested_fec(SYSCTL_HANDLER_ARGS) struct adapter *sc = pi->adapter; struct link_config *lc = &pi->link_cfg; int rc; - int8_t old; + int8_t old = lc->requested_fec; if (req->newptr == NULL) { struct sbuf *sb; @@ -9016,16 +9016,15 @@ sysctl_requested_fec(SYSCTL_HANDLER_ARGS) if (sb == NULL) return (ENOMEM); - sbuf_printf(sb, "%b", lc->requested_fec, t4_fec_bits); + sbuf_printf(sb, "%b", old, t4_fec_bits); rc = sbuf_finish(sb); sbuf_delete(sb); } else { char s[8]; int n; - snprintf(s, sizeof(s), "%d", - lc->requested_fec == FEC_AUTO ? -1 : - lc->requested_fec & (M_FW_PORT_CAP32_FEC | FEC_MODULE)); + snprintf(s, sizeof(s), "%d", old == FEC_AUTO ? -1 : + old & (M_FW_PORT_CAP32_FEC | FEC_MODULE)); rc = sysctl_handle_string(oidp, s, sizeof(s), req); if (rc != 0) @@ -9042,7 +9041,10 @@ sysctl_requested_fec(SYSCTL_HANDLER_ARGS) if (rc) return (rc); PORT_LOCK(pi); - old = lc->requested_fec; + if (lc->requested_fec != old) { + rc = EBUSY; + goto done; + } if (n == FEC_AUTO) lc->requested_fec = FEC_AUTO; else if (n == 0 || n == FEC_NONE) From nobody Fri Nov 14 14:29:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7KJh5pBxz6GWG3; Fri, 14 Nov 2025 14:29: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7KJh51Z1z3QQ0; Fri, 14 Nov 2025 14:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763130548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JbcpeRc2U62p36tVsIvAtnDzq0bmr3GsGsBhHsEu7Xw=; b=V8IohVnd/4+cjRfCUoeIXUXqqdgfKFK3SeiCVoOXXk6s4CgWDpNsMSM7Np1rk+uOrxp72o hfA0ZKykj2qOyuRSOOrdaEoGX/NAjuVDu52UiDtGdwlHGy0aLQeiaXZhtFVxwMQU1iw/cK uChUa9ecr0QjTLKQDV1ojYhmkqnoPyOx5uN0HvIoNGKYfTs/UnT7TiG1bi3xKRdFODHBQw SMA2obZLhfp0OeHVLuhIuwv6razC1j3RJ+LLZIVVq+XqJLfUX7hKMlL3UtDe/mUIsVOhVS 27n46BCgN04NyvmE9F266AdRfAudfAvrGjWdClJCWCEiLUixKWjocEXAiETZbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763130548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JbcpeRc2U62p36tVsIvAtnDzq0bmr3GsGsBhHsEu7Xw=; b=k5XVWUODZfKaWjC5LdqEpIjluFjUpHawMCeshMezfQgL4hWewng1GMLlOWUpmGaQYE94Nk KxiMnReWmQo3yB8wPIRQrFmMVQHFKhLrzYyEWb42D/5ll9Wvq/NgJFgiLrw7twZVZz2SBP 5xJ0ZY1U35AnWvxvEWAXIql63/TWGwlo8/CaRehUDQcfbMQKv8xZ9ZQf5NajUy7/1Z9gAH mQVEHhO1tNx7x3pixExnpo1YIVIe+WXvlPeQT2HIppN/MELUjYv36e9TTWsDwn4F1wtwPd D4V4vNbXlgSQDijM9COZsW9WKRdx9IqX2BVjkDSIjLYj4Q4rDaeFOZsarG5u5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763130548; a=rsa-sha256; cv=none; b=Y+lpfmY64ZQjGE34WHA4Q9ngtQ3PHfjpwxrD55q6huVni3w8+Tlz1n2IUKYfggZz+1bZFO PhfO6pWLUhjSw5FE57KPgj6b8NQuz6KkyBCTs1tM+L/app6RM9Pr2YUmkL9iAfQrbuqA0S B/Xiw89pUTdowU8Ks5CL4btQPArrozckYyKbGi6wGNkFb0fmBkARj2fQh0GcKbHSOGGArf Q1c1+sRuex4+YIp/eJIFo1bZEt0A1Id2JSL864Ssfgt1v0swjd+f6OIg/7/yjhXUFspTAJ ZLE+R9pFk9Xo3uxz0TXM72aIaumiNY/azJ17RbS+8y2QlHM4lzuL5Hi4b9rg9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7KJh4Yyvz198K; Fri, 14 Nov 2025 14:29: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 5AEET82f039049; Fri, 14 Nov 2025 14:29:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AEET8pU039046; Fri, 14 Nov 2025 14:29:08 GMT (envelope-from git) Date: Fri, 14 Nov 2025 14:29:08 GMT Message-Id: <202511141429.5AEET8pU039046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: fa272a527686 - main - quot: Rewrite -n mode input parser List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa272a5276865a97b01823fe6546940eaaf1b164 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=fa272a5276865a97b01823fe6546940eaaf1b164 commit fa272a5276865a97b01823fe6546940eaaf1b164 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-14 14:28:40 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-14 14:29:05 +0000 quot: Rewrite -n mode input parser The existing parser was needlessly complicated and wildly inconsistent in how it handled invalid input. Rewrite using getline() and treat invalid input consistently: silently ignore lines that don't begin with a number, and print a warning if the inode number is out of range. PR: 290992 MFC after: 1 week Reviewed by: obrien Differential Revision: https://reviews.freebsd.org/D53726 --- usr.sbin/quot/quot.8 | 3 ++- usr.sbin/quot/quot.c | 47 +++++++++++++++++++++------------------- usr.sbin/quot/tests/quot_test.sh | 19 ++++++++++++++++ 3 files changed, 46 insertions(+), 23 deletions(-) diff --git a/usr.sbin/quot/quot.8 b/usr.sbin/quot/quot.8 index 32e666e2a863..69c0a2d84b9b 100644 --- a/usr.sbin/quot/quot.8 +++ b/usr.sbin/quot/quot.8 @@ -27,7 +27,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 15, 2025 +.Dd November 13, 2025 .Dt QUOT 8 .Os .Sh NAME @@ -60,6 +60,7 @@ By default, all sizes are reported in 512-byte block counts. Given a list of inodes (plus some optional data on each line) in the standard input, for each file print out the owner (plus the remainder of the input line). +Lines that do not begin with a number are ignored. This is traditionally used in the pipe: .Bd -literal -offset indent diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 5dda36ac8499..d2f7646f7041 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -390,41 +391,43 @@ douser(int fd, struct fs *super) static void donames(int fd, struct fs *super) { - int c; - ino_t maxino; - uintmax_t inode; union dinode *dp; + char *end, *line; + size_t cap; + ssize_t len; + intmax_t inode, maxino; maxino = super->fs_ncg * super->fs_ipg - 1; - /* first skip the name of the filesystem */ - while ((c = getchar()) != EOF && (c < '0' || c > '9')) - while ((c = getchar()) != EOF && c != '\n'); - ungetc(c, stdin); - while (scanf("%ju", &inode) == 1) { - if (inode > maxino) { - warnx("illegal inode %ju", inode); - return; + line = NULL; + cap = 0; + while ((len = getline(&line, &cap, stdin)) > 0) { + if (len > 0 && line[len - 1] == '\n') + line[--len] = '\0'; + inode = strtoimax(line, &end, 10); + /* + * Silently ignore lines that do not begin with a number. + * For backward compatibility reasons, we do not require + * the optional comment to be preceded by whitespace. + */ + if (end == line) + continue; + if (inode <= 0 || inode > maxino) { + warnx("invalid inode %jd", inode); + continue; } if ((dp = get_inode(fd, super, inode)) != NULL && !isfree(super, dp)) { printf("%s\t", user(DIP(super, dp, di_uid))->name); /* now skip whitespace */ - while ((c = getchar()) == ' ' || c == '\t') - /* nothing */; + while (*end == ' ' || *end == '\t') + end++; /* and print out the remainder of the input line */ - while (c != EOF && c != '\n') { - putchar(c); - c = getchar(); - } - putchar('\n'); + printf("%s\n", end); } else { /* skip this line */ - while ((c = getchar()) != EOF && c != '\n') - /* nothing */; } - if (c == EOF) - break; } + free(line); } static void diff --git a/usr.sbin/quot/tests/quot_test.sh b/usr.sbin/quot/tests/quot_test.sh index 21088d162a53..c5e6717adca1 100644 --- a/usr.sbin/quot/tests/quot_test.sh +++ b/usr.sbin/quot/tests/quot_test.sh @@ -15,6 +15,8 @@ quot_setup() atf_check mount /dev/$dev "$mnt" echo "/dev/$dev: ($mnt)" >expect printf "%5d\t%5d\t%-8s\n" 8 2 "#0" >>expect + printf "%s\n" "/dev/$dev" >ninput + echo "/dev/$dev: ($mnt)" >nexpect } # Create a directory owned by a given UID @@ -23,12 +25,25 @@ quot_adduid() local uid=$1 atf_check install -d -o $uid -g 0 mnt/$uid printf "%5d\t%5d\t%-8s\n" 4 1 "#$uid" >>expect + ls -di mnt/$uid >>ninput + printf "%s\t%s\n" "#$uid" mnt/$uid >>nexpect } # Perform the tests quot_test() { local dev=$(cat dev) + # Deliberately add invalid lines to our -n input before the + # valid ones to verify that quot does not abort on first + # error. Note that quot deliberately ignores initial lines + # that don't start with a number, and that after encountering + # at least one line that does start with a number, quot would + # previously terminate on encountering one that doesn't (now + # it simply ignores them). This also tests that we don't + # require whitespace between the inode number and the comment. + echo "0zero" >>ninput + echo "invalid" >>ninput + echo "-1minusone" >>ninput # Create inodes owned by a large number of users to exercise # hash collisions and rehashing. The code uses an open hash # table that starts out with only 8 entries and doubles every @@ -50,6 +65,10 @@ quot_test() atf_check mount -ur /dev/$dev atf_check -o file:expect quot -fkN /dev/$dev atf_check -o file:expect quot -fkN $(realpath mnt) + # Test -n option + atf_check -o file:nexpect \ + -e inline:"quot: invalid inode 0\nquot: invalid inode -1\n" \ + quot -Nn /dev/$dev To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 2f3adab9d512 - main - quot: Improve manual page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f3adab9d512faec3e1891e505d1888db5d0240e Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2f3adab9d512faec3e1891e505d1888db5d0240e commit 2f3adab9d512faec3e1891e505d1888db5d0240e Author: Dag-Erling Smørgrav AuthorDate: 2025-11-14 14:28:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-14 14:29:05 +0000 quot: Improve manual page * Rewrite the first paragraph to clarify that quot(8) only supports FFS. * Document which options can or cannot be combined with each other. MFC after: 1 week Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D53727 --- usr.sbin/quot/quot.8 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/usr.sbin/quot/quot.8 b/usr.sbin/quot/quot.8 index 69c0a2d84b9b..b4b40bf395e9 100644 --- a/usr.sbin/quot/quot.8 +++ b/usr.sbin/quot/quot.8 @@ -41,7 +41,9 @@ The .Nm utility -is used to gather statistics about the disk usage for each local user. +is used to gather per-user disk usage statistics from +.Xr ffs 7 +file systems. .Pp The following options are available: .Bl -tag -width indent @@ -51,8 +53,16 @@ Include statistics for all mounted file systems. Display three columns containing number of blocks per file, number of files in this category, and aggregate total of blocks in files with this or lower size. +This option is mutually exclusive with the +.Fl n +option. .It Fl f For each user, display count of files and space occupied. +This option has no effect if combined with the +.Fl c +or +.Fl n +options. .It Fl k Force the numbers to be reported in kilobyte counts. By default, all sizes are reported in 512-byte block counts. @@ -69,9 +79,17 @@ ls -i | sed -e 's,^ *,,' | sort -k 1n | quot -n filesystem .Ed .Pp to get a report of files and their owners. +This option is mutually exclusive with the +.Fl c +option. .It Fl v In addition to the default output, display the number of files not accessed within 30, 60 and 90 days. +This option has no effect if combined with the +.Fl c +or +.Fl n +options. .El .Sh ENVIRONMENT .Bl -tag -width BLOCKSIZE @@ -88,6 +106,7 @@ size block. .Xr quota 1 , .Xr getmntinfo 3 , .Xr fstab 5 , +.Xr ffs 7 , .Xr mount 8 .Sh HISTORY This implementation of From nobody Fri Nov 14 14:31:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7KMg06Bdz6GWVf; Fri, 14 Nov 2025 14:31: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7KMf6bl5z3RWt; Fri, 14 Nov 2025 14:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763130702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vDgSojQ57JlLQK1k1kYHBdIv0snxKkKRyjUtAepqxS8=; b=Acvn2UKD6+IqpXcFA8kVnNMV+qaR133ENKE9KO+4LpxUjyOqd1Nn1R3x9YNa/70Gzeq8BC qm0SlZbo+nAzfrAhBqvl1rxQGz2JpyC1qkRywRqabLRmZiur4jTU2PT5dskZUSbxiq0w9j +kFjpbRfkWvtUxNTmnsZHfrpVhupFGhPsQDGjQsjynLxT0Xj1gUsWMYEgjgSSjoRDz86MD iFLK4NzR52vEyMOwaOJc5Uzl0mPCvI5zUEwpr82A0NfzbhtWLCYWEdmDUgND96f+4NQWKM oi0wDa4pyqSgwZaYCWHfANekb8zyKSs3B0jMxe/MOPzHuycKwgHzCiFryZEXMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763130702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vDgSojQ57JlLQK1k1kYHBdIv0snxKkKRyjUtAepqxS8=; b=dxO/7gFV159YnGFOy7o1ABPltwG+n9MZ/13oF9UWAbXXYBOGium2EZNADjDA+sO6Oyj8rN f0FhIyYWq63Aj67ApQfxnzriJuI7l2NsrXfWOE6JHsoZtYAEzaH9mFVGjYLN72FH6Dp7Y3 xfj1umrB0esYLLDaWx69TVViqYkBdLSuzGISiem9JZ4IRLZW1lMhgR6xvok3CdEl3Ew+fY zTrQqKJkAqHd+X/IM3KXOqLtaEtK11ZF0EneW/MApvyY0jZ+w/IvIhbqvjaE+c9O0vIZGe FJwLFfHHHqcsNgvHv31pMIoCUuqKi5YpBJ3LnUf5EJm7k+ipZATkFySxJ2WO6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763130702; a=rsa-sha256; cv=none; b=wGbTfxXrH2uRR4qTD151OsQJ7ngTNrCxmS1BV9wa7qkfQDRHArCtwBMKIOcpd79xvQSIia g8qnU4gZdxEFyV0NCUjzAU7XVhyMVVNCBZAJeOBqdoWPXfYlBZKVbTouvJS12iCxlqTGDO gEx7mxd+kZBFr0gudFs9epb+r7KFgZPBs8c9eaU0QpRESHDrhvL7EwF3OHIRddNGQoqiEM gWBRnWIZh3HGJmRvaWYRKWbRWd3R2KiHrCP/eAulRo1fcQeU4j17wb+VXnysbB1tA7ZSYl gxVGwX+UDVD8alNsPRC3KnJAIH11Ymq1rSC5RHsxOhtW3JfR1VNcX48jEKDlwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7KMf6Bgnz18Wn; Fri, 14 Nov 2025 14:31: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 5AEEVgPx052342; Fri, 14 Nov 2025 14:31:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AEEVg1a052330; Fri, 14 Nov 2025 14:31:42 GMT (envelope-from git) Date: Fri, 14 Nov 2025 14:31:42 GMT Message-Id: <202511141431.5AEEVg1a052330@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: 1563da200d4d - main - queue.3: Add MLINKs for *_EMPTY_ATOMIC List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 1563da200d4d3d56799267f1bbc58933a6c21331 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1563da200d4d3d56799267f1bbc58933a6c21331 commit 1563da200d4d3d56799267f1bbc58933a6c21331 Author: Mark Johnston AuthorDate: 2025-11-10 15:30:50 +0000 Commit: Mark Johnston CommitDate: 2025-11-14 14:31:16 +0000 queue.3: Add MLINKs for *_EMPTY_ATOMIC MFC after: 1 week Fixes: d2870b8666f2 ("queue: Add atomic variants for *_EMPTY") --- share/man/man3/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index 18e439491793..bce57291f073 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -203,6 +203,7 @@ MLINKS+= Q_SIGNSHFT.3 Q_SSIGN.3 \ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 LIST_CLASS_HEAD.3 \ queue.3 LIST_EMPTY.3 \ + queue.3 LIST_EMPTY_ATOMIC.3 \ queue.3 LIST_ENTRY.3 \ queue.3 LIST_FIRST.3 \ queue.3 LIST_FOREACH.3 \ @@ -224,6 +225,7 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 SLIST_CLASS_ENTRY.3 \ queue.3 SLIST_CLASS_HEAD.3 \ queue.3 SLIST_EMPTY.3 \ + queue.3 SLIST_EMPTY_ATOMIC.3 \ queue.3 SLIST_ENTRY.3 \ queue.3 SLIST_FIRST.3 \ queue.3 SLIST_FOREACH.3 \ @@ -246,6 +248,7 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 STAILQ_CLASS_HEAD.3 \ queue.3 STAILQ_CONCAT.3 \ queue.3 STAILQ_EMPTY.3 \ + queue.3 STAILQ_EMPTY_ATOMIC.3 \ queue.3 STAILQ_ENTRY.3 \ queue.3 STAILQ_FIRST.3 \ queue.3 STAILQ_FOREACH.3 \ @@ -270,6 +273,7 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 TAILQ_CLASS_HEAD.3 \ queue.3 TAILQ_CONCAT.3 \ queue.3 TAILQ_EMPTY.3 \ + queue.3 TAILQ_EMPTY_ATOMIC.3 \ queue.3 TAILQ_ENTRY.3 \ queue.3 TAILQ_FIRST.3 \ queue.3 TAILQ_FOREACH.3 \ From nobody Fri Nov 14 14:34:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7KQc5NZ7z6GWGP; Fri, 14 Nov 2025 14:34: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7KQc3wh8z3S9M; Fri, 14 Nov 2025 14:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763130856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ecafgDMt2khMTSlH84FpMxpBzjXWGMKkwdq8VfDvlqU=; b=VvhEd9P/yIYvJgR98IIX1gi5aF1DB2ki7KanGoAetZlnlz5RNXiD4vpR27qTcJYCFcWtzq cD8arMrRYRhRSaJ9oqqBMsASQguvx/72VYBMb+OlTR0MLpKmWfX/QGAEbgHVGr+7YpIpKU 9w1hhMyMF8p811QtIQtWI6tP/pCE5yVzvLCofgsmV+2uj3ArObwsoPkfqzgQMXulaDj/4c oi/c5cvnvJAlYUSe1wky371nRfCQFPc1rOlzct2BQwe6py4dxrhcnHuzlwJonCifHSg9HG ziooRpcHKAdSd/g8r14jylPa3BpHqDoXvprIk0O4WwVtjHFXOsL965iUEc9CXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763130856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ecafgDMt2khMTSlH84FpMxpBzjXWGMKkwdq8VfDvlqU=; b=kjrBuvo5tK9Lgd+alR4h/KpleK2urbr8lgJs0orpK7YEy+DU3H8lYPt35rklKf7XoYkxgP S4myeCWD1Bz/P9v3aMVpxna7eFPVIhTEp9WLRv6bVmVZh8+4X6PJFjVGmA4HJ5xZaKdxIN qR8prqTRHfYSd/Cfljl6ogYczGiupQOChs0J6E4qZQO05u+SLpFH2mlgi6IWRhDi4GzPdS xmHXbPeXNbbYREIJjyNDuh1hS8D2gaIHIr06p4g/ITUfe1zvlikNS1NUvhVpfTC2uB8lGA 46CmiDrxxWYNlqTulQiOckA/Q6Y4IlTdzuf3iSsx5ho7ffJ1Y9zXjE9PqlXtkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763130856; a=rsa-sha256; cv=none; b=BqN314FGw1X2UnPdxAoaEdx7Meu0WRYut3ax1nfXq41EpYzgnfFyCqc4M8c6tK5PbC6vxf RFi4ig9waISZhOfHrtHawBwLtgTjWgk8+wHFAa/A0zdNBMDbvS55kwRiC0TRJH4Vz3rejw gMN2hnJ55IAgSviW7KPUZ+ep6YDVM/31TZOUqz3CrpUSTTvqIEMgQBgZMdzkUAozUPBkOM /aT5+1WiTsVzONZgoDGii92QrZC+IL6ULtBO/AYLjvfzb1uk37jEOe0Rs1qyW26WsvGTZb XxZ+a77J59j0vpwPDpZ2LzssMUjgx8WI7VcnbNowmUwmwwfuNm9WEZdNiOkFnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7KQc3HWPz19LC; Fri, 14 Nov 2025 14:34: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 5AEEYGmh057047; Fri, 14 Nov 2025 14:34:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AEEYG94057044; Fri, 14 Nov 2025 14:34:16 GMT (envelope-from git) Date: Fri, 14 Nov 2025 14:34:16 GMT Message-Id: <202511141434.5AEEYG94057044@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: 0eca7fa1c96f - main - exterror.9 man page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0eca7fa1c96f779039dd70eeeb0585ac12d153da Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0eca7fa1c96f779039dd70eeeb0585ac12d153da commit 0eca7fa1c96f779039dd70eeeb0585ac12d153da Author: Konstantin Belousov AuthorDate: 2025-11-04 21:45:55 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-14 14:33:54 +0000 exterror.9 man page With help from: mckusick Reviewed by: emaste, pauamma_gundo.com Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53589 --- share/man/man9/Makefile | 1 + share/man/man9/exterror.9 | 137 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index fecde7152f80..22358e8d033a 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -150,6 +150,7 @@ MAN= accept_filter.9 \ EVENTHANDLER.9 \ eventtimers.9 \ extattr.9 \ + exterror.9 \ fail.9 \ fdt_pinctrl.9 \ fetch.9 \ diff --git a/share/man/man9/exterror.9 b/share/man/man9/exterror.9 new file mode 100644 index 000000000000..79197e4a187d --- /dev/null +++ b/share/man/man9/exterror.9 @@ -0,0 +1,137 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" This documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.Dd November 5, 2025 +.Dt EXTERROR 9 +.Os +.Sh NAME +.Nm exterror +.Nd provide extended error information to userspace +.Sh SYNOPSIS +.Bd -literal -offset left -compact +#define EXTERR_CATEGORY EXTERR_CAT_MYCATEGORY +.Ed +.In sys/exterrvar.h +.Ft int +.Fn EXTERROR "int error" "const char *msg" ... +.Sh DESCRIPTION +The +.Nm +framework allows the kernel to return additional information about an error +along with the standard +.Xr errno 3 +error code, which is terse and often lacking context. +.Pp +The terseness is especially visible with commonly overloaded error codes like +.Er EINVAL +or +.Er EIO , +which occur at many places for a given syscall, or even +outside the context of the current kernel call. +Identifying the specific cause for the returned error using only the +.Va errno +value requires searching for all instances that the error is returned +in the kernel and trying to guess which is the most likely code path +to have returned the error. +.Nm +attaches additional data to the error itself +and records the error category and +the kernel source code file line number. +The intent of +.Nm +is to make it easier for a user to identify the cause of the error. +.Sh USAGE +Before +.Nm +can be used in the given source .c file, the category of extended errors +should be allocated in the +.In sys/exterr_cat.h +file. +The category is the unique integer, that, together with the source +line number, uniquely identifies the extended error occurrence. +Then, the +.Va EXTERR_CATEGORY +symbol should be defined as an alias for the allocated category, as +shown in the summary. +.Pp +A typical code fragment to report an error is just +.D1 return (EINVAL); +An extended error can augment the error code with additional information: +.D1 return (EXTERROR(EINVAL, \[dq]Invalid length\[dq])); +The error data and metadata is saved in the current thread storage. +The metadata includes the category and the source file line number. +.Pp +Arguments to the +.Fn EXTERROR +macro: +.Bl -dash +.It +The first argument to +.Fn EXTERROR +is the errno error code. +.It +The second argument is a constant string with the unbound lifetime, +which should tersely provide enough human-readable details about +the error. +.It +The +.Fn EXTERROR +macro can take two optional 64-bit integer arguments, +whose meaning is specific to the subsystem. +.El +.Pp +The strings passed as the second argument are only retained +in the kernel text if the +.Cd option EXTERR_STRINGS +was enabled in the kernel config. +Otherwise they are stripped at compile time and are not available +to userspace at runtime. +.Pp +The +.Fn EXTERROR +macro can be used in any context where the current thread is defined. +Specifically, +.Fn EXTERROR +cannot be used in interrupt contexts and context switch code. +Additionally, use of +.Fn EXTERROR +in kernel threads is not sensible as there is no userspace to retrieve +the extended error data. +.Sh USERSPACE ACCESS TO EXTENDED ERROR DATA +There is no syscall overhead for using +.Nm +in the non-error case. +When an error occurs that has supplied extended information, +the kernel copies out that information into the userspace +per-thread area that was registered with the kernel, typically on +image activation, or later at thread startup. +The area is controlled by the +.Xr exterrctl 2 +internal syscall, normally done by the userspace C runtime. +.Pp +Userspace programs do not need to access the extended information +area directly. +There is no field that is stable for the specific error condition. +Instead, the base +.Lb c +functions +.Xr err 3 +and +.Xr warn 3 +were modified to print the extended information if it is available +in addition to the usual +.Va errno +decoding. +.Sh SEE ALSO +.Xr errno 3 , +.Xr err 3 +.Sh HISTORY +The +.Nm +facility was introduced in +.Fx 15.0 . From nobody Fri Nov 14 14:36:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7KTk3gXGz6GWj9; Fri, 14 Nov 2025 14:36: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7KTk2LBpz3Sj7; Fri, 14 Nov 2025 14:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763131018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yl0f7D/I2C1Hlsv1/qTsjSZ7RBg+QanWK/wQoC1tX10=; b=c1/jgAJZAELJPPugM+FlqianRDiJwu83+/aziXad661bJClIHSkG7DIaPhQmo64rD1jcEp mQgaUXPOz4FOJGH2GkWrPXT54Xt6qZUs4Tjuwej8aA9LD8WhdK8wIRhkUz19yQ90c3yjh9 9jk7YUsNRhO/9bhDXWM8Z496s5RrL/T+EXy90zx1KV5eIgvHVc8NkrRUjyYs5ROT2FaG8a ZSWtMu03aczWMj7mzjvBZuWjt5voShb9f8M1iCvOu1cnBcq9VPoqJuMO1FGCndSqaG3SXI hZxEj4Q3YVHQqTKb15STL/uLFtS2WCwHYCIDz0YIrS+g1gU2aMxWs2IKm0ySnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763131018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yl0f7D/I2C1Hlsv1/qTsjSZ7RBg+QanWK/wQoC1tX10=; b=e7CBzojVLITNb1vRKR/1ql41gC+aAeGrcBjSeqrYUulfeA6LMQvColKMqtomHWFpuL4NY5 kkzK0/mZNjjxinJpaRH1l271dD4nOvEvLnv9doP/+MpbcPhtGN2iQvq+km50AwDK231k75 h+t46/0JbPVjnuYPwwqdxldg402bKuBT3Dcz2LnPHh9KLY07fJNWyvt6ItmuZjMmR/wQ13 E1n96UbIdP3xet3L9ffYeLspSpOUyxzHu2qcqOjjNJ5Dl0MwLsJaot0PH7bmVKaocWeSDQ mICL3ENfv7I8gBPQ1B3+GRXqzViZIRgcOLkxe6DhpY74bnGC6ZG/9li7oyBW0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763131018; a=rsa-sha256; cv=none; b=VKqrsj0rocMujecLcCk1EOc5Pb4hJ+F4Mz4G8GoUkNBD0qJsiIbOsaljMGn9g2YYOOZejY u6lfcuHmTpAYnKHKrQrXW4Pu47iOYaBDDcSK/KN7+miN1N8iL1Kao/5uhcig4dajjWspkU jVTysMZZX9B9oxWmz6mMuf4wAIaCtmXHIVfvswIXFbxLc0iDIfUMdPi1OA05CowqFEjS3R NHpG98EpVnSknibhZZI9ysClXUbTdkXNVf++EY/z5IYSMxvij/G9qvYlsit52bSuVXbPi7 lPSQW8kZF1BdwugVwyXbL3j6U2JfaUu3hKdcQ2eIZx4OC7WkovTY9NpIqhCmCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7KTk1r2Vz18mG; Fri, 14 Nov 2025 14:36: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 5AEEawL8057956; Fri, 14 Nov 2025 14:36:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AEEawgq057953; Fri, 14 Nov 2025 14:36:58 GMT (envelope-from git) Date: Fri, 14 Nov 2025 14:36:58 GMT Message-Id: <202511141436.5AEEawgq057953@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: 6a9452c8378a - main - lam: fix using stdin more than once List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 6a9452c8378a1aa767708ad2d235f847c880a21c Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6a9452c8378a1aa767708ad2d235f847c880a21c commit 6a9452c8378a1aa767708ad2d235f847c880a21c Author: Kyle Evans AuthorDate: 2025-11-14 14:36:20 +0000 Commit: Kyle Evans CommitDate: 2025-11-14 14:36:28 +0000 lam: fix using stdin more than once Historically, lam(1) closes stdin once we've hit EOF the first time, which would stop it from doing anything else on subsequent gatherline() calls with another openfile. However, this doesn't seem to be strictly necessary- the EOF flag on FILEs is quite sticky, so we can assume that a subsequent fgetc(stdin) will flag EOF properly. This 'fixes' the below-referenced commit in the sense that it surfaced this problem as a fatal error, but the issue was pre-existing. If we do `lam - -`, then one gatherline() will fclose(stdin) and set `ip->eof` for *that* openfile, while the next one will then observe that STDIN_FILENO has been closed and turn it into an EBADF. Add a few tests that were easy to snipe while I'm here, but I haven't aimed for anything close to exhaustive because I think re@ would prefer this fix go in sooner rather than later to land in 15.0. Minor style adjustment for the previous commit while we're here. Reported by: cperciva Discussed with: jrtc27 Reviewed by: des, jlduran Fixes: 4472fd66d006 ("lam: fail on I/O errors") MFC after: 3 days (tentative) Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53750 --- etc/mtree/BSD.tests.dist | 2 ++ usr.bin/lam/Makefile | 5 ++++ usr.bin/lam/lam.c | 5 +--- usr.bin/lam/tests/Makefile | 5 ++++ usr.bin/lam/tests/lam_test.sh | 59 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 72 insertions(+), 4 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index f7a3b2a33703..0380b925e64c 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1165,6 +1165,8 @@ .. jot .. + lam + .. lastcomm .. limits diff --git a/usr.bin/lam/Makefile b/usr.bin/lam/Makefile index e47ea0a98eaa..faad910f2202 100644 --- a/usr.bin/lam/Makefile +++ b/usr.bin/lam/Makefile @@ -1,3 +1,8 @@ +.include + PROG= lam +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/usr.bin/lam/lam.c b/usr.bin/lam/lam.c index 2194ae7ab596..c1221ca92d0e 100644 --- a/usr.bin/lam/lam.c +++ b/usr.bin/lam/lam.c @@ -213,11 +213,8 @@ gatherline(struct openfile *ip) *p = '\0'; if (c == EOF) { ip->eof = 1; - if (ferror(ip->fp)) { + if (ferror(ip->fp)) err(EX_IOERR, NULL); - } - if (ip->fp == stdin) - fclose(stdin); morefiles--; return (pad(ip)); } diff --git a/usr.bin/lam/tests/Makefile b/usr.bin/lam/tests/Makefile new file mode 100644 index 000000000000..8d41af5e6e09 --- /dev/null +++ b/usr.bin/lam/tests/Makefile @@ -0,0 +1,5 @@ +PACKAGE= tests + +ATF_TESTS_SH= lam_test + +.include diff --git a/usr.bin/lam/tests/lam_test.sh b/usr.bin/lam/tests/lam_test.sh new file mode 100755 index 000000000000..bf3998a42d11 --- /dev/null +++ b/usr.bin/lam/tests/lam_test.sh @@ -0,0 +1,59 @@ +# +# Copyright (c) 2025 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +atf_test_case basic +basic_head() +{ + atf_set "descr" "Test basic lam(1) functionality" +} +basic_body() +{ + printf '1\n2\n3\n' > a + printf '4\n5\n6\n' > b + + atf_check -o inline:"14\n25\n36\n" lam a b +} + +atf_test_case sep +sep_head() +{ + atf_set "descr" "Test lam(1) -s and -S options" +} +sep_body() +{ + printf "1\n" > a + printf "0\n" > b + + atf_check -o inline:"x1x0\n" lam -S x a b + atf_check -o inline:"1x0\n" lam a -S x b + atf_check -o inline:"x10\n" lam -S x a -s '' b + + atf_check -o inline:"x10\n" lam -s x a b + atf_check -o inline:"x1y0\n" lam -s x a -s y b + atf_check -o inline:"1x0\n" lam a -s x b +} + +atf_test_case stdin +stdin_head() +{ + atf_set "descr" "Test lam(1) using stdin" +} +stdin_body() +{ + printf '1\n2\n3\n4\n' > a + + atf_check -o inline:"11\n22\n33\n44\n" lam a - < a + atf_check -o inline:"11\n22\n33\n44\n" lam - a < a + + atf_check -o inline:"12\n34\n" lam - - < a +} + +atf_init_test_cases() +{ + atf_add_test_case basic + atf_add_test_case sep + atf_add_test_case stdin +} From nobody Fri Nov 14 14:40:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7KZ502rPz6GXSC; Fri, 14 Nov 2025 14:40: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7KZ46YXPz3TsB; Fri, 14 Nov 2025 14:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763131244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rYRYECYVxG5Rkv/IZJuaYKYnWX1LNay3C4E98bO21KM=; b=x1INp7+J7Dw1vo9+1JpUmMfO9v/5Dn/Rt79uN26414wPDf6rLypum7F77XWRPk9Teqbrds 99+RiiStpXVXlXN8OrKx5iswu6bv5715YQMECgsBK6vfrlh1u18iCh+XHqRyvd8u8bYx14 A2NoFqx1CVTI1PmaU3zgHcKYb8YR/i/SxQ2jenTDTjhkf2qkVlOjcnJR7v3BNx9AqLHnJd z+i6MZj8/HW/6XGuuZD8ua9PcUorVLvnfZgOIiBnnBhbRGgfNduj7SKRULMznmBm1WVIBU 2LYhCPbcjfUYI2nwu4N2MvMHUzstT1+zy5xrODXnDiEWJn+JjwTLHy8BPpnr5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763131244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rYRYECYVxG5Rkv/IZJuaYKYnWX1LNay3C4E98bO21KM=; b=FemSbE/6nrtdG+o9fLVEEpg4dvdBv5+kpsN2FxaxJ9i3Hk98wiG5POS+jJX3fc3k8JHaj/ ci44A69qLsuDb/SnC/2bWaXWsbACIRKg0czYvbZq6QYvw0IvyZvCYdbLnReWyRdOyik2FV +/v+i/voLiguZeVIOiFnWegfzGFHeaJZfcRAsvJnN7fKCHTm23kuhef5CGmiIQbEy89qRW c7SiP0V4tRsfIecq3zsrWXEk2Ci6c/2nW5BYPv08USVH+WROo6u+oMF+/joM9ZR5K/w5YJ otaGRQIvAqsCa33h9Z1yUd/jexluTvsHWnakpr7jC/3f9S6eRg4J3bUJ6i1fVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763131244; a=rsa-sha256; cv=none; b=CUoeZA0dKbg4lPHpjlkPypgOKXbrTHm64xbLQqCECgIwN8vXAJ5NEPHGVb8dTaee7PaMf0 +025XnEEmBxxVMzJ3exJbfpRhXT9MlG6TjKC6RXp3BYYD8D5Z8Sws+RzihJhmZchVQHA1L 7qAORd1EzfK/BYzxOdXL6N5CFXMpYdZUJiTK7LtCmv+GGGYUZ6fcWTQU8kYj/qaTtnRY3x 0iuUy1HOZZ96f8KgSkXuYbXlvRV7RhvMryGFemPZrR+ET8IK891RBKjWbZJ44de1z9R9d9 NX+SiO7UIqWNim1OsTqyM1WznNC4GeMkxFDCv7+lnM/wFGiRYGoC/hyK/6Sxyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7KZ468RYz19FD; Fri, 14 Nov 2025 14:40: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 5AEEei5j067930; Fri, 14 Nov 2025 14:40:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AEEeiVN067927; Fri, 14 Nov 2025 14:40:44 GMT (envelope-from git) Date: Fri, 14 Nov 2025 14:40:44 GMT Message-Id: <202511141440.5AEEeiVN067927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 42d9ae4945f2 - main - freebsd-tips: Add a shell function for laptops List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42d9ae4945f281d12f3ef96cdbd7356e067f8b18 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=42d9ae4945f281d12f3ef96cdbd7356e067f8b18 commit 42d9ae4945f281d12f3ef96cdbd7356e067f8b18 Author: Alexander Ziaee AuthorDate: 2025-11-14 14:40:44 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-14 14:40:53 +0000 freebsd-tips: Add a shell function for laptops MFC after: 3 days Reviewed by: pauamma_gundo.com Differential Revision: https://reviews.freebsd.org/D53748 --- usr.bin/fortune/datfiles/freebsd-tips | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index 6a2b59ff5fa7..379f772fea88 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -860,3 +860,11 @@ When netstat reports every 8 seconds, it tells traffic in bits per second: $ netstat -I bge0 8 % +Using vt(4) on a laptop? Try this sh(1) function. It provides an "h" +command that prints the last 22 commands executed, the time, remaining +battery life, and current working directory: + +h() { fc -l -22; printf "%s\n" "`date +%H:%M` -- `apm -l`% -- `pwd`"; } + + -- Alexander Ziaee +% From nobody Fri Nov 14 14:48:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7Kl24dyVz6GY3C; Fri, 14 Nov 2025 14:48:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7Kl23yMHz3WZS; Fri, 14 Nov 2025 14:48:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763131710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CDMIhb4zLAOIFR+gp4YnAq4Krr3eQNE+KttQhcsl9DY=; b=ZarjrZEE+Iu6X1qlCX7PnxXCxPYiEVtK8K2zLgL3kaT1/tqFX9HvO/AkUA8MUdatLrobIA mQo4maOITkB6bAHjWN8SL3ud76TzuG/pCBxAkXjZH2QWLoHlGGG9R2e7iusUgkl38uq8KE 6wDby/mSF+PXUDI4VhDe5D82aOOFRJPEq33FCJjphs8snkBrSaRHwHSeNXobcnjYnB6o24 bO1MyYZhV1wqSyIXB//sePDJ2PzRdRIaQY38kolW/vWvJaaSqArWC70hgNuySftmQGrIxz Rulu8ygow1AqN/sS15qVIxAwjZCBE0tLhfeuQjitUyX/0FNna3K6beENNAagQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763131710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CDMIhb4zLAOIFR+gp4YnAq4Krr3eQNE+KttQhcsl9DY=; b=RGeowRYECCWYdG4sOnFvX/BXf5CmvAz+8K/0oztPuqBf0RK524ZGTI0pjKpFIvQbuKhTIN szXfdSayZTmdGtad69QGwittgmOO8Ao6HV4n4jMw/YacNMVHH1Xd9zFxWN2Do+r2nPl+qh GArEsWVUubFfMHUo7MIq/nqBnPPhv/OhMcTXNCCDwDXuStWw0F33N8kK+iI0TttqenF4Wn c5z5dLEH2EEdjLmMnvdhtsNkpmDuzN5ZJVfK4Df/CNS214TreasJrRBP5jH64C0VlMoBM+ Irl5vdU0loNHifwkgttjd7e9/7i39XDl53EDzzexfaYn+ylsT79ixYVFGLIY5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763131710; a=rsa-sha256; cv=none; b=OXHaTEfD4xg2j+rTthmGs69VSHUPBscpDJRb2oIDgNufEX3y6aIOFhYMU1yaU6W/QWvB0f 735I27TpdLoVbwhN1gfwFYMSfy2Crp91a+Xr0QWI8QtKNGLYasp/1+VQ554H5tEN2ERFk6 JB9MMftGPTByg047/GzxCwsXkzJW+TI28dql8FcyKqv4SHDrJGDD6dSRVJbHnDoHayUW8a UOWp8GMXsv7ICt2G4S61iHSuURQOZdzgoIoYVNFDW86xUJagaTdSH2SpMDc4+FBA5Wde6c Q+YOUJCUMCF5z8hSASq7iLWXnva5eXnHb7C6RDNmCM4wlIv88UyPgF97IqCMVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7Kl237nvz19Z5; Fri, 14 Nov 2025 14:48: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 5AEEmUU8077521; Fri, 14 Nov 2025 14:48:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AEEmUoo077518; Fri, 14 Nov 2025 14:48:30 GMT (envelope-from git) Date: Fri, 14 Nov 2025 14:48:30 GMT Message-Id: <202511141448.5AEEmUoo077518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 09ffaa4e07d7 - main - loader manuals: Clarify console and boot_serial List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09ffaa4e07d749c83cc1db13829505f21b025f29 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=09ffaa4e07d749c83cc1db13829505f21b025f29 commit 09ffaa4e07d749c83cc1db13829505f21b025f29 Author: Alexander Ziaee AuthorDate: 2025-11-14 14:41:57 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-14 14:45:14 +0000 loader manuals: Clarify console and boot_serial console=comconsole is for the loader and boot_serial is for the kernel. I think we should centralize documentation on the loader settings in one manual, such a loader.8. The current proliferation is not obvious where to find the documentation. To the user, these are all set in loader.conf or at the loader prompt. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53695 --- stand/defaults/loader.conf.5 | 3 +++ stand/man/loader_simp.8 | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/stand/defaults/loader.conf.5 b/stand/defaults/loader.conf.5 index b1661e8c1101..8c43bb62a135 100644 --- a/stand/defaults/loader.conf.5 +++ b/stand/defaults/loader.conf.5 @@ -343,6 +343,9 @@ selects the video console which prevents any input and hides all output replacing it with .Dq spinning character (useful for embedded products and such). +This setting is for the +.Xr loader 8 +only and does not set the kernel output. .It Va screen.font Set font size for framebuffer mode. The default font size is selected based on screen resolution. diff --git a/stand/man/loader_simp.8 b/stand/man/loader_simp.8 index 683ca8b2da5d..52cb598fdd89 100644 --- a/stand/man/loader_simp.8 +++ b/stand/man/loader_simp.8 @@ -358,8 +358,8 @@ in .Xr kenv 1 , not for any particular value. .It Va boot_serial -Force the use of a serial console even when an internal console -is present. +Force the use of a serial console for the kernel +even when an internal console is present. .It Va boot_single Prevents the kernel from initiating a multi-user startup; instead, a single-user mode will be entered when the kernel has finished From nobody Fri Nov 14 15:00:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7L1J6xxsz6GZ4q; Fri, 14 Nov 2025 15:00: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7L1J6BXqz3XjH; Fri, 14 Nov 2025 15:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763132452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lb/qMeIT9+VraeNztkYwJaaKWax7Q5i1zjsPUabZ/v4=; b=tsPbI5ju5vRvYPTPTkWOOXP94akZinWoT23peTu8F/dUl9g49zFMrNPxx7awr8Xv1d7VRk Sv1FB0QEAr4sionJVcdEWnEEEs2l/XrSHKkHkzz8VnrQz+joUtkArUEYW3tR8OBMytVpLQ u95qHiexE/US0I9cjJVgVrFCGdeBtCO1RVJvDPlIWns/mAa2GwVgj8z15TNs3Q9qXRPlTK 91HUgNH5UTWaKBHBMYzZoxvgIc3DcgyWXH8An38eWYotTgxwY9rr0jd79RqC51F2SfoToT vhzjNBth0rYYg0dhDLcPTac3gM2+x3sMyAh2nQImb4CjoPiOze88p0R1SqS9qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763132452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lb/qMeIT9+VraeNztkYwJaaKWax7Q5i1zjsPUabZ/v4=; b=y2TeZkUqLE6rJ1RtCLxUKFo7f+ofJnxKNfWyBKAF0PIV+wecE098U/5L1PR9EQEiGUubGa 6Ev1WbB9HQkh4R8rqsR1DeGwx53vuUenGP1IlUgfIouRBdYXC04Qe9cq74ywknXtnVyIc/ +pQrwm4+vLcm8iGVQLcAr/ZBiSaUW/RC0nrls1je5MFwJ8reKKgv6Y6W3Zpqj5jVGg+3Gs rzDs5YrDN/N9xv+ln2vbp2fndwNtjbpxyiSbRq74Gs/N/ssNA+b3+VMD6CGYMdcDFgNNVM nMRmmFxQa6WRyksosW4KVsRFDOBJNnVx0ENHMJjgBsYzHIL96gwGMrpGkBJiJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763132452; a=rsa-sha256; cv=none; b=KAdc4uTZ2WupduQkpkkrljq8/ObKmNLn60ntTFJ1dGrd7/IbQW5f3xzWl2schESqMNlOdO QQxBZRDAsDG35adT1chVXaJvv7mtA7LrB2ZrT07ouL0L3MOIA/w+CLhMJUm3e5mEidnHFF aouW3rwgOG7DZzz8wrjAsTkXrhOIZBY6UbqNMTvgjacMb4s84QAibdyfLHxOQkroTERgTX jp9nsGMX/zDFxwtQhmPx5Pe+fiLzPzcO12SNI1RFOJYa82oj3LhD6t3OFuiMhfUQNiyitW wZVzIwwWtStZs0p5p7KW+U2qvg/yIeA/xb8cMrePRK6CR8gjEZ5AhJ4liJ5PNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7L1J5WTwz19xf; Fri, 14 Nov 2025 15:00: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 5AEF0qDm007118; Fri, 14 Nov 2025 15:00:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AEF0qZE007104; Fri, 14 Nov 2025 15:00:52 GMT (envelope-from git) Date: Fri, 14 Nov 2025 15:00:52 GMT Message-Id: <202511141500.5AEF0qZE007104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 6fb0d67819f7 - main - loader.8: Document module commands List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fb0d67819f730e8def56e139f780eff3c0cab0f Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=6fb0d67819f730e8def56e139f780eff3c0cab0f commit 6fb0d67819f730e8def56e139f780eff3c0cab0f Author: Alexander Ziaee AuthorDate: 2025-11-14 14:59:09 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-14 15:00:16 +0000 loader.8: Document module commands Begin documenting module loader commands in loader(8), where the reader would look for them. Segregate them by their availability in individual loader implementations, like build(7) targets. These details were graciously donated by kevans. MFC after: 3 days Reviewed by: kevans Co-authored-by: Kyle Evans Differential Revision: https://reviews.freebsd.org/D50727 --- stand/man/loader.8 | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/stand/man/loader.8 b/stand/man/loader.8 index 234eabd571e0..484e0a7b300c 100644 --- a/stand/man/loader.8 +++ b/stand/man/loader.8 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 29, 2021 +.Dd November 14, 2025 .Dt LOADER 8 .Os .Sh NAME @@ -89,6 +89,52 @@ The commands common to all interpreters are described in the .Xr loader_simp 8 .Dq BUILTIN COMMANDS section. +.Pp +The following commands are only available in +.Xr loader_lua 8 +and +.Xr loader_4th 8 : +.Pp +.Bl -tag -width indent -compact +.\" sort the following entries according to the second field +.It Ic boot-conf +Load the +.Nm +config and commence the autoboot sequence. +.Pp +.It Ic read-conf Ar file +Load the specified configuration file. +.Pp +.It Ic reload-conf +Revert any previously applied settings, and reload the configuration. +Set comands that were executed at the command line to override variables +previously +.Cm set +by +.Xr loader.conf 5 +configuration will also be reverted, +along with any module options that were toggled. +.Pp +.It Ic enable-module Ar kmod-name +.It Ic disable-module Ar kmod-name +.It Ic toggle-module Ar kmod-name +Enable, disable, or toggle loading of the kernel module named +.Dq Ar kmod-name . +.Pp +.It Ic show-module-options +Describe all modules the +.Nm +is aware of, and show if they are enabled or not. +.El +.Pp +The following command is only available in +.Xr loader_lua 8 : +.Pp +.Bl -tag -width indent -compact +.It Ic disable-device Ar device +Set a newbus hint to disable the +.Ar device . +.El .Ss BUILTIN ENVIRONMENT VARIABLES The environment variables common to all interpreters are described in the .Xr loader_simp 8 From nobody Fri Nov 14 15:06:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7L7P3nq4z6GZ1t; Fri, 14 Nov 2025 15:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7L7P25b0z3YkZ; Fri, 14 Nov 2025 15:06:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763132769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DElu223GNgYX2N/l+bmr587evlPxgKzjSAV3bOiyHW0=; b=wq6+xYA2N0wpLZinMV1LYm+blFZMB3/+JLhEeV+YlYjBy6pQOB35atjO7O1NHbNg7VfOOZ d53YOjWqgXt5p+PGelYG/fqWJNVN04cOcGsAfgzflFbluj+wmnBrWgojk2upMR8nSOZV7z PGP2X8xq+vHghPfV5/KRr3CAEa43ihoJh7NwSgo++i28vREerubkArJcWbgKcjN82ZG0TY hI3Pv6EPDcSm+/Eqq3LoHKw/eG1LrDFuSbrgZY2hO96cNFLy1qbs8Wl8W24hXMaHA4zrpP xWVWYzV12qI8AqnNiwmlk3MSH0We27luj9XMMFfO9w83ZCqlBjNHUXY/DUVTMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763132769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DElu223GNgYX2N/l+bmr587evlPxgKzjSAV3bOiyHW0=; b=qaLw/yMa+ZGANrYR+i2cGA0iHPPmanVq7haYfTobXUcQIcShydrmVsQRGkKNaFCFxrlSub 8ClwfFOhbBVX3CpV6UyStezsk1KxjGArz64bmxrmA0eAV7l393BtKoSxlMD098gYlH27WP 7y5sCsQbmJ5aSIyPQR/r7PsFQNJzHgsQQeW4WQqkrWuRI5MjKftii13mVdflUYzY7StLXA sRBcRUd5gIco4gFdrgjd9BeWU/72kLsajqn9ZcQDiHQJacBky02JrkLRoaNmEIn4dq1DiK YOJDru9J+tYs3zDjB5l6CrDVnxtkon3pm8zeRUV/wPkQ0Kw/vY3uT87MH5nXyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763132769; a=rsa-sha256; cv=none; b=AnchPnwuKVYidrfbAkzjuKM1Mlzw3ekk530fqUUC8tKhueSAyGJuiRfTTzj7dsIJ8eKFLQ akGj4CdbuQkwYSEl2m0UY+xJfwHpBxEgyCdy33/ZAqLVnwvYygN4AZDShG1TpWyxEZZB9h 3JxglD0aMcT8Q6AEylopU6oZVaCi4IarU4csLA2iUcEO9ZJTdwK3nKeY29weXaHwCRwL7y D7Ahj3pwNM8u9GEqhvclTi048kzrp2+ef8lNzgSthVeVI0nCHnWlmMIR3HEye0dpbnw6Yg LrqXzXhGsllOCEadQKsadUgAWYbesCYG4/tz98E09OcGZ6V1op/ComVE4hL7xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7L7P1NjPz19vk; Fri, 14 Nov 2025 15:06: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 5AEF69mG014764; Fri, 14 Nov 2025 15:06:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AEF69O9014761; Fri, 14 Nov 2025 15:06:09 GMT (envelope-from git) Date: Fri, 14 Nov 2025 15:06:09 GMT Message-Id: <202511141506.5AEF69O9014761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: b0c1ead2b9be - main - iwx.4: Fix SYNOPSIS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0c1ead2b9be0f6aa5a715d849b9ca7af093b513 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=b0c1ead2b9be0f6aa5a715d849b9ca7af093b513 commit b0c1ead2b9be0f6aa5a715d849b9ca7af093b513 Author: Alexander Ziaee AuthorDate: 2025-11-14 15:04:45 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-14 15:06:04 +0000 iwx.4: Fix SYNOPSIS PR: 290812 MFC after: 3 days Fixes: 27c41b28b1d7 (iwx.4: Initial manual page) Reported by: Dimitry Lukhtionov --- share/man/man4/iwx.4 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/share/man/man4/iwx.4 b/share/man/man4/iwx.4 index 295a5f318afa..e57ddbc7c980 100644 --- a/share/man/man4/iwx.4 +++ b/share/man/man4/iwx.4 @@ -17,14 +17,13 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd May 2, 2025 +.Dd November 14, 2025 .Dt IWX 4 amd64 .Os .Sh NAME .Nm iwx .Nd Intel WiFi 6 IEEE 802.11ax wireless network driver .Sh SYNOPSIS -.Cd device iwx .Cd device wlan .Pp In From nobody Fri Nov 14 15:11:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7LFD70pfz6GYyc; Fri, 14 Nov 2025 15:11:12 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7LFD5wqkz3ZNq; Fri, 14 Nov 2025 15:11:12 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763133072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=Zn+/agOGGeFaU9mVMr9wJhEm0zbMBLCOTb6UnAAaG/8=; b=ilfvZAs8z8xZdfMSwgnegwSKJutG81txE00wC+EVu6itDZpy8DAbpWgyeJlUCs7DWTuLg+ JQrL7rlHAzA5GReU2Qd8+nfPRQi5qL4+X0NOEGxYJzrQ5F6L6sYI0xVtyYNHUJk5DFSqE5 jKFE2wHtQp+bENCxnejHXzim4Z/hlNiavQ6aESMie0MWqvXEctHazpg+3gu0JuLVZV3f9/ dvSlqnfNYN3WqXwt8/mwJel8yr1APUW5v67n4CInCoa+9yX9YMHzBIgQU+sMjlgry8RGRi kE2TH1vzIbWBpNH+j92tfGGlZarO4EdllhESnDMi1x8tSsD2BtqT3OVpd/rNCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763133072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=Zn+/agOGGeFaU9mVMr9wJhEm0zbMBLCOTb6UnAAaG/8=; b=Oe7MWIgkQAo3kqY6isTnxsoopvVe03BCic6LD6zCQqGBtBaWzBz6alJ9cClyIYh68qIj5B XaqTgZEyhcEkRbf95aa2Z3Pr+7z0pQQZoWQbCnOZ0YCRT3O6qHgdLFnKAEPQqYB2QolM/J yj+uYjTFKfGYrGW+hBJysdlxxBH/8lpaQEjloGPLthsTSjvAxsXk5//GoMpLqQ9NBoM9QU zCmADrxmHfQXlTwBxths0grE0ZI7ncgcVdP7FsAbjDkN9RTIBKRGNpKfrLP+zJkimMG7B4 jBHq5ZVDE05yOyKGJYlyMB/idNlXjqlAZDSXA1b+VO1hNfQSpClXmrbcWG//wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763133072; a=rsa-sha256; cv=none; b=SJlTLWnffHL3lDPHD8LIU579Wcj33tQ8vsMULzXv3fLLCGB7On3290OEFTK96f9FWly6tm 2P0oe2o//2acLAW+t+31cvsq9CG7FIsZXHVyo49vzFnBChTK2xpUFlvAYhpVItwA5ZGRVG AWhk272L0ykl/f+iFfuUmFfztXv4Mht9SW1zGxIl91wSZ4Oq4AWDmY/9OwAOcH0+BS1KCV 8XKeMqmLdKirkXB9IZZydcD5u3Qqww1K7uu5+6Jpny46b8VAcio5eExM+woO9GaEUBtbOg phlPyeY4aqfDNYdwIVHlp4kGxf5uhzcsAWhDLhFwiKe3RSwrDVbuEE9KY3g08w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2804:f1c:34:1001:ec2a:ec6:cee9:f831] (unknown [IPv6:2804:f1c:34:1001:ec2a:ec6:cee9:f831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d7LFC6nBsznck; Fri, 14 Nov 2025 15:11:11 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: Date: Fri, 14 Nov 2025 12:11:10 -0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 69f61cee2efb - main - unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR To: Gleb Smirnoff , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202511140240.5AE2eQmY011060__48884.4837805786$1763088041$gmane$org@gitrepo.freebsd.org> Content-Language: en-US From: Renato Botelho Autocrypt: addr=garga@FreeBSD.org; keydata= xsBNBGStavwBCACjNlp/9+Y+VFe9ieR2h/WWbdvjz4Mb2z/f22bGoaskzCfvVNbo/v3i34I9 H6OdgZkGqheQEAD2jNfRbmPr4z40xDMUpYGLds+1Mvg7G3Hms3j5Ef8KaLSWUNWIfwKdfSVR Qs35ccSJxAdRW5YdI6J3xZgika+3Bc4eJ05YE/nWW+PNTYevt5rqD50N3zybVYIcLoqVPpBi AZE/sf5SLiLACIJb1t/s4x+pi8vgWevxVVT9u8V1f8zYErmHSLSqjxii0B3eRZphX9NCJOv9 +tfFZhnENInhn9gT7H4e2YumUltEy3jacONHJF3CC1pvvWEa6lEyypclMOkHQwNON7DLABEB AAHNLFJlbmF0byBCb3RlbGhvIChGcmVlQlNEKSA8Z2FyZ2FARnJlZUJTRC5vcmc+wsCXBBMB CgBBAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYDAgEAAh4FAheAFiEERL7Dxegbnh7xTiQ5Ob6P xxJcZXoFAmSta78CGQEACgkQOb6PxxJcZXrYlggAgaZmr6c1yIWzN8VksHrHpwt/uxONEP+h ljy3yfrMsgfS5wx5Uzgfih1xYZUFC6jiI63CetqBqJpp3g1klRS1UWYKx2NeXphDMYZEdPm/ a6sXh4bKZbk6IE8Yn0/YiRT57d9DtbvswC7Gn7Igj/MSbhl49TvTGyvuB6juaffVoYZViomx 5zMoee8Ml2o2qj3MrCJ+/K8GU54RlpOGqGRsqdwVdr9XEWub6fF2YFwR46cjmbiU3P5urFHH nkJlBGPIwKxHimTW0lZsdx9aCKRDd/D80/WOEzXmk3k8B9lv/GsvOluHmveLhJG1R1tIJ31I f2q8dfTvqsQXnu8CcWRcgc7ATQRkrWr8AQgA1DufoxScA+CWQbUR6zExIu8wXQKrhuRt4DG2 BgynT7EMUvEBadcbQRZXsBpemNfncc9Axyut/+rWiyKJf9BLQuo/9QYmSRvW1U6+0LJUYmdg kMyBeYaPk+vnssv/u9jLuvV7FVgyE0yk1iaWIKOVDD+XrQCOvGw9uSceBrQyCyo3A/eRM/+p vnDCaywR63PKE+3axk6lfNdGK3TnaWmS30/ZDCZlNsXuqprqR4JdT5wXids5o36dsuJ5EZ20 s5hNMD34s4Yr1Y1R9elH6qBsFCpozs0+jwrArxq+UJJCR6hH5W8ZEwJtRC8tzR8mRE1WywzX BXYj0YhfGztQIxZckQARAQABwsB8BBgBCgAmFiEERL7Dxegbnh7xTiQ5Ob6PxxJcZXoFAmSt avwCGwwFCQWjmoAACgkQOb6PxxJcZXr1vgf/SKXhoZcUU5I7TqcbHg0lJz9tICTupCGHWr/s SQgjh9oEM5j1wqW7FlCGP90Tl9K0g3ow9YdbhU7VK470o6pymX9V9eLHzGgkZO/KMEtGBeK1 u+5ePjCJ/MK5B21KODLSU7WrIL1VN5ceXfQPLYt02LMLtPri+oduHD6RNBeA7US1DUzleq5F 9NHGbvV2U7BdDUezpiO8NaFjFZVB11I5d99FxUM5XGVstI3VhsRKZxjY0KnqJzaQgTFsPGmv AUfZVIN1pXgXiedhPXpr8+Y64jP+pHVwpVmh1zYWL6+q3kqFOUVP6c5iiMeoEXZvgJz7x/AC ek3X5gvu8Hpcv+MZIg== X-Enigmail-Draft-Status: N11222 X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; DSN=0; uuencode=0; attachmentreminder=0; deliveryformat=0 X-Identity-Key: id2 Fcc: imap://garga.bsd%40gmail.com@imap.gmail.com/[Gmail]/Sent Mail In-Reply-To: <202511140240.5AE2eQmY011060__48884.4837805786$1763088041$gmane$org@gitrepo.freebsd.org> Content-Type: multipart/encrypted; protocol="application/pgp-encrypted"; boundary="------------zlXbN98INA8vQP5Czrn9onYn" This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --------------zlXbN98INA8vQP5Czrn9onYn Content-Type: application/pgp-encrypted Content-Description: PGP/MIME version identification Version: 1 --------------zlXbN98INA8vQP5Czrn9onYn Content-Type: application/octet-stream; name="encrypted.asc" Content-Description: OpenPGP encrypted message Content-Disposition: inline; filename="encrypted.asc" -----BEGIN PGP MESSAGE----- wcBMA7366rWxQxTCAQgAwA+gPYIxY6wNR6P/4xcnDWFSRLXco+d7ececYSMWp9suwNEbfcCFXV4q vgLGVJe5XG+EfSMxy2VkxKRMcrFee1POwtmxZuY2uC/ko2Q0yN/TewlObMT0uuRE6RnGL+qBKl8l zwaU3SEP/FEdm0e7u/6Wfsz5UEGo1/DTd20QG0R6Vbzu9vWA6+rPgdPpHT3ZHPLldo1RRgY3YGBU yMN4+ozOTGddM0JNBv1qlQLNT0ezSlW4L1SPFKkuuVP5CeTS45F9dMZQUx6Sdgk4K74JMYkuKzHM CYyRG6TjiNcI/UBTj2omwa6op1YHJL7i3kLKE4J/dASRfp4KI2mZXiravNLTogHuLQ/PbqGQjxvE O+aO0Rq+sUdLriTJIeJaAnNpF6KS4NtZvgw23W6nzEA3DBIcSs8BgRwZ0u99alfe4a2RP73viW/p p1bKBLgAo4cdH255bgjmLDq7gBbmq2EBNIZ4cPH5f6efSH9QEB87znV4BZl0t/rcTMyNb7gD9R+u fOQ9kvlY8B2aYtr+U77B/bmcanaWl3F+HZtz8DoUH660dq+zmj+/sXRkT1G8qYJ2GwHt7k8oJkEO oX7RbqI5CpCv/P4YNXlex1UEyDk6fSvCT1v0DxvAplFoOqflmfKNegVMklndZiKfR39W8QBdjkA5 PFojBlHOCv5sE+VmzROM44KIbp28ediJm8LEO/JKCIva1jbie21AONCGB2mV7Gbw9BTzKiar3gu+ /uA2ij5mpp3bX2NNBYRGCm/5iNlpR3on15b/NM06Wfro3T4KFa3UrvNucadr6gqv5X9EqGRS5HSs SOKA2cJ+k8dYoL32eQtJko76icRThpDO8HZ597CSh0q/ZYmaJfi5/MfEFapjW05QBnQOpDVTiLzo yVZsmayWWx3uvJ6bewO7HC+Jvxf6rce0MfdjDFuniopfzSNBxMgRsQ4b2y2CCHp8ddl6bzEU0tOe ieystvZAS4TlWi+aVbqi9tT+yFg1YzCBV6SAipdjkv2JCTSHOKbbZciT9o9o7h86Jkdkgzut9WwH 3RNAyDiEXpzwTv8F1iSY0VJ1SqslSsVjH2/sFztbfm17k/keKuA7ArdupIowKewyUrc1NgFPpuXR 06/m16beosvvMkF7bcCaM3xnd37lgVowh9hd5EweN6CbjYlf/wTekK4xXuYlUyqqOZY8D47dmH12 LFJZGtaDiAUut+A8Da2RPxbpA/wVEeNG1HtxUCwB7+T94BL8WFTlBxNI3jhTgyYB/BZW0OyT2CfS BPW67Px1Ozic7uEn5z8NC2FMBUaXETZebKci4GNCfaS/x77jCy/pEWPIsCDGzghotzfQbAX4F7/v Z7Pd2hH/YjoQg7flgZr3p80eVfGEK309m2L/CiEEfuT2NhaP+noLaWOdkhmPhPhcT7dmTYt1v+jX B5Mxn9nqdkOrOKMuY//SQ6ZyafcL2oCPKL8CekuJr1LnQIrOW9UXS/B05xCNfGTTCMEuHGeL/V5d W7Nftfre4NsJbUq12VddDUZWZyq5IEi0kKhyHjA7PxfOkyMokTy6XQ9CeYBUAS9eETSU2+Cwy9YW sUbvcRPkuIL6A0Lmw5Z/fmgJxZn5WQDlNB9fc8JzqWg2La8yVKjULNqhU8X3rtrMp8nEd86SUOYS ZGDsqYRfXS/62E5gOOgcFvpUs6s0LRI8VD67NcGvGadKUJqUZqPup1lgE0mrzN15Nvi/RpsFto6W sxkK415TsbY3uSXyITgQSgM/hqIOU3o7KSAxbTJPhxVvvm6YY2N/KU/1lLysHGd/4nIRatLAoM6t w25dgaPIoz+QUqE4NgxUisnYSs4IrwNeOtASFlwyF67zg3X2uZgk0wPDwMIVVxTfwiCi9us5kifa q7BuHue2YoTGprdPdogMVkJBRnxJqo+enV/alt+u+J0PcRaeIABGg7dV1MhLcci/NGhQYPQHVcUb PsErf/rzPXs8PbdISJt89r8S9EfSkX3IvXAMVKbmBSiaPGa9D7soDYjfMP5rSpPbhVA+6LRN2puN QyPLHXyaNg21JD1Kgwbp7rInNFy5jrOiFe+rgO12a9L95LU3ufjxLsh8QSrsjjsW+rWM2aWP+ssa hmovinVNlaN+eXFegoUCWpM54Se2MivziD39nHuu1wbp7D3TBKOpJI1vqNLGmiJgzDe6sk4N/JMh Q0GAU3BxNFqihgUysV6xunUY3tofB+qJh43wN4KRQ7bYHYUCAoO6p6ywToTZgP8dL1z4piPlKB3y vKCfKYwR2mfxmLvLkUdRgvyq+b+xMR2P/5wNRbrpLd1LKp1kG7Tb93BROTMw598kt+GRdexQ5kbV +xeJzViquR6OyEJ05UFhJJI8yqMJo0NZyDeU9UyeC+2HPRrBaSJiZzH47yZO+QGrR3RbgNc1ShwI I0vYcie6SfXKSLvUZ0yKSJ3trjmuwPwLCEgSTvsw7JhaR9JNFhyrwx8HU6a+dXP15n9iwGu+2AZ0 Ozvzqv0pFLCuab/jOoAnRoF3oouvqm7g2647wi5PcVCFvQ0pcajFZqE1TidAXdOIKYbGmBeVH2xV AgQq19MWDNxfPveNSHmMMEAMGHifpdMkbxNkmKIIvyI1duZe0891AOMK0erTcFPgqDXmuhfkKNGV xrv/tn29JhQeH4Lqwd0PonpQOx2DNuJM8E9w+d95pMl0LGPQZEyVl+pBBhjCjmJ8+JtZ5WxiMtSu wj2GQx8hVLD7l0rxvpTG0bvjzpbWOoW2KvP4u7Em63sya9GJsXTVQEjhn+ryfeVKx3gBIY6eKSC6 yXQB2VRxtPCJxyaJihPaohjy8MCJnvteTSdmDJoHidm7GCQcAgtAuPP4tR33WBAvAJasqjjFOM/X y6A3KIZ05gKXwOxmHT+8+plYyHyTD2L7AqVSrxlYOSkaxEpmFau/onUVr7nIuXR4m+lq16aklV1T Fb5TyH/okxg5OaoqAF3dDEiLOVKFOnGViQwVNkhE+JnydspxkTgVARB87Y7UaS23908NQP8mD0nt FejOXW8mXQbZlPnuy91NTmClv+ngl94M3Qr04PE/w02l7Xu+rD+YPAPsoPH/U0PuxEjfuVxlp7G2 ET7ygB0wQibk4IPbaeaNtU+qGLpujNg/CFMc1kk9IPNYB/N+ug9LJY0jpjCMrV8ZXujNUssErBH2 fmASgJbNIXsR0KrWtnzHWW3NEJWs7kyLtF0MwDq/BM6u/PtC9SNTZ1zgndjqocDEOiebOEPylmll W4QDRCqPqWkRF2+2zwzsLZr1tamWYx5itXOeep2jRO6Rq6zBmLLkegJ8Z+muOBYhUjndvP+mOJ0R rAb1Zu6P4HDYo59rpytJVUUb6R8BwsXLBYrtwRpNtbRPaZ7DRe1yvTAiob6Qt4WHPrvwuVEcGgMv BsEj64AQN3IDlJh2GQpeJ1tvoV7r3Es5Pn0CStAiNXfNxolxIKGJbGRj/80YCiYsth3/MKugbiwp afEC5I5byovWr61Scz3Ip52rAksqZhSys5YHDNX2XtvfkUEyqT/e+RbRYw1AT6c1ToZevwfPX4kR N0z1R6rWBsKSCAG/uhSdWbRVbgdPFQ1oBC9gFqxG8+7mdx/UI0lFA3ji1kIX63I8UEguESSZLISr HhHk3h6BHwwbdOhkcfWdZfXfe+MSuUjyJUEFSoJaJT2oyXtFuOKi5CtTAa+5HyTJpnw3AFHBnYZX zL4cAe5mSx+DwfndCxJ7Fp5YH9Culx7lY8RdLSzylKEomzlWqgv0a3KfBaM0tFixu/WGosxJnJfy PWbPt8NdvYpTU3VkI/tqkOvF0qj2KGYdfaCsj42yYGL2aXQ3fAQuEdIGUnxJsFULTFcLsrLSzQYc PtzSg8ifFGV66a5M5gdw1qz5/O3F4zL11VczrC3mLGV7/dak8JEpaXi0MCqrQDtHpke4/4J4t5Mb MNmksI+ELrIWLlN+TmUiqer1146TjYtAdDFXDhRKzmAwF6fpM1C6QhEMWpGdMBxaGWulW03f7Cio DrfdSRsj17QgQJlHUimXEPITJgAYlsKRhDbCH4kPGt3kuQbWTyK7Yd9N1IZJcBBoJVyL0Kc9KECk qahnIyo5vtOKcBemgYvx4FPTS433ffYZs3i8irt27Tx72uv0uY/3YeuM3Nod0XNXoOHP5fBtXkXH gZkSONGBIF0Ev7gUic+2VRzKkJlGpkL0OqbQF16szt/wJCEcJ4k+/k2KwJ8KlSOIVshwZxm44cMI FUt79oviCUTyfXh9Ttylhj5kIOu1jpuUh6qBJS+YpoIG0Ob/1lCBDBCab1XD1jwsw2keXgT15fdL BZ6JwT0cZ/RrjB6xBcVDhGnFrMod/cvcVf2e8SaKN7zucbvXF5q0BdwbECT7zGZXwxdkGcGQKw5K svDCZiFHpoE0mVT+Ey6vmDS1xEGUsStcio7rFsuy2kmKINJQZbstMlJSMvr2Xe3HFzcLCbFdfCv7 JGRf+S04Ns4YmgDD6UbDa2uwigVgRaHYuZrSwC+AYGZ+AL0AjNJXhukOmepZvTiGIXS69/8wkYMM mLDALah0yIvorTYWxx/y0HrBy7JoLr7JyedC5XPtcNyyPnmt6IIv5M4FvXObWEV0+ANVaoFtW8Uv wiMbWTTo9nd7gUOCJ0E753D1+NRO7Sba9+8gggXyBmffhP0hF2DCgFVGUDeqWpBCHwqHX6qTZfw2 FUDXaFaQhR+VSxYwnV2RpLUYSguKg9Q33afFNb3pPH/kbBtK/1YJPUUnGVL0foJrbPM5Imjq+2QS unrKAZjROUbd0rZFf+GN4ED2aXjIAYM2tPJhww6wpfrSCdo07zy6u8hvviDC/kDwDW8WLgY61hcJ rFo8Kj2HT9OoFUKaGHUaNuuDw41IYZ0WH4JvydWAvyJKmX4hCRb6mJHvBqLCzav0qbYE5YDRrfSM MxdscoCErFKaRSFQ9+184K+UdFfgTE2vhO6HdO4FgMWgHd3Awf0R2wjY9Y1JSj9Zm6bLjj3t15Zd rIukNAgn/8l2xCgtR+demMVTBG9W1mj+4fCK0jnkyZOphH2Fbcjwx/ZCrosR2pVFtoMlfwxx+uk6 /EyOOP07Q0iQL0sr365viZuBffFSLgs1rOpOZADayEiWDfiH2Mrn2ex/fjGLXyyyQDt42JavamtK zJGRhD33udz4AgBsAs8IJ4thqAk/R4Tpd09kI0MNpmZhsM6GhQmiPsYVY3blgcYnfKxhCiab+aLj UgJjgWDpuRBRuiAbJTqoulCgAX4jmILbhQwJRURBJ5QuA+tplhKis/gtyJO4hjjjNLvoiQ9A1Tv7 Hqt145Jgcz/iAZKBB2Cl52lJeSK1V//XBRVjQ8YwB8a4m/rmstbm6v+2nzMXi+I2jC8Ec1H9svkT WH0NbJsOA+hkfsdYPZ+R9e2Zb/XqswKjuSldLSk3NMaH27a/ViYJq6o5WpN6bgzh+we8fG5M9ATP rypqYAZyOaFyTAsMSsJS/lvK80+rvqs/1noxYVpoIj3nHnL1Qa5ubocmqAxuu4LAnk4soKpl8dNb 3HNNvUgYquIN9cRFhXEJj+HmKu+Fr4rcVZOJTciOr688osMs9ECPUW0DUEylI4xPs7cJS1TF8w+4 4An7JAwj+SYLM4fQZQDQtmZpW4P6low1D5ryyWjqNlsxi2Glc9i42I+MglIa0YR+uAuTOT9k8iCB JWFDjglWmXhgeNwvGR9HSODUSjWDu6zRMtniYSfD8WuKANQ9fHepk9+IGTMysJFepwAkBIYvNeUe 1v+aNwTgmxyj1qpwwcxoMi9isGkuwZvc76m8Z7I1IvKSA3kJPvFG4sGuyfglL0aulDaAku3H+tT9 Qaj87oBh1tS6/a9p02vnnzSzs/LZYerqzP9OQfov1mCadBY24EZ+l8/vyDexWFI0DJOg00jS3xQR B2TzAx+xpJk7keMD4nzu65DjxoYNtPaoMi77BhxkBTM55WWU3Y7emLFy2PRl2Z+YD4mA1RXeeqj4 50HeZt26jVuYfcDGtm9ij4NcBAQ3cHQFGOqMc7Kqi8oFJkXjhMgfljcVptj+vW+6YBVXsKGoD4lR iZmpFVlCjKqUZBmmAwoh4R+jFzuPNdEkkldWwNJzh2zTx4UD12LGI/g6eWPFvDy1OoRFZXZj6vUD gzXPgMcU2DGIQx+EasdYbmNJkb2lfivgvJ9f3IU0maqeetEXLvagf1vxz40bDpsFHXBVu1TyEMjZ GD0gHK6YcdmaKHyEnuRt9u0yiPnMIvQ2T81YGj0D9Nzh2n6cE7s5PC0wsJy6zcMoS46rpZnPdyyR tkBKK9EPpEjPUeSzqc+1sgezVTqLDOIsT/Vmaxs+43IRKigfnqqkSCKVTkbpdIBf1XizMG8UmTV3 UN6N2tcMFT1Se/PVH+vAs1C4j2z64k0yY/pS1bJ7AFGmUmc6ZILWie9+5GVjtcUGsvK5AwViF00G 7vvuCjojqiGhOPc3o4RYc1evl+hVJ4aIvwt27back/3acua6X3FdGYNtTk78VcHV3bSAw3uKY1OK AmurZ9mHEjRQ2jWJD5BC93hf9mNe0Ba6haVQfYjKLwxDCnK0cd6OTgmbzm2nZJtO70H7gOLOdGyx I1RHneCGfvpn5Uhgxlce3Oafe+njIDlnknYnh6aCj5JLzrn0ck1uW1AEmuHZcTxx80sQg6ti/k0E Sno3bQiroQCD5186kLGgMWtPr1FKwujULiLYxdYHz1bJIEfbabFQX17/BnJ0RTaJH3n5LriYuSOA GRw/K4G390IbH+SpsuQ242rlZSYjOiF6SyYHYCRN0+jKXxNHpYvr4xmdsS7pJrNO97divIC2SveB VdBRjU4dM44r3/OI2fTUXes1yNC27rjVlch2TmrkKMDGNnut/RcyRoaiBSC/Y5IzVhBSuPUAiXnn E1fgyIPUcWhHnyIkZQADjVst+BD7TwNCWAFLgLiu8LkGvnyyuntNO3TV8K4fGf1nslTfsE5cAAHe D+XvLONJe1Jr/PuZ6v79bGmVNQee7XjnivewSgZSmE9L7MvvhRsVcU4bYAT+2NV/5tAVGmAlJwcj dD0g3vAASRa2l6joaoR0HoIDy4jjo7KcNP5lbi3ebAdHjyGkzjxzlDOKUdUsroV9b5BoP+t/vs5o jSQ0fgw3W2KFCkAzmm+XaTQXykbUvFgXOhfRLc+ajg9soN6hW3g7d3m2fJT8GmE+pFXgHXr9OSXP WC0EW+RdlbPxdCPi46dN7OPztmMT7OQDqonlIa+quV56jZrN494nvPMOsl7RqmFakvdpTobAAEum cy0gZzUfLyOn9vMZpNmKPW2eCcg= =qrUM -----END PGP MESSAGE----- --------------zlXbN98INA8vQP5Czrn9onYn-- From nobody Fri Nov 14 15:56:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7MFb2Mmrz6Gf66; Fri, 14 Nov 2025 15:56:35 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7MFb1rrPz3k5F; Fri, 14 Nov 2025 15:56:35 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763135795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=luuIo/EWmBY1uIp5XjtRmkgeaf8vBjUyQe973t7mD+o=; b=RihX/v7w31OYC4tMPmds4KOTwD5DgQZyVurbdD9xqdz4wdkvxaG/PyN38qzCHCUMDeUYfL JkpA1Au+5Hp8ZhvZPOAs4UpiSQCK7dueDg2QOPJipvu4QuOqyroNGnT/ChRvocMLek/WEp GlFvCFGo7/t7faoplcpKY3n2xBZL7LH1Ny2n/haPtFYGBomIXT/q3gRZusQXJpunsJTC7I sMeLAfIIS9JtAfpGJDUfUejhYEH+A0LYOj41fws1bucKZOHdIdaCThEJ2qF4uzd9v4Yp2r KodQh+EY5Y+ga6A/2Qn3h6rgS5KvU89Gc3qzEN6X/SUi/yeDTUYpKiGdWntByw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763135795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=luuIo/EWmBY1uIp5XjtRmkgeaf8vBjUyQe973t7mD+o=; b=miklLcwkKR+ZPxH5iFAZHfJBnaAufNUOVs4zO1FpcwryNmVJpCYVV5me4m4Pe9oHaiW4dt OeXARL5CG8hEt0Bkegsstv3GkzXSCQOBGoxnUxMFdETz/CQwd64DF68GdKcr4eYOW437r/ AGtymmh5b1ILo1/B4YOEhnWJspmlZIwqOs0yYpr4I3BA3c4KiZRXkdK1LBbJwHCyudvnme ipu9y5BX3dfzndN8OmxS5hZIfAATGJqHijgFTuhvA2jjYP3NQJQ/mhb0RWpFjztLPKeqFJ iY6yOalDeHKCcHLjgBl5vYlT1Ofhdfzzvig5BnX6wVgkzrl1Ip0p+0FKiPC+6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763135795; a=rsa-sha256; cv=none; b=YUP3s22jY5H7A+HR7BmpDn7LD7xE9lbUC0PfHp3tFqT7uY5dXYQU8qMBw7PjtANF5eJE0f G/xb4Ggg/Xes1mSHOLlBqv60vGu/ucKCK+gV27vo7oGUQXOdgSVcPJ0HwtNmpzPQwDg63G 00HaPJ07q7SkdQGXiofWDMaeHsZekBFTn3p8ydUkIuoGFdki8pckniI+pg2REGgUpJPd3n OdSaQgLE+2yx6iNt/9cjLhJPbEAwjXF8dquZ3/Z0qa5vAE0/P16KrYto8eTjS21++Y/pw9 wgjmGh3VMCr3uLwk6TzXF/9ptW6D+9VahuUDpQb6wU09E3QyMp3B7zD4uuGGtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d7MFZ5FZNznGJ; Fri, 14 Nov 2025 15:56:34 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 14 Nov 2025 07:56:32 -0800 From: Gleb Smirnoff To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 69f61cee2efb - main - unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR Message-ID: References: <202511140240.5AE2eQmY011060@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: <202511140240.5AE2eQmY011060@gitrepo.freebsd.org> On Fri, Nov 14, 2025 at 02:40:26AM +0000, Gleb Smirnoff wrote: T> The branch main has been updated by glebius: T> T> URL: https://cgit.FreeBSD.org/src/commit/?id=69f61cee2efb1eec0640ca7de9b2d51599569a5d T> T> commit 69f61cee2efb1eec0640ca7de9b2d51599569a5d T> Author: Gleb Smirnoff T> AuthorDate: 2025-11-14 02:39:48 +0000 T> Commit: Gleb Smirnoff T> CommitDate: 2025-11-14 02:39:48 +0000 T> T> unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR I know this causes a panic without INVARIANTS. I'm working on it. Fix to land soon. -- Gleb Smirnoff From nobody Fri Nov 14 16:04:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7MR51dTZz6Gg1C; Fri, 14 Nov 2025 16:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7MR50tJYz3lJS; Fri, 14 Nov 2025 16:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763136289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=COI76GZNmNGUHgrtt+zz+UP9zsVXsnM+qYOO94w3JP4=; b=d68tpY2oEcEyHK3tFqz+TDQc3Nu9CdZh2GKLUkS1z4CJcyr/zzWy7pnMVIW+X23/N6vGG5 0WEeUAw1nCc7nwITlpr5G6mYoY1fWhxsREn/kLEpcXz2a9iFw0VPfOicP8eDqsLvR+OLPK qBhstJvkr9GhvCVc80aJBdL6H4bp7w0ym5SZQu9zsEUJeNvV1yFqZlg0jREjLlSnvhV8FB s1RTsI3QBrQcMTTsUnoE3DfvZQ5AJayckyeNQQ492nzRDnHpKrbFFG/cOwUV6Il87LiEOg PDnxzgW/k4ZYmuglAh8Graw+grJwN5bszlJTYuC1sJY1Sh9mc33bDYSo49j9sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763136289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=COI76GZNmNGUHgrtt+zz+UP9zsVXsnM+qYOO94w3JP4=; b=clg35h9YDEAjZr4bfWBRiMNXrJOjYz3eUqeIulrM11RFX7m3IYgKDkunpDhzPzhvvTixg6 wM0Y+VSvcIK8gKhoefPJtKkX/XsxHYnW/PlAKUwmH1jTLCMSe+VlwjiaF9XMHfFthVy1Yz 9B5H6Wk9umPKeYb7cqw4oEF+QgjPqOFCQ5vvO5LuS2UbfK573lsdM3KYqGO0E+dul7CHmz 2qa64MwJFGEwTIHbjm3QVoEs7yo961X2QM1HqliNq4pBaPeAHoYFn2W3e66A9gjMMpBXJy hdskAfUO9j2I2SG0xMGjHokxiQqzJB0IAw9cs1Aaz8HUNIDbjoHOU6z9X+GLCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763136289; a=rsa-sha256; cv=none; b=oq1mljtxoxPM3M565tG+xyuUIR6M874cJ5WadVXEyQe1u1UjkuIx0pe64X7XvrVAmCo2Zi dOptg/A00IxA35smbXonb1Vx6W/vu19fQ/wxEF33gTzQ0Xdwd09xxHtD0BzUYJ7fsRO7MW BhqCN0danYA7YQBRLU/si+8RSUCrnUaGu8+GzezdGUKkklsgM1zq3yc/3VqoTegFSlWfEf ojH6ylmmCduXYsb2MXwEkpB1dqJcRE8YaxR5Cau0fzMbWdpIovIbQzFYNzFeFwGFLm9Ruo DYkpOK41WIPkEIsPV1SYM4wdDIb5CYp7fDYwlV8S9RfsgmqrKox3wDsz41kCHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7MR508ypz1CFs; Fri, 14 Nov 2025 16:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AEG4mUe027365; Fri, 14 Nov 2025 16:04:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AEG4mNt027362; Fri, 14 Nov 2025 16:04:48 GMT (envelope-from git) Date: Fri, 14 Nov 2025 16:04:48 GMT Message-Id: <202511141604.5AEG4mNt027362@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: 82d8a5029a80 - main - unix/stream: fix instant panic w/o INVARIANTS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 82d8a5029a80a77166dca098b8fedb10d84e4e38 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=82d8a5029a80a77166dca098b8fedb10d84e4e38 commit 82d8a5029a80a77166dca098b8fedb10d84e4e38 Author: Gleb Smirnoff AuthorDate: 2025-11-14 16:01:47 +0000 Commit: Gleb Smirnoff CommitDate: 2025-11-14 16:01:47 +0000 unix/stream: fix instant panic w/o INVARIANTS A stupid microoptimization I made leaving empty STAILQ inconsistent is a brainfart that is related to much earlier version of this code, where it was safe to do so. Pointy hat to: glebius Fixes: 69f61cee2efb1eec0640ca7de9b2d51599569a5d --- sys/kern/uipc_usrreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index b1cb6de98b5b..6996f3d447bd 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1492,11 +1492,10 @@ restart: } if (!peek) { - STAILQ_FIRST(&sb->uxst_mbq) = next; -#ifdef INVARIANTS if (next == NULL) STAILQ_INIT(&sb->uxst_mbq); -#endif + else + STAILQ_FIRST(&sb->uxst_mbq) = next; MPASS(sb->sb_acc >= datalen); sb->sb_acc -= datalen; sb->sb_ccc -= datalen; From nobody Fri Nov 14 16:18:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7MlP3S8gz6GgdH; Fri, 14 Nov 2025 16:18:57 +0000 (UTC) (envelope-from garga@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7MlP2JZ7z3mhR; Fri, 14 Nov 2025 16:18:57 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763137137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=SQIzFn8wa/KDIsdQ+/OuP+ceIVBC4HEnIaoOctmMigQ=; b=Busz7m6dZty+NCcgnpyiWUO3lpZwBb1Wyg3hOSIcBsCoGHf4wysFawtaimH+ma+FIaM6CO yzLz6xjmVtVVyOBT3ThPB7dfLV6XLJplbr7iieLLrj8dOWOzF56I7B2eSKwho10kGrHqo+ g6JmLHCuCDHXCUrbd4SbDc0tJ1aTUTIJO3cSQED7yDd7QadKjlUtmt5AeqONXBaUE8vjDi D9VHO1/oiPecl4AWEJgMPml0RLOYBn08JVDRuqfDQRnDLJwNUwY6tkzUnpsvHUbZ/A13gh wC7wFo+cT6cix8EDmN9KGzYQT8BD+GGmB/iN6qF37c+MxC8Sz1/os6YvAzibtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763137137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=SQIzFn8wa/KDIsdQ+/OuP+ceIVBC4HEnIaoOctmMigQ=; b=LOnn7ZW46Ao12BOcffwWC5ksr4fPyF6t5dGJ4hIaX+qfahs8eK4cVaRJ11MrQhMz0sAq1+ 5SbpNhP+FlwKNRR1F7SxDKjc15CVG4v3xEf9ml6fwSK5RfDW+3C/s2R6frtQO2UN/yyiky wQ+2r/CLTyVvXJ0gjzQgYzRsag988b7rTA42BUU2ZaQ/kU3ghu4gQ3KGctiI9gtUQaXRda JnAzp7mEuP5ENfnuLmQB+Bo1aXxAgEAubfd6WpO0rZxCVPIrEg2ywb7VRZ4So3zLya8mhs uc4+BrfyDKZne9ZgjYhPliiNIsYTzD4F1UyJsZG7Skh2AwjhBg2ufc839odjvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763137137; a=rsa-sha256; cv=none; b=ic6X0BNfcKIIds2Boc5TsAdVsE3qH1ZZSe9RoIFB9T8vyHh/Mj/yqFP0iff0rx3QpuVxYv nggIC+2FOP5POg6DTjKQRtoyDWwr8zJfpGsxktN0RVkC20xloyG5IJZjrTabl+4cwZgv3d pLoiDVvHi0mCFSsFKVjgbHQYBXKVVIVQxx7hmc7b1zukfX2oiEYB39MRqMC6hbVRiEh66i ard30vl1QXzivUmstCGTxQ4iKKKX0bJgEjlvzLN5guzAX2I5SfohMCrrM2Varo/8BNK7uT r71hZCUIcBA59PIUY9CPkGqWMWYL1UJJmE28NyXDKXKtjmQW7yVwJSfnw1juAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2804:f1c:34:1001:ec2a:ec6:cee9:f831] (unknown [IPv6:2804:f1c:34:1001:ec2a:ec6:cee9:f831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d7MlN3z6GzpbG; Fri, 14 Nov 2025 16:18:56 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: Date: Fri, 14 Nov 2025 13:18:34 -0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 69f61cee2efb - main - unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR To: Gleb Smirnoff , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202511140240.5AE2eQmY011060__48884.4837805786$1763088041$gmane$org@gitrepo.freebsd.org> Content-Language: en-US From: Renato Botelho Autocrypt: addr=garga@FreeBSD.org; keydata= xsBNBGStavwBCACjNlp/9+Y+VFe9ieR2h/WWbdvjz4Mb2z/f22bGoaskzCfvVNbo/v3i34I9 H6OdgZkGqheQEAD2jNfRbmPr4z40xDMUpYGLds+1Mvg7G3Hms3j5Ef8KaLSWUNWIfwKdfSVR Qs35ccSJxAdRW5YdI6J3xZgika+3Bc4eJ05YE/nWW+PNTYevt5rqD50N3zybVYIcLoqVPpBi AZE/sf5SLiLACIJb1t/s4x+pi8vgWevxVVT9u8V1f8zYErmHSLSqjxii0B3eRZphX9NCJOv9 +tfFZhnENInhn9gT7H4e2YumUltEy3jacONHJF3CC1pvvWEa6lEyypclMOkHQwNON7DLABEB AAHNLFJlbmF0byBCb3RlbGhvIChGcmVlQlNEKSA8Z2FyZ2FARnJlZUJTRC5vcmc+wsCXBBMB CgBBAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYDAgEAAh4FAheAFiEERL7Dxegbnh7xTiQ5Ob6P xxJcZXoFAmSta78CGQEACgkQOb6PxxJcZXrYlggAgaZmr6c1yIWzN8VksHrHpwt/uxONEP+h ljy3yfrMsgfS5wx5Uzgfih1xYZUFC6jiI63CetqBqJpp3g1klRS1UWYKx2NeXphDMYZEdPm/ a6sXh4bKZbk6IE8Yn0/YiRT57d9DtbvswC7Gn7Igj/MSbhl49TvTGyvuB6juaffVoYZViomx 5zMoee8Ml2o2qj3MrCJ+/K8GU54RlpOGqGRsqdwVdr9XEWub6fF2YFwR46cjmbiU3P5urFHH nkJlBGPIwKxHimTW0lZsdx9aCKRDd/D80/WOEzXmk3k8B9lv/GsvOluHmveLhJG1R1tIJ31I f2q8dfTvqsQXnu8CcWRcgc7ATQRkrWr8AQgA1DufoxScA+CWQbUR6zExIu8wXQKrhuRt4DG2 BgynT7EMUvEBadcbQRZXsBpemNfncc9Axyut/+rWiyKJf9BLQuo/9QYmSRvW1U6+0LJUYmdg kMyBeYaPk+vnssv/u9jLuvV7FVgyE0yk1iaWIKOVDD+XrQCOvGw9uSceBrQyCyo3A/eRM/+p vnDCaywR63PKE+3axk6lfNdGK3TnaWmS30/ZDCZlNsXuqprqR4JdT5wXids5o36dsuJ5EZ20 s5hNMD34s4Yr1Y1R9elH6qBsFCpozs0+jwrArxq+UJJCR6hH5W8ZEwJtRC8tzR8mRE1WywzX BXYj0YhfGztQIxZckQARAQABwsB8BBgBCgAmFiEERL7Dxegbnh7xTiQ5Ob6PxxJcZXoFAmSt avwCGwwFCQWjmoAACgkQOb6PxxJcZXr1vgf/SKXhoZcUU5I7TqcbHg0lJz9tICTupCGHWr/s SQgjh9oEM5j1wqW7FlCGP90Tl9K0g3ow9YdbhU7VK470o6pymX9V9eLHzGgkZO/KMEtGBeK1 u+5ePjCJ/MK5B21KODLSU7WrIL1VN5ceXfQPLYt02LMLtPri+oduHD6RNBeA7US1DUzleq5F 9NHGbvV2U7BdDUezpiO8NaFjFZVB11I5d99FxUM5XGVstI3VhsRKZxjY0KnqJzaQgTFsPGmv AUfZVIN1pXgXiedhPXpr8+Y64jP+pHVwpVmh1zYWL6+q3kqFOUVP6c5iiMeoEXZvgJz7x/AC ek3X5gvu8Hpcv+MZIg== In-Reply-To: <202511140240.5AE2eQmY011060__48884.4837805786$1763088041$gmane$org@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 13/11/25 23:40, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=69f61cee2efb1eec0640ca7de9b2d51599569a5d > > commit 69f61cee2efb1eec0640ca7de9b2d51599569a5d > Author: Gleb Smirnoff > AuthorDate: 2025-11-14 02:39:48 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-11-14 02:39:48 +0000 > > unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR > > The pr_soreceive method first scans the buffer holding the both I/O sx(9) > and socket buffer mutex(9) and after figuring out how much needs to be > copied out drops the mutex. Since the other side may only append to the > buffer, it is safe to continue the operation holding the sx(9) only. > However, the code had a bug that it used pointer in the very last mbuf as > marker of the place where to stop. This worked both in a case when we > drain a buffer completely (marker points at NULL) and in a case when we > wanted to stop at MSG_EOR (marker points at next mbuf after MSG_EOR). > However, this pointer is not consistent after we dropped the socket buffer > mutex. > > Rewrite the logic to use the data length as bounds for the copyout cycle. > > Provide a test case that reproduces the race. Note that the race is very > hard to hit, thus test will pass on unmodified kernel as well. In a > virtual machine I needed to add tsleep(9) for 10 nanoseconds into the > middle of function to be able to reproduce. > > PR: 290658 > Reviewed by: markj > Differential Revision: https://reviews.freebsd.org/D53632 > Fixes: d15792780760ef94647af9b377b5f0a80e1826bc Hi Gleb! It looks like Thunderbird decided to encrypt my previous message, lets try again :) I've updated my laptop this morning and it crashed at boot as you can see at [1]. I suspect it may be related to this commit. [1] https://imgur.com/a/opfN6Ta -- Renato Botelho From nobody Fri Nov 14 16:34:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7N6S6n8Rz6Gj01; Fri, 14 Nov 2025 16:35:28 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp052.goneo.de (smtp052.goneo.de [85.220.129.60]) (using TLSv1.3 with cipher TLS_AES_256_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 4d7N6S41gJz3p09; Fri, 14 Nov 2025 16:35:28 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub2.goneo.de (hub2.goneo.de [85.220.129.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp5.goneo.de (Postfix) with ESMTPS id 7B5BD2400FD; Fri, 14 Nov 2025 17:35:26 +0100 (CET) Received: from hub2.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPS id A6143240195; Fri, 14 Nov 2025 17:35:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1763138124; 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=y+QKqVfh18GNVd42M6sdK4il7eykG37JTKff3KaZ2fc=; b=oXt9Mk92A/p5bzfJPJeL0r9bE5XJnEpqgYhe0N38/1m1laRy8M4CK8jc23Wcirefvlksna w1rcw81ycwzgsl9x/q3Uz5RWxzddhqjIOwnij9DxIJKqGfnqxja6SmlG5EnYsKhAMCX7sK 5Dtq+weiSYtUHQPa2z9rvCrYOhNDrKya32XsIQUalF36Ausf6RWopNG/3zazllERRLkxkn 7RopS3ywwFEJ57MrNLQ+SnH+IQE7QEmUVYQ5jXcvCVo1UMWuf3TXVKTyYM0Gl8WJe6QwRd pfc3IzT7oE5awgbCZKWeouaZYTGtelMctw3drEydYD6teMOIEL+xy1u41Qx0uw== Received: from thor.sb211.local (dynamic-2a02-3100-22aa-6402-acb1-2f5e-bda3-e792.310.pool.telefonica.de [IPv6:2a02:3100:22aa:6402:acb1:2f5e:bda3:e792]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPSA id 3B8EF24016A; Fri, 14 Nov 2025 17:35:24 +0100 (CET) Date: Fri, 14 Nov 2025 17:34:49 +0100 From: A FreeBSD User To: Renato Botelho Cc: Gleb Smirnoff , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 69f61cee2efb - main - unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR Message-ID: <20251114173516.7c693cf3@thor.sb211.local> In-Reply-To: References: <202511140240.5AE2eQmY011060__48884.4837805786$1763088041$gmane$org@gitrepo.freebsd.org> X-Mailer: Claws Mail 3.21.0 (GTK+ 2.24.33; amd64-portbld-freebsd15.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: multipart/signed; boundary="Sig_/NhkqQCfu./ehHXldCEFsfkZ"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Rspamd-UID: f96f00 X-Rspamd-UID: 8ce0a8 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4d7N6S41gJz3p09 --Sig_/NhkqQCfu./ehHXldCEFsfkZ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Tage des Herren Fri, 14 Nov 2025 13:18:34 -0300 Renato Botelho schrieb: > On 13/11/25 23:40, Gleb Smirnoff wrote: > > The branch main has been updated by glebius: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D69f61cee2efb1eec0640ca7d= e9b2d51599569a5d > >=20 > > commit 69f61cee2efb1eec0640ca7de9b2d51599569a5d > > Author: Gleb Smirnoff > > AuthorDate: 2025-11-14 02:39:48 +0000 > > Commit: Gleb Smirnoff > > CommitDate: 2025-11-14 02:39:48 +0000 > >=20 > > unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_E= OR > > =20 > > The pr_soreceive method first scans the buffer holding the both I/= O sx(9) > > and socket buffer mutex(9) and after figuring out how much needs t= o be > > copied out drops the mutex. Since the other side may only append = to the > > buffer, it is safe to continue the operation holding the sx(9) onl= y. > > However, the code had a bug that it used pointer in the very last = mbuf as > > marker of the place where to stop. This worked both in a case whe= n we > > drain a buffer completely (marker points at NULL) and in a case wh= en we > > wanted to stop at MSG_EOR (marker points at next mbuf after MSG_EO= R). > > However, this pointer is not consistent after we dropped the socke= t buffer > > mutex. > > =20 > > Rewrite the logic to use the data length as bounds for the copyout= cycle. > > =20 > > Provide a test case that reproduces the race. Note that the race = is very > > hard to hit, thus test will pass on unmodified kernel as well. In= a > > virtual machine I needed to add tsleep(9) for 10 nanoseconds into = the > > middle of function to be able to reproduce. > > =20 > > PR: 290658 > > Reviewed by: markj > > Differential Revision: https://reviews.freebsd.org/D53632 > > Fixes: d15792780760ef94647af9b377b5f0a80e1826bc = =20 > Hi Gleb! >=20 > It looks like Thunderbird decided to encrypt my previous message, lets=20 > try again :) >=20 > I've updated my laptop this morning and it crashed at boot as you can=20 > see at [1]. I suspect it may be related to this commit. >=20 > [1] https://imgur.com/a/opfN6Ta >=20 Hello, I also have a serious issue with most recent CURRENT as it bails out with a= page fault, but I can reproduce the issue according to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279653 and https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D291003 (I have almost the same bridge setup and all boxes with bridges running CUR= RENT have this "infection" while others not). Just my thoughts. Sorry for the noise. oh --=20 A FreeBSD user --Sig_/NhkqQCfu./ehHXldCEFsfkZ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRQheDybVktG5eW/1Kxzvs8OqokrwUCaRdaRAAKCRCxzvs8Oqok r//UAQDfH3iisMMiUYCnSyXzH6O/GHwjxKUlxQDbBE2jzbkw1gEAx/6OAcBHDxG2 TSRECPIbBvKvHyJ+poJjJpULYyTmBAw= =KorS -----END PGP SIGNATURE----- --Sig_/NhkqQCfu./ehHXldCEFsfkZ-- From nobody Fri Nov 14 16:51:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7NTL5gcfz6GkHR; Fri, 14 Nov 2025 16:51:50 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7NTL4xQMz3qSl; Fri, 14 Nov 2025 16:51:50 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763139110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=O62puo5fv5daH5dw0P6D0lkvS7Gzv7g6i7fCG0jqXZ8=; b=wCZxc78zeZdBkjatiHPPvHypKKvYg3/UYz7X1wCygjSbJo89ktqAW8c5J8o9di7SmMFkpM YJdwwSvV/8xJWkN5jX81LPjoIiMixXoqc2Kk621/iqkaNkwUuOxCetgjrhnSnMkRtgMENA MhKp6Ymulxg+RbasieHw4l6jjsb+/dK7kxmX09bIV/MjPTqChe1crsZgNWatprZ4hu/57b 4RyniLh8mFgSSsYoz6yOriI0b+qA11x0zwI4Qe3CMeJl64LRqHlLEmPmVs1Eezy72Hn96W QsxxO1ZYsGUf7UPXDBd2ALPCZK6Wu581NfwG4exvOeTkPQ3JFMHuQ8VZHT0KnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763139110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=O62puo5fv5daH5dw0P6D0lkvS7Gzv7g6i7fCG0jqXZ8=; b=Jxt2a9jxkKsgz66vjC+NSLm7pv/fBmO7zeLdsiJUw0LKUYg+18+ynCvGzPMoxHNCvBHQV5 h8VBt2UR6BQtwObvKdA4vTCk1eIQKu9Ax2GRCqNjmdk1QW4Ll68ZURyhdEbUhQQiOOTwU7 aJU+vejP9H5eGMfwSSVdSLpGA+QmaQrhvDNO4iT3r1tcGqUVeHOE0u8vovGzxMnq5qopWX 7cm+2jv6GutYmTM0TSsWmoYdDT5l/MpEEY9naXC+hMKBzFJT5SYXeIigDmkSCnBLhGxx6p huq+uiFuuLeeJGLHCqZ+fmGgYhZCWANDTX5tgZhV4aVhrxEpmc5FYnm812e2Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763139110; a=rsa-sha256; cv=none; b=M2pr0lCaRJuL2QA5GJihHlkX/uwKlWOAzRS41/UBq8O4mnequCGq5C1qon51KkxRGV2pBr mU1vFQLxnxuh5Z8pwh1jt/oWZeqXZ8BTogCKAEG4jBsDYQSEFZBOQROB90upOvHMdEoLct cBC8jTfSRbQwF0pfJAa3thKk7dw0qP36wwnim0ORZsaeVTU7fEytW0aIJP+5Y5YEosVJD0 wxpQG1TBnUaj+x3dznuQoIMlhPBGgPdaTcXKrsGeLiDp0KG1JQeG1u7GahYtocwD4NdbqH 523wvCCvVP/KhEtRyvqLYnesnzpV1viW8PBV+yfxyvHNChg4SX6dP/t8Y+Yy5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2804:f1c:34:1001:ec2a:ec6:cee9:f831] (unknown [IPv6:2804:f1c:34:1001:ec2a:ec6:cee9:f831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d7NTK6Rcyzqgt; Fri, 14 Nov 2025 16:51:49 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: <76f53310-ac59-44cf-a991-077defee502d@FreeBSD.org> Date: Fri, 14 Nov 2025 13:51:05 -0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 82d8a5029a80 - main - unix/stream: fix instant panic w/o INVARIANTS To: Gleb Smirnoff , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202511141604.5AEG4mNt027362@gitrepo.freebsd.org> Content-Language: en-US From: Renato Botelho Autocrypt: addr=garga@FreeBSD.org; keydata= xsBNBGStavwBCACjNlp/9+Y+VFe9ieR2h/WWbdvjz4Mb2z/f22bGoaskzCfvVNbo/v3i34I9 H6OdgZkGqheQEAD2jNfRbmPr4z40xDMUpYGLds+1Mvg7G3Hms3j5Ef8KaLSWUNWIfwKdfSVR Qs35ccSJxAdRW5YdI6J3xZgika+3Bc4eJ05YE/nWW+PNTYevt5rqD50N3zybVYIcLoqVPpBi AZE/sf5SLiLACIJb1t/s4x+pi8vgWevxVVT9u8V1f8zYErmHSLSqjxii0B3eRZphX9NCJOv9 +tfFZhnENInhn9gT7H4e2YumUltEy3jacONHJF3CC1pvvWEa6lEyypclMOkHQwNON7DLABEB AAHNLFJlbmF0byBCb3RlbGhvIChGcmVlQlNEKSA8Z2FyZ2FARnJlZUJTRC5vcmc+wsCXBBMB CgBBAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYDAgEAAh4FAheAFiEERL7Dxegbnh7xTiQ5Ob6P xxJcZXoFAmSta78CGQEACgkQOb6PxxJcZXrYlggAgaZmr6c1yIWzN8VksHrHpwt/uxONEP+h ljy3yfrMsgfS5wx5Uzgfih1xYZUFC6jiI63CetqBqJpp3g1klRS1UWYKx2NeXphDMYZEdPm/ a6sXh4bKZbk6IE8Yn0/YiRT57d9DtbvswC7Gn7Igj/MSbhl49TvTGyvuB6juaffVoYZViomx 5zMoee8Ml2o2qj3MrCJ+/K8GU54RlpOGqGRsqdwVdr9XEWub6fF2YFwR46cjmbiU3P5urFHH nkJlBGPIwKxHimTW0lZsdx9aCKRDd/D80/WOEzXmk3k8B9lv/GsvOluHmveLhJG1R1tIJ31I f2q8dfTvqsQXnu8CcWRcgc7ATQRkrWr8AQgA1DufoxScA+CWQbUR6zExIu8wXQKrhuRt4DG2 BgynT7EMUvEBadcbQRZXsBpemNfncc9Axyut/+rWiyKJf9BLQuo/9QYmSRvW1U6+0LJUYmdg kMyBeYaPk+vnssv/u9jLuvV7FVgyE0yk1iaWIKOVDD+XrQCOvGw9uSceBrQyCyo3A/eRM/+p vnDCaywR63PKE+3axk6lfNdGK3TnaWmS30/ZDCZlNsXuqprqR4JdT5wXids5o36dsuJ5EZ20 s5hNMD34s4Yr1Y1R9elH6qBsFCpozs0+jwrArxq+UJJCR6hH5W8ZEwJtRC8tzR8mRE1WywzX BXYj0YhfGztQIxZckQARAQABwsB8BBgBCgAmFiEERL7Dxegbnh7xTiQ5Ob6PxxJcZXoFAmSt avwCGwwFCQWjmoAACgkQOb6PxxJcZXr1vgf/SKXhoZcUU5I7TqcbHg0lJz9tICTupCGHWr/s SQgjh9oEM5j1wqW7FlCGP90Tl9K0g3ow9YdbhU7VK470o6pymX9V9eLHzGgkZO/KMEtGBeK1 u+5ePjCJ/MK5B21KODLSU7WrIL1VN5ceXfQPLYt02LMLtPri+oduHD6RNBeA7US1DUzleq5F 9NHGbvV2U7BdDUezpiO8NaFjFZVB11I5d99FxUM5XGVstI3VhsRKZxjY0KnqJzaQgTFsPGmv AUfZVIN1pXgXiedhPXpr8+Y64jP+pHVwpVmh1zYWL6+q3kqFOUVP6c5iiMeoEXZvgJz7x/AC ek3X5gvu8Hpcv+MZIg== In-Reply-To: <202511141604.5AEG4mNt027362@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 14/11/25 13:04, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=82d8a5029a80a77166dca098b8fedb10d84e4e38 > > commit 82d8a5029a80a77166dca098b8fedb10d84e4e38 > Author: Gleb Smirnoff > AuthorDate: 2025-11-14 16:01:47 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-11-14 16:01:47 +0000 > > unix/stream: fix instant panic w/o INVARIANTS > > A stupid microoptimization I made leaving empty STAILQ inconsistent > is a brainfart that is related to much earlier version of this code, > where it was safe to do so. > > Pointy hat to: glebius > Fixes: 69f61cee2efb1eec0640ca7de9b2d51599569a5d > --- > sys/kern/uipc_usrreq.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c > index b1cb6de98b5b..6996f3d447bd 100644 > --- a/sys/kern/uipc_usrreq.c > +++ b/sys/kern/uipc_usrreq.c > @@ -1492,11 +1492,10 @@ restart: > } > > if (!peek) { > - STAILQ_FIRST(&sb->uxst_mbq) = next; > -#ifdef INVARIANTS > if (next == NULL) > STAILQ_INIT(&sb->uxst_mbq); > -#endif > + else > + STAILQ_FIRST(&sb->uxst_mbq) = next; > MPASS(sb->sb_acc >= datalen); > sb->sb_acc -= datalen; > sb->sb_ccc -= datalen; It fixed the crash I reported earlier. Thanks! -- Renato Botelho From nobody Fri Nov 14 21:03:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7V3c550Mz6GNC1; Fri, 14 Nov 2025 21:03:24 +0000 (UTC) (envelope-from garga@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7V3c4fZzz3S5P; Fri, 14 Nov 2025 21:03:24 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763154204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=YAxJU8FGVcStzorwel63fItaVJ8StKoNNg5cdqkmtV4=; b=e6c4jxL+yy87GNW6zG3Ktlo3lld1wBBlZFmNnRHfYyDlP98X6qHDW8PoiS73f+0gjtQbws X6f9F5SqlSKvCtzQ1lxgU9ElXyrXXkG5rPJ3HjILAdkq06NhVDincOrSLQ+00i8vCyuv+4 rl92vZBAUYF6pwcAUl+raQgb6bMPJwqDQRjcuSfPMteqmAY2qC3+dzBwbWBvHa72cozWmf 12Ax09xl/ateHeEq2g4cittvr8jCf1Jtq6eYR+CMqjl2nFrxl0DinFO5LHvmvo7hhQ5Mwg QfxBVfLnI9DDeuQI27eGEHkJBQtR2VetSXjKkwnXsT84ZbGMg9sDNA3Br+tydA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763154204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=YAxJU8FGVcStzorwel63fItaVJ8StKoNNg5cdqkmtV4=; b=QpKY3ekPGNnG5VSSOvQrc+bEDdFiej+RPOBL52iD8oAbFb1J5fwdlC0YnVw2oPOO5qoXSR tCHXoRQp+wgFIkAl3wu+Qpu5KGfjc2OmdxDr0Ku9J9G28MP0HaDBhCeHSOwO6CYzzljLu/ 8G3QijixLjFhbqU3AqudMs59SNM6J42cOvwPqv61sXtXY8UNbqloDvjBaVQUcUH8SfXy14 Nn+POK557d297ZQ4pKe4s6b5ihvrDDcYmNP9mWcPBNQ6zKi0pVIUSWL3t1XhAUNxULuuwt buBhBIYytyhYt+hWU/QedYD6IzYtYAYAcCU4vHTgLF5IcT4y4UWtl3L63cVCQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763154204; a=rsa-sha256; cv=none; b=fK9JufZxLuFQFmdsjrugqUWvoLDhGR6tJKXA+Wm2CvZdbMc6Fbv4gb+KhisdEaGdnwjs8P ClK8vANxZBF6WN2jWbijMslFDDssoiLPVdXbzA892Fc0kfr6QDn566IlOzvjlmjGyjCxDw O7TYGpf1+vKrCI6YiZgdTJYr2FHdF59fJ2lcK6XmShp+IVe1UOsA+nBOOUHOXrlCAZVml7 ZUzlkYL/MoIOAXwtyiKqu4cZYBxwlt/daAvWkwmbBXZS4M1IN4stqbGmzi5LYLhdrHg0k8 iPsU9DLXlnoarHljGj1UPGUcBE7A58Py2xN9hh2YVAj4PIsFbU+gQmvpWprvQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2804:f1c:34:1001:ec2a:ec6:cee9:f831] (unknown [IPv6:2804:f1c:34:1001:ec2a:ec6:cee9:f831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d7V3b5ZTFzvjx; Fri, 14 Nov 2025 21:03:23 +0000 (UTC) (envelope-from garga@FreeBSD.org) Content-Type: multipart/mixed; boundary="------------O3W7y0rpnU0xAnE7aZ0ngDVG" Message-ID: Date: Fri, 14 Nov 2025 18:03:15 -0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: f1b9c1aafd84 - main - random: git'o in RANDOM_ENABLE_TPM To: "David E. O'Brien" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202511110246.5AB2kdQc077401__35176.4420907543$1762829211$gmane$org@gitrepo.freebsd.org> Content-Language: en-US From: Renato Botelho Autocrypt: addr=garga@FreeBSD.org; keydata= xsBNBGStavwBCACjNlp/9+Y+VFe9ieR2h/WWbdvjz4Mb2z/f22bGoaskzCfvVNbo/v3i34I9 H6OdgZkGqheQEAD2jNfRbmPr4z40xDMUpYGLds+1Mvg7G3Hms3j5Ef8KaLSWUNWIfwKdfSVR Qs35ccSJxAdRW5YdI6J3xZgika+3Bc4eJ05YE/nWW+PNTYevt5rqD50N3zybVYIcLoqVPpBi AZE/sf5SLiLACIJb1t/s4x+pi8vgWevxVVT9u8V1f8zYErmHSLSqjxii0B3eRZphX9NCJOv9 +tfFZhnENInhn9gT7H4e2YumUltEy3jacONHJF3CC1pvvWEa6lEyypclMOkHQwNON7DLABEB AAHNLFJlbmF0byBCb3RlbGhvIChGcmVlQlNEKSA8Z2FyZ2FARnJlZUJTRC5vcmc+wsCXBBMB CgBBAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYDAgEAAh4FAheAFiEERL7Dxegbnh7xTiQ5Ob6P xxJcZXoFAmSta78CGQEACgkQOb6PxxJcZXrYlggAgaZmr6c1yIWzN8VksHrHpwt/uxONEP+h ljy3yfrMsgfS5wx5Uzgfih1xYZUFC6jiI63CetqBqJpp3g1klRS1UWYKx2NeXphDMYZEdPm/ a6sXh4bKZbk6IE8Yn0/YiRT57d9DtbvswC7Gn7Igj/MSbhl49TvTGyvuB6juaffVoYZViomx 5zMoee8Ml2o2qj3MrCJ+/K8GU54RlpOGqGRsqdwVdr9XEWub6fF2YFwR46cjmbiU3P5urFHH nkJlBGPIwKxHimTW0lZsdx9aCKRDd/D80/WOEzXmk3k8B9lv/GsvOluHmveLhJG1R1tIJ31I f2q8dfTvqsQXnu8CcWRcgc7ATQRkrWr8AQgA1DufoxScA+CWQbUR6zExIu8wXQKrhuRt4DG2 BgynT7EMUvEBadcbQRZXsBpemNfncc9Axyut/+rWiyKJf9BLQuo/9QYmSRvW1U6+0LJUYmdg kMyBeYaPk+vnssv/u9jLuvV7FVgyE0yk1iaWIKOVDD+XrQCOvGw9uSceBrQyCyo3A/eRM/+p vnDCaywR63PKE+3axk6lfNdGK3TnaWmS30/ZDCZlNsXuqprqR4JdT5wXids5o36dsuJ5EZ20 s5hNMD34s4Yr1Y1R9elH6qBsFCpozs0+jwrArxq+UJJCR6hH5W8ZEwJtRC8tzR8mRE1WywzX BXYj0YhfGztQIxZckQARAQABwsB8BBgBCgAmFiEERL7Dxegbnh7xTiQ5Ob6PxxJcZXoFAmSt avwCGwwFCQWjmoAACgkQOb6PxxJcZXr1vgf/SKXhoZcUU5I7TqcbHg0lJz9tICTupCGHWr/s SQgjh9oEM5j1wqW7FlCGP90Tl9K0g3ow9YdbhU7VK470o6pymX9V9eLHzGgkZO/KMEtGBeK1 u+5ePjCJ/MK5B21KODLSU7WrIL1VN5ceXfQPLYt02LMLtPri+oduHD6RNBeA7US1DUzleq5F 9NHGbvV2U7BdDUezpiO8NaFjFZVB11I5d99FxUM5XGVstI3VhsRKZxjY0KnqJzaQgTFsPGmv AUfZVIN1pXgXiedhPXpr8+Y64jP+pHVwpVmh1zYWL6+q3kqFOUVP6c5iiMeoEXZvgJz7x/AC ek3X5gvu8Hpcv+MZIg== In-Reply-To: <202511110246.5AB2kdQc077401__35176.4420907543$1762829211$gmane$org@gitrepo.freebsd.org> This is a multi-part message in MIME format. --------------O3W7y0rpnU0xAnE7aZ0ngDVG Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/11/25 23:46, David E. O'Brien wrote: > The branch main has been updated by obrien: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f1b9c1aafd8496c5bfdbc2be57bcfecfe58f12a8 > > commit f1b9c1aafd8496c5bfdbc2be57bcfecfe58f12a8 > Author: David E. O'Brien > AuthorDate: 2025-11-11 02:37:28 +0000 > Commit: David E. O'Brien > CommitDate: 2025-11-11 02:46:31 +0000 > > random: git'o in RANDOM_ENABLE_TPM > > Fixes: 3deb21f1a > --- > sys/dev/tpm/tpm20.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/dev/tpm/tpm20.h b/sys/dev/tpm/tpm20.h > index 7c2ccd30143a..b2cfcd4f25bd 100644 > --- a/sys/dev/tpm/tpm20.h > +++ b/sys/dev/tpm/tpm20.h > @@ -128,7 +128,7 @@ struct tpm_sc { > lwpid_t owner_tid; > > struct callout discard_buffer_callout; > -#ifdef TPM_HARVEST > +#if defined TPM_HARVEST || defined RANDOM_ENABLE_TPM > struct timeout_task harvest_task; > #endif Hello David! After upgrading my laptop this morning I noticed it was freezing after suspend/resume. I've bisected and ended up on this commit. I confirmed reverting d6f10a5d013f (only to prevent conflicts) followed by f1b9c1aafd84 and 3deb21f1afd5 have fixed the issue. My system is running today's CURRENT at 82d8a5029a80. Let me know if you need me to collect any other data. -- Renato Botelho --------------O3W7y0rpnU0xAnE7aZ0ngDVG Content-Type: text/plain; charset=UTF-8; name="dmesg.txt" Content-Disposition: attachment; filename="dmesg.txt" Content-Transfer-Encoding: base64 LS0tPDxCT09UPj4tLS0KQ29weXJpZ2h0IChjKSAxOTkyLTIwMjUgVGhlIEZyZWVCU0QgUHJv amVjdC4KQ29weXJpZ2h0IChjKSAxOTc5LCAxOTgwLCAxOTgzLCAxOTg2LCAxOTg4LCAxOTg5 LCAxOTkxLCAxOTkyLCAxOTkzLCAxOTk0CglUaGUgUmVnZW50cyBvZiB0aGUgVW5pdmVyc2l0 eSBvZiBDYWxpZm9ybmlhLiBBbGwgcmlnaHRzIHJlc2VydmVkLgpGcmVlQlNEIGlzIGEgcmVn aXN0ZXJlZCB0cmFkZW1hcmsgb2YgVGhlIEZyZWVCU0QgRm91bmRhdGlvbi4KRnJlZUJTRCAx Ni4wLUNVUlJFTlQgIzM5IG4yODE3OTMtZjFiOWMxYWFmZDg0OiBGcmkgTm92IDE0IDE3OjQ5 OjA4IC0wMyAyMDI1CiAgICByb290QGUxNDovdXNyL29iai91c3Ivc3JjL2FtZDY0LmFtZDY0 L3N5cy9HRU5FUklDLU5PREVCVUcgYW1kNjQKRnJlZUJTRCBjbGFuZyB2ZXJzaW9uIDE5LjEu NyAoaHR0cHM6Ly9naXRodWIuY29tL2xsdm0vbGx2bS1wcm9qZWN0LmdpdCBsbHZtb3JnLTE5 LjEuNy0wLWdjZDcwODAyOWUwYjIpClZUKGVmaWZiKTogcmVzb2x1dGlvbiAxOTIweDEwODAK Q1BVOiAxMXRoIEdlbiBJbnRlbChSKSBDb3JlKFRNKSBpNS0xMTM1RzcgQCAyLjQwR0h6ICgy NDE5LjIwLU1IeiBLOC1jbGFzcyBDUFUpCiAgT3JpZ2luPSJHZW51aW5lSW50ZWwiICBJZD0w eDgwNmMxICBGYW1pbHk9MHg2ICBNb2RlbD0weDhjICBTdGVwcGluZz0xCiAgRmVhdHVyZXM9 MHhiZmViZmJmZjxGUFUsVk1FLERFLFBTRSxUU0MsTVNSLFBBRSxNQ0UsQ1g4LEFQSUMsU0VQ LE1UUlIsUEdFLE1DQSxDTU9WLFBBVCxQU0UzNixDTEZMVVNILERUUyxBQ1BJLE1NWCxGWFNS LFNTRSxTU0UyLFNTLEhUVCxUTSxQQkU+CiAgRmVhdHVyZXMyPTB4N2ZmYWZiYmY8U1NFMyxQ Q0xNVUxRRFEsRFRFUzY0LE1PTixEU19DUEwsVk1YLEVTVCxUTTIsU1NTRTMsU0RCRyxGTUEs Q1gxNix4VFBSLFBEQ00sUENJRCxTU0U0LjEsU1NFNC4yLHgyQVBJQyxNT1ZCRSxQT1BDTlQs VFNDRExULEFFU05JLFhTQVZFLE9TWFNBVkUsQVZYLEYxNkMsUkRSQU5EPgogIEFNRCBGZWF0 dXJlcz0weDJjMTAwODAwPFNZU0NBTEwsTlgsUGFnZTFHQixSRFRTQ1AsTE0+CiAgQU1EIEZl YXR1cmVzMj0weDEyMTxMQUhGLEFCTSxQcmVmZXRjaD4KICBTdHJ1Y3R1cmVkIEV4dGVuZGVk IEZlYXR1cmVzPTB4ZjNiZmE3ZWI8RlNHU0JBU0UsVFNDQURKLEJNSTEsQVZYMixGRFBFWEMs U01FUCxCTUkyLEVSTVMsSU5WUENJRCxORlBVU0csUFFFLEFWWDUxMkYsQVZYNTEyRFEsUkRT RUVELEFEWCxTTUFQLEFWWDUxMklGTUEsQ0xGTFVTSE9QVCxDTFdCLFBST0NUUkFDRSxBVlg1 MTJDRCxTSEEsQVZYNTEyQlcsQVZYNTEyVkw+CiAgU3RydWN0dXJlZCBFeHRlbmRlZCBGZWF0 dXJlczI9MHgxOGMwNWZkZTxBVlg1MTJWQk1JLFVNSVAsUEtVLE9TUEtFLEFWWDUxMlZCTUky LEdGTkksVkFFUyxWUENMTVVMUURRLEFWWDUxMlZOTkksQVZYNTEyQklUQUxHLEFWWDUxMlZQ T1BDTlREUSxSRFBJRCxNT1ZESVJJLE1PVkRJUjY0Qj4KICBTdHJ1Y3R1cmVkIEV4dGVuZGVk IEZlYXR1cmVzMz0weGZjMTAwNTEwPEZTUk0sQVZYNTEyVlAySU5URVJTRUNULE1EX0NMRUFS LElCVCxJQlBCLFNUSUJQLEwxREZMLEFSQ0hfQ0FQLENPUkVfQ0FQLFNTQkQ+CiAgWFNBVkUg RmVhdHVyZXM9MHhmPFhTQVZFT1BULFhTQVZFQyxYSU5VU0UsWFNBVkVTPgogIElBMzJfQVJD SF9DQVBTPTB4NmI8UkRDTF9OTyxJQlJTX0FMTCxTS0lQX0wxREZMX1ZNRSxNRFNfTk8+CiAg VlQteDogUEFULEhMVCxNVEYsUEFVU0UsRVBULFVHLFZQSUQsVklELFBvc3RJbnRyCiAgVFND OiBQLXN0YXRlIGludmFyaWFudCwgcGVyZm9ybWFuY2Ugc3RhdGlzdGljcwpyZWFsIG1lbW9y eSAgPSAxNzE3OTg2OTE4NCAoMTYzODQgTUIpCmF2YWlsIG1lbW9yeSA9IDE2MzQzODU1MTA0 ICgxNTU4NiBNQikKRXZlbnQgdGltZXIgIkxBUElDIiBxdWFsaXR5IDYwMApBQ1BJIEFQSUMg VGFibGU6IDxMRU5PVk8gVFAtUjFFICA+CkZyZWVCU0QvU01QOiBNdWx0aXByb2Nlc3NvciBT eXN0ZW0gRGV0ZWN0ZWQ6IDggQ1BVcwpGcmVlQlNEL1NNUDogMSBwYWNrYWdlKHMpIHggNCBj b3JlKHMpIHggMiBoYXJkd2FyZSB0aHJlYWRzCnJhbmRvbTogcmVnaXN0ZXJpbmcgZmFzdCBz b3VyY2UgSW50ZWwgU2VjdXJlIEtleSBTZWVkCnJhbmRvbTogZmFzdCBwcm92aWRlcjogIklu dGVsIFNlY3VyZSBLZXkgU2VlZCIKcmFuZG9tOiB1bmJsb2NraW5nIGRldmljZS4KaW9hcGlj MCA8VmVyc2lvbiAyLjA+IGlycXMgMC0xMTkKTGF1bmNoaW5nIEFQczogMSAyIDcgNSAzIDQg NgpyYW5kb206IGVudHJvcHkgZGV2aWNlIGV4dGVybmFsIGludGVyZmFjZQprYmQxIGF0IGti ZG11eDAKZWZpcnRjMDogPEVGSSBSZWFsdGltZSBDbG9jaz4KZWZpcnRjMDogcmVnaXN0ZXJl ZCBhcyBhIHRpbWUtb2YtZGF5IGNsb2NrLCByZXNvbHV0aW9uIDEuMDAwMDAwcwpzbWJpb3Mw OiA8U3lzdGVtIE1hbmFnZW1lbnQgQklPUz4gYXQgaW9tZW0gMHg3MDM2NzAwMC0weDcwMzY3 MDE3CnNtYmlvczA6IEVudHJ5IHBvaW50OiB2MyAoNjQtYml0KSwgVmVyc2lvbjogMy4yCmFl c25pMDogPEFFUy1DQkMsQUVTLUNDTSxBRVMtR0NNLEFFUy1JQ00sQUVTLVhUUyxTSEExLFNI QTI1Nj4KYWNwaTA6IDxMRU5PVk8gVFAtUjFFPgphY3BpX2VjMDogPEVtYmVkZGVkIENvbnRy b2xsZXI6IEdQRSAweDZlLCBFQ0RUPiBwb3J0IDB4NjIsMHg2NiBvbiBhY3BpMAphY3BpMDog UG93ZXIgQnV0dG9uIChmaXhlZCkKY3B1MDogPEFDUEkgQ1BVPiBvbiBhY3BpMApocGV0MDog PEhpZ2ggUHJlY2lzaW9uIEV2ZW50IFRpbWVyPiBpb21lbSAweGZlZDAwMDAwLTB4ZmVkMDAz ZmYgb24gYWNwaTAKVGltZWNvdW50ZXIgIkhQRVQiIGZyZXF1ZW5jeSAxOTIwMDAwMCBIeiBx dWFsaXR5IDk1MApFdmVudCB0aW1lciAiSFBFVCIgZnJlcXVlbmN5IDE5MjAwMDAwIEh6IHF1 YWxpdHkgNTUwCmF0cnRjMTogPEFUIHJlYWx0aW1lIGNsb2NrPiBvbiBhY3BpMAphdHJ0YzE6 IFdhcm5pbmc6IENvdWxkbid0IG1hcCBJL08uCmF0cnRjMTogcmVnaXN0ZXJlZCBhcyBhIHRp bWUtb2YtZGF5IGNsb2NrLCByZXNvbHV0aW9uIDEuMDAwMDAwcwpFdmVudCB0aW1lciAiUlRD IiBmcmVxdWVuY3kgMzI3NjggSHogcXVhbGl0eSAwCmF0dGltZXIwOiA8QVQgdGltZXI+IHBv cnQgMHg0MC0weDQzLDB4NTAtMHg1MyBpcnEgMCBvbiBhY3BpMApUaW1lY291bnRlciAiaTgy NTQiIGZyZXF1ZW5jeSAxMTkzMTgyIEh6IHF1YWxpdHkgMApFdmVudCB0aW1lciAiaTgyNTQi IGZyZXF1ZW5jeSAxMTkzMTgyIEh6IHF1YWxpdHkgMTAwClRpbWVjb3VudGVyICJBQ1BJLWZh c3QiIGZyZXF1ZW5jeSAzNTc5NTQ1IEh6IHF1YWxpdHkgOTAwCmFjcGlfdGltZXIwOiA8MjQt Yml0IHRpbWVyIGF0IDMuNTc5NTQ1TUh6PiBwb3J0IDB4MTgwOC0weDE4MGIgb24gYWNwaTAK cGNpYjA6IDxBQ1BJIEhvc3QtUENJIGJyaWRnZT4gcG9ydCAweGNmOC0weGNmZiBvbiBhY3Bp MApwY2kwOiA8QUNQSSBQQ0kgYnVzPiBvbiBwY2liMAp2Z2FwY2kwOiA8VkdBLWNvbXBhdGli bGUgZGlzcGxheT4gcG9ydCAweDQwMDAtMHg0MDNmIG1lbSAweDYwMWMwMDAwMDAtMHg2MDFj ZmZmZmZmLDB4NDAwMDAwMDAwMC0weDQwMWZmZmZmZmYgYXQgZGV2aWNlIDIuMCBvbiBwY2kw CnZnYXBjaTA6IEJvb3QgdmlkZW8gZGV2aWNlCnBjaWIxOiA8QUNQSSBQQ0ktUENJIGJyaWRn ZT4gYXQgZGV2aWNlIDcuMCBvbiBwY2kwCnhoY2kwOiA8SW50ZWwgVGlnZXIgTGFrZS1MUCBU aHVuZGVyYm9sdCA0IFVTQiBjb250cm9sbGVyPiBtZW0gMHg2MDFkMTcwMDAwLTB4NjAxZDE3 ZmZmZiBhdCBkZXZpY2UgMTMuMCBvbiBwY2kwCnhoY2kwOiAzMiBieXRlcyBjb250ZXh0IHNp emUsIDY0LWJpdCBETUEKeGhjaTA6IHhFQ1AgY2FwYWJpbGl0aWVzIDxQUk9UTyxQUk9UTyxW RU5EKGMwKSxMRUdBQ1ksVkVORChjNiksVkVORChjNyksVkVORChjMiksREVCVUcsVkVORChj MyksVkVORChjNCksVkVORChjZSksVkVORChjOCksVkVORChjOSksVkVORChjYSksVkVORChj YiksVkVORChjYyksVkVORChjZCk+CnVzYnVzMCBvbiB4aGNpMAp1c2J1czA6IDUuMEdicHMg U3VwZXIgU3BlZWQgVVNCIHYzLjAKcGNpMDogPHNlcmlhbCBidXMsIFVTQj4gYXQgZGV2aWNl IDEzLjIgKG5vIGRyaXZlciBhdHRhY2hlZCkKeGhjaTE6IDxJbnRlbCBUaWdlciBMYWtlLUxQ IFVTQiAzLjIgY29udHJvbGxlcj4gbWVtIDB4NjAxZDE2MDAwMC0weDYwMWQxNmZmZmYgYXQg ZGV2aWNlIDIwLjAgb24gcGNpMAp4aGNpMTogMzIgYnl0ZXMgY29udGV4dCBzaXplLCA2NC1i aXQgRE1BCnhoY2kxOiB4RUNQIGNhcGFiaWxpdGllcyA8UFJPVE8sUFJPVE8sVkVORChjMCks TEVHQUNZLFZFTkQoYzYpLFZFTkQoYzcpLFZFTkQoYzIpLERFQlVHLFZFTkQoYzMpLFZFTkQo YzQpLFZFTkQoY2UpLFZFTkQoYzgpLFZFTkQoYzkpLFZFTkQoY2EpLFZFTkQoY2IpLFZFTkQo Y2MpLFZFTkQoY2QpPgp1c2J1czEgb24geGhjaTEKdXNidXMxOiA1LjBHYnBzIFN1cGVyIFNw ZWVkIFVTQiB2My4wCnBjaTA6IDxtZW1vcnksIFJBTT4gYXQgZGV2aWNlIDIwLjIgKG5vIGRy aXZlciBhdHRhY2hlZCkKcGNpMDogPG5ldHdvcms+IGF0IGRldmljZSAyMC4zIChubyBkcml2 ZXIgYXR0YWNoZWQpCnBjaTA6IDxzZXJpYWwgYnVzPiBhdCBkZXZpY2UgMjEuMCAobm8gZHJp dmVyIGF0dGFjaGVkKQpwY2kwOiA8c2VyaWFsIGJ1cz4gYXQgZGV2aWNlIDIxLjIgKG5vIGRy aXZlciBhdHRhY2hlZCkKcGNpMDogPHNpbXBsZSBjb21tcz4gYXQgZGV2aWNlIDIyLjAgKG5v IGRyaXZlciBhdHRhY2hlZCkKcGNpYjI6IDxBQ1BJIFBDSS1QQ0kgYnJpZGdlPiBhdCBkZXZp Y2UgMjguMCBvbiBwY2kwCnBjaTE6IDxBQ1BJIFBDSSBidXM+IG9uIHBjaWIyCnBjaWIzOiA8 QUNQSSBQQ0ktUENJIGJyaWRnZT4gYXQgZGV2aWNlIDI4LjIgb24gcGNpMApwY2kyOiA8QUNQ SSBQQ0kgYnVzPiBvbiBwY2liMwpyZTA6IDxSZWFsVGVrIDgxNjgvODExMSBCL0MvQ1AvRC9E UC9FL0YvRyBQQ0llIEdpZ2FiaXQgRXRoZXJuZXQ+IHBvcnQgMHgzMDAwLTB4MzBmZiBtZW0g MHg4ZTMwNDAwMC0weDhlMzA0ZmZmLDB4OGUzMDAwMDAtMHg4ZTMwM2ZmZiBhdCBkZXZpY2Ug MC4wIG9uIHBjaTIKcmUwOiBVc2luZyAxIE1TSS1YIG1lc3NhZ2UKcmUwOiBBU1BNIGRpc2Fi bGVkCnJlMDogQ2hpcCByZXYuIDB4NTQwMDAwMDAKcmUwOiBNQUMgcmV2LiAweDAwMTAwMDAw Cm1paWJ1czA6IDxNSUkgYnVzPiBvbiByZTAKcmdlcGh5MDogPFJUTDgyNTEvODE1MyAxMDAw QkFTRS1UIG1lZGlhIGludGVyZmFjZT4gUEhZIDEgb24gbWlpYnVzMApyZ2VwaHkwOiAgbm9u ZSwgMTBiYXNlVCwgMTBiYXNlVC1GRFgsIDEwYmFzZVQtRkRYLWZsb3csIDEwMGJhc2VUWCwg MTAwYmFzZVRYLUZEWCwgMTAwYmFzZVRYLUZEWC1mbG93LCAxMDAwYmFzZVQtRkRYLCAxMDAw YmFzZVQtRkRYLW1hc3RlciwgMTAwMGJhc2VULUZEWC1mbG93LCAxMDAwYmFzZVQtRkRYLWZs b3ctbWFzdGVyLCBhdXRvLCBhdXRvLWZsb3cKcmUwOiBVc2luZyBkZWZhdWx0cyBmb3IgVFNP OiA2NTUxOC8zNS8yMDQ4CnJlMDogRXRoZXJuZXQgYWRkcmVzczogNDQ6ZTU6MTc6ZmQ6ODc6 ZjcKcmUwOiBuZXRtYXAgcXVldWVzL3Nsb3RzOiBUWCAxLzI1NiwgUlggMS8yNTYKcGNpYjQ6 IDxBQ1BJIFBDSS1QQ0kgYnJpZGdlPiBhdCBkZXZpY2UgMjkuMCBvbiBwY2kwCnBjaTM6IDxB Q1BJIFBDSSBidXM+IG9uIHBjaWI0Cm52bWUwOiA8R2VuZXJpYyBOVk1lIERldmljZT4gbWVt IDB4OGUyMDAwMDAtMHg4ZTIwM2ZmZiBhdCBkZXZpY2UgMC4wIG9uIHBjaTMKaXNhYjA6IDxQ Q0ktSVNBIGJyaWRnZT4gYXQgZGV2aWNlIDMxLjAgb24gcGNpMAppc2EwOiA8SVNBIGJ1cz4g b24gaXNhYjAKaGRhYzA6IDxJbnRlbCBUaWdlciBMYWtlIEhEQSBDb250cm9sbGVyPiBtZW0g MHg2MDFkMTg4MDAwLTB4NjAxZDE4YmZmZiwweDYwMWQwMDAwMDAtMHg2MDFkMGZmZmZmIGF0 IGRldmljZSAzMS4zIG9uIHBjaTAKcGNpMDogPHNlcmlhbCBidXM+IGF0IGRldmljZSAzMS41 IChubyBkcml2ZXIgYXR0YWNoZWQpCmFjcGlfYnV0dG9uMDogPFBvd2VyIEJ1dHRvbj4gb24g YWNwaTAKYWNwaV9idXR0b24xOiA8U2xlZXAgQnV0dG9uPiBvbiBhY3BpMAphY3BpX2xpZDA6 IDxDb250cm9sIE1ldGhvZCBMaWQgU3dpdGNoPiBvbiBhY3BpMAp0cG10aXMwOiA8VHJ1c3Rl ZCBQbGF0Zm9ybSBNb2R1bGUgMi4wLCBGSUZPIG1vZGU+IGlvbWVtIDB4ZmVkNDAwMDAtMHhm ZWQ0NGZmZiBpcnEgMjggb24gYWNwaTAKcmFuZG9tOiByZWdpc3RlcmluZyBmYXN0IHNvdXJj ZSBUUE0KYXRrYmRjMDogPEtleWJvYXJkIGNvbnRyb2xsZXIgKGk4MDQyKT4gcG9ydCAweDYw LDB4NjQgaXJxIDEgb24gYWNwaTAKYXRrYmQwOiA8QVQgS2V5Ym9hcmQ+IGlycSAxIG9uIGF0 a2JkYzAKa2JkMCBhdCBhdGtiZDAKYXRrYmQwOiBbR0lBTlQtTE9DS0VEXQpwc20wOiA8UFMv MiBNb3VzZT4gaXJxIDEyIG9uIGF0a2JkYzAKcHNtMDogW0dJQU5ULUxPQ0tFRF0KV0FSTklO RzogRGV2aWNlICJwc20iIGlzIEdpYW50IGxvY2tlZCBhbmQgbWF5IGJlIGRlbGV0ZWQgYmVm b3JlIEZyZWVCU0QgMTYuMC4KcHNtMDogbW9kZWwgRWxhbnRlY2ggVG91Y2hwYWQsIGRldmlj ZSBJRCAwCmFjcGlfc3lzY29udGFpbmVyMDogPFN5c3RlbSBDb250YWluZXI+IG9uIGFjcGkw CmFjcGlfYWNhZDA6IDxBQyBBZGFwdGVyPiBvbiBhY3BpMApiYXR0ZXJ5MDogPEFDUEkgQ29u dHJvbCBNZXRob2QgQmF0dGVyeT4gb24gYWNwaTAKYXRydGMwOiA8QVQgcmVhbHRpbWUgY2xv Y2s+IGF0IHBvcnQgMHg3MCBpcnEgOCBvbiBpc2EwCmF0cnRjMDogV2FybmluZzogQ291bGRu J3QgbWFwIEkvTy4KYXRydGMwOiByZWdpc3RlcmVkIGFzIGEgdGltZS1vZi1kYXkgY2xvY2ss IHJlc29sdXRpb24gMS4wMDAwMDBzCmF0cnRjMDogQ2FuJ3QgbWFwIGludGVycnVwdC4KaHdw c3RhdGVfaW50ZWwwOiA8SW50ZWwgU3BlZWQgU2hpZnQ+IG9uIGNwdTAKY3B1ZnJlcTA6IDxD UFUgZnJlcXVlbmN5IGNvbnRyb2w+IG9uIGNwdTAKaHdwc3RhdGVfaW50ZWwxOiA8SW50ZWwg U3BlZWQgU2hpZnQ+IG9uIGNwdTEKY3B1ZnJlcTE6IDxDUFUgZnJlcXVlbmN5IGNvbnRyb2w+ IG9uIGNwdTEKaHdwc3RhdGVfaW50ZWwyOiA8SW50ZWwgU3BlZWQgU2hpZnQ+IG9uIGNwdTIK Y3B1ZnJlcTI6IDxDUFUgZnJlcXVlbmN5IGNvbnRyb2w+IG9uIGNwdTIKaHdwc3RhdGVfaW50 ZWwzOiA8SW50ZWwgU3BlZWQgU2hpZnQ+IG9uIGNwdTMKY3B1ZnJlcTM6IDxDUFUgZnJlcXVl bmN5IGNvbnRyb2w+IG9uIGNwdTMKaHdwc3RhdGVfaW50ZWw0OiA8SW50ZWwgU3BlZWQgU2hp ZnQ+IG9uIGNwdTQKY3B1ZnJlcTQ6IDxDUFUgZnJlcXVlbmN5IGNvbnRyb2w+IG9uIGNwdTQK aHdwc3RhdGVfaW50ZWw1OiA8SW50ZWwgU3BlZWQgU2hpZnQ+IG9uIGNwdTUKY3B1ZnJlcTU6 IDxDUFUgZnJlcXVlbmN5IGNvbnRyb2w+IG9uIGNwdTUKaHdwc3RhdGVfaW50ZWw2OiA8SW50 ZWwgU3BlZWQgU2hpZnQ+IG9uIGNwdTYKY3B1ZnJlcTY6IDxDUFUgZnJlcXVlbmN5IGNvbnRy b2w+IG9uIGNwdTYKaHdwc3RhdGVfaW50ZWw3OiA8SW50ZWwgU3BlZWQgU2hpZnQ+IG9uIGNw dTcKY3B1ZnJlcTc6IDxDUFUgZnJlcXVlbmN5IGNvbnRyb2w+IG9uIGNwdTcKVGltZWNvdW50 ZXIgIlRTQy1sb3ciIGZyZXF1ZW5jeSAxMjA5NTk5OTk5IEh6IHF1YWxpdHkgMTAwMApUaW1l Y291bnRlcnMgdGljayBldmVyeSAxLjAwMCBtc2VjCnVnZW4wLjE6IDxJbnRlbCBYSENJIHJv b3QgSFVCPiBhdCB1c2J1czAKdWdlbjEuMTogPEludGVsIFhIQ0kgcm9vdCBIVUI+IGF0IHVz YnVzMQp1aHViMCBvbiB1c2J1czAKdWh1YjA6IDxJbnRlbCBYSENJIHJvb3QgSFVCLCBjbGFz cyA5LzAsIHJldiAzLjAwLzEuMDAsIGFkZHIgMT4gb24gdXNidXMwClpGUyBmaWxlc3lzdGVt IHZlcnNpb246IDUKWkZTIHN0b3JhZ2UgcG9vbCB2ZXJzaW9uOiBmZWF0dXJlcyBzdXBwb3J0 ICg1MDAwKQp1aHViMSBvbiB1c2J1czEKdWh1YjE6IDxJbnRlbCBYSENJIHJvb3QgSFVCLCBj bGFzcyA5LzAsIHJldiAzLjAwLzEuMDAsIGFkZHIgMT4gb24gdXNidXMxCm52bWUwOiBBbGxv Y2F0ZWQgNjRNQiBob3N0IG1lbW9yeSBidWZmZXIKaGRhY2MwOiA8UmVhbHRlayBBTEMyNTcg SERBIENPREVDPiBhdCBjYWQgMCBvbiBoZGFjMApoZGFhMDogPFJlYWx0ZWsgQUxDMjU3IEF1 ZGlvIEZ1bmN0aW9uIEdyb3VwPiBhdCBuaWQgMSBvbiBoZGFjYzAKcGNtMDogPFJlYWx0ZWsg QUxDMjU3IChBbmFsb2cgMi4wK0hQLzIuMCk+IGF0IG5pZCAyMCwzMyBhbmQgMjUgb24gaGRh YTAKaGRhY2MxOiA8SW50ZWwgVGlnZXIgTGFrZSBIREEgQ09ERUM+IGF0IGNhZCAyIG9uIGhk YWMwCmhkYWExOiA8SW50ZWwgVGlnZXIgTGFrZSBBdWRpbyBGdW5jdGlvbiBHcm91cD4gYXQg bmlkIDEgb24gaGRhY2MxCnBjbTE6IDxJbnRlbCBUaWdlciBMYWtlIChIRE1JL0RQIDhjaCk+ IGF0IG5pZCA0IG9uIGhkYWExCm5kYTAgYXQgbnZtZTAgYnVzIDAgc2NidXMwIHRhcmdldCAw IGx1biAxCm5kYTA6IDxTQU1TVU5HIE1aQUxRMjU2SEFKRC0wMDBMMSBFTDFRRlhWNyBTNFlE TkYwUjQyMjEwMz4KbmRhMDogU2VyaWFsIE51bWJlciBTNFlETkYwUjQyMjEwMwpuZGEwOiBu dm1lIHZlcnNpb24gMS4zCm5kYTA6IDI0NDE5OE1CICg1MDAxMTgxOTIgNTEyIGJ5dGUgc2Vj dG9ycykKVHJ5aW5nIHRvIG1vdW50IHJvb3QgZnJvbSB6ZnM6enJvb3QvUk9PVC9kZWZhdWx0 IFtdLi4uCnVodWIwOiA1IHBvcnRzIHdpdGggNSByZW1vdmFibGUsIHNlbGYgcG93ZXJlZAp1 aHViMTogMTYgcG9ydHMgd2l0aCAxNiByZW1vdmFibGUsIHNlbGYgcG93ZXJlZAp1Z2VuMS4y OiA8TG9naXRlY2ggVVNCIFJlY2VpdmVyPiBhdCB1c2J1czEKdXNiaGlkMCBvbiB1aHViMQp1 c2JoaWQwOiA8TG9naXRlY2ggVVNCIFJlY2VpdmVyLCBjbGFzcyAwLzAsIHJldiAyLjAwLzUu MDEsIGFkZHIgMT4gb24gdXNidXMxCmhpZGJ1czA6IDxISUQgYnVzPiBvbiB1c2JoaWQwCmhr YmQwOiA8TG9naXRlY2ggVVNCIFJlY2VpdmVyIEtleWJvYXJkPiBvbiBoaWRidXMwCmtiZDIg YXQgaGtiZDAKdXNiaGlkMSBvbiB1aHViMQp1c2JoaWQxOiA8TG9naXRlY2ggVVNCIFJlY2Vp dmVyLCBjbGFzcyAwLzAsIHJldiAyLjAwLzUuMDEsIGFkZHIgMT4gb24gdXNidXMxCmhpZGJ1 czE6IDxISUQgYnVzPiBvbiB1c2JoaWQxCnVzYmhpZDIgb24gdWh1YjEKdXNiaGlkMjogPExv Z2l0ZWNoIFVTQiBSZWNlaXZlciwgY2xhc3MgMC8wLCByZXYgMi4wMC81LjAxLCBhZGRyIDE+ IG9uIHVzYnVzMQpoaWRidXMyOiA8SElEIGJ1cz4gb24gdXNiaGlkMgpSb290IG1vdW50IHdh aXRpbmcgZm9yOiB1c2J1czEKdWdlbjEuMzogPDhTU0MyMEYyNzE0NVYxU1IxOFAwQVhTIElu dGVncmF0ZWQgQ2FtZXJhPiBhdCB1c2J1czEKdWdlbjEuNDogPEdlbmVyaWMgR29vZGl4IEZp bmdlclByaW50IERldmljZT4gYXQgdXNidXMxClJvb3QgbW91bnQgd2FpdGluZyBmb3I6IHVz YnVzMQp1Z2VuMS41OiA8dmVuZG9yIDB4ODA4NyBwcm9kdWN0IDB4MDAyNj4gYXQgdXNidXMx Cndhcm5pbmc6IHRoaXMgc3lzY3RsIGV4cGVjdHMgYSBzbGVlcCB0eXBlLCBidXQgYW4gQUNQ SSBTLXN0YXRlIGhhcyBiZWVuIHBhc3NlZCB0byBpdC4gVGhpcyBmdW5jdGlvbmFsaXR5IGlz IGRlcHJlY2F0ZWQ7IHNlZSBhY3BpKDQpLgpHRU9NX0VMSTogRGV2aWNlIG5kYTBwMi5lbGkg Y3JlYXRlZC4KR0VPTV9FTEk6IEVuY3J5cHRpb246IEFFUy1YVFMgMTI4CkdFT01fRUxJOiAg ICAgQ3J5cHRvOiBhY2NlbGVyYXRlZCBzb2Z0d2FyZQpbZHJtXSBHb3QgSW50ZWwgZ3JhcGhp Y3Mgc3RvbGVuIG1lbW9yeSBiYXNlIDB4N2M4MDAwMDAsIHNpemUgMHg0MDAwMDAwCmRybW4w OiA8ZHJtbj4gb24gdmdhcGNpMAp2Z2FwY2kwOiBjaGlsZCBkcm1uMCByZXF1ZXN0ZWQgcGNp X2VuYWJsZV9pbwp2Z2FwY2kwOiBjaGlsZCBkcm1uMCByZXF1ZXN0ZWQgcGNpX2VuYWJsZV9p bwppOTE1L3RnbF9kbWNfdmVyMl8xMi5iaW46IGNvdWxkIG5vdCBsb2FkIGJpbmFyeSBmaXJt d2FyZSAvYm9vdC9maXJtd2FyZS9pOTE1L3RnbF9kbWNfdmVyMl8xMi5iaW4gZWl0aGVyCnRn bF9kbWNfdmVyMl8xMi5iaW46IGNvdWxkIG5vdCBsb2FkIGJpbmFyeSBmaXJtd2FyZSAvYm9v dC9maXJtd2FyZS90Z2xfZG1jX3ZlcjJfMTIuYmluIGVpdGhlcgppOTE1X3RnbF9kbWNfdmVy Ml8xMi5iaW46IGNvdWxkIG5vdCBsb2FkIGJpbmFyeSBmaXJtd2FyZSAvYm9vdC9maXJtd2Fy ZS9pOTE1X3RnbF9kbWNfdmVyMl8xMi5iaW4gZWl0aGVyCmxrcGlfaWljMDogPExpbnV4S1BJ IEkyQz4gb24gZHJtbjAKaWljYnVzMDogPFBoaWxpcHMgSTJDIGJ1cz4gb24gbGtwaV9paWMw CmlpYzA6IDxJMkMgZ2VuZXJpYyBJL08+IG9uIGlpY2J1czAKbGtwaV9paWMxOiA8TGludXhL UEkgSTJDPiBvbiBkcm1uMAppaWNidXMxOiA8UGhpbGlwcyBJMkMgYnVzPiBvbiBsa3BpX2lp YzEKaWljMTogPEkyQyBnZW5lcmljIEkvTz4gb24gaWljYnVzMQpsa3BpX2lpYzI6IDxMaW51 eEtQSSBJMkM+IG9uIGRybW4wCmlpY2J1czI6IDxQaGlsaXBzIEkyQyBidXM+IG9uIGxrcGlf aWljMgppaWMyOiA8STJDIGdlbmVyaWMgSS9PPiBvbiBpaWNidXMyCmxrcGlfaWljMzogPExp bnV4S1BJIEkyQz4gb24gZHJtbjAKaWljYnVzMzogPFBoaWxpcHMgSTJDIGJ1cz4gb24gbGtw aV9paWMzCmlpYzM6IDxJMkMgZ2VuZXJpYyBJL08+IG9uIGlpY2J1czMKbGtwaV9paWM0OiA8 TGludXhLUEkgSTJDPiBvbiBkcm1uMAppaWNidXM0OiA8UGhpbGlwcyBJMkMgYnVzPiBvbiBs a3BpX2lpYzQKaWljNDogPEkyQyBnZW5lcmljIEkvTz4gb24gaWljYnVzNApsa3BpX2lpYzU6 IDxMaW51eEtQSSBJMkM+IG9uIGRybW4wCmlpY2J1czU6IDxQaGlsaXBzIEkyQyBidXM+IG9u IGxrcGlfaWljNQppaWM1OiA8STJDIGdlbmVyaWMgSS9PPiBvbiBpaWNidXM1CmxrcGlfaWlj NjogPExpbnV4S1BJIEkyQz4gb24gZHJtbjAKaWljYnVzNjogPFBoaWxpcHMgSTJDIGJ1cz4g b24gbGtwaV9paWM2CmlpYzY6IDxJMkMgZ2VuZXJpYyBJL08+IG9uIGlpY2J1czYKbGtwaV9p aWM3OiA8TGludXhLUEkgSTJDPiBvbiBkcm1uMAppaWNidXM3OiA8UGhpbGlwcyBJMkMgYnVz PiBvbiBsa3BpX2lpYzcKaWljNzogPEkyQyBnZW5lcmljIEkvTz4gb24gaWljYnVzNwpsa3Bp X2lpYzg6IDxMaW51eEtQSSBJMkM+IG9uIGRybW4wCmlpY2J1czg6IDxQaGlsaXBzIEkyQyBi dXM+IG9uIGxrcGlfaWljOAppaWM4OiA8STJDIGdlbmVyaWMgSS9PPiBvbiBpaWNidXM4CmRy bW4wOiBzdWNjZXNzZnVsbHkgbG9hZGVkIGZpcm13YXJlIGltYWdlICdpOTE1L3RnbF9kbWNf dmVyMl8xMi5iaW4nCmRybW4wOiBbZHJtXSBGaW5pc2hlZCBsb2FkaW5nIERNQyBmaXJtd2Fy ZSBpOTE1L3RnbF9kbWNfdmVyMl8xMi5iaW4gKHYyLjEyKQpzeXNjdGxfYWRkX29pZDogY2Fu J3QgcmUtdXNlIGEgbGVhZiAoaHcuZHJpLmRlYnVnKSEKbGtwaV9paWM5OiA8TGludXhLUEkg STJDPiBvbiBkcm0xCmlpY2J1czk6IDxQaGlsaXBzIEkyQyBidXM+IG9uIGxrcGlfaWljOQpp aWM5OiA8STJDIGdlbmVyaWMgSS9PPiBvbiBpaWNidXM5CmxrcGlfaWljMTA6IDxMaW51eEtQ SSBJMkM+IG9uIGRybTMKaWljYnVzMTA6IDxQaGlsaXBzIEkyQyBidXM+IG9uIGxrcGlfaWlj MTAKaWljMTA6IDxJMkMgZ2VuZXJpYyBJL08+IG9uIGlpY2J1czEwCmxrcGlfaWljMTE6IDxM aW51eEtQSSBJMkM+IG9uIGRybTQKaWljYnVzMTE6IDxQaGlsaXBzIEkyQyBidXM+IG9uIGxr cGlfaWljMTEKaWljMTE6IDxJMkMgZ2VuZXJpYyBJL08+IG9uIGlpY2J1czExCmxrcGlfaWlj MTI6IDxMaW51eEtQSSBJMkM+IG9uIGRybTUKaWljYnVzMTI6IDxQaGlsaXBzIEkyQyBidXM+ IG9uIGxrcGlfaWljMTIKaWljMTI6IDxJMkMgZ2VuZXJpYyBJL08+IG9uIGlpY2J1czEyCmxr cGlfaWljMTM6IDxMaW51eEtQSSBJMkM+IG9uIGRybTYKaWljYnVzMTM6IDxQaGlsaXBzIEky QyBidXM+IG9uIGxrcGlfaWljMTMKaWljMTM6IDxJMkMgZ2VuZXJpYyBJL08+IG9uIGlpY2J1 czEzCltkcm1dIEluaXRpYWxpemVkIGk5MTUgMS42LjAgMjAyMDExMDMgZm9yIGRybW4wIG9u IG1pbm9yIDAKVlQ6IFJlcGxhY2luZyBkcml2ZXIgImVmaWZiIiB3aXRoIG5ldyAiZHJtZmIi LgpzdGFydCBGQl9JTkZPOgpoZWlnaHQ9MTA4MCB3aWR0aD0xOTIwIGRlcHRoPTMyCnBiYXNl PTB4NDAwMDAwMDAwMCB2YmFzZT0weGZmZmZmZTAxMTI2MDAwMDAKbmFtZT1kcm1uMCBpZD1p OTE1ZHJtZmIgZmxhZ3M9MHgwIHN0cmlkZT03NjgwCmVuZCBGQl9JTkZPCml3eDA6IDxXaS1G aSA2IEFYMjAxPiBtZW0gMHg2MDFkMThjMDAwLTB4NjAxZDE4ZmZmZiBhdCBkZXZpY2UgMjAu MyBvbiBwY2kwCml3bHdpZmktUXVaLWEwLWhyLWIwLTc3LnVjb2RlOiBjb3VsZCBub3QgbG9h ZCBmaXJtd2FyZSBpbWFnZSwgZXJyb3IgOAppd3gwOiBodyByZXYgMHgzNTAsIGZ3IDc3LjBi NGMwNmFkLjAsIGFkZHJlc3MgNDQ6ZTU6MTc6ZmQ6ODc6ZjcKaXd4MDogMTFhIHJhdGVzOiA2 TWJwcyA5TWJwcyAxMk1icHMgMThNYnBzIDI0TWJwcyAzNk1icHMgNDhNYnBzIDU0TWJwcwpp d3gwOiAxMWIgcmF0ZXM6IDFNYnBzIDJNYnBzIDUuNU1icHMgMTFNYnBzCml3eDA6IDExZyBy YXRlczogMU1icHMgMk1icHMgNS41TWJwcyAxMU1icHMgNk1icHMgOU1icHMgMTJNYnBzIDE4 TWJwcyAyNE1icHMgMzZNYnBzIDQ4TWJwcyA1NE1icHMKaXd4MDogMlQyUgppd3gwOiAxMW5h IE1DUyAyME1Iegppd3gwOiBNQ1MgMC03OiA2LjVNYnBzIC0gNjVNYnBzCml3eDA6IE1DUyA4 LTE1OiAxM01icHMgLSAxMzBNYnBzCml3eDA6IDExbmEgTUNTIDIwTUh6IFNHSQppd3gwOiBN Q1MgMC03OiA3TWJwcyAtIDcyTWJwcwppd3gwOiBNQ1MgOC0xNTogMTQuNU1icHMgLSAxNDQu NU1icHMKaXd4MDogMTFuYSBNQ1MgNDBNSHo6Cml3eDA6IE1DUyAwLTc6IDEzLjVNYnBzIC0g MTM1TWJwcwppd3gwOiBNQ1MgOC0xNTogMjdNYnBzIC0gMjcwTWJwcwppd3gwOiAxMW5hIE1D UyA0ME1IeiBTR0k6Cml3eDA6IE1DUyAwLTc6IDE1TWJwcyAtIDE1ME1icHMKaXd4MDogTUNT IDgtMTU6IDMwTWJwcyAtIDMwME1icHMKaXd4MDogMTFuZyBNQ1MgMjBNSHoKaXd4MDogTUNT IDAtNzogNi41TWJwcyAtIDY1TWJwcwppd3gwOiBNQ1MgOC0xNTogMTNNYnBzIC0gMTMwTWJw cwppd3gwOiAxMW5nIE1DUyAyME1IeiBTR0kKaXd4MDogTUNTIDAtNzogN01icHMgLSA3Mk1i cHMKaXd4MDogTUNTIDgtMTU6IDE0LjVNYnBzIC0gMTQ0LjVNYnBzCml3eDA6IDExbmcgTUNT IDQwTUh6Ogppd3gwOiBNQ1MgMC03OiAxMy41TWJwcyAtIDEzNU1icHMKaXd4MDogTUNTIDgt MTU6IDI3TWJwcyAtIDI3ME1icHMKaXd4MDogMTFuZyBNQ1MgNDBNSHogU0dJOgppd3gwOiBN Q1MgMC03OiAxNU1icHMgLSAxNTBNYnBzCml3eDA6IE1DUyA4LTE1OiAzME1icHMgLSAzMDBN YnBzCml3eDA6IFtWSFRdIENoYW5uZWwgV2lkdGhzOiAyME1IeiwgNDBNSHosIDgwTUh6Cml3 eDA6IFtWSFRdIEZlYXR1cmVzOiAzMTgwMDAyMDxTSE9SVEdJODA+Cml3eDA6IFtWSFRdIE5T UyAxOiBUWCBNQ1MgMC4uOSwgUlggTUNTIDAuLjkKaXd4MDogW1ZIVF0gTlNTIDI6IFRYIE1D UyAwLi45LCBSWCBNQ1MgMC4uOQppZzRpaWMwOiA8SW50ZWwgVGlnZXIgTGFrZS1MUCBJMkMg Q29udHJvbGxlci00PiBtZW0gMHg2MDFkMTk3MDAwLTB4NjAxZDE5N2ZmZiBhdCBkZXZpY2Ug MjEuMCBvbiBwY2kwCmlnNGlpYzA6IFVzaW5nIE1TSQppaWNidXMxNDogPFBoaWxpcHMgSTJD IGJ1cyAoQUNQSS1oaW50ZWQpPiBvbiBpZzRpaWMwCmlpYzE0OiA8STJDIGdlbmVyaWMgSS9P PiBvbiBpaWNidXMxNAppZzRpaWMxOiA8SW50ZWwgVGlnZXIgTGFrZS1MUCBJMkMgQ29udHJv bGxlci02PiBtZW0gMHg2MDFkMTk2MDAwLTB4NjAxZDE5NmZmZiBhdCBkZXZpY2UgMjEuMiBv biBwY2kwCmlnNGlpYzE6IFVzaW5nIE1TSQppaWNidXMxNTogPFBoaWxpcHMgSTJDIGJ1cyAo QUNQSS1oaW50ZWQpPiBvbiBpZzRpaWMxCmlpYzE1OiA8STJDIGdlbmVyaWMgSS9PPiBvbiBp aWNidXMxNQppY2hzbWIwOiA8SW50ZWwgVGlnZXIgTGFrZSBTTUJ1cyBjb250cm9sbGVyPiBw b3J0IDB4ZWZhMC0weGVmYmYgbWVtIDB4NjAxZDE5NDAwMC0weDYwMWQxOTQwZmYgYXQgZGV2 aWNlIDMxLjQgb24gcGNpMApzbWJ1czA6IDxTeXN0ZW0gTWFuYWdlbWVudCBCdXM+IG9uIGlj aHNtYjAKYWNwaV93bWkwOiA8QUNQSS1XTUkgbWFwcGluZz4gb24gYWNwaTAKYWNwaV93bWkw OiBFbWJlZGRlZCBNT0YgZm91bmQKYWNwaV93bWkxOiA8QUNQSS1XTUkgbWFwcGluZz4gb24g YWNwaTAKYWNwaV93bWkxOiBFbWJlZGRlZCBNT0YgZm91bmQKYWNwaV93bWkyOiA8QUNQSS1X TUkgbWFwcGluZz4gb24gYWNwaTAKYWNwaV93bWkyOiBFbWJlZGRlZCBNT0YgZm91bmQKYWNw aV93bWkzOiA8QUNQSS1XTUkgbWFwcGluZz4gb24gYWNwaTAKYWNwaV93bWkzOiBFbWJlZGRl ZCBNT0YgZm91bmQKYWNwaV93bWk0OiA8QUNQSS1XTUkgbWFwcGluZz4gb24gYWNwaTAKYWNw aV93bWk0OiBFbWJlZGRlZCBNT0YgZm91bmQKYWNwaV93bWk1OiA8QUNQSS1XTUkgbWFwcGlu Zz4gb24gYWNwaTAKYWNwaV93bWk1OiBFbWJlZGRlZCBNT0YgZm91bmQKYWNwaV93bWk2OiA8 QUNQSS1XTUkgbWFwcGluZz4gb24gYWNwaTAKYWNwaV93bWk2OiBFbWJlZGRlZCBNT0YgZm91 bmQKYWNwaV93bWk3OiA8QUNQSS1XTUkgbWFwcGluZz4gb24gYWNwaTAKYWNwaV93bWk3OiBF bWJlZGRlZCBNT0YgZm91bmQKYWNwaV93bWk4OiA8QUNQSS1XTUkgbWFwcGluZz4gb24gYWNw aTAKYWNwaV93bWk4OiBFbWJlZGRlZCBNT0YgZm91bmQKaG1zMDogPExvZ2l0ZWNoIFVTQiBS ZWNlaXZlciBNb3VzZT4gb24gaGlkYnVzMQpobXMwOiAxNiBidXR0b25zIGFuZCBbWFlXSF0g Y29vcmRpbmF0ZXMgSUQ9MgpoY29uczA6IDxMb2dpdGVjaCBVU0IgUmVjZWl2ZXIgQ29uc3Vt ZXIgQ29udHJvbD4gb24gaGlkYnVzMQpoc2N0cmwwOiA8TG9naXRlY2ggVVNCIFJlY2VpdmVy IFN5c3RlbSBDb250cm9sPiBvbiBoaWRidXMxCmhkYWMwOiBDb21tYW5kIDB4MjA0M2IwMDAg dGltZW91dCBvbiBhZGRyZXNzIDIKd2xhbjA6IEV0aGVybmV0IGFkZHJlc3M6IDQ0OmU1OjE3 OmZkOjg3OmY3CnJlMDogbGluayBzdGF0ZSBjaGFuZ2VkIHRvIERPV04KbG8wOiBsaW5rIHN0 YXRlIGNoYW5nZWQgdG8gVVAKbGFnZzA6IGxpbmsgc3RhdGUgY2hhbmdlZCB0byBET1dOCnds YW4wOiBpZWVlODAyMTFfc3RhX2pvaW46IEJTUyA3YTpmZTpjZTplYzozMDo2ZTogMkdIeiBj aGFubmVsLCBWSFQgaW5mbzsgaWdub3JpbmcKd2xhbjA6IGxpbmsgc3RhdGUgY2hhbmdlZCB0 byBVUApsYWdnMDogbGluayBzdGF0ZSBjaGFuZ2VkIHRvIFVQCkN1c2UgdjAuMS4zNyBAIC9k ZXYvY3VzZQp1YnQwIG9uIHVodWIxCnVidDA6IDx2ZW5kb3IgMHg4MDg3IHByb2R1Y3QgMHgw MDI2LCBjbGFzcyAyMjQvMSwgcmV2IDIuMDEvMC4wMiwgYWRkciA0PiBvbiB1c2J1czEKU2Vj dXJpdHkgcG9saWN5IGxvYWRlZDogTUFDL250cGQgKG1hY19udHBkKQp3YXJuaW5nOiB0aGlz IHN5c2N0bCBleHBlY3RzIGEgc2xlZXAgdHlwZSwgYnV0IGFuIEFDUEkgUy1zdGF0ZSBoYXMg YmVlbiBwYXNzZWQgdG8gaXQuIFRoaXMgZnVuY3Rpb25hbGl0eSBpcyBkZXByZWNhdGVkOyBz ZWUgYWNwaSg0KS4K --------------O3W7y0rpnU0xAnE7aZ0ngDVG-- From nobody Fri Nov 14 21:36:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7Vp74WQCz6GQYT; Fri, 14 Nov 2025 21:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7Vp73gQ3z3VNm; Fri, 14 Nov 2025 21:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763156207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ra+Jf9kJXcJtR5fkgQRiEHg1hv/Z3nDaIdlSQg+gX0w=; b=o5jX77sOmn1VGO8QWJTJqZtJYLNzPyn5Lk7vHEHi80GXwmqQfbTIzz1nyCzZULE3FtkybL S3cPT8kdXqES7jc9ZA4xO9g7lBghe499TZYFhGqQHZLB+1mQK44K/BLaYqqS7oY/UdAyE9 xN3w6RSh6B3rydwWmxIBTHS+OUee2Xdv88xGOWIt6Hcgx7bGvZ7L3YUYYZ3aaGSCJQAZwI 2FNeh2PWgcjedsU7MjkahKtd979cTmHEMh06HACvtkL8BOIldut96RUi7/nD98EF4WpJbB rl35z/BalAv+F39H0Y49sBHwYD3TsXHEHvLe3t1MTYZ1rX1srhnYd2S57t0m+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763156207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ra+Jf9kJXcJtR5fkgQRiEHg1hv/Z3nDaIdlSQg+gX0w=; b=TORuGuUPT9s4452ZP+JfyYJHZ4SXUfhBMHZGTs3JXqRiOn+vLYoF5Wi3vm2EOe/r8KvN0F pTilb46Xd4GvarlDDpucCYPt9ISLIGBvnhs0R3y4CuL03/lCXNk+4tiTQln8ggU/E8TuSP 4brmKv1BtgOg3YzN8GX1KL4g6lR2YZnM5vPaALhxjrsa7Da/8ELpsmt2AQgUqKBDucercU VX9jh2SqyI406jgZbxr2B9wN+pBbkB3W8Nkvwgzcn4qCM0bmnGGI0c+O8HBiVGd+HmPmS8 ozxrAtSDHVu1dObsLxOUBpP1rkDd+r1dXKxiRDKmiJ5n0MqAN88Y5vfdGCt2cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763156207; a=rsa-sha256; cv=none; b=tAdjzQofSuJoig1hASm3v2+14J57RqPahMLGgDTzhwKgU7wCX9o2dkpOxdNOrkeN3feER+ jU6Af1Q8RE7VTV/jF4TivAMKKRq161brx4gauvdnfShQ4Yx2xcqIY21Q3c/RDUQn3yP6HO ZelsyVrSX4OQqhHQPZ5V/e3qZBvYkAi0cE1OYX7+iiPKK4MMBsYwo9tPzT7xgcqWQsQb6x wD/ql3saHKj1yunGvSp4jIwEt9pT3Q17nZ4ihjau48flFZQdn3M1mryxD0XLlJaLtjDaSy sXuIYGEiuoJvghqd6ecpZRwdDAW+jp8j/aDno6hsSbBmkLxYCw/BwLkGYbS+zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7Vp72zjDz8Xw; Fri, 14 Nov 2025 21:36: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 5AELaljE047126; Fri, 14 Nov 2025 21:36:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AELalPP047123; Fri, 14 Nov 2025 21:36:47 GMT (envelope-from git) Date: Fri, 14 Nov 2025 21:36:47 GMT Message-Id: <202511142136.5AELalPP047123@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: 73a4459f6fc7 - main - GitHub: Enclose list of commit hashes in parens List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 73a4459f6fc76482ea55c5aacb66136c49fb0892 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=73a4459f6fc76482ea55c5aacb66136c49fb0892 commit 73a4459f6fc76482ea55c5aacb66136c49fb0892 Author: Ed Maste AuthorDate: 2025-07-16 14:55:28 +0000 Commit: Ed Maste CommitDate: 2025-11-14 21:36:22 +0000 GitHub: Enclose list of commit hashes in parens Rather than superscript , for a nicer looking list. Reviewed by: vexeduxr Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53000 --- .github/workflows/checklist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checklist.yml b/.github/workflows/checklist.yml index ecc3939f34b8..44b264e9c031 100644 --- a/.github/workflows/checklist.yml +++ b/.github/workflows/checklist.yml @@ -88,7 +88,7 @@ jobs: /* Loop for each key in "checklist". */ for (const c in checklist) - msg += "- " + c + "" + checklist[c].join(", ") + "\n"; + msg += "- " + c + " (" + checklist[c].join(", ") + ")\n"; msg += "\nPlease review [CONTRIBUTING.md](https://github.com/freebsd/freebsd-src/blob/main/CONTRIBUTING.md), then update and push your branch again.\n" comment_func({ From nobody Fri Nov 14 21:40:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7VtQ4xPWz6GR3m; Fri, 14 Nov 2025 21:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7VtQ4Gpbz3W6n; Fri, 14 Nov 2025 21:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763156430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k4o8bL2owU3VCTc9V9jzkZRCBA7kUP3i592i828I0AM=; b=UoVTaetz/pDp68V75c2twVnQz2cji3RclAXdMvhRUCMKg0ONhh5Zyy9edGCZTfEEf+F+ON fcY2G3A4HyNH9Okp35ZiUKPLZy40qHU6oANqw2dAwYr/jVtnUfD6ZCBzaAYefrt1QFjW8w xebqNgx5EWLt0w4UeKhe7RamcKAXnZY+JPYNylWfIlLw59kM6xEEyydKOzxOHGknFQBAhg l8eHDjtZBkZgdWY12+74N6jIDrd4FMLdzLpQJD8LFFmMWxbGYh8n4e0q3GM/AFHtc66yzt LqsLEctSsxDFDYdMKob3O0ann0gQCCu6T5ECuk/MWKHOtD2VDbyup15chrk+mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763156430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k4o8bL2owU3VCTc9V9jzkZRCBA7kUP3i592i828I0AM=; b=CQovWqr+8BUnTpKbkef3Hqpr7M0D35qRAbUUmnAybbtFW6gkPXA7le1KCJPJk321P/w2z/ s6nYXsHKS4HdddD7zBAioBAAa9niTQxVsgMSMiWGSuBRL+9A1CLftXxPC3ua1jJWWGYD3a 23vsqhMrN0FsqtcjIS1PgMlnj7aqwA5NkeHMlSy3xEN+FTvZQbDgiIR6gbDdZNRXvuJ57L onhHHx7A9zmPqIaJ3qHBsHdg3a3jDt+PDVPj3pjv29cfClsjCVYpidOPCQVBxGnTA1t8/o ytgFFkkVfVSZRm8eqAKGMULjQEW7zUsU1LubD/umrgbDYXO8mC+8cXwBQ/l3Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763156430; a=rsa-sha256; cv=none; b=jSOKAfwaN4KoKQ2WxZFK7AZcuSFrCbx/26v9MArYa/EFjUVHApbRKtRAdCenQWWn0o4ib/ dHnlMIvkwSE7Uuwdq8zXWGoh08UM/0zjMUnm7qPRROKjU8jsGC1Xz0TirQHbz/U9ND/8PH dr0wIv/ly4PAybhuXHBAhclHLRr1TKkPFlBV7E/1gCUOH+zBACSJ4fLlb4QA2aIFhMdYjH kUTQ1GNXwoP6v+xdTfJMo9EvIP6GxetPKJiuSNM1SwWjj8HaKvciXTVec8gRXtnsGPjJCX RLwN8AK0g++8r/SZduL4F6yb5xsI1NnYPR7B1kxTuySxL2J5wVa7Sg5iDkbKPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7VtQ3XYBz87Z; Fri, 14 Nov 2025 21:40: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 5AELeUW3057057; Fri, 14 Nov 2025 21:40:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AELeUon057054; Fri, 14 Nov 2025 21:40:30 GMT (envelope-from git) Date: Fri, 14 Nov 2025 21:40:30 GMT Message-Id: <202511142140.5AELeUon057054@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: e96359d111aa - main - boot.config.5: Clarify that this controls legacy boot blocks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: e96359d111aaffa6bf0ea72a6f183eb3b91e6c72 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e96359d111aaffa6bf0ea72a6f183eb3b91e6c72 commit e96359d111aaffa6bf0ea72a6f183eb3b91e6c72 Author: Ed Maste AuthorDate: 2025-09-09 16:06:03 +0000 Commit: Ed Maste CommitDate: 2025-11-14 21:38:38 +0000 boot.config.5: Clarify that this controls legacy boot blocks Reviewed by; ziaee Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52460 --- share/man/man5/boot.config.5 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man5/boot.config.5 b/share/man/man5/boot.config.5 index 0b6d4c7b34e9..ddc232952f10 100644 --- a/share/man/man5/boot.config.5 +++ b/share/man/man5/boot.config.5 @@ -21,12 +21,12 @@ .\" 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 October 12, 2020 +.Dd November 14, 2025 .Dt BOOT.CONFIG 5 .Os .Sh NAME .Nm boot.config -.Nd "Configuration file for the boot blocks" +.Nd "Configuration file for the legacy boot blocks" .Sh DESCRIPTION The .Nm @@ -34,9 +34,9 @@ file contains options for the .Fx boot block code. .Pp -When the +When the first- and second-stage .Fx -boot loader runs, it searches the +boot loaders run, they search the .Dq Li a slice of the boot partition for a .Nm From nobody Fri Nov 14 21:41:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7Vw705JXz6GR4J; Fri, 14 Nov 2025 21:41:59 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7Vw66Zlhz3Wg5; Fri, 14 Nov 2025 21:41:58 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763156518; 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=9Tzuyx7cForOkAr9RXODUi1VYhD19PF9N5evclqtv60=; b=rIgnjpcrW6uI9e2YPs6bbo4wzdMuT60HsfF7VzQovmg0/E90CxjTWdBTUZZI+gtqRzu/SL IwwHnnyeFv5Hwuan0h7wAOyqXAkXYs5cYABsf2EKR5CPUpKUW/pJmB/zk7ETZQuJya7ywe nortxJracmTTbMxtdbdmRYpXSOhTDfQCv9ECplJwhFjWdPS0EYxIiBupuN5vXRcTG6t/Ye 9rs6b8MkX3dGfz09z6Ly2p9KzlGu05SL4Zd8l/8UHNU8LL2mQvCZHKnELEStc6nyESKphg OYnSeFWcldpY62vEJDps3rP0VDxHqthVUqwTTQsdYUBbg7GxewTILu0Twb6zRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763156518; 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=9Tzuyx7cForOkAr9RXODUi1VYhD19PF9N5evclqtv60=; b=Wb6h3p3tRLpw9/LkuOrvvMaVYxz9vWGvI1xiWAnpX+SRTRo0jJLba117cvJKuwxKm1Nvmr Pc7kNyRZ9t9eY5zr18XWlo1LUp3n3TIURhDB+zdaVkmkeasFLNVXjYMg8y+T8x3YRLjhTZ bfhNRwGoRNv6KvpngpYNBy5/aj5DtSZAjyx3h+GLQWFkX5b1kcdzMfWTaV5Md0bG8hWbVb 8VezPpol67G7Ept72QgyS2v50RUbkvGf2bctaxh+Pw9F672oDLaN5Iu/JHxcaAmbrvPQbC azMUxbHrWgyfcN6NA5u4wsZF65EZyC+0YB/i+NPBKh4pL36lg4eDHTdGUTs+1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763156518; a=rsa-sha256; cv=none; b=D4j3DAaDg2xtaSwXrCjCYD7BXtQZItw5605dv4PxkPhqqOhOdkhdOH+b2CHfXWohAsT+sU n+PE+UnPkLy0hPcBAxnkA4ugCRTMRcIUvXQHRecVG324K9Bh4WBu1g1XURalvPr0cH7DMk Xt0RbeAis6KbHGd1mr3ByiSyAWoxltL3Nifo3PSTqAttN1ZN9lOsAzyitgQ7r/ZSPCYrZD 6qSefX++EjMXgidzavzJov0LXXthKpyIVnprXvkQp0DuqwGWWZ8orA5er+5V624TLlWHI3 SzGX0XBuFrPCvTrUU7ms7stPBZr6D71RYqAGAHl2xa71w+XiVj0j5aXnT85AQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d7Vw62Chnzvx5; Fri, 14 Nov 2025 21:41:58 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 14 Nov 2025 13:41:55 -0800 From: Gleb Smirnoff To: Renato Botelho Cc: "David E. O'Brien" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f1b9c1aafd84 - main - random: git'o in RANDOM_ENABLE_TPM Message-ID: References: <202511110246.5AB2kdQc077401__35176.4420907543$1762829211$gmane$org@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: On Fri, Nov 14, 2025 at 06:03:15PM -0300, Renato Botelho wrote: R> After upgrading my laptop this morning I noticed it was freezing after R> suspend/resume. I've bisected and ended up on this commit. R> R> I confirmed reverting d6f10a5d013f (only to prevent conflicts) followed by R> f1b9c1aafd84 and 3deb21f1afd5 have fixed the issue. R> R> My system is running today's CURRENT at 82d8a5029a80. Looks like the commit you point at can't be a culprit. Looking closer to your description "reverting d6f10a5d013f followed by f1b9c1aafd84 and 3deb21f1afd5" it seems that the only functional change is addition of device tpm and rdrand_rng and option RANDOM_ENABLE_TPM to the GENERIC. Can you please try unmodified main sources at 82d8a5029a80, but modify GENERIC to remove these two lines: +# random(4) +device rdrand_rng # Intel Bull Mountain RNG +device tpm # Trusted Platform Module +options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 If that helps, can you please find which particular line makes the regression. -- Gleb Smirnoff From nobody Sat Nov 15 02:12:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7cvr6RtYz6GqwG; Sat, 15 Nov 2025 02:12:08 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7cvr5rVdz3www; Sat, 15 Nov 2025 02:12:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763172728; h=from:from:reply-to:subject: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=3CEIgZmKJJwMnw9pK1OBRqqLPCyn+1Lr1aAUI69q3A8=; b=aa9gXKFizSBdeQvjgtWeG87O4G0gMNzpG4a3ppN3gC28v+1+7KGCiHG0Sj3MhpvZO32s71 4erGoMlz0nNHmRGev0fbAVs0FHSf83Qs1kK05fSTONj6QfyEwKUPDw6VKsVOzvyo9ktqda i3ejUtQzf2D12ZUtfB1PQMiC8kZJVklcjbMvQ4eBhGjtD86JKW/75TUaSS9M2YgIDZGANm 3O3DjALfCzyuDNA3szTZ0p3gvcxmiltSt27iGTCL68C/R0oJaS7je/gHShfLeiG+3x4Mh+ iyeuG7Px52qhAA0PSvX3O/IdUnoy95g8QEHDqI2RHosWX5A8ijhwPPdjP6luLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763172728; h=from:from:reply-to:subject: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=3CEIgZmKJJwMnw9pK1OBRqqLPCyn+1Lr1aAUI69q3A8=; b=bIfjiEfQ/VlrJ9O23df9UJw5Z5kmvhtNQN/scWNVl2YHVIhm7SX6SSjcYZ1a3TdY2EnJud aIKiDyPnMRWyzPKZQQF5p+K9ft7VwodM8s9A5dbviuty4I2buCWt8PFiyizkAPMb9mZPVL UujtdLBI1By5p67i055FxA1SqJWGDI95KZQcqXBh/6I7RkbWaWMm9q4cRm3np2DkNBFxwq F2lJES3YlTQK8zkRYq2WVeIS1/Q1jI5goWtULqsqfLGHIw9UbOWHUqIYtZp4XXsV1qDQ/C Fi3hbde1nUHJn6hir7nMHLFpefwk5IkkZgV1VbMjOMOWJNB1p1OyLGegQ4bD3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763172728; a=rsa-sha256; cv=none; b=hio/vVHyiHUm7V8Ezq5Z3tTqmK5+bXxI9A/Y8faTLmrPUiBsZtxRZd8Eqswy8a88St6NhW 3+8BvhsW8jA57r+H1v8Thy8iHyVpF5c+2ihud5G1zyN9US+j5joL1FxeE/0sMJbOJfS8a2 mrZxqQkNiMWmuaGX5FhW5haJ/5N39ySDxeNJr1BJwcgQjHH/fpmCtdUm9uRMLufsuRfGxe abi2jnJsGp3Pt3mcUh3G2Lcgg9b1GUz2BuN39A+Im5E9lI/YLIX78SMJ9+MBvjDphwsZqP 4YlLc0ydFg5SfpC5YLXYTsXQO2FxV2XIQB98NgaOYw/Ag/6H8Sx2vnq1KFXngg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:b08a:fd82:d04a:e316] (unknown [IPv6:2601:5c0:4202:5670:b08a:fd82:d04a:e316]) (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 4d7cvr476lz11gn; Sat, 15 Nov 2025 02:12:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <854dff8a-555a-4921-ae64-4c445c7a03f7@FreeBSD.org> Date: Fri, 14 Nov 2025 21:12:07 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 99cb3dca4773 - main - vnode: Rework vput() to avoid holding the vnode lock after decrementing Content-Language: en-US To: Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202511111459.5ABEx8Co056214@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202511111459.5ABEx8Co056214@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/11/25 09:59, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3 > > commit 99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3 > Author: Mark Johnston > AuthorDate: 2025-11-11 14:47:06 +0000 > Commit: Mark Johnston > CommitDate: 2025-11-11 14:58:59 +0000 > > vnode: Rework vput() to avoid holding the vnode lock after decrementing > > It is not safe to modify the vnode structure after releasing one's > reference. Modify vput() to avoid this. Use refcount_release_if_last() > to opportunistically call vput_final() with the vnode lock held since we > need the vnode lock in order to deactivate the vnode, and it's silly to > drop the vnode lock and immediately reacquire it in this common case. > > Note that vunref() has a similar flaw. D52628 aims to fix the problem > more holistically, but this change fixes observable panics in the > meantime. > > Reported by: syzbot+6676b3ff282d590b0fb3@syzkaller.appspotmail.com > Reported by: syzbot+38e26cf6f959e886f110@syzkaller.appspotmail.com > Reviewed by: kib > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D52608 > --- > sys/kern/vfs_subr.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c > index 58975f7ac932..9cf983f6f89d 100644 > --- a/sys/kern/vfs_subr.c > +++ b/sys/kern/vfs_subr.c > @@ -3713,11 +3713,12 @@ vput(struct vnode *vp) > > ASSERT_VOP_LOCKED(vp, __func__); > ASSERT_VI_UNLOCKED(vp, __func__); > - if (!refcount_release(&vp->v_usecount)) { > - VOP_UNLOCK(vp); > + if (refcount_release_if_last(&vp->v_usecount)) { > + vput_final(vp, VPUT); > return; > } > - vput_final(vp, VPUT); > + VOP_UNLOCK(vp); > + vrele(vp); > } This commit results in reliable hangs for me when I do a 'make -j 16 buildkernel' in a VM where the source directory is mounted over NFS. Even if there is nothing to build so the make is just traversing all the directories. The hung process is stuck on a vnode lock. Some of the stacks from procstat: PID TID COMM TDNAME KSTACK 1858 100343 make - mi_switch+0x172 sleepq_switch+0x109 sleeplk+0x110 lockmgr_slock_hard+0x3c3 VOP_LOCK1_APV+0x32 nfs_lock+0x2c vop_sigdefer+0x30 VOP_LOCK1_APV+0x32 _vn_lock+0x53 vget_finish+0xaf cache_lookup+0x2be nfs_lookup+0x4e1 vop_sigdefer+0x30 VOP_LOOKUP_APV+0x57 vfs_lookup+0x5aa namei+0x35d vn_open_cred+0x592 openatfp+0x2b7 root@head:~ # procstat -kk 1860 1860 100360 make - mi_switch+0x172 sleepq_switch+0x109 sleeplk+0x110 lockmgr_slock_hard+0x3c3 VOP_LOCK1_APV+0x32 nfs_lock+0x2c vop_sigdefer+0x30 VOP_LOCK1_APV+0x32 _vn_lock+0x53 vget_finish+0xaf cache_lookup+0x2be nfs_lookup+0x4e1 vop_sigdefer+0x30 VOP_LOOKUP_APV+0x57 vfs_lookup+0x5aa namei+0x35d vn_open_cred+0x592 openatfp+0x2b7 root@head:~ # procstat -kk 1855 1855 100314 make - mi_switch+0x172 sleepq_switch+0x109 sleeplk+0x110 lockmgr_xlock_hard+0x3d0 VOP_LOCK1_APV+0x32 nfs_lock+0x2c vop_sigdefer+0x30 VOP_LOCK1_APV+0x32 _vn_lock+0x53 vput_final+0x269 vput+0xab vfs_lookup+0xa7a namei+0x35d vn_open_cred+0x592 openatfp+0x2b7 sys_open+0x28 amd64_syscall+0x169 fast_syscall_common+0xf8 This last one is kind of interesting as it calls vput_final? (kgdb) p vp $2 = (struct vnode *) 0xfffff8016bb6c898 (kgdb) p vp->v_lock $3 = {lock_object = {lo_name = 0xffffffff81467118 "nfs", lo_flags = 117112832, lo_data = 0, lo_witness = 0xfffff8043fd83900}, lk_lock = 39, lk_exslpfail = 0, lk_pri = 44, lk_timo = 6} (kgdb) p/x vp->v_lock->lk_lock $4 = 0x27 So there is one shared lock, and both shared and exclusive waiters. Seems like a vnode lock has been leaked? Or rather, the vput_final() in this case is called from vrele(), so the vput() for 1855 has hit the new path. I wonder if when it dropped its lock via VOP_UNLOCK() it is no longer eligible to re-lock it as it needs some other sharer to also unlock before it can re-acquire the lock in vput_final? LK_UPGRADE attempts don't block if there are shared waiters but only one 1 shared lock held, but if you do LK_UNLOCK and then LK_XLOCK that will indeed honor the other waiters and not acquire the lock, so a vput that held the last shared lock would have "worked" to ugprade before even with other waiters, but now it can drop the lock and then get stuck. I guess the question though in this case is that some other thread must have snuck in and acquired a shared lock between the VOP_UNLOCK and the vrele() and is blocked while holding it. Aha, so most of the other makes are stuck in VOP_LOOKUP on this same vnode (which I believe is "/usr/src/sys/dev" as in 1855 the vput() is inside of namei() and this is the state of ndp: (kgdb) p *ndp $9 = { ni_dirp = 0x481afdaa2d7d , ni_segflg = UIO_USERSPACE, ni_rightsneeded = 0xfffffe00d83d2d90, ni_startdir = 0x0, ni_rootdir = 0xfffff80005e461b8, ni_topdir = 0x0, ni_dirfd = -100, ni_lcf = 0, ni_filecaps = {fc_rights = {cr_rights = {0, 0}}, fc_ioctls = 0x0, fc_nioctls = -1, fc_fcntls = 0}, ni_vp = 0xfffff801bc007000, ni_dvp = 0xfffff8016bb6c898, ni_resflags = 1, ni_debugflags = 3, ni_loopcnt = 0, ni_pathlen = 1, ni_next = 0xfffff8000a0b0817 "", ni_cnd = {cn_flags = 8936259908, cn_cred = 0xfffff80005e53c00, cn_nameiop = LOOKUP, cn_lkflags = 524288, cn_pnbuf = 0xfffff8000a0b0800 "/usr/src/sys/dev/acpica", cn_nameptr = 0xfffff8000a0b0811 "acpica", cn_namelen = 6}, ni_cap_tracker = {tqh_first = 0x0, tqh_last = 0xfffffe00d83d2d48}, ni_rbeneath_dpp = 0x0, ni_nctrack_mnt = 0x0, ni_dvp_seqc = 0, ni_vp_seqc = 0} But pid 1844 is a make blocked on another vnode: (kgdb) p vp $24 = (struct vnode *) 0xfffff801bc007000 And that one appears to be the "acpica" child directory: (kgdb) p *vp->v_cache_dst.tqh_first $27 = {nc_src = {le_next = 0xfffff801bc01b9b8, le_prev = 0xfffff801bc01b898}, nc_dst = {tqe_next = 0x0, tqe_prev = 0xfffff801bc007058}, nc_hash = { csle_next = 0x0}, nc_dvp = 0xfffff8016bb6c898, n_un = { nu_vp = 0xfffff801bc007000, nu_neg = {neg_flag = 0 '\000', neg_hit = 112 'p'}}, nc_flag = 12 '\f', nc_nlen = 6 '\006', nc_name = 0xfffff801bc01b962 "acpica"} And note it's nc_dvp is the vnode 1855 is trying to vput and all the other makes are trying to VOP_LOCK in nfs_lookup(). So my guess is that 1844 was able to VOP_LOCK() "/usr/src/sys/dev" in the window between VOP_UNLOCK() and the vput_final() invoked from vrele(). Humm, except that the vnode in question shouldn't be in vput_final at all?? Back to 1855 (proc doing vput_final): (kgdb) #12 0xffffffff80c9bc89 in vput_final (vp=0xfffff8016bb6c898, func=func@entry=VRELE) at /usr/src/sys/kern/vfs_subr.c:3628 3628 error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK); (kgdb) p vp $6 = (struct vnode *) 0xfffff8016bb6c898 (kgdb) p vp->v_usecount $7 = 14 (kgdb) p vp->v_holdcnt $8 = 7 Or did the other make's manage to acquire new use counts while 1855 was blocked on the lock in vput_final? Anyway, it seems 14 make's are blocked on this vnode (/usr/src/sys/dev). 1844 is blocked on the "acpica" vnode, and another make process (1856) is blocked on "acpica", but via getdirentries() instead of namei(): #4 0xffffffff80b62ec0 in sleeplk (lk=lk@entry=0xfffff801bc007070, flags=flags@entry=2098176, ilk=ilk@entry=0xfffff801bc007098, wmesg=wmesg@entry=0xffffffff81467118 "nfs", pri=, pri@entry=44, timo=timo@entry=6, queue=1) at /usr/src/sys/kern/kern_lock.c:302 #5 0xffffffff80b60fc3 in lockmgr_slock_hard (lk=0xfffff801bc007070, flags=2098176, ilk=0xfffff801bc007098, file=, line=4333, lwa=0x0) at /usr/src/sys/kern/kern_lock.c:693 #6 0xffffffff811b97a2 in VOP_LOCK1_APV ( vop=0xffffffff81aeeb38 , a=a@entry=0xfffffe00d8445c88) at vnode_if.c:2103 #7 0xffffffff80a6050c in nfs_lock (ap=ap@entry=0xfffffe00d8445c88) at /usr/src/sys/fs/nfsclient/nfs_clvnops.c:344 #8 0xffffffff80c83d90 in vop_sigdefer (vop=, a=0xfffffe00d8445c88) at /usr/src/sys/kern/vfs_default.c:1502 #9 0xffffffff811b97a2 in VOP_LOCK1_APV ( vop=0xffffffff81aada28 , a=a@entry=0xfffffe00d8445c88) at vnode_if.c:2103 #10 0xffffffff80cb6b43 in VOP_LOCK1 (vp=0xfffff801bc007000, flags=2098176, file=0xffffffff81359deb "/usr/src/sys/kern/vfs_syscalls.c", line=4333) at ./vnode_if.h:1316 #11 _vn_lock (vp=vp@entry=0xfffff801bc007000, flags=flags@entry=2098176, file=, line=, line@entry=4333) at /usr/src/sys/kern/vfs_vnops.c:1970 #12 0xffffffff80cb2d94 in kern_getdirentries (td=0xfffff80006cb5000, fd=, buf=0x2088dba27000 , count=4096, basep=basep@entry=0xfffffe00d8445df0, residp=residp@entry=0x0, bufseg=UIO_USERSPACE) at /usr/src/sys/kern/vfs_syscalls.c:4333 #13 0xffffffff80cb32a9 in sys_getdirentries (td=, uap=0xfffff80006cb5428) at /usr/src/sys/kern/vfs_syscalls.c:4287 The "acpica" lock is held by a writer at least: (kgdb) p vp $9 = (struct vnode *) 0xfffff801bc007000 (kgdb) p vp->v_lock $10 = {lock_object = {lo_name = 0xffffffff81467118 "nfs", lo_flags = 117112832, lo_data = 0, lo_witness = 0xfffff8043fd83900}, lk_lock = 18446735277917198210, lk_exslpfail = 0, lk_pri = 44, lk_timo = 6} (kgdb) p/x vp->v_lock.lk_lock $14 = 0xfffff80011ebd782 (kgdb) set $td = (struct thread *)0xfffff80011ebd780 (kgdb) p $td->td_tid $15 = 100314 (kgdb) p $td->td_proc->p_comm $16 = "make", '\000' (kgdb) p $td->td_proc->p_pid $17 = 1855 Oh dear, so that's the deadlock. 1855 needs to get an exclusive lock on "/usr/src/sys/dev/" to finish its vput() _while_ it holds an exclusive lock on "/usr/src/sys/dev/acpica". And the other shared lock on "/usr/src/sys/dev" is held by 1844 who is blocked trying to share lock "/usr/src/sys/dev/acpica" during lookup(). So by doing the VOP_UNLOCK() and then reacquiring the lock via vrele(), you've introduced a vnode LOR as the vput() of the parent directory can now try to re-lock the vnode of the parent directory while we hold a vnode on the child vnode. -- John Baldwin From nobody Sat Nov 15 02:22:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7d8658yzz6Grdl; Sat, 15 Nov 2025 02:22: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7d862wN6z3xsD; Sat, 15 Nov 2025 02:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763173366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wCvAut+y5/9u7L9agowt7yDDRlIs4465MkHhayDAG0=; b=jSUNWashcalUk9JhPuBtAzHlwQox2I7MiwruVN4N09TYwZDQhFboUXZYECDyiKj0uVA2ae ym65KkFsICnh12CR71fNFAkrgQIc3Z/xM0EK2f+YPfgdcIrJlQtWmGUd8KBz5rQudGlKMI l+eD1V2SeulQiDVtWzR3B2gZoQiHgwcO6o41G7B+r/ymi8hvhk7mYW65I+DLgnnhwE9JWo 3zH/MuUHcdSWMQZ9U0YPNpt0r9RSson7s64URTgnVkqREoJ5++7dkSM6ak55ceLSXdKSIh pBqZG3GkbAaxmtpG3umpSV2ppfOBXFBCNiqQ4xS/fWKffmYxgXli7ycy5yfUqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763173366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wCvAut+y5/9u7L9agowt7yDDRlIs4465MkHhayDAG0=; b=G0GYFAg8JZ2j/xnIp1xRmc0GJUOnvhTrKEKqQY1SqjUmNI6haLsSFg1hdoEw9EksepBwgu h+ROsEaji+NYWq2hYlbTZ8TpVyTg/z062vAAvaxXCzq1PflFR/3xJmCw643PI5PTnTGbJ5 I6LtYYkNcDg9rg2KPboLPw662GprEQpLxuDf5SEZtqGIDpSTtlRT2kw2VSjMQSQftUwK/d ULExa7k6ylbyF7Dzd+g3/PCvWRHvC/KT3oikR9G3CIHv8Q/+xjzwXI4JzayHNE/uCLQB/e Py5jv2UiJ7lXuX/ysrbq95wWdarbIUzi0BRiUZfPbCfkS1kn4wMpvpMo70mHNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763173366; a=rsa-sha256; cv=none; b=OTXS/9g2Js4L0HpA7JFGxZ8V856Jp9ctkgitBZS2fO3ttWroOrr8wV62SX8lC0QwHiQDcC fxSNkE2K4Z9CywomrZuD3JvfKdINlKcLnK6p7D8IbVTrFRhykH5+FwL6UW2BuLx3HxCeky YnfgU4E0jdhr5WundqY7CGU/nAS3GUN3Sf29oIGDGWT/NT0f6MtuqkFhf+RRF/8NkeqE7V MuwOxAMCrW7/PcwfcRdvXSI3uXi8YiyM/+2I5y7tOdmnOvPMa7igmwBXm9nCxt/pXh4Leg AX57QIJ5x0VIrDBZ5baesoSZ4XOvgo2BKArjKt5HQiKFXMlB6NnYIIEyUgtC6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7d862Mz5zZJT; Sat, 15 Nov 2025 02:22: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 5AF2MkMa089283; Sat, 15 Nov 2025 02:22:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF2MkO8089280; Sat, 15 Nov 2025 02:22:46 GMT (envelope-from git) Date: Sat, 15 Nov 2025 02:22:46 GMT Message-Id: <202511150222.5AF2MkO8089280@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: cca34aa1d005 - main - tpm: crb: factor out idle/ready state transitions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: cca34aa1d005ffc859704331a3221b8c506d2f06 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cca34aa1d005ffc859704331a3221b8c506d2f06 commit cca34aa1d005ffc859704331a3221b8c506d2f06 Author: Kyle Evans AuthorDate: 2025-11-15 02:22:10 +0000 Commit: Kyle Evans CommitDate: 2025-11-15 02:22:10 +0000 tpm: crb: factor out idle/ready state transitions Some TPM implementations have a different start method that requires an additional notification for some state changes; for instance, the "Pluton" start method. Just factor these transitions out for now, and the coming commits will introduce points that the start method can hook in at. Reviewed by: obrien Differential Revision: https://reviews.freebsd.org/D53682 --- sys/dev/tpm/tpm_crb.c | 61 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/sys/dev/tpm/tpm_crb.c b/sys/dev/tpm/tpm_crb.c index 017ebd45c7ea..28b4f21eccfb 100644 --- a/sys/dev/tpm/tpm_crb.c +++ b/sys/dev/tpm/tpm_crb.c @@ -301,6 +301,48 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc) return (true); } +static bool +tpmcrb_state_idle(struct tpmcrb_sc *crb_sc, bool wait) +{ + struct tpm_sc *sc; + int mask, timeout; + + timeout = wait ? TPM_TIMEOUT_C : 0; + + sc = &crb_sc->base; + OR4(sc, TPM_CRB_CTRL_REQ, TPM_CRB_CTRL_REQ_GO_IDLE); + + if (timeout > 0) { + mask = TPM_CRB_CTRL_STS_IDLE_BIT; + if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS, mask, mask, + timeout)) + return (false); + } + + return (true); +} + +static bool +tpmcrb_state_ready(struct tpmcrb_sc *crb_sc, bool wait) +{ + struct tpm_sc *sc; + int mask, timeout; + + timeout = wait ? TPM_TIMEOUT_C : 0; + + sc = &crb_sc->base; + OR4(sc, TPM_CRB_CTRL_REQ, TPM_CRB_CTRL_REQ_GO_READY); + + if (timeout > 0) { + mask = TPM_CRB_CTRL_REQ_GO_READY; + if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS, mask, !mask, + timeout)) + return (false); + } + + return (true); +} + int tpmcrb_transmit(device_t dev, size_t length) { @@ -335,22 +377,15 @@ tpmcrb_transmit(device_t dev, size_t length) /* Switch device to idle state if necessary */ if (!(TPM_READ_4(dev, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_IDLE_BIT)) { - OR4(sc, TPM_CRB_CTRL_REQ, TPM_CRB_CTRL_REQ_GO_IDLE); - - mask = TPM_CRB_CTRL_STS_IDLE_BIT; - if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS, - mask, mask, TPM_TIMEOUT_C)) { + if (!tpmcrb_state_idle(crb_sc, true)) { device_printf(dev, "Failed to transition to idle state\n"); return (EIO); } } - /* Switch to ready state */ - OR4(sc, TPM_CRB_CTRL_REQ, TPM_CRB_CTRL_REQ_GO_READY); - mask = TPM_CRB_CTRL_REQ_GO_READY; - if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS, - mask, !mask, TPM_TIMEOUT_C)) { + /* Switch to ready state */ + if (!tpmcrb_state_ready(crb_sc, true)) { device_printf(dev, "Failed to transition to ready state\n"); return (EIO); @@ -394,7 +429,11 @@ tpmcrb_transmit(device_t dev, size_t length) bus_read_region_stream_1(sc->mem_res, crb_sc->rsp_off + TPM_HEADER_SIZE, &sc->buf[TPM_HEADER_SIZE], bytes_available - TPM_HEADER_SIZE); - OR4(sc, TPM_CRB_CTRL_REQ, TPM_CRB_CTRL_REQ_GO_IDLE); + if (!tpmcrb_state_idle(crb_sc, false)) { + device_printf(dev, + "Failed to transition to idle state post-send\n"); + return (EIO); + } tpmcrb_relinquish_locality(sc); sc->pending_data_length = bytes_available; From nobody Sat Nov 15 02:22:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7d875RFzz6Grdp; Sat, 15 Nov 2025 02:22: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7d873XvLz3yj0; Sat, 15 Nov 2025 02:22:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763173367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QLPKik0C2+79YA6HYaUFQWOO6tuPZ+lz97CGQJe5Gh8=; b=JgeAINVfrMAXS0GEoh61KTLfKD1fN1PZqAdshkWieGLdypQU7UL9hh/ZEnUurKjd0nhIsW pgKQ/aQciLWS/QGb3yGr43QBhnbjo7Mbpr82p0Lh2cJM2gOhixUNYBJLTTbonacVbOybwy 4rqVR2jVJ/fIJ0a9/anCuZatzds9+Qf6RDamvl+EVdEV3jjKKftrAI/suQ4GEP30RSBotp HynMniviLa8AEuGcGER7DzGi5ujOGJMakUEX4lJm8MfjY/RByyruozcD0V5684T7ru+TZs InFK6Q1JJPD+XQo1DiE4cb7gW7bFWyjHdLpD4jOudon6aq7YVYkHEa3r+CdJvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763173367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QLPKik0C2+79YA6HYaUFQWOO6tuPZ+lz97CGQJe5Gh8=; b=W104axcZpJCe8DKTuAP3S3p9J0931UXSzzM23QxUXeTVm0owdwfWJTq8WVRRuxT/LQ3dv6 LNqyIBEv2qxNNKx7nbM2FF8V2HMWWYRdYy+eze0L9eiwrbNCLc81QuT4TPkP9uzBupfMzk 49KDh4zHT+uKWW7pXH46u3CjrlMrpmNvexTZXV88/RbZ2UkuDCkWduFJzgfwehNAEHtuOi FBBP/k+nMLgHY/TYawua0SjgoIlQRUpw/6jTJM7AYOs3lTeb0GpKO/otZ5K2g17eLnT2Hw Re9HS7oyfOFnyvMS6ljS1dC7jRf9FOrVy7yB0co9G8w36r3qogtLBwD2aPfPAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763173367; a=rsa-sha256; cv=none; b=SzBLYxvAYjsWedr2EwIpBDXqIbb++1oojmKbM1VWGFX+S8iv/vxcSUqy/DiKdg+LAWQpr5 0XiQRqQtdfCbCjhaNfkVuYwUbu/fbjnBwMNtZvYL+oj6X8BwNXL5rWi0iP5lf2/S1015fs yEMfUj/3w3RVP18p7v2NkNDUd4bJAHri2uAzcYkz89724CrQkpjMLIWhOCMplYJcb6trXz LqckcwMKBOcLlf3L6xp3OXHSOvLz6uaJ8QwTDujLb/ml1MDystg9a8Qr0e7DEHhStUIjhY vgbzwgdusn8+az7ibVa+PrzpQHjlnxnDEGm1NixZ66ApI8sVs13mALsSVVrpKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7d8730zqzYwq; Sat, 15 Nov 2025 02:22: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 5AF2Ml48089322; Sat, 15 Nov 2025 02:22:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF2Ml8t089319; Sat, 15 Nov 2025 02:22:47 GMT (envelope-from git) Date: Sat, 15 Nov 2025 02:22:47 GMT Message-Id: <202511150222.5AF2Ml8t089319@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: c490bc73eb68 - main - tpm: fix the conditional for the arm64 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c490bc73eb68556bc44da9893af9be48a360de8c Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c490bc73eb68556bc44da9893af9be48a360de8c commit c490bc73eb68556bc44da9893af9be48a360de8c Author: Kyle Evans AuthorDate: 2025-11-15 02:22:11 +0000 Commit: Kyle Evans CommitDate: 2025-11-15 02:22:15 +0000 tpm: fix the conditional for the arm64 build The intention was clearly that these ACPI bits would be included for arm64, but MACHINE_ARCH there is aarch64 -- correct the minor typo to build everything that should be there. Fixes: c2e9c5bbf0229 ("tpm: Refactor TIS and add a SPI attachment") --- sys/modules/tpm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/tpm/Makefile b/sys/modules/tpm/Makefile index d929649d40fe..e7a87a22d2ed 100644 --- a/sys/modules/tpm/Makefile +++ b/sys/modules/tpm/Makefile @@ -17,7 +17,7 @@ SRCS+= tpm20.c tpm_tis_core.c .if defined(${OPT_FDT}) SRCS+= tpm_spibus.c tpm_tis_spibus.c spibus_if.h .endif -.if ${MACHINE_ARCH:Namd64:Ni386:Narm64} == "" +.if ${MACHINE_ARCH:Namd64:Ni386:Naarch64} == "" SRCS+= acpi_if.h SRCS+= tpm_tis_acpi.c SRCS+= tpm_crb.c From nobody Sat Nov 15 02:34:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7dQC5YHTz6GsmT; Sat, 15 Nov 2025 02:34: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7dQC50mlz40tg; Sat, 15 Nov 2025 02:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763174099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iu+zpyHuOPNl+DbIprBaWjjFdciwLiMI1hDrCvq8/f8=; b=SP8j1T/znFlFlC23zPo90LnFcJHVKBo6e6cETBh6wiPi9Hq3xZnJJdPPVv1Sj6Aj/+OX2A IoR3LOov6eVTdXTGXUAV3VjkWY6H23Ij2hxXf/gOn5DXCGbNsZxpZQkHPzIYagd2dHqhCe HiJVKrJ9mbrc7mfSEIOXhQ0gx2aQGIGg/0qORrhBvCIY6ZxqSlaH46VV6sN+CKgWI17EPL sQS3zdZ47AWz+7mOaSr8STEzlMAkbfIl5Srk1zG478KX6nwhYpm49Xf5XHpH51DSaiOsZ6 lY1twU10n3W1qJIWgBZ3KkCsm76ODwozvD/kVKTLtjwCCbLb+uofAmVZI462ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763174099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iu+zpyHuOPNl+DbIprBaWjjFdciwLiMI1hDrCvq8/f8=; b=Uw+ztnTi+SuQyzRGvDE1cSfbnNkBIeOkkDw3ZVHNZTwa9ee2d/mmb/sbUzdcIJqeNPCg/K w64BZGM0iBaC3/Ku7/ulHFmFUuf3otqn9113D99dqpO0rEFaZ4W4vNdqwdt7VFkQv1E6ep Sp+x13ukUZRwAuKK0/uidxLWDEHQV7S/LALBDlGyoKRA6wczUnsF362b7q35xY17e+QHdk 6MDcevHZVFHIEkOkVjBxAPOhRW9LVm32pIfn+J25nqJvFvFEYx7mQcT0o8D7ig4DOWzgZy tAgnr9JWe6/s5x/SknkJe0Ejxq/oZmO+8Sb7wnZc1WnWcKIjsAfEqxmDHRiY5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763174099; a=rsa-sha256; cv=none; b=SGffxfri55UFgPMt40O5kATGh0BzPkoCUEPhVNFcI3jnKKT/bVteKtdZFXKAazcDEUhznA 3X4ro6Lf1iW3htWlyjgkbl+zb0N4WaYl6U2JoUOdHkJchOMSLkz2nDhTMpAD+x/awfF+km b3VkNZH7ES9MRgBpuHZjvTDWsotvAOubsPpEn9Y7xYTc82MG899sngoUDgMkDG0bEt534p SzfMYR01k7Cf+yEjo+2oUjZMmQ/uurMAFdOJP17Nffc+nAoiFLd95OF/HZWyiiHzmWJlB0 FdzpM+u0KWxd1GT5Ld876p0+oGNAwf8jawJRRt1OYRVcztl68U/fhamCkxapQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7dQC4F36zZYL; Sat, 15 Nov 2025 02:34: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 5AF2YxN0009161; Sat, 15 Nov 2025 02:34:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF2Yx0o009159; Sat, 15 Nov 2025 02:34:59 GMT (envelope-from git) Date: Sat, 15 Nov 2025 02:34:59 GMT Message-Id: <202511150234.5AF2Yx0o009159@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: 51931e1f0f33 - main - Revert "vnode: Rework vput() to avoid holding the vnode lock after decrementing" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 51931e1f0f33986296ff2860f25374cba47b860a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=51931e1f0f33986296ff2860f25374cba47b860a commit 51931e1f0f33986296ff2860f25374cba47b860a Author: Mark Johnston AuthorDate: 2025-11-15 02:30:34 +0000 Commit: Mark Johnston CommitDate: 2025-11-15 02:30:34 +0000 Revert "vnode: Rework vput() to avoid holding the vnode lock after decrementing" The change can introduce a deadlock if we release the vnode lock in order to release a reference, and then end up releasing the final reference after all, requiring a relock of the vnode. This relock may violate the usual parent->child vnode lock order. This reverts commit 99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3. Reported by: jhb --- sys/kern/vfs_subr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 9cf983f6f89d..58975f7ac932 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3713,12 +3713,11 @@ vput(struct vnode *vp) ASSERT_VOP_LOCKED(vp, __func__); ASSERT_VI_UNLOCKED(vp, __func__); - if (refcount_release_if_last(&vp->v_usecount)) { - vput_final(vp, VPUT); + if (!refcount_release(&vp->v_usecount)) { + VOP_UNLOCK(vp); return; } - VOP_UNLOCK(vp); - vrele(vp); + vput_final(vp, VPUT); } /* From nobody Sat Nov 15 03:19:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7fPf1gjyz6GwjZ; Sat, 15 Nov 2025 03:19: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7fPf14vhz43x9; Sat, 15 Nov 2025 03:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763176774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=viJU9wEULT2wtnL67seVzyGPlIbkO/zTGFI3A4uDT1o=; b=wfwJQhfGsrBZJlk7Lp6plmy8vnuCKWJ49J1KOzviKhGi26ieGX5ZwTveVrbPDE6oFS/FZj nsC6sxBuXQGDhx73mZUMRjycfXUSR3FZEmwM/VxvMxiBAXJWfvMvvLDBX0tHJIDxOsTWGu CHTXyaZ1idBKMQ4WQNimtQLEyWiikrT6aSfp+8W4vYLaq66RmYw6BagOIPxRi0O7mmlGFr zk5yq33QNCtWzHnxMyiR5na7o3XLmT5uEXAOTZWVJfG9MrakQEP2KWvEPhxQ0n+aEFVn7M UKUjLjcXwhq1EH4Po1xb0k+1Du4oybsFkjAM8LCI972HmEJ4pVRQZWa6diE9mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763176774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=viJU9wEULT2wtnL67seVzyGPlIbkO/zTGFI3A4uDT1o=; b=wPCCFu5e6TMra3cJgs70Wf7+GW89jEIYMQPWqSVeRcinuq1GmBxRzAfusYnhpgt8a0VgpO QYPkk67TOFY/Tj9Qh1smZdbh5uiVL+T9rh/44klm6TI+Qi14MKJSK65ypUHlh0C/VlNJoB n2qauYhK2FjnOPaSNjJlL2vJh8psRSPkk6axsZW0TCvPnhc1Z+ThyJykPVW+IVoOrnUuAm SLD05F+DASKagKoYJfZt6Ya/8P+7lx6cCca1ynMWSy6jwhkyhaaoHayipq5LykOVgQ8RBO vnBpeqxEk2vScTpASlmCuoLvyCpAfZR2CWPCZx8ssbW0F6++LAFN7B6tsWtQtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763176774; a=rsa-sha256; cv=none; b=x3xuj2Ck8wM/ZgtvvW3uIzD4TZ+eNkyGhwlz1xEXJv2gTgVpyuDjoFPViCoHdM7cCLJCxC VVcIKrhIBdYmeubUPBVA2IS4L113tf15bg5MvH2r2Wmzs/VaGtOegtak/CcBN/CieOO3qy PpNOPvTDuC9GbSdFmwEUXUNcDah4dkYnlmqmTRlTPrAk0zOcvcCazESeU0RwQZN21IoHzD i1BIsuY+rRfkSgrpT7wu7O3z0Etan6RRUif4zZ07bEKae3Lndzg4Qlc44Ag2NwimKCBda3 v8zgnwH5AD4A/n63MRMsEpyOeniExux0qLDzwco/AIO96Y3AX5RtC+WKMxhBtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7fPf0Yzszbg7; Sat, 15 Nov 2025 03:19: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 5AF3JXFg087156; Sat, 15 Nov 2025 03:19:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF3JXO0087153; Sat, 15 Nov 2025 03:19:33 GMT (envelope-from git) Date: Sat, 15 Nov 2025 03:19:33 GMT Message-Id: <202511150319.5AF3JXO0087153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: f3cf4c0af5af - main - Use install instead of cp to copy bootstrap tools List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3cf4c0af5af6ce95065a615f998117ec1cd63aa Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f3cf4c0af5af6ce95065a615f998117ec1cd63aa commit f3cf4c0af5af6ce95065a615f998117ec1cd63aa Author: Dag-Erling Smørgrav AuthorDate: 2025-11-15 03:18:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-15 03:18:35 +0000 Use install instead of cp to copy bootstrap tools We need to preserve modification times on bootstrap tools, but `cp -p` also tries to preserve flags, which fails if OBJROOT is on NFS. A -N option was added to cp for this purpose, but trying to use that would break cross-building on hosts that don't have that option. The best remaining option is `install -p`, which we already assume is present. PR: 275030 Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D53751 --- Makefile.inc1 | 2 +- tools/build/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 81af336ecfa2..1d617601ece2 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2824,7 +2824,7 @@ ${_bt}-link-${_tool}: .PHONY if [ ! -e "$${source_path}" ] ; then \ echo "Cannot find host tool '${_tool}'"; false; \ fi; \ - cp -pf "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}" + install -p "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}" ${_bt}-links: ${_bt}-link-${_tool} .endfor diff --git a/tools/build/Makefile b/tools/build/Makefile index fdec5f11311d..a701c12a9b5c 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -414,7 +414,7 @@ _LINK_HOST_TOOL= ln -sfn # When building on FreeBSD we always copy the host tools instead of linking # into WORLDTMP to avoid issues with incompatible libraries (see r364030). # Note: we could create links if we don't intend to update the current machine. -_COPY_HOST_TOOL= cp -pf +_COPY_HOST_TOOL= install -p .else # However, this is not necessary on Linux/macOS. Additionally, copying the host # tools to another directory with cp -p results in freezes on macOS Big Sur for From nobody Sat Nov 15 03:19:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7fPg4NLsz6Gwrp; Sat, 15 Nov 2025 03:19: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7fPg1JY3z44DG; Sat, 15 Nov 2025 03:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763176775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HtnE1tu1hp85GpcnmaE8+Uy0hIAqt8L5XCG8DZAsLp4=; b=PP5SxeRShkt9eSuZpByeQg+GApmUSKXeZ5d4SxCacsj83UVTRnRxdq0CoQDFaQJK3Kx7+M yxTsa5F37vNburW+aEYxMm4YcTViiCSHEr5XftK8wgLACrlRkb2PZ/w4D2RNkyyJTBIHvg f7sR//zVi7Xal5ydmk3An43rC+q2HGcfzu0Vkfz7KdvoQ/+uO7h3FRMdJZC7AKAw3FF6BH 064RshC0d5l1GCOXXQzd5c/wyCBkQ5XwfHhBUOsm9yssZ3QfCtIxf5ET6jr0Wn5RVgtAWB ZRaHRBvB8P5GAih70nSJBNUHj33Dadqoj95h3dsijJBOLpzYQ/ToJO9FHwuD1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763176775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HtnE1tu1hp85GpcnmaE8+Uy0hIAqt8L5XCG8DZAsLp4=; b=i5t2SgWFZMD9gdFaNIN6kkGO8usOe3rs2DeNJOwfbuOvabTMAH7xvvfv7icTGB3xfK0nMa hn6QzwxS3Egqh+YwsbBgTDvvel925P/fLv5Guve4OdgJnnp30IjcXxPDjMluWDKO5NOlHd Jdv0n1eielNpxUJNnpys6Z38uC3vJRHcgMIk0SKZuVZfuO9N1pYBTePOsiR+ZIfblU2eza rzIBUo4lnTVoalWv0UiRO++fSgd8CL3np7j2Nn2Je/X8s1w5iqOnDAplvpaM6zA3zTTGM1 JtccHwj+DEXmbmhRQauXISU1PmLJ9UHC70H94xjkFdiKghx1D56VcnZFnxTjvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763176775; a=rsa-sha256; cv=none; b=LaLiiKGuQ8rDhPvZmIQjMCLaevtKlz41sph0ZtdNd5063S3KrwS3tgKsgPg3Gl1mZ65YML sbDDECjQ5XeRQmRpP9yG5bgE5TCRBjJFnTVTAM5FTljm4FMaD+g9/aIT51izUtYnjdIQtd SWoyEpNYTBzn/K9a3FdW362CDt3X5MorPUmiIXxHdSg7AoiLYl3+IF92v1DqLHodl+LAbM sogekVbOSpTaDFMCexXi8/iOdeBDrdCaHERZaqGGPkZJ4ccMGcRA7JwVuXu4zqcqUi4M8R PZlbO/dSfaPqE9E5613TvBu7R4idyjz4vXl++89xFRDgYyjkfqhMzQjA6XS6VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7fPg0nfZzb9F; Sat, 15 Nov 2025 03:19: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 5AF3JZNU087197; Sat, 15 Nov 2025 03:19:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF3JZxn087193; Sat, 15 Nov 2025 03:19:35 GMT (envelope-from git) Date: Sat, 15 Nov 2025 03:19:35 GMT Message-Id: <202511150319.5AF3JZxn087193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a615ded5bf2d - main - sys/conf/files: Add iwx 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a615ded5bf2dd7f563eed6766d32fc063ae36f92 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a615ded5bf2dd7f563eed6766d32fc063ae36f92 commit a615ded5bf2dd7f563eed6766d32fc063ae36f92 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-15 03:18:45 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-15 03:18:45 +0000 sys/conf/files: Add iwx driver PR: 290812 Fixes: 2ad0f7e91582 ("Import iwx as ported from OpenBSD by Future Crew.") Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53758 --- sys/conf/files | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index 87c8830b192e..53fcb80f2b8d 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2278,6 +2278,10 @@ iwn6050.fw optional iwn6050fw | iwnfw \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6050.fw" +dev/iwx/if_iwx.c optional iwx \ + compile-with "${NORMAL_C} -DIWX_DEBUG=1" +dev/iwx/if_iwx_debug.c optional iwx \ + compile-with "${NORMAL_C} -DIWX_DEBUG=1" dev/ixgbe/if_ix.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/if_ixv.c optional ixv inet \ From nobody Sat Nov 15 03:19:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7fPh4RWHz6Gx1J; Sat, 15 Nov 2025 03:19: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7fPh2Jznz44Ln; Sat, 15 Nov 2025 03:19:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763176776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TG4VrvERmuQ94UwXIrkME0feKsyD9Bt6Vx17j3mSG8I=; b=gvjN61ZaEyb+inHrIh5jnKll/Diq7hFxRSY38TXZqosrT4soQ3CcwxayMOVcVizQywoBzB xJwIQvKqWVwR2RrXQXzu96Z7ZvjGqRFcB9m1JxlWAhSLKfS0d7KdM5SDylgRhwqbDeTJlk 45k6H2JkV9WQ+F6+6xlfp2QQFAmLg3rSuVdLUf+y3IaO22htEQ5tnqz6Lt5HZvmuMOt19+ djLDD3wN0CPXQB5NAbC31weagJ3t4XZ4GprqDIzEDBlFqA3Vy4wrKPgskwM2VE3zErepph nBOZyuTkKSQAUAB64Ndy131BNZ0H6QXQD3THOWoarzZaC5hqV7HH1Fqe3WS+zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763176776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TG4VrvERmuQ94UwXIrkME0feKsyD9Bt6Vx17j3mSG8I=; b=OHSxbjksBKe1LqBKXClD+Ihlrx+18ttNcT+1AcK/SUyn6aQrVNfgM3QnTI9ykigQtlu7i+ UFLLvDdKYBkBhaAJB4s/UlSW/UzL02taOZA7gqrf8J5daI3lxxZE5nB+YIVA5hZcFYpREj ZAxOq70aXU9+TXpAUia+UUp60eldPa4mIsg48t8jK71CdjdrkvcYKgM2JypO5AehXkAO24 xdCdkQ1cQ6+84lGU3UQGs7oHKtgdHPi1hraNv+U2A7cTdDChRRZM5ImdXhkMTL/xYF3XCk ICnFsV+7AdkTjSCEvQZnpIm3QJi1bssJcPnfoFgKoCI5/pEXHsHcbufo7ku6MQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763176776; a=rsa-sha256; cv=none; b=msOJxGhRs61yZtHwBL4NlPgBDN9kBg7CDYuqOn4+IFMvSPlfj1HAWfLsjM9I82Ltf2drEo qVrFB9/KRan/Qbl83vKtnr/DRNzoKXjP6NS/pTAMFjrDAAZENovJkDQgXNXG+UeYOQOBlQ DUpGwewg9Fg+mtxeP/Ak2FYoiFveIAkfWXtkqPqmI7xDFFAlMEtzRy/IWy7iNCfvVuaFdR wrahiWW9a8Toza4YVH5c2U5pawjjrcixbBxS1JdiJF8D9cx8lBfNZddMTiFK1PQg2l4eEh PPIHgWKYWHKOGS2UqQUAXBr3BJw/+HgIdda3G4CC4k5mmN9FiJRMAh3vr1CVlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7fPh1gvYzb9G; Sat, 15 Nov 2025 03:19: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 5AF3JavA087243; Sat, 15 Nov 2025 03:19:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF3JaFA087240; Sat, 15 Nov 2025 03:19:36 GMT (envelope-from git) Date: Sat, 15 Nov 2025 03:19:36 GMT Message-Id: <202511150319.5AF3JaFA087240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b1039bbe185b - main - NOTES: Add iwm and iwx List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b1039bbe185bbadea24207b600f4bea065a2dbee Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b1039bbe185bbadea24207b600f4bea065a2dbee commit b1039bbe185bbadea24207b600f4bea065a2dbee Author: Dag-Erling Smørgrav AuthorDate: 2025-11-15 03:18:51 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-15 03:18:51 +0000 NOTES: Add iwm and iwx Reviewed by: imp, jhb Differential Revision: https://reviews.freebsd.org/D53759 --- sys/x86/conf/NOTES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/x86/conf/NOTES b/sys/x86/conf/NOTES index fadaf90d508f..643105096be2 100644 --- a/sys/x86/conf/NOTES +++ b/sys/x86/conf/NOTES @@ -444,7 +444,9 @@ device gve # Google Virtual NIC (gVNIC) device igc # Intel I225 2.5G Ethernet device ipw # Intel 2100 wireless NICs. device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. +device iwm # Intel IEEE 802.11ac wireless NICs. device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device iwx # Intel IEEE 802.11ax wireless NICs. device mthca # Mellanox HCA InfiniBand device mlx4 # Shared code module between IB and Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand From nobody Sat Nov 15 03:28:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7fbX43Yxz6Gx8j; Sat, 15 Nov 2025 03:28: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7fbX3dcHz45p1; Sat, 15 Nov 2025 03:28:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763177288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/lHxzMluW38yCLNBm1KHkqYTUbOpt1RShlvwZvB0Q0=; b=S4mpwaipWvr6840JhoBzpOI48cyOiYwdcqyttBqw2yDa2XfI72/pi5csfYOp4b8Qee77br wM0FvknPa5UtATkzaehXT52KvtjnG1i+2KT/rtuBVOR3aFbD9Cg98CYqMC6t1e51UuTYl2 DKr0w/NS1KnCRjJDjcXnW94A6iH6Q/4wKfz2uSScRVdzg0veogW7yyCw78gOywfQMXB4KU CmjeeR/hUNclSM14BlKxwbplhKaiu1kgNSDxVygZeSEPPfZTbcrZBZnmzRnEWeSBuQwL7u mGAWlx1BEk/5BQR1B7XE9IOoeHqSZQxWhzc+EulM0llKv+q0+6fNvRj4Bl1B+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763177288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/lHxzMluW38yCLNBm1KHkqYTUbOpt1RShlvwZvB0Q0=; b=xCQWN3bSXh2GJNsQCSKcEFMAORpb8qCy2pwZQShjQ9G8Gb7yp8sOyaKax81qNX6gRL9ntk OOFl8ek5jx9bpk/uA/evbTPrw45XNNyZ+pw4eHwhmPQNb/k5aZenGWhH3Z7xQBvqi8r/gd +KpTcmHX0NX1Z3pxGLoIgH2sgscF+as6juJF1vgq17kq50qxdgyJ8mS3MnkqM5xxwUfu+f sG4+hYDCrAN/0S58YmMU3/YYlhy/JFmKwEJIyyZFyAbFUuMTp/nBmotVwT5YdaZjyvaiXc mjkfxhT0aLmSF9QEvuj+V66PAFx9IUdGcPtifUpL+hzxekglULiYFK2DAHBb2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763177288; a=rsa-sha256; cv=none; b=HGTriSdy3sAC9h+dfaCIFO3yJZYUVPxJKdjSCCHDkJhKNYATGZPSH7dovaJnQYQU1nQeSW GfRCXzXv+lqVOiRlqfe/95M44JcvDpFPz+c19oLbJugLIcnGVAlYwyGe6aCe265Ie7J9hI gKZMVvWUlI21Sxhl+VE2r4mZAMTXAhr690N76udSwY9+OUCCUwdl5VOTrYdeg7+ITwSma2 QESLtN7hKylku36VUjbQdjXBpfqUQUfKsGSpIKe43EVbfbrgQ89mP4+xAvjM40qIuoI1cq U9L2XTmZIH3GGhHFrVrFGG8l5vvcaPhRhOvfqvn3NchUpy52629OqF4VmyS27A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7fbX3BbjzbGg; Sat, 15 Nov 2025 03:28: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 5AF3S8lO005728; Sat, 15 Nov 2025 03:28:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF3S8ox005723; Sat, 15 Nov 2025 03:28:08 GMT (envelope-from git) Date: Sat, 15 Nov 2025 03:28:08 GMT Message-Id: <202511150328.5AF3S8ox005723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: aa6b871ea77e - main - arm64: Add support to vchiq and bcm2835_audio (plus some 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: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa6b871ea77e5b52cf4683c5f304a82d2e351ba0 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=aa6b871ea77e5b52cf4683c5f304a82d2e351ba0 commit aa6b871ea77e5b52cf4683c5f304a82d2e351ba0 Author: Marco Devesas Campos AuthorDate: 2025-10-20 02:50:19 +0000 Commit: Adrian Chadd CommitDate: 2025-11-15 03:27:46 +0000 arm64: Add support to vchiq and bcm2835_audio (plus some fixes) Add 64 bit support to vchiq: * update fields to the appropriate fixed bit-size variants (everywhere [cf. e.g., ref:sizes and ref:sizes2]) * refer to event semaphores (that go into the very 32 bit VC) by offset instead of pointers [ref:sems] * dsb() is dsb(sy) in arm64 (vchiq_{core.c,core.h,kmod.c}) [ref:dsb] * comment out some unneeded code in parse_rx_slots around VCHIQ_MSG_BULK_RX (cf. [ref:deadcode]) * adapt remote_event_signal to arm64 caching behaviours (vchiq_kmod.c) * refactor synchronization around remote_event_signal, forcing a wmb to be on the safe side; thereby make it look more like what linux does [ref:sync] (vchiq_{core,kmod}.c); and make a comment in vchiq_core.c true (wasn't before) * add a few more syncs to be on the safe side (vchiq_2835_arm.c) * use arm64 dcache invalidation mechanisms (vchiq_2835_arm.c) * explicitly invalidate pages on arm64 post bulk-read (vchiq_2835_arm.c) * support bulk transfers on rpi-4 (aka "long address space" transfers), by hard-coding their vc offset (0) and different bit-shift [ref:longbulk] (vchiq_2835_arm.c) * refactor a loop-of-constant-test (vchiq_2835_arm.c) * use the correct (hard-coded) cache-line size on arm64 * rework the handling of chipset "features" to account for the extra behaviours with 64 bit chipsets. (vchiq_kmod.c) * add sysctl-s (log, arm_log) to control debug (vchiq_kmod.c) * add example kernel config (GENERIC-VCHIQ) Fixes: * Rework error handling in create_pagelist, avoiding a potential panic when freeing memory that had been dmamem_alloc, a potential null dereference, and a leak when having problems pinning pages (vchiq_2835_arm.c) * fix a confusion about the behaviour cv_wait_sig that lead to uninterruptible looping (vchiq_bsd.c) * implement detection of fatal signals (vchiq_bsd.c) * fix a confusion with the name of a variable introduced by #a0b8746 that could lead to a panic when closing the cdev file (vchiq_arm.c) * release user connection when destructing cdevpriv and avoid user processes sharing connection data, which lead to stalls and data corruption. (vchiq_arm.c) Update bcm2835_audio to work on 64bit systems: * update VC audio fields (vc_vchi_audioserv_defs.h, bcm2835_audio.c) * repurpose the hitherto unused callback field to help push a 64 bit pointer in (bcm2835_audio.c) * increase (hopefully) the robustness of the code that shifts data to VC (bcm2835_audio.c) * add a sysctl to control the amount of debugging info output by bcm2835_audio.c Tested on zero, zero2 and 4+ with ping, functional, bulk and control vchiq_test-s, and omxplayer [ref:dsb]: https://github.com/raspberrypi/linux/commit/35b7ebda57affcfd3616d39d5a727a4495b31123 [ref:sems]: https://github.com/raspberrypi/linux/commit/24a4262afb10907fce3cdbc3ae336fcf4cdaece5 [ref:sizes]: https://github.com/raspberrypi/linux/commit/e64568b8ea6c04e747e432c17ce2452652075216 [ref:sizes2]: https://github.com/raspberrypi/linux/commit/f9bee6dd24addfa00c2c8d50c25b73efbfbb28ba [ref:deadcode]: https://github.com/raspberrypi/linux/commit/14f4d72fb799a9b3170a45ab80d4a3ddad541960 [ref:sync]: https://github.com/raspberrypi/linux/commit/51c071265079319583e4c6e8c61e09660300d0bf [ref:longbulk]: https://github.com/raspberrypi/linux/commit/37f6f19a83722c9b866cecb5e455b2e16e5bbc6b Differential Revision: https://reviews.freebsd.org/D37878 Submitted by: Marco Devesas Campos --- sys/arm/broadcom/bcm2835/bcm2835_audio.c | 152 +++++++++++-- sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h | 8 +- sys/arm64/conf/std.broadcom | 3 + sys/contrib/vchiq/interface/compat/vchi_bsd.c | 12 +- .../vchiq/interface/vchiq_arm/vchiq_2835_arm.c | 145 +++++++++++-- sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c | 235 +++++++++++---------- sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c | 91 ++++---- sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h | 11 +- sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c | 76 ++++++- .../vchiq/interface/vchiq_arm/vchiq_pagelist.h | 8 +- sys/contrib/vchiq/interface/vchiq_arm/vchiq_shim.c | 4 +- 11 files changed, 531 insertions(+), 214 deletions(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_audio.c b/sys/arm/broadcom/bcm2835/bcm2835_audio.c index 06bbc67bd7bd..1406fcc3d952 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_audio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_audio.c @@ -113,6 +113,12 @@ struct bcm2835_audio_chinfo { uint64_t retrieved_samples; uint64_t underruns; int starved; + struct bcm_log_vars { + unsigned int bsize ; + int slept_for_lack_of_space ; + } log_vars; +#define DEFAULT_LOG_VALUES \ + ((struct bcm_log_vars) { .bsize = 0 , .slept_for_lack_of_space = 0 }) }; struct bcm2835_audio_info { @@ -164,6 +170,10 @@ struct bcm2835_audio_info { device_printf((sc)->dev, __VA_ARGS__); \ } while(0) +/* Useful for circular buffer calcs */ +#define MOD_DIFF(front,rear,mod) (((mod) + (front) - (rear)) % (mod)) + + static const char * dest_description(uint32_t dest) { @@ -237,10 +247,21 @@ bcm2835_audio_callback(void *param, const VCHI_CALLBACK_REASON_T reason, void *m m.type); } } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) { - struct bcm2835_audio_chinfo *ch = m.u.complete.cookie; + unsigned int signaled = 0; + struct bcm2835_audio_chinfo *ch ; +#if defined(__aarch64__) + ch = (void *) ((((size_t)m.u.complete.callback) << 32) + | ((size_t)m.u.complete.cookie)); +#else + ch = (void *) (m.u.complete.cookie); +#endif int count = m.u.complete.count & 0xffff; int perr = (m.u.complete.count & (1U << 30)) != 0; + + BCM2835_LOG_TRACE(sc, "in:: count:0x%x perr:%d\n", + m.u.complete.count, perr); + ch->callbacks++; if (perr) ch->underruns++; @@ -264,13 +285,31 @@ bcm2835_audio_callback(void *param, const VCHI_CALLBACK_REASON_T reason, void *m (uintmax_t)ch->retrieved_samples, (uintmax_t)ch->submitted_samples); } - ch->available_space += count; - ch->retrieved_samples += count; } - if (perr || (ch->available_space >= VCHIQ_AUDIO_PACKET_SIZE)) - cv_signal(&sc->worker_cv); + ch->available_space += count; + ch->retrieved_samples += count; + /* + * XXXMDC + * Experimental: if VC says it's empty, believe it + * Has to come after the usual adjustments + */ + if(perr){ + ch->available_space = VCHIQ_AUDIO_BUFFER_SIZE; + perr = ch->retrieved_samples; // shd be != 0 + } + + if ((ch->available_space >= 1*VCHIQ_AUDIO_PACKET_SIZE)){ + cv_signal(&sc->worker_cv); + signaled = 1; + } } BCM2835_AUDIO_UNLOCK(sc); + if(perr){ + BCM2835_LOG_WARN(sc, + "VC starved; reported %u for a total of %u\n" + "worker %s\n", count, perr, + (signaled ? "signaled": "not signaled")); + } } else BCM2835_LOG_WARN(sc, "%s: unknown m.type: %d\n", __func__, m.type); @@ -371,6 +410,7 @@ bcm2835_audio_stop(struct bcm2835_audio_chinfo *ch) m.type = VC_AUDIO_MSG_TYPE_STOP; m.u.stop.draining = 0; + BCM2835_LOG_INFO(sc,"sending stop\n"); ret = vchi_msg_queue(sc->vchi_handle, &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); @@ -449,18 +489,25 @@ static bool bcm2835_audio_buffer_should_sleep(struct bcm2835_audio_chinfo *ch) { + ch->log_vars.slept_for_lack_of_space = 0; if (ch->playback_state != PLAYBACK_PLAYING) return (true); /* Not enough data */ - if (sndbuf_getready(ch->buffer) < VCHIQ_AUDIO_PACKET_SIZE) { - printf("starve\n"); + /* XXXMDC Take unsubmitted stuff into account */ + if (sndbuf_getready(ch->buffer) + - MOD_DIFF( + ch->unsubmittedptr, + sndbuf_getreadyptr(ch->buffer), + ch->buffer->bufsize + ) < VCHIQ_AUDIO_PACKET_SIZE) { ch->starved++; return (true); } /* Not enough free space */ if (ch->available_space < VCHIQ_AUDIO_PACKET_SIZE) { + ch->log_vars.slept_for_lack_of_space = 1; return (true); } @@ -481,8 +528,13 @@ bcm2835_audio_write_samples(struct bcm2835_audio_chinfo *ch, void *buf, uint32_t m.type = VC_AUDIO_MSG_TYPE_WRITE; m.u.write.count = count; m.u.write.max_packet = VCHIQ_AUDIO_PACKET_SIZE; - m.u.write.callback = NULL; - m.u.write.cookie = ch; +#if defined(__aarch64__) + m.u.write.callback = (uint32_t)(((size_t) ch) >> 32) & 0xffffffff; + m.u.write.cookie = (uint32_t)(((size_t) ch) & 0xffffffff); +#else + m.u.write.callback = (uint32_t) NULL; + m.u.write.cookie = (uint32_t) ch; +#endif m.u.write.silence = 0; ret = vchi_msg_queue(sc->vchi_handle, @@ -529,6 +581,11 @@ bcm2835_audio_worker(void *data) while ((sc->flags_pending == 0) && bcm2835_audio_buffer_should_sleep(ch)) { cv_wait_sig(&sc->worker_cv, &sc->lock); + if ((sc->flags_pending == 0) && + (ch->log_vars.slept_for_lack_of_space)) { + BCM2835_LOG_TRACE(sc, + "slept for lack of space\n"); + } } flags = sc->flags_pending; /* Clear pending flags */ @@ -555,16 +612,25 @@ bcm2835_audio_worker(void *data) BCM2835_AUDIO_LOCK(sc); bcm2835_audio_reset_channel(&sc->pch); ch->playback_state = PLAYBACK_IDLE; + long sub_total = ch->submitted_samples; + long retd = ch->retrieved_samples; BCM2835_AUDIO_UNLOCK(sc); + BCM2835_LOG_INFO(sc, + "stopped audio. submitted a total of %lu " + "having been acked %lu\n", sub_total, retd); continue; } /* Requested to start playback */ if ((flags & AUDIO_PLAY) && (ch->playback_state == PLAYBACK_IDLE)) { + BCM2835_LOG_INFO(sc, "starting audio\n"); + unsigned int bsize = ch->buffer->bufsize; BCM2835_AUDIO_LOCK(sc); ch->playback_state = PLAYBACK_PLAYING; + ch->log_vars.bsize = bsize; BCM2835_AUDIO_UNLOCK(sc); + BCM2835_LOG_INFO(sc, "buffer size is %u\n", bsize); bcm2835_audio_start(ch); } @@ -574,19 +640,65 @@ bcm2835_audio_worker(void *data) if (sndbuf_getready(ch->buffer) == 0) continue; - count = sndbuf_getready(ch->buffer); + uint32_t i_count; + + /* XXXMDC Take unsubmitted stuff into account */ + count = i_count = sndbuf_getready(ch->buffer) + - MOD_DIFF(ch->unsubmittedptr, + sndbuf_getreadyptr(ch->buffer), + ch->buffer->bufsize); size = ch->buffer->bufsize; - readyptr = sndbuf_getreadyptr(ch->buffer); + readyptr = ch->unsubmittedptr; + + int size_changed = 0; + unsigned int available; BCM2835_AUDIO_LOCK(sc); - if (readyptr + count > size) + if (size != ch->log_vars.bsize) { + ch->log_vars.bsize = size; + size_changed = 1; + } + available = ch->available_space; + /* + * XXXMDC + * + * On arm64, got into situations where + * readyptr was less than a packet away + * from the end of the buffer, which led + * to count being set to 0 and, inexorably, starvation. + * Code below tries to take that into account. + * The problem might have been fixed with some of the + * other changes that were made in the meantime, + * but for now this works fine. + */ + if (readyptr + count > size) { count = size - readyptr; - count = min(count, ch->available_space); - count -= (count % VCHIQ_AUDIO_PACKET_SIZE); + } + if(count > ch->available_space){ + count = ch->available_space; + count -= (count % VCHIQ_AUDIO_PACKET_SIZE); + }else if (count > VCHIQ_AUDIO_PACKET_SIZE){ + count -= (count % VCHIQ_AUDIO_PACKET_SIZE); + }else if (size > count + readyptr) { + count = 0; + } BCM2835_AUDIO_UNLOCK(sc); - if (count < VCHIQ_AUDIO_PACKET_SIZE) + if (count % VCHIQ_AUDIO_PACKET_SIZE != 0) { + BCM2835_LOG_WARN(sc, "count: %u initial count: %u " + "size: %u readyptr: %u available: %u\n", count, + i_count,size,readyptr,available); + } + if (size_changed) + BCM2835_LOG_INFO(sc, "bsize changed to %u\n", size); + + if (count == 0) { + BCM2835_LOG_WARN(sc, + "not enough room for a packet: count %d," + " i_count %d, rptr %d, size %d\n", + count, i_count, readyptr, size); continue; + } buf = ch->buffer->buf + readyptr; @@ -596,8 +708,16 @@ bcm2835_audio_worker(void *data) ch->buffer->bufsize; ch->available_space -= count; ch->submitted_samples += count; + long sub = count; + long sub_total = ch->submitted_samples; + long retd = ch->retrieved_samples; KASSERT(ch->available_space >= 0, ("ch->available_space == %d\n", ch->available_space)); BCM2835_AUDIO_UNLOCK(sc); + + BCM2835_LOG_TRACE(sc, + "submitted %lu for a total of %lu having been acked %lu; " + "rptr %d, had %u available\n", sub, sub_total, retd, + readyptr, available); } BCM2835_AUDIO_LOCK(sc); @@ -650,6 +770,8 @@ bcmchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel * return NULL; } + ch->log_vars = DEFAULT_LOG_VALUES; + BCM2835_AUDIO_LOCK(sc); bcm2835_worker_update_params(sc); BCM2835_AUDIO_UNLOCK(sc); diff --git a/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h b/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h index 896e706ff492..ea972ff2d001 100644 --- a/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h +++ b/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h @@ -112,8 +112,8 @@ typedef struct typedef struct { uint32_t count; /* in bytes */ - void *callback; - void *cookie; + uint32_t callback; + uint32_t cookie; uint16_t silence; uint16_t max_packet; } VC_AUDIO_WRITE_T; @@ -129,8 +129,8 @@ typedef struct typedef struct { int32_t count; /* Success value */ - void *callback; - void *cookie; + uint32_t callback; + uint32_t cookie; } VC_AUDIO_COMPLETE_T; /* Message header for all messages in HOST->VC direction */ diff --git a/sys/arm64/conf/std.broadcom b/sys/arm64/conf/std.broadcom index 3332aaac0826..65bee16e315d 100644 --- a/sys/arm64/conf/std.broadcom +++ b/sys/arm64/conf/std.broadcom @@ -33,5 +33,8 @@ device sdhci options FDT device acpi +# Sound support +device vchiq + # DTBs makeoptions MODULES_EXTRA+="dtb/rpi" diff --git a/sys/contrib/vchiq/interface/compat/vchi_bsd.c b/sys/contrib/vchiq/interface/compat/vchi_bsd.c index 8f47b3dc02d6..08f2f66dfc54 100644 --- a/sys/contrib/vchiq/interface/compat/vchi_bsd.c +++ b/sys/contrib/vchiq/interface/compat/vchi_bsd.c @@ -340,7 +340,6 @@ down_interruptible(struct semaphore *s) int ret ; ret = 0; - mtx_lock(&s->mtx); while (s->value == 0) { @@ -348,13 +347,11 @@ down_interruptible(struct semaphore *s) ret = cv_wait_sig(&s->cv, &s->mtx); s->waiters--; - if (ret == EINTR) { + /* XXXMDC As per its semaphore.c, linux can only return EINTR */ + if (ret) { mtx_unlock(&s->mtx); - return (-EINTR); + return -EINTR; } - - if (ret == ERESTART) - continue; } s->value--; @@ -441,8 +438,7 @@ flush_signals(VCHIQ_THREAD_T thr) int fatal_signal_pending(VCHIQ_THREAD_T thr) { - printf("Implement ME: %s\n", __func__); - return (0); + return (curproc_sigkilled()); } /* diff --git a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c index 185e81e71bdc..7e105a6b3b77 100644 --- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c +++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c @@ -65,9 +65,24 @@ MALLOC_DEFINE(M_VCPAGELIST, "vcpagelist", "VideoCore pagelist memory"); #define MAX_FRAGMENTS (VCHIQ_NUM_CURRENT_BULKS * 2) +/* + * XXXMDC + * Do this less ad-hoc-y -- e.g. + * https://github.com/raspberrypi/linux/commit/c683db8860a80562a2bb5b451d77b3e471d24f36 + */ +#if defined(__aarch64__) +int g_cache_line_size = 64; +#else int g_cache_line_size = 32; +#endif static int g_fragment_size; +unsigned int g_long_bulk_space = 0; +#define VM_PAGE_TO_VC_BULK_PAGE(x) (\ + g_long_bulk_space ? VM_PAGE_TO_PHYS(x)\ + : PHYS_TO_VCBUS(VM_PAGE_TO_PHYS(x))\ +) + typedef struct vchiq_2835_state_struct { int inited; VCHIQ_ARM_STATE_T arm_state; @@ -113,6 +128,54 @@ vchiq_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) *addr = PHYS_TO_VCBUS(segs[0].ds_addr); } +#if defined(__aarch64__) /* See comment in free_pagelist */ +static int +invalidate_cachelines_in_range_of_ppage( + vm_page_t p, + size_t offset, + size_t count +) +{ + if(offset + count > PAGE_SIZE){ return EINVAL; } + uint8_t *dst = (uint8_t*)pmap_quick_enter_page(p); + if (!dst){ + return ENOMEM; + } + cpu_dcache_inv_range((void *)((vm_offset_t)dst + offset), count); + pmap_quick_remove_page((vm_offset_t)dst); + return 0; +} + +/* XXXMDC bulk instead of loading and invalidating single pages? */ +static void +invalidate_cachelines_in_range_of_ppage_seq(vm_page_t *p, size_t start, + size_t count) +{ + if (start >= PAGE_SIZE) + goto invalid_input; + +#define _NEXT_AT(x,_m) (((x)+((_m)-1)) & ~((_m)-1)) /* for power of two m */ + size_t offset = _NEXT_AT(start,g_cache_line_size); +#undef _NEXT_AT + count = (offset < start + count) ? count - (offset - start) : 0; + offset = offset & (PAGE_SIZE - 1); + for (size_t done = 0; count > done; + p++, done += PAGE_SIZE - offset, offset = 0) { + size_t in_page = PAGE_SIZE - offset; + size_t todo = (count-done > in_page) ? in_page : count-done; + int e = invalidate_cachelines_in_range_of_ppage(*p, offset, todo); + if (e != 0) + goto problem_in_loop; + } + return; + +problem_in_loop: +invalid_input: + WARN_ON(1); + return; +} +#endif + static int copyout_page(vm_page_t p, size_t offset, void *kaddr, size_t size) { @@ -171,7 +234,7 @@ vchiq_platform_init(VCHIQ_STATE_T *state) goto failed_load; } - WARN_ON(((int)g_slot_mem & (PAGE_SIZE - 1)) != 0); + WARN_ON(((size_t)g_slot_mem & (PAGE_SIZE - 1)) != 0); vchiq_slot_zero = vchiq_init_slots(g_slot_mem, g_slot_mem_size); if (!vchiq_slot_zero) { @@ -391,13 +454,14 @@ pagelist_page_free(vm_page_t pp) ** from increased speed as a result. */ + static int create_pagelist(char __user *buf, size_t count, unsigned short type, struct proc *p, BULKINFO_T *bi) { PAGELIST_T *pagelist; vm_page_t* pages; - unsigned long *addrs; + uint32_t *addrs; unsigned int num_pages, i; vm_offset_t offset; int pagelist_size; @@ -434,7 +498,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, err = bus_dmamem_alloc(bi->pagelist_dma_tag, (void **)&pagelist, BUS_DMA_COHERENT | BUS_DMA_WAITOK, &bi->pagelist_dma_map); - if (err) { + if (err || !pagelist) { vchiq_log_error(vchiq_core_log_level, "Unable to allocate pagelist memory"); err = -ENOMEM; goto failed_alloc; @@ -447,6 +511,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, if (err) { vchiq_log_error(vchiq_core_log_level, "cannot load DMA map for pagelist memory"); err = -ENOMEM; + bi->pagelist = pagelist; goto failed_load; } @@ -463,8 +528,9 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, if (actual_pages != num_pages) { if (actual_pages > 0) vm_page_unhold_pages(pages, actual_pages); - free(pagelist, M_VCPAGELIST); - return (-ENOMEM); + err = -ENOMEM; + bi->pagelist = pagelist; + goto failed_hold; } pagelist->length = count; @@ -473,27 +539,28 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, /* Group the pages into runs of contiguous pages */ - base_addr = (void *)PHYS_TO_VCBUS(VM_PAGE_TO_PHYS(pages[0])); + size_t run_ceil = g_long_bulk_space ? 0x100 : PAGE_SIZE; + unsigned int pg_addr_rshift = g_long_bulk_space ? 4 : 0; + base_addr = (void *) VM_PAGE_TO_VC_BULK_PAGE(pages[0]); next_addr = base_addr + PAGE_SIZE; addridx = 0; run = 0; - +#define _PG_BLOCK(base,run) \ + ((((size_t) (base)) >> pg_addr_rshift) & ~(run_ceil-1)) + (run) for (i = 1; i < num_pages; i++) { - addr = (void *)PHYS_TO_VCBUS(VM_PAGE_TO_PHYS(pages[i])); - if ((addr == next_addr) && (run < (PAGE_SIZE - 1))) { + addr = (void *)VM_PAGE_TO_VC_BULK_PAGE(pages[i]); + if ((addr == next_addr) && (run < run_ceil - 1)) { next_addr += PAGE_SIZE; run++; } else { - addrs[addridx] = (unsigned long)base_addr + run; - addridx++; + addrs[addridx++] = (uint32_t) _PG_BLOCK(base_addr,run); base_addr = addr; next_addr = addr + PAGE_SIZE; run = 0; } } - - addrs[addridx] = (unsigned long)base_addr + run; - addridx++; + addrs[addridx++] = _PG_BLOCK(base_addr, run); +#undef _PG_BLOCK /* Partial cache lines (fragments) require special measures */ if ((type == PAGELIST_READ) && @@ -514,20 +581,35 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, WARN_ON(fragments == NULL); g_free_fragments = *(char **) g_free_fragments; up(&g_free_fragments_mutex); - pagelist->type = - PAGELIST_READ_WITH_FRAGMENTS + - (fragments - g_fragments_base)/g_fragment_size; + pagelist->type = PAGELIST_READ_WITH_FRAGMENTS + + (fragments - g_fragments_base)/g_fragment_size; +#if defined(__aarch64__) + bus_dmamap_sync(bcm_slots_dma_tag, bcm_slots_dma_map, + BUS_DMASYNC_PREREAD); +#endif } +#if defined(__aarch64__) + if(type == PAGELIST_READ) { + cpu_dcache_wbinv_range(buf, count); + } else { + cpu_dcache_wb_range(buf, count); + } + dsb(sy); +#else pa = pmap_extract(PCPU_GET(curpmap), (vm_offset_t)buf); dcache_wbinv_poc((vm_offset_t)buf, pa, count); +#endif - bus_dmamap_sync(bi->pagelist_dma_tag, bi->pagelist_dma_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(bi->pagelist_dma_tag, bi->pagelist_dma_map, + BUS_DMASYNC_PREWRITE); bi->pagelist = pagelist; return 0; +failed_hold: + bus_dmamap_unload(bi->pagelist_dma_tag,bi->pagelist_dma_map); failed_load: bus_dmamem_free(bi->pagelist_dma_tag, bi->pagelist, bi->pagelist_dma_map); failed_alloc: @@ -556,6 +638,24 @@ free_pagelist(BULKINFO_T *bi, int actual) pages = (vm_page_t*)(pagelist->addrs + num_pages); +#if defined(__aarch64__) + /* + * On arm64, even if the user keeps their end of the bargain + * -- do NOT touch the buffers sent to VC -- but reads around the + * pagelist after the invalidation above, the arm might preemptively + * load (and validate) cache lines for areas inside the page list, + * so we must invalidate them again. + * + * The functional test does it and without this it doesn't pass. + * + * XXXMDC might it be enough to invalidate a couple of pages at + * the ends of the page list? + */ + if(pagelist->type >= PAGELIST_READ && actual > 0) + invalidate_cachelines_in_range_of_ppage_seq(pages, + pagelist->offset, actual); +#endif + /* Deal with any partial cache lines (fragments) */ if (pagelist->type >= PAGELIST_READ_WITH_FRAGMENTS) { char *fragments = g_fragments_base + @@ -592,13 +692,18 @@ free_pagelist(BULKINFO_T *bi, int actual) up(&g_free_fragments_sema); } - for (i = 0; i < num_pages; i++) { - if (pagelist->type != PAGELIST_WRITE) { + if (pagelist->type != PAGELIST_WRITE) { + for (i = 0; i < num_pages; i++) { vm_page_dirty(pages[i]); pagelist_page_free(pages[i]); } } +#if defined(__aarch64__) + /* XXXMDC necessary? */ + dsb(sy); +#endif + bus_dmamap_unload(bi->pagelist_dma_tag, bi->pagelist_dma_map); bus_dmamem_free(bi->pagelist_dma_tag, bi->pagelist, bi->pagelist_dma_map); bus_dma_tag_destroy(bi->pagelist_dma_tag); diff --git a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c index e25c4d738922..36f9d0e3410d 100644 --- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c +++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c @@ -386,7 +386,7 @@ static void user_service_free(void *userdata) { USER_SERVICE_T *user_service = userdata; - + _sema_destroy(&user_service->insert_event); _sema_destroy(&user_service->remove_event); @@ -410,7 +410,7 @@ static void close_delivered(USER_SERVICE_T *user_service) /* Wake the user-thread blocked in close_ or remove_service */ up(&user_service->close_event); - + user_service->close_pending = 0; } } @@ -749,6 +749,7 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, (size_t)waiter, current->p_pid); args.userdata = &waiter->bulk_waiter; } + status = vchiq_bulk_transfer (args.handle, VCHI_MEM_HANDLE_INVALID, @@ -1093,7 +1094,7 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, } break; case VCHIQ_IOC_LIB_VERSION: { - unsigned int lib_version = (unsigned int)arg; + size_t lib_version = (size_t)arg; if (lib_version < VCHIQ_VERSION_MIN) ret = -EINVAL; @@ -1155,18 +1156,14 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, return ret; } -static void -instance_dtr(void *data) -{ - kfree(data); -} /**************************************************************************** * * vchiq_open * ***************************************************************************/ +static void instance_dtr(void *data); static int vchiq_open(struct cdev *dev, int flags, int fmt __unused, struct thread *td) @@ -1206,7 +1203,7 @@ vchiq_open(struct cdev *dev, int flags, int fmt __unused, struct thread *td) INIT_LIST_HEAD(&instance->bulk_waiter_list); devfs_set_cdevpriv(instance, instance_dtr); - } + } else { vchiq_log_error(vchiq_arm_log_level, "Unknown minor device"); @@ -1222,143 +1219,151 @@ vchiq_open(struct cdev *dev, int flags, int fmt __unused, struct thread *td) * ***************************************************************************/ + static int -vchiq_close(struct cdev *dev, int flags __unused, int fmt __unused, - struct thread *td) +_vchiq_close_instance(VCHIQ_INSTANCE_T instance) { int ret = 0; - if (1) { - VCHIQ_INSTANCE_T instance; - VCHIQ_STATE_T *state = vchiq_get_state(); - VCHIQ_SERVICE_T *service; - int i; - - if ((ret = devfs_get_cdevpriv((void**)&instance))) { - printf("devfs_get_cdevpriv failed: error %d\n", ret); - return (ret); - } - - vchiq_log_info(vchiq_arm_log_level, - "vchiq_release: instance=%lx", - (unsigned long)instance); - - if (!state) { - ret = -EPERM; - goto out; - } + VCHIQ_STATE_T *state = vchiq_get_state(); + VCHIQ_SERVICE_T *service; + int i; - /* Ensure videocore is awake to allow termination. */ - vchiq_use_internal(instance->state, NULL, - USE_TYPE_VCHIQ); + vchiq_log_info(vchiq_arm_log_level, + "vchiq_release: instance=%lx", + (unsigned long)instance); - lmutex_lock(&instance->completion_mutex); + if (!state) { + ret = -EPERM; + goto out; + } - /* Wake the completion thread and ask it to exit */ - instance->closing = 1; - up(&instance->insert_event); + /* Ensure videocore is awake to allow termination. */ + vchiq_use_internal(instance->state, NULL, + USE_TYPE_VCHIQ); - lmutex_unlock(&instance->completion_mutex); + lmutex_lock(&instance->completion_mutex); - /* Wake the slot handler if the completion queue is full. */ - up(&instance->remove_event); + /* Wake the completion thread and ask it to exit */ + instance->closing = 1; + up(&instance->insert_event); - /* Mark all services for termination... */ - i = 0; - while ((service = next_service_by_instance(state, instance, - &i)) != NULL) { - USER_SERVICE_T *user_service = service->base.userdata; + lmutex_unlock(&instance->completion_mutex); - /* Wake the slot handler if the msg queue is full. */ - up(&user_service->remove_event); + /* Wake the slot handler if the completion queue is full. */ + up(&instance->remove_event); - vchiq_terminate_service_internal(service); - unlock_service(service); - } + /* Mark all services for termination... */ + i = 0; + while ((service = next_service_by_instance(state, instance, + &i)) != NULL) { + USER_SERVICE_T *user_service = service->base.userdata; - /* ...and wait for them to die */ - i = 0; - while ((service = next_service_by_instance(state, instance, &i)) - != NULL) { - USER_SERVICE_T *user_service = service->base.userdata; + /* Wake the slot handler if the msg queue is full. */ + up(&user_service->remove_event); - down(&service->remove_event); + vchiq_terminate_service_internal(service); + unlock_service(service); + } - BUG_ON(service->srvstate != VCHIQ_SRVSTATE_FREE); + /* ...and wait for them to die */ + i = 0; + while ((service = next_service_by_instance(state, instance, &i)) + != NULL) { + USER_SERVICE_T *user_service = service->base.userdata; - spin_lock(&msg_queue_spinlock); + down(&service->remove_event); - while (user_service->msg_remove != - user_service->msg_insert) { - VCHIQ_HEADER_T *header = user_service-> - msg_queue[user_service->msg_remove & - (MSG_QUEUE_SIZE - 1)]; - user_service->msg_remove++; - spin_unlock(&msg_queue_spinlock); + BUG_ON(service->srvstate != VCHIQ_SRVSTATE_FREE); - if (header) - vchiq_release_message( - service->handle, - header); - spin_lock(&msg_queue_spinlock); - } + spin_lock(&msg_queue_spinlock); + while (user_service->msg_remove != + user_service->msg_insert) { + VCHIQ_HEADER_T *header = user_service-> + msg_queue[user_service->msg_remove & + (MSG_QUEUE_SIZE - 1)]; + user_service->msg_remove++; spin_unlock(&msg_queue_spinlock); - unlock_service(service); + if (header) + vchiq_release_message( + service->handle, + header); + spin_lock(&msg_queue_spinlock); } - /* Release any closed services */ - while (instance->completion_remove != - instance->completion_insert) { - VCHIQ_COMPLETION_DATA_T *completion; - VCHIQ_SERVICE_T *service1; - completion = &instance->completions[ - instance->completion_remove & - (MAX_COMPLETIONS - 1)]; - service1 = completion->service_userdata; - if (completion->reason == VCHIQ_SERVICE_CLOSED) - { - USER_SERVICE_T *user_service = - service->base.userdata; - - /* Wake any blocked user-thread */ - if (instance->use_close_delivered) - up(&user_service->close_event); - unlock_service(service1); - } - instance->completion_remove++; - } + spin_unlock(&msg_queue_spinlock); - /* Release the PEER service count. */ - vchiq_release_internal(instance->state, NULL); + unlock_service(service); + } + /* Release any closed services */ + while (instance->completion_remove != + instance->completion_insert) { + VCHIQ_COMPLETION_DATA_T *completion; + VCHIQ_SERVICE_T *service; + completion = &instance->completions[ + instance->completion_remove & + (MAX_COMPLETIONS - 1)]; + service = completion->service_userdata; + if (completion->reason == VCHIQ_SERVICE_CLOSED) { - struct list_head *pos, *next; - list_for_each_safe(pos, next, - &instance->bulk_waiter_list) { - struct bulk_waiter_node *waiter; - waiter = list_entry(pos, - struct bulk_waiter_node, - list); - list_del(pos); - vchiq_log_info(vchiq_arm_log_level, - "bulk_waiter - cleaned up %x " - "for pid %d", - (unsigned int)waiter, waiter->pid); - _sema_destroy(&waiter->bulk_waiter.event); - kfree(waiter); - } - } + USER_SERVICE_T *user_service = + service->base.userdata; + /* Wake any blocked user-thread */ + if (instance->use_close_delivered) + up(&user_service->close_event); + + unlock_service(service); + } + instance->completion_remove++; } - else { - vchiq_log_error(vchiq_arm_log_level, - "Unknown minor device"); - ret = -ENXIO; + + /* Release the PEER service count. */ + vchiq_release_internal(instance->state, NULL); + + { + struct list_head *pos, *next; + list_for_each_safe(pos, next, + &instance->bulk_waiter_list) { + struct bulk_waiter_node *waiter; + waiter = list_entry(pos, + struct bulk_waiter_node, + list); + list_del(pos); + vchiq_log_info(vchiq_arm_log_level, + "bulk_waiter - cleaned up %zx " + "for pid %d", + (size_t)waiter, waiter->pid); *** 476 LINES SKIPPED *** From nobody Sat Nov 15 03:28:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7fbY5PpVz6Gx8p; Sat, 15 Nov 2025 03:28: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7fbY3sYXz45p2; Sat, 15 Nov 2025 03:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763177289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3eZ8im0iqXi25kS0ymRjwBlRG6uy0PfIGhQkZV/FOs=; b=WDlcTEkz+sYwlMAIEFgtMI4U1pRdvJdD4/TbOKbhVHx/e5VDmqcnnXsY1V4gvi3R4KgGLp PXjCS9WadtezqbmmlQ9pU7NtqJ2BWChpyLBnVxvz6RXdiXDBI/7f2pn3FloAjUCL5GfNCH oOvGlK3ZGcQVlL2t+3pJFvYGOfpPHlou0L6S3fIsxHRTwH4eHvqrGoM/l+tJnRTI2UviQQ R5zUFE7lELtRLv1W/V1JQgvIgkb8F+yE3h8mbzaL5UjMuNToLFrN50Yg158/s0KB1NA4mx 9dycoTanWJrWsXuRyC5pn+1AFJbZ0NZnyr+fGbRo15RW09XvOBigGLi5hkwwLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763177289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3eZ8im0iqXi25kS0ymRjwBlRG6uy0PfIGhQkZV/FOs=; b=ZHR3yXxmf2hVokGzlRXSWLvqGpg6H9ZXE7BdUe+F2fHx0tp/f2DH272j5ZzyTpT0rSDBaL FrE7r++egiWAe6hHZbhFaTghsken5f1yT+dsogcZRZEvbO7U0TnpFBy/zRwMCUeMvhPnVv A2kcJT+s56E1UCwDD0SWBEhXaKfVABDbxV29oRNsr4KDiKinAwJX/ud6F0jD2Vqi/MU+Wj Bc/75VPMek0rD4+PppD0kOTp/nBYcGvPA9azUA8Ak7fBDr9Jsz9KCNF3sPThsI0uF7XHhc ZBm8pN9aaAs8xZU6DC6E5EiLhPpFaZXlC7p7Jh5H/DnCUiFCHDJebiiGSYjbGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763177289; a=rsa-sha256; cv=none; b=OajHMFEnopEE48U5DFRQTV6boIROitBpr3FioZVCui78nIB7S4FLvS3HccPc8oxyPuxQnI p+9RVq/Vb0cXwtwrEYHKcBE6v9cvMTb9grTlZCaD+bfWmXx0JiWkLYVTlGRFX6JZ9af8KN L4StMl8V/xo0ia3Kt8oaOO2AyvInDoLPR1XM/M4ZqGBtD+osiGHl8wZA1GT/C4pPpL2oHd eGdHKZlOIfISP1/XfM0wbUjZnhf24jGWpDbXk2UPJjmviUnqL5fzK24KARaC0gp/Yc7JuQ fbkWatwpjLvfJriRFzY3UAEoImRw78q85ZCtIqe7aafVfKabMghOr5B+k+mXUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7fbY3Sd8zbSQ; Sat, 15 Nov 2025 03:28: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 5AF3S9Rm005760; Sat, 15 Nov 2025 03:28:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF3S9W7005757; Sat, 15 Nov 2025 03:28:09 GMT (envelope-from git) Date: Sat, 15 Nov 2025 03:28:09 GMT Message-Id: <202511150328.5AF3S9W7005757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 70e73c43a472 - main - vchiq: add compat_freebsd32 ioctls and respective datatypes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70e73c43a472e260e8f4b27b65a760643dee85dc Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=70e73c43a472e260e8f4b27b65a760643dee85dc commit 70e73c43a472e260e8f4b27b65a760643dee85dc Author: Marco Devesas Campos AuthorDate: 2025-10-20 02:53:37 +0000 Commit: Adrian Chadd CommitDate: 2025-11-15 03:27:51 +0000 vchiq: add compat_freebsd32 ioctls and respective datatypes Submitted by: Marco Devesas Campos Differential Revision: https://reviews.freebsd.org/D37879 --- sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c | 247 ++++++++++++++++++++- .../vchiq/interface/vchiq_arm/vchiq_ioctl.h | 121 ++++++++++ 2 files changed, 357 insertions(+), 11 deletions(-) diff --git a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c index 36f9d0e3410d..d780f3807cee 100644 --- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c +++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c @@ -448,6 +448,22 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, (_IOC_NR(cmd) <= VCHIQ_IOC_MAX)) ? ioctl_names[_IOC_NR(cmd)] : "", arg); +#ifdef COMPAT_FREEBSD32 +/* A fork in the road to freebsd32 compatibilty */ +#define _CF32_FORK(compat_c, native_c) { \ + int _____dont_call_your_vars_this = 0; \ + switch (cmd) { \ + _CF32_CASE {_____dont_call_your_vars_this = 1;} \ + break; \ + } \ + if (_____dont_call_your_vars_this) \ + { compat_c } \ + else \ + { native_c } \ + } +#else +#define _CF32_FORK(compat_c, native_c) { native_c } +#endif switch (cmd) { case VCHIQ_IOC_SHUTDOWN: if (!instance->connected) @@ -496,13 +512,33 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, "vchiq: could not connect: %d", status); break; +#ifdef COMPAT_FREEBSD32 +#define _CF32_CASE \ + case VCHIQ_IOC_CREATE_SERVICE32: + _CF32_CASE +#endif case VCHIQ_IOC_CREATE_SERVICE: { VCHIQ_CREATE_SERVICE_T args; USER_SERVICE_T *user_service = NULL; void *userdata; int srvstate; +_CF32_FORK( + VCHIQ_CREATE_SERVICE32_T args32; + memcpy(&args32, (const void*)arg, sizeof(args32)); + args.params.fourcc = args32.params.fourcc; + /* XXXMDC not actually used? overwritten straight away */ + args.params.callback = + (VCHIQ_CALLBACK_T)(uintptr_t) args32.params.callback; + args.params.userdata = (void*)(uintptr_t)args32.params.userdata; + args.params.version = args32.params.version; + args.params.version_min = args32.params.version_min; + args.is_open = args32.is_open; + args.is_vchi = args32.is_vchi; + args.handle = args32.handle; +, memcpy(&args, (const void*)arg, sizeof(args)); +) user_service = kmalloc(sizeof(USER_SERVICE_T), GFP_KERNEL); if (!user_service) { @@ -558,15 +594,22 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, break; } } - #ifdef VCHIQ_IOCTL_DEBUG printf("%s: [CREATE SERVICE] handle = %08x\n", __func__, service->handle); #endif +_CF32_FORK( + memcpy((void *) + &(((VCHIQ_CREATE_SERVICE32_T*) + arg)->handle), + (const void *)&service->handle, + sizeof(service->handle)); +, memcpy((void *) &(((VCHIQ_CREATE_SERVICE_T*) arg)->handle), (const void *)&service->handle, sizeof(service->handle)); +); service = NULL; } else { @@ -574,6 +617,7 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, kfree(user_service); } } break; +#undef _CF32_CASE case VCHIQ_IOC_CLOSE_SERVICE: { VCHIQ_SERVICE_HANDLE_T handle; @@ -673,9 +717,22 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, ret = -EINVAL; } break; +#ifdef COMPAT_FREEBSD32 +#define _CF32_CASE \ + case VCHIQ_IOC_QUEUE_MESSAGE32: + _CF32_CASE +#endif case VCHIQ_IOC_QUEUE_MESSAGE: { VCHIQ_QUEUE_MESSAGE_T args; +_CF32_FORK( + VCHIQ_QUEUE_MESSAGE32_T args32; + memcpy(&args32, (const void*)arg, sizeof(args32)); + args.handle = args32.handle; + args.count = args32.count; + args.elements = (VCHIQ_ELEMENT_T *)(uintptr_t)args32.elements; +, memcpy(&args, (const void*)arg, sizeof(args)); +) #ifdef VCHIQ_IOCTL_DEBUG printf("%s: [QUEUE MESSAGE] handle = %08x\n", __func__, args.handle); @@ -686,8 +743,22 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, if ((service != NULL) && (args.count <= MAX_ELEMENTS)) { /* Copy elements into kernel space */ VCHIQ_ELEMENT_T elements[MAX_ELEMENTS]; - if (copy_from_user(elements, args.elements, - args.count * sizeof(VCHIQ_ELEMENT_T)) == 0) + long cp_ret; +_CF32_FORK( + VCHIQ_ELEMENT32_T elements32[MAX_ELEMENTS]; + cp_ret = copy_from_user(elements32, args.elements, + args.count * sizeof(VCHIQ_ELEMENT32_T)); + for(int i=0;cp_ret == 0 && i < args.count;++i){ + elements[i].data = + (void *)(uintptr_t)elements32[i].data; + elements[i].size = elements32[i].size; + } + +, + cp_ret = copy_from_user(elements, args.elements, + args.count * sizeof(VCHIQ_ELEMENT_T)); +) + if (cp_ret == 0) status = vchiq_queue_message (args.handle, elements, args.count); @@ -697,16 +768,38 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, ret = -EINVAL; } } break; +#undef _CF32_CASE +#ifdef COMPAT_FREEBSD32 +#define _CF32_CASE \ + case VCHIQ_IOC_QUEUE_BULK_TRANSMIT32: \ + case VCHIQ_IOC_QUEUE_BULK_RECEIVE32: + _CF32_CASE +#endif case VCHIQ_IOC_QUEUE_BULK_TRANSMIT: case VCHIQ_IOC_QUEUE_BULK_RECEIVE: { VCHIQ_QUEUE_BULK_TRANSFER_T args; + struct bulk_waiter_node *waiter = NULL; VCHIQ_BULK_DIR_T dir = - (cmd == VCHIQ_IOC_QUEUE_BULK_TRANSMIT) ? - VCHIQ_BULK_TRANSMIT : VCHIQ_BULK_RECEIVE; - + (cmd == VCHIQ_IOC_QUEUE_BULK_TRANSMIT) || + (cmd == VCHIQ_IOC_QUEUE_BULK_TRANSMIT32)? + VCHIQ_BULK_TRANSMIT : VCHIQ_BULK_RECEIVE; + +_CF32_FORK( + VCHIQ_QUEUE_BULK_TRANSFER32_T args32; + memcpy(&args32, (const void*)arg, sizeof(args32)); + /* XXXMDC parens needed (macro parsing?) */ + args = ((VCHIQ_QUEUE_BULK_TRANSFER_T) { + .handle = args32.handle, + .data = (void *)(uintptr_t) args32.data, + .size = args32.size, + .userdata = (void *)(uintptr_t) args32.userdata, + .mode = args32.mode, + }); +, memcpy(&args, (const void*)arg, sizeof(args)); +) service = find_service_for_instance(instance, args.handle); if (!service) { @@ -734,7 +827,6 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, list_del(pos); break; } - } lmutex_unlock(&instance->bulk_waiter_list_mutex); if (!waiter) { @@ -780,14 +872,28 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, "saved bulk_waiter %zx for pid %d", (size_t)waiter, current->p_pid); +_CF32_FORK( + memcpy((void *) + &(((VCHIQ_QUEUE_BULK_TRANSFER32_T *) + arg)->mode), + (const void *)&mode_waiting, + sizeof(mode_waiting)); +, memcpy((void *) &(((VCHIQ_QUEUE_BULK_TRANSFER_T *) arg)->mode), (const void *)&mode_waiting, sizeof(mode_waiting)); +) } } break; +#undef _CF32_CASE +#ifdef COMPAT_FREEBSD32 +#define _CF32_CASE \ + case VCHIQ_IOC_AWAIT_COMPLETION32: + _CF32_CASE +#endif case VCHIQ_IOC_AWAIT_COMPLETION: { VCHIQ_AWAIT_COMPLETION_T args; int count = 0; @@ -798,7 +904,17 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, break; } +_CF32_FORK( + VCHIQ_AWAIT_COMPLETION32_T args32; + memcpy(&args32, (const void*)arg, sizeof(args32)); + args.count = args32.count; + args.buf = (VCHIQ_COMPLETION_DATA_T *)(uintptr_t)args32.buf; + args.msgbufsize = args32.msgbufsize; + args.msgbufcount = args32.msgbufcount; + args.msgbufs = (void **)(uintptr_t)args32.msgbufs; +, memcpy(&args, (const void*)arg, sizeof(args)); +) lmutex_lock(&instance->completion_mutex); @@ -878,6 +994,20 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, break; /* Get the pointer from user space */ msgbufcount--; +_CF32_FORK( + uint32_t *msgbufs32 = + (uint32_t *) args.msgbufs; + uint32_t msgbuf32 = 0; + if (copy_from_user(&msgbuf32, + (const uint32_t __user *) + &msgbufs32[msgbufcount], + sizeof(msgbuf32)) != 0) { + if (count == 0) + ret = -EFAULT; + break; + } + msgbuf = (void __user *)(uintptr_t)msgbuf32; +, if (copy_from_user(&msgbuf, (const void __user *) &args.msgbufs[msgbufcount], @@ -886,6 +1016,7 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, ret = -EFAULT; break; } +) /* Copy the message to user space */ if (copy_to_user(msgbuf, header, @@ -909,7 +1040,30 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, VCHIQ_SERVICE_CLOSED) && !instance->use_close_delivered) unlock_service(service1); - +_CF32_FORK( + VCHIQ_COMPLETION_DATA32_T comp32 = {0}; + comp32.reason = + (uint32_t)(size_t) completion->reason; + comp32.service_userdata = + (uint32_t)(size_t) + completion->service_userdata; + comp32.bulk_userdata = + (uint32_t)(size_t) + completion->bulk_userdata; + comp32.header = + (uint32_t)(size_t)completion->header; + + VCHIQ_COMPLETION_DATA32_T __user *buf_loc; + buf_loc = (VCHIQ_COMPLETION_DATA32_T __user *) + args.buf; + buf_loc += count; + if (copy_to_user( + buf_loc, &comp32, sizeof(comp32) + ) != 0) { + if (ret == 0) + ret = -EFAULT; + } +, if (copy_to_user((void __user *)( (size_t)args.buf + count * sizeof(VCHIQ_COMPLETION_DATA_T)), @@ -919,6 +1073,7 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, ret = -EFAULT; break; } +) /* Ensure that the above copy has completed ** before advancing the remove pointer. */ @@ -928,18 +1083,33 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, } if (msgbufcount != args.msgbufcount) { +_CF32_FORK( + memcpy( + (void __user *) + &((VCHIQ_AWAIT_COMPLETION32_T *)arg)-> + msgbufcount, + &msgbufcount, + sizeof(msgbufcount)); +, memcpy((void __user *) &((VCHIQ_AWAIT_COMPLETION_T *)arg)-> msgbufcount, &msgbufcount, sizeof(msgbufcount)); +) } if (count != args.count) { +_CF32_FORK( + memcpy((void __user *) + &((VCHIQ_AWAIT_COMPLETION32_T *)arg)->count, + &count, sizeof(count)); +, memcpy((void __user *) &((VCHIQ_AWAIT_COMPLETION_T *)arg)->count, &count, sizeof(count)); +) } } @@ -948,9 +1118,9 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, if ((ret == 0) && instance->closing) ret = -ENOTCONN; - /* + /* * XXXBSD: ioctl return codes are not negative as in linux, so - * we can not indicate success with positive number of passed + * we can not indicate success with positive number of passed * messages */ if (ret > 0) @@ -959,14 +1129,29 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, lmutex_unlock(&instance->completion_mutex); DEBUG_TRACE(AWAIT_COMPLETION_LINE); } break; +#undef _CF32_CASE +#ifdef COMPAT_FREEBSD32 +#define _CF32_CASE \ + case VCHIQ_IOC_DEQUEUE_MESSAGE32: + _CF32_CASE +#endif case VCHIQ_IOC_DEQUEUE_MESSAGE: { VCHIQ_DEQUEUE_MESSAGE_T args; USER_SERVICE_T *user_service; VCHIQ_HEADER_T *header; DEBUG_TRACE(DEQUEUE_MESSAGE_LINE); +_CF32_FORK( + VCHIQ_DEQUEUE_MESSAGE32_T args32; + memcpy(&args32, (const void*)arg, sizeof(args32)); + args.handle = args32.handle; + args.blocking = args32.blocking; + args.bufsize = args32.bufsize; + args.buf = (void *)(uintptr_t)args32.buf; +, memcpy(&args, (const void*)arg, sizeof(args)); +) service = find_service_for_instance(instance, args.handle); if (!service) { ret = -EINVAL; @@ -1023,8 +1208,19 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, header->data, header->size) == 0)) { args.bufsize = header->size; +_CF32_FORK( + VCHIQ_DEQUEUE_MESSAGE32_T args32; + args32.handle = args.handle; + args32.blocking = args.blocking; + args32.bufsize = args.bufsize; + args32.buf = (uintptr_t)(void *)args.buf; + + memcpy((void *)arg, &args32, + sizeof(args32)); +, memcpy((void *)arg, &args, sizeof(args)); +) vchiq_release_message( service->handle, header); @@ -1040,6 +1236,7 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, } DEBUG_TRACE(DEQUEUE_MESSAGE_LINE); } break; +#undef _CF32_CASE case VCHIQ_IOC_GET_CLIENT_ID: { VCHIQ_SERVICE_HANDLE_T handle; @@ -1049,11 +1246,24 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, ret = vchiq_get_client_id(handle); } break; +#ifdef COMPAT_FREEBSD32 +#define _CF32_CASE \ + case VCHIQ_IOC_GET_CONFIG32: + _CF32_CASE +#endif case VCHIQ_IOC_GET_CONFIG: { VCHIQ_GET_CONFIG_T args; VCHIQ_CONFIG_T config; - +_CF32_FORK( + VCHIQ_GET_CONFIG32_T args32; + + memcpy(&args32, (const void*)arg, sizeof(args32)); + args.config_size = args32.config_size; + args.pconfig = (VCHIQ_CONFIG_T *) + (uintptr_t)args32.pconfig; +, memcpy(&args, (const void*)arg, sizeof(args)); +) if (args.config_size > sizeof(config)) { ret = -EINVAL; break; @@ -1067,6 +1277,7 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, } } } break; +#undef _CF32_CASE case VCHIQ_IOC_SET_SERVICE_OPTION: { VCHIQ_SET_SERVICE_OPTION_T args; @@ -1083,15 +1294,28 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, args.handle, args.option, args.value); } break; +#ifdef COMPAT_FREEBSD32 +#define _CF32_CASE \ + case VCHIQ_IOC_DUMP_PHYS_MEM32: + _CF32_CASE +#endif case VCHIQ_IOC_DUMP_PHYS_MEM: { VCHIQ_DUMP_MEM_T args; +_CF32_FORK( + VCHIQ_DUMP_MEM32_T args32; + memcpy(&args32, (const void*)arg, sizeof(args32)); + args.virt_addr = (void *)(uintptr_t)args32.virt_addr; + args.num_bytes = (size_t)args32.num_bytes; +, memcpy(&args, (const void*)arg, sizeof(args)); +) printf("IMPLEMENT ME: %s:%d\n", __FILE__, __LINE__); #if 0 dump_phys_mem(args.virt_addr, args.num_bytes); #endif } break; +#undef _CF32_CASE case VCHIQ_IOC_LIB_VERSION: { size_t lib_version = (size_t)arg; @@ -1120,6 +1344,7 @@ vchiq_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, ret = -ENOTTY; break; } +#undef _CF32_FORK if (service) unlock_service(service); diff --git a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_ioctl.h b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_ioctl.h index 617479eff136..90348ca4b0d0 100644 --- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_ioctl.h +++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_ioctl.h @@ -127,4 +127,125 @@ typedef struct { #define VCHIQ_IOC_CLOSE_DELIVERED _IO(VCHIQ_IOC_MAGIC, 17) #define VCHIQ_IOC_MAX 17 + +/* + * COMPAT_FREEBSD32 + */ + +typedef struct { + unsigned int config_size; + /*VCHIQ_CONFIG_T * */ uint32_t pconfig; +} VCHIQ_GET_CONFIG32_T; + +typedef struct { + unsigned int handle; + /*void * */ uint32_t data; + unsigned int size; + /*void * */ uint32_t userdata; + VCHIQ_BULK_MODE_T mode; +} VCHIQ_QUEUE_BULK_TRANSFER32_T; + +typedef struct { + unsigned int handle; + unsigned int count; + const /*VCHIQ_ELEMENT_T * */ uint32_t elements; +} VCHIQ_QUEUE_MESSAGE32_T; + +typedef struct { + unsigned int handle; + int blocking; + unsigned int bufsize; + /*void * */ uint32_t buf; +} VCHIQ_DEQUEUE_MESSAGE32_T; + +typedef struct { + /*void * */ uint32_t virt_addr; + /*size_t*/ uint32_t num_bytes; +} VCHIQ_DUMP_MEM32_T; + +typedef struct { + VCHIQ_REASON_T reason; + /* VCHIQ_HEADER_T * */ uint32_t header; + /* void * */ uint32_t service_userdata; + /* void * */ uint32_t bulk_userdata; +} VCHIQ_COMPLETION_DATA32_T; + +typedef struct { + unsigned int count; + /* VCHIQ_COMPLETION_DATA32_T * */ uint32_t buf; + unsigned int msgbufsize; + unsigned int msgbufcount; /* IN/OUT */ + /* void ** */ uint32_t msgbufs; +} VCHIQ_AWAIT_COMPLETION32_T; + +typedef struct vchiq_service_params32_struct { + int fourcc; + /* VCHIQ_CALLBACK_T */ uint32_t callback; + /*void * */ uint32_t userdata; + short version; /* Increment for non-trivial changes */ + short version_min; /* Update for incompatible changes */ +} VCHIQ_SERVICE_PARAMS32_T; + +typedef struct { + VCHIQ_SERVICE_PARAMS32_T params; + int is_open; + int is_vchi; + unsigned int handle; /* OUT */ +} VCHIQ_CREATE_SERVICE32_T; + +typedef struct { + const /*void */ uint32_t data; + unsigned int size; +} VCHIQ_ELEMENT32_T; + + +#define VCHIQ_IOC_GET_CONFIG32 \ + _IOC_NEWTYPE( \ + VCHIQ_IOC_GET_CONFIG, \ + VCHIQ_GET_CONFIG32_T \ + ) + +#define VCHIQ_IOC_QUEUE_BULK_TRANSMIT32 \ + _IOC_NEWTYPE( \ + VCHIQ_IOC_QUEUE_BULK_TRANSMIT, \ + VCHIQ_QUEUE_BULK_TRANSFER32_T \ + ) + +#define VCHIQ_IOC_QUEUE_BULK_RECEIVE32 \ + _IOC_NEWTYPE( \ + VCHIQ_IOC_QUEUE_BULK_RECEIVE, \ + VCHIQ_QUEUE_BULK_TRANSFER32_T \ + ) + +#define VCHIQ_IOC_QUEUE_MESSAGE32 \ + _IOC_NEWTYPE( \ + VCHIQ_IOC_QUEUE_MESSAGE, \ + VCHIQ_QUEUE_MESSAGE32_T \ + ) + +#define VCHIQ_IOC_DEQUEUE_MESSAGE32 \ + _IOC_NEWTYPE( \ + VCHIQ_IOC_DEQUEUE_MESSAGE, \ + VCHIQ_DEQUEUE_MESSAGE32_T \ + ) + +#define VCHIQ_IOC_DUMP_PHYS_MEM32 \ + _IOC_NEWTYPE( \ + VCHIQ_IOC_DUMP_PHYS_MEM, \ + VCHIQ_DUMP_MEM32_T \ + ) + +#define VCHIQ_IOC_AWAIT_COMPLETION32 \ + _IOC_NEWTYPE( \ + VCHIQ_IOC_AWAIT_COMPLETION, \ + VCHIQ_AWAIT_COMPLETION32_T \ + ) + +#define VCHIQ_IOC_CREATE_SERVICE32 \ + _IOC_NEWTYPE( \ + VCHIQ_IOC_CREATE_SERVICE, \ + VCHIQ_CREATE_SERVICE32_T \ + ) + + #endif From nobody Sat Nov 15 04:18:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7gkb3bS5z6H2C1 for ; Sat, 15 Nov 2025 04:19:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (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 4d7gkZ5lSWz4FZr for ; Sat, 15 Nov 2025 04:19:18 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-b7277324054so356094166b.0 for ; Fri, 14 Nov 2025 20:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763180351; x=1763785151; 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=aUT5bXXLm4N92s+CfDVErEhIJ/cJx6NkmRn+d5ynf7I=; b=WlWy60dzCpfG796VDwpkv7zrjvGjs6tZ3ZWVdEOMyokNzc+dMnC9jDJGhmtVGDB4VI D5AyiC26G+9E2NuIT0n760kdMBpQEFU230eyKLuYu0jM3GxTvm3ALHMKfs8aUc/spoOT sDq5P7YcyOVpHco+VbpZzZXyv6ic/gzflpxfubepinkiJC++LFLj2yLnTt/UqFK+XUJD FeLjP7fYZGyNKIJJoPQHdntT1RoH/X1tAwAlCUDzEN7/210lsNpwoo7MwaN6fUWN3rde 3LD5eyivYjN4jscJjVkn++7+CMUwlu+234m+XW31okmfpzLBsxJT0zflp4xijjaRsCPz nX+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763180351; x=1763785151; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=aUT5bXXLm4N92s+CfDVErEhIJ/cJx6NkmRn+d5ynf7I=; b=Ua0N/ZUpygaF3+eqjf/+oij8O8nT8Fl67KVKZn8hbuXS87gOePgGsuH6e5stBjoYdT N31Ji7w6zA5FqA7MN1HZQMOqbJSO1Vb8WpHt5ppfbtUhfXR/yYjjT8TmrWZb5RO4Hfu8 MpNvpKjpELjmM9wuZdhSZ6yi7bUDUB1YiWS5FzdRrihT5/XxBE6GTw+HvXqg3vJ3/L0z tMJbcB0uoYXN+PeaZsbHvdNSdQFe0KJmbM6kfaQS8ZiP1+qXjhI1cHjlZgwVwzYc/J36 /YZ3gB31uhQCxqzFAmHBKYJndBY3BaqwTd5ySbjjHQyjH9+Cd8z67CaG0NG1Cw+6czsL mPQg== X-Forwarded-Encrypted: i=1; AJvYcCW7NbzDSVSsF1PDzbpboXptqurvVIZnyY4Js4jP59N5nLSUwEVmrwf7g0qoLeJk6nyJ+qYwNqcgkE7KcipDB8/x11nqNA==@freebsd.org X-Gm-Message-State: AOJu0Yy3wSyRqjoRtCvLloYbAL8wmNPtebx5g7UeWOTxdN7qldlnql22 VJyFpLItD+CrZidYpPzSwyFYnUmuQRE2h9iu19ox3Vq4OsNms3wAjhlqXkXh8Uoi8mFXb8gvELS 6InSX63BdbOmvBZNKaHef8X4y2SbuR8A= X-Gm-Gg: ASbGncvML1PWnNYg30zOwdU3Tg0J/9tys2mPMkI7jSndeuVxJVMTJ0ntmZ0mgEDk7Sy ww3EJKWlGJ2uj3YObC9iD4Q7uls6LZBiCrtAgalX7DOeD3umlAHAtG9hYk8nOKxBkmvEa6PvqqB RtKxFBgI+jNo+MoFI9PYVieHwtzoN/JVM0G3rw1Iu+Um6O6o8oS8yIn92Rb5Uut1NNIrH3tP2Tw Tqm69MhUEa3VI+j0Kn16z0tDvgHMBCrapkm958gbV2oJ1OQC31cOyvi7yA03xR7wJWMwrnuI0wq raqqjjQqxh4SK/4XXo3QdjonDw== X-Google-Smtp-Source: AGHT+IHm9rPNSP1UkIo/fjsnYfqraol0Q4KK8hTpR6tsP7q/iFBUQTA9v0/PfrTLfjQoO5Dv9rJIoOK91hkN3TtlebA= X-Received: by 2002:a17:907:86a2:b0:b73:56a7:a36e with SMTP id a640c23a62f3a-b7367949692mr542688866b.50.1763180350360; Fri, 14 Nov 2025 20:19:10 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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: <202511111459.5ABEx8Co056214@gitrepo.freebsd.org> <854dff8a-555a-4921-ae64-4c445c7a03f7@FreeBSD.org> In-Reply-To: <854dff8a-555a-4921-ae64-4c445c7a03f7@FreeBSD.org> From: Mateusz Guzik Date: Sat, 15 Nov 2025 05:18:57 +0100 X-Gm-Features: AWmQ_bl_ecqp3ezWnrMSoiEgDDPsdHU-iF5yAg0MJ_LUgev4cFkxS8G84oRiVHA Message-ID: Subject: Re: git: 99cb3dca4773 - main - vnode: Rework vput() to avoid holding the vnode lock after decrementing To: John Baldwin Cc: Mark Johnston , 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-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4d7gkZ5lSWz4FZr On Sat, Nov 15, 2025 at 3:12=E2=80=AFAM John Baldwin wrot= e: > > On 11/11/25 09:59, Mark Johnston wrote: > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D99cb3dca4773fe4a16c500f9= cb55fcd62cd8d7f3 > > > > commit 99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3 > > Author: Mark Johnston > > AuthorDate: 2025-11-11 14:47:06 +0000 > > Commit: Mark Johnston > > CommitDate: 2025-11-11 14:58:59 +0000 > > > > vnode: Rework vput() to avoid holding the vnode lock after decreme= nting > > > > It is not safe to modify the vnode structure after releasing one's > > reference. Modify vput() to avoid this. Use refcount_release_if_= last() > > to opportunistically call vput_final() with the vnode lock held si= nce we > > need the vnode lock in order to deactivate the vnode, and it's sil= ly to > > drop the vnode lock and immediately reacquire it in this common ca= se. > > > > Note that vunref() has a similar flaw. D52628 aims to fix the pro= blem > > more holistically, but this change fixes observable panics in the > > meantime. > > > > Reported by: syzbot+6676b3ff282d590b0fb3@syzkaller.appspotmail.= com > > Reported by: syzbot+38e26cf6f959e886f110@syzkaller.appspotmail.= com > > Reviewed by: kib > > MFC after: 3 days > > Differential Revision: https://reviews.freebsd.org/D52608 > > --- > > sys/kern/vfs_subr.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c > > index 58975f7ac932..9cf983f6f89d 100644 > > --- a/sys/kern/vfs_subr.c > > +++ b/sys/kern/vfs_subr.c > > @@ -3713,11 +3713,12 @@ vput(struct vnode *vp) > > > > ASSERT_VOP_LOCKED(vp, __func__); > > ASSERT_VI_UNLOCKED(vp, __func__); > > - if (!refcount_release(&vp->v_usecount)) { > > - VOP_UNLOCK(vp); > > + if (refcount_release_if_last(&vp->v_usecount)) { > > + vput_final(vp, VPUT); > > return; > > } > > - vput_final(vp, VPUT); > > + VOP_UNLOCK(vp); > > + vrele(vp); > > } > > This commit results in reliable hangs for me when I do a 'make -j 16 buil= dkernel' > in a VM where the source directory is mounted over NFS. Even if there is= nothing > to build so the make is just traversing all the directories. The hung pr= ocess is > stuck on a vnode lock. > > Some of the stacks from procstat: > > PID TID COMM TDNAME KSTACK > 1858 100343 make - mi_switch+0x172 sle= epq_switch+0x109 sleeplk+0x110 lockmgr_slock_hard+0x3c3 VOP_LOCK1_APV+0x32 = nfs_lock+0x2c vop_sigdefer+0x30 VOP_LOCK1_APV+0x32 _vn_lock+0x53 vget_finis= h+0xaf cache_lookup+0x2be nfs_lookup+0x4e1 vop_sigdefer+0x30 VOP_LOOKUP_APV= +0x57 vfs_lookup+0x5aa namei+0x35d vn_open_cred+0x592 openatfp+0x2b7 > root@head:~ # procstat -kk 1860 > 1860 100360 make - mi_switch+0x172 sle= epq_switch+0x109 sleeplk+0x110 lockmgr_slock_hard+0x3c3 VOP_LOCK1_APV+0x32 = nfs_lock+0x2c vop_sigdefer+0x30 VOP_LOCK1_APV+0x32 _vn_lock+0x53 vget_finis= h+0xaf cache_lookup+0x2be nfs_lookup+0x4e1 vop_sigdefer+0x30 VOP_LOOKUP_APV= +0x57 vfs_lookup+0x5aa namei+0x35d vn_open_cred+0x592 openatfp+0x2b7 > root@head:~ # procstat -kk 1855 > 1855 100314 make - mi_switch+0x172 sle= epq_switch+0x109 sleeplk+0x110 lockmgr_xlock_hard+0x3d0 VOP_LOCK1_APV+0x32 = nfs_lock+0x2c vop_sigdefer+0x30 VOP_LOCK1_APV+0x32 _vn_lock+0x53 vput_final= +0x269 vput+0xab vfs_lookup+0xa7a namei+0x35d vn_open_cred+0x592 openatfp+0= x2b7 sys_open+0x28 amd64_syscall+0x169 fast_syscall_common+0xf8 > > This last one is kind of interesting as it calls vput_final? > > (kgdb) p vp > $2 =3D (struct vnode *) 0xfffff8016bb6c898 > (kgdb) p vp->v_lock > $3 =3D {lock_object =3D {lo_name =3D 0xffffffff81467118 "= nfs", > lo_flags =3D 117112832, lo_data =3D 0, lo_witness =3D 0xfffff8043fd8= 3900}, > lk_lock =3D 39, lk_exslpfail =3D 0, lk_pri =3D 44, lk_timo =3D 6} > (kgdb) p/x vp->v_lock->lk_lock > $4 =3D 0x27 > > So there is one shared lock, and both shared and exclusive waiters. Seem= s like > a vnode lock has been leaked? Or rather, the vput_final() in this case i= s > called from vrele(), so the vput() for 1855 has hit the new path. I wond= er if > when it dropped its lock via VOP_UNLOCK() it is no longer eligible to re-= lock > it as it needs some other sharer to also unlock before it can re-acquire = the > lock in vput_final? LK_UPGRADE attempts don't block if there are shared = waiters > but only one 1 shared lock held, but if you do LK_UNLOCK and then LK_XLOC= K that > will indeed honor the other waiters and not acquire the lock, so a vput t= hat > held the last shared lock would have "worked" to ugprade before even with > other waiters, but now it can drop the lock and then get stuck. I guess = the > question though in this case is that some other thread must have snuck in > and acquired a shared lock between the VOP_UNLOCK and the vrele() and is > blocked while holding it. > > Aha, so most of the other makes are stuck in VOP_LOOKUP on this same vnod= e > (which I believe is "/usr/src/sys/dev" as in 1855 the vput() is inside of > namei() and this is the state of ndp: > > (kgdb) p *ndp > $9 =3D { > ni_dirp =3D 0x481afdaa2d7d , ni_segflg =3D UIO_USERSPACE, ni_rightsneeded =3D 0xfffffe00d8= 3d2d90, > ni_startdir =3D 0x0, ni_rootdir =3D 0xfffff80005e461b8, ni_topdir =3D = 0x0, > ni_dirfd =3D -100, ni_lcf =3D 0, ni_filecaps =3D {fc_rights =3D {cr_ri= ghts =3D {0, > 0}}, fc_ioctls =3D 0x0, fc_nioctls =3D -1, fc_fcntls =3D 0}, > ni_vp =3D 0xfffff801bc007000, ni_dvp =3D 0xfffff8016bb6c898, ni_resfla= gs =3D 1, > ni_debugflags =3D 3, ni_loopcnt =3D 0, ni_pathlen =3D 1, > ni_next =3D 0xfffff8000a0b0817 "", ni_cnd =3D {cn_flags =3D 8936259908= , > cn_cred =3D 0xfffff80005e53c00, cn_nameiop =3D LOOKUP, cn_lkflags = =3D 524288, > cn_pnbuf =3D 0xfffff8000a0b0800 "/usr/src/sys/dev/acpica", > cn_nameptr =3D 0xfffff8000a0b0811 "acpica", cn_namelen =3D 6}, > ni_cap_tracker =3D {tqh_first =3D 0x0, tqh_last =3D 0xfffffe00d83d2d48= }, > ni_rbeneath_dpp =3D 0x0, ni_nctrack_mnt =3D 0x0, ni_dvp_seqc =3D 0, ni= _vp_seqc =3D 0} > > But pid 1844 is a make blocked on another vnode: > > (kgdb) p vp > $24 =3D (struct vnode *) 0xfffff801bc007000 > > And that one appears to be the "acpica" child directory: > > (kgdb) p *vp->v_cache_dst.tqh_first > $27 =3D {nc_src =3D {le_next =3D 0xfffff801bc01b9b8, le_prev =3D 0xfffff8= 01bc01b898}, > nc_dst =3D {tqe_next =3D 0x0, tqe_prev =3D 0xfffff801bc007058}, nc_has= h =3D { > csle_next =3D 0x0}, nc_dvp =3D 0xfffff8016bb6c898, n_un =3D { > nu_vp =3D 0xfffff801bc007000, nu_neg =3D {neg_flag =3D 0 '\000', > neg_hit =3D 112 'p'}}, nc_flag =3D 12 '\f', nc_nlen =3D 6 '\006', > nc_name =3D 0xfffff801bc01b962 "acpica"} > > And note it's nc_dvp is the vnode 1855 is trying to vput and all the othe= r > makes are trying to VOP_LOCK in nfs_lookup(). > > So my guess is that 1844 was able to VOP_LOCK() "/usr/src/sys/dev" in the > window between VOP_UNLOCK() and the vput_final() invoked from vrele(). > > Humm, except that the vnode in question shouldn't be in vput_final at all= ?? > > Back to 1855 (proc doing vput_final): > > (kgdb) > #12 0xffffffff80c9bc89 in vput_final (vp=3D0xfffff8016bb6c898, > func=3Dfunc@entry=3DVRELE) at /usr/src/sys/kern/vfs_subr.c:3628 > 3628 error =3D vn_lock(vp, LK_EXCLUSIVE | LK_I= NTERLOCK); > (kgdb) p vp > $6 =3D (struct vnode *) 0xfffff8016bb6c898 > (kgdb) p vp->v_usecount > $7 =3D 14 > (kgdb) p vp->v_holdcnt > $8 =3D 7 > > Or did the other make's manage to acquire new use counts while 1855 was b= locked > on the lock in vput_final? > > Anyway, it seems 14 make's are blocked on this vnode (/usr/src/sys/dev). = 1844 > is blocked on the "acpica" vnode, and another make process (1856) is bloc= ked on > "acpica", but via getdirentries() instead of namei(): > > #4 0xffffffff80b62ec0 in sleeplk (lk=3Dlk@entry=3D0xfffff801bc007070, > flags=3Dflags@entry=3D2098176, ilk=3Dilk@entry=3D0xfffff801bc007098, > wmesg=3Dwmesg@entry=3D0xffffffff81467118 "nfs", > pri=3D, pri@entry=3D44, timo=3Dtimo@entry=3D6, queue= =3D1) > at /usr/src/sys/kern/kern_lock.c:302 > #5 0xffffffff80b60fc3 in lockmgr_slock_hard (lk=3D0xfffff801bc007070, > flags=3D2098176, ilk=3D0xfffff801bc007098, file=3D, l= ine=3D4333, > lwa=3D0x0) at /usr/src/sys/kern/kern_lock.c:693 > #6 0xffffffff811b97a2 in VOP_LOCK1_APV ( > vop=3D0xffffffff81aeeb38 , a=3Da@entry=3D0xfffffe0= 0d8445c88) > at vnode_if.c:2103 > #7 0xffffffff80a6050c in nfs_lock (ap=3Dap@entry=3D0xfffffe00d8445c88) > at /usr/src/sys/fs/nfsclient/nfs_clvnops.c:344 > #8 0xffffffff80c83d90 in vop_sigdefer (vop=3D, > a=3D0xfffffe00d8445c88) at /usr/src/sys/kern/vfs_default.c:1502 > #9 0xffffffff811b97a2 in VOP_LOCK1_APV ( > vop=3D0xffffffff81aada28 , a=3Da@entry=3D0xfffffe00= d8445c88) > at vnode_if.c:2103 > #10 0xffffffff80cb6b43 in VOP_LOCK1 (vp=3D0xfffff801bc007000, flags=3D209= 8176, > file=3D0xffffffff81359deb "/usr/src/sys/kern/vfs_syscalls.c", line= =3D4333) > at ./vnode_if.h:1316 > #11 _vn_lock (vp=3Dvp@entry=3D0xfffff801bc007000, flags=3Dflags@entry=3D2= 098176, > file=3D, line=3D, line@entry=3D4333) > at /usr/src/sys/kern/vfs_vnops.c:1970 > #12 0xffffffff80cb2d94 in kern_getdirentries (td=3D0xfffff80006cb5000, > fd=3D, > buf=3D0x2088dba27000 , count=3D4096, basep=3Dbasep@entry=3D0xfffffe00d8445df0, residp=3D= residp@entry=3D0x0, > bufseg=3DUIO_USERSPACE) at /usr/src/sys/kern/vfs_syscalls.c:4333 > #13 0xffffffff80cb32a9 in sys_getdirentries (td=3D, > uap=3D0xfffff80006cb5428) at /usr/src/sys/kern/vfs_syscalls.c:4287 > > The "acpica" lock is held by a writer at least: > > (kgdb) p vp > $9 =3D (struct vnode *) 0xfffff801bc007000 > (kgdb) p vp->v_lock > $10 =3D {lock_object =3D {lo_name =3D 0xffffffff81467118 = "nfs", > lo_flags =3D 117112832, lo_data =3D 0, lo_witness =3D 0xfffff8043fd8= 3900}, > lk_lock =3D 18446735277917198210, lk_exslpfail =3D 0, lk_pri =3D 44, l= k_timo =3D 6} > (kgdb) p/x vp->v_lock.lk_lock > $14 =3D 0xfffff80011ebd782 > (kgdb) set $td =3D (struct thread *)0xfffff80011ebd780 > (kgdb) p $td->td_tid > $15 =3D 100314 > (kgdb) p $td->td_proc->p_comm > $16 =3D "make", '\000' > (kgdb) p $td->td_proc->p_pid > $17 =3D 1855 > > Oh dear, so that's the deadlock. > > 1855 needs to get an exclusive lock on "/usr/src/sys/dev/" to finish its = vput() > _while_ it holds an exclusive lock on "/usr/src/sys/dev/acpica". And the= other > shared lock on "/usr/src/sys/dev" is held by 1844 who is blocked trying t= o share > lock "/usr/src/sys/dev/acpica" during lookup(). > > So by doing the VOP_UNLOCK() and then reacquiring the lock via vrele(), y= ou've > introduced a vnode LOR as the vput() of the parent directory can now try = to > re-lock the vnode of the parent directory while we hold a vnode on the > child vnode. > This should be easy to fix though. While the routine must not vrele, the VPUT should be patched to trylock (aka LK_NOWAIT) and EAGAIN if that fails, which in turn will punt the vnode to a workqueue. However, one has to wonder if failing to lock here will be frequent enough to constitute a problem. There is a counter for these (deferred_inactive). The following was only boot-tested: diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 58975f7ac932..5cde78162e6a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3640,11 +3640,8 @@ vput_final(struct vnode *vp, enum vput_op func) break; case VPUT: want_unlock =3D true; - if (VOP_ISLOCKED(vp) !=3D LK_EXCLUSIVE) { - error =3D VOP_LOCK(vp, LK_UPGRADE | LK_INTERLOCK | - LK_NOWAIT); - VI_LOCK(vp); - } + error =3D VOP_LOCK(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_NOW= AIT); + VI_LOCK(vp); break; case VUNREF: if (VOP_ISLOCKED(vp) !=3D LK_EXCLUSIVE) { @@ -3672,12 +3669,9 @@ vput_final(struct vnode *vp, enum vput_op func) } if (func =3D=3D VUNREF) vp->v_vflag &=3D ~VV_UNREF; - vdropl(vp); - return; out: - if (func =3D=3D VPUT) - VOP_UNLOCK(vp); vdropl(vp); + return; } /* @@ -3713,8 +3707,8 @@ vput(struct vnode *vp) ASSERT_VOP_LOCKED(vp, __func__); ASSERT_VI_UNLOCKED(vp, __func__); + VOP_UNLOCK(vp); if (!refcount_release(&vp->v_usecount)) { - VOP_UNLOCK(vp); return; } vput_final(vp, VPUT); From nobody Sat Nov 15 07:58:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7mbz0kJyz6HKj9; Sat, 15 Nov 2025 07:58:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7mby74Rjz3NhR; Sat, 15 Nov 2025 07:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763193535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80MDG6yGAvzb022PrjKYfECo4NLKd97Jg3O5CEH5K9k=; b=lBMNo6b2cwyfEVAGHTGZQObyn4nahwBnpR063TgXWV+4jgS4JGDTo8UDwrYskokh3IAyCd zPJlNzba9RBs7bR/TdAmU3ftSl6e+AlZ564pcL0s3Qt/8syufgabbbx5wvQ5XyNMvCeD9t 6J1LbL4ZLVgGPmoxF1uVdPYuQNpQ8Z/rDB7+vw4ndomUKEY8kzOgFnElDGA++FFg6nVeYU GBbLNcBUCMf8slZ1XrCNGMn+xf60H7/RTaNMf9GGOyCw9dTpAvHLmAb1/Rjx2/qGepHIwc vC9hWJSMnd3tFIysueOcirwhVYQeQ9+n02eCH13b31N/FvMrMCKeeuPYca96nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763193535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80MDG6yGAvzb022PrjKYfECo4NLKd97Jg3O5CEH5K9k=; b=wv/ps03P/8XeKkIzyNPeRUO3m8vrVQF1NWCuYkAV8sL7hVn2QWhQCODOJL+1SCtSJxDRX6 Ilq49gnhn8nudez4Ixib/SceTSB0n+gdTKeE0Q18kpTY/JUURPTnBGh2oTsUPqTU4LTUSb AIzpPQYxdkFpqTC/srO+rVXnE3W/lJ637z9WG1P3+3VpoJDX+wXzkQAn/zcvnJ/QkGwwew uiQLmCqJwylwS1l2iIQ0JKCm8i2rbrKBtDryR5Og3Nr46TPMreozWN3mxKxDKuyyna7Tgq Ump6GSHi3UVzIRWu9/byUm3df1eM7F4540qTFB87HQAVFXOjHhcUuzTYdGmfVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763193535; a=rsa-sha256; cv=none; b=ESkv6QYWNBEVFdKasbdKB8RtZpm7/XRjzS9pvQOCQi/kMPdo/CBHrhYGmZyh1SO/VepB+B 9ON4kRI6ldGtwcYUDAhU1Y7+AfTQ61q9nyUo0J9lWyTfq/OokCABbDakTsRYwMHyELiqWi tXIKf/YliWBaEB/VysSmTNTFytzoAGHhkpp6aFeP9fcKEaY0PmIf5O1JOOavycnCjIzLUN yaEjN9OB3AXgLAKs5d/8fX0VgqPzaAEKeEldyL/4cYXjRkkcPjl0In9KdGwdbJfm6GgIZ2 HFs3crhLkT7unCuLSV7q/Nr+0Ntl0qNLij5IlQJbYS+eBE9zO0cRkLm2srxfkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7mby6dfpzjyV; Sat, 15 Nov 2025 07:58: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 5AF7wsfc013393; Sat, 15 Nov 2025 07:58:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF7wsnN013390; Sat, 15 Nov 2025 07:58:54 GMT (envelope-from git) Date: Sat, 15 Nov 2025 07:58:54 GMT Message-Id: <202511150758.5AF7wsnN013390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 6b0909f94099 - main - bsdinstall: Copy in all keys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b0909f94099f92992fbd58eee7ce0f9289cb05e Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=6b0909f94099f92992fbd58eee7ce0f9289cb05e commit 6b0909f94099f92992fbd58eee7ce0f9289cb05e Author: Colin Percival AuthorDate: 2025-11-14 05:28:23 +0000 Commit: Colin Percival CommitDate: 2025-11-15 07:58:40 +0000 bsdinstall: Copy in all keys The keys used for pkgbase signing are going to be placed in /usr/share/keys/pkgbase-N where N is the FreeBSD major version number; as such it's not sufficient to copy /usr/share/keys/pkg into the install chroot, but instead we need /usr/share/keys/*. With hat: re MFC after: 8 hours (needed in 15.0-RC1) Differential Revision: https://reviews.freebsd.org/D53753 --- usr.sbin/bsdinstall/scripts/pkgbase.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in index 5299d34fcb71..744e0daac6f8 100755 --- a/usr.sbin/bsdinstall/scripts/pkgbase.in +++ b/usr.sbin/bsdinstall/scripts/pkgbase.in @@ -337,7 +337,7 @@ local function pkgbase() -- Since pkg always interprets fingerprints paths as relative to -- the --rootdir we must copy the key from the host. assert(os.execute("mkdir -p " .. chroot .. "/usr/share/keys")) - assert(os.execute("cp -R /usr/share/keys/pkg " .. chroot .. "/usr/share/keys/")) + assert(os.execute("cp -R /usr/share/keys/* " .. chroot .. "/usr/share/keys/")) end -- We must use --repo-conf-dir rather than -o REPOS_DIR here as the latter From nobody Sat Nov 15 07:58:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7mc01wkHz6HKlf; Sat, 15 Nov 2025 07:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7mc00rV6z3Nmd; Sat, 15 Nov 2025 07:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763193536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gf8p5LF9nBq99j0y3L2QoMr4R5CHRmV/8nscWeabZ4o=; b=G0SzoTxUz1RfKsa54U7XMJydp1UOKxT1zqeKNQQlmqW0Zy/ePhbwK8BPaQDw0pB51OWLd3 fLunLMQ8ZDs5VWaqmFXj7/jfWWpUpxhlbATvmQ7Wr1UfZgbMo7+G/kpYWsjdEKbYJQ3PKT mYh85YNk59lHfiZwGZEwpiMc66NO7btlcV1TF3T/Fk4YdsnVt3Dcsbeg18Nzfms39jN8zF 19Jzoa1weWS4O3yKmWRBhBvHcJ+GoZvbSvK292IkE6t8Buj+QmHzuYn4JQZmUlvvW1GGam IKCXMfH+udN9IGtPaVeXhrDxDyUX6jeBZP32tr7fHxnnpzgjEAD5LWFarTBrVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763193536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gf8p5LF9nBq99j0y3L2QoMr4R5CHRmV/8nscWeabZ4o=; b=wQfe4PEgIj/HmFsCR9njzYbc03uRuyOd3gmJ5pA68BcwaBuPNesiZf+MA1DnItpNnjgOmC 6SVGW5GCtZLtHo+RXd4jecIMACpfUVbtot0KHNFmUWw6lk8TPTtoiZ38FLTI0mbmAKjaaF 02RaIiCW6J9gavOSdhQvagD0gJCqP9Jqn0XRHNmdhpDzum66VnxILp2N3KZVU6AxyjAS0O lNrGyPnoTxdtGVAZ9DllKlffIVcKazQ7/ElAF9WRsAw+3bs1FJI0Gzry/DoNkmO9wZ5mWW b4W6z5PL9JtssDwpUeeOho7RoO3y6AlHAqmueMG32x3PdA9x7vV3xSIxkos8pA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763193536; a=rsa-sha256; cv=none; b=w91kpHcaziENwOGT6e/e05g+qa0N1oIGdvKJtK0QghQzlozHtYuJBgm5776yGwWrsDGl/s Kse70vMNiQgRu63QzozTW9RC++R2MDqk7kZkz3qieXRM2LFCmfTjEo2ReFW0tIUyMBcDK/ W8dU2P691iBQv96D03pLgUiNJBWdqlFm6Rc7v0RfttQ9ZhXRCE5gIDyE2gJKCFVeVtXl02 iRehNT28/mFHnEhGxn+3oGpaOZWNPski6gncZcdwbdnpnMbWkyF96Z5jaW0pcq0PFYKC9+ rHT1ofm4CdZXxSQsJ5tD4tKMsLWDF6v4ROlkNgmhBkDYNXSyLQVUhJQFo0ZYOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7mc00RnqzkfC; Sat, 15 Nov 2025 07:58: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 5AF7wtPO013431; Sat, 15 Nov 2025 07:58:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF7wtMS013428; Sat, 15 Nov 2025 07:58:55 GMT (envelope-from git) Date: Sat, 15 Nov 2025 07:58:55 GMT Message-Id: <202511150758.5AF7wtMS013428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: b05f38262b58 - main - Add pkgbase signing keys for FreeBSD 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b05f38262b58c1e82ad5f076f2b0b9fe08ddc98b Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b05f38262b58c1e82ad5f076f2b0b9fe08ddc98b commit b05f38262b58c1e82ad5f076f2b0b9fe08ddc98b Author: Colin Percival AuthorDate: 2025-11-15 00:54:17 +0000 Commit: Colin Percival CommitDate: 2025-11-15 07:58:41 +0000 Add pkgbase signing keys for FreeBSD 15 These keys were generated by cperciva@ using the AWS Key Management Service. They will not be used for signing anything other than FreeBSD 15.x pkgbase repositories. Keys will be generated for FreeBSD 16 at a later date, and likely in a different way. With hat: re MFC after: 8 hours (needed in 15.0-RC1) Differential Revision: https://reviews.freebsd.org/D53768 --- etc/mtree/BSD.usr.dist | 6 ++++++ share/keys/Makefile | 2 +- share/keys/pkgbase-15/Makefile | 3 +++ share/keys/pkgbase-15/trusted/Makefile | 8 ++++++++ share/keys/pkgbase-15/trusted/awskms-15 | 2 ++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 79db101e74d9..9cb8e57650c6 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -478,6 +478,12 @@ trusted tags=package=runtime .. .. + pkgbase-15 + revoked tags=package=runtime + .. + trusted tags=package=runtime + .. + .. .. kyua tags=package=tests misc tags=package=tests diff --git a/share/keys/Makefile b/share/keys/Makefile index f4bab152d8cb..98e17356e75a 100644 --- a/share/keys/Makefile +++ b/share/keys/Makefile @@ -1,3 +1,3 @@ -SUBDIR= pkg +SUBDIR= pkg pkgbase-15 .include diff --git a/share/keys/pkgbase-15/Makefile b/share/keys/pkgbase-15/Makefile new file mode 100644 index 000000000000..665bcf389da1 --- /dev/null +++ b/share/keys/pkgbase-15/Makefile @@ -0,0 +1,3 @@ +SUBDIR= trusted + +.include diff --git a/share/keys/pkgbase-15/trusted/Makefile b/share/keys/pkgbase-15/trusted/Makefile new file mode 100644 index 000000000000..e6205999b12f --- /dev/null +++ b/share/keys/pkgbase-15/trusted/Makefile @@ -0,0 +1,8 @@ +PACKAGE= pkg-bootstrap + +FILES= awskms-15 + +FILESDIR= ${SHAREDIR}/keys/pkgbase-15/trusted +FILESMODE= 644 + +.include diff --git a/share/keys/pkgbase-15/trusted/awskms-15 b/share/keys/pkgbase-15/trusted/awskms-15 new file mode 100644 index 000000000000..e951b6f9e2d5 --- /dev/null +++ b/share/keys/pkgbase-15/trusted/awskms-15 @@ -0,0 +1,2 @@ +function: "sha256" +fingerprint: "1d7b45d20fa8d6ed26f9b4a13ac81a6b5df860b9fe644d07b87e92298ba72595" From nobody Sat Nov 15 07:58:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7mc20jssz6HKlj; Sat, 15 Nov 2025 07:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7mc120f5z3NvN; Sat, 15 Nov 2025 07:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763193537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VYDZEoiLT+2sglMdbgumbh8NFJ460/oEXXgsCJ7XXzw=; b=T+69pxNCLZG2KDLRoyFmBBSiJaPVT75y430mc+buBAb2xLHfUJzKRrYfsuFUYU7DkEMUe6 7IQbBdtU49gzkI1QyQOdoeyjwjTrC6nUXSHvILR07zpBuOQTpPOr6cuVbiLnr8ltHTZIKe w++y9li2y5leZHMZVilzVQ0jgNC4+hUIPUOdonYT2J2oBdaZn6leKiYU/HpuPPh5JvCjr0 9g2KIkvF3Zx0efBBJMV2aI+yGGeUI7srb1Kp2J10LEq3lmY16uXrroll9mbtC4tkcD0fYs KxEbH0Q3FVuVxoAXk+XZTxE+lRaF+jMDejBghLrogvCmgvqeOVnBE1KIAK5yWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763193537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VYDZEoiLT+2sglMdbgumbh8NFJ460/oEXXgsCJ7XXzw=; b=jUNs9f2TXJXq8U1z7R9o1Ry6bHtxj+mQ2TwFtQnb5H7p/739Mg+NdNX86/vdG8BVkih+eH Vs1WsR/ksZxSX8DHrhmEdVvW0N5j6FYPxuPzBRkbub0tR1aiFxBe1l17fTYMgdjAWSKS88 yv4Jj+IMEaN+OI0Ouz+B6f21ZAto3xNBLiyfihvc72A0D5heFx/k1pTVZp5K+bj5IzZMTN xSe9AVmt/Uh3yO3VKMdpZyEu7yrHLPjhisdGnxmzcK9PynxiXY5Yx4tIoDc8cWJYFl6lbt oUqmmlIPifcFBXqrkEpx2yHJwbkhkuSgJEjbcU/E4lPLvelaWpCdM9deW4goEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763193537; a=rsa-sha256; cv=none; b=Oet5Rrd2l9maGCrRouh/M2EyJp1WFlT9aBlx9SdO5UQF2BdYeIUmoK3+9oqBIqhm7vWERB Zbp5RlU+ma4dki4Qs5KrInKUs82S/igWcLcXxlg37etdhsqEBK15vftgC7sqeonh1+bhPF xiJa4OgYsuKTWoKwbMlQUnbQTyk3dYc5UUPtOXAcBEpuUfdA7KLln6NXOKTrpNUjIVH/MG EDRgjoF20LFTtYKg57xqkOypak0bxg34xZ1oPCVoMRcVlUzxJbfLc47I0h/66oQCZQwrnf 9kIWuyrg5Uhn9yT+gKPP1xtWQK/T+LFyXoEDEnNvsachbBOwFp4Swy1TAbnXIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7mc1158zzkjl; Sat, 15 Nov 2025 07:58: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 5AF7wvRJ013466; Sat, 15 Nov 2025 07:58:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF7wvGM013463; Sat, 15 Nov 2025 07:58:57 GMT (envelope-from git) Date: Sat, 15 Nov 2025 07:58:57 GMT Message-Id: <202511150758.5AF7wvGM013463@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 51184e38c932 - main - bsdinstall: Use pkgbase.f.o for BETA/RC/RELEASE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51184e38c932b7acedfc26fef3a0aad4c04f8959 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=51184e38c932b7acedfc26fef3a0aad4c04f8959 commit 51184e38c932b7acedfc26fef3a0aad4c04f8959 Author: Colin Percival AuthorDate: 2025-11-15 03:04:51 +0000 Commit: Colin Percival CommitDate: 2025-11-15 07:58:41 +0000 bsdinstall: Use pkgbase.f.o for BETA/RC/RELEASE For BETA/RC/RELEASE builds, fetch files from the appropriate repository on pkgbase.freebsd.org, using the appropriate signing keys. Note that there is a separate repository for each BETA and RC; this ensures that someone installing from e.g. a 15.0-RC1 ISO will get 15.0-RC1 bits and not whatever happens to be the most recent build from releng/15.0. With hat: re MFC after: 8 hours (needed in 15.0-RC1) --- usr.sbin/bsdinstall/FreeBSD-base.conf.in | 4 ++-- usr.sbin/bsdinstall/Makefile | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bsdinstall/FreeBSD-base.conf.in b/usr.sbin/bsdinstall/FreeBSD-base.conf.in index 792c290facdf..86ec8fabe253 100644 --- a/usr.sbin/bsdinstall/FreeBSD-base.conf.in +++ b/usr.sbin/bsdinstall/FreeBSD-base.conf.in @@ -1,7 +1,7 @@ FreeBSD-base: { - url: "pkg+https://pkg.FreeBSD.org/${ABI}/%%SUBURL%%", + url: "pkg+https://%%PKGHOST%%.FreeBSD.org/${ABI}/%%SUBURL%%", mirror_type: "srv", signature_type: "fingerprints", - fingerprints: "/usr/share/keys/pkg", + fingerprints: "/usr/share/keys/%%KEYSDIR%%", enabled: yes } diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index 5d7be97ed7cf..9a6b25fc5c7a 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -21,16 +21,26 @@ _REVISION!= ${MAKE} -C ${SRCTOP}/release -V REVISION REVISION?= ${_REVISION} .if ${BRANCH} == CURRENT || ${BRANCH} == STABLE +PKGHOST= pkg +KEYSDIR= pkg SUBURL= base_latest -.elif ${BRANCH} == RELEASE || ${BRANCH:C/[0-9]+$//} == BETA || \ - ${BRANCH:C/[0-9]+$//} == RC +.elif ${BRANCH} == RELEASE +PKGHOST= pkgbase +KEYSDIR= pkgbase-${REVISION:C/\.[0-9]+//} SUBURL= base_release_${REVISION:C/[0-9]+\.//} +.elif ${BRANCH:C/[0-9]+$//} == BETA || \ + ${BRANCH:C/[0-9]+$//} == RC +PKGHOST= pkgbase +KEYSDIR= pkgbase-${REVISION:C/\.[0-9]+//} +SUBURL= base_release_${REVISION:C/[0-9]+\.//}_${BRANCH:tl} .else .warning Invalid branch "${BRANCH}" +PKGHOST= pkg +KEYSDIR= pkg SUBURL= base_latest .endif FreeBSD-base.conf: FreeBSD-base.conf.in - sed "s|%%SUBURL%%|${SUBURL}|" < ${.ALLSRC} > ${.TARGET} + sed "s|%%PKGHOST%%|${PKGHOST}|;s|%%SUBURL%%|${SUBURL}|;s|%%KEYSDIR%%|${KEYSDIR}|" < ${.ALLSRC} > ${.TARGET} .include From nobody Sat Nov 15 07:58:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7mc25rlfz6HKcW; Sat, 15 Nov 2025 07:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7mc22jcrz3P3G; Sat, 15 Nov 2025 07:58:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763193538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4oYtg9Fo94zCstdZcS9Xj8362SOqcZx871etM8s+Bs=; b=I87IYeX7YkS6QPBnTq+46RGCzKO1zERbbwYlNbLbtpNW+BNvwnE5mqm8Rq7aMVXYLIo0NX dxcN85//jVc5SJX2wpNY878QhAXyhVtONZd2q2ew+7cMqB+dQal5mXiCpzHxLKtDfN1VDd 6mIBqI2Y7WjXcWuYS7dP5a0WuMCdgx+8sm6zR/UPx3V2pJhgCg54t7vXzfKYE/dXx6owaV sNw//ezhR6KMuwbWz/EmnOqQBpW2tv2qljI/3/XCydwKGwWH73Yy9a0QZmeipKJQO09HEk zc8qTkDNdGbAeFKjcChKpqU2GIZUrV6DqB9SAS+82uueFeCbmKX1tLeoFdOapQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763193538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4oYtg9Fo94zCstdZcS9Xj8362SOqcZx871etM8s+Bs=; b=MOSqLbZVdQRGFX8QmV3gt8yicG+rOyjutx6sQM5tkrqYx/UTl/uCCqCFuSdyLF03XNkGwx 5j2Axd+112aie31qnMVJvGYn4IwyW3LtXlGfLh8jfiWQ+JNoiI8MeF8zFB9Ah3DqDj4l4z TmgzpbESZ6+sRguz/U9r2MR9In5doaorPROMON8jswWPD3TLaJf99/tvc5BJ/xPMV9nUFr HyFn8aoFT9lqIP1aJ1iMCllwkS29so8WJ1jIfXtJkZpjGe8c+0AydTFK3lDPZjMEFwYFTs IA98xn/8F0JLUSZvCAMWqoPqMfQC1M0walx0r2b5hTp2AJZ0nvv5q5b/w7gBgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763193538; a=rsa-sha256; cv=none; b=fUqVx/avXDwxqpqNVOlFDhPplaa4TGexKXpxFy89PNNOgg4bL552qNPu9jASYmfP4r57+W YptbeOoG1TEUKkEKX/Q5pS5VZOTouu2sAFK1Urcj+gNGu4uX6qLfmgYJDRaT7It97IdOtP +JMFsCMXF/HqN9jXPxgdYLN2B4rwPE0ne3RI/zKPDRPLli7WZ/dWCOyRRdCkKIQFOv6DHO LD5RwVhUh2gssJsT06QUjdMa9Ah98kCp0Ay1A624HfLFokfkbFlEykoM+OvwBnZnoxWAja xQpFU7fRrVa8wq4Fg9BG9K8D9p2sd6wYrQIF6d5O6ui4dDgLcrWqeCXf++z9XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7mc2222hzkPw; Sat, 15 Nov 2025 07:58: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 5AF7ww8Z013501; Sat, 15 Nov 2025 07:58:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF7wwpT013498; Sat, 15 Nov 2025 07:58:58 GMT (envelope-from git) Date: Sat, 15 Nov 2025 07:58:58 GMT Message-Id: <202511150758.5AF7wwpT013498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: bdfc223c7a64 - main - bsdinstall: Don't install FreeBSD-base.conf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bdfc223c7a64369ed133a179c40067435a9f2cb3 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=bdfc223c7a64369ed133a179c40067435a9f2cb3 commit bdfc223c7a64369ed133a179c40067435a9f2cb3 Author: Colin Percival AuthorDate: 2025-11-15 03:18:52 +0000 Commit: Colin Percival CommitDate: 2025-11-15 07:58:41 +0000 bsdinstall: Don't install FreeBSD-base.conf When installing e.g. 15.0-RC1, we want to get files from the 15.0-RC1 pkgbase repository; but running 'pkg upgrade' after installation should get the latest bits build from releng/15.0. With hat: re MFC after: 8 hours (needed in 15.0-RC1) --- usr.sbin/bsdinstall/scripts/pkgbase.in | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in index 744e0daac6f8..ddbf8eaf4f86 100755 --- a/usr.sbin/bsdinstall/scripts/pkgbase.in +++ b/usr.sbin/bsdinstall/scripts/pkgbase.in @@ -309,7 +309,7 @@ local function parse_options() end -- Fetch and install pkgbase packages to BSDINSTALL_CHROOT. --- Respect BSDINSTALL_PKG_REPOS_DIR if set, otherwise use pkg.freebsd.org. +-- Respect BSDINSTALL_PKG_REPOS_DIR if set, otherwise use pkgbase.freebsd.org. local function pkgbase() local options = parse_options() @@ -323,17 +323,9 @@ local function pkgbase() local chroot = assert(os.getenv("BSDINSTALL_CHROOT")) assert(os.execute("mkdir -p " .. chroot)) - -- Always install the default FreeBSD-base.conf file to the chroot, even - -- if we don't actually fetch the packages from the repository specified - -- there (e.g. because we are performing an offline installation). - local chroot_repos_dir = chroot .. "/usr/local/etc/pkg/repos/" - assert(os.execute("mkdir -p " .. chroot_repos_dir)) - assert(os.execute("cp /usr/share/bsdinstall/FreeBSD-base.conf " .. - chroot_repos_dir)) - local repos_dir = os.getenv("BSDINSTALL_PKG_REPOS_DIR") if not repos_dir then - repos_dir = chroot_repos_dir + repos_dir = "/usr/share/bsdinstall/" -- Since pkg always interprets fingerprints paths as relative to -- the --rootdir we must copy the key from the host. assert(os.execute("mkdir -p " .. chroot .. "/usr/share/keys")) From nobody Sat Nov 15 07:58:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7mc352N5z6HKg0; Sat, 15 Nov 2025 07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7mc33g11z3Nxv; Sat, 15 Nov 2025 07: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=1763193539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/tjVXDeVvcj9AtqApvkptiEj4JJ+Bw+2lBfkBuLTMBQ=; b=wErh/i98UNrXr80eJ8bLrUmoLpQoXvLdn2agxhO1a8p4sVcdGarcUF87kSZybgx95IIdFj 1RYebDQAskGAxRPqJem5jyRK/LlJjIQVau/kwn6AgBB1IGgI4BfOYT0MsdeK8W5FrC/ZcQ iu190hgOVwxM1smJAl4OKm8oFihnLpSVWqyGe5HoRQgUhXeMD8tdOSxt6YWTI69+USrAPA arH8Ohgc9IYtK07u8zHMxQFDBh2QIbsc+TPAMQOubkRf5N4ZTslQ2wnmcHLnyb13bBy+SQ SoW89kVUrhG+Dn8gJEs9WTtg99wdSUzeuiBAI9vz17bj4lfrbdZXM2l8i/VsIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763193539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/tjVXDeVvcj9AtqApvkptiEj4JJ+Bw+2lBfkBuLTMBQ=; b=xJapNnWvYF8CemgmxVxx173LzGaokOBWGCdQMsTcMIQLO3sMSWgp0ZTj1Y4e895JH/RDAE DU6z5yYk9is7PNTEBWgT0KAKCC0BfKgfxHJGwZmTsnjbLYx8Ic0R5uTiI48dc3vPBD0G8G 7s/QwPyYidx70tldgl4JdmUqQUE3WhKK6A7l8ketPGjo3kBvNIxIEsqWi8JgdT4lkxvQtN 8KwXCKK+SmJSpY5xZb5kRSp8li0DxX2S/U6UoH03AJcjsaWu/KQx5q4eo01UpkzYG/Ni+S DJ5iv4CFBAsRuUgAYQnM503lnvgzPSVhsguAg2fiG9HAGN9QTkMpHVETbxQuoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763193539; a=rsa-sha256; cv=none; b=iRpXR1KkVsQtCy1UNeD7jLZpid9qXNIIBU8HJVF2ZHRQuCTKz6WRKfpeYjjzOEpfvujQLO 49fRla1m3GypS/r5hbsQnVCblurQsWem/9Vi6uCEcb1gs49kU8fTcEE4zxYB/pjh78oGNq qGujUpTePl9jV2gZpGoC6CDoA/gtiMtG5SgsIBPEmA9en0Ta7Sv4+bFIUv2RvcorNVe4/d ECVDSLfpd5nM1BaSfDcAn3MBkpzOUZgNZhQ14rltwq2EFa2pI5yta0iA182RjcpBCYIuST 1ObDMfGnXz6EOjjeniCbmOAyGGIMo0ebrbaozAQ6uZAzMlNuSF10ynpj30uKIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7mc332cgzkPx; Sat, 15 Nov 2025 07: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 5AF7wxbG013536; Sat, 15 Nov 2025 07: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 5AF7wxcq013533; Sat, 15 Nov 2025 07:58:59 GMT (envelope-from git) Date: Sat, 15 Nov 2025 07:58:59 GMT Message-Id: <202511150758.5AF7wxcq013533@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 8e0b1a1c03a3 - main - pkg: Add FreeBSD-base to /etc/pkg/FreeBSD.conf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e0b1a1c03a35a5db13e370cb3e62585d3db68e3 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8e0b1a1c03a35a5db13e370cb3e62585d3db68e3 commit 8e0b1a1c03a35a5db13e370cb3e62585d3db68e3 Author: Colin Percival AuthorDate: 2025-11-15 03:26:07 +0000 Commit: Colin Percival CommitDate: 2025-11-15 07:58:41 +0000 pkg: Add FreeBSD-base to /etc/pkg/FreeBSD.conf On -CURRENT and -STABLE this gets bits from pkg.freebsd.org; but we get base system bits from pkgbase.freebsd.org for BETA/RC/RELEASE. Note that this repository is disabled by default, but can still be used by explicitly specifying it, e.g. "pkg upgrade -r FreeBSD-base". With hat: re MFC after: 8 hours (needed in 15.0-RC1) --- usr.sbin/pkg/FreeBSD.conf.latest | 9 +++++++++ usr.sbin/pkg/FreeBSD.conf.quarterly | 9 +++++++++ usr.sbin/pkg/FreeBSD.conf.quarterly-release | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/usr.sbin/pkg/FreeBSD.conf.latest b/usr.sbin/pkg/FreeBSD.conf.latest index ac1636386942..f4b80c02cffa 100644 --- a/usr.sbin/pkg/FreeBSD.conf.latest +++ b/usr.sbin/pkg/FreeBSD.conf.latest @@ -6,6 +6,8 @@ # echo "FreeBSD-ports: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf # echo "FreeBSD-ports-kmods: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf # +# Note that the FreeBSD-base repository is disabled by default. +# FreeBSD-ports: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest", @@ -21,3 +23,10 @@ FreeBSD-ports-kmods: { fingerprints: "/usr/share/keys/pkg", enabled: yes } +FreeBSD-base: { + url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_latest", + mirror_type: "srv", + signature_type: "fingerprints", + fingerprints: "/usr/share/keys/pkg", + enabled: no +} diff --git a/usr.sbin/pkg/FreeBSD.conf.quarterly b/usr.sbin/pkg/FreeBSD.conf.quarterly index 4e26582c6981..117bbd49aeae 100644 --- a/usr.sbin/pkg/FreeBSD.conf.quarterly +++ b/usr.sbin/pkg/FreeBSD.conf.quarterly @@ -6,6 +6,8 @@ # echo "FreeBSD-ports: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf # echo "FreeBSD-ports-kmods: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf # +# Note that the FreeBSD-base repository is disabled by default. +# FreeBSD-ports: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly", @@ -21,3 +23,10 @@ FreeBSD-ports-kmods: { fingerprints: "/usr/share/keys/pkg", enabled: yes } +FreeBSD-base: { + url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_latest", + mirror_type: "srv", + signature_type: "fingerprints", + fingerprints: "/usr/share/keys/pkg", + enabled: no +} diff --git a/usr.sbin/pkg/FreeBSD.conf.quarterly-release b/usr.sbin/pkg/FreeBSD.conf.quarterly-release index b4a78009f7d2..035d0ae976b9 100644 --- a/usr.sbin/pkg/FreeBSD.conf.quarterly-release +++ b/usr.sbin/pkg/FreeBSD.conf.quarterly-release @@ -6,6 +6,8 @@ # echo "FreeBSD-ports: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf # echo "FreeBSD-ports-kmods: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf # +# Note that the FreeBSD-base repository is disabled by default. +# FreeBSD-ports: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly", @@ -21,3 +23,10 @@ FreeBSD-ports-kmods: { fingerprints: "/usr/share/keys/pkg", enabled: yes } +FreeBSD-base: { + url: "pkg+https://pkgbase.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}", + mirror_type: "srv", + signature_type: "fingerprints", + fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}", + enabled: no +} From nobody Sat Nov 15 09:30:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7pdS47pxz6HRbL; Sat, 15 Nov 2025 09:30: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7pdS3WH1z3YSF; Sat, 15 Nov 2025 09:30:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763199020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6teivlivKAc3JDGjbVHp8iSvBu7yqO2RFYmaFnohpIE=; b=JDNzCVb557sm5yoC+asO8GmcTHFQl2Qa6wzMbKwz8/ROGsSac0GzzMK6nfkMS0A56vskrC JJvKEmzxJCiDjL7ezzjITTklBfIb/htSi4JNa425zKoO5O5S9NQhn+rzgwDbop7XA5+/gs ESVgH3ZGZX/VJY0TnsnLKeF5X9PntuvlH2YZdDFqy/DCKQxCogxdznOf8DPGVM7k8Zaul/ H1sjapQJZ5bAvzKqZ9S+0Y31v4IwJ173e6IKnxEjPAuW2o0znPT16SnzMVJmubdqDr10jr z55/gR2w9QqjWwcQlLxtMJtuRnvzJaGvT3GLo9DbCDe7si1oew6PpsiX9TGntg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763199020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6teivlivKAc3JDGjbVHp8iSvBu7yqO2RFYmaFnohpIE=; b=HDocNkl4wNUTDaWM58xuGeu3fTQ9jLOd5dBU2JgD+0ZGUVKYpYSTkzAm5EGcMPtqx1FL0p Y/LsWasMc0W7BNb48sdMqJNdFuFwRKseTxXNmEDX1DQrmBxKTjaRzibTJieyenmdQrxyuI XbsmN0NudLHR2CQewAzPkP4nN7IKgSWPw86tSS3B9Ka79lir7zqVux5SE0FO7jEn3xlRso eVh+/vaNzMX1N8+j+Ec7gLttMhmzxdCAcy4iQLM2INVRmOhSLxsGO8TNQrfiq4vEgJ9PNs 8/IpAdB18YBfJhJjz5KI9c5HftJUbApcbSD9pyzF6zM8l15Qt731NGZoWk3KxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763199020; a=rsa-sha256; cv=none; b=hp04DENljsm9AlY5XaI2kxR3ZES0v0/NeETuHo+m3P89+ISeYQ3ckka+wWpxxspdOiKUw4 FZRECkFZePvm4bKiltSQznvHAT5kcImGBcRC2swYi/xZsQmB/6nKXsGkRtE73W5+HsyOCY ngxWqUge4iQfldxB22E+oCaLKKWySukrZqcQuFo6FZ9ZHVS3b2GdllFk/FtwpoEfDqU2Bt JZVicxoqDQBL37Ly2fTYtBF3o3nvzVxLnGJm36jwktj2/9i1cf1Q6U3dr4TtJIzc57L2nV x5+lQuQcO9XWRxFqycYY0mpzToUS4kiXsYamFt/xIqNjw8WiBiFFcOiISC+KJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7pdS36yGznDL; Sat, 15 Nov 2025 09:30: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 5AF9UKke092050; Sat, 15 Nov 2025 09:30:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AF9UKAZ092048; Sat, 15 Nov 2025 09:30:20 GMT (envelope-from git) Date: Sat, 15 Nov 2025 09:30:20 GMT Message-Id: <202511150930.5AF9UKAZ092048@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4872b48b175c - main - setcred(): Fix 32-bit compatibility copy-in List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4872b48b175cc637ee38f645d68b8207d9335474 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4872b48b175cc637ee38f645d68b8207d9335474 commit 4872b48b175cc637ee38f645d68b8207d9335474 Author: Olivier Certner AuthorDate: 2025-11-14 20:20:12 +0000 Commit: Olivier Certner CommitDate: 2025-11-15 09:29:49 +0000 setcred(): Fix 32-bit compatibility copy-in For 32-bit processes on 64-bit architectures, a difference of 'int' pointers was wrongly used as a number of bytes to copy in a memcpy() used to internally construct a 64-bit 'struct setcred' from the 32-bit variant, leading to copying only part of the 32-bit structure, and thus to requesting credentials with garbage IDs except for the real and effective user IDs. This bug was spotted by jhb@, who produced a slightly more invasive fix in D53757 (a switch to using CP() on all fields). In the interest of minimizing the diff for possible inclusion in 15.0, the commit here just limits itself to fixing the number of bytes to copy. Tested successfully on a VM with 32-bit mdo(1) (and in passing also tested that the same executable on a kernel without this change exhibits the bug in practice, in the form of setcred() failing with EINVAL). Reported by: jhb Reviewed by: jhb Fixes: ddb3eb4efe55 ("New setcred() system call and associated MAC hooks") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53767 --- sys/kern/kern_prot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 06696612f8c4..81099aa7d28d 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -603,8 +603,8 @@ user_setcred(struct thread *td, const u_int flags, if (error != 0) return (error); /* These fields have exactly the same sizes and positions. */ - memcpy(&wcred, &wcred32, &wcred32.setcred32_copy_end - - &wcred32.setcred32_copy_start); + memcpy(&wcred, &wcred32, __rangeof(struct setcred32, + setcred32_copy_start, setcred32_copy_end)); /* Remaining fields are pointers and need PTRIN*(). */ PTRIN_CP(wcred32, wcred, sc_supp_groups); PTRIN_CP(wcred32, wcred, sc_label); From nobody Sat Nov 15 14:50:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7xky5WbXz6GQhp; Sat, 15 Nov 2025 14:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7xky4dRzz3DVl; Sat, 15 Nov 2025 14:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763218234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AEpaSFCvN9ymKRwpadCQBimN/W/YY6PUzD2eepzLta4=; b=X32YZ6+9TYFkNKkEcrBu2SGVjZSw04W2Aa/sD9xTJI6aBKxPO5PZeTMke3th6WX43P9quW 1wLXaB4NDr+4Ic8stI07kQTT62o52szYXXeQiQ6qyuUt5QciUTxZuTTfiPYjNzkK8FXjfP ywonAd/DlKn2YuM4E/DnShvv/UPLvx+QhtJ6dP5yYop73lG8E2hk25YFXWmiwm5bfNf9xT 1uI61MGrzZfMxUpHId0M4Ei+K4CzJMGeOCbcYiT1Gzd1LkKXkVE9Kqk5pFTv6XuoHO9csV B/S6EmmdAvwO3VABVN45cUUFMt6L8M7dl5S+NBCUV99rf9i1MTyRuyaLycfX4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763218234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AEpaSFCvN9ymKRwpadCQBimN/W/YY6PUzD2eepzLta4=; b=d+OD0JdF65UL2l2hZ2SEEaCmiTdE8Dn8fUxmA3MWUZQI1+Q4SrrOlmfMgq3kUXnUnphxwC boi13SdcKAQ3CXvUtiSDDfOGwH4Hm/EPXTr8XCltuzk+B4g3ZlCoM5E0frv4uwRmTvC0fs DlgBIoXr6pmRNimO4m6s/knzeCLX3X3BGH78f+sL9p9kPnNmmWbSVDHRJr2oPGsg7q1e2P WbDy+jrGdf5gYTrdCje2SVNzU22/xNJLW9h1AQwl+fXQWs6hdSiBuWLztcnP2gv2guE/Nr w7/To/mshKToD/NUP7TSRoYVC1rfcY8F3xXYw3+isBvpDgTWq2kbsKGKsIr37Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763218234; a=rsa-sha256; cv=none; b=KJVtUxEnFK4x6rrz0kO5gASZZ6E32FP8zKwqUMFzVUnEElSEzN/TCixQ22Y7GRtvdNCfjJ ytUHcfQGOLJ4G2vDbDSvzNKO/IyFzQG9484EjcZHTAARCB3giuaI197WVxiAslanbRsXn0 PEeoW9dVMBPFFbYzV9Ww05ap2MK0fpKGZZtrVclM8H9xKJHM/BC7iDqGzqeTqAh6yk4YyD QqE4lMT7Igx3M28A54ywrAgzJi6rnxuQXQ85dbzYMQubfdiXMSW/ejuoz7pG3o0a3CSWT0 iQR1z1toKQiu3kVupeD2okwRd0ww8RPCBeRdqBNm/Y5rnESt/ZHusDU2HtXYtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7xky48l2zxM3; Sat, 15 Nov 2025 14:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AFEoY8D095197; Sat, 15 Nov 2025 14:50:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AFEoYwj095194; Sat, 15 Nov 2025 14:50:34 GMT (envelope-from git) Date: Sat, 15 Nov 2025 14:50:34 GMT Message-Id: <202511151450.5AFEoYwj095194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: fc83e6c5e1f2 - main - GCE: Add TARGET and FS to image family List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc83e6c5e1f20087314dc52b63e485db87a98b86 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=fc83e6c5e1f20087314dc52b63e485db87a98b86 commit fc83e6c5e1f20087314dc52b63e485db87a98b86 Author: Andrew Jorgensen AuthorDate: 2025-11-14 18:06:16 +0000 Commit: Colin Percival CommitDate: 2025-11-15 14:45:46 +0000 GCE: Add TARGET and FS to image family GCE image family is meant to be unique per set of image characteristics so that a user can create instances using the image family instead of the image name to reliably get a similar image with updated software, but no other changes. Without this change, the instances create API would select the most recent non-deprecated image matching the name, regardless of architecture or filesystem. --- release/Makefile.gce | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/Makefile.gce b/release/Makefile.gce index 06b76857ae88..a6d09de468c0 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -16,7 +16,7 @@ GCE_BUCKET?= GCE_LICENSE?= .if !defined(GCE_FAMILY) || empty(GCE_FAMILY) -GCE_FAMILY= ${TYPE:tl}-${REVISION:S,.,-,} +GCE_FAMILY= ${TYPE:tl}-${REVISION:S,.,-,}-${TARGET} .endif .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE" @@ -74,7 +74,7 @@ gce-do-upload-${_FS}: /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET_${_FS}}.tar.gz \ gs://${GCE_BUCKET}/ /usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \ - --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \ + --family=${GCE_FAMILY}-${_FS}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \ --guest-os-features=GVNIC,UEFI_COMPATIBLE \ --source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz touch ${.OBJDIR}/${.TARGET} From nobody Sat Nov 15 14:50:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7xl01068z6GQlP; Sat, 15 Nov 2025 14:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7xkz4wgnz3DGn; Sat, 15 Nov 2025 14:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763218235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lA7/Vqz5PcoXgtYZtoxMKcySIMob3/7bLg33vwRt2+M=; b=cRwWX7cYPTkdrtEeA6xqkL30AAhQgPwmnz098HhDtjL2QqIUVe/aX8Zn4J/Pl5XFbjVksu AMzw7W7G5ogvEPSNzm+S/HngjkBHrh6Eq/QkOwZQjfaLQSo9Tuv4kQVzBAY5t+3dN8mdGm anE49h1zeCBwpDQZTayqhPwxHzi+prMkRdwp/PxNu8SjCQCEl00U3F8ZYNXydnOPnOHGcB e0fJNxPSzqaOeqAUYfRkmOD/ox0BnTT+hnHKLIigj2bVX+DNX2MI2h1ZlWjOMWP8HV3fL+ I41BQXBuPaGCwKzi+ZmocRu2cuvKLr1Ze6sulZIfBIpo9PqaGJD7JaewnC0Q1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763218235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lA7/Vqz5PcoXgtYZtoxMKcySIMob3/7bLg33vwRt2+M=; b=JQTOEM9QP9cHhxDIS1DdX2w1OMqtAc6VsJsrMc/Y8n09XscOMHDY1n3LjgdpShSUWPcTPI 9xEaS7c/xC9zXfk1InZ0f+HQW1peldFBAnwH1fE5GUhXdGMrZpzFjcsiCyK7f/5EHKt7IQ jIs37OjS/i+nIZ5VjANt0rl7vAxeC5+klgzBndbeoomheikjU/FFb4w2N84Bd218AcflpU g6G5UBkGw+LFhix12onneVZmnkrCC3VCdiIv0cF61uXjR+/NAAhHPuk1eU+PpgsD76xDzn CJ/PjUysMCyqPuoRVN+rbdJKKJ31bStXwo97GyDgvC2mz0msE0xHnE30FuFjPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763218235; a=rsa-sha256; cv=none; b=hnqOX0TE8StoMqfAYKlkmpXVEgIAZOKiLQz9IFXVoTYvmJoAnjfixw/cpZjkk644dpgZet jodTcQ7zR9ULSHtr58DnCxRTQJoGQEkxNYV68S0tCFLn4ADWFkDTGTMkqAcF7PDsl4MOP9 HoEov6LJqgRVIQz/ZGSpqlvOw3tea56toJU5riH5e81OxSTA4QhvMguzVr35VkNKqukToj 68stYoLN2ITLHzVnQ9eRPYkOzg8OVt+chCStDtXIv3xqqOTYdN7jktlB9gejmEhpyNkRwh UBeGR/WZgKAC6o3e+4ZczsmTN081ED/cOESx+O3gDUtSEXIypuEkIea2/dCB+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7xkz4M1jzxJb; Sat, 15 Nov 2025 14:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AFEoZiC095235; Sat, 15 Nov 2025 14:50:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AFEoZOj095232; Sat, 15 Nov 2025 14:50:35 GMT (envelope-from git) Date: Sat, 15 Nov 2025 14:50:35 GMT Message-Id: <202511151450.5AFEoZOj095232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 0a8ecca4e315 - main - GCE: Specify the architecture of images List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a8ecca4e3156bcd4ebbfcb24d968e67a3a09434 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0a8ecca4e3156bcd4ebbfcb24d968e67a3a09434 commit 0a8ecca4e3156bcd4ebbfcb24d968e67a3a09434 Author: Andrew Jorgensen AuthorDate: 2025-11-14 18:06:52 +0000 Commit: Colin Percival CommitDate: 2025-11-15 14:45:46 +0000 GCE: Specify the architecture of images Without a specified architecture, a user can attempt to create an arm64 instance with an amd64 image or vice versa. With the change the API will prevent that mismatch. --- release/Makefile.gce | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/release/Makefile.gce b/release/Makefile.gce index a6d09de468c0..21df4ddbc3f5 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -15,6 +15,14 @@ CLEANFILES+= ${GCE_UPLOAD_TGTS} GCE_BUCKET?= GCE_LICENSE?= +.if ${TARGET_ARCH} == "amd64" +GCE_ARCH= X86_64 +.elif ${TARGET_ARCH} == "aarch64" +GCE_ARCH= ARM64 +.else +.error "Unsupported TARGET_ARCH for GCE: ${TARGET_ARCH}. Must be amd64 or aarch64." +.endif + .if !defined(GCE_FAMILY) || empty(GCE_FAMILY) GCE_FAMILY= ${TYPE:tl}-${REVISION:S,.,-,}-${TARGET} .endif @@ -74,6 +82,7 @@ gce-do-upload-${_FS}: /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET_${_FS}}.tar.gz \ gs://${GCE_BUCKET}/ /usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \ + --architecture=${GCE_ARCH} \ --family=${GCE_FAMILY}-${_FS}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \ --guest-os-features=GVNIC,UEFI_COMPATIBLE \ --source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz From nobody Sat Nov 15 15:04:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7y392fTdz6GRpB; Sat, 15 Nov 2025 15:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7y3923kYz3GjL; Sat, 15 Nov 2025 15:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763219077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EXlZIOxRFyr4hhol4Y+wJfXBy8XuUB28CG0/7L5obx4=; b=xU2Y/HZyTa1WEPi8chWGRZ8yK+koPqNLOcKmXR/Cnm9ufrgOjJ8j+5FuRXlGaUyzzDDVjH 3CcFoR24WZs5y5yaQbDrnpRo90o98wZSIUQ8Y44mZR59UolSxebtUoaZZenDpwGpTH0c/Y QlxEm9Qnsqv6fmlM0ebDxjx+7Qx7azzSNqKfVqz3qrSGQO8DfnLnaWo8hzmHHRxdYZ7w5X ouqALvZFOKklF6QJazKXNAYeGAjCsiR5h3xOS8C7IYJKcRZpRVQomsvd1z+HlDZCwhxEDT YsQWaIrxLgLI60PLgS1lVWstM7eTFWaY/zISWSlMR5wlLC6MyOof4ewDPaYFPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763219077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EXlZIOxRFyr4hhol4Y+wJfXBy8XuUB28CG0/7L5obx4=; b=US0Y3FGSbZTtu26/G80wpcJXZF6xGP4Qpu3HiaKzEmWwA/wBZpa0g0ezlGczQdrIy3UsL1 2ThxKs3FNB9K2C5FYIhIS7WJ5sXglnFhzfB+gng/MwPOoECLTAMf81Yis7wXDath++cvJx xF9x563is4u6lLcnpgxH9TgMb+bDdpA+M5p4PvD58atXSzlqUwzxA3tGsJOVsHdZBzt+VW WEpHX09fa9+QEODfszzkFoyhMEg4f5ecJNznne0LPgTjKQJCt6y9FEM0MJYKI1SQ1xApV+ CcShASW7NcPQhCRKFQlEFm2fT3b5aI0SJ8zOhbbFcwjG6kKP0fx0AiUCn+1JJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763219077; a=rsa-sha256; cv=none; b=w/3GAuHpQfXS5oDVEHq/APC8E5BrdfmlOqux9TD/iI7KtjM9R0Uy0LaaBaG12dHZyVJgWf kI+TBUAI406XHf5REU+ceRDFsYYZLkmT1ckYilbDEo7zWj4V2eyajpQPWpLACTNqUWinRo 6alKHItFHbIwTjN5uNs+d2bduIIWsBzTwORvzJpCBgVuk2UWT42Y/koDcPnXML0heVLMSV sptUCnvbYxZhih+uOryhYVzCZXV5QKqMhC/VmQKO2xWxeAMW8RAKtOftDlz9PFrLIEIBw3 tLD4JUdrwzqamqrBSjwOq1ztclFZN2kTkZnX3kVYsX4rxwDUDO3H7DNH+KhdHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d7y391Y4HzxtD; Sat, 15 Nov 2025 15:04: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 5AFF4bk3021312; Sat, 15 Nov 2025 15:04:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AFF4b1w021309; Sat, 15 Nov 2025 15:04:37 GMT (envelope-from git) Date: Sat, 15 Nov 2025 15:04:37 GMT Message-Id: <202511151504.5AFF4b1w021309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 787d09753f70 - main - GCE: Don't .error on unsupported targets List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 787d09753f70bb382a7cbfba742a612fa54069e6 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=787d09753f70bb382a7cbfba742a612fa54069e6 commit 787d09753f70bb382a7cbfba742a612fa54069e6 Author: Colin Percival AuthorDate: 2025-11-15 15:02:27 +0000 Commit: Colin Percival CommitDate: 2025-11-15 15:04:06 +0000 GCE: Don't .error on unsupported targets We ingest Makefile.gce even when we're not trying to create GCE images so we don't want to .error here. Instead, set GCE_ARCH to a dummy value which should make the problem clear to anyone who attempts to create GCE images on an unsupported architecture. Reported by: Jenkins Fixes: 0a8ecca4e315 ("GCE: Specify the architecture of images") --- release/Makefile.gce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.gce b/release/Makefile.gce index 21df4ddbc3f5..31770bfd5098 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -20,7 +20,7 @@ GCE_ARCH= X86_64 .elif ${TARGET_ARCH} == "aarch64" GCE_ARCH= ARM64 .else -.error "Unsupported TARGET_ARCH for GCE: ${TARGET_ARCH}. Must be amd64 or aarch64." +GCE_ARCH= UNSUPPORTED_IN_GCE .endif .if !defined(GCE_FAMILY) || empty(GCE_FAMILY) From nobody Sat Nov 15 15:34:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7ykY5fVJz6GTyN for ; Sat, 15 Nov 2025 15:35:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-19.consmr.mail.gq1.yahoo.com (sonic314-19.consmr.mail.gq1.yahoo.com [98.137.69.82]) (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 4d7ykX3hBrz3K9c for ; Sat, 15 Nov 2025 15:35:16 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=EexLgbJb; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.82 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1763220910; bh=QcrPIEPZQF+qhOVGHyIRs54HcEDQ/aHeKdYn7x2eB4A=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=EexLgbJbv/fPxEXWpc9bZcvFlgR1zARklKpeAHwxMGUxT0+jLI6Y/X8CUFpSqOIeVvCXtRutdyIk1VkqiRKZxTZXvSQzWsDdzwKl4RRrLSdMytBEr2T75oIJYiA3Tb4wZOyLznb114lFHd3RKJJgmYNlO1N4suVXeiYwb7CBYcR8MucHx8CqcLiCE/BqVovxw5lf41rqjEnryI1v1c/cyM1b6F968kx/Lh2jV2RT1p18c0b0nROONo/Q8RHuOyOtIXymGep9n2bv5wpCCyGAleiXvgFxv1WIcwsRAUTyR/3Fp5DbCnew0nf8retnOdQaT185oWpgbok9eHJV3Uru9g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1763220910; bh=b0lz8xE9CW+NvrMUXxzDJyjIzFw9NqsboM54jT/YVta=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=dNcYnulVi3WplUGWDnvMb4SJ0rrnGTK0itWmHG3DeNdpE86J3wxY56ed33vVtNb2TQ53IGD9PNFDqFn9CZxMCIzMv+tjy5dYZKzuyuTgsSfWLiaAf2OqJcw/oFlQHulpz7KOEmy41PQsZvuwsIbnldKkQjxpdk2vJnJWJzHY6xQtwu2SewPSFNp5/m6frGqvPbJo0L+QSW+1FRyOkZ2+GMxg31lvcs9xXyVA/XcExGlbYBhtJndT58VkhylWPB20Y2osksJQrC06oshU9U1LW4s9G+UuTcwiYhhSnMMHCV8vQ8JfCVNOWxRhohvrKCUbhUEJzkxaEs5847VMbaJhBw== X-YMail-OSG: A4i9H7EVM1lY3zGHLDlM79G1cqj25dw7Afw1wk.bGhvzLjQlMj0DNnW8UdHN_C7 Nk3_abcOm3Hb_cstItsyA8.JC1wqSMOjezHrfrm0BSoQaVBz2GOVJ2LpFZhg_MkrHs6LM6aClS_A mm9VlLangZPqDuJ6wbOdYLWZrG17nFg0fv4zLNvk_hzDL51JhRfc2bwAcnKjraSdtL9Ys2O6qtV5 KuYf2FXxOCBiFyuIjhC5Y08tqEO2r.stTWdk4xgYhroDvn02FVSFRxXNj9o1HSFDV3RmyH8TxE8Q DYMGTYJPNhAyvGox1KCAPnfipgCbi1gKIsp.cnkZX0psaXPzl_kv.oi6XQLlBAIV2dZFlCtooGpH h0SRxKrgI5GMK1OAqDdOZffZhDSG89bZx6Vs.2Zv8aG40WHusR83a8h5Xc9QJSNQ4HMUCKoQgPIk TSdIybNuNJj7hnjfE3nScHw5osm_Qdzro3J290h03IYkJm9rfzi4OCALxoGEnR86r7xD4m7Q15Ro hVKGMFN.uocfhuqbwkot6gXdwvU1rDmbPk8R3JfBEOt03aLevOeUglR6pK3mwA1hOINzS_bV4Ly. ePZNaYBZrEYla5YAMri5IsG5.waY4aT6wkwrSnTUwbdz4MIf_vRDdmCgr6Fjy.MI8tuH_6VGcdeT ZEyV6o.vBtlNwaqAdKUf_yAYc83jHczlS0UameJwkIjJdOQD6kd9nptueeZcTgbw.sD5x0oKshcn fxRmFXp30y6HwkBGSXnjg9QoG6htNwGOzukLyW7dmlBRURZ3QfawXvNvzHUwHQe9fVN6BppEQe1H 3T3dgdzTuO.CTEcNVRBBxQA3Jt8VDFt_aFYANKewolShFBtrpa9Hgl_2wzo_jMAF4t0JYOIpzYtL jWLBBCCoUI7_N2J4QUZfZZSFsAByz4zXQ.mYu7pmVU22JyKcJYrBr5BrSCoZrFm6uhH7JoQdrLF8 703ZbLw3aglJw2J6Jl3psYUX3TI8CyAgcJomtThlpRmqFjB7VDP8PUkVnoCTqXMr7te9n5HwpblG pooQ_LY9VhQrYWdaXhDAQb7.MOCoJ7oCvQmb6ymTLBxMn5PvZNjcmFaEppZf_VxclKGf25.NtjIT UuTuh2WHmpFgZK6T7m9h_TZkB7Q6p4GkRMGPuJuabwQxW9DFaOuSxAW3llTOpaWp.glwVU0ciavO 6M4NR_O3NF6UNGDd526MqYAj0bKbE0EYsP_k50cDSqOp5z4PPPsj6oXXBXQVlHBQ2JQ9jMkh4wnr LorKFrnON3oefKS0x5udE7RWqe0C0xDpv0.4xft4SgzbGgoMpGUUuxbJe.aB7lVwsUVO72jb3JlC uzIhFJ1Vm_l2ZNcEIr3ZZg7VKhHJqWKkSYqZLsBVT93XP0csSqZvbkh39aDmGixK1fN7XrLbHixX YKoKwLYP4H9T2IBTOV.IEn8IHfvS50uYOx00aEtFt3hsZXkgLWVfWiyGo7HAkN8TaY4SpkB1fjBs MMn.8ZMnOxQHb_hBoyaJ083rtcpTyBQbqNVIAG0h4YL4txMtZpIskHQAMetGYIH4Z2Nt2fhnd9a. 0USbajUtb96YSC99i6F_FqNk5VOCnBJHwwI2Q4ZkcYEzCw09tszwTp_poHKXSvjrrzfMdv6Ghj2S 8R2GUZRuTbYrdYKT.kVWCL_toVHQJHCDC4xgH6tLVM035HCsS5vTxobfc_ZpCa._Kbey.YtH9BBe XCEcVkXtqM8IjtD5GBruOTLmnPdXzEdYBb0YQVfPHI38OM.8mIDmOTQtxEggvsaHGLp2PGs0aSuV wxSjSBBi1KYqtgoeezYPYGAtApYlqo1Fs6cqkXng2iDuWjM4g2VfKhIUthRI23OHbnBxFB_PAsMR zur7jQtt.rH3Gf6Bv.3EoVR5sZzksKxFfUG27P3Kzb_IopDB1himLS7_sjZNdbYEqCzYgbJmoezL GExql9RYCmsg3R0MSu2XOGayMZohypbZJzuAMdwLwv.fUk6rvagw_T.V2G9WqbhTZFClh0Q5dQa0 WwAXuohIKKF3usMq0Xrrpeo2IUkLL0HHp5nxdfPONBv2Zyb3J6VbU0ub_t7.ViCiZZ4ktcAEJU2a 5bOC9U9ivakKtvGAzEFQE.yQ6Qq3tlYhoeppdxSq2YADi6kaFNvlDPzHiYX8PvIEMzoO_YbjZHCx k28oVOs0F.IqOY32eCnxSki6IQskMBMjHZvioxXRgP.0XfmRzz_vLHp44yRXpC3INiWQFWHIwl0n vgfxg1ym5yOEMVKiYuesHnSJ6ulsKqvWhURdskKjskORdDL3goxq6p.l9hXc80_4yPJtT0EEKepb gEJ3_a.zWxV1ZWjVYs_vyIVPl X-Sonic-MF: X-Sonic-ID: c93d7df6-3ce3-4dce-a61d-f58c2b3c6503 Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Sat, 15 Nov 2025 15:35:10 +0000 Received: by hermes--production-gq1-76c986f798-tbfwg (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 8a1c3fc110267e14faf403b65b21d7a3; Sat, 15 Nov 2025 15:35:06 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: RE: git: 8e0b1a1c03a3 - main - pkg: Add FreeBSD-base to /etc/pkg/FreeBSD.conf Message-Id: <00D80914-D359-4834-B6F0-9CD66967F77C@yahoo.com> Date: Sat, 15 Nov 2025 07:34:55 -0800 To: Colin Percival , dev-commits-src-main , FreeBSD-pkgbase@freebsd.org X-Mailer: Apple Mail (2.3826.700.81) References: <00D80914-D359-4834-B6F0-9CD66967F77C.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.87 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.87)[-0.869]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_FROM(0.00)[yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.82:from]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.82:from] X-Rspamd-Queue-Id: 4d7ykX3hBrz3K9c Colin Percival wrote on Date: Sat, 15 Nov 2025 07:58:59 UTC : > The branch main has been updated by cperciva: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D8e0b1a1c03a35a5db13e370cb3e62585= d3db68e3 >=20 > commit 8e0b1a1c03a35a5db13e370cb3e62585d3db68e3 > Author: Colin Percival > AuthorDate: 2025-11-15 03:26:07 +0000 > Commit: Colin Percival > CommitDate: 2025-11-15 07:58:41 +0000 >=20 > pkg: Add FreeBSD-base to /etc/pkg/FreeBSD.conf >=20 > On -CURRENT and -STABLE this gets bits from pkg.freebsd.org; but we = get > base system bits from pkgbase.freebsd.org for BETA/RC/RELEASE. >=20 > Note that this repository is disabled by default, but can still be = used > by explicitly specifying it, e.g. "pkg upgrade -r FreeBSD-base". I and others reported that when FreeBSD-base is not enabled, "pkg upgrade -r FreeBSD-base" does not do the pkg update part of the activity (as if a -U was present if it was an enabled repository). This prevents "pkg upgrade -r FreeBSD-base" doing any upgrade that would depend on the pkg update results. In other words, only enabled repositories get the implicit pkg update activity, even when the -r REPONAME is supplied. I've been manually initially doing the sequence: Edit to have FreeBSD-base enabled pkg-static update -rFreeBSD-base Edit to have FreeBSD-base disabled > With hat: re > MFC after: 8 hours (needed in 15.0-RC1) > . . . =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Sat Nov 15 15:46:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7z050s8cz6GW2Y; Sat, 15 Nov 2025 15:47:01 +0000 (UTC) (envelope-from cperciva@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d7z0500gRz3Kv9; Sat, 15 Nov 2025 15:47:01 +0000 (UTC) (envelope-from cperciva@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763221621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=kCvuFSfxjpra5kd9zIH6sMoSdnvsTBsv86Jd7b4EkaY=; b=VTvq77ZPaS/hWhC+txaLXMRgD3HGTtdadaC3Tj0EMK0rQiDrVe+bm+kFzXlAV5xth+PW39 ICk4dTluhinamyJUDZ7FfnUbu7popXmdcGqh3oWiODAlb8GW07wLUH0Qqy4O90cRE6sk8W qeXh60+W5U3kAOzrTqNd+JlMO67RyoAAkEEsPEi/Vzks50ap9r2IIyLjco9HYb4LhEUM6E 8JC3M68BiCMYAi9A/cwbJZSzTb9S+W5pWRKkCOKS4E+l2tUcpYyXkKm0pywC9rVsn5wdOB T3c7fXdTL2y+3uTc3K9bIdn441oLe2fC0HgGgQieYKv0dusNKAE9efbgMgBxJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763221621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=kCvuFSfxjpra5kd9zIH6sMoSdnvsTBsv86Jd7b4EkaY=; b=SmSg6lXzRcSjRpvUW0/S1NkZHyESEL8u9vRzngx2lycYvGsIQfIte3PuhHUNC6/J1pAQ8L mUGOTXZKqrcH7tBGnoW0m8kSQxhx2GqitrpGVA5EUQSOKT7mcMOBSbfCWO5aY9FDliyG3t iJJ++j3U8i7Z1DxVMjuhb/BK0Tc67D79vYBABc0o+zkhqv5R4o0BeSQ2cN+UdROwSbQDgR ZHKhzHTN8YolwJoSATyuQWCa6w4Xwl5KTDZ38VVnAHO75mm0g44pTC2gXqnoybTcrUZpGl tlA7cLxgY3ri4jGRTVUyQSQseIe5ecLzo7VBHSzxnwpx/7QPCz92aAEin2Izvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763221621; a=rsa-sha256; cv=none; b=NRuz/Kr1BFNEXPJXuLuiFeumqFKkt+fTv/BxZ3/OSmt0fZ8rjuId+4CxPPKCnDPIusI8tD 6NAwp7B6XDsn4TosGOkj9k70rZCm1GxyM0B3V63YcmFX4+T2gM8SJcmG+1xs8r/PiQqm1L OKqua3C/TfMVt9TEkkPY+vx6T3m5x8Apsu0mZDkXVSrFmo9jOBXtdhoQxkRvCzjP68U+Gf +KCGGCUl7fVDo/O3uiyDqLAob9c3Z2VrH1r21WR9nYA4xxwwZKTeYopTli6rMUAu6sRNrj 5Qc+fSxK+C9eEcK9YLB0kHQmRUs6ZHPmPR8SMZiypXb8W+6XLu4Cu6D9D9N4lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [192.168.6.36] (S0106684a76304d01.vf.shawcable.net [70.69.240.84]) (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: cperciva/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d7z043zdsz5pQ; Sat, 15 Nov 2025 15:47:00 +0000 (UTC) (envelope-from cperciva@freebsd.org) Message-ID: <97e5bde2-eb6c-4e29-a9fb-d80c06c65efa@freebsd.org> Date: Sat, 15 Nov 2025 07:46:58 -0800 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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: 8e0b1a1c03a3 - main - pkg: Add FreeBSD-base to /etc/pkg/FreeBSD.conf To: Mark Millard , dev-commits-src-main , FreeBSD-pkgbase@freebsd.org References: <00D80914-D359-4834-B6F0-9CD66967F77C.ref@yahoo.com> <00D80914-D359-4834-B6F0-9CD66967F77C@yahoo.com> Content-Language: en-US From: Colin Percival Autocrypt: addr=cperciva@freebsd.org; keydata= xsFNBGWMSrYBEACdWRqDn3B3SKO7IG0/fGHYtfs26f3Q5QeAcasy1fQLniwGQWn5rlILhbCD K/jdNoDm5Zxq20eqyffoDNObCjnHgg4tGANdi+RmDy+7CDpE789H8dss9y7Pt5DlGGAXQQnt hxush3EYS/Ctprd9UUL/lzOOLOU1aNtzB84tNrJBtcJmL7OYHfyTSNFxvedqJrrasejIQOLI t/DQ89BPzz+vsKHz7FJPXh3fsVkzLA00DJYcfkgxyABfJNA7U6yMwd4DVSdx/SsvfIDMVXnu UXCXswo106WPZbYGlZPpq0wW6iibtTerJix+8AeuwXvl9O1p8yESK4ErkIxCnmghTSz+pdzj z/6xBRkdDM9VdZ0r+CzsaNXMpDOzFuKyjaiYBdgCLljbDnXIHFcqXenrZ7Xwkm09g/M4uVSh pIUG2RYa6tsHSQoGCp3f2RZv1znfViKQFbbL83QjtPA20AhseZSYbHp1FPhXyy9J0wkGL16L e99g6gdGeIRE82BZjBjKGDkoyDPq+oDRSFl8NtzmIKy+cfz00nViqcTF4bREXEawFGhlpO0X O9q8mijI9iFB6zaPBiSdJGBL5ML5qLTNCl8Zlf4m1TBvmRTqF/lzMHVXHidDoUhpSh/y3AFZ 1KrYc27ztJQywDJPJPWPbtY8YhFLFs377gfP8WldsZjzp8nvoQARAQABzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFARnJlZUJTRC5vcmc+wsGRBBMBCAA7FiEEglY7hNBiDtwN+4ZBOJfy 4i5lrT8FAmWMSrYCGwMICwkNCAwHCwMFFQoJCAsFFgMCAQACHgUCF4AACgkQOJfy4i5lrT++ ig/9GZKdN2fHSyrANKZX38ivd7IX2wAYouqH9DrQM94W8IciaDLmarN4Pl9mY+aucMwQUSyp uNtKOJwKqhVVaalF9Zw0sRMH4CJuvT7vKCtZ3q1Okb7soRvFte4d+vXhvPxCvBFDA5JzU7Lg DR5eqqcvF1dN1OuCq16pl0zCOSH/Jr5ToE3LM3Av1KBGcZD7ZSzHRWsFjV5AOUJKySuA3GwJ e/jASQcQ0YfCnru8ntLmYg/2SKvZFlfthZiCBnAppMt4n4BUAw3TDvf10HIDtdneejawcbLS gofLCvGqumwbZYAMKWrFzT4+7KQvr0pOw8QD7EbxnB4f9hQ7UiVF8qWsyKU3iv6b5JLhbS59 ooKRccyOvdMLcVJ0ZdpqoxrNv061ZUqLL5RiWjBlc1qjBnDxeg5oyM0rT8WLftdgvyH6RQt0 KWngumBAT5AT2DUYL8Uz1490cqfO9K4yEGZAJB9XRVX1g2IWTOjae+0g9ZII+h91UngFz+Rz aKDeseKBbCGDOFXx1TqKiHl2g255ZnUxKYTlucFtguv4gDGBgEk4G9JaEWBw1IWblcKhxH7L 2vWsUhvwghjIxHdO/RkeIeHvSp4YZxCJ7a3TaJLYAlwYopfTKVzNhcDY5h5syEuoHjyJCxXK SyoJYAVu8Yl2KUhvOtOmL1VZ6xyHnpdMRWKJZ5jOwU0EZYxKtgEQANYfgbtUMVnhjxDHhWLp g5kLHK3YW0TfJKzpXqDB7NiqxHofn4OcbZnVC3MKggcbs9o1/UtsjnlsG8550PfiYkDXvPiO RJwgbGs6MGIDK797C6cnBLQ8xwBa9SL4cl5iQFnhWmt6vwnJ+an/cm5JpYves3wL7jV09qU9 57hkHXEUcl38r4FssZzVcLKPUVTa3Un+QGRTGDGe/f4ctjMaqv0ZCM+l2ixPhf/vqESrfSLv V/+T3dmtUfXjazO3SABvsHwxgGuTTYOlKoPCaebr+BRdqm0xeIShoIlhvTI8y4clchqx/Uxg UG5X2kvU13k3DS3Q8uLE4Et9x1CcZT6WGgBZSR6R0WfD0SDnzufNnRWJ0dEPA2MtJHE7+85R Vi9j/IgZV+y5Ur+bnPkjDG1s2SVciX5v9HQ0oilcBhvx0j5lGE9hhurD9F+fCvkr4KdbCknE 6Y8ce8pCNBUoB/DqibJivOzTk9K9MGB5x0De5TerIrFiaw3/mQC9nGeO9dtE7wvDJetWeoTq 4BEaCzpufNqbkpOaTQILr4V6Gp7M6v97g83TVAwZntz/q8ptwuKQPZ2JaSFLZn7oWUpYXA5s +SIODFHLn6iMoYpBQskHQjnj4lEPJadl4qj+ZKA89iDAKsniyoFXsbJe2CPbMS1yzBxKZq6K D/jpt7BOnuHr/JrXABEBAAHCwXYEGAEIACAWIQSCVjuE0GIO3A37hkE4l/LiLmWtPwUCZYxK tgIbDAAKCRA4l/LiLmWtP3jmEACQrh9gWe8F1Tkw3m6VoHKwLc5he4tX3WpQa//soPO6iGG3 S3WPruQ46NrAaAojoOcKI9UONDO5rxG0ZTX53S+lu2EO47jbcLwOCjaEpjKpDRt9ZXBQE8Xl mtBE9Bp3W9gpjB1nE3KNM1mJYgsK0QdRpwwfh4pVgGpOj8j23I6MCK+v99zEBnpgCn2GX8W/ kctRXHqWwndHysOJtRP/zrl7dDaABF1f9efUl0LL3TD3GJ9VDz+DNOin/uK2a1hiJo8QzTRk PpfUQ2ebzDsrd1i/pOWkMSkdH+rEu4AGrXWtaBwrMyrGkL6Icb6yO+P9/z0W2wlgBf3P1YRt JPgQt/Dj3yvA/UnaV/QmuVQPjl13o24UnJGsZM8XGnNdfWBKkC1Q6VXC4QT+dyBHYH9MuE9d 6oGl8pFM1+cTfEfbM62/rRoPkF1yHMsI/903VxEvuUIKfhEZAVLFyHldooNxuchntHQP9y8J 8Ou9bWYQP7MnEn+kwSwrZkjurfPkan+xQvp6dDYnj3V0GwA5pprBMaB928VIDVOv+1PNQI3t Cvk5VPv/skq+TJRMHW7bFSt8PRa91cUf1FOLIz9APDiJOzXkwxUEHGV3zPSaUhs1JYjyBeGT wDAvtLUdjOnRhEUOwlnIrztmvyciutjJoVzKEEjj5WXnHk9L9kQ1bpAjkjTONw== In-Reply-To: <00D80914-D359-4834-B6F0-9CD66967F77C@yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/15/25 07:34, Mark Millard wrote: > Colin Percival wrote on > Date: Sat, 15 Nov 2025 07:58:59 UTC : >> Note that this repository is disabled by default, but can still be used >> by explicitly specifying it, e.g. "pkg upgrade -r FreeBSD-base". > > I and others reported that when FreeBSD-base is not enabled, > "pkg upgrade -r FreeBSD-base" does not do the pkg update > part of the activity (as if a -U was present if it was an > enabled repository). This prevents "pkg upgrade -r FreeBSD-base" > doing any upgrade that would depend on the pkg update results. > > In other words, only enabled repositories get the > implicit pkg update activity, even when the -r REPONAME > is supplied. > > I've been manually initially doing the sequence: > > Edit to have FreeBSD-base enabled > pkg-static update -rFreeBSD-base > Edit to have FreeBSD-base disabled I'll have to test further, but it looked to me like # pkg update -r FreeBSD-base # pkg upgrade -r FreeBSD-base worked? Maybe I had the repository enabled by accident when I was testing. If necessary we'll have bsdinstall put "FreeBSD-base: { enabled: yes }" into /usr/local/etc/pkg/repos/FreeBSD-base.conf when doing a pkgbase install. -- Colin Percival FreeBSD Release Engineering Lead & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Sat Nov 15 16:00:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d7zHW6xT4z6GX4j for ; Sat, 15 Nov 2025 16:00:23 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-24.consmr.mail.gq1.yahoo.com (sonic304-24.consmr.mail.gq1.yahoo.com [98.137.68.205]) (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 4d7zHW4NkDz3LvY for ; Sat, 15 Nov 2025 16:00:23 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1763222421; bh=PWisVExZN3lqa7L/j1YwB7kCnlGZYXCtxtJC2WCK/NI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=dgZ0Spwexk8CSLWMrKxPH9evM9xK//7+D8OSaKc9ngFexsSQsU5GRP5J60L1Ok9hlxdQ7z7ELj21vuQYUE2F98ueuTX/Z4kuh9SJZ5BAWlcokmb+JEPBQKA0ewgdsNI845ljXU4sBhRcCAjdvYBLY8NNf6AZYhVqAAAxy2fHLXuG2vCQDxpKajkD7L0lJPfKqjBEcArCXambf72HJCwgFMKHRhSUw2k27tp69/3evOVgxr7ubYuFor1cT2Nvlp0ZGud3kcCZCaYymryILWYqzzn5mNN0m1Hr6vm58ZG070hHLjjcCiZzTB8yB2PdCpxCclCT1WYmb2YQr7rMnmFwxw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1763222421; bh=NnXdxK+KAExG2DdJqhT5a9Zw7K7Y66alFGdd8uLNcAj=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=GRzOE5F58Lc28Pthc8xgDj6qhb1vrmUqyfgOaygNerJOPwhCerdUHAEukqU2ezBhepx/AqaTqZzlF7hwjN5wXyywvlqdE8Wc91N/ysGVLPgUZXyJenVGbmaIvdqakOTbQdSF1MO2Gmcutckxwh7CGeyuETljI+5HBZaIQ6p8DSyJT5Ba/gzZvK77LJ/Det7zHfWg0zl1S9Ht3Cpt+WWxWJwaNO2K0XQ9YTD+fR8BAuJIbhKIqbSMoLxhz9TSgC52/8rT73gPSyffUXYvYIw+cfpk/64ME/is4n4T/jYCgRx6YWCxbDyIOInW2iQcMBiA+yXMOBkn53norskP2GZ32w== X-YMail-OSG: SkLM..IVM1mHKicclBjcOfKIhrhLM2s13YnrPSiYt2FY.V.B96bMaM_8_psSA9t PzVg03tapBtocJei4cE8mxNFXW2OBarsmf3DkQT5gDSLKOrlSniS8lczBy978H2Lx_xuRId30Dd1 HEUnXGuvplllp0mjW66zDSRlKJjjDEOOs6bj8Z6BgwtKBUwxSKEirF1O7hcIzLr1MJ9ZhuIdTeQZ 0EeXcJjmFhvtMwMb8xIQeGkIOYzggvz1rkD1qlYo.T.Nrz2njQTSAR5g0fFGO3D548fHVTTKJ73l WmmorflBHDw9Pnl9hyo6JMxV0wJAwv5tNSN8ZfhiMYkc.B_aiaON6QSP3KAeZ069R.7WnapAmQTv uYXuEzC0nlnv2VnnuSjj0u7TKmz40W4_lsfoNhM3ArTAO9I8wWd_Trs_mzroa0DII.jO0gK8ArKg nT7gyWuqqBxMLR7k.ANx.rmO9aCwNa7QBENN7mNwKljcek7x6wdNL.gHuLw4sQXmZb_pxub2EKNQ r8jTsLalMPSpxCplioppUnMm81ED1QfEZeoicwQc8PhSLbgZZbwrjEAS2DBdJgMAwRowyQiKev14 eAGjXg0RGAwZfiyDUNx5wb0KKFfWaoa3geO7Fji01sxQfgoNZGC.56qHawpd1JUtTWG_J.BlHRar ZN56TkreIaGCcdfWUBVFG6NMC2x4mUVttE1pN4m5IdpTqiD3qleGISOCtQ1gZ72N6Y3w9TpDKXO9 DmVDUkFaAp0lk3nxNgOJ5L8sDfYJvrCCd_SMWVBRDj6DqXmCux3Ik0ihSe9lRbpAbCdlpx8ORpZr SQ4Dieiq22JPF0IYDZjQtKcL4dxf1cJgdAJEKV.3cojVEfR_mqJApz_yvkPXPeD5Pl2ZWYr_qvm8 U0Hx2ThU0ViDTR8O9XMZroV5J7rmelYtYTlEaMOCT.3fk5l4w.s85RXzYm3WeIQ6kFDRoiX58Ck. nH1SzESCHiVXM6mrvdb27SYAUWp4uKOuEJk64Fpg9WRQPNNRM.DgN4IUCXeivCjofAh5I__2phV_ QNtV3ZyHuBkzr.ZeGNapMyYvq.9eQRaL.653XZmQPsjoSv1cbwTKPBFby74mefHMmLtwKPKuO_Rq njqlCILey3p8Sx3jFc30DGHkAghZUROfm2gFvJ9.LMdAE8sDGDb2uNz2DfeLIw2dhidzvoEe_zHm JKtsMIVzd2Hk4mKwFCXHplp_SDU3BydeHCeH3Uy3dKXdpTysq2kUVkySHep.obtsARt1_Zpu2jyN icDTVeNujj49pr50gjCF.gdns7EeShQXu28THujZIjP2Zrp5rUs2z5AikkAL4r43S3cES9TP3Rvl gTRCXAxVSH0kMRAonaAB.7dm_uVeHp9a0x0TgBm3dtta9Q4Wup.E3pDPyOCpOP_jz3shz47r8LPy 1YVmINU0zJ70Sd1NBpQBxT9Wla2SFHbuT2fiHbM_Hy3A1dGHNx5ymU3HasJCrtzZkzYTD9w2fPE. 6RwmbkI4E.GOC4TW8z5xwKodEXjZXuU4VszmOP06QXhnu2BYihEGMEwyPNnig7fLdbxfuKjcUIiH 0kwgGthwb23lZk.QCqGegAG6cPwU7rX0o6CKJy7hGwVYnF7wKMYPP7iPYp2YqkTJsrfhpqiLtB3W uK5vOGLfzG8rNMILD6GOaZjt4cVzKY1TWlhS6Wqm9BbKf1WLSqpH.RL16w.N2kDoIZr6iWUSxzDz nIhByaU8vx39dyvEZ3k9bzurxEk6FvBnsaJ9JyrlYf1fUkJEgA0U8WbRD_v.oZrkc49MAhDyTkbB NvDDNNQQeKUFBuMt3LUrWu6uL693EprpnSokaBDKCgiuA9.byfJSlU73ECmjF1Tkq7ySWq90QA0b M0KinPVgUZwoICdmsds.BQRvNQcEQY2gZbw3TRgY9PNTYs.v1qXfXwlVEV.GB8XRmZ1tXSGeQngD Oz9YeoxYHsUZ6kvaiSfPIT5Bg92lQ_Xu08QRgzEAWGeP_74qrl8BmvV1RQ8zDZuSO4e5uMhPWftO 5fr0kgaKbxFNMhAd9AqKrZVbeUl6ZLZepfJejqDuIaZh2mfq181qtKUuchUeLkZo6v95IcCAXkAj MkdLioUXv3WRV8Q0_TZbWeVCp60PD6znU0uMqNds7wzILokDq1cBHitOxu8MBiXL7HPY6wv43M6m qeMHPT8dMhASHk5nhCejFExN5M.jTBlEG5OVXEkkef3fJYoInDQW8jYlC5qjWksV7yDHXCrmEmJW 7lGUcLF.kKOENw0yLNok4hVrqQX0o9DlawndEuaQsirmT3EvOjp6mFBGmhLlDF0HasHHfrWAigzm kkSCQ X-Sonic-MF: X-Sonic-ID: 07381d3a-3cba-4e33-881a-a015ca9f8802 Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Sat, 15 Nov 2025 16:00:21 +0000 Received: by hermes--production-gq1-76c986f798-xdrtt (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 65c6baa5fea557e05cc84b7fc5498bcb; Sat, 15 Nov 2025 16:00:16 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: 8e0b1a1c03a3 - main - pkg: Add FreeBSD-base to /etc/pkg/FreeBSD.conf From: Mark Millard In-Reply-To: <97e5bde2-eb6c-4e29-a9fb-d80c06c65efa@freebsd.org> Date: Sat, 15 Nov 2025 08:00:06 -0800 Cc: dev-commits-src-main , FreeBSD-pkgbase@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <00D80914-D359-4834-B6F0-9CD66967F77C.ref@yahoo.com> <00D80914-D359-4834-B6F0-9CD66967F77C@yahoo.com> <97e5bde2-eb6c-4e29-a9fb-d80c06c65efa@freebsd.org> To: Colin Percival X-Mailer: Apple Mail (2.3826.700.81) X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4d7zHW4NkDz3LvY On Nov 15, 2025, at 07:46, Colin Percival wrote: > On 11/15/25 07:34, Mark Millard wrote: >> Colin Percival wrote on >> Date: Sat, 15 Nov 2025 07:58:59 UTC : >>> Note that this repository is disabled by default, but can still be = used >>> by explicitly specifying it, e.g. "pkg upgrade -r FreeBSD-base". >> I and others reported that when FreeBSD-base is not enabled, >> "pkg upgrade -r FreeBSD-base" does not do the pkg update >> part of the activity (as if a -U was present if it was an >> enabled repository). This prevents "pkg upgrade -r FreeBSD-base" >> doing any upgrade that would depend on the pkg update results. >> In other words, only enabled repositories get the >> implicit pkg update activity, even when the -r REPONAME >> is supplied. >> I've been manually initially doing the sequence: >> Edit to have FreeBSD-base enabled >> pkg-static update -rFreeBSD-base >> Edit to have FreeBSD-base disabled >=20 > I'll have to test further, but it looked to me like >=20 > # pkg update -r FreeBSD-base Does not work when FreeBSD-base is disabled: # pkg repos -e main-aarch64-default: {=20 url : = "file:///usr/local/poudriere/data/packages/main-aarch64-default", enabled : yes, priority : 0 } # pkg update -r FreeBSD-base Updating FreeBSD-base repository catalogue... FreeBSD-base is up to date. vs.: # pkg repos -e FreeBSD-base: {=20 url : = "pkg+http://pkg.FreeBSD.org/FreeBSD:16:aarch64/base_latest", enabled : yes, priority : 0, mirror_type : "SRV", signature_type : "FINGERPRINTS", fingerprints : "/usr/share/keys/pkg" } main-aarch64-default: {=20 url : = "file:///usr/local/poudriere/data/packages/main-aarch64-default", enabled : yes, priority : 0 } # pkg update -r FreeBSD-base Updating FreeBSD-base repository catalogue... Fetching data.pkg: 100% 79 KiB 81.2kB/s 00:01 =20 Processing entries: 100% FreeBSD-base repository update completed. 507 packages processed. FreeBSD-base is up to date. > # pkg upgrade -r FreeBSD-base >=20 > worked? Maybe I had the repository enabled by accident when I was = testing. >=20 > If necessary we'll have bsdinstall put "FreeBSD-base: { enabled: yes = }" > into /usr/local/etc/pkg/repos/FreeBSD-base.conf when doing a pkgbase = install. Looks like that will be needed. =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Sat Nov 15 18:08:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d827Q0DYkz6GjKs; Sat, 15 Nov 2025 18:08:34 +0000 (UTC) (envelope-from markj@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d827P6jTyz3ZC2; Sat, 15 Nov 2025 18:08:33 +0000 (UTC) (envelope-from markj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763230113; 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=UW7jlcDAqu7bRYAvgbm5TdX+BM64CFikGogBL04o4KE=; b=acrPMzlakJQFxKAZQGsEfdTceGQxLIDkVsNSFm4ZR/z++D43kPzxtpsaNQLyfE5iP29T6C bUBPC7nBWdcCw/wUiEZu8xPf9IWsakpZ8LPFuLdL2mM/BTL9E41kkGEH6GemD/OJEUTxIo C5q/KTNHTjH7DLiFH3vOs/WPFoGfXrHNgSd9OaRkI7vpQ05TrFu8COo5Qz3lWLj+ZEh+L/ Xdmo7pwSRqv0VYfp6njZkSUL8R3APxZy6xjgZRtqfA0uUOafjvOw/xSB/9CgghbMADS6Ua fiIUrpkV/nDJFpNnT3JFKI7WrEza6fr3jLWTIQ8LE0ZbxmapRVlAqBIj+Ds3Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763230113; 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=UW7jlcDAqu7bRYAvgbm5TdX+BM64CFikGogBL04o4KE=; b=lQeDMj/uw7tZIwNqhae7Gk/R0oad0bdyglvHJCBcwHdzWe6vUWwp2bz+OYnz+JRSvWRXwR 5cBPHlgr2pZOmYkOnQz4d3o+rL2ja9k8LXOmA9llQNBskQ0gBBRA3FOFuht6j99n2G2T4N 7cNeLU+fvQoSx2I4BtnbDwGZ7IUoMl7Rs3GneMVTxov2se23m8yxLe2Cj7JN93NKmy3rTU cnoaC7u6oJZcFnUALDvdLsaJLF+ibeev5J+yBXXcTNJGJCvtOz1/4dFz1O12e2HBXlaYjD C/T8x3HfsRKL1JTvJOe/dreylNexyHqRxD8BMnIrpqo675Zl6Ca2ppG4QjYepw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763230113; a=rsa-sha256; cv=none; b=JMBcE1XYiG984d/4s7xlVHLBDeEGB1QFMadTUAwU5CwUBEKQ/yUOXyMp+C2P2UX0cPXJhP yHPt/XGk69V03Dk7nBoq7T/0Z9gROC2ryFFh/w7Xh8Wen6QXmlV96oPumWnrWXKWcRwxQM e03eDJKfQaA999uxgGsd/ZNN4UuOycpvEqgBWYaD30hgKWu1EFTg3yeLCHr53KEMq9r29A eXFleuXcLBrZpLOIPIXoyhYVwhJx1bQvMaN6QLw7400UdPvQvQIopiuvkluaLZBQslkZYu Ezl/nSAnVBqwab3Ui1dR/p0glRzSPmPyV0HVfd/4VLcNODXux3dx7d56LouosQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from nuc (192-0-220-237.cpe.teksavvy.com [192.0.220.237]) (using TLSv1.3 with cipher TLS_AES_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: markj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d827P41Nrz7X2; Sat, 15 Nov 2025 18:08:33 +0000 (UTC) (envelope-from markj@freebsd.org) Date: Sat, 15 Nov 2025 13:08:31 -0500 From: Mark Johnston To: Mateusz Guzik Cc: John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 99cb3dca4773 - main - vnode: Rework vput() to avoid holding the vnode lock after decrementing Message-ID: References: <202511111459.5ABEx8Co056214@gitrepo.freebsd.org> <854dff8a-555a-4921-ae64-4c445c7a03f7@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: On Sat, Nov 15, 2025 at 05:18:57AM +0100, Mateusz Guzik wrote: > On Sat, Nov 15, 2025 at 3:12 AM John Baldwin wrote: > > > > On 11/11/25 09:59, Mark Johnston wrote: > > > The branch main has been updated by markj: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3 > > > > > > commit 99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3 > > > Author: Mark Johnston > > > AuthorDate: 2025-11-11 14:47:06 +0000 > > > Commit: Mark Johnston > > > CommitDate: 2025-11-11 14:58:59 +0000 > > > > > > vnode: Rework vput() to avoid holding the vnode lock after decrementing > > > > > > It is not safe to modify the vnode structure after releasing one's > > > reference. Modify vput() to avoid this. Use refcount_release_if_last() > > > to opportunistically call vput_final() with the vnode lock held since we > > > need the vnode lock in order to deactivate the vnode, and it's silly to > > > drop the vnode lock and immediately reacquire it in this common case. > > > > > > Note that vunref() has a similar flaw. D52628 aims to fix the problem > > > more holistically, but this change fixes observable panics in the > > > meantime. > > > > > > Reported by: syzbot+6676b3ff282d590b0fb3@syzkaller.appspotmail.com > > > Reported by: syzbot+38e26cf6f959e886f110@syzkaller.appspotmail.com > > > Reviewed by: kib > > > MFC after: 3 days > > > Differential Revision: https://reviews.freebsd.org/D52608 > > > --- > > > sys/kern/vfs_subr.c | 7 ++++--- > > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > > > diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c > > > index 58975f7ac932..9cf983f6f89d 100644 > > > --- a/sys/kern/vfs_subr.c > > > +++ b/sys/kern/vfs_subr.c > > > @@ -3713,11 +3713,12 @@ vput(struct vnode *vp) > > > > > > ASSERT_VOP_LOCKED(vp, __func__); > > > ASSERT_VI_UNLOCKED(vp, __func__); > > > - if (!refcount_release(&vp->v_usecount)) { > > > - VOP_UNLOCK(vp); > > > + if (refcount_release_if_last(&vp->v_usecount)) { > > > + vput_final(vp, VPUT); > > > return; > > > } > > > - vput_final(vp, VPUT); > > > + VOP_UNLOCK(vp); > > > + vrele(vp); > > > } > > > > This commit results in reliable hangs for me when I do a 'make -j 16 buildkernel' > > in a VM where the source directory is mounted over NFS. Even if there is nothing > > to build so the make is just traversing all the directories. The hung process is > > stuck on a vnode lock. > > > > Some of the stacks from procstat: > > > > PID TID COMM TDNAME KSTACK > > 1858 100343 make - mi_switch+0x172 sleepq_switch+0x109 sleeplk+0x110 lockmgr_slock_hard+0x3c3 VOP_LOCK1_APV+0x32 nfs_lock+0x2c vop_sigdefer+0x30 VOP_LOCK1_APV+0x32 _vn_lock+0x53 vget_finish+0xaf cache_lookup+0x2be nfs_lookup+0x4e1 vop_sigdefer+0x30 VOP_LOOKUP_APV+0x57 vfs_lookup+0x5aa namei+0x35d vn_open_cred+0x592 openatfp+0x2b7 > > root@head:~ # procstat -kk 1860 > > 1860 100360 make - mi_switch+0x172 sleepq_switch+0x109 sleeplk+0x110 lockmgr_slock_hard+0x3c3 VOP_LOCK1_APV+0x32 nfs_lock+0x2c vop_sigdefer+0x30 VOP_LOCK1_APV+0x32 _vn_lock+0x53 vget_finish+0xaf cache_lookup+0x2be nfs_lookup+0x4e1 vop_sigdefer+0x30 VOP_LOOKUP_APV+0x57 vfs_lookup+0x5aa namei+0x35d vn_open_cred+0x592 openatfp+0x2b7 > > root@head:~ # procstat -kk 1855 > > 1855 100314 make - mi_switch+0x172 sleepq_switch+0x109 sleeplk+0x110 lockmgr_xlock_hard+0x3d0 VOP_LOCK1_APV+0x32 nfs_lock+0x2c vop_sigdefer+0x30 VOP_LOCK1_APV+0x32 _vn_lock+0x53 vput_final+0x269 vput+0xab vfs_lookup+0xa7a namei+0x35d vn_open_cred+0x592 openatfp+0x2b7 sys_open+0x28 amd64_syscall+0x169 fast_syscall_common+0xf8 > > > > This last one is kind of interesting as it calls vput_final? > > > > (kgdb) p vp > > $2 = (struct vnode *) 0xfffff8016bb6c898 > > (kgdb) p vp->v_lock > > $3 = {lock_object = {lo_name = 0xffffffff81467118 "nfs", > > lo_flags = 117112832, lo_data = 0, lo_witness = 0xfffff8043fd83900}, > > lk_lock = 39, lk_exslpfail = 0, lk_pri = 44, lk_timo = 6} > > (kgdb) p/x vp->v_lock->lk_lock > > $4 = 0x27 > > > > So there is one shared lock, and both shared and exclusive waiters. Seems like > > a vnode lock has been leaked? Or rather, the vput_final() in this case is > > called from vrele(), so the vput() for 1855 has hit the new path. I wonder if > > when it dropped its lock via VOP_UNLOCK() it is no longer eligible to re-lock > > it as it needs some other sharer to also unlock before it can re-acquire the > > lock in vput_final? LK_UPGRADE attempts don't block if there are shared waiters > > but only one 1 shared lock held, but if you do LK_UNLOCK and then LK_XLOCK that > > will indeed honor the other waiters and not acquire the lock, so a vput that > > held the last shared lock would have "worked" to ugprade before even with > > other waiters, but now it can drop the lock and then get stuck. I guess the > > question though in this case is that some other thread must have snuck in > > and acquired a shared lock between the VOP_UNLOCK and the vrele() and is > > blocked while holding it. > > > > Aha, so most of the other makes are stuck in VOP_LOOKUP on this same vnode > > (which I believe is "/usr/src/sys/dev" as in 1855 the vput() is inside of > > namei() and this is the state of ndp: > > > > (kgdb) p *ndp > > $9 = { > > ni_dirp = 0x481afdaa2d7d , ni_segflg = UIO_USERSPACE, ni_rightsneeded = 0xfffffe00d83d2d90, > > ni_startdir = 0x0, ni_rootdir = 0xfffff80005e461b8, ni_topdir = 0x0, > > ni_dirfd = -100, ni_lcf = 0, ni_filecaps = {fc_rights = {cr_rights = {0, > > 0}}, fc_ioctls = 0x0, fc_nioctls = -1, fc_fcntls = 0}, > > ni_vp = 0xfffff801bc007000, ni_dvp = 0xfffff8016bb6c898, ni_resflags = 1, > > ni_debugflags = 3, ni_loopcnt = 0, ni_pathlen = 1, > > ni_next = 0xfffff8000a0b0817 "", ni_cnd = {cn_flags = 8936259908, > > cn_cred = 0xfffff80005e53c00, cn_nameiop = LOOKUP, cn_lkflags = 524288, > > cn_pnbuf = 0xfffff8000a0b0800 "/usr/src/sys/dev/acpica", > > cn_nameptr = 0xfffff8000a0b0811 "acpica", cn_namelen = 6}, > > ni_cap_tracker = {tqh_first = 0x0, tqh_last = 0xfffffe00d83d2d48}, > > ni_rbeneath_dpp = 0x0, ni_nctrack_mnt = 0x0, ni_dvp_seqc = 0, ni_vp_seqc = 0} > > > > But pid 1844 is a make blocked on another vnode: > > > > (kgdb) p vp > > $24 = (struct vnode *) 0xfffff801bc007000 > > > > And that one appears to be the "acpica" child directory: > > > > (kgdb) p *vp->v_cache_dst.tqh_first > > $27 = {nc_src = {le_next = 0xfffff801bc01b9b8, le_prev = 0xfffff801bc01b898}, > > nc_dst = {tqe_next = 0x0, tqe_prev = 0xfffff801bc007058}, nc_hash = { > > csle_next = 0x0}, nc_dvp = 0xfffff8016bb6c898, n_un = { > > nu_vp = 0xfffff801bc007000, nu_neg = {neg_flag = 0 '\000', > > neg_hit = 112 'p'}}, nc_flag = 12 '\f', nc_nlen = 6 '\006', > > nc_name = 0xfffff801bc01b962 "acpica"} > > > > And note it's nc_dvp is the vnode 1855 is trying to vput and all the other > > makes are trying to VOP_LOCK in nfs_lookup(). > > > > So my guess is that 1844 was able to VOP_LOCK() "/usr/src/sys/dev" in the > > window between VOP_UNLOCK() and the vput_final() invoked from vrele(). > > > > Humm, except that the vnode in question shouldn't be in vput_final at all?? > > > > Back to 1855 (proc doing vput_final): > > > > (kgdb) > > #12 0xffffffff80c9bc89 in vput_final (vp=0xfffff8016bb6c898, > > func=func@entry=VRELE) at /usr/src/sys/kern/vfs_subr.c:3628 > > 3628 error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK); > > (kgdb) p vp > > $6 = (struct vnode *) 0xfffff8016bb6c898 > > (kgdb) p vp->v_usecount > > $7 = 14 > > (kgdb) p vp->v_holdcnt > > $8 = 7 > > > > Or did the other make's manage to acquire new use counts while 1855 was blocked > > on the lock in vput_final? > > > > Anyway, it seems 14 make's are blocked on this vnode (/usr/src/sys/dev). 1844 > > is blocked on the "acpica" vnode, and another make process (1856) is blocked on > > "acpica", but via getdirentries() instead of namei(): > > > > #4 0xffffffff80b62ec0 in sleeplk (lk=lk@entry=0xfffff801bc007070, > > flags=flags@entry=2098176, ilk=ilk@entry=0xfffff801bc007098, > > wmesg=wmesg@entry=0xffffffff81467118 "nfs", > > pri=, pri@entry=44, timo=timo@entry=6, queue=1) > > at /usr/src/sys/kern/kern_lock.c:302 > > #5 0xffffffff80b60fc3 in lockmgr_slock_hard (lk=0xfffff801bc007070, > > flags=2098176, ilk=0xfffff801bc007098, file=, line=4333, > > lwa=0x0) at /usr/src/sys/kern/kern_lock.c:693 > > #6 0xffffffff811b97a2 in VOP_LOCK1_APV ( > > vop=0xffffffff81aeeb38 , a=a@entry=0xfffffe00d8445c88) > > at vnode_if.c:2103 > > #7 0xffffffff80a6050c in nfs_lock (ap=ap@entry=0xfffffe00d8445c88) > > at /usr/src/sys/fs/nfsclient/nfs_clvnops.c:344 > > #8 0xffffffff80c83d90 in vop_sigdefer (vop=, > > a=0xfffffe00d8445c88) at /usr/src/sys/kern/vfs_default.c:1502 > > #9 0xffffffff811b97a2 in VOP_LOCK1_APV ( > > vop=0xffffffff81aada28 , a=a@entry=0xfffffe00d8445c88) > > at vnode_if.c:2103 > > #10 0xffffffff80cb6b43 in VOP_LOCK1 (vp=0xfffff801bc007000, flags=2098176, > > file=0xffffffff81359deb "/usr/src/sys/kern/vfs_syscalls.c", line=4333) > > at ./vnode_if.h:1316 > > #11 _vn_lock (vp=vp@entry=0xfffff801bc007000, flags=flags@entry=2098176, > > file=, line=, line@entry=4333) > > at /usr/src/sys/kern/vfs_vnops.c:1970 > > #12 0xffffffff80cb2d94 in kern_getdirentries (td=0xfffff80006cb5000, > > fd=, > > buf=0x2088dba27000 , count=4096, basep=basep@entry=0xfffffe00d8445df0, residp=residp@entry=0x0, > > bufseg=UIO_USERSPACE) at /usr/src/sys/kern/vfs_syscalls.c:4333 > > #13 0xffffffff80cb32a9 in sys_getdirentries (td=, > > uap=0xfffff80006cb5428) at /usr/src/sys/kern/vfs_syscalls.c:4287 > > > > The "acpica" lock is held by a writer at least: > > > > (kgdb) p vp > > $9 = (struct vnode *) 0xfffff801bc007000 > > (kgdb) p vp->v_lock > > $10 = {lock_object = {lo_name = 0xffffffff81467118 "nfs", > > lo_flags = 117112832, lo_data = 0, lo_witness = 0xfffff8043fd83900}, > > lk_lock = 18446735277917198210, lk_exslpfail = 0, lk_pri = 44, lk_timo = 6} > > (kgdb) p/x vp->v_lock.lk_lock > > $14 = 0xfffff80011ebd782 > > (kgdb) set $td = (struct thread *)0xfffff80011ebd780 > > (kgdb) p $td->td_tid > > $15 = 100314 > > (kgdb) p $td->td_proc->p_comm > > $16 = "make", '\000' > > (kgdb) p $td->td_proc->p_pid > > $17 = 1855 > > > > Oh dear, so that's the deadlock. > > > > 1855 needs to get an exclusive lock on "/usr/src/sys/dev/" to finish its vput() > > _while_ it holds an exclusive lock on "/usr/src/sys/dev/acpica". And the other > > shared lock on "/usr/src/sys/dev" is held by 1844 who is blocked trying to share > > lock "/usr/src/sys/dev/acpica" during lookup(). > > > > So by doing the VOP_UNLOCK() and then reacquiring the lock via vrele(), you've > > introduced a vnode LOR as the vput() of the parent directory can now try to > > re-lock the vnode of the parent directory while we hold a vnode on the > > child vnode. > > > > This should be easy to fix though. > > While the routine must not vrele, the VPUT should be patched to > trylock (aka LK_NOWAIT) and EAGAIN if that fails, which in turn will > punt the vnode to a workqueue. > > However, one has to wonder if failing to lock here will be frequent > enough to constitute a problem. There is a counter for these > (deferred_inactive). > > The following was only boot-tested: This patch also causes vput() to unlock and immediately re-lock the vnode when deactivating, which is a common case. For 15.0 at least, I'd rather work around the bug more directly: https://reviews.freebsd.org/D53774 > diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c > index 58975f7ac932..5cde78162e6a 100644 > --- a/sys/kern/vfs_subr.c > +++ b/sys/kern/vfs_subr.c > @@ -3640,11 +3640,8 @@ vput_final(struct vnode *vp, enum vput_op func) > break; > case VPUT: > want_unlock = true; > - if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { > - error = VOP_LOCK(vp, LK_UPGRADE | LK_INTERLOCK | > - LK_NOWAIT); > - VI_LOCK(vp); > - } > + error = VOP_LOCK(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_NOWAIT); > + VI_LOCK(vp); > break; > case VUNREF: > if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { > @@ -3672,12 +3669,9 @@ vput_final(struct vnode *vp, enum vput_op func) > } > if (func == VUNREF) > vp->v_vflag &= ~VV_UNREF; > - vdropl(vp); > - return; > out: > - if (func == VPUT) > - VOP_UNLOCK(vp); > vdropl(vp); > + return; > } > > /* > @@ -3713,8 +3707,8 @@ vput(struct vnode *vp) > > ASSERT_VOP_LOCKED(vp, __func__); > ASSERT_VI_UNLOCKED(vp, __func__); > + VOP_UNLOCK(vp); > if (!refcount_release(&vp->v_usecount)) { > - VOP_UNLOCK(vp); > return; > } > vput_final(vp, VPUT); From nobody Sat Nov 15 21:00:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d85xX0gRKz6Gy08; Sat, 15 Nov 2025 21:00:16 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d85xW6Qz3z3s26; Sat, 15 Nov 2025 21:00:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763240415; 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=dntIzyU0sul0slfh7RvNMkWLXtBO10XTGB62DH1y2yI=; b=fU/CB8TtMlJBftG0ix8Vh+INsStxKceovIcxjn/QS769XpLFR1CwchIBFbaOK4SVxHN5GI TTJBZkyBjj6+Bxms9XtZnE8ttdpMDYxn0ovKMoPLp0GRNzV83rCkQbXN0+k+BaQaqQH9LR T+Yodx5oiLCepfoS1BzeorjuK59uJ/m91Skfa9+aJlNGMPWud0AVzORHNHasBJigsE3N/6 1a3lr5bL1sxX2sPurEM/kLCwpzdTPdrB6VXbwxPE40ORwLBfsACwoQQ8wMM4oqMpiNy4wt 7rtwzKKhvna4AO90ItzusEfGDgvdgFcUSNGZFxmusvEYzcWFyyPPQYRi14qhOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763240415; 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=dntIzyU0sul0slfh7RvNMkWLXtBO10XTGB62DH1y2yI=; b=nbrKv9XIajrmmDQNsJh2ad8CE5PYKp3P/S63npAwkeO9Xha1ZWB9nScf+zrRjx3nI/vWvr FD5wQoxT6VX7BnmsrY0oaWylhKrr5Xk4PK0xXtfhMQWaGNAGNFP68Va4OexkyHOibD4qQl i8Sj+6bCN0dgQwlK1qRHZXLHg1f5MISpS6prD4E75RfVTqQzIGHghbIpWN7n4uEqnqvvLX j/eX2H19qpK3EoykmQYgD+haXnDmC0uDKeU7h+Kcr5kt1G4QheqtmmEfcMSRy6uBJQplCq r+EfpDiogJJGVtnRn7Eq4CYPni8JEeabj6CYHLTy8l6VKNBj/GKx5U0Ff3dsKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763240415; a=rsa-sha256; cv=none; b=DQrvW0zBum/UCMEke/qo3NUljxIgNLMJuvZEWfywNl3LaW6JrZy8o1egSDMck1tOBgSxty qJYVU39IRF5/sFwE6H3BnfQsSeCj/qDB3fH5FbJqnBM9zDvKxImDDviEBKhtD3hd/6odjN E+uR+n5veZ2QwP/6zMLinaHHQIrKSyC9X585LlvXK7avJuK2+f3+VwxfpV2OrlHV2WVQk1 5vxAarPles56RsZCnK1yCbp0aWwVP45sqdHnYurJWlWqbzDc0DSHAKE1bq6PkAa43uHmyp U2CcGLe0V3BWhe0rTGwX1HcAyWIzm5q1FXfHskyaP6lW5OxtfpyhqcA2WdWvaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E8" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d85xW4spPzC6r; Sat, 15 Nov 2025 21:00:15 +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 AF204A64805; Sat, 15 Nov 2025 20:59:59 +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 ED0462D029E6; Sat, 15 Nov 2025 21:00:11 +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 0Wh7W_HBSJ2x; Sat, 15 Nov 2025 21:00:10 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using 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 B1E1D2D029D8; Sat, 15 Nov 2025 21:00:10 +0000 (UTC) Date: Sat, 15 Nov 2025 21:00:10 +0000 (UTC) From: "Bjoern A. Zeeb" To: =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a615ded5bf2d - main - sys/conf/files: Add iwx driver In-Reply-To: <202511150319.5AF3JZxn087193@gitrepo.freebsd.org> Message-ID: <975p35no-15n8-q8o8-r154-r3517o4o6oqs@mnoonqbm.arg> References: <202511150319.5AF3JZxn087193@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: multipart/mixed; boundary="0-270227745-1763240410=:11296" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-270227745-1763240410=:11296 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Sat, 15 Nov 2025, Dag-Erling Smørgrav wrote: > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a615ded5bf2dd7f563eed6766d32fc063ae36f92 > > commit a615ded5bf2dd7f563eed6766d32fc063ae36f92 > Author: Dag-Erling Smørgrav > AuthorDate: 2025-11-15 03:18:45 +0000 > Commit: Dag-Erling Smørgrav > CommitDate: 2025-11-15 03:18:45 +0000 > > sys/conf/files: Add iwx driver > > PR: 290812 > Fixes: 2ad0f7e91582 ("Import iwx as ported from OpenBSD by Future Crew.") > Reviewed by: emaste > Differential Revision: https://reviews.freebsd.org/D53758 > --- > sys/conf/files | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/sys/conf/files b/sys/conf/files > index 87c8830b192e..53fcb80f2b8d 100644 > --- a/sys/conf/files > +++ b/sys/conf/files > @@ -2278,6 +2278,10 @@ iwn6050.fw optional iwn6050fw | iwnfw \ > compile-with "${NORMAL_FW}" \ > no-obj no-implicit-rule \ > clean "iwn6050.fw" > +dev/iwx/if_iwx.c optional iwx \ > + compile-with "${NORMAL_C} -DIWX_DEBUG=1" > +dev/iwx/if_iwx_debug.c optional iwx \ > + compile-with "${NORMAL_C} -DIWX_DEBUG=1" > dev/ixgbe/if_ix.c optional ix inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" > dev/ixgbe/if_ixv.c optional ixv inet \ Why would we add the debug flag in a default kernel compile? Should that the not be enabled in the driver code based on DBEUG or IEEE80211_DEBUG or like for other drivers be an option? For exmaple, we do have RTWN_DEBUG, ATH_DEBUG*, BWI_DEBUG*, BWN_DEBUG, MALO_DEBUG, MWL_DEBUG, IWM_DEBUG, IWN_DEBUG, WPI_DEBUG for various wireless drivers. I don't see what iwx should be special? -- Bjoern A. Zeeb r15:7 --0-270227745-1763240410=:11296-- From nobody Sat Nov 15 21:09:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d868M5Ybfz6GyLQ; Sat, 15 Nov 2025 21:09:39 +0000 (UTC) (envelope-from des@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d868M4rDWz3sx9; Sat, 15 Nov 2025 21:09:39 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763240979; 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=/Pylw8e7nzd0ULfObqQyW/s/M6fNvNtjFVAZFCuTEx8=; b=a1h243fnHulqdmFswvYzOxSTf6cxUoJYwiuen1tsK46KeeahIMVPJOD9ODd7Xnh62htuXy s8IXt6nMAWQQBnTlxOnQTfCt+/4KlieoMVgouq/AGSCwbrpAk8vKO+JtILWPI/XfxagMsm TafYH7Ct1v/pjpJuMy8AiE0pKk9SIWdEJKWoU8fYiuPkzp21BfcX5qXV8ZAYxdJMm8IvWZ UUs0Xi7bRdbFKDgcUxkh7MlU5GR5vOVfkfPBRcjlTsGzfbkDjpdfmpVKB01FaTwHKN8dAl 1xDiSfq9THHuf1GN/wr9lzJ9DDR3371qPzZS3zYQh3HyosNY5kazT03NLPzh1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763240979; 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=/Pylw8e7nzd0ULfObqQyW/s/M6fNvNtjFVAZFCuTEx8=; b=GnZkfB+Nn3n0kygxpKamDG4QlzoCLKBrxtWLhv1DdvFLdeJXpNUjgmYd1rvucU75HiS76H V7w9U7tpdnHS5RD1Lk+KHZbdjZfhXJ6dZQ/r7FtDgQ9HrUqKyus2wuma95Zl19l7pbtNY8 X9Hz/9uYO2vhuKCY2NgmKAKRJmCLDmG5iQ+nOrV5aUEw1toVaoXP/JjZF6ImM4PneRk9+z +Lt3ZxqDs+kDqWue2H6no37+EHlaX6bFXMVuu1sUQ4+kuFQaz+el+ma48dvPKPM0Db7KwD +YEJTF6r/fMwirLaq8YYgMYLx+pMEzSsbov6yWwkHHXNQa2i6Ak/7PsMonKvJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763240979; a=rsa-sha256; cv=none; b=ov8omCj5E/3He+Iv3GDuMDdooxhij1Av0mcBIoNwRZVDJwP5f1VUu2VYLZBqtyKfVXrA7c PGdernwGpsSkXyiayVMYkizMdlVXVkivk4A7eaJ5ia2NL5qW4wb8dITWXE+CZaot+B16/k ChlQfB0uQEyegSeqbftZFcFXPnaJaVXCeuvp0zFml+GW9rrhqbAWoZWiYilwDXBTEoHTv3 v9h/MZKoSxnDQtwtrg+TLaLAIxqmwfSx8iF5H6cTWqzMtY3lvmmSg8mdTGnEsSWLzk3Q40 wle5AmWQSMq9Xz4Iv0WwqmcNgwHIC64heFjDF7GSPuQfHE3Eu3Jgsxi+RlezWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (lfbn-nan-1-698-103.w86-236.abo.wanadoo.fr [86.236.35.103]) (using TLSv1.3 with cipher TLS_AES_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: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d868M3G7wzCKt; Sat, 15 Nov 2025 21:09:39 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 2B538A5D55; Sat, 15 Nov 2025 22:09:37 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Bjoern A. Zeeb" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a615ded5bf2d - main - sys/conf/files: Add iwx driver In-Reply-To: <975p35no-15n8-q8o8-r154-r3517o4o6oqs@mnoonqbm.arg> (Bjoern A. Zeeb's message of "Sat, 15 Nov 2025 21:00:10 +0000 (UTC)") References: <202511150319.5AF3JZxn087193@gitrepo.freebsd.org> <975p35no-15n8-q8o8-r154-r3517o4o6oqs@mnoonqbm.arg> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sat, 15 Nov 2025 22:09:37 +0100 Message-ID: <86346fuhny.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "Bjoern A. Zeeb" writes: > Dag-Erling Sm=C3=B8rgrav writes: > > +dev/iwx/if_iwx.c optional iwx \ > > + compile-with "${NORMAL_C} -DIWX_DEBUG=3D1" > > +dev/iwx/if_iwx_debug.c optional iwx \ > > + compile-with "${NORMAL_C} -DIWX_DEBUG=3D1" > Why would we add the debug flag in a default kernel compile? Because the driver doesn't build without it. Feel free to fix that, but don't forget to turn debugging off in the module build as well. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sat Nov 15 21:33:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d86gh343vz6H1Kk; Sat, 15 Nov 2025 21:33:20 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d86gh2LqZz3x8s; Sat, 15 Nov 2025 21:33:20 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763242400; 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=V+VmkTzZdhgm125Ez73D0jen+kRYLV34H28ZpoC0rM0=; b=DqNTP1YvFIffgcszGYeRpyX4CXwKAm+Mkj+sTq5gK5vz7fjEHEbyq0s6EJXckKax0o12yc stdZeV45IFilY+JAcWuOoptdMWmVkKkHvNwAl9ML/j8sgtSTSCIqSAQCZnEs6opLBYOUW6 tVSBQ+71CWu/ZiX/UDzVBtCn2mzSW1/jGSj+PRkqvuOQNxSM7REw8MrtkpJMeaS6loDcmQ ilpm9Z5+fE4Sr5rcGqmJJh+XH+FMk5e4WftbdE2dOqT4iKt3oZTwW8IHSnTb+wQfznMAv1 n4N0BudEOTkgx9Dm896ZHyvCEIiqP7gFG/4/GNIvpNVo+R5CQeuxNQInzSNrOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763242400; 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=V+VmkTzZdhgm125Ez73D0jen+kRYLV34H28ZpoC0rM0=; b=hJMEfwg+3AfjgVDtkl6HVvMuhY835yrcDQhPDI4OZ0C5WT49BcDSRbPOcJkaItXx06zxqq kOhsXqlxNea3Lp7GpXUIKDVMvycKkAFm181gv2rF2AJSHHHtVoRe+RgkV7RS3PRLv/t8wB YDTSMrB+WthobSLU3noK5y4ihb/XJY0tCLzexjuGwoy/AEFCMqDlKUPxTAkBVQ0LxNksBN DBg68/HYz8FMK/KW4H6X6oOHYVyLPSHGcqhPBfSphYKkdTyX8LOfoQ3k11ulXgCtiGUtqd xc7ACUa+rezzGBnALExj5whqf16osDJKkZb7xL0XNQMkDdT+kNukQRLn8kPV1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763242400; a=rsa-sha256; cv=none; b=NQ5izqotLMfFPj7FgQgv3ZFZChi5b6ehol1klI4x788PdXHkBd8eCIUGTFY56+6ombd6CV jsy58VmoW5WCnYrqVuld9elXSTuxUkIpSvrPE12ldBHVuk39xSWaaOjBd5tSySlXorjWou WZRh4WbctzGxTp1/BpRjNtuaj+ATFtyxdqls+J4a10IejnRAjliW97Y0IPt8BMc3x+0VGD jJvZHasQN0D60lOxYnvCxz2g66DZYo+rIR0Y2pPsA9nq+WAvpzroKvQscEbwGjJIJtnAXF z8dUsnYnL7lsN58zEBMDtHZlN44roRGpDjIlM9nEv3vT9p8tq5oMkiVJ3p6Gxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E8" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4d86gh0mYjzD0m; Sat, 15 Nov 2025 21:33:20 +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 187A7A64805; Sat, 15 Nov 2025 21:33:06 +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 6CD242D029E6; Sat, 15 Nov 2025 21:33:18 +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 pSi3KF_-LgYH; Sat, 15 Nov 2025 21:33:17 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using 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 2CC392D029D8; Sat, 15 Nov 2025 21:33:17 +0000 (UTC) Date: Sat, 15 Nov 2025 21:33:16 +0000 (UTC) From: "Bjoern A. Zeeb" To: =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a615ded5bf2d - main - sys/conf/files: Add iwx driver In-Reply-To: <86346fuhny.fsf@ltc.des.dev> Message-ID: <462npnsp-7o16-q664-65pn-q6o76rrp375q@SerrOFQ.bet> References: <202511150319.5AF3JZxn087193@gitrepo.freebsd.org> <975p35no-15n8-q8o8-r154-r3517o4o6oqs@mnoonqbm.arg> <86346fuhny.fsf@ltc.des.dev> 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: multipart/mixed; boundary="0-575627910-1763242397=:11296" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-575627910-1763242397=:11296 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Sat, 15 Nov 2025, Dag-Erling Smørgrav wrote: > "Bjoern A. Zeeb" writes: >> Dag-Erling Smørgrav writes: >>> +dev/iwx/if_iwx.c optional iwx \ >>> + compile-with "${NORMAL_C} -DIWX_DEBUG=1" >>> +dev/iwx/if_iwx_debug.c optional iwx \ >>> + compile-with "${NORMAL_C} -DIWX_DEBUG=1" >> Why would we add the debug flag in a default kernel compile? > > Because the driver doesn't build without it. Feel free to fix that, but > don't forget to turn debugging off in the module build as well. Took me 3 minutes to make it build without IWX_DEBUG: https://reviews.freebsd.org/D53776 No I did not add the kernel option yet... whoever needs it can but could likely equally just add a #define IWX_DEBUG to the source file. /bz -- Bjoern A. Zeeb r15:7 --0-575627910-1763242397=:11296-- From nobody Sat Nov 15 21:39:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d86pN2X2gz6H249; Sat, 15 Nov 2025 21:39: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d86pM5zfxz40nt; Sat, 15 Nov 2025 21:39:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763242747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vyYbNULhlw6mq9icAILHzMFGocJuMkYE1zip57roR24=; b=oNImpRt2f+Jv/xn6N+sBZ6Q7bpdQuZZq8wTJIw0w3o3oAXTzKcV9Qj790tvQUOoFdneUED 6lguiyyL0+/uPvA8PSdhpYX42cWeSA6LJCIh1FS5+VWKpA/hOt9pi/OJ5bv3EKGSFMFG+G AmJzG4CyPNJo2BKjakUGn4Yo/EQuDPbc00RhhYdjfQcPqaiEYHeLDb5StmAKFRYIry09dJ WaFS+yvpF1u4zL5XyTPsfJYu0RIqXTVr4YSVAo/x8n46D+xa/YohUhUbany2qS1TRVUh5o cqIELvo+GvWbDmjcHj+Cx10W7SnL8MSbml5ohmLJ1JFNIfnDR8wdDfxG/bPPtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763242747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vyYbNULhlw6mq9icAILHzMFGocJuMkYE1zip57roR24=; b=Z11DljzPyjs2JsmHrbmBkOuZD7Itr13Z8B6sMnz4YbkCDxjkmkcjzJWIMsiQo6eiStNCQs qRylaprfzXRMTjSoPMmykqkQGib2HXJ3YuAEhwTRX1XPNVER93vwWn34+NgC4HmXF/tpHv 7QNos6BqsNvnCBmW64d94BhA7988Dsn+8Qc4cmEN8LJFYdddOl3LSV7WZror2xD06V42TI 6ugWLnVOGv3eCSVwBfmIGPn209LuE45uk5eU/MI8Vy9bzrpIUvxOpyB+N0WqtC+TGaQ6FZ Bx3ce5IZiVkUmgAko0UClvusvAxMyGX+mIOJxNSImOA6s7RX9/2Arorvdse7fQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763242747; a=rsa-sha256; cv=none; b=iPrAcYjt6XaHVnksEk36chqThPWefo73o3hcAqBa+5q1ePF63SuyEsyscSHnfZ0gfH3fhj +1KFI6S0VQpu7TKduD4K53y1H5ShxCSelWlH7qFzjhRMYkGmi1QA12f1A8TECWXdjTEtBz +r2En8U8JrDL4A1hmUbjLutzlY+FB6yvNhmQXkY8nRLuyITr9AZXUZbBhGJ2i6IVdjufCr 0rxq3T3gqiae3lyeKkYAfzG/K6RVGwkCiwWU4FyBFuI7K70xBMmnu8HxfJAtQRP1IK/BNU EAg6VOY666TF7jQjv3YGaldlhIG0lUB9IBT31NoWTikhxVjNI93OGO6RaKCd6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d86pM5NXfz18mY; Sat, 15 Nov 2025 21:39: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 5AFLd7kK054359; Sat, 15 Nov 2025 21:39:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AFLd7w3054356; Sat, 15 Nov 2025 21:39:07 GMT (envelope-from git) Date: Sat, 15 Nov 2025 21:39:07 GMT Message-Id: <202511152139.5AFLd7w3054356@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: 66f2f1c83247 - main - pf: handle divert 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66f2f1c83247f05a3a599d7e88c7e7efbedd16b5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=66f2f1c83247f05a3a599d7e88c7e7efbedd16b5 commit 66f2f1c83247f05a3a599d7e88c7e7efbedd16b5 Author: Kristof Provost AuthorDate: 2025-11-15 13:44:54 +0000 Commit: Kristof Provost CommitDate: 2025-11-15 21:38:21 +0000 pf: handle divert packets In a divert setup pf_test_state() may return PF_PASS, but not set the state pointer. We didn't handle that, and as a result crashed immediately afterwards trying to dereference that NULL state pointer. Add a test case to provoke the problem. PR: 260867 MFC after: 2 weeks Submitted by: Phil Budne Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 20 ++++++++++-------- tests/sys/netpfil/pf/divert-to.sh | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index a39f5fe58cd6..5e919e35b07b 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -11075,10 +11075,12 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 break; action = pf_test_state(&s, &pd, &reason); if (action == PF_PASS || action == PF_AFRT) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule; - a = s->anchor; + if (s != NULL) { + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); + r = s->rule; + a = s->anchor; + } } else if (s == NULL) { /* Validate remote SYN|ACK, re-create original SYN if * valid. */ @@ -11127,10 +11129,12 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 default: action = pf_test_state(&s, &pd, &reason); if (action == PF_PASS || action == PF_AFRT) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule; - a = s->anchor; + if (s != NULL) { + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); + r = s->rule; + a = s->anchor; + } } else if (s == NULL) { action = pf_test_rule(&r, &s, &pd, &a, &ruleset, &reason, inp, &match_rules); diff --git a/tests/sys/netpfil/pf/divert-to.sh b/tests/sys/netpfil/pf/divert-to.sh index ae44cd5d51af..153136199311 100644 --- a/tests/sys/netpfil/pf/divert-to.sh +++ b/tests/sys/netpfil/pf/divert-to.sh @@ -372,6 +372,47 @@ in_dn_in_div_in_out_div_out_dn_out_cleanup() pft_cleanup } +atf_test_case "pr260867" "cleanup" +pr260867_head() +{ + atf_set descr 'Test for the loop reported in PR260867' + atf_set require.user root +} + +pr260867_body() +{ + pft_init + divert_init + + epair=$(vnet_mkepair) + + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -c3 192.0.2.2 + + jexec alcatraz /usr/sbin/inetd -p ${PWD}/inetd-echo.pid $(atf_get_srcdir)/echo_inetd.conf + jexec alcatraz $(atf_get_srcdir)/../common/divapp 1001 divert-back & + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "pass in on ${epair}b proto tcp from any to port 7 divert-to 0.0.0.0 port 1001" + + reply=$(echo "foo" | nc -N 192.0.2.2 7) + if ["${reply}" != "foo" ]; + then + atf_fail "Did not receive echo reply" + fi +} + +pr260867_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "in_div" @@ -383,4 +424,6 @@ atf_init_test_cases() atf_add_test_case "in_div_in_fwd_out_div_out" atf_add_test_case "in_dn_in_div_in_out_div_out_dn_out" + + atf_add_test_case "pr260867" } From nobody Sat Nov 15 21:41:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d86sZ1PL4z6H1rb; Sat, 15 Nov 2025 21:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d86sZ0Vpbz41TT; Sat, 15 Nov 2025 21:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763242914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JuV/1u/zWW0utmFFzZjtTCq4soZlw8LNdbya3bKl+As=; b=QXwhOmeeMjr+MW0GLoVJ2qR/iZKi4UVsEgCsfFEwd3Zs8tKZcmgBUdo228hlLsPLJ9Zzbz W1gp8uuRcN7tkL0yemb/Pfl+469v3tsgvhvJioqQipQCY8Ptf9G2D+bHMtRe8OvQngoJas MqrR5Sd5YByySXOvcnv4yxe0JG9jS8hPrD+T4hwL/j8uz8JzQB2RakjBovvjyqlKL2q03N +dCSXw7z2KYKoueEKtkNGNV2SuO+lC1C0UTqNv0eakGTHsPgFVxRJvxS32qZdSRtV7v8zD xgMR7us8Xg/pGGRWPqcZfs2ILY6r+eDMmHMPJ4gSxvz7xulSOkOrz0b8J6vGRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763242914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JuV/1u/zWW0utmFFzZjtTCq4soZlw8LNdbya3bKl+As=; b=bbEX+gxE+XiPOIBwUuZkUARy+mGlNCHVtyyU93FrLIPf6ENnk3BlSw4/6MlMOuVPpmP/wV offj7gdWrTddcbtZMkvnHgzKezE2vAwGZKgqBoBiG/26raZ1QSh+mVTDECKtm62H+WK8im /C/xLNG4vLKbOuo2PxB2o/rm8kTFnT0dlEQgnpkb/5pLKW69TMrHCGSORCNMu3B2UiBXMy DFIHh8HqRpfrQjSeLvg4RZa3xoI8Y/SKAnnlBnwcpvC5iA8/7gQ4+6neVowYWyoaJsvjf6 OPI2TKeooi0HfUkDgnEeLoc7xyNkO7LLaIqdQ/5dsJ/6i/zFYGNiKt5XmsTkrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763242914; a=rsa-sha256; cv=none; b=szQQfVCMSLu/GNLQbSdbV6MZsYAjhyPeB/R9RJ1zdNTxCn1n2PxXDMfE3Mv6OQlAx+gvge JyQQZWfD5eYsnMQEyr1XvGS3ZQ0aJrCtXNaMabACSmCRspuv7xkfOxuXI+1H4C+38VenMZ kGhUVPkV+9kPpU3FoBXrvrcK9nFqGj9Da4/2dAe+e6KYU9rH0qsRa9ZZrt9DycL8Qjz8TF it2Xgf4VKDYI7OwY19lnDMDUwxVoRlZvSuCmisQz0d/spsGK0l4nDDIRLrt7dAQLmEEWvo s/N2QDO9/8VHyPJ5QK970jicdbY4whvzQvYwUEKZu/KyK8dpQDHIq6hKZjiBhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d86sZ04FRz18n7; Sat, 15 Nov 2025 21:41: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 5AFLfrX7067623; Sat, 15 Nov 2025 21:41:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AFLfrBH067620; Sat, 15 Nov 2025 21:41:53 GMT (envelope-from git) Date: Sat, 15 Nov 2025 21:41:53 GMT Message-Id: <202511152141.5AFLfrBH067620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 10a4f2d016dc - main - vmimage.subr: Log pkg/local.sqlite if pkgbase List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10a4f2d016dccb5cfa03800bebc09a9b421c4df7 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=10a4f2d016dccb5cfa03800bebc09a9b421c4df7 commit 10a4f2d016dccb5cfa03800bebc09a9b421c4df7 Author: Colin Percival AuthorDate: 2025-11-15 21:29:25 +0000 Commit: Colin Percival CommitDate: 2025-11-15 21:40:57 +0000 vmimage.subr: Log pkg/local.sqlite if pkgbase We were doing this in vm_extra_install_packages but VM images without any extra packages installed would not get this installed. This results in a pkgbase system which thinks it doesn't have any packages installed (even though all the files are right there). Add a "metalog_add_data ./var/db/pkg/local.sqlite" call to the pkgbase install code path, and make the call from vm_extra_install_packages conditional on !PKGBASE. Reported by: Michael Dexter MFC after: immediately (needed for 15.0-RC1) --- release/tools/vmimage.subr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 92f00f9cf7c3..482d279e5987 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -106,6 +106,7 @@ vm_install_base() { $pkg_cmd update selected=$(vm_base_packages_list | vm_extra_filter_base_packages) $pkg_cmd install -U -r FreeBSD-base $selected + metalog_add_data ./var/db/pkg/local.sqlite else cd ${WORLDDIR} && \ make DESTDIR=${DESTDIR} ${INSTALLOPTS} \ @@ -219,7 +220,9 @@ vm_extra_install_packages() { -o PKG_DBDIR=${DESTDIR}/var/db/pkg \ -r ${DESTDIR} \ autoremove - metalog_add_data ./var/db/pkg/local.sqlite + if [ -n "${NOPKGBASE}" ]; then + metalog_add_data ./var/db/pkg/local.sqlite + fi else if [ -n "${WITHOUT_QEMU}" ]; then return 0 From nobody Sat Nov 15 22:06:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d87PY1xJpz6H3c5; Sat, 15 Nov 2025 22:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d87PY18HGz43Tg; Sat, 15 Nov 2025 22:06:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763244369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y0C43D7Ix76rZSztnrC25OJlLJ6Rq4qy7Vv2q8AUnME=; b=mmlMOLRDXSOZfS2PEGP4+O0WC8GzWmTaCG4uHP0BHyur+SyjP68h7tj6tcZ+3Jt92eViNX tVt2zw6oH5/m8Lf9XxkQjXrmueEIQMRjCJZVL/j40a+HxK2EcPz+hsKax87myrKkVy/DKW YXamTAZCaq8ETcNNRlSxHCtb23ZlJBYLquk9F/8Rz2V4sPcS6L6TOA2E2iKl4PfwGiud/s 4JH3ridvWgLDRa/7mn24Czvlatww5uOAieet24MAfEE/rTwYiqcjNR3MyOukayg44XUDm+ dEc4t+GbbXPWKuQOZqRUNhWsavKrI4BffiOvRrnAyc1OnmP15O5Od2tYN9HOjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763244369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y0C43D7Ix76rZSztnrC25OJlLJ6Rq4qy7Vv2q8AUnME=; b=VcumznMBD60HhZRvbIt2PkME/93dr7/ws4pH4LpH9kbCw7QopRa/urVhjwsSD+lwVYf69l CiCiVO6H5+MSBmRE/9gVtwtkYC8szyeABYiHc2WrT6Xtq0Yy1793RtVcuObDE3MJ09aEgx zxZhcqnr56A8+XO9ZqtwB1aTZtMKKbzg0u7sreYZQ3YzJDDWPxZjEh2ROqfbaL3J6rvy1c 6wgto1kWVsltDrIWo65l42tbZvyrZJtn5yuElRusfBMoV+ws3tIqA0p6zBeMQHFq8/oXuE uvAF6kaZhaVfq3HIbMt54sVancnlA5Iyxg9lbgncSc6P/iTa2TVBwyNFVhJ3ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763244369; a=rsa-sha256; cv=none; b=bucIeq2jAYzy0DA1Do2lw89xiz3rNpJS9l32u6MqEI98XKJbh/CYc8acC2ssjLr3UnII5r NT1eISzPi19jMRdaGpiBNAGaj/rh7prJIRqRKqLY0BnAUvKvzIcSurP+A//X7AFj7HQGPX Dq8Vowkw3ZEMRXXYR1ElS9AFpFuWBJ/hkDw4oqNsTp54SrUipMeIeVNMEScCNqyXe8oi6t rYtj+8cbxznJcM0oo83l9WemyqmhB3HC9IaYwH2A4D/QA1kCm6+aK9U7FQaeRDkCa2wTCA JJePWDdlqZNES7PRO/GOxZ10dW/JBNhGH7zNQah30l9z0cd2iPvGajz6PDOIKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d87PY0X9bz19HC; Sat, 15 Nov 2025 22:06: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 5AFM69h1010793; Sat, 15 Nov 2025 22:06:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AFM696J010790; Sat, 15 Nov 2025 22:06:09 GMT (envelope-from git) Date: Sat, 15 Nov 2025 22:06:09 GMT Message-Id: <202511152206.5AFM696J010790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: a96230e0329b - main - bsdinstall: Enable FreeBSD-base repo when pkgbase List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a96230e0329b32cbee0999813787a86eab521da4 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a96230e0329b32cbee0999813787a86eab521da4 commit a96230e0329b32cbee0999813787a86eab521da4 Author: Colin Percival AuthorDate: 2025-11-15 21:56:35 +0000 Commit: Colin Percival CommitDate: 2025-11-15 22:05:50 +0000 bsdinstall: Enable FreeBSD-base repo when pkgbase When performing a pkgbase install, create a configuration file in /usr/local/etc/pkg/repos/FreeBSD.conf which enables the FreeBSD-base repository. (This repository is defined in /etc/pkg/FreeBSD.conf as being disabled by default.) Reported by: Mark Millard Reviewed by: markj MFC after: immediately (needed for 15.0-RC1) Differential Revision: https://reviews.freebsd.org/D53777 --- usr.sbin/bsdinstall/scripts/pkgbase.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in index ddbf8eaf4f86..89ddc244171e 100755 --- a/usr.sbin/bsdinstall/scripts/pkgbase.in +++ b/usr.sbin/bsdinstall/scripts/pkgbase.in @@ -355,6 +355,10 @@ local function pkgbase() if not os.execute(pkg .. "install -U -y -r FreeBSD-base " .. packages) then os.exit(1) end + + -- Enable the FreeBSD-base repository for this system. + assert(os.execute("mkdir -p " .. chroot .. "/usr/local/etc/pkg/repos")) + assert(os.execute("echo 'FreeBSD-base: { enabled: yes }' > " .. chroot .. "/usr/local/etc/pkg/repos/FreeBSD.conf")) end pkgbase() From nobody Sat Nov 15 22:06:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d87PZ3Fbpz6H3wn; Sat, 15 Nov 2025 22:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d87PZ2B28z43Fh; Sat, 15 Nov 2025 22:06:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763244370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TQDXIiHwyQiP/qhsFftxm0WzavZT669voeJ7UqeNiNw=; b=R9o9Id5q5jQIzRHdPrU1L8AA/hVXcx1NQX8quAwk7i5QzDU3x94vSp3hcYJFUoMxwHldzh 3+5l/yxCAopbch8SxEI43MU4KD5S9XbUSomIj4Rf0GzUP76155YRwp0A/fT+BUZuFq7kA7 uoKd4lsRKYlzMC6YvWCWJjZstT9LHSr+kjwIpS1bYsrkqv22NOSgaOGpeifFtYkGTENq7f BfieHe4Q+PZKdIYFtOs8S4Xi4bUGAQo2ypLQrkSf9Hh7Dk0SEH9mQEZEDuobLb9wVJUvT0 n4knEwd3zeUl7YIvKQPwlRYySW+tBUZ4kcIxf1aJyECtf65fueDsQKGTFVCqcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763244370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TQDXIiHwyQiP/qhsFftxm0WzavZT669voeJ7UqeNiNw=; b=iRhS5Y8ySkPwtE4Cg4w2Rm6fpKE4y5gqcV+CBHnfmHuS6izsh+hjlXZcR/9SOfNlG1sMXr CLaDSyJxDa0jQ3E/rgvfOUkVRcQECNsC0mlTs3E14clAo0pnGR8dVGnx8FddLBuUfpbBTb iO3A8oYaLNJD4aesVZ/91s0b/J7XBfcUNt1TEufmk4MUJ+lOaJt0KFmlwgw7Ld5dXELW8Y NOkDBPIaKbgdvx7egMeyTNF8atYp4WyH5ui21gJWyvnu60eea/hceRXBRY+TMuoTv34B/z 6c4bfRWlV4ftOkpiZ+Gy1lbvLreU0LoRb14ss3gAYiUlnst2+f2GXAGxl7fJ4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763244370; a=rsa-sha256; cv=none; b=CmMxd4Z1ERM4nd8rBKIeJbLxPOz7AKqpQy0NTcyffGy4oX4KBIxrDXZO3JI44IFyNdZTb6 s8B/d5WQZS5Zaf1P4Jai1WkmdUrIj89z3sp+4iOlnfugdRW54WITfoMOVF1tAv2GQ5ephQ My1p32prNTlKCqHqd/zLDcCD0WMyj4orBJf55mEcDgPEV8SwAxNlwOu1UKRC5/BQ18MGv8 ScUdhmmSClC15DDQW3C7fnpgFRxVWdwuh7Bs0UHwUvshAP0Dze1buCZOdzKgPrsLgZ7Lz5 HZulubitEiRrTyfCmU9Yf2RPWU3gvhe6ZVxyGnSfBMkh30G0cBRjnJNaE7bLlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d87PZ1nV2z19RF; Sat, 15 Nov 2025 22:06: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 5AFM6AZG010825; Sat, 15 Nov 2025 22:06:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AFM6APt010822; Sat, 15 Nov 2025 22:06:10 GMT (envelope-from git) Date: Sat, 15 Nov 2025 22:06:10 GMT Message-Id: <202511152206.5AFM6APt010822@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: e0c41af9256b - main - vmimage.subr: Enable FreeBSD-base repo if pkgbase List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0c41af9256b5c5a6c97c85d468ff734e29f1bd5 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e0c41af9256b5c5a6c97c85d468ff734e29f1bd5 commit e0c41af9256b5c5a6c97c85d468ff734e29f1bd5 Author: Colin Percival AuthorDate: 2025-11-15 22:00:16 +0000 Commit: Colin Percival CommitDate: 2025-11-15 22:05:58 +0000 vmimage.subr: Enable FreeBSD-base repo if pkgbase When creating a VM image using pkgbase, create a configuration file in /usr/local/etc/pkg/repos/FreeBSD.conf which enables the FreeBSD-base repository. (This repository is defined in /etc/pkg/FreeBSD.conf as being disabled by default.) Reported by: Mark Millard MFC after: immediately (needed for 15.0-RC1) --- release/tools/vmimage.subr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 482d279e5987..3455f11d9794 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -107,6 +107,10 @@ vm_install_base() { selected=$(vm_base_packages_list | vm_extra_filter_base_packages) $pkg_cmd install -U -r FreeBSD-base $selected metalog_add_data ./var/db/pkg/local.sqlite + mkdir -p ${DESTDIR}/usr/local/etc/pkg/repos + echo 'FreeBSD-base: { enabled: yes }' > ${DESTDIR}/usr/local/etc/pkg/repos/FreeBSD.conf + metalog_add_data /usr/local/etc/pkg/repos + metalog_add_data /usr/local/etc/pkg/repos/FreeBSD.conf else cd ${WORLDDIR} && \ make DESTDIR=${DESTDIR} ${INSTALLOPTS} \ From nobody Sun Nov 16 01:57:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8DY266p4z6Ghvy; Sun, 16 Nov 2025 01:57: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8DY24VZqz3ZHJ; Sun, 16 Nov 2025 01:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763258278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7/ofHib0EHjbnvLMQ29uojQd8VIYJMbnx0LZpNe8tZs=; b=brOu0e2CaczVgAi9xiIsdBB6mc/wXh5Lb7l6YZGOCFeoEeYtd7yxWwKUM15N6ipJREo4ke 1TNhzioBMa9U32f9PUiDcb0lXXu8xs77ewNgCBS2fTaJwGIsaMYd6m/gNKPMVwtPNFavOY dgCPU6LJ8olH4Pissx90DMd3BEa/oNk/hTc2LVITyykHtUCd5jerv3Ru31c7f0Q5aiZd2W A3Dcpoo1NAh1O9GeLzc4QiMsEloFqTJhHNF8/9q/qdVb5LIBtiVLOhBXKXtri83v/Q0EcF YWiwjNFecVP0CHYBCYyBVjOxnDDn5hPxHJkSlLc/RpcqLiUaKCZG/CVtzuLuvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763258278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7/ofHib0EHjbnvLMQ29uojQd8VIYJMbnx0LZpNe8tZs=; b=m/p/KgvXTKwSUeCw3fzKJTO8SCym2V0Gn1lFQUgLzd1hvwZbfDr2wshc84a1AJ3qzQvgrm 52SuLJrEBTH3EAubRUOHFNomFyW3aaYjJ+JO5TqfKkwbp/6C7p1qb1Y7V+Oau2jFnGlrmD JLaRzy8DaqPi9dRBATURsjkgd/aGJSCDWkE0gOztPdOV5ECiMOyCF77amH2xOp5z78DeTo Iou9HD7S9kzlplV/gWVdYaAO9gKUHlPM0KnEWHAqhA1gruoWlj+/svZcaNCrPq4fq2wZgY PG/V2TXl3ZTbjtmJwonDe80NaYQIoVB2S9qnR0ztEbfgjIrHKRRmlkZvXxfcCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763258278; a=rsa-sha256; cv=none; b=Peh8wxBM87C+GKtndJu7+FQhL+zepG5f1qFoVgmo/9Z2jnFO89VlTsZS4G300LdTrnR7+y xHqmb37x0J0zfGDWqnXaXXZElBIRUgYcI8tl2FEOdOI0YTe7hgBB2CnEBiPrGOklDpjlWR rgt74sdsomamYDPxWQZn/TsdoCznRmo/bOrYChDtTGv/KwIWDwmJOZPlN31yEA9Xe02dAR F0gA+6K7pSlX0yhTToesjyHXLbRm9uukXyP5AwXnVSj91VtsXP33DXnqU2S5O//kL1tMMF rV7B/41Zi+B2kegLdx3jzL4XP9v48YnNMwXQU+EN6Tp7/toilnA2QJPz1dt6yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8DY24660z3X9; Sun, 16 Nov 2025 01:57: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 5AG1vwYw042253; Sun, 16 Nov 2025 01:57:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AG1vwtY042250; Sun, 16 Nov 2025 01:57:58 GMT (envelope-from git) Date: Sun, 16 Nov 2025 01:57:58 GMT Message-Id: <202511160157.5AG1vwtY042250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 509dfd369046 - main - vmimage.subr: autoremove -y List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 509dfd369046ee45b724d119c9eed43228fbb894 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=509dfd369046ee45b724d119c9eed43228fbb894 commit 509dfd369046ee45b724d119c9eed43228fbb894 Author: Colin Percival AuthorDate: 2025-11-16 00:39:58 +0000 Commit: Colin Percival CommitDate: 2025-11-16 00:39:58 +0000 vmimage.subr: autoremove -y Running 'pkg autoremove' without -y results in VM image builds failing when (bogusly installed) packages are removed. Fixes: 6a13aeac3c1f ("vmimage.subr: pkg autoremove after pkg install") MFC after: immediately (needed for 15.0-RC1) --- release/tools/vmimage.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 3455f11d9794..7035b107ae22 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -223,7 +223,7 @@ vm_extra_install_packages() { -o REPOS_DIR=${PKG_REPOS_DIR} \ -o PKG_DBDIR=${DESTDIR}/var/db/pkg \ -r ${DESTDIR} \ - autoremove + autoremove -y if [ -n "${NOPKGBASE}" ]; then metalog_add_data ./var/db/pkg/local.sqlite fi @@ -239,7 +239,7 @@ vm_extra_install_packages() { /usr/sbin/pkg install -y ${p} done chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg autoremove + /usr/sbin/pkg autoremove -y fi return 0 From nobody Sun Nov 16 01:57:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8DY36ngcz6GhhZ; Sun, 16 Nov 2025 01:57: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8DY34yj3z3ZPb; Sun, 16 Nov 2025 01:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763258279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XFe8Rm2lNNHdtvsLcSQUPDFZA2AV4NqyrwKkj9gmOG4=; b=mQONRy8gi8PuAC/x1cnLguovNXG5KxbwgMXMFSl5mJwjrSsl5/qQs7TF6u8D3ms4yhKGes hccU9iSl1LwU7fKUozI8WcXCv8CEEqtPS8VfO/jAlA1bgIFIvb6qkWEUq7oifYZ7cHVzQH 3Y5j82qGltyq2o5HqGuQV0j55N4jxoWDb1ecwvg9+BvX3Uq2hnJGSm6f002QRUbzbzoM48 l+SrF60OIVvZxRCHb8fEw+blHuP9TaJyVtMmW+hWmqUnCB69YdZT3hSdemGZhyw+gsdH9l GGprKfuxuc9I+cca94pR3czWOfxnRRaQCuBWFgdRqd3h23i7UgJwU2a/iQMvQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763258279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XFe8Rm2lNNHdtvsLcSQUPDFZA2AV4NqyrwKkj9gmOG4=; b=hiJ4UFs0aby1qAxjnciY0VPDzJkW61ck4oeaPhbsljgSsZOl5bf9N/ylvJ0YiM/1THr71J 2gc3timAT4ETi+tOu5bzxskU3hUYzw3M//F4X825A04gY14VBT1PRDwyuP3NuGWGrUUiqS HRCPcqQf9VyrMGY8G7fBUIsqYinTaE/QzAaC31VuamuWuHa9RomDsyZNn2fWjldcTFHSYZ 0xe8LsuS92Xa4ehyQOk6TYMSqJF7ftelcf3cUx8gX7rrips+Sb4RlhGOwjZqFA2aIWgwXA 6AqKcUzx9/DD9Z8dGL6ESNMT+OZhhpxGtK4VbIn0bonmIaxy5YomkWdT9KBz/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763258279; a=rsa-sha256; cv=none; b=GM3d7m1kH0Tj/GnwmvW4ziuEOGPhA+eww9owuYuHNNRUgNX9FtCj3GSqU8SjHohnXH3q67 30bjXL62hZz1JDUagq+DrkjIKV8cMA6f1gjRUkTyiDq6WpoqQuea1zTbVRHJBja8x+SlxQ KePH5KlFJ8I8NIPBcY6T0f0paCD0sQZoGZe1sqn+/Ylm6ariO95HRlxC3LsEKSFSrWTn1l ArJWGS5hzGoovKYz3Oxeb+kmttsg2x9xYrMyVYFoukZw+H31T7UEL9huMY+NyHvfTSo3vS 37Vh6s3FA0ri2FEo7r4H/DuwM3HXYSDanj/mQi+DcOg3U8Ww/LHmuts5PzeehA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8DY34ZSCz3XB; Sun, 16 Nov 2025 01:57: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 5AG1vxpk042297; Sun, 16 Nov 2025 01:57:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AG1vxiC042294; Sun, 16 Nov 2025 01:57:59 GMT (envelope-from git) Date: Sun, 16 Nov 2025 01:57:59 GMT Message-Id: <202511160157.5AG1vxiC042294@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 78fa6965e91e - main - vmimage.subr: Don't log missing files from pkgs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78fa6965e91ec52c24f602250a9d7ec465b9a6ba Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=78fa6965e91ec52c24f602250a9d7ec465b9a6ba commit 78fa6965e91ec52c24f602250a9d7ec465b9a6ba Author: Colin Percival AuthorDate: 2025-11-16 01:19:50 +0000 Commit: Colin Percival CommitDate: 2025-11-16 01:19:50 +0000 vmimage.subr: Don't log missing files from pkgs When installing "extra" packages (aka those built from the ports tree), we record everything being installed in METALOG.pkg; the contents of that file is appended to METALOG before we generate the filesystem. There are two cases when files recorded in METALOG.pkg will no longer exist by the time we create the final disk image: 1. If a pkg bug results in false dependencies being installed which are later removed by "pkg autoremove", and 2. If the pkg we build and install from /usr/ports is older than the pkg on pkg.freebsd.org, and pkg gets upgraded automatically as part of installing extra packages. The ultimate issue in both cases is that there's no mechanism for removing entries from METALOG when we run 'pkg delete'. Address this build breakage by checking, line by line, if filesystem objects mentioned in METALOG.pkg exist before appending them to METALOG. Fixes: 6a13aeac3c1f ("vmimage.subr: pkg autoremove after pkg install") MFC after: immediately (needed for 15.0-RC1) --- release/tools/vmimage.subr | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 7035b107ae22..03d92850f2a3 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -292,8 +292,15 @@ vm_extra_pkg_rmcache() { buildfs() { local md tmppool + # Copy entries from METALOG.pkg into METALOG, but first check to + # make sure that filesystem objects still exist; some things may + # have been logged which no longer exist if a package was removed. if [ -f ${DESTDIR}/METALOG.pkg ]; then - cat ${DESTDIR}/METALOG.pkg >> ${DESTDIR}/METALOG + while read F REST; do + if [ -e ${DESTDIR}/${F} ]; then + echo "${F} ${REST}" >> ${DESTDIR}/METALOG + fi + done < ${DESTDIR}/METALOG.pkg fi if [ -n "${NO_ROOT}" ]; then From nobody Sun Nov 16 04:10:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8HVC5k4wz6GvTV; Sun, 16 Nov 2025 04:10: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8HVC5FBPz40lQ; Sun, 16 Nov 2025 04:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763266243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JnW0sUWS2YRxNkYRKngYqDO5m5SGPVE9QimtnYwNj6M=; b=nNI7JsuB7pAu0vBrh+ljJJQVkMsukAVUz53pKBv11gPJ6hrhs1HgVQUNu++oR3KOg92nLz pY7VA6nkNnkWGdJPQc/MKZW0i5xPLxqroS+NGVid0gdB1RzXYt5OcrNlcK4rIowwiwkSJr OhtJnMwgMSAdmu3HLPbL8ZMGfxMMC8wIi8qEwUKK/OFYLfW1PxcHKi3KYpvLbnXaqXA5F6 qnXzx7guijRp6jijYUNWi87spHwLstGKmmP8FgrNV9arG5EwJJu+x1GAUogTtUs0g2lcSi SxwKy6+4ydQITJB2ojrofb9he5irdKMmN9nzRBBFdTOs6KUf9YG0TXTerXuiCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763266243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JnW0sUWS2YRxNkYRKngYqDO5m5SGPVE9QimtnYwNj6M=; b=ZkiqNGSJ5X0rCmJIgSx1udlceaxdCa90EJdEL91qpdExTSn0Q2nlNTqEDUHf2rIYkXchOQ 9m7FKPf3lPZ17nqKfx2o8kDAB9jvsDehKLJmWz08oLzTGD7O0p3zVRPtFzPrpFperTT0kF lXGMPu5rq0SwQiX/rx8XaNbbQwA0OiRSY34tRuLIe0AflMdRwtElj4HGACdQ8SoaF6Shpa BrJGxzwqil9SsaUyCvfu16BuiWc0tVwgcKzqnYHsPvR8svk/4jhBH6cqysApfjfAR0UVYe mVXoWez6o8Sp3ZFKzPBpgMyEZxKEvhJoqNrRyWevOPArOjqqDheFakfRp9En/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763266243; a=rsa-sha256; cv=none; b=SWPJfDQ3CMi57i4t6aOHfPqTuc+ynC867bkNuH0d9G0ktjytnxwiD905KqE9OwPvl4kSgV ExwAW5Czds89U/xaPy9SYunxpcfMd4y/aVzMNX+IiEfJEhFPp82nsUxZrSPBrPdg/8PIRQ oDe3MNjQzSO6P1M8bxD5rXp91XjfhNMI1zHlDxB5scgFtRHdPgP3SekSADZQ7OD68Sw1di tzSyfk3d6CA/uuYKIfcPDZpLgt14ahNfF8thZ+mT0IZtwUyqKQoE/AXxD7PlicK+VLlENo vSNODTTgbuxfVa9BEjD/UTqOANP6PlMTNB7opbEbGG4bqe0rYBj+R4phs5LXJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8HVC4hPLz6N7; Sun, 16 Nov 2025 04:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AG4Ah8d000748; Sun, 16 Nov 2025 04:10:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AG4Ahaq000745; Sun, 16 Nov 2025 04:10:43 GMT (envelope-from git) Date: Sun, 16 Nov 2025 04:10:43 GMT Message-Id: <202511160410.5AG4Ahaq000745@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: 07e6bfeae5a1 - main - depend-cleanup.sh: Remove everything before the last build epoch. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 07e6bfeae5a1cf3266d3859e7a10f426b5d301aa Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=07e6bfeae5a1cf3266d3859e7a10f426b5d301aa commit 07e6bfeae5a1cf3266d3859e7a10f426b5d301aa Author: Warner Losh AuthorDate: 2025-11-16 04:10:07 +0000 Commit: Warner Losh CommitDate: 2025-11-16 04:10:07 +0000 depend-cleanup.sh: Remove everything before the last build epoch. We were deleting the .a files for llvm when it was build in bootstrap, but this caused us to rebuild all the bootstrap things since the bootstrap compiler changed, making the build time 25 minutes instead of 77 seconds on one of my systems. Items before the last rebuild from scratch epoch are no longer relevant because you have to rebuild entirely, so the incremental conditions that lead up to them being needed are no longer true. Sponsored by: Netflix Reviewed by: jrtc27, emaste Differential Revision: https://reviews.freebsd.org/D53693 --- tools/build/depend-cleanup.sh | 209 +----------------------------------------- 1 file changed, 2 insertions(+), 207 deletions(-) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index d751118a79a2..88b9c3b2e17d 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -260,213 +260,8 @@ check_epoch # Date Rev Description -# 20220326 fbc002cb72d2 move from bcmp.c to bcmp.S -if [ "$MACHINE_ARCH" = "amd64" ]; then - clean_dep lib/libc bcmp c -fi - -# 20220524 68fe988a40ca kqueue_test binary replaced shell script -if stat "$OBJTOP"/tests/sys/kqueue/libkqueue/*kqtest* \ - "$OBJTOP"/tests/sys/kqueue/libkqueue/.depend.kqtest* >/dev/null 2>&1; then - echo "Removing old kqtest" - run rm -fv "$OBJTOP"/tests/sys/kqueue/libkqueue/.depend.* \ - "$OBJTOP"/tests/sys/kqueue/libkqueue/* -fi - -# 20221115 42d10b1b56f2 move from rs.c to rs.cc -clean_dep usr.bin/rs rs c - -# 20230110 bc42155199b5 usr.sbin/zic/zic -> usr.sbin/zic -if [ -d "$OBJTOP"/usr.sbin/zic/zic ] ; then - echo "Removing old zic directory" - run rm -rf "$OBJTOP"/usr.sbin/zic/zic -fi - -# 20230208 29c5f8bf9a01 move from mkmakefile.c to mkmakefile.cc -clean_dep usr.sbin/config mkmakefile c -# 20230209 83d7ed8af3d9 convert to main.cc and mkoptions.cc -clean_dep usr.sbin/config main c -clean_dep usr.sbin/config mkoptions c - -# 20230401 54579376c05e kqueue1 from syscall to C wrapper -clean_dep lib/libc kqueue1 S - -# 20230623 b077aed33b7b OpenSSL 3.0 update -if [ -f "$OBJTOP"/secure/lib/libcrypto/aria.o ]; then - echo "Removing old OpenSSL 1.1.1 tree" - for libcompat in "" $ALL_libcompats; do - dirprfx=${libcompat:+obj-lib${libcompat}/} - run rm -rf "$OBJTOP"/${dirprfx}secure/lib/libcrypto \ - "$OBJTOP"/${dirprfx}secure/lib/libssl - done -fi - -# 20230714 ee8b0c436d72 replace ffs/fls implementations with clang builtins -clean_dep lib/libc ffs S -clean_dep lib/libc ffsl S -clean_dep lib/libc ffsll S -clean_dep lib/libc fls S -clean_dep lib/libc flsl S -clean_dep lib/libc flsll S - -# 20230815 28f6c2f29280 GoogleTest update -if [ -e "$OBJTOP"/tests/sys/fs/fusefs/mockfs.o ] && \ - grep -q '_ZN7testing8internal18g_linked_ptr_mutexE' "$OBJTOP"/tests/sys/fs/fusefs/mockfs.o; then - echo "Removing stale fusefs GoogleTest objects" - run rm -rf "$OBJTOP"/tests/sys/fs/fusefs -fi - -# 20231031 0527c9bdc718 Remove forward compat ino64 stuff -clean_dep lib/libc fstat c -clean_dep lib/libc fstatat c -clean_dep lib/libc fstatfs c -clean_dep lib/libc getdirentries c -clean_dep lib/libc getfsstat c -clean_dep lib/libc statfs c - -# 20240308 e6ffc7669a56 Remove pointless MD syscall(2) -# 20240308 0ee0ae237324 Remove pointless MD syscall(2) -# 20240308 7b3836c28188 Remove pointless MD syscall(2) -if [ ${MACHINE} != i386 ]; then - libcompats= - for libcompat in $ALL_libcompats; do - if [ $MACHINE = amd64 ] && [ $libcompat = 32 ]; then - continue - fi - libcompats="${libcompats+$libcompats }$libcompat" - done - ALL_libcompats="$libcompats" clean_dep lib/libsys syscall S ".*/syscall\.S" - ALL_libcompats="$libcompats" clean_dep lib/libc syscall S ".*/syscall\.S" -fi - -# 20240416 2fda3ab0ac19 WITH_NVME: Remove from broken -if [ -f "$OBJTOP"/rescue/rescue/rescue.mk ] && \ - ! grep -q 'nvme_util.o' "$OBJTOP"/rescue/rescue/rescue.mk; then - echo "removing rescue.mk without nvme_util.o" - run rm -fv "$OBJTOP"/rescue/rescue/rescue.mk -fi - -# 20240910 e2df9bb44109 -clean_dep cddl/lib/libzpool abd_os c "linux/zfs/abd_os\.c" - -# 20241007 -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 -fv \ - "$OBJTOP"/lib/libc/.depend.libc_start1.* \ - "$OBJTOP"/lib/libc/libc_start1.*o - break - fi - done -fi - -# 20241018 5deeebd8c6ca Merge llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6 -p="$OBJTOP"/lib/clang/libclang/clang/Basic -f="$p"/arm_mve_builtin_sema.inc -if [ -e "$f" ]; then - if grep -q SemaBuiltinConstantArgRange "$f"; then - echo "Removing pre-llvm19 clang-tblgen output" - run rm -fv "$p"/*.inc - fi -fi - -# 20241025 cb5e41b16083 Unbundle hash functions fom lib/libcrypt -clean_obj lib/libcrypt crypt-md5 c __MD5Init -clean_obj lib/libcrypt crypt-nthash c __MD4Init -clean_obj lib/libcrypt crypt-sha256 c __SHA256Init -clean_obj lib/libcrypt crypt-sha512 c __SHA512Init - -# 20241213 b55f5e1c4ae3 jemalloc: Move generated jemalloc.3 into lib/libc tree -if [ -h "$OBJTOP"/lib/libc/jemalloc.3 ]; then - # Have to cleanup the jemalloc.3 in the obj tree since make gets - # confused and won't use the one in lib/libc/malloc/jemalloc/jemalloc.3 - echo "Removing stale jemalloc.3 object" - run rm -fv "$OBJTOP"/lib/libc/jemalloc.3 -fi - -if [ $MACHINE_ARCH = aarch64 ]; then - # 20250110 5e7d93a60440 add strcmp SIMD implementation - ALL_libcompats= clean_dep lib/libc strcmp S arm-optimized-routines - run rm -fv "$OBJTOP"/lib/libc/strcmp.S - - # 20250110 b91003acffe7 add strspn optimized implementation - ALL_libcompats= clean_dep lib/libc strspn c - - # 20250110 f2bd390a54f1 add strcspn optimized implementation - ALL_libcompats= clean_dep lib/libc strcspn c - - # 20250110 89b3872376cb add optimized strpbrk & strsep implementations - ALL_libcompats= clean_dep lib/libc strpbrk c "libc.string.strpbrk.c" - - # 20250110 79287d783c72 strcat enable use of SIMD - ALL_libcompats= clean_dep lib/libc strcat c "libc.string.strcat.c" - - # 20250110 756b7fc80837 add strlcpy SIMD implementation - ALL_libcompats= clean_dep lib/libc strlcpy c - - # 20250110 25c485e14769 add strncmp SIMD implementation - ALL_libcompats= clean_dep lib/libc strncmp S arm-optimized-routines - run rm -fv "$OBJTOP"/lib/libc/strncmp.S - - # 20250110 bad17991c06d add memccpy SIMD implementation - ALL_libcompats= clean_dep lib/libc memccpy c - - # 20250110 3dc5429158cf add strncat SIMD implementation - ALL_libcompats= clean_dep lib/libc strncat c "libc.string.strncat.c" - - # 20250110 bea89d038ac5 add strlcat SIMD implementation, and move memchr - ALL_libcompats= clean_dep lib/libc strlcat c "libc.string.strlcat.c" - ALL_libcompats= clean_dep lib/libc memchr S "[[:space:]]memchr.S" - run rm -fv "$OBJTOP"/lib/libc/memchr.S - - # 20250110 3863fec1ce2d add strlen SIMD implementation - ALL_libcompats= clean_dep lib/libc strlen S arm-optimized-routines - run rm -fv "$OBJTOP"/lib/libc/strlen.S - - # 20250110 79e01e7e643c add bcopy & bzero wrapper - ALL_libcompats= clean_dep lib/libc bcopy c "libc.string.bcopy.c" - ALL_libcompats= clean_dep lib/libc bzero c "libc.string.bzero.c" - - # 20250110 f2c98669fc1b add ASIMD-enhanced timingsafe_bcmp implementation - ALL_libcompats= clean_dep lib/libc timingsafe_bcmp c - - # 20250110 3f224333af16 add timingsafe_memcmp() assembly implementation - ALL_libcompats= clean_dep lib/libc timingsafe_memcmp c -fi - -# 20250402 839d0755fea8 ctld converted to C++ -clean_dep usr.sbin/ctld ctld c -clean_dep usr.sbin/ctld conf c -clean_dep usr.sbin/ctld discovery c -clean_dep usr.sbin/ctld isns c -clean_dep usr.sbin/ctld kernel c -clean_dep usr.sbin/ctld login c -clean_dep usr.sbin/ctld uclparse c - -# 20250425 2e47f35be5dc libllvm, libclang and liblldb became shared libraries -if [ -f "$OBJTOP"/lib/clang/libllvm/libllvm.a ]; then - echo "Removing old static libllvm library" - run rm -fv "$OBJTOP"/lib/clang/libllvm/libllvm.a -fi -if [ -f "$OBJTOP"/lib/clang/libclang/libclang.a ]; then - echo "Removing old static libclang library" - run rm -fv "$OBJTOP"/lib/clang/libclang/libclang.a -fi -if [ -f "$OBJTOP"/lib/clang/liblldb/liblldb.a ]; then - echo "Removing old static liblldb library" - run rm -fv "$OBJTOP"/lib/clang/liblldb/liblldb.a -fi +# latest clean epoch: +# 20250807 # All OpenSSL-using bits need rebuilt # 20250813 4f766afc1ca0 tcopy converted to C++ clean_dep usr.bin/tcopy tcopy c From nobody Sun Nov 16 14:22:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8Y4N6r1tz6GVn2 for ; Sun, 16 Nov 2025 14:22:44 +0000 (UTC) (envelope-from erichanskrs@gmail.com) Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) (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 4d8Y4N4wyHz3Yy7 for ; Sun, 16 Nov 2025 14:22:44 +0000 (UTC) (envelope-from erichanskrs@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x143.google.com with SMTP id 2adb3069b0e04-5958931c9c7so1678456e87.2 for ; Sun, 16 Nov 2025 06:22:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763302958; x=1763907758; 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=hfd8Z1GuOP10RQoHLLsHwHkRNbFAzsRR8duHTqTj6Ic=; b=h74teUS08QRTo5yODn84tMrZUzZCR11+uuCZ7FBoGvYvTTrDsVHWke0tRvLeUzGl1f W96r/LrDG6o/LGJLLp0Z+HnT912uaAB31dB016SUJkugekcDsC/b+r9FCHeaLkrlCwt9 dQDKW/7AJ34QeLF0zdDezEaguthKdQTyOtbi3ekwwdW/G1sM/tzcW+VSPh1+M0W3ifPT Tq/FWgKc6nbiR1OuyucCLswyDIR7SwAfVTnHhD+RkX0NXhUT5So6MXSj5AD1SOIOD8C+ F/90x7zCdv7XkhULMCCCzCkQpatt8u4gUolrLYJEIbh/+yeXcDJHOx4pSA+Er5GSN5RJ QfTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763302958; x=1763907758; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hfd8Z1GuOP10RQoHLLsHwHkRNbFAzsRR8duHTqTj6Ic=; b=OTAqZiHdvdBMUzaTBg/XAXFfln4t1Hjkji0ktZtO4Nq3Gac862RmguOwCB4HxGi8ba 50NOWF5MeD/+rdETr/EkRwB0DNy715N/EyBTK+Gs8D4LSvFv1L88uiKTakKBCQSSE8ll 0uSWYpMGcJAG82PVcMdNuhdiTsblWVoGshz2xeWmO5RYkHVyJurfG6UzlWnJAbaCcj5A +tdIP2SHaLL+HnzneuzpLiSzBELWKOLgv3UV/11NSXwG0sFN93LKdX/GcdbD8z2TYgVA zdntNtIChiy72pr/VBZV6gZwICr9AGn7S4RVXN9c6zdv5Vq4+ovciwXGO1Vzu5pGyp60 bS6g== X-Gm-Message-State: AOJu0YwxQ4Q4ceYn8g8q3tb+NGAgKO/5nI/vTZ0D1d7kwBC30jS6T2eZ PyZDsGCAyFtXsxOAmSDom+UTQbYS06xACyoeqjljXCUG0wqSLrxJVwQPCZOD7GLpjOyTsTpQms/ e9QJcfxHSg4GKIxdVUYMYRnxI55FuwwE= X-Gm-Gg: ASbGncuQCL4k4tY2gGdIDZ7jR+YELaafAXGc2p3ElL1IIMlgW9WCaCRi4UylV1Hq48x +50MrENofM/OeK1K7nXxh3BGyFcPPozEqN0hDre8XVG2o+24ZUm/BsCXMdq/eGAwwDs1dJRtJvB Ok+sb0PZjmtr+0oBBeCXiq1OT1VYBKQLDWpVRgGOtTtLXweRpvcoMouvhFv3auMtkO+IHOwJ6Js rLuE9B3eT/3LEMshwVqEgPug7W+TBrk7aQdpHOis3NigNGEBXd1ge1yF44qHp1Hxabgelh/tG1B jWNK9DiHTqpVT27uICv+bucc/57zFBilIxsUq0mMdclm22EPjg== X-Google-Smtp-Source: AGHT+IGIAjEqWQFkfjDzYZnBos5HoZIhAOavBS1G46SovyJZAQ9d/KvfYi2fRUZbPM+5O3TQERBJYkSHW2oxpTOaPYU= X-Received: by 2002:a05:6512:3b0d:b0:594:314d:ac53 with SMTP id 2adb3069b0e04-595841ba374mr3142695e87.23.1763302957743; Sun, 16 Nov 2025 06:22:37 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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: <00D80914-D359-4834-B6F0-9CD66967F77C.ref@yahoo.com> <00D80914-D359-4834-B6F0-9CD66967F77C@yahoo.com> In-Reply-To: <00D80914-D359-4834-B6F0-9CD66967F77C@yahoo.com> From: Erichans Date: Sun, 16 Nov 2025 15:22:27 +0100 X-Gm-Features: AWmQ_bniO0eRbAH4C__REHbc40HykVAOH8er1EpO417fefO8PSnkuqW6jp17RpM Message-ID: Subject: Re: git: 8e0b1a1c03a3 - main - pkg: Add FreeBSD-base to /etc/pkg/FreeBSD.conf To: Mark Millard , Colin Percival Cc: dev-commits-src-main , FreeBSD-pkgbase@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4d8Y4N4wyHz3Yy7 On Sat, Nov 15, 2025 at 4:35=E2=80=AFPM Mark Millard wr= ote: > > Colin Percival wrote on > Date: Sat, 15 Nov 2025 07:58:59 UTC : > > > The branch main has been updated by cperciva: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8e0b1a1c03a35a5db13e370c= b3e62585d3db68e3 > > > > commit 8e0b1a1c03a35a5db13e370cb3e62585d3db68e3 > > Author: Colin Percival > > AuthorDate: 2025-11-15 03:26:07 +0000 > > Commit: Colin Percival > > CommitDate: 2025-11-15 07:58:41 +0000 > > > > pkg: Add FreeBSD-base to /etc/pkg/FreeBSD.conf > > > > On -CURRENT and -STABLE this gets bits from pkg.freebsd.org; but we get > > base system bits from pkgbase.freebsd.org for BETA/RC/RELEASE. > > > > Note that this repository is disabled by default, but can still be used > > by explicitly specifying it, e.g. "pkg upgrade -r FreeBSD-base". > > I and others reported that when FreeBSD-base is not enabled, > "pkg upgrade -r FreeBSD-base" does not do the pkg update > part of the activity (as if a -U was present if it was an > enabled repository). This prevents "pkg upgrade -r FreeBSD-base" > doing any upgrade that would depend on the pkg update results. > > In other words, only enabled repositories get the > implicit pkg update activity, even when the -r REPONAME > is supplied. > The issue with -r not enabling a specified repository (this is a regression= ) has not only been reported in the ML but also in two PR-s: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211749#c7 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D289455 Eric From nobody Sun Nov 16 16:59:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8cYB5N7Nz6Gk2T; Sun, 16 Nov 2025 16:59: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8cYB4llVz3nLZ; Sun, 16 Nov 2025 16:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763312366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZMNkq75wMQUdPnQE0og2Yde0LKoMc/Qu6A1UCO1Vb9o=; b=raMprAz+g5uP+XiHJkn/ENCsubte8eDS8NsZWpTP1902JvVFYoX3CWfom1QrZQsW2pXqz4 i7cJx06UI2opQ4LKrqnwYFxsfNqoF3KQF0A6REJVWOj19Xd17ZAJ9F1TmQFZFlVLQAgLtu pi3EeDMdX1J+BY9/fKOQrwEwsUu1Q6eudnablpiBvcDp/9BW6YFHKmDGaeyWIMr7v9hdSs 41515GOva7OUbhsHcLn9bp/plBakOBckbyRkgXdcPpWVphUY5nWYGfcTjGnL9jnIrFgSDP uggPGCKi4o0PDoM4l01RZKYBn8dBwTJcb9NS7VDt5/6LJJ8YNps4GLYGTaXYZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763312366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZMNkq75wMQUdPnQE0og2Yde0LKoMc/Qu6A1UCO1Vb9o=; b=tAIszjsXAPIJTGRU5p1b12kUHYQjPaRJsZngQpw7xXPpiiZVn3PooGnMIn5falbFkDgRM2 yVqdOmTEAUxJ54C8cbOapVNq5XGxofmiXXGDtO7kUWYsiks65WrlfsbCDpHzfTr98qYXRa V3AAGHEhrXRvitVruP+/bmAnlFqd7uTCMAj2uY4JbEZmvC88ByzxcMPl7VvcL+qXP+g1up zureUwBvi6oM+EPnTexjTf70Gahrf/U+cdR9/aYHDiCGCbez2qQplySFMMANkAj+VEeTWU kNP+QnsUJvVubx9Wp00mC6CJvPvHRi1EMqC9FtpSXa8AQibRlV3RBc1Ul0FAzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763312366; a=rsa-sha256; cv=none; b=H0d9795CRu5vfHLtOBijtbOmQ0M4drZRgmT/P2fZMonNRi4bozMprFO8uzhYAFoJGd47Ha DbLJPukB58jaARUjXZo2qG7L3V7yNszVMIqrVuFS+EfuIajkdKA4FnnVzssHdbajX8E4UB OI4uTUhyMaNz8Rs3X/dRT7bdKgRZ4ugAujPwebS+E5I21tOuKmDMTmp2XOc7kl1wsmhQZE 8aV3ez0uMHNB+KgmqijcypBJzrY2bwnlyQPyrJo86hRV+aEpfhO1SUODSZmMBWA3VNJr3c gd6IRXwaGsQ6z6Zz6qqYH2aNXVXcVgR1a3LxfPJgFdFUEjGPUKZPc1PxidR1Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8cYB42KHznDh; Sun, 16 Nov 2025 16:59: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 5AGGxQl3036979; Sun, 16 Nov 2025 16:59:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGGxQMV036976; Sun, 16 Nov 2025 16:59:26 GMT (envelope-from git) Date: Sun, 16 Nov 2025 16:59:26 GMT Message-Id: <202511161659.5AGGxQMV036976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 6ccdd2fc2328 - main - UPDATING: Document FreeBSD-base pkg .conf shuffle List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ccdd2fc2328dd81b9c645fba025d01052a3c1a1 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=6ccdd2fc2328dd81b9c645fba025d01052a3c1a1 commit 6ccdd2fc2328dd81b9c645fba025d01052a3c1a1 Author: Colin Percival AuthorDate: 2025-11-16 16:56:12 +0000 Commit: Colin Percival CommitDate: 2025-11-16 16:59:10 +0000 UPDATING: Document FreeBSD-base pkg .conf shuffle Reminded by: yasu MFC after: 3 days --- UPDATING | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/UPDATING b/UPDATING index d6cbe66009f0..aaef0e5b4cd3 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.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".) +20251115: + The FreeBSD-base repository is now defined in /etc/pkg/FreeBSD.conf, + disabled by default. In -CURRENT and -STABLE this points at nightly + builds on pkg.freebsd.org; for BETA/RC/RELEASE builds it points at + release engineering builds on pkgbase.freebsd.org. + + Users of pkgbase will need to replace any existing definition of the + FreeBSD-base repository in /usr/local/etc/pkg/repos/ with a single + line "FreeBSD-base: { enabled: yes }". + 20251110: OpenPAM (including libpam and the PAM modules) has moved to the new "pam" package. The pam-lib subpackage, which includes libpam, will From nobody Sun Nov 16 16:59:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8cYC6NJVz6Gjt9; Sun, 16 Nov 2025 16:59: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8cYC4Xl7z3nR9; Sun, 16 Nov 2025 16:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763312367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mzH0OGTeSixldtXMIExlTOC2Z52L4KZ8p1XtpZDfpL0=; b=U+BtJKRPuIhT7cCYaLPCom5dXwheJIFs8mou1y2xDXK5xERdkfUgGK728TlZF9L6UYx8U+ PREgKuktuPdDwELc5msxCHmT60SRznw1Zo05sC600qnjnlvcOACZAgnUGGKEJHjg+sRk8s DQUSwu0oap0SxCDq9B8YysgGA3Kq6z5m/sJKkoCmUG9BBfIJhLL/Kqa1oyisYYPHKSqEVC 5MzQ5m4JM2W2vGEs2wbslhIUG7FpmIOofTWVK6Ah/HILicMyTdJRXnDhZDQzWwiPa6aLkT woUjC+UBliNis8qrFPn3xHHYnls8w95NOIV26OXcCZ1wHAXGBxsCVdun4pM6/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763312367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mzH0OGTeSixldtXMIExlTOC2Z52L4KZ8p1XtpZDfpL0=; b=Fkb8ZqjXMiloSYhOPqaP9xFSN4VO7NBudu/dpPoKoEbeKiOWPgwbnHtq8Qf3Sq4VHgDl17 AfhtMhcsO6+mw1P2I1rsz0NxZfHqhvrcV3L5Yr30HlgluPU7Esh6JGNSWNBBdU/kLepAVL TiVp98u1L25W1NIYNqtkBdleytWhvD/oFmHCW2/W2adUPou7RD+FghjfENTl1oew/vqsYO 1pCJ7J7PN2z7YS0ssGpr2paMWysZ6hMggnmZZsVLBOHO7gogk44kQeM8W0knuApq3D5a/U Ku0RaRpvkDVplF96nSPm2ja7f0XsrqngisQ9s2qBPiIF0eXfTlgQX9HHu2LX+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763312367; a=rsa-sha256; cv=none; b=LHOEjT52YqVamBVJOOG4VWg79aVIXAao41RrzlvrRuBl9pMfqfSeHgKQtbaevShAmbc62w 6e48XbGkDmNHBOUGtJZCNyfFYCHtyd/X78abce0goKPWifHUZ0NURZBnDAur3ShLkxJE1T X+RBxjLOMT6LDEBWm1LNbBpmFwul96k9gE6tdf31ZYR1pxcNtkgJ4lx/09Vd3XmjN+7m7W mqa9sy+PKsfsFrTh0FTYn0orrScTCqz/O/AwTVEgnRqzmWLc2yCBjZqXZ1HBMNRxYEePuC QIjqd5kRDu6w0jhQSu+3STxgG0Gd+ZJbfHIJXF9NVZgtzzG9l0dOGWcm4PxCQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8cYC43jfzmll; Sun, 16 Nov 2025 16:59: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 5AGGxRBo037013; Sun, 16 Nov 2025 16:59:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGGxRMY037009; Sun, 16 Nov 2025 16:59:27 GMT (envelope-from git) Date: Sun, 16 Nov 2025 16:59:27 GMT Message-Id: <202511161659.5AGGxRMY037009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 87025ccb8c80 - main - RELNOTES: Document FreeBSD-base pkg .conf shuffle List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87025ccb8c802b6074f1651bfaaca5c6b4ffcc17 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=87025ccb8c802b6074f1651bfaaca5c6b4ffcc17 commit 87025ccb8c802b6074f1651bfaaca5c6b4ffcc17 Author: Colin Percival AuthorDate: 2025-11-16 16:57:31 +0000 Commit: Colin Percival CommitDate: 2025-11-16 16:59:10 +0000 RELNOTES: Document FreeBSD-base pkg .conf shuffle Reminded by: yasu --- RELNOTES | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/RELNOTES b/RELNOTES index e34a5b23a005..b6c3a8963757 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,14 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +8e0b1a1c03a3: + The FreeBSD-base repository is now defined in /etc/pkg/FreeBSD.conf, + disabled by default. Systems which installed with pkgbase prior to + 15.0-RC1 (if running releng/15.0) or November 15th (if running from + stable/main snapshots) will need to remove the definition of the + FreeBSD-base repository from /usr/local/etc/pkg/repos/ and replace + it with a single line "FreeBSD-base: { enabled: yes }". + 5000d023a446, 03da141d59ae: Add a "-f" option to "kadmin -l dump" which can be used to dump the Heimdal KDC database in a format that can be loaded From nobody Sun Nov 16 17:03:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8cfM2yP4z6GkY4; Sun, 16 Nov 2025 17:03: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8cfM27x4z3pff; Sun, 16 Nov 2025 17:03:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763312635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CRb7RpArJfQNaUWOUhYzT4t6/7NhmQZqz4jDp2uUKjU=; b=GH7/fJzCM1u9y/smEex8dj8nmkhOcLTljT9bghruTORyOm4ZDPoWVlld5+5awTsyy4eS9e TASL9FQJkn4OVf9yqxSGE7WaTb5Ert/swrsmpIQ4uv9k5Wij1XZdawnJk4wqlSLF1q4SNj 1jRGrvArbc++VBEgbsSU4GRo6/6tWGv8wXzwlo98G53xcW8YpqgD2k5rW79PB69f/rS4Q7 jT7HdDCS9zuJeXZX004h+8XDpwge4cKudLPtf0yUV9iDJ9+KNg/CYQfMrP6DRZZan6lNDV XUdCUrKUZHeS5L/zXMG2QinvwgnwDMWlPgetl/f1X2vO6OPX64smSZZktWDaFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763312635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CRb7RpArJfQNaUWOUhYzT4t6/7NhmQZqz4jDp2uUKjU=; b=kQ7ve9xppPJBeDishSNSji6JFJ5Ezo1UybgBJXm2PzvebDH9Tr7QrbCZhBHor8oO6fCgGw 8fNOjre/0CeKWFbf/m5yiweUoEGSzH0wAxZcuuqLZwC56HkUiq/CLuiwerRsLMJ0ztijNg B0oXxfknnBAb7ef/FVs99CV1kC8VGpPk1eOz2PdjnHmfcUn+jYQs0YWgElRkJCPn1070yc OnnIuXjYHAX/QPHMZw3YHzrHO9RGKx9q0LBLjH5ATn70xwNOZmgAWx+YOzX71KZzhOREJS FyeKdBtIk0e0O6brGMpSxg5h5KXkOTdr5OzZkPSdZGY4LNWHm0lqPKl/68X0cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763312635; a=rsa-sha256; cv=none; b=IArHZaU++Gj9iyRSjHqCal5225Kk/FDcVaWIR5SyHn8Ak88Xopa1jovSlk33rPoC+Fu5F/ wUxrxfYr4uqM+IItyC21KYETfyWsW3YV5E6eSOHiBBwLii4qbBzwqGBkXpm4Ub0BbTOJpr Bz/Pu78oHLdLSCczLFHCt4oJ1MMjKdBe0ZnwabBjefab/NKz+XMvyNG05r+fcXcCJh/AH0 0vzyiJis/QmfdqysGO9ebUsPmA//R/67ydOiOUt2OkPhSyl/sAXYIxkwdfp1GOx861+cmJ ym1S4AKyqADd+eKUcpTbBsyQBljwO3h02NqMpR2OJU7d+5A3Smkbhd0y0VW8aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8cfM1bBVzmmZ; Sun, 16 Nov 2025 17:03: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 5AGH3td4055709; Sun, 16 Nov 2025 17:03:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGH3tmM055706; Sun, 16 Nov 2025 17:03:55 GMT (envelope-from git) Date: Sun, 16 Nov 2025 17:03:55 GMT Message-Id: <202511161703.5AGH3tmM055706@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: a537694b49f7 - main - sys/net/sff8436.h: Fix the register address of link length of copper or active cable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: a537694b49f719d84e3a69a2b8a3098f603da7d7 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a537694b49f719d84e3a69a2b8a3098f603da7d7 commit a537694b49f719d84e3a69a2b8a3098f603da7d7 Author: Kirill Kochnev AuthorDate: 2025-11-06 18:22:30 +0000 Commit: Zhenlei Huang CommitDate: 2025-11-16 17:02:02 +0000 sys/net/sff8436.h: Fix the register address of link length of copper or active cable The register address of link length of copper or active cable is 146 as per the SFF-8436 specification [1]. [1] 7.6.2 Upper Memory Map Page 00h SFF-8436 Specification (pdf): https://members.snia.org/document/dl/25896 Reviewed by: imp, zlei MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1885 Closes: https://github.com/freebsd/freebsd-src/pull/1885 --- sys/net/sff8436.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/sff8436.h b/sys/net/sff8436.h index deed74c7cdb4..dbf5c69df832 100644 --- a/sys/net/sff8436.h +++ b/sys/net/sff8436.h @@ -151,7 +151,7 @@ enum { * OM2 fiber, units of 1 m */ SFF_8436_LEN_OM1 = 145, /* Link length supported for 1310 nm * 50um multi-mode fiber, units of 1m*/ - SFF_8436_LEN_ASM = 144, /* Link length of passive cable assembly + SFF_8436_LEN_ASM = 146, /* Link length of passive cable assembly * Length is specified as in the INF * 8074, units of 1m. 0 means this is * not value assembly. Value of 255 From nobody Sun Nov 16 17:14:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8ct81Gdfz6GlqJ; Sun, 16 Nov 2025 17:14: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8ct80ZbYz3qgx; Sun, 16 Nov 2025 17:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763313248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pd24mHrBX/9FcYJZNwmfpw/2TV02uFb/u9Qgzy6rG2E=; b=Q05Ze6QM4lhRSZ8fHps7bSFgUnoDbLiFvxhri/canHsXIROTMEhrW6DjvVzGT5NPljbOsm s+VPvC9oZZRaAseTtFBsqon+gsBUYbVejTEi9qXkZar/i3IoxsW5pkJ4umEKA+bgK8v0wg Ykuh62Jean2AMmYPqEpI/BreWWps8jplekdwPzUUBuK8EphKGn2yH50qOUndGoQHmhJrtZ 37BU6+eKeqMY8e7ZbBYvSJzxkpPIoQkIfqf6b0cwsDJQfG4VqUE3EngIRk+rtD5njFdzka gx9R9tcFSwSgD7L//uLW7/JLNQkGKLSanvpwhFxSIwYRDN5Qx1vdJFyxN0hg0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763313248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pd24mHrBX/9FcYJZNwmfpw/2TV02uFb/u9Qgzy6rG2E=; b=pc1T22V07DhruJGUe/RB/GEerQuUW/pKwMShEbvNI1LcVtXs+U90Y1icTFsNHf7ajsYf/R 35e9cVSOWbjAvNnlPiTCAlwOcX6ClPT2imx+ErRLsHssXwAie8iVari3Fto8tQajP95gRr c9iDb5c1Ez3uKZ/s7n6pPsgZU6fAzCwigUASAHYJ7NUk4TuSm/yRMqPTUYZ6589y4PA4Kd X8TcDLY2qbiGr8cbv0xoG0xwOrcSxxi2yNutJT8sBoxQJ9CC6ro3Lkaw/rkKctO2lBcJ8O kb3+iZMw+h/2pPKOrxVu/k+QMFRYHGvfp1UebuCr/TijFyp8N7ckiQ/QNdI2yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763313248; a=rsa-sha256; cv=none; b=D++QpqSH/YC40mDCZ6IIh3BUhBsWou5HYL2y6mXwAhv5V1898womBFrYI8x2K+vWZ8D7y7 awSt/9Cp3iEXiGuCZrSwN1AqX9gIQpmrM8ZzAZHxNdwKe91+90b8Rqqt60c7vkkPAwAOQB oWRD8qmeL8RH3BzE/upRQkkhCfDCjJVNEam6Bo3uNaZOSBdGT7QnhIjxz/tgh6X8VBDhOf DpKpV0a3+plnSz0efCY4iAozdz8vH3JvuEetsX8wSGlnUwt1Bu9VOhgVAWuJpTGdhAIBnH yqErBGmkt6ZlUPuzLmIsdv5CGiiX9GiXHqMyrthUbYFDyjqW/hax2lueU/X4Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8ct808XKznjt; Sun, 16 Nov 2025 17:14: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 5AGHE7tk073977; Sun, 16 Nov 2025 17: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 5AGHE7Zn073974; Sun, 16 Nov 2025 17:14:07 GMT (envelope-from git) Date: Sun, 16 Nov 2025 17:14:07 GMT Message-Id: <202511161714.5AGHE7Zn073974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: aa33b6b820e6 - main - vmimage.subr: Log correct paths into METALOG List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa33b6b820e6889a9eb11aa8aec498cb890c589a Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=aa33b6b820e6889a9eb11aa8aec498cb890c589a commit aa33b6b820e6889a9eb11aa8aec498cb890c589a Author: Colin Percival AuthorDate: 2025-11-16 17:12:00 +0000 Commit: Colin Percival CommitDate: 2025-11-16 17:14:02 +0000 vmimage.subr: Log correct paths into METALOG Paths all need to start with "./" because that's what newfs wants. Fixes: e0c41af9256b ("vmimage.subr: Enable FreeBSD-base repo if pkgbase") MFC after: immediately --- release/tools/vmimage.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 03d92850f2a3..d718150d8767 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -109,8 +109,8 @@ vm_install_base() { metalog_add_data ./var/db/pkg/local.sqlite mkdir -p ${DESTDIR}/usr/local/etc/pkg/repos echo 'FreeBSD-base: { enabled: yes }' > ${DESTDIR}/usr/local/etc/pkg/repos/FreeBSD.conf - metalog_add_data /usr/local/etc/pkg/repos - metalog_add_data /usr/local/etc/pkg/repos/FreeBSD.conf + metalog_add_data ./usr/local/etc/pkg/repos + metalog_add_data ./usr/local/etc/pkg/repos/FreeBSD.conf else cd ${WORLDDIR} && \ make DESTDIR=${DESTDIR} ${INSTALLOPTS} \ From nobody Sun Nov 16 17:31:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8dGM48wlz6GnJW; Sun, 16 Nov 2025 17:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8dGM3YY5z3s8N; Sun, 16 Nov 2025 17:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763314299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bkfwS7PHxGg9P1s9p1WiY2VAsv80xzAgcqxC20hZBuQ=; b=EC36/MtS2La2kxoOtCvkHEE5prUtvskDT90Qr2jK4RcMXCAS5UvXRiNlIGHlOUwttZziYu /F9cx9cfrVvzE+CdkNSCyT6PBjpUG+nmhxkgqm0zfbVxKxh7Nf7kzqj5QvJbKGMvXP81r5 D/u7nxH347/S539tPQWLJzlaQTETGkrf9oSQTXn/1tyPxiGXhidGvPRCv8YPeYfb3WYpga jTyU/oIaPWXQ4l//bpcJOusHzJW/OtxIs0exD8/OZpP+BQrnYjkwNkfIq4lNIlJOFzDoLl Qxmz7OLKgZdmQQSZ/J3PC6Do6auyxBJFqfa3TRhPh4DL+7s8RBRb4SabNfi7TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763314299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bkfwS7PHxGg9P1s9p1WiY2VAsv80xzAgcqxC20hZBuQ=; b=YAWdmQaU+7HE8Jf1qlDan6NfE+jBn6a+BCTJlqOzUqg0cNDi+9BctvF4jh98XzRXfHIPeN 02vuL0IfGZp5bS0ZDIe2pTXSbIhe0TlP3NnjWWGr2ikVzl2NKehN2XRXa6FDpyBVu8P32W FxPjBdvpwgiU0uD5JSeUdDJ5HL14Fdv6Mkr+miWb8EG1l15pIxiIq9jGMipGtK9cIyuR2e NUaaL3r/RhBfIkd7wvwLHVSv7ZiE19c7q9F+BXE/6+yzdC6n8ljf4493FYF07TzSmopgSj px0JjZYLTU7jjFQTnrdlRdolPJHjpaP/OZPxjMe8o9seIjJ90Bl01syasz49pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763314299; a=rsa-sha256; cv=none; b=UMQ1ziPHOjXVGy0fNQX4PDbWKHg5oxBHkQB5K1oIGMA+xGKDR21QsqgCcnoerhzl/S3m6Y X1ZcLnmkbLxVPhIp/AwlwQVtHjxYFRJTEDXmaTXjmeHGRmBtOyeb7gPZaV9h78ezrTtD1M QsdVipqSQGNb/luykEAiCSKrorFLmd3mRro908Qoe3roFg42x2b4TNTT47xE+bBy3Xge8p LM1MdzfcICrRpEVjQFTpIAk+W2fd0URwBCNaL9wyXOPIJABDOOThOyUqomXmwpF83TvcXv cyn2eEmMXCU35pMjWVSKnpOApvLozhs0OR4Lh7a6eJ4pWjBIGCWz9ktFIAE4KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8dGM32jKznc4; Sun, 16 Nov 2025 17:31: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 5AGHVdYo008650; Sun, 16 Nov 2025 17:31:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGHVdk3008647; Sun, 16 Nov 2025 17:31:39 GMT (envelope-from git) Date: Sun, 16 Nov 2025 17:31:39 GMT Message-Id: <202511161731.5AGHVdk3008647@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: 474d4707e607 - main - depend-cleanup.sh: Add commented example and remove one more entry List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 474d4707e607eedb966685a6e8a2471342c0f23c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=474d4707e607eedb966685a6e8a2471342c0f23c commit 474d4707e607eedb966685a6e8a2471342c0f23c Author: Warner Losh AuthorDate: 2025-11-16 17:28:06 +0000 Commit: Warner Losh CommitDate: 2025-11-16 17:31:34 +0000 depend-cleanup.sh: Add commented example and remove one more entry Although the epoch is 20250805, the push for that wasn't until 20250814, so we can remove the 20250813 entry for tcopy, per jrtc27. Also, include an example of changing a shell script to a binary, since that's deceptively tricky, though the code looks simple, per emaste. There should be no functional changes here. Sponsored by: Netflix --- tools/build/depend-cleanup.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index 88b9c3b2e17d..f5d2fdac9dfd 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -260,11 +260,19 @@ check_epoch # Date Rev Description -# latest clean epoch: +# latest clean epoch (but not pushed until 20250814) # 20250807 # All OpenSSL-using bits need rebuilt -# 20250813 4f766afc1ca0 tcopy converted to C++ -clean_dep usr.bin/tcopy tcopy c +# Examples from the past, not currently active +# +#Binary program replaced a shell script +# 20220524 68fe988a40ca kqueue_test binary replaced shell script +#if stat "$OBJTOP"/tests/sys/kqueue/libkqueue/*kqtest* \ +# "$OBJTOP"/tests/sys/kqueue/libkqueue/.depend.kqtest* >/dev/null 2>&1; then +# echo "Removing old kqtest" +# run rm -fv "$OBJTOP"/tests/sys/kqueue/libkqueue/.depend.* \ +# "$OBJTOP"/tests/sys/kqueue/libkqueue/* +#fi # 20250904 aef807876c30 moused binary to directory if [ -f "$OBJTOP"/usr.sbin/moused/moused ]; then From nobody Sun Nov 16 18:24:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8fR74JZFz6GsKq; Sun, 16 Nov 2025 18: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8fR73qdvz42PS; Sun, 16 Nov 2025 18:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mBO8r+r1RRbmLOrpyiUL7giAy+vuoYJlRsvV32Qhjg0=; b=GdCyGjqN06nUXNU5H2V3wa+B+9Zf8cVjL9pJhU+Y/r2SOnMz5TBIJUyNr9n0rj8cUXcct+ S+ET3CKHSLqucIeWM2RRWtorgK3T8X5Hi0mPkDWL8lHb6eOMZwy7Bev9PEvg0S5Oq/kqIO Nh+EFkQvqGM4qvBjdyDc4NykYPLcuVHEkD/eX1sBoJiJoc1SNwxnR/NtyHINyKlSSAAZyZ /iAzufBQACvBaxmaDNL3oFDYeCH+W39VvZHQ9u3iXVVz2BVrJeT9hEPFP5B1PUDjfoap/n vEIo4RIAy1wLh1bEd+diMrlVjyiq79c/4HPvJGJNDQVhvH4er1VV/5cwhPEaZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mBO8r+r1RRbmLOrpyiUL7giAy+vuoYJlRsvV32Qhjg0=; b=d6lYjkFGGwDpesm072w1hC083c+t8zFTnY+QQ7RFtdPQHferOixnTAQD9HO9/+NnAUh31z uR6gGwu6m+lmWIwWyqweXu0yKqhMViD8NlPX5sT94ZUFRBTiXXjfoH8JS4v8lv5meaUKEO vCfkfHjTwLcQLrib3+HR+gFCYbnV6gvVaYP8i6fvvwY24eFyGmSHDz6EiTR377r0i0DkNO peBUNrROodnfC8azrhEaksJ5c1b9OUva2/bXMstzGrFPSq5JIHkk8SCGQ4lCR23+vV0v7Q cKfQ8LECMEb0h2mOR5z/e3ea2u/j9LUs88SPt51cLBA3JsEHCv7PMH0YXQmy5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763317459; a=rsa-sha256; cv=none; b=ff1lm2WP8Q9AJlLqNOY/WZLnlf/fjzkUiTLQNwLRDyHKVUdDywOPTFyXdO0H6IRB3jOX5W tnqJhCpWtiJKMsDSNo+uLF3uaIFcp0vhIBQiqPrs0ZHmhLVnqXPYRiVh1U7S9TfsRVOkt/ EiBLAjHL90Tu4ZYhXXNT+cZVdLHN8haoY9sCUW1AO9R1x9rW8qqKY1vkDIH2DE+JiNaDii P6wYft9dhV9z+ryPeB5itzoyJpiVQtbg6dxHNvHSd7H9cwQsxYcZKTU5dV771gbAyhXqAd FRjwuPgUHw9YhVqRk9PENWvkaGFo6vEPT3T5FRnARjnGzyjwYsvr3/2iCOlNug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8fR73Bs1zqWW; Sun, 16 Nov 2025 18:24: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 5AGIOJBj006335; Sun, 16 Nov 2025 18:24:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGIOJl4006332; Sun, 16 Nov 2025 18:24:19 GMT (envelope-from git) Date: Sun, 16 Nov 2025 18:24:19 GMT Message-Id: <202511161824.5AGIOJl4006332@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: ebc17879f088 - main - inotify: Work around the vput() bug directly List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: ebc17879f0885ca87644980f6275b9759b311eb3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ebc17879f0885ca87644980f6275b9759b311eb3 commit ebc17879f0885ca87644980f6275b9759b311eb3 Author: Mark Johnston AuthorDate: 2025-11-15 18:00:44 +0000 Commit: Mark Johnston CommitDate: 2025-11-16 18:20:15 +0000 inotify: Work around the vput() bug directly For 15.0, apply a minimal fix which at least ensures that inotify can't trigger the latent race described in commit 99cb3dca4773 ("vnode: Rework vput() to avoid holding the vnode lock after decrementing"). Reviewed by: olce, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53774 --- sys/kern/vfs_inotify.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_inotify.c b/sys/kern/vfs_inotify.c index e60d8426ee42..fd1ef39b13f7 100644 --- a/sys/kern/vfs_inotify.c +++ b/sys/kern/vfs_inotify.c @@ -381,7 +381,14 @@ inotify_unlink_watch_locked(struct inotify_softc *sc, struct inotify_watch *watc static void inotify_free_watch(struct inotify_watch *watch) { - vrele(watch->vp); + /* + * Formally, we don't need to lock the vnode here. However, if we + * don't, and vrele() releases the last reference, it's possible the + * vnode will be recycled while a different thread holds the vnode lock. + * Work around this bug by acquiring the lock here. + */ + (void)vn_lock(watch->vp, LK_EXCLUSIVE | LK_RETRY); + vput(watch->vp); free(watch, M_INOTIFY); } From nobody Sun Nov 16 18:24:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8fR86Ff2z6Gs3V; Sun, 16 Nov 2025 18:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8fR84lrgz42Cc; Sun, 16 Nov 2025 18:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JKXHtreF++JANYhafSuvV7urE8NoANonYMF2NSJgNok=; b=c48KURzjKSLD+SWsGmruQsPLJ9jd2zKmLSz2JVxvpLejdrYizCt8MKx4B8rZhi4PXgiYzn bEeXNTgKMSaxGC6c04vKewuS2U9xVw+W7yihuKYJtjLSt/7dZHm+L244rx1ivtk0hrJVNb KNB4lpCTmyGCEG4DmHWkgia+mtkzpUlWgVd84gZfvxMQwODkldN6DmrCHQxvN6WD+qF+vA zzBiEWvQHGYFr7W9g03XbF1c6LrYZ2dedNIlSNG4AOdTbpmO1HVO/sSMDk44B5KPIh+rqg PAV5syNe+SkKxJkLX0pJPJKwHb4xpzULgtt1i+XjCIJJf+BSArWmpVFt3IfI7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JKXHtreF++JANYhafSuvV7urE8NoANonYMF2NSJgNok=; b=UxsCcWs9qUtpKzxzzhkgfJnQPAU0VYS+vsphip5ae5YDoHQo8WUVylNZ6+P6YOQYEdMqGY uBEn+0RvRTQZqyUMPj18S+jXCkJ3387j2oKv2nlRK9CJBGuh4RaHxuJ6eRYzXZJhYYTT/D CMogndpqmfmqZpxoqnxZvJBnvEzoyHwkEJgVGwRUGu76zrA0Pw/fQlq1tH6GFbDGV9RrjN EnigY0p7ph7o/yAH8b4XH4c7Eea1gQXZEYmv6j3XpYskXecdHyDqD6kZYHbr2pe4LKOCSh 5jYZYkLhadpM7e/SzIAlCeIbZ0ArGC0FRJBe0JwGI2dWDGJTB4aaqraIg+nQ9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763317460; a=rsa-sha256; cv=none; b=DI6aFZ/Ib793wEQwlFO/ko6kYXmSGGSRz8c8lmwZ67Omyn8NxUDjZ4UcAswQy1SyGy4Rja c+fjJsB1dLlb8cYxlvfVwz77DXaQ+BpZmYGmzc+bHwgWNkBx4LaVo7AyueMZ5MCwvdg8gQ OjABbGzVd/3P7oFSkMxANYtOO/m59BO2hY/SSM065/6EKIj4KijQ1KoCAVeGxCrbo2nj4I 7x3MygWbghCSybOxq56imP2UNfrCE7IYDpaI0QHqSPNQShcQylsyUzxQorRcpjt0eAgd8m j9AU4c9jUjeQ7FCVvfdMPjmQ8OmVR5t3d0Z507sULSDIxRnwWhCrxuNLdUJeQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8fR84CwkzptS; Sun, 16 Nov 2025 18:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AGIOK26006368; Sun, 16 Nov 2025 18:24:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGIOKDe006365; Sun, 16 Nov 2025 18:24:20 GMT (envelope-from git) Date: Sun, 16 Nov 2025 18:24:20 GMT Message-Id: <202511161824.5AGIOKDe006365@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: 1390bba42caf - main - file: Add a fdclose 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1390bba42caf53a00fa370f3844cd7b3725ed4ec Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1390bba42caf53a00fa370f3844cd7b3725ed4ec commit 1390bba42caf53a00fa370f3844cd7b3725ed4ec Author: Mark Johnston AuthorDate: 2025-11-16 15:49:39 +0000 Commit: Mark Johnston CommitDate: 2025-11-16 18:20:15 +0000 file: Add a fdclose method Consider a program that creates a unix socket pair, transmits both sockets from one to the other using an SCM_RIGHTS message, and then closes both sockets without externalizing the message. unp_gc() is supposed to handle cleanup, but it is only triggered by uipc_detach(), which runs when a unix socket is destroyed. Because the two sockets are internalized, their refcounts are positive, so uipc_detach() isn't called. As a result, a userspace program can create an unbounded amount of garbage without triggering reclaim. Let's trigger garbage collection whenever a unix socket is close()d. To implement this, add new a fdclose file op and protocol op, and implement them accordingly. Since mqueuefs has a hack to hook into the file close path, convert it to use the new op as well. Now, userspace can't create garbage without triggering reclamation. Reviewed by: glebius, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53744 --- sys/kern/kern_descrip.c | 8 ++----- sys/kern/sys_socket.c | 12 ++++++++++ sys/kern/uipc_mqueue.c | 59 +++++++++++++++++++++++-------------------------- sys/kern/uipc_socket.c | 3 ++- sys/kern/uipc_usrreq.c | 27 ++++++++++++++++++---- sys/sys/file.h | 2 ++ sys/sys/mqueue.h | 5 ----- sys/sys/protosw.h | 7 ++++-- 8 files changed, 74 insertions(+), 49 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index a71a601733e5..2fa0621bdfca 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -194,7 +194,6 @@ struct filedesc0 { */ static int __exclusive_cache_line openfiles; /* actual number of open files */ struct mtx sigio_lock; /* mtx to protect pointers to sigio */ -void __read_mostly (*mq_fdclose)(struct thread *td, int fd, struct file *fp); /* * If low >= size, just return low. Otherwise find the first zero bit in the @@ -1413,11 +1412,8 @@ closefp_impl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, if (__predict_false(!TAILQ_EMPTY(&fdp->fd_kqlist))) knote_fdclose(td, fd); - /* - * We need to notify mqueue if the object is of type mqueue. - */ - if (__predict_false(fp->f_type == DTYPE_MQUEUE)) - mq_fdclose(td, fd, fp); + if (fp->f_ops->fo_fdclose != NULL) + fp->f_ops->fo_fdclose(fp, fd, td); FILEDESC_XUNLOCK(fdp); #ifdef AUDIT diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index bc0725230cca..8cf5ffcdbb96 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -90,6 +90,7 @@ static fo_poll_t soo_poll; static fo_kqfilter_t soo_kqfilter; static fo_stat_t soo_stat; static fo_close_t soo_close; +static fo_fdclose_t soo_fdclose; static fo_chmod_t soo_chmod; static fo_fill_kinfo_t soo_fill_kinfo; static fo_aio_queue_t soo_aio_queue; @@ -105,6 +106,7 @@ const struct fileops socketops = { .fo_kqfilter = soo_kqfilter, .fo_stat = soo_stat, .fo_close = soo_close, + .fo_fdclose = soo_fdclose, .fo_chmod = soo_chmod, .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, @@ -362,6 +364,16 @@ soo_close(struct file *fp, struct thread *td) return (error); } +static void +soo_fdclose(struct file *fp, int fd __unused, struct thread *td) +{ + struct socket *so; + + so = fp->f_data; + if (so->so_proto->pr_fdclose != NULL) + so->so_proto->pr_fdclose(so); +} + static int soo_chmod(struct file *fp, mode_t mode, struct ucred *cred, struct thread *td) { diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 4c1bb1ff228e..68eda5ecb039 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -267,7 +267,6 @@ static int _mqueue_send(struct mqueue *mq, struct mqueue_msg *msg, static int _mqueue_recv(struct mqueue *mq, struct mqueue_msg **msg, int timo); static void mqueue_send_notification(struct mqueue *mq); -static void mqueue_fdclose(struct thread *td, int fd, struct file *fp); static void mq_proc_exit(void *arg, struct proc *p); /* @@ -688,7 +687,6 @@ mqfs_init(struct vfsconf *vfc) mqfs_fixup_dir(root); exit_tag = EVENTHANDLER_REGISTER(process_exit, mq_proc_exit, NULL, EVENTHANDLER_PRI_ANY); - mq_fdclose = mqueue_fdclose; p31b_setcfg(CTL_P1003_1B_MESSAGE_PASSING, _POSIX_MESSAGE_PASSING); mqfs_osd_jail_slot = osd_jail_register(NULL, methods); return (0); @@ -2472,35 +2470,6 @@ sys_kmq_notify(struct thread *td, struct kmq_notify_args *uap) return (kern_kmq_notify(td, uap->mqd, evp)); } -static void -mqueue_fdclose(struct thread *td, int fd, struct file *fp) -{ - struct mqueue *mq; -#ifdef INVARIANTS - struct filedesc *fdp; - - fdp = td->td_proc->p_fd; - FILEDESC_LOCK_ASSERT(fdp); -#endif - - if (fp->f_ops == &mqueueops) { - mq = FPTOMQ(fp); - mtx_lock(&mq->mq_mutex); - notifier_remove(td->td_proc, mq, fd); - - /* have to wakeup thread in same process */ - if (mq->mq_flags & MQ_RSEL) { - mq->mq_flags &= ~MQ_RSEL; - selwakeup(&mq->mq_rsel); - } - if (mq->mq_flags & MQ_WSEL) { - mq->mq_flags &= ~MQ_WSEL; - selwakeup(&mq->mq_wsel); - } - mtx_unlock(&mq->mq_mutex); - } -} - static void mq_proc_exit(void *arg __unused, struct proc *p) { @@ -2566,6 +2535,33 @@ mqf_close(struct file *fp, struct thread *td) return (0); } +static void +mqf_fdclose(struct file *fp, int fd, struct thread *td) +{ + struct mqueue *mq; +#ifdef INVARIANTS + struct filedesc *fdp; + + fdp = td->td_proc->p_fd; + FILEDESC_LOCK_ASSERT(fdp); +#endif + + mq = FPTOMQ(fp); + mtx_lock(&mq->mq_mutex); + notifier_remove(td->td_proc, mq, fd); + + /* have to wakeup thread in same process */ + if (mq->mq_flags & MQ_RSEL) { + mq->mq_flags &= ~MQ_RSEL; + selwakeup(&mq->mq_rsel); + } + if (mq->mq_flags & MQ_WSEL) { + mq->mq_flags &= ~MQ_WSEL; + selwakeup(&mq->mq_wsel); + } + mtx_unlock(&mq->mq_mutex); +} + static int mqf_stat(struct file *fp, struct stat *st, struct ucred *active_cred) { @@ -2694,6 +2690,7 @@ static const struct fileops mqueueops = { .fo_kqfilter = mqf_kqfilter, .fo_stat = mqf_stat, .fo_close = mqf_close, + .fo_fdclose = mqf_fdclose, .fo_chmod = mqf_chmod, .fo_chown = mqf_chown, .fo_sendfile = invfo_sendfile, diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index eb9544628137..00aa5f9309b2 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -54,7 +54,8 @@ * consumer of a socket is starting to tear down the socket, and that the * protocol should terminate the connection. Historically, pr_abort() also * detached protocol state from the socket state, but this is no longer the - * case. + * case. pr_fdclose() is called when userspace invokes close(2) on a socket + * file descriptor. * * socreate() creates a socket and attaches protocol state. This is a public * interface that may be used by socket layer consumers to create new diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 6996f3d447bd..60736af5adf6 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -792,13 +792,19 @@ uipc_connect2(struct socket *so1, struct socket *so2) return (0); } +static void +maybe_schedule_gc(void) +{ + if (atomic_load_int(&unp_rights) != 0) + taskqueue_enqueue_timeout(taskqueue_thread, &unp_gc_task, -1); +} + static void uipc_detach(struct socket *so) { struct unpcb *unp, *unp2; struct mtx *vplock; struct vnode *vp; - int local_unp_rights; unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_detach: unp == NULL")); @@ -854,7 +860,6 @@ uipc_detach(struct socket *so) UNP_REF_LIST_UNLOCK(); UNP_PCB_LOCK(unp); - local_unp_rights = unp_rights; unp->unp_socket->so_pcb = NULL; unp->unp_socket = NULL; free(unp->unp_addr, M_SONAME); @@ -865,8 +870,7 @@ uipc_detach(struct socket *so) mtx_unlock(vplock); vrele(vp); } - if (local_unp_rights) - taskqueue_enqueue_timeout(taskqueue_thread, &unp_gc_task, -1); + maybe_schedule_gc(); switch (so->so_type) { case SOCK_STREAM: @@ -902,6 +906,18 @@ uipc_disconnect(struct socket *so) return (0); } +static void +uipc_fdclose(struct socket *so __unused) +{ + /* + * Ensure that userspace can't create orphaned file descriptors without + * triggering garbage collection. Triggering GC from uipc_detach() is + * not sufficient, since that's only closed once a socket reference + * count drops to zero. + */ + maybe_schedule_gc(); +} + static int uipc_listen(struct socket *so, int backlog, struct thread *td) { @@ -4372,6 +4388,7 @@ static struct protosw streamproto = { .pr_connect2 = uipc_connect2, .pr_detach = uipc_detach, .pr_disconnect = uipc_disconnect, + .pr_fdclose = uipc_fdclose, .pr_listen = uipc_listen, .pr_peeraddr = uipc_peeraddr, .pr_send = uipc_sendfile, @@ -4402,6 +4419,7 @@ static struct protosw dgramproto = { .pr_connect2 = uipc_connect2, .pr_detach = uipc_detach, .pr_disconnect = uipc_disconnect, + .pr_fdclose = uipc_fdclose, .pr_peeraddr = uipc_peeraddr, .pr_sosend = uipc_sosend_dgram, .pr_sense = uipc_sense, @@ -4426,6 +4444,7 @@ static struct protosw seqpacketproto = { .pr_connect2 = uipc_connect2, .pr_detach = uipc_detach, .pr_disconnect = uipc_disconnect, + .pr_fdclose = uipc_fdclose, .pr_listen = uipc_listen, .pr_peeraddr = uipc_peeraddr, .pr_sense = uipc_sense, diff --git a/sys/sys/file.h b/sys/sys/file.h index e0195c7c6c2a..89dba2b1c3f8 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -116,6 +116,7 @@ typedef int fo_kqfilter_t(struct file *fp, struct knote *kn); typedef int fo_stat_t(struct file *fp, struct stat *sb, struct ucred *active_cred); typedef int fo_close_t(struct file *fp, struct thread *td); +typedef void fo_fdclose_t(struct file *fp, int fd, struct thread *td); typedef int fo_chmod_t(struct file *fp, mode_t mode, struct ucred *active_cred, struct thread *td); typedef int fo_chown_t(struct file *fp, uid_t uid, gid_t gid, @@ -153,6 +154,7 @@ struct fileops { fo_kqfilter_t *fo_kqfilter; fo_stat_t *fo_stat; fo_close_t *fo_close; + fo_fdclose_t *fo_fdclose; fo_chmod_t *fo_chmod; fo_chown_t *fo_chown; fo_sendfile_t *fo_sendfile; diff --git a/sys/sys/mqueue.h b/sys/sys/mqueue.h index 50f6681ce218..211f09d57427 100644 --- a/sys/sys/mqueue.h +++ b/sys/sys/mqueue.h @@ -37,9 +37,4 @@ struct mq_attr { long __reserved[4]; /* Ignored for input, zeroed for output */ }; -#ifdef _KERNEL -struct thread; -struct file; -extern void (*mq_fdclose)(struct thread *td, int fd, struct file *fp); -#endif #endif diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 7fb8dfdc7208..392ff7cf678e 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -94,6 +94,7 @@ typedef int pr_sopoll_t(struct socket *, int, struct thread *); typedef int pr_kqfilter_t(struct socket *, struct knote *); typedef void pr_sosetlabel_t(struct socket *); typedef void pr_close_t(struct socket *); +typedef void pr_fdclose_t(struct socket *); typedef int pr_bindat_t(int, struct socket *, struct sockaddr *, struct thread *); typedef int pr_connectat_t(int, struct socket *, struct sockaddr *, @@ -120,8 +121,8 @@ struct protosw { pr_detach_t *pr_detach; /* destruction: sofree() */ pr_connect_t *pr_connect; /* connect(2) */ pr_disconnect_t *pr_disconnect; /* sodisconnect() */ - pr_close_t *pr_close; /* close(2) */ - pr_shutdown_t *pr_shutdown; /* shutdown(2) */ + pr_close_t *pr_close; /* soclose(), socket refcount is 0 */ + pr_fdclose_t *pr_fdclose; /* close(2) */ pr_rcvd_t *pr_rcvd; /* soreceive_generic() if PR_WANTRCVD */ pr_aio_queue_t *pr_aio_queue; /* aio(9) */ /* Cache line #3 */ @@ -142,7 +143,9 @@ struct protosw { pr_sosetlabel_t *pr_sosetlabel; /* MAC, XXXGL: remove */ pr_setsbopt_t *pr_setsbopt; /* Socket buffer ioctls */ pr_chmod_t *pr_chmod; /* fchmod(2) */ +/* Cache line #5 */ pr_kqfilter_t *pr_kqfilter; /* kevent(2) */ + pr_shutdown_t *pr_shutdown; /* shutdown(2) */ }; #endif /* defined(_KERNEL) || defined(_WANT_PROTOSW) */ #ifdef _KERNEL From nobody Sun Nov 16 18:29:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8fXY0YgXz6GsB1; Sun, 16 Nov 2025 18:29: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8fXY0Jk7z4346; Sun, 16 Nov 2025 18:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pCL0iE+80BzfLdBvg8ZNV0OcBZrNzWv3vUHX3c4cNVg=; b=DO0Lz+0Fw51oWBWIkKvv4c5JOD/ebM5L8mDaB8NueKuHJErUTKF8o+I7Dw0uH1Bf0srpJj DLdX/xT1OI0PbHRN5nAhspRJ6u4j4BrKE3j2RZUvwhwwdlSdZT4lEnK/YlrOeHyh92R2rP LuFeQcCz+NnYGWa1gO44OlyDYa3Wo74fBl49FI9DxzYFKs8qJEmRlvD0nrmh2N7NMP9swh cIo7aFNJs5/cymUnOUrgNz0UnEekqUJOaQKMy6S0dO2ooXyT3oLkH/cXTXCL0fap/x3F0B IYqLzWSvYlOLhtltnokzQjQDEw8m/lCNgNUCQTDbXJg2iRx8BjW3kx8Fydd/dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pCL0iE+80BzfLdBvg8ZNV0OcBZrNzWv3vUHX3c4cNVg=; b=A7nOdUKe3/neF9VLTyiEW16wremAG+T6aCgpZAvVLdMKMsWuwRv2eoFpQqfrsU8VFTIZuA 4ZzK+I3V79BqaP8/lQQ9vrYO/boxsRUMPiujVDu3zewNCEv1yrW4eAMcO4GGNVICYUHZ5Z Pu3Z6X2gwaNU+itqxd0sEzb7CnkQnAyXhnZUvm0g4i0+q7zEZSU3HussRvzIKCXhEPPjRW 5d7O0O/MAOM4UUQosXS/fbKByCEed2VJB0j0FufScFVTd9oIf9Qp4e/wV2IMoI7g8Q/q6p soX4Itdhc11wSFqsk/sRBR31ikEMeRcATaRuNM1kwDv8YeXHZ33oBz8ujX4vRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763317741; a=rsa-sha256; cv=none; b=W7nYJ+dTSco9QGHutGdKVKDjMILB8Isdf39UbGNypobWGm47Jy2hhc6AiDtRdC5l0w5uME iTwL+BbgTu849dSTSoMm9n2Fd/J3S/IJfDtlm4tYYW3bTe5dgsdHIAAQ0gyP/DeMhYIfUl IkiribtinQ00hzNWbXzuXvnmJRp3atBrBC1OjgdcMAfHS8x5oYvPEQdygMF0XhNNCr5Nuc D7BKYmKIRi81LtDZM9JidX7SaHKs2avZMniw0//GYYkakcRAosE2j70ujdxTgf90boj8s0 MhfyKSs4svcijuiXOBOBkycexHYwChFYtUZDMhONTbARMIdAOxzU99Kt0x8DOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8fXX6vyszqf1; Sun, 16 Nov 2025 18:29: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 5AGIT0g1007886; Sun, 16 Nov 2025 18:29:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGIT0h9007883; Sun, 16 Nov 2025 18:29:00 GMT (envelope-from git) Date: Sun, 16 Nov 2025 18:29:00 GMT Message-Id: <202511161829.5AGIT0h9007883@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: 87795c6e95b0 - main - stand: Rename EFI_ERROR_CODE to DECODE_ERROR to avoid Edk2 Clash List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 87795c6e95b01cd20df103109cdb7077eb46bc46 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=87795c6e95b01cd20df103109cdb7077eb46bc46 commit 87795c6e95b01cd20df103109cdb7077eb46bc46 Author: Warner Losh AuthorDate: 2025-11-16 17:32:18 +0000 Commit: Warner Losh CommitDate: 2025-11-16 18:29:02 +0000 stand: Rename EFI_ERROR_CODE to DECODE_ERROR to avoid Edk2 Clash This follows what Illumos has done. Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D53656 --- stand/efi/boot1/boot1.c | 8 ++++---- stand/efi/boot1/proto.c | 4 ++-- stand/efi/boot1/ufs_module.c | 2 +- stand/efi/boot1/zfs_module.c | 2 +- stand/efi/gptboot/proto.c | 4 ++-- stand/efi/include/efierr.h | 2 +- stand/efi/libefi/devpath.c | 2 +- stand/efi/libefi/efi_driver_utils.c | 2 +- stand/efi/libefi/eficom.c | 2 +- stand/efi/libefi/efinet.c | 10 +++++----- stand/efi/libefi/efipart.c | 4 ++-- stand/efi/libefi/env.c | 8 ++++---- stand/efi/loader/arch/amd64/multiboot2.c | 4 ++-- stand/efi/loader/arch/amd64/trap.c | 8 ++++---- stand/efi/loader/bootinfo.c | 6 +++--- stand/efi/loader/copy.c | 4 ++-- stand/efi/loader/framebuffer.c | 6 +++--- stand/efi/loader/main.c | 2 +- 18 files changed, 40 insertions(+), 40 deletions(-) diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c index c906b430c0d6..8228044b3be3 100644 --- a/stand/efi/boot1/boot1.c +++ b/stand/efi/boot1/boot1.c @@ -118,7 +118,7 @@ try_boot(const boot_module_t *mod, dev_info_t *dev, void *loaderbuf, size_t load if ((status = BS->LoadImage(TRUE, IH, efi_devpath_last_node(dev->devpath), loaderbuf, loadersize, &loaderhandle)) != EFI_SUCCESS) { printf("Failed to load image provided by %s, size: %zu, (%lu)\n", - mod->name, loadersize, EFI_ERROR_CODE(status)); + mod->name, loadersize, DECODE_ERROR(status)); goto errout; } @@ -126,7 +126,7 @@ try_boot(const boot_module_t *mod, dev_info_t *dev, void *loaderbuf, size_t load (void **)&loaded_image); if (status != EFI_SUCCESS) { printf("Failed to query LoadedImage provided by %s (%lu)\n", - mod->name, EFI_ERROR_CODE(status)); + mod->name, DECODE_ERROR(status)); goto errout; } @@ -152,7 +152,7 @@ try_boot(const boot_module_t *mod, dev_info_t *dev, void *loaderbuf, size_t load if ((status = BS->StartImage(loaderhandle, NULL, NULL)) != EFI_SUCCESS) { printf("Failed to start image provided by %s (%lu)\n", - mod->name, EFI_ERROR_CODE(status)); + mod->name, DECODE_ERROR(status)); loaded_image->LoadOptionsSize = 0; loaded_image->LoadOptions = NULL; } @@ -254,7 +254,7 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) &DevicePathGUID, (void **)&imgpath); if (status != EFI_SUCCESS) { DPRINTF("Failed to get image DevicePath (%lu)\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); } else { text = efi_devpath_name(imgpath); if (text != NULL) { diff --git a/stand/efi/boot1/proto.c b/stand/efi/boot1/proto.c index f81debd168b9..042a675f543d 100644 --- a/stand/efi/boot1/proto.c +++ b/stand/efi/boot1/proto.c @@ -68,7 +68,7 @@ probe_handle(EFI_HANDLE h, EFI_DEVICE_PATH *imgpath) if (status != EFI_SUCCESS) { DPRINTF("\nFailed to query DevicePath (%lu)\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (-1); } #ifdef EFI_DEBUG @@ -84,7 +84,7 @@ probe_handle(EFI_HANDLE h, EFI_DEVICE_PATH *imgpath) if (status != EFI_SUCCESS) { DPRINTF("\nFailed to query BlockIoProtocol (%lu)\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (-1); } diff --git a/stand/efi/boot1/ufs_module.c b/stand/efi/boot1/ufs_module.c index 0bdd5c018b06..e6c7c64c1e19 100644 --- a/stand/efi/boot1/ufs_module.c +++ b/stand/efi/boot1/ufs_module.c @@ -62,7 +62,7 @@ dskread(void *buf, uint64_t lba, int nblk) DPRINTF("dskread: failed dev: %p, id: %u, lba: %ju, size: %d, " "status: %lu\n", devinfo->dev, devinfo->dev->Media->MediaId, (uintmax_t)lba, size, - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (-1); } diff --git a/stand/efi/boot1/zfs_module.c b/stand/efi/boot1/zfs_module.c index 16722b33f0b9..f0cf28e8ce68 100644 --- a/stand/efi/boot1/zfs_module.c +++ b/stand/efi/boot1/zfs_module.c @@ -106,7 +106,7 @@ error: DPRINTF("vdev_read: failed dev: %p, id: %u, lba: %ju, size: %zu," " rb_size: %zu, status: %lu\n", devinfo->dev, devinfo->dev->Media->MediaId, (uintmax_t)lba, bytes, rb_size, - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (-1); } diff --git a/stand/efi/gptboot/proto.c b/stand/efi/gptboot/proto.c index a1825d9c1c15..a6bc0c268dcd 100644 --- a/stand/efi/gptboot/proto.c +++ b/stand/efi/gptboot/proto.c @@ -69,7 +69,7 @@ drvread(struct dsk *dskp, void *buf, daddr_t lba, unsigned nblk) DPRINTF("dskread: failed dev: %p, id: %u, lba: %ju, size: %d, " "status: %lu\n", devinfo->dev, dev->Media->MediaId, (uintmax_t)lba, size, - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (-1); } @@ -99,7 +99,7 @@ drvwrite(struct dsk *dskp, void *buf, daddr_t lba, unsigned nblk) DPRINTF("dskread: failed dev: %p, id: %u, lba: %ju, size: %d, " "status: %lu\n", devinfo->dev, dev->Media->MediaId, (uintmax_t)lba, size, - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (-1); } diff --git a/stand/efi/include/efierr.h b/stand/efi/include/efierr.h index 2aa2622a3877..be0aab8264e1 100644 --- a/stand/efi/include/efierr.h +++ b/stand/efi/include/efierr.h @@ -30,7 +30,7 @@ Revision History #define EFIWARN(a) (a) #define EFI_ERROR(a) (((INTN) a) < 0) -#define EFI_ERROR_CODE(a) (unsigned long)(a & ~EFI_ERROR_MASK) +#define DECODE_ERROR(a) (unsigned long)(a & ~EFI_ERROR_MASK) #define EFI_SUCCESS 0 diff --git a/stand/efi/libefi/devpath.c b/stand/efi/libefi/devpath.c index db152f8eb9ad..22ae895ff95a 100644 --- a/stand/efi/libefi/devpath.c +++ b/stand/efi/libefi/devpath.c @@ -71,7 +71,7 @@ efi_close_devpath(EFI_HANDLE handle) status = BS->CloseProtocol(handle, &DevicePathGUID, IH, NULL); if (EFI_ERROR(status)) - printf("CloseProtocol error: %lu\n", EFI_ERROR_CODE(status)); + printf("CloseProtocol error: %lu\n", DECODE_ERROR(status)); } static char * diff --git a/stand/efi/libefi/efi_driver_utils.c b/stand/efi/libefi/efi_driver_utils.c index adb57f39fdce..22c93d7ef296 100644 --- a/stand/efi/libefi/efi_driver_utils.c +++ b/stand/efi/libefi/efi_driver_utils.c @@ -84,7 +84,7 @@ install_driver(EFI_DRIVER_BINDING *driver) if (EFI_ERROR(status)) { printf("Failed to install driver (%ld)!\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); } return (status); diff --git a/stand/efi/libefi/eficom.c b/stand/efi/libefi/eficom.c index 2aa592da47f4..a033a8ebc2ef 100644 --- a/stand/efi/libefi/eficom.c +++ b/stand/efi/libefi/eficom.c @@ -510,7 +510,7 @@ comc_port_set(struct env_var *ev, int flags, const void *value) (void**)&sio, IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); if (EFI_ERROR(status)) { - printf("OpenProtocol: %lu\n", EFI_ERROR_CODE(status)); + printf("OpenProtocol: %lu\n", DECODE_ERROR(status)); return (CMD_ERROR); } diff --git a/stand/efi/libefi/efinet.c b/stand/efi/libefi/efinet.c index e872110ef08f..161d2cfd930a 100644 --- a/stand/efi/libefi/efinet.c +++ b/stand/efi/libefi/efinet.c @@ -122,7 +122,7 @@ efinet_probe(struct netif *nif, void *machdep_hint) if (status != EFI_SUCCESS) { printf("Unable to open network interface %d for " "exclusive access: %lu\n", nif->nif_unit, - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (efi_status_to_errno(status)); } @@ -287,7 +287,7 @@ efinet_init(struct iodesc *desc, void *machdep_hint) status = OpenProtocolByHandle(h, &sn_guid, (void **)&nif->nif_devdata); if (status != EFI_SUCCESS) { printf("net%d: cannot fetch interface data (status=%lu)\n", - nif->nif_unit, EFI_ERROR_CODE(status)); + nif->nif_unit, DECODE_ERROR(status)); return; } @@ -296,7 +296,7 @@ efinet_init(struct iodesc *desc, void *machdep_hint) status = net->Start(net); if (status != EFI_SUCCESS) { printf("net%d: cannot start interface (status=%lu)\n", - nif->nif_unit, EFI_ERROR_CODE(status)); + nif->nif_unit, DECODE_ERROR(status)); return; } } @@ -305,7 +305,7 @@ efinet_init(struct iodesc *desc, void *machdep_hint) status = net->Initialize(net, 0, 0); if (status != EFI_SUCCESS) { printf("net%d: cannot init. interface (status=%lu)\n", - nif->nif_unit, EFI_ERROR_CODE(status)); + nif->nif_unit, DECODE_ERROR(status)); return; } } @@ -316,7 +316,7 @@ efinet_init(struct iodesc *desc, void *machdep_hint) status = net->ReceiveFilters(net, mask, 0, FALSE, 0, NULL); if (status != EFI_SUCCESS) printf("net%d: cannot set rx. filters (status=%lu)\n", - nif->nif_unit, EFI_ERROR_CODE(status)); + nif->nif_unit, DECODE_ERROR(status)); #ifdef EFINET_DEBUG dump_mode(net->Mode); diff --git a/stand/efi/libefi/efipart.c b/stand/efi/libefi/efipart.c index 3df6034571f5..7acbe3921137 100644 --- a/stand/efi/libefi/efipart.c +++ b/stand/efi/libefi/efipart.c @@ -388,7 +388,7 @@ efipart_inithandles(void) status = OpenProtocolByHandle(hin[i], &blkio_guid, (void **)&blkio); if (EFI_ERROR(status)) { - printf("error %lu\n", EFI_ERROR_CODE(status)); + printf("error %lu\n", DECODE_ERROR(status)); continue; } @@ -1033,7 +1033,7 @@ efipart_readwrite(EFI_BLOCK_IO *blkio, int rw, daddr_t blk, daddr_t nblks, if (EFI_ERROR(status)) { printf("%s: rw=%d, blk=%ju size=%ju status=%lu\n", __func__, rw, - blk, nblks, EFI_ERROR_CODE(status)); + blk, nblks, DECODE_ERROR(status)); } TSEXIT(); return (efi_status_to_errno(status)); diff --git a/stand/efi/libefi/env.c b/stand/efi/libefi/env.c index 328476a9f68b..d518b8fac257 100644 --- a/stand/efi/libefi/env.c +++ b/stand/efi/libefi/env.c @@ -679,7 +679,7 @@ efi_print_var(CHAR16 *varnamearg, EFI_GUID *matchguid, int lflag) status = RS->GetVariable(varnamearg, matchguid, &attr, &datasz, NULL); if (status != EFI_BUFFER_TOO_SMALL) { printf("Can't get the variable: error %#lx\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (CMD_ERROR); } data = malloc(datasz); @@ -691,7 +691,7 @@ efi_print_var(CHAR16 *varnamearg, EFI_GUID *matchguid, int lflag) status = RS->GetVariable(varnamearg, matchguid, &attr, &datasz, data); if (status != EFI_SUCCESS) { printf("Can't get the variable: error %#lx\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); free(data); return (CMD_ERROR); } @@ -954,7 +954,7 @@ command_efi_set(int argc, char *argv[]) strlen(val) + 1, val); if (EFI_ERROR(err)) { printf("Failed to set variable: error %lu\n", - EFI_ERROR_CODE(err)); + DECODE_ERROR(err)); return (CMD_ERROR); } #else @@ -990,7 +990,7 @@ command_efi_unset(int argc, char *argv[]) err = RS->SetVariable(wvar, &guid, 0, 0, NULL); if (EFI_ERROR(err)) { printf("Failed to unset variable: error %lu\n", - EFI_ERROR_CODE(err)); + DECODE_ERROR(err)); return (CMD_ERROR); } #else diff --git a/stand/efi/loader/arch/amd64/multiboot2.c b/stand/efi/loader/arch/amd64/multiboot2.c index 6216fac42e4a..086dba33895a 100644 --- a/stand/efi/loader/arch/amd64/multiboot2.c +++ b/stand/efi/loader/arch/amd64/multiboot2.c @@ -343,7 +343,7 @@ exec(struct preloaded_file *fp) EFI_SIZE_TO_PAGES(PAGE_SIZE), &addr); if (EFI_ERROR(status)) { printf("Failed to allocate pages for multiboot2 header: %lu\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); error = ENOMEM; goto error; } @@ -351,7 +351,7 @@ exec(struct preloaded_file *fp) EFI_SIZE_TO_PAGES(128 * 1024), &stack); if (EFI_ERROR(status)) { printf("Failed to allocate pages for Xen stack: %lu\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); error = ENOMEM; goto error; } diff --git a/stand/efi/loader/arch/amd64/trap.c b/stand/efi/loader/arch/amd64/trap.c index 37e7e9d263a7..f79d74bf0322 100644 --- a/stand/efi/loader/arch/amd64/trap.c +++ b/stand/efi/loader/arch/amd64/trap.c @@ -214,7 +214,7 @@ efi_setup_tss(struct region_descriptor *gdt, uint32_t loader_tss_idx, EFI_SIZE_TO_PAGES(sizeof(struct amd64tss)), &tss_pa); if (EFI_ERROR(status)) { printf("efi_setup_tss: AllocatePages tss error %lu\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (0); } *tss = (struct amd64tss *)tss_pa; @@ -251,7 +251,7 @@ efi_redirect_exceptions(void) EFI_SIZE_TO_PAGES(fw_idt.rd_limit), &lidt_pa); if (EFI_ERROR(status)) { printf("efi_redirect_exceptions: AllocatePages IDT error %lu\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); lidt_pa = 0; return (0); } @@ -259,7 +259,7 @@ efi_redirect_exceptions(void) &exc_stack_pa); if (EFI_ERROR(status)) { printf("efi_redirect_exceptions: AllocatePages stk error %lu\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); exc_stack_pa = 0; free_tables(); return (0); @@ -303,7 +303,7 @@ efi_redirect_exceptions(void) &loader_gdt_pa); if (EFI_ERROR(status)) { printf("efi_setup_tss: AllocatePages gdt error " - "%lu\n", EFI_ERROR_CODE(status)); + "%lu\n", DECODE_ERROR(status)); loader_gdt_pa = 0; free_tables(); return (0); diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 7931622c2df6..67b36313c26f 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -251,7 +251,7 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) if (status != EFI_BUFFER_TOO_SMALL) { printf("%s: GetMemoryMap error %lu\n", __func__, - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (EINVAL); } @@ -266,7 +266,7 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) pages, &addr); if (EFI_ERROR(status)) { printf("%s: AllocatePages error %lu\n", __func__, - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (ENOMEM); } @@ -289,7 +289,7 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) if (retry == 0) { BS->FreePages(addr, pages); - printf("ExitBootServices error %lu\n", EFI_ERROR_CODE(status)); + printf("ExitBootServices error %lu\n", DECODE_ERROR(status)); return (EINVAL); } diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c index 7452726565ad..d14411d52f10 100644 --- a/stand/efi/loader/copy.c +++ b/stand/efi/loader/copy.c @@ -107,7 +107,7 @@ efi_verify_staging_size(unsigned long *nr_pages) if (status != EFI_BUFFER_TOO_SMALL) { printf("Can't read memory map: %lu\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); goto out; } @@ -334,7 +334,7 @@ efi_copy_init(void) nr_pages, &staging); if (EFI_ERROR(status)) { printf("failed to allocate staging area: %lu\n", - EFI_ERROR_CODE(status)); + DECODE_ERROR(status)); return (status); } staging_base = staging; diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index fc61ed15ba3c..bd618cf0be86 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -239,7 +239,7 @@ efifb_uga_find_pixel(EFI_UGA_DRAW_PROTOCOL *uga, u_int line, printf("No change detected in frame buffer"); fail: - printf(" -- error %lu\n", EFI_ERROR_CODE(status)); + printf(" -- error %lu\n", DECODE_ERROR(status)); free(data1); return (-1); } @@ -781,7 +781,7 @@ gop_autoresize(void) if (EFI_ERROR(status)) { snprintf(command_errbuf, sizeof(command_errbuf), "gop_autoresize: Unable to set mode to %u (error=%lu)", - mode, EFI_ERROR_CODE(status)); + mode, DECODE_ERROR(status)); return (CMD_ERROR); } (void) cons_update_mode(true); @@ -884,7 +884,7 @@ command_gop(int argc, char *argv[]) if (EFI_ERROR(status)) { snprintf(command_errbuf, sizeof(command_errbuf), "%s: Unable to set mode to %u (error=%lu)", - argv[0], mode, EFI_ERROR_CODE(status)); + argv[0], mode, DECODE_ERROR(status)); return (CMD_ERROR); } (void) cons_update_mode(true); diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 2e51f15f0b5f..2f154321b281 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1936,7 +1936,7 @@ command_chain(int argc, char *argv[]) status = BS->StartImage(loaderhandle, &ExitDataSize, &ExitData); if (status != EFI_SUCCESS) { - printf("StartImage failed (%lu)", EFI_ERROR_CODE(status)); + printf("StartImage failed (%lu)", DECODE_ERROR(status)); if (ExitData != NULL) { printf(": %S", ExitData); BS->FreePool(ExitData); From nobody Sun Nov 16 18:29:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8fXZ3Lynz6GsB2; Sun, 16 Nov 2025 18:29: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8fXZ0vXqz43Js; Sun, 16 Nov 2025 18:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v2Jpgd19mGWMWgp0TCLXgCbAENIbltcD0VWfKwcAe2E=; b=hqZXzfAw4flOBRQlUcX/KlS7dmcpe13C+SIpp9Y8D0/js7l48A0orqG/CG3UgbchYNWG3b 4sHmIUpQdnrWygab0DrH/t2sHzVgJfStdUbuULHe7ebrNWD3kzMN+qBPwNtTF5dObnJvEY 3BafCikZ/rxt+4ifhknJZh/C3Nw785XLLjt+FGSQFaXPKDE9LPk3RWN8QmTll5F68hJz7p ydI1pA0Yzfa0bYPJxXa/3o+Ju4iziJrDfvenBna0L/Sm37mVY3oba9v/c09WCEyhSGJE6i KrqGz9KlqTnBDKhzXof2PtGfNy9Te2RILeM/LuqFtaiagF0yG1l8zeyjmN/QUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v2Jpgd19mGWMWgp0TCLXgCbAENIbltcD0VWfKwcAe2E=; b=iB3Yl+Y4Kzz0UHIdD1Hak72nPbyVfrstosM3F1XgiySePgFiRcprAKTtmuIFdyCq/+V1Oy UV9NC9+qZuvQ9ByUcRh8JbC6NmXtNix5PN2XsGTiF5zWp26Z6nmPkPvTLVSXwo/ATgCYVa ce/5n0KTrjyzhc8/XgTY9mODGNQri2NOyec8UVXujDW4uJsUrS2dsVPPM4pSLCHjcw8cgk EHchsXXlgZaskoqqt2O31p5XdEev63VJGLMt+OCD9SpYXY07QkwfcjifMXQwUXND7wCsxr x/zI4UqRpvhDnaZQW+wbKJfVSXJgPloHbKizm9QHuE0QAJzAgunsexLXcwKG+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763317742; a=rsa-sha256; cv=none; b=Go6TDRWP95IaOnkh0S5FMgZRAO/XVgPanOIITCGL5rMalNsJqdmg7GLzYBOYQbRWqDHIYs qLy5uicxWPf6j9JdPcqOvBzR7gJ5V8QECOlcz0X93TORNBNRa8GkFxyxOBfqheWq1xXVHk rxRudU7oYjjNHLGleGTSlJ79cXZWn9QVTzK+OxJZwvUDCzYnkGXZEcCs9pKvwwYMtyL8Cd 2uGt0AiupE2cMo5Jq/2OL6dgpSvXD1xvFPS2/sAplL3+84SsUk1xrxbOI/S5dp8xZIVpha IDti4/2j25sPrOXlioxWbzX2yXLti+uFMxpXjtKD0laB3xhcyJVpqtEAwUCLoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8fXZ0V7Qzqf2; Sun, 16 Nov 2025 18:29: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 5AGIT2V9007924; Sun, 16 Nov 2025 18:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGIT2Za007920; Sun, 16 Nov 2025 18:29:02 GMT (envelope-from git) Date: Sun, 16 Nov 2025 18:29:02 GMT Message-Id: <202511161829.5AGIT2Za007920@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: ce1342883e03 - main - efi: Move edk2 compat defines to sys/efi-edk2.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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce1342883e03e6a021f03a49d13539a145d320e2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ce1342883e03e6a021f03a49d13539a145d320e2 commit ce1342883e03e6a021f03a49d13539a145d320e2 Author: Warner Losh AuthorDate: 2025-11-16 17:32:26 +0000 Commit: Warner Losh CommitDate: 2025-11-16 18:29:02 +0000 efi: Move edk2 compat defines to sys/efi-edk2.h Create efi-freebsd.h, which is safe to include from the FreeBSD context (all of userland, except the small bits we share with edk2 and the kernel). This defines anything that we need. At the moment, it just includes NULL definitions. Create efi-edk2.h, which is approximately ProcessorBind.h from edk2 that we can include in FreeBSD compontents that are re-using edk2 components (bits of the boot laoder, and libefi*). Update the efi_gid definitions to match edk2 better. Add this file to badfiles.inc, since we can't write it in a way that's compatible. This is copied from the old efi-osdep.h. This has to be done in one commit that's bigger than I like since we can't easily move things piecemeal around they are so inter-related. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D53651 --- lib/libefivar/ProcessorBind.h | 2 +- lib/libefivar/efivar-dp-format.c | 3 -- lib/libefivar/efivar-dp-parse.c | 3 -- lib/libefivar/efivar-dp-xlate.c | 3 -- lib/libefivar/uefi-dplib.h | 1 + lib/libefivar/uefi-dputil.c | 3 -- lib/libefivar/efi-osdep.h => sys/sys/efi-edk2.h | 49 +++++++++++-------------- sys/sys/efi-freebsd.h | 15 ++++++++ sys/sys/efi.h | 2 +- tools/build/test-includes/badfiles.inc | 1 + 10 files changed, 40 insertions(+), 42 deletions(-) diff --git a/lib/libefivar/ProcessorBind.h b/lib/libefivar/ProcessorBind.h index 46abe715d38f..6985a193cff9 100644 --- a/lib/libefivar/ProcessorBind.h +++ b/lib/libefivar/ProcessorBind.h @@ -1,3 +1,3 @@ /* File in public domain */ /* Brings in the glue for UEFI/EDK2 Tianocore code to run on this OS */ -#include "efi-osdep.h" +#include diff --git a/lib/libefivar/efivar-dp-format.c b/lib/libefivar/efivar-dp-format.c index f2dcf1b91c01..2050b09951cb 100644 --- a/lib/libefivar/efivar-dp-format.c +++ b/lib/libefivar/efivar-dp-format.c @@ -33,10 +33,7 @@ #include #include "efichar.h" - -#include "efi-osdep.h" #include "efivar-dp.h" - #include "uefi-dplib.h" /* diff --git a/lib/libefivar/efivar-dp-parse.c b/lib/libefivar/efivar-dp-parse.c index 51c134692f1e..c594e94580da 100644 --- a/lib/libefivar/efivar-dp-parse.c +++ b/lib/libefivar/efivar-dp-parse.c @@ -35,10 +35,7 @@ #include #include "efichar.h" - -#include "efi-osdep.h" #include "efivar-dp.h" - #include "uefi-dplib.h" /* XXX STUBS -- this stuff doesn't work yet */ diff --git a/lib/libefivar/efivar-dp-xlate.c b/lib/libefivar/efivar-dp-xlate.c index 1e816cecbb81..78d82ba4bce0 100644 --- a/lib/libefivar/efivar-dp-xlate.c +++ b/lib/libefivar/efivar-dp-xlate.c @@ -39,10 +39,7 @@ #include #include "efichar.h" - -#include "efi-osdep.h" #include "efivar-dp.h" - #include "uefi-dplib.h" #define MAX_DP_SANITY 4096 /* Biggest device path in bytes */ diff --git a/lib/libefivar/uefi-dplib.h b/lib/libefivar/uefi-dplib.h index 6f76a9763a34..4787088dac19 100644 --- a/lib/libefivar/uefi-dplib.h +++ b/lib/libefivar/uefi-dplib.h @@ -37,6 +37,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef _UEFI_DEVICE_PATH_LIB_H_ #define _UEFI_DEVICE_PATH_LIB_H_ + #include #include #include diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index 6e8f3aeca2ce..c31da14eed2d 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -33,9 +33,6 @@ #include #include #include - -#include "efi-osdep.h" - #include "uefi-dplib.h" /* XXX maybe I should include the entire DevicePathUtiltiies.c and ifdef out what we don't use */ diff --git a/lib/libefivar/efi-osdep.h b/sys/sys/efi-edk2.h similarity index 57% rename from lib/libefivar/efi-osdep.h rename to sys/sys/efi-edk2.h index e91d7405da97..513c56549803 100644 --- a/lib/libefivar/efi-osdep.h +++ b/sys/sys/efi-edk2.h @@ -1,30 +1,11 @@ -/*- - * Copyright (c) 2017 Netflix, Inc. - * - * 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. +/* + * Copyright (c) 2017-2025 Netflix, Inc. * - * 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. + * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef _EFI_OSDEP_H_ -#define _EFI_OSDEP_H_ +#ifndef _SYS_EFI_EDK2_H_ +#define _SYS_EFI_EDK2_H_ /* * Defines to adjust the types that EDK2 uses for FreeBSD so we can @@ -34,10 +15,8 @@ * annoying dependencies that are difficult to satisfy. */ -#include #include #include -#include typedef int8_t INT8; typedef int16_t INT16; @@ -61,7 +40,7 @@ typedef void VOID; //typedef uuid_t EFI_GUID; /* We can't actually call this stuff, so snip out API syntactic sugar */ -#define INTERFACE_DECL(x) +#define INTERFACE_DECL(x) struct x #define EFIAPI #define IN #define OUT @@ -107,4 +86,18 @@ typedef void VOID; #endif /* FreeBSD doesn't have/use MDE_CPU_EBC or MDE_CPU_IPF (ia64) */ -#endif /* _EFI_OSDEP_H_ */ +#if __SIZEOF_LONG__ == 4 +#define MAX_BIT 0x80000000 +#else +#define MAX_BIT 0x8000000000000000 +#endif + +/* + * Sometimes EFI is included after sys/param.h, and that causes a collision. We + * get a collision the other way too, so when including both, you have to + * include sys/param.h first. + */ +#undef MAX +#undef MIN + +#endif /* _SYS_EFI_EDK2_H_ */ diff --git a/sys/sys/efi-freebsd.h b/sys/sys/efi-freebsd.h new file mode 100644 index 000000000000..f3fd04a2196c --- /dev/null +++ b/sys/sys/efi-freebsd.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2025 Netflix, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ +#ifndef _SYS_EFI_FREEBSD_H_ +#define _SYS_EFI_FREEBSD_H_ + +/* + * Minimal defines to allow FreeBSD to use the same type names as EDK2, + * but without depending on all of EDK2's types. + */ +#include + +#endif /* _SYS_EFI_FREEBSD_H_ */ diff --git a/sys/sys/efi.h b/sys/sys/efi.h index f82c733898b4..830cca9c1832 100644 --- a/sys/sys/efi.h +++ b/sys/sys/efi.h @@ -27,8 +27,8 @@ #ifndef _SYS_EFI_H_ #define _SYS_EFI_H_ -#include #include +#include #define EFI_PAGE_SHIFT 12 #define EFI_PAGE_SIZE (1 << EFI_PAGE_SHIFT) diff --git a/tools/build/test-includes/badfiles.inc b/tools/build/test-includes/badfiles.inc index 9feb73edc5d0..3c7390b22a89 100644 --- a/tools/build/test-includes/badfiles.inc +++ b/tools/build/test-includes/badfiles.inc @@ -31,6 +31,7 @@ BADHDRS= \ sys/domainset.h \ sys/dtrace_bsd.h \ sys/dvdio.h \ + sys/efitcg.h \ sys/elf32.h \ sys/elf64.h \ sys/elf_common.h \ From nobody Sun Nov 16 18:29:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8fXb3mkVz6GsVk; Sun, 16 Nov 2025 18:29: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8fXb1pY0z43BY; Sun, 16 Nov 2025 18:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4YpEcwXS6ar3JXaOSR6RyBKbZVGZuha5RvUItM5dRpY=; b=tKS7JigbfRiYBOETxVSvWU1cwFr0zI4iP56M8WOO/iw2vXIbjp+rf1/B48BKpmJoSzvBG8 IFVnk7Oxp890TrvLWCWmtBaGDKI2kqELxyQ7+vlZOYLCYuhkbdnLaYF2nY7DEHUja9gyAT ZYouN23XK+qGaHW9EodOll09EDkVjtvewKpGybp1hjN2bCKahMoWTi6gB3kIAYqaqnqp8k liXm/JOKchoeRN6oDBaRRLQ3Spup9XZ4jtmoxHpdLFyt91O7rY1+bCGYFlx5imzeeT4kOv itlJmbTrwXtrUOJIWhEhl5FFKRsjr5E0aUrf41keISI9kzuGLsVU0lamQBg+4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4YpEcwXS6ar3JXaOSR6RyBKbZVGZuha5RvUItM5dRpY=; b=fOxKhTG9+WkLVhD4Yu1Vcn4E944uQnXZYxwbIBVS+PyBANgxF63JqvqPJ4Hct8K/SPFN1V +tdWBQO3FgllzGUb0ToUp7i4L0oUQXa671KDudWAYlAPIPKWqZhSzzWKXQG2NB74vpFgLm VHf5P+pBQZ++MMbuY6I88B3OLdkiLvq99F/FeWfPkz6npSkwTPI6Z0c/W2q7ou+tnJr87K HiKED94PZxR5Kt8PfkSI7YdTsZw3B7duxH2fs2rF5WeOacqAwHLmdETGqHtGYu0YIMMaR7 8Swvza3/v+2+Cj7pxTdm33wsJyRb7rZzZrztxW+TaYhyAcu5RxquUV/rKOfzjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763317743; a=rsa-sha256; cv=none; b=E1Y0n+kVeW1s6Yp5E5uWShevW2ehdFpkUHIsYdZ9PEAwT4Lu/Fp5y+5Y2cyqmCPNf6tgqm FH4dnTmRV5ukbP4u+Tfkv/isUV0VME1EcZP+mIC/Bd19H96xY+2D8Wa/Y+9CdJxyQ4OYk1 yehnYYceaPF3o/lleztNQo7wAUX5fQqBvaf4CxooFYNldw5D15ckXqOYXr0ibk+20wu3Rk ipQl5+z7NvChlU3qaj82m+rmt8UGE3LXQybcuAVDvBVk73l7B4ZAs/3hC3KTm5LfGljwVP LVg/wcEsuJTAlwI9DNCAvBuF/THLYd5cRQtED724YKFMzsRwhIEuEr7S5sLpCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8fXb1GqPzqJF; Sun, 16 Nov 2025 18:29: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 5AGIT3Z1007963; Sun, 16 Nov 2025 18:29:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGIT3wh007960; Sun, 16 Nov 2025 18:29:03 GMT (envelope-from git) Date: Sun, 16 Nov 2025 18:29:03 GMT Message-Id: <202511161829.5AGIT3wh007960@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: 67c7e94315ff - main - edk2: Move ProcessorBind.h to contrib/edk2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 67c7e94315ffeaa55e3dcf2f6066cb8fe483b5c2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=67c7e94315ffeaa55e3dcf2f6066cb8fe483b5c2 commit 67c7e94315ffeaa55e3dcf2f6066cb8fe483b5c2 Author: Warner Losh AuthorDate: 2025-11-16 17:34:33 +0000 Commit: Warner Losh CommitDate: 2025-11-16 18:29:03 +0000 edk2: Move ProcessorBind.h to contrib/edk2 Have our own ProcessorBind.h. It just includes sys/efi-edk2.h, but undefines TRUE, FALSE and MAC. The first two are from acpica and are redefined to something almost the same. MAC is a global option that, well, interferes with using EDK2, dangit. I suppose I should redefine it after, but I don't think you can save the value of a pre-processor variable. This breaks a little with the tradition of having this in a seprate directory and using build magic. However, the build is already magical enough and having this here makes things less magical. Also, EDK2 puts this in a processor specific directory, so we won't have conflicts (they need it there since they run on more processors than we do: we can just include sys/efi-edk2.h which covers the smallar variance we have in processors). Sponsored by: Netflix --- lib/libefivar/ProcessorBind.h | 3 --- sys/contrib/edk2/Include/ProcessorBind.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/libefivar/ProcessorBind.h b/lib/libefivar/ProcessorBind.h deleted file mode 100644 index 6985a193cff9..000000000000 --- a/lib/libefivar/ProcessorBind.h +++ /dev/null @@ -1,3 +0,0 @@ -/* File in public domain */ -/* Brings in the glue for UEFI/EDK2 Tianocore code to run on this OS */ -#include diff --git a/sys/contrib/edk2/Include/ProcessorBind.h b/sys/contrib/edk2/Include/ProcessorBind.h new file mode 100644 index 000000000000..d67c4aa99b19 --- /dev/null +++ b/sys/contrib/edk2/Include/ProcessorBind.h @@ -0,0 +1,11 @@ +/* + * Copyright 2025 Netflix, Inc + * + * SPDX-License-Idnetifier: BSD-2-Clause + */ +/* These three will be redefined -- well MAC is an option that collides */ +#undef TRUE +#undef FALSE +#undef MAC +#include + From nobody Sun Nov 16 18:29:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8fXc4l4Bz6GsB6; Sun, 16 Nov 2025 18:29: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8fXc2Yvzz431h; Sun, 16 Nov 2025 18:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9jH4ci0nyhHYj2XuC5XK78fye1dLyv3KN4x0Xg8EsQ=; b=gHI0H4EPeoG9tKTpLnQgc4qCL32vGn8JKc8ae9PMTv3AwFbps9J6nfwwCUq4kuXS/cx5rK JdqpVR505PIpaOd693/GRWKaZDi8/6HG2rdThDWyquyvl08JHTrcjPkqeng++IOPJJV/pe u6oG9yc5kvpN/P0F/6HM9t3xhePWrV91L/5cp3Z7ZYZZUa9dTHB/IgAkA4rmADenYzfo27 njKfpCrl/CWDQE0M3rrFKmRXoVMOiynPFyvkKl0Ak7F6kE4PhAaPosZ5HRzD39K4/5Dh3Z tcJ54kR8cUnQOmfL8picifQ9WE47FuAJ0iR8CYo621xEXjkfrSGnBFJSe+WGUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9jH4ci0nyhHYj2XuC5XK78fye1dLyv3KN4x0Xg8EsQ=; b=d0sJHGaWUTiHgUtuw7plLQjTZOicvdGXd3YkNBMQO2G4dqboaqQ5cB2GkSJgPs8yYIrDNT pWsibaVnnfYZfbfDOEagpzw1DAtrqp+JeDQuIJgfqeALjwo/Wp/l9gt5zZyQKXe5Q8zDLQ BoGqlmihAMjG2wOTtqLMAvkZiiVHhpsrtO8fOMXpWHHcp9DweN/OSFzcvYvYCIBPAmH7vK l4cGbZE9AmDO57UddJ5YVRkGZtW6rFKZXauDj39JgnVZUHF9CvIIWD7ZsoPhUWBbzPsNkz zzj/nm1uTql7SgTvABfAZ9iWQbhDZrca7PfAfcSbTXC70jIVH8qRfWDsqhzKQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763317744; a=rsa-sha256; cv=none; b=PapFqShSxDcU6AqARQFPWXFOfk8cpVNiTMlexFXwpdzqeo0gn1Jga19y9x1J7BrpfiOPVt d0dHkbOGseG9WX0xH6AjmDoAcJeea5F5eeUaK6AcB9h20WRdHTUqmCw0lT7RGFFC2iiFiU 5paQIiZfGTE0T+dOyFnuT5v+vG6rnMOip19tSwSpw8pCVfOsD0K0o05GJjB57StRdkSdnP Gg5xUcmAbNiwu1xCAQzvPtpxMaQ4m7Aa2v4NwxVP8uqaXEJTZIDCAYkk9cYCr8mA3r0tDr xtipet5Yln8MeP2hxP1Ih4InOVz4cAtkZjoDbysi8Lgh/UiKLuG2Z6jfHMpeoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8fXc1vsBzqWY; Sun, 16 Nov 2025 18:29: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 5AGIT4dh007996; Sun, 16 Nov 2025 18:29:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGIT4RT007993; Sun, 16 Nov 2025 18:29:04 GMT (envelope-from git) Date: Sun, 16 Nov 2025 18:29:04 GMT Message-Id: <202511161829.5AGIT4RT007993@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: 84dc74b8274c - main - stand: switch the loader over to using efi-edk2.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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84dc74b8274c77ea878837cb0e2dbd4c93b93052 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=84dc74b8274c77ea878837cb0e2dbd4c93b93052 commit 84dc74b8274c77ea878837cb0e2dbd4c93b93052 Author: Warner Losh AuthorDate: 2025-11-16 17:34:49 +0000 Commit: Warner Losh CommitDate: 2025-11-16 18:29:03 +0000 stand: switch the loader over to using efi-edk2.h Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D53652 --- stand/efi/include/amd64/efibind.h | 187 -------------------------------------- stand/efi/include/arm/efibind.h | 129 -------------------------- stand/efi/include/arm64/efibind.h | 140 ---------------------------- stand/efi/include/efi.h | 34 ++----- stand/efi/include/i386/efibind.h | 183 ------------------------------------- stand/efi/include/riscv/efibind.h | 140 ---------------------------- 6 files changed, 9 insertions(+), 804 deletions(-) diff --git a/stand/efi/include/amd64/efibind.h b/stand/efi/include/amd64/efibind.h deleted file mode 100644 index 1c974ee39f84..000000000000 --- a/stand/efi/include/amd64/efibind.h +++ /dev/null @@ -1,187 +0,0 @@ -/*++ - -Copyright (c) 1999 - 2003 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - -Module Name: - - efefind.h - -Abstract: - - EFI to compile bindings - - - - -Revision History - ---*/ - -#pragma pack() - -#ifdef EFI_NT_EMULATOR - #define POST_CODE(_Data) -#else - #ifdef EFI_DEBUG -#define POST_CODE(_Data) __asm mov eax,(_Data) __asm out 0x80,al - #else - #define POST_CODE(_Data) - #endif -#endif - -#define EFIERR(a) (0x8000000000000000 | a) -#define EFI_ERROR_MASK 0x8000000000000000 -#define EFIERR_OEM(a) (0xc000000000000000 | a) - - -#define BAD_POINTER 0xFBFBFBFBFBFBFBFB -#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF - -#define BREAKPOINT() __asm { int 3 } - -// -// Pointers must be aligned to these address to function -// - -#define MIN_ALIGNMENT_SIZE 4 - -#define ALIGN_VARIABLE(Value ,Adjustment) \ - (UINTN)Adjustment = 0; \ - if((UINTN)Value % MIN_ALIGNMENT_SIZE) \ - (UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \ - Value = (UINTN)Value + (UINTN)Adjustment - - -// -// Define macros to build data structure signatures from characters. -// - -#define EFI_SIGNATURE_16(A,B) ((A) | (B<<8)) -#define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16)) -#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32)) - -// -// EFIAPI - prototype calling convention for EFI function pointers -// BOOTSERVICE - prototype for implementation of a boot service interface -// RUNTIMESERVICE - prototype for implementation of a runtime service interface -// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service -// RUNTIME_CODE - pragma macro for declaring runtime code -// - -#ifdef __amd64__ -#define EFIAPI __attribute__((ms_abi)) -#endif - -#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options - #ifdef _MSC_EXTENSIONS - #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler - #else - #define EFIAPI // Substitute expresion to force C calling convention - #endif -#endif - -#define BOOTSERVICE -//#define RUNTIMESERVICE(proto,a) alloc_text("rtcode",a); proto a -//#define RUNTIMEFUNCTION(proto,a) alloc_text("rtcode",a); proto a -#define RUNTIMESERVICE -#define RUNTIMEFUNCTION - - -#define RUNTIME_CODE(a) alloc_text("rtcode", a) -#define BEGIN_RUNTIME_DATA() data_seg("rtdata") -#define END_RUNTIME_DATA() data_seg("") - -#define VOLATILE volatile - -#define MEMORY_FENCE() - -#ifdef EFI_NO_INTERFACE_DECL - #define EFI_FORWARD_DECLARATION(x) - #define EFI_INTERFACE_DECL(x) -#else - #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x - #define EFI_INTERFACE_DECL(x) typedef struct x -#endif - -#ifdef EFI_NT_EMULATOR - -// -// To help ensure proper coding of integrated drivers, they are -// compiled as DLLs. In NT they require a dll init entry pointer. -// The macro puts a stub entry point into the DLL so it will load. -// - -#define EFI_DRIVER_ENTRY_POINT(InitFunction) \ - EFI_STATUS \ - InitFunction ( \ - EFI_HANDLE ImageHandle, \ - EFI_SYSTEM_TABLE *SystemTable \ - ); \ - \ - UINTN \ - __stdcall \ - _DllMainCRTStartup ( \ - UINTN Inst, \ - UINTN reason_for_call, \ - VOID *rserved \ - ) \ - { \ - return 1; \ - } \ - \ - int \ - __declspec( dllexport ) \ - __cdecl \ - InitializeDriver ( \ - void *ImageHandle, \ - void *SystemTable \ - ) \ - { \ - return InitFunction(ImageHandle, SystemTable); \ - } - - - #define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \ - (_if)->LoadInternal(type, name, NULL) - -#else // EFI_NT_EMULATOR - -// -// When building similar to FW, link everything together as -// one big module. -// - - #define EFI_DRIVER_ENTRY_POINT(InitFunction) - - #define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \ - (_if)->LoadInternal(type, name, entry) - -#endif // EFI_FW_NT - -#ifdef __FreeBSD__ -#define INTERFACE_DECL(x) struct x -#else -// -// Some compilers don't support the forward reference construct: -// typedef struct XXXXX -// -// The following macro provide a workaround for such cases. -// -#ifdef NO_INTERFACE_DECL -#define INTERFACE_DECL(x) -#else -#define INTERFACE_DECL(x) typedef struct x -#endif -#endif /* __FreeBSD__ */ - -#ifdef _MSC_EXTENSIONS -#pragma warning ( disable : 4731 ) // Suppress warnings about modification of EBP -#endif - diff --git a/stand/efi/include/arm/efibind.h b/stand/efi/include/arm/efibind.h deleted file mode 100644 index a08d26ac84c4..000000000000 --- a/stand/efi/include/arm/efibind.h +++ /dev/null @@ -1,129 +0,0 @@ -/*++ - -Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved. - -This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -Module Name: - - EfiBind.h - -Abstract: - - Processor or Compiler specific defines and types for IA-32. - We are using the ANSI C 2000 _t type definitions for basic types. - This it technically a violation of the coding standard, but they - are used to make EfiTypes.h portable. Code other than EfiTypes.h - should never use any ANSI C 2000 _t integer types. - ---*/ - -#ifndef _EFI_BIND_H_ -#define _EFI_BIND_H_ - - -#define EFI_DRIVER_ENTRY_POINT(InitFunction) -#define EFI_APPLICATION_ENTRY_POINT EFI_DRIVER_ENTRY_POINT - - -// -// Make sure we are using the correct packing rules per EFI specification -// -#ifndef __GNUC__ -#pragma pack() -#endif - - -#define EFIERR(a) (0x80000000 | a) -#define EFI_ERROR_MASK 0x80000000 -#define EFIERR_OEM(a) (0xc0000000 | a) - -// -// Processor specific defines -// -#define EFI_MAX_BIT 0x80000000 -#define MAX_2_BITS 0xC0000000 - -// -// Maximum legal IA-32 address -// -#define EFI_MAX_ADDRESS 0xFFFFFFFF - -// -// Bad pointer value to use in check builds. -// if you see this value you are using uninitialized or free'ed data -// -#define EFI_BAD_POINTER 0xAFAFAFAF -#define EFI_BAD_POINTER_AS_BYTE 0xAF - -#define EFI_DEADLOOP() { volatile UINTN __iii; __iii = 1; while (__iii); } - -// -// Inject a break point in the code to assist debugging for NT Emulation Environment -// For real hardware, just put in a halt loop. Don't do a while(1) because the -// compiler will optimize away the rest of the function following, so that you run out in -// the weeds if you skip over it with a debugger. -// -#define EFI_BREAKPOINT EFI_DEADLOOP() - - -// -// Memory Fence forces serialization, and is needed to support out of order -// memory transactions. The Memory Fence is mainly used to make sure IO -// transactions complete in a deterministic sequence, and to syncronize locks -// an other MP code. Currently no memory fencing is required. -// -#define MEMORY_FENCE() - -// -// Some compilers don't support the forward reference construct: -// typedef struct XXXXX. The forward reference is required for -// ANSI compatibility. -// -// The following macro provide a workaround for such cases. -// - - -#ifdef EFI_NO_INTERFACE_DECL - #define EFI_FORWARD_DECLARATION(x) -#else - #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x -#endif - - -// -// Some C compilers optimize the calling conventions to increase performance. -// EFIAPI is used to make all public APIs follow the standard C calling -// convention. -// -#define EFIAPI - - - -// -// For symbol name in GNU assembly code, an extra "_" is necessary -// -#if defined(__GNUC__) - /// - /// Private worker functions for ASM_PFX() - /// - #define _CONCATENATE(a, b) __CONCATENATE(a, b) - #define __CONCATENATE(a, b) a ## b - - /// - /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix - /// on symbols in assembly language. - /// - #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name) - -#endif - -#define INTERFACE_DECL(x) struct x - -#endif diff --git a/stand/efi/include/arm64/efibind.h b/stand/efi/include/arm64/efibind.h deleted file mode 100644 index c81506f79334..000000000000 --- a/stand/efi/include/arm64/efibind.h +++ /dev/null @@ -1,140 +0,0 @@ -/*++ - -Copyright (c) 1999 - 2003 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - -Module Name: - - efefind.h - -Abstract: - - EFI to compile bindings - - - - -Revision History - ---*/ - -#pragma pack() - -//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -// BugBug: Code to debug -// -#define BIT63 0x8000000000000000 - -#define PLATFORM_IOBASE_ADDRESS (0xffffc000000 | BIT63) -#define PORT_TO_MEMD(_Port) (PLATFORM_IOBASE_ADDRESS | ( ( ( (_Port) & 0xfffc) << 10 ) | ( (_Port) & 0x0fff) ) ) - -// -// Macro's with casts make this much easier to use and read. -// -#define PORT_TO_MEM8D(_Port) (*(UINT8 *)(PORT_TO_MEMD(_Port))) -#define POST_CODE(_Data) (PORT_TO_MEM8D(0x80) = (_Data)) -// -// BugBug: End Debug Code!!! -//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -#define EFIERR(a) (0x8000000000000000 | a) -#define EFI_ERROR_MASK 0x8000000000000000 -#define EFIERR_OEM(a) (0xc000000000000000 | a) - -#define BAD_POINTER 0xFBFBFBFBFBFBFBFB -#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF - -#define BREAKPOINT() __break(0) - -// -// Pointers must be aligned to these address to function -// you will get an alignment fault if this value is less than 8 -// -#define MIN_ALIGNMENT_SIZE 8 - -#define ALIGN_VARIABLE(Value , Adjustment) \ - (UINTN) Adjustment = 0; \ - if((UINTN)Value % MIN_ALIGNMENT_SIZE) \ - (UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \ - Value = (UINTN)Value + (UINTN)Adjustment - -// -// Define macros to create data structure signatures. -// - -#define EFI_SIGNATURE_16(A,B) ((A) | (B<<8)) -#define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16)) -#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32)) - -// -// EFIAPI - prototype calling convention for EFI function pointers -// BOOTSERVICE - prototype for implementation of a boot service interface -// RUNTIMESERVICE - prototype for implementation of a runtime service interface -// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service -// RUNTIME_CODE - pragma macro for declaring runtime code -// - -#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options - #ifdef _MSC_EXTENSIONS - #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler - #else - #define EFIAPI // Substitute expresion to force C calling convention - #endif -#endif - -#define BOOTSERVICE -#define RUNTIMESERVICE -#define RUNTIMEFUNCTION - -#define RUNTIME_CODE(a) alloc_text("rtcode", a) -#define BEGIN_RUNTIME_DATA() data_seg("rtdata") -#define END_RUNTIME_DATA() data_seg() - -#define VOLATILE volatile - -// -// BugBug: Need to find out if this is portable across compilers. -// -void __mfa (void); -#define MEMORY_FENCE() __mfa() - -#ifdef EFI_NO_INTERFACE_DECL - #define EFI_FORWARD_DECLARATION(x) - #define EFI_INTERFACE_DECL(x) -#else - #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x - #define EFI_INTERFACE_DECL(x) typedef struct x -#endif - -// -// When build similar to FW, then link everything together as -// one big module. -// - -#define EFI_DRIVER_ENTRY_POINT(InitFunction) - -#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \ - (_if)->LoadInternal(type, name, entry) -// entry(NULL, ST) - -#ifdef __FreeBSD__ -#define INTERFACE_DECL(x) struct x -#else -// -// Some compilers don't support the forward reference construct: -// typedef struct XXXXX -// -// The following macro provide a workaround for such cases. -// -#ifdef NO_INTERFACE_DECL -#define INTERFACE_DECL(x) -#else -#define INTERFACE_DECL(x) typedef struct x -#endif -#endif diff --git a/stand/efi/include/efi.h b/stand/efi/include/efi.h index b603c3a78205..e19c4dbde2ad 100644 --- a/stand/efi/include/efi.h +++ b/stand/efi/include/efi.h @@ -43,34 +43,18 @@ Revision History // Basic EFI types of various widths. // -#include -#ifndef ACPI_THREAD_ID /* ACPI's definitions are fine */ -#define ACPI_USE_SYSTEM_INTTYPES 1 /* Tell ACPI we've defined types */ - -typedef uint64_t UINT64; -typedef int64_t INT64; -typedef uint32_t UINT32; -typedef int32_t INT32; -typedef uint16_t UINT16; -typedef int16_t INT16; -typedef uint8_t UINT8; -typedef int8_t INT8; - -#ifdef __LP64__ -typedef int64_t INTN; -typedef uint64_t UINTN; -#else -typedef int32_t INTN; -typedef uint32_t UINTN; -#endif +#include +#if __SIZEOF_LONG__ == 4 +#define EFI_ERROR_MASK 0x80000000 +#define EFIERR(a) (0x80000000 | a) +#define EFIERR_OEM(a) (0xc0000000 | a) +#else +#define EFI_ERROR_MASK 0x8000000000000000 +#define EFIERR(a) (0x8000000000000000 | a) +#define EFIERR_OEM(a) (0xc000000000000000 | a) #endif -#undef VOID -#define VOID void - - -#include "efibind.h" #include "efidef.h" #include "efidevp.h" #include "efipciio.h" diff --git a/stand/efi/include/i386/efibind.h b/stand/efi/include/i386/efibind.h deleted file mode 100644 index dac056571c7c..000000000000 --- a/stand/efi/include/i386/efibind.h +++ /dev/null @@ -1,183 +0,0 @@ -/*++ - -Copyright (c) 1999 - 2003 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - -Module Name: - - efefind.h - -Abstract: - - EFI to compile bindings - - - - -Revision History - ---*/ - -#pragma pack() - -#ifdef EFI_NT_EMULATOR - #define POST_CODE(_Data) -#else - #ifdef EFI_DEBUG -#define POST_CODE(_Data) __asm mov eax,(_Data) __asm out 0x80,al - #else - #define POST_CODE(_Data) - #endif -#endif - -#define EFIERR(a) (0x80000000 | a) -#define EFI_ERROR_MASK 0x80000000 -#define EFIERR_OEM(a) (0xc0000000 | a) - - -#define BAD_POINTER 0xFBFBFBFB -#define MAX_ADDRESS 0xFFFFFFFF - -#define BREAKPOINT() __asm { int 3 } - -// -// Pointers must be aligned to these address to function -// - -#define MIN_ALIGNMENT_SIZE 4 - -#define ALIGN_VARIABLE(Value ,Adjustment) \ - (UINTN)Adjustment = 0; \ - if((UINTN)Value % MIN_ALIGNMENT_SIZE) \ - (UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \ - Value = (UINTN)Value + (UINTN)Adjustment - - -// -// Define macros to build data structure signatures from characters. -// - -#define EFI_SIGNATURE_16(A,B) ((A) | (B<<8)) -#define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16)) -#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32)) - -// -// EFIAPI - prototype calling convention for EFI function pointers -// BOOTSERVICE - prototype for implementation of a boot service interface -// RUNTIMESERVICE - prototype for implementation of a runtime service interface -// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service -// RUNTIME_CODE - pragma macro for declaring runtime code -// - -#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options - #ifdef _MSC_EXTENSIONS - #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler - #else - #define EFIAPI // Substitute expresion to force C calling convention - #endif -#endif - -#define BOOTSERVICE -//#define RUNTIMESERVICE(proto,a) alloc_text("rtcode",a); proto a -//#define RUNTIMEFUNCTION(proto,a) alloc_text("rtcode",a); proto a -#define RUNTIMESERVICE -#define RUNTIMEFUNCTION - - -#define RUNTIME_CODE(a) alloc_text("rtcode", a) -#define BEGIN_RUNTIME_DATA() data_seg("rtdata") -#define END_RUNTIME_DATA() data_seg() - -#define VOLATILE volatile - -#define MEMORY_FENCE() - -#ifdef EFI_NO_INTERFACE_DECL - #define EFI_FORWARD_DECLARATION(x) - #define EFI_INTERFACE_DECL(x) -#else - #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x - #define EFI_INTERFACE_DECL(x) typedef struct x -#endif - -#ifdef EFI_NT_EMULATOR - -// -// To help ensure proper coding of integrated drivers, they are -// compiled as DLLs. In NT they require a dll init entry pointer. -// The macro puts a stub entry point into the DLL so it will load. -// - -#define EFI_DRIVER_ENTRY_POINT(InitFunction) \ - EFI_STATUS \ - InitFunction ( \ - EFI_HANDLE ImageHandle, \ - EFI_SYSTEM_TABLE *SystemTable \ - ); \ - \ - UINTN \ - __stdcall \ - _DllMainCRTStartup ( \ - UINTN Inst, \ - UINTN reason_for_call, \ - VOID *rserved \ - ) \ - { \ - return 1; \ - } \ - \ - int \ - __declspec( dllexport ) \ - __cdecl \ - InitializeDriver ( \ - void *ImageHandle, \ - void *SystemTable \ - ) \ - { \ - return InitFunction(ImageHandle, SystemTable); \ - } - - - #define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \ - (_if)->LoadInternal(type, name, NULL) - -#else // EFI_NT_EMULATOR - -// -// When build similar to FW, then link everything together as -// one big module. -// - - #define EFI_DRIVER_ENTRY_POINT(InitFunction) - - #define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \ - (_if)->LoadInternal(type, name, entry) - -#endif // EFI_FW_NT - -#ifdef __FreeBSD__ -#define INTERFACE_DECL(x) struct x -#else -// -// Some compilers don't support the forward reference construct: -// typedef struct XXXXX -// -// The following macro provide a workaround for such cases. -// -#ifdef NO_INTERFACE_DECL -#define INTERFACE_DECL(x) -#else -#define INTERFACE_DECL(x) typedef struct x -#endif -#endif /* __FreeBSD__ */ - -#ifdef _MSC_EXTENSIONS -#pragma warning ( disable : 4731 ) // Suppress warnings about modification of EBP -#endif - diff --git a/stand/efi/include/riscv/efibind.h b/stand/efi/include/riscv/efibind.h deleted file mode 100644 index c81506f79334..000000000000 --- a/stand/efi/include/riscv/efibind.h +++ /dev/null @@ -1,140 +0,0 @@ -/*++ - -Copyright (c) 1999 - 2003 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - -Module Name: - - efefind.h - -Abstract: - - EFI to compile bindings - - - - -Revision History - ---*/ - -#pragma pack() - -//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -// BugBug: Code to debug -// -#define BIT63 0x8000000000000000 - -#define PLATFORM_IOBASE_ADDRESS (0xffffc000000 | BIT63) -#define PORT_TO_MEMD(_Port) (PLATFORM_IOBASE_ADDRESS | ( ( ( (_Port) & 0xfffc) << 10 ) | ( (_Port) & 0x0fff) ) ) - -// -// Macro's with casts make this much easier to use and read. -// -#define PORT_TO_MEM8D(_Port) (*(UINT8 *)(PORT_TO_MEMD(_Port))) -#define POST_CODE(_Data) (PORT_TO_MEM8D(0x80) = (_Data)) -// -// BugBug: End Debug Code!!! -//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -#define EFIERR(a) (0x8000000000000000 | a) -#define EFI_ERROR_MASK 0x8000000000000000 -#define EFIERR_OEM(a) (0xc000000000000000 | a) - -#define BAD_POINTER 0xFBFBFBFBFBFBFBFB -#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF - -#define BREAKPOINT() __break(0) - -// -// Pointers must be aligned to these address to function -// you will get an alignment fault if this value is less than 8 -// -#define MIN_ALIGNMENT_SIZE 8 - -#define ALIGN_VARIABLE(Value , Adjustment) \ - (UINTN) Adjustment = 0; \ - if((UINTN)Value % MIN_ALIGNMENT_SIZE) \ - (UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \ - Value = (UINTN)Value + (UINTN)Adjustment - -// -// Define macros to create data structure signatures. -// - -#define EFI_SIGNATURE_16(A,B) ((A) | (B<<8)) -#define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16)) -#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32)) - -// -// EFIAPI - prototype calling convention for EFI function pointers -// BOOTSERVICE - prototype for implementation of a boot service interface -// RUNTIMESERVICE - prototype for implementation of a runtime service interface -// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service -// RUNTIME_CODE - pragma macro for declaring runtime code -// - -#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options - #ifdef _MSC_EXTENSIONS - #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler - #else - #define EFIAPI // Substitute expresion to force C calling convention - #endif -#endif - -#define BOOTSERVICE -#define RUNTIMESERVICE -#define RUNTIMEFUNCTION - -#define RUNTIME_CODE(a) alloc_text("rtcode", a) -#define BEGIN_RUNTIME_DATA() data_seg("rtdata") -#define END_RUNTIME_DATA() data_seg() - -#define VOLATILE volatile - -// -// BugBug: Need to find out if this is portable across compilers. -// -void __mfa (void); -#define MEMORY_FENCE() __mfa() - -#ifdef EFI_NO_INTERFACE_DECL - #define EFI_FORWARD_DECLARATION(x) - #define EFI_INTERFACE_DECL(x) -#else - #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x - #define EFI_INTERFACE_DECL(x) typedef struct x -#endif - -// -// When build similar to FW, then link everything together as -// one big module. -// - -#define EFI_DRIVER_ENTRY_POINT(InitFunction) - -#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \ - (_if)->LoadInternal(type, name, entry) -// entry(NULL, ST) - -#ifdef __FreeBSD__ -#define INTERFACE_DECL(x) struct x -#else -// -// Some compilers don't support the forward reference construct: -// typedef struct XXXXX -// -// The following macro provide a workaround for such cases. -// -#ifdef NO_INTERFACE_DECL -#define INTERFACE_DECL(x) -#else -#define INTERFACE_DECL(x) typedef struct x -#endif -#endif From nobody Sun Nov 16 18:29:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8fXd67zYz6GsMl; Sun, 16 Nov 2025 18:29: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8fXd3Gzwz43Q4; Sun, 16 Nov 2025 18:29:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQXG0piySLG8NA8BEQYcRuBs235rv2K+klLzQwfVyaM=; b=uHMelYz2rF/2yInobX/CtbwlIN2mKFVCAfspO0VNDd0rYRTkNdNvuXyMIOV7i4SrWHQccL ntQygfeygzLBObBE7veSKvW5gj2kauwk+ZxWt0PnAZETfhVJzTB5A9UZGo3FaxAc7ljFzd jMi1tLBI2bZz3PohRmNusMpLHgzV9L0i9aGIaoBODEdeU43QlS1zExp5BLwKPf0Roplss4 8CfPNAv0i6VhZdm6/D6dr8YuYEwpcHDXFPM6LoRVjHw5gWxxWvarYlRLUzStGZHXomocIV K1ikRnzlM4+KTJiX1xSsF6ZzLQDJvma+c9FWQzaF49FnFyj+LqN02XTFTeqzjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQXG0piySLG8NA8BEQYcRuBs235rv2K+klLzQwfVyaM=; b=T4049Mlyh1khnFFO19XCXndPUyAmKPSGwxtQxPsr54spa46qGo0582UuGbVoGTZka5LDzf YmUWivjac7wvI0PJaOO4FHKoHPgLYDi5l6joMce0GjirQeFL5SlSKaGn3voBNLMm2xAFDY 8GwZ8jUDYeOYNZIAid460f/gT9fjqcXOM5PAm+A/xOiFIXu8AEuGK+CLNSi/cb1ESgqKh2 4G0a6g446w9y7R+1+e/gExhARMzjCaO5w8jtMq2NM2l4PbFPefPLV4lulgDFyvHhxJ54bR Kd6XMd/7DuLnjvOMQks+sJSicl//rMx4/1OauFWqh/1KiB1ILJwriFSF9HwYbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763317745; a=rsa-sha256; cv=none; b=Mi9BakLjGbBGgMqEWSQONl2h23utMWNt6PbnPwCuAw/d3ngPM3mbz1yCzIUu8WirDNasLm RL0tK93b2XhZZvRfti5WmmL/BfU3/wACabZsotLc8AsjKKjeANiZV7pboP7ffy4pNZcg78 7HbDgMHa4jUhLJ13KXgadPBLR69chlNmTF63S2p5kpAQgyE6N8nVNpgwVAAkLPYtOB2ryn vn/VxlcksP1R4lx5YJZXk0s37Frj3a+tg9o0KqsXSeECf9S1bB5cizOeIJvuG9uzDRH19j VpMScZAKMRcgZSMzdcUp+FtVmA99QFJIeAljYVy8Ox2t0DGIsYA5e6FJqd/DNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8fXd2W07zqb0; Sun, 16 Nov 2025 18:29: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 5AGIT5R9008029; Sun, 16 Nov 2025 18:29:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGIT5b2008026; Sun, 16 Nov 2025 18:29:05 GMT (envelope-from git) Date: Sun, 16 Nov 2025 18:29:05 GMT Message-Id: <202511161829.5AGIT5b2008026@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: 473786a131b0 - main - edk2: Tweak the tests for UEFI Specification Data Type requirements List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 473786a131b0546e60fc8330f79e270e145e1bfd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=473786a131b0546e60fc8330f79e270e145e1bfd commit 473786a131b0546e60fc8330f79e270e145e1bfd Author: Warner Losh AuthorDate: 2025-11-16 17:34:58 +0000 Commit: Warner Losh CommitDate: 2025-11-16 18:29:03 +0000 edk2: Tweak the tests for UEFI Specification Data Type requirements On x86 these trigger for 32-bit builds. We only ever (will) do that for the 32-bit loader that starts a 64 bit kernel for ia32. For the moment, take the training wheels off, though most likely some compile flags need to be used to change the i386 ABI to force *int64_t alignment to 64 bits or some other horror as yet ill-concieved. Despite this assertion, the ia32 to boot 64-bit kernels loaders seem to work. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D53653 --- sys/contrib/edk2/Include/Base.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/contrib/edk2/Include/Base.h b/sys/contrib/edk2/Include/Base.h index e3d03a9cc5ab..2b53e118b33f 100644 --- a/sys/contrib/edk2/Include/Base.h +++ b/sys/contrib/edk2/Include/Base.h @@ -841,8 +841,10 @@ STATIC_ASSERT (ALIGNOF (INT16) == sizeof (INT16), "Alignment of INT16 does not STATIC_ASSERT (ALIGNOF (UINT16) == sizeof (UINT16), "Alignment of UINT16 does not meet UEFI Specification Data Type requirements"); STATIC_ASSERT (ALIGNOF (INT32) == sizeof (INT32), "Alignment of INT32 does not meet UEFI Specification Data Type requirements"); STATIC_ASSERT (ALIGNOF (UINT32) == sizeof (UINT32), "Alignment of UINT32 does not meet UEFI Specification Data Type requirements"); +#ifndef _STANDALONE STATIC_ASSERT (ALIGNOF (INT64) == sizeof (INT64), "Alignment of INT64 does not meet UEFI Specification Data Type requirements"); STATIC_ASSERT (ALIGNOF (UINT64) == sizeof (UINT64), "Alignment of UINT64 does not meet UEFI Specification Data Type requirements"); +#endif STATIC_ASSERT (ALIGNOF (CHAR8) == sizeof (CHAR8), "Alignment of CHAR8 does not meet UEFI Specification Data Type requirements"); STATIC_ASSERT (ALIGNOF (CHAR16) == sizeof (CHAR16), "Alignment of CHAR16 does not meet UEFI Specification Data Type requirements"); STATIC_ASSERT (ALIGNOF (INTN) == sizeof (INTN), "Alignment of INTN does not meet UEFI Specification Data Type requirements"); From nobody Sun Nov 16 18:29:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8fXg0dS3z6GsXc; Sun, 16 Nov 2025 18:29: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8fXf6ZhJz436L; Sun, 16 Nov 2025 18:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CvLrVCKXPBHV1Lm5aiolyF/jxKtM6KJ0Ga2/yD649Yo=; b=r3g1NdHQbqN12QMalOigFYyQe7ZILzBWu0g3s8JaDhonqZvjnmILNQhJfgcTMVJbMJVuWp fuJYUIXAbVTZJm+wX9oPEa0KNgBBoCA+KNlSOHisaXibXIeYVSlXgwrbhA6LKEZimWxI6s hWm24APjCgcu5YSPxQ3dPmQqfLLNkJQTGc4vkNyg1eYlXsh3SQ5yNCG34aRzRUi+au4zjN 8Pl3BT5m/5kwKCeLwEaF1I0Awg1wV2eMHzMD13NUKbLPBf3G+aqmh3sXBoflWr/gIoRR5P B/XRdxL1BlBnX6/7VKHCX1TFA3WXj0FZVtoxliCcHIKiXLTDHeS6vPJkdKX8uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CvLrVCKXPBHV1Lm5aiolyF/jxKtM6KJ0Ga2/yD649Yo=; b=taNJ+fODXWGyMAcJ5pwWMbbqDggLpG1x0vgGGRRSGxdN7/kbzyIYwvWraDmNFzsIdYoW+P Pnv47QOij+B1dDDb7hQlkhb25tnrbWE4jJR3CbXIWfuM65ru0bdbCA2vG1gFhqkwArXGx5 dpdP0VbWbFXmqolvixbsqZZclPKGgvkkTexXMOUdZh2CBb7QjnOUDsimIkck61ZrxD1fUG KnNvgYgfrz1PDBeSUSWG39T6IMSCxwL/CjQACHhB+0ewrGw9hN8JTciwh7Reb+f36zZf7H tJFtFPlVniksCN0XNfxkXdITmAnRX6SPghO1rWqhFRSrV0sH8PrBSeWRPAzLOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763317746; a=rsa-sha256; cv=none; b=LZOyiX7ZEneoQQuiP/JldsNZFuIyJkvVCvHhoJWC2Xvhng1rBdFeoQ77IiYqpLn3cGjuTU /Ds1wHTSuRTqU6J+wnAF6ShhNhoY695BQx6eNAKLbenVoNGfep/Lb50rOu5Aut565A8MFY RemQKKpTrfEC/+GrkrCQ5Y1AcZGJBo3FdeEwNILg3/al88U+dfZcZhNMo8038edECX2M06 +PYtFisVmZO/6G4CMULwRmKjvIBFHNlRY20ars9e+EPOF5QwRTUV2ThTsB6lsPjjpX6n0b M79z2DjFxZTyZjHD/2/WeHINo0qgUB/km5mh4gRLoS13+rNQZA4XvhJENgJBXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8fXf5fV3zqWZ; Sun, 16 Nov 2025 18:29: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 5AGIT6E5008068; Sun, 16 Nov 2025 18:29:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGIT6al008063; Sun, 16 Nov 2025 18:29:06 GMT (envelope-from git) Date: Sun, 16 Nov 2025 18:29:06 GMT Message-Id: <202511161829.5AGIT6al008063@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: f439973d6726 - main - edk2: Pull in more headers from edk2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: f439973d6726c3be929c8fb3b1545b8b1744abc3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f439973d6726c3be929c8fb3b1545b8b1744abc3 commit f439973d6726c3be929c8fb3b1545b8b1744abc3 Author: Warner Losh AuthorDate: 2025-11-16 17:35:16 +0000 Commit: Warner Losh CommitDate: 2025-11-16 18:29:03 +0000 edk2: Pull in more headers from edk2 Pull in more headers from edk2-stable202502 that will be needed as we transition the building to using only EDK2 headers in the boot loader, finally ditching our home-grown ones from a super-obsolete SDK from the early days of EFI. Note to future importers: My apologies if this not being a mege commit causes problems. Except for ProcessorBind.h, all files should be exactly as we got them from EDK2, and if that breaks the build on future imports, we should adjust our code. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D53654 --- sys/contrib/edk2/Include/Guid/Acpi.h | 40 + .../edk2/Include/Guid/DebugImageInfoTable.h | 74 ++ sys/contrib/edk2/Include/Guid/DxeServices.h | 26 + sys/contrib/edk2/Include/Guid/GlobalVariable.h | 192 +++ sys/contrib/edk2/Include/Guid/Gpt.h | 37 + .../edk2/Include/Guid/HiiPlatformSetupFormset.h | 33 + .../edk2/Include/Guid/MemoryAllocationHob.h | 28 + .../edk2/Include/Guid/MemoryAttributesTable.h | 32 + .../edk2/Include/Guid/MemoryOverwriteControl.h | 70 ++ sys/contrib/edk2/Include/Guid/Mps.h | 29 + sys/contrib/edk2/Include/Guid/Rng.h | 155 +++ sys/contrib/edk2/Include/Guid/SmBios.h | 32 + sys/contrib/edk2/Include/IndustryStandard/Atapi.h | 849 ++++++++++++++ .../edk2/Include/IndustryStandard/PeImage.h | 816 +++++++++++++ sys/contrib/edk2/Include/IndustryStandard/Usb.h | 397 +++++++ sys/contrib/edk2/Include/Pi/PiBootMode.h | 36 + sys/contrib/edk2/Include/Pi/PiDependency.h | 41 + sys/contrib/edk2/Include/Pi/PiFirmwareFile.h | 506 ++++++++ sys/contrib/edk2/Include/Pi/PiFirmwareVolume.h | 247 ++++ sys/contrib/edk2/Include/Pi/PiHob.h | 512 ++++++++ sys/contrib/edk2/Include/Pi/PiMultiPhase.h | 218 ++++ sys/contrib/edk2/Include/Pi/PiS3BootScript.h | 53 + sys/contrib/edk2/Include/Pi/PiStatusCode.h | 1220 ++++++++++++++++++++ .../edk2/Include/Protocol/AbsolutePointer.h | 192 +++ sys/contrib/edk2/Include/Protocol/Arp.h | 376 ++++++ sys/contrib/edk2/Include/Protocol/Bds.h | 66 ++ sys/contrib/edk2/Include/Protocol/BlockIo.h | 234 ++++ sys/contrib/edk2/Include/Protocol/Capsule.h | 29 + sys/contrib/edk2/Include/Protocol/ComponentName.h | 121 ++ sys/contrib/edk2/Include/Protocol/Cpu.h | 286 +++++ sys/contrib/edk2/Include/Protocol/CpuIo2.h | 136 +++ sys/contrib/edk2/Include/Protocol/DebugSupport.h | 966 ++++++++++++++++ sys/contrib/edk2/Include/Protocol/Decompress.h | 116 ++ sys/contrib/edk2/Include/Protocol/DeviceIo.h | 262 +++++ sys/contrib/edk2/Include/Protocol/Dhcp4.h | 762 ++++++++++++ sys/contrib/edk2/Include/Protocol/Dhcp6.h | 780 +++++++++++++ sys/contrib/edk2/Include/Protocol/DiskInfo.h | 221 ++++ sys/contrib/edk2/Include/Protocol/DiskIo.h | 111 ++ sys/contrib/edk2/Include/Protocol/DriverBinding.h | 195 ++++ .../edk2/Include/Protocol/DriverConfiguration2.h | 184 +++ .../edk2/Include/Protocol/DriverDiagnostics.h | 125 ++ .../edk2/Include/Protocol/DriverDiagnostics2.h | 105 ++ sys/contrib/edk2/Include/Protocol/Ebc.h | 308 +++++ sys/contrib/edk2/Include/Protocol/EdidActive.h | 46 + sys/contrib/edk2/Include/Protocol/EdidDiscovered.h | 44 + .../edk2/Include/Protocol/FirmwareVolume2.h | 747 ++++++++++++ .../edk2/Include/Protocol/FirmwareVolumeBlock.h | 352 ++++++ sys/contrib/edk2/Include/Protocol/FormBrowser2.h | 172 +++ sys/contrib/edk2/Include/Protocol/GraphicsOutput.h | 270 +++++ .../edk2/Include/Protocol/HiiConfigRouting.h | 411 +++++++ sys/contrib/edk2/Include/Protocol/HiiDatabase.h | 518 +++++++++ sys/contrib/edk2/Include/Protocol/HiiFont.h | 464 ++++++++ sys/contrib/edk2/Include/Protocol/HiiImage.h | 346 ++++++ sys/contrib/edk2/Include/Protocol/HiiString.h | 232 ++++ sys/contrib/edk2/Include/Protocol/Http.h | 515 +++++++++ .../edk2/Include/Protocol/IdeControllerInit.h | 559 +++++++++ sys/contrib/edk2/Include/Protocol/Ip4.h | 602 ++++++++++ sys/contrib/edk2/Include/Protocol/Ip4Config.h | 176 +++ sys/contrib/edk2/Include/Protocol/Ip4Config2.h | 316 +++++ sys/contrib/edk2/Include/Protocol/Ip6.h | 946 +++++++++++++++ sys/contrib/edk2/Include/Protocol/LoadFile.h | 82 ++ sys/contrib/edk2/Include/Protocol/LoadedImage.h | 82 ++ sys/contrib/edk2/Include/Protocol/ManagedNetwork.h | 364 ++++++ sys/contrib/edk2/Include/Protocol/Metronome.h | 74 ++ .../edk2/Include/Protocol/MonotonicCounter.h | 22 + sys/contrib/edk2/Include/Protocol/MpService.h | 674 +++++++++++ sys/contrib/edk2/Include/Protocol/Mtftp4.h | 576 +++++++++ sys/contrib/edk2/Include/Protocol/Mtftp6.h | 818 +++++++++++++ .../Include/Protocol/NetworkInterfaceIdentifier.h | 110 ++ sys/contrib/edk2/Include/Protocol/Pcd.h | 798 +++++++++++++ .../edk2/Include/Protocol/PciEnumerationComplete.h | 24 + .../Protocol/PciHostBridgeResourceAllocation.h | 422 +++++++ sys/contrib/edk2/Include/Protocol/PciHotPlugInit.h | 272 +++++ .../edk2/Include/Protocol/PciHotPlugRequest.h | 164 +++ sys/contrib/edk2/Include/Protocol/PciIo.h | 551 +++++++++ sys/contrib/edk2/Include/Protocol/PciOverride.h | 39 + sys/contrib/edk2/Include/Protocol/PciPlatform.h | 338 ++++++ .../edk2/Include/Protocol/PciRootBridgeIo.h | 436 +++++++ sys/contrib/edk2/Include/Protocol/PiPcd.h | 418 +++++++ sys/contrib/edk2/Include/Protocol/PxeBaseCode.h | 933 +++++++++++++++ .../edk2/Include/Protocol/PxeBaseCodeCallBack.h | 123 ++ sys/contrib/edk2/Include/Protocol/Reset.h | 25 + sys/contrib/edk2/Include/Protocol/Rng.h | 28 + sys/contrib/edk2/Include/Protocol/Runtime.h | 122 ++ sys/contrib/edk2/Include/Protocol/ScsiIo.h | 309 +++++ sys/contrib/edk2/Include/Protocol/ScsiPassThru.h | 377 ++++++ .../edk2/Include/Protocol/ScsiPassThruExt.h | 388 +++++++ sys/contrib/edk2/Include/Protocol/Security.h | 97 ++ sys/contrib/edk2/Include/Protocol/Security2.h | 101 ++ sys/contrib/edk2/Include/Protocol/SerialIo.h | 309 +++++ sys/contrib/edk2/Include/Protocol/ServiceBinding.h | 88 ++ .../edk2/Include/Protocol/SimpleFileSystem.h | 553 +++++++++ sys/contrib/edk2/Include/Protocol/SimpleNetwork.h | 675 +++++++++++ sys/contrib/edk2/Include/Protocol/SimplePointer.h | 137 +++ sys/contrib/edk2/Include/Protocol/StatusCode.h | 53 + sys/contrib/edk2/Include/Protocol/Tcp4.h | 567 +++++++++ sys/contrib/edk2/Include/Protocol/Tcp6.h | 856 ++++++++++++++ sys/contrib/edk2/Include/Protocol/Timer.h | 173 +++ sys/contrib/edk2/Include/Protocol/UgaDraw.h | 159 +++ sys/contrib/edk2/Include/Protocol/UgaIo.h | 189 +++ .../edk2/Include/Protocol/UnicodeCollation.h | 186 +++ .../edk2/Include/Protocol/Usb2HostController.h | 657 +++++++++++ sys/contrib/edk2/Include/Protocol/UsbIo.h | 505 ++++++++ sys/contrib/edk2/Include/Protocol/Variable.h | 39 + sys/contrib/edk2/Include/Protocol/VariableWrite.h | 39 + sys/contrib/edk2/Include/Protocol/VlanConfig.h | 134 +++ sys/contrib/edk2/Include/Protocol/WatchdogTimer.h | 136 +++ 107 files changed, 32156 insertions(+) diff --git a/sys/contrib/edk2/Include/Guid/Acpi.h b/sys/contrib/edk2/Include/Guid/Acpi.h new file mode 100644 index 000000000000..9e9d6b5f05a7 --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/Acpi.h @@ -0,0 +1,40 @@ +/** @file + GUIDs used for ACPI entries in the EFI system table + + These GUIDs point the ACPI tables as defined in the ACPI specifications. + ACPI 2.0 specification defines the ACPI 2.0 GUID. UEFI 2.0 defines the + ACPI 2.0 Table GUID and ACPI Table GUID. + + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + GUIDs defined in UEFI 2.0 spec. + +**/ + +#ifndef __ACPI_GUID_H__ +#define __ACPI_GUID_H__ + +#define ACPI_TABLE_GUID \ + { \ + 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ + } + +#define EFI_ACPI_TABLE_GUID \ + { \ + 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \ + } + +#define ACPI_10_TABLE_GUID ACPI_TABLE_GUID + +// +// ACPI 2.0 or newer tables should use EFI_ACPI_TABLE_GUID. +// +#define EFI_ACPI_20_TABLE_GUID EFI_ACPI_TABLE_GUID + +extern EFI_GUID gEfiAcpiTableGuid; +extern EFI_GUID gEfiAcpi10TableGuid; +extern EFI_GUID gEfiAcpi20TableGuid; + +#endif diff --git a/sys/contrib/edk2/Include/Guid/DebugImageInfoTable.h b/sys/contrib/edk2/Include/Guid/DebugImageInfoTable.h new file mode 100644 index 000000000000..c20cc626a07b --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/DebugImageInfoTable.h @@ -0,0 +1,74 @@ +/** @file + GUID and related data structures used with the Debug Image Info Table. + + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + GUID defined in UEFI 2.0 spec. + +**/ + +#ifndef __DEBUG_IMAGE_INFO_GUID_H__ +#define __DEBUG_IMAGE_INFO_GUID_H__ + +#include + +/// +/// EFI_DEBUG_IMAGE_INFO_TABLE configuration table GUID declaration. +/// +#define EFI_DEBUG_IMAGE_INFO_TABLE_GUID \ + { \ + 0x49152e77, 0x1ada, 0x4764, {0xb7, 0xa2, 0x7a, 0xfe, 0xfe, 0xd9, 0x5e, 0x8b } \ + } + +#define EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS 0x01 +#define EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED 0x02 + +#define EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL 0x01 + +typedef struct { + UINT64 Signature; ///< A constant UINT64 that has the value EFI_SYSTEM_TABLE_SIGNATURE + EFI_PHYSICAL_ADDRESS EfiSystemTableBase; ///< The physical address of the EFI system table. + UINT32 Crc32; ///< A 32-bit CRC value that is used to verify the EFI_SYSTEM_TABLE_POINTER structure is valid. +} EFI_SYSTEM_TABLE_POINTER; + +typedef struct { + /// + /// Indicates the type of image info structure. For PE32 EFI images, + /// this is set to EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL. + /// + UINT32 ImageInfoType; + /// + /// A pointer to an instance of the loaded image protocol for the associated image. + /// + EFI_LOADED_IMAGE_PROTOCOL *LoadedImageProtocolInstance; + /// + /// Indicates the image handle of the associated image. + /// + EFI_HANDLE ImageHandle; +} EFI_DEBUG_IMAGE_INFO_NORMAL; + +typedef union { + UINT32 *ImageInfoType; + EFI_DEBUG_IMAGE_INFO_NORMAL *NormalImage; +} EFI_DEBUG_IMAGE_INFO; + +typedef struct { + /// + /// UpdateStatus is used by the system to indicate the state of the debug image info table. + /// + volatile UINT32 UpdateStatus; + /// + /// The number of EFI_DEBUG_IMAGE_INFO elements in the array pointed to by EfiDebugImageInfoTable. + /// + UINT32 TableSize; + /// + /// A pointer to the first element of an array of EFI_DEBUG_IMAGE_INFO structures. + /// + EFI_DEBUG_IMAGE_INFO *EfiDebugImageInfoTable; +} EFI_DEBUG_IMAGE_INFO_TABLE_HEADER; + +extern EFI_GUID gEfiDebugImageInfoTableGuid; + +#endif diff --git a/sys/contrib/edk2/Include/Guid/DxeServices.h b/sys/contrib/edk2/Include/Guid/DxeServices.h new file mode 100644 index 000000000000..128be13148b0 --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/DxeServices.h @@ -0,0 +1,26 @@ +/** @file + GUID used to identify the DXE Services Table + + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + GUID introduced in PI Version 1.0. + +**/ + +#ifndef __DXE_SERVICES_GUID_H__ +#define __DXE_SERVICES_GUID_H__ + +// +// The DXE Services Table shall be stored in memory of type +// EfiBootServicesData +// +#define DXE_SERVICES_TABLE_GUID \ + { \ + 0x5ad34ba, 0x6f02, 0x4214, {0x95, 0x2e, 0x4d, 0xa0, 0x39, 0x8e, 0x2b, 0xb9 } \ + } + +extern EFI_GUID gEfiDxeServicesTableGuid; + +#endif diff --git a/sys/contrib/edk2/Include/Guid/GlobalVariable.h b/sys/contrib/edk2/Include/Guid/GlobalVariable.h new file mode 100644 index 000000000000..26ba93b4b1c6 --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/GlobalVariable.h @@ -0,0 +1,192 @@ +/** @file + GUID for EFI (NVRAM) Variables. + + Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + GUID defined in UEFI 2.1 +**/ + +#ifndef __GLOBAL_VARIABLE_GUID_H__ +#define __GLOBAL_VARIABLE_GUID_H__ + +#define EFI_GLOBAL_VARIABLE \ + { \ + 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C } \ + } + +extern EFI_GUID gEfiGlobalVariableGuid; + +// +// Follow UEFI 2.4 spec: +// To prevent name collisions with possible future globally defined variables, +// other internal firmware data variables that are not defined here must be +// saved with a unique VendorGuid other than EFI_GLOBAL_VARIABLE or +// any other GUID defined by the UEFI Specification. Implementations must +// only permit the creation of variables with a UEFI Specification-defined +// VendorGuid when these variables are documented in the UEFI Specification. +// +// Note: except the globally defined variables defined below, the spec also defines +// L"Boot####" - A boot load option. +// L"Driver####" - A driver load option. +// L"SysPrep####" - A System Prep application load option. +// L"Key####" - Describes hot key relationship with a Boot#### load option. +// The attribute for them is NV+BS+RT, #### is a printed hex value, and no 0x or h +// is included in the hex value. They can not be expressed as a #define like other globally +// defined variables, it is because we can not list the Boot0000, Boot0001, etc one by one. +// + +/// +/// The language codes that the firmware supports. This value is deprecated. +/// Its attribute is BS+RT. +/// +#define EFI_LANG_CODES_VARIABLE_NAME L"LangCodes" +/// +/// The language code that the system is configured for. This value is deprecated. +/// Its attribute is NV+BS+RT. +/// +#define EFI_LANG_VARIABLE_NAME L"Lang" +/// +/// The firmware's boot managers timeout, in seconds, before initiating the default boot selection. +/// Its attribute is NV+BS+RT. +/// +#define EFI_TIME_OUT_VARIABLE_NAME L"Timeout" +/// +/// The language codes that the firmware supports. +/// Its attribute is BS+RT. +/// +#define EFI_PLATFORM_LANG_CODES_VARIABLE_NAME L"PlatformLangCodes" +/// +/// The language code that the system is configured for. +/// Its attribute is NV+BS+RT. +/// +#define EFI_PLATFORM_LANG_VARIABLE_NAME L"PlatformLang" +/// +/// The device path of the default input/output/error output console. +/// Its attribute is NV+BS+RT. +/// +#define EFI_CON_IN_VARIABLE_NAME L"ConIn" +#define EFI_CON_OUT_VARIABLE_NAME L"ConOut" +#define EFI_ERR_OUT_VARIABLE_NAME L"ErrOut" +/// +/// The device path of all possible input/output/error output devices. +/// Its attribute is BS+RT. +/// +#define EFI_CON_IN_DEV_VARIABLE_NAME L"ConInDev" +#define EFI_CON_OUT_DEV_VARIABLE_NAME L"ConOutDev" +#define EFI_ERR_OUT_DEV_VARIABLE_NAME L"ErrOutDev" +/// +/// The ordered boot option load list. +/// Its attribute is NV+BS+RT. +/// +#define EFI_BOOT_ORDER_VARIABLE_NAME L"BootOrder" +/// +/// The boot option for the next boot only. +/// Its attribute is NV+BS+RT. +/// +#define EFI_BOOT_NEXT_VARIABLE_NAME L"BootNext" +/// +/// The boot option that was selected for the current boot. +/// Its attribute is BS+RT. +/// +#define EFI_BOOT_CURRENT_VARIABLE_NAME L"BootCurrent" +/// +/// The types of boot options supported by the boot manager. Should be treated as read-only. +/// Its attribute is BS+RT. +/// +#define EFI_BOOT_OPTION_SUPPORT_VARIABLE_NAME L"BootOptionSupport" +/// +/// The ordered driver load option list. +/// Its attribute is NV+BS+RT. +/// +#define EFI_DRIVER_ORDER_VARIABLE_NAME L"DriverOrder" +/// +/// The ordered System Prep Application load option list. +/// Its attribute is NV+BS+RT. +/// +#define EFI_SYS_PREP_ORDER_VARIABLE_NAME L"SysPrepOrder" +/// +/// Identifies the level of hardware error record persistence +/// support implemented by the platform. This variable is +/// only modified by firmware and is read-only to the OS. +/// Its attribute is NV+BS+RT. +/// +#define EFI_HW_ERR_REC_SUPPORT_VARIABLE_NAME L"HwErrRecSupport" +/// +/// Whether the system is operating in setup mode (1) or not (0). +/// All other values are reserved. Should be treated as read-only. +/// Its attribute is BS+RT. +/// +#define EFI_SETUP_MODE_NAME L"SetupMode" +/// +/// The Key Exchange Key Signature Database. +/// Its attribute is NV+BS+RT+AT. +/// +#define EFI_KEY_EXCHANGE_KEY_NAME L"KEK" +/// +/// The public Platform Key. +/// Its attribute is NV+BS+RT+AT. +/// +#define EFI_PLATFORM_KEY_NAME L"PK" +/// +/// Array of GUIDs representing the type of signatures supported +/// by the platform firmware. Should be treated as read-only. +/// Its attribute is BS+RT. +/// +#define EFI_SIGNATURE_SUPPORT_NAME L"SignatureSupport" +/// +/// Whether the platform firmware is operating in Secure boot mode (1) or not (0). +/// All other values are reserved. Should be treated as read-only. +/// Its attribute is BS+RT. +/// +#define EFI_SECURE_BOOT_MODE_NAME L"SecureBoot" +/// +/// The OEM's default Key Exchange Key Signature Database. Should be treated as read-only. +/// Its attribute is BS+RT. +/// +#define EFI_KEK_DEFAULT_VARIABLE_NAME L"KEKDefault" +/// +/// The OEM's default public Platform Key. Should be treated as read-only. +/// Its attribute is BS+RT. +/// +#define EFI_PK_DEFAULT_VARIABLE_NAME L"PKDefault" +/// +/// The OEM's default secure boot signature store. Should be treated as read-only. +/// Its attribute is BS+RT. +/// +#define EFI_DB_DEFAULT_VARIABLE_NAME L"dbDefault" +/// +/// The OEM's default secure boot blacklist signature store. Should be treated as read-only. +/// Its attribute is BS+RT. +/// +#define EFI_DBX_DEFAULT_VARIABLE_NAME L"dbxDefault" +/// +/// The OEM's default secure boot timestamp signature store. Should be treated as read-only. +/// Its attribute is BS+RT. +/// +#define EFI_DBT_DEFAULT_VARIABLE_NAME L"dbtDefault" +/// +/// Allows the firmware to indicate supported features and actions to the OS. +/// Its attribute is BS+RT. +/// +#define EFI_OS_INDICATIONS_SUPPORT_VARIABLE_NAME L"OsIndicationsSupported" +/// +/// Allows the OS to request the firmware to enable certain features and to take certain actions. +/// Its attribute is NV+BS+RT. +/// +#define EFI_OS_INDICATIONS_VARIABLE_NAME L"OsIndications" +/// +/// Whether the system is configured to use only vendor provided +/// keys or not. Should be treated as read-only. +/// Its attribute is BS+RT. +/// +#define EFI_VENDOR_KEYS_VARIABLE_NAME L"VendorKeys" + +/// +/// Whether the platform firmware is operating in device authentication boot mode (1) or not (0). +/// The content is UINT8. +/// +#define EFI_DEVICE_AUTH_BOOT_MODE_NAME L"devAuthBoot" + +#endif diff --git a/sys/contrib/edk2/Include/Guid/Gpt.h b/sys/contrib/edk2/Include/Guid/Gpt.h new file mode 100644 index 000000000000..8e6ec1f6bde0 --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/Gpt.h @@ -0,0 +1,37 @@ +/** @file + Guids used for the GPT (GUID Partition Table) + + GPT defines a new disk partitioning scheme and also describes + usage of the legacy Master Boot Record (MBR) partitioning scheme. + + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + GUIDs defined in UEFI 2.1 spec. + +**/ + +#ifndef __GPT_GUID_H__ +#define __GPT_GUID_H__ + +#define EFI_PART_TYPE_UNUSED_GUID \ + { \ + 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } \ + } + +#define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID \ + { \ + 0xc12a7328, 0xf81f, 0x11d2, {0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b } \ + } + +#define EFI_PART_TYPE_LEGACY_MBR_GUID \ + { \ + 0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f } \ + } + +extern EFI_GUID gEfiPartTypeUnusedGuid; +extern EFI_GUID gEfiPartTypeSystemPartGuid; +extern EFI_GUID gEfiPartTypeLegacyMbrGuid; + +#endif diff --git a/sys/contrib/edk2/Include/Guid/HiiPlatformSetupFormset.h b/sys/contrib/edk2/Include/Guid/HiiPlatformSetupFormset.h new file mode 100644 index 000000000000..4ed0f55c05cf --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/HiiPlatformSetupFormset.h @@ -0,0 +1,33 @@ +/** @file + GUID indicates that the form set contains forms designed to be used + for platform configuration and this form set will be displayed. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + GUID defined in UEFI 2.1. + +**/ + +#ifndef __HII_PLATFORM_SETUP_FORMSET_GUID_H__ +#define __HII_PLATFORM_SETUP_FORMSET_GUID_H__ + +#define EFI_HII_PLATFORM_SETUP_FORMSET_GUID \ + { 0x93039971, 0x8545, 0x4b04, { 0xb4, 0x5e, 0x32, 0xeb, 0x83, 0x26, 0x4, 0xe } } + +#define EFI_HII_DRIVER_HEALTH_FORMSET_GUID \ + { 0xf22fc20c, 0x8cf4, 0x45eb, { 0x8e, 0x6, 0xad, 0x4e, 0x50, 0xb9, 0x5d, 0xd3 } } + +#define EFI_HII_USER_CREDENTIAL_FORMSET_GUID \ + { 0x337f4407, 0x5aee, 0x4b83, { 0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd } } + +#define EFI_HII_REST_STYLE_FORMSET_GUID \ + { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 } } + +extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid; +extern EFI_GUID gEfiHiiDriverHealthFormsetGuid; +extern EFI_GUID gEfiHiiUserCredentialFormsetGuid; +extern EFI_GUID gEfiHiiRestStyleFormsetGuid; + +#endif diff --git a/sys/contrib/edk2/Include/Guid/MemoryAllocationHob.h b/sys/contrib/edk2/Include/Guid/MemoryAllocationHob.h new file mode 100644 index 000000000000..6054a2c097a4 --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/MemoryAllocationHob.h @@ -0,0 +1,28 @@ +/** @file + GUIDs for HOBs used in memory allcation + + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + GUIDs introduced in PI Version 1.0. + +**/ + +#ifndef __MEMORY_ALLOCATION_GUID_H__ +#define __MEMORY_ALLOCATION_GUID_H__ + +#define EFI_HOB_MEMORY_ALLOC_BSP_STORE_GUID \ + {0x564b33cd, 0xc92a, 0x4593, {0x90, 0xbf, 0x24, 0x73, 0xe4, 0x3c, 0x63, 0x22} }; + +#define EFI_HOB_MEMORY_ALLOC_STACK_GUID \ + {0x4ed4bf27, 0x4092, 0x42e9, {0x80, 0x7d, 0x52, 0x7b, 0x1d, 0x0, 0xc9, 0xbd} } + +#define EFI_HOB_MEMORY_ALLOC_MODULE_GUID \ + {0xf8e21975, 0x899, 0x4f58, {0xa4, 0xbe, 0x55, 0x25, 0xa9, 0xc6, 0xd7, 0x7a} } + +extern EFI_GUID gEfiHobMemoryAllocBspStoreGuid; +extern EFI_GUID gEfiHobMemoryAllocStackGuid; +extern EFI_GUID gEfiHobMemoryAllocModuleGuid; + +#endif diff --git a/sys/contrib/edk2/Include/Guid/MemoryAttributesTable.h b/sys/contrib/edk2/Include/Guid/MemoryAttributesTable.h new file mode 100644 index 000000000000..e741935856da --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/MemoryAttributesTable.h @@ -0,0 +1,32 @@ +/** @file + GUIDs used for UEFI Memory Attributes Table in the UEFI 2.6 specification. + + Copyright (c) 2016, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __UEFI_MEMORY_ATTRIBUTES_TABLE_H__ +#define __UEFI_MEMORY_ATTRIBUTES_TABLE_H__ + +#define EFI_MEMORY_ATTRIBUTES_TABLE_GUID {\ + 0xdcfa911d, 0x26eb, 0x469f, {0xa2, 0x20, 0x38, 0xb7, 0xdc, 0x46, 0x12, 0x20} \ +} + +typedef struct { + UINT32 Version; + UINT32 NumberOfEntries; + UINT32 DescriptorSize; + UINT32 Flags; + // EFI_MEMORY_DESCRIPTOR Entry[1]; +} EFI_MEMORY_ATTRIBUTES_TABLE; + +#define EFI_MEMORY_ATTRIBUTES_TABLE_VERSION 0x00000002 + +#define EFI_MEMORY_ATTRIBUTES_FLAGS_RT_FORWARD_CONTROL_FLOW_GUARD 0x1 +// BIT0 implies that Runtime code includes the forward control flow guard +// instruction, such as X86 CET-IBT or ARM BTI. + +extern EFI_GUID gEfiMemoryAttributesTableGuid; + +#endif diff --git a/sys/contrib/edk2/Include/Guid/MemoryOverwriteControl.h b/sys/contrib/edk2/Include/Guid/MemoryOverwriteControl.h new file mode 100644 index 000000000000..8ee9bbe51563 --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/MemoryOverwriteControl.h @@ -0,0 +1,70 @@ +/** @file + GUID used for MemoryOverwriteRequestControl UEFI variable defined in + TCG Platform Reset Attack Mitigation Specification 1.00. + See http://trustedcomputinggroup.org for the latest specification + + The purpose of the MemoryOverwriteRequestControl UEFI variable is to give users (e.g., OS, loader) the ability to + indicate to the platform that secrets are present in memory and that the platform firmware must clear memory upon + a restart. The OS loader should not create the variable. Rather, the firmware is required to create it. + + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _MEMORY_OVERWRITE_CONTROL_DATA_GUID_H_ +#define _MEMORY_OVERWRITE_CONTROL_DATA_GUID_H_ + +#define MEMORY_ONLY_RESET_CONTROL_GUID \ + { \ + 0xe20939be, 0x32d4, 0x41be, {0xa1, 0x50, 0x89, 0x7f, 0x85, 0xd4, 0x98, 0x29} \ + } + +/// +/// Variable name is "MemoryOverwriteRequestControl" and it is a 1 byte unsigned value. +/// The attributes should be: +/// EFI_VARIABLE_NON_VOLATILE | +/// EFI_VARIABLE_BOOTSERVICE_ACCESS | +/// EFI_VARIABLE_RUNTIME_ACCESS +/// +#define MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME L"MemoryOverwriteRequestControl" + +/// +/// 0 = Firmware MUST clear the MOR bit +/// 1 = Firmware MUST set the MOR bit +/// +#define MOR_CLEAR_MEMORY_BIT_MASK 0x01 + +/// +/// 0 = Firmware MAY autodetect a clean shutdown of the Static RTM OS. +/// 1 = Firmware MUST NOT autodetect a clean shutdown of the Static RTM OS. +/// +#define MOR_DISABLEAUTODETECT_BIT_MASK 0x10 + +/// +/// MOR field bit offset +/// +#define MOR_CLEAR_MEMORY_BIT_OFFSET 0 +#define MOR_DISABLEAUTODETECT_BIT_OFFSET 4 + +/** + Return the ClearMemory bit value 0 or 1. + + @param mor 1 byte value that contains ClearMemory and DisableAutoDetect bit. + + @return ClearMemory bit value +**/ +#define MOR_CLEAR_MEMORY_VALUE(mor) (((UINT8)(mor) & MOR_CLEAR_MEMORY_BIT_MASK) >> MOR_CLEAR_MEMORY_BIT_OFFSET) + +/** + Return the DisableAutoDetect bit value 0 or 1. + + @param mor 1 byte value that contains ClearMemory and DisableAutoDetect bit. + + @return DisableAutoDetect bit value +**/ +#define MOR_DISABLE_AUTO_DETECT_VALUE(mor) (((UINT8)(mor) & MOR_DISABLEAUTODETECT_BIT_MASK) >> MOR_DISABLEAUTODETECT_BIT_OFFSET) + +extern EFI_GUID gEfiMemoryOverwriteControlDataGuid; + +#endif diff --git a/sys/contrib/edk2/Include/Guid/Mps.h b/sys/contrib/edk2/Include/Guid/Mps.h new file mode 100644 index 000000000000..5911f4efa9fa --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/Mps.h @@ -0,0 +1,29 @@ +/** @file + GUIDs used for MPS entries in the UEFI 2.0 system table + ACPI is the primary means of exporting MPS information to the OS. MPS only was + included to support Itanium-based platform power on. So don't use it if you don't have too. + + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + GUIDs defined in UEFI 2.0 spec. + +**/ + +#ifndef __MPS_GUID_H__ +#define __MPS_GUID_H__ + +#define EFI_MPS_TABLE_GUID \ + { \ + 0xeb9d2d2f, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ + } + +// +// GUID name defined in spec. +// +#define MPS_TABLE_GUID EFI_MPS_TABLE_GUID + +extern EFI_GUID gEfiMpsTableGuid; + +#endif diff --git a/sys/contrib/edk2/Include/Guid/Rng.h b/sys/contrib/edk2/Include/Guid/Rng.h new file mode 100644 index 000000000000..acf0895b2b0d --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/Rng.h @@ -0,0 +1,155 @@ +/** @file + Random Number Generator (RNG) GUIDs and structures shared across RNG interfaces. + + Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef RNG_GUID_H_ +#define RNG_GUID_H_ + +typedef struct _EFI_RNG_INTERFACE EFI_RNG_INTERFACE; + +/// +/// A selection of EFI_RNG_PROTOCOL algorithms. +/// The algorithms listed are optional, not meant to be exhaustive and be argmented by +/// vendors or other industry standards. +/// +typedef EFI_GUID EFI_RNG_ALGORITHM; + +/// +/// The algorithms corresponds to SP800-90 as defined in +/// NIST SP 800-90, "Recommendation for Random Number Generation Using Deterministic Random +/// Bit Generators", March 2007. +/// +#define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID \ + { \ + 0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96 } \ + } +#define EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID \ + { \ + 0xc5149b43, 0xae85, 0x4f53, {0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7 } \ + } +#define EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID \ + { \ + 0x44f0de6e, 0x4d8c, 0x4045, {0xa8, 0xc7, 0x4d, 0xd1, 0x68, 0x85, 0x6b, 0x9e } \ + } + +/// +/// The algorithms correspond to X9.31 as defined in +/// NIST, "Recommended Random Number Generator Based on ANSI X9.31 Appendix A.2.4 Using +/// the 3-Key Triple DES and AES Algorithm", January 2005. +/// +#define EFI_RNG_ALGORITHM_X9_31_3DES_GUID \ + { \ + 0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46 } \ + } +#define EFI_RNG_ALGORITHM_X9_31_AES_GUID \ + { \ + 0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9 } \ + } + +/// +/// The "raw" algorithm, when supported, is intended to provide entropy directly from +/// the source, without it going through some deterministic random bit generator. +/// +#define EFI_RNG_ALGORITHM_RAW \ + { \ + 0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61 } \ + } + +/// +/// The Arm Architecture states the RNDR that the DRBG algorithm should be compliant +/// with NIST SP800-90A, while not mandating a particular algorithm, so as to be +/// inclusive of different geographies. +/// +#define EFI_RNG_ALGORITHM_ARM_RNDR \ + { \ + 0x43d2fde3, 0x9d4e, 0x4d79, {0x02, 0x96, 0xa8, 0x9b, 0xca, 0x78, 0x08, 0x41} \ + } + +/** + Returns information about the random number generation implementation. + + @param[in] This A pointer to this interface instance. + @param[in,out] RNGAlgorithmListSize On input, the size in bytes of RNGAlgorithmList. + On output with a return code of EFI_SUCCESS, the size + in bytes of the data returned in RNGAlgorithmList. On output + with a return code of EFI_BUFFER_TOO_SMALL, + the size of RNGAlgorithmList required to obtain the list. + @param[out] RNGAlgorithmList A caller-allocated memory buffer filled by the driver + with one EFI_RNG_ALGORITHM element for each supported + RNG algorithm. The list must not change across multiple + calls to the same driver. The first algorithm in the list + is the default algorithm for the driver. + + @retval EFI_SUCCESS The RNG algorithm list was returned successfully. + @retval EFI_UNSUPPORTED The services is not supported by this driver. + @retval EFI_DEVICE_ERROR The list of algorithms could not be retrieved due to a + hardware or firmware error. + @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect. + @retval EFI_BUFFER_TOO_SMALL The buffer RNGAlgorithmList is too small to hold the result. + +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_RNG_GET_INFO)( + IN EFI_RNG_INTERFACE *This, + IN OUT UINTN *RNGAlgorithmListSize, + OUT EFI_RNG_ALGORITHM *RNGAlgorithmList + ); + +/** + Produces and returns an RNG value using either the default or specified RNG algorithm. + + @param[in] This A pointer to this interface instance. + @param[in] RNGAlgorithm A pointer to the EFI_RNG_ALGORITHM that identifies the RNG + algorithm to use. May be NULL in which case the function will + use its default RNG algorithm. + @param[in] RNGValueLength The length in bytes of the memory buffer pointed to by + RNGValue. The driver shall return exactly this numbers of bytes. + @param[out] RNGValue A caller-allocated memory buffer filled by the driver with the + resulting RNG value. + + @retval EFI_SUCCESS The RNG value was returned successfully. + @retval EFI_UNSUPPORTED The algorithm specified by RNGAlgorithm is not supported by + this driver. + @retval EFI_DEVICE_ERROR An RNG value could not be retrieved due to a hardware or + firmware error. + @retval EFI_NOT_READY There is not enough random data available to satisfy the length + requested by RNGValueLength. + @retval EFI_INVALID_PARAMETER RNGValue is NULL or RNGValueLength is zero. + +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_RNG_GET_RNG)( + IN EFI_RNG_INTERFACE *This, + IN EFI_RNG_ALGORITHM *RNGAlgorithm OPTIONAL, + IN UINTN RNGValueLength, + OUT UINT8 *RNGValue + ); + +/// +/// The Random Number Generator (RNG) interface provides random bits for use in +/// applications, or entropy for seeding other random number generators. +/// +/// This interface is shared between the RNG Protocol defined in the UEFI 2.4 Specification +/// and the RNG PPI defined in the PI 1.9 Specification. +/// +struct _EFI_RNG_INTERFACE { + EFI_RNG_GET_INFO GetInfo; + EFI_RNG_GET_RNG GetRNG; +}; + +extern EFI_GUID gEfiRngAlgorithmSp80090Hash256Guid; +extern EFI_GUID gEfiRngAlgorithmSp80090Hmac256Guid; +extern EFI_GUID gEfiRngAlgorithmSp80090Ctr256Guid; +extern EFI_GUID gEfiRngAlgorithmX9313DesGuid; +extern EFI_GUID gEfiRngAlgorithmX931AesGuid; +extern EFI_GUID gEfiRngAlgorithmRaw; +extern EFI_GUID gEfiRngAlgorithmArmRndr; + +#endif // #ifndef RNG_GUID_H_ diff --git a/sys/contrib/edk2/Include/Guid/SmBios.h b/sys/contrib/edk2/Include/Guid/SmBios.h new file mode 100644 index 000000000000..c01617a1a4cb --- /dev/null +++ b/sys/contrib/edk2/Include/Guid/SmBios.h @@ -0,0 +1,32 @@ +/** @file + GUIDs used to locate the SMBIOS tables in the UEFI 2.5 system table. + + These GUIDs in the system table are the only legal ways to search for and + locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS + tables. + + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + GUIDs defined in UEFI 2.5 spec. + +**/ + +#ifndef __SMBIOS_GUID_H__ +#define __SMBIOS_GUID_H__ + +#define SMBIOS_TABLE_GUID \ + { \ + 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ + } + +#define SMBIOS3_TABLE_GUID \ + { \ + 0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 } \ + } + +extern EFI_GUID gEfiSmbiosTableGuid; +extern EFI_GUID gEfiSmbios3TableGuid; + +#endif diff --git a/sys/contrib/edk2/Include/IndustryStandard/Atapi.h b/sys/contrib/edk2/Include/IndustryStandard/Atapi.h new file mode 100644 index 000000000000..7f11302bfa6e --- /dev/null +++ b/sys/contrib/edk2/Include/IndustryStandard/Atapi.h @@ -0,0 +1,849 @@ +/** @file + This file contains just some basic definitions that are needed by drivers + that dealing with ATA/ATAPI interface. + +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _ATAPI_H_ +#define _ATAPI_H_ + +#pragma pack(1) + +/// +/// ATA5_IDENTIFY_DATA is defined in ATA-5. +/// (This structure is provided mainly for backward-compatibility support. +/// Old drivers may reference fields that are marked "obsolete" in +/// ATA_IDENTIFY_DATA, which currently conforms to ATA-8.) +/// +typedef struct { + UINT16 config; ///< General Configuration. + UINT16 cylinders; ///< Number of Cylinders. + UINT16 reserved_2; + UINT16 heads; ///< Number of logical heads. + UINT16 vendor_data1; *** 31946 LINES SKIPPED *** From nobody Sun Nov 16 18:29:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8fXh6g4Gz6GsgL; Sun, 16 Nov 2025 18:29: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8fXh0jHsz43Ht; Sun, 16 Nov 2025 18:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZ6k/RD11Ta6BFGcW3FcY6GzfcEPM7u50DlEB/UWk54=; b=Wy26diS9ArCUrtBCY44V+4rKGRmbI4ZDQ0Wj0vitIvzkrNIKnNWMjooYDsyty4a/52gJi8 XRKMXEoBCty8sYCwLCukjKrmpELDISIh34yRWevJvqeI9KM+SJzM2rVK+lG2l6k5CRwePf aSdudsNTICuobluZITm+IuqTW4HTFL4n+ybT6ht+8+Twq8uh8KSJVfVhtQayMaUtTpTm07 qAvuH/ffOFIVe7WQrYVUmaexK1jDAtKDWqPQLi6i/fadXQx+PoCH9pQbGdUrQDsivN+xMw xTO58Zdd0QVisrfJLKGoJZ0UpG4N1maQ+ZcXCNzlIeApaztc6dUj3aJdaV0/rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZ6k/RD11Ta6BFGcW3FcY6GzfcEPM7u50DlEB/UWk54=; b=lhPM3emSAFaPlikIa9r2c3woeZdgobnIxekFZrG13xGYDjO2vkVn+7HWt24l/5tuCBtKfj sxRyKllXZnJdYKpgS9vH2AN19PDRuuujKiifY8oDd0oQuhTV4qri7KT9tzCRyP+XADB1CZ 2OFNSs+BW5H1zI4LYokqhLb2CdVGHtpQ2mZGGWSiXu6eyNjio8mFZadb0jywFGgdB+qw1g n4lg1pODrRz8/X2/wZ7iRJxfb8OyjVPDR4+zE0Dcln8xhYJOGc8E+7D2r2w5f9fkhqEodx P7Abow9Scv4VGkn94KSYZf/e2JtzueoiafUtPL87i1yDZefzpUQ47xs75oFFYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763317748; a=rsa-sha256; cv=none; b=JUtaAyeC91qSycPJe/3OiHW0jWDguWks2jNgrOBEYvVOcPKm5YBSA5zZOwH4VKfaguFJJg 4xtygUi6h1cXqEAPwcjHwXyv3s8I4cCVvekVXpVF2stmDx/tYppEMs1wgwfpIO9kLNjSrz ICMw8VDu9JVQH7kYo94ueaN8Vr79EbhJ6F+FyIvPf1lDmEvjOzLu1tGtOMV7xjeR4PHWHh UUuAC9kAFhj02r7jG0SiFns+xbEd/6h/yYWu5BBOXnnisek+NvTE2NzCnUp7UIz4yMfvUu EJwv0sFO/lBD7fDHwxP7r1y4kNdZ5mleUVAw+PynGgtyOFb1x0FF8R0y29f0Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8fXg6r9mzqb1; Sun, 16 Nov 2025 18:29: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 5AGIT7KJ008102; Sun, 16 Nov 2025 18:29:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGIT7Ts008099; Sun, 16 Nov 2025 18:29:07 GMT (envelope-from git) Date: Sun, 16 Nov 2025 18:29:07 GMT Message-Id: <202511161829.5AGIT7Ts008099@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: 43b8edb32051 - main - stand: Cut over to using the EDK2 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43b8edb320519c9887a5d953c4cf8a91f0ca8d14 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=43b8edb320519c9887a5d953c4cf8a91f0ca8d14 commit 43b8edb320519c9887a5d953c4cf8a91f0ca8d14 Author: Warner Losh AuthorDate: 2025-11-16 17:36:36 +0000 Commit: Warner Losh CommitDate: 2025-11-16 18:29:03 +0000 stand: Cut over to using the EDK2 files Remove the old EFI SDK files that we've been nursing along for too many years. Replace them with files from EDK2 edk2-stable202502 and tweak the interfaces we need to tweak. Mostly include different things or change the names of the protocols that no longer have old-school compat names. I gave up in the middle of env.c, too damn tedious to find all those new GUIDs. Also, many of the guids were mystery meat, most likely from the EDK2 sources, but just not the Include subdirectory. Need to investigate those. And the memory info? Is it just an oboslete thing, or embedded knowledge of EDK2. Delete the now-redundant copies of things in Guid and Protocol. I debated keeping ZeroGuid.h, but EDK2 has moved on from when I snagged it years ago (or maybe I just invented it out of whole cloth: edk2 does radically different things today and I didn't do the git deep-dive to find out). Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D53655 --- stand/common/gfx_fb.c | 3 +- stand/defs.mk | 1 + stand/efi/acpica/acpi_detect.c | 3 +- stand/efi/boot1/Makefile | 2 +- stand/efi/boot1/boot1.c | 3 + stand/efi/include/Guid/MemoryTypeInformation.h | 36 - stand/efi/include/Guid/MtcVendor.h | 31 - stand/efi/include/Guid/ZeroGuid.h | 25 - stand/efi/include/Protocol/EdidActive.h | 52 -- stand/efi/include/Protocol/EdidDiscovered.h | 50 - stand/efi/include/Protocol/EdidOverride.h | 67 -- stand/efi/include/Protocol/Http.h | 522 ----------- stand/efi/include/Protocol/Ip4Config2.h | 323 ------- stand/efi/include/Protocol/ServiceBinding.h | 94 -- stand/efi/include/efi.h | 69 +- stand/efi/include/efi_driver_utils.h | 7 +- stand/efi/include/efiapi.h | 1195 ------------------------ stand/efi/include/eficon.h | 526 ----------- stand/efi/include/efidebug.h | 117 --- stand/efi/include/efidef.h | 223 ----- stand/efi/include/efidevp.h | 510 ---------- stand/efi/include/efierr.h | 67 -- stand/efi/include/efifpswa.h | 39 - stand/efi/include/efifs.h | 122 --- stand/efi/include/efigop.h | 120 --- stand/efi/include/efiip.h | 459 --------- stand/efi/include/efilib.h | 4 +- stand/efi/include/efinet.h | 347 ------- stand/efi/include/efipart.h | 68 -- stand/efi/include/efipoint.h | 115 --- stand/efi/include/efiprot.h | 662 ------------- stand/efi/include/efipxebc.h | 471 ---------- stand/efi/include/efirng.h | 50 - stand/efi/include/efiser.h | 138 --- stand/efi/include/efistdarg.h | 38 - stand/efi/include/efitcp.h | 391 -------- stand/efi/include/efiudp.h | 272 ------ stand/efi/include/efiuga.h | 167 ---- stand/efi/include/efizfs.h | 7 + stand/efi/libefi/Makefile | 2 +- stand/efi/libefi/devpath.c | 4 +- stand/efi/libefi/efi_driver_utils.c | 11 +- stand/efi/libefi/eficom.c | 3 +- stand/efi/libefi/efienv.c | 1 + stand/efi/libefi/efihttp.c | 1 - stand/efi/libefi/efinet.c | 3 +- stand/efi/libefi/efipart.c | 3 +- stand/efi/libefi/env.c | 243 +++-- stand/efi/loader/Makefile | 1 + stand/efi/loader/efi_main.c | 2 + stand/efi/loader/framebuffer.c | 11 +- stand/efi/loader/main.c | 31 +- 52 files changed, 285 insertions(+), 7427 deletions(-) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 3de0a8b631ee..eb41c51c50b6 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -98,6 +98,7 @@ #if defined(EFI) #include #include +#include #else #include #endif @@ -855,7 +856,7 @@ gfxfb_blt(void *BltBuffer, GFXFB_BLT_OPERATION BltOperation, int rv; #if defined(EFI) EFI_STATUS status; - EFI_GRAPHICS_OUTPUT *gop = gfx_state.tg_private; + EFI_GRAPHICS_OUTPUT_PROTOCOL *gop = gfx_state.tg_private; EFI_TPL tpl; /* diff --git a/stand/defs.mk b/stand/defs.mk index eb4133b604eb..54149f5f7b9e 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -38,6 +38,7 @@ MK_UBSAN:= no WARNS?= 1 BOOTSRC= ${SRCTOP}/stand +EDK2INC= ${SYSDIR}/contrib/edk2/Include EFISRC= ${BOOTSRC}/efi EFIINC= ${EFISRC}/include # For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is diff --git a/stand/efi/acpica/acpi_detect.c b/stand/efi/acpica/acpi_detect.c index 1f15a882ff9d..ca15f9d8dadc 100644 --- a/stand/efi/acpica/acpi_detect.c +++ b/stand/efi/acpica/acpi_detect.c @@ -27,12 +27,13 @@ #include #include +#include #include #include "acpi_detect.h" /* For ACPI rsdp discovery. */ EFI_GUID acpi = ACPI_TABLE_GUID; -EFI_GUID acpi20 = ACPI_20_TABLE_GUID; +EFI_GUID acpi20 = EFI_ACPI_TABLE_GUID; ACPI_TABLE_RSDP *rsdp; void diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index e2966e813504..c9f04546b56b 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -44,7 +44,7 @@ CFLAGS.zfs_module.c+= -include ${ZFSOSINC}/spl/sys/ccompile.h CFLAGS+= -DEFI_ZFS_BOOT .endif -CFLAGS+= -I${EFIINC} +CFLAGS+= -I${EFIINC} -I${EDK2INC} CFLAGS+= -I${EFIINCMD} CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include CFLAGS+= -DEFI_UFS_BOOT diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c index 8228044b3be3..cad43206aa6a 100644 --- a/stand/efi/boot1/boot1.c +++ b/stand/efi/boot1/boot1.c @@ -296,12 +296,14 @@ efi_exit(EFI_STATUS s) BS->FreePages(heap, EFI_SIZE_TO_PAGES(heapsize)); BS->Exit(IH, s, 0, NULL); + __unreachable(); } void exit(int error) { efi_exit(errno_to_efi_status(error)); + __unreachable(); } /* @@ -320,6 +322,7 @@ efi_panic(EFI_STATUS s, const char *fmt, ...) printf("\n"); efi_exit(s); + __unreachable(); } int getchar(void) diff --git a/stand/efi/include/Guid/MemoryTypeInformation.h b/stand/efi/include/Guid/MemoryTypeInformation.h deleted file mode 100644 index be9c4b5177a9..000000000000 --- a/stand/efi/include/Guid/MemoryTypeInformation.h +++ /dev/null @@ -1,36 +0,0 @@ -/** @file - This file defines: - * Memory Type Information GUID for HOB and Variable. - * Memory Type Information Variable Name. - * Memory Type Information GUID HOB data structure. - - The memory type information HOB and variable can - be used to store the information for each memory type in Variable or HOB. - -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __MEMORY_TYPE_INFORMATION_GUID_H__ -#define __MEMORY_TYPE_INFORMATION_GUID_H__ - -#define EFI_MEMORY_TYPE_INFORMATION_GUID \ - { 0x4c19049f,0x4137,0x4dd3, { 0x9c,0x10,0x8b,0x97,0xa8,0x3f,0xfd,0xfa } } - -#define EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME "MemoryTypeInformation" - -extern EFI_GUID gEfiMemoryTypeInformationGuid; - -typedef struct { - UINT32 Type; ///< EFI memory type defined in UEFI specification. - UINT32 NumberOfPages; ///< The pages of this type memory. -} EFI_MEMORY_TYPE_INFORMATION; - -#endif diff --git a/stand/efi/include/Guid/MtcVendor.h b/stand/efi/include/Guid/MtcVendor.h deleted file mode 100644 index 3aa774f55477..000000000000 --- a/stand/efi/include/Guid/MtcVendor.h +++ /dev/null @@ -1,31 +0,0 @@ -/** @file - GUID is for MTC variable. - -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __MTC_VENDOR_GUID_H__ -#define __MTC_VENDOR_GUID_H__ - -// -// Vendor GUID of the variable for the high part of monotonic counter (UINT32). -// -#define MTC_VENDOR_GUID \ - { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } } - -// -// Name of the variable for the high part of monotonic counter -// -#define MTC_VARIABLE_NAME "MTC" - -extern EFI_GUID gMtcVendorGuid; - -#endif diff --git a/stand/efi/include/Guid/ZeroGuid.h b/stand/efi/include/Guid/ZeroGuid.h deleted file mode 100644 index 6de8c3821f5f..000000000000 --- a/stand/efi/include/Guid/ZeroGuid.h +++ /dev/null @@ -1,25 +0,0 @@ -/** @file - GUID has all zero values. - -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __ZERO_GUID_H__ -#define __ZERO_GUID_H__ - -#define ZERO_GUID \ - { \ - 0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} \ - } - -extern EFI_GUID gZeroGuid; - -#endif diff --git a/stand/efi/include/Protocol/EdidActive.h b/stand/efi/include/Protocol/EdidActive.h deleted file mode 100644 index 1f6ff052a91c..000000000000 --- a/stand/efi/include/Protocol/EdidActive.h +++ /dev/null @@ -1,52 +0,0 @@ -/** @file - EDID Active Protocol from the UEFI 2.0 specification. - - Placed on the video output device child handle that is actively displaying output. - - Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __EDID_ACTIVE_H__ -#define __EDID_ACTIVE_H__ - -#define EFI_EDID_ACTIVE_PROTOCOL_GUID \ - { \ - 0xbd8c1056, 0x9f36, 0x44ec, {0x92, 0xa8, 0xa6, 0x33, 0x7f, 0x81, 0x79, 0x86 } \ - } - -/// -/// This protocol contains the EDID information for an active video output device. This is either the -/// EDID information retrieved from the EFI_EDID_OVERRIDE_PROTOCOL if an override is -/// available, or an identical copy of the EDID information from the -/// EFI_EDID_DISCOVERED_PROTOCOL if no overrides are available. -/// -typedef struct { - /// - /// The size, in bytes, of the Edid buffer. 0 if no EDID information - /// is available from the video output device. Otherwise, it must be a - /// minimum of 128 bytes. - /// - UINT32 SizeOfEdid; - - /// - /// A pointer to a read-only array of bytes that contains the EDID - /// information for an active video output device. This pointer is - /// NULL if no EDID information is available for the video output - /// device. The minimum size of a valid Edid buffer is 128 bytes. - /// EDID information is defined in the E-EDID EEPROM - /// specification published by VESA (www.vesa.org). - /// - UINT8 *Edid; -} EFI_EDID_ACTIVE_PROTOCOL; - -extern EFI_GUID gEfiEdidActiveProtocolGuid; - -#endif diff --git a/stand/efi/include/Protocol/EdidDiscovered.h b/stand/efi/include/Protocol/EdidDiscovered.h deleted file mode 100644 index c10b6ee89a82..000000000000 --- a/stand/efi/include/Protocol/EdidDiscovered.h +++ /dev/null @@ -1,50 +0,0 @@ -/** @file - EDID Discovered Protocol from the UEFI 2.0 specification. - - This protocol is placed on the video output device child handle. It represents - the EDID information being used for the output device represented by the child handle. - - Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __EDID_DISCOVERED_H__ -#define __EDID_DISCOVERED_H__ - -#define EFI_EDID_DISCOVERED_PROTOCOL_GUID \ - { \ - 0x1c0c34f6, 0xd380, 0x41fa, {0xa0, 0x49, 0x8a, 0xd0, 0x6c, 0x1a, 0x66, 0xaa } \ - } - -/// -/// This protocol contains the EDID information retrieved from a video output device. -/// -typedef struct { - /// - /// The size, in bytes, of the Edid buffer. 0 if no EDID information - /// is available from the video output device. Otherwise, it must be a - /// minimum of 128 bytes. - /// - UINT32 SizeOfEdid; - - /// - /// A pointer to a read-only array of bytes that contains the EDID - /// information for an active video output device. This pointer is - /// NULL if no EDID information is available for the video output - /// device. The minimum size of a valid Edid buffer is 128 bytes. - /// EDID information is defined in the E-EDID EEPROM - /// specification published by VESA (www.vesa.org). - /// - UINT8 *Edid; -} EFI_EDID_DISCOVERED_PROTOCOL; - -extern EFI_GUID gEfiEdidDiscoveredProtocolGuid; - -#endif diff --git a/stand/efi/include/Protocol/EdidOverride.h b/stand/efi/include/Protocol/EdidOverride.h deleted file mode 100644 index 450c95641fce..000000000000 --- a/stand/efi/include/Protocol/EdidOverride.h +++ /dev/null @@ -1,67 +0,0 @@ -/** @file - EDID Override Protocol from the UEFI 2.0 specification. - - Allow platform to provide EDID information to the producer of the Graphics Output - protocol. - - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __EDID_OVERRIDE_H__ -#define __EDID_OVERRIDE_H__ - -#define EFI_EDID_OVERRIDE_PROTOCOL_GUID \ - { \ - 0x48ecb431, 0xfb72, 0x45c0, {0xa9, 0x22, 0xf4, 0x58, 0xfe, 0x4, 0xb, 0xd5 } \ - } - -typedef struct _EFI_EDID_OVERRIDE_PROTOCOL EFI_EDID_OVERRIDE_PROTOCOL; - -#define EFI_EDID_OVERRIDE_DONT_OVERRIDE 0x01 -#define EFI_EDID_OVERRIDE_ENABLE_HOT_PLUG 0x02 - -/** - Returns policy information and potentially a replacement EDID for the specified video output device. - - @param This The EFI_EDID_OVERRIDE_PROTOCOL instance. - @param ChildHandle A child handle produced by the Graphics Output EFI - driver that represents a video output device. - @param Attributes The attributes associated with ChildHandle video output device. - @param EdidSize A pointer to the size, in bytes, of the Edid buffer. - @param Edid A pointer to callee allocated buffer that contains the EDID that - should be used for ChildHandle. A value of NULL - represents no EDID override for ChildHandle. - - @retval EFI_SUCCESS Valid overrides returned for ChildHandle. - @retval EFI_UNSUPPORTED ChildHandle has no overrides. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID)( - IN EFI_EDID_OVERRIDE_PROTOCOL *This, - IN EFI_HANDLE *ChildHandle, - OUT UINT32 *Attributes, - IN OUT UINTN *EdidSize, - IN OUT UINT8 **Edid - ); - -/// -/// This protocol is produced by the platform to allow the platform to provide -/// EDID information to the producer of the Graphics Output protocol. -/// -struct _EFI_EDID_OVERRIDE_PROTOCOL { - EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID GetEdid; -}; - -extern EFI_GUID gEfiEdidOverrideProtocolGuid; - -#endif diff --git a/stand/efi/include/Protocol/Http.h b/stand/efi/include/Protocol/Http.h deleted file mode 100644 index c88cc9f78847..000000000000 --- a/stand/efi/include/Protocol/Http.h +++ /dev/null @@ -1,522 +0,0 @@ -/** @file - This file defines the EFI HTTP Protocol interface. It is split into - the following two main sections: - HTTP Service Binding Protocol (HTTPSB) - HTTP Protocol (HTTP) - - Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
- (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - @par Revision Reference: - This Protocol is introduced in UEFI Specification 2.5 - -**/ - -#ifndef __EFI_HTTP_PROTOCOL_H__ -#define __EFI_HTTP_PROTOCOL_H__ - -#define EFI_HTTP_SERVICE_BINDING_PROTOCOL_GUID \ - { \ - 0xbdc8e6af, 0xd9bc, 0x4379, {0xa7, 0x2a, 0xe0, 0xc4, 0xe7, 0x5d, 0xae, 0x1c } \ - } - -#define EFI_HTTP_PROTOCOL_GUID \ - { \ - 0x7a59b29b, 0x910b, 0x4171, {0x82, 0x42, 0xa8, 0x5a, 0x0d, 0xf2, 0x5b, 0x5b } \ - } - -typedef struct _EFI_HTTP_PROTOCOL EFI_HTTP_PROTOCOL; - -/// -/// EFI_HTTP_VERSION -/// -typedef enum { - HttpVersion10, - HttpVersion11, - HttpVersionUnsupported -} EFI_HTTP_VERSION; - -/// -/// EFI_HTTP_METHOD -/// -typedef enum { - HttpMethodGet, - HttpMethodPost, - HttpMethodPatch, - HttpMethodOptions, - HttpMethodConnect, - HttpMethodHead, - HttpMethodPut, - HttpMethodDelete, - HttpMethodTrace, - HttpMethodMax -} EFI_HTTP_METHOD; - -/// -/// EFI_HTTP_STATUS_CODE -/// -typedef enum { - HTTP_STATUS_UNSUPPORTED_STATUS = 0, - HTTP_STATUS_100_CONTINUE, - HTTP_STATUS_101_SWITCHING_PROTOCOLS, - HTTP_STATUS_200_OK, - HTTP_STATUS_201_CREATED, - HTTP_STATUS_202_ACCEPTED, - HTTP_STATUS_203_NON_AUTHORITATIVE_INFORMATION, - HTTP_STATUS_204_NO_CONTENT, - HTTP_STATUS_205_RESET_CONTENT, - HTTP_STATUS_206_PARTIAL_CONTENT, - HTTP_STATUS_300_MULTIPLE_CHOICES, - HTTP_STATUS_301_MOVED_PERMANENTLY, - HTTP_STATUS_302_FOUND, - HTTP_STATUS_303_SEE_OTHER, - HTTP_STATUS_304_NOT_MODIFIED, - HTTP_STATUS_305_USE_PROXY, - HTTP_STATUS_307_TEMPORARY_REDIRECT, - HTTP_STATUS_400_BAD_REQUEST, - HTTP_STATUS_401_UNAUTHORIZED, - HTTP_STATUS_402_PAYMENT_REQUIRED, - HTTP_STATUS_403_FORBIDDEN, - HTTP_STATUS_404_NOT_FOUND, - HTTP_STATUS_405_METHOD_NOT_ALLOWED, - HTTP_STATUS_406_NOT_ACCEPTABLE, - HTTP_STATUS_407_PROXY_AUTHENTICATION_REQUIRED, - HTTP_STATUS_408_REQUEST_TIME_OUT, - HTTP_STATUS_409_CONFLICT, - HTTP_STATUS_410_GONE, - HTTP_STATUS_411_LENGTH_REQUIRED, - HTTP_STATUS_412_PRECONDITION_FAILED, - HTTP_STATUS_413_REQUEST_ENTITY_TOO_LARGE, - HTTP_STATUS_414_REQUEST_URI_TOO_LARGE, - HTTP_STATUS_415_UNSUPPORTED_MEDIA_TYPE, - HTTP_STATUS_416_REQUESTED_RANGE_NOT_SATISFIED, - HTTP_STATUS_417_EXPECTATION_FAILED, - HTTP_STATUS_500_INTERNAL_SERVER_ERROR, - HTTP_STATUS_501_NOT_IMPLEMENTED, - HTTP_STATUS_502_BAD_GATEWAY, - HTTP_STATUS_503_SERVICE_UNAVAILABLE, - HTTP_STATUS_504_GATEWAY_TIME_OUT, - HTTP_STATUS_505_HTTP_VERSION_NOT_SUPPORTED, - HTTP_STATUS_308_PERMANENT_REDIRECT -} EFI_HTTP_STATUS_CODE; - -/// -/// EFI_HTTPv4_ACCESS_POINT -/// -typedef struct { - /// - /// Set to TRUE to instruct the EFI HTTP instance to use the default address - /// information in every TCP connection made by this instance. In addition, when set - /// to TRUE, LocalAddress and LocalSubnet are ignored. - /// - BOOLEAN UseDefaultAddress; - /// - /// If UseDefaultAddress is set to FALSE, this defines the local IP address to be - /// used in every TCP connection opened by this instance. - /// - EFI_IPv4_ADDRESS LocalAddress; - /// - /// If UseDefaultAddress is set to FALSE, this defines the local subnet to be used - /// in every TCP connection opened by this instance. - /// - EFI_IPv4_ADDRESS LocalSubnet; - /// - /// This defines the local port to be used in - /// every TCP connection opened by this instance. - /// - UINT16 LocalPort; -} EFI_HTTPv4_ACCESS_POINT; - -/// -/// EFI_HTTPv6_ACCESS_POINT -/// -typedef struct { - /// - /// Local IP address to be used in every TCP connection opened by this instance. - /// - EFI_IPv6_ADDRESS LocalAddress; - /// - /// Local port to be used in every TCP connection opened by this instance. - /// - UINT16 LocalPort; -} EFI_HTTPv6_ACCESS_POINT; - -/// -/// EFI_HTTP_CONFIG_DATA_ACCESS_POINT -/// - - -typedef struct { - /// - /// HTTP version that this instance will support. - /// - EFI_HTTP_VERSION HttpVersion; - /// - /// Time out (in milliseconds) when blocking for requests. - /// - UINT32 TimeOutMillisec; - /// - /// Defines behavior of EFI DNS and TCP protocols consumed by this instance. If - /// FALSE, this instance will use EFI_DNS4_PROTOCOL and EFI_TCP4_PROTOCOL. If TRUE, - /// this instance will use EFI_DNS6_PROTOCOL and EFI_TCP6_PROTOCOL. - /// - BOOLEAN LocalAddressIsIPv6; - - union { - /// - /// When LocalAddressIsIPv6 is FALSE, this points to the local address, subnet, and - /// port used by the underlying TCP protocol. - /// - EFI_HTTPv4_ACCESS_POINT *IPv4Node; - /// - /// When LocalAddressIsIPv6 is TRUE, this points to the local IPv6 address and port - /// used by the underlying TCP protocol. - /// - EFI_HTTPv6_ACCESS_POINT *IPv6Node; - } AccessPoint; -} EFI_HTTP_CONFIG_DATA; - -/// -/// EFI_HTTP_REQUEST_DATA -/// -typedef struct { - /// - /// The HTTP method (e.g. GET, POST) for this HTTP Request. - /// - EFI_HTTP_METHOD Method; - /// - /// The URI of a remote host. From the information in this field, the HTTP instance - /// will be able to determine whether to use HTTP or HTTPS and will also be able to - /// determine the port number to use. If no port number is specified, port 80 (HTTP) - /// is assumed. See RFC 3986 for more details on URI syntax. - /// - CHAR16 *Url; -} EFI_HTTP_REQUEST_DATA; - -/// -/// EFI_HTTP_RESPONSE_DATA -/// -typedef struct { - /// - /// Response status code returned by the remote host. - /// - EFI_HTTP_STATUS_CODE StatusCode; -} EFI_HTTP_RESPONSE_DATA; - -/// -/// EFI_HTTP_HEADER -/// -typedef struct { - /// - /// Null terminated string which describes a field name. See RFC 2616 Section 14 for - /// detailed information about field names. - /// - CHAR8 *FieldName; - /// - /// Null terminated string which describes the corresponding field value. See RFC 2616 - /// Section 14 for detailed information about field values. - /// - CHAR8 *FieldValue; -} EFI_HTTP_HEADER; - -/// -/// EFI_HTTP_MESSAGE -/// -typedef struct { - /// - /// HTTP message data. - /// - union { - /// - /// When the token is used to send a HTTP request, Request is a pointer to storage that - /// contains such data as URL and HTTP method. - /// - EFI_HTTP_REQUEST_DATA *Request; - /// - /// When used to await a response, Response points to storage containing HTTP response - /// status code. - /// - EFI_HTTP_RESPONSE_DATA *Response; - } Data; - /// - /// Number of HTTP header structures in Headers list. On request, this count is - /// provided by the caller. On response, this count is provided by the HTTP driver. - /// - UINTN HeaderCount; - /// - /// Array containing list of HTTP headers. On request, this array is populated by the - /// caller. On response, this array is allocated and populated by the HTTP driver. It - /// is the responsibility of the caller to free this memory on both request and - /// response. - /// - EFI_HTTP_HEADER *Headers; - /// - /// Length in bytes of the HTTP body. This can be zero depending on the HttpMethod type. - /// - UINTN BodyLength; - /// - /// Body associated with the HTTP request or response. This can be NULL depending on - /// the HttpMethod type. - /// - VOID *Body; -} EFI_HTTP_MESSAGE; - - -/// -/// EFI_HTTP_TOKEN -/// -typedef struct { - /// - /// This Event will be signaled after the Status field is updated by the EFI HTTP - /// Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. The Task Priority - /// Level (TPL) of Event must be lower than or equal to TPL_CALLBACK. - /// - EFI_EVENT Event; - /// - /// Status will be set to one of the following value if the HTTP request is - /// successfully sent or if an unexpected error occurs: - /// EFI_SUCCESS: The HTTP request was successfully sent to the remote host. - /// EFI_HTTP_ERROR: The response message was successfully received but contains a - /// HTTP error. The response status code is returned in token. - /// EFI_ABORTED: The HTTP request was cancelled by the caller and removed from - /// the transmit queue. - /// EFI_TIMEOUT: The HTTP request timed out before reaching the remote host. - /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. - /// - EFI_STATUS Status; - /// - /// Pointer to storage containing HTTP message data. - /// - EFI_HTTP_MESSAGE *Message; -} EFI_HTTP_TOKEN; - -/** - Returns the operational parameters for the current HTTP child instance. - - The GetModeData() function is used to read the current mode data (operational - parameters) for this HTTP protocol instance. - - @param[in] This Pointer to EFI_HTTP_PROTOCOL instance. - @param[out] HttpConfigData Point to buffer for operational parameters of this - HTTP instance. It is the responsibility of the caller - to allocate the memory for HttpConfigData and - HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact, - it is recommended to allocate sufficient memory to record - IPv6Node since it is big enough for all possibilities. - - @retval EFI_SUCCESS Operation succeeded. - @retval EFI_INVALID_PARAMETER This is NULL. - HttpConfigData is NULL. - HttpConfigData->AccessPoint.IPv4Node or - HttpConfigData->AccessPoint.IPv6Node is NULL. - @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HTTP_GET_MODE_DATA)( - IN EFI_HTTP_PROTOCOL *This, - OUT EFI_HTTP_CONFIG_DATA *HttpConfigData - ); - -/** - Initialize or brutally reset the operational parameters for this EFI HTTP instance. - - The Configure() function does the following: - When HttpConfigData is not NULL Initialize this EFI HTTP instance by configuring - timeout, local address, port, etc. - When HttpConfigData is NULL, reset this EFI HTTP instance by closing all active - connections with remote hosts, canceling all asynchronous tokens, and flush request - and response buffers without informing the appropriate hosts. - - No other EFI HTTP function can be executed by this instance until the Configure() - function is executed and returns successfully. - - @param[in] This Pointer to EFI_HTTP_PROTOCOL instance. - @param[in] HttpConfigData Pointer to the configure data to configure the instance. - - @retval EFI_SUCCESS Operation succeeded. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - This is NULL. - HttpConfigData->LocalAddressIsIPv6 is FALSE and - HttpConfigData->AccessPoint.IPv4Node is NULL. - HttpConfigData->LocalAddressIsIPv6 is TRUE and - HttpConfigData->AccessPoint.IPv6Node is NULL. - @retval EFI_ALREADY_STARTED Reinitialize this HTTP instance without calling - Configure() with NULL to reset it. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources when - executing Configure(). - @retval EFI_UNSUPPORTED One or more options in ConfigData are not supported - in the implementation. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HTTP_CONFIGURE)( - IN EFI_HTTP_PROTOCOL *This, - IN EFI_HTTP_CONFIG_DATA *HttpConfigData OPTIONAL - ); - -/** - The Request() function queues an HTTP request to this HTTP instance, - similar to Transmit() function in the EFI TCP driver. When the HTTP request is sent - successfully, or if there is an error, Status in token will be updated and Event will - be signaled. - - @param[in] This Pointer to EFI_HTTP_PROTOCOL instance. - @param[in] Token Pointer to storage containing HTTP request token. - - @retval EFI_SUCCESS Outgoing data was processed. - @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_TIMEOUT Data was dropped out of the transmit or receive queue. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - This is NULL. - Token is NULL. - Token->Message is NULL. - Token->Message->Body is not NULL, - Token->Message->BodyLength is non-zero, and - Token->Message->Data is NULL, but a previous call to - Request()has not been completed successfully. - @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources. - @retval EFI_UNSUPPORTED The HTTP method is not supported in current implementation. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HTTP_REQUEST) ( - IN EFI_HTTP_PROTOCOL *This, - IN EFI_HTTP_TOKEN *Token - ); - -/** - Abort an asynchronous HTTP request or response token. - - The Cancel() function aborts a pending HTTP request or response transaction. If - Token is not NULL and the token is in transmit or receive queues when it is being - cancelled, its Token->Status will be set to EFI_ABORTED and then Token->Event will - be signaled. If the token is not in one of the queues, which usually means that the - asynchronous operation has completed, EFI_NOT_FOUND is returned. If Token is NULL, - all asynchronous tokens issued by Request() or Response() will be aborted. - - @param[in] This Pointer to EFI_HTTP_PROTOCOL instance. - @param[in] Token Point to storage containing HTTP request or response - token. - - @retval EFI_SUCCESS Request and Response queues are successfully flushed. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_STARTED This instance hasn't been configured. - @retval EFI_NOT_FOUND The asynchronous request or response token is not - found. - @retval EFI_UNSUPPORTED The implementation does not support this function. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HTTP_CANCEL)( - IN EFI_HTTP_PROTOCOL *This, - IN EFI_HTTP_TOKEN *Token - ); - -/** - The Response() function queues an HTTP response to this HTTP instance, similar to - Receive() function in the EFI TCP driver. When the HTTP Response is received successfully, - or if there is an error, Status in token will be updated and Event will be signaled. - - The HTTP driver will queue a receive token to the underlying TCP instance. When data - is received in the underlying TCP instance, the data will be parsed and Token will - be populated with the response data. If the data received from the remote host - contains an incomplete or invalid HTTP header, the HTTP driver will continue waiting - (asynchronously) for more data to be sent from the remote host before signaling - Event in Token. - - It is the responsibility of the caller to allocate a buffer for Body and specify the - size in BodyLength. If the remote host provides a response that contains a content - body, up to BodyLength bytes will be copied from the receive buffer into Body and - BodyLength will be updated with the amount of bytes received and copied to Body. This - allows the client to download a large file in chunks instead of into one contiguous - block of memory. Similar to HTTP request, if Body is not NULL and BodyLength is - non-zero and all other fields are NULL or 0, the HTTP driver will queue a receive - token to underlying TCP instance. If data arrives in the receive buffer, up to - BodyLength bytes of data will be copied to Body. The HTTP driver will then update - BodyLength with the amount of bytes received and copied to Body. - - If the HTTP driver does not have an open underlying TCP connection with the host - specified in the response URL, Request() will return EFI_ACCESS_DENIED. This is - consistent with RFC 2616 recommendation that HTTP clients should attempt to maintain - an open TCP connection between client and host. - - @param[in] This Pointer to EFI_HTTP_PROTOCOL instance. - @param[in] Token Pointer to storage containing HTTP response token. - - @retval EFI_SUCCESS Allocation succeeded. - @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been - initialized. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - This is NULL. - Token is NULL. - Token->Message->Headers is NULL. - Token->Message is NULL. - Token->Message->Body is not NULL, - Token->Message->BodyLength is non-zero, and - Token->Message->Data is NULL, but a previous call to - Response() has not been completed successfully. - @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources. - @retval EFI_ACCESS_DENIED An open TCP connection is not present with the host - specified by response URL. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HTTP_RESPONSE) ( - IN EFI_HTTP_PROTOCOL *This, - IN EFI_HTTP_TOKEN *Token - ); - -/** - The Poll() function can be used by network drivers and applications to increase the - rate that data packets are moved between the communication devices and the transmit - and receive queues. - - In some systems, the periodic timer event in the managed network driver may not poll - the underlying communications device fast enough to transmit and/or receive all data - packets without missing incoming packets or dropping outgoing packets. Drivers and - applications that are experiencing packet loss should try calling the Poll() function - more often. - - @param[in] This Pointer to EFI_HTTP_PROTOCOL instance. - - @retval EFI_SUCCESS Incoming or outgoing data was processed.. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_READY No incoming or outgoing data is processed. - @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HTTP_POLL) ( - IN EFI_HTTP_PROTOCOL *This - ); - -/// -/// The EFI HTTP protocol is designed to be used by EFI drivers and applications to *** 7491 LINES SKIPPED *** From nobody Sun Nov 16 18:29:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8fXj3hMbz6GsQh; Sun, 16 Nov 2025 18:29: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8fXj1b3sz43G4; Sun, 16 Nov 2025 18:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qamj1d+mI7niSQZHRZevUnqE2dGe8aRnMo/KiLoiKIA=; b=QYIRn+1TdyaurRRV6MRpi0XazhUcQz7TcKqLV1pfqId3ZoLdqEefVb7xt/dVGLOT+jbBiv qVfruhQcbXs4hHY09ZoV3kAZKmY6x40ujvllp+boh5ld8t8JaIK+PuGAvaiJ1VaPpqjeE7 ub0qJuyvW2NCI5+f0yi8ILrpX22VavrLJeDxCqx59apsKgvQvXxIL97d3OZ2WvQ2dqrcnH ZN/nnLl86ZyMFVmliQX2QYIx8z4ZK8nL/cLY7426ZW/KRAzuDkFqi/gyC4UKdzkJYC328O q3SfI6hhzUa/CM41lZpblfzfTkMdZD85QKDSHlVpFzYUtI8bbeEm0hb665GtgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763317749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qamj1d+mI7niSQZHRZevUnqE2dGe8aRnMo/KiLoiKIA=; b=wUHN9sBrWrUsKpBkOIZ/SVTMWsjDtNq7H9F767FIsJVlHP11AF4YTY5hiM+uCnk659J54q u+JZZItQvqeQvRL+0t5XtfKvnRnl3OR1S2GThgg4dbwhgdDLFq15soI6Zg87BgKF2CFDS/ xqif/AZ+7hGezWwR2uLEhO/rTMa/KKyL+5tzMV0iQeM2mmbGE+KTZoQRzMG+MjXWrf2vdl /4H9eOes87lz65JuNACxLogGUc8StOD2rOXIj/nD6J1uVutBdPECEySnd6SUR94HLcLMTV bybKtEfrElPaZ4zDk2bGBR8EpmzbYxqWulQH6Gd+BfUyD2WeRRKDJfAfzyZqAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763317749; a=rsa-sha256; cv=none; b=QtbzWttZYQa+TPampGalnEOQYlndlZX8+eqhWlNE1WM9vAZUSFl6hqVQTqCyOhig7xXCEh GzfcK35muDtwl/XnB7EwpXHUQjwpW4zxIFoqgfQU6LBr3jgfwpDf8IBmoLzUmzMPbw58LM cDteMns518FqAfV9mjalNTWVG8kJJmjUbN/aCMkr3NWZsy5CdZKnPRd6oCCjYavf5Z4rRl 5MP+Lx1XaUps7xBna9ILgfyxBnS1W7PqLOLulcLBscfrSphdh+B76xQq6D08Q3I4vIzIov YvzkYsQsy81pn0Qa4xG5BSY0rzuTldWUatmPx/kc11Fi1a9TjgFQZyzAnEg3JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8fXj0yPPzqXr; Sun, 16 Nov 2025 18:29: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 5AGIT90v008134; Sun, 16 Nov 2025 18:29:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGIT9vU008131; Sun, 16 Nov 2025 18:29:09 GMT (envelope-from git) Date: Sun, 16 Nov 2025 18:29:09 GMT Message-Id: <202511161829.5AGIT9vU008131@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: 1aa241b4ee65 - main - tpm20: Bring in the edk2 includes for TPM 2.0 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: 1aa241b4ee657b8a62a0d86b91f82cf792f08dca Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1aa241b4ee657b8a62a0d86b91f82cf792f08dca commit 1aa241b4ee657b8a62a0d86b91f82cf792f08dca Author: Warner Losh AuthorDate: 2025-11-16 17:36:43 +0000 Commit: Warner Losh CommitDate: 2025-11-16 18:29:04 +0000 tpm20: Bring in the edk2 includes for TPM 2.0 support Bring these in from edk2-stable202502. They will be used in a forthcoming TPM 2.0 support code. Sponsored by: Netflix --- sys/contrib/edk2/Include/IndustryStandard/Tpm12.h | 2165 ++++++++++++++++++++ sys/contrib/edk2/Include/IndustryStandard/Tpm20.h | 1813 ++++++++++++++++ .../Include/IndustryStandard/UefiTcgPlatform.h | 722 +++++++ sys/contrib/edk2/Include/Protocol/Tcg2Protocol.h | 335 +++ 4 files changed, 5035 insertions(+) diff --git a/sys/contrib/edk2/Include/IndustryStandard/Tpm12.h b/sys/contrib/edk2/Include/IndustryStandard/Tpm12.h new file mode 100644 index 000000000000..0435bebe8e18 --- /dev/null +++ b/sys/contrib/edk2/Include/IndustryStandard/Tpm12.h @@ -0,0 +1,2165 @@ +/** @file + TPM Specification data structures (TCG TPM Specification Version 1.2 Revision 103) + See http://trustedcomputinggroup.org for latest specification updates + + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef _TPM12_H_ +#define _TPM12_H_ + +/// +/// The start of TPM return codes +/// +#define TPM_BASE 0 + +// +// All structures MUST be packed on a byte boundary. +// + +#pragma pack (1) + +// +// Part 2, section 2.2.3: Helper redefinitions +// +/// +/// Indicates the conditions where it is required that authorization be presented +/// +typedef UINT8 TPM_AUTH_DATA_USAGE; +/// +/// The information as to what the payload is in an encrypted structure +/// +typedef UINT8 TPM_PAYLOAD_TYPE; +/// +/// The version info breakdown +/// +typedef UINT8 TPM_VERSION_BYTE; +/// +/// The state of the dictionary attack mitigation logic +/// +typedef UINT8 TPM_DA_STATE; +/// +/// The request or response authorization type +/// +typedef UINT16 TPM_TAG; +/// +/// The protocol in use +/// +typedef UINT16 TPM_PROTOCOL_ID; +/// +/// Indicates the start state +/// +typedef UINT16 TPM_STARTUP_TYPE; +/// +/// The definition of the encryption scheme +/// +typedef UINT16 TPM_ENC_SCHEME; +/// +/// The definition of the signature scheme +/// +typedef UINT16 TPM_SIG_SCHEME; +/// +/// The definition of the migration scheme +/// +typedef UINT16 TPM_MIGRATE_SCHEME; +/// +/// Sets the state of the physical presence mechanism +/// +typedef UINT16 TPM_PHYSICAL_PRESENCE; +/// +/// Indicates the types of entity that are supported by the TPM +/// +typedef UINT16 TPM_ENTITY_TYPE; +/// +/// Indicates the permitted usage of the key +/// +typedef UINT16 TPM_KEY_USAGE; +/// +/// The type of asymmetric encrypted structure in use by the endorsement key +/// +typedef UINT16 TPM_EK_TYPE; +/// +/// The tag for the structure +/// +typedef UINT16 TPM_STRUCTURE_TAG; +/// +/// The platform specific spec to which the information relates to +/// +typedef UINT16 TPM_PLATFORM_SPECIFIC; +/// +/// The command ordinal +/// +typedef UINT32 TPM_COMMAND_CODE; +/// +/// Identifies a TPM capability area +/// +typedef UINT32 TPM_CAPABILITY_AREA; +/// +/// Indicates information regarding a key +/// +typedef UINT32 TPM_KEY_FLAGS; +/// +/// Indicates the type of algorithm +/// +typedef UINT32 TPM_ALGORITHM_ID; +/// +/// The locality modifier +/// +typedef UINT32 TPM_MODIFIER_INDICATOR; +/// +/// The actual number of a counter +/// +typedef UINT32 TPM_ACTUAL_COUNT; +/// +/// Attributes that define what options are in use for a transport session +/// +typedef UINT32 TPM_TRANSPORT_ATTRIBUTES; +/// +/// Handle to an authorization session +/// +typedef UINT32 TPM_AUTHHANDLE; +/// +/// Index to a DIR register +/// +typedef UINT32 TPM_DIRINDEX; +/// +/// The area where a key is held assigned by the TPM +/// +typedef UINT32 TPM_KEY_HANDLE; +/// +/// Index to a PCR register +/// +typedef UINT32 TPM_PCRINDEX; +/// +/// The return code from a function +/// +typedef UINT32 TPM_RESULT; +/// +/// The types of resources that a TPM may have using internal resources +/// +typedef UINT32 TPM_RESOURCE_TYPE; +/// +/// Allows for controlling of the key when loaded and how to handle TPM_Startup issues +/// +typedef UINT32 TPM_KEY_CONTROL; +/// +/// The index into the NV storage area +/// +typedef UINT32 TPM_NV_INDEX; +/// +/// The family ID. Family IDs are automatically assigned a sequence number by the TPM. +/// A trusted process can set the FamilyID value in an individual row to NULL, which +/// invalidates that row. The family ID resets to NULL on each change of TPM Owner. +/// +typedef UINT32 TPM_FAMILY_ID; +/// +/// IA value used as a label for the most recent verification of this family. Set to zero when not in use. +/// +typedef UINT32 TPM_FAMILY_VERIFICATION; +/// +/// How the TPM handles var +/// +typedef UINT32 TPM_STARTUP_EFFECTS; +/// +/// The mode of a symmetric encryption +/// +typedef UINT32 TPM_SYM_MODE; +/// +/// The family flags +/// +typedef UINT32 TPM_FAMILY_FLAGS; +/// +/// The index value for the delegate NV table +/// +typedef UINT32 TPM_DELEGATE_INDEX; +/// +/// The restrictions placed on delegation of CMK commands +/// +typedef UINT32 TPM_CMK_DELEGATE; +/// +/// The ID value of a monotonic counter +/// +typedef UINT32 TPM_COUNT_ID; +/// +/// A command to execute +/// +typedef UINT32 TPM_REDIT_COMMAND; +/// +/// A transport session handle +/// +typedef UINT32 TPM_TRANSHANDLE; +/// +/// A generic handle could be key, transport etc +/// +typedef UINT32 TPM_HANDLE; +/// +/// What operation is happening +/// +typedef UINT32 TPM_FAMILY_OPERATION; + +// +// Part 2, section 2.2.4: Vendor specific +// The following defines allow for the quick specification of a +// vendor specific item. +// +#define TPM_Vendor_Specific32 ((UINT32) 0x00000400) +#define TPM_Vendor_Specific8 ((UINT8) 0x80) + +// +// Part 2, section 3.1: TPM_STRUCTURE_TAG +// +#define TPM_TAG_CONTEXTBLOB ((TPM_STRUCTURE_TAG) 0x0001) +#define TPM_TAG_CONTEXT_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0002) +#define TPM_TAG_CONTEXTPOINTER ((TPM_STRUCTURE_TAG) 0x0003) +#define TPM_TAG_CONTEXTLIST ((TPM_STRUCTURE_TAG) 0x0004) +#define TPM_TAG_SIGNINFO ((TPM_STRUCTURE_TAG) 0x0005) +#define TPM_TAG_PCR_INFO_LONG ((TPM_STRUCTURE_TAG) 0x0006) +#define TPM_TAG_PERSISTENT_FLAGS ((TPM_STRUCTURE_TAG) 0x0007) +#define TPM_TAG_VOLATILE_FLAGS ((TPM_STRUCTURE_TAG) 0x0008) +#define TPM_TAG_PERSISTENT_DATA ((TPM_STRUCTURE_TAG) 0x0009) +#define TPM_TAG_VOLATILE_DATA ((TPM_STRUCTURE_TAG) 0x000A) +#define TPM_TAG_SV_DATA ((TPM_STRUCTURE_TAG) 0x000B) +#define TPM_TAG_EK_BLOB ((TPM_STRUCTURE_TAG) 0x000C) +#define TPM_TAG_EK_BLOB_AUTH ((TPM_STRUCTURE_TAG) 0x000D) +#define TPM_TAG_COUNTER_VALUE ((TPM_STRUCTURE_TAG) 0x000E) +#define TPM_TAG_TRANSPORT_INTERNAL ((TPM_STRUCTURE_TAG) 0x000F) +#define TPM_TAG_TRANSPORT_LOG_IN ((TPM_STRUCTURE_TAG) 0x0010) +#define TPM_TAG_TRANSPORT_LOG_OUT ((TPM_STRUCTURE_TAG) 0x0011) +#define TPM_TAG_AUDIT_EVENT_IN ((TPM_STRUCTURE_TAG) 0x0012) +#define TPM_TAG_AUDIT_EVENT_OUT ((TPM_STRUCTURE_TAG) 0x0013) +#define TPM_TAG_CURRENT_TICKS ((TPM_STRUCTURE_TAG) 0x0014) +#define TPM_TAG_KEY ((TPM_STRUCTURE_TAG) 0x0015) +#define TPM_TAG_STORED_DATA12 ((TPM_STRUCTURE_TAG) 0x0016) +#define TPM_TAG_NV_ATTRIBUTES ((TPM_STRUCTURE_TAG) 0x0017) +#define TPM_TAG_NV_DATA_PUBLIC ((TPM_STRUCTURE_TAG) 0x0018) +#define TPM_TAG_NV_DATA_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0019) +#define TPM_TAG_DELEGATIONS ((TPM_STRUCTURE_TAG) 0x001A) +#define TPM_TAG_DELEGATE_PUBLIC ((TPM_STRUCTURE_TAG) 0x001B) +#define TPM_TAG_DELEGATE_TABLE_ROW ((TPM_STRUCTURE_TAG) 0x001C) +#define TPM_TAG_TRANSPORT_AUTH ((TPM_STRUCTURE_TAG) 0x001D) +#define TPM_TAG_TRANSPORT_PUBLIC ((TPM_STRUCTURE_TAG) 0x001E) +#define TPM_TAG_PERMANENT_FLAGS ((TPM_STRUCTURE_TAG) 0x001F) +#define TPM_TAG_STCLEAR_FLAGS ((TPM_STRUCTURE_TAG) 0x0020) +#define TPM_TAG_STANY_FLAGS ((TPM_STRUCTURE_TAG) 0x0021) +#define TPM_TAG_PERMANENT_DATA ((TPM_STRUCTURE_TAG) 0x0022) +#define TPM_TAG_STCLEAR_DATA ((TPM_STRUCTURE_TAG) 0x0023) +#define TPM_TAG_STANY_DATA ((TPM_STRUCTURE_TAG) 0x0024) +#define TPM_TAG_FAMILY_TABLE_ENTRY ((TPM_STRUCTURE_TAG) 0x0025) +#define TPM_TAG_DELEGATE_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0026) +#define TPM_TAG_DELG_KEY_BLOB ((TPM_STRUCTURE_TAG) 0x0027) +#define TPM_TAG_KEY12 ((TPM_STRUCTURE_TAG) 0x0028) +#define TPM_TAG_CERTIFY_INFO2 ((TPM_STRUCTURE_TAG) 0x0029) +#define TPM_TAG_DELEGATE_OWNER_BLOB ((TPM_STRUCTURE_TAG) 0x002A) +#define TPM_TAG_EK_BLOB_ACTIVATE ((TPM_STRUCTURE_TAG) 0x002B) +#define TPM_TAG_DAA_BLOB ((TPM_STRUCTURE_TAG) 0x002C) +#define TPM_TAG_DAA_CONTEXT ((TPM_STRUCTURE_TAG) 0x002D) +#define TPM_TAG_DAA_ENFORCE ((TPM_STRUCTURE_TAG) 0x002E) +#define TPM_TAG_DAA_ISSUER ((TPM_STRUCTURE_TAG) 0x002F) +#define TPM_TAG_CAP_VERSION_INFO ((TPM_STRUCTURE_TAG) 0x0030) +#define TPM_TAG_DAA_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0031) +#define TPM_TAG_DAA_TPM ((TPM_STRUCTURE_TAG) 0x0032) +#define TPM_TAG_CMK_MIGAUTH ((TPM_STRUCTURE_TAG) 0x0033) +#define TPM_TAG_CMK_SIGTICKET ((TPM_STRUCTURE_TAG) 0x0034) +#define TPM_TAG_CMK_MA_APPROVAL ((TPM_STRUCTURE_TAG) 0x0035) +#define TPM_TAG_QUOTE_INFO2 ((TPM_STRUCTURE_TAG) 0x0036) +#define TPM_TAG_DA_INFO ((TPM_STRUCTURE_TAG) 0x0037) +#define TPM_TAG_DA_LIMITED ((TPM_STRUCTURE_TAG) 0x0038) +#define TPM_TAG_DA_ACTION_TYPE ((TPM_STRUCTURE_TAG) 0x0039) + +// +// Part 2, section 4: TPM Types +// + +// +// Part 2, section 4.1: TPM_RESOURCE_TYPE +// +#define TPM_RT_KEY ((TPM_RESOURCE_TYPE) 0x00000001) ///< The handle is a key handle and is the result of a LoadKey type operation +#define TPM_RT_AUTH ((TPM_RESOURCE_TYPE) 0x00000002) ///< The handle is an authorization handle. Auth handles come from TPM_OIAP, TPM_OSAP and TPM_DSAP +#define TPM_RT_HASH ((TPM_RESOURCE_TYPE) 0x00000003) ///< Reserved for hashes +#define TPM_RT_TRANS ((TPM_RESOURCE_TYPE) 0x00000004) ///< The handle is for a transport session. Transport handles come from TPM_EstablishTransport +#define TPM_RT_CONTEXT ((TPM_RESOURCE_TYPE) 0x00000005) ///< Resource wrapped and held outside the TPM using the context save/restore commands +#define TPM_RT_COUNTER ((TPM_RESOURCE_TYPE) 0x00000006) ///< Reserved for counters +#define TPM_RT_DELEGATE ((TPM_RESOURCE_TYPE) 0x00000007) ///< The handle is for a delegate row. These are the internal rows held in NV storage by the TPM +#define TPM_RT_DAA_TPM ((TPM_RESOURCE_TYPE) 0x00000008) ///< The value is a DAA TPM specific blob +#define TPM_RT_DAA_V0 ((TPM_RESOURCE_TYPE) 0x00000009) ///< The value is a DAA V0 parameter +#define TPM_RT_DAA_V1 ((TPM_RESOURCE_TYPE) 0x0000000A) ///< The value is a DAA V1 parameter + +// +// Part 2, section 4.2: TPM_PAYLOAD_TYPE +// +#define TPM_PT_ASYM ((TPM_PAYLOAD_TYPE) 0x01) ///< The entity is an asymmetric key +#define TPM_PT_BIND ((TPM_PAYLOAD_TYPE) 0x02) ///< The entity is bound data +#define TPM_PT_MIGRATE ((TPM_PAYLOAD_TYPE) 0x03) ///< The entity is a migration blob +#define TPM_PT_MAINT ((TPM_PAYLOAD_TYPE) 0x04) ///< The entity is a maintenance blob +#define TPM_PT_SEAL ((TPM_PAYLOAD_TYPE) 0x05) ///< The entity is sealed data +#define TPM_PT_MIGRATE_RESTRICTED ((TPM_PAYLOAD_TYPE) 0x06) ///< The entity is a restricted-migration asymmetric key +#define TPM_PT_MIGRATE_EXTERNAL ((TPM_PAYLOAD_TYPE) 0x07) ///< The entity is a external migratable key +#define TPM_PT_CMK_MIGRATE ((TPM_PAYLOAD_TYPE) 0x08) ///< The entity is a CMK migratable blob +#define TPM_PT_VENDOR_SPECIFIC ((TPM_PAYLOAD_TYPE) 0x80) ///< 0x80 - 0xFF Vendor specific payloads + +// +// Part 2, section 4.3: TPM_ENTITY_TYPE +// +#define TPM_ET_KEYHANDLE ((UINT16) 0x0001) ///< The entity is a keyHandle or key +#define TPM_ET_OWNER ((UINT16) 0x0002) ///< The entity is the TPM Owner +#define TPM_ET_DATA ((UINT16) 0x0003) ///< The entity is some data +#define TPM_ET_SRK ((UINT16) 0x0004) ///< The entity is the SRK +#define TPM_ET_KEY ((UINT16) 0x0005) ///< The entity is a key or keyHandle +#define TPM_ET_REVOKE ((UINT16) 0x0006) ///< The entity is the RevokeTrust value +#define TPM_ET_DEL_OWNER_BLOB ((UINT16) 0x0007) ///< The entity is a delegate owner blob +#define TPM_ET_DEL_ROW ((UINT16) 0x0008) ///< The entity is a delegate row +#define TPM_ET_DEL_KEY_BLOB ((UINT16) 0x0009) ///< The entity is a delegate key blob +#define TPM_ET_COUNTER ((UINT16) 0x000A) ///< The entity is a counter +#define TPM_ET_NV ((UINT16) 0x000B) ///< The entity is a NV index +#define TPM_ET_OPERATOR ((UINT16) 0x000C) ///< The entity is the operator +#define TPM_ET_RESERVED_HANDLE ((UINT16) 0x0040) ///< Reserved. This value avoids collisions with the handle MSB setting. +// +// TPM_ENTITY_TYPE MSB Values: The MSB is used to indicate the ADIP encryption sheme when applicable +// +#define TPM_ET_XOR ((UINT16) 0x0000) ///< ADIP encryption scheme: XOR +#define TPM_ET_AES128 ((UINT16) 0x0006) ///< ADIP encryption scheme: AES 128 bits + +// +// Part 2, section 4.4.1: Reserved Key Handles +// +#define TPM_KH_SRK ((TPM_KEY_HANDLE) 0x40000000) ///< The handle points to the SRK +#define TPM_KH_OWNER ((TPM_KEY_HANDLE) 0x40000001) ///< The handle points to the TPM Owner +#define TPM_KH_REVOKE ((TPM_KEY_HANDLE) 0x40000002) ///< The handle points to the RevokeTrust value +#define TPM_KH_TRANSPORT ((TPM_KEY_HANDLE) 0x40000003) ///< The handle points to the EstablishTransport static authorization +#define TPM_KH_OPERATOR ((TPM_KEY_HANDLE) 0x40000004) ///< The handle points to the Operator auth +#define TPM_KH_ADMIN ((TPM_KEY_HANDLE) 0x40000005) ///< The handle points to the delegation administration auth +#define TPM_KH_EK ((TPM_KEY_HANDLE) 0x40000006) ///< The handle points to the PUBEK, only usable with TPM_OwnerReadInternalPub + +// +// Part 2, section 4.5: TPM_STARTUP_TYPE +// +#define TPM_ST_CLEAR ((TPM_STARTUP_TYPE) 0x0001) ///< The TPM is starting up from a clean state +#define TPM_ST_STATE ((TPM_STARTUP_TYPE) 0x0002) ///< The TPM is starting up from a saved state +#define TPM_ST_DEACTIVATED ((TPM_STARTUP_TYPE) 0x0003) ///< The TPM is to startup and set the deactivated flag to TRUE + +// +// Part 2, section 4.6: TPM_STATUP_EFFECTS +// The table makeup is still an open issue. +// + +// +// Part 2, section 4.7: TPM_PROTOCOL_ID +// +#define TPM_PID_OIAP ((TPM_PROTOCOL_ID) 0x0001) ///< The OIAP protocol. +#define TPM_PID_OSAP ((TPM_PROTOCOL_ID) 0x0002) ///< The OSAP protocol. +#define TPM_PID_ADIP ((TPM_PROTOCOL_ID) 0x0003) ///< The ADIP protocol. +#define TPM_PID_ADCP ((TPM_PROTOCOL_ID) 0x0004) ///< The ADCP protocol. +#define TPM_PID_OWNER ((TPM_PROTOCOL_ID) 0x0005) ///< The protocol for taking ownership of a TPM. +#define TPM_PID_DSAP ((TPM_PROTOCOL_ID) 0x0006) ///< The DSAP protocol +#define TPM_PID_TRANSPORT ((TPM_PROTOCOL_ID) 0x0007) ///< The transport protocol + +// +// Part 2, section 4.8: TPM_ALGORITHM_ID +// The TPM MUST support the algorithms TPM_ALG_RSA, TPM_ALG_SHA, TPM_ALG_HMAC, +// TPM_ALG_MGF1 +// +#define TPM_ALG_RSA ((TPM_ALGORITHM_ID) 0x00000001) ///< The RSA algorithm. +#define TPM_ALG_DES ((TPM_ALGORITHM_ID) 0x00000002) ///< The DES algorithm +#define TPM_ALG_3DES ((TPM_ALGORITHM_ID) 0x00000003) ///< The 3DES algorithm in EDE mode +#define TPM_ALG_SHA ((TPM_ALGORITHM_ID) 0x00000004) ///< The SHA1 algorithm +#define TPM_ALG_HMAC ((TPM_ALGORITHM_ID) 0x00000005) ///< The RFC 2104 HMAC algorithm +#define TPM_ALG_AES128 ((TPM_ALGORITHM_ID) 0x00000006) ///< The AES algorithm, key size 128 +#define TPM_ALG_MGF1 ((TPM_ALGORITHM_ID) 0x00000007) ///< The XOR algorithm using MGF1 to create a string the size of the encrypted block +#define TPM_ALG_AES192 ((TPM_ALGORITHM_ID) 0x00000008) ///< AES, key size 192 +#define TPM_ALG_AES256 ((TPM_ALGORITHM_ID) 0x00000009) ///< AES, key size 256 +#define TPM_ALG_XOR ((TPM_ALGORITHM_ID) 0x0000000A) ///< XOR using the rolling nonces + +// +// Part 2, section 4.9: TPM_PHYSICAL_PRESENCE +// +#define TPM_PHYSICAL_PRESENCE_HW_DISABLE ((TPM_PHYSICAL_PRESENCE) 0x0200) ///< Sets the physicalPresenceHWEnable to FALSE +#define TPM_PHYSICAL_PRESENCE_CMD_DISABLE ((TPM_PHYSICAL_PRESENCE) 0x0100) ///< Sets the physicalPresenceCMDEnable to FALSE +#define TPM_PHYSICAL_PRESENCE_LIFETIME_LOCK ((TPM_PHYSICAL_PRESENCE) 0x0080) ///< Sets the physicalPresenceLifetimeLock to TRUE +#define TPM_PHYSICAL_PRESENCE_HW_ENABLE ((TPM_PHYSICAL_PRESENCE) 0x0040) ///< Sets the physicalPresenceHWEnable to TRUE +#define TPM_PHYSICAL_PRESENCE_CMD_ENABLE ((TPM_PHYSICAL_PRESENCE) 0x0020) ///< Sets the physicalPresenceCMDEnable to TRUE +#define TPM_PHYSICAL_PRESENCE_NOTPRESENT ((TPM_PHYSICAL_PRESENCE) 0x0010) ///< Sets PhysicalPresence = FALSE +#define TPM_PHYSICAL_PRESENCE_PRESENT ((TPM_PHYSICAL_PRESENCE) 0x0008) ///< Sets PhysicalPresence = TRUE +#define TPM_PHYSICAL_PRESENCE_LOCK ((TPM_PHYSICAL_PRESENCE) 0x0004) ///< Sets PhysicalPresenceLock = TRUE + +// +// Part 2, section 4.10: TPM_MIGRATE_SCHEME +// +#define TPM_MS_MIGRATE ((TPM_MIGRATE_SCHEME) 0x0001) ///< A public key that can be used with all TPM migration commands other than 'ReWrap' mode. +#define TPM_MS_REWRAP ((TPM_MIGRATE_SCHEME) 0x0002) ///< A public key that can be used for the ReWrap mode of TPM_CreateMigrationBlob. +#define TPM_MS_MAINT ((TPM_MIGRATE_SCHEME) 0x0003) ///< A public key that can be used for the Maintenance commands +#define TPM_MS_RESTRICT_MIGRATE ((TPM_MIGRATE_SCHEME) 0x0004) ///< The key is to be migrated to a Migration Authority. +#define TPM_MS_RESTRICT_APPROVE_DOUBLE ((TPM_MIGRATE_SCHEME) 0x0005) ///< The key is to be migrated to an entity approved by a Migration Authority using double wrapping + +// +// Part 2, section 4.11: TPM_EK_TYPE +// +#define TPM_EK_TYPE_ACTIVATE ((TPM_EK_TYPE) 0x0001) ///< The blob MUST be TPM_EK_BLOB_ACTIVATE +#define TPM_EK_TYPE_AUTH ((TPM_EK_TYPE) 0x0002) ///< The blob MUST be TPM_EK_BLOB_AUTH + +// +// Part 2, section 4.12: TPM_PLATFORM_SPECIFIC +// +#define TPM_PS_PC_11 ((TPM_PLATFORM_SPECIFIC) 0x0001) ///< PC Specific version 1.1 +#define TPM_PS_PC_12 ((TPM_PLATFORM_SPECIFIC) 0x0002) ///< PC Specific version 1.2 +#define TPM_PS_PDA_12 ((TPM_PLATFORM_SPECIFIC) 0x0003) ///< PDA Specific version 1.2 +#define TPM_PS_Server_12 ((TPM_PLATFORM_SPECIFIC) 0x0004) ///< Server Specific version 1.2 +#define TPM_PS_Mobile_12 ((TPM_PLATFORM_SPECIFIC) 0x0005) ///< Mobil Specific version 1.2 + +// +// Part 2, section 5: Basic Structures +// + +/// +/// Part 2, section 5.1: TPM_STRUCT_VER +/// +typedef struct tdTPM_STRUCT_VER { + UINT8 major; + UINT8 minor; + UINT8 revMajor; + UINT8 revMinor; +} TPM_STRUCT_VER; + +/// +/// Part 2, section 5.3: TPM_VERSION +/// +typedef struct tdTPM_VERSION { + TPM_VERSION_BYTE major; + TPM_VERSION_BYTE minor; + UINT8 revMajor; + UINT8 revMinor; +} TPM_VERSION; + +#define TPM_SHA1_160_HASH_LEN 0x14 +#define TPM_SHA1BASED_NONCE_LEN TPM_SHA1_160_HASH_LEN + +/// +/// Part 2, section 5.4: TPM_DIGEST +/// +typedef struct tdTPM_DIGEST { + UINT8 digest[TPM_SHA1_160_HASH_LEN]; +} TPM_DIGEST; + +/// +/// This SHALL be the digest of the chosen identityLabel and privacyCA for a new TPM identity +/// +typedef TPM_DIGEST TPM_CHOSENID_HASH; +/// +/// This SHALL be the hash of a list of PCR indexes and PCR values that a key or data is bound to +/// +typedef TPM_DIGEST TPM_COMPOSITE_HASH; +/// +/// This SHALL be the value of a DIR register +/// +typedef TPM_DIGEST TPM_DIRVALUE; + +typedef TPM_DIGEST TPM_HMAC; +/// +/// The value inside of the PCR +/// +typedef TPM_DIGEST TPM_PCRVALUE; +/// +/// This SHALL be the value of the current internal audit state +/// +typedef TPM_DIGEST TPM_AUDITDIGEST; + +/// +/// Part 2, section 5.5: TPM_NONCE +/// +typedef struct tdTPM_NONCE { + UINT8 nonce[20]; +} TPM_NONCE; + +/// +/// This SHALL be a random value generated by a TPM immediately after the EK is installed +/// in that TPM, whenever an EK is installed in that TPM +/// +typedef TPM_NONCE TPM_DAA_TPM_SEED; +/// +/// This SHALL be a random value +/// +typedef TPM_NONCE TPM_DAA_CONTEXT_SEED; + +// +// Part 2, section 5.6: TPM_AUTHDATA +// +/// +/// The AuthData data is the information that is saved or passed to provide proof of ownership +/// 296 of an entity +/// +typedef UINT8 tdTPM_AUTHDATA[20]; + +typedef tdTPM_AUTHDATA TPM_AUTHDATA; +/// +/// A secret plaintext value used in the authorization process +/// +typedef TPM_AUTHDATA TPM_SECRET; +/// +/// A ciphertext (encrypted) version of AuthData data. The encryption mechanism depends on the context +/// +typedef TPM_AUTHDATA TPM_ENCAUTH; + +/// +/// Part 2, section 5.7: TPM_KEY_HANDLE_LIST +/// Size of handle is loaded * sizeof(TPM_KEY_HANDLE) +/// +typedef struct tdTPM_KEY_HANDLE_LIST { + UINT16 loaded; + TPM_KEY_HANDLE handle[1]; +} TPM_KEY_HANDLE_LIST; + +// +// Part 2, section 5.8: TPM_KEY_USAGE values +// +/// +/// TPM_KEY_SIGNING SHALL indicate a signing key. The [private] key SHALL be +/// used for signing operations, only. This means that it MUST be a leaf of the +/// Protected Storage key hierarchy. +/// +#define TPM_KEY_SIGNING ((UINT16) 0x0010) +/// +/// TPM_KEY_STORAGE SHALL indicate a storage key. The key SHALL be used to wrap +/// and unwrap other keys in the Protected Storage hierarchy +/// +#define TPM_KEY_STORAGE ((UINT16) 0x0011) +/// +/// TPM_KEY_IDENTITY SHALL indicate an identity key. The key SHALL be used for +/// operations that require a TPM identity, only. +/// +#define TPM_KEY_IDENTITY ((UINT16) 0x0012) +/// +/// TPM_KEY_AUTHCHANGE SHALL indicate an ephemeral key that is in use during +/// the ChangeAuthAsym process, only. +/// +#define TPM_KEY_AUTHCHANGE ((UINT16) 0x0013) +/// +/// TPM_KEY_BIND SHALL indicate a key that can be used for TPM_Bind and +/// TPM_Unbind operations only. +/// +#define TPM_KEY_BIND ((UINT16) 0x0014) +/// +/// TPM_KEY_LEGACY SHALL indicate a key that can perform signing and binding +/// operations. The key MAY be used for both signing and binding operations. +/// The TPM_KEY_LEGACY key type is to allow for use by applications where both +/// signing and encryption operations occur with the same key. The use of this +/// key type is not recommended TPM_KEY_MIGRATE 0x0016 This SHALL indicate a +/// key in use for TPM_MigrateKey +/// +#define TPM_KEY_LEGACY ((UINT16) 0x0015) +/// +/// TPM_KEY_MIGRAGE SHALL indicate a key in use for TPM_MigrateKey +/// +#define TPM_KEY_MIGRATE ((UINT16) 0x0016) + +// +// Part 2, section 5.8.1: Mandatory Key Usage Schemes +// + +#define TPM_ES_NONE ((TPM_ENC_SCHEME) 0x0001) +#define TPM_ES_RSAESPKCSv15 ((TPM_ENC_SCHEME) 0x0002) +#define TPM_ES_RSAESOAEP_SHA1_MGF1 ((TPM_ENC_SCHEME) 0x0003) +#define TPM_ES_SYM_CNT ((TPM_ENC_SCHEME) 0x0004) ///< rev94 defined +#define TPM_ES_SYM_CTR ((TPM_ENC_SCHEME) 0x0004) +#define TPM_ES_SYM_OFB ((TPM_ENC_SCHEME) 0x0005) + +#define TPM_SS_NONE ((TPM_SIG_SCHEME) 0x0001) +#define TPM_SS_RSASSAPKCS1v15_SHA1 ((TPM_SIG_SCHEME) 0x0002) +#define TPM_SS_RSASSAPKCS1v15_DER ((TPM_SIG_SCHEME) 0x0003) +#define TPM_SS_RSASSAPKCS1v15_INFO ((TPM_SIG_SCHEME) 0x0004) + +// +// Part 2, section 5.9: TPM_AUTH_DATA_USAGE values +// +#define TPM_AUTH_NEVER ((TPM_AUTH_DATA_USAGE) 0x00) +#define TPM_AUTH_ALWAYS ((TPM_AUTH_DATA_USAGE) 0x01) +#define TPM_AUTH_PRIV_USE_ONLY ((TPM_AUTH_DATA_USAGE) 0x03) + +/// +/// Part 2, section 5.10: TPM_KEY_FLAGS +/// +typedef enum tdTPM_KEY_FLAGS { + redirection = 0x00000001, + migratable = 0x00000002, + isVolatile = 0x00000004, + pcrIgnoredOnRead = 0x00000008, + migrateAuthority = 0x00000010 +} TPM_KEY_FLAGS_BITS; + +/// +/// Part 2, section 5.11: TPM_CHANGEAUTH_VALIDATE +/// +typedef struct tdTPM_CHANGEAUTH_VALIDATE { + TPM_SECRET newAuthSecret; + TPM_NONCE n1; +} TPM_CHANGEAUTH_VALIDATE; + +/// +/// Part 2, section 5.12: TPM_MIGRATIONKEYAUTH +/// declared after section 10 to catch declaration of TPM_PUBKEY +/// +/// Part 2 section 10.1: TPM_KEY_PARMS +/// [size_is(parmSize)] BYTE* parms; +/// +typedef struct tdTPM_KEY_PARMS { + TPM_ALGORITHM_ID algorithmID; + TPM_ENC_SCHEME encScheme; + TPM_SIG_SCHEME sigScheme; + UINT32 parmSize; + UINT8 *parms; +} TPM_KEY_PARMS; + +/// +/// Part 2, section 10.4: TPM_STORE_PUBKEY +/// +typedef struct tdTPM_STORE_PUBKEY { + UINT32 keyLength; + UINT8 key[1]; +} TPM_STORE_PUBKEY; + +/// +/// Part 2, section 10.5: TPM_PUBKEY +/// +typedef struct tdTPM_PUBKEY { + TPM_KEY_PARMS algorithmParms; + TPM_STORE_PUBKEY pubKey; +} TPM_PUBKEY; + +/// +/// Part 2, section 5.12: TPM_MIGRATIONKEYAUTH +/// +typedef struct tdTPM_MIGRATIONKEYAUTH { + TPM_PUBKEY migrationKey; + TPM_MIGRATE_SCHEME migrationScheme; + TPM_DIGEST digest; +} TPM_MIGRATIONKEYAUTH; + +/// +/// Part 2, section 5.13: TPM_COUNTER_VALUE +/// +typedef struct tdTPM_COUNTER_VALUE { + TPM_STRUCTURE_TAG tag; + UINT8 label[4]; + TPM_ACTUAL_COUNT counter; +} TPM_COUNTER_VALUE; + +/// +/// Part 2, section 5.14: TPM_SIGN_INFO +/// Size of data indicated by dataLen +/// +typedef struct tdTPM_SIGN_INFO { + TPM_STRUCTURE_TAG tag; + UINT8 fixed[4]; + TPM_NONCE replay; + UINT32 dataLen; + UINT8 *data; +} TPM_SIGN_INFO; + +/// +/// Part 2, section 5.15: TPM_MSA_COMPOSITE +/// Number of migAuthDigest indicated by MSAlist +/// +typedef struct tdTPM_MSA_COMPOSITE { + UINT32 MSAlist; + TPM_DIGEST migAuthDigest[1]; +} TPM_MSA_COMPOSITE; + +/// +/// Part 2, section 5.16: TPM_CMK_AUTH +/// +typedef struct tdTPM_CMK_AUTH { + TPM_DIGEST migrationAuthorityDigest; + TPM_DIGEST destinationKeyDigest; + TPM_DIGEST sourceKeyDigest; +} TPM_CMK_AUTH; + +// +// Part 2, section 5.17: TPM_CMK_DELEGATE +// +#define TPM_CMK_DELEGATE_SIGNING ((TPM_CMK_DELEGATE) BIT31) +#define TPM_CMK_DELEGATE_STORAGE ((TPM_CMK_DELEGATE) BIT30) +#define TPM_CMK_DELEGATE_BIND ((TPM_CMK_DELEGATE) BIT29) +#define TPM_CMK_DELEGATE_LEGACY ((TPM_CMK_DELEGATE) BIT28) +#define TPM_CMK_DELEGATE_MIGRATE ((TPM_CMK_DELEGATE) BIT27) + +/// +/// Part 2, section 5.18: TPM_SELECT_SIZE +/// +typedef struct tdTPM_SELECT_SIZE { + UINT8 major; + UINT8 minor; + UINT16 reqSize; +} TPM_SELECT_SIZE; + +/// +/// Part 2, section 5,19: TPM_CMK_MIGAUTH +/// +typedef struct tdTPM_CMK_MIGAUTH { + TPM_STRUCTURE_TAG tag; + TPM_DIGEST msaDigest; + TPM_DIGEST pubKeyDigest; +} TPM_CMK_MIGAUTH; + +/// +/// Part 2, section 5.20: TPM_CMK_SIGTICKET +/// +typedef struct tdTPM_CMK_SIGTICKET { + TPM_STRUCTURE_TAG tag; + TPM_DIGEST verKeyDigest; + TPM_DIGEST signedData; +} TPM_CMK_SIGTICKET; + +/// +/// Part 2, section 5.21: TPM_CMK_MA_APPROVAL +/// +typedef struct tdTPM_CMK_MA_APPROVAL { + TPM_STRUCTURE_TAG tag; + TPM_DIGEST migrationAuthorityDigest; +} TPM_CMK_MA_APPROVAL; + +// +// Part 2, section 6: Command Tags +// +#define TPM_TAG_RQU_COMMAND ((TPM_STRUCTURE_TAG) 0x00C1) +#define TPM_TAG_RQU_AUTH1_COMMAND ((TPM_STRUCTURE_TAG) 0x00C2) +#define TPM_TAG_RQU_AUTH2_COMMAND ((TPM_STRUCTURE_TAG) 0x00C3) +#define TPM_TAG_RSP_COMMAND ((TPM_STRUCTURE_TAG) 0x00C4) +#define TPM_TAG_RSP_AUTH1_COMMAND ((TPM_STRUCTURE_TAG) 0x00C5) +#define TPM_TAG_RSP_AUTH2_COMMAND ((TPM_STRUCTURE_TAG) 0x00C6) + +/// +/// Part 2, section 7.1: TPM_PERMANENT_FLAGS +/// +typedef struct tdTPM_PERMANENT_FLAGS { + TPM_STRUCTURE_TAG tag; + BOOLEAN disable; + BOOLEAN ownership; + BOOLEAN deactivated; + BOOLEAN readPubek; + BOOLEAN disableOwnerClear; + BOOLEAN allowMaintenance; + BOOLEAN physicalPresenceLifetimeLock; + BOOLEAN physicalPresenceHWEnable; + BOOLEAN physicalPresenceCMDEnable; + BOOLEAN CEKPUsed; + BOOLEAN TPMpost; + BOOLEAN TPMpostLock; + BOOLEAN FIPS; + BOOLEAN operator_; + BOOLEAN enableRevokeEK; + BOOLEAN nvLocked; + BOOLEAN readSRKPub; + BOOLEAN tpmEstablished; + BOOLEAN maintenanceDone; + BOOLEAN disableFullDALogicInfo; +} TPM_PERMANENT_FLAGS; + +// +// Part 2, section 7.1.1: Flag Restrictions (of TPM_PERMANENT_FLAGS) +// +#define TPM_PF_DISABLE ((TPM_CAPABILITY_AREA) 1) +#define TPM_PF_OWNERSHIP ((TPM_CAPABILITY_AREA) 2) +#define TPM_PF_DEACTIVATED ((TPM_CAPABILITY_AREA) 3) +#define TPM_PF_READPUBEK ((TPM_CAPABILITY_AREA) 4) +#define TPM_PF_DISABLEOWNERCLEAR ((TPM_CAPABILITY_AREA) 5) +#define TPM_PF_ALLOWMAINTENANCE ((TPM_CAPABILITY_AREA) 6) +#define TPM_PF_PHYSICALPRESENCELIFETIMELOCK ((TPM_CAPABILITY_AREA) 7) +#define TPM_PF_PHYSICALPRESENCEHWENABLE ((TPM_CAPABILITY_AREA) 8) +#define TPM_PF_PHYSICALPRESENCECMDENABLE ((TPM_CAPABILITY_AREA) 9) +#define TPM_PF_CEKPUSED ((TPM_CAPABILITY_AREA) 10) +#define TPM_PF_TPMPOST ((TPM_CAPABILITY_AREA) 11) +#define TPM_PF_TPMPOSTLOCK ((TPM_CAPABILITY_AREA) 12) +#define TPM_PF_FIPS ((TPM_CAPABILITY_AREA) 13) +#define TPM_PF_OPERATOR ((TPM_CAPABILITY_AREA) 14) +#define TPM_PF_ENABLEREVOKEEK ((TPM_CAPABILITY_AREA) 15) +#define TPM_PF_NV_LOCKED ((TPM_CAPABILITY_AREA) 16) +#define TPM_PF_READSRKPUB ((TPM_CAPABILITY_AREA) 17) +#define TPM_PF_TPMESTABLISHED ((TPM_CAPABILITY_AREA) 18) +#define TPM_PF_MAINTENANCEDONE ((TPM_CAPABILITY_AREA) 19) +#define TPM_PF_DISABLEFULLDALOGICINFO ((TPM_CAPABILITY_AREA) 20) + +/// +/// Part 2, section 7.2: TPM_STCLEAR_FLAGS +/// +typedef struct tdTPM_STCLEAR_FLAGS { + TPM_STRUCTURE_TAG tag; + BOOLEAN deactivated; + BOOLEAN disableForceClear; + BOOLEAN physicalPresence; + BOOLEAN physicalPresenceLock; + BOOLEAN bGlobalLock; +} TPM_STCLEAR_FLAGS; + +// +// Part 2, section 7.2.1: Flag Restrictions (of TPM_STCLEAR_FLAGS) +// +#define TPM_SF_DEACTIVATED ((TPM_CAPABILITY_AREA) 1) +#define TPM_SF_DISABLEFORCECLEAR ((TPM_CAPABILITY_AREA) 2) +#define TPM_SF_PHYSICALPRESENCE ((TPM_CAPABILITY_AREA) 3) +#define TPM_SF_PHYSICALPRESENCELOCK ((TPM_CAPABILITY_AREA) 4) +#define TPM_SF_BGLOBALLOCK ((TPM_CAPABILITY_AREA) 5) + +/// +/// Part 2, section 7.3: TPM_STANY_FLAGS +/// +typedef struct tdTPM_STANY_FLAGS { + TPM_STRUCTURE_TAG tag; + BOOLEAN postInitialise; + TPM_MODIFIER_INDICATOR localityModifier; + BOOLEAN transportExclusive; + BOOLEAN TOSPresent; +} TPM_STANY_FLAGS; + +// +// Part 2, section 7.3.1: Flag Restrictions (of TPM_STANY_FLAGS) +// +#define TPM_AF_POSTINITIALISE ((TPM_CAPABILITY_AREA) 1) +#define TPM_AF_LOCALITYMODIFIER ((TPM_CAPABILITY_AREA) 2) +#define TPM_AF_TRANSPORTEXCLUSIVE ((TPM_CAPABILITY_AREA) 3) +#define TPM_AF_TOSPRESENT ((TPM_CAPABILITY_AREA) 4) + +// +// All those structures defined in section 7.4, 7.5, 7.6 are not normative and +// thus no definitions here +// +// Part 2, section 7.4: TPM_PERMANENT_DATA +// +#define TPM_MIN_COUNTERS 4 ///< the minimum number of counters is 4 +#define TPM_DELEGATE_KEY TPM_KEY +#define TPM_NUM_PCR 16 +#define TPM_MAX_NV_WRITE_NOOWNER 64 + +// +// Part 2, section 7.4.1: PERMANENT_DATA Subcap for SetCapability +// +#define TPM_PD_REVMAJOR ((TPM_CAPABILITY_AREA) 1) +#define TPM_PD_REVMINOR ((TPM_CAPABILITY_AREA) 2) +#define TPM_PD_TPMPROOF ((TPM_CAPABILITY_AREA) 3) +#define TPM_PD_OWNERAUTH ((TPM_CAPABILITY_AREA) 4) +#define TPM_PD_OPERATORAUTH ((TPM_CAPABILITY_AREA) 5) +#define TPM_PD_MANUMAINTPUB ((TPM_CAPABILITY_AREA) 6) +#define TPM_PD_ENDORSEMENTKEY ((TPM_CAPABILITY_AREA) 7) +#define TPM_PD_SRK ((TPM_CAPABILITY_AREA) 8) +#define TPM_PD_DELEGATEKEY ((TPM_CAPABILITY_AREA) 9) +#define TPM_PD_CONTEXTKEY ((TPM_CAPABILITY_AREA) 10) +#define TPM_PD_AUDITMONOTONICCOUNTER ((TPM_CAPABILITY_AREA) 11) +#define TPM_PD_MONOTONICCOUNTER ((TPM_CAPABILITY_AREA) 12) +#define TPM_PD_PCRATTRIB ((TPM_CAPABILITY_AREA) 13) +#define TPM_PD_ORDINALAUDITSTATUS ((TPM_CAPABILITY_AREA) 14) +#define TPM_PD_AUTHDIR ((TPM_CAPABILITY_AREA) 15) +#define TPM_PD_RNGSTATE ((TPM_CAPABILITY_AREA) 16) +#define TPM_PD_FAMILYTABLE ((TPM_CAPABILITY_AREA) 17) +#define TPM_DELEGATETABLE ((TPM_CAPABILITY_AREA) 18) +#define TPM_PD_EKRESET ((TPM_CAPABILITY_AREA) 19) +#define TPM_PD_MAXNVBUFSIZE ((TPM_CAPABILITY_AREA) 20) +#define TPM_PD_LASTFAMILYID ((TPM_CAPABILITY_AREA) 21) +#define TPM_PD_NOOWNERNVWRITE ((TPM_CAPABILITY_AREA) 22) +#define TPM_PD_RESTRICTDELEGATE ((TPM_CAPABILITY_AREA) 23) +#define TPM_PD_TPMDAASEED ((TPM_CAPABILITY_AREA) 24) +#define TPM_PD_DAAPROOF ((TPM_CAPABILITY_AREA) 25) + +/// +/// Part 2, section 7.5: TPM_STCLEAR_DATA +/// available inside TPM only +/// +typedef struct tdTPM_STCLEAR_DATA { + TPM_STRUCTURE_TAG tag; + TPM_NONCE contextNonceKey; + TPM_COUNT_ID countID; + UINT32 ownerReference; + BOOLEAN disableResetLock; + TPM_PCRVALUE PCR[TPM_NUM_PCR]; + UINT32 deferredPhysicalPresence; +} TPM_STCLEAR_DATA; + +// +// Part 2, section 7.5.1: STCLEAR_DATA Subcap for SetCapability +// +#define TPM_SD_CONTEXTNONCEKEY ((TPM_CAPABILITY_AREA)0x00000001) +#define TPM_SD_COUNTID ((TPM_CAPABILITY_AREA)0x00000002) +#define TPM_SD_OWNERREFERENCE ((TPM_CAPABILITY_AREA)0x00000003) +#define TPM_SD_DISABLERESETLOCK ((TPM_CAPABILITY_AREA)0x00000004) +#define TPM_SD_PCR ((TPM_CAPABILITY_AREA)0x00000005) +#define TPM_SD_DEFERREDPHYSICALPRESENCE ((TPM_CAPABILITY_AREA)0x00000006) + +// +// Part 2, section 7.6.1: STANY_DATA Subcap for SetCapability +// +#define TPM_AD_CONTEXTNONCESESSION ((TPM_CAPABILITY_AREA) 1) +#define TPM_AD_AUDITDIGEST ((TPM_CAPABILITY_AREA) 2) +#define TPM_AD_CURRENTTICKS ((TPM_CAPABILITY_AREA) 3) +#define TPM_AD_CONTEXTCOUNT ((TPM_CAPABILITY_AREA) 4) +#define TPM_AD_CONTEXTLIST ((TPM_CAPABILITY_AREA) 5) +#define TPM_AD_SESSIONS ((TPM_CAPABILITY_AREA) 6) + +// +// Part 2, section 8: PCR Structures +// + +/// +/// Part 2, section 8.1: TPM_PCR_SELECTION +/// Size of pcrSelect[] indicated by sizeOfSelect +/// +typedef struct tdTPM_PCR_SELECTION { + UINT16 sizeOfSelect; + UINT8 pcrSelect[1]; +} TPM_PCR_SELECTION; + +/// +/// Part 2, section 8.2: TPM_PCR_COMPOSITE +/// Size of pcrValue[] indicated by valueSize +/// +typedef struct tdTPM_PCR_COMPOSITE { + TPM_PCR_SELECTION select; + UINT32 valueSize; + TPM_PCRVALUE pcrValue[1]; +} TPM_PCR_COMPOSITE; + +/// +/// Part 2, section 8.3: TPM_PCR_INFO +/// +typedef struct tdTPM_PCR_INFO { + TPM_PCR_SELECTION pcrSelection; + TPM_COMPOSITE_HASH digestAtRelease; + TPM_COMPOSITE_HASH digestAtCreation; +} TPM_PCR_INFO; + +/// +/// Part 2, section 8.6: TPM_LOCALITY_SELECTION +/// +typedef UINT8 TPM_LOCALITY_SELECTION; + +#define TPM_LOC_FOUR ((UINT8) 0x10) +#define TPM_LOC_THREE ((UINT8) 0x08) +#define TPM_LOC_TWO ((UINT8) 0x04) +#define TPM_LOC_ONE ((UINT8) 0x02) +#define TPM_LOC_ZERO ((UINT8) 0x01) + +/// +/// Part 2, section 8.4: TPM_PCR_INFO_LONG +/// +typedef struct tdTPM_PCR_INFO_LONG { + TPM_STRUCTURE_TAG tag; + TPM_LOCALITY_SELECTION localityAtCreation; + TPM_LOCALITY_SELECTION localityAtRelease; + TPM_PCR_SELECTION creationPCRSelection; + TPM_PCR_SELECTION releasePCRSelection; + TPM_COMPOSITE_HASH digestAtCreation; + TPM_COMPOSITE_HASH digestAtRelease; +} TPM_PCR_INFO_LONG; + +/// +/// Part 2, section 8.5: TPM_PCR_INFO_SHORT +/// +typedef struct tdTPM_PCR_INFO_SHORT { + TPM_PCR_SELECTION pcrSelection; + TPM_LOCALITY_SELECTION localityAtRelease; + TPM_COMPOSITE_HASH digestAtRelease; +} TPM_PCR_INFO_SHORT; *** 4096 LINES SKIPPED *** From nobody Sun Nov 16 19:10:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8gSl5ytLz6Gwmj; Sun, 16 Nov 2025 19:10:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8gSl573nz49SB; Sun, 16 Nov 2025 19:10:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763320247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bDWmZtT6Ig8F+xrrDMPVgqwleW7XDogd03xbA8WbLOQ=; b=di7sdnjWHJrVOaJU4ol9fc40x36FXnZzXcSwZhfMUF+vcRaTmfOhx3OiGogsVs1ttSZWrR sZxKRfZtHAxp0mrUaEl6ELDAGg3Syj7fU5HEXsNhbzXssxLMXGevv+4ZK8CdvE8lvQAg6p WEnRIdsg5hxVcUx4DO1v4m618z99bpgOX2JEZmhDgwC/2OAl5kC/FR68M82uJSz4+8Xihy fhFzkxNuD0s1F20idCvpSXPsxy9cQHgm3RBC5uBBxVXsua0OdE+vGjGvoyG8FLDBuJI6vq I0Ik4cY12ifbLiagITekIhovhP9uN7uigMnqgJqAF0doplBIyIKW4wDoHfpQhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763320247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bDWmZtT6Ig8F+xrrDMPVgqwleW7XDogd03xbA8WbLOQ=; b=ESU5BDPRGLm2Y2PL1dk0BM2ZaZimOjcNRhWK4wEBVNo6zULjMd0nRFQZUCXij1b2fXB+s4 eBFGqRDTTOUcWTuLOYOlY86JBohwTClmrG0Hz+8nekcEbCCfAszES0r0q/uPZ/tVTwgweG ucSxx6ugNT/h8geET75q1XmwhH8dyQIIJGP1n/sCLXEghGGbpaLqQFfaoF/TqkLG3641Bv ANxjNYr3U7uTrJXsL9emVcnLp2Q7NRl3KkSy2fq06HfrPAbNg8S69V4JQAfv4ktK5fPQoh J+D+lTMa/Owb46rgahISrJwbLpr/XGEqYk16sp2urhm+qw085t4LEWDNv5eXYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763320247; a=rsa-sha256; cv=none; b=I7kIKBi5cGdkqoGq/y2QCW9BOv1GZTHMaOQa9IulKUOvXPwFK1SATNSXGvjlHmlq5xdxT4 2MAPdtTl3mBwMsooHQpLJVRfnC+6ay+lVZlexdKYnD4DD7oCnzANqJTJRDVhFdaV15sq37 1fSTjXmaCkubxgOHmpmSJCZ2aw2FKPV8Csb4xWFHY4v9jhkpD1kpyHKYZdLVaWAm2P5CW1 NPABsPDWJN8gJkjrMugVZQuMLRc/FJ3PzNJ2yjnHhMr9vjFubfY4egaR/doOUhfEDB3vly fqA7Yw4LlFmseU6NWlA7GSs+MaXWBF21Qz6mj//vcITgWGAPfCodxABfvD5dZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8gSl4S9PzqNY; Sun, 16 Nov 2025 19:10:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AGJAl1v092806; Sun, 16 Nov 2025 19:10:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGJAlWn092803; Sun, 16 Nov 2025 19:10:47 GMT (envelope-from git) Date: Sun, 16 Nov 2025 19:10:47 GMT Message-Id: <202511161910.5AGJAlWn092803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: ebb0b4822699 - main - iwx.4: Follow the established style List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ebb0b4822699eb614d5e9418c0a1bf6b30718699 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ebb0b4822699eb614d5e9418c0a1bf6b30718699 commit ebb0b4822699eb614d5e9418c0a1bf6b30718699 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-16 19:10:36 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-16 19:10:44 +0000 iwx.4: Follow the established style Fixes: b0c1ead2b9be ("iwx.4: Fix SYNOPSIS") Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D53760 --- share/man/man4/iwx.4 | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/share/man/man4/iwx.4 b/share/man/man4/iwx.4 index e57ddbc7c980..5f978b210f78 100644 --- a/share/man/man4/iwx.4 +++ b/share/man/man4/iwx.4 @@ -24,16 +24,20 @@ .Nm iwx .Nd Intel WiFi 6 IEEE 802.11ax wireless network driver .Sh SYNOPSIS -.Cd device wlan +To compile this driver into the kernel, +include the following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device iwx" +.Cd "device pci" +.Cd "device wlan" +.Ed .Pp -In -.Xr rc.conf 5 : -.Cd devmatch_blocklist="if_iwlwifi" -.Cd kld_list="if_iwx" -.Pp -In -.Xr sysctl.conf 5 : -.Cd dev.iwx.?.debug=0xffffffff +Alternatively, to load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_iwx_load="YES" +.Ed .Sh DESCRIPTION The .Nm From nobody Sun Nov 16 22:47:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8mH30Zhhz6HDdG; Sun, 16 Nov 2025 22:47: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8mH26qcSz3bMn; Sun, 16 Nov 2025 22:47:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763333263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ciVicsWF8nbVdYc1p58Q0bPjgfA2wiywVRIlnZXws20=; b=CraCJJNqc0g6NOarYlQShfBUEldPE+bi+z73b5dXdvWzFOvVAYp5tdu8m0NRfSceljotsG 3WiZQUaaf5oem5BoApXPHBnTt5fN4fehISQp8x8MKaXWHWz5dEf/7nkX8S6jWy6IYot/8Y 6wmsfpmAfzub48Jt4U41VhoHIU7nNpdZTgq0A98+94FYezt2wy5UZ3x0ByO/EgrJmXXOrQ Vl9wcogsgjdqtrLMuBnf+W/WkmsMKnfpjASbT2QqUc2JrvU8Hi68c0KCnBm1LctovyPe0I gO1d5QuF/diI6a2vXjf9KaSzAiOtxyY3zpsUsu9NCwF5xVSA6QY/HEjjJeTXPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763333263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ciVicsWF8nbVdYc1p58Q0bPjgfA2wiywVRIlnZXws20=; b=QyL6rZ+Sc4uy87bOklij3CaAod3JHPl7BaHnnnmJKJ3NiKrX/K7EJkq56bV7rcyWBdZMEL ECpmKqIFa6QW8w5XWgyhwLPI8M5JOp0vQzp3+OGZd+q9l2BQC8f+wI/TD11ATwNuyBc/GY XpE0+aOLozNqTY7PYQLN/HhF4NzMbse5hs9dNBGfoL3cOL6s/BM6AiGceGZbT8g9QAm4vG gjb0I2CvfzX4mMyyyTWralK8jFac3LGSNf9KJ6sWiVE+oCxS3g9EIwDJy5g0m8FPJPQruB 6NtRO9ouWVT3gbNRYTTipcsDs+lyuGXYmGv6cEA782n1F+NqpUr9yo2RTxlzgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763333263; a=rsa-sha256; cv=none; b=n0IwFzxn626YXoycwYjawhX+4ch2wB4DT9ecFmj/wUkFibSKsLbE2gFdSwvfEWGpXIIOfG knk+cx1/k0QUm+55q2qrlmZA5V8A1z0Klx28zCbo6sUOTSrRvkEs0b4Y3PUcP9nVUE2a/m oKkHc/ivCy+MjKYDwg61mRohkKiJqVpEoXrgCsYWH+P1qwJg2O/WqDVZt9/DNFFBbyej47 uaQ8Lvh89bu8jywyqe414dAjnokMN9LrT0LqJFEWurLfbzUpc2uN8zNZ8XtzKlu2go3CWm gNW8BF49n13RujWJ9EA6DbgrIjXnJvUYeLhnaHsYAYrZALZRTjW6SQGU1Q/OXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8mH265tczxrt; Sun, 16 Nov 2025 22:47: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 5AGMlgYs094622; Sun, 16 Nov 2025 22:47:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGMlgS5094619; Sun, 16 Nov 2025 22:47:42 GMT (envelope-from git) Date: Sun, 16 Nov 2025 22:47:42 GMT Message-Id: <202511162247.5AGMlgS5094619@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: e1b027b276df - main - fdc.4: Correct igor-reported warnings List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: e1b027b276dfba017d12b8a112af3251e79effc5 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e1b027b276dfba017d12b8a112af3251e79effc5 commit e1b027b276dfba017d12b8a112af3251e79effc5 Author: Ed Maste AuthorDate: 2025-11-16 22:43:40 +0000 Commit: Ed Maste CommitDate: 2025-11-16 22:44:16 +0000 fdc.4: Correct igor-reported warnings Sponsored by: The FreeBSD Foundation --- share/man/man4/fdc.4 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man4/fdc.4 b/share/man/man4/fdc.4 index 929baf3a234b..774dc3f18cd6 100644 --- a/share/man/man4/fdc.4 +++ b/share/man/man4/fdc.4 @@ -350,13 +350,15 @@ Print when an unknown IOCTL is used. .El .It Dv debug.fdc.fifo For enhanced controllers, allows a non-default FIFO -threshold setting. The default is 8 bytes. +threshold setting. +The default is 8 bytes. .It Dv debug.fdc.retries -Maximum number of retries to attempt. The default is 10. +Maximum number of retries to attempt. +The default is 10. .It Dv debug.fdc.spec1 Specification byte one (step-rate + head unload). -The default step rate is 6 ms. The default head unload -time is 240 ms. +The default step rate is 6 ms. +The default head unload time is 240 ms. .It Dv debug.fdc.spec2 Specification byte two (head load time + no-dma). The default head load time is 16 ms, and no-dma is 0 From nobody Sun Nov 16 22:47:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d8mH41Z1Kz6HDyh; Sun, 16 Nov 2025 22:47: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d8mH406nPz3bf3; Sun, 16 Nov 2025 22:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763333264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B5xpyGZHrnk/wsvHGnB3RTqz9+e30rCtaSNMIj2sXt8=; b=f1sx7gMXjtXQ6LpOpDDhtX4XBimygfJ2tjFKX/x9YvZ7W3Pdb4UeK+YUJOV5Mtct/HRxNk hNkCLMxnXMzvgYfsGbA5XX4EBIK7GDSBcKTRqq06T5YFY/XtexyA9SKqNvQtOoDyr534d9 n3/g/3R09uley3hBH1vcs2oEONY5tT7avSlPzonMwuRhBOHwxCsZR8hXqyroOUNLlrCXKi T6Bd11+WmFfPZelWFbCJYSzfm1QBNSibZp1rGW3LXgu7ZxaggaOKI5dCDASEgh0Q6PhMq+ 3KizeUK4vh9v7iGEQmGzlqM44OJkoXq2SQQYlarVn/wRAdesA0is2UraQTnkrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763333264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B5xpyGZHrnk/wsvHGnB3RTqz9+e30rCtaSNMIj2sXt8=; b=Hc4/2YKEAgdsxyREISd+zabYf+6kbu2+n6+IO0wWDQmvP0qE/1Fmw+sOvTqBcpJrhvK+Qv zqXqJe9XmOcAs5bDEfQpNkw/tAQ9OewelkGnPyKs3WJzALF0jp5CZU6JcfA6hYXJ6NCkwz U3vaAKlza94JcZoBrJ2YxD1encs4sz+x/zBy67BAYFkw1hRxi25A3zP7aCFxlxcPV5AYLh 9Z9Mr6a/4i74L2KoYQy7u1bOX7IzDzrvKCeQeCwneT+Y4deXBXW8LNEm9ADpTqJWKWUt8C 7Wex7q01gmHEsJR33zTKejDJPlIeZvXRvSXxsLiNYhwV7KXN6BGUOHtmadtAQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763333264; a=rsa-sha256; cv=none; b=SKzhsLo/lolJ374aakXTt29po1i1IlQBWmB9t0Vs2zT/Dw0/6Uq4mz8fERWIwmTDV1NVtG mmH36A1djsZms6vx5bSucoGXti2GjiYJS87VcbCNQzUc9kuecySxGAy0dQCMOxyXCvytCU c7QbE7sKVBsTORrtYwptL/YuuTcewkwkFG/R1YBrV87Tsb5n09Am3buv6ooSnBBkkaRo19 9ZsxsVCEI9ueFrw0KEx4GLM/YqDH1rpleKVECA0Eh3E6qqcl4u4q1chWxOfMob016Vk3Bk PEWyZlxX6v0QOc8qOOXue7DtmIKm+tCUwJhxQCmcLPSnV/U3Wt+6YPkZNvwAMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d8mH36myvzyLZ; Sun, 16 Nov 2025 22:47: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 5AGMlhab094658; Sun, 16 Nov 2025 22:47:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AGMlhWf094655; Sun, 16 Nov 2025 22:47:43 GMT (envelope-from git) Date: Sun, 16 Nov 2025 22:47:43 GMT Message-Id: <202511162247.5AGMlhWf094655@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: 4c736cfc69a7 - main - Deprecate fdc(4) and floppy utilities List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 4c736cfc69a7ef81c48c8431b31c7e31746fe816 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4c736cfc69a7ef81c48c8431b31c7e31746fe816 commit 4c736cfc69a7ef81c48c8431b31c7e31746fe816 Author: Ed Maste AuthorDate: 2023-08-22 14:45:14 +0000 Commit: Ed Maste CommitDate: 2025-11-16 22:46:12 +0000 Deprecate fdc(4) and floppy utilities Floppies have been obsolete for over a decade. Add a deprecation note now and plan to remove fdc(4) support in 16. Reviewed by: ziaee Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41549 --- share/man/man4/fdc.4 | 8 +++++++- usr.sbin/fdcontrol/fdcontrol.8 | 7 ++++++- usr.sbin/fdformat/fdformat.8 | 7 ++++++- usr.sbin/fdread/fdread.1 | 7 ++++++- usr.sbin/fdwrite/fdwrite.1 | 7 ++++++- 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/share/man/man4/fdc.4 b/share/man/man4/fdc.4 index 774dc3f18cd6..937be2077b26 100644 --- a/share/man/man4/fdc.4 +++ b/share/man/man4/fdc.4 @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 10, 2023 +.Dd November 16, 2025 .Dt FDC 4 .Os .Sh NAME @@ -47,6 +47,12 @@ In .Cd hint.fd.1.at="fdc0" .Cd hint.fd.1.drive="1" .Cd hint.fd.1.flags="0x0" +.Sh DEPRECATION NOTICE +The +.Nm +driver is deprecated and may not be present in +.Fx 16.0 +and later. .Sh DESCRIPTION .Ss Device Usage This driver provides access to floppy disk drives. diff --git a/usr.sbin/fdcontrol/fdcontrol.8 b/usr.sbin/fdcontrol/fdcontrol.8 index 23c3a2ee20de..cbf8864d5fe7 100644 --- a/usr.sbin/fdcontrol/fdcontrol.8 +++ b/usr.sbin/fdcontrol/fdcontrol.8 @@ -23,7 +23,7 @@ .\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd April 7, 2017 +.Dd November 16, 2025 .Dt FDCONTROL 8 .Os .Sh NAME @@ -37,6 +37,11 @@ .Op Fl s Ar fmtstr .Op Fl v .Ar device +.Sh DEPRECATION NOTICE +.Nm +is deprecated and may not be present in +.Fx 16.0 +and later. .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/fdformat/fdformat.8 b/usr.sbin/fdformat/fdformat.8 index bf18f93f5e87..72ec2bd2be5c 100644 --- a/usr.sbin/fdformat/fdformat.8 +++ b/usr.sbin/fdformat/fdformat.8 @@ -22,7 +22,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd May 23, 2020 +.Dd November 16, 2025 .Dt FDFORMAT 8 .Os .Sh NAME @@ -35,6 +35,11 @@ .Op Fl s Ar fmtstr .Op Fl nqvy .Ar device +.Sh DEPRECATION NOTICE +.Nm +is deprecated and may not be present in +.Fx 16.0 +and later. .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/fdread/fdread.1 b/usr.sbin/fdread/fdread.1 index c0036906bee6..83892877b48b 100644 --- a/usr.sbin/fdread/fdread.1 +++ b/usr.sbin/fdread/fdread.1 @@ -24,7 +24,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" -.Dd May 14, 2001 +.Dd November 16, 2025 .Dt FDREAD 1 .Os .Sh NAME @@ -40,6 +40,11 @@ .Op Fl d Ar device .Fl I Ar numsects .Op Fl t Ar trackno +.Sh DEPRECATION NOTICE +.Nm +is deprecated and may not be present in +.Fx 16.0 +and later. .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/fdwrite/fdwrite.1 b/usr.sbin/fdwrite/fdwrite.1 index 9d188de02d83..4773cfa20d9a 100644 --- a/usr.sbin/fdwrite/fdwrite.1 +++ b/usr.sbin/fdwrite/fdwrite.1 @@ -7,7 +7,7 @@ .\" ---------------------------------------------------------------------------- .\" .\" -.Dd September 16, 1993 +.Dd November 16, 2025 .Dt FDWRITE 1 .Os .Sh NAME @@ -19,6 +19,11 @@ .Op Fl y .Op Fl f Ar inputfile .Op Fl d Ar device +.Sh DEPRECATION NOTICE +.Nm +is deprecated and may not be present in +.Fx 16.0 +and later. .Sh DESCRIPTION The .Nm