1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2fb32e03fSMathieu Desnoyers# 3fb32e03fSMathieu Desnoyers# General architecture dependent options 4fb32e03fSMathieu Desnoyers# 5125e5645SMathieu Desnoyers 61572497cSChristoph Hellwig# 71572497cSChristoph Hellwig# Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can 81572497cSChristoph Hellwig# override the default values in this file. 91572497cSChristoph Hellwig# 101572497cSChristoph Hellwigsource "arch/$(SRCARCH)/Kconfig" 111572497cSChristoph Hellwig 1222471e13SRandy Dunlapmenu "General architecture-dependent options" 1322471e13SRandy Dunlap 14692f66f2SHari Bathiniconfig CRASH_CORE 15692f66f2SHari Bathini bool 16692f66f2SHari Bathini 172965faa5SDave Youngconfig KEXEC_CORE 18692f66f2SHari Bathini select CRASH_CORE 192965faa5SDave Young bool 202965faa5SDave Young 21175fca3bSSven Schnelleconfig KEXEC_ELF 22175fca3bSSven Schnelle bool 23175fca3bSSven Schnelle 24467d2782SThiago Jung Bauermannconfig HAVE_IMA_KEXEC 25467d2782SThiago Jung Bauermann bool 26467d2782SThiago Jung Bauermann 275e6e9852SChristoph Hellwigconfig SET_FS 285e6e9852SChristoph Hellwig bool 295e6e9852SChristoph Hellwig 3005736e4aSThomas Gleixnerconfig HOTPLUG_SMT 3105736e4aSThomas Gleixner bool 3205736e4aSThomas Gleixner 33142781e1SThomas Gleixnerconfig GENERIC_ENTRY 34142781e1SThomas Gleixner bool 35142781e1SThomas Gleixner 36125e5645SMathieu Desnoyersconfig OPROFILE 37b309a294SRobert Richter tristate "OProfile system profiling" 38125e5645SMathieu Desnoyers depends on PROFILING 39125e5645SMathieu Desnoyers depends on HAVE_OPROFILE 40d69d59f4SIngo Molnar select RING_BUFFER 419a5963ebSChristian Borntraeger select RING_BUFFER_ALLOW_SWAP 42125e5645SMathieu Desnoyers help 43125e5645SMathieu Desnoyers OProfile is a profiling system capable of profiling the 44125e5645SMathieu Desnoyers whole system, include the kernel, kernel modules, libraries, 45125e5645SMathieu Desnoyers and applications. 46125e5645SMathieu Desnoyers 47125e5645SMathieu Desnoyers If unsure, say N. 48125e5645SMathieu Desnoyers 494d4036e0SJason Yehconfig OPROFILE_EVENT_MULTIPLEX 504d4036e0SJason Yeh bool "OProfile multiplexing support (EXPERIMENTAL)" 514d4036e0SJason Yeh default n 524d4036e0SJason Yeh depends on OPROFILE && X86 534d4036e0SJason Yeh help 544d4036e0SJason Yeh The number of hardware counters is limited. The multiplexing 554d4036e0SJason Yeh feature enables OProfile to gather more events than counters 564d4036e0SJason Yeh are provided by the hardware. This is realized by switching 579332ef9dSMasahiro Yamada between events at a user specified time interval. 584d4036e0SJason Yeh 594d4036e0SJason Yeh If unsure, say N. 604d4036e0SJason Yeh 61125e5645SMathieu Desnoyersconfig HAVE_OPROFILE 629ba16087SJan Beulich bool 63125e5645SMathieu Desnoyers 64dcfce4a0SRobert Richterconfig OPROFILE_NMI_TIMER 65dcfce4a0SRobert Richter def_bool y 66af9feebeSAnton Blanchard depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64 67dcfce4a0SRobert Richter 68125e5645SMathieu Desnoyersconfig KPROBES 69125e5645SMathieu Desnoyers bool "Kprobes" 7005ed160eSMasami Hiramatsu depends on MODULES 71125e5645SMathieu Desnoyers depends on HAVE_KPROBES 7205ed160eSMasami Hiramatsu select KALLSYMS 73125e5645SMathieu Desnoyers help 74125e5645SMathieu Desnoyers Kprobes allows you to trap at almost any kernel address and 75125e5645SMathieu Desnoyers execute a callback function. register_kprobe() establishes 76125e5645SMathieu Desnoyers a probepoint and specifies the callback. Kprobes is useful 77125e5645SMathieu Desnoyers for kernel debugging, non-intrusive instrumentation and testing. 78125e5645SMathieu Desnoyers If in doubt, say "N". 79125e5645SMathieu Desnoyers 8045f81b1cSSteven Rostedtconfig JUMP_LABEL 81c5905afbSIngo Molnar bool "Optimize very unlikely/likely branches" 8245f81b1cSSteven Rostedt depends on HAVE_ARCH_JUMP_LABEL 83e9666d10SMasahiro Yamada depends on CC_HAS_ASM_GOTO 8445f81b1cSSteven Rostedt help 85c5905afbSIngo Molnar This option enables a transparent branch optimization that 86c5905afbSIngo Molnar makes certain almost-always-true or almost-always-false branch 87c5905afbSIngo Molnar conditions even cheaper to execute within the kernel. 8845f81b1cSSteven Rostedt 89c5905afbSIngo Molnar Certain performance-sensitive kernel code, such as trace points, 90c5905afbSIngo Molnar scheduler functionality, networking code and KVM have such 91c5905afbSIngo Molnar branches and include support for this optimization technique. 92c5905afbSIngo Molnar 93c5905afbSIngo Molnar If it is detected that the compiler has support for "asm goto", 94c5905afbSIngo Molnar the kernel will compile such branches with just a nop 95c5905afbSIngo Molnar instruction. When the condition flag is toggled to true, the 96c5905afbSIngo Molnar nop will be converted to a jump instruction to execute the 97c5905afbSIngo Molnar conditional block of instructions. 98c5905afbSIngo Molnar 99c5905afbSIngo Molnar This technique lowers overhead and stress on the branch prediction 100c5905afbSIngo Molnar of the processor and generally makes the kernel faster. The update 101c5905afbSIngo Molnar of the condition is slower, but those are always very rare. 102c5905afbSIngo Molnar 103c5905afbSIngo Molnar ( On 32-bit x86, the necessary options added to the compiler 104c5905afbSIngo Molnar flags may increase the size of the kernel slightly. ) 10545f81b1cSSteven Rostedt 1061987c947SPeter Zijlstraconfig STATIC_KEYS_SELFTEST 1071987c947SPeter Zijlstra bool "Static key selftest" 1081987c947SPeter Zijlstra depends on JUMP_LABEL 1091987c947SPeter Zijlstra help 1101987c947SPeter Zijlstra Boot time self-test of the branch patching code. 1111987c947SPeter Zijlstra 112f03c4129SPeter Zijlstraconfig STATIC_CALL_SELFTEST 113f03c4129SPeter Zijlstra bool "Static call selftest" 114f03c4129SPeter Zijlstra depends on HAVE_STATIC_CALL 115f03c4129SPeter Zijlstra help 116f03c4129SPeter Zijlstra Boot time self-test of the call patching code. 117f03c4129SPeter Zijlstra 118afd66255SMasami Hiramatsuconfig OPTPROBES 1195cc718b9SMasami Hiramatsu def_bool y 1205cc718b9SMasami Hiramatsu depends on KPROBES && HAVE_OPTPROBES 12101b1d88bSThomas Gleixner select TASKS_RCU if PREEMPTION 122afd66255SMasami Hiramatsu 123e7dbfe34SMasami Hiramatsuconfig KPROBES_ON_FTRACE 124e7dbfe34SMasami Hiramatsu def_bool y 125e7dbfe34SMasami Hiramatsu depends on KPROBES && HAVE_KPROBES_ON_FTRACE 126e7dbfe34SMasami Hiramatsu depends on DYNAMIC_FTRACE_WITH_REGS 127e7dbfe34SMasami Hiramatsu help 128e7dbfe34SMasami Hiramatsu If function tracer is enabled and the arch supports full 129e7dbfe34SMasami Hiramatsu passing of pt_regs to function tracing, then kprobes can 130e7dbfe34SMasami Hiramatsu optimize on top of function tracing. 131e7dbfe34SMasami Hiramatsu 1322b144498SSrikar Dronamrajuconfig UPROBES 13309294e31SDavid A. Long def_bool n 134e8f4aa60SAllen Pais depends on ARCH_SUPPORTS_UPROBES 1352b144498SSrikar Dronamraju help 1367b2d81d4SIngo Molnar Uprobes is the user-space counterpart to kprobes: they 1377b2d81d4SIngo Molnar enable instrumentation applications (such as 'perf probe') 1387b2d81d4SIngo Molnar to establish unintrusive probes in user-space binaries and 1397b2d81d4SIngo Molnar libraries, by executing handler functions when the probes 1407b2d81d4SIngo Molnar are hit by user-space applications. 1417b2d81d4SIngo Molnar 1427b2d81d4SIngo Molnar ( These probes come in the form of single-byte breakpoints, 1437b2d81d4SIngo Molnar managed by the kernel and kept transparent to the probed 1447b2d81d4SIngo Molnar application. ) 1452b144498SSrikar Dronamraju 146adab66b7SSteven Rostedt (VMware)config HAVE_64BIT_ALIGNED_ACCESS 147adab66b7SSteven Rostedt (VMware) def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS 148adab66b7SSteven Rostedt (VMware) help 149adab66b7SSteven Rostedt (VMware) Some architectures require 64 bit accesses to be 64 bit 150adab66b7SSteven Rostedt (VMware) aligned, which also requires structs containing 64 bit values 151adab66b7SSteven Rostedt (VMware) to be 64 bit aligned too. This includes some 32 bit 152adab66b7SSteven Rostedt (VMware) architectures which can do 64 bit accesses, as well as 64 bit 153adab66b7SSteven Rostedt (VMware) architectures without unaligned access. 154adab66b7SSteven Rostedt (VMware) 155adab66b7SSteven Rostedt (VMware) This symbol should be selected by an architecture if 64 bit 156adab66b7SSteven Rostedt (VMware) accesses are required to be 64 bit aligned in this way even 157adab66b7SSteven Rostedt (VMware) though it is not a 64 bit architecture. 158adab66b7SSteven Rostedt (VMware) 159adab66b7SSteven Rostedt (VMware) See Documentation/unaligned-memory-access.txt for more 160adab66b7SSteven Rostedt (VMware) information on the topic of unaligned memory accesses. 161adab66b7SSteven Rostedt (VMware) 16258340a07SJohannes Bergconfig HAVE_EFFICIENT_UNALIGNED_ACCESS 1639ba16087SJan Beulich bool 16458340a07SJohannes Berg help 16558340a07SJohannes Berg Some architectures are unable to perform unaligned accesses 16658340a07SJohannes Berg without the use of get_unaligned/put_unaligned. Others are 16758340a07SJohannes Berg unable to perform such accesses efficiently (e.g. trap on 16858340a07SJohannes Berg unaligned access and require fixing it up in the exception 16958340a07SJohannes Berg handler.) 17058340a07SJohannes Berg 17158340a07SJohannes Berg This symbol should be selected by an architecture if it can 17258340a07SJohannes Berg perform unaligned accesses efficiently to allow different 17358340a07SJohannes Berg code paths to be selected for these cases. Some network 17458340a07SJohannes Berg drivers, for example, could opt to not fix up alignment 17558340a07SJohannes Berg problems with received packets if doing so would not help 17658340a07SJohannes Berg much. 17758340a07SJohannes Berg 178c9b54d6fSMauro Carvalho Chehab See Documentation/core-api/unaligned-memory-access.rst for more 17958340a07SJohannes Berg information on the topic of unaligned memory accesses. 18058340a07SJohannes Berg 181cf66bb93SDavid Woodhouseconfig ARCH_USE_BUILTIN_BSWAP 182cf66bb93SDavid Woodhouse bool 183cf66bb93SDavid Woodhouse help 184cf66bb93SDavid Woodhouse Modern versions of GCC (since 4.4) have builtin functions 185cf66bb93SDavid Woodhouse for handling byte-swapping. Using these, instead of the old 186cf66bb93SDavid Woodhouse inline assembler that the architecture code provides in the 187cf66bb93SDavid Woodhouse __arch_bswapXX() macros, allows the compiler to see what's 188cf66bb93SDavid Woodhouse happening and offers more opportunity for optimisation. In 189cf66bb93SDavid Woodhouse particular, the compiler will be able to combine the byteswap 190cf66bb93SDavid Woodhouse with a nearby load or store and use load-and-swap or 191cf66bb93SDavid Woodhouse store-and-swap instructions if the architecture has them. It 192cf66bb93SDavid Woodhouse should almost *never* result in code which is worse than the 193cf66bb93SDavid Woodhouse hand-coded assembler in <asm/swab.h>. But just in case it 194cf66bb93SDavid Woodhouse does, the use of the builtins is optional. 195cf66bb93SDavid Woodhouse 196cf66bb93SDavid Woodhouse Any architecture with load-and-swap or store-and-swap 197cf66bb93SDavid Woodhouse instructions should set this. And it shouldn't hurt to set it 198cf66bb93SDavid Woodhouse on architectures that don't have such instructions. 199cf66bb93SDavid Woodhouse 2009edddaa2SAnanth N Mavinakayanahalliconfig KRETPROBES 2019edddaa2SAnanth N Mavinakayanahalli def_bool y 2029edddaa2SAnanth N Mavinakayanahalli depends on KPROBES && HAVE_KRETPROBES 2039edddaa2SAnanth N Mavinakayanahalli 2047c68af6eSAvi Kivityconfig USER_RETURN_NOTIFIER 2057c68af6eSAvi Kivity bool 2067c68af6eSAvi Kivity depends on HAVE_USER_RETURN_NOTIFIER 2077c68af6eSAvi Kivity help 2087c68af6eSAvi Kivity Provide a kernel-internal notification when a cpu is about to 2097c68af6eSAvi Kivity switch to user mode. 2107c68af6eSAvi Kivity 21128b2ee20SRik van Rielconfig HAVE_IOREMAP_PROT 2129ba16087SJan Beulich bool 21328b2ee20SRik van Riel 214125e5645SMathieu Desnoyersconfig HAVE_KPROBES 2159ba16087SJan Beulich bool 2169edddaa2SAnanth N Mavinakayanahalli 2179edddaa2SAnanth N Mavinakayanahalliconfig HAVE_KRETPROBES 2189ba16087SJan Beulich bool 21974bc7ceeSArthur Kepner 220afd66255SMasami Hiramatsuconfig HAVE_OPTPROBES 221afd66255SMasami Hiramatsu bool 222d314d74cSCong Wang 223e7dbfe34SMasami Hiramatsuconfig HAVE_KPROBES_ON_FTRACE 224e7dbfe34SMasami Hiramatsu bool 225e7dbfe34SMasami Hiramatsu 226540adea3SMasami Hiramatsuconfig HAVE_FUNCTION_ERROR_INJECTION 2279802d865SJosef Bacik bool 2289802d865SJosef Bacik 22942a0bb3fSPetr Mladekconfig HAVE_NMI 23042a0bb3fSPetr Mladek bool 23142a0bb3fSPetr Mladek 2321f5a4ad9SRoland McGrath# 2331f5a4ad9SRoland McGrath# An arch should select this if it provides all these things: 2341f5a4ad9SRoland McGrath# 2351f5a4ad9SRoland McGrath# task_pt_regs() in asm/processor.h or asm/ptrace.h 2361f5a4ad9SRoland McGrath# arch_has_single_step() if there is hardware single-step support 2371f5a4ad9SRoland McGrath# arch_has_block_step() if there is hardware block-step support 2381f5a4ad9SRoland McGrath# asm/syscall.h supplying asm-generic/syscall.h interface 2391f5a4ad9SRoland McGrath# linux/regset.h user_regset interfaces 2401f5a4ad9SRoland McGrath# CORE_DUMP_USE_REGSET #define'd in linux/elf.h 2411f5a4ad9SRoland McGrath# TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit} 2421f5a4ad9SRoland McGrath# TIF_NOTIFY_RESUME calls tracehook_notify_resume() 2431f5a4ad9SRoland McGrath# signal delivery calls tracehook_signal_handler() 2441f5a4ad9SRoland McGrath# 2451f5a4ad9SRoland McGrathconfig HAVE_ARCH_TRACEHOOK 2469ba16087SJan Beulich bool 2471f5a4ad9SRoland McGrath 248c64be2bbSMarek Szyprowskiconfig HAVE_DMA_CONTIGUOUS 249c64be2bbSMarek Szyprowski bool 250c64be2bbSMarek Szyprowski 25129d5e047SThomas Gleixnerconfig GENERIC_SMP_IDLE_THREAD 25229d5e047SThomas Gleixner bool 25329d5e047SThomas Gleixner 254485cf5daSKevin Hilmanconfig GENERIC_IDLE_POLL_SETUP 255485cf5daSKevin Hilman bool 256485cf5daSKevin Hilman 2576974f0c4SDaniel Micayconfig ARCH_HAS_FORTIFY_SOURCE 2586974f0c4SDaniel Micay bool 2596974f0c4SDaniel Micay help 2606974f0c4SDaniel Micay An architecture should select this when it can successfully 2616974f0c4SDaniel Micay build and run with CONFIG_FORTIFY_SOURCE. 2626974f0c4SDaniel Micay 263d8ae8a37SChristoph Hellwig# 264d8ae8a37SChristoph Hellwig# Select if the arch provides a historic keepinit alias for the retain_initrd 265d8ae8a37SChristoph Hellwig# command line option 266d8ae8a37SChristoph Hellwig# 267d8ae8a37SChristoph Hellwigconfig ARCH_HAS_KEEPINITRD 268d8ae8a37SChristoph Hellwig bool 269d8ae8a37SChristoph Hellwig 270d2852a22SDaniel Borkmann# Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h 271d2852a22SDaniel Borkmannconfig ARCH_HAS_SET_MEMORY 272d2852a22SDaniel Borkmann bool 273d2852a22SDaniel Borkmann 274d253ca0cSRick Edgecombe# Select if arch has all set_direct_map_invalid/default() functions 275d253ca0cSRick Edgecombeconfig ARCH_HAS_SET_DIRECT_MAP 276d253ca0cSRick Edgecombe bool 277d253ca0cSRick Edgecombe 278c30700dbSChristoph Hellwig# 279fa7e2247SChristoph Hellwig# Select if the architecture provides the arch_dma_set_uncached symbol to 280a86ecfa6SColin Ian King# either provide an uncached segment alias for a DMA allocation, or 281fa7e2247SChristoph Hellwig# to remap the page tables in place. 282c30700dbSChristoph Hellwig# 283fa7e2247SChristoph Hellwigconfig ARCH_HAS_DMA_SET_UNCACHED 284c30700dbSChristoph Hellwig bool 285c30700dbSChristoph Hellwig 286999a5d12SChristoph Hellwig# 287999a5d12SChristoph Hellwig# Select if the architectures provides the arch_dma_clear_uncached symbol 288999a5d12SChristoph Hellwig# to undo an in-place page table remap for uncached access. 289999a5d12SChristoph Hellwig# 290999a5d12SChristoph Hellwigconfig ARCH_HAS_DMA_CLEAR_UNCACHED 291f5e10287SThomas Gleixner bool 292f5e10287SThomas Gleixner 2935905429aSKees Cook# Select if arch init_task must go in the __init_task_data section 2945905429aSKees Cookconfig ARCH_TASK_STRUCT_ON_STACK 2955905429aSKees Cook bool 2965905429aSKees Cook 2975905429aSKees Cook# Select if arch has its private alloc_task_struct() function 2985905429aSKees Cookconfig ARCH_TASK_STRUCT_ALLOCATOR 2995905429aSKees Cook bool 3005905429aSKees Cook 3015905429aSKees Cookconfig HAVE_ARCH_THREAD_STRUCT_WHITELIST 3025905429aSKees Cook bool 3035905429aSKees Cook depends on !ARCH_TASK_STRUCT_ALLOCATOR 304b235beeaSLinus Torvalds help 305b235beeaSLinus Torvalds An architecture should select this to provide hardened usercopy 306f5e10287SThomas Gleixner knowledge about what region of the thread_struct should be 307f5e10287SThomas Gleixner whitelisted for copying to userspace. Normally this is only the 3085aaeb5c0SIngo Molnar FPU registers. Specifically, arch_thread_struct_whitelist() 3095aaeb5c0SIngo Molnar should be implemented. Without this, the entire thread_struct 3105aaeb5c0SIngo Molnar field in task_struct will be left whitelisted. 3115aaeb5c0SIngo Molnar 312942fa985SYury Norov# Select if arch has its private alloc_thread_stack() function 313942fa985SYury Norovconfig ARCH_THREAD_STACK_ALLOCATOR 314942fa985SYury Norov bool 315942fa985SYury Norov 316942fa985SYury Norov# Select if arch wants to size task_struct dynamically via arch_task_struct_size: 317942fa985SYury Norovconfig ARCH_WANTS_DYNAMIC_TASK_STRUCT 318942fa985SYury Norov bool 319942fa985SYury Norov 320942fa985SYury Norovconfig ARCH_32BIT_OFF_T 321942fa985SYury Norov bool 322f850c30cSHeiko Carstens depends on !64BIT 323f850c30cSHeiko Carstens help 324e01292b1SHeiko Carstens All new 32-bit architectures should have 64-bit off_t type on 325e01292b1SHeiko Carstens userspace side which corresponds to the loff_t kernel type. This 326e01292b1SHeiko Carstens is the requirement for modern ABIs. Some existing architectures 327e01292b1SHeiko Carstens still support 32-bit off_t. This option is enabled for all such 328e01292b1SHeiko Carstens architectures explicitly. 329f850c30cSHeiko Carstens 3302ff2b7ecSMasahiro Yamadaconfig HAVE_ASM_MODVERSIONS 3312ff2b7ecSMasahiro Yamada bool 3322ff2b7ecSMasahiro Yamada help 333a86ecfa6SColin Ian King This symbol should be selected by an architecture if it provides 3342ff2b7ecSMasahiro Yamada <asm/asm-prototypes.h> to support the module versioning for symbols 3352ff2b7ecSMasahiro Yamada exported from assembly code. 3362ff2b7ecSMasahiro Yamada 3379483a578SDavid Brownellconfig HAVE_REGS_AND_STACK_ACCESS_API 3389ba16087SJan Beulich bool 3399483a578SDavid Brownell help 340a86ecfa6SColin Ian King This symbol should be selected by an architecture if it supports 3419483a578SDavid Brownell the API needed to access registers and stack entries from pt_regs, 3429483a578SDavid Brownell declared in asm/ptrace.h 3435ee00bd4SJoerg Roedel For example the kprobes-based event tracer needs this API. 3445ee00bd4SJoerg Roedel 345d7822b1eSMathieu Desnoyersconfig HAVE_RSEQ 346d7822b1eSMathieu Desnoyers bool 347d7822b1eSMathieu Desnoyers depends on HAVE_REGS_AND_STACK_ACCESS_API 348d7822b1eSMathieu Desnoyers help 349d7822b1eSMathieu Desnoyers This symbol should be selected by an architecture if it 350d7822b1eSMathieu Desnoyers supports an implementation of restartable sequences. 351d7822b1eSMathieu Desnoyers 3523c88ee19SMasami Hiramatsuconfig HAVE_FUNCTION_ARG_ACCESS_API 3533c88ee19SMasami Hiramatsu bool 3543c88ee19SMasami Hiramatsu help 355a86ecfa6SColin Ian King This symbol should be selected by an architecture if it supports 3563c88ee19SMasami Hiramatsu the API needed to access function arguments from pt_regs, 3573c88ee19SMasami Hiramatsu declared in asm/ptrace.h 3583c88ee19SMasami Hiramatsu 35962a038d3SK.Prasadconfig HAVE_HW_BREAKPOINT 36062a038d3SK.Prasad bool 36199e8c5a3SFrederic Weisbecker depends on PERF_EVENTS 36262a038d3SK.Prasad 3630102752eSFrederic Weisbeckerconfig HAVE_MIXED_BREAKPOINTS_REGS 3640102752eSFrederic Weisbecker bool 3650102752eSFrederic Weisbecker depends on HAVE_HW_BREAKPOINT 3660102752eSFrederic Weisbecker help 3670102752eSFrederic Weisbecker Depending on the arch implementation of hardware breakpoints, 3680102752eSFrederic Weisbecker some of them have separate registers for data and instruction 3690102752eSFrederic Weisbecker breakpoints addresses, others have mixed registers to store 3700102752eSFrederic Weisbecker them but define the access type in a control register. 3710102752eSFrederic Weisbecker Select this option if your arch implements breakpoints under the 3720102752eSFrederic Weisbecker latter fashion. 3730102752eSFrederic Weisbecker 3747c68af6eSAvi Kivityconfig HAVE_USER_RETURN_NOTIFIER 3757c68af6eSAvi Kivity bool 376a1922ed6SIngo Molnar 377c01d4323SFrederic Weisbeckerconfig HAVE_PERF_EVENTS_NMI 378c01d4323SFrederic Weisbecker bool 37923637d47SFrederic Weisbecker help 38023637d47SFrederic Weisbecker System hardware can generate an NMI using the perf event 38123637d47SFrederic Weisbecker subsystem. Also has support for calculating CPU cycle events 38223637d47SFrederic Weisbecker to determine how many clock cycles in a given period. 383c01d4323SFrederic Weisbecker 38405a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_PERF 38505a4a952SNicholas Piggin bool 38605a4a952SNicholas Piggin depends on HAVE_PERF_EVENTS_NMI 38705a4a952SNicholas Piggin help 38805a4a952SNicholas Piggin The arch chooses to use the generic perf-NMI-based hardlockup 38905a4a952SNicholas Piggin detector. Must define HAVE_PERF_EVENTS_NMI. 39005a4a952SNicholas Piggin 39105a4a952SNicholas Pigginconfig HAVE_NMI_WATCHDOG 39205a4a952SNicholas Piggin depends on HAVE_NMI 39305a4a952SNicholas Piggin bool 39405a4a952SNicholas Piggin help 39505a4a952SNicholas Piggin The arch provides a low level NMI watchdog. It provides 39605a4a952SNicholas Piggin asm/nmi.h, and defines its own arch_touch_nmi_watchdog(). 39705a4a952SNicholas Piggin 39805a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_ARCH 39905a4a952SNicholas Piggin bool 40005a4a952SNicholas Piggin select HAVE_NMI_WATCHDOG 40105a4a952SNicholas Piggin help 40205a4a952SNicholas Piggin The arch chooses to provide its own hardlockup detector, which is 40305a4a952SNicholas Piggin a superset of the HAVE_NMI_WATCHDOG. It also conforms to config 40405a4a952SNicholas Piggin interfaces and parameters provided by hardlockup detector subsystem. 40505a4a952SNicholas Piggin 406c5e63197SJiri Olsaconfig HAVE_PERF_REGS 407c5e63197SJiri Olsa bool 408c5e63197SJiri Olsa help 409c5e63197SJiri Olsa Support selective register dumps for perf events. This includes 410c5e63197SJiri Olsa bit-mapping of each registers and a unique architecture id. 411c5e63197SJiri Olsa 412c5ebcedbSJiri Olsaconfig HAVE_PERF_USER_STACK_DUMP 413c5ebcedbSJiri Olsa bool 414c5ebcedbSJiri Olsa help 415c5ebcedbSJiri Olsa Support user stack dumps for perf event samples. This needs 416c5ebcedbSJiri Olsa access to the user stack pointer which is not unified across 417c5ebcedbSJiri Olsa architectures. 418c5ebcedbSJiri Olsa 419bf5438fcSJason Baronconfig HAVE_ARCH_JUMP_LABEL 420bf5438fcSJason Baron bool 421bf5438fcSJason Baron 42250ff18abSArd Biesheuvelconfig HAVE_ARCH_JUMP_LABEL_RELATIVE 42350ff18abSArd Biesheuvel bool 42450ff18abSArd Biesheuvel 4250d6e24d4SPeter Zijlstraconfig MMU_GATHER_TABLE_FREE 4260d6e24d4SPeter Zijlstra bool 4270d6e24d4SPeter Zijlstra 428ff2e6d72SPeter Zijlstraconfig MMU_GATHER_RCU_TABLE_FREE 42926723911SPeter Zijlstra bool 4300d6e24d4SPeter Zijlstra select MMU_GATHER_TABLE_FREE 43126723911SPeter Zijlstra 4323af4bd03SPeter Zijlstraconfig MMU_GATHER_PAGE_SIZE 433ed6a7935SPeter Zijlstra bool 434ed6a7935SPeter Zijlstra 43527796d03SPeter Zijlstraconfig MMU_GATHER_NO_RANGE 43627796d03SPeter Zijlstra bool 43727796d03SPeter Zijlstra 438580a586cSPeter Zijlstraconfig MMU_GATHER_NO_GATHER 439952a31c9SMartin Schwidefsky bool 4400d6e24d4SPeter Zijlstra depends on MMU_GATHER_TABLE_FREE 441952a31c9SMartin Schwidefsky 442d53c3dfbSNicholas Pigginconfig ARCH_WANT_IRQS_OFF_ACTIVATE_MM 443d53c3dfbSNicholas Piggin bool 444d53c3dfbSNicholas Piggin help 445d53c3dfbSNicholas Piggin Temporary select until all architectures can be converted to have 446d53c3dfbSNicholas Piggin irqs disabled over activate_mm. Architectures that do IPI based TLB 447d53c3dfbSNicholas Piggin shootdowns should enable this. 448d53c3dfbSNicholas Piggin 449df013ffbSHuang Yingconfig ARCH_HAVE_NMI_SAFE_CMPXCHG 450df013ffbSHuang Ying bool 451df013ffbSHuang Ying 45243570fd2SHeiko Carstensconfig HAVE_ALIGNED_STRUCT_PAGE 45343570fd2SHeiko Carstens bool 45443570fd2SHeiko Carstens help 45543570fd2SHeiko Carstens This makes sure that struct pages are double word aligned and that 45643570fd2SHeiko Carstens e.g. the SLUB allocator can perform double word atomic operations 45743570fd2SHeiko Carstens on a struct page for better performance. However selecting this 45843570fd2SHeiko Carstens might increase the size of a struct page by a word. 45943570fd2SHeiko Carstens 4604156153cSHeiko Carstensconfig HAVE_CMPXCHG_LOCAL 4614156153cSHeiko Carstens bool 4624156153cSHeiko Carstens 4632565409fSHeiko Carstensconfig HAVE_CMPXCHG_DOUBLE 4642565409fSHeiko Carstens bool 4652565409fSHeiko Carstens 46677e58496SPaul E. McKenneyconfig ARCH_WEAK_RELEASE_ACQUIRE 46777e58496SPaul E. McKenney bool 46877e58496SPaul E. McKenney 469c1d7e01dSWill Deaconconfig ARCH_WANT_IPC_PARSE_VERSION 470c1d7e01dSWill Deacon bool 471c1d7e01dSWill Deacon 472c1d7e01dSWill Deaconconfig ARCH_WANT_COMPAT_IPC_PARSE_VERSION 473c1d7e01dSWill Deacon bool 474c1d7e01dSWill Deacon 47548b25c43SChris Metcalfconfig ARCH_WANT_OLD_COMPAT_IPC 476c1d7e01dSWill Deacon select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 47748b25c43SChris Metcalf bool 47848b25c43SChris Metcalf 479282a181bSYiFei Zhuconfig HAVE_ARCH_SECCOMP 480e2cfabdfSWill Drewry bool 481e2cfabdfSWill Drewry help 482282a181bSYiFei Zhu An arch should select this symbol to support seccomp mode 1 (the fixed 483282a181bSYiFei Zhu syscall policy), and must provide an overrides for __NR_seccomp_sigreturn, 484282a181bSYiFei Zhu and compat syscalls if the asm-generic/seccomp.h defaults need adjustment: 485282a181bSYiFei Zhu - __NR_seccomp_read_32 486282a181bSYiFei Zhu - __NR_seccomp_write_32 487282a181bSYiFei Zhu - __NR_seccomp_exit_32 488282a181bSYiFei Zhu - __NR_seccomp_sigreturn_32 489282a181bSYiFei Zhu 490282a181bSYiFei Zhuconfig HAVE_ARCH_SECCOMP_FILTER 491282a181bSYiFei Zhu bool 492282a181bSYiFei Zhu select HAVE_ARCH_SECCOMP 493282a181bSYiFei Zhu help 494fb0fadf9SWill Drewry An arch should select this symbol if it provides all of these things: 495282a181bSYiFei Zhu - all the requirements for HAVE_ARCH_SECCOMP 496bb6ea430SWill Drewry - syscall_get_arch() 497bb6ea430SWill Drewry - syscall_get_arguments() 498bb6ea430SWill Drewry - syscall_rollback() 499bb6ea430SWill Drewry - syscall_set_return_value() 500fb0fadf9SWill Drewry - SIGSYS siginfo_t support 501fb0fadf9SWill Drewry - secure_computing is called from a ptrace_event()-safe context 502fb0fadf9SWill Drewry - secure_computing return value is checked and a return value of -1 503fb0fadf9SWill Drewry results in the system call being skipped immediately. 50448dc92b9SKees Cook - seccomp syscall wired up 5050d8315ddSYiFei Zhu - if !HAVE_SPARSE_SYSCALL_NR, have SECCOMP_ARCH_NATIVE, 5060d8315ddSYiFei Zhu SECCOMP_ARCH_NATIVE_NR, SECCOMP_ARCH_NATIVE_NAME defined. If 5070d8315ddSYiFei Zhu COMPAT is supported, have the SECCOMP_ARCH_COMPAT* defines too. 508e2cfabdfSWill Drewry 509282a181bSYiFei Zhuconfig SECCOMP 510282a181bSYiFei Zhu prompt "Enable seccomp to safely execute untrusted bytecode" 511282a181bSYiFei Zhu def_bool y 512282a181bSYiFei Zhu depends on HAVE_ARCH_SECCOMP 513282a181bSYiFei Zhu help 514282a181bSYiFei Zhu This kernel feature is useful for number crunching applications 515282a181bSYiFei Zhu that may need to handle untrusted bytecode during their 516282a181bSYiFei Zhu execution. By using pipes or other transports made available 517282a181bSYiFei Zhu to the process as file descriptors supporting the read/write 518282a181bSYiFei Zhu syscalls, it's possible to isolate those applications in their 519282a181bSYiFei Zhu own address space using seccomp. Once seccomp is enabled via 520282a181bSYiFei Zhu prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be 521282a181bSYiFei Zhu disabled and the task is only allowed to execute a few safe 522282a181bSYiFei Zhu syscalls defined by each seccomp mode. 523282a181bSYiFei Zhu 524282a181bSYiFei Zhu If unsure, say Y. 525282a181bSYiFei Zhu 526e2cfabdfSWill Drewryconfig SECCOMP_FILTER 527e2cfabdfSWill Drewry def_bool y 528e2cfabdfSWill Drewry depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET 529e2cfabdfSWill Drewry help 530e2cfabdfSWill Drewry Enable tasks to build secure computing environments defined 531e2cfabdfSWill Drewry in terms of Berkeley Packet Filter programs which implement 532e2cfabdfSWill Drewry task-defined system call filtering polices. 533e2cfabdfSWill Drewry 5345fb94e9cSMauro Carvalho Chehab See Documentation/userspace-api/seccomp_filter.rst for details. 535e2cfabdfSWill Drewry 5360d8315ddSYiFei Zhuconfig SECCOMP_CACHE_DEBUG 5370d8315ddSYiFei Zhu bool "Show seccomp filter cache status in /proc/pid/seccomp_cache" 5380d8315ddSYiFei Zhu depends on SECCOMP_FILTER && !HAVE_SPARSE_SYSCALL_NR 5390d8315ddSYiFei Zhu depends on PROC_FS 5400d8315ddSYiFei Zhu help 5410d8315ddSYiFei Zhu This enables the /proc/pid/seccomp_cache interface to monitor 5420d8315ddSYiFei Zhu seccomp cache data. The file format is subject to change. Reading 5430d8315ddSYiFei Zhu the file requires CAP_SYS_ADMIN. 5440d8315ddSYiFei Zhu 5450d8315ddSYiFei Zhu This option is for debugging only. Enabling presents the risk that 5460d8315ddSYiFei Zhu an adversary may be able to infer the seccomp filter logic. 5470d8315ddSYiFei Zhu 5480d8315ddSYiFei Zhu If unsure, say N. 5490d8315ddSYiFei Zhu 550afaef01cSAlexander Popovconfig HAVE_ARCH_STACKLEAK 551afaef01cSAlexander Popov bool 552afaef01cSAlexander Popov help 553afaef01cSAlexander Popov An architecture should select this if it has the code which 554afaef01cSAlexander Popov fills the used part of the kernel stack with the STACKLEAK_POISON 555afaef01cSAlexander Popov value before returning from system calls. 556afaef01cSAlexander Popov 557d148eac0SMasahiro Yamadaconfig HAVE_STACKPROTECTOR 55819952a92SKees Cook bool 55919952a92SKees Cook help 56019952a92SKees Cook An arch should select this symbol if: 56119952a92SKees Cook - it has implemented a stack canary (e.g. __stack_chk_guard) 56219952a92SKees Cook 563050e9baaSLinus Torvaldsconfig STACKPROTECTOR 5642a61f474SMasahiro Yamada bool "Stack Protector buffer overflow detection" 565d148eac0SMasahiro Yamada depends on HAVE_STACKPROTECTOR 5662a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector) 5672a61f474SMasahiro Yamada default y 5688779657dSKees Cook help 5698779657dSKees Cook This option turns on the "stack-protector" GCC feature. This 57019952a92SKees Cook feature puts, at the beginning of functions, a canary value on 57119952a92SKees Cook the stack just before the return address, and validates 57219952a92SKees Cook the value just before actually returning. Stack based buffer 57319952a92SKees Cook overflows (that need to overwrite this return address) now also 57419952a92SKees Cook overwrite the canary, which gets detected and the attack is then 57519952a92SKees Cook neutralized via a kernel panic. 57619952a92SKees Cook 5778779657dSKees Cook Functions will have the stack-protector canary logic added if they 5788779657dSKees Cook have an 8-byte or larger character array on the stack. 5798779657dSKees Cook 58019952a92SKees Cook This feature requires gcc version 4.2 or above, or a distribution 5818779657dSKees Cook gcc with the feature backported ("-fstack-protector"). 5828779657dSKees Cook 5838779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 5848779657dSKees Cook about 3% of all kernel functions, which increases kernel code size 5858779657dSKees Cook by about 0.3%. 5868779657dSKees Cook 587050e9baaSLinus Torvaldsconfig STACKPROTECTOR_STRONG 5882a61f474SMasahiro Yamada bool "Strong Stack Protector" 589050e9baaSLinus Torvalds depends on STACKPROTECTOR 5902a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector-strong) 5912a61f474SMasahiro Yamada default y 5928779657dSKees Cook help 5938779657dSKees Cook Functions will have the stack-protector canary logic added in any 5948779657dSKees Cook of the following conditions: 5958779657dSKees Cook 5968779657dSKees Cook - local variable's address used as part of the right hand side of an 5978779657dSKees Cook assignment or function argument 5988779657dSKees Cook - local variable is an array (or union containing an array), 5998779657dSKees Cook regardless of array type or length 6008779657dSKees Cook - uses register local variables 6018779657dSKees Cook 6028779657dSKees Cook This feature requires gcc version 4.9 or above, or a distribution 6038779657dSKees Cook gcc with the feature backported ("-fstack-protector-strong"). 6048779657dSKees Cook 6058779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 6068779657dSKees Cook about 20% of all kernel functions, which increases the kernel code 6078779657dSKees Cook size by about 2%. 6088779657dSKees Cook 609d08b9f0cSSami Tolvanenconfig ARCH_SUPPORTS_SHADOW_CALL_STACK 610d08b9f0cSSami Tolvanen bool 611d08b9f0cSSami Tolvanen help 612d08b9f0cSSami Tolvanen An architecture should select this if it supports Clang's Shadow 613aa7a65aeSWill Deacon Call Stack and implements runtime support for shadow stack 614aa7a65aeSWill Deacon switching. 615d08b9f0cSSami Tolvanen 616d08b9f0cSSami Tolvanenconfig SHADOW_CALL_STACK 617d08b9f0cSSami Tolvanen bool "Clang Shadow Call Stack" 618d08b9f0cSSami Tolvanen depends on CC_IS_CLANG && ARCH_SUPPORTS_SHADOW_CALL_STACK 619ddc9863eSSami Tolvanen depends on DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER 620d08b9f0cSSami Tolvanen help 621d08b9f0cSSami Tolvanen This option enables Clang's Shadow Call Stack, which uses a 622d08b9f0cSSami Tolvanen shadow stack to protect function return addresses from being 623d08b9f0cSSami Tolvanen overwritten by an attacker. More information can be found in 624d08b9f0cSSami Tolvanen Clang's documentation: 625d08b9f0cSSami Tolvanen 626d08b9f0cSSami Tolvanen https://clang.llvm.org/docs/ShadowCallStack.html 627d08b9f0cSSami Tolvanen 628d08b9f0cSSami Tolvanen Note that security guarantees in the kernel differ from the 629d08b9f0cSSami Tolvanen ones documented for user space. The kernel must store addresses 630d08b9f0cSSami Tolvanen of shadow stacks in memory, which means an attacker capable of 631d08b9f0cSSami Tolvanen reading and writing arbitrary memory may be able to locate them 632d08b9f0cSSami Tolvanen and hijack control flow by modifying the stacks. 633d08b9f0cSSami Tolvanen 634*dc5723b0SSami Tolvanenconfig LTO 635*dc5723b0SSami Tolvanen bool 636*dc5723b0SSami Tolvanen help 637*dc5723b0SSami Tolvanen Selected if the kernel will be built using the compiler's LTO feature. 638*dc5723b0SSami Tolvanen 639*dc5723b0SSami Tolvanenconfig LTO_CLANG 640*dc5723b0SSami Tolvanen bool 641*dc5723b0SSami Tolvanen select LTO 642*dc5723b0SSami Tolvanen help 643*dc5723b0SSami Tolvanen Selected if the kernel will be built using Clang's LTO feature. 644*dc5723b0SSami Tolvanen 645*dc5723b0SSami Tolvanenconfig ARCH_SUPPORTS_LTO_CLANG 646*dc5723b0SSami Tolvanen bool 647*dc5723b0SSami Tolvanen help 648*dc5723b0SSami Tolvanen An architecture should select this option if it supports: 649*dc5723b0SSami Tolvanen - compiling with Clang, 650*dc5723b0SSami Tolvanen - compiling inline assembly with Clang's integrated assembler, 651*dc5723b0SSami Tolvanen - and linking with LLD. 652*dc5723b0SSami Tolvanen 653*dc5723b0SSami Tolvanenconfig ARCH_SUPPORTS_LTO_CLANG_THIN 654*dc5723b0SSami Tolvanen bool 655*dc5723b0SSami Tolvanen help 656*dc5723b0SSami Tolvanen An architecture should select this option if it can support Clang's 657*dc5723b0SSami Tolvanen ThinLTO mode. 658*dc5723b0SSami Tolvanen 659*dc5723b0SSami Tolvanenconfig HAS_LTO_CLANG 660*dc5723b0SSami Tolvanen def_bool y 661*dc5723b0SSami Tolvanen # Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510 662*dc5723b0SSami Tolvanen depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD 663*dc5723b0SSami Tolvanen depends on $(success,test $(LLVM) -eq 1) 664*dc5723b0SSami Tolvanen depends on $(success,test $(LLVM_IAS) -eq 1) 665*dc5723b0SSami Tolvanen depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) 666*dc5723b0SSami Tolvanen depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) 667*dc5723b0SSami Tolvanen depends on ARCH_SUPPORTS_LTO_CLANG 668*dc5723b0SSami Tolvanen depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT 669*dc5723b0SSami Tolvanen depends on !KASAN 670*dc5723b0SSami Tolvanen depends on !GCOV_KERNEL 671*dc5723b0SSami Tolvanen depends on !MODVERSIONS 672*dc5723b0SSami Tolvanen help 673*dc5723b0SSami Tolvanen The compiler and Kconfig options support building with Clang's 674*dc5723b0SSami Tolvanen LTO. 675*dc5723b0SSami Tolvanen 676*dc5723b0SSami Tolvanenchoice 677*dc5723b0SSami Tolvanen prompt "Link Time Optimization (LTO)" 678*dc5723b0SSami Tolvanen default LTO_NONE 679*dc5723b0SSami Tolvanen help 680*dc5723b0SSami Tolvanen This option enables Link Time Optimization (LTO), which allows the 681*dc5723b0SSami Tolvanen compiler to optimize binaries globally. 682*dc5723b0SSami Tolvanen 683*dc5723b0SSami Tolvanen If unsure, select LTO_NONE. Note that LTO is very resource-intensive 684*dc5723b0SSami Tolvanen so it's disabled by default. 685*dc5723b0SSami Tolvanen 686*dc5723b0SSami Tolvanenconfig LTO_NONE 687*dc5723b0SSami Tolvanen bool "None" 688*dc5723b0SSami Tolvanen help 689*dc5723b0SSami Tolvanen Build the kernel normally, without Link Time Optimization (LTO). 690*dc5723b0SSami Tolvanen 691*dc5723b0SSami Tolvanenconfig LTO_CLANG_FULL 692*dc5723b0SSami Tolvanen bool "Clang Full LTO (EXPERIMENTAL)" 693*dc5723b0SSami Tolvanen depends on HAS_LTO_CLANG 694*dc5723b0SSami Tolvanen depends on !COMPILE_TEST 695*dc5723b0SSami Tolvanen select LTO_CLANG 696*dc5723b0SSami Tolvanen help 697*dc5723b0SSami Tolvanen This option enables Clang's full Link Time Optimization (LTO), which 698*dc5723b0SSami Tolvanen allows the compiler to optimize the kernel globally. If you enable 699*dc5723b0SSami Tolvanen this option, the compiler generates LLVM bitcode instead of ELF 700*dc5723b0SSami Tolvanen object files, and the actual compilation from bitcode happens at 701*dc5723b0SSami Tolvanen the LTO link step, which may take several minutes depending on the 702*dc5723b0SSami Tolvanen kernel configuration. More information can be found from LLVM's 703*dc5723b0SSami Tolvanen documentation: 704*dc5723b0SSami Tolvanen 705*dc5723b0SSami Tolvanen https://llvm.org/docs/LinkTimeOptimization.html 706*dc5723b0SSami Tolvanen 707*dc5723b0SSami Tolvanen During link time, this option can use a large amount of RAM, and 708*dc5723b0SSami Tolvanen may take much longer than the ThinLTO option. 709*dc5723b0SSami Tolvanen 710*dc5723b0SSami Tolvanenconfig LTO_CLANG_THIN 711*dc5723b0SSami Tolvanen bool "Clang ThinLTO (EXPERIMENTAL)" 712*dc5723b0SSami Tolvanen depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN 713*dc5723b0SSami Tolvanen select LTO_CLANG 714*dc5723b0SSami Tolvanen help 715*dc5723b0SSami Tolvanen This option enables Clang's ThinLTO, which allows for parallel 716*dc5723b0SSami Tolvanen optimization and faster incremental compiles compared to the 717*dc5723b0SSami Tolvanen CONFIG_LTO_CLANG_FULL option. More information can be found 718*dc5723b0SSami Tolvanen from Clang's documentation: 719*dc5723b0SSami Tolvanen 720*dc5723b0SSami Tolvanen https://clang.llvm.org/docs/ThinLTO.html 721*dc5723b0SSami Tolvanen 722*dc5723b0SSami Tolvanen If unsure, say Y. 723*dc5723b0SSami Tolvanenendchoice 724*dc5723b0SSami Tolvanen 7250f60a8efSKees Cookconfig HAVE_ARCH_WITHIN_STACK_FRAMES 7260f60a8efSKees Cook bool 7270f60a8efSKees Cook help 7280f60a8efSKees Cook An architecture should select this if it can walk the kernel stack 7290f60a8efSKees Cook frames to determine if an object is part of either the arguments 7300f60a8efSKees Cook or local variables (i.e. that it excludes saved return addresses, 7310f60a8efSKees Cook and similar) by implementing an inline arch_within_stack_frames(), 7320f60a8efSKees Cook which is used by CONFIG_HARDENED_USERCOPY. 7330f60a8efSKees Cook 73491d1aa43SFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING 7352b1d5024SFrederic Weisbecker bool 7362b1d5024SFrederic Weisbecker help 73791d1aa43SFrederic Weisbecker Provide kernel/user boundaries probes necessary for subsystems 73891d1aa43SFrederic Weisbecker that need it, such as userspace RCU extended quiescent state. 739490f561bSFrederic Weisbecker Syscalls need to be wrapped inside user_exit()-user_enter(), either 740490f561bSFrederic Weisbecker optimized behind static key or through the slow path using TIF_NOHZ 741490f561bSFrederic Weisbecker flag. Exceptions handlers must be wrapped as well. Irqs are already 742490f561bSFrederic Weisbecker protected inside rcu_irq_enter/rcu_irq_exit() but preemption or signal 743490f561bSFrederic Weisbecker handling on irq exit still need to be protected. 744490f561bSFrederic Weisbecker 74583c2da2eSFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING_OFFSTACK 74683c2da2eSFrederic Weisbecker bool 74783c2da2eSFrederic Weisbecker help 74883c2da2eSFrederic Weisbecker Architecture neither relies on exception_enter()/exception_exit() 74983c2da2eSFrederic Weisbecker nor on schedule_user(). Also preempt_schedule_notrace() and 75083c2da2eSFrederic Weisbecker preempt_schedule_irq() can't be called in a preemptible section 75183c2da2eSFrederic Weisbecker while context tracking is CONTEXT_USER. This feature reflects a sane 75283c2da2eSFrederic Weisbecker entry implementation where the following requirements are met on 75383c2da2eSFrederic Weisbecker critical entry code, ie: before user_exit() or after user_enter(): 75483c2da2eSFrederic Weisbecker 75583c2da2eSFrederic Weisbecker - Critical entry code isn't preemptible (or better yet: 75683c2da2eSFrederic Weisbecker not interruptible). 75783c2da2eSFrederic Weisbecker - No use of RCU read side critical sections, unless rcu_nmi_enter() 75883c2da2eSFrederic Weisbecker got called. 75983c2da2eSFrederic Weisbecker - No use of instrumentation, unless instrumentation_begin() got 76083c2da2eSFrederic Weisbecker called. 76183c2da2eSFrederic Weisbecker 762490f561bSFrederic Weisbeckerconfig HAVE_TIF_NOHZ 763490f561bSFrederic Weisbecker bool 764490f561bSFrederic Weisbecker help 765490f561bSFrederic Weisbecker Arch relies on TIF_NOHZ and syscall slow path to implement context 766490f561bSFrederic Weisbecker tracking calls to user_enter()/user_exit(). 7672b1d5024SFrederic Weisbecker 768b952741cSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING 769b952741cSFrederic Weisbecker bool 770b952741cSFrederic Weisbecker 7712b91ec9fSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING_IDLE 7722b91ec9fSFrederic Weisbecker bool 7732b91ec9fSFrederic Weisbecker help 7742b91ec9fSFrederic Weisbecker Architecture has its own way to account idle CPU time and therefore 7752b91ec9fSFrederic Weisbecker doesn't implement vtime_account_idle(). 7762b91ec9fSFrederic Weisbecker 77740565b5aSStanislaw Gruszkaconfig ARCH_HAS_SCALED_CPUTIME 77840565b5aSStanislaw Gruszka bool 77940565b5aSStanislaw Gruszka 780554b0004SKevin Hilmanconfig HAVE_VIRT_CPU_ACCOUNTING_GEN 781554b0004SKevin Hilman bool 782554b0004SKevin Hilman default y if 64BIT 783554b0004SKevin Hilman help 784554b0004SKevin Hilman With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. 785554b0004SKevin Hilman Before enabling this option, arch code must be audited 786554b0004SKevin Hilman to ensure there are no races in concurrent read/write of 787554b0004SKevin Hilman cputime_t. For example, reading/writing 64-bit cputime_t on 788554b0004SKevin Hilman some 32-bit arches may require multiple accesses, so proper 789554b0004SKevin Hilman locking is needed to protect against concurrent accesses. 790554b0004SKevin Hilman 791fdf9c356SFrederic Weisbeckerconfig HAVE_IRQ_TIME_ACCOUNTING 792fdf9c356SFrederic Weisbecker bool 793fdf9c356SFrederic Weisbecker help 794fdf9c356SFrederic Weisbecker Archs need to ensure they use a high enough resolution clock to 795fdf9c356SFrederic Weisbecker support irq time accounting and then call enable_sched_clock_irqtime(). 796fdf9c356SFrederic Weisbecker 797c49dd340SKalesh Singhconfig HAVE_MOVE_PUD 798c49dd340SKalesh Singh bool 799c49dd340SKalesh Singh help 800c49dd340SKalesh Singh Architectures that select this are able to move page tables at the 801c49dd340SKalesh Singh PUD level. If there are only 3 page table levels, the move effectively 802c49dd340SKalesh Singh happens at the PGD level. 803c49dd340SKalesh Singh 8042c91bd4aSJoel Fernandes (Google)config HAVE_MOVE_PMD 8052c91bd4aSJoel Fernandes (Google) bool 8062c91bd4aSJoel Fernandes (Google) help 8072c91bd4aSJoel Fernandes (Google) Archs that select this are able to move page tables at the PMD level. 8082c91bd4aSJoel Fernandes (Google) 80915626062SGerald Schaeferconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE 81015626062SGerald Schaefer bool 81115626062SGerald Schaefer 812a00cc7d9SMatthew Wilcoxconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 813a00cc7d9SMatthew Wilcox bool 814a00cc7d9SMatthew Wilcox 8150ddab1d2SToshi Kaniconfig HAVE_ARCH_HUGE_VMAP 8160ddab1d2SToshi Kani bool 8170ddab1d2SToshi Kani 8183876d4a3SAlexandre Ghiticonfig ARCH_WANT_HUGE_PMD_SHARE 8193876d4a3SAlexandre Ghiti bool 8203876d4a3SAlexandre Ghiti 8210f8975ecSPavel Emelyanovconfig HAVE_ARCH_SOFT_DIRTY 8220f8975ecSPavel Emelyanov bool 8230f8975ecSPavel Emelyanov 824786d35d4SDavid Howellsconfig HAVE_MOD_ARCH_SPECIFIC 825786d35d4SDavid Howells bool 826786d35d4SDavid Howells help 827786d35d4SDavid Howells The arch uses struct mod_arch_specific to store data. Many arches 828786d35d4SDavid Howells just need a simple module loader without arch specific data - those 829786d35d4SDavid Howells should not enable this. 830786d35d4SDavid Howells 831786d35d4SDavid Howellsconfig MODULES_USE_ELF_RELA 832786d35d4SDavid Howells bool 833786d35d4SDavid Howells help 834786d35d4SDavid Howells Modules only use ELF RELA relocations. Modules with ELF REL 835786d35d4SDavid Howells relocations will give an error. 836786d35d4SDavid Howells 837786d35d4SDavid Howellsconfig MODULES_USE_ELF_REL 838786d35d4SDavid Howells bool 839786d35d4SDavid Howells help 840786d35d4SDavid Howells Modules only use ELF REL relocations. Modules with ELF RELA 841786d35d4SDavid Howells relocations will give an error. 842786d35d4SDavid Howells 843cc1f0274SFrederic Weisbeckerconfig HAVE_IRQ_EXIT_ON_IRQ_STACK 844cc1f0274SFrederic Weisbecker bool 845cc1f0274SFrederic Weisbecker help 846cc1f0274SFrederic Weisbecker Architecture doesn't only execute the irq handler on the irq stack 847cc1f0274SFrederic Weisbecker but also irq_exit(). This way we can process softirqs on this irq 848cc1f0274SFrederic Weisbecker stack instead of switching to a new one when we call __do_softirq() 849cc1f0274SFrederic Weisbecker in the end of an hardirq. 850cc1f0274SFrederic Weisbecker This spares a stack switch and improves cache usage on softirq 851cc1f0274SFrederic Weisbecker processing. 852cc1f0274SFrederic Weisbecker 853235a8f02SKirill A. Shutemovconfig PGTABLE_LEVELS 854235a8f02SKirill A. Shutemov int 855235a8f02SKirill A. Shutemov default 2 856235a8f02SKirill A. Shutemov 8572b68f6caSKees Cookconfig ARCH_HAS_ELF_RANDOMIZE 8582b68f6caSKees Cook bool 8592b68f6caSKees Cook help 8602b68f6caSKees Cook An architecture supports choosing randomized locations for 8612b68f6caSKees Cook stack, mmap, brk, and ET_DYN. Defined functions: 8622b68f6caSKees Cook - arch_mmap_rnd() 863204db6edSKees Cook - arch_randomize_brk() 8642b68f6caSKees Cook 865d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_BITS 866d07e2259SDaniel Cashman bool 867d07e2259SDaniel Cashman help 868d07e2259SDaniel Cashman An arch should select this symbol if it supports setting a variable 869d07e2259SDaniel Cashman number of bits for use in establishing the base address for mmap 870d07e2259SDaniel Cashman allocations, has MMU enabled and provides values for both: 871d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MIN 872d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MAX 873d07e2259SDaniel Cashman 8745f56a5dfSJiri Slabyconfig HAVE_EXIT_THREAD 8755f56a5dfSJiri Slaby bool 8765f56a5dfSJiri Slaby help 8775f56a5dfSJiri Slaby An architecture implements exit_thread. 8785f56a5dfSJiri Slaby 879d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MIN 880d07e2259SDaniel Cashman int 881d07e2259SDaniel Cashman 882d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MAX 883d07e2259SDaniel Cashman int 884d07e2259SDaniel Cashman 885d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_DEFAULT 886d07e2259SDaniel Cashman int 887d07e2259SDaniel Cashman 888d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS 889d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address" if EXPERT 890d07e2259SDaniel Cashman range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX 891d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT 892d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_MIN 893d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_BITS 894d07e2259SDaniel Cashman help 895d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 896d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 897d07e2259SDaniel Cashman resulting from mmap allocations. This value will be bounded 898d07e2259SDaniel Cashman by the architecture's minimum and maximum supported values. 899d07e2259SDaniel Cashman 900d07e2259SDaniel Cashman This value can be changed after boot using the 901d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_bits tunable 902d07e2259SDaniel Cashman 903d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_COMPAT_BITS 904d07e2259SDaniel Cashman bool 905d07e2259SDaniel Cashman help 906d07e2259SDaniel Cashman An arch should select this symbol if it supports running applications 907d07e2259SDaniel Cashman in compatibility mode, supports setting a variable number of bits for 908d07e2259SDaniel Cashman use in establishing the base address for mmap allocations, has MMU 909d07e2259SDaniel Cashman enabled and provides values for both: 910d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MIN 911d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MAX 912d07e2259SDaniel Cashman 913d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MIN 914d07e2259SDaniel Cashman int 915d07e2259SDaniel Cashman 916d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MAX 917d07e2259SDaniel Cashman int 918d07e2259SDaniel Cashman 919d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 920d07e2259SDaniel Cashman int 921d07e2259SDaniel Cashman 922d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS 923d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT 924d07e2259SDaniel Cashman range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX 925d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 926d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_MIN 927d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS 928d07e2259SDaniel Cashman help 929d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 930d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 931d07e2259SDaniel Cashman resulting from mmap allocations for compatible applications This 932d07e2259SDaniel Cashman value will be bounded by the architecture's minimum and maximum 933d07e2259SDaniel Cashman supported values. 934d07e2259SDaniel Cashman 935d07e2259SDaniel Cashman This value can be changed after boot using the 936d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_compat_bits tunable 937d07e2259SDaniel Cashman 9381b028f78SDmitry Safonovconfig HAVE_ARCH_COMPAT_MMAP_BASES 9391b028f78SDmitry Safonov bool 9401b028f78SDmitry Safonov help 9411b028f78SDmitry Safonov This allows 64bit applications to invoke 32-bit mmap() syscall 9421b028f78SDmitry Safonov and vice-versa 32-bit applications to call 64-bit mmap(). 9431b028f78SDmitry Safonov Required for applications doing different bitness syscalls. 9441b028f78SDmitry Safonov 94567f3977fSAlexandre Ghiti# This allows to use a set of generic functions to determine mmap base 94667f3977fSAlexandre Ghiti# address by giving priority to top-down scheme only if the process 94767f3977fSAlexandre Ghiti# is not in legacy mode (compat task, unlimited stack size or 94867f3977fSAlexandre Ghiti# sysctl_legacy_va_layout). 94967f3977fSAlexandre Ghiti# Architecture that selects this option can provide its own version of: 95067f3977fSAlexandre Ghiti# - STACK_RND_MASK 95167f3977fSAlexandre Ghiticonfig ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 95267f3977fSAlexandre Ghiti bool 95367f3977fSAlexandre Ghiti depends on MMU 954e7142bf5SAlexandre Ghiti select ARCH_HAS_ELF_RANDOMIZE 95567f3977fSAlexandre Ghiti 956b9ab5ebbSJosh Poimboeufconfig HAVE_STACK_VALIDATION 957b9ab5ebbSJosh Poimboeuf bool 958b9ab5ebbSJosh Poimboeuf help 959b9ab5ebbSJosh Poimboeuf Architecture supports the 'objtool check' host tool command, which 960b9ab5ebbSJosh Poimboeuf performs compile-time stack metadata validation. 961b9ab5ebbSJosh Poimboeuf 962af085d90SJosh Poimboeufconfig HAVE_RELIABLE_STACKTRACE 963af085d90SJosh Poimboeuf bool 964af085d90SJosh Poimboeuf help 965140d7e88SMiroslav Benes Architecture has either save_stack_trace_tsk_reliable() or 966140d7e88SMiroslav Benes arch_stack_walk_reliable() function which only returns a stack trace 967140d7e88SMiroslav Benes if it can guarantee the trace is reliable. 968af085d90SJosh Poimboeuf 969468a9428SGeorge Spelvinconfig HAVE_ARCH_HASH 970468a9428SGeorge Spelvin bool 971468a9428SGeorge Spelvin default n 972468a9428SGeorge Spelvin help 973468a9428SGeorge Spelvin If this is set, the architecture provides an <asm/hash.h> 974468a9428SGeorge Spelvin file which provides platform-specific implementations of some 975468a9428SGeorge Spelvin functions in <linux/hash.h> or fs/namei.c. 976468a9428SGeorge Spelvin 977666047feSFinn Thainconfig HAVE_ARCH_NVRAM_OPS 978666047feSFinn Thain bool 979666047feSFinn Thain 9803a495511SWilliam Breathitt Grayconfig ISA_BUS_API 9813a495511SWilliam Breathitt Gray def_bool ISA 9823a495511SWilliam Breathitt Gray 983d2125043SAl Viro# 984d2125043SAl Viro# ABI hall of shame 985d2125043SAl Viro# 986d2125043SAl Viroconfig CLONE_BACKWARDS 987d2125043SAl Viro bool 988d2125043SAl Viro help 989d2125043SAl Viro Architecture has tls passed as the 4th argument of clone(2), 990d2125043SAl Viro not the 5th one. 991d2125043SAl Viro 992d2125043SAl Viroconfig CLONE_BACKWARDS2 993d2125043SAl Viro bool 994d2125043SAl Viro help 995d2125043SAl Viro Architecture has the first two arguments of clone(2) swapped. 996d2125043SAl Viro 997dfa9771aSMichal Simekconfig CLONE_BACKWARDS3 998dfa9771aSMichal Simek bool 999dfa9771aSMichal Simek help 1000dfa9771aSMichal Simek Architecture has tls passed as the 3rd argument of clone(2), 1001dfa9771aSMichal Simek not the 5th one. 1002dfa9771aSMichal Simek 1003eaca6eaeSAl Viroconfig ODD_RT_SIGACTION 1004eaca6eaeSAl Viro bool 1005eaca6eaeSAl Viro help 1006eaca6eaeSAl Viro Architecture has unusual rt_sigaction(2) arguments 1007eaca6eaeSAl Viro 10080a0e8cdfSAl Viroconfig OLD_SIGSUSPEND 10090a0e8cdfSAl Viro bool 10100a0e8cdfSAl Viro help 10110a0e8cdfSAl Viro Architecture has old sigsuspend(2) syscall, of one-argument variety 10120a0e8cdfSAl Viro 10130a0e8cdfSAl Viroconfig OLD_SIGSUSPEND3 10140a0e8cdfSAl Viro bool 10150a0e8cdfSAl Viro help 10160a0e8cdfSAl Viro Even weirder antique ABI - three-argument sigsuspend(2) 10170a0e8cdfSAl Viro 1018495dfbf7SAl Viroconfig OLD_SIGACTION 1019495dfbf7SAl Viro bool 1020495dfbf7SAl Viro help 1021495dfbf7SAl Viro Architecture has old sigaction(2) syscall. Nope, not the same 1022495dfbf7SAl Viro as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2), 1023495dfbf7SAl Viro but fairly different variant of sigaction(2), thanks to OSF/1 1024495dfbf7SAl Viro compatibility... 1025495dfbf7SAl Viro 1026495dfbf7SAl Viroconfig COMPAT_OLD_SIGACTION 1027495dfbf7SAl Viro bool 1028495dfbf7SAl Viro 102917435e5fSDeepa Dinamaniconfig COMPAT_32BIT_TIME 1030942437c9SArnd Bergmann bool "Provide system calls for 32-bit time_t" 1031942437c9SArnd Bergmann default !64BIT || COMPAT 103217435e5fSDeepa Dinamani help 103317435e5fSDeepa Dinamani This enables 32 bit time_t support in addition to 64 bit time_t support. 103417435e5fSDeepa Dinamani This is relevant on all 32-bit architectures, and 64-bit architectures 103517435e5fSDeepa Dinamani as part of compat syscall handling. 103617435e5fSDeepa Dinamani 103787a4c375SChristoph Hellwigconfig ARCH_NO_PREEMPT 103887a4c375SChristoph Hellwig bool 103987a4c375SChristoph Hellwig 1040a50a3f4bSThomas Gleixnerconfig ARCH_SUPPORTS_RT 1041a50a3f4bSThomas Gleixner bool 1042a50a3f4bSThomas Gleixner 1043fff7fb0bSZhaoxiu Zengconfig CPU_NO_EFFICIENT_FFS 1044fff7fb0bSZhaoxiu Zeng def_bool n 1045fff7fb0bSZhaoxiu Zeng 1046ba14a194SAndy Lutomirskiconfig HAVE_ARCH_VMAP_STACK 1047ba14a194SAndy Lutomirski def_bool n 1048ba14a194SAndy Lutomirski help 1049ba14a194SAndy Lutomirski An arch should select this symbol if it can support kernel stacks 1050ba14a194SAndy Lutomirski in vmalloc space. This means: 1051ba14a194SAndy Lutomirski 1052ba14a194SAndy Lutomirski - vmalloc space must be large enough to hold many kernel stacks. 1053ba14a194SAndy Lutomirski This may rule out many 32-bit architectures. 1054ba14a194SAndy Lutomirski 1055ba14a194SAndy Lutomirski - Stacks in vmalloc space need to work reliably. For example, if 1056ba14a194SAndy Lutomirski vmap page tables are created on demand, either this mechanism 1057ba14a194SAndy Lutomirski needs to work while the stack points to a virtual address with 1058ba14a194SAndy Lutomirski unpopulated page tables or arch code (switch_to() and switch_mm(), 1059ba14a194SAndy Lutomirski most likely) needs to ensure that the stack's page table entries 1060ba14a194SAndy Lutomirski are populated before running on a possibly unpopulated stack. 1061ba14a194SAndy Lutomirski 1062ba14a194SAndy Lutomirski - If the stack overflows into a guard page, something reasonable 1063ba14a194SAndy Lutomirski should happen. The definition of "reasonable" is flexible, but 1064ba14a194SAndy Lutomirski instantly rebooting without logging anything would be unfriendly. 1065ba14a194SAndy Lutomirski 1066ba14a194SAndy Lutomirskiconfig VMAP_STACK 1067ba14a194SAndy Lutomirski default y 1068ba14a194SAndy Lutomirski bool "Use a virtually-mapped stack" 1069eafb149eSDaniel Axtens depends on HAVE_ARCH_VMAP_STACK 107038dd767dSAndrey Konovalov depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC 1071a7f7f624SMasahiro Yamada help 1072ba14a194SAndy Lutomirski Enable this if you want the use virtually-mapped kernel stacks 1073ba14a194SAndy Lutomirski with guard pages. This causes kernel stack overflows to be 1074ba14a194SAndy Lutomirski caught immediately rather than causing difficult-to-diagnose 1075ba14a194SAndy Lutomirski corruption. 1076ba14a194SAndy Lutomirski 107738dd767dSAndrey Konovalov To use this with software KASAN modes, the architecture must support 107838dd767dSAndrey Konovalov backing virtual mappings with real shadow memory, and KASAN_VMALLOC 107938dd767dSAndrey Konovalov must be enabled. 1080ba14a194SAndy Lutomirski 1081ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX 1082ad21fc4fSLaura Abbott def_bool n 1083ad21fc4fSLaura Abbott 1084ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1085ad21fc4fSLaura Abbott def_bool n 1086ad21fc4fSLaura Abbott 1087ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_KERNEL_RWX 1088ad21fc4fSLaura Abbott def_bool n 1089ad21fc4fSLaura Abbott 10900f5bf6d0SLaura Abbottconfig STRICT_KERNEL_RWX 1091ad21fc4fSLaura Abbott bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX 1092ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_KERNEL_RWX 1093ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1094ad21fc4fSLaura Abbott help 1095ad21fc4fSLaura Abbott If this is set, kernel text and rodata memory will be made read-only, 1096ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 1097ad21fc4fSLaura Abbott protection against certain security exploits (e.g. executing the heap 1098ad21fc4fSLaura Abbott or modifying text) 1099ad21fc4fSLaura Abbott 1100ad21fc4fSLaura Abbott These features are considered standard security practice these days. 1101ad21fc4fSLaura Abbott You should say Y here in almost all cases. 1102ad21fc4fSLaura Abbott 1103ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_MODULE_RWX 1104ad21fc4fSLaura Abbott def_bool n 1105ad21fc4fSLaura Abbott 11060f5bf6d0SLaura Abbottconfig STRICT_MODULE_RWX 1107ad21fc4fSLaura Abbott bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX 1108ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES 1109ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1110ad21fc4fSLaura Abbott help 1111ad21fc4fSLaura Abbott If this is set, module text and rodata memory will be made read-only, 1112ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 1113ad21fc4fSLaura Abbott protection against certain security exploits (e.g. writing to text) 1114ad21fc4fSLaura Abbott 1115ea8c64acSChristoph Hellwig# select if the architecture provides an asm/dma-direct.h header 1116ea8c64acSChristoph Hellwigconfig ARCH_HAS_PHYS_TO_DMA 1117ea8c64acSChristoph Hellwig bool 1118ea8c64acSChristoph Hellwig 111904f264d3SPaul Burtonconfig HAVE_ARCH_COMPILER_H 112004f264d3SPaul Burton bool 112104f264d3SPaul Burton help 112204f264d3SPaul Burton An architecture can select this if it provides an 112304f264d3SPaul Burton asm/compiler.h header that should be included after 112404f264d3SPaul Burton linux/compiler-*.h in order to override macro definitions that those 112504f264d3SPaul Burton headers generally provide. 112604f264d3SPaul Burton 1127271ca788SArd Biesheuvelconfig HAVE_ARCH_PREL32_RELOCATIONS 1128271ca788SArd Biesheuvel bool 1129271ca788SArd Biesheuvel help 1130271ca788SArd Biesheuvel May be selected by an architecture if it supports place-relative 1131271ca788SArd Biesheuvel 32-bit relocations, both in the toolchain and in the module loader, 1132271ca788SArd Biesheuvel in which case relative references can be used in special sections 1133271ca788SArd Biesheuvel for PCI fixup, initcalls etc which are only half the size on 64 bit 1134271ca788SArd Biesheuvel architectures, and don't require runtime relocation on relocatable 1135271ca788SArd Biesheuvel kernels. 1136271ca788SArd Biesheuvel 1137ce9084baSArd Biesheuvelconfig ARCH_USE_MEMREMAP_PROT 1138ce9084baSArd Biesheuvel bool 1139ce9084baSArd Biesheuvel 1140fb346fd9SWaiman Longconfig LOCK_EVENT_COUNTS 1141fb346fd9SWaiman Long bool "Locking event counts collection" 1142fb346fd9SWaiman Long depends on DEBUG_FS 1143a7f7f624SMasahiro Yamada help 1144fb346fd9SWaiman Long Enable light-weight counting of various locking related events 1145fb346fd9SWaiman Long in the system with minimal performance impact. This reduces 1146fb346fd9SWaiman Long the chance of application behavior change because of timing 1147fb346fd9SWaiman Long differences. The counts are reported via debugfs. 1148fb346fd9SWaiman Long 11495cf896fbSPeter Collingbourne# Select if the architecture has support for applying RELR relocations. 11505cf896fbSPeter Collingbourneconfig ARCH_HAS_RELR 11515cf896fbSPeter Collingbourne bool 11525cf896fbSPeter Collingbourne 11535cf896fbSPeter Collingbourneconfig RELR 11545cf896fbSPeter Collingbourne bool "Use RELR relocation packing" 11555cf896fbSPeter Collingbourne depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR 11565cf896fbSPeter Collingbourne default y 11575cf896fbSPeter Collingbourne help 11585cf896fbSPeter Collingbourne Store the kernel's dynamic relocations in the RELR relocation packing 11595cf896fbSPeter Collingbourne format. Requires a compatible linker (LLD supports this feature), as 11605cf896fbSPeter Collingbourne well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy 11615cf896fbSPeter Collingbourne are compatible). 11625cf896fbSPeter Collingbourne 11630c9c1d56SThiago Jung Bauermannconfig ARCH_HAS_MEM_ENCRYPT 11640c9c1d56SThiago Jung Bauermann bool 11650c9c1d56SThiago Jung Bauermann 11660e242208SHassan Naveedconfig HAVE_SPARSE_SYSCALL_NR 11670e242208SHassan Naveed bool 11680e242208SHassan Naveed help 11690e242208SHassan Naveed An architecture should select this if its syscall numbering is sparse 11700e242208SHassan Naveed to save space. For example, MIPS architecture has a syscall array with 11710e242208SHassan Naveed entries at 4000, 5000 and 6000 locations. This option turns on syscall 11720e242208SHassan Naveed related optimizations for a given architecture. 11730e242208SHassan Naveed 1174d60d7de3SSven Schnelleconfig ARCH_HAS_VDSO_DATA 1175d60d7de3SSven Schnelle bool 1176d60d7de3SSven Schnelle 1177115284d8SJosh Poimboeufconfig HAVE_STATIC_CALL 1178115284d8SJosh Poimboeuf bool 1179115284d8SJosh Poimboeuf 11809183c3f9SJosh Poimboeufconfig HAVE_STATIC_CALL_INLINE 11819183c3f9SJosh Poimboeuf bool 11829183c3f9SJosh Poimboeuf depends on HAVE_STATIC_CALL 11839183c3f9SJosh Poimboeuf 118459612b24SNathan Chancellorconfig ARCH_WANT_LD_ORPHAN_WARN 118559612b24SNathan Chancellor bool 118659612b24SNathan Chancellor help 118759612b24SNathan Chancellor An arch should select this symbol once all linker sections are explicitly 118859612b24SNathan Chancellor included, size-asserted, or discarded in the linker scripts. This is 118959612b24SNathan Chancellor important because we never want expected sections to be placed heuristically 119059612b24SNathan Chancellor by the linker, since the locations of such sections can change between linker 119159612b24SNathan Chancellor versions. 119259612b24SNathan Chancellor 11934f5b0c17SMike Rapoportconfig HAVE_ARCH_PFN_VALID 11944f5b0c17SMike Rapoport bool 11954f5b0c17SMike Rapoport 11965d6ad668SMike Rapoportconfig ARCH_SUPPORTS_DEBUG_PAGEALLOC 11975d6ad668SMike Rapoport bool 11985d6ad668SMike Rapoport 11992521f2c2SPeter Oberparleitersource "kernel/gcov/Kconfig" 120045332b1bSMasahiro Yamada 120145332b1bSMasahiro Yamadasource "scripts/gcc-plugins/Kconfig" 1202fa1b5d09SLinus Torvalds 120322471e13SRandy Dunlapendmenu 1204