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 14da32b581SCatalin Marinasconfig ARCH_HAS_SUBPAGE_FAULTS 15da32b581SCatalin Marinas bool 16da32b581SCatalin Marinas help 17da32b581SCatalin Marinas Select if the architecture can check permissions at sub-page 18da32b581SCatalin Marinas granularity (e.g. arm64 MTE). The probe_user_*() functions 19da32b581SCatalin Marinas must be implemented. 20da32b581SCatalin Marinas 2105736e4aSThomas Gleixnerconfig HOTPLUG_SMT 2205736e4aSThomas Gleixner bool 2305736e4aSThomas Gleixner 246f062123SThomas Gleixner# Selected by HOTPLUG_CORE_SYNC_DEAD or HOTPLUG_CORE_SYNC_FULL 256f062123SThomas Gleixnerconfig HOTPLUG_CORE_SYNC 266f062123SThomas Gleixner bool 276f062123SThomas Gleixner 286f062123SThomas Gleixner# Basic CPU dead synchronization selected by architecture 296f062123SThomas Gleixnerconfig HOTPLUG_CORE_SYNC_DEAD 306f062123SThomas Gleixner bool 316f062123SThomas Gleixner select HOTPLUG_CORE_SYNC 326f062123SThomas Gleixner 336f062123SThomas Gleixner# Full CPU synchronization with alive state selected by architecture 346f062123SThomas Gleixnerconfig HOTPLUG_CORE_SYNC_FULL 356f062123SThomas Gleixner bool 366f062123SThomas Gleixner select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU 376f062123SThomas Gleixner select HOTPLUG_CORE_SYNC 386f062123SThomas Gleixner 39a631be92SThomas Gleixnerconfig HOTPLUG_SPLIT_STARTUP 40a631be92SThomas Gleixner bool 41a631be92SThomas Gleixner select HOTPLUG_CORE_SYNC_FULL 42a631be92SThomas Gleixner 4318415f33SThomas Gleixnerconfig HOTPLUG_PARALLEL 4418415f33SThomas Gleixner bool 4518415f33SThomas Gleixner select HOTPLUG_SPLIT_STARTUP 4618415f33SThomas Gleixner 47142781e1SThomas Gleixnerconfig GENERIC_ENTRY 48142781e1SThomas Gleixner bool 49142781e1SThomas Gleixner 50125e5645SMathieu Desnoyersconfig KPROBES 51125e5645SMathieu Desnoyers bool "Kprobes" 5205ed160eSMasami Hiramatsu depends on MODULES 53125e5645SMathieu Desnoyers depends on HAVE_KPROBES 5405ed160eSMasami Hiramatsu select KALLSYMS 55835f14edSPaul E. McKenney select TASKS_RCU if PREEMPTION 56125e5645SMathieu Desnoyers help 57125e5645SMathieu Desnoyers Kprobes allows you to trap at almost any kernel address and 58125e5645SMathieu Desnoyers execute a callback function. register_kprobe() establishes 59125e5645SMathieu Desnoyers a probepoint and specifies the callback. Kprobes is useful 60125e5645SMathieu Desnoyers for kernel debugging, non-intrusive instrumentation and testing. 61125e5645SMathieu Desnoyers If in doubt, say "N". 62125e5645SMathieu Desnoyers 6345f81b1cSSteven Rostedtconfig JUMP_LABEL 64c5905afbSIngo Molnar bool "Optimize very unlikely/likely branches" 6545f81b1cSSteven Rostedt depends on HAVE_ARCH_JUMP_LABEL 664ab7674fSJosh Poimboeuf select OBJTOOL if HAVE_JUMP_LABEL_HACK 6745f81b1cSSteven Rostedt help 68c5905afbSIngo Molnar This option enables a transparent branch optimization that 69c5905afbSIngo Molnar makes certain almost-always-true or almost-always-false branch 70c5905afbSIngo Molnar conditions even cheaper to execute within the kernel. 7145f81b1cSSteven Rostedt 72c5905afbSIngo Molnar Certain performance-sensitive kernel code, such as trace points, 73c5905afbSIngo Molnar scheduler functionality, networking code and KVM have such 74c5905afbSIngo Molnar branches and include support for this optimization technique. 75c5905afbSIngo Molnar 76c5905afbSIngo Molnar If it is detected that the compiler has support for "asm goto", 77c5905afbSIngo Molnar the kernel will compile such branches with just a nop 78c5905afbSIngo Molnar instruction. When the condition flag is toggled to true, the 79c5905afbSIngo Molnar nop will be converted to a jump instruction to execute the 80c5905afbSIngo Molnar conditional block of instructions. 81c5905afbSIngo Molnar 82c5905afbSIngo Molnar This technique lowers overhead and stress on the branch prediction 83c5905afbSIngo Molnar of the processor and generally makes the kernel faster. The update 84c5905afbSIngo Molnar of the condition is slower, but those are always very rare. 85c5905afbSIngo Molnar 86c5905afbSIngo Molnar ( On 32-bit x86, the necessary options added to the compiler 87c5905afbSIngo Molnar flags may increase the size of the kernel slightly. ) 8845f81b1cSSteven Rostedt 891987c947SPeter Zijlstraconfig STATIC_KEYS_SELFTEST 901987c947SPeter Zijlstra bool "Static key selftest" 911987c947SPeter Zijlstra depends on JUMP_LABEL 921987c947SPeter Zijlstra help 931987c947SPeter Zijlstra Boot time self-test of the branch patching code. 941987c947SPeter Zijlstra 95f03c4129SPeter Zijlstraconfig STATIC_CALL_SELFTEST 96f03c4129SPeter Zijlstra bool "Static call selftest" 97f03c4129SPeter Zijlstra depends on HAVE_STATIC_CALL 98f03c4129SPeter Zijlstra help 99f03c4129SPeter Zijlstra Boot time self-test of the call patching code. 100f03c4129SPeter Zijlstra 101afd66255SMasami Hiramatsuconfig OPTPROBES 1025cc718b9SMasami Hiramatsu def_bool y 1035cc718b9SMasami Hiramatsu depends on KPROBES && HAVE_OPTPROBES 10401b1d88bSThomas Gleixner select TASKS_RCU if PREEMPTION 105afd66255SMasami Hiramatsu 106e7dbfe34SMasami Hiramatsuconfig KPROBES_ON_FTRACE 107e7dbfe34SMasami Hiramatsu def_bool y 108e7dbfe34SMasami Hiramatsu depends on KPROBES && HAVE_KPROBES_ON_FTRACE 109e7dbfe34SMasami Hiramatsu depends on DYNAMIC_FTRACE_WITH_REGS 110e7dbfe34SMasami Hiramatsu help 111e7dbfe34SMasami Hiramatsu If function tracer is enabled and the arch supports full 112e7dbfe34SMasami Hiramatsu passing of pt_regs to function tracing, then kprobes can 113e7dbfe34SMasami Hiramatsu optimize on top of function tracing. 114e7dbfe34SMasami Hiramatsu 1152b144498SSrikar Dronamrajuconfig UPROBES 11609294e31SDavid A. Long def_bool n 117e8f4aa60SAllen Pais depends on ARCH_SUPPORTS_UPROBES 1182b144498SSrikar Dronamraju help 1197b2d81d4SIngo Molnar Uprobes is the user-space counterpart to kprobes: they 1207b2d81d4SIngo Molnar enable instrumentation applications (such as 'perf probe') 1217b2d81d4SIngo Molnar to establish unintrusive probes in user-space binaries and 1227b2d81d4SIngo Molnar libraries, by executing handler functions when the probes 1237b2d81d4SIngo Molnar are hit by user-space applications. 1247b2d81d4SIngo Molnar 1257b2d81d4SIngo Molnar ( These probes come in the form of single-byte breakpoints, 1267b2d81d4SIngo Molnar managed by the kernel and kept transparent to the probed 1277b2d81d4SIngo Molnar application. ) 1282b144498SSrikar Dronamraju 129adab66b7SSteven Rostedt (VMware)config HAVE_64BIT_ALIGNED_ACCESS 130adab66b7SSteven Rostedt (VMware) def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS 131adab66b7SSteven Rostedt (VMware) help 132adab66b7SSteven Rostedt (VMware) Some architectures require 64 bit accesses to be 64 bit 133adab66b7SSteven Rostedt (VMware) aligned, which also requires structs containing 64 bit values 134adab66b7SSteven Rostedt (VMware) to be 64 bit aligned too. This includes some 32 bit 135adab66b7SSteven Rostedt (VMware) architectures which can do 64 bit accesses, as well as 64 bit 136adab66b7SSteven Rostedt (VMware) architectures without unaligned access. 137adab66b7SSteven Rostedt (VMware) 138adab66b7SSteven Rostedt (VMware) This symbol should be selected by an architecture if 64 bit 139adab66b7SSteven Rostedt (VMware) accesses are required to be 64 bit aligned in this way even 140adab66b7SSteven Rostedt (VMware) though it is not a 64 bit architecture. 141adab66b7SSteven Rostedt (VMware) 142ba1a297dSLukas Bulwahn See Documentation/core-api/unaligned-memory-access.rst for 143ba1a297dSLukas Bulwahn more information on the topic of unaligned memory accesses. 144adab66b7SSteven Rostedt (VMware) 14558340a07SJohannes Bergconfig HAVE_EFFICIENT_UNALIGNED_ACCESS 1469ba16087SJan Beulich bool 14758340a07SJohannes Berg help 14858340a07SJohannes Berg Some architectures are unable to perform unaligned accesses 14958340a07SJohannes Berg without the use of get_unaligned/put_unaligned. Others are 15058340a07SJohannes Berg unable to perform such accesses efficiently (e.g. trap on 15158340a07SJohannes Berg unaligned access and require fixing it up in the exception 15258340a07SJohannes Berg handler.) 15358340a07SJohannes Berg 15458340a07SJohannes Berg This symbol should be selected by an architecture if it can 15558340a07SJohannes Berg perform unaligned accesses efficiently to allow different 15658340a07SJohannes Berg code paths to be selected for these cases. Some network 15758340a07SJohannes Berg drivers, for example, could opt to not fix up alignment 15858340a07SJohannes Berg problems with received packets if doing so would not help 15958340a07SJohannes Berg much. 16058340a07SJohannes Berg 161c9b54d6fSMauro Carvalho Chehab See Documentation/core-api/unaligned-memory-access.rst for more 16258340a07SJohannes Berg information on the topic of unaligned memory accesses. 16358340a07SJohannes Berg 164cf66bb93SDavid Woodhouseconfig ARCH_USE_BUILTIN_BSWAP 165cf66bb93SDavid Woodhouse bool 166cf66bb93SDavid Woodhouse help 167cf66bb93SDavid Woodhouse Modern versions of GCC (since 4.4) have builtin functions 168cf66bb93SDavid Woodhouse for handling byte-swapping. Using these, instead of the old 169cf66bb93SDavid Woodhouse inline assembler that the architecture code provides in the 170cf66bb93SDavid Woodhouse __arch_bswapXX() macros, allows the compiler to see what's 171cf66bb93SDavid Woodhouse happening and offers more opportunity for optimisation. In 172cf66bb93SDavid Woodhouse particular, the compiler will be able to combine the byteswap 173cf66bb93SDavid Woodhouse with a nearby load or store and use load-and-swap or 174cf66bb93SDavid Woodhouse store-and-swap instructions if the architecture has them. It 175cf66bb93SDavid Woodhouse should almost *never* result in code which is worse than the 176cf66bb93SDavid Woodhouse hand-coded assembler in <asm/swab.h>. But just in case it 177cf66bb93SDavid Woodhouse does, the use of the builtins is optional. 178cf66bb93SDavid Woodhouse 179cf66bb93SDavid Woodhouse Any architecture with load-and-swap or store-and-swap 180cf66bb93SDavid Woodhouse instructions should set this. And it shouldn't hurt to set it 181cf66bb93SDavid Woodhouse on architectures that don't have such instructions. 182cf66bb93SDavid Woodhouse 1839edddaa2SAnanth N Mavinakayanahalliconfig KRETPROBES 1849edddaa2SAnanth N Mavinakayanahalli def_bool y 18573f9b911SMasami Hiramatsu depends on KPROBES && (HAVE_KRETPROBES || HAVE_RETHOOK) 18673f9b911SMasami Hiramatsu 18773f9b911SMasami Hiramatsuconfig KRETPROBE_ON_RETHOOK 18873f9b911SMasami Hiramatsu def_bool y 18973f9b911SMasami Hiramatsu depends on HAVE_RETHOOK 19073f9b911SMasami Hiramatsu depends on KRETPROBES 19173f9b911SMasami Hiramatsu select RETHOOK 1929edddaa2SAnanth N Mavinakayanahalli 1937c68af6eSAvi Kivityconfig USER_RETURN_NOTIFIER 1947c68af6eSAvi Kivity bool 1957c68af6eSAvi Kivity depends on HAVE_USER_RETURN_NOTIFIER 1967c68af6eSAvi Kivity help 1977c68af6eSAvi Kivity Provide a kernel-internal notification when a cpu is about to 1987c68af6eSAvi Kivity switch to user mode. 1997c68af6eSAvi Kivity 20028b2ee20SRik van Rielconfig HAVE_IOREMAP_PROT 2019ba16087SJan Beulich bool 20228b2ee20SRik van Riel 203125e5645SMathieu Desnoyersconfig HAVE_KPROBES 2049ba16087SJan Beulich bool 2059edddaa2SAnanth N Mavinakayanahalli 2069edddaa2SAnanth N Mavinakayanahalliconfig HAVE_KRETPROBES 2079ba16087SJan Beulich bool 20874bc7ceeSArthur Kepner 209afd66255SMasami Hiramatsuconfig HAVE_OPTPROBES 210afd66255SMasami Hiramatsu bool 211d314d74cSCong Wang 212e7dbfe34SMasami Hiramatsuconfig HAVE_KPROBES_ON_FTRACE 213e7dbfe34SMasami Hiramatsu bool 214e7dbfe34SMasami Hiramatsu 2151f6d3a8fSMasami Hiramatsuconfig ARCH_CORRECT_STACKTRACE_ON_KRETPROBE 2161f6d3a8fSMasami Hiramatsu bool 2171f6d3a8fSMasami Hiramatsu help 2181f6d3a8fSMasami Hiramatsu Since kretprobes modifies return address on the stack, the 2191f6d3a8fSMasami Hiramatsu stacktrace may see the kretprobe trampoline address instead 2201f6d3a8fSMasami Hiramatsu of correct one. If the architecture stacktrace code and 2211f6d3a8fSMasami Hiramatsu unwinder can adjust such entries, select this configuration. 2221f6d3a8fSMasami Hiramatsu 223540adea3SMasami Hiramatsuconfig HAVE_FUNCTION_ERROR_INJECTION 2249802d865SJosef Bacik bool 2259802d865SJosef Bacik 22642a0bb3fSPetr Mladekconfig HAVE_NMI 22742a0bb3fSPetr Mladek bool 22842a0bb3fSPetr Mladek 229a257caccSChristophe Leroyconfig HAVE_FUNCTION_DESCRIPTORS 230a257caccSChristophe Leroy bool 231a257caccSChristophe Leroy 2324aae683fSMasahiro Yamadaconfig TRACE_IRQFLAGS_SUPPORT 2334aae683fSMasahiro Yamada bool 2344aae683fSMasahiro Yamada 2354510bffbSMark Rutlandconfig TRACE_IRQFLAGS_NMI_SUPPORT 2364510bffbSMark Rutland bool 2374510bffbSMark Rutland 2381f5a4ad9SRoland McGrath# 2391f5a4ad9SRoland McGrath# An arch should select this if it provides all these things: 2401f5a4ad9SRoland McGrath# 2411f5a4ad9SRoland McGrath# task_pt_regs() in asm/processor.h or asm/ptrace.h 2421f5a4ad9SRoland McGrath# arch_has_single_step() if there is hardware single-step support 2431f5a4ad9SRoland McGrath# arch_has_block_step() if there is hardware block-step support 2441f5a4ad9SRoland McGrath# asm/syscall.h supplying asm-generic/syscall.h interface 2451f5a4ad9SRoland McGrath# linux/regset.h user_regset interfaces 2461f5a4ad9SRoland McGrath# CORE_DUMP_USE_REGSET #define'd in linux/elf.h 247153474baSEric W. Biederman# TIF_SYSCALL_TRACE calls ptrace_report_syscall_{entry,exit} 24803248addSEric W. Biederman# TIF_NOTIFY_RESUME calls resume_user_mode_work() 2491f5a4ad9SRoland McGrath# 2501f5a4ad9SRoland McGrathconfig HAVE_ARCH_TRACEHOOK 2519ba16087SJan Beulich bool 2521f5a4ad9SRoland McGrath 253c64be2bbSMarek Szyprowskiconfig HAVE_DMA_CONTIGUOUS 254c64be2bbSMarek Szyprowski bool 255c64be2bbSMarek Szyprowski 25629d5e047SThomas Gleixnerconfig GENERIC_SMP_IDLE_THREAD 25729d5e047SThomas Gleixner bool 25829d5e047SThomas Gleixner 259485cf5daSKevin Hilmanconfig GENERIC_IDLE_POLL_SETUP 260485cf5daSKevin Hilman bool 261485cf5daSKevin Hilman 2626974f0c4SDaniel Micayconfig ARCH_HAS_FORTIFY_SOURCE 2636974f0c4SDaniel Micay bool 2646974f0c4SDaniel Micay help 2656974f0c4SDaniel Micay An architecture should select this when it can successfully 2666974f0c4SDaniel Micay build and run with CONFIG_FORTIFY_SOURCE. 2676974f0c4SDaniel Micay 268d8ae8a37SChristoph Hellwig# 269d8ae8a37SChristoph Hellwig# Select if the arch provides a historic keepinit alias for the retain_initrd 270d8ae8a37SChristoph Hellwig# command line option 271d8ae8a37SChristoph Hellwig# 272d8ae8a37SChristoph Hellwigconfig ARCH_HAS_KEEPINITRD 273d8ae8a37SChristoph Hellwig bool 274d8ae8a37SChristoph Hellwig 275d2852a22SDaniel Borkmann# Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h 276d2852a22SDaniel Borkmannconfig ARCH_HAS_SET_MEMORY 277d2852a22SDaniel Borkmann bool 278d2852a22SDaniel Borkmann 279d253ca0cSRick Edgecombe# Select if arch has all set_direct_map_invalid/default() functions 280d253ca0cSRick Edgecombeconfig ARCH_HAS_SET_DIRECT_MAP 281d253ca0cSRick Edgecombe bool 282d253ca0cSRick Edgecombe 283c30700dbSChristoph Hellwig# 284fa7e2247SChristoph Hellwig# Select if the architecture provides the arch_dma_set_uncached symbol to 285a86ecfa6SColin Ian King# either provide an uncached segment alias for a DMA allocation, or 286fa7e2247SChristoph Hellwig# to remap the page tables in place. 287c30700dbSChristoph Hellwig# 288fa7e2247SChristoph Hellwigconfig ARCH_HAS_DMA_SET_UNCACHED 289c30700dbSChristoph Hellwig bool 290c30700dbSChristoph Hellwig 291999a5d12SChristoph Hellwig# 292999a5d12SChristoph Hellwig# Select if the architectures provides the arch_dma_clear_uncached symbol 293999a5d12SChristoph Hellwig# to undo an in-place page table remap for uncached access. 294999a5d12SChristoph Hellwig# 295999a5d12SChristoph Hellwigconfig ARCH_HAS_DMA_CLEAR_UNCACHED 296f5e10287SThomas Gleixner bool 297f5e10287SThomas Gleixner 2987725acaaSThomas Gleixnerconfig ARCH_HAS_CPU_FINALIZE_INIT 2997725acaaSThomas Gleixner bool 3007725acaaSThomas Gleixner 301a6359d1eSThomas Gleixner# Select if arch init_task must go in the __init_task_data section 302a6359d1eSThomas Gleixnerconfig ARCH_TASK_STRUCT_ON_STACK 303a4a2eb49SThomas Gleixner bool 304a4a2eb49SThomas Gleixner 305f5e10287SThomas Gleixner# Select if arch has its private alloc_task_struct() function 306f5e10287SThomas Gleixnerconfig ARCH_TASK_STRUCT_ALLOCATOR 307f5e10287SThomas Gleixner bool 308f5e10287SThomas Gleixner 3095905429aSKees Cookconfig HAVE_ARCH_THREAD_STRUCT_WHITELIST 3105905429aSKees Cook bool 3115905429aSKees Cook depends on !ARCH_TASK_STRUCT_ALLOCATOR 3125905429aSKees Cook help 3135905429aSKees Cook An architecture should select this to provide hardened usercopy 3145905429aSKees Cook knowledge about what region of the thread_struct should be 3155905429aSKees Cook whitelisted for copying to userspace. Normally this is only the 3165905429aSKees Cook FPU registers. Specifically, arch_thread_struct_whitelist() 3175905429aSKees Cook should be implemented. Without this, the entire thread_struct 3185905429aSKees Cook field in task_struct will be left whitelisted. 3195905429aSKees Cook 320b235beeaSLinus Torvalds# Select if arch has its private alloc_thread_stack() function 321b235beeaSLinus Torvaldsconfig ARCH_THREAD_STACK_ALLOCATOR 322f5e10287SThomas Gleixner bool 323f5e10287SThomas Gleixner 3245aaeb5c0SIngo Molnar# Select if arch wants to size task_struct dynamically via arch_task_struct_size: 3255aaeb5c0SIngo Molnarconfig ARCH_WANTS_DYNAMIC_TASK_STRUCT 3265aaeb5c0SIngo Molnar bool 3275aaeb5c0SIngo Molnar 32851c2ee6dSNick Desaulniersconfig ARCH_WANTS_NO_INSTR 32951c2ee6dSNick Desaulniers bool 33051c2ee6dSNick Desaulniers help 33151c2ee6dSNick Desaulniers An architecture should select this if the noinstr macro is being used on 33251c2ee6dSNick Desaulniers functions to denote that the toolchain should avoid instrumenting such 33351c2ee6dSNick Desaulniers functions and is required for correctness. 33451c2ee6dSNick Desaulniers 335942fa985SYury Norovconfig ARCH_32BIT_OFF_T 336942fa985SYury Norov bool 337942fa985SYury Norov depends on !64BIT 338942fa985SYury Norov help 339942fa985SYury Norov All new 32-bit architectures should have 64-bit off_t type on 340942fa985SYury Norov userspace side which corresponds to the loff_t kernel type. This 341942fa985SYury Norov is the requirement for modern ABIs. Some existing architectures 342942fa985SYury Norov still support 32-bit off_t. This option is enabled for all such 343942fa985SYury Norov architectures explicitly. 344942fa985SYury Norov 34596c0a6a7SHeiko Carstens# Selected by 64 bit architectures which have a 32 bit f_tinode in struct ustat 34696c0a6a7SHeiko Carstensconfig ARCH_32BIT_USTAT_F_TINODE 34796c0a6a7SHeiko Carstens bool 34896c0a6a7SHeiko Carstens 3492ff2b7ecSMasahiro Yamadaconfig HAVE_ASM_MODVERSIONS 3502ff2b7ecSMasahiro Yamada bool 3512ff2b7ecSMasahiro Yamada help 352a86ecfa6SColin Ian King This symbol should be selected by an architecture if it provides 3532ff2b7ecSMasahiro Yamada <asm/asm-prototypes.h> to support the module versioning for symbols 3542ff2b7ecSMasahiro Yamada exported from assembly code. 3552ff2b7ecSMasahiro Yamada 356f850c30cSHeiko Carstensconfig HAVE_REGS_AND_STACK_ACCESS_API 357f850c30cSHeiko Carstens bool 358e01292b1SHeiko Carstens help 359a86ecfa6SColin Ian King This symbol should be selected by an architecture if it supports 360e01292b1SHeiko Carstens the API needed to access registers and stack entries from pt_regs, 361e01292b1SHeiko Carstens declared in asm/ptrace.h 362e01292b1SHeiko Carstens For example the kprobes-based event tracer needs this API. 363f850c30cSHeiko Carstens 364d7822b1eSMathieu Desnoyersconfig HAVE_RSEQ 365d7822b1eSMathieu Desnoyers bool 366d7822b1eSMathieu Desnoyers depends on HAVE_REGS_AND_STACK_ACCESS_API 367d7822b1eSMathieu Desnoyers help 368d7822b1eSMathieu Desnoyers This symbol should be selected by an architecture if it 369d7822b1eSMathieu Desnoyers supports an implementation of restartable sequences. 370d7822b1eSMathieu Desnoyers 3712f7ab126SMiguel Ojedaconfig HAVE_RUST 3722f7ab126SMiguel Ojeda bool 3732f7ab126SMiguel Ojeda help 3742f7ab126SMiguel Ojeda This symbol should be selected by an architecture if it 3752f7ab126SMiguel Ojeda supports Rust. 3762f7ab126SMiguel Ojeda 3773c88ee19SMasami Hiramatsuconfig HAVE_FUNCTION_ARG_ACCESS_API 3783c88ee19SMasami Hiramatsu bool 3793c88ee19SMasami Hiramatsu help 380a86ecfa6SColin Ian King This symbol should be selected by an architecture if it supports 3813c88ee19SMasami Hiramatsu the API needed to access function arguments from pt_regs, 3823c88ee19SMasami Hiramatsu declared in asm/ptrace.h 3833c88ee19SMasami Hiramatsu 38462a038d3SK.Prasadconfig HAVE_HW_BREAKPOINT 38562a038d3SK.Prasad bool 38699e8c5a3SFrederic Weisbecker depends on PERF_EVENTS 38762a038d3SK.Prasad 3880102752eSFrederic Weisbeckerconfig HAVE_MIXED_BREAKPOINTS_REGS 3890102752eSFrederic Weisbecker bool 3900102752eSFrederic Weisbecker depends on HAVE_HW_BREAKPOINT 3910102752eSFrederic Weisbecker help 3920102752eSFrederic Weisbecker Depending on the arch implementation of hardware breakpoints, 3930102752eSFrederic Weisbecker some of them have separate registers for data and instruction 3940102752eSFrederic Weisbecker breakpoints addresses, others have mixed registers to store 3950102752eSFrederic Weisbecker them but define the access type in a control register. 3960102752eSFrederic Weisbecker Select this option if your arch implements breakpoints under the 3970102752eSFrederic Weisbecker latter fashion. 3980102752eSFrederic Weisbecker 3997c68af6eSAvi Kivityconfig HAVE_USER_RETURN_NOTIFIER 4007c68af6eSAvi Kivity bool 401a1922ed6SIngo Molnar 402c01d4323SFrederic Weisbeckerconfig HAVE_PERF_EVENTS_NMI 403c01d4323SFrederic Weisbecker bool 40423637d47SFrederic Weisbecker help 40523637d47SFrederic Weisbecker System hardware can generate an NMI using the perf event 40623637d47SFrederic Weisbecker subsystem. Also has support for calculating CPU cycle events 40723637d47SFrederic Weisbecker to determine how many clock cycles in a given period. 408c01d4323SFrederic Weisbecker 40905a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_PERF 41005a4a952SNicholas Piggin bool 41105a4a952SNicholas Piggin depends on HAVE_PERF_EVENTS_NMI 41205a4a952SNicholas Piggin help 41305a4a952SNicholas Piggin The arch chooses to use the generic perf-NMI-based hardlockup 41405a4a952SNicholas Piggin detector. Must define HAVE_PERF_EVENTS_NMI. 41505a4a952SNicholas Piggin 41605a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_ARCH 41705a4a952SNicholas Piggin bool 41805a4a952SNicholas Piggin help 4191356d0b9SPetr Mladek The arch provides its own hardlockup detector implementation instead 4201356d0b9SPetr Mladek of the generic ones. 4211356d0b9SPetr Mladek 4221356d0b9SPetr Mladek It uses the same command line parameters, and sysctl interface, 4231356d0b9SPetr Mladek as the generic hardlockup detectors. 42405a4a952SNicholas Piggin 425c5e63197SJiri Olsaconfig HAVE_PERF_REGS 426c5e63197SJiri Olsa bool 427c5e63197SJiri Olsa help 428c5e63197SJiri Olsa Support selective register dumps for perf events. This includes 429c5e63197SJiri Olsa bit-mapping of each registers and a unique architecture id. 430c5e63197SJiri Olsa 431c5ebcedbSJiri Olsaconfig HAVE_PERF_USER_STACK_DUMP 432c5ebcedbSJiri Olsa bool 433c5ebcedbSJiri Olsa help 434c5ebcedbSJiri Olsa Support user stack dumps for perf event samples. This needs 435c5ebcedbSJiri Olsa access to the user stack pointer which is not unified across 436c5ebcedbSJiri Olsa architectures. 437c5ebcedbSJiri Olsa 438bf5438fcSJason Baronconfig HAVE_ARCH_JUMP_LABEL 439bf5438fcSJason Baron bool 440bf5438fcSJason Baron 44150ff18abSArd Biesheuvelconfig HAVE_ARCH_JUMP_LABEL_RELATIVE 44250ff18abSArd Biesheuvel bool 44350ff18abSArd Biesheuvel 4440d6e24d4SPeter Zijlstraconfig MMU_GATHER_TABLE_FREE 4450d6e24d4SPeter Zijlstra bool 4460d6e24d4SPeter Zijlstra 447ff2e6d72SPeter Zijlstraconfig MMU_GATHER_RCU_TABLE_FREE 44826723911SPeter Zijlstra bool 4490d6e24d4SPeter Zijlstra select MMU_GATHER_TABLE_FREE 45026723911SPeter Zijlstra 4513af4bd03SPeter Zijlstraconfig MMU_GATHER_PAGE_SIZE 452ed6a7935SPeter Zijlstra bool 453ed6a7935SPeter Zijlstra 45427796d03SPeter Zijlstraconfig MMU_GATHER_NO_RANGE 45527796d03SPeter Zijlstra bool 4561e9fdf21SPeter Zijlstra select MMU_GATHER_MERGE_VMAS 4571e9fdf21SPeter Zijlstra 4581e9fdf21SPeter Zijlstraconfig MMU_GATHER_NO_FLUSH_CACHE 4591e9fdf21SPeter Zijlstra bool 4601e9fdf21SPeter Zijlstra 4611e9fdf21SPeter Zijlstraconfig MMU_GATHER_MERGE_VMAS 4621e9fdf21SPeter Zijlstra bool 46327796d03SPeter Zijlstra 464580a586cSPeter Zijlstraconfig MMU_GATHER_NO_GATHER 465952a31c9SMartin Schwidefsky bool 4660d6e24d4SPeter Zijlstra depends on MMU_GATHER_TABLE_FREE 467952a31c9SMartin Schwidefsky 468d53c3dfbSNicholas Pigginconfig ARCH_WANT_IRQS_OFF_ACTIVATE_MM 469d53c3dfbSNicholas Piggin bool 470d53c3dfbSNicholas Piggin help 471d53c3dfbSNicholas Piggin Temporary select until all architectures can be converted to have 472d53c3dfbSNicholas Piggin irqs disabled over activate_mm. Architectures that do IPI based TLB 473d53c3dfbSNicholas Piggin shootdowns should enable this. 474d53c3dfbSNicholas Piggin 47588e3009bSNicholas Piggin# Use normal mm refcounting for MMU_LAZY_TLB kernel thread references. 47688e3009bSNicholas Piggin# MMU_LAZY_TLB_REFCOUNT=n can improve the scalability of context switching 47788e3009bSNicholas Piggin# to/from kernel threads when the same mm is running on a lot of CPUs (a large 47888e3009bSNicholas Piggin# multi-threaded application), by reducing contention on the mm refcount. 47988e3009bSNicholas Piggin# 48088e3009bSNicholas Piggin# This can be disabled if the architecture ensures no CPUs are using an mm as a 48188e3009bSNicholas Piggin# "lazy tlb" beyond its final refcount (i.e., by the time __mmdrop frees the mm 48288e3009bSNicholas Piggin# or its kernel page tables). This could be arranged by arch_exit_mmap(), or 48388e3009bSNicholas Piggin# final exit(2) TLB flush, for example. 48488e3009bSNicholas Piggin# 48588e3009bSNicholas Piggin# To implement this, an arch *must*: 48688e3009bSNicholas Piggin# Ensure the _lazy_tlb variants of mmgrab/mmdrop are used when manipulating 48788e3009bSNicholas Piggin# the lazy tlb reference of a kthread's ->active_mm (non-arch code has been 48888e3009bSNicholas Piggin# converted already). 48988e3009bSNicholas Pigginconfig MMU_LAZY_TLB_REFCOUNT 49088e3009bSNicholas Piggin def_bool y 4912655421aSNicholas Piggin depends on !MMU_LAZY_TLB_SHOOTDOWN 4922655421aSNicholas Piggin 4932655421aSNicholas Piggin# This option allows MMU_LAZY_TLB_REFCOUNT=n. It ensures no CPUs are using an 4942655421aSNicholas Piggin# mm as a lazy tlb beyond its last reference count, by shooting down these 4952655421aSNicholas Piggin# users before the mm is deallocated. __mmdrop() first IPIs all CPUs that may 4962655421aSNicholas Piggin# be using the mm as a lazy tlb, so that they may switch themselves to using 4972655421aSNicholas Piggin# init_mm for their active mm. mm_cpumask(mm) is used to determine which CPUs 4982655421aSNicholas Piggin# may be using mm as a lazy tlb mm. 4992655421aSNicholas Piggin# 5002655421aSNicholas Piggin# To implement this, an arch *must*: 5012655421aSNicholas Piggin# - At the time of the final mmdrop of the mm, ensure mm_cpumask(mm) contains 5022655421aSNicholas Piggin# at least all possible CPUs in which the mm is lazy. 5032655421aSNicholas Piggin# - It must meet the requirements for MMU_LAZY_TLB_REFCOUNT=n (see above). 5042655421aSNicholas Pigginconfig MMU_LAZY_TLB_SHOOTDOWN 5052655421aSNicholas Piggin bool 50688e3009bSNicholas Piggin 507df013ffbSHuang Yingconfig ARCH_HAVE_NMI_SAFE_CMPXCHG 508df013ffbSHuang Ying bool 509df013ffbSHuang Ying 5102e83b879SPaul E. McKenneyconfig ARCH_HAS_NMI_SAFE_THIS_CPU_OPS 5112e83b879SPaul E. McKenney bool 5122e83b879SPaul E. McKenney 51343570fd2SHeiko Carstensconfig HAVE_ALIGNED_STRUCT_PAGE 51443570fd2SHeiko Carstens bool 51543570fd2SHeiko Carstens help 51643570fd2SHeiko Carstens This makes sure that struct pages are double word aligned and that 51743570fd2SHeiko Carstens e.g. the SLUB allocator can perform double word atomic operations 51843570fd2SHeiko Carstens on a struct page for better performance. However selecting this 51943570fd2SHeiko Carstens might increase the size of a struct page by a word. 52043570fd2SHeiko Carstens 5214156153cSHeiko Carstensconfig HAVE_CMPXCHG_LOCAL 5224156153cSHeiko Carstens bool 5234156153cSHeiko Carstens 5242565409fSHeiko Carstensconfig HAVE_CMPXCHG_DOUBLE 5252565409fSHeiko Carstens bool 5262565409fSHeiko Carstens 52777e58496SPaul E. McKenneyconfig ARCH_WEAK_RELEASE_ACQUIRE 52877e58496SPaul E. McKenney bool 52977e58496SPaul E. McKenney 530c1d7e01dSWill Deaconconfig ARCH_WANT_IPC_PARSE_VERSION 531c1d7e01dSWill Deacon bool 532c1d7e01dSWill Deacon 533c1d7e01dSWill Deaconconfig ARCH_WANT_COMPAT_IPC_PARSE_VERSION 534c1d7e01dSWill Deacon bool 535c1d7e01dSWill Deacon 53648b25c43SChris Metcalfconfig ARCH_WANT_OLD_COMPAT_IPC 537c1d7e01dSWill Deacon select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 53848b25c43SChris Metcalf bool 53948b25c43SChris Metcalf 540282a181bSYiFei Zhuconfig HAVE_ARCH_SECCOMP 541e2cfabdfSWill Drewry bool 542e2cfabdfSWill Drewry help 543282a181bSYiFei Zhu An arch should select this symbol to support seccomp mode 1 (the fixed 544282a181bSYiFei Zhu syscall policy), and must provide an overrides for __NR_seccomp_sigreturn, 545282a181bSYiFei Zhu and compat syscalls if the asm-generic/seccomp.h defaults need adjustment: 546282a181bSYiFei Zhu - __NR_seccomp_read_32 547282a181bSYiFei Zhu - __NR_seccomp_write_32 548282a181bSYiFei Zhu - __NR_seccomp_exit_32 549282a181bSYiFei Zhu - __NR_seccomp_sigreturn_32 550282a181bSYiFei Zhu 551282a181bSYiFei Zhuconfig HAVE_ARCH_SECCOMP_FILTER 552282a181bSYiFei Zhu bool 553282a181bSYiFei Zhu select HAVE_ARCH_SECCOMP 554282a181bSYiFei Zhu help 555fb0fadf9SWill Drewry An arch should select this symbol if it provides all of these things: 556282a181bSYiFei Zhu - all the requirements for HAVE_ARCH_SECCOMP 557bb6ea430SWill Drewry - syscall_get_arch() 558bb6ea430SWill Drewry - syscall_get_arguments() 559bb6ea430SWill Drewry - syscall_rollback() 560bb6ea430SWill Drewry - syscall_set_return_value() 561fb0fadf9SWill Drewry - SIGSYS siginfo_t support 562fb0fadf9SWill Drewry - secure_computing is called from a ptrace_event()-safe context 563fb0fadf9SWill Drewry - secure_computing return value is checked and a return value of -1 564fb0fadf9SWill Drewry results in the system call being skipped immediately. 56548dc92b9SKees Cook - seccomp syscall wired up 5660d8315ddSYiFei Zhu - if !HAVE_SPARSE_SYSCALL_NR, have SECCOMP_ARCH_NATIVE, 5670d8315ddSYiFei Zhu SECCOMP_ARCH_NATIVE_NR, SECCOMP_ARCH_NATIVE_NAME defined. If 5680d8315ddSYiFei Zhu COMPAT is supported, have the SECCOMP_ARCH_COMPAT* defines too. 569e2cfabdfSWill Drewry 570282a181bSYiFei Zhuconfig SECCOMP 571282a181bSYiFei Zhu prompt "Enable seccomp to safely execute untrusted bytecode" 572282a181bSYiFei Zhu def_bool y 573282a181bSYiFei Zhu depends on HAVE_ARCH_SECCOMP 574282a181bSYiFei Zhu help 575282a181bSYiFei Zhu This kernel feature is useful for number crunching applications 576282a181bSYiFei Zhu that may need to handle untrusted bytecode during their 577282a181bSYiFei Zhu execution. By using pipes or other transports made available 578282a181bSYiFei Zhu to the process as file descriptors supporting the read/write 579282a181bSYiFei Zhu syscalls, it's possible to isolate those applications in their 580282a181bSYiFei Zhu own address space using seccomp. Once seccomp is enabled via 581282a181bSYiFei Zhu prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be 582282a181bSYiFei Zhu disabled and the task is only allowed to execute a few safe 583282a181bSYiFei Zhu syscalls defined by each seccomp mode. 584282a181bSYiFei Zhu 585282a181bSYiFei Zhu If unsure, say Y. 586282a181bSYiFei Zhu 587e2cfabdfSWill Drewryconfig SECCOMP_FILTER 588e2cfabdfSWill Drewry def_bool y 589e2cfabdfSWill Drewry depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET 590e2cfabdfSWill Drewry help 591e2cfabdfSWill Drewry Enable tasks to build secure computing environments defined 592e2cfabdfSWill Drewry in terms of Berkeley Packet Filter programs which implement 593e2cfabdfSWill Drewry task-defined system call filtering polices. 594e2cfabdfSWill Drewry 5955fb94e9cSMauro Carvalho Chehab See Documentation/userspace-api/seccomp_filter.rst for details. 596e2cfabdfSWill Drewry 5970d8315ddSYiFei Zhuconfig SECCOMP_CACHE_DEBUG 5980d8315ddSYiFei Zhu bool "Show seccomp filter cache status in /proc/pid/seccomp_cache" 5990d8315ddSYiFei Zhu depends on SECCOMP_FILTER && !HAVE_SPARSE_SYSCALL_NR 6000d8315ddSYiFei Zhu depends on PROC_FS 6010d8315ddSYiFei Zhu help 6020d8315ddSYiFei Zhu This enables the /proc/pid/seccomp_cache interface to monitor 6030d8315ddSYiFei Zhu seccomp cache data. The file format is subject to change. Reading 6040d8315ddSYiFei Zhu the file requires CAP_SYS_ADMIN. 6050d8315ddSYiFei Zhu 6060d8315ddSYiFei Zhu This option is for debugging only. Enabling presents the risk that 6070d8315ddSYiFei Zhu an adversary may be able to infer the seccomp filter logic. 6080d8315ddSYiFei Zhu 6090d8315ddSYiFei Zhu If unsure, say N. 6100d8315ddSYiFei Zhu 611afaef01cSAlexander Popovconfig HAVE_ARCH_STACKLEAK 612afaef01cSAlexander Popov bool 613afaef01cSAlexander Popov help 614afaef01cSAlexander Popov An architecture should select this if it has the code which 615afaef01cSAlexander Popov fills the used part of the kernel stack with the STACKLEAK_POISON 616afaef01cSAlexander Popov value before returning from system calls. 617afaef01cSAlexander Popov 618d148eac0SMasahiro Yamadaconfig HAVE_STACKPROTECTOR 61919952a92SKees Cook bool 62019952a92SKees Cook help 62119952a92SKees Cook An arch should select this symbol if: 62219952a92SKees Cook - it has implemented a stack canary (e.g. __stack_chk_guard) 62319952a92SKees Cook 624050e9baaSLinus Torvaldsconfig STACKPROTECTOR 6252a61f474SMasahiro Yamada bool "Stack Protector buffer overflow detection" 626d148eac0SMasahiro Yamada depends on HAVE_STACKPROTECTOR 6272a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector) 6282a61f474SMasahiro Yamada default y 6298779657dSKees Cook help 6308779657dSKees Cook This option turns on the "stack-protector" GCC feature. This 63119952a92SKees Cook feature puts, at the beginning of functions, a canary value on 63219952a92SKees Cook the stack just before the return address, and validates 63319952a92SKees Cook the value just before actually returning. Stack based buffer 63419952a92SKees Cook overflows (that need to overwrite this return address) now also 63519952a92SKees Cook overwrite the canary, which gets detected and the attack is then 63619952a92SKees Cook neutralized via a kernel panic. 63719952a92SKees Cook 6388779657dSKees Cook Functions will have the stack-protector canary logic added if they 6398779657dSKees Cook have an 8-byte or larger character array on the stack. 6408779657dSKees Cook 64119952a92SKees Cook This feature requires gcc version 4.2 or above, or a distribution 6428779657dSKees Cook gcc with the feature backported ("-fstack-protector"). 6438779657dSKees Cook 6448779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 6458779657dSKees Cook about 3% of all kernel functions, which increases kernel code size 6468779657dSKees Cook by about 0.3%. 6478779657dSKees Cook 648050e9baaSLinus Torvaldsconfig STACKPROTECTOR_STRONG 6492a61f474SMasahiro Yamada bool "Strong Stack Protector" 650050e9baaSLinus Torvalds depends on STACKPROTECTOR 6512a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector-strong) 6522a61f474SMasahiro Yamada default y 6538779657dSKees Cook help 6548779657dSKees Cook Functions will have the stack-protector canary logic added in any 6558779657dSKees Cook of the following conditions: 6568779657dSKees Cook 6578779657dSKees Cook - local variable's address used as part of the right hand side of an 6588779657dSKees Cook assignment or function argument 6598779657dSKees Cook - local variable is an array (or union containing an array), 6608779657dSKees Cook regardless of array type or length 6618779657dSKees Cook - uses register local variables 6628779657dSKees Cook 6638779657dSKees Cook This feature requires gcc version 4.9 or above, or a distribution 6648779657dSKees Cook gcc with the feature backported ("-fstack-protector-strong"). 6658779657dSKees Cook 6668779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 6678779657dSKees Cook about 20% of all kernel functions, which increases the kernel code 6688779657dSKees Cook size by about 2%. 6698779657dSKees Cook 670d08b9f0cSSami Tolvanenconfig ARCH_SUPPORTS_SHADOW_CALL_STACK 671d08b9f0cSSami Tolvanen bool 672d08b9f0cSSami Tolvanen help 673afcf5441SDan Li An architecture should select this if it supports the compiler's 674afcf5441SDan Li Shadow Call Stack and implements runtime support for shadow stack 675aa7a65aeSWill Deacon switching. 676d08b9f0cSSami Tolvanen 677d08b9f0cSSami Tolvanenconfig SHADOW_CALL_STACK 678afcf5441SDan Li bool "Shadow Call Stack" 679afcf5441SDan Li depends on ARCH_SUPPORTS_SHADOW_CALL_STACK 68038792972SArd Biesheuvel depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER 681d08b9f0cSSami Tolvanen help 682afcf5441SDan Li This option enables the compiler's Shadow Call Stack, which 683afcf5441SDan Li uses a shadow stack to protect function return addresses from 684afcf5441SDan Li being overwritten by an attacker. More information can be found 685afcf5441SDan Li in the compiler's documentation: 686d08b9f0cSSami Tolvanen 687afcf5441SDan Li - Clang: https://clang.llvm.org/docs/ShadowCallStack.html 688afcf5441SDan Li - GCC: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#Instrumentation-Options 689d08b9f0cSSami Tolvanen 690d08b9f0cSSami Tolvanen Note that security guarantees in the kernel differ from the 691d08b9f0cSSami Tolvanen ones documented for user space. The kernel must store addresses 692d08b9f0cSSami Tolvanen of shadow stacks in memory, which means an attacker capable of 693d08b9f0cSSami Tolvanen reading and writing arbitrary memory may be able to locate them 694d08b9f0cSSami Tolvanen and hijack control flow by modifying the stacks. 695d08b9f0cSSami Tolvanen 6969beccca0SArd Biesheuvelconfig DYNAMIC_SCS 6979beccca0SArd Biesheuvel bool 6989beccca0SArd Biesheuvel help 6999beccca0SArd Biesheuvel Set by the arch code if it relies on code patching to insert the 7009beccca0SArd Biesheuvel shadow call stack push and pop instructions rather than on the 7019beccca0SArd Biesheuvel compiler. 7029beccca0SArd Biesheuvel 703dc5723b0SSami Tolvanenconfig LTO 704dc5723b0SSami Tolvanen bool 705dc5723b0SSami Tolvanen help 706dc5723b0SSami Tolvanen Selected if the kernel will be built using the compiler's LTO feature. 707dc5723b0SSami Tolvanen 708dc5723b0SSami Tolvanenconfig LTO_CLANG 709dc5723b0SSami Tolvanen bool 710dc5723b0SSami Tolvanen select LTO 711dc5723b0SSami Tolvanen help 712dc5723b0SSami Tolvanen Selected if the kernel will be built using Clang's LTO feature. 713dc5723b0SSami Tolvanen 714dc5723b0SSami Tolvanenconfig ARCH_SUPPORTS_LTO_CLANG 715dc5723b0SSami Tolvanen bool 716dc5723b0SSami Tolvanen help 717dc5723b0SSami Tolvanen An architecture should select this option if it supports: 718dc5723b0SSami Tolvanen - compiling with Clang, 719dc5723b0SSami Tolvanen - compiling inline assembly with Clang's integrated assembler, 720dc5723b0SSami Tolvanen - and linking with LLD. 721dc5723b0SSami Tolvanen 722dc5723b0SSami Tolvanenconfig ARCH_SUPPORTS_LTO_CLANG_THIN 723dc5723b0SSami Tolvanen bool 724dc5723b0SSami Tolvanen help 725dc5723b0SSami Tolvanen An architecture should select this option if it can support Clang's 726dc5723b0SSami Tolvanen ThinLTO mode. 727dc5723b0SSami Tolvanen 728dc5723b0SSami Tolvanenconfig HAS_LTO_CLANG 729dc5723b0SSami Tolvanen def_bool y 7301e68a8afSNathan Chancellor depends on CC_IS_CLANG && LD_IS_LLD && AS_IS_LLVM 731dc5723b0SSami Tolvanen depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) 732dc5723b0SSami Tolvanen depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) 733dc5723b0SSami Tolvanen depends on ARCH_SUPPORTS_LTO_CLANG 734dc5723b0SSami Tolvanen depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT 735*349fde59SJakob Koschel # https://github.com/ClangBuiltLinux/linux/issues/1721 736*349fde59SJakob Koschel depends on (!KASAN || KASAN_HW_TAGS || CLANG_VERSION >= 170000) || !DEBUG_INFO 737*349fde59SJakob Koschel depends on (!KCOV || CLANG_VERSION >= 170000) || !DEBUG_INFO 738dc5723b0SSami Tolvanen depends on !GCOV_KERNEL 739dc5723b0SSami Tolvanen help 740dc5723b0SSami Tolvanen The compiler and Kconfig options support building with Clang's 741dc5723b0SSami Tolvanen LTO. 742dc5723b0SSami Tolvanen 743dc5723b0SSami Tolvanenchoice 744dc5723b0SSami Tolvanen prompt "Link Time Optimization (LTO)" 745dc5723b0SSami Tolvanen default LTO_NONE 746dc5723b0SSami Tolvanen help 747dc5723b0SSami Tolvanen This option enables Link Time Optimization (LTO), which allows the 748dc5723b0SSami Tolvanen compiler to optimize binaries globally. 749dc5723b0SSami Tolvanen 750dc5723b0SSami Tolvanen If unsure, select LTO_NONE. Note that LTO is very resource-intensive 751dc5723b0SSami Tolvanen so it's disabled by default. 752dc5723b0SSami Tolvanen 753dc5723b0SSami Tolvanenconfig LTO_NONE 754dc5723b0SSami Tolvanen bool "None" 755dc5723b0SSami Tolvanen help 756dc5723b0SSami Tolvanen Build the kernel normally, without Link Time Optimization (LTO). 757dc5723b0SSami Tolvanen 758dc5723b0SSami Tolvanenconfig LTO_CLANG_FULL 759dc5723b0SSami Tolvanen bool "Clang Full LTO (EXPERIMENTAL)" 760dc5723b0SSami Tolvanen depends on HAS_LTO_CLANG 761dc5723b0SSami Tolvanen depends on !COMPILE_TEST 762dc5723b0SSami Tolvanen select LTO_CLANG 763dc5723b0SSami Tolvanen help 764dc5723b0SSami Tolvanen This option enables Clang's full Link Time Optimization (LTO), which 765dc5723b0SSami Tolvanen allows the compiler to optimize the kernel globally. If you enable 766dc5723b0SSami Tolvanen this option, the compiler generates LLVM bitcode instead of ELF 767dc5723b0SSami Tolvanen object files, and the actual compilation from bitcode happens at 768dc5723b0SSami Tolvanen the LTO link step, which may take several minutes depending on the 769dc5723b0SSami Tolvanen kernel configuration. More information can be found from LLVM's 770dc5723b0SSami Tolvanen documentation: 771dc5723b0SSami Tolvanen 772dc5723b0SSami Tolvanen https://llvm.org/docs/LinkTimeOptimization.html 773dc5723b0SSami Tolvanen 774dc5723b0SSami Tolvanen During link time, this option can use a large amount of RAM, and 775dc5723b0SSami Tolvanen may take much longer than the ThinLTO option. 776dc5723b0SSami Tolvanen 777dc5723b0SSami Tolvanenconfig LTO_CLANG_THIN 778dc5723b0SSami Tolvanen bool "Clang ThinLTO (EXPERIMENTAL)" 779dc5723b0SSami Tolvanen depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN 780dc5723b0SSami Tolvanen select LTO_CLANG 781dc5723b0SSami Tolvanen help 782dc5723b0SSami Tolvanen This option enables Clang's ThinLTO, which allows for parallel 783dc5723b0SSami Tolvanen optimization and faster incremental compiles compared to the 784dc5723b0SSami Tolvanen CONFIG_LTO_CLANG_FULL option. More information can be found 785dc5723b0SSami Tolvanen from Clang's documentation: 786dc5723b0SSami Tolvanen 787dc5723b0SSami Tolvanen https://clang.llvm.org/docs/ThinLTO.html 788dc5723b0SSami Tolvanen 789dc5723b0SSami Tolvanen If unsure, say Y. 790dc5723b0SSami Tolvanenendchoice 791dc5723b0SSami Tolvanen 792cf68fffbSSami Tolvanenconfig ARCH_SUPPORTS_CFI_CLANG 793cf68fffbSSami Tolvanen bool 794cf68fffbSSami Tolvanen help 795cf68fffbSSami Tolvanen An architecture should select this option if it can support Clang's 796cf68fffbSSami Tolvanen Control-Flow Integrity (CFI) checking. 797cf68fffbSSami Tolvanen 79889245600SSami Tolvanenconfig ARCH_USES_CFI_TRAPS 79989245600SSami Tolvanen bool 80089245600SSami Tolvanen 801cf68fffbSSami Tolvanenconfig CFI_CLANG 802cf68fffbSSami Tolvanen bool "Use Clang's Control Flow Integrity (CFI)" 80389245600SSami Tolvanen depends on ARCH_SUPPORTS_CFI_CLANG 80489245600SSami Tolvanen depends on $(cc-option,-fsanitize=kcfi) 805cf68fffbSSami Tolvanen help 806cf68fffbSSami Tolvanen This option enables Clang’s forward-edge Control Flow Integrity 807cf68fffbSSami Tolvanen (CFI) checking, where the compiler injects a runtime check to each 808cf68fffbSSami Tolvanen indirect function call to ensure the target is a valid function with 809cf68fffbSSami Tolvanen the correct static type. This restricts possible call targets and 810cf68fffbSSami Tolvanen makes it more difficult for an attacker to exploit bugs that allow 811cf68fffbSSami Tolvanen the modification of stored function pointers. More information can be 812cf68fffbSSami Tolvanen found from Clang's documentation: 813cf68fffbSSami Tolvanen 814cf68fffbSSami Tolvanen https://clang.llvm.org/docs/ControlFlowIntegrity.html 815cf68fffbSSami Tolvanen 816cf68fffbSSami Tolvanenconfig CFI_PERMISSIVE 817cf68fffbSSami Tolvanen bool "Use CFI in permissive mode" 818cf68fffbSSami Tolvanen depends on CFI_CLANG 819cf68fffbSSami Tolvanen help 820cf68fffbSSami Tolvanen When selected, Control Flow Integrity (CFI) violations result in a 821cf68fffbSSami Tolvanen warning instead of a kernel panic. This option should only be used 822cf68fffbSSami Tolvanen for finding indirect call type mismatches during development. 823cf68fffbSSami Tolvanen 824cf68fffbSSami Tolvanen If unsure, say N. 825cf68fffbSSami Tolvanen 8260f60a8efSKees Cookconfig HAVE_ARCH_WITHIN_STACK_FRAMES 8270f60a8efSKees Cook bool 8280f60a8efSKees Cook help 8290f60a8efSKees Cook An architecture should select this if it can walk the kernel stack 8300f60a8efSKees Cook frames to determine if an object is part of either the arguments 8310f60a8efSKees Cook or local variables (i.e. that it excludes saved return addresses, 8320f60a8efSKees Cook and similar) by implementing an inline arch_within_stack_frames(), 8330f60a8efSKees Cook which is used by CONFIG_HARDENED_USERCOPY. 8340f60a8efSKees Cook 83524a9c541SFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING_USER 8362b1d5024SFrederic Weisbecker bool 8372b1d5024SFrederic Weisbecker help 83891d1aa43SFrederic Weisbecker Provide kernel/user boundaries probes necessary for subsystems 83991d1aa43SFrederic Weisbecker that need it, such as userspace RCU extended quiescent state. 840490f561bSFrederic Weisbecker Syscalls need to be wrapped inside user_exit()-user_enter(), either 841490f561bSFrederic Weisbecker optimized behind static key or through the slow path using TIF_NOHZ 842490f561bSFrederic Weisbecker flag. Exceptions handlers must be wrapped as well. Irqs are already 8436f0e6c15SFrederic Weisbecker protected inside ct_irq_enter/ct_irq_exit() but preemption or signal 844490f561bSFrederic Weisbecker handling on irq exit still need to be protected. 845490f561bSFrederic Weisbecker 84624a9c541SFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING_USER_OFFSTACK 84783c2da2eSFrederic Weisbecker bool 84883c2da2eSFrederic Weisbecker help 84983c2da2eSFrederic Weisbecker Architecture neither relies on exception_enter()/exception_exit() 85083c2da2eSFrederic Weisbecker nor on schedule_user(). Also preempt_schedule_notrace() and 85183c2da2eSFrederic Weisbecker preempt_schedule_irq() can't be called in a preemptible section 85283c2da2eSFrederic Weisbecker while context tracking is CONTEXT_USER. This feature reflects a sane 85383c2da2eSFrederic Weisbecker entry implementation where the following requirements are met on 85483c2da2eSFrederic Weisbecker critical entry code, ie: before user_exit() or after user_enter(): 85583c2da2eSFrederic Weisbecker 85683c2da2eSFrederic Weisbecker - Critical entry code isn't preemptible (or better yet: 85783c2da2eSFrederic Weisbecker not interruptible). 858493c1822SFrederic Weisbecker - No use of RCU read side critical sections, unless ct_nmi_enter() 85983c2da2eSFrederic Weisbecker got called. 86083c2da2eSFrederic Weisbecker - No use of instrumentation, unless instrumentation_begin() got 86183c2da2eSFrederic Weisbecker called. 86283c2da2eSFrederic Weisbecker 863490f561bSFrederic Weisbeckerconfig HAVE_TIF_NOHZ 864490f561bSFrederic Weisbecker bool 865490f561bSFrederic Weisbecker help 866490f561bSFrederic Weisbecker Arch relies on TIF_NOHZ and syscall slow path to implement context 867490f561bSFrederic Weisbecker tracking calls to user_enter()/user_exit(). 8682b1d5024SFrederic Weisbecker 869b952741cSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING 870b952741cSFrederic Weisbecker bool 871b952741cSFrederic Weisbecker 8722b91ec9fSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING_IDLE 8732b91ec9fSFrederic Weisbecker bool 8742b91ec9fSFrederic Weisbecker help 8752b91ec9fSFrederic Weisbecker Architecture has its own way to account idle CPU time and therefore 8762b91ec9fSFrederic Weisbecker doesn't implement vtime_account_idle(). 8772b91ec9fSFrederic Weisbecker 87840565b5aSStanislaw Gruszkaconfig ARCH_HAS_SCALED_CPUTIME 87940565b5aSStanislaw Gruszka bool 88040565b5aSStanislaw Gruszka 881554b0004SKevin Hilmanconfig HAVE_VIRT_CPU_ACCOUNTING_GEN 882554b0004SKevin Hilman bool 883554b0004SKevin Hilman default y if 64BIT 884554b0004SKevin Hilman help 885554b0004SKevin Hilman With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. 886554b0004SKevin Hilman Before enabling this option, arch code must be audited 887554b0004SKevin Hilman to ensure there are no races in concurrent read/write of 888554b0004SKevin Hilman cputime_t. For example, reading/writing 64-bit cputime_t on 889554b0004SKevin Hilman some 32-bit arches may require multiple accesses, so proper 890554b0004SKevin Hilman locking is needed to protect against concurrent accesses. 891554b0004SKevin Hilman 892fdf9c356SFrederic Weisbeckerconfig HAVE_IRQ_TIME_ACCOUNTING 893fdf9c356SFrederic Weisbecker bool 894fdf9c356SFrederic Weisbecker help 895fdf9c356SFrederic Weisbecker Archs need to ensure they use a high enough resolution clock to 896fdf9c356SFrederic Weisbecker support irq time accounting and then call enable_sched_clock_irqtime(). 897fdf9c356SFrederic Weisbecker 898c49dd340SKalesh Singhconfig HAVE_MOVE_PUD 899c49dd340SKalesh Singh bool 900c49dd340SKalesh Singh help 901c49dd340SKalesh Singh Architectures that select this are able to move page tables at the 902c49dd340SKalesh Singh PUD level. If there are only 3 page table levels, the move effectively 903c49dd340SKalesh Singh happens at the PGD level. 904c49dd340SKalesh Singh 9052c91bd4aSJoel Fernandes (Google)config HAVE_MOVE_PMD 9062c91bd4aSJoel Fernandes (Google) bool 9072c91bd4aSJoel Fernandes (Google) help 9082c91bd4aSJoel Fernandes (Google) Archs that select this are able to move page tables at the PMD level. 9092c91bd4aSJoel Fernandes (Google) 91015626062SGerald Schaeferconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE 91115626062SGerald Schaefer bool 91215626062SGerald Schaefer 913a00cc7d9SMatthew Wilcoxconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 914a00cc7d9SMatthew Wilcox bool 915a00cc7d9SMatthew Wilcox 9160ddab1d2SToshi Kaniconfig HAVE_ARCH_HUGE_VMAP 9170ddab1d2SToshi Kani bool 9180ddab1d2SToshi Kani 919121e6f32SNicholas Piggin# 920121e6f32SNicholas Piggin# Archs that select this would be capable of PMD-sized vmaps (i.e., 921559089e0SSong Liu# arch_vmap_pmd_supported() returns true). The VM_ALLOW_HUGE_VMAP flag 922559089e0SSong Liu# must be used to enable allocations to use hugepages. 923121e6f32SNicholas Piggin# 924121e6f32SNicholas Pigginconfig HAVE_ARCH_HUGE_VMALLOC 925121e6f32SNicholas Piggin depends on HAVE_ARCH_HUGE_VMAP 926121e6f32SNicholas Piggin bool 927121e6f32SNicholas Piggin 9283876d4a3SAlexandre Ghiticonfig ARCH_WANT_HUGE_PMD_SHARE 9293876d4a3SAlexandre Ghiti bool 9303876d4a3SAlexandre Ghiti 9310f8975ecSPavel Emelyanovconfig HAVE_ARCH_SOFT_DIRTY 9320f8975ecSPavel Emelyanov bool 9330f8975ecSPavel Emelyanov 934786d35d4SDavid Howellsconfig HAVE_MOD_ARCH_SPECIFIC 935786d35d4SDavid Howells bool 936786d35d4SDavid Howells help 937786d35d4SDavid Howells The arch uses struct mod_arch_specific to store data. Many arches 938786d35d4SDavid Howells just need a simple module loader without arch specific data - those 939786d35d4SDavid Howells should not enable this. 940786d35d4SDavid Howells 941786d35d4SDavid Howellsconfig MODULES_USE_ELF_RELA 942786d35d4SDavid Howells bool 943786d35d4SDavid Howells help 944786d35d4SDavid Howells Modules only use ELF RELA relocations. Modules with ELF REL 945786d35d4SDavid Howells relocations will give an error. 946786d35d4SDavid Howells 947786d35d4SDavid Howellsconfig MODULES_USE_ELF_REL 948786d35d4SDavid Howells bool 949786d35d4SDavid Howells help 950786d35d4SDavid Howells Modules only use ELF REL relocations. Modules with ELF RELA 951786d35d4SDavid Howells relocations will give an error. 952786d35d4SDavid Howells 95301dc0386SChristophe Leroyconfig ARCH_WANTS_MODULES_DATA_IN_VMALLOC 95401dc0386SChristophe Leroy bool 95501dc0386SChristophe Leroy help 95601dc0386SChristophe Leroy For architectures like powerpc/32 which have constraints on module 95701dc0386SChristophe Leroy allocation and need to allocate module data outside of module area. 95801dc0386SChristophe Leroy 959cc1f0274SFrederic Weisbeckerconfig HAVE_IRQ_EXIT_ON_IRQ_STACK 960cc1f0274SFrederic Weisbecker bool 961cc1f0274SFrederic Weisbecker help 962cc1f0274SFrederic Weisbecker Architecture doesn't only execute the irq handler on the irq stack 963cc1f0274SFrederic Weisbecker but also irq_exit(). This way we can process softirqs on this irq 964cc1f0274SFrederic Weisbecker stack instead of switching to a new one when we call __do_softirq() 965cc1f0274SFrederic Weisbecker in the end of an hardirq. 966cc1f0274SFrederic Weisbecker This spares a stack switch and improves cache usage on softirq 967cc1f0274SFrederic Weisbecker processing. 968cc1f0274SFrederic Weisbecker 969cd1a41ceSThomas Gleixnerconfig HAVE_SOFTIRQ_ON_OWN_STACK 970cd1a41ceSThomas Gleixner bool 971cd1a41ceSThomas Gleixner help 972cd1a41ceSThomas Gleixner Architecture provides a function to run __do_softirq() on a 973c226bc3cSColin Ian King separate stack. 974cd1a41ceSThomas Gleixner 9758cbb2b50SSebastian Andrzej Siewiorconfig SOFTIRQ_ON_OWN_STACK 9768cbb2b50SSebastian Andrzej Siewior def_bool HAVE_SOFTIRQ_ON_OWN_STACK && !PREEMPT_RT 9778cbb2b50SSebastian Andrzej Siewior 97812700c17SArnd Bergmannconfig ALTERNATE_USER_ADDRESS_SPACE 97912700c17SArnd Bergmann bool 98012700c17SArnd Bergmann help 98112700c17SArnd Bergmann Architectures set this when the CPU uses separate address 98212700c17SArnd Bergmann spaces for kernel and user space pointers. In this case, the 98312700c17SArnd Bergmann access_ok() check on a __user pointer is skipped. 98412700c17SArnd Bergmann 985235a8f02SKirill A. Shutemovconfig PGTABLE_LEVELS 986235a8f02SKirill A. Shutemov int 987235a8f02SKirill A. Shutemov default 2 988235a8f02SKirill A. Shutemov 9892b68f6caSKees Cookconfig ARCH_HAS_ELF_RANDOMIZE 9902b68f6caSKees Cook bool 9912b68f6caSKees Cook help 9922b68f6caSKees Cook An architecture supports choosing randomized locations for 9932b68f6caSKees Cook stack, mmap, brk, and ET_DYN. Defined functions: 9942b68f6caSKees Cook - arch_mmap_rnd() 995204db6edSKees Cook - arch_randomize_brk() 9962b68f6caSKees Cook 997d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_BITS 998d07e2259SDaniel Cashman bool 999d07e2259SDaniel Cashman help 1000d07e2259SDaniel Cashman An arch should select this symbol if it supports setting a variable 1001d07e2259SDaniel Cashman number of bits for use in establishing the base address for mmap 1002d07e2259SDaniel Cashman allocations, has MMU enabled and provides values for both: 1003d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MIN 1004d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MAX 1005d07e2259SDaniel Cashman 10065f56a5dfSJiri Slabyconfig HAVE_EXIT_THREAD 10075f56a5dfSJiri Slaby bool 10085f56a5dfSJiri Slaby help 10095f56a5dfSJiri Slaby An architecture implements exit_thread. 10105f56a5dfSJiri Slaby 1011d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MIN 1012d07e2259SDaniel Cashman int 1013d07e2259SDaniel Cashman 1014d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MAX 1015d07e2259SDaniel Cashman int 1016d07e2259SDaniel Cashman 1017d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_DEFAULT 1018d07e2259SDaniel Cashman int 1019d07e2259SDaniel Cashman 1020d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS 1021d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address" if EXPERT 1022d07e2259SDaniel Cashman range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX 1023d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT 1024d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_MIN 1025d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_BITS 1026d07e2259SDaniel Cashman help 1027d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 1028d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 1029d07e2259SDaniel Cashman resulting from mmap allocations. This value will be bounded 1030d07e2259SDaniel Cashman by the architecture's minimum and maximum supported values. 1031d07e2259SDaniel Cashman 1032d07e2259SDaniel Cashman This value can be changed after boot using the 1033d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_bits tunable 1034d07e2259SDaniel Cashman 1035d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_COMPAT_BITS 1036d07e2259SDaniel Cashman bool 1037d07e2259SDaniel Cashman help 1038d07e2259SDaniel Cashman An arch should select this symbol if it supports running applications 1039d07e2259SDaniel Cashman in compatibility mode, supports setting a variable number of bits for 1040d07e2259SDaniel Cashman use in establishing the base address for mmap allocations, has MMU 1041d07e2259SDaniel Cashman enabled and provides values for both: 1042d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MIN 1043d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MAX 1044d07e2259SDaniel Cashman 1045d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MIN 1046d07e2259SDaniel Cashman int 1047d07e2259SDaniel Cashman 1048d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MAX 1049d07e2259SDaniel Cashman int 1050d07e2259SDaniel Cashman 1051d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 1052d07e2259SDaniel Cashman int 1053d07e2259SDaniel Cashman 1054d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS 1055d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT 1056d07e2259SDaniel Cashman range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX 1057d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 1058d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_MIN 1059d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS 1060d07e2259SDaniel Cashman help 1061d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 1062d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 1063d07e2259SDaniel Cashman resulting from mmap allocations for compatible applications This 1064d07e2259SDaniel Cashman value will be bounded by the architecture's minimum and maximum 1065d07e2259SDaniel Cashman supported values. 1066d07e2259SDaniel Cashman 1067d07e2259SDaniel Cashman This value can be changed after boot using the 1068d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_compat_bits tunable 1069d07e2259SDaniel Cashman 10701b028f78SDmitry Safonovconfig HAVE_ARCH_COMPAT_MMAP_BASES 10711b028f78SDmitry Safonov bool 10721b028f78SDmitry Safonov help 10731b028f78SDmitry Safonov This allows 64bit applications to invoke 32-bit mmap() syscall 10741b028f78SDmitry Safonov and vice-versa 32-bit applications to call 64-bit mmap(). 10751b028f78SDmitry Safonov Required for applications doing different bitness syscalls. 10761b028f78SDmitry Safonov 10771f0e290cSGuenter Roeckconfig PAGE_SIZE_LESS_THAN_64KB 10781f0e290cSGuenter Roeck def_bool y 10791f0e290cSGuenter Roeck depends on !ARM64_64K_PAGES 10801f0e290cSGuenter Roeck depends on !IA64_PAGE_SIZE_64KB 10811f0e290cSGuenter Roeck depends on !PAGE_SIZE_64KB 10821f0e290cSGuenter Roeck depends on !PARISC_PAGE_SIZE_64KB 1083e4bbd20dSNathan Chancellor depends on PAGE_SIZE_LESS_THAN_256KB 1084e4bbd20dSNathan Chancellor 1085e4bbd20dSNathan Chancellorconfig PAGE_SIZE_LESS_THAN_256KB 1086e4bbd20dSNathan Chancellor def_bool y 10871f0e290cSGuenter Roeck depends on !PAGE_SIZE_256KB 10881f0e290cSGuenter Roeck 108967f3977fSAlexandre Ghiti# This allows to use a set of generic functions to determine mmap base 109067f3977fSAlexandre Ghiti# address by giving priority to top-down scheme only if the process 109167f3977fSAlexandre Ghiti# is not in legacy mode (compat task, unlimited stack size or 109267f3977fSAlexandre Ghiti# sysctl_legacy_va_layout). 109367f3977fSAlexandre Ghiti# Architecture that selects this option can provide its own version of: 109467f3977fSAlexandre Ghiti# - STACK_RND_MASK 109567f3977fSAlexandre Ghiticonfig ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 109667f3977fSAlexandre Ghiti bool 109767f3977fSAlexandre Ghiti depends on MMU 1098e7142bf5SAlexandre Ghiti select ARCH_HAS_ELF_RANDOMIZE 109967f3977fSAlexandre Ghiti 110003f16cd0SJosh Poimboeufconfig HAVE_OBJTOOL 110103f16cd0SJosh Poimboeuf bool 110203f16cd0SJosh Poimboeuf 11034ab7674fSJosh Poimboeufconfig HAVE_JUMP_LABEL_HACK 11044ab7674fSJosh Poimboeuf bool 11054ab7674fSJosh Poimboeuf 110622102f45SJosh Poimboeufconfig HAVE_NOINSTR_HACK 110722102f45SJosh Poimboeuf bool 110822102f45SJosh Poimboeuf 1109489e355bSJosh Poimboeufconfig HAVE_NOINSTR_VALIDATION 1110489e355bSJosh Poimboeuf bool 1111489e355bSJosh Poimboeuf 11125f3da8c0SJosh Poimboeufconfig HAVE_UACCESS_VALIDATION 11135f3da8c0SJosh Poimboeuf bool 11145f3da8c0SJosh Poimboeuf select OBJTOOL 11155f3da8c0SJosh Poimboeuf 1116b9ab5ebbSJosh Poimboeufconfig HAVE_STACK_VALIDATION 1117b9ab5ebbSJosh Poimboeuf bool 1118b9ab5ebbSJosh Poimboeuf help 111903f16cd0SJosh Poimboeuf Architecture supports objtool compile-time frame pointer rule 112003f16cd0SJosh Poimboeuf validation. 1121b9ab5ebbSJosh Poimboeuf 1122af085d90SJosh Poimboeufconfig HAVE_RELIABLE_STACKTRACE 1123af085d90SJosh Poimboeuf bool 1124af085d90SJosh Poimboeuf help 1125140d7e88SMiroslav Benes Architecture has either save_stack_trace_tsk_reliable() or 1126140d7e88SMiroslav Benes arch_stack_walk_reliable() function which only returns a stack trace 1127140d7e88SMiroslav Benes if it can guarantee the trace is reliable. 1128af085d90SJosh Poimboeuf 1129468a9428SGeorge Spelvinconfig HAVE_ARCH_HASH 1130468a9428SGeorge Spelvin bool 1131468a9428SGeorge Spelvin default n 1132468a9428SGeorge Spelvin help 1133468a9428SGeorge Spelvin If this is set, the architecture provides an <asm/hash.h> 1134468a9428SGeorge Spelvin file which provides platform-specific implementations of some 1135468a9428SGeorge Spelvin functions in <linux/hash.h> or fs/namei.c. 1136468a9428SGeorge Spelvin 1137666047feSFinn Thainconfig HAVE_ARCH_NVRAM_OPS 1138666047feSFinn Thain bool 1139666047feSFinn Thain 11403a495511SWilliam Breathitt Grayconfig ISA_BUS_API 11413a495511SWilliam Breathitt Gray def_bool ISA 11423a495511SWilliam Breathitt Gray 1143d2125043SAl Viro# 1144d2125043SAl Viro# ABI hall of shame 1145d2125043SAl Viro# 1146d2125043SAl Viroconfig CLONE_BACKWARDS 1147d2125043SAl Viro bool 1148d2125043SAl Viro help 1149d2125043SAl Viro Architecture has tls passed as the 4th argument of clone(2), 1150d2125043SAl Viro not the 5th one. 1151d2125043SAl Viro 1152d2125043SAl Viroconfig CLONE_BACKWARDS2 1153d2125043SAl Viro bool 1154d2125043SAl Viro help 1155d2125043SAl Viro Architecture has the first two arguments of clone(2) swapped. 1156d2125043SAl Viro 1157dfa9771aSMichal Simekconfig CLONE_BACKWARDS3 1158dfa9771aSMichal Simek bool 1159dfa9771aSMichal Simek help 1160dfa9771aSMichal Simek Architecture has tls passed as the 3rd argument of clone(2), 1161dfa9771aSMichal Simek not the 5th one. 1162dfa9771aSMichal Simek 1163eaca6eaeSAl Viroconfig ODD_RT_SIGACTION 1164eaca6eaeSAl Viro bool 1165eaca6eaeSAl Viro help 1166eaca6eaeSAl Viro Architecture has unusual rt_sigaction(2) arguments 1167eaca6eaeSAl Viro 11680a0e8cdfSAl Viroconfig OLD_SIGSUSPEND 11690a0e8cdfSAl Viro bool 11700a0e8cdfSAl Viro help 11710a0e8cdfSAl Viro Architecture has old sigsuspend(2) syscall, of one-argument variety 11720a0e8cdfSAl Viro 11730a0e8cdfSAl Viroconfig OLD_SIGSUSPEND3 11740a0e8cdfSAl Viro bool 11750a0e8cdfSAl Viro help 11760a0e8cdfSAl Viro Even weirder antique ABI - three-argument sigsuspend(2) 11770a0e8cdfSAl Viro 1178495dfbf7SAl Viroconfig OLD_SIGACTION 1179495dfbf7SAl Viro bool 1180495dfbf7SAl Viro help 1181495dfbf7SAl Viro Architecture has old sigaction(2) syscall. Nope, not the same 1182495dfbf7SAl Viro as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2), 1183495dfbf7SAl Viro but fairly different variant of sigaction(2), thanks to OSF/1 1184495dfbf7SAl Viro compatibility... 1185495dfbf7SAl Viro 1186495dfbf7SAl Viroconfig COMPAT_OLD_SIGACTION 1187495dfbf7SAl Viro bool 1188495dfbf7SAl Viro 118917435e5fSDeepa Dinamaniconfig COMPAT_32BIT_TIME 1190942437c9SArnd Bergmann bool "Provide system calls for 32-bit time_t" 1191942437c9SArnd Bergmann default !64BIT || COMPAT 119217435e5fSDeepa Dinamani help 119317435e5fSDeepa Dinamani This enables 32 bit time_t support in addition to 64 bit time_t support. 119417435e5fSDeepa Dinamani This is relevant on all 32-bit architectures, and 64-bit architectures 119517435e5fSDeepa Dinamani as part of compat syscall handling. 119617435e5fSDeepa Dinamani 119787a4c375SChristoph Hellwigconfig ARCH_NO_PREEMPT 119887a4c375SChristoph Hellwig bool 119987a4c375SChristoph Hellwig 1200a50a3f4bSThomas Gleixnerconfig ARCH_SUPPORTS_RT 1201a50a3f4bSThomas Gleixner bool 1202a50a3f4bSThomas Gleixner 1203fff7fb0bSZhaoxiu Zengconfig CPU_NO_EFFICIENT_FFS 1204fff7fb0bSZhaoxiu Zeng def_bool n 1205fff7fb0bSZhaoxiu Zeng 1206ba14a194SAndy Lutomirskiconfig HAVE_ARCH_VMAP_STACK 1207ba14a194SAndy Lutomirski def_bool n 1208ba14a194SAndy Lutomirski help 1209ba14a194SAndy Lutomirski An arch should select this symbol if it can support kernel stacks 1210ba14a194SAndy Lutomirski in vmalloc space. This means: 1211ba14a194SAndy Lutomirski 1212ba14a194SAndy Lutomirski - vmalloc space must be large enough to hold many kernel stacks. 1213ba14a194SAndy Lutomirski This may rule out many 32-bit architectures. 1214ba14a194SAndy Lutomirski 1215ba14a194SAndy Lutomirski - Stacks in vmalloc space need to work reliably. For example, if 1216ba14a194SAndy Lutomirski vmap page tables are created on demand, either this mechanism 1217ba14a194SAndy Lutomirski needs to work while the stack points to a virtual address with 1218ba14a194SAndy Lutomirski unpopulated page tables or arch code (switch_to() and switch_mm(), 1219ba14a194SAndy Lutomirski most likely) needs to ensure that the stack's page table entries 1220ba14a194SAndy Lutomirski are populated before running on a possibly unpopulated stack. 1221ba14a194SAndy Lutomirski 1222ba14a194SAndy Lutomirski - If the stack overflows into a guard page, something reasonable 1223ba14a194SAndy Lutomirski should happen. The definition of "reasonable" is flexible, but 1224ba14a194SAndy Lutomirski instantly rebooting without logging anything would be unfriendly. 1225ba14a194SAndy Lutomirski 1226ba14a194SAndy Lutomirskiconfig VMAP_STACK 1227ba14a194SAndy Lutomirski default y 1228ba14a194SAndy Lutomirski bool "Use a virtually-mapped stack" 1229eafb149eSDaniel Axtens depends on HAVE_ARCH_VMAP_STACK 123038dd767dSAndrey Konovalov depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC 1231a7f7f624SMasahiro Yamada help 1232ba14a194SAndy Lutomirski Enable this if you want the use virtually-mapped kernel stacks 1233ba14a194SAndy Lutomirski with guard pages. This causes kernel stack overflows to be 1234ba14a194SAndy Lutomirski caught immediately rather than causing difficult-to-diagnose 1235ba14a194SAndy Lutomirski corruption. 1236ba14a194SAndy Lutomirski 123738dd767dSAndrey Konovalov To use this with software KASAN modes, the architecture must support 123838dd767dSAndrey Konovalov backing virtual mappings with real shadow memory, and KASAN_VMALLOC 123938dd767dSAndrey Konovalov must be enabled. 1240ba14a194SAndy Lutomirski 124139218ff4SKees Cookconfig HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 124239218ff4SKees Cook def_bool n 124339218ff4SKees Cook help 124439218ff4SKees Cook An arch should select this symbol if it can support kernel stack 124539218ff4SKees Cook offset randomization with calls to add_random_kstack_offset() 124639218ff4SKees Cook during syscall entry and choose_random_kstack_offset() during 124739218ff4SKees Cook syscall exit. Careful removal of -fstack-protector-strong and 124839218ff4SKees Cook -fstack-protector should also be applied to the entry code and 124939218ff4SKees Cook closely examined, as the artificial stack bump looks like an array 125039218ff4SKees Cook to the compiler, so it will attempt to add canary checks regardless 125139218ff4SKees Cook of the static branch state. 125239218ff4SKees Cook 12538cb37a59SMarco Elverconfig RANDOMIZE_KSTACK_OFFSET 12548cb37a59SMarco Elver bool "Support for randomizing kernel stack offset on syscall entry" if EXPERT 12558cb37a59SMarco Elver default y 125639218ff4SKees Cook depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 1257efa90c11SMarco Elver depends on INIT_STACK_NONE || !CC_IS_CLANG || CLANG_VERSION >= 140000 125839218ff4SKees Cook help 125939218ff4SKees Cook The kernel stack offset can be randomized (after pt_regs) by 126039218ff4SKees Cook roughly 5 bits of entropy, frustrating memory corruption 126139218ff4SKees Cook attacks that depend on stack address determinism or 12628cb37a59SMarco Elver cross-syscall address exposures. 12638cb37a59SMarco Elver 12648cb37a59SMarco Elver The feature is controlled via the "randomize_kstack_offset=on/off" 12658cb37a59SMarco Elver kernel boot param, and if turned off has zero overhead due to its use 12668cb37a59SMarco Elver of static branches (see JUMP_LABEL). 12678cb37a59SMarco Elver 12688cb37a59SMarco Elver If unsure, say Y. 12698cb37a59SMarco Elver 12708cb37a59SMarco Elverconfig RANDOMIZE_KSTACK_OFFSET_DEFAULT 12718cb37a59SMarco Elver bool "Default state of kernel stack offset randomization" 12728cb37a59SMarco Elver depends on RANDOMIZE_KSTACK_OFFSET 12738cb37a59SMarco Elver help 12748cb37a59SMarco Elver Kernel stack offset randomization is controlled by kernel boot param 12758cb37a59SMarco Elver "randomize_kstack_offset=on/off", and this config chooses the default 12768cb37a59SMarco Elver boot state. 127739218ff4SKees Cook 1278ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX 1279ad21fc4fSLaura Abbott def_bool n 1280ad21fc4fSLaura Abbott 1281ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1282ad21fc4fSLaura Abbott def_bool n 1283ad21fc4fSLaura Abbott 1284ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_KERNEL_RWX 1285ad21fc4fSLaura Abbott def_bool n 1286ad21fc4fSLaura Abbott 12870f5bf6d0SLaura Abbottconfig STRICT_KERNEL_RWX 1288ad21fc4fSLaura Abbott bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX 1289ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_KERNEL_RWX 1290ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1291ad21fc4fSLaura Abbott help 1292ad21fc4fSLaura Abbott If this is set, kernel text and rodata memory will be made read-only, 1293ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 1294ad21fc4fSLaura Abbott protection against certain security exploits (e.g. executing the heap 1295ad21fc4fSLaura Abbott or modifying text) 1296ad21fc4fSLaura Abbott 1297ad21fc4fSLaura Abbott These features are considered standard security practice these days. 1298ad21fc4fSLaura Abbott You should say Y here in almost all cases. 1299ad21fc4fSLaura Abbott 1300ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_MODULE_RWX 1301ad21fc4fSLaura Abbott def_bool n 1302ad21fc4fSLaura Abbott 13030f5bf6d0SLaura Abbottconfig STRICT_MODULE_RWX 1304ad21fc4fSLaura Abbott bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX 1305ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES 1306ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1307ad21fc4fSLaura Abbott help 1308ad21fc4fSLaura Abbott If this is set, module text and rodata memory will be made read-only, 1309ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 1310ad21fc4fSLaura Abbott protection against certain security exploits (e.g. writing to text) 1311ad21fc4fSLaura Abbott 1312ea8c64acSChristoph Hellwig# select if the architecture provides an asm/dma-direct.h header 1313ea8c64acSChristoph Hellwigconfig ARCH_HAS_PHYS_TO_DMA 1314ea8c64acSChristoph Hellwig bool 1315ea8c64acSChristoph Hellwig 131604f264d3SPaul Burtonconfig HAVE_ARCH_COMPILER_H 131704f264d3SPaul Burton bool 131804f264d3SPaul Burton help 131904f264d3SPaul Burton An architecture can select this if it provides an 132004f264d3SPaul Burton asm/compiler.h header that should be included after 132104f264d3SPaul Burton linux/compiler-*.h in order to override macro definitions that those 132204f264d3SPaul Burton headers generally provide. 132304f264d3SPaul Burton 1324271ca788SArd Biesheuvelconfig HAVE_ARCH_PREL32_RELOCATIONS 1325271ca788SArd Biesheuvel bool 1326271ca788SArd Biesheuvel help 1327271ca788SArd Biesheuvel May be selected by an architecture if it supports place-relative 1328271ca788SArd Biesheuvel 32-bit relocations, both in the toolchain and in the module loader, 1329271ca788SArd Biesheuvel in which case relative references can be used in special sections 1330271ca788SArd Biesheuvel for PCI fixup, initcalls etc which are only half the size on 64 bit 1331271ca788SArd Biesheuvel architectures, and don't require runtime relocation on relocatable 1332271ca788SArd Biesheuvel kernels. 1333271ca788SArd Biesheuvel 1334ce9084baSArd Biesheuvelconfig ARCH_USE_MEMREMAP_PROT 1335ce9084baSArd Biesheuvel bool 1336ce9084baSArd Biesheuvel 1337fb346fd9SWaiman Longconfig LOCK_EVENT_COUNTS 1338fb346fd9SWaiman Long bool "Locking event counts collection" 1339fb346fd9SWaiman Long depends on DEBUG_FS 1340a7f7f624SMasahiro Yamada help 1341fb346fd9SWaiman Long Enable light-weight counting of various locking related events 1342fb346fd9SWaiman Long in the system with minimal performance impact. This reduces 1343fb346fd9SWaiman Long the chance of application behavior change because of timing 1344fb346fd9SWaiman Long differences. The counts are reported via debugfs. 1345fb346fd9SWaiman Long 13465cf896fbSPeter Collingbourne# Select if the architecture has support for applying RELR relocations. 13475cf896fbSPeter Collingbourneconfig ARCH_HAS_RELR 13485cf896fbSPeter Collingbourne bool 13495cf896fbSPeter Collingbourne 13505cf896fbSPeter Collingbourneconfig RELR 13515cf896fbSPeter Collingbourne bool "Use RELR relocation packing" 13525cf896fbSPeter Collingbourne depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR 13535cf896fbSPeter Collingbourne default y 13545cf896fbSPeter Collingbourne help 13555cf896fbSPeter Collingbourne Store the kernel's dynamic relocations in the RELR relocation packing 13565cf896fbSPeter Collingbourne format. Requires a compatible linker (LLD supports this feature), as 13575cf896fbSPeter Collingbourne well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy 13585cf896fbSPeter Collingbourne are compatible). 13595cf896fbSPeter Collingbourne 13600c9c1d56SThiago Jung Bauermannconfig ARCH_HAS_MEM_ENCRYPT 13610c9c1d56SThiago Jung Bauermann bool 13620c9c1d56SThiago Jung Bauermann 136346b49b12STom Lendackyconfig ARCH_HAS_CC_PLATFORM 136446b49b12STom Lendacky bool 136546b49b12STom Lendacky 13660e242208SHassan Naveedconfig HAVE_SPARSE_SYSCALL_NR 13670e242208SHassan Naveed bool 13680e242208SHassan Naveed help 13690e242208SHassan Naveed An architecture should select this if its syscall numbering is sparse 13700e242208SHassan Naveed to save space. For example, MIPS architecture has a syscall array with 13710e242208SHassan Naveed entries at 4000, 5000 and 6000 locations. This option turns on syscall 13720e242208SHassan Naveed related optimizations for a given architecture. 13730e242208SHassan Naveed 1374d60d7de3SSven Schnelleconfig ARCH_HAS_VDSO_DATA 1375d60d7de3SSven Schnelle bool 1376d60d7de3SSven Schnelle 1377115284d8SJosh Poimboeufconfig HAVE_STATIC_CALL 1378115284d8SJosh Poimboeuf bool 1379115284d8SJosh Poimboeuf 13809183c3f9SJosh Poimboeufconfig HAVE_STATIC_CALL_INLINE 13819183c3f9SJosh Poimboeuf bool 13829183c3f9SJosh Poimboeuf depends on HAVE_STATIC_CALL 138303f16cd0SJosh Poimboeuf select OBJTOOL 13849183c3f9SJosh Poimboeuf 13856ef869e0SMichal Hockoconfig HAVE_PREEMPT_DYNAMIC 13866ef869e0SMichal Hocko bool 138799cf983cSMark Rutland 138899cf983cSMark Rutlandconfig HAVE_PREEMPT_DYNAMIC_CALL 138999cf983cSMark Rutland bool 13906ef869e0SMichal Hocko depends on HAVE_STATIC_CALL 139199cf983cSMark Rutland select HAVE_PREEMPT_DYNAMIC 13926ef869e0SMichal Hocko help 139399cf983cSMark Rutland An architecture should select this if it can handle the preemption 139499cf983cSMark Rutland model being selected at boot time using static calls. 139599cf983cSMark Rutland 139699cf983cSMark Rutland Where an architecture selects HAVE_STATIC_CALL_INLINE, any call to a 139799cf983cSMark Rutland preemption function will be patched directly. 139899cf983cSMark Rutland 139999cf983cSMark Rutland Where an architecture does not select HAVE_STATIC_CALL_INLINE, any 140099cf983cSMark Rutland call to a preemption function will go through a trampoline, and the 140199cf983cSMark Rutland trampoline will be patched. 140299cf983cSMark Rutland 140399cf983cSMark Rutland It is strongly advised to support inline static call to avoid any 140499cf983cSMark Rutland overhead. 140599cf983cSMark Rutland 140699cf983cSMark Rutlandconfig HAVE_PREEMPT_DYNAMIC_KEY 140799cf983cSMark Rutland bool 1408a0a12c3eSNick Desaulniers depends on HAVE_ARCH_JUMP_LABEL 140999cf983cSMark Rutland select HAVE_PREEMPT_DYNAMIC 141099cf983cSMark Rutland help 141199cf983cSMark Rutland An architecture should select this if it can handle the preemption 141299cf983cSMark Rutland model being selected at boot time using static keys. 141399cf983cSMark Rutland 141499cf983cSMark Rutland Each preemption function will be given an early return based on a 141599cf983cSMark Rutland static key. This should have slightly lower overhead than non-inline 141699cf983cSMark Rutland static calls, as this effectively inlines each trampoline into the 141799cf983cSMark Rutland start of its callee. This may avoid redundant work, and may 141899cf983cSMark Rutland integrate better with CFI schemes. 141999cf983cSMark Rutland 142099cf983cSMark Rutland This will have greater overhead than using inline static calls as 142199cf983cSMark Rutland the call to the preemption function cannot be entirely elided. 14226ef869e0SMichal Hocko 142359612b24SNathan Chancellorconfig ARCH_WANT_LD_ORPHAN_WARN 142459612b24SNathan Chancellor bool 142559612b24SNathan Chancellor help 142659612b24SNathan Chancellor An arch should select this symbol once all linker sections are explicitly 142759612b24SNathan Chancellor included, size-asserted, or discarded in the linker scripts. This is 142859612b24SNathan Chancellor important because we never want expected sections to be placed heuristically 142959612b24SNathan Chancellor by the linker, since the locations of such sections can change between linker 143059612b24SNathan Chancellor versions. 143159612b24SNathan Chancellor 14324f5b0c17SMike Rapoportconfig HAVE_ARCH_PFN_VALID 14334f5b0c17SMike Rapoport bool 14344f5b0c17SMike Rapoport 14355d6ad668SMike Rapoportconfig ARCH_SUPPORTS_DEBUG_PAGEALLOC 14365d6ad668SMike Rapoport bool 14375d6ad668SMike Rapoport 1438df4e817bSPasha Tatashinconfig ARCH_SUPPORTS_PAGE_TABLE_CHECK 1439df4e817bSPasha Tatashin bool 1440df4e817bSPasha Tatashin 14412ca408d9SBrian Gerstconfig ARCH_SPLIT_ARG64 14422ca408d9SBrian Gerst bool 14432ca408d9SBrian Gerst help 14442ca408d9SBrian Gerst If a 32-bit architecture requires 64-bit arguments to be split into 14452ca408d9SBrian Gerst pairs of 32-bit arguments, select this option. 14462ca408d9SBrian Gerst 14477facdc42SAl Viroconfig ARCH_HAS_ELFCORE_COMPAT 14487facdc42SAl Viro bool 14497facdc42SAl Viro 145058e106e7SBalbir Singhconfig ARCH_HAS_PARANOID_L1D_FLUSH 145158e106e7SBalbir Singh bool 145258e106e7SBalbir Singh 1453d593d64fSPrasad Sodagudiconfig ARCH_HAVE_TRACE_MMIO_ACCESS 1454d593d64fSPrasad Sodagudi bool 1455d593d64fSPrasad Sodagudi 14561bdda24cSThomas Gleixnerconfig DYNAMIC_SIGFRAME 14571bdda24cSThomas Gleixner bool 14581bdda24cSThomas Gleixner 145950468e43SJarkko Sakkinen# Select, if arch has a named attribute group bound to NUMA device nodes. 146050468e43SJarkko Sakkinenconfig HAVE_ARCH_NODE_DEV_GROUP 146150468e43SJarkko Sakkinen bool 146250468e43SJarkko Sakkinen 1463eed9a328SYu Zhaoconfig ARCH_HAS_NONLEAF_PMD_YOUNG 1464eed9a328SYu Zhao bool 1465eed9a328SYu Zhao help 1466eed9a328SYu Zhao Architectures that select this option are capable of setting the 1467eed9a328SYu Zhao accessed bit in non-leaf PMD entries when using them as part of linear 1468eed9a328SYu Zhao address translations. Page table walkers that clear the accessed bit 1469eed9a328SYu Zhao may use this capability to reduce their search space. 1470eed9a328SYu Zhao 14712521f2c2SPeter Oberparleitersource "kernel/gcov/Kconfig" 147245332b1bSMasahiro Yamada 147345332b1bSMasahiro Yamadasource "scripts/gcc-plugins/Kconfig" 1474fa1b5d09SLinus Torvalds 1475d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_4B 1476d49a0626SPeter Zijlstra bool 1477d49a0626SPeter Zijlstra 1478d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_8B 1479d49a0626SPeter Zijlstra bool 1480d49a0626SPeter Zijlstra 1481d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_16B 1482d49a0626SPeter Zijlstra bool 1483d49a0626SPeter Zijlstra 1484d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_32B 1485d49a0626SPeter Zijlstra bool 1486d49a0626SPeter Zijlstra 1487d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_64B 1488d49a0626SPeter Zijlstra bool 1489d49a0626SPeter Zijlstra 1490d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT 1491d49a0626SPeter Zijlstra int 1492d49a0626SPeter Zijlstra default 64 if FUNCTION_ALIGNMENT_64B 1493d49a0626SPeter Zijlstra default 32 if FUNCTION_ALIGNMENT_32B 1494d49a0626SPeter Zijlstra default 16 if FUNCTION_ALIGNMENT_16B 1495d49a0626SPeter Zijlstra default 8 if FUNCTION_ALIGNMENT_8B 1496d49a0626SPeter Zijlstra default 4 if FUNCTION_ALIGNMENT_4B 1497d49a0626SPeter Zijlstra default 0 1498d49a0626SPeter Zijlstra 149922471e13SRandy Dunlapendmenu 1500