Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1619568
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/efi: don't try to reserve runtime regions |
| Date | 2017-04-10 00:30 +0200 |
| Message-ID | <tutvj-t9-1@gated-at.bofh.it> (permalink) |
| References | <tsGmZ-3eo-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 04 Apr, at 04:41:55PM, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
>
> Reserving a runtime region results in splitting the efi memory
> descriptors for the runtime region. This results in runtime region
> descriptors with bogus memory mappings, leading to interesting crashes
> like the following during a kexec:
[...]
> Runtime regions will not be freed and do not need to be reserved, so
> skip the memmap modification in this case.
>
> Fixes: 8e80632fb23f ("efi/esrt: Use efi_mem_reserve() and avoid a kmalloc()")
> Signed-off-by: Omar Sandoval <osandov@fb.com>
> ---
> arch/x86/platform/efi/quirks.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
> index 30031d5293c4..cdfe8c628959 100644
> --- a/arch/x86/platform/efi/quirks.c
> +++ b/arch/x86/platform/efi/quirks.c
> @@ -201,6 +201,10 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)
> return;
> }
>
> + /* No need to reserve regions that will never be freed. */
> + if (md.attribute & EFI_MEMORY_RUNTIME)
> + return;
> +
> size += addr % EFI_PAGE_SIZE;
> size = round_up(size, EFI_PAGE_SIZE);
> addr = round_down(addr, EFI_PAGE_SIZE);
Thanks Omar, I've picked this up for the urgent branch.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] x86/efi: don't try to reserve runtime regions Omar Sandoval <osandov@osandov.com> - 2017-04-05 01:50 +0200 Re: [PATCH] x86/efi: don't try to reserve runtime regions Matt Fleming <matt@codeblueprint.co.uk> - 2017-04-10 00:30 +0200
csiph-web