Thread (44 messages) 44 messages, 11 authors, 2013-06-27

[PATCH 1/4] Documentation: arm: [U]EFI runtime services

From: Grant Likely <hidden>
Date: 2013-06-27 15:37:38
Also in: linux-efi, lkml

On Thu, Jun 27, 2013 at 4:09 PM, James Bottomley
[off-list ref] wrote:
On Thu, 2013-06-27 at 15:37 +0100, Matthew Garrett wrote:
quoted
On Wed, Jun 26, 2013 at 11:33:41PM -0700, James Bottomley wrote:
quoted
On Thu, 2013-06-27 at 07:23 +0100, Grant Likely wrote:
quoted
What is the problem trying to be avoided by not using the virtual map?
Is it passing the virtual mapping data from one kernel to the next
when kexecing? Or something else?
Where to begin ... SetVirtualAddressMap() is one massive hack job ...
just look at the tiano core implementation.   Basically it has a fixed
idea of where all the pointers are and it tries to convert them all to
the new address space.  The problem we see in x86 is that this
conversion process isn't exhaustive due to implementation cockups, so
the post virtual address map image occasionally tries to access
unconverted pointers via the old physical address and oopses the kernel.
And yet it's the only mode in which the firmrware is actually tested
against an OS, so we don't have any real choice in the matter.
Agree for x86 ... we just have to cope with the implementations we see
in the field.  However, ARM has much more scope to have the UEFI
implementation developed collaboratively with Linux as the reference
platform.  If we can convince the ARM implementors that
SetVirtualAddressMap is an accident waiting to happen, they might be
more flexible.
We may not have any success convincing them of that; but given the
larger scope for Linux on ARM UEFI implementations, it will actually
get tested. If Linux chooses to use a 1:1 mapping, then the hardware
vendors will make sure a 1:1 mapping will actually work.

I must say that I'm a whole lot more comfortable with this approach.
I've never been comfortable with calling out to UEFI functions while
leaving the entirety of kernel space accessable. Sure UEFI can still
do nasty things if it really wants to and important devices get
mapped, but at least it will protect against accidental accesses.

g.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help