lkml.org 
[lkml]   [2022]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCHv3 3/3] x86/tdx: Handle load_unaligned_zeropad() page-cross to a shared page
From
On 5/24/22 15:10, Kirill A. Shutemov wrote:
> + /*
> + * MMIO accesses suppose to be naturally aligned and therefore never
> + * cross a page boundary. Seeing unaligned accesses indicates a bug or
> + * load_unaligned_zeropad() that steps into unmapped shared page.

Wait a sec though...

We've been talking all along about how MMIO accesses are in some cases
just plain old compiler-generated memory accesses. It's *probably* bad
code that does this, but it's not necessarily a bug.

It's kinda like the split lock detection patches. Those definitely
found some stupid stuff, but it wasn't anything that I would have called
an outright bug. Plus, in those cases, folks had explicitly opted in to
more crashes on stupid stuff.

That stupid stuff _might_ be rare enough that it's still OK to just punt
on it and not emulate the instruction (aka. crash). Or, to say that TDX
guests are opting in to being more fragile, just like with split lock
detection.

But, either of those would call for a very different comment.

\
 
 \ /
  Last update: 2022-09-17 16:24    [W:0.140 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site