Re: [PATCH] x86/boot/64: Make level2_kernel_pgt pages invalid outside kernel area.

From: Steve Wahl
Date: Fri Sep 13 2019 - 11:15:04 EST


On Thu, Sep 12, 2019 at 01:19:17PM +0300, Kirill A. Shutemov wrote:
> On Wed, Sep 11, 2019 at 03:08:35PM -0500, Steve Wahl wrote:
> > Thank you for your time looking into this with me!
>
> With all this explanation the original patch looks sane to me.
>
> But I would like to see more information from this thread in the commit
> message and some comments in the code on why it's crucial not to map more
> than needed.

I am working on this.

> I think we also need to make it clear that this is workaround for a broken
> hardware: speculative execution must not trigger a halt.

I think the word broken is a bit loaded here. According to the UEFI
spec (version 2.8, page 167), "Regions that are backed by the physical
hardware, but are not supposed to be accessed by the OS, must be
returned as EfiReservedMemoryType." Our interpretation is that
includes speculative accesses.

I'd lean more toward "tightening of adherence to the spec required by
some particular hardware." Does that work for you?

--> Steve Wahl

--
Steve Wahl, Hewlett Packard Enterprise