[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <715ed555-5044-6fee-1d09-1c4cfa827af3@intel.com>
Date: Tue, 6 Jul 2021 11:34:54 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Jarkko Sakkinen <jarkko@...nel.org>, Shuah Khan <shuah@...nel.org>
Cc: linux-kselftest@...r.kernel.org, linux-sgx@...r.kernel.org,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] selftests/sgx: Trigger the reclaimer and #PF handler
Hi Jarkko,
On 7/5/2021 7:36 AM, Jarkko Sakkinen wrote:
> 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. Actually,
> this adds a bit more stress than that since part of the EPC gets reserved
> for the Version Array (VA) pages.
>
> For each test, the page fault handler gets triggered in two occasions:
>
> - When SGX_IOC_ENCLAVE_INIT is performed, SECS gets swapped in by the
> page fault handler.
> - During the execution, each page that is referenced gets swapped in
> by the page fault handler.
>
If I understand this correctly, all EPC pages are now being consumed
during fixture setup and thus every SGX test, no matter how big or
small, now becomes a stress test of the reclaimer instead of there being
a unique reclaimer test. Since an enclave is set up and torn down for
every test this seems like a significant addition. It also seems like
this would impact future tests of dynamic page addition where not all
scenarios could be tested with all EPC pages already consumed.
Reinette
Powered by blists - more mailing lists