Commit 2289267d authored by Jarkko Sakkinen's avatar Jarkko Sakkinen Committed by Zhiquan Li
Browse files

selftests/sgx: Add a new kselftest: Unclobbered_vdso_oversubscribed

mainline inclusion
from mainline-5.17-rc1
commit f0ff2447
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5USAM


CVE: NA

Intel-SIG: commit f0ff2447 selftests/sgx: Add a new kselftest:
Unclobbered_vdso_oversubscribed.
Backport for SGX EDMM support.

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

Add a variation of the unclobbered_vdso test.

In the new test, create a heap for the test enclave, which has the same
size as all available Enclave Page Cache (EPC) pages in the system. This
will guarantee that all test_encl.elf pages *and* SGX Enclave Control
Structure (SECS) have been swapped out by the page reclaimer during the
load time.

This test will trigger both the page reclaimer and the page fault handler.
The page reclaimer triggered, while the heap is being created during the
load time. The page fault handler is triggered for all the required pages,
while the test case is executing.

Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Acked-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Link: https://lkml.kernel.org/r/41f7c508eea79a3198b5014d7691903be08f9ff1.1636997631.git.reinette.chatre@intel.com


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