On Thu, Sep 12, 2019 at 08:38:08PM +0100, Jarkko Sakkinen wrote: > A reclaimed page is represented by two entities: > > 1. A version number in the Enclave Page Cache (EPC). Version numbers are > stored in Version Array (VA) pages [1]. > 2. Page contents and MAC [2] encrypted with a random transient key and the > version number in the system memory. > > This commit introduces a wrapper function for ENCLS[EWB], which transforms > a page from EPC to the system memory, resulting the forementioned entities. > The reason for having struct sgx_ewb_context is that the reclaiming process > can pin the resources in early phases of the page reclaiming process when a > clean rollback from a failure (e.g. running out of memory) is still > possible. Ignore these. Sent by mistake. In my tree in for-v23 there is already some alternative patches in progress on top of my other v23 changes. /Jarkko