[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141029142052.GR12020@console-pimps.org>
Date: Wed, 29 Oct 2014 14:20:52 +0000
From: Matt Fleming <matt@...sole-pimps.org>
To: Mathias Krause <minipli@...glemail.com>
Cc: Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
x86-ml <x86@...nel.org>, Matt Fleming <matt.fleming@...el.com>
Subject: Re: [PATCHv2 1/3] x86, ptdump: Add section for EFI runtime services
On Tue, 28 Oct, at 10:14:25PM, Mathias Krause wrote:
>
> Mapping the kernel into the EFI page table may help ;) Then the
> kernel's #PF handler would be present and able to print a register
> dump, at least.
The kernel is already mapped into the EFI page table.
> So, assuming you're not mapping the EFI virtual mappings below the
> pgd[511] hierarchy, making pgd[511] equal init_level4_pgt[511] should
> help in this case. In fact, you need to map portions of the kernel
> into the EFI page table anyway. Otherwise the EFI code wouldn't be
> able to access, e.g., the data it should write to NVRAM. So the EFI
> code would just trap and trigger a #PF -- and because of the missing
> #PF handler, a #DF -- and because of the missing #DF handler the
> triple fault. ;)
Exactly.
We don't setup a separate page table for EFI calls for any kind of
isolation, we do it to make use of the existing 1:1 mappings in
trampoline_pgd because some firmware directly reference physical
addresses at runtime. It actually doesn't work too well in practice,
because you soon hit other issues on those firmware, but there you go.
So the fact that we have EFI mappings in init_level4_pgt[] isn't
indicative of any kind of bug, it's potentially a bit unclean, but
that's about it.
--
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists