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