Linux EFI development
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>,
	Gen Zhang <blackgod016574@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Rob Bradford <robert.bradford@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-efi <linux-efi@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 4.19 17/49] efi/x86/Add missing error handling to old_memmap 1:1 mapping code
Date: Wed, 19 Jun 2019 16:58:12 -0400	[thread overview]
Message-ID: <20190619205812.GE2226@sasha-vm> (raw)
In-Reply-To: <CAKv+Gu9ZJ42=NJWDX4+DgkMWaSEakNw-yYiUtsUE48D-V6=7-w@mail.gmail.com>

On Sun, Jun 09, 2019 at 08:14:29PM +0200, Ard Biesheuvel wrote:
>On Sat, 8 Jun 2019 at 13:43, Sasha Levin <sashal@kernel.org> wrote:
>>
>> From: Gen Zhang <blackgod016574@gmail.com>
>>
>> [ 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 <blackgod016574@gmail.com>
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> Cc: Linus Torvalds <torvalds@linux-foundation.org>
>> Cc: Peter Zijlstra <peterz@infradead.org>
>> Cc: Rob Bradford <robert.bradford@intel.com>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: linux-efi@vger.kernel.org
>> Link: http://lkml.kernel.org/r/20190525112559.7917-2-ard.biesheuvel@linaro.org
>> Signed-off-by: Ingo Molnar <mingo@kernel.org>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>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.

--
Thanks,
Sasha

      reply	other threads:[~2019-06-19 20:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190608114232.8731-1-sashal@kernel.org>
2019-06-08 11:41 ` [PATCH AUTOSEL 4.19 17/49] efi/x86/Add missing error handling to old_memmap 1:1 mapping code Sasha Levin
2019-06-09 18:14   ` Ard Biesheuvel
2019-06-19 20:58     ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190619205812.GE2226@sasha-vm \
    --to=sashal@kernel.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=blackgod016574@gmail.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=robert.bradford@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox