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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210630152828.162659-5-nchatrad@amd.com>
Date:   Wed, 30 Jun 2021 20:58:25 +0530
From:   Naveen Krishna Chatradhi <nchatrad@....com>
To:     linux-edac@...r.kernel.org, x86@...nel.org
Cc:     linux-kernel@...r.kernel.org, bp@...en8.de, mingo@...hat.com,
        mchehab@...nel.org
Subject: [PATCH 4/7] EDAC/mce_amd: extract node id from InstanceHi in IPID

On AMD systems with SMCA banks on NONCPU nodes, the node id information
is available in the InstanceHI[47:44] of the IPID register.

Signed-off-by: Muralidhara M K <muralimk@....com>
Signed-off-by: Naveen Krishna Chatradhi <nchatrad@....com>
---
 drivers/edac/mce_amd.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index 27d56920b469..364dfb6e359d 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -1049,6 +1049,7 @@ static void decode_smca_error(struct mce *m)
 	enum smca_bank_types bank_type;
 	const char *ip_name;
 	u8 xec = XEC(m->status, xec_mask);
+	u32 node_id = 0;
 
 	if (m->bank >= ARRAY_SIZE(smca_banks))
 		return;
@@ -1072,8 +1073,18 @@ static void decode_smca_error(struct mce *m)
 	if (xec < smca_mce_descs[bank_type].num_descs)
 		pr_cont(", %s.\n", smca_mce_descs[bank_type].descs[xec]);
 
-	if (bank_type == SMCA_UMC && xec == 0 && decode_dram_ecc)
-		decode_dram_ecc(topology_die_id(m->extcpu), m);
+	/*
+	 * SMCA_UMC_V2 is used on the noncpu nodes, extract the node id
+	 * from the InstanceHI[47:44] of the IPID register.
+	 */
+	if (bank_type == SMCA_UMC_V2 && xec == 0)
+		node_id = ((m->ipid >> 44) & 0xF);
+
+	if (bank_type == SMCA_UMC && xec == 0)
+		node_id = topology_die_id(m->extcpu);
+
+	if (decode_dram_ecc)
+		decode_dram_ecc(node_id, m);
 }
 
 static inline void amd_decode_err_code(u16 ec)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ