Re: [PATCH] x86: sgx: Don't track poisoned pages for reclaiming
From: Jarkko Sakkinen
Date: Wed Feb 12 2025 - 16:25:15 EST
On Tue, Feb 11, 2025 at 03:31:54PM -0800, Dave Hansen wrote:
> On 2/11/25 13:18, Huang, Kai wrote:
> >>> This requires low-level SGX implementation knowledge to fully
> >>> understand. Both what "ETRACK, EBLOCK and EWB" are in the first place,
> >>> how they are involved in reclaim and also why EREMOVE doesn't lead to
> >>> the same fate.
> >>
> >> Does it? [I'll dig up Intel SDM to check this]
> >>
> > I just did. 🙂
> >
> > It seems EREMOVE only reads and updates the EPCM entry for the target
> > EPC page but won't actually access that EPC page.
>
> Actually, now that I think about it even more, why would ETRACK or
> EBLOCK access the page itself? They seem superficially like they'd be
> metadata-only too.
Did a sanity check to SDM.
I think you're correct, and also there's zero rational reason them use
anything but EPCM (no legit reason to access payload itself).
BR, Jarkko