[lkml]   [2019]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH AUTOSEL 4.19 17/49] efi/x86/Add missing error handling to old_memmap 1:1 mapping code
On Sun, Jun 09, 2019 at 08:14:29PM +0200, Ard Biesheuvel wrote:
>On Sat, 8 Jun 2019 at 13:43, Sasha Levin <> wrote:
>> From: Gen Zhang <>
>> [ Upstream commit 4e78921ba4dd0aca1cc89168f45039add4183f8e ]
>> The old_memmap flow in efi_call_phys_prolog() performs numerous memory
>> allocations, and either does not check for failure at all, or it does
>> but fails to propagate it back to the caller, which may end up calling
>> into the firmware with an incomplete 1:1 mapping.
>> So let's fix this by returning NULL from efi_call_phys_prolog() on
>> memory allocation failures only, and by handling this condition in the
>> caller. Also, clean up any half baked sets of page tables that we may
>> have created before returning with a NULL return value.
>> Note that any failure at this level will trigger a panic() two levels
>> up, so none of this makes a huge difference, but it is a nice cleanup
>> nonetheless.
>> [ardb: update commit log, add efi_call_phys_epilog() call on error path]
>> Signed-off-by: Gen Zhang <>
>> Signed-off-by: Ard Biesheuvel <>
>> Cc: Linus Torvalds <>
>> Cc: Peter Zijlstra <>
>> Cc: Rob Bradford <>
>> Cc: Thomas Gleixner <>
>> Cc:
>> Link:
>> Signed-off-by: Ingo Molnar <>
>> Signed-off-by: Sasha Levin <>
>This was already discussed in the thread that proposed this patch for
>stable: please don't queue this right now, the patches are more likely
>to harm than hurt, and they certainly don't fix a security
>vulnerability, as has been claimed.

I've dropped this, thank you.


 \ /
  Last update: 2019-06-19 22:58    [W:0.066 / U:3.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site