linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] EDAC/skx_common: Allow decoding of SGX addresses
@ 2024-04-08 12:04 Qiuxu Zhuo
  2024-04-08 16:55 ` Luck, Tony
  0 siblings, 1 reply; 2+ messages in thread
From: Qiuxu Zhuo @ 2024-04-08 12:04 UTC (permalink / raw)
  To: Tony Luck
  Cc: Qiuxu Zhuo, Borislav Petkov, Aristeu Rozanski,
	Mauro Carvalho Chehab, linux-edac, linux-kernel

There are no "struct page" associations with SGX pages, causing the check
pfn_to_online_page() to fail. This results in the inability to decode the
SGX addresses and warning messages like:

  Invalid address 0x34cc9a98840 in IA32_MC17_ADDR

Add an additional check to allow the decoding of the error address and to
skip the warning message, if the error address is an SGX address.

Fixes: 1e92af09fab1 ("EDAC/skx_common: Filter out the invalid address")
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
---
 drivers/edac/skx_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/skx_common.c b/drivers/edac/skx_common.c
index 9c5b6f8bd8bd..27996b7924c8 100644
--- a/drivers/edac/skx_common.c
+++ b/drivers/edac/skx_common.c
@@ -648,7 +648,7 @@ int skx_mce_check_error(struct notifier_block *nb, unsigned long val,
 	memset(&res, 0, sizeof(res));
 	res.mce  = mce;
 	res.addr = mce->addr & MCI_ADDR_PHYSADDR;
-	if (!pfn_to_online_page(res.addr >> PAGE_SHIFT)) {
+	if (!pfn_to_online_page(res.addr >> PAGE_SHIFT) && !arch_is_platform_page(res.addr)) {
 		pr_err("Invalid address 0x%llx in IA32_MC%d_ADDR\n", mce->addr, mce->bank);
 		return NOTIFY_DONE;
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH 1/1] EDAC/skx_common: Allow decoding of SGX addresses
  2024-04-08 12:04 [PATCH 1/1] EDAC/skx_common: Allow decoding of SGX addresses Qiuxu Zhuo
@ 2024-04-08 16:55 ` Luck, Tony
  0 siblings, 0 replies; 2+ messages in thread
From: Luck, Tony @ 2024-04-08 16:55 UTC (permalink / raw)
  To: Zhuo, Qiuxu
  Cc: Borislav Petkov, Aristeu Rozanski, Mauro Carvalho Chehab,
	linux-edac, linux-kernel

> There are no "struct page" associations with SGX pages, causing the check
> pfn_to_online_page() to fail. This results in the inability to decode the
> SGX addresses and warning messages like:
>
>   Invalid address 0x34cc9a98840 in IA32_MC17_ADDR
>
> Add an additional check to allow the decoding of the error address and to
> skip the warning message, if the error address is an SGX address.

Applied. Thanks.

-Tony

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-08 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-08 12:04 [PATCH 1/1] EDAC/skx_common: Allow decoding of SGX addresses Qiuxu Zhuo
2024-04-08 16:55 ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).