From: Mike Galbraith <efault@gmx.de>
To: Dave Young <dyoung@redhat.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
kexec@lists.infradead.org, lkml <linux-kernel@vger.kernel.org>,
Baoquan He <bhe@redhat.com>
Subject: Re: [PATCH] x86, kdump: Fix efi=noruntime NULL pointer dereference
Date: Thu, 09 Aug 2018 09:33:30 +0200 [thread overview]
Message-ID: <1533800010.5087.71.camel@gmx.de> (raw)
In-Reply-To: <20180809042153.GA4377@dhcp-128-65.nay.redhat.com>
On Thu, 2018-08-09 at 12:21 +0800, Dave Young wrote:
> Hi Mike,
>
> Thanks for the patch!
> On 08/08/18 at 04:03pm, Mike Galbraith wrote:
> > When booting with efi=noruntime, we call efi_runtime_map_copy() while
> > loading the kdump kernel, and trip over a NULL efi.memmap.map. Avoid
> > that and a useless allocation when the only mapping we can use (1:1)
> > is not available.
>
> At first glance, efi_get_runtime_map_size should return 0 in case
> noruntime.
What efi does internally at unmap time is to leave everything except
efi.mmap.map untouched, setting it to NULL and turning off EFI_MEMMAP,
rendering efi.mmap.map accessors useless/unsafe without first checking
EFI_MEMMAP.
-Mike
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Mike Galbraith <efault@gmx.de>
To: Dave Young <dyoung@redhat.com>
Cc: Baoquan He <bhe@redhat.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
lkml <linux-kernel@vger.kernel.org>,
kexec@lists.infradead.org
Subject: Re: [PATCH] x86, kdump: Fix efi=noruntime NULL pointer dereference
Date: Thu, 09 Aug 2018 09:33:30 +0200 [thread overview]
Message-ID: <1533800010.5087.71.camel@gmx.de> (raw)
In-Reply-To: <20180809042153.GA4377@dhcp-128-65.nay.redhat.com>
On Thu, 2018-08-09 at 12:21 +0800, Dave Young wrote:
> Hi Mike,
>
> Thanks for the patch!
> On 08/08/18 at 04:03pm, Mike Galbraith wrote:
> > When booting with efi=noruntime, we call efi_runtime_map_copy() while
> > loading the kdump kernel, and trip over a NULL efi.memmap.map. Avoid
> > that and a useless allocation when the only mapping we can use (1:1)
> > is not available.
>
> At first glance, efi_get_runtime_map_size should return 0 in case
> noruntime.
What efi does internally at unmap time is to leave everything except
efi.mmap.map untouched, setting it to NULL and turning off EFI_MEMMAP,
rendering efi.mmap.map accessors useless/unsafe without first checking
EFI_MEMMAP.
-Mike
next prev parent reply other threads:[~2018-08-09 7:33 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-08 14:03 [PATCH] x86, kdump: Fix efi=noruntime NULL pointer dereference Mike Galbraith
2018-08-09 4:21 ` Dave Young
2018-08-09 4:21 ` Dave Young
2018-08-09 5:05 ` Mike Galbraith
2018-08-09 5:05 ` Mike Galbraith
2018-08-09 7:33 ` Mike Galbraith [this message]
2018-08-09 7:33 ` Mike Galbraith
2018-08-09 9:13 ` Dave Young
2018-08-09 9:13 ` Dave Young
2018-08-21 13:39 ` Ard Biesheuvel
2018-08-21 13:39 ` Ard Biesheuvel
2018-08-22 10:23 ` Dave Young
2018-08-22 10:23 ` Dave Young
2018-08-23 3:57 ` Dave Young
2018-08-23 3:57 ` Dave Young
2018-08-23 4:08 ` Mike Galbraith
2018-08-23 4:08 ` Mike Galbraith
2018-08-23 4:08 ` Mike Galbraith
2018-08-24 4:48 ` Mike Galbraith
2018-08-24 4:48 ` Mike Galbraith
2018-08-24 4:48 ` Mike Galbraith
2018-08-24 6:49 ` Dave Young
2018-08-24 6:49 ` Dave Young
2018-08-10 8:45 ` Dave Young
2018-08-10 10:23 ` Mike Galbraith
2018-08-10 10:28 ` Dave Young
2018-08-10 17:39 ` Mike Galbraith
2018-08-15 3:59 ` Dave Young
2018-08-15 4:57 ` Mike Galbraith
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=1533800010.5087.71.camel@gmx.de \
--to=efault@gmx.de \
--cc=bhe@redhat.com \
--cc=bigeasy@linutronix.de \
--cc=dyoung@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.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 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.