Skip to content

x86/sgx: Bug fixes for v23

Sean Christopherson linux-sgx 2 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest12 patches 19 repliesApplied
  2. v14 patches 3 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/12x86/sgx: Pass EADD the kernel's virtual address for the source pagearch/x86/kernel/cpu/sgx/ioctl.c+2 -43 replies
2/12x86/sgx: Check the validity of the source page address for EADDarch/x86/kernel/cpu/sgx/ioctl.c+3 -00 replies
3/12x86/sgx: Fix EEXTEND error handlingarch/x86/kernel/cpu/sgx/ioctl.c+16 -151 reply
4/12x86/sgx: Drop mmap_sem before EEXTENDing an enclave pagearch/x86/kernel/cpu/sgx/ioctl.c+5 -31 reply
5/12x86/sgx: Remove redundant message from WARN on non-emtpy mm_listarch/x86/kernel/cpu/sgx/encl.c+1 -11 reply
6/12x86/sgx: Fix a memory leak in sgx_encl_destroy()arch/x86/kernel/cpu/sgx/encl.c+12 -71 reply
7/12x86/sgx: WARN on any non-zero return from __eremove()arch/x86/kernel/cpu/sgx/main.c+1 -10 replies
8/12x86/sgx: WARN only once if EREMOVE failsarch/x86/kernel/cpu/sgx/main.c+1 -10 replies
9/12x86/sgx: Split second half of sgx_free_page() to a separate helperarch/x86/kernel/cpu/sgx/main.c arch/x86/kernel/cpu/sgx/sgx.h+35 -103 replies
10/12x86/sgx: Use the post-reclaim variant of __sgx_free_page()arch/x86/kernel/cpu/sgx/encl.c arch/x86/kernel/cpu/sgx/ioctl.c arch/x86/kernel/cpu/sgx/reclaim.c+9 -90 replies
11/12x86/sgx: Don't update free page count if EPC section allocation failsarch/x86/kernel/cpu/sgx/main.c+2 -10 replies
12/12x86/sgx: Reinstate per EPC section free page countsarch/x86/kernel/cpu/sgx/main.c arch/x86/kernel/cpu/sgx/reclaim.c arch/x86/kernel/cpu/sgx/sgx.h+24 -96 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH for_v23 v3 00/12] x86/sgx: Bug fixes for v23

As requested, the merge of the EPC and EADD bug fix series. The headliners are two critical bug fixes for a memory leak in sgx_encl_destroy() and a livelock due to the EPC page free count getting corrupted.

Sean Christopherson (12):
x86/sgx: Pass EADD the kernel's virtual address for the source page x86/sgx: Check the validity of the source page address for EADD x86/sgx: Fix EEXTEND error handling
x86/sgx: Drop mmap_sem before EEXTENDing an enclave page x86/sgx: Remove redundant message from WARN on non-emtpy mm_list x86/sgx: Fix a memory leak in sgx_encl_destroy()
x86/sgx: WARN on any non-zero return from __eremove() x86/sgx: WARN only once if EREMOVE fails
x86/sgx: Split second half of sgx_free_page() to a separate helper x86/sgx: Use the post-reclaim variant of __sgx_free_page() x86/sgx: Don't update free page count if EPC section allocation fails x86/sgx: Reinstate per EPC section free page counts

 arch/x86/kernel/cpu/sgx/encl.c    | 29 ++++++++++-------
 arch/x86/kernel/cpu/sgx/ioctl.c   | 52 +++++++++++++++--------------
 arch/x86/kernel/cpu/sgx/main.c    | 54 ++++++++++++++++++++++---------
 arch/x86/kernel/cpu/sgx/reclaim.c |  8 ++---
 arch/x86/kernel/cpu/sgx/sgx.h     | 19 ++++++++++-
 5 files changed, 106 insertions(+), 56 deletions(-)
Signature · 1 line
2.22.0