Commit 0019c656 authored by Jarkko Sakkinen's avatar Jarkko Sakkinen Committed by Zhiquan Li
Browse files

selftests/sgx: Create a heap for the test enclave

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


CVE: NA

Intel-SIG: commit 3200505d selftests/sgx: Create a heap for the test
enclave.
Backport for SGX EDMM support.

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

Create a heap for the test enclave, which is allocated from /dev/null,
and left unmeasured. This is beneficial by its own because it verifies
that an enclave built from multiple choices, works properly. If LSM
hooks are added for SGX some day, a multi source enclave has higher
probability to trigger bugs on access control checks.

The immediate need comes from the need to implement page reclaim tests.
In order to trigger the page reclaimer, one can just set the size of
the heap to high enough.

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/e070c5f23578c29608051cab879b1d276963a27a.1636997631.git.reinette.chatre@intel.com


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