Commit 4fccae8c authored by Tony Luck's avatar Tony Luck Committed by Zhiquan Li
Browse files

x86/sgx: Add SGX infrastructure to recover from poison

mainline inclusion
from mainline-5.17
commit a495cbdf
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5EZFM


CVE: NA

Intel-SIG: commit a495cbdf x86/sgx: Add SGX infrastructure to
recover from poison.
Backport for SGX MCA recovery co-existence support

--------------------------------

Provide a recovery function sgx_memory_failure(). If the poison was
consumed synchronously then send a SIGBUS. Note that the virtual
address of the access is not included with the SIGBUS as is the case
for poison outside of SGX enclaves. This doesn't matter as addresses
of code/data inside an enclave is of little to no use to code executing
outside the (now dead) enclave.

Poison found in a free page results in the page being moved from the
free list to the per-node poison page list.

Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Tested-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Link: https://lkml.kernel.org/r/20211026220050.697075-5-tony.luck@intel.com


Signed-off-by: default avatarZhiquan Li <zhiquan1.li@intel.com>
parent dc1b46e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment