All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ESRT fixes for relocatable kexec'd kernel
@ 2018-02-23 19:42 Tyler Baicar
  2018-02-23 19:42 ` [PATCH 1/2] efi/esrt: fix unsupported version initialization failure Tyler Baicar
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Tyler Baicar @ 2018-02-23 19:42 UTC (permalink / raw)
  To: ard.biesheuvel, linux-efi, linux-kernel, jhugo, sgoel,
	takahiro.akashi, timur
  Cc: Tyler Baicar

Currently on arm64 ESRT memory does not appear to be properly blocked off.
Upon successful initialization, ESRT prints out the memory region that it
exists in like:

esrt: Reserving ESRT space from 0x000000000a4c1c18 to 0x000000000a4c1cf0.

But then by dumping /proc/iomem this region appears as part of System RAM
rather than being reserved:

08f10000-0deeffff : System RAM

This causes issues when trying to kexec if the kernel is relocatable. When
kexec tries to execute, this memory can be selected to relocate the kernel to
which then overwrites all the ESRT information. Then when the kexec'd kernel
tries to initialize ESRT, it doesn't recognize the ESRT version number and
just returns from efi_esrt_init(). This causes an early ioremap leak because
the memory allocated for 'va' is never unmapped. So first fix that error
case to properly unmap 'va' before returning.

This still leaves ESRT unable to initialize in the kexec'd kernel, so now
mark the ESRT memory block as nomap so that this memory is not treated as
System RAM. With this change I'm able to see that the ESRT data is not
overwritten when running a kexec'd kernel.

Tyler Baicar (2):
  efi/esrt: fix unsupported version initialization failure
  efi/esrt: mark ESRT memory region as nomap

 drivers/firmware/efi/esrt.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2018-03-08 18:35 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23 19:42 [PATCH 0/2] ESRT fixes for relocatable kexec'd kernel Tyler Baicar
2018-02-23 19:42 ` [PATCH 1/2] efi/esrt: fix unsupported version initialization failure Tyler Baicar
2018-02-24  7:20   ` Dave Young
2018-03-08 16:11     ` Tyler Baicar
2018-03-08 18:00       ` Ard Biesheuvel
2018-03-08 18:15         ` Ard Biesheuvel
2018-03-08 18:34           ` Ard Biesheuvel
2018-02-23 19:42 ` [PATCH 2/2] efi/esrt: mark ESRT memory region as nomap Tyler Baicar
2018-02-24  7:22   ` Dave Young
2018-02-24  8:03   ` Ard Biesheuvel
2018-02-26 15:06     ` Tyler Baicar
2018-02-26 15:07       ` Ard Biesheuvel
2018-02-28  6:19 ` [PATCH 0/2] ESRT fixes for relocatable kexec'd kernel AKASHI Takahiro
2018-02-28 15:39   ` Jeffrey Hugo
2018-03-01  2:50     ` AKASHI Takahiro
2018-03-01 17:56       ` Tyler Baicar
2018-03-02  5:53         ` AKASHI Takahiro
2018-03-02 13:27           ` Tyler Baicar
2018-03-06  9:00             ` AKASHI Takahiro
2018-03-07 19:01               ` Tyler Baicar
2018-03-07 19:55               ` Ard Biesheuvel
2018-03-08 10:25                 ` AKASHI Takahiro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.