Thomas Gleixner | ec8f24b | 2019-05-19 13:07:45 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 2 | |
Laura Abbott | 4ddb9bf | 2016-10-27 09:27:31 -0700 | [diff] [blame] | 3 | config ARM64_PTDUMP_CORE |
| 4 | def_bool n |
| 5 | |
| 6 | config ARM64_PTDUMP_DEBUGFS |
Laura Abbott | c9465b4 | 2014-11-26 00:28:39 +0000 | [diff] [blame] | 7 | bool "Export kernel pagetable layout to userspace via debugfs" |
| 8 | depends on DEBUG_KERNEL |
Laura Abbott | 4ddb9bf | 2016-10-27 09:27:31 -0700 | [diff] [blame] | 9 | select ARM64_PTDUMP_CORE |
Laura Abbott | c9465b4 | 2014-11-26 00:28:39 +0000 | [diff] [blame] | 10 | select DEBUG_FS |
| 11 | help |
| 12 | Say Y here if you want to show the kernel pagetable layout in a |
| 13 | debugfs file. This information is only useful for kernel developers |
| 14 | who are working in architecture specific areas of the kernel. |
| 15 | It is probably not a good idea to enable this feature in a production |
| 16 | kernel. |
Mark Rutland | 604c8e6 | 2016-05-13 12:20:36 +0100 | [diff] [blame] | 17 | |
| 18 | If in doubt, say N. |
Laura Abbott | c9465b4 | 2014-11-26 00:28:39 +0000 | [diff] [blame] | 19 | |
Will Deacon | ec45d1c | 2013-01-17 12:31:45 +0000 | [diff] [blame] | 20 | config PID_IN_CONTEXTIDR |
| 21 | bool "Write the current PID to the CONTEXTIDR register" |
| 22 | help |
| 23 | Enabling this option causes the kernel to write the current PID to |
| 24 | the CONTEXTIDR register, at the expense of some additional |
| 25 | instructions during context switch. Say Y here only if you are |
| 26 | planning to use hardware trace tools with this kernel. |
| 27 | |
Mark Rutland | da57a36 | 2014-06-24 16:51:37 +0100 | [diff] [blame] | 28 | config ARM64_RANDOMIZE_TEXT_OFFSET |
| 29 | bool "Randomize TEXT_OFFSET at build time" |
| 30 | help |
| 31 | Say Y here if you want the image load offset (AKA TEXT_OFFSET) |
| 32 | of the kernel to be randomized at build-time. When selected, |
| 33 | this option will cause TEXT_OFFSET to be randomized upon any |
| 34 | build of the kernel, and the offset will be reflected in the |
| 35 | text_offset field of the resulting Image. This can be used to |
| 36 | fuzz-test bootloaders which respect text_offset. |
| 37 | |
| 38 | This option is intended for bootloader and/or kernel testing |
| 39 | only. Bootloaders must make no assumptions regarding the value |
| 40 | of TEXT_OFFSET and platforms must not require a specific |
| 41 | value. |
| 42 | |
Laura Abbott | 1404d6f | 2016-10-27 09:27:34 -0700 | [diff] [blame] | 43 | config DEBUG_WX |
| 44 | bool "Warn on W+X mappings at boot" |
| 45 | select ARM64_PTDUMP_CORE |
| 46 | ---help--- |
| 47 | Generate a warning if any W+X mappings are found at boot. |
| 48 | |
| 49 | This is useful for discovering cases where the kernel is leaving |
| 50 | W+X mappings after applying NX, as such mappings are a security risk. |
| 51 | This check also includes UXN, which should be set on all kernel |
| 52 | mappings. |
| 53 | |
| 54 | Look for a message in dmesg output like this: |
| 55 | |
| 56 | arm64/mm: Checked W+X mappings: passed, no W+X pages found. |
| 57 | |
| 58 | or like this, if the check failed: |
| 59 | |
| 60 | arm64/mm: Checked W+X mappings: FAILED, <N> W+X pages found. |
| 61 | |
| 62 | Note that even if the check fails, your kernel is possibly |
| 63 | still fine, as W+X mappings are not a security hole in |
| 64 | themselves, what they do is that they make the exploitation |
| 65 | of other unfixed kernel bugs easier. |
| 66 | |
| 67 | There is no runtime or memory usage effect of this option |
| 68 | once the kernel has booted up - it's a one time check. |
| 69 | |
| 70 | If in doubt, say "Y". |
| 71 | |
Laura Abbott | da14170 | 2015-01-21 17:36:06 -0800 | [diff] [blame] | 72 | config DEBUG_ALIGN_RODATA |
Laura Abbott | 0f5bf6d | 2017-02-06 16:31:58 -0800 | [diff] [blame] | 73 | depends on STRICT_KERNEL_RWX |
Laura Abbott | da14170 | 2015-01-21 17:36:06 -0800 | [diff] [blame] | 74 | bool "Align linker sections up to SECTION_SIZE" |
| 75 | help |
| 76 | If this option is enabled, sections that may potentially be marked as |
| 77 | read only or non-executable will be aligned up to the section size of |
| 78 | the kernel. This prevents sections from being split into pages and |
| 79 | avoids a potential TLB penalty. The downside is an increase in |
| 80 | alignment and potentially wasted space. Turn on this option if |
| 81 | performance is more important than memory pressure. |
| 82 | |
Mark Rutland | 604c8e6 | 2016-05-13 12:20:36 +0100 | [diff] [blame] | 83 | If in doubt, say N. |
Laura Abbott | da14170 | 2015-01-21 17:36:06 -0800 | [diff] [blame] | 84 | |
Ard Biesheuvel | 757b435 | 2017-02-02 17:33:19 +0000 | [diff] [blame] | 85 | config DEBUG_EFI |
| 86 | depends on EFI && DEBUG_INFO |
| 87 | bool "UEFI debugging" |
| 88 | help |
| 89 | Enable this option to include EFI specific debugging features into |
| 90 | the kernel that are only useful when using a debug build of the |
| 91 | UEFI firmware |
| 92 | |
Ard Biesheuvel | 214fad5 | 2017-03-31 08:55:33 +0100 | [diff] [blame] | 93 | config ARM64_RELOC_TEST |
| 94 | depends on m |
| 95 | tristate "Relocation testing module" |
| 96 | |
Mathieu Poirier | 01081f5 | 2015-03-30 14:13:41 -0600 | [diff] [blame] | 97 | source "drivers/hwtracing/coresight/Kconfig" |