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 12fe42754bSSean Christophersonconfig ARCH_CONFIGURES_CPU_MITIGATIONS 13fe42754bSSean Christopherson bool 14fe42754bSSean Christopherson 15fe42754bSSean Christophersonif !ARCH_CONFIGURES_CPU_MITIGATIONS 16fe42754bSSean Christophersonconfig CPU_MITIGATIONS 17fe42754bSSean Christopherson def_bool y 18fe42754bSSean Christophersonendif 19fe42754bSSean Christopherson 20de6c85bfSChristoph Hellwig# 21de6c85bfSChristoph Hellwig# Selected by architectures that need custom DMA operations for e.g. legacy 22de6c85bfSChristoph Hellwig# IOMMUs not handled by dma-iommu. Drivers must never select this symbol. 23de6c85bfSChristoph Hellwig# 24de6c85bfSChristoph Hellwigconfig ARCH_HAS_DMA_OPS 25de6c85bfSChristoph Hellwig depends on HAS_DMA 26de6c85bfSChristoph Hellwig select DMA_OPS_HELPERS 27de6c85bfSChristoph Hellwig bool 28de6c85bfSChristoph Hellwig 2922471e13SRandy Dunlapmenu "General architecture-dependent options" 3022471e13SRandy Dunlap 31da32b581SCatalin Marinasconfig ARCH_HAS_SUBPAGE_FAULTS 32da32b581SCatalin Marinas bool 33da32b581SCatalin Marinas help 34da32b581SCatalin Marinas Select if the architecture can check permissions at sub-page 35da32b581SCatalin Marinas granularity (e.g. arm64 MTE). The probe_user_*() functions 36da32b581SCatalin Marinas must be implemented. 37da32b581SCatalin Marinas 3805736e4aSThomas Gleixnerconfig HOTPLUG_SMT 3905736e4aSThomas Gleixner bool 4005736e4aSThomas Gleixner 4138253464SMichael Ellermanconfig SMT_NUM_THREADS_DYNAMIC 4238253464SMichael Ellerman bool 4338253464SMichael Ellerman 447bd291abSPeter Zijlstraconfig ARCH_SUPPORTS_SCHED_SMT 457bd291abSPeter Zijlstra bool 467bd291abSPeter Zijlstra 477bd291abSPeter Zijlstraconfig ARCH_SUPPORTS_SCHED_CLUSTER 487bd291abSPeter Zijlstra bool 497bd291abSPeter Zijlstra 507bd291abSPeter Zijlstraconfig ARCH_SUPPORTS_SCHED_MC 517bd291abSPeter Zijlstra bool 527bd291abSPeter Zijlstra 537bd291abSPeter Zijlstraconfig SCHED_SMT 547bd291abSPeter Zijlstra bool "SMT (Hyperthreading) scheduler support" 557bd291abSPeter Zijlstra depends on ARCH_SUPPORTS_SCHED_SMT 567bd291abSPeter Zijlstra default y 577bd291abSPeter Zijlstra help 587bd291abSPeter Zijlstra Improves the CPU scheduler's decision making when dealing with 597bd291abSPeter Zijlstra MultiThreading at a cost of slightly increased overhead in some 607bd291abSPeter Zijlstra places. If unsure say N here. 617bd291abSPeter Zijlstra 627bd291abSPeter Zijlstraconfig SCHED_CLUSTER 637bd291abSPeter Zijlstra bool "Cluster scheduler support" 647bd291abSPeter Zijlstra depends on ARCH_SUPPORTS_SCHED_CLUSTER 657bd291abSPeter Zijlstra default y 667bd291abSPeter Zijlstra help 677bd291abSPeter Zijlstra Cluster scheduler support improves the CPU scheduler's decision 687bd291abSPeter Zijlstra making when dealing with machines that have clusters of CPUs. 697bd291abSPeter Zijlstra Cluster usually means a couple of CPUs which are placed closely 707bd291abSPeter Zijlstra by sharing mid-level caches, last-level cache tags or internal 717bd291abSPeter Zijlstra busses. 727bd291abSPeter Zijlstra 737bd291abSPeter Zijlstraconfig SCHED_MC 747bd291abSPeter Zijlstra bool "Multi-Core Cache (MC) scheduler support" 757bd291abSPeter Zijlstra depends on ARCH_SUPPORTS_SCHED_MC 767bd291abSPeter Zijlstra default y 777bd291abSPeter Zijlstra help 787bd291abSPeter Zijlstra Multi-core scheduler support improves the CPU scheduler's decision 797bd291abSPeter Zijlstra making when dealing with multi-core CPU chips at a cost of slightly 807bd291abSPeter Zijlstra increased overhead in some places. If unsure say N here. 817bd291abSPeter Zijlstra 826f062123SThomas Gleixner# Selected by HOTPLUG_CORE_SYNC_DEAD or HOTPLUG_CORE_SYNC_FULL 836f062123SThomas Gleixnerconfig HOTPLUG_CORE_SYNC 846f062123SThomas Gleixner bool 856f062123SThomas Gleixner 866f062123SThomas Gleixner# Basic CPU dead synchronization selected by architecture 876f062123SThomas Gleixnerconfig HOTPLUG_CORE_SYNC_DEAD 886f062123SThomas Gleixner bool 896f062123SThomas Gleixner select HOTPLUG_CORE_SYNC 906f062123SThomas Gleixner 916f062123SThomas Gleixner# Full CPU synchronization with alive state selected by architecture 926f062123SThomas Gleixnerconfig HOTPLUG_CORE_SYNC_FULL 936f062123SThomas Gleixner bool 946f062123SThomas Gleixner select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU 956f062123SThomas Gleixner select HOTPLUG_CORE_SYNC 966f062123SThomas Gleixner 97a631be92SThomas Gleixnerconfig HOTPLUG_SPLIT_STARTUP 98a631be92SThomas Gleixner bool 99a631be92SThomas Gleixner select HOTPLUG_CORE_SYNC_FULL 100a631be92SThomas Gleixner 10118415f33SThomas Gleixnerconfig HOTPLUG_PARALLEL 10218415f33SThomas Gleixner bool 10318415f33SThomas Gleixner select HOTPLUG_SPLIT_STARTUP 10418415f33SThomas Gleixner 105a70e9f64SJinjie Ruanconfig GENERIC_IRQ_ENTRY 106a70e9f64SJinjie Ruan bool 107a70e9f64SJinjie Ruan 108a70e9f64SJinjie Ruanconfig GENERIC_SYSCALL 109a70e9f64SJinjie Ruan bool 110a70e9f64SJinjie Ruan depends on GENERIC_IRQ_ENTRY 111a70e9f64SJinjie Ruan 112142781e1SThomas Gleixnerconfig GENERIC_ENTRY 113142781e1SThomas Gleixner bool 114a70e9f64SJinjie Ruan select GENERIC_IRQ_ENTRY 115a70e9f64SJinjie Ruan select GENERIC_SYSCALL 116142781e1SThomas Gleixner 1178383e05aSJinjie Ruanconfig ARCH_SUPPORTS_SYSCALL_USER_DISPATCH 1188383e05aSJinjie Ruan bool 1198383e05aSJinjie Ruan 120ee935e8dSGregory Priceconfig SYSCALL_USER_DISPATCH 121ee935e8dSGregory Price bool "Syscall User Dispatch" 1228383e05aSJinjie Ruan depends on ARCH_SUPPORTS_SYSCALL_USER_DISPATCH 123ee935e8dSGregory Price depends on GENERIC_ENTRY 124ee935e8dSGregory Price default y 125ee935e8dSGregory Price help 126ee935e8dSGregory Price Syscall User Dispatch lets a thread have its own system calls 127ee935e8dSGregory Price intercepted and redirected to a userspace signal handler based 128ee935e8dSGregory Price on a prctl() configured instruction pointer range. 129ee935e8dSGregory Price If unsure, say Y. 130ee935e8dSGregory Price 131125e5645SMathieu Desnoyersconfig KPROBES 132125e5645SMathieu Desnoyers bool "Kprobes" 133125e5645SMathieu Desnoyers depends on HAVE_KPROBES 13405ed160eSMasami Hiramatsu select KALLSYMS 1357582b7beSMike Rapoport (IBM) select EXECMEM 136900da4d2SPaul E. McKenney select NEED_TASKS_RCU 137125e5645SMathieu Desnoyers help 138125e5645SMathieu Desnoyers Kprobes allows you to trap at almost any kernel address and 139125e5645SMathieu Desnoyers execute a callback function. register_kprobe() establishes 140125e5645SMathieu Desnoyers a probepoint and specifies the callback. Kprobes is useful 141125e5645SMathieu Desnoyers for kernel debugging, non-intrusive instrumentation and testing. 142125e5645SMathieu Desnoyers If in doubt, say "N". 143125e5645SMathieu Desnoyers 14445f81b1cSSteven Rostedtconfig JUMP_LABEL 145c5905afbSIngo Molnar bool "Optimize very unlikely/likely branches" 14645f81b1cSSteven Rostedt depends on HAVE_ARCH_JUMP_LABEL 1474ab7674fSJosh Poimboeuf select OBJTOOL if HAVE_JUMP_LABEL_HACK 14845f81b1cSSteven Rostedt help 149c5905afbSIngo Molnar This option enables a transparent branch optimization that 150c5905afbSIngo Molnar makes certain almost-always-true or almost-always-false branch 151c5905afbSIngo Molnar conditions even cheaper to execute within the kernel. 15245f81b1cSSteven Rostedt 153c5905afbSIngo Molnar Certain performance-sensitive kernel code, such as trace points, 154c5905afbSIngo Molnar scheduler functionality, networking code and KVM have such 155c5905afbSIngo Molnar branches and include support for this optimization technique. 156c5905afbSIngo Molnar 157c5905afbSIngo Molnar If it is detected that the compiler has support for "asm goto", 158c5905afbSIngo Molnar the kernel will compile such branches with just a nop 159c5905afbSIngo Molnar instruction. When the condition flag is toggled to true, the 160c5905afbSIngo Molnar nop will be converted to a jump instruction to execute the 161c5905afbSIngo Molnar conditional block of instructions. 162c5905afbSIngo Molnar 163c5905afbSIngo Molnar This technique lowers overhead and stress on the branch prediction 164c5905afbSIngo Molnar of the processor and generally makes the kernel faster. The update 165c5905afbSIngo Molnar of the condition is slower, but those are always very rare. 166c5905afbSIngo Molnar 167c5905afbSIngo Molnar ( On 32-bit x86, the necessary options added to the compiler 168c5905afbSIngo Molnar flags may increase the size of the kernel slightly. ) 16945f81b1cSSteven Rostedt 1701987c947SPeter Zijlstraconfig STATIC_KEYS_SELFTEST 1711987c947SPeter Zijlstra bool "Static key selftest" 1721987c947SPeter Zijlstra depends on JUMP_LABEL 1731987c947SPeter Zijlstra help 1741987c947SPeter Zijlstra Boot time self-test of the branch patching code. 1751987c947SPeter Zijlstra 176f03c4129SPeter Zijlstraconfig STATIC_CALL_SELFTEST 177f03c4129SPeter Zijlstra bool "Static call selftest" 178f03c4129SPeter Zijlstra depends on HAVE_STATIC_CALL 179f03c4129SPeter Zijlstra help 180f03c4129SPeter Zijlstra Boot time self-test of the call patching code. 181f03c4129SPeter Zijlstra 182afd66255SMasami Hiramatsuconfig OPTPROBES 1835cc718b9SMasami Hiramatsu def_bool y 1845cc718b9SMasami Hiramatsu depends on KPROBES && HAVE_OPTPROBES 185900da4d2SPaul E. McKenney select NEED_TASKS_RCU 186afd66255SMasami Hiramatsu 187e7dbfe34SMasami Hiramatsuconfig KPROBES_ON_FTRACE 188e7dbfe34SMasami Hiramatsu def_bool y 189e7dbfe34SMasami Hiramatsu depends on KPROBES && HAVE_KPROBES_ON_FTRACE 190e7dbfe34SMasami Hiramatsu depends on DYNAMIC_FTRACE_WITH_REGS 191e7dbfe34SMasami Hiramatsu help 192e7dbfe34SMasami Hiramatsu If function tracer is enabled and the arch supports full 193e7dbfe34SMasami Hiramatsu passing of pt_regs to function tracing, then kprobes can 194e7dbfe34SMasami Hiramatsu optimize on top of function tracing. 195e7dbfe34SMasami Hiramatsu 1962b144498SSrikar Dronamrajuconfig UPROBES 19709294e31SDavid A. Long def_bool n 198e8f4aa60SAllen Pais depends on ARCH_SUPPORTS_UPROBES 19987195a1eSAndrii Nakryiko select TASKS_TRACE_RCU 2002b144498SSrikar Dronamraju help 2017b2d81d4SIngo Molnar Uprobes is the user-space counterpart to kprobes: they 2027b2d81d4SIngo Molnar enable instrumentation applications (such as 'perf probe') 2037b2d81d4SIngo Molnar to establish unintrusive probes in user-space binaries and 2047b2d81d4SIngo Molnar libraries, by executing handler functions when the probes 2057b2d81d4SIngo Molnar are hit by user-space applications. 2067b2d81d4SIngo Molnar 2077b2d81d4SIngo Molnar ( These probes come in the form of single-byte breakpoints, 2087b2d81d4SIngo Molnar managed by the kernel and kept transparent to the probed 2097b2d81d4SIngo Molnar application. ) 2102b144498SSrikar Dronamraju 211adab66b7SSteven Rostedt (VMware)config HAVE_64BIT_ALIGNED_ACCESS 212adab66b7SSteven Rostedt (VMware) def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS 213adab66b7SSteven Rostedt (VMware) help 214adab66b7SSteven Rostedt (VMware) Some architectures require 64 bit accesses to be 64 bit 215adab66b7SSteven Rostedt (VMware) aligned, which also requires structs containing 64 bit values 216adab66b7SSteven Rostedt (VMware) to be 64 bit aligned too. This includes some 32 bit 217adab66b7SSteven Rostedt (VMware) architectures which can do 64 bit accesses, as well as 64 bit 218adab66b7SSteven Rostedt (VMware) architectures without unaligned access. 219adab66b7SSteven Rostedt (VMware) 220adab66b7SSteven Rostedt (VMware) This symbol should be selected by an architecture if 64 bit 221adab66b7SSteven Rostedt (VMware) accesses are required to be 64 bit aligned in this way even 222adab66b7SSteven Rostedt (VMware) though it is not a 64 bit architecture. 223adab66b7SSteven Rostedt (VMware) 224ba1a297dSLukas Bulwahn See Documentation/core-api/unaligned-memory-access.rst for 225ba1a297dSLukas Bulwahn more information on the topic of unaligned memory accesses. 226adab66b7SSteven Rostedt (VMware) 22758340a07SJohannes Bergconfig HAVE_EFFICIENT_UNALIGNED_ACCESS 2289ba16087SJan Beulich bool 22958340a07SJohannes Berg help 23058340a07SJohannes Berg Some architectures are unable to perform unaligned accesses 23158340a07SJohannes Berg without the use of get_unaligned/put_unaligned. Others are 23258340a07SJohannes Berg unable to perform such accesses efficiently (e.g. trap on 23358340a07SJohannes Berg unaligned access and require fixing it up in the exception 23458340a07SJohannes Berg handler.) 23558340a07SJohannes Berg 23658340a07SJohannes Berg This symbol should be selected by an architecture if it can 23758340a07SJohannes Berg perform unaligned accesses efficiently to allow different 23858340a07SJohannes Berg code paths to be selected for these cases. Some network 23958340a07SJohannes Berg drivers, for example, could opt to not fix up alignment 24058340a07SJohannes Berg problems with received packets if doing so would not help 24158340a07SJohannes Berg much. 24258340a07SJohannes Berg 243c9b54d6fSMauro Carvalho Chehab See Documentation/core-api/unaligned-memory-access.rst for more 24458340a07SJohannes Berg information on the topic of unaligned memory accesses. 24558340a07SJohannes Berg 246cf66bb93SDavid Woodhouseconfig ARCH_USE_BUILTIN_BSWAP 247cf66bb93SDavid Woodhouse bool 248cf66bb93SDavid Woodhouse help 249cd4eacccSLukas Bulwahn GCC and Clang have builtin functions for handling byte-swapping. 250cd4eacccSLukas Bulwahn Using these allows the compiler to see what's happening and 251cd4eacccSLukas Bulwahn offers more opportunity for optimisation. In particular, the 252cd4eacccSLukas Bulwahn compiler will be able to combine the byteswap with a nearby load 253cd4eacccSLukas Bulwahn or store and use load-and-swap or store-and-swap instructions if 254cd4eacccSLukas Bulwahn the architecture has them. It should almost *never* result in code 255cd4eacccSLukas Bulwahn which is worse than the hand-coded assembler in <asm/swab.h>. 256cd4eacccSLukas Bulwahn But just in case it does, the use of the builtins is optional. 257cf66bb93SDavid Woodhouse 258cf66bb93SDavid Woodhouse Any architecture with load-and-swap or store-and-swap 259cf66bb93SDavid Woodhouse instructions should set this. And it shouldn't hurt to set it 260cf66bb93SDavid Woodhouse on architectures that don't have such instructions. 261cf66bb93SDavid Woodhouse 2629edddaa2SAnanth N Mavinakayanahalliconfig KRETPROBES 2639edddaa2SAnanth N Mavinakayanahalli def_bool y 26473f9b911SMasami Hiramatsu depends on KPROBES && (HAVE_KRETPROBES || HAVE_RETHOOK) 26573f9b911SMasami Hiramatsu 26673f9b911SMasami Hiramatsuconfig KRETPROBE_ON_RETHOOK 26773f9b911SMasami Hiramatsu def_bool y 26873f9b911SMasami Hiramatsu depends on HAVE_RETHOOK 26973f9b911SMasami Hiramatsu depends on KRETPROBES 27073f9b911SMasami Hiramatsu select RETHOOK 2719edddaa2SAnanth N Mavinakayanahalli 2727c68af6eSAvi Kivityconfig USER_RETURN_NOTIFIER 2737c68af6eSAvi Kivity bool 2747c68af6eSAvi Kivity depends on HAVE_USER_RETURN_NOTIFIER 2757c68af6eSAvi Kivity help 2767c68af6eSAvi Kivity Provide a kernel-internal notification when a cpu is about to 2777c68af6eSAvi Kivity switch to user mode. 2787c68af6eSAvi Kivity 27928b2ee20SRik van Rielconfig HAVE_IOREMAP_PROT 2809ba16087SJan Beulich bool 28128b2ee20SRik van Riel 282125e5645SMathieu Desnoyersconfig HAVE_KPROBES 2839ba16087SJan Beulich bool 2849edddaa2SAnanth N Mavinakayanahalli 2859edddaa2SAnanth N Mavinakayanahalliconfig HAVE_KRETPROBES 2869ba16087SJan Beulich bool 28774bc7ceeSArthur Kepner 288afd66255SMasami Hiramatsuconfig HAVE_OPTPROBES 289afd66255SMasami Hiramatsu bool 290d314d74cSCong Wang 291e7dbfe34SMasami Hiramatsuconfig HAVE_KPROBES_ON_FTRACE 292e7dbfe34SMasami Hiramatsu bool 293e7dbfe34SMasami Hiramatsu 2941f6d3a8fSMasami Hiramatsuconfig ARCH_CORRECT_STACKTRACE_ON_KRETPROBE 2951f6d3a8fSMasami Hiramatsu bool 2961f6d3a8fSMasami Hiramatsu help 2971f6d3a8fSMasami Hiramatsu Since kretprobes modifies return address on the stack, the 2981f6d3a8fSMasami Hiramatsu stacktrace may see the kretprobe trampoline address instead 2991f6d3a8fSMasami Hiramatsu of correct one. If the architecture stacktrace code and 3001f6d3a8fSMasami Hiramatsu unwinder can adjust such entries, select this configuration. 3011f6d3a8fSMasami Hiramatsu 302540adea3SMasami Hiramatsuconfig HAVE_FUNCTION_ERROR_INJECTION 3039802d865SJosef Bacik bool 3049802d865SJosef Bacik 30542a0bb3fSPetr Mladekconfig HAVE_NMI 30642a0bb3fSPetr Mladek bool 30742a0bb3fSPetr Mladek 308a257caccSChristophe Leroyconfig HAVE_FUNCTION_DESCRIPTORS 309a257caccSChristophe Leroy bool 310a257caccSChristophe Leroy 3114aae683fSMasahiro Yamadaconfig TRACE_IRQFLAGS_SUPPORT 3124aae683fSMasahiro Yamada bool 3134aae683fSMasahiro Yamada 3144510bffbSMark Rutlandconfig TRACE_IRQFLAGS_NMI_SUPPORT 3154510bffbSMark Rutland bool 3164510bffbSMark Rutland 3171f5a4ad9SRoland McGrath# 3181f5a4ad9SRoland McGrath# An arch should select this if it provides all these things: 3191f5a4ad9SRoland McGrath# 3201f5a4ad9SRoland McGrath# task_pt_regs() in asm/processor.h or asm/ptrace.h 3211f5a4ad9SRoland McGrath# arch_has_single_step() if there is hardware single-step support 3221f5a4ad9SRoland McGrath# arch_has_block_step() if there is hardware block-step support 3231f5a4ad9SRoland McGrath# asm/syscall.h supplying asm-generic/syscall.h interface 3241f5a4ad9SRoland McGrath# linux/regset.h user_regset interfaces 3251f5a4ad9SRoland McGrath# CORE_DUMP_USE_REGSET #define'd in linux/elf.h 326153474baSEric W. Biederman# TIF_SYSCALL_TRACE calls ptrace_report_syscall_{entry,exit} 32703248addSEric W. Biederman# TIF_NOTIFY_RESUME calls resume_user_mode_work() 3281f5a4ad9SRoland McGrath# 3291f5a4ad9SRoland McGrathconfig HAVE_ARCH_TRACEHOOK 3309ba16087SJan Beulich bool 3311f5a4ad9SRoland McGrath 332c64be2bbSMarek Szyprowskiconfig HAVE_DMA_CONTIGUOUS 333c64be2bbSMarek Szyprowski bool 334c64be2bbSMarek Szyprowski 33529d5e047SThomas Gleixnerconfig GENERIC_SMP_IDLE_THREAD 33629d5e047SThomas Gleixner bool 33729d5e047SThomas Gleixner 338485cf5daSKevin Hilmanconfig GENERIC_IDLE_POLL_SETUP 339485cf5daSKevin Hilman bool 340485cf5daSKevin Hilman 3416974f0c4SDaniel Micayconfig ARCH_HAS_FORTIFY_SOURCE 3426974f0c4SDaniel Micay bool 3436974f0c4SDaniel Micay help 3446974f0c4SDaniel Micay An architecture should select this when it can successfully 3456974f0c4SDaniel Micay build and run with CONFIG_FORTIFY_SOURCE. 3466974f0c4SDaniel Micay 347d8ae8a37SChristoph Hellwig# 348d8ae8a37SChristoph Hellwig# Select if the arch provides a historic keepinit alias for the retain_initrd 349d8ae8a37SChristoph Hellwig# command line option 350d8ae8a37SChristoph Hellwig# 351d8ae8a37SChristoph Hellwigconfig ARCH_HAS_KEEPINITRD 352d8ae8a37SChristoph Hellwig bool 353d8ae8a37SChristoph Hellwig 354d2852a22SDaniel Borkmann# Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h 355d2852a22SDaniel Borkmannconfig ARCH_HAS_SET_MEMORY 356d2852a22SDaniel Borkmann bool 357d2852a22SDaniel Borkmann 358d253ca0cSRick Edgecombe# Select if arch has all set_direct_map_invalid/default() functions 359d253ca0cSRick Edgecombeconfig ARCH_HAS_SET_DIRECT_MAP 360d253ca0cSRick Edgecombe bool 361d253ca0cSRick Edgecombe 362c30700dbSChristoph Hellwig# 363fa7e2247SChristoph Hellwig# Select if the architecture provides the arch_dma_set_uncached symbol to 364a86ecfa6SColin Ian King# either provide an uncached segment alias for a DMA allocation, or 365fa7e2247SChristoph Hellwig# to remap the page tables in place. 366c30700dbSChristoph Hellwig# 367fa7e2247SChristoph Hellwigconfig ARCH_HAS_DMA_SET_UNCACHED 368c30700dbSChristoph Hellwig bool 369c30700dbSChristoph Hellwig 370999a5d12SChristoph Hellwig# 371999a5d12SChristoph Hellwig# Select if the architectures provides the arch_dma_clear_uncached symbol 372999a5d12SChristoph Hellwig# to undo an in-place page table remap for uncached access. 373999a5d12SChristoph Hellwig# 374999a5d12SChristoph Hellwigconfig ARCH_HAS_DMA_CLEAR_UNCACHED 375f5e10287SThomas Gleixner bool 376f5e10287SThomas Gleixner 3777725acaaSThomas Gleixnerconfig ARCH_HAS_CPU_FINALIZE_INIT 3787725acaaSThomas Gleixner bool 3797725acaaSThomas Gleixner 380*dfc256daSThomas Gleixnerconfig ARCH_HAS_DELAY_TIMER 381*dfc256daSThomas Gleixner bool 382*dfc256daSThomas Gleixner 3838f23f5dbSJason Gunthorpe# The architecture has a per-task state that includes the mm's PASID 3848f23f5dbSJason Gunthorpeconfig ARCH_HAS_CPU_PASID 3858f23f5dbSJason Gunthorpe bool 3868f23f5dbSJason Gunthorpe select IOMMU_MM_DATA 3878f23f5dbSJason Gunthorpe 3885905429aSKees Cookconfig HAVE_ARCH_THREAD_STRUCT_WHITELIST 3895905429aSKees Cook bool 3905905429aSKees Cook help 3915905429aSKees Cook An architecture should select this to provide hardened usercopy 3925905429aSKees Cook knowledge about what region of the thread_struct should be 3935905429aSKees Cook whitelisted for copying to userspace. Normally this is only the 3945905429aSKees Cook FPU registers. Specifically, arch_thread_struct_whitelist() 3955905429aSKees Cook should be implemented. Without this, the entire thread_struct 3965905429aSKees Cook field in task_struct will be left whitelisted. 3975905429aSKees Cook 3985aaeb5c0SIngo Molnar# Select if arch wants to size task_struct dynamically via arch_task_struct_size: 3995aaeb5c0SIngo Molnarconfig ARCH_WANTS_DYNAMIC_TASK_STRUCT 4005aaeb5c0SIngo Molnar bool 4015aaeb5c0SIngo Molnar 40251c2ee6dSNick Desaulniersconfig ARCH_WANTS_NO_INSTR 40351c2ee6dSNick Desaulniers bool 40451c2ee6dSNick Desaulniers help 40551c2ee6dSNick Desaulniers An architecture should select this if the noinstr macro is being used on 40651c2ee6dSNick Desaulniers functions to denote that the toolchain should avoid instrumenting such 40751c2ee6dSNick Desaulniers functions and is required for correctness. 40851c2ee6dSNick Desaulniers 409942fa985SYury Norovconfig ARCH_32BIT_OFF_T 410942fa985SYury Norov bool 411942fa985SYury Norov depends on !64BIT 412942fa985SYury Norov help 413942fa985SYury Norov All new 32-bit architectures should have 64-bit off_t type on 414942fa985SYury Norov userspace side which corresponds to the loff_t kernel type. This 415942fa985SYury Norov is the requirement for modern ABIs. Some existing architectures 416942fa985SYury Norov still support 32-bit off_t. This option is enabled for all such 417942fa985SYury Norov architectures explicitly. 418942fa985SYury Norov 41996c0a6a7SHeiko Carstens# Selected by 64 bit architectures which have a 32 bit f_tinode in struct ustat 42096c0a6a7SHeiko Carstensconfig ARCH_32BIT_USTAT_F_TINODE 42196c0a6a7SHeiko Carstens bool 42296c0a6a7SHeiko Carstens 4236149fc36SThomas Gleixner# Selected by architectures with Total Store Order (TSO) 4246149fc36SThomas Gleixnerconfig ARCH_MEMORY_ORDER_TSO 4256149fc36SThomas Gleixner bool 4266149fc36SThomas Gleixner 4272ff2b7ecSMasahiro Yamadaconfig HAVE_ASM_MODVERSIONS 4282ff2b7ecSMasahiro Yamada bool 4292ff2b7ecSMasahiro Yamada help 430a86ecfa6SColin Ian King This symbol should be selected by an architecture if it provides 4312ff2b7ecSMasahiro Yamada <asm/asm-prototypes.h> to support the module versioning for symbols 4322ff2b7ecSMasahiro Yamada exported from assembly code. 4332ff2b7ecSMasahiro Yamada 434f850c30cSHeiko Carstensconfig HAVE_REGS_AND_STACK_ACCESS_API 435f850c30cSHeiko Carstens bool 436e01292b1SHeiko Carstens help 437a86ecfa6SColin Ian King This symbol should be selected by an architecture if it supports 438e01292b1SHeiko Carstens the API needed to access registers and stack entries from pt_regs, 439e01292b1SHeiko Carstens declared in asm/ptrace.h 440e01292b1SHeiko Carstens For example the kprobes-based event tracer needs this API. 441f850c30cSHeiko Carstens 442d7822b1eSMathieu Desnoyersconfig HAVE_RSEQ 443d7822b1eSMathieu Desnoyers bool 444d7822b1eSMathieu Desnoyers depends on HAVE_REGS_AND_STACK_ACCESS_API 445d7822b1eSMathieu Desnoyers help 446d7822b1eSMathieu Desnoyers This symbol should be selected by an architecture if it 447d7822b1eSMathieu Desnoyers supports an implementation of restartable sequences. 448d7822b1eSMathieu Desnoyers 4492f7ab126SMiguel Ojedaconfig HAVE_RUST 4502f7ab126SMiguel Ojeda bool 4512f7ab126SMiguel Ojeda help 4522f7ab126SMiguel Ojeda This symbol should be selected by an architecture if it 4532f7ab126SMiguel Ojeda supports Rust. 4542f7ab126SMiguel Ojeda 4553c88ee19SMasami Hiramatsuconfig HAVE_FUNCTION_ARG_ACCESS_API 4563c88ee19SMasami Hiramatsu bool 4573c88ee19SMasami Hiramatsu help 458a86ecfa6SColin Ian King This symbol should be selected by an architecture if it supports 4593c88ee19SMasami Hiramatsu the API needed to access function arguments from pt_regs, 4603c88ee19SMasami Hiramatsu declared in asm/ptrace.h 4613c88ee19SMasami Hiramatsu 46262a038d3SK.Prasadconfig HAVE_HW_BREAKPOINT 46362a038d3SK.Prasad bool 46499e8c5a3SFrederic Weisbecker depends on PERF_EVENTS 46562a038d3SK.Prasad 4660102752eSFrederic Weisbeckerconfig HAVE_MIXED_BREAKPOINTS_REGS 4670102752eSFrederic Weisbecker bool 4680102752eSFrederic Weisbecker depends on HAVE_HW_BREAKPOINT 4690102752eSFrederic Weisbecker help 4700102752eSFrederic Weisbecker Depending on the arch implementation of hardware breakpoints, 4710102752eSFrederic Weisbecker some of them have separate registers for data and instruction 4720102752eSFrederic Weisbecker breakpoints addresses, others have mixed registers to store 4730102752eSFrederic Weisbecker them but define the access type in a control register. 4740102752eSFrederic Weisbecker Select this option if your arch implements breakpoints under the 4750102752eSFrederic Weisbecker latter fashion. 4760102752eSFrederic Weisbecker 4777c68af6eSAvi Kivityconfig HAVE_USER_RETURN_NOTIFIER 4787c68af6eSAvi Kivity bool 479a1922ed6SIngo Molnar 480c01d4323SFrederic Weisbeckerconfig HAVE_PERF_EVENTS_NMI 481c01d4323SFrederic Weisbecker bool 48223637d47SFrederic Weisbecker help 48323637d47SFrederic Weisbecker System hardware can generate an NMI using the perf event 48423637d47SFrederic Weisbecker subsystem. Also has support for calculating CPU cycle events 48523637d47SFrederic Weisbecker to determine how many clock cycles in a given period. 486c01d4323SFrederic Weisbecker 48705a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_PERF 48805a4a952SNicholas Piggin bool 48905a4a952SNicholas Piggin depends on HAVE_PERF_EVENTS_NMI 49005a4a952SNicholas Piggin help 49105a4a952SNicholas Piggin The arch chooses to use the generic perf-NMI-based hardlockup 49205a4a952SNicholas Piggin detector. Must define HAVE_PERF_EVENTS_NMI. 49305a4a952SNicholas Piggin 49405a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_ARCH 49505a4a952SNicholas Piggin bool 49605a4a952SNicholas Piggin help 4971356d0b9SPetr Mladek The arch provides its own hardlockup detector implementation instead 4981356d0b9SPetr Mladek of the generic ones. 4991356d0b9SPetr Mladek 5001356d0b9SPetr Mladek It uses the same command line parameters, and sysctl interface, 5011356d0b9SPetr Mladek as the generic hardlockup detectors. 50205a4a952SNicholas Piggin 50371753c6eSJosh Poimboeufconfig UNWIND_USER 50471753c6eSJosh Poimboeuf bool 50571753c6eSJosh Poimboeuf 50671753c6eSJosh Poimboeufconfig HAVE_UNWIND_USER_FP 50771753c6eSJosh Poimboeuf bool 50871753c6eSJosh Poimboeuf select UNWIND_USER 50971753c6eSJosh Poimboeuf 510c5e63197SJiri Olsaconfig HAVE_PERF_REGS 511c5e63197SJiri Olsa bool 512c5e63197SJiri Olsa help 513c5e63197SJiri Olsa Support selective register dumps for perf events. This includes 514c5e63197SJiri Olsa bit-mapping of each registers and a unique architecture id. 515c5e63197SJiri Olsa 516c5ebcedbSJiri Olsaconfig HAVE_PERF_USER_STACK_DUMP 517c5ebcedbSJiri Olsa bool 518c5ebcedbSJiri Olsa help 519c5ebcedbSJiri Olsa Support user stack dumps for perf event samples. This needs 520c5ebcedbSJiri Olsa access to the user stack pointer which is not unified across 521c5ebcedbSJiri Olsa architectures. 522c5ebcedbSJiri Olsa 523bf5438fcSJason Baronconfig HAVE_ARCH_JUMP_LABEL 524bf5438fcSJason Baron bool 525bf5438fcSJason Baron 52650ff18abSArd Biesheuvelconfig HAVE_ARCH_JUMP_LABEL_RELATIVE 52750ff18abSArd Biesheuvel bool 52850ff18abSArd Biesheuvel 5290d6e24d4SPeter Zijlstraconfig MMU_GATHER_TABLE_FREE 5300d6e24d4SPeter Zijlstra bool 5310d6e24d4SPeter Zijlstra 532ff2e6d72SPeter Zijlstraconfig MMU_GATHER_RCU_TABLE_FREE 53326723911SPeter Zijlstra bool 5340d6e24d4SPeter Zijlstra select MMU_GATHER_TABLE_FREE 53526723911SPeter Zijlstra 5363af4bd03SPeter Zijlstraconfig MMU_GATHER_PAGE_SIZE 537ed6a7935SPeter Zijlstra bool 538ed6a7935SPeter Zijlstra 53927796d03SPeter Zijlstraconfig MMU_GATHER_NO_RANGE 54027796d03SPeter Zijlstra bool 5411e9fdf21SPeter Zijlstra select MMU_GATHER_MERGE_VMAS 5421e9fdf21SPeter Zijlstra 5431e9fdf21SPeter Zijlstraconfig MMU_GATHER_NO_FLUSH_CACHE 5441e9fdf21SPeter Zijlstra bool 5451e9fdf21SPeter Zijlstra 5461e9fdf21SPeter Zijlstraconfig MMU_GATHER_MERGE_VMAS 5471e9fdf21SPeter Zijlstra bool 54827796d03SPeter Zijlstra 549580a586cSPeter Zijlstraconfig MMU_GATHER_NO_GATHER 550952a31c9SMartin Schwidefsky bool 5510d6e24d4SPeter Zijlstra depends on MMU_GATHER_TABLE_FREE 552952a31c9SMartin Schwidefsky 553d53c3dfbSNicholas Pigginconfig ARCH_WANT_IRQS_OFF_ACTIVATE_MM 554d53c3dfbSNicholas Piggin bool 555d53c3dfbSNicholas Piggin help 556d53c3dfbSNicholas Piggin Temporary select until all architectures can be converted to have 557d53c3dfbSNicholas Piggin irqs disabled over activate_mm. Architectures that do IPI based TLB 558d53c3dfbSNicholas Piggin shootdowns should enable this. 559d53c3dfbSNicholas Piggin 56088e3009bSNicholas Piggin# Use normal mm refcounting for MMU_LAZY_TLB kernel thread references. 56188e3009bSNicholas Piggin# MMU_LAZY_TLB_REFCOUNT=n can improve the scalability of context switching 56288e3009bSNicholas Piggin# to/from kernel threads when the same mm is running on a lot of CPUs (a large 56388e3009bSNicholas Piggin# multi-threaded application), by reducing contention on the mm refcount. 56488e3009bSNicholas Piggin# 56588e3009bSNicholas Piggin# This can be disabled if the architecture ensures no CPUs are using an mm as a 56688e3009bSNicholas Piggin# "lazy tlb" beyond its final refcount (i.e., by the time __mmdrop frees the mm 56788e3009bSNicholas Piggin# or its kernel page tables). This could be arranged by arch_exit_mmap(), or 56888e3009bSNicholas Piggin# final exit(2) TLB flush, for example. 56988e3009bSNicholas Piggin# 57088e3009bSNicholas Piggin# To implement this, an arch *must*: 57188e3009bSNicholas Piggin# Ensure the _lazy_tlb variants of mmgrab/mmdrop are used when manipulating 57288e3009bSNicholas Piggin# the lazy tlb reference of a kthread's ->active_mm (non-arch code has been 57388e3009bSNicholas Piggin# converted already). 57488e3009bSNicholas Pigginconfig MMU_LAZY_TLB_REFCOUNT 57588e3009bSNicholas Piggin def_bool y 5762655421aSNicholas Piggin depends on !MMU_LAZY_TLB_SHOOTDOWN 5772655421aSNicholas Piggin 5782655421aSNicholas Piggin# This option allows MMU_LAZY_TLB_REFCOUNT=n. It ensures no CPUs are using an 5792655421aSNicholas Piggin# mm as a lazy tlb beyond its last reference count, by shooting down these 5802655421aSNicholas Piggin# users before the mm is deallocated. __mmdrop() first IPIs all CPUs that may 5812655421aSNicholas Piggin# be using the mm as a lazy tlb, so that they may switch themselves to using 5822655421aSNicholas Piggin# init_mm for their active mm. mm_cpumask(mm) is used to determine which CPUs 5832655421aSNicholas Piggin# may be using mm as a lazy tlb mm. 5842655421aSNicholas Piggin# 5852655421aSNicholas Piggin# To implement this, an arch *must*: 5862655421aSNicholas Piggin# - At the time of the final mmdrop of the mm, ensure mm_cpumask(mm) contains 5872655421aSNicholas Piggin# at least all possible CPUs in which the mm is lazy. 5882655421aSNicholas Piggin# - It must meet the requirements for MMU_LAZY_TLB_REFCOUNT=n (see above). 5892655421aSNicholas Pigginconfig MMU_LAZY_TLB_SHOOTDOWN 5902655421aSNicholas Piggin bool 59188e3009bSNicholas Piggin 592df013ffbSHuang Yingconfig ARCH_HAVE_NMI_SAFE_CMPXCHG 593df013ffbSHuang Ying bool 594df013ffbSHuang Ying 595a9c3475dSVignesh Balasubramanianconfig ARCH_HAVE_EXTRA_ELF_NOTES 596a9c3475dSVignesh Balasubramanian bool 597a9c3475dSVignesh Balasubramanian help 598a9c3475dSVignesh Balasubramanian An architecture should select this in order to enable adding an 599a9c3475dSVignesh Balasubramanian arch-specific ELF note section to core files. It must provide two 600a9c3475dSVignesh Balasubramanian functions: elf_coredump_extra_notes_size() and 601a9c3475dSVignesh Balasubramanian elf_coredump_extra_notes_write() which are invoked by the ELF core 602a9c3475dSVignesh Balasubramanian dumper. 603a9c3475dSVignesh Balasubramanian 6042e83b879SPaul E. McKenneyconfig ARCH_HAS_NMI_SAFE_THIS_CPU_OPS 6052e83b879SPaul E. McKenney bool 6062e83b879SPaul E. McKenney 60743570fd2SHeiko Carstensconfig HAVE_ALIGNED_STRUCT_PAGE 60843570fd2SHeiko Carstens bool 60943570fd2SHeiko Carstens help 61043570fd2SHeiko Carstens This makes sure that struct pages are double word aligned and that 61143570fd2SHeiko Carstens e.g. the SLUB allocator can perform double word atomic operations 61243570fd2SHeiko Carstens on a struct page for better performance. However selecting this 61343570fd2SHeiko Carstens might increase the size of a struct page by a word. 61443570fd2SHeiko Carstens 6154156153cSHeiko Carstensconfig HAVE_CMPXCHG_LOCAL 6164156153cSHeiko Carstens bool 6174156153cSHeiko Carstens 6182565409fSHeiko Carstensconfig HAVE_CMPXCHG_DOUBLE 6192565409fSHeiko Carstens bool 6202565409fSHeiko Carstens 62177e58496SPaul E. McKenneyconfig ARCH_WEAK_RELEASE_ACQUIRE 62277e58496SPaul E. McKenney bool 62377e58496SPaul E. McKenney 624c1d7e01dSWill Deaconconfig ARCH_WANT_IPC_PARSE_VERSION 625c1d7e01dSWill Deacon bool 626c1d7e01dSWill Deacon 627c1d7e01dSWill Deaconconfig ARCH_WANT_COMPAT_IPC_PARSE_VERSION 628c1d7e01dSWill Deacon bool 629c1d7e01dSWill Deacon 63048b25c43SChris Metcalfconfig ARCH_WANT_OLD_COMPAT_IPC 631c1d7e01dSWill Deacon select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 63248b25c43SChris Metcalf bool 63348b25c43SChris Metcalf 634282a181bSYiFei Zhuconfig HAVE_ARCH_SECCOMP 635e2cfabdfSWill Drewry bool 636e2cfabdfSWill Drewry help 637282a181bSYiFei Zhu An arch should select this symbol to support seccomp mode 1 (the fixed 638282a181bSYiFei Zhu syscall policy), and must provide an overrides for __NR_seccomp_sigreturn, 639282a181bSYiFei Zhu and compat syscalls if the asm-generic/seccomp.h defaults need adjustment: 640282a181bSYiFei Zhu - __NR_seccomp_read_32 641282a181bSYiFei Zhu - __NR_seccomp_write_32 642282a181bSYiFei Zhu - __NR_seccomp_exit_32 643282a181bSYiFei Zhu - __NR_seccomp_sigreturn_32 644282a181bSYiFei Zhu 645282a181bSYiFei Zhuconfig HAVE_ARCH_SECCOMP_FILTER 646282a181bSYiFei Zhu bool 647282a181bSYiFei Zhu select HAVE_ARCH_SECCOMP 648282a181bSYiFei Zhu help 649fb0fadf9SWill Drewry An arch should select this symbol if it provides all of these things: 650282a181bSYiFei Zhu - all the requirements for HAVE_ARCH_SECCOMP 651bb6ea430SWill Drewry - syscall_get_arch() 652bb6ea430SWill Drewry - syscall_get_arguments() 653bb6ea430SWill Drewry - syscall_rollback() 654bb6ea430SWill Drewry - syscall_set_return_value() 655fb0fadf9SWill Drewry - SIGSYS siginfo_t support 656fb0fadf9SWill Drewry - secure_computing is called from a ptrace_event()-safe context 6577ba2ba74SJinjie Ruan - secure_computing return value is checked and if false it 658fb0fadf9SWill Drewry results in the system call being skipped immediately. 65948dc92b9SKees Cook - seccomp syscall wired up 6600d8315ddSYiFei Zhu - if !HAVE_SPARSE_SYSCALL_NR, have SECCOMP_ARCH_NATIVE, 6610d8315ddSYiFei Zhu SECCOMP_ARCH_NATIVE_NR, SECCOMP_ARCH_NATIVE_NAME defined. If 6620d8315ddSYiFei Zhu COMPAT is supported, have the SECCOMP_ARCH_COMPAT* defines too. 663e2cfabdfSWill Drewry 664282a181bSYiFei Zhuconfig SECCOMP 665282a181bSYiFei Zhu prompt "Enable seccomp to safely execute untrusted bytecode" 666282a181bSYiFei Zhu def_bool y 667282a181bSYiFei Zhu depends on HAVE_ARCH_SECCOMP 668282a181bSYiFei Zhu help 669282a181bSYiFei Zhu This kernel feature is useful for number crunching applications 670282a181bSYiFei Zhu that may need to handle untrusted bytecode during their 671282a181bSYiFei Zhu execution. By using pipes or other transports made available 672282a181bSYiFei Zhu to the process as file descriptors supporting the read/write 673282a181bSYiFei Zhu syscalls, it's possible to isolate those applications in their 674282a181bSYiFei Zhu own address space using seccomp. Once seccomp is enabled via 675282a181bSYiFei Zhu prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be 676282a181bSYiFei Zhu disabled and the task is only allowed to execute a few safe 677282a181bSYiFei Zhu syscalls defined by each seccomp mode. 678282a181bSYiFei Zhu 679282a181bSYiFei Zhu If unsure, say Y. 680282a181bSYiFei Zhu 681e2cfabdfSWill Drewryconfig SECCOMP_FILTER 682e2cfabdfSWill Drewry def_bool y 683e2cfabdfSWill Drewry depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET 684e2cfabdfSWill Drewry help 685e2cfabdfSWill Drewry Enable tasks to build secure computing environments defined 686e2cfabdfSWill Drewry in terms of Berkeley Packet Filter programs which implement 687e2cfabdfSWill Drewry task-defined system call filtering polices. 688e2cfabdfSWill Drewry 6895fb94e9cSMauro Carvalho Chehab See Documentation/userspace-api/seccomp_filter.rst for details. 690e2cfabdfSWill Drewry 6910d8315ddSYiFei Zhuconfig SECCOMP_CACHE_DEBUG 6920d8315ddSYiFei Zhu bool "Show seccomp filter cache status in /proc/pid/seccomp_cache" 6930d8315ddSYiFei Zhu depends on SECCOMP_FILTER && !HAVE_SPARSE_SYSCALL_NR 6940d8315ddSYiFei Zhu depends on PROC_FS 6950d8315ddSYiFei Zhu help 6960d8315ddSYiFei Zhu This enables the /proc/pid/seccomp_cache interface to monitor 6970d8315ddSYiFei Zhu seccomp cache data. The file format is subject to change. Reading 6980d8315ddSYiFei Zhu the file requires CAP_SYS_ADMIN. 6990d8315ddSYiFei Zhu 7000d8315ddSYiFei Zhu This option is for debugging only. Enabling presents the risk that 7010d8315ddSYiFei Zhu an adversary may be able to infer the seccomp filter logic. 7020d8315ddSYiFei Zhu 7030d8315ddSYiFei Zhu If unsure, say N. 7040d8315ddSYiFei Zhu 70557fbad15SKees Cookconfig HAVE_ARCH_KSTACK_ERASE 706afaef01cSAlexander Popov bool 707afaef01cSAlexander Popov help 708afaef01cSAlexander Popov An architecture should select this if it has the code which 70957fbad15SKees Cook fills the used part of the kernel stack with the KSTACK_ERASE_POISON 710afaef01cSAlexander Popov value before returning from system calls. 711afaef01cSAlexander Popov 712d148eac0SMasahiro Yamadaconfig HAVE_STACKPROTECTOR 71319952a92SKees Cook bool 71419952a92SKees Cook help 71519952a92SKees Cook An arch should select this symbol if: 71619952a92SKees Cook - it has implemented a stack canary (e.g. __stack_chk_guard) 71719952a92SKees Cook 718050e9baaSLinus Torvaldsconfig STACKPROTECTOR 7192a61f474SMasahiro Yamada bool "Stack Protector buffer overflow detection" 720d148eac0SMasahiro Yamada depends on HAVE_STACKPROTECTOR 7212a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector) 7222a61f474SMasahiro Yamada default y 7238779657dSKees Cook help 7248779657dSKees Cook This option turns on the "stack-protector" GCC feature. This 72519952a92SKees Cook feature puts, at the beginning of functions, a canary value on 72619952a92SKees Cook the stack just before the return address, and validates 72719952a92SKees Cook the value just before actually returning. Stack based buffer 72819952a92SKees Cook overflows (that need to overwrite this return address) now also 72919952a92SKees Cook overwrite the canary, which gets detected and the attack is then 73019952a92SKees Cook neutralized via a kernel panic. 73119952a92SKees Cook 7328779657dSKees Cook Functions will have the stack-protector canary logic added if they 7338779657dSKees Cook have an 8-byte or larger character array on the stack. 7348779657dSKees Cook 73519952a92SKees Cook This feature requires gcc version 4.2 or above, or a distribution 7368779657dSKees Cook gcc with the feature backported ("-fstack-protector"). 7378779657dSKees Cook 7388779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 7398779657dSKees Cook about 3% of all kernel functions, which increases kernel code size 7408779657dSKees Cook by about 0.3%. 7418779657dSKees Cook 742050e9baaSLinus Torvaldsconfig STACKPROTECTOR_STRONG 7432a61f474SMasahiro Yamada bool "Strong Stack Protector" 744050e9baaSLinus Torvalds depends on STACKPROTECTOR 7452a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector-strong) 7462a61f474SMasahiro Yamada default y 7478779657dSKees Cook help 7488779657dSKees Cook Functions will have the stack-protector canary logic added in any 7498779657dSKees Cook of the following conditions: 7508779657dSKees Cook 7518779657dSKees Cook - local variable's address used as part of the right hand side of an 7528779657dSKees Cook assignment or function argument 7538779657dSKees Cook - local variable is an array (or union containing an array), 7548779657dSKees Cook regardless of array type or length 7558779657dSKees Cook - uses register local variables 7568779657dSKees Cook 7578779657dSKees Cook This feature requires gcc version 4.9 or above, or a distribution 7588779657dSKees Cook gcc with the feature backported ("-fstack-protector-strong"). 7598779657dSKees Cook 7608779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 7618779657dSKees Cook about 20% of all kernel functions, which increases the kernel code 7628779657dSKees Cook size by about 2%. 7638779657dSKees Cook 764d08b9f0cSSami Tolvanenconfig ARCH_SUPPORTS_SHADOW_CALL_STACK 765d08b9f0cSSami Tolvanen bool 766d08b9f0cSSami Tolvanen help 767afcf5441SDan Li An architecture should select this if it supports the compiler's 768afcf5441SDan Li Shadow Call Stack and implements runtime support for shadow stack 769aa7a65aeSWill Deacon switching. 770d08b9f0cSSami Tolvanen 771d08b9f0cSSami Tolvanenconfig SHADOW_CALL_STACK 772afcf5441SDan Li bool "Shadow Call Stack" 773afcf5441SDan Li depends on ARCH_SUPPORTS_SHADOW_CALL_STACK 77438792972SArd Biesheuvel depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER 7756f9dc684SSamuel Holland depends on MMU 776d08b9f0cSSami Tolvanen help 777afcf5441SDan Li This option enables the compiler's Shadow Call Stack, which 778afcf5441SDan Li uses a shadow stack to protect function return addresses from 779afcf5441SDan Li being overwritten by an attacker. More information can be found 780afcf5441SDan Li in the compiler's documentation: 781d08b9f0cSSami Tolvanen 782afcf5441SDan Li - Clang: https://clang.llvm.org/docs/ShadowCallStack.html 783afcf5441SDan Li - GCC: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#Instrumentation-Options 784d08b9f0cSSami Tolvanen 785d08b9f0cSSami Tolvanen Note that security guarantees in the kernel differ from the 786d08b9f0cSSami Tolvanen ones documented for user space. The kernel must store addresses 787d08b9f0cSSami Tolvanen of shadow stacks in memory, which means an attacker capable of 788d08b9f0cSSami Tolvanen reading and writing arbitrary memory may be able to locate them 789d08b9f0cSSami Tolvanen and hijack control flow by modifying the stacks. 790d08b9f0cSSami Tolvanen 7919beccca0SArd Biesheuvelconfig DYNAMIC_SCS 7929beccca0SArd Biesheuvel bool 7939beccca0SArd Biesheuvel help 7949beccca0SArd Biesheuvel Set by the arch code if it relies on code patching to insert the 7959beccca0SArd Biesheuvel shadow call stack push and pop instructions rather than on the 7969beccca0SArd Biesheuvel compiler. 7979beccca0SArd Biesheuvel 798dc5723b0SSami Tolvanenconfig LTO 799dc5723b0SSami Tolvanen bool 800dc5723b0SSami Tolvanen help 801dc5723b0SSami Tolvanen Selected if the kernel will be built using the compiler's LTO feature. 802dc5723b0SSami Tolvanen 803dc5723b0SSami Tolvanenconfig LTO_CLANG 804dc5723b0SSami Tolvanen bool 805dc5723b0SSami Tolvanen select LTO 806dc5723b0SSami Tolvanen help 807dc5723b0SSami Tolvanen Selected if the kernel will be built using Clang's LTO feature. 808dc5723b0SSami Tolvanen 809dc5723b0SSami Tolvanenconfig ARCH_SUPPORTS_LTO_CLANG 810dc5723b0SSami Tolvanen bool 811dc5723b0SSami Tolvanen help 812dc5723b0SSami Tolvanen An architecture should select this option if it supports: 813dc5723b0SSami Tolvanen - compiling with Clang, 814dc5723b0SSami Tolvanen - compiling inline assembly with Clang's integrated assembler, 815dc5723b0SSami Tolvanen - and linking with LLD. 816dc5723b0SSami Tolvanen 817dc5723b0SSami Tolvanenconfig ARCH_SUPPORTS_LTO_CLANG_THIN 818dc5723b0SSami Tolvanen bool 819dc5723b0SSami Tolvanen help 820dc5723b0SSami Tolvanen An architecture should select this option if it can support Clang's 821dc5723b0SSami Tolvanen ThinLTO mode. 822dc5723b0SSami Tolvanen 823dc5723b0SSami Tolvanenconfig HAS_LTO_CLANG 824dc5723b0SSami Tolvanen def_bool y 8251e68a8afSNathan Chancellor depends on CC_IS_CLANG && LD_IS_LLD && AS_IS_LLVM 826dc5723b0SSami Tolvanen depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) 827dc5723b0SSami Tolvanen depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) 828dc5723b0SSami Tolvanen depends on ARCH_SUPPORTS_LTO_CLANG 829dc5723b0SSami Tolvanen depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT 830dc5723b0SSami Tolvanen depends on !GCOV_KERNEL 831dc5723b0SSami Tolvanen help 832dc5723b0SSami Tolvanen The compiler and Kconfig options support building with Clang's 833dc5723b0SSami Tolvanen LTO. 834dc5723b0SSami Tolvanen 835dc5723b0SSami Tolvanenchoice 836dc5723b0SSami Tolvanen prompt "Link Time Optimization (LTO)" 837dc5723b0SSami Tolvanen default LTO_NONE 838dc5723b0SSami Tolvanen help 839dc5723b0SSami Tolvanen This option enables Link Time Optimization (LTO), which allows the 840dc5723b0SSami Tolvanen compiler to optimize binaries globally. 841dc5723b0SSami Tolvanen 842dc5723b0SSami Tolvanen If unsure, select LTO_NONE. Note that LTO is very resource-intensive 843dc5723b0SSami Tolvanen so it's disabled by default. 844dc5723b0SSami Tolvanen 845dc5723b0SSami Tolvanenconfig LTO_NONE 846dc5723b0SSami Tolvanen bool "None" 847dc5723b0SSami Tolvanen help 848dc5723b0SSami Tolvanen Build the kernel normally, without Link Time Optimization (LTO). 849dc5723b0SSami Tolvanen 850dc5723b0SSami Tolvanenconfig LTO_CLANG_FULL 851dc5723b0SSami Tolvanen bool "Clang Full LTO (EXPERIMENTAL)" 852dc5723b0SSami Tolvanen depends on HAS_LTO_CLANG 853dc5723b0SSami Tolvanen depends on !COMPILE_TEST 854dc5723b0SSami Tolvanen select LTO_CLANG 855dc5723b0SSami Tolvanen help 856dc5723b0SSami Tolvanen This option enables Clang's full Link Time Optimization (LTO), which 857dc5723b0SSami Tolvanen allows the compiler to optimize the kernel globally. If you enable 858dc5723b0SSami Tolvanen this option, the compiler generates LLVM bitcode instead of ELF 859dc5723b0SSami Tolvanen object files, and the actual compilation from bitcode happens at 860dc5723b0SSami Tolvanen the LTO link step, which may take several minutes depending on the 861dc5723b0SSami Tolvanen kernel configuration. More information can be found from LLVM's 862dc5723b0SSami Tolvanen documentation: 863dc5723b0SSami Tolvanen 864dc5723b0SSami Tolvanen https://llvm.org/docs/LinkTimeOptimization.html 865dc5723b0SSami Tolvanen 866dc5723b0SSami Tolvanen During link time, this option can use a large amount of RAM, and 867dc5723b0SSami Tolvanen may take much longer than the ThinLTO option. 868dc5723b0SSami Tolvanen 869dc5723b0SSami Tolvanenconfig LTO_CLANG_THIN 870dc5723b0SSami Tolvanen bool "Clang ThinLTO (EXPERIMENTAL)" 871dc5723b0SSami Tolvanen depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN 872dc5723b0SSami Tolvanen select LTO_CLANG 873dc5723b0SSami Tolvanen help 874dc5723b0SSami Tolvanen This option enables Clang's ThinLTO, which allows for parallel 875dc5723b0SSami Tolvanen optimization and faster incremental compiles compared to the 876dc5723b0SSami Tolvanen CONFIG_LTO_CLANG_FULL option. More information can be found 877dc5723b0SSami Tolvanen from Clang's documentation: 878dc5723b0SSami Tolvanen 879dc5723b0SSami Tolvanen https://clang.llvm.org/docs/ThinLTO.html 880dc5723b0SSami Tolvanen 881dc5723b0SSami Tolvanen If unsure, say Y. 8829f2aee8fSRong Xu 8839f2aee8fSRong Xuconfig LTO_CLANG_THIN_DIST 8849f2aee8fSRong Xu bool "Clang ThinLTO in distributed mode (EXPERIMENTAL)" 8859f2aee8fSRong Xu depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN 8869f2aee8fSRong Xu select LTO_CLANG 8879f2aee8fSRong Xu help 8889f2aee8fSRong Xu This option enables Clang's ThinLTO in distributed build mode. 8899f2aee8fSRong Xu In this mode, the linker performs the thin-link, generating 8909f2aee8fSRong Xu ThinLTO index files. Subsequently, the build system explicitly 8919f2aee8fSRong Xu invokes ThinLTO backend compilation using these index files 8929f2aee8fSRong Xu and pre-linked IR objects. The resulting native object files 8939f2aee8fSRong Xu are with the .thinlto-native.o suffix. 8949f2aee8fSRong Xu 8959f2aee8fSRong Xu This build mode offers improved visibility into the ThinLTO 8969f2aee8fSRong Xu process through explicit subcommand exposure. It also makes 8979f2aee8fSRong Xu final native object files directly available, benefiting 8989f2aee8fSRong Xu tools like objtool and kpatch. Additionally, it provides 8999f2aee8fSRong Xu crucial granular control over back-end options, enabling 9009f2aee8fSRong Xu module-specific compiler options, and simplifies debugging. 901dc5723b0SSami Tolvanenendchoice 902dc5723b0SSami Tolvanen 903315ad878SRong Xuconfig AUTOFDO_CLANG 904315ad878SRong Xu bool "Enable Clang's AutoFDO build (EXPERIMENTAL)" 905de0bf1e1SNathan Chancellor depends on CC_IS_CLANG 906315ad878SRong Xu help 907315ad878SRong Xu This option enables Clang’s AutoFDO build. When 908315ad878SRong Xu an AutoFDO profile is specified in variable 909315ad878SRong Xu CLANG_AUTOFDO_PROFILE during the build process, 910315ad878SRong Xu Clang uses the profile to optimize the kernel. 911315ad878SRong Xu 912315ad878SRong Xu If no profile is specified, AutoFDO options are 913315ad878SRong Xu still passed to Clang to facilitate the collection 914315ad878SRong Xu of perf data for creating an AutoFDO profile in 915315ad878SRong Xu subsequent builds. 916315ad878SRong Xu 917315ad878SRong Xu If unsure, say N. 918315ad878SRong Xu 919d5dc9583SRong Xuconfig PROPELLER_CLANG 920d5dc9583SRong Xu bool "Enable Clang's Propeller build" 921d5dc9583SRong Xu depends on CC_IS_CLANG && CLANG_VERSION >= 190000 9222566fa7bSRong Xu depends on $(cc-option,-fbasic-block-sections=list=/dev/null) 923d5dc9583SRong Xu help 924d5dc9583SRong Xu This option enables Clang’s Propeller build. When the Propeller 925d5dc9583SRong Xu profiles is specified in variable CLANG_PROPELLER_PROFILE_PREFIX 926d5dc9583SRong Xu during the build process, Clang uses the profiles to optimize 927d5dc9583SRong Xu the kernel. 928d5dc9583SRong Xu 929d5dc9583SRong Xu If no profile is specified, Propeller options are still passed 930d5dc9583SRong Xu to Clang to facilitate the collection of perf data for creating 931d5dc9583SRong Xu the Propeller profiles in subsequent builds. 932d5dc9583SRong Xu 933d5dc9583SRong Xu If unsure, say N. 934d5dc9583SRong Xu 93523ef9d43SKees Cookconfig ARCH_SUPPORTS_CFI 936cf68fffbSSami Tolvanen bool 937cf68fffbSSami Tolvanen help 93823ef9d43SKees Cook An architecture should select this option if it can support Kernel 93923ef9d43SKees Cook Control-Flow Integrity (CFI) checking (-fsanitize=kcfi). 940cf68fffbSSami Tolvanen 94189245600SSami Tolvanenconfig ARCH_USES_CFI_TRAPS 94289245600SSami Tolvanen bool 94323ef9d43SKees Cook help 94423ef9d43SKees Cook An architecture should select this option if it requires the 94523ef9d43SKees Cook .kcfi_traps section for KCFI trap handling. 94689245600SSami Tolvanen 94739c89ee6SNathan Chancellorconfig ARCH_USES_CFI_GENERIC_LLVM_PASS 94839c89ee6SNathan Chancellor bool 94939c89ee6SNathan Chancellor help 95039c89ee6SNathan Chancellor An architecture should select this option if it uses the generic 95139c89ee6SNathan Chancellor KCFIPass in LLVM to expand kCFI bundles instead of architecture-specific 95239c89ee6SNathan Chancellor lowering. 95339c89ee6SNathan Chancellor 95423ef9d43SKees Cookconfig CFI 95523ef9d43SKees Cook bool "Use Kernel Control Flow Integrity (kCFI)" 95623ef9d43SKees Cook default CFI_CLANG 95723ef9d43SKees Cook depends on ARCH_SUPPORTS_CFI 95889245600SSami Tolvanen depends on $(cc-option,-fsanitize=kcfi) 959cf68fffbSSami Tolvanen help 96023ef9d43SKees Cook This option enables forward-edge Control Flow Integrity (CFI) 96123ef9d43SKees Cook checking, where the compiler injects a runtime check to each 962cf68fffbSSami Tolvanen indirect function call to ensure the target is a valid function with 963cf68fffbSSami Tolvanen the correct static type. This restricts possible call targets and 964cf68fffbSSami Tolvanen makes it more difficult for an attacker to exploit bugs that allow 965cf68fffbSSami Tolvanen the modification of stored function pointers. More information can be 966cf68fffbSSami Tolvanen found from Clang's documentation: 967cf68fffbSSami Tolvanen 968cf68fffbSSami Tolvanen https://clang.llvm.org/docs/ControlFlowIntegrity.html 969cf68fffbSSami Tolvanen 97023ef9d43SKees Cookconfig CFI_CLANG 97123ef9d43SKees Cook bool 97223ef9d43SKees Cook transitional 97323ef9d43SKees Cook help 97423ef9d43SKees Cook Transitional config for CFI_CLANG to CFI migration. 97523ef9d43SKees Cook 976ce4a2620SAlice Ryhlconfig CFI_ICALL_NORMALIZE_INTEGERS 977ce4a2620SAlice Ryhl bool "Normalize CFI tags for integers" 97823ef9d43SKees Cook depends on CFI 97923ef9d43SKees Cook depends on HAVE_CFI_ICALL_NORMALIZE_INTEGERS 980ce4a2620SAlice Ryhl help 981ce4a2620SAlice Ryhl This option normalizes the CFI tags for integer types so that all 982ce4a2620SAlice Ryhl integer types of the same size and signedness receive the same CFI 983ce4a2620SAlice Ryhl tag. 984ce4a2620SAlice Ryhl 985ce4a2620SAlice Ryhl The option is separate from CONFIG_RUST because it affects the ABI. 986ce4a2620SAlice Ryhl When working with build systems that care about the ABI, it is 987ce4a2620SAlice Ryhl convenient to be able to turn on this flag first, before Rust is 988ce4a2620SAlice Ryhl turned on. 989ce4a2620SAlice Ryhl 990ce4a2620SAlice Ryhl This option is necessary for using CFI with Rust. If unsure, say N. 991ce4a2620SAlice Ryhl 99223ef9d43SKees Cookconfig HAVE_CFI_ICALL_NORMALIZE_INTEGERS 9938b8ca9c2SAlice Ryhl def_bool y 9944c66f830SAlice Ryhl depends on $(cc-option,-fsanitize=kcfi -fsanitize-cfi-icall-experimental-normalize-integers) 9958b8ca9c2SAlice Ryhl # With GCOV/KASAN we need this fix: https://github.com/llvm/llvm-project/pull/104826 9962313ab74SAlice Ryhl depends on CLANG_VERSION >= 190103 || (!GCOV_KERNEL && !KASAN_GENERIC && !KASAN_SW_TAGS) 9974c66f830SAlice Ryhl 9988b8ca9c2SAlice Ryhlconfig HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC 9998b8ca9c2SAlice Ryhl def_bool y 100023ef9d43SKees Cook depends on HAVE_CFI_ICALL_NORMALIZE_INTEGERS 1001812258ffSConor Dooley depends on ARM64 || X86_64 10028b8ca9c2SAlice Ryhl # With GCOV/KASAN we need this fix: https://github.com/rust-lang/rust/pull/129373 1003b28711acSMiguel Ojeda depends on RUSTC_LLVM_VERSION >= 190103 || \ 10048b8ca9c2SAlice Ryhl (!GCOV_KERNEL && !KASAN_GENERIC && !KASAN_SW_TAGS) 10054c66f830SAlice Ryhl 1006cf68fffbSSami Tolvanenconfig CFI_PERMISSIVE 1007cf68fffbSSami Tolvanen bool "Use CFI in permissive mode" 100823ef9d43SKees Cook depends on CFI 1009cf68fffbSSami Tolvanen help 1010cf68fffbSSami Tolvanen When selected, Control Flow Integrity (CFI) violations result in a 1011cf68fffbSSami Tolvanen warning instead of a kernel panic. This option should only be used 1012cf68fffbSSami Tolvanen for finding indirect call type mismatches during development. 1013cf68fffbSSami Tolvanen 1014cf68fffbSSami Tolvanen If unsure, say N. 1015cf68fffbSSami Tolvanen 10160f60a8efSKees Cookconfig HAVE_ARCH_WITHIN_STACK_FRAMES 10170f60a8efSKees Cook bool 10180f60a8efSKees Cook help 10190f60a8efSKees Cook An architecture should select this if it can walk the kernel stack 10200f60a8efSKees Cook frames to determine if an object is part of either the arguments 10210f60a8efSKees Cook or local variables (i.e. that it excludes saved return addresses, 10220f60a8efSKees Cook and similar) by implementing an inline arch_within_stack_frames(), 10230f60a8efSKees Cook which is used by CONFIG_HARDENED_USERCOPY. 10240f60a8efSKees Cook 102524a9c541SFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING_USER 10262b1d5024SFrederic Weisbecker bool 10272b1d5024SFrederic Weisbecker help 102891d1aa43SFrederic Weisbecker Provide kernel/user boundaries probes necessary for subsystems 102991d1aa43SFrederic Weisbecker that need it, such as userspace RCU extended quiescent state. 1030490f561bSFrederic Weisbecker Syscalls need to be wrapped inside user_exit()-user_enter(), either 1031490f561bSFrederic Weisbecker optimized behind static key or through the slow path using TIF_NOHZ 1032490f561bSFrederic Weisbecker flag. Exceptions handlers must be wrapped as well. Irqs are already 10336f0e6c15SFrederic Weisbecker protected inside ct_irq_enter/ct_irq_exit() but preemption or signal 1034490f561bSFrederic Weisbecker handling on irq exit still need to be protected. 1035490f561bSFrederic Weisbecker 103624a9c541SFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING_USER_OFFSTACK 103783c2da2eSFrederic Weisbecker bool 103883c2da2eSFrederic Weisbecker help 103983c2da2eSFrederic Weisbecker Architecture neither relies on exception_enter()/exception_exit() 104083c2da2eSFrederic Weisbecker nor on schedule_user(). Also preempt_schedule_notrace() and 104183c2da2eSFrederic Weisbecker preempt_schedule_irq() can't be called in a preemptible section 1042d65d411cSValentin Schneider while context tracking is CT_STATE_USER. This feature reflects a sane 104383c2da2eSFrederic Weisbecker entry implementation where the following requirements are met on 104483c2da2eSFrederic Weisbecker critical entry code, ie: before user_exit() or after user_enter(): 104583c2da2eSFrederic Weisbecker 104683c2da2eSFrederic Weisbecker - Critical entry code isn't preemptible (or better yet: 104783c2da2eSFrederic Weisbecker not interruptible). 1048493c1822SFrederic Weisbecker - No use of RCU read side critical sections, unless ct_nmi_enter() 104983c2da2eSFrederic Weisbecker got called. 105083c2da2eSFrederic Weisbecker - No use of instrumentation, unless instrumentation_begin() got 105183c2da2eSFrederic Weisbecker called. 105283c2da2eSFrederic Weisbecker 1053490f561bSFrederic Weisbeckerconfig HAVE_TIF_NOHZ 1054490f561bSFrederic Weisbecker bool 1055490f561bSFrederic Weisbecker help 1056490f561bSFrederic Weisbecker Arch relies on TIF_NOHZ and syscall slow path to implement context 1057490f561bSFrederic Weisbecker tracking calls to user_enter()/user_exit(). 10582b1d5024SFrederic Weisbecker 1059b952741cSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING 1060b952741cSFrederic Weisbecker bool 1061b952741cSFrederic Weisbecker 10622b91ec9fSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING_IDLE 10632b91ec9fSFrederic Weisbecker bool 10642b91ec9fSFrederic Weisbecker help 10652b91ec9fSFrederic Weisbecker Architecture has its own way to account idle CPU time and therefore 10662b91ec9fSFrederic Weisbecker doesn't implement vtime_account_idle(). 10672b91ec9fSFrederic Weisbecker 106840565b5aSStanislaw Gruszkaconfig ARCH_HAS_SCALED_CPUTIME 106940565b5aSStanislaw Gruszka bool 107040565b5aSStanislaw Gruszka 1071554b0004SKevin Hilmanconfig HAVE_VIRT_CPU_ACCOUNTING_GEN 1072554b0004SKevin Hilman bool 1073554b0004SKevin Hilman default y if 64BIT 1074554b0004SKevin Hilman help 1075554b0004SKevin Hilman With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. 1076554b0004SKevin Hilman Before enabling this option, arch code must be audited 1077554b0004SKevin Hilman to ensure there are no races in concurrent read/write of 1078554b0004SKevin Hilman cputime_t. For example, reading/writing 64-bit cputime_t on 1079554b0004SKevin Hilman some 32-bit arches may require multiple accesses, so proper 1080554b0004SKevin Hilman locking is needed to protect against concurrent accesses. 1081554b0004SKevin Hilman 1082fdf9c356SFrederic Weisbeckerconfig HAVE_IRQ_TIME_ACCOUNTING 1083fdf9c356SFrederic Weisbecker bool 1084fdf9c356SFrederic Weisbecker help 1085fdf9c356SFrederic Weisbecker Archs need to ensure they use a high enough resolution clock to 1086fdf9c356SFrederic Weisbecker support irq time accounting and then call enable_sched_clock_irqtime(). 1087fdf9c356SFrederic Weisbecker 1088e6b2aa6dSJuergen Grossconfig HAVE_PV_STEAL_CLOCK_GEN 1089e6b2aa6dSJuergen Gross bool 1090e6b2aa6dSJuergen Gross 1091c49dd340SKalesh Singhconfig HAVE_MOVE_PUD 1092c49dd340SKalesh Singh bool 1093c49dd340SKalesh Singh help 1094c49dd340SKalesh Singh Architectures that select this are able to move page tables at the 1095c49dd340SKalesh Singh PUD level. If there are only 3 page table levels, the move effectively 1096c49dd340SKalesh Singh happens at the PGD level. 1097c49dd340SKalesh Singh 10982c91bd4aSJoel Fernandes (Google)config HAVE_MOVE_PMD 10992c91bd4aSJoel Fernandes (Google) bool 11002c91bd4aSJoel Fernandes (Google) help 11012c91bd4aSJoel Fernandes (Google) Archs that select this are able to move page tables at the PMD level. 11022c91bd4aSJoel Fernandes (Google) 110315626062SGerald Schaeferconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE 110415626062SGerald Schaefer bool 110515626062SGerald Schaefer 1106a00cc7d9SMatthew Wilcoxconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 1107a00cc7d9SMatthew Wilcox bool 1108a00cc7d9SMatthew Wilcox 11090ddab1d2SToshi Kaniconfig HAVE_ARCH_HUGE_VMAP 11100ddab1d2SToshi Kani bool 11110ddab1d2SToshi Kani 1112121e6f32SNicholas Piggin# 1113121e6f32SNicholas Piggin# Archs that select this would be capable of PMD-sized vmaps (i.e., 1114559089e0SSong Liu# arch_vmap_pmd_supported() returns true). The VM_ALLOW_HUGE_VMAP flag 1115559089e0SSong Liu# must be used to enable allocations to use hugepages. 1116121e6f32SNicholas Piggin# 1117121e6f32SNicholas Pigginconfig HAVE_ARCH_HUGE_VMALLOC 1118121e6f32SNicholas Piggin depends on HAVE_ARCH_HUGE_VMAP 1119121e6f32SNicholas Piggin bool 1120121e6f32SNicholas Piggin 11213876d4a3SAlexandre Ghiticonfig ARCH_WANT_HUGE_PMD_SHARE 11223876d4a3SAlexandre Ghiti bool 11233876d4a3SAlexandre Ghiti 11242f0584f3SRick Edgecombe# Archs that want to use pmd_mkwrite on kernel memory need it defined even 11252f0584f3SRick Edgecombe# if there are no userspace memory management features that use it 11262f0584f3SRick Edgecombeconfig ARCH_WANT_KERNEL_PMD_MKWRITE 11272f0584f3SRick Edgecombe bool 11282f0584f3SRick Edgecombe 11292f0584f3SRick Edgecombeconfig ARCH_WANT_PMD_MKWRITE 11302f0584f3SRick Edgecombe def_bool TRANSPARENT_HUGEPAGE || ARCH_WANT_KERNEL_PMD_MKWRITE 11312f0584f3SRick Edgecombe 11320f8975ecSPavel Emelyanovconfig HAVE_ARCH_SOFT_DIRTY 11330f8975ecSPavel Emelyanov bool 11340f8975ecSPavel Emelyanov 1135786d35d4SDavid Howellsconfig HAVE_MOD_ARCH_SPECIFIC 1136786d35d4SDavid Howells bool 1137786d35d4SDavid Howells help 1138786d35d4SDavid Howells The arch uses struct mod_arch_specific to store data. Many arches 1139786d35d4SDavid Howells just need a simple module loader without arch specific data - those 1140786d35d4SDavid Howells should not enable this. 1141786d35d4SDavid Howells 1142786d35d4SDavid Howellsconfig MODULES_USE_ELF_RELA 1143786d35d4SDavid Howells bool 1144786d35d4SDavid Howells help 1145786d35d4SDavid Howells Modules only use ELF RELA relocations. Modules with ELF REL 1146786d35d4SDavid Howells relocations will give an error. 1147786d35d4SDavid Howells 1148786d35d4SDavid Howellsconfig MODULES_USE_ELF_REL 1149786d35d4SDavid Howells bool 1150786d35d4SDavid Howells help 1151786d35d4SDavid Howells Modules only use ELF REL relocations. Modules with ELF RELA 1152786d35d4SDavid Howells relocations will give an error. 1153786d35d4SDavid Howells 115401dc0386SChristophe Leroyconfig ARCH_WANTS_MODULES_DATA_IN_VMALLOC 115501dc0386SChristophe Leroy bool 115601dc0386SChristophe Leroy help 115701dc0386SChristophe Leroy For architectures like powerpc/32 which have constraints on module 115801dc0386SChristophe Leroy allocation and need to allocate module data outside of module area. 115901dc0386SChristophe Leroy 11601221365fSHelge Dellerconfig ARCH_WANTS_MODULES_TEXT_SECTIONS 11611221365fSHelge Deller bool 11621221365fSHelge Deller help 11631221365fSHelge Deller For architectures like 32-bit parisc which require that functions in 11641221365fSHelge Deller modules have to keep code in own text sections (-ffunction-sections) 11651221365fSHelge Deller and to avoid merging all text into one big text section, 11661221365fSHelge Deller 1167223b5e57SMike Rapoport (IBM)config ARCH_WANTS_EXECMEM_LATE 1168223b5e57SMike Rapoport (IBM) bool 1169223b5e57SMike Rapoport (IBM) help 1170223b5e57SMike Rapoport (IBM) For architectures that do not allocate executable memory early on 1171223b5e57SMike Rapoport (IBM) boot, but rather require its initialization late when there is 1172223b5e57SMike Rapoport (IBM) enough entropy for module space randomization, for instance 1173223b5e57SMike Rapoport (IBM) arm64. 1174223b5e57SMike Rapoport (IBM) 11752e45474aSMike Rapoport (Microsoft)config ARCH_HAS_EXECMEM_ROX 11762e45474aSMike Rapoport (Microsoft) bool 11772e45474aSMike Rapoport (Microsoft) depends on MMU && !HIGHMEM 11782e45474aSMike Rapoport (Microsoft) help 11792e45474aSMike Rapoport (Microsoft) For architectures that support allocations of executable memory 11802e45474aSMike Rapoport (Microsoft) with read-only execute permissions. Architecture must implement 11812e45474aSMike Rapoport (Microsoft) execmem_fill_trapping_insns() callback to enable this. 11822e45474aSMike Rapoport (Microsoft) 1183cc1f0274SFrederic Weisbeckerconfig HAVE_IRQ_EXIT_ON_IRQ_STACK 1184cc1f0274SFrederic Weisbecker bool 1185cc1f0274SFrederic Weisbecker help 1186cc1f0274SFrederic Weisbecker Architecture doesn't only execute the irq handler on the irq stack 1187cc1f0274SFrederic Weisbecker but also irq_exit(). This way we can process softirqs on this irq 1188cc1f0274SFrederic Weisbecker stack instead of switching to a new one when we call __do_softirq() 1189cc1f0274SFrederic Weisbecker in the end of an hardirq. 1190cc1f0274SFrederic Weisbecker This spares a stack switch and improves cache usage on softirq 1191cc1f0274SFrederic Weisbecker processing. 1192cc1f0274SFrederic Weisbecker 1193cd1a41ceSThomas Gleixnerconfig HAVE_SOFTIRQ_ON_OWN_STACK 1194cd1a41ceSThomas Gleixner bool 1195cd1a41ceSThomas Gleixner help 1196cd1a41ceSThomas Gleixner Architecture provides a function to run __do_softirq() on a 1197c226bc3cSColin Ian King separate stack. 1198cd1a41ceSThomas Gleixner 11998cbb2b50SSebastian Andrzej Siewiorconfig SOFTIRQ_ON_OWN_STACK 12008cbb2b50SSebastian Andrzej Siewior def_bool HAVE_SOFTIRQ_ON_OWN_STACK && !PREEMPT_RT 12018cbb2b50SSebastian Andrzej Siewior 120212700c17SArnd Bergmannconfig ALTERNATE_USER_ADDRESS_SPACE 120312700c17SArnd Bergmann bool 120412700c17SArnd Bergmann help 120512700c17SArnd Bergmann Architectures set this when the CPU uses separate address 120612700c17SArnd Bergmann spaces for kernel and user space pointers. In this case, the 120712700c17SArnd Bergmann access_ok() check on a __user pointer is skipped. 120812700c17SArnd Bergmann 1209235a8f02SKirill A. Shutemovconfig PGTABLE_LEVELS 1210235a8f02SKirill A. Shutemov int 1211235a8f02SKirill A. Shutemov default 2 1212235a8f02SKirill A. Shutemov 12132b68f6caSKees Cookconfig ARCH_HAS_ELF_RANDOMIZE 12142b68f6caSKees Cook bool 12152b68f6caSKees Cook help 12162b68f6caSKees Cook An architecture supports choosing randomized locations for 12172b68f6caSKees Cook stack, mmap, brk, and ET_DYN. Defined functions: 12182b68f6caSKees Cook - arch_mmap_rnd() 1219204db6edSKees Cook - arch_randomize_brk() 12202b68f6caSKees Cook 1221d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_BITS 1222d07e2259SDaniel Cashman bool 1223d07e2259SDaniel Cashman help 1224d07e2259SDaniel Cashman An arch should select this symbol if it supports setting a variable 1225d07e2259SDaniel Cashman number of bits for use in establishing the base address for mmap 1226d07e2259SDaniel Cashman allocations, has MMU enabled and provides values for both: 1227d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MIN 1228d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MAX 1229d07e2259SDaniel Cashman 12305f56a5dfSJiri Slabyconfig HAVE_EXIT_THREAD 12315f56a5dfSJiri Slaby bool 12325f56a5dfSJiri Slaby help 12335f56a5dfSJiri Slaby An architecture implements exit_thread. 12345f56a5dfSJiri Slaby 1235d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MIN 1236d07e2259SDaniel Cashman int 1237d07e2259SDaniel Cashman 1238d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MAX 1239d07e2259SDaniel Cashman int 1240d07e2259SDaniel Cashman 1241d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_DEFAULT 1242d07e2259SDaniel Cashman int 1243d07e2259SDaniel Cashman 1244d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS 1245d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address" if EXPERT 1246d07e2259SDaniel Cashman range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX 1247d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT 1248d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_MIN 1249d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_BITS 1250d07e2259SDaniel Cashman help 1251d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 1252d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 1253d07e2259SDaniel Cashman resulting from mmap allocations. This value will be bounded 1254d07e2259SDaniel Cashman by the architecture's minimum and maximum supported values. 1255d07e2259SDaniel Cashman 1256d07e2259SDaniel Cashman This value can be changed after boot using the 1257d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_bits tunable 1258d07e2259SDaniel Cashman 1259d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_COMPAT_BITS 1260d07e2259SDaniel Cashman bool 1261d07e2259SDaniel Cashman help 1262d07e2259SDaniel Cashman An arch should select this symbol if it supports running applications 1263d07e2259SDaniel Cashman in compatibility mode, supports setting a variable number of bits for 1264d07e2259SDaniel Cashman use in establishing the base address for mmap allocations, has MMU 1265d07e2259SDaniel Cashman enabled and provides values for both: 1266d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MIN 1267d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MAX 1268d07e2259SDaniel Cashman 1269d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MIN 1270d07e2259SDaniel Cashman int 1271d07e2259SDaniel Cashman 1272d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MAX 1273d07e2259SDaniel Cashman int 1274d07e2259SDaniel Cashman 1275d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 1276d07e2259SDaniel Cashman int 1277d07e2259SDaniel Cashman 1278d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS 1279d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT 1280d07e2259SDaniel Cashman range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX 1281d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 1282d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_MIN 1283d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS 1284d07e2259SDaniel Cashman help 1285d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 1286d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 1287d07e2259SDaniel Cashman resulting from mmap allocations for compatible applications This 1288d07e2259SDaniel Cashman value will be bounded by the architecture's minimum and maximum 1289d07e2259SDaniel Cashman supported values. 1290d07e2259SDaniel Cashman 1291d07e2259SDaniel Cashman This value can be changed after boot using the 1292d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_compat_bits tunable 1293d07e2259SDaniel Cashman 12941b028f78SDmitry Safonovconfig HAVE_ARCH_COMPAT_MMAP_BASES 12951b028f78SDmitry Safonov bool 12961b028f78SDmitry Safonov help 12971b028f78SDmitry Safonov This allows 64bit applications to invoke 32-bit mmap() syscall 12981b028f78SDmitry Safonov and vice-versa 32-bit applications to call 64-bit mmap(). 12991b028f78SDmitry Safonov Required for applications doing different bitness syscalls. 13001b028f78SDmitry Safonov 1301ba89f9c8SArnd Bergmannconfig HAVE_PAGE_SIZE_4KB 1302ba89f9c8SArnd Bergmann bool 1303ba89f9c8SArnd Bergmann 1304ba89f9c8SArnd Bergmannconfig HAVE_PAGE_SIZE_8KB 1305ba89f9c8SArnd Bergmann bool 1306ba89f9c8SArnd Bergmann 1307ba89f9c8SArnd Bergmannconfig HAVE_PAGE_SIZE_16KB 1308ba89f9c8SArnd Bergmann bool 1309ba89f9c8SArnd Bergmann 1310ba89f9c8SArnd Bergmannconfig HAVE_PAGE_SIZE_32KB 1311ba89f9c8SArnd Bergmann bool 1312ba89f9c8SArnd Bergmann 1313ba89f9c8SArnd Bergmannconfig HAVE_PAGE_SIZE_64KB 1314ba89f9c8SArnd Bergmann bool 1315ba89f9c8SArnd Bergmann 1316ba89f9c8SArnd Bergmannconfig HAVE_PAGE_SIZE_256KB 1317ba89f9c8SArnd Bergmann bool 1318ba89f9c8SArnd Bergmann 1319ba89f9c8SArnd Bergmannchoice 1320ba89f9c8SArnd Bergmann prompt "MMU page size" 1321ba89f9c8SArnd Bergmann 1322ba89f9c8SArnd Bergmannconfig PAGE_SIZE_4KB 1323ba89f9c8SArnd Bergmann bool "4KiB pages" 1324ba89f9c8SArnd Bergmann depends on HAVE_PAGE_SIZE_4KB 1325ba89f9c8SArnd Bergmann help 1326ba89f9c8SArnd Bergmann This option select the standard 4KiB Linux page size and the only 1327ba89f9c8SArnd Bergmann available option on many architectures. Using 4KiB page size will 1328ba89f9c8SArnd Bergmann minimize memory consumption and is therefore recommended for low 1329ba89f9c8SArnd Bergmann memory systems. 1330ba89f9c8SArnd Bergmann Some software that is written for x86 systems makes incorrect 1331ba89f9c8SArnd Bergmann assumptions about the page size and only runs on 4KiB pages. 1332ba89f9c8SArnd Bergmann 1333ba89f9c8SArnd Bergmannconfig PAGE_SIZE_8KB 1334ba89f9c8SArnd Bergmann bool "8KiB pages" 1335ba89f9c8SArnd Bergmann depends on HAVE_PAGE_SIZE_8KB 1336ba89f9c8SArnd Bergmann help 1337ba89f9c8SArnd Bergmann This option is the only supported page size on a few older 1338ba89f9c8SArnd Bergmann processors, and can be slightly faster than 4KiB pages. 1339ba89f9c8SArnd Bergmann 1340ba89f9c8SArnd Bergmannconfig PAGE_SIZE_16KB 1341ba89f9c8SArnd Bergmann bool "16KiB pages" 1342ba89f9c8SArnd Bergmann depends on HAVE_PAGE_SIZE_16KB 1343ba89f9c8SArnd Bergmann help 1344ba89f9c8SArnd Bergmann This option is usually a good compromise between memory 1345ba89f9c8SArnd Bergmann consumption and performance for typical desktop and server 1346ba89f9c8SArnd Bergmann workloads, often saving a level of page table lookups compared 1347ba89f9c8SArnd Bergmann to 4KB pages as well as reducing TLB pressure and overhead of 1348ba89f9c8SArnd Bergmann per-page operations in the kernel at the expense of a larger 1349ba89f9c8SArnd Bergmann page cache. 1350ba89f9c8SArnd Bergmann 1351ba89f9c8SArnd Bergmannconfig PAGE_SIZE_32KB 1352ba89f9c8SArnd Bergmann bool "32KiB pages" 1353ba89f9c8SArnd Bergmann depends on HAVE_PAGE_SIZE_32KB 1354ba89f9c8SArnd Bergmann help 1355ba89f9c8SArnd Bergmann Using 32KiB page size will result in slightly higher performance 1356ba89f9c8SArnd Bergmann kernel at the price of higher memory consumption compared to 1357ba89f9c8SArnd Bergmann 16KiB pages. This option is available only on cnMIPS cores. 1358ba89f9c8SArnd Bergmann Note that you will need a suitable Linux distribution to 1359ba89f9c8SArnd Bergmann support this. 1360ba89f9c8SArnd Bergmann 1361ba89f9c8SArnd Bergmannconfig PAGE_SIZE_64KB 1362ba89f9c8SArnd Bergmann bool "64KiB pages" 1363ba89f9c8SArnd Bergmann depends on HAVE_PAGE_SIZE_64KB 1364ba89f9c8SArnd Bergmann help 1365ba89f9c8SArnd Bergmann Using 64KiB page size will result in slightly higher performance 1366ba89f9c8SArnd Bergmann kernel at the price of much higher memory consumption compared to 1367ba89f9c8SArnd Bergmann 4KiB or 16KiB pages. 1368ba89f9c8SArnd Bergmann This is not suitable for general-purpose workloads but the 1369ba89f9c8SArnd Bergmann better performance may be worth the cost for certain types of 1370ba89f9c8SArnd Bergmann supercomputing or database applications that work mostly with 1371ba89f9c8SArnd Bergmann large in-memory data rather than small files. 1372ba89f9c8SArnd Bergmann 1373ba89f9c8SArnd Bergmannconfig PAGE_SIZE_256KB 1374ba89f9c8SArnd Bergmann bool "256KiB pages" 1375ba89f9c8SArnd Bergmann depends on HAVE_PAGE_SIZE_256KB 1376ba89f9c8SArnd Bergmann help 1377ba89f9c8SArnd Bergmann 256KiB pages have little practical value due to their extreme 1378ba89f9c8SArnd Bergmann memory usage. The kernel will only be able to run applications 1379ba89f9c8SArnd Bergmann that have been compiled with '-zmax-page-size' set to 256KiB 1380ba89f9c8SArnd Bergmann (the default is 64KiB or 4KiB on most architectures). 1381ba89f9c8SArnd Bergmann 1382ba89f9c8SArnd Bergmannendchoice 1383ba89f9c8SArnd Bergmann 13841f0e290cSGuenter Roeckconfig PAGE_SIZE_LESS_THAN_64KB 13851f0e290cSGuenter Roeck def_bool y 13861f0e290cSGuenter Roeck depends on !PAGE_SIZE_64KB 1387e4bbd20dSNathan Chancellor depends on PAGE_SIZE_LESS_THAN_256KB 1388e4bbd20dSNathan Chancellor 1389e4bbd20dSNathan Chancellorconfig PAGE_SIZE_LESS_THAN_256KB 1390e4bbd20dSNathan Chancellor def_bool y 13911f0e290cSGuenter Roeck depends on !PAGE_SIZE_256KB 13921f0e290cSGuenter Roeck 1393ba89f9c8SArnd Bergmannconfig PAGE_SHIFT 1394ba89f9c8SArnd Bergmann int 1395ba89f9c8SArnd Bergmann default 12 if PAGE_SIZE_4KB 1396ba89f9c8SArnd Bergmann default 13 if PAGE_SIZE_8KB 1397ba89f9c8SArnd Bergmann default 14 if PAGE_SIZE_16KB 1398ba89f9c8SArnd Bergmann default 15 if PAGE_SIZE_32KB 1399ba89f9c8SArnd Bergmann default 16 if PAGE_SIZE_64KB 1400ba89f9c8SArnd Bergmann default 18 if PAGE_SIZE_256KB 1401ba89f9c8SArnd Bergmann 140267f3977fSAlexandre Ghiti# This allows to use a set of generic functions to determine mmap base 140367f3977fSAlexandre Ghiti# address by giving priority to top-down scheme only if the process 140467f3977fSAlexandre Ghiti# is not in legacy mode (compat task, unlimited stack size or 140567f3977fSAlexandre Ghiti# sysctl_legacy_va_layout). 140667f3977fSAlexandre Ghiti# Architecture that selects this option can provide its own version of: 140767f3977fSAlexandre Ghiti# - STACK_RND_MASK 140867f3977fSAlexandre Ghiticonfig ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 140967f3977fSAlexandre Ghiti bool 141067f3977fSAlexandre Ghiti depends on MMU 1411e7142bf5SAlexandre Ghiti select ARCH_HAS_ELF_RANDOMIZE 141267f3977fSAlexandre Ghiti 141303f16cd0SJosh Poimboeufconfig HAVE_OBJTOOL 141403f16cd0SJosh Poimboeuf bool 141503f16cd0SJosh Poimboeuf 14164ab7674fSJosh Poimboeufconfig HAVE_JUMP_LABEL_HACK 14174ab7674fSJosh Poimboeuf bool 14184ab7674fSJosh Poimboeuf 141922102f45SJosh Poimboeufconfig HAVE_NOINSTR_HACK 142022102f45SJosh Poimboeuf bool 142122102f45SJosh Poimboeuf 1422489e355bSJosh Poimboeufconfig HAVE_NOINSTR_VALIDATION 1423489e355bSJosh Poimboeuf bool 1424489e355bSJosh Poimboeuf 14255f3da8c0SJosh Poimboeufconfig HAVE_UACCESS_VALIDATION 14265f3da8c0SJosh Poimboeuf bool 14275f3da8c0SJosh Poimboeuf select OBJTOOL 14285f3da8c0SJosh Poimboeuf 1429b9ab5ebbSJosh Poimboeufconfig HAVE_STACK_VALIDATION 1430b9ab5ebbSJosh Poimboeuf bool 1431b9ab5ebbSJosh Poimboeuf help 143203f16cd0SJosh Poimboeuf Architecture supports objtool compile-time frame pointer rule 143303f16cd0SJosh Poimboeuf validation. 1434b9ab5ebbSJosh Poimboeuf 1435af085d90SJosh Poimboeufconfig HAVE_RELIABLE_STACKTRACE 1436af085d90SJosh Poimboeuf bool 1437af085d90SJosh Poimboeuf help 1438140d7e88SMiroslav Benes Architecture has either save_stack_trace_tsk_reliable() or 1439140d7e88SMiroslav Benes arch_stack_walk_reliable() function which only returns a stack trace 1440140d7e88SMiroslav Benes if it can guarantee the trace is reliable. 1441af085d90SJosh Poimboeuf 1442468a9428SGeorge Spelvinconfig HAVE_ARCH_HASH 1443468a9428SGeorge Spelvin bool 1444468a9428SGeorge Spelvin default n 1445468a9428SGeorge Spelvin help 1446468a9428SGeorge Spelvin If this is set, the architecture provides an <asm/hash.h> 1447468a9428SGeorge Spelvin file which provides platform-specific implementations of some 1448468a9428SGeorge Spelvin functions in <linux/hash.h> or fs/namei.c. 1449468a9428SGeorge Spelvin 1450666047feSFinn Thainconfig HAVE_ARCH_NVRAM_OPS 1451666047feSFinn Thain bool 1452666047feSFinn Thain 14533a495511SWilliam Breathitt Grayconfig ISA_BUS_API 14543a495511SWilliam Breathitt Gray def_bool ISA 14553a495511SWilliam Breathitt Gray 1456d2125043SAl Viro# 1457d2125043SAl Viro# ABI hall of shame 1458d2125043SAl Viro# 1459d2125043SAl Viroconfig CLONE_BACKWARDS 1460d2125043SAl Viro bool 1461d2125043SAl Viro help 1462d2125043SAl Viro Architecture has tls passed as the 4th argument of clone(2), 1463d2125043SAl Viro not the 5th one. 1464d2125043SAl Viro 1465d2125043SAl Viroconfig CLONE_BACKWARDS2 1466d2125043SAl Viro bool 1467d2125043SAl Viro help 1468d2125043SAl Viro Architecture has the first two arguments of clone(2) swapped. 1469d2125043SAl Viro 1470dfa9771aSMichal Simekconfig CLONE_BACKWARDS3 1471dfa9771aSMichal Simek bool 1472dfa9771aSMichal Simek help 1473dfa9771aSMichal Simek Architecture has tls passed as the 3rd argument of clone(2), 1474dfa9771aSMichal Simek not the 5th one. 1475dfa9771aSMichal Simek 1476eaca6eaeSAl Viroconfig ODD_RT_SIGACTION 1477eaca6eaeSAl Viro bool 1478eaca6eaeSAl Viro help 1479eaca6eaeSAl Viro Architecture has unusual rt_sigaction(2) arguments 1480eaca6eaeSAl Viro 14810a0e8cdfSAl Viroconfig OLD_SIGSUSPEND 14820a0e8cdfSAl Viro bool 14830a0e8cdfSAl Viro help 14840a0e8cdfSAl Viro Architecture has old sigsuspend(2) syscall, of one-argument variety 14850a0e8cdfSAl Viro 14860a0e8cdfSAl Viroconfig OLD_SIGSUSPEND3 14870a0e8cdfSAl Viro bool 14880a0e8cdfSAl Viro help 14890a0e8cdfSAl Viro Even weirder antique ABI - three-argument sigsuspend(2) 14900a0e8cdfSAl Viro 1491495dfbf7SAl Viroconfig OLD_SIGACTION 1492495dfbf7SAl Viro bool 1493495dfbf7SAl Viro help 1494495dfbf7SAl Viro Architecture has old sigaction(2) syscall. Nope, not the same 1495495dfbf7SAl Viro as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2), 1496495dfbf7SAl Viro but fairly different variant of sigaction(2), thanks to OSF/1 1497495dfbf7SAl Viro compatibility... 1498495dfbf7SAl Viro 1499495dfbf7SAl Viroconfig COMPAT_OLD_SIGACTION 1500495dfbf7SAl Viro bool 1501495dfbf7SAl Viro 150217435e5fSDeepa Dinamaniconfig COMPAT_32BIT_TIME 1503942437c9SArnd Bergmann bool "Provide system calls for 32-bit time_t" 1504942437c9SArnd Bergmann default !64BIT || COMPAT 150517435e5fSDeepa Dinamani help 150617435e5fSDeepa Dinamani This enables 32 bit time_t support in addition to 64 bit time_t support. 150717435e5fSDeepa Dinamani This is relevant on all 32-bit architectures, and 64-bit architectures 150817435e5fSDeepa Dinamani as part of compat syscall handling. 150917435e5fSDeepa Dinamani 151087a4c375SChristoph Hellwigconfig ARCH_NO_PREEMPT 151187a4c375SChristoph Hellwig bool 151287a4c375SChristoph Hellwig 1513a50a3f4bSThomas Gleixnerconfig ARCH_SUPPORTS_RT 1514a50a3f4bSThomas Gleixner bool 1515a50a3f4bSThomas Gleixner 1516fff7fb0bSZhaoxiu Zengconfig CPU_NO_EFFICIENT_FFS 1517fff7fb0bSZhaoxiu Zeng def_bool n 1518fff7fb0bSZhaoxiu Zeng 1519ba14a194SAndy Lutomirskiconfig HAVE_ARCH_VMAP_STACK 1520ba14a194SAndy Lutomirski def_bool n 1521ba14a194SAndy Lutomirski help 1522ba14a194SAndy Lutomirski An arch should select this symbol if it can support kernel stacks 1523ba14a194SAndy Lutomirski in vmalloc space. This means: 1524ba14a194SAndy Lutomirski 1525ba14a194SAndy Lutomirski - vmalloc space must be large enough to hold many kernel stacks. 1526ba14a194SAndy Lutomirski This may rule out many 32-bit architectures. 1527ba14a194SAndy Lutomirski 1528ba14a194SAndy Lutomirski - Stacks in vmalloc space need to work reliably. For example, if 1529ba14a194SAndy Lutomirski vmap page tables are created on demand, either this mechanism 1530ba14a194SAndy Lutomirski needs to work while the stack points to a virtual address with 1531ba14a194SAndy Lutomirski unpopulated page tables or arch code (switch_to() and switch_mm(), 1532ba14a194SAndy Lutomirski most likely) needs to ensure that the stack's page table entries 1533ba14a194SAndy Lutomirski are populated before running on a possibly unpopulated stack. 1534ba14a194SAndy Lutomirski 1535ba14a194SAndy Lutomirski - If the stack overflows into a guard page, something reasonable 1536ba14a194SAndy Lutomirski should happen. The definition of "reasonable" is flexible, but 1537ba14a194SAndy Lutomirski instantly rebooting without logging anything would be unfriendly. 1538ba14a194SAndy Lutomirski 1539ba14a194SAndy Lutomirskiconfig VMAP_STACK 1540ba14a194SAndy Lutomirski default y 1541ba14a194SAndy Lutomirski bool "Use a virtually-mapped stack" 1542eafb149eSDaniel Axtens depends on HAVE_ARCH_VMAP_STACK 154338dd767dSAndrey Konovalov depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC 1544a7f7f624SMasahiro Yamada help 1545ba14a194SAndy Lutomirski Enable this if you want the use virtually-mapped kernel stacks 1546ba14a194SAndy Lutomirski with guard pages. This causes kernel stack overflows to be 1547ba14a194SAndy Lutomirski caught immediately rather than causing difficult-to-diagnose 1548ba14a194SAndy Lutomirski corruption. 1549ba14a194SAndy Lutomirski 155038dd767dSAndrey Konovalov To use this with software KASAN modes, the architecture must support 155138dd767dSAndrey Konovalov backing virtual mappings with real shadow memory, and KASAN_VMALLOC 155238dd767dSAndrey Konovalov must be enabled. 1553ba14a194SAndy Lutomirski 155439218ff4SKees Cookconfig HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 155539218ff4SKees Cook def_bool n 155639218ff4SKees Cook help 155739218ff4SKees Cook An arch should select this symbol if it can support kernel stack 1558a96ef584SRyan Roberts offset randomization with a call to add_random_kstack_offset() 1559a96ef584SRyan Roberts during syscall entry. Careful removal of -fstack-protector-strong and 156039218ff4SKees Cook -fstack-protector should also be applied to the entry code and 156139218ff4SKees Cook closely examined, as the artificial stack bump looks like an array 156239218ff4SKees Cook to the compiler, so it will attempt to add canary checks regardless 156339218ff4SKees Cook of the static branch state. 156439218ff4SKees Cook 15658cb37a59SMarco Elverconfig RANDOMIZE_KSTACK_OFFSET 15668cb37a59SMarco Elver bool "Support for randomizing kernel stack offset on syscall entry" if EXPERT 15678cb37a59SMarco Elver default y 156839218ff4SKees Cook depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 156939218ff4SKees Cook help 157039218ff4SKees Cook The kernel stack offset can be randomized (after pt_regs) by 157139218ff4SKees Cook roughly 5 bits of entropy, frustrating memory corruption 157239218ff4SKees Cook attacks that depend on stack address determinism or 15738cb37a59SMarco Elver cross-syscall address exposures. 15748cb37a59SMarco Elver 15758cb37a59SMarco Elver The feature is controlled via the "randomize_kstack_offset=on/off" 15768cb37a59SMarco Elver kernel boot param, and if turned off has zero overhead due to its use 15778cb37a59SMarco Elver of static branches (see JUMP_LABEL). 15788cb37a59SMarco Elver 15798cb37a59SMarco Elver If unsure, say Y. 15808cb37a59SMarco Elver 15818cb37a59SMarco Elverconfig RANDOMIZE_KSTACK_OFFSET_DEFAULT 15828cb37a59SMarco Elver bool "Default state of kernel stack offset randomization" 15838cb37a59SMarco Elver depends on RANDOMIZE_KSTACK_OFFSET 15848cb37a59SMarco Elver help 15858cb37a59SMarco Elver Kernel stack offset randomization is controlled by kernel boot param 15868cb37a59SMarco Elver "randomize_kstack_offset=on/off", and this config chooses the default 15878cb37a59SMarco Elver boot state. 158839218ff4SKees Cook 1589ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX 1590ad21fc4fSLaura Abbott def_bool n 1591ad21fc4fSLaura Abbott 1592ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1593ad21fc4fSLaura Abbott def_bool n 1594ad21fc4fSLaura Abbott 1595ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_KERNEL_RWX 1596ad21fc4fSLaura Abbott def_bool n 1597ad21fc4fSLaura Abbott 15980f5bf6d0SLaura Abbottconfig STRICT_KERNEL_RWX 1599ad21fc4fSLaura Abbott bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX 1600ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_KERNEL_RWX 1601ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1602ad21fc4fSLaura Abbott help 1603ad21fc4fSLaura Abbott If this is set, kernel text and rodata memory will be made read-only, 1604ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 1605ad21fc4fSLaura Abbott protection against certain security exploits (e.g. executing the heap 1606ad21fc4fSLaura Abbott or modifying text) 1607ad21fc4fSLaura Abbott 1608ad21fc4fSLaura Abbott These features are considered standard security practice these days. 1609ad21fc4fSLaura Abbott You should say Y here in almost all cases. 1610ad21fc4fSLaura Abbott 1611ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_MODULE_RWX 1612ad21fc4fSLaura Abbott def_bool n 1613ad21fc4fSLaura Abbott 16140f5bf6d0SLaura Abbottconfig STRICT_MODULE_RWX 1615ad21fc4fSLaura Abbott bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX 1616ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES 1617ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1618ad21fc4fSLaura Abbott help 1619ad21fc4fSLaura Abbott If this is set, module text and rodata memory will be made read-only, 1620ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 1621ad21fc4fSLaura Abbott protection against certain security exploits (e.g. writing to text) 1622ad21fc4fSLaura Abbott 1623ea8c64acSChristoph Hellwig# select if the architecture provides an asm/dma-direct.h header 1624ea8c64acSChristoph Hellwigconfig ARCH_HAS_PHYS_TO_DMA 1625ea8c64acSChristoph Hellwig bool 1626ea8c64acSChristoph Hellwig 1627bff70402SJames Morseconfig ARCH_HAS_CPU_RESCTRL 1628bff70402SJames Morse bool 1629bff70402SJames Morse help 1630bff70402SJames Morse An architecture selects this option to indicate that the necessary 1631bff70402SJames Morse hooks are provided to support the common memory system usage 1632bff70402SJames Morse monitoring and control interfaces provided by the 'resctrl' 1633bff70402SJames Morse filesystem (see RESCTRL_FS). 1634bff70402SJames Morse 163504f264d3SPaul Burtonconfig HAVE_ARCH_COMPILER_H 163604f264d3SPaul Burton bool 163704f264d3SPaul Burton help 163804f264d3SPaul Burton An architecture can select this if it provides an 163904f264d3SPaul Burton asm/compiler.h header that should be included after 164004f264d3SPaul Burton linux/compiler-*.h in order to override macro definitions that those 164104f264d3SPaul Burton headers generally provide. 164204f264d3SPaul Burton 1643e419ddeaSGreg Ungererconfig HAVE_ARCH_LIBGCC_H 1644e419ddeaSGreg Ungerer bool 1645e419ddeaSGreg Ungerer help 1646e419ddeaSGreg Ungerer An architecture can select this if it provides an 1647e419ddeaSGreg Ungerer asm/libgcc.h header that should be included after 1648e419ddeaSGreg Ungerer linux/libgcc.h in order to override macro definitions that 1649e419ddeaSGreg Ungerer header generally provides. 1650e419ddeaSGreg Ungerer 1651271ca788SArd Biesheuvelconfig HAVE_ARCH_PREL32_RELOCATIONS 1652271ca788SArd Biesheuvel bool 1653271ca788SArd Biesheuvel help 1654271ca788SArd Biesheuvel May be selected by an architecture if it supports place-relative 1655271ca788SArd Biesheuvel 32-bit relocations, both in the toolchain and in the module loader, 1656271ca788SArd Biesheuvel in which case relative references can be used in special sections 1657271ca788SArd Biesheuvel for PCI fixup, initcalls etc which are only half the size on 64 bit 1658271ca788SArd Biesheuvel architectures, and don't require runtime relocation on relocatable 1659271ca788SArd Biesheuvel kernels. 1660271ca788SArd Biesheuvel 1661ce9084baSArd Biesheuvelconfig ARCH_USE_MEMREMAP_PROT 1662ce9084baSArd Biesheuvel bool 1663ce9084baSArd Biesheuvel 1664fb346fd9SWaiman Longconfig LOCK_EVENT_COUNTS 1665fb346fd9SWaiman Long bool "Locking event counts collection" 1666fb346fd9SWaiman Long depends on DEBUG_FS 1667a7f7f624SMasahiro Yamada help 1668fb346fd9SWaiman Long Enable light-weight counting of various locking related events 1669fb346fd9SWaiman Long in the system with minimal performance impact. This reduces 1670fb346fd9SWaiman Long the chance of application behavior change because of timing 1671fb346fd9SWaiman Long differences. The counts are reported via debugfs. 1672fb346fd9SWaiman Long 16735cf896fbSPeter Collingbourne# Select if the architecture has support for applying RELR relocations. 16745cf896fbSPeter Collingbourneconfig ARCH_HAS_RELR 16755cf896fbSPeter Collingbourne bool 16765cf896fbSPeter Collingbourne 16775cf896fbSPeter Collingbourneconfig RELR 16785cf896fbSPeter Collingbourne bool "Use RELR relocation packing" 16795cf896fbSPeter Collingbourne depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR 16805cf896fbSPeter Collingbourne default y 16815cf896fbSPeter Collingbourne help 16825cf896fbSPeter Collingbourne Store the kernel's dynamic relocations in the RELR relocation packing 16835cf896fbSPeter Collingbourne format. Requires a compatible linker (LLD supports this feature), as 16845cf896fbSPeter Collingbourne well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy 16855cf896fbSPeter Collingbourne are compatible). 16865cf896fbSPeter Collingbourne 16870c9c1d56SThiago Jung Bauermannconfig ARCH_HAS_MEM_ENCRYPT 16880c9c1d56SThiago Jung Bauermann bool 16890c9c1d56SThiago Jung Bauermann 169046b49b12STom Lendackyconfig ARCH_HAS_CC_PLATFORM 169146b49b12STom Lendacky bool 169246b49b12STom Lendacky 16930e242208SHassan Naveedconfig HAVE_SPARSE_SYSCALL_NR 16940e242208SHassan Naveed bool 16950e242208SHassan Naveed help 16960e242208SHassan Naveed An architecture should select this if its syscall numbering is sparse 16970e242208SHassan Naveed to save space. For example, MIPS architecture has a syscall array with 16980e242208SHassan Naveed entries at 4000, 5000 and 6000 locations. This option turns on syscall 16990e242208SHassan Naveed related optimizations for a given architecture. 17000e242208SHassan Naveed 1701365841e1SThomas Weißschuhconfig ARCH_HAS_VDSO_ARCH_DATA 1702365841e1SThomas Weißschuh bool 1703365841e1SThomas Weißschuh 1704a812eee0SNam Caoconfig ARCH_HAS_VDSO_TIME_DATA 1705d60d7de3SSven Schnelle bool 1706d60d7de3SSven Schnelle 1707115284d8SJosh Poimboeufconfig HAVE_STATIC_CALL 1708115284d8SJosh Poimboeuf bool 1709115284d8SJosh Poimboeuf 17109183c3f9SJosh Poimboeufconfig HAVE_STATIC_CALL_INLINE 17119183c3f9SJosh Poimboeuf bool 17129183c3f9SJosh Poimboeuf depends on HAVE_STATIC_CALL 171303f16cd0SJosh Poimboeuf select OBJTOOL 17149183c3f9SJosh Poimboeuf 17156ef869e0SMichal Hockoconfig HAVE_PREEMPT_DYNAMIC 17166ef869e0SMichal Hocko bool 171799cf983cSMark Rutland 171899cf983cSMark Rutlandconfig HAVE_PREEMPT_DYNAMIC_CALL 171999cf983cSMark Rutland bool 17206ef869e0SMichal Hocko depends on HAVE_STATIC_CALL 172199cf983cSMark Rutland select HAVE_PREEMPT_DYNAMIC 17226ef869e0SMichal Hocko help 172399cf983cSMark Rutland An architecture should select this if it can handle the preemption 172499cf983cSMark Rutland model being selected at boot time using static calls. 172599cf983cSMark Rutland 172699cf983cSMark Rutland Where an architecture selects HAVE_STATIC_CALL_INLINE, any call to a 172799cf983cSMark Rutland preemption function will be patched directly. 172899cf983cSMark Rutland 172999cf983cSMark Rutland Where an architecture does not select HAVE_STATIC_CALL_INLINE, any 173099cf983cSMark Rutland call to a preemption function will go through a trampoline, and the 173199cf983cSMark Rutland trampoline will be patched. 173299cf983cSMark Rutland 173399cf983cSMark Rutland It is strongly advised to support inline static call to avoid any 173499cf983cSMark Rutland overhead. 173599cf983cSMark Rutland 173699cf983cSMark Rutlandconfig HAVE_PREEMPT_DYNAMIC_KEY 173799cf983cSMark Rutland bool 1738a0a12c3eSNick Desaulniers depends on HAVE_ARCH_JUMP_LABEL 173999cf983cSMark Rutland select HAVE_PREEMPT_DYNAMIC 174099cf983cSMark Rutland help 174199cf983cSMark Rutland An architecture should select this if it can handle the preemption 174299cf983cSMark Rutland model being selected at boot time using static keys. 174399cf983cSMark Rutland 174499cf983cSMark Rutland Each preemption function will be given an early return based on a 174599cf983cSMark Rutland static key. This should have slightly lower overhead than non-inline 174699cf983cSMark Rutland static calls, as this effectively inlines each trampoline into the 174799cf983cSMark Rutland start of its callee. This may avoid redundant work, and may 174899cf983cSMark Rutland integrate better with CFI schemes. 174999cf983cSMark Rutland 175099cf983cSMark Rutland This will have greater overhead than using inline static calls as 175199cf983cSMark Rutland the call to the preemption function cannot be entirely elided. 17526ef869e0SMichal Hocko 175359612b24SNathan Chancellorconfig ARCH_WANT_LD_ORPHAN_WARN 175459612b24SNathan Chancellor bool 175559612b24SNathan Chancellor help 175659612b24SNathan Chancellor An arch should select this symbol once all linker sections are explicitly 175759612b24SNathan Chancellor included, size-asserted, or discarded in the linker scripts. This is 175859612b24SNathan Chancellor important because we never want expected sections to be placed heuristically 175959612b24SNathan Chancellor by the linker, since the locations of such sections can change between linker 176059612b24SNathan Chancellor versions. 176159612b24SNathan Chancellor 17624f5b0c17SMike Rapoportconfig HAVE_ARCH_PFN_VALID 17634f5b0c17SMike Rapoport bool 17644f5b0c17SMike Rapoport 17655d6ad668SMike Rapoportconfig ARCH_SUPPORTS_DEBUG_PAGEALLOC 17665d6ad668SMike Rapoport bool 17675d6ad668SMike Rapoport 1768df4e817bSPasha Tatashinconfig ARCH_SUPPORTS_PAGE_TABLE_CHECK 1769df4e817bSPasha Tatashin bool 1770df4e817bSPasha Tatashin 17712ca408d9SBrian Gerstconfig ARCH_SPLIT_ARG64 17722ca408d9SBrian Gerst bool 17732ca408d9SBrian Gerst help 17742ca408d9SBrian Gerst If a 32-bit architecture requires 64-bit arguments to be split into 17752ca408d9SBrian Gerst pairs of 32-bit arguments, select this option. 17762ca408d9SBrian Gerst 17777facdc42SAl Viroconfig ARCH_HAS_ELFCORE_COMPAT 17787facdc42SAl Viro bool 17797facdc42SAl Viro 178058e106e7SBalbir Singhconfig ARCH_HAS_PARANOID_L1D_FLUSH 178158e106e7SBalbir Singh bool 178258e106e7SBalbir Singh 1783d593d64fSPrasad Sodagudiconfig ARCH_HAVE_TRACE_MMIO_ACCESS 1784d593d64fSPrasad Sodagudi bool 1785d593d64fSPrasad Sodagudi 17861bdda24cSThomas Gleixnerconfig DYNAMIC_SIGFRAME 17871bdda24cSThomas Gleixner bool 17881bdda24cSThomas Gleixner 178950468e43SJarkko Sakkinen# Select, if arch has a named attribute group bound to NUMA device nodes. 179050468e43SJarkko Sakkinenconfig HAVE_ARCH_NODE_DEV_GROUP 179150468e43SJarkko Sakkinen bool 179250468e43SJarkko Sakkinen 179371ce1ab5SKinsey Hoconfig ARCH_HAS_HW_PTE_YOUNG 179471ce1ab5SKinsey Ho bool 179571ce1ab5SKinsey Ho help 179671ce1ab5SKinsey Ho Architectures that select this option are capable of setting the 179771ce1ab5SKinsey Ho accessed bit in PTE entries when using them as part of linear address 179871ce1ab5SKinsey Ho translations. Architectures that require runtime check should select 179971ce1ab5SKinsey Ho this option and override arch_has_hw_pte_young(). 180071ce1ab5SKinsey Ho 1801eed9a328SYu Zhaoconfig ARCH_HAS_NONLEAF_PMD_YOUNG 1802eed9a328SYu Zhao bool 1803eed9a328SYu Zhao help 1804eed9a328SYu Zhao Architectures that select this option are capable of setting the 1805eed9a328SYu Zhao accessed bit in non-leaf PMD entries when using them as part of linear 1806eed9a328SYu Zhao address translations. Page table walkers that clear the accessed bit 1807eed9a328SYu Zhao may use this capability to reduce their search space. 1808eed9a328SYu Zhao 18096cbd1d6dSSamuel Hollandconfig ARCH_HAS_KERNEL_FPU_SUPPORT 18106cbd1d6dSSamuel Holland bool 18116cbd1d6dSSamuel Holland help 18126cbd1d6dSSamuel Holland Architectures that select this option can run floating-point code in 18136cbd1d6dSSamuel Holland the kernel, as described in Documentation/core-api/floating-point.rst. 18146cbd1d6dSSamuel Holland 18159b400d17SArd Biesheuvelconfig ARCH_VMLINUX_NEEDS_RELOCS 18169b400d17SArd Biesheuvel bool 18179b400d17SArd Biesheuvel help 18189b400d17SArd Biesheuvel Whether the architecture needs vmlinux to be built with static 18199b400d17SArd Biesheuvel relocations preserved. This is used by some architectures to 18209b400d17SArd Biesheuvel construct bespoke relocation tables for KASLR. 18219b400d17SArd Biesheuvel 182229589343SThomas Gleixner# Select if architecture uses the common generic TIF bits 182329589343SThomas Gleixnerconfig HAVE_GENERIC_TIF_BITS 182429589343SThomas Gleixner bool 182529589343SThomas Gleixner 18262521f2c2SPeter Oberparleitersource "kernel/gcov/Kconfig" 182745332b1bSMasahiro Yamada 182845332b1bSMasahiro Yamadasource "scripts/gcc-plugins/Kconfig" 1829fa1b5d09SLinus Torvalds 1830d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_4B 1831d49a0626SPeter Zijlstra bool 1832d49a0626SPeter Zijlstra 1833d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_8B 1834d49a0626SPeter Zijlstra bool 1835d49a0626SPeter Zijlstra 1836d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_16B 1837d49a0626SPeter Zijlstra bool 1838d49a0626SPeter Zijlstra 1839d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_32B 1840d49a0626SPeter Zijlstra bool 1841d49a0626SPeter Zijlstra 1842d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_64B 1843d49a0626SPeter Zijlstra bool 1844d49a0626SPeter Zijlstra 1845d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT 1846d49a0626SPeter Zijlstra int 1847d49a0626SPeter Zijlstra default 64 if FUNCTION_ALIGNMENT_64B 1848d49a0626SPeter Zijlstra default 32 if FUNCTION_ALIGNMENT_32B 1849d49a0626SPeter Zijlstra default 16 if FUNCTION_ALIGNMENT_16B 1850d49a0626SPeter Zijlstra default 8 if FUNCTION_ALIGNMENT_8B 1851d49a0626SPeter Zijlstra default 4 if FUNCTION_ALIGNMENT_4B 1852d49a0626SPeter Zijlstra default 0 1853d49a0626SPeter Zijlstra 18545270316cSPetr Pavluconfig CC_HAS_MIN_FUNCTION_ALIGNMENT 18555270316cSPetr Pavlu # Detect availability of the GCC option -fmin-function-alignment which 18565270316cSPetr Pavlu # guarantees minimal alignment for all functions, unlike 18575270316cSPetr Pavlu # -falign-functions which the compiler ignores for cold functions. 18585270316cSPetr Pavlu def_bool $(cc-option, -fmin-function-alignment=8) 18595270316cSPetr Pavlu 18605270316cSPetr Pavluconfig CC_HAS_SANE_FUNCTION_ALIGNMENT 18615270316cSPetr Pavlu # Set if the guaranteed alignment with -fmin-function-alignment is 18625270316cSPetr Pavlu # available or extra care is required in the kernel. Clang provides 18635270316cSPetr Pavlu # strict alignment always, even with -falign-functions. 18645270316cSPetr Pavlu def_bool CC_HAS_MIN_FUNCTION_ALIGNMENT || CC_IS_CLANG 18655270316cSPetr Pavlu 1866a88d970cSPaul E. McKenneyconfig ARCH_NEED_CMPXCHG_1_EMU 1867a88d970cSPaul E. McKenney bool 1868a88d970cSPaul E. McKenney 18691198c9c6SNaveen N Raoconfig ARCH_WANTS_PRE_LINK_VMLINUX 18701198c9c6SNaveen N Rao bool 18711198c9c6SNaveen N Rao help 18721198c9c6SNaveen N Rao An architecture can select this if it provides arch/<arch>/tools/Makefile 18731198c9c6SNaveen N Rao with .arch.vmlinux.o target to be linked into vmlinux. 18741198c9c6SNaveen N Rao 1875735e5920SDavid Kaplanconfig ARCH_HAS_CPU_ATTACK_VECTORS 1876735e5920SDavid Kaplan bool 1877735e5920SDavid Kaplan 18787caedbb5SNathan Chancellorconfig HAVE_ARCH_GET_SECUREBOOT 18797caedbb5SNathan Chancellor def_bool EFI 18807caedbb5SNathan Chancellor 188122471e13SRandy Dunlapendmenu 1882