lkml.org 
[lkml]   [2021]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 4/7] x86/sgx: Add SGX infrastructure to recover from poison
From
Date
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.

\
 
 \ /
  Last update: 2021-07-29 00:31    [W:0.226 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site