Kexec and crash features
CONFIG_CRASH_RESERVE
CONFIG_VMCORE_INFO
CONFIG_KEXEC_CORE
CONFIG_KEXEC_ELF
CONFIG_HAVE_IMA_KEXEC
CONFIG_KEXEC Enable kexec system call
kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot but it is independent of the system firmware. And like a reboot you can start any kernel with it, not just Linux.
The name comes from the similarity to the exec system call.
It is an ongoing process to be certain the hardware in a machine is properly shutdown, so do not be surprised if this code does not initially work for you. As of this writing the exact hardware interface is strongly in flux, so no good recommendation can be made.
- Depends on
- Selects
KEXEC_CORE if
CONFIG_KEXEC_FILE Enable kexec file based system call
This is new version of kexec system call. This system call is file based and takes file descriptors as system call argument for kernel and initramfs as opposed to list of segments as accepted by kexec system call.
- Depends on
- Selects
CRYPTO_LIB_SHA256 if - Selects
KEXEC_CORE if
If KEXEC_FILE
CONFIG_KEXEC_SIG Verify kernel signature during kexec_file_load() syscall
This option makes the kexec_file_load() syscall check for a valid signature of the kernel image. The image can still be loaded without a valid signature unless you also enable KEXEC_SIG_FORCE, though if there's a signature that we can check, then it must be valid.
In addition to this option, you need to enable signature verification for the corresponding kernel image type being loaded in order for this to work.
- Depends on
&& KEXEC_FILE
If KEXEC_SIG
CONFIG_KEXEC_SIG_FORCE Require a valid signature in kexec_file_load() syscall
This option makes kernel signature verification mandatory for the kexec_file_load() syscall.
- Depends on
ARCH_SUPPORTS_KEXEC_SIG_FORCE && KEXEC_SIG
CONFIG_KEXEC_IMAGE_VERIFY_SIG Enable Image signature verification support (ARM)
Enable Image signature verification support.
- Depends on
ARCH_SUPPORTS_KEXEC_IMAGE_VERIFY_SIG && KEXEC_SIG && && SIGNED_PE_FILE_VERIFICATION
CONFIG_KEXEC_BZIMAGE_VERIFY_SIG Enable bzImage signature verification support
Enable bzImage signature verification support.
CONFIG_KEXEC_JUMP kexec jump
Jump between original kernel and kexeced kernel and invoke code in physical address mode via KEXEC
- Depends on
&& KEXEC && HIBERNATION
CONFIG_CRASH_DUMP kernel crash dumps
Generate crash dump after being started by kexec. This should be normally only set in special crash dump kernels which are loaded in the main kernel with kexec-tools into a specially reserved region and then later executed after a crash by kdump/kexec. The crash dump kernel must be compiled to a memory address not used by the main kernel or BIOS using PHYSICAL_START, or it must be built as a relocatable image (CONFIG_RELOCATABLE=y). For more details see Documentation/admin-guide/kdump/kdump.rst
For s390, this option also enables zfcpdump. See also <file:Documentation/arch/s390/zfcpdump.rst>
- Depends on
&& KEXEC_CORE - Selects
VMCORE_INFO if && KEXEC_CORE - Selects
CRASH_RESERVE if && KEXEC_CORE
If CRASH_DUMP
CONFIG_CRASH_DM_CRYPT Support saving crash dump to dm-crypt encrypted volume
With this option enabled, user space can intereact with /sys/kernel/config/crash_dm_crypt_keys to make the dm crypt keys persistent for the dump-capture kernel.
- Depends on
KEXEC_FILE && CRASH_DUMP && DM_CRYPT && KEYS
CONFIG_CRASH_DM_CRYPT_CONFIGS
- Off
- Module
- Built in
CRASH_DM_CRYPT cannot directly select CONFIGFS_FS, because that is required to be built-in.
- Selects
CONFIGFS_FS
CONFIG_CRASH_DUMP_KUNIT_TEST Unit Tests for kernel crash dumps
- Off
- Module
- Built in
This option builds KUnit unit tests for kernel crash dumps. The unit tests will be used to verify the correctness of covered functions and also prevent any regression.
If unsure, say N.
- Depends on
CRASH_DUMP && KUNIT
CONFIG_CRASH_HOTPLUG Update the crash elfcorehdr on system configuration changes
Enable direct update to the crash elfcorehdr (which contains the list of CPUs and memory regions to be dumped upon a crash) in response to hot plug/unplug or online/offline of CPUs or memory. This is a much more advanced approach than userspace attempting that.
If unsure, say Y.
- Depends on
CRASH_DUMP && ( || MEMORY_HOTPLUG) &&
If CRASH_HOTPLUG
CONFIG_CRASH_MAX_MEMORY_RANGES Specify the maximum number of memory regions for the elfcorehdr
For the kexec_file_load() syscall path, specify the maximum number of memory regions that the elfcorehdr buffer/segment can accommodate. These regions are obtained via walk_system_ram_res(); eg. the 'System RAM' entries in /proc/iomem. This value is combined with NR_CPUS and multiplied by sizeof(Elf64_Phdr) to determine the final elfcorehdr memory buffer/ segment size. The value 8192, for example, covers a (sparsely populated) 1TiB system consisting of 128MiB memblocks, while resulting in an elfcorehdr memory buffer/segment size under 1MiB. This represents a sane choice to accommodate both baremetal and virtual machine configurations.
For the kexec_load() syscall path, CRASH_MAX_MEMORY_RANGES is part of the computation behind the value provided through the /sys/kernel/crash_elfcorehdr_size attribute.