From nobody Mon Nov 16 21:01:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jT0dg3Dd0z70wdf for ; Mon, 16 Nov 2026 21:01: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jT0dg0vmKz4DK6 for ; Mon, 16 Nov 2026 21:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794862871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K6NC3HNpLY+AAmUtTPt/4o90nbicmcFN1iiKpXZTDis=; b=qpdfh6kK09X7IO20557O7a/EdRyV7H1ShBKLFFv4/IDCecNMsbQ4WYFf4QZTSvwinbPMC8 vnXCoFH6W7I2/qalfYjC4nlg/xJSa88nF/MITOhBdfut6MxD6QFOcL/lgzX6ae44qFgDs/ 0n2/zQm/wq/414n9asD5lBNnmAvN1EkN+n77S7HGcO2nGlMdXvYSEvjBKwHx7Vz3LVF8RQ qUiTdLqLnFIXJzNyAu+rnttmxLdhrkdqaoHA8KzEaZmxumIDtRrH5j8AcWWL4vx17ai6f8 B2Mzc9kyKwCB9xxJzhBd/ueMYu8m85P8eYjxrLw1equXkattRcg1yYaY3e2Wdg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794862871; b=wOlZDQLhk7lveAcNjbZ1GjLiYzjvpIZ1dWNV1SaFiu3n01WPXAMGID8yM2WAsYzKdxPvJR YvSZ2MXZDqOXaLbheLK49xACwqEh6kDNfXzmii9Uz3hAFut/tXhw0xbC1z+N6Yhb2jtCI4 9Zn/FFREDSj7PrGFjVKRuXstwOgqKewauiffw0X1N/GLu59ZJ5BeIDdZ2b74shQcUygXiv hUadvgixxGNKU4Sa31f7qb+81WomnlwpQZI56yiO9/jp4YG7eLv430AldN7TCkvXiInTmh jES3UQZMjoeuvaK80nECnbrn/dPJJjOqM0S8VMWdNIup16oFLmWr1QQR22jeXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794862871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K6NC3HNpLY+AAmUtTPt/4o90nbicmcFN1iiKpXZTDis=; b=W4ic3fpMHOux5mN18HLnwfWxergGICFYLdKdwwerQlyKmz5d5Ci9DIqY83MidhGt4vzrIw 6nL+m6+Dwc51abv1eEoacvBAPXXPvOpg8OFhlmatQj6FEAgpiimuksrrAcO0eYOenB0PNT 7XeikJwS9+atUdHYJanMBaQ7W0lIG7YZPQufRZ+dq1W+nxR3nP/xMD6o0U3sLITxjT85Sq 7nMfyeXKx6D7PTVAqyxZW//07C9Lt1eJrmCqmFf8NBkoOTOPJlsZWMsCrK7+3WgteFm8x0 dlT+FgAliOX/mpvQQYgN7axiyndNMcwWpwVz4B8xr4NJ+1vT0qJExFjLs/ZwsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jT0df6tLjz193L for ; Mon, 16 Nov 2026 21:01:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9689 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 16 Nov 2026 21:01:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kenneth D. Merry Subject: git: 8678bd6e2e50 - stable/14 - camcontrol: Fix swapped protection information defaults in nvformat List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ken X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8678bd6e2e508584978ff6952eff26d6dc3ce046 Auto-Submitted: auto-generated Date: Mon, 16 Nov 2026 21:01:10 +0000 Message-Id: <6afb6f16.9689.2a87c638@gitrepo.freebsd.org> The branch stable/14 has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=8678bd6e2e508584978ff6952eff26d6dc3ce046 commit 8678bd6e2e508584978ff6952eff26d6dc3ce046 Author: Kenneth D. Merry AuthorDate: 2026-11-09 18:46:59 +0000 Commit: Kenneth D. Merry CommitDate: 2026-11-16 21:00:06 +0000 camcontrol: Fix swapped protection information defaults in nvformat When no -p or -l arguments are given, the nvformat subcommand fills in the protection information type and location from the namespace's current settings. The two were swapped: pi was taken from the DPS metadata location bit and pil from the protection information type field. Formatting a namespace with protection information enabled would therefore silently change its PI settings, and before the Format NVM command builder masked its fields, a namespace with PI type 2 enabled would set bit 9 of cdw10, turning the format into a user data erase. Reported by: llm-postcr Fixes: 80f090111ae4 MFC after: 1 week Sponsored by: Spectra Logic Co-authored-by: Claude Fable 5 (cherry picked from commit ef69484b4295e84c74877b439db5caf025906b0c) --- sbin/camcontrol/nvformat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/camcontrol/nvformat.c b/sbin/camcontrol/nvformat.c index a41b490d62bc..777035812e6b 100644 --- a/sbin/camcontrol/nvformat.c +++ b/sbin/camcontrol/nvformat.c @@ -232,12 +232,12 @@ nvmeformat(struct cam_device *device, int argc, char **argv, char *combinedopt, & NVME_NS_DATA_FLBAS_EXTENDED_MASK; } if (pi < 0) { - pi = (nsdata.dps >> NVME_NS_DATA_DPS_MD_START_SHIFT) - & NVME_NS_DATA_DPS_MD_START_MASK; + pi = (nsdata.dps >> NVME_NS_DATA_DPS_PIT_SHIFT) & + NVME_NS_DATA_DPS_PIT_MASK; } if (pil < 0) { - pil = (nsdata.dps >> NVME_NS_DATA_DPS_PIT_SHIFT) & - NVME_NS_DATA_DPS_PIT_MASK; + pil = (nsdata.dps >> NVME_NS_DATA_DPS_MD_START_SHIFT) + & NVME_NS_DATA_DPS_MD_START_MASK; } if (ses < 0) ses = 0;