Kconfig.debug 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. config ARM64_PTDUMP_CORE
  2. def_bool n
  3. config ARM64_PTDUMP_DEBUGFS
  4. bool "Export kernel pagetable layout to userspace via debugfs"
  5. depends on DEBUG_KERNEL
  6. select ARM64_PTDUMP_CORE
  7. select DEBUG_FS
  8. help
  9. Say Y here if you want to show the kernel pagetable layout in a
  10. debugfs file. This information is only useful for kernel developers
  11. who are working in architecture specific areas of the kernel.
  12. It is probably not a good idea to enable this feature in a production
  13. kernel.
  14. If in doubt, say N.
  15. config PID_IN_CONTEXTIDR
  16. bool "Write the current PID to the CONTEXTIDR register"
  17. help
  18. Enabling this option causes the kernel to write the current PID to
  19. the CONTEXTIDR register, at the expense of some additional
  20. instructions during context switch. Say Y here only if you are
  21. planning to use hardware trace tools with this kernel.
  22. config ARM64_RANDOMIZE_TEXT_OFFSET
  23. bool "Randomize TEXT_OFFSET at build time"
  24. help
  25. Say Y here if you want the image load offset (AKA TEXT_OFFSET)
  26. of the kernel to be randomized at build-time. When selected,
  27. this option will cause TEXT_OFFSET to be randomized upon any
  28. build of the kernel, and the offset will be reflected in the
  29. text_offset field of the resulting Image. This can be used to
  30. fuzz-test bootloaders which respect text_offset.
  31. This option is intended for bootloader and/or kernel testing
  32. only. Bootloaders must make no assumptions regarding the value
  33. of TEXT_OFFSET and platforms must not require a specific
  34. value.
  35. config DEBUG_WX
  36. bool "Warn on W+X mappings at boot"
  37. select ARM64_PTDUMP_CORE
  38. ---help---
  39. Generate a warning if any W+X mappings are found at boot.
  40. This is useful for discovering cases where the kernel is leaving
  41. W+X mappings after applying NX, as such mappings are a security risk.
  42. This check also includes UXN, which should be set on all kernel
  43. mappings.
  44. Look for a message in dmesg output like this:
  45. arm64/mm: Checked W+X mappings: passed, no W+X pages found.
  46. or like this, if the check failed:
  47. arm64/mm: Checked W+X mappings: FAILED, <N> W+X pages found.
  48. Note that even if the check fails, your kernel is possibly
  49. still fine, as W+X mappings are not a security hole in
  50. themselves, what they do is that they make the exploitation
  51. of other unfixed kernel bugs easier.
  52. There is no runtime or memory usage effect of this option
  53. once the kernel has booted up - it's a one time check.
  54. If in doubt, say "Y".
  55. config DEBUG_ALIGN_RODATA
  56. depends on STRICT_KERNEL_RWX
  57. bool "Align linker sections up to SECTION_SIZE"
  58. help
  59. If this option is enabled, sections that may potentially be marked as
  60. read only or non-executable will be aligned up to the section size of
  61. the kernel. This prevents sections from being split into pages and
  62. avoids a potential TLB penalty. The downside is an increase in
  63. alignment and potentially wasted space. Turn on this option if
  64. performance is more important than memory pressure.
  65. If in doubt, say N.
  66. config DEBUG_EFI
  67. depends on EFI && DEBUG_INFO
  68. bool "UEFI debugging"
  69. help
  70. Enable this option to include EFI specific debugging features into
  71. the kernel that are only useful when using a debug build of the
  72. UEFI firmware
  73. config ARM64_RELOC_TEST
  74. depends on m
  75. tristate "Relocation testing module"
  76. source "drivers/hwtracing/coresight/Kconfig"