Skip to content

Fixes and updates for v23

Jarkko Sakkinen linux-sgx 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest17 patches 19 repliesIn review
  2. v217 patches 5 repliesSuperseded
  3. v111 patches 0 repliesSuperseded

Changes in v3 from the cover letter

* Rebasing did not went right in the last version.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17selftest/x86/sgx: Remove encl_piggy.htools/testing/selftests/x86/sgx/encl_piggy.h tools/testing/selftests/x86/sgx/main.c+0 -150 replies
2/17x86/sgx: Clean up internal includesarch/x86/kernel/cpu/sgx/driver.c arch/x86/kernel/cpu/sgx/driver.h arch/x86/kernel/cpu/sgx/encl.c +6 more+10 -90 replies
3/17x86/sgx: Write backing storage only if EWB is successfularch/x86/kernel/cpu/sgx/reclaim.c+5 -20 replies
4/17x86/sgx: Rename 'j' as 'cnt' in sgx_reclaim_pages()arch/x86/kernel/cpu/sgx/reclaim.c+8 -70 replies
5/17x86/sgx: Turn encls_failed() as inline functionarch/x86/kernel/cpu/sgx/Makefile arch/x86/kernel/cpu/sgx/encls.c arch/x86/kernel/cpu/sgx/encls.h+18 -260 replies
6/17x86/sgx: Move sgx_einit() to encls.carch/x86/kernel/cpu/sgx/Makefile arch/x86/kernel/cpu/sgx/encls.c arch/x86/kernel/cpu/sgx/encls.h +2 more+60 -530 replies
7/17x86/sgx: Remove pages in sgx_reclaimer_write()arch/x86/kernel/cpu/sgx/reclaim.c+11 -100 replies
8/17x86/sgx: Calculate page index in sgx_reclaimer_write()arch/x86/kernel/cpu/sgx/reclaim.c+9 -240 replies
9/17x86/sgx: Move SGX_ENCL_DEAD check to sgx_reclaimer_write()arch/x86/kernel/cpu/sgx/reclaim.c+34 -354 replies
10/17x86/sgx: Free VA slot when the EWB flow failsarch/x86/kernel/cpu/sgx/reclaim.c+6 -30 replies
11/17x86/sgx: Call sgx_encl_destroy() when the EWB flow failsarch/x86/kernel/cpu/sgx/reclaim.c+1 -10 replies
12/17x86/sgx: Open code sgx_reclaimer_get() and sgx_reclaimer_put()arch/x86/kernel/cpu/sgx/reclaim.c+18 -293 replies
13/17x86/sgx: Introduce sgx_can_reclaim()arch/x86/kernel/cpu/sgx/reclaim.c+18 -143 replies
14/17x86/sgx: Replace section->free_cnt with a global sgx_nr_free_pagesarch/x86/kernel/cpu/sgx/main.c arch/x86/kernel/cpu/sgx/reclaim.c arch/x86/kernel/cpu/sgx/sgx.h+9 -242 replies
15/17x86/sgx: sgx_vma_access(): Do not return -ECANCELED on invalid TCS pagesarch/x86/kernel/cpu/sgx/encl.c arch/x86/kernel/cpu/sgx/encl.h arch/x86/kernel/cpu/sgx/ioctl.c+2 -190 replies
16/17x86/sgx: Introduce sgx_encl_get_backing()arch/x86/kernel/cpu/sgx/encl.c arch/x86/kernel/cpu/sgx/encl.h arch/x86/kernel/cpu/sgx/reclaim.c+71 -742 replies
17/17x86/sgx: Fix pages in the BLOCKED state ending up to the free poolarch/x86/kernel/cpu/sgx/reclaim.c+57 -385 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 00/17] Fixes and updates for v23

This patch set contains my fixes and updates for v23 except sgx_alloc_page() changes that I will submit a bit later.

v3:
* Rebasing did not went right in the last version.
v2:
* Added the bug fix to not allow legitly BLOCKED pages to end up to the free page pool.

Cc Sean Christopherson <[email protected]>
Cc Shay Katz-zamir <[email protected]>
Cc Serge Ayoun <[email protected]>

Jarkko Sakkinen (17):
selftest/x86/sgx: Remove encl_piggy.h
x86/sgx: Clean up internal includes
x86/sgx: Write backing storage only if EWB is successful x86/sgx: Rename 'j' as 'cnt' in sgx_reclaim_pages() x86/sgx: Turn encls_failed() as inline function x86/sgx: Move sgx_einit() to encls.c
x86/sgx: Remove pages in sgx_reclaimer_write()
x86/sgx: Calculate page index in sgx_reclaimer_write() x86/sgx: Move SGX_ENCL_DEAD check to sgx_reclaimer_write() x86/sgx: Free VA slot when the EWB flow fails
x86/sgx: Call sgx_encl_destroy() when the EWB flow fails x86/sgx: Open code sgx_reclaimer_get() and sgx_reclaimer_put() x86/sgx: Introduce sgx_can_reclaim()
x86/sgx: Replace section->free_cnt with a global sgx_nr_free_pages x86/sgx: sgx_vma_access(): Do not return -ECANCELED on invalid TCS
pages
x86/sgx: Introduce sgx_encl_get_backing()
x86/sgx: Fix pages in the BLOCKED state ending up to the free pool

 arch/x86/kernel/cpu/sgx/driver.c             |   2 +
 arch/x86/kernel/cpu/sgx/driver.h             |   3 -
 arch/x86/kernel/cpu/sgx/encl.c               | 104 +++----
 arch/x86/kernel/cpu/sgx/encl.h               |  23 +-
 arch/x86/kernel/cpu/sgx/encls.c              |  54 +++-
 arch/x86/kernel/cpu/sgx/encls.h              |  23 +-
 arch/x86/kernel/cpu/sgx/ioctl.c              |   5 +-
 arch/x86/kernel/cpu/sgx/main.c               |  64 +---
 arch/x86/kernel/cpu/sgx/reclaim.c            | 299 +++++++++----------
 arch/x86/kernel/cpu/sgx/sgx.h                |   6 +-
 tools/testing/selftests/x86/sgx/encl_piggy.h |  14 -
 tools/testing/selftests/x86/sgx/main.c       |   1 -
 12 files changed, 276 insertions(+), 322 deletions(-)
 delete mode 100644 tools/testing/selftests/x86/sgx/encl_piggy.h
Signature · 1 line
2.20.1