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