Re: [PATCH] [RFC] x86: work around MPX Erratum

From: Andy Lutomirski
Date: Tue May 03 2016 - 17:44:32 EST


On Tue, May 3, 2016 at 2:39 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, May 3, 2016 at 2:31 PM, Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:
>>
>> Having actually read the erratum: how can this affect Linux at all
>> under any scenario where user code hasn't already completely
>> compromised the kernel?
>
> If it matches purely on linear address, you will potentially have
> interesting situations with people running in virtualized environments
> and crashing programs in other virtual containers or the host.

If so, how does SMEP help? There's no guarantee that the same linear
address in two different VMs has the same U/S bit in the page tables.

IOW, I'm having trouble seeing a situation under which SMEP matters
and Linux would be affected in the absence of SMEP.

--Andy