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 2705736e4aSThomas Gleixnerconfig HOTPLUG_SMT 2805736e4aSThomas Gleixner bool 2905736e4aSThomas Gleixner 30125e5645SMathieu Desnoyersconfig OPROFILE 31b309a294SRobert Richter tristate "OProfile system profiling" 32125e5645SMathieu Desnoyers depends on PROFILING 33125e5645SMathieu Desnoyers depends on HAVE_OPROFILE 34d69d59f4SIngo Molnar select RING_BUFFER 359a5963ebSChristian Borntraeger select RING_BUFFER_ALLOW_SWAP 36125e5645SMathieu Desnoyers help 37125e5645SMathieu Desnoyers OProfile is a profiling system capable of profiling the 38125e5645SMathieu Desnoyers whole system, include the kernel, kernel modules, libraries, 39125e5645SMathieu Desnoyers and applications. 40125e5645SMathieu Desnoyers 41125e5645SMathieu Desnoyers If unsure, say N. 42125e5645SMathieu Desnoyers 434d4036e0SJason Yehconfig OPROFILE_EVENT_MULTIPLEX 444d4036e0SJason Yeh bool "OProfile multiplexing support (EXPERIMENTAL)" 454d4036e0SJason Yeh default n 464d4036e0SJason Yeh depends on OPROFILE && X86 474d4036e0SJason Yeh help 484d4036e0SJason Yeh The number of hardware counters is limited. The multiplexing 494d4036e0SJason Yeh feature enables OProfile to gather more events than counters 504d4036e0SJason Yeh are provided by the hardware. This is realized by switching 519332ef9dSMasahiro Yamada between events at a user specified time interval. 524d4036e0SJason Yeh 534d4036e0SJason Yeh If unsure, say N. 544d4036e0SJason Yeh 55125e5645SMathieu Desnoyersconfig HAVE_OPROFILE 569ba16087SJan Beulich bool 57125e5645SMathieu Desnoyers 58dcfce4a0SRobert Richterconfig OPROFILE_NMI_TIMER 59dcfce4a0SRobert Richter def_bool y 60af9feebeSAnton Blanchard depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64 61dcfce4a0SRobert Richter 62125e5645SMathieu Desnoyersconfig KPROBES 63125e5645SMathieu Desnoyers bool "Kprobes" 6405ed160eSMasami Hiramatsu depends on MODULES 65125e5645SMathieu Desnoyers depends on HAVE_KPROBES 6605ed160eSMasami Hiramatsu select KALLSYMS 67125e5645SMathieu Desnoyers help 68125e5645SMathieu Desnoyers Kprobes allows you to trap at almost any kernel address and 69125e5645SMathieu Desnoyers execute a callback function. register_kprobe() establishes 70125e5645SMathieu Desnoyers a probepoint and specifies the callback. Kprobes is useful 71125e5645SMathieu Desnoyers for kernel debugging, non-intrusive instrumentation and testing. 72125e5645SMathieu Desnoyers If in doubt, say "N". 73125e5645SMathieu Desnoyers 7445f81b1cSSteven Rostedtconfig JUMP_LABEL 75c5905afbSIngo Molnar bool "Optimize very unlikely/likely branches" 7645f81b1cSSteven Rostedt depends on HAVE_ARCH_JUMP_LABEL 77e9666d10SMasahiro Yamada depends on CC_HAS_ASM_GOTO 7845f81b1cSSteven Rostedt help 79c5905afbSIngo Molnar This option enables a transparent branch optimization that 80c5905afbSIngo Molnar makes certain almost-always-true or almost-always-false branch 81c5905afbSIngo Molnar conditions even cheaper to execute within the kernel. 8245f81b1cSSteven Rostedt 83c5905afbSIngo Molnar Certain performance-sensitive kernel code, such as trace points, 84c5905afbSIngo Molnar scheduler functionality, networking code and KVM have such 85c5905afbSIngo Molnar branches and include support for this optimization technique. 86c5905afbSIngo Molnar 87c5905afbSIngo Molnar If it is detected that the compiler has support for "asm goto", 88c5905afbSIngo Molnar the kernel will compile such branches with just a nop 89c5905afbSIngo Molnar instruction. When the condition flag is toggled to true, the 90c5905afbSIngo Molnar nop will be converted to a jump instruction to execute the 91c5905afbSIngo Molnar conditional block of instructions. 92c5905afbSIngo Molnar 93c5905afbSIngo Molnar This technique lowers overhead and stress on the branch prediction 94c5905afbSIngo Molnar of the processor and generally makes the kernel faster. The update 95c5905afbSIngo Molnar of the condition is slower, but those are always very rare. 96c5905afbSIngo Molnar 97c5905afbSIngo Molnar ( On 32-bit x86, the necessary options added to the compiler 98c5905afbSIngo Molnar flags may increase the size of the kernel slightly. ) 9945f81b1cSSteven Rostedt 1001987c947SPeter Zijlstraconfig STATIC_KEYS_SELFTEST 1011987c947SPeter Zijlstra bool "Static key selftest" 1021987c947SPeter Zijlstra depends on JUMP_LABEL 1031987c947SPeter Zijlstra help 1041987c947SPeter Zijlstra Boot time self-test of the branch patching code. 1051987c947SPeter Zijlstra 106afd66255SMasami Hiramatsuconfig OPTPROBES 1075cc718b9SMasami Hiramatsu def_bool y 1085cc718b9SMasami Hiramatsu depends on KPROBES && HAVE_OPTPROBES 10901b1d88bSThomas Gleixner select TASKS_RCU if PREEMPTION 110afd66255SMasami Hiramatsu 111e7dbfe34SMasami Hiramatsuconfig KPROBES_ON_FTRACE 112e7dbfe34SMasami Hiramatsu def_bool y 113e7dbfe34SMasami Hiramatsu depends on KPROBES && HAVE_KPROBES_ON_FTRACE 114e7dbfe34SMasami Hiramatsu depends on DYNAMIC_FTRACE_WITH_REGS 115e7dbfe34SMasami Hiramatsu help 116e7dbfe34SMasami Hiramatsu If function tracer is enabled and the arch supports full 117e7dbfe34SMasami Hiramatsu passing of pt_regs to function tracing, then kprobes can 118e7dbfe34SMasami Hiramatsu optimize on top of function tracing. 119e7dbfe34SMasami Hiramatsu 1202b144498SSrikar Dronamrajuconfig UPROBES 12109294e31SDavid A. Long def_bool n 122e8f4aa60SAllen Pais depends on ARCH_SUPPORTS_UPROBES 1232b144498SSrikar Dronamraju help 1247b2d81d4SIngo Molnar Uprobes is the user-space counterpart to kprobes: they 1257b2d81d4SIngo Molnar enable instrumentation applications (such as 'perf probe') 1267b2d81d4SIngo Molnar to establish unintrusive probes in user-space binaries and 1277b2d81d4SIngo Molnar libraries, by executing handler functions when the probes 1287b2d81d4SIngo Molnar are hit by user-space applications. 1297b2d81d4SIngo Molnar 1307b2d81d4SIngo Molnar ( These probes come in the form of single-byte breakpoints, 1317b2d81d4SIngo Molnar managed by the kernel and kept transparent to the probed 1327b2d81d4SIngo Molnar application. ) 1332b144498SSrikar Dronamraju 13458340a07SJohannes Bergconfig HAVE_EFFICIENT_UNALIGNED_ACCESS 1359ba16087SJan Beulich bool 13658340a07SJohannes Berg help 13758340a07SJohannes Berg Some architectures are unable to perform unaligned accesses 13858340a07SJohannes Berg without the use of get_unaligned/put_unaligned. Others are 13958340a07SJohannes Berg unable to perform such accesses efficiently (e.g. trap on 14058340a07SJohannes Berg unaligned access and require fixing it up in the exception 14158340a07SJohannes Berg handler.) 14258340a07SJohannes Berg 14358340a07SJohannes Berg This symbol should be selected by an architecture if it can 14458340a07SJohannes Berg perform unaligned accesses efficiently to allow different 14558340a07SJohannes Berg code paths to be selected for these cases. Some network 14658340a07SJohannes Berg drivers, for example, could opt to not fix up alignment 14758340a07SJohannes Berg problems with received packets if doing so would not help 14858340a07SJohannes Berg much. 14958340a07SJohannes Berg 15058340a07SJohannes Berg See Documentation/unaligned-memory-access.txt for more 15158340a07SJohannes Berg information on the topic of unaligned memory accesses. 15258340a07SJohannes Berg 153cf66bb93SDavid Woodhouseconfig ARCH_USE_BUILTIN_BSWAP 154cf66bb93SDavid Woodhouse bool 155cf66bb93SDavid Woodhouse help 156cf66bb93SDavid Woodhouse Modern versions of GCC (since 4.4) have builtin functions 157cf66bb93SDavid Woodhouse for handling byte-swapping. Using these, instead of the old 158cf66bb93SDavid Woodhouse inline assembler that the architecture code provides in the 159cf66bb93SDavid Woodhouse __arch_bswapXX() macros, allows the compiler to see what's 160cf66bb93SDavid Woodhouse happening and offers more opportunity for optimisation. In 161cf66bb93SDavid Woodhouse particular, the compiler will be able to combine the byteswap 162cf66bb93SDavid Woodhouse with a nearby load or store and use load-and-swap or 163cf66bb93SDavid Woodhouse store-and-swap instructions if the architecture has them. It 164cf66bb93SDavid Woodhouse should almost *never* result in code which is worse than the 165cf66bb93SDavid Woodhouse hand-coded assembler in <asm/swab.h>. But just in case it 166cf66bb93SDavid Woodhouse does, the use of the builtins is optional. 167cf66bb93SDavid Woodhouse 168cf66bb93SDavid Woodhouse Any architecture with load-and-swap or store-and-swap 169cf66bb93SDavid Woodhouse instructions should set this. And it shouldn't hurt to set it 170cf66bb93SDavid Woodhouse on architectures that don't have such instructions. 171cf66bb93SDavid Woodhouse 1729edddaa2SAnanth N Mavinakayanahalliconfig KRETPROBES 1739edddaa2SAnanth N Mavinakayanahalli def_bool y 1749edddaa2SAnanth N Mavinakayanahalli depends on KPROBES && HAVE_KRETPROBES 1759edddaa2SAnanth N Mavinakayanahalli 1767c68af6eSAvi Kivityconfig USER_RETURN_NOTIFIER 1777c68af6eSAvi Kivity bool 1787c68af6eSAvi Kivity depends on HAVE_USER_RETURN_NOTIFIER 1797c68af6eSAvi Kivity help 1807c68af6eSAvi Kivity Provide a kernel-internal notification when a cpu is about to 1817c68af6eSAvi Kivity switch to user mode. 1827c68af6eSAvi Kivity 18328b2ee20SRik van Rielconfig HAVE_IOREMAP_PROT 1849ba16087SJan Beulich bool 18528b2ee20SRik van Riel 186125e5645SMathieu Desnoyersconfig HAVE_KPROBES 1879ba16087SJan Beulich bool 1889edddaa2SAnanth N Mavinakayanahalli 1899edddaa2SAnanth N Mavinakayanahalliconfig HAVE_KRETPROBES 1909ba16087SJan Beulich bool 19174bc7ceeSArthur Kepner 192afd66255SMasami Hiramatsuconfig HAVE_OPTPROBES 193afd66255SMasami Hiramatsu bool 194d314d74cSCong Wang 195e7dbfe34SMasami Hiramatsuconfig HAVE_KPROBES_ON_FTRACE 196e7dbfe34SMasami Hiramatsu bool 197e7dbfe34SMasami Hiramatsu 198540adea3SMasami Hiramatsuconfig HAVE_FUNCTION_ERROR_INJECTION 1999802d865SJosef Bacik bool 2009802d865SJosef Bacik 20142a0bb3fSPetr Mladekconfig HAVE_NMI 20242a0bb3fSPetr Mladek bool 20342a0bb3fSPetr Mladek 2041f5a4ad9SRoland McGrath# 2051f5a4ad9SRoland McGrath# An arch should select this if it provides all these things: 2061f5a4ad9SRoland McGrath# 2071f5a4ad9SRoland McGrath# task_pt_regs() in asm/processor.h or asm/ptrace.h 2081f5a4ad9SRoland McGrath# arch_has_single_step() if there is hardware single-step support 2091f5a4ad9SRoland McGrath# arch_has_block_step() if there is hardware block-step support 2101f5a4ad9SRoland McGrath# asm/syscall.h supplying asm-generic/syscall.h interface 2111f5a4ad9SRoland McGrath# linux/regset.h user_regset interfaces 2121f5a4ad9SRoland McGrath# CORE_DUMP_USE_REGSET #define'd in linux/elf.h 2131f5a4ad9SRoland McGrath# TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit} 2141f5a4ad9SRoland McGrath# TIF_NOTIFY_RESUME calls tracehook_notify_resume() 2151f5a4ad9SRoland McGrath# signal delivery calls tracehook_signal_handler() 2161f5a4ad9SRoland McGrath# 2171f5a4ad9SRoland McGrathconfig HAVE_ARCH_TRACEHOOK 2189ba16087SJan Beulich bool 2191f5a4ad9SRoland McGrath 220c64be2bbSMarek Szyprowskiconfig HAVE_DMA_CONTIGUOUS 221c64be2bbSMarek Szyprowski bool 222c64be2bbSMarek Szyprowski 22329d5e047SThomas Gleixnerconfig GENERIC_SMP_IDLE_THREAD 22429d5e047SThomas Gleixner bool 22529d5e047SThomas Gleixner 226485cf5daSKevin Hilmanconfig GENERIC_IDLE_POLL_SETUP 227485cf5daSKevin Hilman bool 228485cf5daSKevin Hilman 2296974f0c4SDaniel Micayconfig ARCH_HAS_FORTIFY_SOURCE 2306974f0c4SDaniel Micay bool 2316974f0c4SDaniel Micay help 2326974f0c4SDaniel Micay An architecture should select this when it can successfully 2336974f0c4SDaniel Micay build and run with CONFIG_FORTIFY_SOURCE. 2346974f0c4SDaniel Micay 235d8ae8a37SChristoph Hellwig# 236d8ae8a37SChristoph Hellwig# Select if the arch provides a historic keepinit alias for the retain_initrd 237d8ae8a37SChristoph Hellwig# command line option 238d8ae8a37SChristoph Hellwig# 239d8ae8a37SChristoph Hellwigconfig ARCH_HAS_KEEPINITRD 240d8ae8a37SChristoph Hellwig bool 241d8ae8a37SChristoph Hellwig 242d2852a22SDaniel Borkmann# Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h 243d2852a22SDaniel Borkmannconfig ARCH_HAS_SET_MEMORY 244d2852a22SDaniel Borkmann bool 245d2852a22SDaniel Borkmann 246d253ca0cSRick Edgecombe# Select if arch has all set_direct_map_invalid/default() functions 247d253ca0cSRick Edgecombeconfig ARCH_HAS_SET_DIRECT_MAP 248d253ca0cSRick Edgecombe bool 249d253ca0cSRick Edgecombe 250c30700dbSChristoph Hellwig# 251c30700dbSChristoph Hellwig# Select if arch has an uncached kernel segment and provides the 252c30700dbSChristoph Hellwig# uncached_kernel_address / cached_kernel_address symbols to use it 253c30700dbSChristoph Hellwig# 254c30700dbSChristoph Hellwigconfig ARCH_HAS_UNCACHED_SEGMENT 255c30700dbSChristoph Hellwig select ARCH_HAS_DMA_PREP_COHERENT 256c30700dbSChristoph Hellwig bool 257c30700dbSChristoph Hellwig 2580500871fSDavid Howells# Select if arch init_task must go in the __init_task_data section 2590500871fSDavid Howellsconfig ARCH_TASK_STRUCT_ON_STACK 260a4a2eb49SThomas Gleixner bool 261a4a2eb49SThomas Gleixner 262f5e10287SThomas Gleixner# Select if arch has its private alloc_task_struct() function 263f5e10287SThomas Gleixnerconfig ARCH_TASK_STRUCT_ALLOCATOR 264f5e10287SThomas Gleixner bool 265f5e10287SThomas Gleixner 2665905429aSKees Cookconfig HAVE_ARCH_THREAD_STRUCT_WHITELIST 2675905429aSKees Cook bool 2685905429aSKees Cook depends on !ARCH_TASK_STRUCT_ALLOCATOR 2695905429aSKees Cook help 2705905429aSKees Cook An architecture should select this to provide hardened usercopy 2715905429aSKees Cook knowledge about what region of the thread_struct should be 2725905429aSKees Cook whitelisted for copying to userspace. Normally this is only the 2735905429aSKees Cook FPU registers. Specifically, arch_thread_struct_whitelist() 2745905429aSKees Cook should be implemented. Without this, the entire thread_struct 2755905429aSKees Cook field in task_struct will be left whitelisted. 2765905429aSKees Cook 277b235beeaSLinus Torvalds# Select if arch has its private alloc_thread_stack() function 278b235beeaSLinus Torvaldsconfig ARCH_THREAD_STACK_ALLOCATOR 279f5e10287SThomas Gleixner bool 280f5e10287SThomas Gleixner 2815aaeb5c0SIngo Molnar# Select if arch wants to size task_struct dynamically via arch_task_struct_size: 2825aaeb5c0SIngo Molnarconfig ARCH_WANTS_DYNAMIC_TASK_STRUCT 2835aaeb5c0SIngo Molnar bool 2845aaeb5c0SIngo Molnar 285942fa985SYury Norovconfig ARCH_32BIT_OFF_T 286942fa985SYury Norov bool 287942fa985SYury Norov depends on !64BIT 288942fa985SYury Norov help 289942fa985SYury Norov All new 32-bit architectures should have 64-bit off_t type on 290942fa985SYury Norov userspace side which corresponds to the loff_t kernel type. This 291942fa985SYury Norov is the requirement for modern ABIs. Some existing architectures 292942fa985SYury Norov still support 32-bit off_t. This option is enabled for all such 293942fa985SYury Norov architectures explicitly. 294942fa985SYury Norov 2952ff2b7ecSMasahiro Yamadaconfig HAVE_ASM_MODVERSIONS 2962ff2b7ecSMasahiro Yamada bool 2972ff2b7ecSMasahiro Yamada help 2982ff2b7ecSMasahiro Yamada This symbol should be selected by an architecure if it provides 2992ff2b7ecSMasahiro Yamada <asm/asm-prototypes.h> to support the module versioning for symbols 3002ff2b7ecSMasahiro Yamada exported from assembly code. 3012ff2b7ecSMasahiro Yamada 302f850c30cSHeiko Carstensconfig HAVE_REGS_AND_STACK_ACCESS_API 303f850c30cSHeiko Carstens bool 304e01292b1SHeiko Carstens help 305e01292b1SHeiko Carstens This symbol should be selected by an architecure if it supports 306e01292b1SHeiko Carstens the API needed to access registers and stack entries from pt_regs, 307e01292b1SHeiko Carstens declared in asm/ptrace.h 308e01292b1SHeiko Carstens For example the kprobes-based event tracer needs this API. 309f850c30cSHeiko Carstens 310d7822b1eSMathieu Desnoyersconfig HAVE_RSEQ 311d7822b1eSMathieu Desnoyers bool 312d7822b1eSMathieu Desnoyers depends on HAVE_REGS_AND_STACK_ACCESS_API 313d7822b1eSMathieu Desnoyers help 314d7822b1eSMathieu Desnoyers This symbol should be selected by an architecture if it 315d7822b1eSMathieu Desnoyers supports an implementation of restartable sequences. 316d7822b1eSMathieu Desnoyers 3173c88ee19SMasami Hiramatsuconfig HAVE_FUNCTION_ARG_ACCESS_API 3183c88ee19SMasami Hiramatsu bool 3193c88ee19SMasami Hiramatsu help 3203c88ee19SMasami Hiramatsu This symbol should be selected by an architecure if it supports 3213c88ee19SMasami Hiramatsu the API needed to access function arguments from pt_regs, 3223c88ee19SMasami Hiramatsu declared in asm/ptrace.h 3233c88ee19SMasami Hiramatsu 3249483a578SDavid Brownellconfig HAVE_CLK 3259ba16087SJan Beulich bool 3269483a578SDavid Brownell help 3279483a578SDavid Brownell The <linux/clk.h> calls support software clock gating and 3289483a578SDavid Brownell thus are a key power management tool on many systems. 3299483a578SDavid Brownell 33062a038d3SK.Prasadconfig HAVE_HW_BREAKPOINT 33162a038d3SK.Prasad bool 33299e8c5a3SFrederic Weisbecker depends on PERF_EVENTS 33362a038d3SK.Prasad 3340102752eSFrederic Weisbeckerconfig HAVE_MIXED_BREAKPOINTS_REGS 3350102752eSFrederic Weisbecker bool 3360102752eSFrederic Weisbecker depends on HAVE_HW_BREAKPOINT 3370102752eSFrederic Weisbecker help 3380102752eSFrederic Weisbecker Depending on the arch implementation of hardware breakpoints, 3390102752eSFrederic Weisbecker some of them have separate registers for data and instruction 3400102752eSFrederic Weisbecker breakpoints addresses, others have mixed registers to store 3410102752eSFrederic Weisbecker them but define the access type in a control register. 3420102752eSFrederic Weisbecker Select this option if your arch implements breakpoints under the 3430102752eSFrederic Weisbecker latter fashion. 3440102752eSFrederic Weisbecker 3457c68af6eSAvi Kivityconfig HAVE_USER_RETURN_NOTIFIER 3467c68af6eSAvi Kivity bool 347a1922ed6SIngo Molnar 348c01d4323SFrederic Weisbeckerconfig HAVE_PERF_EVENTS_NMI 349c01d4323SFrederic Weisbecker bool 35023637d47SFrederic Weisbecker help 35123637d47SFrederic Weisbecker System hardware can generate an NMI using the perf event 35223637d47SFrederic Weisbecker subsystem. Also has support for calculating CPU cycle events 35323637d47SFrederic Weisbecker to determine how many clock cycles in a given period. 354c01d4323SFrederic Weisbecker 35505a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_PERF 35605a4a952SNicholas Piggin bool 35705a4a952SNicholas Piggin depends on HAVE_PERF_EVENTS_NMI 35805a4a952SNicholas Piggin help 35905a4a952SNicholas Piggin The arch chooses to use the generic perf-NMI-based hardlockup 36005a4a952SNicholas Piggin detector. Must define HAVE_PERF_EVENTS_NMI. 36105a4a952SNicholas Piggin 36205a4a952SNicholas Pigginconfig HAVE_NMI_WATCHDOG 36305a4a952SNicholas Piggin depends on HAVE_NMI 36405a4a952SNicholas Piggin bool 36505a4a952SNicholas Piggin help 36605a4a952SNicholas Piggin The arch provides a low level NMI watchdog. It provides 36705a4a952SNicholas Piggin asm/nmi.h, and defines its own arch_touch_nmi_watchdog(). 36805a4a952SNicholas Piggin 36905a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_ARCH 37005a4a952SNicholas Piggin bool 37105a4a952SNicholas Piggin select HAVE_NMI_WATCHDOG 37205a4a952SNicholas Piggin help 37305a4a952SNicholas Piggin The arch chooses to provide its own hardlockup detector, which is 37405a4a952SNicholas Piggin a superset of the HAVE_NMI_WATCHDOG. It also conforms to config 37505a4a952SNicholas Piggin interfaces and parameters provided by hardlockup detector subsystem. 37605a4a952SNicholas Piggin 377c5e63197SJiri Olsaconfig HAVE_PERF_REGS 378c5e63197SJiri Olsa bool 379c5e63197SJiri Olsa help 380c5e63197SJiri Olsa Support selective register dumps for perf events. This includes 381c5e63197SJiri Olsa bit-mapping of each registers and a unique architecture id. 382c5e63197SJiri Olsa 383c5ebcedbSJiri Olsaconfig HAVE_PERF_USER_STACK_DUMP 384c5ebcedbSJiri Olsa bool 385c5ebcedbSJiri Olsa help 386c5ebcedbSJiri Olsa Support user stack dumps for perf event samples. This needs 387c5ebcedbSJiri Olsa access to the user stack pointer which is not unified across 388c5ebcedbSJiri Olsa architectures. 389c5ebcedbSJiri Olsa 390bf5438fcSJason Baronconfig HAVE_ARCH_JUMP_LABEL 391bf5438fcSJason Baron bool 392bf5438fcSJason Baron 39350ff18abSArd Biesheuvelconfig HAVE_ARCH_JUMP_LABEL_RELATIVE 39450ff18abSArd Biesheuvel bool 39550ff18abSArd Biesheuvel 396ff2e6d72SPeter Zijlstraconfig MMU_GATHER_RCU_TABLE_FREE 39726723911SPeter Zijlstra bool 39826723911SPeter Zijlstra 399ed6a7935SPeter Zijlstraconfig HAVE_MMU_GATHER_PAGE_SIZE 400ed6a7935SPeter Zijlstra bool 401ed6a7935SPeter Zijlstra 40227796d03SPeter Zijlstraconfig MMU_GATHER_NO_RANGE 40327796d03SPeter Zijlstra bool 40427796d03SPeter Zijlstra 405952a31c9SMartin Schwidefskyconfig HAVE_MMU_GATHER_NO_GATHER 406952a31c9SMartin Schwidefsky bool 407952a31c9SMartin Schwidefsky 408df013ffbSHuang Yingconfig ARCH_HAVE_NMI_SAFE_CMPXCHG 409df013ffbSHuang Ying bool 410df013ffbSHuang Ying 41143570fd2SHeiko Carstensconfig HAVE_ALIGNED_STRUCT_PAGE 41243570fd2SHeiko Carstens bool 41343570fd2SHeiko Carstens help 41443570fd2SHeiko Carstens This makes sure that struct pages are double word aligned and that 41543570fd2SHeiko Carstens e.g. the SLUB allocator can perform double word atomic operations 41643570fd2SHeiko Carstens on a struct page for better performance. However selecting this 41743570fd2SHeiko Carstens might increase the size of a struct page by a word. 41843570fd2SHeiko Carstens 4194156153cSHeiko Carstensconfig HAVE_CMPXCHG_LOCAL 4204156153cSHeiko Carstens bool 4214156153cSHeiko Carstens 4222565409fSHeiko Carstensconfig HAVE_CMPXCHG_DOUBLE 4232565409fSHeiko Carstens bool 4242565409fSHeiko Carstens 42577e58496SPaul E. McKenneyconfig ARCH_WEAK_RELEASE_ACQUIRE 42677e58496SPaul E. McKenney bool 42777e58496SPaul E. McKenney 428c1d7e01dSWill Deaconconfig ARCH_WANT_IPC_PARSE_VERSION 429c1d7e01dSWill Deacon bool 430c1d7e01dSWill Deacon 431c1d7e01dSWill Deaconconfig ARCH_WANT_COMPAT_IPC_PARSE_VERSION 432c1d7e01dSWill Deacon bool 433c1d7e01dSWill Deacon 43448b25c43SChris Metcalfconfig ARCH_WANT_OLD_COMPAT_IPC 435c1d7e01dSWill Deacon select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 43648b25c43SChris Metcalf bool 43748b25c43SChris Metcalf 438e2cfabdfSWill Drewryconfig HAVE_ARCH_SECCOMP_FILTER 439e2cfabdfSWill Drewry bool 440e2cfabdfSWill Drewry help 441fb0fadf9SWill Drewry An arch should select this symbol if it provides all of these things: 442bb6ea430SWill Drewry - syscall_get_arch() 443bb6ea430SWill Drewry - syscall_get_arguments() 444bb6ea430SWill Drewry - syscall_rollback() 445bb6ea430SWill Drewry - syscall_set_return_value() 446fb0fadf9SWill Drewry - SIGSYS siginfo_t support 447fb0fadf9SWill Drewry - secure_computing is called from a ptrace_event()-safe context 448fb0fadf9SWill Drewry - secure_computing return value is checked and a return value of -1 449fb0fadf9SWill Drewry results in the system call being skipped immediately. 45048dc92b9SKees Cook - seccomp syscall wired up 451e2cfabdfSWill Drewry 452e2cfabdfSWill Drewryconfig SECCOMP_FILTER 453e2cfabdfSWill Drewry def_bool y 454e2cfabdfSWill Drewry depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET 455e2cfabdfSWill Drewry help 456e2cfabdfSWill Drewry Enable tasks to build secure computing environments defined 457e2cfabdfSWill Drewry in terms of Berkeley Packet Filter programs which implement 458e2cfabdfSWill Drewry task-defined system call filtering polices. 459e2cfabdfSWill Drewry 4605fb94e9cSMauro Carvalho Chehab See Documentation/userspace-api/seccomp_filter.rst for details. 461e2cfabdfSWill Drewry 462afaef01cSAlexander Popovconfig HAVE_ARCH_STACKLEAK 463afaef01cSAlexander Popov bool 464afaef01cSAlexander Popov help 465afaef01cSAlexander Popov An architecture should select this if it has the code which 466afaef01cSAlexander Popov fills the used part of the kernel stack with the STACKLEAK_POISON 467afaef01cSAlexander Popov value before returning from system calls. 468afaef01cSAlexander Popov 469d148eac0SMasahiro Yamadaconfig HAVE_STACKPROTECTOR 47019952a92SKees Cook bool 47119952a92SKees Cook help 47219952a92SKees Cook An arch should select this symbol if: 47319952a92SKees Cook - it has implemented a stack canary (e.g. __stack_chk_guard) 47419952a92SKees Cook 4752a61f474SMasahiro Yamadaconfig CC_HAS_STACKPROTECTOR_NONE 4762a61f474SMasahiro Yamada def_bool $(cc-option,-fno-stack-protector) 4772a61f474SMasahiro Yamada 478050e9baaSLinus Torvaldsconfig STACKPROTECTOR 4792a61f474SMasahiro Yamada bool "Stack Protector buffer overflow detection" 480d148eac0SMasahiro Yamada depends on HAVE_STACKPROTECTOR 4812a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector) 4822a61f474SMasahiro Yamada default y 4838779657dSKees Cook help 4848779657dSKees Cook This option turns on the "stack-protector" GCC feature. This 48519952a92SKees Cook feature puts, at the beginning of functions, a canary value on 48619952a92SKees Cook the stack just before the return address, and validates 48719952a92SKees Cook the value just before actually returning. Stack based buffer 48819952a92SKees Cook overflows (that need to overwrite this return address) now also 48919952a92SKees Cook overwrite the canary, which gets detected and the attack is then 49019952a92SKees Cook neutralized via a kernel panic. 49119952a92SKees Cook 4928779657dSKees Cook Functions will have the stack-protector canary logic added if they 4938779657dSKees Cook have an 8-byte or larger character array on the stack. 4948779657dSKees Cook 49519952a92SKees Cook This feature requires gcc version 4.2 or above, or a distribution 4968779657dSKees Cook gcc with the feature backported ("-fstack-protector"). 4978779657dSKees Cook 4988779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 4998779657dSKees Cook about 3% of all kernel functions, which increases kernel code size 5008779657dSKees Cook by about 0.3%. 5018779657dSKees Cook 502050e9baaSLinus Torvaldsconfig STACKPROTECTOR_STRONG 5032a61f474SMasahiro Yamada bool "Strong Stack Protector" 504050e9baaSLinus Torvalds depends on STACKPROTECTOR 5052a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector-strong) 5062a61f474SMasahiro Yamada default y 5078779657dSKees Cook help 5088779657dSKees Cook Functions will have the stack-protector canary logic added in any 5098779657dSKees Cook of the following conditions: 5108779657dSKees Cook 5118779657dSKees Cook - local variable's address used as part of the right hand side of an 5128779657dSKees Cook assignment or function argument 5138779657dSKees Cook - local variable is an array (or union containing an array), 5148779657dSKees Cook regardless of array type or length 5158779657dSKees Cook - uses register local variables 5168779657dSKees Cook 5178779657dSKees Cook This feature requires gcc version 4.9 or above, or a distribution 5188779657dSKees Cook gcc with the feature backported ("-fstack-protector-strong"). 5198779657dSKees Cook 5208779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 5218779657dSKees Cook about 20% of all kernel functions, which increases the kernel code 5228779657dSKees Cook size by about 2%. 5238779657dSKees Cook 5240f60a8efSKees Cookconfig HAVE_ARCH_WITHIN_STACK_FRAMES 5250f60a8efSKees Cook bool 5260f60a8efSKees Cook help 5270f60a8efSKees Cook An architecture should select this if it can walk the kernel stack 5280f60a8efSKees Cook frames to determine if an object is part of either the arguments 5290f60a8efSKees Cook or local variables (i.e. that it excludes saved return addresses, 5300f60a8efSKees Cook and similar) by implementing an inline arch_within_stack_frames(), 5310f60a8efSKees Cook which is used by CONFIG_HARDENED_USERCOPY. 5320f60a8efSKees Cook 53391d1aa43SFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING 5342b1d5024SFrederic Weisbecker bool 5352b1d5024SFrederic Weisbecker help 53691d1aa43SFrederic Weisbecker Provide kernel/user boundaries probes necessary for subsystems 53791d1aa43SFrederic Weisbecker that need it, such as userspace RCU extended quiescent state. 53891d1aa43SFrederic Weisbecker Syscalls need to be wrapped inside user_exit()-user_enter() through 53991d1aa43SFrederic Weisbecker the slow path using TIF_NOHZ flag. Exceptions handlers must be 54091d1aa43SFrederic Weisbecker wrapped as well. Irqs are already protected inside 54191d1aa43SFrederic Weisbecker rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on 54291d1aa43SFrederic Weisbecker irq exit still need to be protected. 5432b1d5024SFrederic Weisbecker 544b952741cSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING 545b952741cSFrederic Weisbecker bool 546b952741cSFrederic Weisbecker 54740565b5aSStanislaw Gruszkaconfig ARCH_HAS_SCALED_CPUTIME 54840565b5aSStanislaw Gruszka bool 54940565b5aSStanislaw Gruszka 550554b0004SKevin Hilmanconfig HAVE_VIRT_CPU_ACCOUNTING_GEN 551554b0004SKevin Hilman bool 552554b0004SKevin Hilman default y if 64BIT 553554b0004SKevin Hilman help 554554b0004SKevin Hilman With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. 555554b0004SKevin Hilman Before enabling this option, arch code must be audited 556554b0004SKevin Hilman to ensure there are no races in concurrent read/write of 557554b0004SKevin Hilman cputime_t. For example, reading/writing 64-bit cputime_t on 558554b0004SKevin Hilman some 32-bit arches may require multiple accesses, so proper 559554b0004SKevin Hilman locking is needed to protect against concurrent accesses. 560554b0004SKevin Hilman 561554b0004SKevin Hilman 562fdf9c356SFrederic Weisbeckerconfig HAVE_IRQ_TIME_ACCOUNTING 563fdf9c356SFrederic Weisbecker bool 564fdf9c356SFrederic Weisbecker help 565fdf9c356SFrederic Weisbecker Archs need to ensure they use a high enough resolution clock to 566fdf9c356SFrederic Weisbecker support irq time accounting and then call enable_sched_clock_irqtime(). 567fdf9c356SFrederic Weisbecker 5682c91bd4aSJoel Fernandes (Google)config HAVE_MOVE_PMD 5692c91bd4aSJoel Fernandes (Google) bool 5702c91bd4aSJoel Fernandes (Google) help 5712c91bd4aSJoel Fernandes (Google) Archs that select this are able to move page tables at the PMD level. 5722c91bd4aSJoel Fernandes (Google) 57315626062SGerald Schaeferconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE 57415626062SGerald Schaefer bool 57515626062SGerald Schaefer 576a00cc7d9SMatthew Wilcoxconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 577a00cc7d9SMatthew Wilcox bool 578a00cc7d9SMatthew Wilcox 5790ddab1d2SToshi Kaniconfig HAVE_ARCH_HUGE_VMAP 5800ddab1d2SToshi Kani bool 5810ddab1d2SToshi Kani 5823876d4a3SAlexandre Ghiticonfig ARCH_WANT_HUGE_PMD_SHARE 5833876d4a3SAlexandre Ghiti bool 5843876d4a3SAlexandre Ghiti 5850f8975ecSPavel Emelyanovconfig HAVE_ARCH_SOFT_DIRTY 5860f8975ecSPavel Emelyanov bool 5870f8975ecSPavel Emelyanov 588786d35d4SDavid Howellsconfig HAVE_MOD_ARCH_SPECIFIC 589786d35d4SDavid Howells bool 590786d35d4SDavid Howells help 591786d35d4SDavid Howells The arch uses struct mod_arch_specific to store data. Many arches 592786d35d4SDavid Howells just need a simple module loader without arch specific data - those 593786d35d4SDavid Howells should not enable this. 594786d35d4SDavid Howells 595786d35d4SDavid Howellsconfig MODULES_USE_ELF_RELA 596786d35d4SDavid Howells bool 597786d35d4SDavid Howells help 598786d35d4SDavid Howells Modules only use ELF RELA relocations. Modules with ELF REL 599786d35d4SDavid Howells relocations will give an error. 600786d35d4SDavid Howells 601786d35d4SDavid Howellsconfig MODULES_USE_ELF_REL 602786d35d4SDavid Howells bool 603786d35d4SDavid Howells help 604786d35d4SDavid Howells Modules only use ELF REL relocations. Modules with ELF RELA 605786d35d4SDavid Howells relocations will give an error. 606786d35d4SDavid Howells 607cc1f0274SFrederic Weisbeckerconfig HAVE_IRQ_EXIT_ON_IRQ_STACK 608cc1f0274SFrederic Weisbecker bool 609cc1f0274SFrederic Weisbecker help 610cc1f0274SFrederic Weisbecker Architecture doesn't only execute the irq handler on the irq stack 611cc1f0274SFrederic Weisbecker but also irq_exit(). This way we can process softirqs on this irq 612cc1f0274SFrederic Weisbecker stack instead of switching to a new one when we call __do_softirq() 613cc1f0274SFrederic Weisbecker in the end of an hardirq. 614cc1f0274SFrederic Weisbecker This spares a stack switch and improves cache usage on softirq 615cc1f0274SFrederic Weisbecker processing. 616cc1f0274SFrederic Weisbecker 617235a8f02SKirill A. Shutemovconfig PGTABLE_LEVELS 618235a8f02SKirill A. Shutemov int 619235a8f02SKirill A. Shutemov default 2 620235a8f02SKirill A. Shutemov 6212b68f6caSKees Cookconfig ARCH_HAS_ELF_RANDOMIZE 6222b68f6caSKees Cook bool 6232b68f6caSKees Cook help 6242b68f6caSKees Cook An architecture supports choosing randomized locations for 6252b68f6caSKees Cook stack, mmap, brk, and ET_DYN. Defined functions: 6262b68f6caSKees Cook - arch_mmap_rnd() 627204db6edSKees Cook - arch_randomize_brk() 6282b68f6caSKees Cook 629d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_BITS 630d07e2259SDaniel Cashman bool 631d07e2259SDaniel Cashman help 632d07e2259SDaniel Cashman An arch should select this symbol if it supports setting a variable 633d07e2259SDaniel Cashman number of bits for use in establishing the base address for mmap 634d07e2259SDaniel Cashman allocations, has MMU enabled and provides values for both: 635d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MIN 636d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MAX 637d07e2259SDaniel Cashman 6385f56a5dfSJiri Slabyconfig HAVE_EXIT_THREAD 6395f56a5dfSJiri Slaby bool 6405f56a5dfSJiri Slaby help 6415f56a5dfSJiri Slaby An architecture implements exit_thread. 6425f56a5dfSJiri Slaby 643d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MIN 644d07e2259SDaniel Cashman int 645d07e2259SDaniel Cashman 646d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MAX 647d07e2259SDaniel Cashman int 648d07e2259SDaniel Cashman 649d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_DEFAULT 650d07e2259SDaniel Cashman int 651d07e2259SDaniel Cashman 652d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS 653d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address" if EXPERT 654d07e2259SDaniel Cashman range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX 655d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT 656d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_MIN 657d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_BITS 658d07e2259SDaniel Cashman help 659d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 660d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 661d07e2259SDaniel Cashman resulting from mmap allocations. This value will be bounded 662d07e2259SDaniel Cashman by the architecture's minimum and maximum supported values. 663d07e2259SDaniel Cashman 664d07e2259SDaniel Cashman This value can be changed after boot using the 665d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_bits tunable 666d07e2259SDaniel Cashman 667d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_COMPAT_BITS 668d07e2259SDaniel Cashman bool 669d07e2259SDaniel Cashman help 670d07e2259SDaniel Cashman An arch should select this symbol if it supports running applications 671d07e2259SDaniel Cashman in compatibility mode, supports setting a variable number of bits for 672d07e2259SDaniel Cashman use in establishing the base address for mmap allocations, has MMU 673d07e2259SDaniel Cashman enabled and provides values for both: 674d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MIN 675d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MAX 676d07e2259SDaniel Cashman 677d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MIN 678d07e2259SDaniel Cashman int 679d07e2259SDaniel Cashman 680d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MAX 681d07e2259SDaniel Cashman int 682d07e2259SDaniel Cashman 683d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 684d07e2259SDaniel Cashman int 685d07e2259SDaniel Cashman 686d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS 687d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT 688d07e2259SDaniel Cashman range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX 689d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 690d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_MIN 691d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS 692d07e2259SDaniel Cashman help 693d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 694d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 695d07e2259SDaniel Cashman resulting from mmap allocations for compatible applications This 696d07e2259SDaniel Cashman value will be bounded by the architecture's minimum and maximum 697d07e2259SDaniel Cashman supported values. 698d07e2259SDaniel Cashman 699d07e2259SDaniel Cashman This value can be changed after boot using the 700d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_compat_bits tunable 701d07e2259SDaniel Cashman 7021b028f78SDmitry Safonovconfig HAVE_ARCH_COMPAT_MMAP_BASES 7031b028f78SDmitry Safonov bool 7041b028f78SDmitry Safonov help 7051b028f78SDmitry Safonov This allows 64bit applications to invoke 32-bit mmap() syscall 7061b028f78SDmitry Safonov and vice-versa 32-bit applications to call 64-bit mmap(). 7071b028f78SDmitry Safonov Required for applications doing different bitness syscalls. 7081b028f78SDmitry Safonov 70967f3977fSAlexandre Ghiti# This allows to use a set of generic functions to determine mmap base 71067f3977fSAlexandre Ghiti# address by giving priority to top-down scheme only if the process 71167f3977fSAlexandre Ghiti# is not in legacy mode (compat task, unlimited stack size or 71267f3977fSAlexandre Ghiti# sysctl_legacy_va_layout). 71367f3977fSAlexandre Ghiti# Architecture that selects this option can provide its own version of: 71467f3977fSAlexandre Ghiti# - STACK_RND_MASK 71567f3977fSAlexandre Ghiticonfig ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 71667f3977fSAlexandre Ghiti bool 71767f3977fSAlexandre Ghiti depends on MMU 718e7142bf5SAlexandre Ghiti select ARCH_HAS_ELF_RANDOMIZE 71967f3977fSAlexandre Ghiti 7203033f14aSJosh Triplettconfig HAVE_COPY_THREAD_TLS 7213033f14aSJosh Triplett bool 7223033f14aSJosh Triplett help 7233033f14aSJosh Triplett Architecture provides copy_thread_tls to accept tls argument via 7243033f14aSJosh Triplett normal C parameter passing, rather than extracting the syscall 7253033f14aSJosh Triplett argument from pt_regs. 7263033f14aSJosh Triplett 727b9ab5ebbSJosh Poimboeufconfig HAVE_STACK_VALIDATION 728b9ab5ebbSJosh Poimboeuf bool 729b9ab5ebbSJosh Poimboeuf help 730b9ab5ebbSJosh Poimboeuf Architecture supports the 'objtool check' host tool command, which 731b9ab5ebbSJosh Poimboeuf performs compile-time stack metadata validation. 732b9ab5ebbSJosh Poimboeuf 733af085d90SJosh Poimboeufconfig HAVE_RELIABLE_STACKTRACE 734af085d90SJosh Poimboeuf bool 735af085d90SJosh Poimboeuf help 736af085d90SJosh Poimboeuf Architecture has a save_stack_trace_tsk_reliable() function which 737af085d90SJosh Poimboeuf only returns a stack trace if it can guarantee the trace is reliable. 738af085d90SJosh Poimboeuf 739468a9428SGeorge Spelvinconfig HAVE_ARCH_HASH 740468a9428SGeorge Spelvin bool 741468a9428SGeorge Spelvin default n 742468a9428SGeorge Spelvin help 743468a9428SGeorge Spelvin If this is set, the architecture provides an <asm/hash.h> 744468a9428SGeorge Spelvin file which provides platform-specific implementations of some 745468a9428SGeorge Spelvin functions in <linux/hash.h> or fs/namei.c. 746468a9428SGeorge Spelvin 747666047feSFinn Thainconfig HAVE_ARCH_NVRAM_OPS 748666047feSFinn Thain bool 749666047feSFinn Thain 7503a495511SWilliam Breathitt Grayconfig ISA_BUS_API 7513a495511SWilliam Breathitt Gray def_bool ISA 7523a495511SWilliam Breathitt Gray 753d2125043SAl Viro# 754d2125043SAl Viro# ABI hall of shame 755d2125043SAl Viro# 756d2125043SAl Viroconfig CLONE_BACKWARDS 757d2125043SAl Viro bool 758d2125043SAl Viro help 759d2125043SAl Viro Architecture has tls passed as the 4th argument of clone(2), 760d2125043SAl Viro not the 5th one. 761d2125043SAl Viro 762d2125043SAl Viroconfig CLONE_BACKWARDS2 763d2125043SAl Viro bool 764d2125043SAl Viro help 765d2125043SAl Viro Architecture has the first two arguments of clone(2) swapped. 766d2125043SAl Viro 767dfa9771aSMichal Simekconfig CLONE_BACKWARDS3 768dfa9771aSMichal Simek bool 769dfa9771aSMichal Simek help 770dfa9771aSMichal Simek Architecture has tls passed as the 3rd argument of clone(2), 771dfa9771aSMichal Simek not the 5th one. 772dfa9771aSMichal Simek 773eaca6eaeSAl Viroconfig ODD_RT_SIGACTION 774eaca6eaeSAl Viro bool 775eaca6eaeSAl Viro help 776eaca6eaeSAl Viro Architecture has unusual rt_sigaction(2) arguments 777eaca6eaeSAl Viro 7780a0e8cdfSAl Viroconfig OLD_SIGSUSPEND 7790a0e8cdfSAl Viro bool 7800a0e8cdfSAl Viro help 7810a0e8cdfSAl Viro Architecture has old sigsuspend(2) syscall, of one-argument variety 7820a0e8cdfSAl Viro 7830a0e8cdfSAl Viroconfig OLD_SIGSUSPEND3 7840a0e8cdfSAl Viro bool 7850a0e8cdfSAl Viro help 7860a0e8cdfSAl Viro Even weirder antique ABI - three-argument sigsuspend(2) 7870a0e8cdfSAl Viro 788495dfbf7SAl Viroconfig OLD_SIGACTION 789495dfbf7SAl Viro bool 790495dfbf7SAl Viro help 791495dfbf7SAl Viro Architecture has old sigaction(2) syscall. Nope, not the same 792495dfbf7SAl Viro as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2), 793495dfbf7SAl Viro but fairly different variant of sigaction(2), thanks to OSF/1 794495dfbf7SAl Viro compatibility... 795495dfbf7SAl Viro 796495dfbf7SAl Viroconfig COMPAT_OLD_SIGACTION 797495dfbf7SAl Viro bool 798495dfbf7SAl Viro 79917435e5fSDeepa Dinamaniconfig COMPAT_32BIT_TIME 800942437c9SArnd Bergmann bool "Provide system calls for 32-bit time_t" 801942437c9SArnd Bergmann default !64BIT || COMPAT 80217435e5fSDeepa Dinamani help 80317435e5fSDeepa Dinamani This enables 32 bit time_t support in addition to 64 bit time_t support. 80417435e5fSDeepa Dinamani This is relevant on all 32-bit architectures, and 64-bit architectures 80517435e5fSDeepa Dinamani as part of compat syscall handling. 80617435e5fSDeepa Dinamani 80787a4c375SChristoph Hellwigconfig ARCH_NO_PREEMPT 80887a4c375SChristoph Hellwig bool 80987a4c375SChristoph Hellwig 810a50a3f4bSThomas Gleixnerconfig ARCH_SUPPORTS_RT 811a50a3f4bSThomas Gleixner bool 812a50a3f4bSThomas Gleixner 813fff7fb0bSZhaoxiu Zengconfig CPU_NO_EFFICIENT_FFS 814fff7fb0bSZhaoxiu Zeng def_bool n 815fff7fb0bSZhaoxiu Zeng 816ba14a194SAndy Lutomirskiconfig HAVE_ARCH_VMAP_STACK 817ba14a194SAndy Lutomirski def_bool n 818ba14a194SAndy Lutomirski help 819ba14a194SAndy Lutomirski An arch should select this symbol if it can support kernel stacks 820ba14a194SAndy Lutomirski in vmalloc space. This means: 821ba14a194SAndy Lutomirski 822ba14a194SAndy Lutomirski - vmalloc space must be large enough to hold many kernel stacks. 823ba14a194SAndy Lutomirski This may rule out many 32-bit architectures. 824ba14a194SAndy Lutomirski 825ba14a194SAndy Lutomirski - Stacks in vmalloc space need to work reliably. For example, if 826ba14a194SAndy Lutomirski vmap page tables are created on demand, either this mechanism 827ba14a194SAndy Lutomirski needs to work while the stack points to a virtual address with 828ba14a194SAndy Lutomirski unpopulated page tables or arch code (switch_to() and switch_mm(), 829ba14a194SAndy Lutomirski most likely) needs to ensure that the stack's page table entries 830ba14a194SAndy Lutomirski are populated before running on a possibly unpopulated stack. 831ba14a194SAndy Lutomirski 832ba14a194SAndy Lutomirski - If the stack overflows into a guard page, something reasonable 833ba14a194SAndy Lutomirski should happen. The definition of "reasonable" is flexible, but 834ba14a194SAndy Lutomirski instantly rebooting without logging anything would be unfriendly. 835ba14a194SAndy Lutomirski 836ba14a194SAndy Lutomirskiconfig VMAP_STACK 837ba14a194SAndy Lutomirski default y 838ba14a194SAndy Lutomirski bool "Use a virtually-mapped stack" 839eafb149eSDaniel Axtens depends on HAVE_ARCH_VMAP_STACK 840eafb149eSDaniel Axtens depends on !KASAN || KASAN_VMALLOC 841ba14a194SAndy Lutomirski ---help--- 842ba14a194SAndy Lutomirski Enable this if you want the use virtually-mapped kernel stacks 843ba14a194SAndy Lutomirski with guard pages. This causes kernel stack overflows to be 844ba14a194SAndy Lutomirski caught immediately rather than causing difficult-to-diagnose 845ba14a194SAndy Lutomirski corruption. 846ba14a194SAndy Lutomirski 847eafb149eSDaniel Axtens To use this with KASAN, the architecture must support backing 848eafb149eSDaniel Axtens virtual mappings with real shadow memory, and KASAN_VMALLOC must 849eafb149eSDaniel Axtens be enabled. 850ba14a194SAndy Lutomirski 851ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX 852ad21fc4fSLaura Abbott def_bool n 853ad21fc4fSLaura Abbott 854ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 855ad21fc4fSLaura Abbott def_bool n 856ad21fc4fSLaura Abbott 857ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_KERNEL_RWX 858ad21fc4fSLaura Abbott def_bool n 859ad21fc4fSLaura Abbott 8600f5bf6d0SLaura Abbottconfig STRICT_KERNEL_RWX 861ad21fc4fSLaura Abbott bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX 862ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_KERNEL_RWX 863ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 864ad21fc4fSLaura Abbott help 865ad21fc4fSLaura Abbott If this is set, kernel text and rodata memory will be made read-only, 866ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 867ad21fc4fSLaura Abbott protection against certain security exploits (e.g. executing the heap 868ad21fc4fSLaura Abbott or modifying text) 869ad21fc4fSLaura Abbott 870ad21fc4fSLaura Abbott These features are considered standard security practice these days. 871ad21fc4fSLaura Abbott You should say Y here in almost all cases. 872ad21fc4fSLaura Abbott 873ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_MODULE_RWX 874ad21fc4fSLaura Abbott def_bool n 875ad21fc4fSLaura Abbott 8760f5bf6d0SLaura Abbottconfig STRICT_MODULE_RWX 877ad21fc4fSLaura Abbott bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX 878ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES 879ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 880ad21fc4fSLaura Abbott help 881ad21fc4fSLaura Abbott If this is set, module text and rodata memory will be made read-only, 882ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 883ad21fc4fSLaura Abbott protection against certain security exploits (e.g. writing to text) 884ad21fc4fSLaura Abbott 885ea8c64acSChristoph Hellwig# select if the architecture provides an asm/dma-direct.h header 886ea8c64acSChristoph Hellwigconfig ARCH_HAS_PHYS_TO_DMA 887ea8c64acSChristoph Hellwig bool 888ea8c64acSChristoph Hellwig 88904f264d3SPaul Burtonconfig HAVE_ARCH_COMPILER_H 89004f264d3SPaul Burton bool 89104f264d3SPaul Burton help 89204f264d3SPaul Burton An architecture can select this if it provides an 89304f264d3SPaul Burton asm/compiler.h header that should be included after 89404f264d3SPaul Burton linux/compiler-*.h in order to override macro definitions that those 89504f264d3SPaul Burton headers generally provide. 89604f264d3SPaul Burton 897271ca788SArd Biesheuvelconfig HAVE_ARCH_PREL32_RELOCATIONS 898271ca788SArd Biesheuvel bool 899271ca788SArd Biesheuvel help 900271ca788SArd Biesheuvel May be selected by an architecture if it supports place-relative 901271ca788SArd Biesheuvel 32-bit relocations, both in the toolchain and in the module loader, 902271ca788SArd Biesheuvel in which case relative references can be used in special sections 903271ca788SArd Biesheuvel for PCI fixup, initcalls etc which are only half the size on 64 bit 904271ca788SArd Biesheuvel architectures, and don't require runtime relocation on relocatable 905271ca788SArd Biesheuvel kernels. 906271ca788SArd Biesheuvel 907ce9084baSArd Biesheuvelconfig ARCH_USE_MEMREMAP_PROT 908ce9084baSArd Biesheuvel bool 909ce9084baSArd Biesheuvel 910fb346fd9SWaiman Longconfig LOCK_EVENT_COUNTS 911fb346fd9SWaiman Long bool "Locking event counts collection" 912fb346fd9SWaiman Long depends on DEBUG_FS 913fb346fd9SWaiman Long ---help--- 914fb346fd9SWaiman Long Enable light-weight counting of various locking related events 915fb346fd9SWaiman Long in the system with minimal performance impact. This reduces 916fb346fd9SWaiman Long the chance of application behavior change because of timing 917fb346fd9SWaiman Long differences. The counts are reported via debugfs. 918fb346fd9SWaiman Long 9195cf896fbSPeter Collingbourne# Select if the architecture has support for applying RELR relocations. 9205cf896fbSPeter Collingbourneconfig ARCH_HAS_RELR 9215cf896fbSPeter Collingbourne bool 9225cf896fbSPeter Collingbourne 9235cf896fbSPeter Collingbourneconfig RELR 9245cf896fbSPeter Collingbourne bool "Use RELR relocation packing" 9255cf896fbSPeter Collingbourne depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR 9265cf896fbSPeter Collingbourne default y 9275cf896fbSPeter Collingbourne help 9285cf896fbSPeter Collingbourne Store the kernel's dynamic relocations in the RELR relocation packing 9295cf896fbSPeter Collingbourne format. Requires a compatible linker (LLD supports this feature), as 9305cf896fbSPeter Collingbourne well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy 9315cf896fbSPeter Collingbourne are compatible). 9325cf896fbSPeter Collingbourne 9330c9c1d56SThiago Jung Bauermannconfig ARCH_HAS_MEM_ENCRYPT 9340c9c1d56SThiago Jung Bauermann bool 9350c9c1d56SThiago Jung Bauermann 9360e242208SHassan Naveedconfig HAVE_SPARSE_SYSCALL_NR 9370e242208SHassan Naveed bool 9380e242208SHassan Naveed help 9390e242208SHassan Naveed An architecture should select this if its syscall numbering is sparse 9400e242208SHassan Naveed to save space. For example, MIPS architecture has a syscall array with 9410e242208SHassan Naveed entries at 4000, 5000 and 6000 locations. This option turns on syscall 9420e242208SHassan Naveed related optimizations for a given architecture. 9430e242208SHassan Naveed 9442521f2c2SPeter Oberparleitersource "kernel/gcov/Kconfig" 94545332b1bSMasahiro Yamada 94645332b1bSMasahiro Yamadasource "scripts/gcc-plugins/Kconfig" 947fa1b5d09SLinus Torvalds 94822471e13SRandy Dunlapendmenu 949