mbox series

[v6,0/7] Basic recovery for machine checks inside SGX

Message ID 20210922182123.200105-1-tony.luck@intel.com (mailing list archive)
Headers show
Series Basic recovery for machine checks inside SGX | expand

Message

Luck, Tony Sept. 22, 2021, 6:21 p.m. UTC
Now version 6 (what I actually meant to post as v5).

Note that I've dropped linux-kernel@vger.kernel.org and x86@kernel.org
from the distribution. Time to get some internal agreement on these
changes before bothering the x86 maintainers with yet another version.

So I'm looking for Acked-by: or Reviewed-by: on any bits of this
series that are worthy, and comments on the problems I need to fix
in the not-worthy parts.

Changes since v4 (I'm going to ignore the bogus v5 I posted):

Jarkko Sakkinen:
	+ Add linux-sgx@vger.kernel.org to Cc: list
	+ Remove explicit struct sgx_va_page *va_page type
	from argument and use in sgx_alloc_va_page(). Just
	use "void *" as this code doesn't do anything with the
	internals of struct sgx_va_page.
	+ Drop the union of all possible types for the "owner"
	field in struct sgx_epc_page (sorry Dave Hansen, this
	went in last time from your comment, but it doesn't
	seem to add much value). Back to "void *owner;"
	+ rename the xarray that tracks which addresses are
	EPC pages from "epc_page_ranges" to "sgx_epc_address_space".

Dave Hansen:
	+ Use more generic names for the globally visible
	functions that are needed in generic code:
		sgx_memory_failure -> arch_memory_failure
		sgx_is_epc_page -> arch_is_platform_page
	+ Commit comment on space used by xarray to track EPC pages.

Tony Luck:
	+ Found that ghes code spits warnings for memory addresses
	that it thinks are bad. Add a check for SGX pages.

Tony Luck (7):
  x86/sgx: Provide indication of life-cycle of EPC pages
  x86/sgx: Add infrastructure to identify SGX EPC pages
  x86/sgx: Initial poison handling for dirty and free pages
  x86/sgx: Add SGX infrastructure to recover from poison
  x86/sgx: Hook arch_memory_failure() into mainline code
  x86/sgx: Add hook to error injection address validation
  x86/sgx: Add check for SGX pages to ghes_do_memory_failure()

 .../firmware-guide/acpi/apei/einj.rst         |  19 +++
 arch/x86/include/asm/processor.h              |   8 +
 arch/x86/include/asm/set_memory.h             |   4 +
 arch/x86/kernel/cpu/sgx/encl.c                |   5 +-
 arch/x86/kernel/cpu/sgx/encl.h                |   2 +-
 arch/x86/kernel/cpu/sgx/ioctl.c               |   2 +-
 arch/x86/kernel/cpu/sgx/main.c                | 137 ++++++++++++++++--
 arch/x86/kernel/cpu/sgx/sgx.h                 |   7 +-
 drivers/acpi/apei/einj.c                      |   3 +-
 drivers/acpi/apei/ghes.c                      |   2 +-
 include/linux/mm.h                            |  14 ++
 mm/memory-failure.c                           |  19 ++-
 12 files changed, 196 insertions(+), 26 deletions(-)


base-commit: e4e737bb5c170df6135a127739a9e6148ee3da82