[Regression] Focal kernel 5.4.0-92.103 fails to boot when Secure Encrypted Virtualization(SEV) is enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Xenial |
Invalid
|
Undecided
|
Unassigned | ||
Bionic |
Confirmed
|
High
|
Unassigned | ||
Focal |
Fix Released
|
High
|
Unassigned | ||
Hirsute |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[Impact]
The latest Focal kernel (linux-
The kernel panics with the following backtrace :
[ 1.531125] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.531760] EFI Variables Facility v0.08 2004-May-17
[ 1.532575] general protection fault: 0000 [#1] SMP NOPTI
[ 1.533116] CPU: 11 PID: 1 Comm: swapper/0 Not tainted 5.4.157-debug6 #15
[ 1.533788] Hardware name: Scaleway SCW-ENT1-L, BIOS 0.0.0 02/06/2015
[ 1.534429] RIP: 0010:efi_
[ 1.534949] Code: 00 48 85 c0 0f 85 b3 00 00 00 48 c7 c7 b0 db e2 a1 41 bd f4 ff ff ff e8 98 90 16 ff e9 e6 00 00 00 48 85 d2 0f 85 a5 00 00 00 <80> 3b 00 0f 84 b5 00 00 00 48 85 db 0f 84 ac 00 00 00 48 8b 3d 85
[ 1.535120] RSP: 0018:ffffb96e40
[ 1.535120] RAX: b6262a23e510e179 RBX: b625e392251db281 RCX: 0000000000000000
[ 1.535120] RDX: ffffb96e400cd000 RSI: ffff978437e5dc38 RDI: ffffffffa2121860
[ 1.535120] RBP: ffffb96e4001be10 R08: 0000000000000000 R09: 0000000000000228
[ 1.538947] R10: 0000000000000001 R11: 0000000000000000 R12: ffff978437e555a0
[ 1.538947] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[ 1.538947] FS: 000000000000000
[ 1.538947] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1.538947] CR2: 00000000ffffffff CR3: 00080011a060a001 CR4: 0000000000360ee0
[ 1.538947] Call Trace:
[ 1.538947] ? efi_rci2_
[ 1.538947] do_one_
[ 1.538947] kernel_
[ 1.538947] ? rest_init+0xb0/0xb0
[ 1.538947] kernel_
[ 1.538947] ret_from_
[ 1.538947] Modules linked in:
[ 1.545871] ---[ end trace 815dc8177e65da02 ]---
[ 1.546328] RIP: 0010:efi_
[ 1.546872] Code: 00 48 85 c0 0f 85 b3 00 00 00 48 c7 c7 b0 db e2 a1 41 bd f4 ff ff ff e8 98 90 16 ff e9 e6 00 00 00 48 85 d2 0f 85 a5 00 00 00 <80> 3b 00 0f 84 b5 00 00 00 48 85 db 0f 84 ac 00 00 00 48 8b 3d 85
[ 1.548703] RSP: 0018:ffffb96e40
[ 1.549218] RAX: b6262a23e510e179 RBX: b625e392251db281 RCX: 0000000000000000
[ 1.549916] RDX: ffffb96e400cd000 RSI: ffff978437e5dc38 RDI: ffffffffa2121860
[ 1.550617] RBP: ffffb96e4001be10 R08: 0000000000000000 R09: 0000000000000228
[ 1.551337] R10: 0000000000000001 R11: 0000000000000000 R12: ffff978437e555a0
[ 1.552036] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[ 1.552737] FS: 000000000000000
[ 1.553529] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1.554093] CR2: 00000000ffffffff CR3: 00080011a060a001 CR4: 0000000000360ee0
[ 1.554818] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 1.555335] Kernel Offset: 0x1fa00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000
[ 1.555335] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
-
The previous kernel (linux-
Bisection of the kernels b/w 5.4.0-91 and 5.4.0-92 identified the following commit as the source of regresssion :
# git bisect good
7ca05228f713c24
commit 7ca05228f713c24
Author: Lenny Szubowicz <email address hidden>
Date: Fri Sep 4 21:31:05 2020 -0400
efi: Support for MOK variable config table
BugLink: https:/
...
Since the panic happens in very early stages of boot, no trace of the panic is present in the log files and apparently it is not possible to collect a kernel crash dump, the crashkernel has not been enabled yet.
[Test case]
The kernel need to boot properly with SEV enabled.
[Potential regression]
The fix is very specific and restricted and should cause regressions, however it touches ioremap that is widely used.
description: | updated |
Changed in linux (Ubuntu Bionic): | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in linux (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
tags: |
added: verification-done-focal removed: verification-needed-focal |
Details of the bisected commit :
https:/ /kernel. ubuntu. com/git/ ubuntu/ ubuntu- focal.git/ commit/ ?id=7ca05228f71 3c24eb55574b36e 32d9b54c5a1b76
commit 7ca05228f713c24 eb55574b36e32d9 b54c5a1b76
Author: Lenny Szubowicz <email address hidden>
Date: Fri Sep 4 21:31:05 2020 -0400
efi: Support for MOK variable config table
BugLink: https:/ /bugs.launchpad .net/bugs/ 1928679
Because of system-specific EFI firmware limitations, EFI volatile
variables may not be capable of holding the required contents of
the Machine Owner Key (MOK) certificate store when the certificate
list grows above some size. Therefore, an EFI boot loader may pass
the MOK certs via a EFI configuration table created specifically for
this purpose to avoid this firmware limitation.
An EFI configuration table is a much more primitive mechanism
compared to EFI variables and is well suited for one-way passage
of static information from a pre-OS environment to the kernel.
This patch adds initial kernel support to recognize, parse,
and validate the EFI MOK configuration table, where named
entries contain the same data that would otherwise be provided
in similarly named EFI variables.
Additionally, this patch creates a sysfs binary file for each
EFI MOK configuration table entry found. These files are read-only
to root and are provided for use by user space utilities such as
mokutil.
A subsequent patch will load MOK certs into the trusted platform
key ring using this infrastructure.
Signed-off-by: Lenny Szubowicz <email address hidden> d1d9e89c8c5461f d1f6a27bb5)
Link: https://<email address hidden>
Signed-off-by: Ard Biesheuvel <email address hidden>
(cherry picked from commit 58c909022a5a56c
Signed-off-by: Dimitri John Ledkov <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Tim Gardner <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>
arch/x86/ kernel/ setup.c | 1 + platform/ efi/efi. c | 3 + firmware/ efi/Makefile | 1 + firmware/ efi/arm- init.c | 1 + firmware/ efi/efi. c | 6 + firmware/ efi/mokvar- table.c | 360 +++++++ +++++++ +++++++ +++++++ +++++++ + linux/efi. h | 34 ++++ firmware/ efi/mokvar- table.c
arch/x86/
drivers/
drivers/
drivers/
drivers/
include/
7 files changed, 406 insertions(+)
create mode 100644 drivers/