Commit 54342624 authored by Jarkko Sakkinen's avatar Jarkko Sakkinen Committed by Zheng Zengkai
Browse files

x86/sgx: Replace section->init_laundry_list with sgx_dirty_page_list

mainline inclusion
from mainline-v5.13-rc1
commit 51ab30eb
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SIGI


CVE: NA

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

During normal runtime, the "ksgxd" daemon behaves like a version of
kswapd just for SGX. But, before it starts acting like kswapd, its first
job is to initialize enclave memory.

Currently, the SGX boot code places each enclave page on a
epc_section->init_laundry_list. Once it starts up, the ksgxd code walks
over that list and populates the actual SGX page allocator.

However, the per-section structures are going away to make way for the
SGX NUMA allocator. There's also little need to have a per-section
structure; the enclave pages are all treated identically, and they can
be placed on the correct allocator list from metadata stored in the
enclave page (struct sgx_epc_page) itself.

Modify sgx_sanitize_section() to take a single page list instead of
taking a section and deriving the list from there.

Intel-SIG: commit 51ab30eb x86/sgx: Replace section->init_laundry_list with sgx_dirty_page_list
Backport for SGX Foundations support

Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Link: https://lkml.kernel.org/r/20210317235332.362001-1-jarkko.sakkinen@intel.com


Signed-off-by: Fan Du <fan.du@intel.com> #openEuler_contributor
Signed-off-by: default avatarLaibin Qiu <qiulaibin@huawei.com>
Reviewed-by: default avatarBamvor Zhang <bamvor.zhang@suse.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent a79e6ea6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment