Kconfig.kexec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menu "Kexec and crash features"
  3. config CRASH_RESERVE
  4. bool
  5. config VMCORE_INFO
  6. bool
  7. config KEXEC_CORE
  8. bool
  9. config KEXEC_ELF
  10. bool
  11. config HAVE_IMA_KEXEC
  12. bool
  13. config KEXEC
  14. bool "Enable kexec system call"
  15. depends on ARCH_SUPPORTS_KEXEC
  16. select KEXEC_CORE
  17. help
  18. kexec is a system call that implements the ability to shutdown your
  19. current kernel, and to start another kernel. It is like a reboot
  20. but it is independent of the system firmware. And like a reboot
  21. you can start any kernel with it, not just Linux.
  22. The name comes from the similarity to the exec system call.
  23. It is an ongoing process to be certain the hardware in a machine
  24. is properly shutdown, so do not be surprised if this code does not
  25. initially work for you. As of this writing the exact hardware
  26. interface is strongly in flux, so no good recommendation can be
  27. made.
  28. config KEXEC_FILE
  29. bool "Enable kexec file based system call"
  30. depends on ARCH_SUPPORTS_KEXEC_FILE
  31. select CRYPTO
  32. select CRYPTO_SHA256
  33. select KEXEC_CORE
  34. help
  35. This is new version of kexec system call. This system call is
  36. file based and takes file descriptors as system call argument
  37. for kernel and initramfs as opposed to list of segments as
  38. accepted by kexec system call.
  39. config KEXEC_SIG
  40. bool "Verify kernel signature during kexec_file_load() syscall"
  41. depends on ARCH_SUPPORTS_KEXEC_SIG
  42. depends on KEXEC_FILE
  43. help
  44. This option makes the kexec_file_load() syscall check for a valid
  45. signature of the kernel image. The image can still be loaded without
  46. a valid signature unless you also enable KEXEC_SIG_FORCE, though if
  47. there's a signature that we can check, then it must be valid.
  48. In addition to this option, you need to enable signature
  49. verification for the corresponding kernel image type being
  50. loaded in order for this to work.
  51. config KEXEC_SIG_FORCE
  52. bool "Require a valid signature in kexec_file_load() syscall"
  53. depends on ARCH_SUPPORTS_KEXEC_SIG_FORCE
  54. depends on KEXEC_SIG
  55. help
  56. This option makes kernel signature verification mandatory for
  57. the kexec_file_load() syscall.
  58. config KEXEC_IMAGE_VERIFY_SIG
  59. bool "Enable Image signature verification support (ARM)"
  60. default ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG
  61. depends on ARCH_SUPPORTS_KEXEC_IMAGE_VERIFY_SIG
  62. depends on KEXEC_SIG
  63. depends on EFI && SIGNED_PE_FILE_VERIFICATION
  64. help
  65. Enable Image signature verification support.
  66. config KEXEC_BZIMAGE_VERIFY_SIG
  67. bool "Enable bzImage signature verification support"
  68. depends on ARCH_SUPPORTS_KEXEC_BZIMAGE_VERIFY_SIG
  69. depends on KEXEC_SIG
  70. depends on SIGNED_PE_FILE_VERIFICATION
  71. select SYSTEM_TRUSTED_KEYRING
  72. help
  73. Enable bzImage signature verification support.
  74. config KEXEC_JUMP
  75. bool "kexec jump"
  76. depends on ARCH_SUPPORTS_KEXEC_JUMP
  77. depends on KEXEC && HIBERNATION
  78. help
  79. Jump between original kernel and kexeced kernel and invoke
  80. code in physical address mode via KEXEC
  81. config CRASH_DUMP
  82. bool "kernel crash dumps"
  83. default ARCH_DEFAULT_CRASH_DUMP
  84. depends on ARCH_SUPPORTS_CRASH_DUMP
  85. depends on KEXEC_CORE
  86. select VMCORE_INFO
  87. select CRASH_RESERVE
  88. help
  89. Generate crash dump after being started by kexec.
  90. This should be normally only set in special crash dump kernels
  91. which are loaded in the main kernel with kexec-tools into
  92. a specially reserved region and then later executed after
  93. a crash by kdump/kexec. The crash dump kernel must be compiled
  94. to a memory address not used by the main kernel or BIOS using
  95. PHYSICAL_START, or it must be built as a relocatable image
  96. (CONFIG_RELOCATABLE=y).
  97. For more details see Documentation/admin-guide/kdump/kdump.rst
  98. For s390, this option also enables zfcpdump.
  99. See also <file:Documentation/arch/s390/zfcpdump.rst>
  100. config CRASH_HOTPLUG
  101. bool "Update the crash elfcorehdr on system configuration changes"
  102. default y
  103. depends on CRASH_DUMP && (HOTPLUG_CPU || MEMORY_HOTPLUG)
  104. depends on ARCH_SUPPORTS_CRASH_HOTPLUG
  105. help
  106. Enable direct update to the crash elfcorehdr (which contains
  107. the list of CPUs and memory regions to be dumped upon a crash)
  108. in response to hot plug/unplug or online/offline of CPUs or
  109. memory. This is a much more advanced approach than userspace
  110. attempting that.
  111. If unsure, say Y.
  112. config CRASH_MAX_MEMORY_RANGES
  113. int "Specify the maximum number of memory regions for the elfcorehdr"
  114. default 8192
  115. depends on CRASH_HOTPLUG
  116. help
  117. For the kexec_file_load() syscall path, specify the maximum number of
  118. memory regions that the elfcorehdr buffer/segment can accommodate.
  119. These regions are obtained via walk_system_ram_res(); eg. the
  120. 'System RAM' entries in /proc/iomem.
  121. This value is combined with NR_CPUS_DEFAULT and multiplied by
  122. sizeof(Elf64_Phdr) to determine the final elfcorehdr memory buffer/
  123. segment size.
  124. The value 8192, for example, covers a (sparsely populated) 1TiB system
  125. consisting of 128MiB memblocks, while resulting in an elfcorehdr
  126. memory buffer/segment size under 1MiB. This represents a sane choice
  127. to accommodate both baremetal and virtual machine configurations.
  128. For the kexec_load() syscall path, CRASH_MAX_MEMORY_RANGES is part of
  129. the computation behind the value provided through the
  130. /sys/kernel/crash_elfcorehdr_size attribute.
  131. endmenu