blob: 69c9170bdd2462086813f5d080155358022439d0 [file] [log] [blame]
Catalin Marinas8c2c3df2012-04-20 14:45:54 +01001
Laura Abbott4ddb9bf2016-10-27 09:27:31 -07002config ARM64_PTDUMP_CORE
3 def_bool n
4
5config ARM64_PTDUMP_DEBUGFS
Laura Abbottc9465b42014-11-26 00:28:39 +00006 bool "Export kernel pagetable layout to userspace via debugfs"
7 depends on DEBUG_KERNEL
Laura Abbott4ddb9bf2016-10-27 09:27:31 -07008 select ARM64_PTDUMP_CORE
Laura Abbottc9465b42014-11-26 00:28:39 +00009 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.
Mark Rutland604c8e62016-05-13 12:20:36 +010016
17 If in doubt, say N.
Laura Abbottc9465b42014-11-26 00:28:39 +000018
Will Deaconec45d1c2013-01-17 12:31:45 +000019config PID_IN_CONTEXTIDR
20 bool "Write the current PID to the CONTEXTIDR register"
21 help
22 Enabling this option causes the kernel to write the current PID to
23 the CONTEXTIDR register, at the expense of some additional
24 instructions during context switch. Say Y here only if you are
25 planning to use hardware trace tools with this kernel.
26
Mark Rutlandda57a362014-06-24 16:51:37 +010027config ARM64_RANDOMIZE_TEXT_OFFSET
28 bool "Randomize TEXT_OFFSET at build time"
29 help
30 Say Y here if you want the image load offset (AKA TEXT_OFFSET)
31 of the kernel to be randomized at build-time. When selected,
32 this option will cause TEXT_OFFSET to be randomized upon any
33 build of the kernel, and the offset will be reflected in the
34 text_offset field of the resulting Image. This can be used to
35 fuzz-test bootloaders which respect text_offset.
36
37 This option is intended for bootloader and/or kernel testing
38 only. Bootloaders must make no assumptions regarding the value
39 of TEXT_OFFSET and platforms must not require a specific
40 value.
41
Laura Abbott1404d6f2016-10-27 09:27:34 -070042config DEBUG_WX
43 bool "Warn on W+X mappings at boot"
44 select ARM64_PTDUMP_CORE
45 ---help---
46 Generate a warning if any W+X mappings are found at boot.
47
48 This is useful for discovering cases where the kernel is leaving
49 W+X mappings after applying NX, as such mappings are a security risk.
50 This check also includes UXN, which should be set on all kernel
51 mappings.
52
53 Look for a message in dmesg output like this:
54
55 arm64/mm: Checked W+X mappings: passed, no W+X pages found.
56
57 or like this, if the check failed:
58
59 arm64/mm: Checked W+X mappings: FAILED, <N> W+X pages found.
60
61 Note that even if the check fails, your kernel is possibly
62 still fine, as W+X mappings are not a security hole in
63 themselves, what they do is that they make the exploitation
64 of other unfixed kernel bugs easier.
65
66 There is no runtime or memory usage effect of this option
67 once the kernel has booted up - it's a one time check.
68
69 If in doubt, say "Y".
70
Laura Abbottda141702015-01-21 17:36:06 -080071config DEBUG_ALIGN_RODATA
Laura Abbott0f5bf6d2017-02-06 16:31:58 -080072 depends on STRICT_KERNEL_RWX
Laura Abbottda141702015-01-21 17:36:06 -080073 bool "Align linker sections up to SECTION_SIZE"
74 help
75 If this option is enabled, sections that may potentially be marked as
76 read only or non-executable will be aligned up to the section size of
77 the kernel. This prevents sections from being split into pages and
78 avoids a potential TLB penalty. The downside is an increase in
79 alignment and potentially wasted space. Turn on this option if
80 performance is more important than memory pressure.
81
Mark Rutland604c8e62016-05-13 12:20:36 +010082 If in doubt, say N.
Laura Abbottda141702015-01-21 17:36:06 -080083
Ard Biesheuvel757b4352017-02-02 17:33:19 +000084config DEBUG_EFI
85 depends on EFI && DEBUG_INFO
86 bool "UEFI debugging"
87 help
88 Enable this option to include EFI specific debugging features into
89 the kernel that are only useful when using a debug build of the
90 UEFI firmware
91
Ard Biesheuvel214fad52017-03-31 08:55:33 +010092config ARM64_RELOC_TEST
93 depends on m
94 tristate "Relocation testing module"
95
Mathieu Poirier01081f52015-03-30 14:13:41 -060096source "drivers/hwtracing/coresight/Kconfig"