| Subject | Re: [PATCH v3 4/7] x86/sgx: Add SGX infrastructure to recover from poison | From | Dave Hansen <> | Date | Wed, 28 Jul 2021 15:29:31 -0700 |
| |
On 7/28/21 1:46 PM, Tony Luck wrote: > +int sgx_memory_failure(unsigned long pfn, int flags) > +{ ... > + page->flags |= SGX_EPC_PAGE_POISON;
Is this safe outside of any locks?
I see the reclaimer doing things like:
epc_page->flags &= ~SGX_EPC_PAGE_RECLAIMER_TRACKED;
I'd worry that this code and other non-atomic epc_page->flags manipulation could trample on each other.
This might need to some some atomic bit manipulation *and* convert all the other epc_page->flags users.
|