1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2fb32e03fSMathieu Desnoyers# 3fb32e03fSMathieu Desnoyers# General architecture dependent options 4fb32e03fSMathieu Desnoyers# 5125e5645SMathieu Desnoyers 61572497cSChristoph Hellwig# 71572497cSChristoph Hellwig# Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can 81572497cSChristoph Hellwig# override the default values in this file. 91572497cSChristoph Hellwig# 101572497cSChristoph Hellwigsource "arch/$(SRCARCH)/Kconfig" 111572497cSChristoph Hellwig 1222471e13SRandy Dunlapmenu "General architecture-dependent options" 1322471e13SRandy Dunlap 14692f66f2SHari Bathiniconfig CRASH_CORE 15692f66f2SHari Bathini bool 16692f66f2SHari Bathini 172965faa5SDave Youngconfig KEXEC_CORE 18692f66f2SHari Bathini select CRASH_CORE 192965faa5SDave Young bool 202965faa5SDave Young 21175fca3bSSven Schnelleconfig KEXEC_ELF 22175fca3bSSven Schnelle bool 23175fca3bSSven Schnelle 24467d2782SThiago Jung Bauermannconfig HAVE_IMA_KEXEC 25467d2782SThiago Jung Bauermann bool 26467d2782SThiago Jung Bauermann 27da32b581SCatalin Marinasconfig ARCH_HAS_SUBPAGE_FAULTS 28da32b581SCatalin Marinas bool 29da32b581SCatalin Marinas help 30da32b581SCatalin Marinas Select if the architecture can check permissions at sub-page 31da32b581SCatalin Marinas granularity (e.g. arm64 MTE). The probe_user_*() functions 32da32b581SCatalin Marinas must be implemented. 33da32b581SCatalin Marinas 3405736e4aSThomas Gleixnerconfig HOTPLUG_SMT 3505736e4aSThomas Gleixner bool 3605736e4aSThomas Gleixner 37142781e1SThomas Gleixnerconfig GENERIC_ENTRY 38142781e1SThomas Gleixner bool 39142781e1SThomas Gleixner 40125e5645SMathieu Desnoyersconfig KPROBES 41125e5645SMathieu Desnoyers bool "Kprobes" 4205ed160eSMasami Hiramatsu depends on MODULES 43125e5645SMathieu Desnoyers depends on HAVE_KPROBES 4405ed160eSMasami Hiramatsu select KALLSYMS 45835f14edSPaul E. McKenney select TASKS_RCU if PREEMPTION 46125e5645SMathieu Desnoyers help 47125e5645SMathieu Desnoyers Kprobes allows you to trap at almost any kernel address and 48125e5645SMathieu Desnoyers execute a callback function. register_kprobe() establishes 49125e5645SMathieu Desnoyers a probepoint and specifies the callback. Kprobes is useful 50125e5645SMathieu Desnoyers for kernel debugging, non-intrusive instrumentation and testing. 51125e5645SMathieu Desnoyers If in doubt, say "N". 52125e5645SMathieu Desnoyers 5345f81b1cSSteven Rostedtconfig JUMP_LABEL 54c5905afbSIngo Molnar bool "Optimize very unlikely/likely branches" 5545f81b1cSSteven Rostedt depends on HAVE_ARCH_JUMP_LABEL 564ab7674fSJosh Poimboeuf select OBJTOOL if HAVE_JUMP_LABEL_HACK 5745f81b1cSSteven Rostedt help 58c5905afbSIngo Molnar This option enables a transparent branch optimization that 59c5905afbSIngo Molnar makes certain almost-always-true or almost-always-false branch 60c5905afbSIngo Molnar conditions even cheaper to execute within the kernel. 6145f81b1cSSteven Rostedt 62c5905afbSIngo Molnar Certain performance-sensitive kernel code, such as trace points, 63c5905afbSIngo Molnar scheduler functionality, networking code and KVM have such 64c5905afbSIngo Molnar branches and include support for this optimization technique. 65c5905afbSIngo Molnar 66c5905afbSIngo Molnar If it is detected that the compiler has support for "asm goto", 67c5905afbSIngo Molnar the kernel will compile such branches with just a nop 68c5905afbSIngo Molnar instruction. When the condition flag is toggled to true, the 69c5905afbSIngo Molnar nop will be converted to a jump instruction to execute the 70c5905afbSIngo Molnar conditional block of instructions. 71c5905afbSIngo Molnar 72c5905afbSIngo Molnar This technique lowers overhead and stress on the branch prediction 73c5905afbSIngo Molnar of the processor and generally makes the kernel faster. The update 74c5905afbSIngo Molnar of the condition is slower, but those are always very rare. 75c5905afbSIngo Molnar 76c5905afbSIngo Molnar ( On 32-bit x86, the necessary options added to the compiler 77c5905afbSIngo Molnar flags may increase the size of the kernel slightly. ) 7845f81b1cSSteven Rostedt 791987c947SPeter Zijlstraconfig STATIC_KEYS_SELFTEST 801987c947SPeter Zijlstra bool "Static key selftest" 811987c947SPeter Zijlstra depends on JUMP_LABEL 821987c947SPeter Zijlstra help 831987c947SPeter Zijlstra Boot time self-test of the branch patching code. 841987c947SPeter Zijlstra 85f03c4129SPeter Zijlstraconfig STATIC_CALL_SELFTEST 86f03c4129SPeter Zijlstra bool "Static call selftest" 87f03c4129SPeter Zijlstra depends on HAVE_STATIC_CALL 88f03c4129SPeter Zijlstra help 89f03c4129SPeter Zijlstra Boot time self-test of the call patching code. 90f03c4129SPeter Zijlstra 91afd66255SMasami Hiramatsuconfig OPTPROBES 925cc718b9SMasami Hiramatsu def_bool y 935cc718b9SMasami Hiramatsu depends on KPROBES && HAVE_OPTPROBES 9401b1d88bSThomas Gleixner select TASKS_RCU if PREEMPTION 95afd66255SMasami Hiramatsu 96e7dbfe34SMasami Hiramatsuconfig KPROBES_ON_FTRACE 97e7dbfe34SMasami Hiramatsu def_bool y 98e7dbfe34SMasami Hiramatsu depends on KPROBES && HAVE_KPROBES_ON_FTRACE 99e7dbfe34SMasami Hiramatsu depends on DYNAMIC_FTRACE_WITH_REGS 100e7dbfe34SMasami Hiramatsu help 101e7dbfe34SMasami Hiramatsu If function tracer is enabled and the arch supports full 102e7dbfe34SMasami Hiramatsu passing of pt_regs to function tracing, then kprobes can 103e7dbfe34SMasami Hiramatsu optimize on top of function tracing. 104e7dbfe34SMasami Hiramatsu 1052b144498SSrikar Dronamrajuconfig UPROBES 10609294e31SDavid A. Long def_bool n 107e8f4aa60SAllen Pais depends on ARCH_SUPPORTS_UPROBES 1082b144498SSrikar Dronamraju help 1097b2d81d4SIngo Molnar Uprobes is the user-space counterpart to kprobes: they 1107b2d81d4SIngo Molnar enable instrumentation applications (such as 'perf probe') 1117b2d81d4SIngo Molnar to establish unintrusive probes in user-space binaries and 1127b2d81d4SIngo Molnar libraries, by executing handler functions when the probes 1137b2d81d4SIngo Molnar are hit by user-space applications. 1147b2d81d4SIngo Molnar 1157b2d81d4SIngo Molnar ( These probes come in the form of single-byte breakpoints, 1167b2d81d4SIngo Molnar managed by the kernel and kept transparent to the probed 1177b2d81d4SIngo Molnar application. ) 1182b144498SSrikar Dronamraju 119adab66b7SSteven Rostedt (VMware)config HAVE_64BIT_ALIGNED_ACCESS 120adab66b7SSteven Rostedt (VMware) def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS 121adab66b7SSteven Rostedt (VMware) help 122adab66b7SSteven Rostedt (VMware) Some architectures require 64 bit accesses to be 64 bit 123adab66b7SSteven Rostedt (VMware) aligned, which also requires structs containing 64 bit values 124adab66b7SSteven Rostedt (VMware) to be 64 bit aligned too. This includes some 32 bit 125adab66b7SSteven Rostedt (VMware) architectures which can do 64 bit accesses, as well as 64 bit 126adab66b7SSteven Rostedt (VMware) architectures without unaligned access. 127adab66b7SSteven Rostedt (VMware) 128adab66b7SSteven Rostedt (VMware) This symbol should be selected by an architecture if 64 bit 129adab66b7SSteven Rostedt (VMware) accesses are required to be 64 bit aligned in this way even 130adab66b7SSteven Rostedt (VMware) though it is not a 64 bit architecture. 131adab66b7SSteven Rostedt (VMware) 132ba1a297dSLukas Bulwahn See Documentation/core-api/unaligned-memory-access.rst for 133ba1a297dSLukas Bulwahn more information on the topic of unaligned memory accesses. 134adab66b7SSteven Rostedt (VMware) 13558340a07SJohannes Bergconfig HAVE_EFFICIENT_UNALIGNED_ACCESS 1369ba16087SJan Beulich bool 13758340a07SJohannes Berg help 13858340a07SJohannes Berg Some architectures are unable to perform unaligned accesses 13958340a07SJohannes Berg without the use of get_unaligned/put_unaligned. Others are 14058340a07SJohannes Berg unable to perform such accesses efficiently (e.g. trap on 14158340a07SJohannes Berg unaligned access and require fixing it up in the exception 14258340a07SJohannes Berg handler.) 14358340a07SJohannes Berg 14458340a07SJohannes Berg This symbol should be selected by an architecture if it can 14558340a07SJohannes Berg perform unaligned accesses efficiently to allow different 14658340a07SJohannes Berg code paths to be selected for these cases. Some network 14758340a07SJohannes Berg drivers, for example, could opt to not fix up alignment 14858340a07SJohannes Berg problems with received packets if doing so would not help 14958340a07SJohannes Berg much. 15058340a07SJohannes Berg 151c9b54d6fSMauro Carvalho Chehab See Documentation/core-api/unaligned-memory-access.rst for more 15258340a07SJohannes Berg information on the topic of unaligned memory accesses. 15358340a07SJohannes Berg 154cf66bb93SDavid Woodhouseconfig ARCH_USE_BUILTIN_BSWAP 155cf66bb93SDavid Woodhouse bool 156cf66bb93SDavid Woodhouse help 157cf66bb93SDavid Woodhouse Modern versions of GCC (since 4.4) have builtin functions 158cf66bb93SDavid Woodhouse for handling byte-swapping. Using these, instead of the old 159cf66bb93SDavid Woodhouse inline assembler that the architecture code provides in the 160cf66bb93SDavid Woodhouse __arch_bswapXX() macros, allows the compiler to see what's 161cf66bb93SDavid Woodhouse happening and offers more opportunity for optimisation. In 162cf66bb93SDavid Woodhouse particular, the compiler will be able to combine the byteswap 163cf66bb93SDavid Woodhouse with a nearby load or store and use load-and-swap or 164cf66bb93SDavid Woodhouse store-and-swap instructions if the architecture has them. It 165cf66bb93SDavid Woodhouse should almost *never* result in code which is worse than the 166cf66bb93SDavid Woodhouse hand-coded assembler in <asm/swab.h>. But just in case it 167cf66bb93SDavid Woodhouse does, the use of the builtins is optional. 168cf66bb93SDavid Woodhouse 169cf66bb93SDavid Woodhouse Any architecture with load-and-swap or store-and-swap 170cf66bb93SDavid Woodhouse instructions should set this. And it shouldn't hurt to set it 171cf66bb93SDavid Woodhouse on architectures that don't have such instructions. 172cf66bb93SDavid Woodhouse 1739edddaa2SAnanth N Mavinakayanahalliconfig KRETPROBES 1749edddaa2SAnanth N Mavinakayanahalli def_bool y 17573f9b911SMasami Hiramatsu depends on KPROBES && (HAVE_KRETPROBES || HAVE_RETHOOK) 17673f9b911SMasami Hiramatsu 17773f9b911SMasami Hiramatsuconfig KRETPROBE_ON_RETHOOK 17873f9b911SMasami Hiramatsu def_bool y 17973f9b911SMasami Hiramatsu depends on HAVE_RETHOOK 18073f9b911SMasami Hiramatsu depends on KRETPROBES 18173f9b911SMasami Hiramatsu select RETHOOK 1829edddaa2SAnanth N Mavinakayanahalli 1837c68af6eSAvi Kivityconfig USER_RETURN_NOTIFIER 1847c68af6eSAvi Kivity bool 1857c68af6eSAvi Kivity depends on HAVE_USER_RETURN_NOTIFIER 1867c68af6eSAvi Kivity help 1877c68af6eSAvi Kivity Provide a kernel-internal notification when a cpu is about to 1887c68af6eSAvi Kivity switch to user mode. 1897c68af6eSAvi Kivity 19028b2ee20SRik van Rielconfig HAVE_IOREMAP_PROT 1919ba16087SJan Beulich bool 19228b2ee20SRik van Riel 193125e5645SMathieu Desnoyersconfig HAVE_KPROBES 1949ba16087SJan Beulich bool 1959edddaa2SAnanth N Mavinakayanahalli 1969edddaa2SAnanth N Mavinakayanahalliconfig HAVE_KRETPROBES 1979ba16087SJan Beulich bool 19874bc7ceeSArthur Kepner 199afd66255SMasami Hiramatsuconfig HAVE_OPTPROBES 200afd66255SMasami Hiramatsu bool 201d314d74cSCong Wang 202e7dbfe34SMasami Hiramatsuconfig HAVE_KPROBES_ON_FTRACE 203e7dbfe34SMasami Hiramatsu bool 204e7dbfe34SMasami Hiramatsu 2051f6d3a8fSMasami Hiramatsuconfig ARCH_CORRECT_STACKTRACE_ON_KRETPROBE 2061f6d3a8fSMasami Hiramatsu bool 2071f6d3a8fSMasami Hiramatsu help 2081f6d3a8fSMasami Hiramatsu Since kretprobes modifies return address on the stack, the 2091f6d3a8fSMasami Hiramatsu stacktrace may see the kretprobe trampoline address instead 2101f6d3a8fSMasami Hiramatsu of correct one. If the architecture stacktrace code and 2111f6d3a8fSMasami Hiramatsu unwinder can adjust such entries, select this configuration. 2121f6d3a8fSMasami Hiramatsu 213540adea3SMasami Hiramatsuconfig HAVE_FUNCTION_ERROR_INJECTION 2149802d865SJosef Bacik bool 2159802d865SJosef Bacik 21642a0bb3fSPetr Mladekconfig HAVE_NMI 21742a0bb3fSPetr Mladek bool 21842a0bb3fSPetr Mladek 219a257caccSChristophe Leroyconfig HAVE_FUNCTION_DESCRIPTORS 220a257caccSChristophe Leroy bool 221a257caccSChristophe Leroy 2224aae683fSMasahiro Yamadaconfig TRACE_IRQFLAGS_SUPPORT 2234aae683fSMasahiro Yamada bool 2244aae683fSMasahiro Yamada 2254510bffbSMark Rutlandconfig TRACE_IRQFLAGS_NMI_SUPPORT 2264510bffbSMark Rutland bool 2274510bffbSMark Rutland 2281f5a4ad9SRoland McGrath# 2291f5a4ad9SRoland McGrath# An arch should select this if it provides all these things: 2301f5a4ad9SRoland McGrath# 2311f5a4ad9SRoland McGrath# task_pt_regs() in asm/processor.h or asm/ptrace.h 2321f5a4ad9SRoland McGrath# arch_has_single_step() if there is hardware single-step support 2331f5a4ad9SRoland McGrath# arch_has_block_step() if there is hardware block-step support 2341f5a4ad9SRoland McGrath# asm/syscall.h supplying asm-generic/syscall.h interface 2351f5a4ad9SRoland McGrath# linux/regset.h user_regset interfaces 2361f5a4ad9SRoland McGrath# CORE_DUMP_USE_REGSET #define'd in linux/elf.h 237153474baSEric W. Biederman# TIF_SYSCALL_TRACE calls ptrace_report_syscall_{entry,exit} 23803248addSEric W. Biederman# TIF_NOTIFY_RESUME calls resume_user_mode_work() 2391f5a4ad9SRoland McGrath# 2401f5a4ad9SRoland McGrathconfig HAVE_ARCH_TRACEHOOK 2419ba16087SJan Beulich bool 2421f5a4ad9SRoland McGrath 243c64be2bbSMarek Szyprowskiconfig HAVE_DMA_CONTIGUOUS 244c64be2bbSMarek Szyprowski bool 245c64be2bbSMarek Szyprowski 24629d5e047SThomas Gleixnerconfig GENERIC_SMP_IDLE_THREAD 24729d5e047SThomas Gleixner bool 24829d5e047SThomas Gleixner 249485cf5daSKevin Hilmanconfig GENERIC_IDLE_POLL_SETUP 250485cf5daSKevin Hilman bool 251485cf5daSKevin Hilman 2526974f0c4SDaniel Micayconfig ARCH_HAS_FORTIFY_SOURCE 2536974f0c4SDaniel Micay bool 2546974f0c4SDaniel Micay help 2556974f0c4SDaniel Micay An architecture should select this when it can successfully 2566974f0c4SDaniel Micay build and run with CONFIG_FORTIFY_SOURCE. 2576974f0c4SDaniel Micay 258d8ae8a37SChristoph Hellwig# 259d8ae8a37SChristoph Hellwig# Select if the arch provides a historic keepinit alias for the retain_initrd 260d8ae8a37SChristoph Hellwig# command line option 261d8ae8a37SChristoph Hellwig# 262d8ae8a37SChristoph Hellwigconfig ARCH_HAS_KEEPINITRD 263d8ae8a37SChristoph Hellwig bool 264d8ae8a37SChristoph Hellwig 265d2852a22SDaniel Borkmann# Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h 266d2852a22SDaniel Borkmannconfig ARCH_HAS_SET_MEMORY 267d2852a22SDaniel Borkmann bool 268d2852a22SDaniel Borkmann 269d253ca0cSRick Edgecombe# Select if arch has all set_direct_map_invalid/default() functions 270d253ca0cSRick Edgecombeconfig ARCH_HAS_SET_DIRECT_MAP 271d253ca0cSRick Edgecombe bool 272d253ca0cSRick Edgecombe 273c30700dbSChristoph Hellwig# 274fa7e2247SChristoph Hellwig# Select if the architecture provides the arch_dma_set_uncached symbol to 275a86ecfa6SColin Ian King# either provide an uncached segment alias for a DMA allocation, or 276fa7e2247SChristoph Hellwig# to remap the page tables in place. 277c30700dbSChristoph Hellwig# 278fa7e2247SChristoph Hellwigconfig ARCH_HAS_DMA_SET_UNCACHED 279c30700dbSChristoph Hellwig bool 280c30700dbSChristoph Hellwig 281999a5d12SChristoph Hellwig# 282999a5d12SChristoph Hellwig# Select if the architectures provides the arch_dma_clear_uncached symbol 283999a5d12SChristoph Hellwig# to undo an in-place page table remap for uncached access. 284999a5d12SChristoph Hellwig# 285999a5d12SChristoph Hellwigconfig ARCH_HAS_DMA_CLEAR_UNCACHED 286f5e10287SThomas Gleixner bool 287f5e10287SThomas Gleixner 288*7725acaaSThomas Gleixnerconfig ARCH_HAS_CPU_FINALIZE_INIT 289*7725acaaSThomas Gleixner bool 290*7725acaaSThomas Gleixner 291a6359d1eSThomas Gleixner# Select if arch init_task must go in the __init_task_data section 292a6359d1eSThomas Gleixnerconfig ARCH_TASK_STRUCT_ON_STACK 293a4a2eb49SThomas Gleixner bool 294a4a2eb49SThomas Gleixner 295f5e10287SThomas Gleixner# Select if arch has its private alloc_task_struct() function 296f5e10287SThomas Gleixnerconfig ARCH_TASK_STRUCT_ALLOCATOR 297f5e10287SThomas Gleixner bool 298f5e10287SThomas Gleixner 2995905429aSKees Cookconfig HAVE_ARCH_THREAD_STRUCT_WHITELIST 3005905429aSKees Cook bool 3015905429aSKees Cook depends on !ARCH_TASK_STRUCT_ALLOCATOR 3025905429aSKees Cook help 3035905429aSKees Cook An architecture should select this to provide hardened usercopy 3045905429aSKees Cook knowledge about what region of the thread_struct should be 3055905429aSKees Cook whitelisted for copying to userspace. Normally this is only the 3065905429aSKees Cook FPU registers. Specifically, arch_thread_struct_whitelist() 3075905429aSKees Cook should be implemented. Without this, the entire thread_struct 3085905429aSKees Cook field in task_struct will be left whitelisted. 3095905429aSKees Cook 310b235beeaSLinus Torvalds# Select if arch has its private alloc_thread_stack() function 311b235beeaSLinus Torvaldsconfig ARCH_THREAD_STACK_ALLOCATOR 312f5e10287SThomas Gleixner bool 313f5e10287SThomas Gleixner 3145aaeb5c0SIngo Molnar# Select if arch wants to size task_struct dynamically via arch_task_struct_size: 3155aaeb5c0SIngo Molnarconfig ARCH_WANTS_DYNAMIC_TASK_STRUCT 3165aaeb5c0SIngo Molnar bool 3175aaeb5c0SIngo Molnar 31851c2ee6dSNick Desaulniersconfig ARCH_WANTS_NO_INSTR 31951c2ee6dSNick Desaulniers bool 32051c2ee6dSNick Desaulniers help 32151c2ee6dSNick Desaulniers An architecture should select this if the noinstr macro is being used on 32251c2ee6dSNick Desaulniers functions to denote that the toolchain should avoid instrumenting such 32351c2ee6dSNick Desaulniers functions and is required for correctness. 32451c2ee6dSNick Desaulniers 325942fa985SYury Norovconfig ARCH_32BIT_OFF_T 326942fa985SYury Norov bool 327942fa985SYury Norov depends on !64BIT 328942fa985SYury Norov help 329942fa985SYury Norov All new 32-bit architectures should have 64-bit off_t type on 330942fa985SYury Norov userspace side which corresponds to the loff_t kernel type. This 331942fa985SYury Norov is the requirement for modern ABIs. Some existing architectures 332942fa985SYury Norov still support 32-bit off_t. This option is enabled for all such 333942fa985SYury Norov architectures explicitly. 334942fa985SYury Norov 33596c0a6a7SHeiko Carstens# Selected by 64 bit architectures which have a 32 bit f_tinode in struct ustat 33696c0a6a7SHeiko Carstensconfig ARCH_32BIT_USTAT_F_TINODE 33796c0a6a7SHeiko Carstens bool 33896c0a6a7SHeiko Carstens 3392ff2b7ecSMasahiro Yamadaconfig HAVE_ASM_MODVERSIONS 3402ff2b7ecSMasahiro Yamada bool 3412ff2b7ecSMasahiro Yamada help 342a86ecfa6SColin Ian King This symbol should be selected by an architecture if it provides 3432ff2b7ecSMasahiro Yamada <asm/asm-prototypes.h> to support the module versioning for symbols 3442ff2b7ecSMasahiro Yamada exported from assembly code. 3452ff2b7ecSMasahiro Yamada 346f850c30cSHeiko Carstensconfig HAVE_REGS_AND_STACK_ACCESS_API 347f850c30cSHeiko Carstens bool 348e01292b1SHeiko Carstens help 349a86ecfa6SColin Ian King This symbol should be selected by an architecture if it supports 350e01292b1SHeiko Carstens the API needed to access registers and stack entries from pt_regs, 351e01292b1SHeiko Carstens declared in asm/ptrace.h 352e01292b1SHeiko Carstens For example the kprobes-based event tracer needs this API. 353f850c30cSHeiko Carstens 354d7822b1eSMathieu Desnoyersconfig HAVE_RSEQ 355d7822b1eSMathieu Desnoyers bool 356d7822b1eSMathieu Desnoyers depends on HAVE_REGS_AND_STACK_ACCESS_API 357d7822b1eSMathieu Desnoyers help 358d7822b1eSMathieu Desnoyers This symbol should be selected by an architecture if it 359d7822b1eSMathieu Desnoyers supports an implementation of restartable sequences. 360d7822b1eSMathieu Desnoyers 3612f7ab126SMiguel Ojedaconfig HAVE_RUST 3622f7ab126SMiguel Ojeda bool 3632f7ab126SMiguel Ojeda help 3642f7ab126SMiguel Ojeda This symbol should be selected by an architecture if it 3652f7ab126SMiguel Ojeda supports Rust. 3662f7ab126SMiguel Ojeda 3673c88ee19SMasami Hiramatsuconfig HAVE_FUNCTION_ARG_ACCESS_API 3683c88ee19SMasami Hiramatsu bool 3693c88ee19SMasami Hiramatsu help 370a86ecfa6SColin Ian King This symbol should be selected by an architecture if it supports 3713c88ee19SMasami Hiramatsu the API needed to access function arguments from pt_regs, 3723c88ee19SMasami Hiramatsu declared in asm/ptrace.h 3733c88ee19SMasami Hiramatsu 37462a038d3SK.Prasadconfig HAVE_HW_BREAKPOINT 37562a038d3SK.Prasad bool 37699e8c5a3SFrederic Weisbecker depends on PERF_EVENTS 37762a038d3SK.Prasad 3780102752eSFrederic Weisbeckerconfig HAVE_MIXED_BREAKPOINTS_REGS 3790102752eSFrederic Weisbecker bool 3800102752eSFrederic Weisbecker depends on HAVE_HW_BREAKPOINT 3810102752eSFrederic Weisbecker help 3820102752eSFrederic Weisbecker Depending on the arch implementation of hardware breakpoints, 3830102752eSFrederic Weisbecker some of them have separate registers for data and instruction 3840102752eSFrederic Weisbecker breakpoints addresses, others have mixed registers to store 3850102752eSFrederic Weisbecker them but define the access type in a control register. 3860102752eSFrederic Weisbecker Select this option if your arch implements breakpoints under the 3870102752eSFrederic Weisbecker latter fashion. 3880102752eSFrederic Weisbecker 3897c68af6eSAvi Kivityconfig HAVE_USER_RETURN_NOTIFIER 3907c68af6eSAvi Kivity bool 391a1922ed6SIngo Molnar 392c01d4323SFrederic Weisbeckerconfig HAVE_PERF_EVENTS_NMI 393c01d4323SFrederic Weisbecker bool 39423637d47SFrederic Weisbecker help 39523637d47SFrederic Weisbecker System hardware can generate an NMI using the perf event 39623637d47SFrederic Weisbecker subsystem. Also has support for calculating CPU cycle events 39723637d47SFrederic Weisbecker to determine how many clock cycles in a given period. 398c01d4323SFrederic Weisbecker 39905a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_PERF 40005a4a952SNicholas Piggin bool 40105a4a952SNicholas Piggin depends on HAVE_PERF_EVENTS_NMI 40205a4a952SNicholas Piggin help 40305a4a952SNicholas Piggin The arch chooses to use the generic perf-NMI-based hardlockup 40405a4a952SNicholas Piggin detector. Must define HAVE_PERF_EVENTS_NMI. 40505a4a952SNicholas Piggin 40605a4a952SNicholas Pigginconfig HAVE_NMI_WATCHDOG 40705a4a952SNicholas Piggin depends on HAVE_NMI 40805a4a952SNicholas Piggin bool 40905a4a952SNicholas Piggin help 41005a4a952SNicholas Piggin The arch provides a low level NMI watchdog. It provides 41105a4a952SNicholas Piggin asm/nmi.h, and defines its own arch_touch_nmi_watchdog(). 41205a4a952SNicholas Piggin 41305a4a952SNicholas Pigginconfig HAVE_HARDLOCKUP_DETECTOR_ARCH 41405a4a952SNicholas Piggin bool 41505a4a952SNicholas Piggin select HAVE_NMI_WATCHDOG 41605a4a952SNicholas Piggin help 41705a4a952SNicholas Piggin The arch chooses to provide its own hardlockup detector, which is 41805a4a952SNicholas Piggin a superset of the HAVE_NMI_WATCHDOG. It also conforms to config 41905a4a952SNicholas Piggin interfaces and parameters provided by hardlockup detector subsystem. 42005a4a952SNicholas Piggin 421c5e63197SJiri Olsaconfig HAVE_PERF_REGS 422c5e63197SJiri Olsa bool 423c5e63197SJiri Olsa help 424c5e63197SJiri Olsa Support selective register dumps for perf events. This includes 425c5e63197SJiri Olsa bit-mapping of each registers and a unique architecture id. 426c5e63197SJiri Olsa 427c5ebcedbSJiri Olsaconfig HAVE_PERF_USER_STACK_DUMP 428c5ebcedbSJiri Olsa bool 429c5ebcedbSJiri Olsa help 430c5ebcedbSJiri Olsa Support user stack dumps for perf event samples. This needs 431c5ebcedbSJiri Olsa access to the user stack pointer which is not unified across 432c5ebcedbSJiri Olsa architectures. 433c5ebcedbSJiri Olsa 434bf5438fcSJason Baronconfig HAVE_ARCH_JUMP_LABEL 435bf5438fcSJason Baron bool 436bf5438fcSJason Baron 43750ff18abSArd Biesheuvelconfig HAVE_ARCH_JUMP_LABEL_RELATIVE 43850ff18abSArd Biesheuvel bool 43950ff18abSArd Biesheuvel 4400d6e24d4SPeter Zijlstraconfig MMU_GATHER_TABLE_FREE 4410d6e24d4SPeter Zijlstra bool 4420d6e24d4SPeter Zijlstra 443ff2e6d72SPeter Zijlstraconfig MMU_GATHER_RCU_TABLE_FREE 44426723911SPeter Zijlstra bool 4450d6e24d4SPeter Zijlstra select MMU_GATHER_TABLE_FREE 44626723911SPeter Zijlstra 4473af4bd03SPeter Zijlstraconfig MMU_GATHER_PAGE_SIZE 448ed6a7935SPeter Zijlstra bool 449ed6a7935SPeter Zijlstra 45027796d03SPeter Zijlstraconfig MMU_GATHER_NO_RANGE 45127796d03SPeter Zijlstra bool 4521e9fdf21SPeter Zijlstra select MMU_GATHER_MERGE_VMAS 4531e9fdf21SPeter Zijlstra 4541e9fdf21SPeter Zijlstraconfig MMU_GATHER_NO_FLUSH_CACHE 4551e9fdf21SPeter Zijlstra bool 4561e9fdf21SPeter Zijlstra 4571e9fdf21SPeter Zijlstraconfig MMU_GATHER_MERGE_VMAS 4581e9fdf21SPeter Zijlstra bool 45927796d03SPeter Zijlstra 460580a586cSPeter Zijlstraconfig MMU_GATHER_NO_GATHER 461952a31c9SMartin Schwidefsky bool 4620d6e24d4SPeter Zijlstra depends on MMU_GATHER_TABLE_FREE 463952a31c9SMartin Schwidefsky 464d53c3dfbSNicholas Pigginconfig ARCH_WANT_IRQS_OFF_ACTIVATE_MM 465d53c3dfbSNicholas Piggin bool 466d53c3dfbSNicholas Piggin help 467d53c3dfbSNicholas Piggin Temporary select until all architectures can be converted to have 468d53c3dfbSNicholas Piggin irqs disabled over activate_mm. Architectures that do IPI based TLB 469d53c3dfbSNicholas Piggin shootdowns should enable this. 470d53c3dfbSNicholas Piggin 47188e3009bSNicholas Piggin# Use normal mm refcounting for MMU_LAZY_TLB kernel thread references. 47288e3009bSNicholas Piggin# MMU_LAZY_TLB_REFCOUNT=n can improve the scalability of context switching 47388e3009bSNicholas Piggin# to/from kernel threads when the same mm is running on a lot of CPUs (a large 47488e3009bSNicholas Piggin# multi-threaded application), by reducing contention on the mm refcount. 47588e3009bSNicholas Piggin# 47688e3009bSNicholas Piggin# This can be disabled if the architecture ensures no CPUs are using an mm as a 47788e3009bSNicholas Piggin# "lazy tlb" beyond its final refcount (i.e., by the time __mmdrop frees the mm 47888e3009bSNicholas Piggin# or its kernel page tables). This could be arranged by arch_exit_mmap(), or 47988e3009bSNicholas Piggin# final exit(2) TLB flush, for example. 48088e3009bSNicholas Piggin# 48188e3009bSNicholas Piggin# To implement this, an arch *must*: 48288e3009bSNicholas Piggin# Ensure the _lazy_tlb variants of mmgrab/mmdrop are used when manipulating 48388e3009bSNicholas Piggin# the lazy tlb reference of a kthread's ->active_mm (non-arch code has been 48488e3009bSNicholas Piggin# converted already). 48588e3009bSNicholas Pigginconfig MMU_LAZY_TLB_REFCOUNT 48688e3009bSNicholas Piggin def_bool y 4872655421aSNicholas Piggin depends on !MMU_LAZY_TLB_SHOOTDOWN 4882655421aSNicholas Piggin 4892655421aSNicholas Piggin# This option allows MMU_LAZY_TLB_REFCOUNT=n. It ensures no CPUs are using an 4902655421aSNicholas Piggin# mm as a lazy tlb beyond its last reference count, by shooting down these 4912655421aSNicholas Piggin# users before the mm is deallocated. __mmdrop() first IPIs all CPUs that may 4922655421aSNicholas Piggin# be using the mm as a lazy tlb, so that they may switch themselves to using 4932655421aSNicholas Piggin# init_mm for their active mm. mm_cpumask(mm) is used to determine which CPUs 4942655421aSNicholas Piggin# may be using mm as a lazy tlb mm. 4952655421aSNicholas Piggin# 4962655421aSNicholas Piggin# To implement this, an arch *must*: 4972655421aSNicholas Piggin# - At the time of the final mmdrop of the mm, ensure mm_cpumask(mm) contains 4982655421aSNicholas Piggin# at least all possible CPUs in which the mm is lazy. 4992655421aSNicholas Piggin# - It must meet the requirements for MMU_LAZY_TLB_REFCOUNT=n (see above). 5002655421aSNicholas Pigginconfig MMU_LAZY_TLB_SHOOTDOWN 5012655421aSNicholas Piggin bool 50288e3009bSNicholas Piggin 503df013ffbSHuang Yingconfig ARCH_HAVE_NMI_SAFE_CMPXCHG 504df013ffbSHuang Ying bool 505df013ffbSHuang Ying 5062e83b879SPaul E. McKenneyconfig ARCH_HAS_NMI_SAFE_THIS_CPU_OPS 5072e83b879SPaul E. McKenney bool 5082e83b879SPaul E. McKenney 50943570fd2SHeiko Carstensconfig HAVE_ALIGNED_STRUCT_PAGE 51043570fd2SHeiko Carstens bool 51143570fd2SHeiko Carstens help 51243570fd2SHeiko Carstens This makes sure that struct pages are double word aligned and that 51343570fd2SHeiko Carstens e.g. the SLUB allocator can perform double word atomic operations 51443570fd2SHeiko Carstens on a struct page for better performance. However selecting this 51543570fd2SHeiko Carstens might increase the size of a struct page by a word. 51643570fd2SHeiko Carstens 5174156153cSHeiko Carstensconfig HAVE_CMPXCHG_LOCAL 5184156153cSHeiko Carstens bool 5194156153cSHeiko Carstens 5202565409fSHeiko Carstensconfig HAVE_CMPXCHG_DOUBLE 5212565409fSHeiko Carstens bool 5222565409fSHeiko Carstens 52377e58496SPaul E. McKenneyconfig ARCH_WEAK_RELEASE_ACQUIRE 52477e58496SPaul E. McKenney bool 52577e58496SPaul E. McKenney 526c1d7e01dSWill Deaconconfig ARCH_WANT_IPC_PARSE_VERSION 527c1d7e01dSWill Deacon bool 528c1d7e01dSWill Deacon 529c1d7e01dSWill Deaconconfig ARCH_WANT_COMPAT_IPC_PARSE_VERSION 530c1d7e01dSWill Deacon bool 531c1d7e01dSWill Deacon 53248b25c43SChris Metcalfconfig ARCH_WANT_OLD_COMPAT_IPC 533c1d7e01dSWill Deacon select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 53448b25c43SChris Metcalf bool 53548b25c43SChris Metcalf 536282a181bSYiFei Zhuconfig HAVE_ARCH_SECCOMP 537e2cfabdfSWill Drewry bool 538e2cfabdfSWill Drewry help 539282a181bSYiFei Zhu An arch should select this symbol to support seccomp mode 1 (the fixed 540282a181bSYiFei Zhu syscall policy), and must provide an overrides for __NR_seccomp_sigreturn, 541282a181bSYiFei Zhu and compat syscalls if the asm-generic/seccomp.h defaults need adjustment: 542282a181bSYiFei Zhu - __NR_seccomp_read_32 543282a181bSYiFei Zhu - __NR_seccomp_write_32 544282a181bSYiFei Zhu - __NR_seccomp_exit_32 545282a181bSYiFei Zhu - __NR_seccomp_sigreturn_32 546282a181bSYiFei Zhu 547282a181bSYiFei Zhuconfig HAVE_ARCH_SECCOMP_FILTER 548282a181bSYiFei Zhu bool 549282a181bSYiFei Zhu select HAVE_ARCH_SECCOMP 550282a181bSYiFei Zhu help 551fb0fadf9SWill Drewry An arch should select this symbol if it provides all of these things: 552282a181bSYiFei Zhu - all the requirements for HAVE_ARCH_SECCOMP 553bb6ea430SWill Drewry - syscall_get_arch() 554bb6ea430SWill Drewry - syscall_get_arguments() 555bb6ea430SWill Drewry - syscall_rollback() 556bb6ea430SWill Drewry - syscall_set_return_value() 557fb0fadf9SWill Drewry - SIGSYS siginfo_t support 558fb0fadf9SWill Drewry - secure_computing is called from a ptrace_event()-safe context 559fb0fadf9SWill Drewry - secure_computing return value is checked and a return value of -1 560fb0fadf9SWill Drewry results in the system call being skipped immediately. 56148dc92b9SKees Cook - seccomp syscall wired up 5620d8315ddSYiFei Zhu - if !HAVE_SPARSE_SYSCALL_NR, have SECCOMP_ARCH_NATIVE, 5630d8315ddSYiFei Zhu SECCOMP_ARCH_NATIVE_NR, SECCOMP_ARCH_NATIVE_NAME defined. If 5640d8315ddSYiFei Zhu COMPAT is supported, have the SECCOMP_ARCH_COMPAT* defines too. 565e2cfabdfSWill Drewry 566282a181bSYiFei Zhuconfig SECCOMP 567282a181bSYiFei Zhu prompt "Enable seccomp to safely execute untrusted bytecode" 568282a181bSYiFei Zhu def_bool y 569282a181bSYiFei Zhu depends on HAVE_ARCH_SECCOMP 570282a181bSYiFei Zhu help 571282a181bSYiFei Zhu This kernel feature is useful for number crunching applications 572282a181bSYiFei Zhu that may need to handle untrusted bytecode during their 573282a181bSYiFei Zhu execution. By using pipes or other transports made available 574282a181bSYiFei Zhu to the process as file descriptors supporting the read/write 575282a181bSYiFei Zhu syscalls, it's possible to isolate those applications in their 576282a181bSYiFei Zhu own address space using seccomp. Once seccomp is enabled via 577282a181bSYiFei Zhu prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be 578282a181bSYiFei Zhu disabled and the task is only allowed to execute a few safe 579282a181bSYiFei Zhu syscalls defined by each seccomp mode. 580282a181bSYiFei Zhu 581282a181bSYiFei Zhu If unsure, say Y. 582282a181bSYiFei Zhu 583e2cfabdfSWill Drewryconfig SECCOMP_FILTER 584e2cfabdfSWill Drewry def_bool y 585e2cfabdfSWill Drewry depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET 586e2cfabdfSWill Drewry help 587e2cfabdfSWill Drewry Enable tasks to build secure computing environments defined 588e2cfabdfSWill Drewry in terms of Berkeley Packet Filter programs which implement 589e2cfabdfSWill Drewry task-defined system call filtering polices. 590e2cfabdfSWill Drewry 5915fb94e9cSMauro Carvalho Chehab See Documentation/userspace-api/seccomp_filter.rst for details. 592e2cfabdfSWill Drewry 5930d8315ddSYiFei Zhuconfig SECCOMP_CACHE_DEBUG 5940d8315ddSYiFei Zhu bool "Show seccomp filter cache status in /proc/pid/seccomp_cache" 5950d8315ddSYiFei Zhu depends on SECCOMP_FILTER && !HAVE_SPARSE_SYSCALL_NR 5960d8315ddSYiFei Zhu depends on PROC_FS 5970d8315ddSYiFei Zhu help 5980d8315ddSYiFei Zhu This enables the /proc/pid/seccomp_cache interface to monitor 5990d8315ddSYiFei Zhu seccomp cache data. The file format is subject to change. Reading 6000d8315ddSYiFei Zhu the file requires CAP_SYS_ADMIN. 6010d8315ddSYiFei Zhu 6020d8315ddSYiFei Zhu This option is for debugging only. Enabling presents the risk that 6030d8315ddSYiFei Zhu an adversary may be able to infer the seccomp filter logic. 6040d8315ddSYiFei Zhu 6050d8315ddSYiFei Zhu If unsure, say N. 6060d8315ddSYiFei Zhu 607afaef01cSAlexander Popovconfig HAVE_ARCH_STACKLEAK 608afaef01cSAlexander Popov bool 609afaef01cSAlexander Popov help 610afaef01cSAlexander Popov An architecture should select this if it has the code which 611afaef01cSAlexander Popov fills the used part of the kernel stack with the STACKLEAK_POISON 612afaef01cSAlexander Popov value before returning from system calls. 613afaef01cSAlexander Popov 614d148eac0SMasahiro Yamadaconfig HAVE_STACKPROTECTOR 61519952a92SKees Cook bool 61619952a92SKees Cook help 61719952a92SKees Cook An arch should select this symbol if: 61819952a92SKees Cook - it has implemented a stack canary (e.g. __stack_chk_guard) 61919952a92SKees Cook 620050e9baaSLinus Torvaldsconfig STACKPROTECTOR 6212a61f474SMasahiro Yamada bool "Stack Protector buffer overflow detection" 622d148eac0SMasahiro Yamada depends on HAVE_STACKPROTECTOR 6232a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector) 6242a61f474SMasahiro Yamada default y 6258779657dSKees Cook help 6268779657dSKees Cook This option turns on the "stack-protector" GCC feature. This 62719952a92SKees Cook feature puts, at the beginning of functions, a canary value on 62819952a92SKees Cook the stack just before the return address, and validates 62919952a92SKees Cook the value just before actually returning. Stack based buffer 63019952a92SKees Cook overflows (that need to overwrite this return address) now also 63119952a92SKees Cook overwrite the canary, which gets detected and the attack is then 63219952a92SKees Cook neutralized via a kernel panic. 63319952a92SKees Cook 6348779657dSKees Cook Functions will have the stack-protector canary logic added if they 6358779657dSKees Cook have an 8-byte or larger character array on the stack. 6368779657dSKees Cook 63719952a92SKees Cook This feature requires gcc version 4.2 or above, or a distribution 6388779657dSKees Cook gcc with the feature backported ("-fstack-protector"). 6398779657dSKees Cook 6408779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 6418779657dSKees Cook about 3% of all kernel functions, which increases kernel code size 6428779657dSKees Cook by about 0.3%. 6438779657dSKees Cook 644050e9baaSLinus Torvaldsconfig STACKPROTECTOR_STRONG 6452a61f474SMasahiro Yamada bool "Strong Stack Protector" 646050e9baaSLinus Torvalds depends on STACKPROTECTOR 6472a61f474SMasahiro Yamada depends on $(cc-option,-fstack-protector-strong) 6482a61f474SMasahiro Yamada default y 6498779657dSKees Cook help 6508779657dSKees Cook Functions will have the stack-protector canary logic added in any 6518779657dSKees Cook of the following conditions: 6528779657dSKees Cook 6538779657dSKees Cook - local variable's address used as part of the right hand side of an 6548779657dSKees Cook assignment or function argument 6558779657dSKees Cook - local variable is an array (or union containing an array), 6568779657dSKees Cook regardless of array type or length 6578779657dSKees Cook - uses register local variables 6588779657dSKees Cook 6598779657dSKees Cook This feature requires gcc version 4.9 or above, or a distribution 6608779657dSKees Cook gcc with the feature backported ("-fstack-protector-strong"). 6618779657dSKees Cook 6628779657dSKees Cook On an x86 "defconfig" build, this feature adds canary checks to 6638779657dSKees Cook about 20% of all kernel functions, which increases the kernel code 6648779657dSKees Cook size by about 2%. 6658779657dSKees Cook 666d08b9f0cSSami Tolvanenconfig ARCH_SUPPORTS_SHADOW_CALL_STACK 667d08b9f0cSSami Tolvanen bool 668d08b9f0cSSami Tolvanen help 669afcf5441SDan Li An architecture should select this if it supports the compiler's 670afcf5441SDan Li Shadow Call Stack and implements runtime support for shadow stack 671aa7a65aeSWill Deacon switching. 672d08b9f0cSSami Tolvanen 673d08b9f0cSSami Tolvanenconfig SHADOW_CALL_STACK 674afcf5441SDan Li bool "Shadow Call Stack" 675afcf5441SDan Li depends on ARCH_SUPPORTS_SHADOW_CALL_STACK 67638792972SArd Biesheuvel depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER 677d08b9f0cSSami Tolvanen help 678afcf5441SDan Li This option enables the compiler's Shadow Call Stack, which 679afcf5441SDan Li uses a shadow stack to protect function return addresses from 680afcf5441SDan Li being overwritten by an attacker. More information can be found 681afcf5441SDan Li in the compiler's documentation: 682d08b9f0cSSami Tolvanen 683afcf5441SDan Li - Clang: https://clang.llvm.org/docs/ShadowCallStack.html 684afcf5441SDan Li - GCC: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#Instrumentation-Options 685d08b9f0cSSami Tolvanen 686d08b9f0cSSami Tolvanen Note that security guarantees in the kernel differ from the 687d08b9f0cSSami Tolvanen ones documented for user space. The kernel must store addresses 688d08b9f0cSSami Tolvanen of shadow stacks in memory, which means an attacker capable of 689d08b9f0cSSami Tolvanen reading and writing arbitrary memory may be able to locate them 690d08b9f0cSSami Tolvanen and hijack control flow by modifying the stacks. 691d08b9f0cSSami Tolvanen 6929beccca0SArd Biesheuvelconfig DYNAMIC_SCS 6939beccca0SArd Biesheuvel bool 6949beccca0SArd Biesheuvel help 6959beccca0SArd Biesheuvel Set by the arch code if it relies on code patching to insert the 6969beccca0SArd Biesheuvel shadow call stack push and pop instructions rather than on the 6979beccca0SArd Biesheuvel compiler. 6989beccca0SArd Biesheuvel 699dc5723b0SSami Tolvanenconfig LTO 700dc5723b0SSami Tolvanen bool 701dc5723b0SSami Tolvanen help 702dc5723b0SSami Tolvanen Selected if the kernel will be built using the compiler's LTO feature. 703dc5723b0SSami Tolvanen 704dc5723b0SSami Tolvanenconfig LTO_CLANG 705dc5723b0SSami Tolvanen bool 706dc5723b0SSami Tolvanen select LTO 707dc5723b0SSami Tolvanen help 708dc5723b0SSami Tolvanen Selected if the kernel will be built using Clang's LTO feature. 709dc5723b0SSami Tolvanen 710dc5723b0SSami Tolvanenconfig ARCH_SUPPORTS_LTO_CLANG 711dc5723b0SSami Tolvanen bool 712dc5723b0SSami Tolvanen help 713dc5723b0SSami Tolvanen An architecture should select this option if it supports: 714dc5723b0SSami Tolvanen - compiling with Clang, 715dc5723b0SSami Tolvanen - compiling inline assembly with Clang's integrated assembler, 716dc5723b0SSami Tolvanen - and linking with LLD. 717dc5723b0SSami Tolvanen 718dc5723b0SSami Tolvanenconfig ARCH_SUPPORTS_LTO_CLANG_THIN 719dc5723b0SSami Tolvanen bool 720dc5723b0SSami Tolvanen help 721dc5723b0SSami Tolvanen An architecture should select this option if it can support Clang's 722dc5723b0SSami Tolvanen ThinLTO mode. 723dc5723b0SSami Tolvanen 724dc5723b0SSami Tolvanenconfig HAS_LTO_CLANG 725dc5723b0SSami Tolvanen def_bool y 7261e68a8afSNathan Chancellor depends on CC_IS_CLANG && LD_IS_LLD && AS_IS_LLVM 727dc5723b0SSami Tolvanen depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) 728dc5723b0SSami Tolvanen depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) 729dc5723b0SSami Tolvanen depends on ARCH_SUPPORTS_LTO_CLANG 730dc5723b0SSami Tolvanen depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT 731bf3c2551SSami Tolvanen depends on !KASAN || KASAN_HW_TAGS 732dc5723b0SSami Tolvanen depends on !GCOV_KERNEL 733dc5723b0SSami Tolvanen help 734dc5723b0SSami Tolvanen The compiler and Kconfig options support building with Clang's 735dc5723b0SSami Tolvanen LTO. 736dc5723b0SSami Tolvanen 737dc5723b0SSami Tolvanenchoice 738dc5723b0SSami Tolvanen prompt "Link Time Optimization (LTO)" 739dc5723b0SSami Tolvanen default LTO_NONE 740dc5723b0SSami Tolvanen help 741dc5723b0SSami Tolvanen This option enables Link Time Optimization (LTO), which allows the 742dc5723b0SSami Tolvanen compiler to optimize binaries globally. 743dc5723b0SSami Tolvanen 744dc5723b0SSami Tolvanen If unsure, select LTO_NONE. Note that LTO is very resource-intensive 745dc5723b0SSami Tolvanen so it's disabled by default. 746dc5723b0SSami Tolvanen 747dc5723b0SSami Tolvanenconfig LTO_NONE 748dc5723b0SSami Tolvanen bool "None" 749dc5723b0SSami Tolvanen help 750dc5723b0SSami Tolvanen Build the kernel normally, without Link Time Optimization (LTO). 751dc5723b0SSami Tolvanen 752dc5723b0SSami Tolvanenconfig LTO_CLANG_FULL 753dc5723b0SSami Tolvanen bool "Clang Full LTO (EXPERIMENTAL)" 754dc5723b0SSami Tolvanen depends on HAS_LTO_CLANG 755dc5723b0SSami Tolvanen depends on !COMPILE_TEST 756dc5723b0SSami Tolvanen select LTO_CLANG 757dc5723b0SSami Tolvanen help 758dc5723b0SSami Tolvanen This option enables Clang's full Link Time Optimization (LTO), which 759dc5723b0SSami Tolvanen allows the compiler to optimize the kernel globally. If you enable 760dc5723b0SSami Tolvanen this option, the compiler generates LLVM bitcode instead of ELF 761dc5723b0SSami Tolvanen object files, and the actual compilation from bitcode happens at 762dc5723b0SSami Tolvanen the LTO link step, which may take several minutes depending on the 763dc5723b0SSami Tolvanen kernel configuration. More information can be found from LLVM's 764dc5723b0SSami Tolvanen documentation: 765dc5723b0SSami Tolvanen 766dc5723b0SSami Tolvanen https://llvm.org/docs/LinkTimeOptimization.html 767dc5723b0SSami Tolvanen 768dc5723b0SSami Tolvanen During link time, this option can use a large amount of RAM, and 769dc5723b0SSami Tolvanen may take much longer than the ThinLTO option. 770dc5723b0SSami Tolvanen 771dc5723b0SSami Tolvanenconfig LTO_CLANG_THIN 772dc5723b0SSami Tolvanen bool "Clang ThinLTO (EXPERIMENTAL)" 773dc5723b0SSami Tolvanen depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN 774dc5723b0SSami Tolvanen select LTO_CLANG 775dc5723b0SSami Tolvanen help 776dc5723b0SSami Tolvanen This option enables Clang's ThinLTO, which allows for parallel 777dc5723b0SSami Tolvanen optimization and faster incremental compiles compared to the 778dc5723b0SSami Tolvanen CONFIG_LTO_CLANG_FULL option. More information can be found 779dc5723b0SSami Tolvanen from Clang's documentation: 780dc5723b0SSami Tolvanen 781dc5723b0SSami Tolvanen https://clang.llvm.org/docs/ThinLTO.html 782dc5723b0SSami Tolvanen 783dc5723b0SSami Tolvanen If unsure, say Y. 784dc5723b0SSami Tolvanenendchoice 785dc5723b0SSami Tolvanen 786cf68fffbSSami Tolvanenconfig ARCH_SUPPORTS_CFI_CLANG 787cf68fffbSSami Tolvanen bool 788cf68fffbSSami Tolvanen help 789cf68fffbSSami Tolvanen An architecture should select this option if it can support Clang's 790cf68fffbSSami Tolvanen Control-Flow Integrity (CFI) checking. 791cf68fffbSSami Tolvanen 79289245600SSami Tolvanenconfig ARCH_USES_CFI_TRAPS 79389245600SSami Tolvanen bool 79489245600SSami Tolvanen 795cf68fffbSSami Tolvanenconfig CFI_CLANG 796cf68fffbSSami Tolvanen bool "Use Clang's Control Flow Integrity (CFI)" 79789245600SSami Tolvanen depends on ARCH_SUPPORTS_CFI_CLANG 79889245600SSami Tolvanen depends on $(cc-option,-fsanitize=kcfi) 799cf68fffbSSami Tolvanen help 800cf68fffbSSami Tolvanen This option enables Clang’s forward-edge Control Flow Integrity 801cf68fffbSSami Tolvanen (CFI) checking, where the compiler injects a runtime check to each 802cf68fffbSSami Tolvanen indirect function call to ensure the target is a valid function with 803cf68fffbSSami Tolvanen the correct static type. This restricts possible call targets and 804cf68fffbSSami Tolvanen makes it more difficult for an attacker to exploit bugs that allow 805cf68fffbSSami Tolvanen the modification of stored function pointers. More information can be 806cf68fffbSSami Tolvanen found from Clang's documentation: 807cf68fffbSSami Tolvanen 808cf68fffbSSami Tolvanen https://clang.llvm.org/docs/ControlFlowIntegrity.html 809cf68fffbSSami Tolvanen 810cf68fffbSSami Tolvanenconfig CFI_PERMISSIVE 811cf68fffbSSami Tolvanen bool "Use CFI in permissive mode" 812cf68fffbSSami Tolvanen depends on CFI_CLANG 813cf68fffbSSami Tolvanen help 814cf68fffbSSami Tolvanen When selected, Control Flow Integrity (CFI) violations result in a 815cf68fffbSSami Tolvanen warning instead of a kernel panic. This option should only be used 816cf68fffbSSami Tolvanen for finding indirect call type mismatches during development. 817cf68fffbSSami Tolvanen 818cf68fffbSSami Tolvanen If unsure, say N. 819cf68fffbSSami Tolvanen 8200f60a8efSKees Cookconfig HAVE_ARCH_WITHIN_STACK_FRAMES 8210f60a8efSKees Cook bool 8220f60a8efSKees Cook help 8230f60a8efSKees Cook An architecture should select this if it can walk the kernel stack 8240f60a8efSKees Cook frames to determine if an object is part of either the arguments 8250f60a8efSKees Cook or local variables (i.e. that it excludes saved return addresses, 8260f60a8efSKees Cook and similar) by implementing an inline arch_within_stack_frames(), 8270f60a8efSKees Cook which is used by CONFIG_HARDENED_USERCOPY. 8280f60a8efSKees Cook 82924a9c541SFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING_USER 8302b1d5024SFrederic Weisbecker bool 8312b1d5024SFrederic Weisbecker help 83291d1aa43SFrederic Weisbecker Provide kernel/user boundaries probes necessary for subsystems 83391d1aa43SFrederic Weisbecker that need it, such as userspace RCU extended quiescent state. 834490f561bSFrederic Weisbecker Syscalls need to be wrapped inside user_exit()-user_enter(), either 835490f561bSFrederic Weisbecker optimized behind static key or through the slow path using TIF_NOHZ 836490f561bSFrederic Weisbecker flag. Exceptions handlers must be wrapped as well. Irqs are already 8376f0e6c15SFrederic Weisbecker protected inside ct_irq_enter/ct_irq_exit() but preemption or signal 838490f561bSFrederic Weisbecker handling on irq exit still need to be protected. 839490f561bSFrederic Weisbecker 84024a9c541SFrederic Weisbeckerconfig HAVE_CONTEXT_TRACKING_USER_OFFSTACK 84183c2da2eSFrederic Weisbecker bool 84283c2da2eSFrederic Weisbecker help 84383c2da2eSFrederic Weisbecker Architecture neither relies on exception_enter()/exception_exit() 84483c2da2eSFrederic Weisbecker nor on schedule_user(). Also preempt_schedule_notrace() and 84583c2da2eSFrederic Weisbecker preempt_schedule_irq() can't be called in a preemptible section 84683c2da2eSFrederic Weisbecker while context tracking is CONTEXT_USER. This feature reflects a sane 84783c2da2eSFrederic Weisbecker entry implementation where the following requirements are met on 84883c2da2eSFrederic Weisbecker critical entry code, ie: before user_exit() or after user_enter(): 84983c2da2eSFrederic Weisbecker 85083c2da2eSFrederic Weisbecker - Critical entry code isn't preemptible (or better yet: 85183c2da2eSFrederic Weisbecker not interruptible). 852493c1822SFrederic Weisbecker - No use of RCU read side critical sections, unless ct_nmi_enter() 85383c2da2eSFrederic Weisbecker got called. 85483c2da2eSFrederic Weisbecker - No use of instrumentation, unless instrumentation_begin() got 85583c2da2eSFrederic Weisbecker called. 85683c2da2eSFrederic Weisbecker 857490f561bSFrederic Weisbeckerconfig HAVE_TIF_NOHZ 858490f561bSFrederic Weisbecker bool 859490f561bSFrederic Weisbecker help 860490f561bSFrederic Weisbecker Arch relies on TIF_NOHZ and syscall slow path to implement context 861490f561bSFrederic Weisbecker tracking calls to user_enter()/user_exit(). 8622b1d5024SFrederic Weisbecker 863b952741cSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING 864b952741cSFrederic Weisbecker bool 865b952741cSFrederic Weisbecker 8662b91ec9fSFrederic Weisbeckerconfig HAVE_VIRT_CPU_ACCOUNTING_IDLE 8672b91ec9fSFrederic Weisbecker bool 8682b91ec9fSFrederic Weisbecker help 8692b91ec9fSFrederic Weisbecker Architecture has its own way to account idle CPU time and therefore 8702b91ec9fSFrederic Weisbecker doesn't implement vtime_account_idle(). 8712b91ec9fSFrederic Weisbecker 87240565b5aSStanislaw Gruszkaconfig ARCH_HAS_SCALED_CPUTIME 87340565b5aSStanislaw Gruszka bool 87440565b5aSStanislaw Gruszka 875554b0004SKevin Hilmanconfig HAVE_VIRT_CPU_ACCOUNTING_GEN 876554b0004SKevin Hilman bool 877554b0004SKevin Hilman default y if 64BIT 878554b0004SKevin Hilman help 879554b0004SKevin Hilman With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. 880554b0004SKevin Hilman Before enabling this option, arch code must be audited 881554b0004SKevin Hilman to ensure there are no races in concurrent read/write of 882554b0004SKevin Hilman cputime_t. For example, reading/writing 64-bit cputime_t on 883554b0004SKevin Hilman some 32-bit arches may require multiple accesses, so proper 884554b0004SKevin Hilman locking is needed to protect against concurrent accesses. 885554b0004SKevin Hilman 886fdf9c356SFrederic Weisbeckerconfig HAVE_IRQ_TIME_ACCOUNTING 887fdf9c356SFrederic Weisbecker bool 888fdf9c356SFrederic Weisbecker help 889fdf9c356SFrederic Weisbecker Archs need to ensure they use a high enough resolution clock to 890fdf9c356SFrederic Weisbecker support irq time accounting and then call enable_sched_clock_irqtime(). 891fdf9c356SFrederic Weisbecker 892c49dd340SKalesh Singhconfig HAVE_MOVE_PUD 893c49dd340SKalesh Singh bool 894c49dd340SKalesh Singh help 895c49dd340SKalesh Singh Architectures that select this are able to move page tables at the 896c49dd340SKalesh Singh PUD level. If there are only 3 page table levels, the move effectively 897c49dd340SKalesh Singh happens at the PGD level. 898c49dd340SKalesh Singh 8992c91bd4aSJoel Fernandes (Google)config HAVE_MOVE_PMD 9002c91bd4aSJoel Fernandes (Google) bool 9012c91bd4aSJoel Fernandes (Google) help 9022c91bd4aSJoel Fernandes (Google) Archs that select this are able to move page tables at the PMD level. 9032c91bd4aSJoel Fernandes (Google) 90415626062SGerald Schaeferconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE 90515626062SGerald Schaefer bool 90615626062SGerald Schaefer 907a00cc7d9SMatthew Wilcoxconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 908a00cc7d9SMatthew Wilcox bool 909a00cc7d9SMatthew Wilcox 9100ddab1d2SToshi Kaniconfig HAVE_ARCH_HUGE_VMAP 9110ddab1d2SToshi Kani bool 9120ddab1d2SToshi Kani 913121e6f32SNicholas Piggin# 914121e6f32SNicholas Piggin# Archs that select this would be capable of PMD-sized vmaps (i.e., 915559089e0SSong Liu# arch_vmap_pmd_supported() returns true). The VM_ALLOW_HUGE_VMAP flag 916559089e0SSong Liu# must be used to enable allocations to use hugepages. 917121e6f32SNicholas Piggin# 918121e6f32SNicholas Pigginconfig HAVE_ARCH_HUGE_VMALLOC 919121e6f32SNicholas Piggin depends on HAVE_ARCH_HUGE_VMAP 920121e6f32SNicholas Piggin bool 921121e6f32SNicholas Piggin 9223876d4a3SAlexandre Ghiticonfig ARCH_WANT_HUGE_PMD_SHARE 9233876d4a3SAlexandre Ghiti bool 9243876d4a3SAlexandre Ghiti 9250f8975ecSPavel Emelyanovconfig HAVE_ARCH_SOFT_DIRTY 9260f8975ecSPavel Emelyanov bool 9270f8975ecSPavel Emelyanov 928786d35d4SDavid Howellsconfig HAVE_MOD_ARCH_SPECIFIC 929786d35d4SDavid Howells bool 930786d35d4SDavid Howells help 931786d35d4SDavid Howells The arch uses struct mod_arch_specific to store data. Many arches 932786d35d4SDavid Howells just need a simple module loader without arch specific data - those 933786d35d4SDavid Howells should not enable this. 934786d35d4SDavid Howells 935786d35d4SDavid Howellsconfig MODULES_USE_ELF_RELA 936786d35d4SDavid Howells bool 937786d35d4SDavid Howells help 938786d35d4SDavid Howells Modules only use ELF RELA relocations. Modules with ELF REL 939786d35d4SDavid Howells relocations will give an error. 940786d35d4SDavid Howells 941786d35d4SDavid Howellsconfig MODULES_USE_ELF_REL 942786d35d4SDavid Howells bool 943786d35d4SDavid Howells help 944786d35d4SDavid Howells Modules only use ELF REL relocations. Modules with ELF RELA 945786d35d4SDavid Howells relocations will give an error. 946786d35d4SDavid Howells 94701dc0386SChristophe Leroyconfig ARCH_WANTS_MODULES_DATA_IN_VMALLOC 94801dc0386SChristophe Leroy bool 94901dc0386SChristophe Leroy help 95001dc0386SChristophe Leroy For architectures like powerpc/32 which have constraints on module 95101dc0386SChristophe Leroy allocation and need to allocate module data outside of module area. 95201dc0386SChristophe Leroy 953cc1f0274SFrederic Weisbeckerconfig HAVE_IRQ_EXIT_ON_IRQ_STACK 954cc1f0274SFrederic Weisbecker bool 955cc1f0274SFrederic Weisbecker help 956cc1f0274SFrederic Weisbecker Architecture doesn't only execute the irq handler on the irq stack 957cc1f0274SFrederic Weisbecker but also irq_exit(). This way we can process softirqs on this irq 958cc1f0274SFrederic Weisbecker stack instead of switching to a new one when we call __do_softirq() 959cc1f0274SFrederic Weisbecker in the end of an hardirq. 960cc1f0274SFrederic Weisbecker This spares a stack switch and improves cache usage on softirq 961cc1f0274SFrederic Weisbecker processing. 962cc1f0274SFrederic Weisbecker 963cd1a41ceSThomas Gleixnerconfig HAVE_SOFTIRQ_ON_OWN_STACK 964cd1a41ceSThomas Gleixner bool 965cd1a41ceSThomas Gleixner help 966cd1a41ceSThomas Gleixner Architecture provides a function to run __do_softirq() on a 967c226bc3cSColin Ian King separate stack. 968cd1a41ceSThomas Gleixner 9698cbb2b50SSebastian Andrzej Siewiorconfig SOFTIRQ_ON_OWN_STACK 9708cbb2b50SSebastian Andrzej Siewior def_bool HAVE_SOFTIRQ_ON_OWN_STACK && !PREEMPT_RT 9718cbb2b50SSebastian Andrzej Siewior 97212700c17SArnd Bergmannconfig ALTERNATE_USER_ADDRESS_SPACE 97312700c17SArnd Bergmann bool 97412700c17SArnd Bergmann help 97512700c17SArnd Bergmann Architectures set this when the CPU uses separate address 97612700c17SArnd Bergmann spaces for kernel and user space pointers. In this case, the 97712700c17SArnd Bergmann access_ok() check on a __user pointer is skipped. 97812700c17SArnd Bergmann 979235a8f02SKirill A. Shutemovconfig PGTABLE_LEVELS 980235a8f02SKirill A. Shutemov int 981235a8f02SKirill A. Shutemov default 2 982235a8f02SKirill A. Shutemov 9832b68f6caSKees Cookconfig ARCH_HAS_ELF_RANDOMIZE 9842b68f6caSKees Cook bool 9852b68f6caSKees Cook help 9862b68f6caSKees Cook An architecture supports choosing randomized locations for 9872b68f6caSKees Cook stack, mmap, brk, and ET_DYN. Defined functions: 9882b68f6caSKees Cook - arch_mmap_rnd() 989204db6edSKees Cook - arch_randomize_brk() 9902b68f6caSKees Cook 991d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_BITS 992d07e2259SDaniel Cashman bool 993d07e2259SDaniel Cashman help 994d07e2259SDaniel Cashman An arch should select this symbol if it supports setting a variable 995d07e2259SDaniel Cashman number of bits for use in establishing the base address for mmap 996d07e2259SDaniel Cashman allocations, has MMU enabled and provides values for both: 997d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MIN 998d07e2259SDaniel Cashman - ARCH_MMAP_RND_BITS_MAX 999d07e2259SDaniel Cashman 10005f56a5dfSJiri Slabyconfig HAVE_EXIT_THREAD 10015f56a5dfSJiri Slaby bool 10025f56a5dfSJiri Slaby help 10035f56a5dfSJiri Slaby An architecture implements exit_thread. 10045f56a5dfSJiri Slaby 1005d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MIN 1006d07e2259SDaniel Cashman int 1007d07e2259SDaniel Cashman 1008d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_MAX 1009d07e2259SDaniel Cashman int 1010d07e2259SDaniel Cashman 1011d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS_DEFAULT 1012d07e2259SDaniel Cashman int 1013d07e2259SDaniel Cashman 1014d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_BITS 1015d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address" if EXPERT 1016d07e2259SDaniel Cashman range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX 1017d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT 1018d07e2259SDaniel Cashman default ARCH_MMAP_RND_BITS_MIN 1019d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_BITS 1020d07e2259SDaniel Cashman help 1021d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 1022d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 1023d07e2259SDaniel Cashman resulting from mmap allocations. This value will be bounded 1024d07e2259SDaniel Cashman by the architecture's minimum and maximum supported values. 1025d07e2259SDaniel Cashman 1026d07e2259SDaniel Cashman This value can be changed after boot using the 1027d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_bits tunable 1028d07e2259SDaniel Cashman 1029d07e2259SDaniel Cashmanconfig HAVE_ARCH_MMAP_RND_COMPAT_BITS 1030d07e2259SDaniel Cashman bool 1031d07e2259SDaniel Cashman help 1032d07e2259SDaniel Cashman An arch should select this symbol if it supports running applications 1033d07e2259SDaniel Cashman in compatibility mode, supports setting a variable number of bits for 1034d07e2259SDaniel Cashman use in establishing the base address for mmap allocations, has MMU 1035d07e2259SDaniel Cashman enabled and provides values for both: 1036d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MIN 1037d07e2259SDaniel Cashman - ARCH_MMAP_RND_COMPAT_BITS_MAX 1038d07e2259SDaniel Cashman 1039d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MIN 1040d07e2259SDaniel Cashman int 1041d07e2259SDaniel Cashman 1042d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_MAX 1043d07e2259SDaniel Cashman int 1044d07e2259SDaniel Cashman 1045d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 1046d07e2259SDaniel Cashman int 1047d07e2259SDaniel Cashman 1048d07e2259SDaniel Cashmanconfig ARCH_MMAP_RND_COMPAT_BITS 1049d07e2259SDaniel Cashman int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT 1050d07e2259SDaniel Cashman range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX 1051d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 1052d07e2259SDaniel Cashman default ARCH_MMAP_RND_COMPAT_BITS_MIN 1053d07e2259SDaniel Cashman depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS 1054d07e2259SDaniel Cashman help 1055d07e2259SDaniel Cashman This value can be used to select the number of bits to use to 1056d07e2259SDaniel Cashman determine the random offset to the base address of vma regions 1057d07e2259SDaniel Cashman resulting from mmap allocations for compatible applications This 1058d07e2259SDaniel Cashman value will be bounded by the architecture's minimum and maximum 1059d07e2259SDaniel Cashman supported values. 1060d07e2259SDaniel Cashman 1061d07e2259SDaniel Cashman This value can be changed after boot using the 1062d07e2259SDaniel Cashman /proc/sys/vm/mmap_rnd_compat_bits tunable 1063d07e2259SDaniel Cashman 10641b028f78SDmitry Safonovconfig HAVE_ARCH_COMPAT_MMAP_BASES 10651b028f78SDmitry Safonov bool 10661b028f78SDmitry Safonov help 10671b028f78SDmitry Safonov This allows 64bit applications to invoke 32-bit mmap() syscall 10681b028f78SDmitry Safonov and vice-versa 32-bit applications to call 64-bit mmap(). 10691b028f78SDmitry Safonov Required for applications doing different bitness syscalls. 10701b028f78SDmitry Safonov 10711f0e290cSGuenter Roeckconfig PAGE_SIZE_LESS_THAN_64KB 10721f0e290cSGuenter Roeck def_bool y 10731f0e290cSGuenter Roeck depends on !ARM64_64K_PAGES 10741f0e290cSGuenter Roeck depends on !IA64_PAGE_SIZE_64KB 10751f0e290cSGuenter Roeck depends on !PAGE_SIZE_64KB 10761f0e290cSGuenter Roeck depends on !PARISC_PAGE_SIZE_64KB 1077e4bbd20dSNathan Chancellor depends on PAGE_SIZE_LESS_THAN_256KB 1078e4bbd20dSNathan Chancellor 1079e4bbd20dSNathan Chancellorconfig PAGE_SIZE_LESS_THAN_256KB 1080e4bbd20dSNathan Chancellor def_bool y 10811f0e290cSGuenter Roeck depends on !PAGE_SIZE_256KB 10821f0e290cSGuenter Roeck 108367f3977fSAlexandre Ghiti# This allows to use a set of generic functions to determine mmap base 108467f3977fSAlexandre Ghiti# address by giving priority to top-down scheme only if the process 108567f3977fSAlexandre Ghiti# is not in legacy mode (compat task, unlimited stack size or 108667f3977fSAlexandre Ghiti# sysctl_legacy_va_layout). 108767f3977fSAlexandre Ghiti# Architecture that selects this option can provide its own version of: 108867f3977fSAlexandre Ghiti# - STACK_RND_MASK 108967f3977fSAlexandre Ghiticonfig ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 109067f3977fSAlexandre Ghiti bool 109167f3977fSAlexandre Ghiti depends on MMU 1092e7142bf5SAlexandre Ghiti select ARCH_HAS_ELF_RANDOMIZE 109367f3977fSAlexandre Ghiti 109403f16cd0SJosh Poimboeufconfig HAVE_OBJTOOL 109503f16cd0SJosh Poimboeuf bool 109603f16cd0SJosh Poimboeuf 10974ab7674fSJosh Poimboeufconfig HAVE_JUMP_LABEL_HACK 10984ab7674fSJosh Poimboeuf bool 10994ab7674fSJosh Poimboeuf 110022102f45SJosh Poimboeufconfig HAVE_NOINSTR_HACK 110122102f45SJosh Poimboeuf bool 110222102f45SJosh Poimboeuf 1103489e355bSJosh Poimboeufconfig HAVE_NOINSTR_VALIDATION 1104489e355bSJosh Poimboeuf bool 1105489e355bSJosh Poimboeuf 11065f3da8c0SJosh Poimboeufconfig HAVE_UACCESS_VALIDATION 11075f3da8c0SJosh Poimboeuf bool 11085f3da8c0SJosh Poimboeuf select OBJTOOL 11095f3da8c0SJosh Poimboeuf 1110b9ab5ebbSJosh Poimboeufconfig HAVE_STACK_VALIDATION 1111b9ab5ebbSJosh Poimboeuf bool 1112b9ab5ebbSJosh Poimboeuf help 111303f16cd0SJosh Poimboeuf Architecture supports objtool compile-time frame pointer rule 111403f16cd0SJosh Poimboeuf validation. 1115b9ab5ebbSJosh Poimboeuf 1116af085d90SJosh Poimboeufconfig HAVE_RELIABLE_STACKTRACE 1117af085d90SJosh Poimboeuf bool 1118af085d90SJosh Poimboeuf help 1119140d7e88SMiroslav Benes Architecture has either save_stack_trace_tsk_reliable() or 1120140d7e88SMiroslav Benes arch_stack_walk_reliable() function which only returns a stack trace 1121140d7e88SMiroslav Benes if it can guarantee the trace is reliable. 1122af085d90SJosh Poimboeuf 1123468a9428SGeorge Spelvinconfig HAVE_ARCH_HASH 1124468a9428SGeorge Spelvin bool 1125468a9428SGeorge Spelvin default n 1126468a9428SGeorge Spelvin help 1127468a9428SGeorge Spelvin If this is set, the architecture provides an <asm/hash.h> 1128468a9428SGeorge Spelvin file which provides platform-specific implementations of some 1129468a9428SGeorge Spelvin functions in <linux/hash.h> or fs/namei.c. 1130468a9428SGeorge Spelvin 1131666047feSFinn Thainconfig HAVE_ARCH_NVRAM_OPS 1132666047feSFinn Thain bool 1133666047feSFinn Thain 11343a495511SWilliam Breathitt Grayconfig ISA_BUS_API 11353a495511SWilliam Breathitt Gray def_bool ISA 11363a495511SWilliam Breathitt Gray 1137d2125043SAl Viro# 1138d2125043SAl Viro# ABI hall of shame 1139d2125043SAl Viro# 1140d2125043SAl Viroconfig CLONE_BACKWARDS 1141d2125043SAl Viro bool 1142d2125043SAl Viro help 1143d2125043SAl Viro Architecture has tls passed as the 4th argument of clone(2), 1144d2125043SAl Viro not the 5th one. 1145d2125043SAl Viro 1146d2125043SAl Viroconfig CLONE_BACKWARDS2 1147d2125043SAl Viro bool 1148d2125043SAl Viro help 1149d2125043SAl Viro Architecture has the first two arguments of clone(2) swapped. 1150d2125043SAl Viro 1151dfa9771aSMichal Simekconfig CLONE_BACKWARDS3 1152dfa9771aSMichal Simek bool 1153dfa9771aSMichal Simek help 1154dfa9771aSMichal Simek Architecture has tls passed as the 3rd argument of clone(2), 1155dfa9771aSMichal Simek not the 5th one. 1156dfa9771aSMichal Simek 1157eaca6eaeSAl Viroconfig ODD_RT_SIGACTION 1158eaca6eaeSAl Viro bool 1159eaca6eaeSAl Viro help 1160eaca6eaeSAl Viro Architecture has unusual rt_sigaction(2) arguments 1161eaca6eaeSAl Viro 11620a0e8cdfSAl Viroconfig OLD_SIGSUSPEND 11630a0e8cdfSAl Viro bool 11640a0e8cdfSAl Viro help 11650a0e8cdfSAl Viro Architecture has old sigsuspend(2) syscall, of one-argument variety 11660a0e8cdfSAl Viro 11670a0e8cdfSAl Viroconfig OLD_SIGSUSPEND3 11680a0e8cdfSAl Viro bool 11690a0e8cdfSAl Viro help 11700a0e8cdfSAl Viro Even weirder antique ABI - three-argument sigsuspend(2) 11710a0e8cdfSAl Viro 1172495dfbf7SAl Viroconfig OLD_SIGACTION 1173495dfbf7SAl Viro bool 1174495dfbf7SAl Viro help 1175495dfbf7SAl Viro Architecture has old sigaction(2) syscall. Nope, not the same 1176495dfbf7SAl Viro as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2), 1177495dfbf7SAl Viro but fairly different variant of sigaction(2), thanks to OSF/1 1178495dfbf7SAl Viro compatibility... 1179495dfbf7SAl Viro 1180495dfbf7SAl Viroconfig COMPAT_OLD_SIGACTION 1181495dfbf7SAl Viro bool 1182495dfbf7SAl Viro 118317435e5fSDeepa Dinamaniconfig COMPAT_32BIT_TIME 1184942437c9SArnd Bergmann bool "Provide system calls for 32-bit time_t" 1185942437c9SArnd Bergmann default !64BIT || COMPAT 118617435e5fSDeepa Dinamani help 118717435e5fSDeepa Dinamani This enables 32 bit time_t support in addition to 64 bit time_t support. 118817435e5fSDeepa Dinamani This is relevant on all 32-bit architectures, and 64-bit architectures 118917435e5fSDeepa Dinamani as part of compat syscall handling. 119017435e5fSDeepa Dinamani 119187a4c375SChristoph Hellwigconfig ARCH_NO_PREEMPT 119287a4c375SChristoph Hellwig bool 119387a4c375SChristoph Hellwig 1194cb2c7d1aSMickaël Salaünconfig ARCH_EPHEMERAL_INODES 1195cb2c7d1aSMickaël Salaün def_bool n 1196cb2c7d1aSMickaël Salaün help 1197cb2c7d1aSMickaël Salaün An arch should select this symbol if it doesn't keep track of inode 1198cb2c7d1aSMickaël Salaün instances on its own, but instead relies on something else (e.g. the 1199cb2c7d1aSMickaël Salaün host kernel for an UML kernel). 1200cb2c7d1aSMickaël Salaün 1201a50a3f4bSThomas Gleixnerconfig ARCH_SUPPORTS_RT 1202a50a3f4bSThomas Gleixner bool 1203a50a3f4bSThomas Gleixner 1204fff7fb0bSZhaoxiu Zengconfig CPU_NO_EFFICIENT_FFS 1205fff7fb0bSZhaoxiu Zeng def_bool n 1206fff7fb0bSZhaoxiu Zeng 1207ba14a194SAndy Lutomirskiconfig HAVE_ARCH_VMAP_STACK 1208ba14a194SAndy Lutomirski def_bool n 1209ba14a194SAndy Lutomirski help 1210ba14a194SAndy Lutomirski An arch should select this symbol if it can support kernel stacks 1211ba14a194SAndy Lutomirski in vmalloc space. This means: 1212ba14a194SAndy Lutomirski 1213ba14a194SAndy Lutomirski - vmalloc space must be large enough to hold many kernel stacks. 1214ba14a194SAndy Lutomirski This may rule out many 32-bit architectures. 1215ba14a194SAndy Lutomirski 1216ba14a194SAndy Lutomirski - Stacks in vmalloc space need to work reliably. For example, if 1217ba14a194SAndy Lutomirski vmap page tables are created on demand, either this mechanism 1218ba14a194SAndy Lutomirski needs to work while the stack points to a virtual address with 1219ba14a194SAndy Lutomirski unpopulated page tables or arch code (switch_to() and switch_mm(), 1220ba14a194SAndy Lutomirski most likely) needs to ensure that the stack's page table entries 1221ba14a194SAndy Lutomirski are populated before running on a possibly unpopulated stack. 1222ba14a194SAndy Lutomirski 1223ba14a194SAndy Lutomirski - If the stack overflows into a guard page, something reasonable 1224ba14a194SAndy Lutomirski should happen. The definition of "reasonable" is flexible, but 1225ba14a194SAndy Lutomirski instantly rebooting without logging anything would be unfriendly. 1226ba14a194SAndy Lutomirski 1227ba14a194SAndy Lutomirskiconfig VMAP_STACK 1228ba14a194SAndy Lutomirski default y 1229ba14a194SAndy Lutomirski bool "Use a virtually-mapped stack" 1230eafb149eSDaniel Axtens depends on HAVE_ARCH_VMAP_STACK 123138dd767dSAndrey Konovalov depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC 1232a7f7f624SMasahiro Yamada help 1233ba14a194SAndy Lutomirski Enable this if you want the use virtually-mapped kernel stacks 1234ba14a194SAndy Lutomirski with guard pages. This causes kernel stack overflows to be 1235ba14a194SAndy Lutomirski caught immediately rather than causing difficult-to-diagnose 1236ba14a194SAndy Lutomirski corruption. 1237ba14a194SAndy Lutomirski 123838dd767dSAndrey Konovalov To use this with software KASAN modes, the architecture must support 123938dd767dSAndrey Konovalov backing virtual mappings with real shadow memory, and KASAN_VMALLOC 124038dd767dSAndrey Konovalov must be enabled. 1241ba14a194SAndy Lutomirski 124239218ff4SKees Cookconfig HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 124339218ff4SKees Cook def_bool n 124439218ff4SKees Cook help 124539218ff4SKees Cook An arch should select this symbol if it can support kernel stack 124639218ff4SKees Cook offset randomization with calls to add_random_kstack_offset() 124739218ff4SKees Cook during syscall entry and choose_random_kstack_offset() during 124839218ff4SKees Cook syscall exit. Careful removal of -fstack-protector-strong and 124939218ff4SKees Cook -fstack-protector should also be applied to the entry code and 125039218ff4SKees Cook closely examined, as the artificial stack bump looks like an array 125139218ff4SKees Cook to the compiler, so it will attempt to add canary checks regardless 125239218ff4SKees Cook of the static branch state. 125339218ff4SKees Cook 12548cb37a59SMarco Elverconfig RANDOMIZE_KSTACK_OFFSET 12558cb37a59SMarco Elver bool "Support for randomizing kernel stack offset on syscall entry" if EXPERT 12568cb37a59SMarco Elver default y 125739218ff4SKees Cook depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 1258efa90c11SMarco Elver depends on INIT_STACK_NONE || !CC_IS_CLANG || CLANG_VERSION >= 140000 125939218ff4SKees Cook help 126039218ff4SKees Cook The kernel stack offset can be randomized (after pt_regs) by 126139218ff4SKees Cook roughly 5 bits of entropy, frustrating memory corruption 126239218ff4SKees Cook attacks that depend on stack address determinism or 12638cb37a59SMarco Elver cross-syscall address exposures. 12648cb37a59SMarco Elver 12658cb37a59SMarco Elver The feature is controlled via the "randomize_kstack_offset=on/off" 12668cb37a59SMarco Elver kernel boot param, and if turned off has zero overhead due to its use 12678cb37a59SMarco Elver of static branches (see JUMP_LABEL). 12688cb37a59SMarco Elver 12698cb37a59SMarco Elver If unsure, say Y. 12708cb37a59SMarco Elver 12718cb37a59SMarco Elverconfig RANDOMIZE_KSTACK_OFFSET_DEFAULT 12728cb37a59SMarco Elver bool "Default state of kernel stack offset randomization" 12738cb37a59SMarco Elver depends on RANDOMIZE_KSTACK_OFFSET 12748cb37a59SMarco Elver help 12758cb37a59SMarco Elver Kernel stack offset randomization is controlled by kernel boot param 12768cb37a59SMarco Elver "randomize_kstack_offset=on/off", and this config chooses the default 12778cb37a59SMarco Elver boot state. 127839218ff4SKees Cook 1279ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX 1280ad21fc4fSLaura Abbott def_bool n 1281ad21fc4fSLaura Abbott 1282ad21fc4fSLaura Abbottconfig ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1283ad21fc4fSLaura Abbott def_bool n 1284ad21fc4fSLaura Abbott 1285ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_KERNEL_RWX 1286ad21fc4fSLaura Abbott def_bool n 1287ad21fc4fSLaura Abbott 12880f5bf6d0SLaura Abbottconfig STRICT_KERNEL_RWX 1289ad21fc4fSLaura Abbott bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX 1290ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_KERNEL_RWX 1291ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1292ad21fc4fSLaura Abbott help 1293ad21fc4fSLaura Abbott If this is set, kernel text and rodata memory will be made read-only, 1294ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 1295ad21fc4fSLaura Abbott protection against certain security exploits (e.g. executing the heap 1296ad21fc4fSLaura Abbott or modifying text) 1297ad21fc4fSLaura Abbott 1298ad21fc4fSLaura Abbott These features are considered standard security practice these days. 1299ad21fc4fSLaura Abbott You should say Y here in almost all cases. 1300ad21fc4fSLaura Abbott 1301ad21fc4fSLaura Abbottconfig ARCH_HAS_STRICT_MODULE_RWX 1302ad21fc4fSLaura Abbott def_bool n 1303ad21fc4fSLaura Abbott 13040f5bf6d0SLaura Abbottconfig STRICT_MODULE_RWX 1305ad21fc4fSLaura Abbott bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX 1306ad21fc4fSLaura Abbott depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES 1307ad21fc4fSLaura Abbott default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 1308ad21fc4fSLaura Abbott help 1309ad21fc4fSLaura Abbott If this is set, module text and rodata memory will be made read-only, 1310ad21fc4fSLaura Abbott and non-text memory will be made non-executable. This provides 1311ad21fc4fSLaura Abbott protection against certain security exploits (e.g. writing to text) 1312ad21fc4fSLaura Abbott 1313ea8c64acSChristoph Hellwig# select if the architecture provides an asm/dma-direct.h header 1314ea8c64acSChristoph Hellwigconfig ARCH_HAS_PHYS_TO_DMA 1315ea8c64acSChristoph Hellwig bool 1316ea8c64acSChristoph Hellwig 131704f264d3SPaul Burtonconfig HAVE_ARCH_COMPILER_H 131804f264d3SPaul Burton bool 131904f264d3SPaul Burton help 132004f264d3SPaul Burton An architecture can select this if it provides an 132104f264d3SPaul Burton asm/compiler.h header that should be included after 132204f264d3SPaul Burton linux/compiler-*.h in order to override macro definitions that those 132304f264d3SPaul Burton headers generally provide. 132404f264d3SPaul Burton 1325271ca788SArd Biesheuvelconfig HAVE_ARCH_PREL32_RELOCATIONS 1326271ca788SArd Biesheuvel bool 1327271ca788SArd Biesheuvel help 1328271ca788SArd Biesheuvel May be selected by an architecture if it supports place-relative 1329271ca788SArd Biesheuvel 32-bit relocations, both in the toolchain and in the module loader, 1330271ca788SArd Biesheuvel in which case relative references can be used in special sections 1331271ca788SArd Biesheuvel for PCI fixup, initcalls etc which are only half the size on 64 bit 1332271ca788SArd Biesheuvel architectures, and don't require runtime relocation on relocatable 1333271ca788SArd Biesheuvel kernels. 1334271ca788SArd Biesheuvel 1335ce9084baSArd Biesheuvelconfig ARCH_USE_MEMREMAP_PROT 1336ce9084baSArd Biesheuvel bool 1337ce9084baSArd Biesheuvel 1338fb346fd9SWaiman Longconfig LOCK_EVENT_COUNTS 1339fb346fd9SWaiman Long bool "Locking event counts collection" 1340fb346fd9SWaiman Long depends on DEBUG_FS 1341a7f7f624SMasahiro Yamada help 1342fb346fd9SWaiman Long Enable light-weight counting of various locking related events 1343fb346fd9SWaiman Long in the system with minimal performance impact. This reduces 1344fb346fd9SWaiman Long the chance of application behavior change because of timing 1345fb346fd9SWaiman Long differences. The counts are reported via debugfs. 1346fb346fd9SWaiman Long 13475cf896fbSPeter Collingbourne# Select if the architecture has support for applying RELR relocations. 13485cf896fbSPeter Collingbourneconfig ARCH_HAS_RELR 13495cf896fbSPeter Collingbourne bool 13505cf896fbSPeter Collingbourne 13515cf896fbSPeter Collingbourneconfig RELR 13525cf896fbSPeter Collingbourne bool "Use RELR relocation packing" 13535cf896fbSPeter Collingbourne depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR 13545cf896fbSPeter Collingbourne default y 13555cf896fbSPeter Collingbourne help 13565cf896fbSPeter Collingbourne Store the kernel's dynamic relocations in the RELR relocation packing 13575cf896fbSPeter Collingbourne format. Requires a compatible linker (LLD supports this feature), as 13585cf896fbSPeter Collingbourne well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy 13595cf896fbSPeter Collingbourne are compatible). 13605cf896fbSPeter Collingbourne 13610c9c1d56SThiago Jung Bauermannconfig ARCH_HAS_MEM_ENCRYPT 13620c9c1d56SThiago Jung Bauermann bool 13630c9c1d56SThiago Jung Bauermann 136446b49b12STom Lendackyconfig ARCH_HAS_CC_PLATFORM 136546b49b12STom Lendacky bool 136646b49b12STom Lendacky 13670e242208SHassan Naveedconfig HAVE_SPARSE_SYSCALL_NR 13680e242208SHassan Naveed bool 13690e242208SHassan Naveed help 13700e242208SHassan Naveed An architecture should select this if its syscall numbering is sparse 13710e242208SHassan Naveed to save space. For example, MIPS architecture has a syscall array with 13720e242208SHassan Naveed entries at 4000, 5000 and 6000 locations. This option turns on syscall 13730e242208SHassan Naveed related optimizations for a given architecture. 13740e242208SHassan Naveed 1375d60d7de3SSven Schnelleconfig ARCH_HAS_VDSO_DATA 1376d60d7de3SSven Schnelle bool 1377d60d7de3SSven Schnelle 1378115284d8SJosh Poimboeufconfig HAVE_STATIC_CALL 1379115284d8SJosh Poimboeuf bool 1380115284d8SJosh Poimboeuf 13819183c3f9SJosh Poimboeufconfig HAVE_STATIC_CALL_INLINE 13829183c3f9SJosh Poimboeuf bool 13839183c3f9SJosh Poimboeuf depends on HAVE_STATIC_CALL 138403f16cd0SJosh Poimboeuf select OBJTOOL 13859183c3f9SJosh Poimboeuf 13866ef869e0SMichal Hockoconfig HAVE_PREEMPT_DYNAMIC 13876ef869e0SMichal Hocko bool 138899cf983cSMark Rutland 138999cf983cSMark Rutlandconfig HAVE_PREEMPT_DYNAMIC_CALL 139099cf983cSMark Rutland bool 13916ef869e0SMichal Hocko depends on HAVE_STATIC_CALL 139299cf983cSMark Rutland select HAVE_PREEMPT_DYNAMIC 13936ef869e0SMichal Hocko help 139499cf983cSMark Rutland An architecture should select this if it can handle the preemption 139599cf983cSMark Rutland model being selected at boot time using static calls. 139699cf983cSMark Rutland 139799cf983cSMark Rutland Where an architecture selects HAVE_STATIC_CALL_INLINE, any call to a 139899cf983cSMark Rutland preemption function will be patched directly. 139999cf983cSMark Rutland 140099cf983cSMark Rutland Where an architecture does not select HAVE_STATIC_CALL_INLINE, any 140199cf983cSMark Rutland call to a preemption function will go through a trampoline, and the 140299cf983cSMark Rutland trampoline will be patched. 140399cf983cSMark Rutland 140499cf983cSMark Rutland It is strongly advised to support inline static call to avoid any 140599cf983cSMark Rutland overhead. 140699cf983cSMark Rutland 140799cf983cSMark Rutlandconfig HAVE_PREEMPT_DYNAMIC_KEY 140899cf983cSMark Rutland bool 1409a0a12c3eSNick Desaulniers depends on HAVE_ARCH_JUMP_LABEL 141099cf983cSMark Rutland select HAVE_PREEMPT_DYNAMIC 141199cf983cSMark Rutland help 141299cf983cSMark Rutland An architecture should select this if it can handle the preemption 141399cf983cSMark Rutland model being selected at boot time using static keys. 141499cf983cSMark Rutland 141599cf983cSMark Rutland Each preemption function will be given an early return based on a 141699cf983cSMark Rutland static key. This should have slightly lower overhead than non-inline 141799cf983cSMark Rutland static calls, as this effectively inlines each trampoline into the 141899cf983cSMark Rutland start of its callee. This may avoid redundant work, and may 141999cf983cSMark Rutland integrate better with CFI schemes. 142099cf983cSMark Rutland 142199cf983cSMark Rutland This will have greater overhead than using inline static calls as 142299cf983cSMark Rutland the call to the preemption function cannot be entirely elided. 14236ef869e0SMichal Hocko 142459612b24SNathan Chancellorconfig ARCH_WANT_LD_ORPHAN_WARN 142559612b24SNathan Chancellor bool 142659612b24SNathan Chancellor help 142759612b24SNathan Chancellor An arch should select this symbol once all linker sections are explicitly 142859612b24SNathan Chancellor included, size-asserted, or discarded in the linker scripts. This is 142959612b24SNathan Chancellor important because we never want expected sections to be placed heuristically 143059612b24SNathan Chancellor by the linker, since the locations of such sections can change between linker 143159612b24SNathan Chancellor versions. 143259612b24SNathan Chancellor 14334f5b0c17SMike Rapoportconfig HAVE_ARCH_PFN_VALID 14344f5b0c17SMike Rapoport bool 14354f5b0c17SMike Rapoport 14365d6ad668SMike Rapoportconfig ARCH_SUPPORTS_DEBUG_PAGEALLOC 14375d6ad668SMike Rapoport bool 14385d6ad668SMike Rapoport 1439df4e817bSPasha Tatashinconfig ARCH_SUPPORTS_PAGE_TABLE_CHECK 1440df4e817bSPasha Tatashin bool 1441df4e817bSPasha Tatashin 14422ca408d9SBrian Gerstconfig ARCH_SPLIT_ARG64 14432ca408d9SBrian Gerst bool 14442ca408d9SBrian Gerst help 14452ca408d9SBrian Gerst If a 32-bit architecture requires 64-bit arguments to be split into 14462ca408d9SBrian Gerst pairs of 32-bit arguments, select this option. 14472ca408d9SBrian Gerst 14487facdc42SAl Viroconfig ARCH_HAS_ELFCORE_COMPAT 14497facdc42SAl Viro bool 14507facdc42SAl Viro 145158e106e7SBalbir Singhconfig ARCH_HAS_PARANOID_L1D_FLUSH 145258e106e7SBalbir Singh bool 145358e106e7SBalbir Singh 1454d593d64fSPrasad Sodagudiconfig ARCH_HAVE_TRACE_MMIO_ACCESS 1455d593d64fSPrasad Sodagudi bool 1456d593d64fSPrasad Sodagudi 14571bdda24cSThomas Gleixnerconfig DYNAMIC_SIGFRAME 14581bdda24cSThomas Gleixner bool 14591bdda24cSThomas Gleixner 146050468e43SJarkko Sakkinen# Select, if arch has a named attribute group bound to NUMA device nodes. 146150468e43SJarkko Sakkinenconfig HAVE_ARCH_NODE_DEV_GROUP 146250468e43SJarkko Sakkinen bool 146350468e43SJarkko Sakkinen 1464eed9a328SYu Zhaoconfig ARCH_HAS_NONLEAF_PMD_YOUNG 1465eed9a328SYu Zhao bool 1466eed9a328SYu Zhao help 1467eed9a328SYu Zhao Architectures that select this option are capable of setting the 1468eed9a328SYu Zhao accessed bit in non-leaf PMD entries when using them as part of linear 1469eed9a328SYu Zhao address translations. Page table walkers that clear the accessed bit 1470eed9a328SYu Zhao may use this capability to reduce their search space. 1471eed9a328SYu Zhao 14722521f2c2SPeter Oberparleitersource "kernel/gcov/Kconfig" 147345332b1bSMasahiro Yamada 147445332b1bSMasahiro Yamadasource "scripts/gcc-plugins/Kconfig" 1475fa1b5d09SLinus Torvalds 1476d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_4B 1477d49a0626SPeter Zijlstra bool 1478d49a0626SPeter Zijlstra 1479d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_8B 1480d49a0626SPeter Zijlstra bool 1481d49a0626SPeter Zijlstra 1482d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_16B 1483d49a0626SPeter Zijlstra bool 1484d49a0626SPeter Zijlstra 1485d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_32B 1486d49a0626SPeter Zijlstra bool 1487d49a0626SPeter Zijlstra 1488d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT_64B 1489d49a0626SPeter Zijlstra bool 1490d49a0626SPeter Zijlstra 1491d49a0626SPeter Zijlstraconfig FUNCTION_ALIGNMENT 1492d49a0626SPeter Zijlstra int 1493d49a0626SPeter Zijlstra default 64 if FUNCTION_ALIGNMENT_64B 1494d49a0626SPeter Zijlstra default 32 if FUNCTION_ALIGNMENT_32B 1495d49a0626SPeter Zijlstra default 16 if FUNCTION_ALIGNMENT_16B 1496d49a0626SPeter Zijlstra default 8 if FUNCTION_ALIGNMENT_8B 1497d49a0626SPeter Zijlstra default 4 if FUNCTION_ALIGNMENT_4B 1498d49a0626SPeter Zijlstra default 0 1499d49a0626SPeter Zijlstra 150022471e13SRandy Dunlapendmenu 1501