Re: [PATCH] x86/speculation/l1tf: Exempt zeroed PTEs from XOR conversion

From: Linus Torvalds
Date: Fri Aug 17 2018 - 13:05:16 EST


On Fri, Aug 17, 2018 at 10:01 AM Sean Christopherson
<sean.j.christopherson@xxxxxxxxx> wrote:
>
> Checking for a non-zero val in __pte_needs_invert() also resolves the
> issue. I shied away from that change because prot_none_walk() doesn't
> pass the full PTE to __pte_needs_invert(), it only passes the pgprot_t
> bits. This works because PAGE_NONE sets the global and accessed bits,
> but it made me nervous nonetheless.

Good point, and I do think that might merit a comment in the code.
Will add, and credit you. But I'd still prefer to just fix up just
__pte_needs_invert.

Thanks,

Linus