blob: 3d9d6f36f8a5f4d7135e9dd5c2f4c9fae7bcf4d6 [file] [log] [blame]
Catalin Marinas8c2c3df2012-04-20 14:45:54 +01001menu "Kernel hacking"
2
3source "lib/Kconfig.debug"
4
Laura Abbottc9465b42014-11-26 00:28:39 +00005config 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.
Mark Rutland604c8e62016-05-13 12:20:36 +010015
16 If in doubt, say N.
Laura Abbottc9465b42014-11-26 00:28:39 +000017
Will Deaconec45d1c2013-01-17 12:31:45 +000018config 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
Mark Rutlandda57a362014-06-24 16:51:37 +010026config 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
Laura Abbott11d91a72014-08-19 20:41:43 +010041config DEBUG_SET_MODULE_RONX
Mark Rutland604c8e62016-05-13 12:20:36 +010042 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.
Laura Abbott11d91a72014-08-19 20:41:43 +010051
Laura Abbottda141702015-01-21 17:36:06 -080052config DEBUG_ALIGN_RODATA
Ard Biesheuvel97740052016-03-30 17:43:09 +020053 depends on DEBUG_RODATA
Laura Abbottda141702015-01-21 17:36:06 -080054 bool "Align linker sections up to SECTION_SIZE"
55 help
56 If this option is enabled, sections that may potentially be marked as
57 read only or non-executable will be aligned up to the section size of
58 the kernel. This prevents sections from being split into pages and
59 avoids a potential TLB penalty. The downside is an increase in
60 alignment and potentially wasted space. Turn on this option if
61 performance is more important than memory pressure.
62
Mark Rutland604c8e62016-05-13 12:20:36 +010063 If in doubt, say N.
Laura Abbottda141702015-01-21 17:36:06 -080064
Will Deacon9e80ff12014-08-29 18:28:54 +010065config ARM64_STRICT_BREAK_BEFORE_MAKE
66 bool "Enforce strict break-before-make on page table updates "
67
Mathieu Poirier01081f52015-03-30 14:13:41 -060068source "drivers/hwtracing/coresight/Kconfig"
Mathieu Poirier32887312015-03-30 14:13:36 -060069
Catalin Marinas8c2c3df2012-04-20 14:45:54 +010070endmenu