Kconfig.debug 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. menu "Kernel hacking"
  2. source "lib/Kconfig.debug"
  3. config FRAME_POINTER
  4. bool
  5. default y
  6. config STRICT_DEVMEM
  7. bool "Filter access to /dev/mem"
  8. depends on MMU
  9. help
  10. If this option is disabled, you allow userspace (root) access to all
  11. of memory, including kernel and userspace memory. Accidental
  12. access to this is obviously disastrous, but specific access can
  13. be used by people debugging the kernel.
  14. If this option is switched on, the /dev/mem file only allows
  15. userspace access to memory mapped peripherals.
  16. If in doubt, say Y.
  17. config PID_IN_CONTEXTIDR
  18. bool "Write the current PID to the CONTEXTIDR register"
  19. help
  20. Enabling this option causes the kernel to write the current PID to
  21. the CONTEXTIDR register, at the expense of some additional
  22. instructions during context switch. Say Y here only if you are
  23. planning to use hardware trace tools with this kernel.
  24. config ARM64_RANDOMIZE_TEXT_OFFSET
  25. bool "Randomize TEXT_OFFSET at build time"
  26. help
  27. Say Y here if you want the image load offset (AKA TEXT_OFFSET)
  28. of the kernel to be randomized at build-time. When selected,
  29. this option will cause TEXT_OFFSET to be randomized upon any
  30. build of the kernel, and the offset will be reflected in the
  31. text_offset field of the resulting Image. This can be used to
  32. fuzz-test bootloaders which respect text_offset.
  33. This option is intended for bootloader and/or kernel testing
  34. only. Bootloaders must make no assumptions regarding the value
  35. of TEXT_OFFSET and platforms must not require a specific
  36. value.
  37. config DEBUG_SET_MODULE_RONX
  38. bool "Set loadable kernel module data as NX and text as RO"
  39. depends on MODULES
  40. help
  41. This option helps catch unintended modifications to loadable
  42. kernel module's text and read-only data. It also prevents execution
  43. of module data. Such protection may interfere with run-time code
  44. patching and dynamic kernel tracing - and they might also protect
  45. against certain classes of kernel exploits.
  46. If in doubt, say "N".
  47. endmenu