Skip to content

Basic recovery for machine checks inside SGX

Tony Luck linux-acpi linux-mm linux-sgx lkml llvm oe-kbuild-all 11 versions – Applied

Status from this message: The following commit has been merged into the x86/sgx branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest7 patches 1 replyApplied
  2. v107 patches 2 repliesSuperseded
  3. v97 patches 10 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v87 patches3 repliesSuperseded
v77 patches8 repliesSuperseded
v67 patches5 repliesSuperseded
v57 patches10 repliesSuperseded
v46 patches18 repliesSuperseded
v37 patches24 repliesSuperseded
v26 patches4 repliesSuperseded
v14 patches8 repliesSuperseded

Patches in v11 Applied

#Subject and filesSizeRepliesApplied
1/7x86/sgx: Add new sgx_epc_page flag bit to mark free pagesarch/x86/kernel/cpu/sgx/main.c arch/x86/kernel/cpu/sgx/sgx.h+5 -00 replies
2/7x86/sgx: Add infrastructure to identify SGX EPC pagesarch/x86/Kconfig arch/x86/kernel/cpu/sgx/main.c+10 -00 replies
3/7x86/sgx: Initial poison handling for dirty and free pagesarch/x86/kernel/cpu/sgx/main.c arch/x86/kernel/cpu/sgx/sgx.h+28 -20 replies
4/7x86/sgx: Add SGX infrastructure to recover from poisonarch/x86/kernel/cpu/sgx/main.c+76 -00 replies
5/7x86/sgx: Hook arch_memory_failure() into mainline codearch/x86/include/asm/processor.h arch/x86/include/asm/set_memory.h include/linux/mm.h +1 more+38 -60 replies
6/7x86/sgx: Add hook to error injection address validationDocumentation/firmware-guide/acpi/apei/einj.rst drivers/acpi/apei/einj.c+21 -10 replies
7/7x86/sgx: Add check for SGX pages to ghes_do_memory_failure()drivers/acpi/apei/ghes.c+1 -11 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchJarkko SakkinenReinette ChatreNaoya HoriguchiRafael J. Wysocki
1/7R-b T-b
2/7R-b T-b
3/7R-b T-b
4/7R-b T-b
5/7R-b T-b R-b
6/7R-b T-b
7/7R-b T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v11 thread

Cover letter [PATCH v11 0/7] Basic recovery for machine checks inside SGX

Boris,

I took this series out of lkml/x86 for a few revisions, I think the last one posted to lkml was v5. So much has changed since then that it might be easier to just look at this as if it were v1 and ignore the earlier history.

First four patches add infrastructure within the SGX code to track enclave pages (because these pages don't have a "struct page" as they aren't directly accessible by Linux). All have "Reviewed-by" tags from Jarkko (SGX maintainer).

Patch 5 hooks into memory_failure() to invoke recovery if the physical address is in enclave space. This has a "Reviewed-by" tag from Naoya Horiguchi the maintainer for mm/memory-failure.c

Patch 6 is a hook into the error injection code and addition to the error injection documentation explaining extra steps needed to inject into SGX enclave memory.

Patch 7 is a hook into GHES error reporting path to recognize that SGX enclave addresses are valid and need processing.

-Tony

Tony Luck (7):
x86/sgx: Add new sgx_epc_page flag bit to mark free 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/Kconfig                              |   1 +
 arch/x86/include/asm/processor.h              |   8 ++
 arch/x86/include/asm/set_memory.h             |   4 +
 arch/x86/kernel/cpu/sgx/main.c                | 113 +++++++++++++++++-
 arch/x86/kernel/cpu/sgx/sgx.h                 |   7 +-
 drivers/acpi/apei/einj.c                      |   3 +-
 drivers/acpi/apei/ghes.c                      |   2 +-
 include/linux/mm.h                            |  13 ++
 mm/memory-failure.c                           |  19 ++-
 10 files changed, 179 insertions(+), 10 deletions(-)

base-commit: 3906fe9bb7f1a2c8667ae54e967dc8690824f4ea

Signature · 1 line
2.31.1