Re: [PATCH v2] x86/crash: Disable SGX in the kdump kernel
From: Yuanhe Shu
Date: Fri Nov 13 2026 - 06:47:24 EST
On 11/13/26 04:15, Borislav Petkov wrote:
> First of all this cmdline param naming is maximally unintuitive and why does
> it even exist in the first place?
Thanks for the review.
elfcorehdr= is passed by kexec, so every capture kernel boots with it
on the command line. We use it to detect the capture kernel, the same
way is_kdump_kernel() does: that helper checks
elfcorehdr_addr != ELFCORE_ADDR_MAX, and this parameter is what sets
the address.
It also keeps the disable logic in kdump-specific code in the x86
path, as suggested in the v1 review.
We looked at two places: adding an is_kdump_kernel() check in
setup_arch(), and this handler. We chose the latter to keep the
disable logic in kdump code rather than the generic boot path. As an
early parameter, it clears SGX before alternatives are patched.
--
Yuanhe