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 27da32b581SCatalin Marinasconfig ARCH_HAS_SUBPAGE_FAULTS 28da32b581SCatalin Marinas bool 29da32b581SCatalin Marinas help 30da32b581SCatalin Marinas Select if the architecture can check permissions at sub-page 31da32b581SCatalin Marinas granularity (e.g. arm64 MTE). The probe_user_*() functions 32da32b581SCatalin Marinas must be implemented. 33da32b581SCatalin Marinas 3405736e4aSThomas Gleixnerconfig HOTPLUG_SMT 3505736e4aSThomas Gleixner bool 3605736e4aSThomas Gleixner 376f062123SThomas Gleixner# Selected by HOTPLUG_CORE_SYNC_DEAD or HOTPLUG_CORE_SYNC_FULL 386f062123SThomas Gleixnerconfig HOTPLUG_CORE_SYNC 396f062123SThomas Gleixner bool 406f062123SThomas Gleixner 416f062123SThomas Gleixner# Basic CPU dead synchronization selected by architecture 426f062123SThomas Gleixnerconfig HOTPLUG_CORE_SYNC_DEAD 436f062123SThomas Gleixner bool 446f062123SThomas Gleixner select HOTPLUG_CORE_SYNC 456f062123SThomas Gleixner 466f062123SThomas Gleixner# Full CPU synchronization with alive state selected by architecture 476f062123SThomas Gleixnerconfig HOTPLUG_CORE_SYNC_FULL 486f062123SThomas Gleixner bool 496f062123SThomas Gleixner select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU 506f062123SThomas Gleixner select HOTPLUG_CORE_SYNC 516f062123SThomas Gleixner 52a631be92SThomas Gleixnerconfig HOTPLUG_SPLIT_STARTUP 53a631be92SThomas Gleixner bool 54a631be92SThomas Gleixner select HOTPLUG_CORE_SYNC_FULL 55a631be92SThomas Gleixner 56*18415f33SThomas Gleixnerconfig HOTPLUG_PARALLEL 57*18415f33SThomas Gleixner bool 58*18415f33SThomas Gleixner select HOTPLUG_SPLIT_STARTUP 59*18415f33SThomas Gleixner 60142781e1SThomas Gleixnerconfig GENERIC_ENTRY 61142781e1SThomas Gleixner bool 62142781e1SThomas Gleixner 63125e5645SMathieu Desnoyersconfig KPROBES 64125e5645SMathieu Desnoyers bool "Kprobes" 6505ed160eSMasami Hiramatsu depends on MODULES 66125e5645SMathieu Desnoyers depends on HAVE_KPROBES 6705ed160eSMasami Hiramatsu select KALLSYMS 68835f14edSPaul E. McKenney select TASKS_RCU if PREEMPTION 69125e5645SMathieu Desnoyers help 70125e5645SMathieu Desnoyers Kprobes allows you to trap at almost any kernel address and 71125e5645SMathieu Desnoyers execute a callback function. register_kprobe() establishes 72125e5645SMathieu Desnoyers a probepoint and specifies the callback. Kprobes is useful 73125e5645SMathieu Desnoyers for kernel debugging, non-intrusive instrumentation and testing. 74125e5645SMathieu Desnoyers If in doubt, say "N". 75125e5645SMathieu Desnoyers 7645f81b1cSSteven Rostedtconfig JUMP_LABEL 77c5905afbSIngo Molnar bool "Optimize very unlikely/likely branches" 7845f81b1cSSteven Rostedt depends on HAVE_ARCH_JUMP_LABEL 794ab7674fSJosh Poimboeuf select OBJTOOL if HAVE_JUMP_LABEL_HACK 8045f81b1cSSteven Rostedt help 81c5905afbSIngo Molnar This option enables a transparent branch optimization that 82c5905afbSIngo Molnar makes certain almost-always-true or almost-always-false branch 83c5905afbSIngo Molnar conditions even cheaper to execute within the kernel. 8445f81b1cSSteven Rostedt 85c5905afbSIngo Molnar Certain performance-sensitive kernel code, such as trace points, 86c5905afbSIngo Molnar scheduler functionality, networking code and KVM have such 87c5905afbSIngo Molnar branches and include support for this optimization technique. 88c5905afbSIngo Molnar 89c5905afbSIngo Molnar If it is detected that the compiler has support for "asm goto", 90c5905afbSIngo Molnar the kernel will compile such branches with just a nop 91c5905afbSIngo Molnar instruction. When the condition flag is toggled to true, the 92c5905afbSIngo Molnar nop will be converted to a jump instruction to execute the 93c5905afbSIngo Molnar conditional block of instructions. 94c5905afbSIngo Molnar 95c5905afbSIngo Molnar This technique lowers overhead and stress on the branch prediction 96c5905afbSIngo Molnar of the processor and generally makes the kernel faster. The update 97c5905afbSIngo Molnar of the condition is slower, but those are always very rare. 98c5905afbSIngo Molnar 99c5905afbSIngo Molnar ( On 32-bit x86, the necessary options added to the compiler 100c5905afbSIngo Molnar flags may increase the size of the kernel slightly. ) 10145f81b1cSSteven Rostedt 1021987c947SPeter Zijlstraconfig STATIC_KEYS_SELFTEST 1031987c947SPeter Zijlstra bool "Static key selftest" 1041987c947SPeter Zijlstra depends on JUMP_LABEL 1051987c947SPeter Zijlstra help 1061987c947SPeter Zijlstra Boot time self-test of the branch patching code. 1071987c947SPeter Zijlstra 108f03c4129SPeter Zijlstraconfig STATIC_CALL_SELFTEST 109f03c4129SPeter Zijlstra bool "Static call selftest" 110f03c4129SPeter Zijlstra depends on HAVE_STATIC_CALL 111f03c4129SPeter Zijlstra help 112f03c4129SPeter Zijlstra Boot time self-test of the call patching code. 113f03c4129SPeter Zijlstra 114afd66255SMasami Hiramatsuconfig OPTPROBES 1155cc718b9SMasami Hiramatsu def_bool y 1165cc718b9SMasami Hiramatsu depends on KPROBES && HAVE_OPTPROBES 11701b1d88bSThomas Gleixner select TASKS_RCU if PREEMPTION 118afd66255SMasami Hiramatsu 119e7dbfe34SMasami Hiramatsuconfig KPROBES_ON_FTRACE 120e7dbfe34SMasami Hiramatsu def_bool y 121e7dbfe34SMasami Hiramatsu depends on KPROBES && HAVE_KPROBES_ON_FTRACE 122e7dbfe34SMasami Hiramatsu depends on DYNAMIC_FTRACE_WITH_REGS 123e7dbfe34SMasami Hiramatsu help 124e7dbfe34SMasami Hiramatsu If function tracer is enabled and the arch supports full 125e7dbfe34SMasami Hiramatsu passing of pt_regs to function tracing, then kprobes can 126e7dbfe34SMasami Hiramatsu optimize on top of function tracing. 127e7dbfe34SMasami Hiramatsu 1282b144498SSrikar Dronamrajuconfig UPROBES 12909294e31SDavid A. Long def_bool n 130e8f4aa60SAllen Pais depends on ARCH_SUPPORTS_UPROBES 1312b144498SSrikar Dronamraju help 1327b2d81d4SIngo Molnar Uprobes is the user-space counterpart to kprobes: they 1337b2d81d4SIngo Molnar enable instrumentation applications (such as 'perf probe') 1347b2d81d4SIngo Molnar to establish unintrusive probes in user-space binaries and 1357b2d81d4SIngo Molnar libraries, by executing handler functions when the probes 1367b2d81d4SIngo Molnar are hit by user-space applications. 1377b2d81d4SIngo Molnar 1387b2d81d4SIngo Molnar ( These probes come in the form of single-byte breakpoints, 1397b2d81d4SIngo Molnar managed by the kernel and kept transparent to the probed 1407b2d81d4SIngo Molnar application. ) 1412b144498SSrikar Dronamraju 142adab66b7SSteven Rostedt (VMware)config HAVE_64BIT_ALIGNED_ACCESS 143adab66b7SSteven Rostedt (VMware) def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS 144adab66b7SSteven Rostedt (VMware) help 145adab66b7SSteven Rostedt (VMware) Some architectures require 64 bit accesses to be 64 bit 146adab66b7SSteven Rostedt (VMware) aligned, which also requires structs containing 64 bit values 147adab66b7SSteven Rostedt (VMware) to be 64 bit aligned too. This includes some 32 bit 148adab66b7SSteven Rostedt (VMware) architectures which can do 64 bit accesses, as well as 64 bit 149adab66b7SSteven Rostedt (VMware) architectures without unaligned access. 150adab66b7SSteven Rostedt (VMware) 151adab66b7SSteven Rostedt (VMware) This symbol should be selected by an architecture if 64 bit 152adab66b7SSteven Rostedt (VMware) accesses are required to be 64 bit aligned in this way even 153adab66b7SSteven Rostedt (VMware) though it is not a 64 bit architecture. 154adab66b7SSteven Rostedt (VMware) 155ba1a297dSLukas Bulwahn See Documentation/core-api/unaligned-memory-access.rst for 156ba1a297dSLukas Bulwahn more information on the topic of unaligned memory accesses. 157adab66b7SSteven Rostedt (VMware) 15858340a07SJohannes Bergconfig HAVE_EFFICIENT_UNALIGNED_ACCESS 1599ba16087SJan Beulich bool 16058340a07SJohannes Berg help 16158340a07SJohannes Berg Some architectures are unable to perform unaligned accesses 16258340a07SJohannes Berg without the use of get_unaligned/put_unaligned. Others are 16358340a07SJohannes Berg unable to perform such accesses efficiently (e.g. trap on 16458340a07SJohannes Berg unaligned access and require fixing it up in the exception 16558340a07SJohannes Berg handler.) 16658340a07SJohannes Berg 16758340a07SJohannes Berg This symbol should be selected by an architecture if it can 16858340a07SJohannes Berg perform unaligned accesses efficiently to allow different 16958340a07SJohannes Berg code paths to be selected for these cases. Some network 17058340a07SJohannes Berg drivers, for example, could opt to not fix up alignment 17158340a07SJohannes Berg problems with received packets if doing so would not help 17258340a07SJohannes Berg much. 17358340a07SJohannes Berg 174c9b54d6fSMauro Carvalho Chehab See Documentation/core-api/unaligned-memory-access.rst for more 17558340a07SJohannes Berg information on the topic of unaligned memory accesses. 17658340a07SJohannes Berg 177cf66bb93SDavid Woodhouseconfig ARCH_USE_BUILTIN_BSWAP 178cf66bb93SDavid Woodhouse bool 179cf66bb93SDavid Woodhouse help 180cf66bb93SDavid Woodhouse Modern versions of GCC (since 4.4) have builtin functions 181cf66bb93SDavid Woodhouse for handling byte-swapping. Using these, instead of the old 182cf66bb93SDavid Woodhouse inline assembler that the architecture code provides in the 183cf66bb93SDavid Woodhouse __arch_bswapXX() macros, allows the compiler to see what's 184cf66bb93SDavid Woodhouse happening and offers more opportunity for optimisation. In 185cf66bb93SDavid Woodhouse particular, the compiler will be able to combine the byteswap 186cf66bb93SDavid Woodhouse with a nearby load or store and use load-and-swap or 187cf66bb93SDavid Woodhouse store-and-swap instructions if the architecture has them. It 188cf66bb93SDavid Woodhouse should almost *never* result in code which is worse than the 189cf66bb93SDavid Woodhouse hand-coded assembler in <asm/swab.h>. But just in case it 190cf66bb93SDavid Woodhouse does, the use of the builtins is optional. 191cf66bb93SDavid Woodhouse 192cf66bb93SDavid Woodhouse Any architecture with load-and-swap or store-and-swap 193cf66bb93SDavid Woodhouse instructions should set this. And it shouldn't hurt to set it 194cf66bb93SDavid Woodhouse on architectures that don't have such instructions. 195cf66bb93SDavid Woodhouse 1969edddaa2SAnanth N Mavinakayanahalliconfig KRETPROBES 1979edddaa2SAnanth N Mavinakayanahalli def_bool y 19873f9b911SMasami Hiramatsu depends on KPROBES && (HAVE_KRETPROBES || HAVE_RETHOOK) 19973f9b911SMasami Hiramatsu 20073f9b911SMasami Hiramatsuconfig KRETPROBE_ON_RETHOOK 20173f9b911SMasami Hiramatsu def_bool y 20273f9b911SMasami Hiramatsu depends on HAVE_RETHOOK 20373f9b911SMasami Hiramatsu depends on KRETPROBES 20473f9b911SMasami Hiramatsu select RETHOOK 2059edddaa2SAnanth N Mavinakayanahalli 2067c68af6eSAvi Kivityconfig USER_RETURN_NOTIFIER 2077c68af6eSAvi Kivity bool 2087c68af6eSAvi Kivity depends on HAVE_USER_RETURN_NOTIFIER 2097c68af6eSAvi Kivity help 2107c68af6eSAvi Kivity Provide a kernel-internal notification when a cpu is about to 2117c68af6eSAvi Kivity switch to user mode. 2127c68af6eSAvi Kivity 21328b2ee20SRik van Rielconfig HAVE_IOREMAP_PROT 2149ba16087SJan Beulich bool 21528b2ee20SRik van Riel 216125e5645SMathieu Desnoyersconfig HAVE_KPROBES 2179ba16087SJan Beulich bool 2189edddaa2SAnanth N Mavinakayanahalli 2199edddaa2SAnanth N Mavinakayanahalliconfig HAVE_KRETPROBES 2209ba16087SJan Beulich bool 22174bc7ceeSArthur Kepner 222afd66255SMasami Hiramatsuconfig HAVE_OPTPROBES 223afd66255SMasami Hiramatsu bool 224d314d74cSCong Wang 225e7dbfe34SMasami Hiramatsuconfig HAVE_KPROBES_ON_FTRACE 226e7dbfe34SMasami Hiramatsu bool 227e7dbfe34SMasami Hiramatsu 2281f6d3a8fSMasami Hiramatsuconfig ARCH_CORRECT_STACKTRACE_ON_KRETPROBE 2291f6d3a8fSMasami Hiramatsu bool 2301f6d3a8fSMasami Hiramatsu help 2311f6d3a8fSMasami Hiramatsu Since kretprobes modifies return address on the stack, the 2321f6d3a8fSMasami Hiramatsu stacktrace may see the kretprobe trampoline address instead 2331f6d3a8fSMasami Hiramatsu of correct one. If the architecture stacktrace code and 2341f6d3a8fSMasami Hiramatsu unwinder can adjust such entries, select this configuration. 2351f6d3a8fSMasami Hiramatsu 236540adea3SMasami Hiramatsuconfig HAVE_FUNCTION_ERROR_INJECTION 2379802d865SJosef Bacik bool 2389802d865SJosef Bacik 23942a0bb3fSPetr Mladekconfig HAVE_NMI 24042a0bb3fSPetr Mladek bool 24142a0bb3fSPetr Mladek 242a257caccSChristophe Leroyconfig HAVE_FUNCTION_DESCRIPTORS 243a257caccSChristophe Leroy bool 244a257caccSChristophe Leroy 2454aae683fSMasahiro Yamadaconfig TRACE_IRQFLAGS_SUPPORT 2464aae683fSMasahiro Yamada bool 2474aae683fSMasahiro Yamada 2484510bffbSMark Rutlandconfig TRACE_IRQFLAGS_NMI_SUPPORT 2494510bffbSMark Rutland bool 2504510bffbSMark Rutland 2511f5a4ad9SRoland McGrath# 2521f5a4ad9SRoland McGrath# An arch should select this if it provides all these things: 2531f5a4ad9SRoland McGrath# 2541f5a4ad9SRoland McGrath# task_pt_regs() in asm/processor.h or asm/ptrace.h 2551f5a4ad9SRoland McGrath# arch_has_single_step() if there is hardware single-step support 2561f5a4ad9SRoland McGrath# arch_has_block_step() if there is hardware block-step support 2571f5a4ad9SRoland McGrath# asm/syscall.h supplying asm-generic/syscall.h interface 2581f5a4ad9SRoland McGrath# linux/regset.h user_regset interfaces 2591f5a4ad9SRoland McGrath# CORE_DUMP_USE_REGSET #define'd in linux/elf.h 260153474baSEric W. Biederman# TIF_SYSCALL_TRACE calls ptrace_report_syscall_{entry,exit} 26103248addSEric W. Biederman# TIF_NOTIFY_RESUME calls resume_user_mode_work() 2621f5a4ad9SRoland McGrath# 2631f5a4ad9SRoland McGrathconfig HAVE_ARCH_TRACEHOOK 2649ba16087SJan Beulich bool 2651f5a4ad9SRoland McGrath 266c64be2bbSMarek Szyprowskiconfig HAVE_DMA_CONTIGUOUS 267c64be2bbSMarek Szyprowski bool 268c64be2bbSMarek Szyprowski 26929d5e047SThomas Gleixnerconfig GENERIC_SMP_IDLE_THREAD 27029d5e047SThomas Gleixner bool 27129d5e047SThomas Gleixner 272485cf5daSKevin Hilmanconfig GENERIC_IDLE_POLL_SETUP 273485cf5daSKevin Hilman bool 274485cf5daSKevin Hilman 2756974f0c4SDaniel Micayconfig ARCH_HAS_FORTIFY_SOURCE 2766974f0c4SDaniel Micay bool 2776974f0c4SDaniel Micay help 2786974f0c4SDaniel Micay An architecture should select this when it can successfully 2796974f0c4SDaniel Micay build and run with CONFIG_FORTIFY_SOURCE. 2806974f0c4SDaniel Micay 281d8ae8a37SChristoph Hellwig# 282d8ae8a37SChristoph Hellwig# Select if the arch provides a historic keepinit alias for the retain_initrd 283d8ae8a37SChristoph Hellwig# command line option 284d8ae8a37SChristoph Hellwig# 285d8ae8a37SChristoph Hellwigconfig ARCH_HAS_KEEPINITRD 286d8ae8a37SChristoph Hellwig bool 287d8ae8a37SChristoph Hellwig 288d2852a22SDaniel Borkmann# Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h 289d2852a22SDaniel Borkmannconfig ARCH_HAS_SET_MEMORY 290d2852a22SDaniel Borkmann bool 291d2852a22SDaniel Borkmann 292d253ca0cSRick Edgecombe# Select if arch has all set_direct_map_invalid/default() functions 293d253ca0cSRick Edgecombeconfig ARCH_HAS_SET_DIRECT_MAP 294d253ca0cSRick Edgecombe bool 295d253ca0cSRick Edgecombe 296c30700dbSChristoph Hellwig# 297fa7e2247SChristoph Hellwig# Select if the architecture provides the arch_dma_set_uncached symbol to 298a86ecfa6SColin Ian King# either provide an uncached segment alias for a DMA allocation, or 299fa7e2247SChristoph Hellwig# to remap the page tables in place. 300c30700dbSChristoph Hellwig# 301fa7e2247SChristoph Hellwigconfig ARCH_HAS_DMA_SET_UNCACHED 302c30700dbSChristoph Hellwig bool 303c30700dbSChristoph Hellwig 304999a5d12SChristoph Hellwig# 305999a5d12SChristoph Hellwig# Select if the architectures provides the arch_dma_clear_uncached symbol 306999a5d12SChristoph Hellwig# to undo an in-place page table remap for uncached access. 307999a5d12SChristoph Hellwig# 308999a5d12SChristoph Hellwigconfig ARCH_HAS_DMA_CLEAR_UNCACHED 309f5e10287SThomas Gleixner bool 310f5e10287SThomas Gleixner 3115905429aSKees Cook# Select if arch init_task must go in the __init_task_data section 3125905429aSKees Cookconfig ARCH_TASK_STRUCT_ON_STACK 3135905429aSKees Cook bool 3145905429aSKees Cook 3155905429aSKees Cook# Select if arch has its private alloc_task_struct() function 3165905429aSKees Cookconfig ARCH_TASK_STRUCT_ALLOCATOR 3175905429aSKees Cook bool 3185905429aSKees Cook 3195905429aSKees Cookconfig HAVE_ARCH_THREAD_STRUCT_WHITELIST 3205905429aSKees Cook bool 3215905429aSKees Cook depends on !ARCH_TASK_STRUCT_ALLOCATOR 322b235beeaSLinus Torvalds help 323b235beeaSLinus Torvalds An architecture should select this to provide hardened usercopy 324f5e10287SThomas Gleixner knowledge about what region of the thread_struct should be 325f5e10287SThomas Gleixner whitelisted for copying to userspace. Normally this is only the 3265aaeb5c0SIngo Molnar FPU registers. Specifically, arch_thread_struct_whitelist() 3275aaeb5c0SIngo Molnar should be implemented. Without this, the entire thread_struct 3285aaeb5c0SIngo Molnar field in task_struct will be left whitelisted. 3295aaeb5c0SIngo Molnar 330942fa985SYury Norov# Select if arch has its private alloc_thread_stack() function 331942fa985SYury Norovconfig ARCH_THREAD_STACK_ALLOCATOR 332942fa985SYury Norov bool 333942fa985SYury Norov 334942fa985SYury Norov# Select if arch wants to size task_struct dynamically via arch_task_struct_size: 335942fa985SYury Norovconfig ARCH_WANTS_DYNAMIC_TASK_STRUCT 336942fa985SYury Norov bool 337942fa985SYury Norov 33851c2ee6dSNick Desaulniersconfig ARCH_WANTS_NO_INSTR 33951c2ee6dSNick Desaulniers bool 34051c2ee6dSNick Desaulniers help 34151c2ee6dSNick Desaulniers An architecture should select this if the noinstr macro is being used on 34251c2ee6dSNick Desaulniers functions to denote that the toolchain should avoid instrumenting such 34351c2ee6dSNick Desaulniers functions and is required for correctness. 34451c2ee6dSNick Desaulniers 345942fa985SYury Norovconfig ARCH_32BIT_OFF_T 346942fa985SYury Norov bool 347942fa985SYury Norov depends on !64BIT 348942fa985SYury Norov help 349942fa985SYury Norov All new 32-bit architectures should have 64-bit off_t type on 350942fa985SYury Norov userspace side which corresponds to the loff_t kernel type. This 351942fa985SYury Norov is the requirement for modern ABIs. Some existing architectures 352942fa985SYury Norov still support 32-bit off_t. This option is enabled for all such 353942fa985SYury Norov architectures explicitly. 354942fa985SYury Norov 35596c0a6a7SHeiko Carstens# Selected by 64 bit architectures which have a 32 bit f_tinode in struct ustat 35696c0a6a7SHeiko Carstensconfig ARCH_32BIT_USTAT_F_TINODE 35796c0a6a7SHeiko Carstens bool 35896c0a6a7SHeiko Carstens 3592ff2b7ecSMasahiro Yamadaconfig HAVE_ASM_MODVERSIONS 3602ff2b7ecSMasahiro Yamada bool 3612ff2b7ecSMasahiro Yamada help 362a86ecfa6SColin Ian King This symbol should be selected by an architecture if it provides 3632ff2b7ecSMasahiro Yamada <asm/asm-prototypes.h> to support the module versioning for symbols 3642ff2b7ecSMasahiro Yamada exported from assembly code. 3652ff2b7ecSMasahiro Yamada 366f850c30cSHeiko Carstensconfig HAVE_REGS_AND_STACK_ACCESS_API 367f850c30cSHeiko Carstens bool 368e01292b1SHeiko Carstens help 369a86ecfa6SColin Ian King This symbol should be selected by an architecture if it supports 370e01292b1SHeiko Carstens the API needed to access registers and stack entries from pt_regs, 371e01292b1SHeiko Carstens declared in asm/ptrace.h 372e01292b1SHeiko Carstens For example the kprobes-based event tracer needs this API. 373f850c30cSHeiko Carstens 374d7822b1eSMathieu Desnoyersconfig HAVE_RSEQ 375d7822b1eSMathieu Desnoyers bool 376d7822b1eSMathieu Desnoyers depends on HAVE_REGS_AND_STACK_ACCESS_API 377d7822b1eSMathieu Desnoyers help 378d7822b1eSMathieu Desnoyers This symbol should be selected by an architecture if it 379d7822b1eSMathieu Desnoyers supports an implementation of restartable sequences. 380d7822b1eSMathieu Desnoyers 3812f7ab126SMiguel Ojedaconfig HAVE_RUST 3822f7ab126SMiguel Ojeda bool 3832f7ab126SMiguel Ojeda help 3842f7ab126SMiguel Ojeda This symbol should be selected by an architecture if it 3852f7ab126SMiguel Ojeda supports Rust. 3862f7ab126SMiguel Ojeda 3873c88ee19SMasami Hiramatsuconfig HAVE_FUNCTION_ARG_ACCESS_API 3883c88ee19SMasami Hiramatsu bool 3893c88ee19SMasami Hiramatsu help 390a86ecfa6SColin Ian King This symbol should be selected by an architecture if it supports 3913c88ee19SMasami Hiramatsu the API needed to access function arguments from pt_regs, 3923c88ee19SMasami Hiramatsu declared in asm/ptrace.h 3933c88ee19SMasami Hiramatsu 39462a038d3SK.Prasadconfig HAVE_HW_BREAKPOINT 39562a038d3SK.Prasad bool 39699e8c5a3SFrederic Weisbecker depends on PERF_EVENTS 39762a038d3SK.Prasad 3980102752eSFrederic Weisbeckerconfig HAVE_MIXED_BREAKPOINTS_REGS 3990102752eSFrederic Weisbecker bool 4000102752eSFrederic Weisbecker depends on HAVE_HW_BREAKPOINT 4010102752eSFrederic Weisbecker help 4020102752eSFrederic Weisbecker Depending on the arch implementation of hardware breakpoints, 4030102752eSFrederic Weisbecker some of them have separate registers for data and instruction 4040102752eSFrederic Weisbecker breakpoints addresses, others have mixed registers to store 4050102752eSFrederic Weisbecker them but define the access type in a control register. 4060102752eSFrederic Weisbecker Select this option if your arch implements breakpoints under the 4070102752eSFrederic Weisbecker latter fashion. 4080102752eSFrederic Weisbecker 4097c68af6eSAvi Kivityconfig HAVE_USER_RETURN_NOTIFIER 4107c68af6eSAvi Kivity bool 411a1922ed6SIngo Molnar 412c01d4323SFrederic Weisbeckerconfig HAVE_PERF_EVENTS_NMI 413c01d4323SFrederic Weisbecker bool 41423637d47SFrederic Weisbecker help 41523637d47SFrederic Weisbecker System hardware can generate an NMI using the perf event 41623637d47SFrederic Weisbecker subsystem. Also has support for calculating CPU cycle events 41723637d47SFrederic Weisbecker to determine how many clock cycles in a given period. 418c01d4323SFrederic Weisbecker 41905a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_PERF 42005a4a952SNicholas Piggin bool 42105a4a952SNicholas Piggin depends on HAVE_PERF_EVENTS_NMI 42205a4a952SNicholas Piggin help 42305a4a952SNicholas Piggin The arch chooses to use the generic perf-NMI-based hardlockup 42405a4a952SNicholas Piggin detector. Must define HAVE_PERF_EVENTS_NMI. 42505a4a952SNicholas Piggin 42605a4a952SNicholas Pigginconfig HAVE_NMI_WATCHDOG 42705a4a952SNicholas Piggin depends on HAVE_NMI 42805a4a952SNicholas Piggin bool 42905a4a952SNicholas Piggin help 43005a4a952SNicholas Piggin The arch provides a low level NMI watchdog. It provides 43105a4a952SNicholas Piggin asm/nmi.h, and defines its own arch_touch_nmi_watchdog(). 43205a4a952SNicholas Piggin 43305a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_ARCH 43405a4a952SNicholas Piggin bool 43505a4a952SNicholas Piggin select HAVE_NMI_WATCHDOG 43605a4a952SNicholas Piggin help 43705a4a952SNicholas Piggin The arch chooses to provide its own hardlockup detector, which is 43805a4a952SNicholas Piggin a superset of the HAVE_NMI_WATCHDOG. It also conforms to config 43905a4a952SNicholas Piggin interfaces and parameters provided by hardlockup detector subsystem. 44005a4a952SNicholas Piggin 441c5e63197SJiri Olsaconfig HAVE_PERF_REGS 442c5e63197SJiri Olsa bool 443c5e63197SJiri Olsa help 444c5e63197SJiri Olsa Support selective register dumps for perf events. This includes 445c5e63197SJiri Olsa bit-mapping of each registers and a unique architecture id. 446c5e63197SJiri Olsa 447c5ebcedbSJiri Olsaconfig HAVE_PERF_USER_STACK_DUMP 448c5ebcedbSJiri Olsa bool 449c5ebcedbSJiri Olsa help 450c5ebcedbSJiri Olsa Support user stack dumps for perf event samples. This needs 451c5ebcedbSJiri Olsa access to the user stack pointer which is not unified across 452c5ebcedbSJiri Olsa architectures. 453c5ebcedbSJiri Olsa 454bf5438fcSJason Baronconfig HAVE_ARCH_JUMP_LABEL 455bf5438fcSJason Baron bool 456bf5438fcSJason Baron 45750ff18abSArd Biesheuvelconfig HAVE_ARCH_JUMP_LABEL_RELATIVE 45850ff18abSArd Biesheuvel bool 45950ff18abSArd Biesheuvel 4600d6e24d4SPeter Zijlstraconfig MMU_GATHER_TABLE_FREE 4610d6e24d4SPeter Zijlstra bool 4620d6e24d4SPeter Zijlstra 463ff2e6d72SPeter Zijlstraconfig MMU_GATHER_RCU_TABLE_FREE 46426723911SPeter Zijlstra bool 4650d6e24d4SPeter Zijlstra select MMU_GATHER_TABLE_FREE 46626723911SPeter Zijlstra 4673af4bd03SPeter Zijlstraconfig MMU_GATHER_PAGE_SIZE 468ed6a7935SPeter Zijlstra bool 469ed6a7935SPeter Zijlstra 47027796d03SPeter Zijlstraconfig MMU_GATHER_NO_RANGE 47127796d03SPeter Zijlstra bool 4721e9fdf21SPeter Zijlstra select MMU_GATHER_MERGE_VMAS 4731e9fdf21SPeter Zijlstra 4741e9fdf21SPeter Zijlstraconfig MMU_GATHER_NO_FLUSH_CACHE 4751e9fdf21SPeter Zijlstra bool 4761e9fdf21SPeter Zijlstra 4771e9fdf21SPeter Zijlstraconfig MMU_GATHER_MERGE_VMAS 4781e9fdf21SPeter Zijlstra bool 47927796d03SPeter Zijlstra 480580a586cSPeter Zijlstraconfig MMU_GATHER_NO_GATHER 481952a31c9SMartin Schwidefsky bool 4820d6e24d4SPeter Zijlstra depends on MMU_GATHER_TABLE_FREE 483952a31c9SMartin Schwidefsky 484d53c3dfbSNicholas Pigginconfig ARCH_WANT_IRQS_OFF_ACTIVATE_MM 485d53c3dfbSNicholas Piggin bool 486d53c3dfbSNicholas Piggin help 487d53c3dfbSNicholas Piggin Temporary select until all architectures can be converted to have 488d53c3dfbSNicholas Piggin irqs disabled over activate_mm. Architectures that do IPI based TLB 489d53c3dfbSNicholas Piggin shootdowns should enable this. 490d53c3dfbSNicholas Piggin 49188e3009bSNicholas Piggin# Use normal mm refcounting for MMU_LAZY_TLB kernel thread references. 49288e3009bSNicholas Piggin# MMU_LAZY_TLB_REFCOUNT=n can improve the scalability of context switching 49388e3009bSNicholas Piggin# to/from kernel threads when the same mm is running on a lot of CPUs (a large 49488e3009bSNicholas Piggin# multi-threaded application), by reducing contention on the mm refcount. 49588e3009bSNicholas Piggin# 49688e3009bSNicholas Piggin# This can be disabled if the architecture ensures no CPUs are using an mm as a 49788e3009bSNicholas Piggin# "lazy tlb" beyond its final refcount (i.e., by the time __mmdrop frees the mm 49888e3009bSNicholas Piggin# or its kernel page tables). This could be arranged by arch_exit_mmap(), or 49988e3009bSNicholas Piggin# final exit(2) TLB flush, for example. 50088e3009bSNicholas Piggin# 50188e3009bSNicholas Piggin# To implement this, an arch *must*: 50288e3009bSNicholas Piggin# Ensure the _lazy_tlb variants of mmgrab/mmdrop are used when manipulating 50388e3009bSNicholas Piggin# the lazy tlb reference of a kthread's ->active_mm (non-arch code has been 50488e3009bSNicholas Piggin# converted already). 50588e3009bSNicholas Pigginconfig MMU_LAZY_TLB_REFCOUNT 50688e3009bSNicholas Piggin def_bool y 5072655421aSNicholas Piggin depends on !MMU_LAZY_TLB_SHOOTDOWN 5082655421aSNicholas Piggin 5092655421aSNicholas Piggin# This option allows MMU_LAZY_TLB_REFCOUNT=n. It ensures no CPUs are using an 5102655421aSNicholas Piggin# mm as a lazy tlb beyond its last reference count, by shooting down these 5112655421aSNicholas Piggin# users before the mm is deallocated. __mmdrop() first IPIs all CPUs that may 5122655421aSNicholas Piggin# be using the mm as a lazy tlb, so that they may switch themselves to using 5132655421aSNicholas Piggin# init_mm for their active mm. mm_cpumask(mm) is used to determine which CPUs 5142655421aSNicholas Piggin# may be using mm as a lazy tlb mm. 5152655421aSNicholas Piggin# 5162655421aSNicholas Piggin# To implement this, an arch *must*: 5172655421aSNicholas Piggin# - At the time of the final mmdrop of the mm, ensure mm_cpumask(mm) contains 5182655421aSNicholas Piggin# at least all possible CPUs in which the mm is lazy. 5192655421aSNicholas Piggin# - It must meet the requirements for MMU_LAZY_TLB_REFCOUNT=n (see above). 5202655421aSNicholas Pigginconfig MMU_LAZY_TLB_SHOOTDOWN 5212655421aSNicholas Piggin bool 52288e3009bSNicholas Piggin 523df013ffbSHuang Yingconfig ARCH_HAVE_NMI_SAFE_CMPXCHG 524df013ffbSHuang Ying bool 525df013ffbSHuang Ying 5262e83b879SPaul E. McKenneyconfig ARCH_HAS_NMI_SAFE_THIS_CPU_OPS 5272e83b879SPaul E. McKenney bool 5282e83b879SPaul E. McKenney 52943570fd2SHeiko Carstensconfig HAVE_ALIGNED_STRUCT_PAGE 53043570fd2SHeiko Carstens bool 53143570fd2SHeiko Carstens help 53243570fd2SHeiko Carstens This makes sure that struct pages are double word aligned and that 53343570fd2SHeiko Carstens e.g. the SLUB allocator can perform double word atomic operations 53443570fd2SHeiko Carstens on a struct page for better performance. However selecting this 53543570fd2SHeiko Carstens might increase the size of a struct page by a word. 53643570fd2SHeiko Carstens 5374156153cSHeiko Carstensconfig HAVE_CMPXCHG_LOCAL 5384156153cSHeiko Carstens bool 5394156153cSHeiko Carstens 5402565409fSHeiko Carstensconfig HAVE_CMPXCHG_DOUBLE 5412565409fSHeiko Carstens bool 5422565409fSHeiko Carstens 54377e58496SPaul E. McKenneyconfig ARCH_WEAK_RELEASE_ACQUIRE 54477e58496SPaul E. McKenney bool 54577e58496SPaul E. McKenney 546c1d7e01dSWill Deaconconfig ARCH_WANT_IPC_PARSE_VERSION 547c1d7e01dSWill Deacon bool 548c1d7e01dSWill Deacon 549c1d7e01dSWill Deaconconfig ARCH_WANT_COMPAT_IPC_PARSE_VERSION 550c1d7e01dSWill Deacon bool 551c1d7e01dSWill Deacon 55248b25c43SChris Metcalfconfig ARCH_WANT_OLD_COMPAT_IPC 553c1d7e01dSWill Deacon select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 55448b25c43SChris Metcalf bool 55548b25c43SChris Metcalf 556282a181bSYiFei Zhuconfig HAVE_ARCH_SECCOMP 557e2cfabdfSWill Drewry bool 558e2cfabdfSWill Drewry help 559282a181bSYiFei Zhu An arch should select this symbol to support seccomp mode 1 (the fixed 560282a181bSYiFei Zhu syscall policy), and must provide an overrides for __NR_seccomp_sigreturn, 561282a181bSYiFei Zhu and compat syscalls if the asm-generic/seccomp.h defaults need adjustment: 562282a181bSYiFei Zhu - __NR_seccomp_read_32 563282a181bSYiFei Zhu - __NR_seccomp_write_32 564282a181bSYiFei Zhu - __NR_seccomp_exit_32 565282a181bSYiFei Zhu - __NR_seccomp_sigreturn_32 566282a181bSYiFei Zhu 567282a181bSYiFei Zhuconfig HAVE_ARCH_SECCOMP_FILTER 568282a181bSYiFei Zhu bool 569282a181bSYiFei Zhu select HAVE_ARCH_SECCOMP 570282a181bSYiFei Zhu help 571fb0fadf9SWill Drewry An arch should select this symbol if it provides all of these things: 572282a181bSYiFei Zhu - all the requirements for HAVE_ARCH_SECCOMP 573bb6ea430SWill Drewry - syscall_get_arch() 574bb6ea430SWill Drewry - syscall_get_arguments() 575bb6ea430SWill Drewry - syscall_rollback() 576bb6ea430SWill Drewry - syscall_set_return_value() 577fb0fadf9SWill Drewry - SIGSYS siginfo_t support 578fb0fadf9SWill Drewry - secure_computing is called from a ptrace_event()-safe context 579fb0fadf9SWill Drewry - secure_computing return value is checked and a return value of -1 580fb0fadf9SWill Drewry results in the system call being skipped immediately. 58148dc92b9SKees Cook - seccomp syscall wired up 5820d8315ddSYiFei Zhu - if !HAVE_SPARSE_SYSCALL_NR, have SECCOMP_ARCH_NATIVE, 5830d8315ddSYiFei Zhu SECCOMP_ARCH_NATIVE_NR, SECCOMP_ARCH_NATIVE_NAME defined. If 5840d8315ddSYiFei Zhu COMPAT is supported, have the SECCOMP_ARCH_COMPAT* defines too. 585e2cfabdfSWill Drewry 586282a181bSYiFei Zhuconfig SECCOMP 587282a181bSYiFei Zhu prompt "Enable seccomp to safely execute untrusted bytecode" 588282a181bSYiFei Zhu def_bool y 589282a181bSYiFei Zhu depends on HAVE_ARCH_SECCOMP 590282a181bSYiFei Zhu help 591282a181bSYiFei Zhu This kernel feature is useful for number crunching applications 592282a181bSYiFei Zhu that may need to handle untrusted bytecode during their 593282a181bSYiFei Zhu execution. By using pipes or other transports made available 594282a181bSYiFei Zhu to the process as file descriptors supporting the read/write 595282a181bSYiFei Zhu syscalls, it's possible to isolate those applications in their 596282a181bSYiFei Zhu own address space using seccomp. Once seccomp is enabled via 597282a181bSYiFei Zhu prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be 598282a181bSYiFei Zhu disabled and the task is only allowed to execute a few safe 599282a181bSYiFei Zhu syscalls defined by each seccomp mode. 600282a181bSYiFei Zhu 601282a181bSYiFei Zhu If unsure, say Y. 602282a181bSYiFei Zhu 603e2cfabdfSWill Drewryconfig SECCOMP_FILTER 604e2cfabdfSWill Drewry def_bool y 605e2cfabdfSWill Drewry depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET 606e2cfabdfSWill Drewry help 607e2cfabdfSWill Drewry Enable tasks to build secure computing environments defined 608e2cfabdfSWill Drewry in terms of Berkeley Packet Filter programs which implement 609e2cfabdfSWill Drewry task-defined system call filtering polices. 610e2cfabdfSWill Drewry 6115fb94e9cSMauro Carvalho Chehab See Documentation/userspace-api/seccomp_filter.rst for details. 612e2cfabdfSWill Drewry 6130d8315ddSYiFei Zhuconfig SECCOMP_CACHE_DEBUG 6140d8315ddSYiFei Zhu bool "Show seccomp filter cache status in /proc/pid/seccomp_cache" 6150d8315ddSYiFei Zhu depends on SECCOMP_FILTER && !HAVE_SPARSE_SYSCALL_NR 6160d8315ddSYiFei Zhu depends on PROC_FS 6170d8315ddSYiFei Zhu help 6180d8315ddSYiFei Zhu This enables the /proc/pid/seccomp_cache interface to monitor 6190d8315ddSYiFei Zhu seccomp cache data. The file format is subject to change. Reading 6200d8315ddSYiFei Zhu the file requires CAP_SYS_ADMIN. 6210d8315ddSYiFei Zhu 6220d8315ddSYiFei Zhu This option is for debugging only. Enabling presents the risk that 6230d8315ddSYiFei Zhu an adversary may be able to infer the seccomp filter logic. 6240d8315ddSYiFei Zhu 6250d8315ddSYiFei Zhu If unsure, say N. 6260d8315ddSYiFei Zhu 627afaef01cSAlexander Popovconfig HAVE_ARCH_STACKLEAK 628afaef01cSAlexander Popov bool 629afaef01cSAlexander Popov help 630afaef01cSAlexander Popov An architecture should select this if it has the code which 631afaef01cSAlexander Popov fills the used part of the kernel stack with the STACKLEAK_POISON 632afaef01cSAlexander Popov value before returning from system calls. 633afaef01cSAlexander Popov 634d148eac0SMasahiro Yamadaconfig HAVE_STACKPROTECTOR 63519952a92SKees Cook bool 63619952a92SKees Cook help 63719952a92SKees Cook An arch should select this symbol if: 63819952a92SKees Cook - it has implemented a stack canary (e.g. __stack_chk_guard) 63919952a92SKees Cook 640050e9baaSLinus Torvaldsconfig STACKPROTECTOR 6412a61f474SMasahiro Yamada bool "Stack Protector buffer overflow detection" 642d148eac0SMasahiro Yamada depends on HAVE_STACKPROTECTOR 6432a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector) 6442a61f474SMasahiro Yamada default y 6458779657dSKees Cook help 6468779657dSKees Cook This option turns on the "stack-protector" GCC feature. This 64719952a92SKees Cook feature puts, at the beginning of functions, a canary value on 64819952a92SKees Cook the stack just before the return address, and validates 64919952a92SKees Cook the value just before actually returning. Stack based buffer 65019952a92SKees Cook overflows (that need to overwrite this return address) now also 65119952a92SKees Cook overwrite the canary, which gets detected and the attack is then 65219952a92SKees Cook neutralized via a kernel panic. 65319952a92SKees Cook 6548779657dSKees Cook Functions will have the stack-protector canary logic added if they 6558779657dSKees Cook have an 8-byte or larger character array on the stack. 6568779657dSKees Cook 65719952a92SKees Cook This feature requires gcc version 4.2 or above, or a distribution 6588779657dSKees Cook gcc with the feature backported ("-fstack-protector"). 6598779657dSKees Cook 6608779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 6618779657dSKees Cook about 3% of all kernel functions, which increases kernel code size 6628779657dSKees Cook by about 0.3%. 6638779657dSKees Cook 664050e9baaSLinus Torvaldsconfig STACKPROTECTOR_STRONG 6652a61f474SMasahiro Yamada bool "Strong Stack Protector" 666050e9baaSLinus Torvalds depends on STACKPROTECTOR 6672a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector-strong) 6682a61f474SMasahiro Yamada default y 6698779657dSKees Cook help 6708779657dSKees Cook Functions will have the stack-protector canary logic added in any 6718779657dSKees Cook of the following conditions: 6728779657dSKees Cook 6738779657dSKees Cook - local variable's address used as part of the right hand side of an 6748779657dSKees Cook assignment or function argument 6758779657dSKees Cook - local variable is an array (or union containing an array), 6768779657dSKees Cook regardless of array type or length 6778779657dSKees Cook - uses register local variables 6788779657dSKees Cook 6798779657dSKees Cook This feature requires gcc version 4.9 or above, or a distribution 6808779657dSKees Cook gcc with the feature backported ("-fstack-protector-strong"). 6818779657dSKees Cook 6828779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 6838779657dSKees Cook about 20% of all kernel functions, which increases the kernel code 6848779657dSKees Cook size by about 2%. 6858779657dSKees Cook 686d08b9f0cSSami Tolvanenconfig ARCH_SUPPORTS_SHADOW_CALL_STACK 687d08b9f0cSSami Tolvanen bool 688d08b9f0cSSami Tolvanen help 689afcf5441SDan Li An architecture should select this if it supports the compiler's 690afcf5441SDan Li Shadow Call Stack and implements runtime support for shadow stack 691aa7a65aeSWill Deacon switching. 692d08b9f0cSSami Tolvanen 693d08b9f0cSSami Tolvanenconfig SHADOW_CALL_STACK 694afcf5441SDan Li bool "Shadow Call Stack" 695afcf5441SDan Li depends on ARCH_SUPPORTS_SHADOW_CALL_STACK 69638792972SArd Biesheuvel depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER 697d08b9f0cSSami Tolvanen help 698afcf5441SDan Li This option enables the compiler's Shadow Call Stack, which 699afcf5441SDan Li uses a shadow stack to protect function return addresses from 700afcf5441SDan Li being overwritten by an attacker. More information can be found 701afcf5441SDan Li in the compiler's documentation: 702d08b9f0cSSami Tolvanen 703afcf5441SDan Li - Clang: https://clang.llvm.org/docs/ShadowCallStack.html 704afcf5441SDan Li - GCC: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#Instrumentation-Options 705d08b9f0cSSami Tolvanen 706d08b9f0cSSami Tolvanen Note that security guarantees in the kernel differ from the 707d08b9f0cSSami Tolvanen ones documented for user space. The kernel must store addresses 708d08b9f0cSSami Tolvanen of shadow stacks in memory, which means an attacker capable of 709d08b9f0cSSami Tolvanen reading and writing arbitrary memory may be able to locate them 710d08b9f0cSSami Tolvanen and hijack control flow by modifying the stacks. 711d08b9f0cSSami Tolvanen 7129beccca0SArd Biesheuvelconfig DYNAMIC_SCS 7139beccca0SArd Biesheuvel bool 7149beccca0SArd Biesheuvel help 7159beccca0SArd Biesheuvel Set by the arch code if it relies on code patching to insert the 7169beccca0SArd Biesheuvel shadow call stack push and pop instructions rather than on the 7179beccca0SArd Biesheuvel compiler. 7189beccca0SArd Biesheuvel 719dc5723b0SSami Tolvanenconfig LTO 720dc5723b0SSami Tolvanen bool 721dc5723b0SSami Tolvanen help 722dc5723b0SSami Tolvanen Selected if the kernel will be built using the compiler's LTO feature. 723dc5723b0SSami Tolvanen 724dc5723b0SSami Tolvanenconfig LTO_CLANG 725dc5723b0SSami Tolvanen bool 726dc5723b0SSami Tolvanen select LTO 727dc5723b0SSami Tolvanen help 728dc5723b0SSami Tolvanen Selected if the kernel will be built using Clang's LTO feature. 729dc5723b0SSami Tolvanen 730dc5723b0SSami Tolvanenconfig ARCH_SUPPORTS_LTO_CLANG 731dc5723b0SSami Tolvanen bool 732dc5723b0SSami Tolvanen help 733dc5723b0SSami Tolvanen An architecture should select this option if it supports: 734dc5723b0SSami Tolvanen - compiling with Clang, 735dc5723b0SSami Tolvanen - compiling inline assembly with Clang's integrated assembler, 736dc5723b0SSami Tolvanen - and linking with LLD. 737dc5723b0SSami Tolvanen 738dc5723b0SSami Tolvanenconfig ARCH_SUPPORTS_LTO_CLANG_THIN 739dc5723b0SSami Tolvanen bool 740dc5723b0SSami Tolvanen help 741dc5723b0SSami Tolvanen An architecture should select this option if it can support Clang's 742dc5723b0SSami Tolvanen ThinLTO mode. 743dc5723b0SSami Tolvanen 744dc5723b0SSami Tolvanenconfig HAS_LTO_CLANG 745dc5723b0SSami Tolvanen def_bool y 7461e68a8afSNathan Chancellor depends on CC_IS_CLANG && LD_IS_LLD && AS_IS_LLVM 747dc5723b0SSami Tolvanen depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) 748dc5723b0SSami Tolvanen depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) 749dc5723b0SSami Tolvanen depends on ARCH_SUPPORTS_LTO_CLANG 750dc5723b0SSami Tolvanen depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT 751bf3c2551SSami Tolvanen depends on !KASAN || KASAN_HW_TAGS 752dc5723b0SSami Tolvanen depends on !GCOV_KERNEL 753dc5723b0SSami Tolvanen help 754dc5723b0SSami Tolvanen The compiler and Kconfig options support building with Clang's 755dc5723b0SSami Tolvanen LTO. 756dc5723b0SSami Tolvanen 757dc5723b0SSami Tolvanenchoice 758dc5723b0SSami Tolvanen prompt "Link Time Optimization (LTO)" 759dc5723b0SSami Tolvanen default LTO_NONE 760dc5723b0SSami Tolvanen help 761dc5723b0SSami Tolvanen This option enables Link Time Optimization (LTO), which allows the 762dc5723b0SSami Tolvanen compiler to optimize binaries globally. 763dc5723b0SSami Tolvanen 764dc5723b0SSami Tolvanen If unsure, select LTO_NONE. Note that LTO is very resource-intensive 765dc5723b0SSami Tolvanen so it's disabled by default. 766dc5723b0SSami Tolvanen 767dc5723b0SSami Tolvanenconfig LTO_NONE 768dc5723b0SSami Tolvanen bool "None" 769dc5723b0SSami Tolvanen help 770dc5723b0SSami Tolvanen Build the kernel normally, without Link Time Optimization (LTO). 771dc5723b0SSami Tolvanen 772dc5723b0SSami Tolvanenconfig LTO_CLANG_FULL 773dc5723b0SSami Tolvanen bool "Clang Full LTO (EXPERIMENTAL)" 774dc5723b0SSami Tolvanen depends on HAS_LTO_CLANG 775dc5723b0SSami Tolvanen depends on !COMPILE_TEST 776dc5723b0SSami Tolvanen select LTO_CLANG 777dc5723b0SSami Tolvanen help 778dc5723b0SSami Tolvanen This option enables Clang's full Link Time Optimization (LTO), which 779dc5723b0SSami Tolvanen allows the compiler to optimize the kernel globally. If you enable 780dc5723b0SSami Tolvanen this option, the compiler generates LLVM bitcode instead of ELF 781dc5723b0SSami Tolvanen object files, and the actual compilation from bitcode happens at 782dc5723b0SSami Tolvanen the LTO link step, which may take several minutes depending on the 783dc5723b0SSami Tolvanen kernel configuration. More information can be found from LLVM's 784dc5723b0SSami Tolvanen documentation: 785dc5723b0SSami Tolvanen 786dc5723b0SSami Tolvanen https://llvm.org/docs/LinkTimeOptimization.html 787dc5723b0SSami Tolvanen 788dc5723b0SSami Tolvanen During link time, this option can use a large amount of RAM, and 789dc5723b0SSami Tolvanen may take much longer than the ThinLTO option. 790dc5723b0SSami Tolvanen 791dc5723b0SSami Tolvanenconfig LTO_CLANG_THIN 792dc5723b0SSami Tolvanen bool "Clang ThinLTO (EXPERIMENTAL)" 793dc5723b0SSami Tolvanen depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN 794dc5723b0SSami Tolvanen select LTO_CLANG 795dc5723b0SSami Tolvanen help 796dc5723b0SSami Tolvanen This option enables Clang's ThinLTO, which allows for parallel 797dc5723b0SSami Tolvanen optimization and faster incremental compiles compared to the 798dc5723b0SSami Tolvanen CONFIG_LTO_CLANG_FULL option. More information can be found 799dc5723b0SSami Tolvanen from Clang's documentation: 800dc5723b0SSami Tolvanen 801dc5723b0SSami Tolvanen https://clang.llvm.org/docs/ThinLTO.html 802dc5723b0SSami Tolvanen 803dc5723b0SSami Tolvanen If unsure, say Y. 804dc5723b0SSami Tolvanenendchoice 805dc5723b0SSami Tolvanen 806cf68fffbSSami Tolvanenconfig ARCH_SUPPORTS_CFI_CLANG 807cf68fffbSSami Tolvanen bool 808cf68fffbSSami Tolvanen help 809cf68fffbSSami Tolvanen An architecture should select this option if it can support Clang's 810cf68fffbSSami Tolvanen Control-Flow Integrity (CFI) checking. 811cf68fffbSSami Tolvanen 81289245600SSami Tolvanenconfig ARCH_USES_CFI_TRAPS 81389245600SSami Tolvanen bool 81489245600SSami Tolvanen 815cf68fffbSSami Tolvanenconfig CFI_CLANG 816cf68fffbSSami Tolvanen bool "Use Clang's Control Flow Integrity (CFI)" 81789245600SSami Tolvanen depends on ARCH_SUPPORTS_CFI_CLANG 81889245600SSami Tolvanen depends on $(cc-option,-fsanitize=kcfi) 819cf68fffbSSami Tolvanen help 820cf68fffbSSami Tolvanen This option enables Clang’s forward-edge Control Flow Integrity 821cf68fffbSSami Tolvanen (CFI) checking, where the compiler injects a runtime check to each 822cf68fffbSSami Tolvanen indirect function call to ensure the target is a valid function with 823cf68fffbSSami Tolvanen the correct static type. This restricts possible call targets and 824cf68fffbSSami Tolvanen makes it more difficult for an attacker to exploit bugs that allow 825cf68fffbSSami Tolvanen the modification of stored function pointers. More information can be 826cf68fffbSSami Tolvanen found from Clang's documentation: 827cf68fffbSSami Tolvanen 828cf68fffbSSami Tolvanen https://clang.llvm.org/docs/ControlFlowIntegrity.html 829cf68fffbSSami Tolvanen 830cf68fffbSSami Tolvanenconfig CFI_PERMISSIVE 831cf68fffbSSami Tolvanen bool "Use CFI in permissive mode" 832cf68fffbSSami Tolvanen depends on CFI_CLANG 833cf68fffbSSami Tolvanen help 834cf68fffbSSami Tolvanen When selected, Control Flow Integrity (CFI) violations result in a 835cf68fffbSSami Tolvanen warning instead of a kernel panic. This option should only be used 836cf68fffbSSami Tolvanen for finding indirect call type mismatches during development. 837cf68fffbSSami Tolvanen 838cf68fffbSSami Tolvanen If unsure, say N. 839cf68fffbSSami Tolvanen 8400f60a8efSKees Cookconfig HAVE_ARCH_WITHIN_STACK_FRAMES 8410f60a8efSKees Cook bool 8420f60a8efSKees Cook help 8430f60a8efSKees Cook An architecture should select this if it can walk the kernel stack 8440f60a8efSKees Cook frames to determine if an object is part of either the arguments 8450f60a8efSKees Cook or local variables (i.e. that it excludes saved return addresses, 8460f60a8efSKees Cook and similar) by implementing an inline arch_within_stack_frames(), 8470f60a8efSKees Cook which is used by CONFIG_HARDENED_USERCOPY. 8480f60a8efSKees Cook 84924a9c541SFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING_USER 8502b1d5024SFrederic Weisbecker bool 8512b1d5024SFrederic Weisbecker help 85291d1aa43SFrederic Weisbecker Provide kernel/user boundaries probes necessary for subsystems 85391d1aa43SFrederic Weisbecker that need it, such as userspace RCU extended quiescent state. 854490f561bSFrederic Weisbecker Syscalls need to be wrapped inside user_exit()-user_enter(), either 855490f561bSFrederic Weisbecker optimized behind static key or through the slow path using TIF_NOHZ 856490f561bSFrederic Weisbecker flag. Exceptions handlers must be wrapped as well. Irqs are already 8576f0e6c15SFrederic Weisbecker protected inside ct_irq_enter/ct_irq_exit() but preemption or signal 858490f561bSFrederic Weisbecker handling on irq exit still need to be protected. 859490f561bSFrederic Weisbecker 86024a9c541SFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING_USER_OFFSTACK 86183c2da2eSFrederic Weisbecker bool 86283c2da2eSFrederic Weisbecker help 86383c2da2eSFrederic Weisbecker Architecture neither relies on exception_enter()/exception_exit() 86483c2da2eSFrederic Weisbecker nor on schedule_user(). Also preempt_schedule_notrace() and 86583c2da2eSFrederic Weisbecker preempt_schedule_irq() can't be called in a preemptible section 86683c2da2eSFrederic Weisbecker while context tracking is CONTEXT_USER. This feature reflects a sane 86783c2da2eSFrederic Weisbecker entry implementation where the following requirements are met on 86883c2da2eSFrederic Weisbecker critical entry code, ie: before user_exit() or after user_enter(): 86983c2da2eSFrederic Weisbecker 87083c2da2eSFrederic Weisbecker - Critical entry code isn't preemptible (or better yet: 87183c2da2eSFrederic Weisbecker not interruptible). 872493c1822SFrederic Weisbecker - No use of RCU read side critical sections, unless ct_nmi_enter() 87383c2da2eSFrederic Weisbecker got called. 87483c2da2eSFrederic Weisbecker - No use of instrumentation, unless instrumentation_begin() got 87583c2da2eSFrederic Weisbecker called. 87683c2da2eSFrederic Weisbecker 877490f561bSFrederic Weisbeckerconfig HAVE_TIF_NOHZ 878490f561bSFrederic Weisbecker bool 879490f561bSFrederic Weisbecker help 880490f561bSFrederic Weisbecker Arch relies on TIF_NOHZ and syscall slow path to implement context 881490f561bSFrederic Weisbecker tracking calls to user_enter()/user_exit(). 8822b1d5024SFrederic Weisbecker 883b952741cSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING 884b952741cSFrederic Weisbecker bool 885b952741cSFrederic Weisbecker 8862b91ec9fSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING_IDLE 8872b91ec9fSFrederic Weisbecker bool 8882b91ec9fSFrederic Weisbecker help 8892b91ec9fSFrederic Weisbecker Architecture has its own way to account idle CPU time and therefore 8902b91ec9fSFrederic Weisbecker doesn't implement vtime_account_idle(). 8912b91ec9fSFrederic Weisbecker 89240565b5aSStanislaw Gruszkaconfig ARCH_HAS_SCALED_CPUTIME 89340565b5aSStanislaw Gruszka bool 89440565b5aSStanislaw Gruszka 895554b0004SKevin Hilmanconfig HAVE_VIRT_CPU_ACCOUNTING_GEN 896554b0004SKevin Hilman bool 897554b0004SKevin Hilman default y if 64BIT 898554b0004SKevin Hilman help 899554b0004SKevin Hilman With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. 900554b0004SKevin Hilman Before enabling this option, arch code must be audited 901554b0004SKevin Hilman to ensure there are no races in concurrent read/write of 902554b0004SKevin Hilman cputime_t. For example, reading/writing 64-bit cputime_t on 903554b0004SKevin Hilman some 32-bit arches may require multiple accesses, so proper 904554b0004SKevin Hilman locking is needed to protect against concurrent accesses. 905554b0004SKevin Hilman 906fdf9c356SFrederic Weisbeckerconfig HAVE_IRQ_TIME_ACCOUNTING 907fdf9c356SFrederic Weisbecker bool 908fdf9c356SFrederic Weisbecker help 909fdf9c356SFrederic Weisbecker Archs need to ensure they use a high enough resolution clock to 910fdf9c356SFrederic Weisbecker support irq time accounting and then call enable_sched_clock_irqtime(). 911fdf9c356SFrederic Weisbecker 912c49dd340SKalesh Singhconfig HAVE_MOVE_PUD 913c49dd340SKalesh Singh bool 914c49dd340SKalesh Singh help 915c49dd340SKalesh Singh Architectures that select this are able to move page tables at the 916c49dd340SKalesh Singh PUD level. If there are only 3 page table levels, the move effectively 917c49dd340SKalesh Singh happens at the PGD level. 918c49dd340SKalesh Singh 9192c91bd4aSJoel Fernandes (Google)config HAVE_MOVE_PMD 9202c91bd4aSJoel Fernandes (Google) bool 9212c91bd4aSJoel Fernandes (Google) help 9222c91bd4aSJoel Fernandes (Google) Archs that select this are able to move page tables at the PMD level. 9232c91bd4aSJoel Fernandes (Google) 92415626062SGerald Schaeferconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE 92515626062SGerald Schaefer bool 92615626062SGerald Schaefer 927a00cc7d9SMatthew Wilcoxconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 928a00cc7d9SMatthew Wilcox bool 929a00cc7d9SMatthew Wilcox 9300ddab1d2SToshi Kaniconfig HAVE_ARCH_HUGE_VMAP 9310ddab1d2SToshi Kani bool 9320ddab1d2SToshi Kani 933121e6f32SNicholas Piggin# 934121e6f32SNicholas Piggin# Archs that select this would be capable of PMD-sized vmaps (i.e., 935559089e0SSong Liu# arch_vmap_pmd_supported() returns true). The VM_ALLOW_HUGE_VMAP flag 936559089e0SSong Liu# must be used to enable allocations to use hugepages. 937121e6f32SNicholas Piggin# 938121e6f32SNicholas Pigginconfig HAVE_ARCH_HUGE_VMALLOC 939121e6f32SNicholas Piggin depends on HAVE_ARCH_HUGE_VMAP 940121e6f32SNicholas Piggin bool 941121e6f32SNicholas Piggin 9423876d4a3SAlexandre Ghiticonfig ARCH_WANT_HUGE_PMD_SHARE 9433876d4a3SAlexandre Ghiti bool 9443876d4a3SAlexandre Ghiti 9450f8975ecSPavel Emelyanovconfig HAVE_ARCH_SOFT_DIRTY 9460f8975ecSPavel Emelyanov bool 9470f8975ecSPavel Emelyanov 948786d35d4SDavid Howellsconfig HAVE_MOD_ARCH_SPECIFIC 949786d35d4SDavid Howells bool 950786d35d4SDavid Howells help 951786d35d4SDavid Howells The arch uses struct mod_arch_specific to store data. Many arches 952786d35d4SDavid Howells just need a simple module loader without arch specific data - those 953786d35d4SDavid Howells should not enable this. 954786d35d4SDavid Howells 955786d35d4SDavid Howellsconfig MODULES_USE_ELF_RELA 956786d35d4SDavid Howells bool 957786d35d4SDavid Howells help 958786d35d4SDavid Howells Modules only use ELF RELA relocations. Modules with ELF REL 959786d35d4SDavid Howells relocations will give an error. 960786d35d4SDavid Howells 961786d35d4SDavid Howellsconfig MODULES_USE_ELF_REL 962786d35d4SDavid Howells bool 963786d35d4SDavid Howells help 964786d35d4SDavid Howells Modules only use ELF REL relocations. Modules with ELF RELA 965786d35d4SDavid Howells relocations will give an error. 966786d35d4SDavid Howells 96701dc0386SChristophe Leroyconfig ARCH_WANTS_MODULES_DATA_IN_VMALLOC 96801dc0386SChristophe Leroy bool 96901dc0386SChristophe Leroy help 97001dc0386SChristophe Leroy For architectures like powerpc/32 which have constraints on module 97101dc0386SChristophe Leroy allocation and need to allocate module data outside of module area. 97201dc0386SChristophe Leroy 973cc1f0274SFrederic Weisbeckerconfig HAVE_IRQ_EXIT_ON_IRQ_STACK 974cc1f0274SFrederic Weisbecker bool 975cc1f0274SFrederic Weisbecker help 976cc1f0274SFrederic Weisbecker Architecture doesn't only execute the irq handler on the irq stack 977cc1f0274SFrederic Weisbecker but also irq_exit(). This way we can process softirqs on this irq 978cc1f0274SFrederic Weisbecker stack instead of switching to a new one when we call __do_softirq() 979cc1f0274SFrederic Weisbecker in the end of an hardirq. 980cc1f0274SFrederic Weisbecker This spares a stack switch and improves cache usage on softirq 981cc1f0274SFrederic Weisbecker processing. 982cc1f0274SFrederic Weisbecker 983cd1a41ceSThomas Gleixnerconfig HAVE_SOFTIRQ_ON_OWN_STACK 984cd1a41ceSThomas Gleixner bool 985cd1a41ceSThomas Gleixner help 986cd1a41ceSThomas Gleixner Architecture provides a function to run __do_softirq() on a 987c226bc3cSColin Ian King separate stack. 988cd1a41ceSThomas Gleixner 9898cbb2b50SSebastian Andrzej Siewiorconfig SOFTIRQ_ON_OWN_STACK 9908cbb2b50SSebastian Andrzej Siewior def_bool HAVE_SOFTIRQ_ON_OWN_STACK && !PREEMPT_RT 9918cbb2b50SSebastian Andrzej Siewior 99212700c17SArnd Bergmannconfig ALTERNATE_USER_ADDRESS_SPACE 99312700c17SArnd Bergmann bool 99412700c17SArnd Bergmann help 99512700c17SArnd Bergmann Architectures set this when the CPU uses separate address 99612700c17SArnd Bergmann spaces for kernel and user space pointers. In this case, the 99712700c17SArnd Bergmann access_ok() check on a __user pointer is skipped. 99812700c17SArnd Bergmann 999235a8f02SKirill A. Shutemovconfig PGTABLE_LEVELS 1000235a8f02SKirill A. Shutemov int 1001235a8f02SKirill A. Shutemov default 2 1002235a8f02SKirill A. Shutemov 10032b68f6caSKees Cookconfig ARCH_HAS_ELF_RANDOMIZE 10042b68f6caSKees Cook bool 10052b68f6caSKees Cook help 10062b68f6caSKees Cook An architecture supports choosing randomized locations for 10072b68f6caSKees Cook stack, mmap, brk, and ET_DYN. Defined functions: 10082b68f6caSKees Cook - arch_mmap_rnd() 1009204db6edSKees Cook - arch_randomize_brk() 10102b68f6caSKees Cook 1011d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_BITS 1012d07e2259SDaniel Cashman bool 1013d07e2259SDaniel Cashman help 1014d07e2259SDaniel Cashman An arch should select this symbol if it supports setting a variable 1015d07e2259SDaniel Cashman number of bits for use in establishing the base address for mmap 1016d07e2259SDaniel Cashman allocations, has MMU enabled and provides values for both: 1017d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MIN 1018d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MAX 1019d07e2259SDaniel Cashman 10205f56a5dfSJiri Slabyconfig HAVE_EXIT_THREAD 10215f56a5dfSJiri Slaby bool 10225f56a5dfSJiri Slaby help 10235f56a5dfSJiri Slaby An architecture implements exit_thread. 10245f56a5dfSJiri Slaby 1025d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MIN 1026d07e2259SDaniel Cashman int 1027d07e2259SDaniel Cashman 1028d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MAX 1029d07e2259SDaniel Cashman int 1030d07e2259SDaniel Cashman 1031d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_DEFAULT 1032d07e2259SDaniel Cashman int 1033d07e2259SDaniel Cashman 1034d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS 1035d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address" if EXPERT 1036d07e2259SDaniel Cashman range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX 1037d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT 1038d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_MIN 1039d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_BITS 1040d07e2259SDaniel Cashman help 1041d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 1042d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 1043d07e2259SDaniel Cashman resulting from mmap allocations. This value will be bounded 1044d07e2259SDaniel Cashman by the architecture's minimum and maximum supported values. 1045d07e2259SDaniel Cashman 1046d07e2259SDaniel Cashman This value can be changed after boot using the 1047d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_bits tunable 1048d07e2259SDaniel Cashman 1049d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_COMPAT_BITS 1050d07e2259SDaniel Cashman bool 1051d07e2259SDaniel Cashman help 1052d07e2259SDaniel Cashman An arch should select this symbol if it supports running applications 1053d07e2259SDaniel Cashman in compatibility mode, supports setting a variable number of bits for 1054d07e2259SDaniel Cashman use in establishing the base address for mmap allocations, has MMU 1055d07e2259SDaniel Cashman enabled and provides values for both: 1056d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MIN 1057d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MAX 1058d07e2259SDaniel Cashman 1059d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MIN 1060d07e2259SDaniel Cashman int 1061d07e2259SDaniel Cashman 1062d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MAX 1063d07e2259SDaniel Cashman int 1064d07e2259SDaniel Cashman 1065d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 1066d07e2259SDaniel Cashman int 1067d07e2259SDaniel Cashman 1068d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS 1069d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT 1070d07e2259SDaniel Cashman range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX 1071d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 1072d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_MIN 1073d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS 1074d07e2259SDaniel Cashman help 1075d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 1076d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 1077d07e2259SDaniel Cashman resulting from mmap allocations for compatible applications This 1078d07e2259SDaniel Cashman value will be bounded by the architecture's minimum and maximum 1079d07e2259SDaniel Cashman supported values. 1080d07e2259SDaniel Cashman 1081d07e2259SDaniel Cashman This value can be changed after boot using the 1082d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_compat_bits tunable 1083d07e2259SDaniel Cashman 10841b028f78SDmitry Safonovconfig HAVE_ARCH_COMPAT_MMAP_BASES 10851b028f78SDmitry Safonov bool 10861b028f78SDmitry Safonov help 10871b028f78SDmitry Safonov This allows 64bit applications to invoke 32-bit mmap() syscall 10881b028f78SDmitry Safonov and vice-versa 32-bit applications to call 64-bit mmap(). 10891b028f78SDmitry Safonov Required for applications doing different bitness syscalls. 10901b028f78SDmitry Safonov 10911f0e290cSGuenter Roeckconfig PAGE_SIZE_LESS_THAN_64KB 10921f0e290cSGuenter Roeck def_bool y 10931f0e290cSGuenter Roeck depends on !ARM64_64K_PAGES 10941f0e290cSGuenter Roeck depends on !IA64_PAGE_SIZE_64KB 10951f0e290cSGuenter Roeck depends on !PAGE_SIZE_64KB 10961f0e290cSGuenter Roeck depends on !PARISC_PAGE_SIZE_64KB 1097e4bbd20dSNathan Chancellor depends on PAGE_SIZE_LESS_THAN_256KB 1098e4bbd20dSNathan Chancellor 1099e4bbd20dSNathan Chancellorconfig PAGE_SIZE_LESS_THAN_256KB 1100e4bbd20dSNathan Chancellor def_bool y 11011f0e290cSGuenter Roeck depends on !PAGE_SIZE_256KB 11021f0e290cSGuenter Roeck 110367f3977fSAlexandre Ghiti# This allows to use a set of generic functions to determine mmap base 110467f3977fSAlexandre Ghiti# address by giving priority to top-down scheme only if the process 110567f3977fSAlexandre Ghiti# is not in legacy mode (compat task, unlimited stack size or 110667f3977fSAlexandre Ghiti# sysctl_legacy_va_layout). 110767f3977fSAlexandre Ghiti# Architecture that selects this option can provide its own version of: 110867f3977fSAlexandre Ghiti# - STACK_RND_MASK 110967f3977fSAlexandre Ghiticonfig ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 111067f3977fSAlexandre Ghiti bool 111167f3977fSAlexandre Ghiti depends on MMU 1112e7142bf5SAlexandre Ghiti select ARCH_HAS_ELF_RANDOMIZE 111367f3977fSAlexandre Ghiti 111403f16cd0SJosh Poimboeufconfig HAVE_OBJTOOL 111503f16cd0SJosh Poimboeuf bool 111603f16cd0SJosh Poimboeuf 11174ab7674fSJosh Poimboeufconfig HAVE_JUMP_LABEL_HACK 11184ab7674fSJosh Poimboeuf bool 11194ab7674fSJosh Poimboeuf 112022102f45SJosh Poimboeufconfig HAVE_NOINSTR_HACK 112122102f45SJosh Poimboeuf bool 112222102f45SJosh Poimboeuf 1123489e355bSJosh Poimboeufconfig HAVE_NOINSTR_VALIDATION 1124489e355bSJosh Poimboeuf bool 1125489e355bSJosh Poimboeuf 11265f3da8c0SJosh Poimboeufconfig HAVE_UACCESS_VALIDATION 11275f3da8c0SJosh Poimboeuf bool 11285f3da8c0SJosh Poimboeuf select OBJTOOL 11295f3da8c0SJosh Poimboeuf 1130b9ab5ebbSJosh Poimboeufconfig HAVE_STACK_VALIDATION 1131b9ab5ebbSJosh Poimboeuf bool 1132b9ab5ebbSJosh Poimboeuf help 113303f16cd0SJosh Poimboeuf Architecture supports objtool compile-time frame pointer rule 113403f16cd0SJosh Poimboeuf validation. 1135b9ab5ebbSJosh Poimboeuf 1136af085d90SJosh Poimboeufconfig HAVE_RELIABLE_STACKTRACE 1137af085d90SJosh Poimboeuf bool 1138af085d90SJosh Poimboeuf help 1139140d7e88SMiroslav Benes Architecture has either save_stack_trace_tsk_reliable() or 1140140d7e88SMiroslav Benes arch_stack_walk_reliable() function which only returns a stack trace 1141140d7e88SMiroslav Benes if it can guarantee the trace is reliable. 1142af085d90SJosh Poimboeuf 1143468a9428SGeorge Spelvinconfig HAVE_ARCH_HASH 1144468a9428SGeorge Spelvin bool 1145468a9428SGeorge Spelvin default n 1146468a9428SGeorge Spelvin help 1147468a9428SGeorge Spelvin If this is set, the architecture provides an <asm/hash.h> 1148468a9428SGeorge Spelvin file which provides platform-specific implementations of some 1149468a9428SGeorge Spelvin functions in <linux/hash.h> or fs/namei.c. 1150468a9428SGeorge Spelvin 1151666047feSFinn Thainconfig HAVE_ARCH_NVRAM_OPS 1152666047feSFinn Thain bool 1153666047feSFinn Thain 11543a495511SWilliam Breathitt Grayconfig ISA_BUS_API 11553a495511SWilliam Breathitt Gray def_bool ISA 11563a495511SWilliam Breathitt Gray 1157d2125043SAl Viro# 1158d2125043SAl Viro# ABI hall of shame 1159d2125043SAl Viro# 1160d2125043SAl Viroconfig CLONE_BACKWARDS 1161d2125043SAl Viro bool 1162d2125043SAl Viro help 1163d2125043SAl Viro Architecture has tls passed as the 4th argument of clone(2), 1164d2125043SAl Viro not the 5th one. 1165d2125043SAl Viro 1166d2125043SAl Viroconfig CLONE_BACKWARDS2 1167d2125043SAl Viro bool 1168d2125043SAl Viro help 1169d2125043SAl Viro Architecture has the first two arguments of clone(2) swapped. 1170d2125043SAl Viro 1171dfa9771aSMichal Simekconfig CLONE_BACKWARDS3 1172dfa9771aSMichal Simek bool 1173dfa9771aSMichal Simek help 1174dfa9771aSMichal Simek Architecture has tls passed as the 3rd argument of clone(2), 1175dfa9771aSMichal Simek not the 5th one. 1176dfa9771aSMichal Simek 1177eaca6eaeSAl Viroconfig ODD_RT_SIGACTION 1178eaca6eaeSAl Viro bool 1179eaca6eaeSAl Viro help 1180eaca6eaeSAl Viro Architecture has unusual rt_sigaction(2) arguments 1181eaca6eaeSAl Viro 11820a0e8cdfSAl Viroconfig OLD_SIGSUSPEND 11830a0e8cdfSAl Viro bool 11840a0e8cdfSAl Viro help 11850a0e8cdfSAl Viro Architecture has old sigsuspend(2) syscall, of one-argument variety 11860a0e8cdfSAl Viro 11870a0e8cdfSAl Viroconfig OLD_SIGSUSPEND3 11880a0e8cdfSAl Viro bool 11890a0e8cdfSAl Viro help 11900a0e8cdfSAl Viro Even weirder antique ABI - three-argument sigsuspend(2) 11910a0e8cdfSAl Viro 1192495dfbf7SAl Viroconfig OLD_SIGACTION 1193495dfbf7SAl Viro bool 1194495dfbf7SAl Viro help 1195495dfbf7SAl Viro Architecture has old sigaction(2) syscall. Nope, not the same 1196495dfbf7SAl Viro as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2), 1197495dfbf7SAl Viro but fairly different variant of sigaction(2), thanks to OSF/1 1198495dfbf7SAl Viro compatibility... 1199495dfbf7SAl Viro 1200495dfbf7SAl Viroconfig COMPAT_OLD_SIGACTION 1201495dfbf7SAl Viro bool 1202495dfbf7SAl Viro 120317435e5fSDeepa Dinamaniconfig COMPAT_32BIT_TIME 1204942437c9SArnd Bergmann bool "Provide system calls for 32-bit time_t" 1205942437c9SArnd Bergmann default !64BIT || COMPAT 120617435e5fSDeepa Dinamani help 120717435e5fSDeepa Dinamani This enables 32 bit time_t support in addition to 64 bit time_t support. 120817435e5fSDeepa Dinamani This is relevant on all 32-bit architectures, and 64-bit architectures 120917435e5fSDeepa Dinamani as part of compat syscall handling. 121017435e5fSDeepa Dinamani 121187a4c375SChristoph Hellwigconfig ARCH_NO_PREEMPT 121287a4c375SChristoph Hellwig bool 121387a4c375SChristoph Hellwig 1214cb2c7d1aSMickaël Salaünconfig ARCH_EPHEMERAL_INODES 1215cb2c7d1aSMickaël Salaün def_bool n 1216cb2c7d1aSMickaël Salaün help 1217cb2c7d1aSMickaël Salaün An arch should select this symbol if it doesn't keep track of inode 1218cb2c7d1aSMickaël Salaün instances on its own, but instead relies on something else (e.g. the 1219cb2c7d1aSMickaël Salaün host kernel for an UML kernel). 1220cb2c7d1aSMickaël Salaün 1221a50a3f4bSThomas Gleixnerconfig ARCH_SUPPORTS_RT 1222a50a3f4bSThomas Gleixner bool 1223a50a3f4bSThomas Gleixner 1224fff7fb0bSZhaoxiu Zengconfig CPU_NO_EFFICIENT_FFS 1225fff7fb0bSZhaoxiu Zeng def_bool n 1226fff7fb0bSZhaoxiu Zeng 1227ba14a194SAndy Lutomirskiconfig HAVE_ARCH_VMAP_STACK 1228ba14a194SAndy Lutomirski def_bool n 1229ba14a194SAndy Lutomirski help 1230ba14a194SAndy Lutomirski An arch should select this symbol if it can support kernel stacks 1231ba14a194SAndy Lutomirski in vmalloc space. This means: 1232ba14a194SAndy Lutomirski 1233ba14a194SAndy Lutomirski - vmalloc space must be large enough to hold many kernel stacks. 1234ba14a194SAndy Lutomirski This may rule out many 32-bit architectures. 1235ba14a194SAndy Lutomirski 1236ba14a194SAndy Lutomirski - Stacks in vmalloc space need to work reliably. For example, if 1237ba14a194SAndy Lutomirski vmap page tables are created on demand, either this mechanism 1238ba14a194SAndy Lutomirski needs to work while the stack points to a virtual address with 1239ba14a194SAndy Lutomirski unpopulated page tables or arch code (switch_to() and switch_mm(), 1240ba14a194SAndy Lutomirski most likely) needs to ensure that the stack's page table entries 1241ba14a194SAndy Lutomirski are populated before running on a possibly unpopulated stack. 1242ba14a194SAndy Lutomirski 1243ba14a194SAndy Lutomirski - If the stack overflows into a guard page, something reasonable 1244ba14a194SAndy Lutomirski should happen. The definition of "reasonable" is flexible, but 1245ba14a194SAndy Lutomirski instantly rebooting without logging anything would be unfriendly. 1246ba14a194SAndy Lutomirski 1247ba14a194SAndy Lutomirskiconfig VMAP_STACK 1248ba14a194SAndy Lutomirski default y 1249ba14a194SAndy Lutomirski bool "Use a virtually-mapped stack" 1250eafb149eSDaniel Axtens depends on HAVE_ARCH_VMAP_STACK 125138dd767dSAndrey Konovalov depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC 1252a7f7f624SMasahiro Yamada help 1253ba14a194SAndy Lutomirski Enable this if you want the use virtually-mapped kernel stacks 1254ba14a194SAndy Lutomirski with guard pages. This causes kernel stack overflows to be 1255ba14a194SAndy Lutomirski caught immediately rather than causing difficult-to-diagnose 1256ba14a194SAndy Lutomirski corruption. 1257ba14a194SAndy Lutomirski 125838dd767dSAndrey Konovalov To use this with software KASAN modes, the architecture must support 125938dd767dSAndrey Konovalov backing virtual mappings with real shadow memory, and KASAN_VMALLOC 126038dd767dSAndrey Konovalov must be enabled. 1261ba14a194SAndy Lutomirski 126239218ff4SKees Cookconfig HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 126339218ff4SKees Cook def_bool n 126439218ff4SKees Cook help 126539218ff4SKees Cook An arch should select this symbol if it can support kernel stack 126639218ff4SKees Cook offset randomization with calls to add_random_kstack_offset() 126739218ff4SKees Cook during syscall entry and choose_random_kstack_offset() during 126839218ff4SKees Cook syscall exit. Careful removal of -fstack-protector-strong and 126939218ff4SKees Cook -fstack-protector should also be applied to the entry code and 127039218ff4SKees Cook closely examined, as the artificial stack bump looks like an array 127139218ff4SKees Cook to the compiler, so it will attempt to add canary checks regardless 127239218ff4SKees Cook of the static branch state. 127339218ff4SKees Cook 12748cb37a59SMarco Elverconfig RANDOMIZE_KSTACK_OFFSET 12758cb37a59SMarco Elver bool "Support for randomizing kernel stack offset on syscall entry" if EXPERT 12768cb37a59SMarco Elver default y 127739218ff4SKees Cook depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 1278efa90c11SMarco Elver depends on INIT_STACK_NONE || !CC_IS_CLANG || CLANG_VERSION >= 140000 127939218ff4SKees Cook help 128039218ff4SKees Cook The kernel stack offset can be randomized (after pt_regs) by 128139218ff4SKees Cook roughly 5 bits of entropy, frustrating memory corruption 128239218ff4SKees Cook attacks that depend on stack address determinism or 12838cb37a59SMarco Elver cross-syscall address exposures. 12848cb37a59SMarco Elver 12858cb37a59SMarco Elver The feature is controlled via the "randomize_kstack_offset=on/off" 12868cb37a59SMarco Elver kernel boot param, and if turned off has zero overhead due to its use 12878cb37a59SMarco Elver of static branches (see JUMP_LABEL). 12888cb37a59SMarco Elver 12898cb37a59SMarco Elver If unsure, say Y. 12908cb37a59SMarco Elver 12918cb37a59SMarco Elverconfig RANDOMIZE_KSTACK_OFFSET_DEFAULT 12928cb37a59SMarco Elver bool "Default state of kernel stack offset randomization" 12938cb37a59SMarco Elver depends on RANDOMIZE_KSTACK_OFFSET 12948cb37a59SMarco Elver help 12958cb37a59SMarco Elver Kernel stack offset randomization is controlled by kernel boot param 12968cb37a59SMarco Elver "randomize_kstack_offset=on/off", and this config chooses the default 12978cb37a59SMarco Elver boot state. 129839218ff4SKees Cook 1299ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX 1300ad21fc4fSLaura Abbott def_bool n 1301ad21fc4fSLaura Abbott 1302ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1303ad21fc4fSLaura Abbott def_bool n 1304ad21fc4fSLaura Abbott 1305ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_KERNEL_RWX 1306ad21fc4fSLaura Abbott def_bool n 1307ad21fc4fSLaura Abbott 13080f5bf6d0SLaura Abbottconfig STRICT_KERNEL_RWX 1309ad21fc4fSLaura Abbott bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX 1310ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_KERNEL_RWX 1311ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1312ad21fc4fSLaura Abbott help 1313ad21fc4fSLaura Abbott If this is set, kernel text and rodata memory will be made read-only, 1314ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 1315ad21fc4fSLaura Abbott protection against certain security exploits (e.g. executing the heap 1316ad21fc4fSLaura Abbott or modifying text) 1317ad21fc4fSLaura Abbott 1318ad21fc4fSLaura Abbott These features are considered standard security practice these days. 1319ad21fc4fSLaura Abbott You should say Y here in almost all cases. 1320ad21fc4fSLaura Abbott 1321ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_MODULE_RWX 1322ad21fc4fSLaura Abbott def_bool n 1323ad21fc4fSLaura Abbott 13240f5bf6d0SLaura Abbottconfig STRICT_MODULE_RWX 1325ad21fc4fSLaura Abbott bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX 1326ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES 1327ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1328ad21fc4fSLaura Abbott help 1329ad21fc4fSLaura Abbott If this is set, module text and rodata memory will be made read-only, 1330ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 1331ad21fc4fSLaura Abbott protection against certain security exploits (e.g. writing to text) 1332ad21fc4fSLaura Abbott 1333ea8c64acSChristoph Hellwig# select if the architecture provides an asm/dma-direct.h header 1334ea8c64acSChristoph Hellwigconfig ARCH_HAS_PHYS_TO_DMA 1335ea8c64acSChristoph Hellwig bool 1336ea8c64acSChristoph Hellwig 133704f264d3SPaul Burtonconfig HAVE_ARCH_COMPILER_H 133804f264d3SPaul Burton bool 133904f264d3SPaul Burton help 134004f264d3SPaul Burton An architecture can select this if it provides an 134104f264d3SPaul Burton asm/compiler.h header that should be included after 134204f264d3SPaul Burton linux/compiler-*.h in order to override macro definitions that those 134304f264d3SPaul Burton headers generally provide. 134404f264d3SPaul Burton 1345271ca788SArd Biesheuvelconfig HAVE_ARCH_PREL32_RELOCATIONS 1346271ca788SArd Biesheuvel bool 1347271ca788SArd Biesheuvel help 1348271ca788SArd Biesheuvel May be selected by an architecture if it supports place-relative 1349271ca788SArd Biesheuvel 32-bit relocations, both in the toolchain and in the module loader, 1350271ca788SArd Biesheuvel in which case relative references can be used in special sections 1351271ca788SArd Biesheuvel for PCI fixup, initcalls etc which are only half the size on 64 bit 1352271ca788SArd Biesheuvel architectures, and don't require runtime relocation on relocatable 1353271ca788SArd Biesheuvel kernels. 1354271ca788SArd Biesheuvel 1355ce9084baSArd Biesheuvelconfig ARCH_USE_MEMREMAP_PROT 1356ce9084baSArd Biesheuvel bool 1357ce9084baSArd Biesheuvel 1358fb346fd9SWaiman Longconfig LOCK_EVENT_COUNTS 1359fb346fd9SWaiman Long bool "Locking event counts collection" 1360fb346fd9SWaiman Long depends on DEBUG_FS 1361a7f7f624SMasahiro Yamada help 1362fb346fd9SWaiman Long Enable light-weight counting of various locking related events 1363fb346fd9SWaiman Long in the system with minimal performance impact. This reduces 1364fb346fd9SWaiman Long the chance of application behavior change because of timing 1365fb346fd9SWaiman Long differences. The counts are reported via debugfs. 1366fb346fd9SWaiman Long 13675cf896fbSPeter Collingbourne# Select if the architecture has support for applying RELR relocations. 13685cf896fbSPeter Collingbourneconfig ARCH_HAS_RELR 13695cf896fbSPeter Collingbourne bool 13705cf896fbSPeter Collingbourne 13715cf896fbSPeter Collingbourneconfig RELR 13725cf896fbSPeter Collingbourne bool "Use RELR relocation packing" 13735cf896fbSPeter Collingbourne depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR 13745cf896fbSPeter Collingbourne default y 13755cf896fbSPeter Collingbourne help 13765cf896fbSPeter Collingbourne Store the kernel's dynamic relocations in the RELR relocation packing 13775cf896fbSPeter Collingbourne format. Requires a compatible linker (LLD supports this feature), as 13785cf896fbSPeter Collingbourne well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy 13795cf896fbSPeter Collingbourne are compatible). 13805cf896fbSPeter Collingbourne 13810c9c1d56SThiago Jung Bauermannconfig ARCH_HAS_MEM_ENCRYPT 13820c9c1d56SThiago Jung Bauermann bool 13830c9c1d56SThiago Jung Bauermann 138446b49b12STom Lendackyconfig ARCH_HAS_CC_PLATFORM 138546b49b12STom Lendacky bool 138646b49b12STom Lendacky 13870e242208SHassan Naveedconfig HAVE_SPARSE_SYSCALL_NR 13880e242208SHassan Naveed bool 13890e242208SHassan Naveed help 13900e242208SHassan Naveed An architecture should select this if its syscall numbering is sparse 13910e242208SHassan Naveed to save space. For example, MIPS architecture has a syscall array with 13920e242208SHassan Naveed entries at 4000, 5000 and 6000 locations. This option turns on syscall 13930e242208SHassan Naveed related optimizations for a given architecture. 13940e242208SHassan Naveed 1395d60d7de3SSven Schnelleconfig ARCH_HAS_VDSO_DATA 1396d60d7de3SSven Schnelle bool 1397d60d7de3SSven Schnelle 1398115284d8SJosh Poimboeufconfig HAVE_STATIC_CALL 1399115284d8SJosh Poimboeuf bool 1400115284d8SJosh Poimboeuf 14019183c3f9SJosh Poimboeufconfig HAVE_STATIC_CALL_INLINE 14029183c3f9SJosh Poimboeuf bool 14039183c3f9SJosh Poimboeuf depends on HAVE_STATIC_CALL 140403f16cd0SJosh Poimboeuf select OBJTOOL 14059183c3f9SJosh Poimboeuf 14066ef869e0SMichal Hockoconfig HAVE_PREEMPT_DYNAMIC 14076ef869e0SMichal Hocko bool 140899cf983cSMark Rutland 140999cf983cSMark Rutlandconfig HAVE_PREEMPT_DYNAMIC_CALL 141099cf983cSMark Rutland bool 14116ef869e0SMichal Hocko depends on HAVE_STATIC_CALL 141299cf983cSMark Rutland select HAVE_PREEMPT_DYNAMIC 14136ef869e0SMichal Hocko help 141499cf983cSMark Rutland An architecture should select this if it can handle the preemption 141599cf983cSMark Rutland model being selected at boot time using static calls. 141699cf983cSMark Rutland 141799cf983cSMark Rutland Where an architecture selects HAVE_STATIC_CALL_INLINE, any call to a 141899cf983cSMark Rutland preemption function will be patched directly. 141999cf983cSMark Rutland 142099cf983cSMark Rutland Where an architecture does not select HAVE_STATIC_CALL_INLINE, any 142199cf983cSMark Rutland call to a preemption function will go through a trampoline, and the 142299cf983cSMark Rutland trampoline will be patched. 142399cf983cSMark Rutland 142499cf983cSMark Rutland It is strongly advised to support inline static call to avoid any 142599cf983cSMark Rutland overhead. 142699cf983cSMark Rutland 142799cf983cSMark Rutlandconfig HAVE_PREEMPT_DYNAMIC_KEY 142899cf983cSMark Rutland bool 1429a0a12c3eSNick Desaulniers depends on HAVE_ARCH_JUMP_LABEL 143099cf983cSMark Rutland select HAVE_PREEMPT_DYNAMIC 143199cf983cSMark Rutland help 143299cf983cSMark Rutland An architecture should select this if it can handle the preemption 143399cf983cSMark Rutland model being selected at boot time using static keys. 143499cf983cSMark Rutland 143599cf983cSMark Rutland Each preemption function will be given an early return based on a 143699cf983cSMark Rutland static key. This should have slightly lower overhead than non-inline 143799cf983cSMark Rutland static calls, as this effectively inlines each trampoline into the 143899cf983cSMark Rutland start of its callee. This may avoid redundant work, and may 143999cf983cSMark Rutland integrate better with CFI schemes. 144099cf983cSMark Rutland 144199cf983cSMark Rutland This will have greater overhead than using inline static calls as 144299cf983cSMark Rutland the call to the preemption function cannot be entirely elided. 14436ef869e0SMichal Hocko 144459612b24SNathan Chancellorconfig ARCH_WANT_LD_ORPHAN_WARN 144559612b24SNathan Chancellor bool 144659612b24SNathan Chancellor help 144759612b24SNathan Chancellor An arch should select this symbol once all linker sections are explicitly 144859612b24SNathan Chancellor included, size-asserted, or discarded in the linker scripts. This is 144959612b24SNathan Chancellor important because we never want expected sections to be placed heuristically 145059612b24SNathan Chancellor by the linker, since the locations of such sections can change between linker 145159612b24SNathan Chancellor versions. 145259612b24SNathan Chancellor 14534f5b0c17SMike Rapoportconfig HAVE_ARCH_PFN_VALID 14544f5b0c17SMike Rapoport bool 14554f5b0c17SMike Rapoport 14565d6ad668SMike Rapoportconfig ARCH_SUPPORTS_DEBUG_PAGEALLOC 14575d6ad668SMike Rapoport bool 14585d6ad668SMike Rapoport 1459df4e817bSPasha Tatashinconfig ARCH_SUPPORTS_PAGE_TABLE_CHECK 1460df4e817bSPasha Tatashin bool 1461df4e817bSPasha Tatashin 14622ca408d9SBrian Gerstconfig ARCH_SPLIT_ARG64 14632ca408d9SBrian Gerst bool 14642ca408d9SBrian Gerst help 14652ca408d9SBrian Gerst If a 32-bit architecture requires 64-bit arguments to be split into 14662ca408d9SBrian Gerst pairs of 32-bit arguments, select this option. 14672ca408d9SBrian Gerst 14687facdc42SAl Viroconfig ARCH_HAS_ELFCORE_COMPAT 14697facdc42SAl Viro bool 14707facdc42SAl Viro 147158e106e7SBalbir Singhconfig ARCH_HAS_PARANOID_L1D_FLUSH 147258e106e7SBalbir Singh bool 147358e106e7SBalbir Singh 1474d593d64fSPrasad Sodagudiconfig ARCH_HAVE_TRACE_MMIO_ACCESS 1475d593d64fSPrasad Sodagudi bool 1476d593d64fSPrasad Sodagudi 14771bdda24cSThomas Gleixnerconfig DYNAMIC_SIGFRAME 14781bdda24cSThomas Gleixner bool 14791bdda24cSThomas Gleixner 148050468e43SJarkko Sakkinen# Select, if arch has a named attribute group bound to NUMA device nodes. 148150468e43SJarkko Sakkinenconfig HAVE_ARCH_NODE_DEV_GROUP 148250468e43SJarkko Sakkinen bool 148350468e43SJarkko Sakkinen 1484eed9a328SYu Zhaoconfig ARCH_HAS_NONLEAF_PMD_YOUNG 1485eed9a328SYu Zhao bool 1486eed9a328SYu Zhao help 1487eed9a328SYu Zhao Architectures that select this option are capable of setting the 1488eed9a328SYu Zhao accessed bit in non-leaf PMD entries when using them as part of linear 1489eed9a328SYu Zhao address translations. Page table walkers that clear the accessed bit 1490eed9a328SYu Zhao may use this capability to reduce their search space. 1491eed9a328SYu Zhao 14922521f2c2SPeter Oberparleitersource "kernel/gcov/Kconfig" 149345332b1bSMasahiro Yamada 149445332b1bSMasahiro Yamadasource "scripts/gcc-plugins/Kconfig" 1495fa1b5d09SLinus Torvalds 1496d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_4B 1497d49a0626SPeter Zijlstra bool 1498d49a0626SPeter Zijlstra 1499d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_8B 1500d49a0626SPeter Zijlstra bool 1501d49a0626SPeter Zijlstra 1502d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_16B 1503d49a0626SPeter Zijlstra bool 1504d49a0626SPeter Zijlstra 1505d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_32B 1506d49a0626SPeter Zijlstra bool 1507d49a0626SPeter Zijlstra 1508d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_64B 1509d49a0626SPeter Zijlstra bool 1510d49a0626SPeter Zijlstra 1511d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT 1512d49a0626SPeter Zijlstra int 1513d49a0626SPeter Zijlstra default 64 if FUNCTION_ALIGNMENT_64B 1514d49a0626SPeter Zijlstra default 32 if FUNCTION_ALIGNMENT_32B 1515d49a0626SPeter Zijlstra default 16 if FUNCTION_ALIGNMENT_16B 1516d49a0626SPeter Zijlstra default 8 if FUNCTION_ALIGNMENT_8B 1517d49a0626SPeter Zijlstra default 4 if FUNCTION_ALIGNMENT_4B 1518d49a0626SPeter Zijlstra default 0 1519d49a0626SPeter Zijlstra 152022471e13SRandy Dunlapendmenu 1521