lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250813200744.17975-8-bgurney@redhat.com>
Date: Wed, 13 Aug 2025 16:07:42 -0400
From: Bryan Gurney <bgurney@...hat.com>
To: linux-nvme@...ts.infradead.org,
	kbusch@...nel.org,
	hch@....de,
	sagi@...mberg.me,
	axboe@...nel.dk
Cc: james.smart@...adcom.com,
	njavali@...vell.com,
	linux-scsi@...r.kernel.org,
	hare@...e.de,
	linux-hardening@...r.kernel.org,
	kees@...nel.org,
	gustavoars@...nel.org,
	bgurney@...hat.com,
	jmeneghi@...hat.com,
	emilne@...hat.com
Subject: [PATCH v9 7/9] nvme: sysfs: emit the marginal path state in show_state()

If a controller has received a link integrity or congestion event, and
has the NVME_CTRL_MARGINAL flag set, emit "marginal" in the state
instead of "live", to identify the marginal paths.

Co-developed-by: John Meneghini <jmeneghi@...hat.com>
Signed-off-by: John Meneghini <jmeneghi@...hat.com>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>
Tested-by: Muneendra Kumar <muneendra.kumar@...adcom.com>
Signed-off-by: Bryan Gurney <bgurney@...hat.com>
---
 drivers/nvme/host/sysfs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/sysfs.c b/drivers/nvme/host/sysfs.c
index 29430949ce2f..4a6135c2f9cb 100644
--- a/drivers/nvme/host/sysfs.c
+++ b/drivers/nvme/host/sysfs.c
@@ -430,7 +430,9 @@ static ssize_t nvme_sysfs_show_state(struct device *dev,
 	};
 
 	if (state < ARRAY_SIZE(state_name) && state_name[state])
-		return sysfs_emit(buf, "%s\n", state_name[state]);
+		return sysfs_emit(buf, "%s\n",
+			(nvme_ctrl_is_marginal(ctrl)) ? "marginal" :
+			state_name[state]);
 
 	return sysfs_emit(buf, "unknown state\n");
 }
-- 
2.50.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ