kdump/kexec does not work when UEFI secureboot and kernel lockdown enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-bluefield (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
* Explain the bug(s)
We've found that for Jammy 5.15 and also 5.4.0-1049 kernel running on Bluefield, the kdump doesn't work when enabling secure boot[1].
* How to test
Make sure kernel config:
CONFIG_
CONFIG_
CONFIG_
The kdump kernel we use is actually signed correctly
# file /boot/vmlinuz-
/boot/vmlinuz-
# kdump-config show
DUMP_MODE: kdump
USE_KDUMP: 1
KDUMP_SYSCTL: kernel.
KDUMP_COREDIR: /var/crash
crashkernel addr: 0xcfe00000
/boot/
kdump initrd:
/boot/
current state: Not ready to kdump
kdump-tools.service - Kernel crash dump capture service
Loaded: loaded (/lib/systemd/
Active: active (exited) since Thu 2023-04-13 19:21:01 UTC; 4 days ago
Process: 1975 ExecStart=
Main PID: 1975 (code=exited, status=0/SUCCESS)
Apr 13 19:20:59 br2-004-
Apr 13 19:20:59 br2-004-
Apr 13 19:20:59 br2-004-
Apr 13 19:20:59 br2-004-
Apr 13 19:21:01 br2-004-
Apr 13 19:21:01 br2-004-
* Possible reason
Currently, a problem faced by arm64 is if a kernel image is signed by a MOK key, loading it via the kexec_file_load() system call would be rejected with the error in dmesg
"Lockdown: kexec: kexec of unsigned images is restricted; see man kernel_lockdown.7".
I backported the two below [2]:
0d519cadf751 arm64: kexec_file: use more system keyrings to verify kernel image signature
c903dae8941d kexec, KEYS: make the code in bzImage64_
However still kdump/kexec fails due to lockdown
[ 353.298348] Lockdown: kexec: kexec of unsigned images is restricted; see man kernel_lockdown.7
[ 364.833004] audit: type=1400 audit(168661943
If I disable kernel lockdown (CONFIG_
* How to fix
I got it working (secure boot + lockdown config enabled + kdump/kexec) using kernel v6.4 on bluefield, which means if we backport properly, mostly missing some arch/arm64/ patches, to BlueField 5.15 kernel, we can get it working.
Reference
1. https:/
2. https:/
3. https:/
summary: |
- kdump/kexec does not work when UEFI secureboot enabled + kdump/kexec does not work when UEFI secureboot and kernel lockdown + enabled |
description: | updated |
Any update on this issue? Do we have ETA to have it addressed?