Kconfig.debug 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. endmenu