Kconfig.debug 3.4 KB

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