The sgx driver can only load enclaves whose pages are fully measured. This may exclude existing enclaves from running. This patch adds a new ioctl to measure 256 byte chunks at a time. Such a requirement has been discussed before: https://lore.kernel.org/linux-sgx/20200220221038.GA26618@xxxxxxxxxxxxxxx/T/#m93597f53d354201e72e26d93a968f167fcdf5930 Raoul Strackx (3): x86/sgx: Adding eextend ioctl x86/sgx: Fix compatibility issue with OPENSSL < 1.1.0 x86/sgx: eextend ioctl selftest arch/x86/include/uapi/asm/sgx.h | 11 +++++ arch/x86/kernel/cpu/sgx/ioctl.c | 81 ++++++++++++++++++++++++++++----- tools/testing/selftests/sgx/defines.h | 1 + tools/testing/selftests/sgx/load.c | 55 ++++++++++++++++++---- tools/testing/selftests/sgx/main.h | 1 + tools/testing/selftests/sgx/sigstruct.c | 43 ++++++++--------- 6 files changed, 152 insertions(+), 40 deletions(-) -- 2.7.4