Re: [RFC PATCH v3 04/27] x86/sgx: Wipe out EREMOVE from sgx_free_epc_page()
From: Dave Hansen <hidden>
Date: 2021-02-02 19:06:04
From: Dave Hansen <hidden>
Date: 2021-02-02 19:06:04
On 1/26/21 5:25 PM, Kai Huang wrote:
quoted
quoted
+ * responsibility to make sure that the page is in uninitialized state In otherPeriod after "state", please.quoted
+ * words, do EREMOVE, EWB or whatever operation is necessary before calling + * this function. */OK, so if you're going to say "the caller must put the page in uninitialized state", let's also add a comment to the place that *DO* that, like the shiny new sgx_reset_epc_page().Hi Dave, Sorry I am a little bit confused here. Do you mean we should add a comment in sgx_reset_epc_page() to say, for instance: sgx_free_epc_page() requires the EPC page already been EREMOVE'd?
Yes. You need to place a comment in sgx_reset_epc_page() which says something like: /* Place the page in uninitialized state: */