Re: [PATCH] x86/sgx: Free backing memory after faulting the enclave page

From: Jarkko Sakkinen
Date: Thu Nov 04 2021 - 11:09:35 EST


On Thu, 2021-11-04 at 17:04 +0200, Jarkko Sakkinen wrote:
> This can be achieved by iterating through all of the enclave pages,
> which share the same shmem page for storing their PCMD's, as the one
> being faulted back. If none of those pages is swapped, the PCMD page can
> safely truncated.

We have bookkeeping in place for this: encl->page_array.

/Jarkko