[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3534daf5-fae5-a85c-e198-c0b73e44ece4@intel.com>
Date: Wed, 28 Jul 2021 15:29:31 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Tony Luck <tony.luck@...el.com>,
Sean Christopherson <seanjc@...gle.com>,
Jarkko Sakkinen <jarkko@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/7] x86/sgx: Add SGX infrastructure to recover from
poison
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.
Powered by blists - more mailing lists