Skip to content

Commit

Permalink
x86/sgx: Add check for SGX pages to ghes_do_memory_failure()
Browse files Browse the repository at this point in the history
SGX EPC pages do not have a "struct page" associated with them so the
pfn_valid() sanity check fails and results in a warning message to
the console.

Add an additional check to skip the warning if the address of the error
is in an SGX EPC page.

Signed-off-by: Tony Luck <[email protected]>
Signed-off-by: Dave Hansen <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Tested-by: Reinette Chatre <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
aegl authored and hansendc committed Nov 15, 2021
1 parent c6acb1e commit 3ad6fd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/apei/ghes.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static bool ghes_do_memory_failure(u64 physical_addr, int flags)
return false;

pfn = PHYS_PFN(physical_addr);
if (!pfn_valid(pfn)) {
if (!pfn_valid(pfn) && !arch_is_platform_page(physical_addr)) {
pr_warn_ratelimited(FW_WARN GHES_PFX
"Invalid address in generic error data: %#llx\n",
physical_addr);
Expand Down

0 comments on commit 3ad6fd7

Please sign in to comment.