162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci# 362306a36Sopenharmony_ci# General architecture dependent options 462306a36Sopenharmony_ci# 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci# 762306a36Sopenharmony_ci# Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can 862306a36Sopenharmony_ci# override the default values in this file. 962306a36Sopenharmony_ci# 1062306a36Sopenharmony_cisource "arch/$(SRCARCH)/Kconfig" 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_cimenu "General architecture-dependent options" 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ciconfig ARCH_HAS_SUBPAGE_FAULTS 1562306a36Sopenharmony_ci bool 1662306a36Sopenharmony_ci help 1762306a36Sopenharmony_ci Select if the architecture can check permissions at sub-page 1862306a36Sopenharmony_ci granularity (e.g. arm64 MTE). The probe_user_*() functions 1962306a36Sopenharmony_ci must be implemented. 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ciconfig HOTPLUG_SMT 2262306a36Sopenharmony_ci bool 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ciconfig SMT_NUM_THREADS_DYNAMIC 2562306a36Sopenharmony_ci bool 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci# Selected by HOTPLUG_CORE_SYNC_DEAD or HOTPLUG_CORE_SYNC_FULL 2862306a36Sopenharmony_ciconfig HOTPLUG_CORE_SYNC 2962306a36Sopenharmony_ci bool 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci# Basic CPU dead synchronization selected by architecture 3262306a36Sopenharmony_ciconfig HOTPLUG_CORE_SYNC_DEAD 3362306a36Sopenharmony_ci bool 3462306a36Sopenharmony_ci select HOTPLUG_CORE_SYNC 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci# Full CPU synchronization with alive state selected by architecture 3762306a36Sopenharmony_ciconfig HOTPLUG_CORE_SYNC_FULL 3862306a36Sopenharmony_ci bool 3962306a36Sopenharmony_ci select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU 4062306a36Sopenharmony_ci select HOTPLUG_CORE_SYNC 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ciconfig HOTPLUG_SPLIT_STARTUP 4362306a36Sopenharmony_ci bool 4462306a36Sopenharmony_ci select HOTPLUG_CORE_SYNC_FULL 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ciconfig HOTPLUG_PARALLEL 4762306a36Sopenharmony_ci bool 4862306a36Sopenharmony_ci select HOTPLUG_SPLIT_STARTUP 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ciconfig GENERIC_ENTRY 5162306a36Sopenharmony_ci bool 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ciconfig KPROBES 5462306a36Sopenharmony_ci bool "Kprobes" 5562306a36Sopenharmony_ci depends on MODULES 5662306a36Sopenharmony_ci depends on HAVE_KPROBES 5762306a36Sopenharmony_ci select KALLSYMS 5862306a36Sopenharmony_ci select TASKS_RCU if PREEMPTION 5962306a36Sopenharmony_ci help 6062306a36Sopenharmony_ci Kprobes allows you to trap at almost any kernel address and 6162306a36Sopenharmony_ci execute a callback function. register_kprobe() establishes 6262306a36Sopenharmony_ci a probepoint and specifies the callback. Kprobes is useful 6362306a36Sopenharmony_ci for kernel debugging, non-intrusive instrumentation and testing. 6462306a36Sopenharmony_ci If in doubt, say "N". 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ciconfig JUMP_LABEL 6762306a36Sopenharmony_ci bool "Optimize very unlikely/likely branches" 6862306a36Sopenharmony_ci depends on HAVE_ARCH_JUMP_LABEL 6962306a36Sopenharmony_ci select OBJTOOL if HAVE_JUMP_LABEL_HACK 7062306a36Sopenharmony_ci help 7162306a36Sopenharmony_ci This option enables a transparent branch optimization that 7262306a36Sopenharmony_ci makes certain almost-always-true or almost-always-false branch 7362306a36Sopenharmony_ci conditions even cheaper to execute within the kernel. 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci Certain performance-sensitive kernel code, such as trace points, 7662306a36Sopenharmony_ci scheduler functionality, networking code and KVM have such 7762306a36Sopenharmony_ci branches and include support for this optimization technique. 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci If it is detected that the compiler has support for "asm goto", 8062306a36Sopenharmony_ci the kernel will compile such branches with just a nop 8162306a36Sopenharmony_ci instruction. When the condition flag is toggled to true, the 8262306a36Sopenharmony_ci nop will be converted to a jump instruction to execute the 8362306a36Sopenharmony_ci conditional block of instructions. 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci This technique lowers overhead and stress on the branch prediction 8662306a36Sopenharmony_ci of the processor and generally makes the kernel faster. The update 8762306a36Sopenharmony_ci of the condition is slower, but those are always very rare. 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci ( On 32-bit x86, the necessary options added to the compiler 9062306a36Sopenharmony_ci flags may increase the size of the kernel slightly. ) 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ciconfig STATIC_KEYS_SELFTEST 9362306a36Sopenharmony_ci bool "Static key selftest" 9462306a36Sopenharmony_ci depends on JUMP_LABEL 9562306a36Sopenharmony_ci help 9662306a36Sopenharmony_ci Boot time self-test of the branch patching code. 9762306a36Sopenharmony_ci 9862306a36Sopenharmony_ciconfig STATIC_CALL_SELFTEST 9962306a36Sopenharmony_ci bool "Static call selftest" 10062306a36Sopenharmony_ci depends on HAVE_STATIC_CALL 10162306a36Sopenharmony_ci help 10262306a36Sopenharmony_ci Boot time self-test of the call patching code. 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ciconfig OPTPROBES 10562306a36Sopenharmony_ci def_bool y 10662306a36Sopenharmony_ci depends on KPROBES && HAVE_OPTPROBES 10762306a36Sopenharmony_ci select TASKS_RCU if PREEMPTION 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_ciconfig KPROBES_ON_FTRACE 11062306a36Sopenharmony_ci def_bool y 11162306a36Sopenharmony_ci depends on KPROBES && HAVE_KPROBES_ON_FTRACE 11262306a36Sopenharmony_ci depends on DYNAMIC_FTRACE_WITH_REGS 11362306a36Sopenharmony_ci help 11462306a36Sopenharmony_ci If function tracer is enabled and the arch supports full 11562306a36Sopenharmony_ci passing of pt_regs to function tracing, then kprobes can 11662306a36Sopenharmony_ci optimize on top of function tracing. 11762306a36Sopenharmony_ci 11862306a36Sopenharmony_ciconfig UPROBES 11962306a36Sopenharmony_ci def_bool n 12062306a36Sopenharmony_ci depends on ARCH_SUPPORTS_UPROBES 12162306a36Sopenharmony_ci help 12262306a36Sopenharmony_ci Uprobes is the user-space counterpart to kprobes: they 12362306a36Sopenharmony_ci enable instrumentation applications (such as 'perf probe') 12462306a36Sopenharmony_ci to establish unintrusive probes in user-space binaries and 12562306a36Sopenharmony_ci libraries, by executing handler functions when the probes 12662306a36Sopenharmony_ci are hit by user-space applications. 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ci ( These probes come in the form of single-byte breakpoints, 12962306a36Sopenharmony_ci managed by the kernel and kept transparent to the probed 13062306a36Sopenharmony_ci application. ) 13162306a36Sopenharmony_ci 13262306a36Sopenharmony_ciconfig HAVE_64BIT_ALIGNED_ACCESS 13362306a36Sopenharmony_ci def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS 13462306a36Sopenharmony_ci help 13562306a36Sopenharmony_ci Some architectures require 64 bit accesses to be 64 bit 13662306a36Sopenharmony_ci aligned, which also requires structs containing 64 bit values 13762306a36Sopenharmony_ci to be 64 bit aligned too. This includes some 32 bit 13862306a36Sopenharmony_ci architectures which can do 64 bit accesses, as well as 64 bit 13962306a36Sopenharmony_ci architectures without unaligned access. 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci This symbol should be selected by an architecture if 64 bit 14262306a36Sopenharmony_ci accesses are required to be 64 bit aligned in this way even 14362306a36Sopenharmony_ci though it is not a 64 bit architecture. 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ci See Documentation/core-api/unaligned-memory-access.rst for 14662306a36Sopenharmony_ci more information on the topic of unaligned memory accesses. 14762306a36Sopenharmony_ci 14862306a36Sopenharmony_ciconfig HAVE_EFFICIENT_UNALIGNED_ACCESS 14962306a36Sopenharmony_ci bool 15062306a36Sopenharmony_ci help 15162306a36Sopenharmony_ci Some architectures are unable to perform unaligned accesses 15262306a36Sopenharmony_ci without the use of get_unaligned/put_unaligned. Others are 15362306a36Sopenharmony_ci unable to perform such accesses efficiently (e.g. trap on 15462306a36Sopenharmony_ci unaligned access and require fixing it up in the exception 15562306a36Sopenharmony_ci handler.) 15662306a36Sopenharmony_ci 15762306a36Sopenharmony_ci This symbol should be selected by an architecture if it can 15862306a36Sopenharmony_ci perform unaligned accesses efficiently to allow different 15962306a36Sopenharmony_ci code paths to be selected for these cases. Some network 16062306a36Sopenharmony_ci drivers, for example, could opt to not fix up alignment 16162306a36Sopenharmony_ci problems with received packets if doing so would not help 16262306a36Sopenharmony_ci much. 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ci See Documentation/core-api/unaligned-memory-access.rst for more 16562306a36Sopenharmony_ci information on the topic of unaligned memory accesses. 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ciconfig ARCH_USE_BUILTIN_BSWAP 16862306a36Sopenharmony_ci bool 16962306a36Sopenharmony_ci help 17062306a36Sopenharmony_ci Modern versions of GCC (since 4.4) have builtin functions 17162306a36Sopenharmony_ci for handling byte-swapping. Using these, instead of the old 17262306a36Sopenharmony_ci inline assembler that the architecture code provides in the 17362306a36Sopenharmony_ci __arch_bswapXX() macros, allows the compiler to see what's 17462306a36Sopenharmony_ci happening and offers more opportunity for optimisation. In 17562306a36Sopenharmony_ci particular, the compiler will be able to combine the byteswap 17662306a36Sopenharmony_ci with a nearby load or store and use load-and-swap or 17762306a36Sopenharmony_ci store-and-swap instructions if the architecture has them. It 17862306a36Sopenharmony_ci should almost *never* result in code which is worse than the 17962306a36Sopenharmony_ci hand-coded assembler in <asm/swab.h>. But just in case it 18062306a36Sopenharmony_ci does, the use of the builtins is optional. 18162306a36Sopenharmony_ci 18262306a36Sopenharmony_ci Any architecture with load-and-swap or store-and-swap 18362306a36Sopenharmony_ci instructions should set this. And it shouldn't hurt to set it 18462306a36Sopenharmony_ci on architectures that don't have such instructions. 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_ciconfig KRETPROBES 18762306a36Sopenharmony_ci def_bool y 18862306a36Sopenharmony_ci depends on KPROBES && (HAVE_KRETPROBES || HAVE_RETHOOK) 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ciconfig KRETPROBE_ON_RETHOOK 19162306a36Sopenharmony_ci def_bool y 19262306a36Sopenharmony_ci depends on HAVE_RETHOOK 19362306a36Sopenharmony_ci depends on KRETPROBES 19462306a36Sopenharmony_ci select RETHOOK 19562306a36Sopenharmony_ci 19662306a36Sopenharmony_ciconfig USER_RETURN_NOTIFIER 19762306a36Sopenharmony_ci bool 19862306a36Sopenharmony_ci depends on HAVE_USER_RETURN_NOTIFIER 19962306a36Sopenharmony_ci help 20062306a36Sopenharmony_ci Provide a kernel-internal notification when a cpu is about to 20162306a36Sopenharmony_ci switch to user mode. 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ciconfig HAVE_IOREMAP_PROT 20462306a36Sopenharmony_ci bool 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_ciconfig HAVE_KPROBES 20762306a36Sopenharmony_ci bool 20862306a36Sopenharmony_ci 20962306a36Sopenharmony_ciconfig HAVE_KRETPROBES 21062306a36Sopenharmony_ci bool 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ciconfig HAVE_OPTPROBES 21362306a36Sopenharmony_ci bool 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ciconfig HAVE_KPROBES_ON_FTRACE 21662306a36Sopenharmony_ci bool 21762306a36Sopenharmony_ci 21862306a36Sopenharmony_ciconfig ARCH_CORRECT_STACKTRACE_ON_KRETPROBE 21962306a36Sopenharmony_ci bool 22062306a36Sopenharmony_ci help 22162306a36Sopenharmony_ci Since kretprobes modifies return address on the stack, the 22262306a36Sopenharmony_ci stacktrace may see the kretprobe trampoline address instead 22362306a36Sopenharmony_ci of correct one. If the architecture stacktrace code and 22462306a36Sopenharmony_ci unwinder can adjust such entries, select this configuration. 22562306a36Sopenharmony_ci 22662306a36Sopenharmony_ciconfig HAVE_FUNCTION_ERROR_INJECTION 22762306a36Sopenharmony_ci bool 22862306a36Sopenharmony_ci 22962306a36Sopenharmony_ciconfig HAVE_NMI 23062306a36Sopenharmony_ci bool 23162306a36Sopenharmony_ci 23262306a36Sopenharmony_ciconfig HAVE_FUNCTION_DESCRIPTORS 23362306a36Sopenharmony_ci bool 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ciconfig TRACE_IRQFLAGS_SUPPORT 23662306a36Sopenharmony_ci bool 23762306a36Sopenharmony_ci 23862306a36Sopenharmony_ciconfig TRACE_IRQFLAGS_NMI_SUPPORT 23962306a36Sopenharmony_ci bool 24062306a36Sopenharmony_ci 24162306a36Sopenharmony_ci# 24262306a36Sopenharmony_ci# An arch should select this if it provides all these things: 24362306a36Sopenharmony_ci# 24462306a36Sopenharmony_ci# task_pt_regs() in asm/processor.h or asm/ptrace.h 24562306a36Sopenharmony_ci# arch_has_single_step() if there is hardware single-step support 24662306a36Sopenharmony_ci# arch_has_block_step() if there is hardware block-step support 24762306a36Sopenharmony_ci# asm/syscall.h supplying asm-generic/syscall.h interface 24862306a36Sopenharmony_ci# linux/regset.h user_regset interfaces 24962306a36Sopenharmony_ci# CORE_DUMP_USE_REGSET #define'd in linux/elf.h 25062306a36Sopenharmony_ci# TIF_SYSCALL_TRACE calls ptrace_report_syscall_{entry,exit} 25162306a36Sopenharmony_ci# TIF_NOTIFY_RESUME calls resume_user_mode_work() 25262306a36Sopenharmony_ci# 25362306a36Sopenharmony_ciconfig HAVE_ARCH_TRACEHOOK 25462306a36Sopenharmony_ci bool 25562306a36Sopenharmony_ci 25662306a36Sopenharmony_ciconfig HAVE_DMA_CONTIGUOUS 25762306a36Sopenharmony_ci bool 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ciconfig GENERIC_SMP_IDLE_THREAD 26062306a36Sopenharmony_ci bool 26162306a36Sopenharmony_ci 26262306a36Sopenharmony_ciconfig GENERIC_IDLE_POLL_SETUP 26362306a36Sopenharmony_ci bool 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_ciconfig ARCH_HAS_FORTIFY_SOURCE 26662306a36Sopenharmony_ci bool 26762306a36Sopenharmony_ci help 26862306a36Sopenharmony_ci An architecture should select this when it can successfully 26962306a36Sopenharmony_ci build and run with CONFIG_FORTIFY_SOURCE. 27062306a36Sopenharmony_ci 27162306a36Sopenharmony_ci# 27262306a36Sopenharmony_ci# Select if the arch provides a historic keepinit alias for the retain_initrd 27362306a36Sopenharmony_ci# command line option 27462306a36Sopenharmony_ci# 27562306a36Sopenharmony_ciconfig ARCH_HAS_KEEPINITRD 27662306a36Sopenharmony_ci bool 27762306a36Sopenharmony_ci 27862306a36Sopenharmony_ci# Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h 27962306a36Sopenharmony_ciconfig ARCH_HAS_SET_MEMORY 28062306a36Sopenharmony_ci bool 28162306a36Sopenharmony_ci 28262306a36Sopenharmony_ci# Select if arch has all set_direct_map_invalid/default() functions 28362306a36Sopenharmony_ciconfig ARCH_HAS_SET_DIRECT_MAP 28462306a36Sopenharmony_ci bool 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci# 28762306a36Sopenharmony_ci# Select if the architecture provides the arch_dma_set_uncached symbol to 28862306a36Sopenharmony_ci# either provide an uncached segment alias for a DMA allocation, or 28962306a36Sopenharmony_ci# to remap the page tables in place. 29062306a36Sopenharmony_ci# 29162306a36Sopenharmony_ciconfig ARCH_HAS_DMA_SET_UNCACHED 29262306a36Sopenharmony_ci bool 29362306a36Sopenharmony_ci 29462306a36Sopenharmony_ci# 29562306a36Sopenharmony_ci# Select if the architectures provides the arch_dma_clear_uncached symbol 29662306a36Sopenharmony_ci# to undo an in-place page table remap for uncached access. 29762306a36Sopenharmony_ci# 29862306a36Sopenharmony_ciconfig ARCH_HAS_DMA_CLEAR_UNCACHED 29962306a36Sopenharmony_ci bool 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_ciconfig ARCH_HAS_CPU_FINALIZE_INIT 30262306a36Sopenharmony_ci bool 30362306a36Sopenharmony_ci 30462306a36Sopenharmony_ci# Select if arch init_task must go in the __init_task_data section 30562306a36Sopenharmony_ciconfig ARCH_TASK_STRUCT_ON_STACK 30662306a36Sopenharmony_ci bool 30762306a36Sopenharmony_ci 30862306a36Sopenharmony_ci# Select if arch has its private alloc_task_struct() function 30962306a36Sopenharmony_ciconfig ARCH_TASK_STRUCT_ALLOCATOR 31062306a36Sopenharmony_ci bool 31162306a36Sopenharmony_ci 31262306a36Sopenharmony_ciconfig HAVE_ARCH_THREAD_STRUCT_WHITELIST 31362306a36Sopenharmony_ci bool 31462306a36Sopenharmony_ci depends on !ARCH_TASK_STRUCT_ALLOCATOR 31562306a36Sopenharmony_ci help 31662306a36Sopenharmony_ci An architecture should select this to provide hardened usercopy 31762306a36Sopenharmony_ci knowledge about what region of the thread_struct should be 31862306a36Sopenharmony_ci whitelisted for copying to userspace. Normally this is only the 31962306a36Sopenharmony_ci FPU registers. Specifically, arch_thread_struct_whitelist() 32062306a36Sopenharmony_ci should be implemented. Without this, the entire thread_struct 32162306a36Sopenharmony_ci field in task_struct will be left whitelisted. 32262306a36Sopenharmony_ci 32362306a36Sopenharmony_ci# Select if arch has its private alloc_thread_stack() function 32462306a36Sopenharmony_ciconfig ARCH_THREAD_STACK_ALLOCATOR 32562306a36Sopenharmony_ci bool 32662306a36Sopenharmony_ci 32762306a36Sopenharmony_ci# Select if arch wants to size task_struct dynamically via arch_task_struct_size: 32862306a36Sopenharmony_ciconfig ARCH_WANTS_DYNAMIC_TASK_STRUCT 32962306a36Sopenharmony_ci bool 33062306a36Sopenharmony_ci 33162306a36Sopenharmony_ciconfig ARCH_WANTS_NO_INSTR 33262306a36Sopenharmony_ci bool 33362306a36Sopenharmony_ci help 33462306a36Sopenharmony_ci An architecture should select this if the noinstr macro is being used on 33562306a36Sopenharmony_ci functions to denote that the toolchain should avoid instrumenting such 33662306a36Sopenharmony_ci functions and is required for correctness. 33762306a36Sopenharmony_ci 33862306a36Sopenharmony_ciconfig ARCH_32BIT_OFF_T 33962306a36Sopenharmony_ci bool 34062306a36Sopenharmony_ci depends on !64BIT 34162306a36Sopenharmony_ci help 34262306a36Sopenharmony_ci All new 32-bit architectures should have 64-bit off_t type on 34362306a36Sopenharmony_ci userspace side which corresponds to the loff_t kernel type. This 34462306a36Sopenharmony_ci is the requirement for modern ABIs. Some existing architectures 34562306a36Sopenharmony_ci still support 32-bit off_t. This option is enabled for all such 34662306a36Sopenharmony_ci architectures explicitly. 34762306a36Sopenharmony_ci 34862306a36Sopenharmony_ci# Selected by 64 bit architectures which have a 32 bit f_tinode in struct ustat 34962306a36Sopenharmony_ciconfig ARCH_32BIT_USTAT_F_TINODE 35062306a36Sopenharmony_ci bool 35162306a36Sopenharmony_ci 35262306a36Sopenharmony_ciconfig HAVE_ASM_MODVERSIONS 35362306a36Sopenharmony_ci bool 35462306a36Sopenharmony_ci help 35562306a36Sopenharmony_ci This symbol should be selected by an architecture if it provides 35662306a36Sopenharmony_ci <asm/asm-prototypes.h> to support the module versioning for symbols 35762306a36Sopenharmony_ci exported from assembly code. 35862306a36Sopenharmony_ci 35962306a36Sopenharmony_ciconfig HAVE_REGS_AND_STACK_ACCESS_API 36062306a36Sopenharmony_ci bool 36162306a36Sopenharmony_ci help 36262306a36Sopenharmony_ci This symbol should be selected by an architecture if it supports 36362306a36Sopenharmony_ci the API needed to access registers and stack entries from pt_regs, 36462306a36Sopenharmony_ci declared in asm/ptrace.h 36562306a36Sopenharmony_ci For example the kprobes-based event tracer needs this API. 36662306a36Sopenharmony_ci 36762306a36Sopenharmony_ciconfig HAVE_RSEQ 36862306a36Sopenharmony_ci bool 36962306a36Sopenharmony_ci depends on HAVE_REGS_AND_STACK_ACCESS_API 37062306a36Sopenharmony_ci help 37162306a36Sopenharmony_ci This symbol should be selected by an architecture if it 37262306a36Sopenharmony_ci supports an implementation of restartable sequences. 37362306a36Sopenharmony_ci 37462306a36Sopenharmony_ciconfig HAVE_RUST 37562306a36Sopenharmony_ci bool 37662306a36Sopenharmony_ci help 37762306a36Sopenharmony_ci This symbol should be selected by an architecture if it 37862306a36Sopenharmony_ci supports Rust. 37962306a36Sopenharmony_ci 38062306a36Sopenharmony_ciconfig HAVE_FUNCTION_ARG_ACCESS_API 38162306a36Sopenharmony_ci bool 38262306a36Sopenharmony_ci help 38362306a36Sopenharmony_ci This symbol should be selected by an architecture if it supports 38462306a36Sopenharmony_ci the API needed to access function arguments from pt_regs, 38562306a36Sopenharmony_ci declared in asm/ptrace.h 38662306a36Sopenharmony_ci 38762306a36Sopenharmony_ciconfig HAVE_HW_BREAKPOINT 38862306a36Sopenharmony_ci bool 38962306a36Sopenharmony_ci depends on PERF_EVENTS 39062306a36Sopenharmony_ci 39162306a36Sopenharmony_ciconfig HAVE_MIXED_BREAKPOINTS_REGS 39262306a36Sopenharmony_ci bool 39362306a36Sopenharmony_ci depends on HAVE_HW_BREAKPOINT 39462306a36Sopenharmony_ci help 39562306a36Sopenharmony_ci Depending on the arch implementation of hardware breakpoints, 39662306a36Sopenharmony_ci some of them have separate registers for data and instruction 39762306a36Sopenharmony_ci breakpoints addresses, others have mixed registers to store 39862306a36Sopenharmony_ci them but define the access type in a control register. 39962306a36Sopenharmony_ci Select this option if your arch implements breakpoints under the 40062306a36Sopenharmony_ci latter fashion. 40162306a36Sopenharmony_ci 40262306a36Sopenharmony_ciconfig HAVE_USER_RETURN_NOTIFIER 40362306a36Sopenharmony_ci bool 40462306a36Sopenharmony_ci 40562306a36Sopenharmony_ciconfig HAVE_PERF_EVENTS_NMI 40662306a36Sopenharmony_ci bool 40762306a36Sopenharmony_ci help 40862306a36Sopenharmony_ci System hardware can generate an NMI using the perf event 40962306a36Sopenharmony_ci subsystem. Also has support for calculating CPU cycle events 41062306a36Sopenharmony_ci to determine how many clock cycles in a given period. 41162306a36Sopenharmony_ci 41262306a36Sopenharmony_ciconfig HAVE_HARDLOCKUP_DETECTOR_PERF 41362306a36Sopenharmony_ci bool 41462306a36Sopenharmony_ci depends on HAVE_PERF_EVENTS_NMI 41562306a36Sopenharmony_ci help 41662306a36Sopenharmony_ci The arch chooses to use the generic perf-NMI-based hardlockup 41762306a36Sopenharmony_ci detector. Must define HAVE_PERF_EVENTS_NMI. 41862306a36Sopenharmony_ci 41962306a36Sopenharmony_ciconfig HAVE_HARDLOCKUP_DETECTOR_ARCH 42062306a36Sopenharmony_ci bool 42162306a36Sopenharmony_ci help 42262306a36Sopenharmony_ci The arch provides its own hardlockup detector implementation instead 42362306a36Sopenharmony_ci of the generic ones. 42462306a36Sopenharmony_ci 42562306a36Sopenharmony_ci It uses the same command line parameters, and sysctl interface, 42662306a36Sopenharmony_ci as the generic hardlockup detectors. 42762306a36Sopenharmony_ci 42862306a36Sopenharmony_ciconfig HAVE_PERF_REGS 42962306a36Sopenharmony_ci bool 43062306a36Sopenharmony_ci help 43162306a36Sopenharmony_ci Support selective register dumps for perf events. This includes 43262306a36Sopenharmony_ci bit-mapping of each registers and a unique architecture id. 43362306a36Sopenharmony_ci 43462306a36Sopenharmony_ciconfig HAVE_PERF_USER_STACK_DUMP 43562306a36Sopenharmony_ci bool 43662306a36Sopenharmony_ci help 43762306a36Sopenharmony_ci Support user stack dumps for perf event samples. This needs 43862306a36Sopenharmony_ci access to the user stack pointer which is not unified across 43962306a36Sopenharmony_ci architectures. 44062306a36Sopenharmony_ci 44162306a36Sopenharmony_ciconfig HAVE_ARCH_JUMP_LABEL 44262306a36Sopenharmony_ci bool 44362306a36Sopenharmony_ci 44462306a36Sopenharmony_ciconfig HAVE_ARCH_JUMP_LABEL_RELATIVE 44562306a36Sopenharmony_ci bool 44662306a36Sopenharmony_ci 44762306a36Sopenharmony_ciconfig MMU_GATHER_TABLE_FREE 44862306a36Sopenharmony_ci bool 44962306a36Sopenharmony_ci 45062306a36Sopenharmony_ciconfig MMU_GATHER_RCU_TABLE_FREE 45162306a36Sopenharmony_ci bool 45262306a36Sopenharmony_ci select MMU_GATHER_TABLE_FREE 45362306a36Sopenharmony_ci 45462306a36Sopenharmony_ciconfig MMU_GATHER_PAGE_SIZE 45562306a36Sopenharmony_ci bool 45662306a36Sopenharmony_ci 45762306a36Sopenharmony_ciconfig MMU_GATHER_NO_RANGE 45862306a36Sopenharmony_ci bool 45962306a36Sopenharmony_ci select MMU_GATHER_MERGE_VMAS 46062306a36Sopenharmony_ci 46162306a36Sopenharmony_ciconfig MMU_GATHER_NO_FLUSH_CACHE 46262306a36Sopenharmony_ci bool 46362306a36Sopenharmony_ci 46462306a36Sopenharmony_ciconfig MMU_GATHER_MERGE_VMAS 46562306a36Sopenharmony_ci bool 46662306a36Sopenharmony_ci 46762306a36Sopenharmony_ciconfig MMU_GATHER_NO_GATHER 46862306a36Sopenharmony_ci bool 46962306a36Sopenharmony_ci depends on MMU_GATHER_TABLE_FREE 47062306a36Sopenharmony_ci 47162306a36Sopenharmony_ciconfig ARCH_WANT_IRQS_OFF_ACTIVATE_MM 47262306a36Sopenharmony_ci bool 47362306a36Sopenharmony_ci help 47462306a36Sopenharmony_ci Temporary select until all architectures can be converted to have 47562306a36Sopenharmony_ci irqs disabled over activate_mm. Architectures that do IPI based TLB 47662306a36Sopenharmony_ci shootdowns should enable this. 47762306a36Sopenharmony_ci 47862306a36Sopenharmony_ci# Use normal mm refcounting for MMU_LAZY_TLB kernel thread references. 47962306a36Sopenharmony_ci# MMU_LAZY_TLB_REFCOUNT=n can improve the scalability of context switching 48062306a36Sopenharmony_ci# to/from kernel threads when the same mm is running on a lot of CPUs (a large 48162306a36Sopenharmony_ci# multi-threaded application), by reducing contention on the mm refcount. 48262306a36Sopenharmony_ci# 48362306a36Sopenharmony_ci# This can be disabled if the architecture ensures no CPUs are using an mm as a 48462306a36Sopenharmony_ci# "lazy tlb" beyond its final refcount (i.e., by the time __mmdrop frees the mm 48562306a36Sopenharmony_ci# or its kernel page tables). This could be arranged by arch_exit_mmap(), or 48662306a36Sopenharmony_ci# final exit(2) TLB flush, for example. 48762306a36Sopenharmony_ci# 48862306a36Sopenharmony_ci# To implement this, an arch *must*: 48962306a36Sopenharmony_ci# Ensure the _lazy_tlb variants of mmgrab/mmdrop are used when manipulating 49062306a36Sopenharmony_ci# the lazy tlb reference of a kthread's ->active_mm (non-arch code has been 49162306a36Sopenharmony_ci# converted already). 49262306a36Sopenharmony_ciconfig MMU_LAZY_TLB_REFCOUNT 49362306a36Sopenharmony_ci def_bool y 49462306a36Sopenharmony_ci depends on !MMU_LAZY_TLB_SHOOTDOWN 49562306a36Sopenharmony_ci 49662306a36Sopenharmony_ci# This option allows MMU_LAZY_TLB_REFCOUNT=n. It ensures no CPUs are using an 49762306a36Sopenharmony_ci# mm as a lazy tlb beyond its last reference count, by shooting down these 49862306a36Sopenharmony_ci# users before the mm is deallocated. __mmdrop() first IPIs all CPUs that may 49962306a36Sopenharmony_ci# be using the mm as a lazy tlb, so that they may switch themselves to using 50062306a36Sopenharmony_ci# init_mm for their active mm. mm_cpumask(mm) is used to determine which CPUs 50162306a36Sopenharmony_ci# may be using mm as a lazy tlb mm. 50262306a36Sopenharmony_ci# 50362306a36Sopenharmony_ci# To implement this, an arch *must*: 50462306a36Sopenharmony_ci# - At the time of the final mmdrop of the mm, ensure mm_cpumask(mm) contains 50562306a36Sopenharmony_ci# at least all possible CPUs in which the mm is lazy. 50662306a36Sopenharmony_ci# - It must meet the requirements for MMU_LAZY_TLB_REFCOUNT=n (see above). 50762306a36Sopenharmony_ciconfig MMU_LAZY_TLB_SHOOTDOWN 50862306a36Sopenharmony_ci bool 50962306a36Sopenharmony_ci 51062306a36Sopenharmony_ciconfig ARCH_HAVE_NMI_SAFE_CMPXCHG 51162306a36Sopenharmony_ci bool 51262306a36Sopenharmony_ci 51362306a36Sopenharmony_ciconfig ARCH_HAS_NMI_SAFE_THIS_CPU_OPS 51462306a36Sopenharmony_ci bool 51562306a36Sopenharmony_ci 51662306a36Sopenharmony_ciconfig HAVE_ALIGNED_STRUCT_PAGE 51762306a36Sopenharmony_ci bool 51862306a36Sopenharmony_ci help 51962306a36Sopenharmony_ci This makes sure that struct pages are double word aligned and that 52062306a36Sopenharmony_ci e.g. the SLUB allocator can perform double word atomic operations 52162306a36Sopenharmony_ci on a struct page for better performance. However selecting this 52262306a36Sopenharmony_ci might increase the size of a struct page by a word. 52362306a36Sopenharmony_ci 52462306a36Sopenharmony_ciconfig HAVE_CMPXCHG_LOCAL 52562306a36Sopenharmony_ci bool 52662306a36Sopenharmony_ci 52762306a36Sopenharmony_ciconfig HAVE_CMPXCHG_DOUBLE 52862306a36Sopenharmony_ci bool 52962306a36Sopenharmony_ci 53062306a36Sopenharmony_ciconfig ARCH_WEAK_RELEASE_ACQUIRE 53162306a36Sopenharmony_ci bool 53262306a36Sopenharmony_ci 53362306a36Sopenharmony_ciconfig ARCH_WANT_IPC_PARSE_VERSION 53462306a36Sopenharmony_ci bool 53562306a36Sopenharmony_ci 53662306a36Sopenharmony_ciconfig ARCH_WANT_COMPAT_IPC_PARSE_VERSION 53762306a36Sopenharmony_ci bool 53862306a36Sopenharmony_ci 53962306a36Sopenharmony_ciconfig ARCH_WANT_OLD_COMPAT_IPC 54062306a36Sopenharmony_ci select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 54162306a36Sopenharmony_ci bool 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_ciconfig HAVE_ARCH_SECCOMP 54462306a36Sopenharmony_ci bool 54562306a36Sopenharmony_ci help 54662306a36Sopenharmony_ci An arch should select this symbol to support seccomp mode 1 (the fixed 54762306a36Sopenharmony_ci syscall policy), and must provide an overrides for __NR_seccomp_sigreturn, 54862306a36Sopenharmony_ci and compat syscalls if the asm-generic/seccomp.h defaults need adjustment: 54962306a36Sopenharmony_ci - __NR_seccomp_read_32 55062306a36Sopenharmony_ci - __NR_seccomp_write_32 55162306a36Sopenharmony_ci - __NR_seccomp_exit_32 55262306a36Sopenharmony_ci - __NR_seccomp_sigreturn_32 55362306a36Sopenharmony_ci 55462306a36Sopenharmony_ciconfig HAVE_ARCH_SECCOMP_FILTER 55562306a36Sopenharmony_ci bool 55662306a36Sopenharmony_ci select HAVE_ARCH_SECCOMP 55762306a36Sopenharmony_ci help 55862306a36Sopenharmony_ci An arch should select this symbol if it provides all of these things: 55962306a36Sopenharmony_ci - all the requirements for HAVE_ARCH_SECCOMP 56062306a36Sopenharmony_ci - syscall_get_arch() 56162306a36Sopenharmony_ci - syscall_get_arguments() 56262306a36Sopenharmony_ci - syscall_rollback() 56362306a36Sopenharmony_ci - syscall_set_return_value() 56462306a36Sopenharmony_ci - SIGSYS siginfo_t support 56562306a36Sopenharmony_ci - secure_computing is called from a ptrace_event()-safe context 56662306a36Sopenharmony_ci - secure_computing return value is checked and a return value of -1 56762306a36Sopenharmony_ci results in the system call being skipped immediately. 56862306a36Sopenharmony_ci - seccomp syscall wired up 56962306a36Sopenharmony_ci - if !HAVE_SPARSE_SYSCALL_NR, have SECCOMP_ARCH_NATIVE, 57062306a36Sopenharmony_ci SECCOMP_ARCH_NATIVE_NR, SECCOMP_ARCH_NATIVE_NAME defined. If 57162306a36Sopenharmony_ci COMPAT is supported, have the SECCOMP_ARCH_COMPAT* defines too. 57262306a36Sopenharmony_ci 57362306a36Sopenharmony_ciconfig SECCOMP 57462306a36Sopenharmony_ci prompt "Enable seccomp to safely execute untrusted bytecode" 57562306a36Sopenharmony_ci def_bool y 57662306a36Sopenharmony_ci depends on HAVE_ARCH_SECCOMP 57762306a36Sopenharmony_ci help 57862306a36Sopenharmony_ci This kernel feature is useful for number crunching applications 57962306a36Sopenharmony_ci that may need to handle untrusted bytecode during their 58062306a36Sopenharmony_ci execution. By using pipes or other transports made available 58162306a36Sopenharmony_ci to the process as file descriptors supporting the read/write 58262306a36Sopenharmony_ci syscalls, it's possible to isolate those applications in their 58362306a36Sopenharmony_ci own address space using seccomp. Once seccomp is enabled via 58462306a36Sopenharmony_ci prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be 58562306a36Sopenharmony_ci disabled and the task is only allowed to execute a few safe 58662306a36Sopenharmony_ci syscalls defined by each seccomp mode. 58762306a36Sopenharmony_ci 58862306a36Sopenharmony_ci If unsure, say Y. 58962306a36Sopenharmony_ci 59062306a36Sopenharmony_ciconfig SECCOMP_FILTER 59162306a36Sopenharmony_ci def_bool y 59262306a36Sopenharmony_ci depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET 59362306a36Sopenharmony_ci help 59462306a36Sopenharmony_ci Enable tasks to build secure computing environments defined 59562306a36Sopenharmony_ci in terms of Berkeley Packet Filter programs which implement 59662306a36Sopenharmony_ci task-defined system call filtering polices. 59762306a36Sopenharmony_ci 59862306a36Sopenharmony_ci See Documentation/userspace-api/seccomp_filter.rst for details. 59962306a36Sopenharmony_ci 60062306a36Sopenharmony_ciconfig SECCOMP_CACHE_DEBUG 60162306a36Sopenharmony_ci bool "Show seccomp filter cache status in /proc/pid/seccomp_cache" 60262306a36Sopenharmony_ci depends on SECCOMP_FILTER && !HAVE_SPARSE_SYSCALL_NR 60362306a36Sopenharmony_ci depends on PROC_FS 60462306a36Sopenharmony_ci help 60562306a36Sopenharmony_ci This enables the /proc/pid/seccomp_cache interface to monitor 60662306a36Sopenharmony_ci seccomp cache data. The file format is subject to change. Reading 60762306a36Sopenharmony_ci the file requires CAP_SYS_ADMIN. 60862306a36Sopenharmony_ci 60962306a36Sopenharmony_ci This option is for debugging only. Enabling presents the risk that 61062306a36Sopenharmony_ci an adversary may be able to infer the seccomp filter logic. 61162306a36Sopenharmony_ci 61262306a36Sopenharmony_ci If unsure, say N. 61362306a36Sopenharmony_ci 61462306a36Sopenharmony_ciconfig HAVE_ARCH_STACKLEAK 61562306a36Sopenharmony_ci bool 61662306a36Sopenharmony_ci help 61762306a36Sopenharmony_ci An architecture should select this if it has the code which 61862306a36Sopenharmony_ci fills the used part of the kernel stack with the STACKLEAK_POISON 61962306a36Sopenharmony_ci value before returning from system calls. 62062306a36Sopenharmony_ci 62162306a36Sopenharmony_ciconfig HAVE_STACKPROTECTOR 62262306a36Sopenharmony_ci bool 62362306a36Sopenharmony_ci help 62462306a36Sopenharmony_ci An arch should select this symbol if: 62562306a36Sopenharmony_ci - it has implemented a stack canary (e.g. __stack_chk_guard) 62662306a36Sopenharmony_ci 62762306a36Sopenharmony_ciconfig STACKPROTECTOR 62862306a36Sopenharmony_ci bool "Stack Protector buffer overflow detection" 62962306a36Sopenharmony_ci depends on HAVE_STACKPROTECTOR 63062306a36Sopenharmony_ci depends on $(cc-option,-fstack-protector) 63162306a36Sopenharmony_ci default y 63262306a36Sopenharmony_ci help 63362306a36Sopenharmony_ci This option turns on the "stack-protector" GCC feature. This 63462306a36Sopenharmony_ci feature puts, at the beginning of functions, a canary value on 63562306a36Sopenharmony_ci the stack just before the return address, and validates 63662306a36Sopenharmony_ci the value just before actually returning. Stack based buffer 63762306a36Sopenharmony_ci overflows (that need to overwrite this return address) now also 63862306a36Sopenharmony_ci overwrite the canary, which gets detected and the attack is then 63962306a36Sopenharmony_ci neutralized via a kernel panic. 64062306a36Sopenharmony_ci 64162306a36Sopenharmony_ci Functions will have the stack-protector canary logic added if they 64262306a36Sopenharmony_ci have an 8-byte or larger character array on the stack. 64362306a36Sopenharmony_ci 64462306a36Sopenharmony_ci This feature requires gcc version 4.2 or above, or a distribution 64562306a36Sopenharmony_ci gcc with the feature backported ("-fstack-protector"). 64662306a36Sopenharmony_ci 64762306a36Sopenharmony_ci On an x86 "defconfig" build, this feature adds canary checks to 64862306a36Sopenharmony_ci about 3% of all kernel functions, which increases kernel code size 64962306a36Sopenharmony_ci by about 0.3%. 65062306a36Sopenharmony_ci 65162306a36Sopenharmony_ciconfig STACKPROTECTOR_STRONG 65262306a36Sopenharmony_ci bool "Strong Stack Protector" 65362306a36Sopenharmony_ci depends on STACKPROTECTOR 65462306a36Sopenharmony_ci depends on $(cc-option,-fstack-protector-strong) 65562306a36Sopenharmony_ci default y 65662306a36Sopenharmony_ci help 65762306a36Sopenharmony_ci Functions will have the stack-protector canary logic added in any 65862306a36Sopenharmony_ci of the following conditions: 65962306a36Sopenharmony_ci 66062306a36Sopenharmony_ci - local variable's address used as part of the right hand side of an 66162306a36Sopenharmony_ci assignment or function argument 66262306a36Sopenharmony_ci - local variable is an array (or union containing an array), 66362306a36Sopenharmony_ci regardless of array type or length 66462306a36Sopenharmony_ci - uses register local variables 66562306a36Sopenharmony_ci 66662306a36Sopenharmony_ci This feature requires gcc version 4.9 or above, or a distribution 66762306a36Sopenharmony_ci gcc with the feature backported ("-fstack-protector-strong"). 66862306a36Sopenharmony_ci 66962306a36Sopenharmony_ci On an x86 "defconfig" build, this feature adds canary checks to 67062306a36Sopenharmony_ci about 20% of all kernel functions, which increases the kernel code 67162306a36Sopenharmony_ci size by about 2%. 67262306a36Sopenharmony_ci 67362306a36Sopenharmony_ciconfig ARCH_SUPPORTS_SHADOW_CALL_STACK 67462306a36Sopenharmony_ci bool 67562306a36Sopenharmony_ci help 67662306a36Sopenharmony_ci An architecture should select this if it supports the compiler's 67762306a36Sopenharmony_ci Shadow Call Stack and implements runtime support for shadow stack 67862306a36Sopenharmony_ci switching. 67962306a36Sopenharmony_ci 68062306a36Sopenharmony_ciconfig SHADOW_CALL_STACK 68162306a36Sopenharmony_ci bool "Shadow Call Stack" 68262306a36Sopenharmony_ci depends on ARCH_SUPPORTS_SHADOW_CALL_STACK 68362306a36Sopenharmony_ci depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER 68462306a36Sopenharmony_ci depends on MMU 68562306a36Sopenharmony_ci help 68662306a36Sopenharmony_ci This option enables the compiler's Shadow Call Stack, which 68762306a36Sopenharmony_ci uses a shadow stack to protect function return addresses from 68862306a36Sopenharmony_ci being overwritten by an attacker. More information can be found 68962306a36Sopenharmony_ci in the compiler's documentation: 69062306a36Sopenharmony_ci 69162306a36Sopenharmony_ci - Clang: https://clang.llvm.org/docs/ShadowCallStack.html 69262306a36Sopenharmony_ci - GCC: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#Instrumentation-Options 69362306a36Sopenharmony_ci 69462306a36Sopenharmony_ci Note that security guarantees in the kernel differ from the 69562306a36Sopenharmony_ci ones documented for user space. The kernel must store addresses 69662306a36Sopenharmony_ci of shadow stacks in memory, which means an attacker capable of 69762306a36Sopenharmony_ci reading and writing arbitrary memory may be able to locate them 69862306a36Sopenharmony_ci and hijack control flow by modifying the stacks. 69962306a36Sopenharmony_ci 70062306a36Sopenharmony_ciconfig DYNAMIC_SCS 70162306a36Sopenharmony_ci bool 70262306a36Sopenharmony_ci help 70362306a36Sopenharmony_ci Set by the arch code if it relies on code patching to insert the 70462306a36Sopenharmony_ci shadow call stack push and pop instructions rather than on the 70562306a36Sopenharmony_ci compiler. 70662306a36Sopenharmony_ci 70762306a36Sopenharmony_ciconfig LTO 70862306a36Sopenharmony_ci bool 70962306a36Sopenharmony_ci help 71062306a36Sopenharmony_ci Selected if the kernel will be built using the compiler's LTO feature. 71162306a36Sopenharmony_ci 71262306a36Sopenharmony_ciconfig LTO_CLANG 71362306a36Sopenharmony_ci bool 71462306a36Sopenharmony_ci select LTO 71562306a36Sopenharmony_ci help 71662306a36Sopenharmony_ci Selected if the kernel will be built using Clang's LTO feature. 71762306a36Sopenharmony_ci 71862306a36Sopenharmony_ciconfig ARCH_SUPPORTS_LTO_CLANG 71962306a36Sopenharmony_ci bool 72062306a36Sopenharmony_ci help 72162306a36Sopenharmony_ci An architecture should select this option if it supports: 72262306a36Sopenharmony_ci - compiling with Clang, 72362306a36Sopenharmony_ci - compiling inline assembly with Clang's integrated assembler, 72462306a36Sopenharmony_ci - and linking with LLD. 72562306a36Sopenharmony_ci 72662306a36Sopenharmony_ciconfig ARCH_SUPPORTS_LTO_CLANG_THIN 72762306a36Sopenharmony_ci bool 72862306a36Sopenharmony_ci help 72962306a36Sopenharmony_ci An architecture should select this option if it can support Clang's 73062306a36Sopenharmony_ci ThinLTO mode. 73162306a36Sopenharmony_ci 73262306a36Sopenharmony_ciconfig HAS_LTO_CLANG 73362306a36Sopenharmony_ci def_bool y 73462306a36Sopenharmony_ci depends on CC_IS_CLANG && LD_IS_LLD && AS_IS_LLVM 73562306a36Sopenharmony_ci depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) 73662306a36Sopenharmony_ci depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) 73762306a36Sopenharmony_ci depends on ARCH_SUPPORTS_LTO_CLANG 73862306a36Sopenharmony_ci depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT 73962306a36Sopenharmony_ci # https://github.com/ClangBuiltLinux/linux/issues/1721 74062306a36Sopenharmony_ci depends on (!KASAN || KASAN_HW_TAGS || CLANG_VERSION >= 170000) || !DEBUG_INFO 74162306a36Sopenharmony_ci depends on (!KCOV || CLANG_VERSION >= 170000) || !DEBUG_INFO 74262306a36Sopenharmony_ci depends on !GCOV_KERNEL 74362306a36Sopenharmony_ci help 74462306a36Sopenharmony_ci The compiler and Kconfig options support building with Clang's 74562306a36Sopenharmony_ci LTO. 74662306a36Sopenharmony_ci 74762306a36Sopenharmony_cichoice 74862306a36Sopenharmony_ci prompt "Link Time Optimization (LTO)" 74962306a36Sopenharmony_ci default LTO_NONE 75062306a36Sopenharmony_ci help 75162306a36Sopenharmony_ci This option enables Link Time Optimization (LTO), which allows the 75262306a36Sopenharmony_ci compiler to optimize binaries globally. 75362306a36Sopenharmony_ci 75462306a36Sopenharmony_ci If unsure, select LTO_NONE. Note that LTO is very resource-intensive 75562306a36Sopenharmony_ci so it's disabled by default. 75662306a36Sopenharmony_ci 75762306a36Sopenharmony_ciconfig LTO_NONE 75862306a36Sopenharmony_ci bool "None" 75962306a36Sopenharmony_ci help 76062306a36Sopenharmony_ci Build the kernel normally, without Link Time Optimization (LTO). 76162306a36Sopenharmony_ci 76262306a36Sopenharmony_ciconfig LTO_CLANG_FULL 76362306a36Sopenharmony_ci bool "Clang Full LTO (EXPERIMENTAL)" 76462306a36Sopenharmony_ci depends on HAS_LTO_CLANG 76562306a36Sopenharmony_ci depends on !COMPILE_TEST 76662306a36Sopenharmony_ci select LTO_CLANG 76762306a36Sopenharmony_ci help 76862306a36Sopenharmony_ci This option enables Clang's full Link Time Optimization (LTO), which 76962306a36Sopenharmony_ci allows the compiler to optimize the kernel globally. If you enable 77062306a36Sopenharmony_ci this option, the compiler generates LLVM bitcode instead of ELF 77162306a36Sopenharmony_ci object files, and the actual compilation from bitcode happens at 77262306a36Sopenharmony_ci the LTO link step, which may take several minutes depending on the 77362306a36Sopenharmony_ci kernel configuration. More information can be found from LLVM's 77462306a36Sopenharmony_ci documentation: 77562306a36Sopenharmony_ci 77662306a36Sopenharmony_ci https://llvm.org/docs/LinkTimeOptimization.html 77762306a36Sopenharmony_ci 77862306a36Sopenharmony_ci During link time, this option can use a large amount of RAM, and 77962306a36Sopenharmony_ci may take much longer than the ThinLTO option. 78062306a36Sopenharmony_ci 78162306a36Sopenharmony_ciconfig LTO_CLANG_THIN 78262306a36Sopenharmony_ci bool "Clang ThinLTO (EXPERIMENTAL)" 78362306a36Sopenharmony_ci depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN 78462306a36Sopenharmony_ci select LTO_CLANG 78562306a36Sopenharmony_ci help 78662306a36Sopenharmony_ci This option enables Clang's ThinLTO, which allows for parallel 78762306a36Sopenharmony_ci optimization and faster incremental compiles compared to the 78862306a36Sopenharmony_ci CONFIG_LTO_CLANG_FULL option. More information can be found 78962306a36Sopenharmony_ci from Clang's documentation: 79062306a36Sopenharmony_ci 79162306a36Sopenharmony_ci https://clang.llvm.org/docs/ThinLTO.html 79262306a36Sopenharmony_ci 79362306a36Sopenharmony_ci If unsure, say Y. 79462306a36Sopenharmony_ciendchoice 79562306a36Sopenharmony_ci 79662306a36Sopenharmony_ciconfig ARCH_SUPPORTS_CFI_CLANG 79762306a36Sopenharmony_ci bool 79862306a36Sopenharmony_ci help 79962306a36Sopenharmony_ci An architecture should select this option if it can support Clang's 80062306a36Sopenharmony_ci Control-Flow Integrity (CFI) checking. 80162306a36Sopenharmony_ci 80262306a36Sopenharmony_ciconfig ARCH_USES_CFI_TRAPS 80362306a36Sopenharmony_ci bool 80462306a36Sopenharmony_ci 80562306a36Sopenharmony_ciconfig CFI_CLANG 80662306a36Sopenharmony_ci bool "Use Clang's Control Flow Integrity (CFI)" 80762306a36Sopenharmony_ci depends on ARCH_SUPPORTS_CFI_CLANG 80862306a36Sopenharmony_ci depends on $(cc-option,-fsanitize=kcfi) 80962306a36Sopenharmony_ci help 81062306a36Sopenharmony_ci This option enables Clang’s forward-edge Control Flow Integrity 81162306a36Sopenharmony_ci (CFI) checking, where the compiler injects a runtime check to each 81262306a36Sopenharmony_ci indirect function call to ensure the target is a valid function with 81362306a36Sopenharmony_ci the correct static type. This restricts possible call targets and 81462306a36Sopenharmony_ci makes it more difficult for an attacker to exploit bugs that allow 81562306a36Sopenharmony_ci the modification of stored function pointers. More information can be 81662306a36Sopenharmony_ci found from Clang's documentation: 81762306a36Sopenharmony_ci 81862306a36Sopenharmony_ci https://clang.llvm.org/docs/ControlFlowIntegrity.html 81962306a36Sopenharmony_ci 82062306a36Sopenharmony_ciconfig CFI_PERMISSIVE 82162306a36Sopenharmony_ci bool "Use CFI in permissive mode" 82262306a36Sopenharmony_ci depends on CFI_CLANG 82362306a36Sopenharmony_ci help 82462306a36Sopenharmony_ci When selected, Control Flow Integrity (CFI) violations result in a 82562306a36Sopenharmony_ci warning instead of a kernel panic. This option should only be used 82662306a36Sopenharmony_ci for finding indirect call type mismatches during development. 82762306a36Sopenharmony_ci 82862306a36Sopenharmony_ci If unsure, say N. 82962306a36Sopenharmony_ci 83062306a36Sopenharmony_ciconfig HAVE_ARCH_WITHIN_STACK_FRAMES 83162306a36Sopenharmony_ci bool 83262306a36Sopenharmony_ci help 83362306a36Sopenharmony_ci An architecture should select this if it can walk the kernel stack 83462306a36Sopenharmony_ci frames to determine if an object is part of either the arguments 83562306a36Sopenharmony_ci or local variables (i.e. that it excludes saved return addresses, 83662306a36Sopenharmony_ci and similar) by implementing an inline arch_within_stack_frames(), 83762306a36Sopenharmony_ci which is used by CONFIG_HARDENED_USERCOPY. 83862306a36Sopenharmony_ci 83962306a36Sopenharmony_ciconfig HAVE_CONTEXT_TRACKING_USER 84062306a36Sopenharmony_ci bool 84162306a36Sopenharmony_ci help 84262306a36Sopenharmony_ci Provide kernel/user boundaries probes necessary for subsystems 84362306a36Sopenharmony_ci that need it, such as userspace RCU extended quiescent state. 84462306a36Sopenharmony_ci Syscalls need to be wrapped inside user_exit()-user_enter(), either 84562306a36Sopenharmony_ci optimized behind static key or through the slow path using TIF_NOHZ 84662306a36Sopenharmony_ci flag. Exceptions handlers must be wrapped as well. Irqs are already 84762306a36Sopenharmony_ci protected inside ct_irq_enter/ct_irq_exit() but preemption or signal 84862306a36Sopenharmony_ci handling on irq exit still need to be protected. 84962306a36Sopenharmony_ci 85062306a36Sopenharmony_ciconfig HAVE_CONTEXT_TRACKING_USER_OFFSTACK 85162306a36Sopenharmony_ci bool 85262306a36Sopenharmony_ci help 85362306a36Sopenharmony_ci Architecture neither relies on exception_enter()/exception_exit() 85462306a36Sopenharmony_ci nor on schedule_user(). Also preempt_schedule_notrace() and 85562306a36Sopenharmony_ci preempt_schedule_irq() can't be called in a preemptible section 85662306a36Sopenharmony_ci while context tracking is CONTEXT_USER. This feature reflects a sane 85762306a36Sopenharmony_ci entry implementation where the following requirements are met on 85862306a36Sopenharmony_ci critical entry code, ie: before user_exit() or after user_enter(): 85962306a36Sopenharmony_ci 86062306a36Sopenharmony_ci - Critical entry code isn't preemptible (or better yet: 86162306a36Sopenharmony_ci not interruptible). 86262306a36Sopenharmony_ci - No use of RCU read side critical sections, unless ct_nmi_enter() 86362306a36Sopenharmony_ci got called. 86462306a36Sopenharmony_ci - No use of instrumentation, unless instrumentation_begin() got 86562306a36Sopenharmony_ci called. 86662306a36Sopenharmony_ci 86762306a36Sopenharmony_ciconfig HAVE_TIF_NOHZ 86862306a36Sopenharmony_ci bool 86962306a36Sopenharmony_ci help 87062306a36Sopenharmony_ci Arch relies on TIF_NOHZ and syscall slow path to implement context 87162306a36Sopenharmony_ci tracking calls to user_enter()/user_exit(). 87262306a36Sopenharmony_ci 87362306a36Sopenharmony_ciconfig HAVE_VIRT_CPU_ACCOUNTING 87462306a36Sopenharmony_ci bool 87562306a36Sopenharmony_ci 87662306a36Sopenharmony_ciconfig HAVE_VIRT_CPU_ACCOUNTING_IDLE 87762306a36Sopenharmony_ci bool 87862306a36Sopenharmony_ci help 87962306a36Sopenharmony_ci Architecture has its own way to account idle CPU time and therefore 88062306a36Sopenharmony_ci doesn't implement vtime_account_idle(). 88162306a36Sopenharmony_ci 88262306a36Sopenharmony_ciconfig ARCH_HAS_SCALED_CPUTIME 88362306a36Sopenharmony_ci bool 88462306a36Sopenharmony_ci 88562306a36Sopenharmony_ciconfig HAVE_VIRT_CPU_ACCOUNTING_GEN 88662306a36Sopenharmony_ci bool 88762306a36Sopenharmony_ci default y if 64BIT 88862306a36Sopenharmony_ci help 88962306a36Sopenharmony_ci With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. 89062306a36Sopenharmony_ci Before enabling this option, arch code must be audited 89162306a36Sopenharmony_ci to ensure there are no races in concurrent read/write of 89262306a36Sopenharmony_ci cputime_t. For example, reading/writing 64-bit cputime_t on 89362306a36Sopenharmony_ci some 32-bit arches may require multiple accesses, so proper 89462306a36Sopenharmony_ci locking is needed to protect against concurrent accesses. 89562306a36Sopenharmony_ci 89662306a36Sopenharmony_ciconfig HAVE_IRQ_TIME_ACCOUNTING 89762306a36Sopenharmony_ci bool 89862306a36Sopenharmony_ci help 89962306a36Sopenharmony_ci Archs need to ensure they use a high enough resolution clock to 90062306a36Sopenharmony_ci support irq time accounting and then call enable_sched_clock_irqtime(). 90162306a36Sopenharmony_ci 90262306a36Sopenharmony_ciconfig HAVE_MOVE_PUD 90362306a36Sopenharmony_ci bool 90462306a36Sopenharmony_ci help 90562306a36Sopenharmony_ci Architectures that select this are able to move page tables at the 90662306a36Sopenharmony_ci PUD level. If there are only 3 page table levels, the move effectively 90762306a36Sopenharmony_ci happens at the PGD level. 90862306a36Sopenharmony_ci 90962306a36Sopenharmony_ciconfig HAVE_MOVE_PMD 91062306a36Sopenharmony_ci bool 91162306a36Sopenharmony_ci help 91262306a36Sopenharmony_ci Archs that select this are able to move page tables at the PMD level. 91362306a36Sopenharmony_ci 91462306a36Sopenharmony_ciconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE 91562306a36Sopenharmony_ci bool 91662306a36Sopenharmony_ci 91762306a36Sopenharmony_ciconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 91862306a36Sopenharmony_ci bool 91962306a36Sopenharmony_ci 92062306a36Sopenharmony_ciconfig HAVE_ARCH_HUGE_VMAP 92162306a36Sopenharmony_ci bool 92262306a36Sopenharmony_ci 92362306a36Sopenharmony_ci# 92462306a36Sopenharmony_ci# Archs that select this would be capable of PMD-sized vmaps (i.e., 92562306a36Sopenharmony_ci# arch_vmap_pmd_supported() returns true). The VM_ALLOW_HUGE_VMAP flag 92662306a36Sopenharmony_ci# must be used to enable allocations to use hugepages. 92762306a36Sopenharmony_ci# 92862306a36Sopenharmony_ciconfig HAVE_ARCH_HUGE_VMALLOC 92962306a36Sopenharmony_ci depends on HAVE_ARCH_HUGE_VMAP 93062306a36Sopenharmony_ci bool 93162306a36Sopenharmony_ci 93262306a36Sopenharmony_ciconfig ARCH_WANT_HUGE_PMD_SHARE 93362306a36Sopenharmony_ci bool 93462306a36Sopenharmony_ci 93562306a36Sopenharmony_ci# Archs that want to use pmd_mkwrite on kernel memory need it defined even 93662306a36Sopenharmony_ci# if there are no userspace memory management features that use it 93762306a36Sopenharmony_ciconfig ARCH_WANT_KERNEL_PMD_MKWRITE 93862306a36Sopenharmony_ci bool 93962306a36Sopenharmony_ci 94062306a36Sopenharmony_ciconfig ARCH_WANT_PMD_MKWRITE 94162306a36Sopenharmony_ci def_bool TRANSPARENT_HUGEPAGE || ARCH_WANT_KERNEL_PMD_MKWRITE 94262306a36Sopenharmony_ci 94362306a36Sopenharmony_ciconfig HAVE_ARCH_SOFT_DIRTY 94462306a36Sopenharmony_ci bool 94562306a36Sopenharmony_ci 94662306a36Sopenharmony_ciconfig HAVE_MOD_ARCH_SPECIFIC 94762306a36Sopenharmony_ci bool 94862306a36Sopenharmony_ci help 94962306a36Sopenharmony_ci The arch uses struct mod_arch_specific to store data. Many arches 95062306a36Sopenharmony_ci just need a simple module loader without arch specific data - those 95162306a36Sopenharmony_ci should not enable this. 95262306a36Sopenharmony_ci 95362306a36Sopenharmony_ciconfig MODULES_USE_ELF_RELA 95462306a36Sopenharmony_ci bool 95562306a36Sopenharmony_ci help 95662306a36Sopenharmony_ci Modules only use ELF RELA relocations. Modules with ELF REL 95762306a36Sopenharmony_ci relocations will give an error. 95862306a36Sopenharmony_ci 95962306a36Sopenharmony_ciconfig MODULES_USE_ELF_REL 96062306a36Sopenharmony_ci bool 96162306a36Sopenharmony_ci help 96262306a36Sopenharmony_ci Modules only use ELF REL relocations. Modules with ELF RELA 96362306a36Sopenharmony_ci relocations will give an error. 96462306a36Sopenharmony_ci 96562306a36Sopenharmony_ciconfig ARCH_WANTS_MODULES_DATA_IN_VMALLOC 96662306a36Sopenharmony_ci bool 96762306a36Sopenharmony_ci help 96862306a36Sopenharmony_ci For architectures like powerpc/32 which have constraints on module 96962306a36Sopenharmony_ci allocation and need to allocate module data outside of module area. 97062306a36Sopenharmony_ci 97162306a36Sopenharmony_ciconfig HAVE_IRQ_EXIT_ON_IRQ_STACK 97262306a36Sopenharmony_ci bool 97362306a36Sopenharmony_ci help 97462306a36Sopenharmony_ci Architecture doesn't only execute the irq handler on the irq stack 97562306a36Sopenharmony_ci but also irq_exit(). This way we can process softirqs on this irq 97662306a36Sopenharmony_ci stack instead of switching to a new one when we call __do_softirq() 97762306a36Sopenharmony_ci in the end of an hardirq. 97862306a36Sopenharmony_ci This spares a stack switch and improves cache usage on softirq 97962306a36Sopenharmony_ci processing. 98062306a36Sopenharmony_ci 98162306a36Sopenharmony_ciconfig HAVE_SOFTIRQ_ON_OWN_STACK 98262306a36Sopenharmony_ci bool 98362306a36Sopenharmony_ci help 98462306a36Sopenharmony_ci Architecture provides a function to run __do_softirq() on a 98562306a36Sopenharmony_ci separate stack. 98662306a36Sopenharmony_ci 98762306a36Sopenharmony_ciconfig SOFTIRQ_ON_OWN_STACK 98862306a36Sopenharmony_ci def_bool HAVE_SOFTIRQ_ON_OWN_STACK && !PREEMPT_RT 98962306a36Sopenharmony_ci 99062306a36Sopenharmony_ciconfig ALTERNATE_USER_ADDRESS_SPACE 99162306a36Sopenharmony_ci bool 99262306a36Sopenharmony_ci help 99362306a36Sopenharmony_ci Architectures set this when the CPU uses separate address 99462306a36Sopenharmony_ci spaces for kernel and user space pointers. In this case, the 99562306a36Sopenharmony_ci access_ok() check on a __user pointer is skipped. 99662306a36Sopenharmony_ci 99762306a36Sopenharmony_ciconfig PGTABLE_LEVELS 99862306a36Sopenharmony_ci int 99962306a36Sopenharmony_ci default 2 100062306a36Sopenharmony_ci 100162306a36Sopenharmony_ciconfig ARCH_HAS_ELF_RANDOMIZE 100262306a36Sopenharmony_ci bool 100362306a36Sopenharmony_ci help 100462306a36Sopenharmony_ci An architecture supports choosing randomized locations for 100562306a36Sopenharmony_ci stack, mmap, brk, and ET_DYN. Defined functions: 100662306a36Sopenharmony_ci - arch_mmap_rnd() 100762306a36Sopenharmony_ci - arch_randomize_brk() 100862306a36Sopenharmony_ci 100962306a36Sopenharmony_ciconfig HAVE_ARCH_MMAP_RND_BITS 101062306a36Sopenharmony_ci bool 101162306a36Sopenharmony_ci help 101262306a36Sopenharmony_ci An arch should select this symbol if it supports setting a variable 101362306a36Sopenharmony_ci number of bits for use in establishing the base address for mmap 101462306a36Sopenharmony_ci allocations, has MMU enabled and provides values for both: 101562306a36Sopenharmony_ci - ARCH_MMAP_RND_BITS_MIN 101662306a36Sopenharmony_ci - ARCH_MMAP_RND_BITS_MAX 101762306a36Sopenharmony_ci 101862306a36Sopenharmony_ciconfig HAVE_EXIT_THREAD 101962306a36Sopenharmony_ci bool 102062306a36Sopenharmony_ci help 102162306a36Sopenharmony_ci An architecture implements exit_thread. 102262306a36Sopenharmony_ci 102362306a36Sopenharmony_ciconfig ARCH_MMAP_RND_BITS_MIN 102462306a36Sopenharmony_ci int 102562306a36Sopenharmony_ci 102662306a36Sopenharmony_ciconfig ARCH_MMAP_RND_BITS_MAX 102762306a36Sopenharmony_ci int 102862306a36Sopenharmony_ci 102962306a36Sopenharmony_ciconfig ARCH_MMAP_RND_BITS_DEFAULT 103062306a36Sopenharmony_ci int 103162306a36Sopenharmony_ci 103262306a36Sopenharmony_ciconfig ARCH_MMAP_RND_BITS 103362306a36Sopenharmony_ci int "Number of bits to use for ASLR of mmap base address" if EXPERT 103462306a36Sopenharmony_ci range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX 103562306a36Sopenharmony_ci default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT 103662306a36Sopenharmony_ci default ARCH_MMAP_RND_BITS_MIN 103762306a36Sopenharmony_ci depends on HAVE_ARCH_MMAP_RND_BITS 103862306a36Sopenharmony_ci help 103962306a36Sopenharmony_ci This value can be used to select the number of bits to use to 104062306a36Sopenharmony_ci determine the random offset to the base address of vma regions 104162306a36Sopenharmony_ci resulting from mmap allocations. This value will be bounded 104262306a36Sopenharmony_ci by the architecture's minimum and maximum supported values. 104362306a36Sopenharmony_ci 104462306a36Sopenharmony_ci This value can be changed after boot using the 104562306a36Sopenharmony_ci /proc/sys/vm/mmap_rnd_bits tunable 104662306a36Sopenharmony_ci 104762306a36Sopenharmony_ciconfig HAVE_ARCH_MMAP_RND_COMPAT_BITS 104862306a36Sopenharmony_ci bool 104962306a36Sopenharmony_ci help 105062306a36Sopenharmony_ci An arch should select this symbol if it supports running applications 105162306a36Sopenharmony_ci in compatibility mode, supports setting a variable number of bits for 105262306a36Sopenharmony_ci use in establishing the base address for mmap allocations, has MMU 105362306a36Sopenharmony_ci enabled and provides values for both: 105462306a36Sopenharmony_ci - ARCH_MMAP_RND_COMPAT_BITS_MIN 105562306a36Sopenharmony_ci - ARCH_MMAP_RND_COMPAT_BITS_MAX 105662306a36Sopenharmony_ci 105762306a36Sopenharmony_ciconfig ARCH_MMAP_RND_COMPAT_BITS_MIN 105862306a36Sopenharmony_ci int 105962306a36Sopenharmony_ci 106062306a36Sopenharmony_ciconfig ARCH_MMAP_RND_COMPAT_BITS_MAX 106162306a36Sopenharmony_ci int 106262306a36Sopenharmony_ci 106362306a36Sopenharmony_ciconfig ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 106462306a36Sopenharmony_ci int 106562306a36Sopenharmony_ci 106662306a36Sopenharmony_ciconfig ARCH_MMAP_RND_COMPAT_BITS 106762306a36Sopenharmony_ci int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT 106862306a36Sopenharmony_ci range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX 106962306a36Sopenharmony_ci default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 107062306a36Sopenharmony_ci default ARCH_MMAP_RND_COMPAT_BITS_MIN 107162306a36Sopenharmony_ci depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS 107262306a36Sopenharmony_ci help 107362306a36Sopenharmony_ci This value can be used to select the number of bits to use to 107462306a36Sopenharmony_ci determine the random offset to the base address of vma regions 107562306a36Sopenharmony_ci resulting from mmap allocations for compatible applications This 107662306a36Sopenharmony_ci value will be bounded by the architecture's minimum and maximum 107762306a36Sopenharmony_ci supported values. 107862306a36Sopenharmony_ci 107962306a36Sopenharmony_ci This value can be changed after boot using the 108062306a36Sopenharmony_ci /proc/sys/vm/mmap_rnd_compat_bits tunable 108162306a36Sopenharmony_ci 108262306a36Sopenharmony_ciconfig HAVE_ARCH_COMPAT_MMAP_BASES 108362306a36Sopenharmony_ci bool 108462306a36Sopenharmony_ci help 108562306a36Sopenharmony_ci This allows 64bit applications to invoke 32-bit mmap() syscall 108662306a36Sopenharmony_ci and vice-versa 32-bit applications to call 64-bit mmap(). 108762306a36Sopenharmony_ci Required for applications doing different bitness syscalls. 108862306a36Sopenharmony_ci 108962306a36Sopenharmony_ciconfig PAGE_SIZE_LESS_THAN_64KB 109062306a36Sopenharmony_ci def_bool y 109162306a36Sopenharmony_ci depends on !ARM64_64K_PAGES 109262306a36Sopenharmony_ci depends on !IA64_PAGE_SIZE_64KB 109362306a36Sopenharmony_ci depends on !PAGE_SIZE_64KB 109462306a36Sopenharmony_ci depends on !PARISC_PAGE_SIZE_64KB 109562306a36Sopenharmony_ci depends on PAGE_SIZE_LESS_THAN_256KB 109662306a36Sopenharmony_ci 109762306a36Sopenharmony_ciconfig PAGE_SIZE_LESS_THAN_256KB 109862306a36Sopenharmony_ci def_bool y 109962306a36Sopenharmony_ci depends on !PAGE_SIZE_256KB 110062306a36Sopenharmony_ci 110162306a36Sopenharmony_ci# This allows to use a set of generic functions to determine mmap base 110262306a36Sopenharmony_ci# address by giving priority to top-down scheme only if the process 110362306a36Sopenharmony_ci# is not in legacy mode (compat task, unlimited stack size or 110462306a36Sopenharmony_ci# sysctl_legacy_va_layout). 110562306a36Sopenharmony_ci# Architecture that selects this option can provide its own version of: 110662306a36Sopenharmony_ci# - STACK_RND_MASK 110762306a36Sopenharmony_ciconfig ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 110862306a36Sopenharmony_ci bool 110962306a36Sopenharmony_ci depends on MMU 111062306a36Sopenharmony_ci select ARCH_HAS_ELF_RANDOMIZE 111162306a36Sopenharmony_ci 111262306a36Sopenharmony_ciconfig HAVE_OBJTOOL 111362306a36Sopenharmony_ci bool 111462306a36Sopenharmony_ci 111562306a36Sopenharmony_ciconfig HAVE_JUMP_LABEL_HACK 111662306a36Sopenharmony_ci bool 111762306a36Sopenharmony_ci 111862306a36Sopenharmony_ciconfig HAVE_NOINSTR_HACK 111962306a36Sopenharmony_ci bool 112062306a36Sopenharmony_ci 112162306a36Sopenharmony_ciconfig HAVE_NOINSTR_VALIDATION 112262306a36Sopenharmony_ci bool 112362306a36Sopenharmony_ci 112462306a36Sopenharmony_ciconfig HAVE_UACCESS_VALIDATION 112562306a36Sopenharmony_ci bool 112662306a36Sopenharmony_ci select OBJTOOL 112762306a36Sopenharmony_ci 112862306a36Sopenharmony_ciconfig HAVE_STACK_VALIDATION 112962306a36Sopenharmony_ci bool 113062306a36Sopenharmony_ci help 113162306a36Sopenharmony_ci Architecture supports objtool compile-time frame pointer rule 113262306a36Sopenharmony_ci validation. 113362306a36Sopenharmony_ci 113462306a36Sopenharmony_ciconfig HAVE_RELIABLE_STACKTRACE 113562306a36Sopenharmony_ci bool 113662306a36Sopenharmony_ci help 113762306a36Sopenharmony_ci Architecture has either save_stack_trace_tsk_reliable() or 113862306a36Sopenharmony_ci arch_stack_walk_reliable() function which only returns a stack trace 113962306a36Sopenharmony_ci if it can guarantee the trace is reliable. 114062306a36Sopenharmony_ci 114162306a36Sopenharmony_ciconfig HAVE_ARCH_HASH 114262306a36Sopenharmony_ci bool 114362306a36Sopenharmony_ci default n 114462306a36Sopenharmony_ci help 114562306a36Sopenharmony_ci If this is set, the architecture provides an <asm/hash.h> 114662306a36Sopenharmony_ci file which provides platform-specific implementations of some 114762306a36Sopenharmony_ci functions in <linux/hash.h> or fs/namei.c. 114862306a36Sopenharmony_ci 114962306a36Sopenharmony_ciconfig HAVE_ARCH_NVRAM_OPS 115062306a36Sopenharmony_ci bool 115162306a36Sopenharmony_ci 115262306a36Sopenharmony_ciconfig ISA_BUS_API 115362306a36Sopenharmony_ci def_bool ISA 115462306a36Sopenharmony_ci 115562306a36Sopenharmony_ci# 115662306a36Sopenharmony_ci# ABI hall of shame 115762306a36Sopenharmony_ci# 115862306a36Sopenharmony_ciconfig CLONE_BACKWARDS 115962306a36Sopenharmony_ci bool 116062306a36Sopenharmony_ci help 116162306a36Sopenharmony_ci Architecture has tls passed as the 4th argument of clone(2), 116262306a36Sopenharmony_ci not the 5th one. 116362306a36Sopenharmony_ci 116462306a36Sopenharmony_ciconfig CLONE_BACKWARDS2 116562306a36Sopenharmony_ci bool 116662306a36Sopenharmony_ci help 116762306a36Sopenharmony_ci Architecture has the first two arguments of clone(2) swapped. 116862306a36Sopenharmony_ci 116962306a36Sopenharmony_ciconfig CLONE_BACKWARDS3 117062306a36Sopenharmony_ci bool 117162306a36Sopenharmony_ci help 117262306a36Sopenharmony_ci Architecture has tls passed as the 3rd argument of clone(2), 117362306a36Sopenharmony_ci not the 5th one. 117462306a36Sopenharmony_ci 117562306a36Sopenharmony_ciconfig ODD_RT_SIGACTION 117662306a36Sopenharmony_ci bool 117762306a36Sopenharmony_ci help 117862306a36Sopenharmony_ci Architecture has unusual rt_sigaction(2) arguments 117962306a36Sopenharmony_ci 118062306a36Sopenharmony_ciconfig OLD_SIGSUSPEND 118162306a36Sopenharmony_ci bool 118262306a36Sopenharmony_ci help 118362306a36Sopenharmony_ci Architecture has old sigsuspend(2) syscall, of one-argument variety 118462306a36Sopenharmony_ci 118562306a36Sopenharmony_ciconfig OLD_SIGSUSPEND3 118662306a36Sopenharmony_ci bool 118762306a36Sopenharmony_ci help 118862306a36Sopenharmony_ci Even weirder antique ABI - three-argument sigsuspend(2) 118962306a36Sopenharmony_ci 119062306a36Sopenharmony_ciconfig OLD_SIGACTION 119162306a36Sopenharmony_ci bool 119262306a36Sopenharmony_ci help 119362306a36Sopenharmony_ci Architecture has old sigaction(2) syscall. Nope, not the same 119462306a36Sopenharmony_ci as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2), 119562306a36Sopenharmony_ci but fairly different variant of sigaction(2), thanks to OSF/1 119662306a36Sopenharmony_ci compatibility... 119762306a36Sopenharmony_ci 119862306a36Sopenharmony_ciconfig COMPAT_OLD_SIGACTION 119962306a36Sopenharmony_ci bool 120062306a36Sopenharmony_ci 120162306a36Sopenharmony_ciconfig COMPAT_32BIT_TIME 120262306a36Sopenharmony_ci bool "Provide system calls for 32-bit time_t" 120362306a36Sopenharmony_ci default !64BIT || COMPAT 120462306a36Sopenharmony_ci help 120562306a36Sopenharmony_ci This enables 32 bit time_t support in addition to 64 bit time_t support. 120662306a36Sopenharmony_ci This is relevant on all 32-bit architectures, and 64-bit architectures 120762306a36Sopenharmony_ci as part of compat syscall handling. 120862306a36Sopenharmony_ci 120962306a36Sopenharmony_ciconfig ARCH_NO_PREEMPT 121062306a36Sopenharmony_ci bool 121162306a36Sopenharmony_ci 121262306a36Sopenharmony_ciconfig ARCH_SUPPORTS_RT 121362306a36Sopenharmony_ci bool 121462306a36Sopenharmony_ci 121562306a36Sopenharmony_ciconfig CPU_NO_EFFICIENT_FFS 121662306a36Sopenharmony_ci def_bool n 121762306a36Sopenharmony_ci 121862306a36Sopenharmony_ciconfig HAVE_ARCH_VMAP_STACK 121962306a36Sopenharmony_ci def_bool n 122062306a36Sopenharmony_ci help 122162306a36Sopenharmony_ci An arch should select this symbol if it can support kernel stacks 122262306a36Sopenharmony_ci in vmalloc space. This means: 122362306a36Sopenharmony_ci 122462306a36Sopenharmony_ci - vmalloc space must be large enough to hold many kernel stacks. 122562306a36Sopenharmony_ci This may rule out many 32-bit architectures. 122662306a36Sopenharmony_ci 122762306a36Sopenharmony_ci - Stacks in vmalloc space need to work reliably. For example, if 122862306a36Sopenharmony_ci vmap page tables are created on demand, either this mechanism 122962306a36Sopenharmony_ci needs to work while the stack points to a virtual address with 123062306a36Sopenharmony_ci unpopulated page tables or arch code (switch_to() and switch_mm(), 123162306a36Sopenharmony_ci most likely) needs to ensure that the stack's page table entries 123262306a36Sopenharmony_ci are populated before running on a possibly unpopulated stack. 123362306a36Sopenharmony_ci 123462306a36Sopenharmony_ci - If the stack overflows into a guard page, something reasonable 123562306a36Sopenharmony_ci should happen. The definition of "reasonable" is flexible, but 123662306a36Sopenharmony_ci instantly rebooting without logging anything would be unfriendly. 123762306a36Sopenharmony_ci 123862306a36Sopenharmony_ciconfig VMAP_STACK 123962306a36Sopenharmony_ci default y 124062306a36Sopenharmony_ci bool "Use a virtually-mapped stack" 124162306a36Sopenharmony_ci depends on HAVE_ARCH_VMAP_STACK 124262306a36Sopenharmony_ci depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC 124362306a36Sopenharmony_ci help 124462306a36Sopenharmony_ci Enable this if you want the use virtually-mapped kernel stacks 124562306a36Sopenharmony_ci with guard pages. This causes kernel stack overflows to be 124662306a36Sopenharmony_ci caught immediately rather than causing difficult-to-diagnose 124762306a36Sopenharmony_ci corruption. 124862306a36Sopenharmony_ci 124962306a36Sopenharmony_ci To use this with software KASAN modes, the architecture must support 125062306a36Sopenharmony_ci backing virtual mappings with real shadow memory, and KASAN_VMALLOC 125162306a36Sopenharmony_ci must be enabled. 125262306a36Sopenharmony_ci 125362306a36Sopenharmony_ciconfig HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 125462306a36Sopenharmony_ci def_bool n 125562306a36Sopenharmony_ci help 125662306a36Sopenharmony_ci An arch should select this symbol if it can support kernel stack 125762306a36Sopenharmony_ci offset randomization with calls to add_random_kstack_offset() 125862306a36Sopenharmony_ci during syscall entry and choose_random_kstack_offset() during 125962306a36Sopenharmony_ci syscall exit. Careful removal of -fstack-protector-strong and 126062306a36Sopenharmony_ci -fstack-protector should also be applied to the entry code and 126162306a36Sopenharmony_ci closely examined, as the artificial stack bump looks like an array 126262306a36Sopenharmony_ci to the compiler, so it will attempt to add canary checks regardless 126362306a36Sopenharmony_ci of the static branch state. 126462306a36Sopenharmony_ci 126562306a36Sopenharmony_ciconfig RANDOMIZE_KSTACK_OFFSET 126662306a36Sopenharmony_ci bool "Support for randomizing kernel stack offset on syscall entry" if EXPERT 126762306a36Sopenharmony_ci default y 126862306a36Sopenharmony_ci depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 126962306a36Sopenharmony_ci depends on INIT_STACK_NONE || !CC_IS_CLANG || CLANG_VERSION >= 140000 127062306a36Sopenharmony_ci help 127162306a36Sopenharmony_ci The kernel stack offset can be randomized (after pt_regs) by 127262306a36Sopenharmony_ci roughly 5 bits of entropy, frustrating memory corruption 127362306a36Sopenharmony_ci attacks that depend on stack address determinism or 127462306a36Sopenharmony_ci cross-syscall address exposures. 127562306a36Sopenharmony_ci 127662306a36Sopenharmony_ci The feature is controlled via the "randomize_kstack_offset=on/off" 127762306a36Sopenharmony_ci kernel boot param, and if turned off has zero overhead due to its use 127862306a36Sopenharmony_ci of static branches (see JUMP_LABEL). 127962306a36Sopenharmony_ci 128062306a36Sopenharmony_ci If unsure, say Y. 128162306a36Sopenharmony_ci 128262306a36Sopenharmony_ciconfig RANDOMIZE_KSTACK_OFFSET_DEFAULT 128362306a36Sopenharmony_ci bool "Default state of kernel stack offset randomization" 128462306a36Sopenharmony_ci depends on RANDOMIZE_KSTACK_OFFSET 128562306a36Sopenharmony_ci help 128662306a36Sopenharmony_ci Kernel stack offset randomization is controlled by kernel boot param 128762306a36Sopenharmony_ci "randomize_kstack_offset=on/off", and this config chooses the default 128862306a36Sopenharmony_ci boot state. 128962306a36Sopenharmony_ci 129062306a36Sopenharmony_ciconfig ARCH_OPTIONAL_KERNEL_RWX 129162306a36Sopenharmony_ci def_bool n 129262306a36Sopenharmony_ci 129362306a36Sopenharmony_ciconfig ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 129462306a36Sopenharmony_ci def_bool n 129562306a36Sopenharmony_ci 129662306a36Sopenharmony_ciconfig ARCH_HAS_STRICT_KERNEL_RWX 129762306a36Sopenharmony_ci def_bool n 129862306a36Sopenharmony_ci 129962306a36Sopenharmony_ciconfig STRICT_KERNEL_RWX 130062306a36Sopenharmony_ci bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX 130162306a36Sopenharmony_ci depends on ARCH_HAS_STRICT_KERNEL_RWX 130262306a36Sopenharmony_ci default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 130362306a36Sopenharmony_ci help 130462306a36Sopenharmony_ci If this is set, kernel text and rodata memory will be made read-only, 130562306a36Sopenharmony_ci and non-text memory will be made non-executable. This provides 130662306a36Sopenharmony_ci protection against certain security exploits (e.g. executing the heap 130762306a36Sopenharmony_ci or modifying text) 130862306a36Sopenharmony_ci 130962306a36Sopenharmony_ci These features are considered standard security practice these days. 131062306a36Sopenharmony_ci You should say Y here in almost all cases. 131162306a36Sopenharmony_ci 131262306a36Sopenharmony_ciconfig ARCH_HAS_STRICT_MODULE_RWX 131362306a36Sopenharmony_ci def_bool n 131462306a36Sopenharmony_ci 131562306a36Sopenharmony_ciconfig STRICT_MODULE_RWX 131662306a36Sopenharmony_ci bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX 131762306a36Sopenharmony_ci depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES 131862306a36Sopenharmony_ci default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 131962306a36Sopenharmony_ci help 132062306a36Sopenharmony_ci If this is set, module text and rodata memory will be made read-only, 132162306a36Sopenharmony_ci and non-text memory will be made non-executable. This provides 132262306a36Sopenharmony_ci protection against certain security exploits (e.g. writing to text) 132362306a36Sopenharmony_ci 132462306a36Sopenharmony_ci# select if the architecture provides an asm/dma-direct.h header 132562306a36Sopenharmony_ciconfig ARCH_HAS_PHYS_TO_DMA 132662306a36Sopenharmony_ci bool 132762306a36Sopenharmony_ci 132862306a36Sopenharmony_ciconfig HAVE_ARCH_COMPILER_H 132962306a36Sopenharmony_ci bool 133062306a36Sopenharmony_ci help 133162306a36Sopenharmony_ci An architecture can select this if it provides an 133262306a36Sopenharmony_ci asm/compiler.h header that should be included after 133362306a36Sopenharmony_ci linux/compiler-*.h in order to override macro definitions that those 133462306a36Sopenharmony_ci headers generally provide. 133562306a36Sopenharmony_ci 133662306a36Sopenharmony_ciconfig HAVE_ARCH_PREL32_RELOCATIONS 133762306a36Sopenharmony_ci bool 133862306a36Sopenharmony_ci help 133962306a36Sopenharmony_ci May be selected by an architecture if it supports place-relative 134062306a36Sopenharmony_ci 32-bit relocations, both in the toolchain and in the module loader, 134162306a36Sopenharmony_ci in which case relative references can be used in special sections 134262306a36Sopenharmony_ci for PCI fixup, initcalls etc which are only half the size on 64 bit 134362306a36Sopenharmony_ci architectures, and don't require runtime relocation on relocatable 134462306a36Sopenharmony_ci kernels. 134562306a36Sopenharmony_ci 134662306a36Sopenharmony_ciconfig ARCH_USE_MEMREMAP_PROT 134762306a36Sopenharmony_ci bool 134862306a36Sopenharmony_ci 134962306a36Sopenharmony_ciconfig LOCK_EVENT_COUNTS 135062306a36Sopenharmony_ci bool "Locking event counts collection" 135162306a36Sopenharmony_ci depends on DEBUG_FS 135262306a36Sopenharmony_ci help 135362306a36Sopenharmony_ci Enable light-weight counting of various locking related events 135462306a36Sopenharmony_ci in the system with minimal performance impact. This reduces 135562306a36Sopenharmony_ci the chance of application behavior change because of timing 135662306a36Sopenharmony_ci differences. The counts are reported via debugfs. 135762306a36Sopenharmony_ci 135862306a36Sopenharmony_ci# Select if the architecture has support for applying RELR relocations. 135962306a36Sopenharmony_ciconfig ARCH_HAS_RELR 136062306a36Sopenharmony_ci bool 136162306a36Sopenharmony_ci 136262306a36Sopenharmony_ciconfig RELR 136362306a36Sopenharmony_ci bool "Use RELR relocation packing" 136462306a36Sopenharmony_ci depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR 136562306a36Sopenharmony_ci default y 136662306a36Sopenharmony_ci help 136762306a36Sopenharmony_ci Store the kernel's dynamic relocations in the RELR relocation packing 136862306a36Sopenharmony_ci format. Requires a compatible linker (LLD supports this feature), as 136962306a36Sopenharmony_ci well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy 137062306a36Sopenharmony_ci are compatible). 137162306a36Sopenharmony_ci 137262306a36Sopenharmony_ciconfig ARCH_HAS_MEM_ENCRYPT 137362306a36Sopenharmony_ci bool 137462306a36Sopenharmony_ci 137562306a36Sopenharmony_ciconfig ARCH_HAS_CC_PLATFORM 137662306a36Sopenharmony_ci bool 137762306a36Sopenharmony_ci 137862306a36Sopenharmony_ciconfig HAVE_SPARSE_SYSCALL_NR 137962306a36Sopenharmony_ci bool 138062306a36Sopenharmony_ci help 138162306a36Sopenharmony_ci An architecture should select this if its syscall numbering is sparse 138262306a36Sopenharmony_ci to save space. For example, MIPS architecture has a syscall array with 138362306a36Sopenharmony_ci entries at 4000, 5000 and 6000 locations. This option turns on syscall 138462306a36Sopenharmony_ci related optimizations for a given architecture. 138562306a36Sopenharmony_ci 138662306a36Sopenharmony_ciconfig ARCH_HAS_VDSO_DATA 138762306a36Sopenharmony_ci bool 138862306a36Sopenharmony_ci 138962306a36Sopenharmony_ciconfig HAVE_STATIC_CALL 139062306a36Sopenharmony_ci bool 139162306a36Sopenharmony_ci 139262306a36Sopenharmony_ciconfig HAVE_STATIC_CALL_INLINE 139362306a36Sopenharmony_ci bool 139462306a36Sopenharmony_ci depends on HAVE_STATIC_CALL 139562306a36Sopenharmony_ci select OBJTOOL 139662306a36Sopenharmony_ci 139762306a36Sopenharmony_ciconfig HAVE_PREEMPT_DYNAMIC 139862306a36Sopenharmony_ci bool 139962306a36Sopenharmony_ci 140062306a36Sopenharmony_ciconfig HAVE_PREEMPT_DYNAMIC_CALL 140162306a36Sopenharmony_ci bool 140262306a36Sopenharmony_ci depends on HAVE_STATIC_CALL 140362306a36Sopenharmony_ci select HAVE_PREEMPT_DYNAMIC 140462306a36Sopenharmony_ci help 140562306a36Sopenharmony_ci An architecture should select this if it can handle the preemption 140662306a36Sopenharmony_ci model being selected at boot time using static calls. 140762306a36Sopenharmony_ci 140862306a36Sopenharmony_ci Where an architecture selects HAVE_STATIC_CALL_INLINE, any call to a 140962306a36Sopenharmony_ci preemption function will be patched directly. 141062306a36Sopenharmony_ci 141162306a36Sopenharmony_ci Where an architecture does not select HAVE_STATIC_CALL_INLINE, any 141262306a36Sopenharmony_ci call to a preemption function will go through a trampoline, and the 141362306a36Sopenharmony_ci trampoline will be patched. 141462306a36Sopenharmony_ci 141562306a36Sopenharmony_ci It is strongly advised to support inline static call to avoid any 141662306a36Sopenharmony_ci overhead. 141762306a36Sopenharmony_ci 141862306a36Sopenharmony_ciconfig HAVE_PREEMPT_DYNAMIC_KEY 141962306a36Sopenharmony_ci bool 142062306a36Sopenharmony_ci depends on HAVE_ARCH_JUMP_LABEL 142162306a36Sopenharmony_ci select HAVE_PREEMPT_DYNAMIC 142262306a36Sopenharmony_ci help 142362306a36Sopenharmony_ci An architecture should select this if it can handle the preemption 142462306a36Sopenharmony_ci model being selected at boot time using static keys. 142562306a36Sopenharmony_ci 142662306a36Sopenharmony_ci Each preemption function will be given an early return based on a 142762306a36Sopenharmony_ci static key. This should have slightly lower overhead than non-inline 142862306a36Sopenharmony_ci static calls, as this effectively inlines each trampoline into the 142962306a36Sopenharmony_ci start of its callee. This may avoid redundant work, and may 143062306a36Sopenharmony_ci integrate better with CFI schemes. 143162306a36Sopenharmony_ci 143262306a36Sopenharmony_ci This will have greater overhead than using inline static calls as 143362306a36Sopenharmony_ci the call to the preemption function cannot be entirely elided. 143462306a36Sopenharmony_ci 143562306a36Sopenharmony_ciconfig ARCH_WANT_LD_ORPHAN_WARN 143662306a36Sopenharmony_ci bool 143762306a36Sopenharmony_ci help 143862306a36Sopenharmony_ci An arch should select this symbol once all linker sections are explicitly 143962306a36Sopenharmony_ci included, size-asserted, or discarded in the linker scripts. This is 144062306a36Sopenharmony_ci important because we never want expected sections to be placed heuristically 144162306a36Sopenharmony_ci by the linker, since the locations of such sections can change between linker 144262306a36Sopenharmony_ci versions. 144362306a36Sopenharmony_ci 144462306a36Sopenharmony_ciconfig HAVE_ARCH_PFN_VALID 144562306a36Sopenharmony_ci bool 144662306a36Sopenharmony_ci 144762306a36Sopenharmony_ciconfig ARCH_SUPPORTS_DEBUG_PAGEALLOC 144862306a36Sopenharmony_ci bool 144962306a36Sopenharmony_ci 145062306a36Sopenharmony_ciconfig ARCH_SUPPORTS_PAGE_TABLE_CHECK 145162306a36Sopenharmony_ci bool 145262306a36Sopenharmony_ci 145362306a36Sopenharmony_ciconfig ARCH_SPLIT_ARG64 145462306a36Sopenharmony_ci bool 145562306a36Sopenharmony_ci help 145662306a36Sopenharmony_ci If a 32-bit architecture requires 64-bit arguments to be split into 145762306a36Sopenharmony_ci pairs of 32-bit arguments, select this option. 145862306a36Sopenharmony_ci 145962306a36Sopenharmony_ciconfig ARCH_HAS_ELFCORE_COMPAT 146062306a36Sopenharmony_ci bool 146162306a36Sopenharmony_ci 146262306a36Sopenharmony_ciconfig ARCH_HAS_PARANOID_L1D_FLUSH 146362306a36Sopenharmony_ci bool 146462306a36Sopenharmony_ci 146562306a36Sopenharmony_ciconfig ARCH_HAVE_TRACE_MMIO_ACCESS 146662306a36Sopenharmony_ci bool 146762306a36Sopenharmony_ci 146862306a36Sopenharmony_ciconfig DYNAMIC_SIGFRAME 146962306a36Sopenharmony_ci bool 147062306a36Sopenharmony_ci 147162306a36Sopenharmony_ci# Select, if arch has a named attribute group bound to NUMA device nodes. 147262306a36Sopenharmony_ciconfig HAVE_ARCH_NODE_DEV_GROUP 147362306a36Sopenharmony_ci bool 147462306a36Sopenharmony_ci 147562306a36Sopenharmony_ciconfig ARCH_HAS_NONLEAF_PMD_YOUNG 147662306a36Sopenharmony_ci bool 147762306a36Sopenharmony_ci help 147862306a36Sopenharmony_ci Architectures that select this option are capable of setting the 147962306a36Sopenharmony_ci accessed bit in non-leaf PMD entries when using them as part of linear 148062306a36Sopenharmony_ci address translations. Page table walkers that clear the accessed bit 148162306a36Sopenharmony_ci may use this capability to reduce their search space. 148262306a36Sopenharmony_ci 148362306a36Sopenharmony_cisource "kernel/gcov/Kconfig" 148462306a36Sopenharmony_ci 148562306a36Sopenharmony_cisource "scripts/gcc-plugins/Kconfig" 148662306a36Sopenharmony_ci 148762306a36Sopenharmony_ciconfig FUNCTION_ALIGNMENT_4B 148862306a36Sopenharmony_ci bool 148962306a36Sopenharmony_ci 149062306a36Sopenharmony_ciconfig FUNCTION_ALIGNMENT_8B 149162306a36Sopenharmony_ci bool 149262306a36Sopenharmony_ci 149362306a36Sopenharmony_ciconfig FUNCTION_ALIGNMENT_16B 149462306a36Sopenharmony_ci bool 149562306a36Sopenharmony_ci 149662306a36Sopenharmony_ciconfig FUNCTION_ALIGNMENT_32B 149762306a36Sopenharmony_ci bool 149862306a36Sopenharmony_ci 149962306a36Sopenharmony_ciconfig FUNCTION_ALIGNMENT_64B 150062306a36Sopenharmony_ci bool 150162306a36Sopenharmony_ci 150262306a36Sopenharmony_ciconfig FUNCTION_ALIGNMENT 150362306a36Sopenharmony_ci int 150462306a36Sopenharmony_ci default 64 if FUNCTION_ALIGNMENT_64B 150562306a36Sopenharmony_ci default 32 if FUNCTION_ALIGNMENT_32B 150662306a36Sopenharmony_ci default 16 if FUNCTION_ALIGNMENT_16B 150762306a36Sopenharmony_ci default 8 if FUNCTION_ALIGNMENT_8B 150862306a36Sopenharmony_ci default 4 if FUNCTION_ALIGNMENT_4B 150962306a36Sopenharmony_ci default 0 151062306a36Sopenharmony_ci 151162306a36Sopenharmony_ciendmenu 1512