* [GIT PULL] EFI urgent fix
@ 2017-04-12 15:27 Matt Fleming
2017-04-12 15:27 ` [PATCH] x86/efi: Don't try to reserve runtime regions Matt Fleming
0 siblings, 1 reply; 8+ messages in thread
From: Matt Fleming @ 2017-04-12 15:27 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H . Peter Anvin
Cc: Matt Fleming, Ard Biesheuvel, linux-kernel, linux-efi, Dave Young,
Omar Sandoval, Peter Jones, stable
Folks, please pull the single below fix from Omar which fixes a kexec
boot regression.
I've based the pull on tip/efi/urgent since the EFI urgent queue
hasn't reached Linus' tree yet.
The following changes since commit 55d728a40d368ba80443be85c02e641fc9082a3f:
efi/fb: Avoid reconfiguration of BAR that covers the framebuffer (2017-04-05 12:25:53 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-urgent
for you to fetch changes up to 09ca0b10e8100a48aa94eb8649f4c6c904e5d196:
x86/efi: Don't try to reserve runtime regions (2017-04-12 16:17:20 +0100)
----------------------------------------------------------------
- Fix a crash on kexec boot introduced by the recent
efi_mem_reserve() code in the ESRT driver, which double-reserved
EFI runtime regions - Omar Sandoval
----------------------------------------------------------------
Omar Sandoval (1):
x86/efi: Don't try to reserve runtime regions
arch/x86/platform/efi/quirks.c | 4 ++++
1 file changed, 4 insertions(+)
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH] x86/efi: Don't try to reserve runtime regions
2017-04-12 15:27 [GIT PULL] EFI urgent fix Matt Fleming
@ 2017-04-12 15:27 ` Matt Fleming
0 siblings, 0 replies; 8+ messages in thread
From: Matt Fleming @ 2017-04-12 15:27 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H . Peter Anvin
Cc: Omar Sandoval, Ard Biesheuvel, linux-kernel, linux-efi,
Matt Fleming, Dave Young, Peter Jones, stable
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:
[ 0.001000] general protection fault: 0000 [#1] SMP
[ 0.001000] Modules linked in:
[ 0.001000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.11.0-rc1 #53
[ 0.001000] Hardware name: Wiwynn Leopard-Orv2/Leopard-DDR BW, BIOS LBM05 09/30/2016
[ 0.001000] task: ffffffff81e0e4c0 task.stack: ffffffff81e00000
[ 0.001000] RIP: 0010:virt_efi_set_variable+0x85/0x1a0
[ 0.001000] RSP: 0000:ffffffff81e03e18 EFLAGS: 00010202
[ 0.001000] RAX: afafafafafafafaf RBX: ffffffff81e3a4e0 RCX: 0000000000000007
[ 0.001000] RDX: ffffffff81e03e70 RSI: ffffffff81e3a4e0 RDI: ffff88407f8c2de0
[ 0.001000] RBP: ffffffff81e03e60 R08: 0000000000000000 R09: 0000000000000000
[ 0.001000] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff81e03e70
[ 0.001000] R13: 0000000000000007 R14: 0000000000000000 R15: 0000000000000000
[ 0.001000] FS: 0000000000000000(0000) GS:ffff881fff600000(0000) knlGS:0000000000000000
[ 0.001000] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 0.001000] CR2: ffff88407f30f000 CR3: 0000001fff102000 CR4: 00000000000406b0
[ 0.001000] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 0.001000] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 0.001000] Call Trace:
[ 0.001000] efi_delete_dummy_variable+0x7a/0x80
[ 0.001000] efi_enter_virtual_mode+0x3e2/0x494
[ 0.001000] start_kernel+0x392/0x418
[ 0.001000] ? set_init_arg+0x55/0x55
[ 0.001000] x86_64_start_reservations+0x2a/0x2c
[ 0.001000] x86_64_start_kernel+0xea/0xed
[ 0.001000] start_cpu+0x14/0x14
[ 0.001000] Code: 42 25 8d ff 80 3d 43 77 95 00 00 75 68 9c 8f 04 24 48 8b 05 3e 7d 7e 00 48 89 de 4d 89 f9 4d 89 f0 44 89 e9 4c 89 e2 48 8b 40 58 <48> 8b 78 58 31 c0 e8 90 e4 92 ff 48 8b 3c 24 48 c7 c6 2b 0a ca
[ 0.001000] RIP: virt_efi_set_variable+0x85/0x1a0 RSP: ffffffff81e03e18
[ 0.001000] ---[ end trace 0bd213e540e9b19f ]---
[ 0.001000] Kernel panic - not syncing: Fatal exception
[ 0.001000] ---[ end Kernel panic - not syncing: Fatal exception
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>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Dave Young <dyoung@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Jones <pjones@redhat.com>
Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
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);
--
2.10.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [GIT PULL] EFI urgent fix
@ 2016-05-13 20:34 Matt Fleming
0 siblings, 0 replies; 8+ messages in thread
From: Matt Fleming @ 2016-05-13 20:34 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H . Peter Anvin
Cc: Matt Fleming, Ard Biesheuvel, linux-kernel, linux-efi,
Alex Thorlton, Borislav Petkov, Dimitri Sivanich, Ingo Molnar,
Mike Travis, Russ Anderson, stable, x86
The following changes since commit c10fcb14c7afd6688c7b197a814358fecf244222:
x86/sysfb_efi: Fix valid BAR address range check (2016-05-05 16:01:00 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent
for you to fetch changes up to 6f4c184576aeb5594b8d21f9e7206b7b62e3d96e:
x86/efi: Fix 7th argument to efi_call (2016-05-13 21:12:13 +0100)
----------------------------------------------------------------
* Fix passing of 7 parameters or more to efi_call. This issue is only
triggered on SGI/UV systems - Alex Thorlton
----------------------------------------------------------------
Alex Thorlton (1):
x86/efi: Fix 7th argument to efi_call
arch/x86/platform/efi/efi_stub_64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 8+ messages in thread* [GIT PULL] EFI urgent fix
@ 2015-11-04 10:47 Matt Fleming
2015-11-04 10:50 ` Thomas Gleixner
0 siblings, 1 reply; 8+ messages in thread
From: Matt Fleming @ 2015-11-04 10:47 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H . Peter Anvin
Cc: Matt Fleming, linux-kernel, linux-efi, Andy Lutomirski,
Borislav Petkov, Huang, Ying, Laszlo Ersek, Paolo Bonzini, stable
Folks, the LKP robot reported an issue with Paolo's recent bug fix
that syncs the identity mapping in 'initial_page_table'. Turns out
that KERNEL_PGD_PTRS is not the correct constant to use when copying
to the lower region because that's every PGD from PAGE_OFFSET to the
end of the addressable memory.
Crucially, KERNEL_PGD_PTRS > KERNEL_PGD_BOUNDARY and so the patch ends
up trashing some of the kernel mappings in 'initial_page'table,
leading to boot crashes on 32-bit SMP when bringing APs online.
The following changes since commit 9ee870feaa9e0c6abef95a3b1fc518d88adfa2d3:
Merge branch 'x86/cpufeature' into x86/urgent, to pick up pending Intel MID change (2015-11-03 12:00:40 +0100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent
for you to fetch changes up to 5965d1bbeba70fe3626e4537f4729283cb0e75f7:
x86/setup: Fix recent boot crash on 32-bit SMP machines (2015-11-04 09:26:24 +0000)
----------------------------------------------------------------
* Avoid trashing the kernel mappings in 'initial_page_table' when
copying the identity mapping from 'swapper_pg_dir'. This bug was
introduced by a bug fix in v4.3 which erroneously copies too many
entries from 'swapper_pg_dir'.
----------------------------------------------------------------
Matt Fleming (1):
x86/setup: Fix recent boot crash on 32-bit SMP machines
arch/x86/kernel/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [GIT PULL] EFI urgent fix
2015-11-04 10:47 Matt Fleming
@ 2015-11-04 10:50 ` Thomas Gleixner
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Gleixner @ 2015-11-04 10:50 UTC (permalink / raw)
To: Matt Fleming
Cc: Ingo Molnar, H . Peter Anvin, linux-kernel, linux-efi,
Andy Lutomirski, Borislav Petkov, Huang, Ying, Laszlo Ersek,
Paolo Bonzini, stable
On Wed, 4 Nov 2015, Matt Fleming wrote:
> for you to fetch changes up to 5965d1bbeba70fe3626e4537f4729283cb0e75f7:
>
> x86/setup: Fix recent boot crash on 32-bit SMP machines (2015-11-04 09:26:24 +0000)
I just picked that up manually :)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [GIT PULL] EFI urgent fix
@ 2015-10-16 10:01 Matt Fleming
2015-10-16 10:04 ` Ingo Molnar
0 siblings, 1 reply; 8+ messages in thread
From: Matt Fleming @ 2015-10-16 10:01 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin
Cc: Matt Fleming, linux-kernel, linux-efi, Andy Lutomirski,
Borislav Petkov, Laszlo Ersek, Paolo Bonzini, stable
From: Matt Fleming <matt.fleming@intel.com>
Folks, the below fix from Paolo addresses an issue causing 32-bit
non-PAE kernels to triple fault on EFI boot. The issue is that the
physical address of the GDT that gets used in efi_call_phys_prolog()
won't be covered by the identitty mapping in initial_page_table.
The following changes since commit 8a53554e12e98d1759205afd7b8e9e2ea0936f48:
x86/efi: Fix multiple GOP device support (2015-10-14 16:02:43 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent
for you to fetch changes up to f5f3497cad8c8416a74b9aaceb127908755d020a:
x86/setup: Extend low identity map to cover whole kernel range (2015-10-16 10:52:29 +0100)
----------------------------------------------------------------
* Ensure that the identity mapping in initial_page_table is updated
to cover the entire kernel range. This fixes a triple fault on
non-PAE kernels when booting on 32-bit EFI due to accessing an
unmapped GDT in efi_call_phys_prolog() - Paolo Bonzini
----------------------------------------------------------------
Paolo Bonzini (1):
x86/setup: Extend low identity map to cover whole kernel range
arch/x86/kernel/setup.c | 8 ++++++++
1 file changed, 8 insertions(+)
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [GIT PULL] EFI urgent fix
2015-10-16 10:01 Matt Fleming
@ 2015-10-16 10:04 ` Ingo Molnar
0 siblings, 0 replies; 8+ messages in thread
From: Ingo Molnar @ 2015-10-16 10:04 UTC (permalink / raw)
To: Matt Fleming
Cc: Thomas Gleixner, H. Peter Anvin, Matt Fleming, linux-kernel,
linux-efi, Andy Lutomirski, Borislav Petkov, Laszlo Ersek,
Paolo Bonzini, stable
* Matt Fleming <matt@codeblueprint.co.uk> wrote:
> From: Matt Fleming <matt.fleming@intel.com>
>
> Folks, the below fix from Paolo addresses an issue causing 32-bit
> non-PAE kernels to triple fault on EFI boot. The issue is that the
> physical address of the GDT that gets used in efi_call_phys_prolog()
> won't be covered by the identitty mapping in initial_page_table.
>
> The following changes since commit 8a53554e12e98d1759205afd7b8e9e2ea0936f48:
>
> x86/efi: Fix multiple GOP device support (2015-10-14 16:02:43 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent
>
> for you to fetch changes up to f5f3497cad8c8416a74b9aaceb127908755d020a:
>
> x86/setup: Extend low identity map to cover whole kernel range (2015-10-16 10:52:29 +0100)
>
> ----------------------------------------------------------------
> * Ensure that the identity mapping in initial_page_table is updated
> to cover the entire kernel range. This fixes a triple fault on
> non-PAE kernels when booting on 32-bit EFI due to accessing an
> unmapped GDT in efi_call_phys_prolog() - Paolo Bonzini
>
> ----------------------------------------------------------------
> Paolo Bonzini (1):
> x86/setup: Extend low identity map to cover whole kernel range
>
> arch/x86/kernel/setup.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Pulled, thanks Matt!
Ingo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [GIT PULL] EFI urgent fix
@ 2015-10-12 14:13 Matt Fleming
0 siblings, 0 replies; 8+ messages in thread
From: Matt Fleming @ 2015-10-12 14:13 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin
Cc: Matt Fleming, linux-kernel, linux-efi,
Kővágó, Zoltán, Matthew Garrett, stable
From: Matt Fleming <matt.fleming@intel.com>
Please pull the following fix from Zoltán which addresses a bug that
resulted in the the secondary GOP display being garbled when booting
using the EFI boot stub.
The following changes since commit 825fcfce81921c9cc4ef801d844793815721e458:
MAINTAINERS: Change Matt Fleming's email address (2015-10-11 09:54:29 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent
for you to fetch changes up to dc1ea95fd23c36dd6be284334a0c8327d11d8c52:
x86/efi: Fix multiple GOP device support (2015-10-11 11:40:54 +0100)
----------------------------------------------------------------
* Fix booting using the EFI boot stub on platforms with multiple
Graphics Output Protocol devices because currently the secondary
display will be garbled on such systems - Zoltán Kővágó
----------------------------------------------------------------
Kővágó, Zoltán (1):
x86/efi: Fix multiple GOP device support
arch/x86/boot/compressed/eboot.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-04-12 15:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-12 15:27 [GIT PULL] EFI urgent fix Matt Fleming
2017-04-12 15:27 ` [PATCH] x86/efi: Don't try to reserve runtime regions Matt Fleming
-- strict thread matches above, loose matches on Subject: below --
2016-05-13 20:34 [GIT PULL] EFI urgent fix Matt Fleming
2015-11-04 10:47 Matt Fleming
2015-11-04 10:50 ` Thomas Gleixner
2015-10-16 10:01 Matt Fleming
2015-10-16 10:04 ` Ingo Molnar
2015-10-12 14:13 Matt Fleming
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).