From: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
To: Laura Abbott <labbott-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Justin Forbes <jforbes-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Ard Biesheuvel
<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: [REGRESSION] EFI mixed mode patch triggers boot failure
Date: Thu, 20 Oct 2016 13:03:57 +0100 [thread overview]
Message-ID: <20161020120357.GB19876@codeblueprint.co.uk> (raw)
In-Reply-To: <7af87cde-ce79-d6e8-0797-54069a77f42b-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Wed, 19 Oct, at 02:13:00PM, Laura Abbott wrote:
> On 10/19/2016 01:04 PM, Laura Abbott wrote:
> >Hi,
> >
> >Fedora received a bug report https://bugzilla.redhat.com/show_bug.cgi?id=1384238
> >of a bootup failure with stable 4.7.6. efi=noruntime fixed the bootup problem.
> >1297667083d5442aafe3e337b9413bf02b114edb was linked as the cause
> >of the problem.
> >
> >
> >x86/efi: Only map RAM into EFI page tables if in mixed-mode
> >
> >Waiman reported that booting with CONFIG_EFI_MIXED enabled on his
> >multi-terabyte HP machine results in boot crashes, because the EFI
> >region mapping functions loop forever while trying to map those
> >regions describing RAM.
> >
> >While this patch doesn't fix the underlying hang, there's really no
> >reason to map EFI_CONVENTIONAL_MEMORY regions into the EFI page tables
> >when mixed-mode is not in use at runtime.
> >
> >Reported-by: Waiman Long <waiman.long-ZPxbGqLxI0U@public.gmane.org>
> >Cc: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> >Cc: Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
> >Cc: Linus Torvalds <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
> >CC: Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>
> >Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> >Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
> >Cc: Scott J Norton <scott.norton-ZPxbGqLxI0U@public.gmane.org>
> >Cc: Douglas Hatch <doug.hatch-ZPxbGqLxI0U@public.gmane.org>
> >Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v4.6+
> >Signed-off-by: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
> >
> >I made a request in the bugzilla for the reporter to
> >give a bootlog with efi=debug which I'm still waiting on.
> >
> >Any ideas?
> >
> >Thanks,
> >Laura
>
> dmesg with efi=debug from the reporter is attached
> [ 0.000000] DMI: Hewlett-Packard Compaq CQ58 Notebook PC/188B, BIOS F.36 06/07/2013
Hmm.. this is a fairly old machine, what kernel versions has the
reporter successfully run on it? The code that was nop'd out in the
above commit for the native case only came into existence in v4.6.
The fact that booting with efi=old_map does *not* seem to result in a
booting kernel is very suspicious. Could you ask them to double-check?
Maybe try this patch too on v4.7.6.
---
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 964c7022d31d..b07183c6b470 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -244,9 +244,12 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
* text and allocate a new stack because we can't rely on the
* stack pointer being < 4GB.
*/
- if (!IS_ENABLED(CONFIG_EFI_MIXED) || efi_is_native())
+ if (!IS_ENABLED(CONFIG_EFI_MIXED))
return 0;
+ if (efi_is_native())
+ goto map_text;
+
/*
* Map all of RAM so that we can access arguments in the 1:1
* mapping when making EFI runtime calls.
@@ -273,6 +276,7 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
efi_scratch.phys_stack = virt_to_phys(page_address(page));
efi_scratch.phys_stack += PAGE_SIZE; /* stack grows down */
+map_text:
npages = (_etext - _text) >> PAGE_SHIFT;
text = __pa(_text);
pfn = text >> PAGE_SHIFT;
next prev parent reply other threads:[~2016-10-20 12:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 20:04 [REGRESSION] EFI mixed mode patch triggers boot failure Laura Abbott
2016-10-19 21:13 ` Laura Abbott
[not found] ` <7af87cde-ce79-d6e8-0797-54069a77f42b-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-20 12:03 ` Matt Fleming [this message]
[not found] ` <20161020120357.GB19876-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-10-24 19:54 ` Laura Abbott
[not found] ` <e34311e8-fe39-3b65-bd6d-8f1594e56336-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-27 22:34 ` Matt Fleming
[not found] ` <20170127223441.GJ31613-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2017-01-28 8:35 ` Laura Abbott
2017-01-30 13:10 ` Jiri Kosina
[not found] ` <alpine.LSU.2.20.1701301409270.25515-YHPUNQjx9ReKbouaWp301Q@public.gmane.org>
2017-02-01 17:35 ` Laura Abbott
[not found] ` <1208352f-ab6a-4489-d6b1-2f3e537f5e60-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-02-23 20:34 ` Jiri Kosina
[not found] ` <alpine.LSU.2.20.1702232132360.24579-YHPUNQjx9ReKbouaWp301Q@public.gmane.org>
2017-02-23 23:02 ` Laura Abbott
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=20161020120357.GB19876@codeblueprint.co.uk \
--to=matt-mf/unelci9gs6ibeejttw/xrex20p6io@public.gmane.org \
--cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=jforbes-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=labbott-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).