Kconfig.debug 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. menu "Kernel hacking"
  2. source "lib/Kconfig.debug"
  3. config ARM64_PTDUMP
  4. bool "Export kernel pagetable layout to userspace via debugfs"
  5. depends on DEBUG_KERNEL
  6. select DEBUG_FS
  7. help
  8. Say Y here if you want to show the kernel pagetable layout in a
  9. debugfs file. This information is only useful for kernel developers
  10. who are working in architecture specific areas of the kernel.
  11. It is probably not a good idea to enable this feature in a production
  12. kernel.
  13. If in doubt, say "N"
  14. config PID_IN_CONTEXTIDR
  15. bool "Write the current PID to the CONTEXTIDR register"
  16. help
  17. Enabling this option causes the kernel to write the current PID to
  18. the CONTEXTIDR register, at the expense of some additional
  19. instructions during context switch. Say Y here only if you are
  20. planning to use hardware trace tools with this kernel.
  21. config ARM64_RANDOMIZE_TEXT_OFFSET
  22. bool "Randomize TEXT_OFFSET at build time"
  23. help
  24. Say Y here if you want the image load offset (AKA TEXT_OFFSET)
  25. of the kernel to be randomized at build-time. When selected,
  26. this option will cause TEXT_OFFSET to be randomized upon any
  27. build of the kernel, and the offset will be reflected in the
  28. text_offset field of the resulting Image. This can be used to
  29. fuzz-test bootloaders which respect text_offset.
  30. This option is intended for bootloader and/or kernel testing
  31. only. Bootloaders must make no assumptions regarding the value
  32. of TEXT_OFFSET and platforms must not require a specific
  33. value.
  34. config DEBUG_SET_MODULE_RONX
  35. bool "Set loadable kernel module data as NX and text as RO"
  36. depends on MODULES
  37. help
  38. This option helps catch unintended modifications to loadable
  39. kernel module's text and read-only data. It also prevents execution
  40. of module data. Such protection may interfere with run-time code
  41. patching and dynamic kernel tracing - and they might also protect
  42. against certain classes of kernel exploits.
  43. If in doubt, say "N".
  44. config DEBUG_RODATA
  45. bool "Make kernel text and rodata read-only"
  46. help
  47. If this is set, kernel text and rodata will be made read-only. This
  48. is to help catch accidental or malicious attempts to change the
  49. kernel's executable code. Additionally splits rodata from kernel
  50. text so it can be made explicitly non-executable.
  51. If in doubt, say Y
  52. config DEBUG_ALIGN_RODATA
  53. depends on DEBUG_RODATA && ARM64_4K_PAGES
  54. bool "Align linker sections up to SECTION_SIZE"
  55. help
  56. If this option is enabled, sections that may potentially be marked as
  57. read only or non-executable will be aligned up to the section size of
  58. the kernel. This prevents sections from being split into pages and
  59. avoids a potential TLB penalty. The downside is an increase in
  60. alignment and potentially wasted space. Turn on this option if
  61. performance is more important than memory pressure.
  62. If in doubt, say N
  63. source "drivers/hwtracing/coresight/Kconfig"
  64. endmenu