Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 1 | menu "Kernel hacking" |
| 2 | |
| 3 | source "lib/Kconfig.debug" |
| 4 | |
Laura Abbott | c9465b4 | 2014-11-26 00:28:39 +0000 | [diff] [blame] | 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 | If in doubt, say "N" |
| 16 | |
Laura Abbott | d253b44 | 2014-04-05 01:30:50 +0100 | [diff] [blame] | 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 | |
| 26 | If this option is switched on, the /dev/mem file only allows |
| 27 | userspace access to memory mapped peripherals. |
| 28 | |
| 29 | If in doubt, say Y. |
| 30 | |
Will Deacon | ec45d1c | 2013-01-17 12:31:45 +0000 | [diff] [blame] | 31 | config PID_IN_CONTEXTIDR |
| 32 | bool "Write the current PID to the CONTEXTIDR register" |
| 33 | help |
| 34 | Enabling this option causes the kernel to write the current PID to |
| 35 | the CONTEXTIDR register, at the expense of some additional |
| 36 | instructions during context switch. Say Y here only if you are |
| 37 | planning to use hardware trace tools with this kernel. |
| 38 | |
Mark Rutland | da57a36 | 2014-06-24 16:51:37 +0100 | [diff] [blame] | 39 | config ARM64_RANDOMIZE_TEXT_OFFSET |
| 40 | bool "Randomize TEXT_OFFSET at build time" |
| 41 | help |
| 42 | Say Y here if you want the image load offset (AKA TEXT_OFFSET) |
| 43 | of the kernel to be randomized at build-time. When selected, |
| 44 | this option will cause TEXT_OFFSET to be randomized upon any |
| 45 | build of the kernel, and the offset will be reflected in the |
| 46 | text_offset field of the resulting Image. This can be used to |
| 47 | fuzz-test bootloaders which respect text_offset. |
| 48 | |
| 49 | This option is intended for bootloader and/or kernel testing |
| 50 | only. Bootloaders must make no assumptions regarding the value |
| 51 | of TEXT_OFFSET and platforms must not require a specific |
| 52 | value. |
| 53 | |
Laura Abbott | 11d91a7 | 2014-08-19 20:41:43 +0100 | [diff] [blame] | 54 | config DEBUG_SET_MODULE_RONX |
| 55 | bool "Set loadable kernel module data as NX and text as RO" |
| 56 | depends on MODULES |
| 57 | help |
| 58 | This option helps catch unintended modifications to loadable |
| 59 | kernel module's text and read-only data. It also prevents execution |
| 60 | of module data. Such protection may interfere with run-time code |
| 61 | patching and dynamic kernel tracing - and they might also protect |
| 62 | against certain classes of kernel exploits. |
| 63 | If in doubt, say "N". |
| 64 | |
Laura Abbott | da14170 | 2015-01-21 17:36:06 -0800 | [diff] [blame] | 65 | config DEBUG_RODATA |
| 66 | bool "Make kernel text and rodata read-only" |
| 67 | help |
| 68 | If this is set, kernel text and rodata will be made read-only. This |
| 69 | is to help catch accidental or malicious attempts to change the |
| 70 | kernel's executable code. Additionally splits rodata from kernel |
| 71 | text so it can be made explicitly non-executable. |
| 72 | |
| 73 | If in doubt, say Y |
| 74 | |
| 75 | config DEBUG_ALIGN_RODATA |
Suzuki K. Poulose | 755e70b | 2015-10-19 14:19:32 +0100 | [diff] [blame] | 76 | depends on DEBUG_RODATA && ARM64_4K_PAGES |
Laura Abbott | da14170 | 2015-01-21 17:36:06 -0800 | [diff] [blame] | 77 | bool "Align linker sections up to SECTION_SIZE" |
| 78 | help |
| 79 | If this option is enabled, sections that may potentially be marked as |
| 80 | read only or non-executable will be aligned up to the section size of |
| 81 | the kernel. This prevents sections from being split into pages and |
| 82 | avoids a potential TLB penalty. The downside is an increase in |
| 83 | alignment and potentially wasted space. Turn on this option if |
| 84 | performance is more important than memory pressure. |
| 85 | |
| 86 | If in doubt, say N |
| 87 | |
Mathieu Poirier | 01081f5 | 2015-03-30 14:13:41 -0600 | [diff] [blame] | 88 | source "drivers/hwtracing/coresight/Kconfig" |
Mathieu Poirier | 3288731 | 2015-03-30 14:13:36 -0600 | [diff] [blame] | 89 | |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 90 | endmenu |