18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci# 38c2ecf20Sopenharmony_ci# General architecture dependent options 48c2ecf20Sopenharmony_ci# 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci# 78c2ecf20Sopenharmony_ci# Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can 88c2ecf20Sopenharmony_ci# override the default values in this file. 98c2ecf20Sopenharmony_ci# 108c2ecf20Sopenharmony_cisource "arch/$(SRCARCH)/Kconfig" 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_cimenu "General architecture-dependent options" 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciconfig CRASH_CORE 158c2ecf20Sopenharmony_ci bool 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciconfig KEXEC_CORE 188c2ecf20Sopenharmony_ci select CRASH_CORE 198c2ecf20Sopenharmony_ci bool 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciconfig KEXEC_ELF 228c2ecf20Sopenharmony_ci bool 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciconfig HAVE_IMA_KEXEC 258c2ecf20Sopenharmony_ci bool 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciconfig SET_FS 288c2ecf20Sopenharmony_ci bool 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciconfig HOTPLUG_SMT 318c2ecf20Sopenharmony_ci bool 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ciconfig GENERIC_ENTRY 348c2ecf20Sopenharmony_ci bool 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ciconfig OPROFILE 378c2ecf20Sopenharmony_ci tristate "OProfile system profiling" 388c2ecf20Sopenharmony_ci depends on PROFILING 398c2ecf20Sopenharmony_ci depends on HAVE_OPROFILE 408c2ecf20Sopenharmony_ci select RING_BUFFER 418c2ecf20Sopenharmony_ci select RING_BUFFER_ALLOW_SWAP 428c2ecf20Sopenharmony_ci help 438c2ecf20Sopenharmony_ci OProfile is a profiling system capable of profiling the 448c2ecf20Sopenharmony_ci whole system, include the kernel, kernel modules, libraries, 458c2ecf20Sopenharmony_ci and applications. 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci If unsure, say N. 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ciconfig OPROFILE_EVENT_MULTIPLEX 508c2ecf20Sopenharmony_ci bool "OProfile multiplexing support (EXPERIMENTAL)" 518c2ecf20Sopenharmony_ci default n 528c2ecf20Sopenharmony_ci depends on OPROFILE && X86 538c2ecf20Sopenharmony_ci help 548c2ecf20Sopenharmony_ci The number of hardware counters is limited. The multiplexing 558c2ecf20Sopenharmony_ci feature enables OProfile to gather more events than counters 568c2ecf20Sopenharmony_ci are provided by the hardware. This is realized by switching 578c2ecf20Sopenharmony_ci between events at a user specified time interval. 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci If unsure, say N. 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ciconfig HAVE_OPROFILE 628c2ecf20Sopenharmony_ci bool 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ciconfig OPROFILE_NMI_TIMER 658c2ecf20Sopenharmony_ci def_bool y 668c2ecf20Sopenharmony_ci depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ciconfig KPROBES 698c2ecf20Sopenharmony_ci bool "Kprobes" 708c2ecf20Sopenharmony_ci depends on MODULES 718c2ecf20Sopenharmony_ci depends on HAVE_KPROBES 728c2ecf20Sopenharmony_ci select KALLSYMS 738c2ecf20Sopenharmony_ci help 748c2ecf20Sopenharmony_ci Kprobes allows you to trap at almost any kernel address and 758c2ecf20Sopenharmony_ci execute a callback function. register_kprobe() establishes 768c2ecf20Sopenharmony_ci a probepoint and specifies the callback. Kprobes is useful 778c2ecf20Sopenharmony_ci for kernel debugging, non-intrusive instrumentation and testing. 788c2ecf20Sopenharmony_ci If in doubt, say "N". 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ciconfig JUMP_LABEL 818c2ecf20Sopenharmony_ci bool "Optimize very unlikely/likely branches" 828c2ecf20Sopenharmony_ci depends on HAVE_ARCH_JUMP_LABEL 838c2ecf20Sopenharmony_ci depends on CC_HAS_ASM_GOTO 848c2ecf20Sopenharmony_ci help 858c2ecf20Sopenharmony_ci This option enables a transparent branch optimization that 868c2ecf20Sopenharmony_ci makes certain almost-always-true or almost-always-false branch 878c2ecf20Sopenharmony_ci conditions even cheaper to execute within the kernel. 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci Certain performance-sensitive kernel code, such as trace points, 908c2ecf20Sopenharmony_ci scheduler functionality, networking code and KVM have such 918c2ecf20Sopenharmony_ci branches and include support for this optimization technique. 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci If it is detected that the compiler has support for "asm goto", 948c2ecf20Sopenharmony_ci the kernel will compile such branches with just a nop 958c2ecf20Sopenharmony_ci instruction. When the condition flag is toggled to true, the 968c2ecf20Sopenharmony_ci nop will be converted to a jump instruction to execute the 978c2ecf20Sopenharmony_ci conditional block of instructions. 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci This technique lowers overhead and stress on the branch prediction 1008c2ecf20Sopenharmony_ci of the processor and generally makes the kernel faster. The update 1018c2ecf20Sopenharmony_ci of the condition is slower, but those are always very rare. 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci ( On 32-bit x86, the necessary options added to the compiler 1048c2ecf20Sopenharmony_ci flags may increase the size of the kernel slightly. ) 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ciconfig STATIC_KEYS_SELFTEST 1078c2ecf20Sopenharmony_ci bool "Static key selftest" 1088c2ecf20Sopenharmony_ci depends on JUMP_LABEL 1098c2ecf20Sopenharmony_ci help 1108c2ecf20Sopenharmony_ci Boot time self-test of the branch patching code. 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ciconfig STATIC_CALL_SELFTEST 1138c2ecf20Sopenharmony_ci bool "Static call selftest" 1148c2ecf20Sopenharmony_ci depends on HAVE_STATIC_CALL 1158c2ecf20Sopenharmony_ci help 1168c2ecf20Sopenharmony_ci Boot time self-test of the call patching code. 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ciconfig OPTPROBES 1198c2ecf20Sopenharmony_ci def_bool y 1208c2ecf20Sopenharmony_ci depends on KPROBES && HAVE_OPTPROBES 1218c2ecf20Sopenharmony_ci select TASKS_RCU if PREEMPTION 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ciconfig KPROBES_ON_FTRACE 1248c2ecf20Sopenharmony_ci def_bool y 1258c2ecf20Sopenharmony_ci depends on KPROBES && HAVE_KPROBES_ON_FTRACE 1268c2ecf20Sopenharmony_ci depends on DYNAMIC_FTRACE_WITH_REGS 1278c2ecf20Sopenharmony_ci help 1288c2ecf20Sopenharmony_ci If function tracer is enabled and the arch supports full 1298c2ecf20Sopenharmony_ci passing of pt_regs to function tracing, then kprobes can 1308c2ecf20Sopenharmony_ci optimize on top of function tracing. 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ciconfig UPROBES 1338c2ecf20Sopenharmony_ci def_bool n 1348c2ecf20Sopenharmony_ci depends on ARCH_SUPPORTS_UPROBES 1358c2ecf20Sopenharmony_ci help 1368c2ecf20Sopenharmony_ci Uprobes is the user-space counterpart to kprobes: they 1378c2ecf20Sopenharmony_ci enable instrumentation applications (such as 'perf probe') 1388c2ecf20Sopenharmony_ci to establish unintrusive probes in user-space binaries and 1398c2ecf20Sopenharmony_ci libraries, by executing handler functions when the probes 1408c2ecf20Sopenharmony_ci are hit by user-space applications. 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci ( These probes come in the form of single-byte breakpoints, 1438c2ecf20Sopenharmony_ci managed by the kernel and kept transparent to the probed 1448c2ecf20Sopenharmony_ci application. ) 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ciconfig HAVE_64BIT_ALIGNED_ACCESS 1478c2ecf20Sopenharmony_ci def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS 1488c2ecf20Sopenharmony_ci help 1498c2ecf20Sopenharmony_ci Some architectures require 64 bit accesses to be 64 bit 1508c2ecf20Sopenharmony_ci aligned, which also requires structs containing 64 bit values 1518c2ecf20Sopenharmony_ci to be 64 bit aligned too. This includes some 32 bit 1528c2ecf20Sopenharmony_ci architectures which can do 64 bit accesses, as well as 64 bit 1538c2ecf20Sopenharmony_ci architectures without unaligned access. 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_ci This symbol should be selected by an architecture if 64 bit 1568c2ecf20Sopenharmony_ci accesses are required to be 64 bit aligned in this way even 1578c2ecf20Sopenharmony_ci though it is not a 64 bit architecture. 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ci See Documentation/unaligned-memory-access.txt for more 1608c2ecf20Sopenharmony_ci information on the topic of unaligned memory accesses. 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_ciconfig HAVE_EFFICIENT_UNALIGNED_ACCESS 1638c2ecf20Sopenharmony_ci bool 1648c2ecf20Sopenharmony_ci help 1658c2ecf20Sopenharmony_ci Some architectures are unable to perform unaligned accesses 1668c2ecf20Sopenharmony_ci without the use of get_unaligned/put_unaligned. Others are 1678c2ecf20Sopenharmony_ci unable to perform such accesses efficiently (e.g. trap on 1688c2ecf20Sopenharmony_ci unaligned access and require fixing it up in the exception 1698c2ecf20Sopenharmony_ci handler.) 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci This symbol should be selected by an architecture if it can 1728c2ecf20Sopenharmony_ci perform unaligned accesses efficiently to allow different 1738c2ecf20Sopenharmony_ci code paths to be selected for these cases. Some network 1748c2ecf20Sopenharmony_ci drivers, for example, could opt to not fix up alignment 1758c2ecf20Sopenharmony_ci problems with received packets if doing so would not help 1768c2ecf20Sopenharmony_ci much. 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ci See Documentation/core-api/unaligned-memory-access.rst for more 1798c2ecf20Sopenharmony_ci information on the topic of unaligned memory accesses. 1808c2ecf20Sopenharmony_ci 1818c2ecf20Sopenharmony_ciconfig ARCH_USE_BUILTIN_BSWAP 1828c2ecf20Sopenharmony_ci bool 1838c2ecf20Sopenharmony_ci help 1848c2ecf20Sopenharmony_ci Modern versions of GCC (since 4.4) have builtin functions 1858c2ecf20Sopenharmony_ci for handling byte-swapping. Using these, instead of the old 1868c2ecf20Sopenharmony_ci inline assembler that the architecture code provides in the 1878c2ecf20Sopenharmony_ci __arch_bswapXX() macros, allows the compiler to see what's 1888c2ecf20Sopenharmony_ci happening and offers more opportunity for optimisation. In 1898c2ecf20Sopenharmony_ci particular, the compiler will be able to combine the byteswap 1908c2ecf20Sopenharmony_ci with a nearby load or store and use load-and-swap or 1918c2ecf20Sopenharmony_ci store-and-swap instructions if the architecture has them. It 1928c2ecf20Sopenharmony_ci should almost *never* result in code which is worse than the 1938c2ecf20Sopenharmony_ci hand-coded assembler in <asm/swab.h>. But just in case it 1948c2ecf20Sopenharmony_ci does, the use of the builtins is optional. 1958c2ecf20Sopenharmony_ci 1968c2ecf20Sopenharmony_ci Any architecture with load-and-swap or store-and-swap 1978c2ecf20Sopenharmony_ci instructions should set this. And it shouldn't hurt to set it 1988c2ecf20Sopenharmony_ci on architectures that don't have such instructions. 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ciconfig KRETPROBES 2018c2ecf20Sopenharmony_ci def_bool y 2028c2ecf20Sopenharmony_ci depends on KPROBES && HAVE_KRETPROBES 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ciconfig USER_RETURN_NOTIFIER 2058c2ecf20Sopenharmony_ci bool 2068c2ecf20Sopenharmony_ci depends on HAVE_USER_RETURN_NOTIFIER 2078c2ecf20Sopenharmony_ci help 2088c2ecf20Sopenharmony_ci Provide a kernel-internal notification when a cpu is about to 2098c2ecf20Sopenharmony_ci switch to user mode. 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ciconfig HAVE_IOREMAP_PROT 2128c2ecf20Sopenharmony_ci bool 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ciconfig HAVE_KPROBES 2158c2ecf20Sopenharmony_ci bool 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_ciconfig HAVE_KRETPROBES 2188c2ecf20Sopenharmony_ci bool 2198c2ecf20Sopenharmony_ci 2208c2ecf20Sopenharmony_ciconfig HAVE_OPTPROBES 2218c2ecf20Sopenharmony_ci bool 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ciconfig HAVE_KPROBES_ON_FTRACE 2248c2ecf20Sopenharmony_ci bool 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ciconfig HAVE_FUNCTION_ERROR_INJECTION 2278c2ecf20Sopenharmony_ci bool 2288c2ecf20Sopenharmony_ci 2298c2ecf20Sopenharmony_ciconfig HAVE_NMI 2308c2ecf20Sopenharmony_ci bool 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci# 2338c2ecf20Sopenharmony_ci# An arch should select this if it provides all these things: 2348c2ecf20Sopenharmony_ci# 2358c2ecf20Sopenharmony_ci# task_pt_regs() in asm/processor.h or asm/ptrace.h 2368c2ecf20Sopenharmony_ci# arch_has_single_step() if there is hardware single-step support 2378c2ecf20Sopenharmony_ci# arch_has_block_step() if there is hardware block-step support 2388c2ecf20Sopenharmony_ci# asm/syscall.h supplying asm-generic/syscall.h interface 2398c2ecf20Sopenharmony_ci# linux/regset.h user_regset interfaces 2408c2ecf20Sopenharmony_ci# CORE_DUMP_USE_REGSET #define'd in linux/elf.h 2418c2ecf20Sopenharmony_ci# TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit} 2428c2ecf20Sopenharmony_ci# TIF_NOTIFY_RESUME calls tracehook_notify_resume() 2438c2ecf20Sopenharmony_ci# signal delivery calls tracehook_signal_handler() 2448c2ecf20Sopenharmony_ci# 2458c2ecf20Sopenharmony_ciconfig HAVE_ARCH_TRACEHOOK 2468c2ecf20Sopenharmony_ci bool 2478c2ecf20Sopenharmony_ci 2488c2ecf20Sopenharmony_ciconfig HAVE_DMA_CONTIGUOUS 2498c2ecf20Sopenharmony_ci bool 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_ciconfig GENERIC_SMP_IDLE_THREAD 2528c2ecf20Sopenharmony_ci bool 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ciconfig GENERIC_IDLE_POLL_SETUP 2558c2ecf20Sopenharmony_ci bool 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ciconfig ARCH_HAS_FORTIFY_SOURCE 2588c2ecf20Sopenharmony_ci bool 2598c2ecf20Sopenharmony_ci help 2608c2ecf20Sopenharmony_ci An architecture should select this when it can successfully 2618c2ecf20Sopenharmony_ci build and run with CONFIG_FORTIFY_SOURCE. 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_ci# 2648c2ecf20Sopenharmony_ci# Select if the arch provides a historic keepinit alias for the retain_initrd 2658c2ecf20Sopenharmony_ci# command line option 2668c2ecf20Sopenharmony_ci# 2678c2ecf20Sopenharmony_ciconfig ARCH_HAS_KEEPINITRD 2688c2ecf20Sopenharmony_ci bool 2698c2ecf20Sopenharmony_ci 2708c2ecf20Sopenharmony_ci# Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h 2718c2ecf20Sopenharmony_ciconfig ARCH_HAS_SET_MEMORY 2728c2ecf20Sopenharmony_ci bool 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_ci# Select if arch has all set_direct_map_invalid/default() functions 2758c2ecf20Sopenharmony_ciconfig ARCH_HAS_SET_DIRECT_MAP 2768c2ecf20Sopenharmony_ci bool 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_ci# 2798c2ecf20Sopenharmony_ci# Select if the architecture provides the arch_dma_set_uncached symbol to 2808c2ecf20Sopenharmony_ci# either provide an uncached segement alias for a DMA allocation, or 2818c2ecf20Sopenharmony_ci# to remap the page tables in place. 2828c2ecf20Sopenharmony_ci# 2838c2ecf20Sopenharmony_ciconfig ARCH_HAS_DMA_SET_UNCACHED 2848c2ecf20Sopenharmony_ci bool 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ci# 2878c2ecf20Sopenharmony_ci# Select if the architectures provides the arch_dma_clear_uncached symbol 2888c2ecf20Sopenharmony_ci# to undo an in-place page table remap for uncached access. 2898c2ecf20Sopenharmony_ci# 2908c2ecf20Sopenharmony_ciconfig ARCH_HAS_DMA_CLEAR_UNCACHED 2918c2ecf20Sopenharmony_ci bool 2928c2ecf20Sopenharmony_ci 2938c2ecf20Sopenharmony_ciconfig ARCH_HAS_CPU_FINALIZE_INIT 2948c2ecf20Sopenharmony_ci bool 2958c2ecf20Sopenharmony_ci 2968c2ecf20Sopenharmony_ci# Select if arch init_task must go in the __init_task_data section 2978c2ecf20Sopenharmony_ciconfig ARCH_TASK_STRUCT_ON_STACK 2988c2ecf20Sopenharmony_ci bool 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_ci# Select if arch has its private alloc_task_struct() function 3018c2ecf20Sopenharmony_ciconfig ARCH_TASK_STRUCT_ALLOCATOR 3028c2ecf20Sopenharmony_ci bool 3038c2ecf20Sopenharmony_ci 3048c2ecf20Sopenharmony_ciconfig HAVE_ARCH_THREAD_STRUCT_WHITELIST 3058c2ecf20Sopenharmony_ci bool 3068c2ecf20Sopenharmony_ci depends on !ARCH_TASK_STRUCT_ALLOCATOR 3078c2ecf20Sopenharmony_ci help 3088c2ecf20Sopenharmony_ci An architecture should select this to provide hardened usercopy 3098c2ecf20Sopenharmony_ci knowledge about what region of the thread_struct should be 3108c2ecf20Sopenharmony_ci whitelisted for copying to userspace. Normally this is only the 3118c2ecf20Sopenharmony_ci FPU registers. Specifically, arch_thread_struct_whitelist() 3128c2ecf20Sopenharmony_ci should be implemented. Without this, the entire thread_struct 3138c2ecf20Sopenharmony_ci field in task_struct will be left whitelisted. 3148c2ecf20Sopenharmony_ci 3158c2ecf20Sopenharmony_ci# Select if arch has its private alloc_thread_stack() function 3168c2ecf20Sopenharmony_ciconfig ARCH_THREAD_STACK_ALLOCATOR 3178c2ecf20Sopenharmony_ci bool 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ci# Select if arch wants to size task_struct dynamically via arch_task_struct_size: 3208c2ecf20Sopenharmony_ciconfig ARCH_WANTS_DYNAMIC_TASK_STRUCT 3218c2ecf20Sopenharmony_ci bool 3228c2ecf20Sopenharmony_ci 3238c2ecf20Sopenharmony_ciconfig ARCH_32BIT_OFF_T 3248c2ecf20Sopenharmony_ci bool 3258c2ecf20Sopenharmony_ci depends on !64BIT 3268c2ecf20Sopenharmony_ci help 3278c2ecf20Sopenharmony_ci All new 32-bit architectures should have 64-bit off_t type on 3288c2ecf20Sopenharmony_ci userspace side which corresponds to the loff_t kernel type. This 3298c2ecf20Sopenharmony_ci is the requirement for modern ABIs. Some existing architectures 3308c2ecf20Sopenharmony_ci still support 32-bit off_t. This option is enabled for all such 3318c2ecf20Sopenharmony_ci architectures explicitly. 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ciconfig HAVE_ASM_MODVERSIONS 3348c2ecf20Sopenharmony_ci bool 3358c2ecf20Sopenharmony_ci help 3368c2ecf20Sopenharmony_ci This symbol should be selected by an architecure if it provides 3378c2ecf20Sopenharmony_ci <asm/asm-prototypes.h> to support the module versioning for symbols 3388c2ecf20Sopenharmony_ci exported from assembly code. 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ciconfig HAVE_REGS_AND_STACK_ACCESS_API 3418c2ecf20Sopenharmony_ci bool 3428c2ecf20Sopenharmony_ci help 3438c2ecf20Sopenharmony_ci This symbol should be selected by an architecure if it supports 3448c2ecf20Sopenharmony_ci the API needed to access registers and stack entries from pt_regs, 3458c2ecf20Sopenharmony_ci declared in asm/ptrace.h 3468c2ecf20Sopenharmony_ci For example the kprobes-based event tracer needs this API. 3478c2ecf20Sopenharmony_ci 3488c2ecf20Sopenharmony_ciconfig HAVE_RSEQ 3498c2ecf20Sopenharmony_ci bool 3508c2ecf20Sopenharmony_ci depends on HAVE_REGS_AND_STACK_ACCESS_API 3518c2ecf20Sopenharmony_ci help 3528c2ecf20Sopenharmony_ci This symbol should be selected by an architecture if it 3538c2ecf20Sopenharmony_ci supports an implementation of restartable sequences. 3548c2ecf20Sopenharmony_ci 3558c2ecf20Sopenharmony_ciconfig HAVE_FUNCTION_ARG_ACCESS_API 3568c2ecf20Sopenharmony_ci bool 3578c2ecf20Sopenharmony_ci help 3588c2ecf20Sopenharmony_ci This symbol should be selected by an architecure if it supports 3598c2ecf20Sopenharmony_ci the API needed to access function arguments from pt_regs, 3608c2ecf20Sopenharmony_ci declared in asm/ptrace.h 3618c2ecf20Sopenharmony_ci 3628c2ecf20Sopenharmony_ciconfig HAVE_HW_BREAKPOINT 3638c2ecf20Sopenharmony_ci bool 3648c2ecf20Sopenharmony_ci depends on PERF_EVENTS 3658c2ecf20Sopenharmony_ci 3668c2ecf20Sopenharmony_ciconfig HAVE_MIXED_BREAKPOINTS_REGS 3678c2ecf20Sopenharmony_ci bool 3688c2ecf20Sopenharmony_ci depends on HAVE_HW_BREAKPOINT 3698c2ecf20Sopenharmony_ci help 3708c2ecf20Sopenharmony_ci Depending on the arch implementation of hardware breakpoints, 3718c2ecf20Sopenharmony_ci some of them have separate registers for data and instruction 3728c2ecf20Sopenharmony_ci breakpoints addresses, others have mixed registers to store 3738c2ecf20Sopenharmony_ci them but define the access type in a control register. 3748c2ecf20Sopenharmony_ci Select this option if your arch implements breakpoints under the 3758c2ecf20Sopenharmony_ci latter fashion. 3768c2ecf20Sopenharmony_ci 3778c2ecf20Sopenharmony_ciconfig HAVE_USER_RETURN_NOTIFIER 3788c2ecf20Sopenharmony_ci bool 3798c2ecf20Sopenharmony_ci 3808c2ecf20Sopenharmony_ciconfig HAVE_PERF_EVENTS_NMI 3818c2ecf20Sopenharmony_ci bool 3828c2ecf20Sopenharmony_ci help 3838c2ecf20Sopenharmony_ci System hardware can generate an NMI using the perf event 3848c2ecf20Sopenharmony_ci subsystem. Also has support for calculating CPU cycle events 3858c2ecf20Sopenharmony_ci to determine how many clock cycles in a given period. 3868c2ecf20Sopenharmony_ci 3878c2ecf20Sopenharmony_ciconfig HAVE_HARDLOCKUP_DETECTOR_PERF 3888c2ecf20Sopenharmony_ci bool 3898c2ecf20Sopenharmony_ci depends on HAVE_PERF_EVENTS_NMI 3908c2ecf20Sopenharmony_ci help 3918c2ecf20Sopenharmony_ci The arch chooses to use the generic perf-NMI-based hardlockup 3928c2ecf20Sopenharmony_ci detector. Must define HAVE_PERF_EVENTS_NMI. 3938c2ecf20Sopenharmony_ci 3948c2ecf20Sopenharmony_ciconfig HAVE_NMI_WATCHDOG 3958c2ecf20Sopenharmony_ci depends on HAVE_NMI 3968c2ecf20Sopenharmony_ci bool 3978c2ecf20Sopenharmony_ci help 3988c2ecf20Sopenharmony_ci The arch provides a low level NMI watchdog. It provides 3998c2ecf20Sopenharmony_ci asm/nmi.h, and defines its own arch_touch_nmi_watchdog(). 4008c2ecf20Sopenharmony_ci 4018c2ecf20Sopenharmony_ciconfig HAVE_HARDLOCKUP_DETECTOR_ARCH 4028c2ecf20Sopenharmony_ci bool 4038c2ecf20Sopenharmony_ci select HAVE_NMI_WATCHDOG 4048c2ecf20Sopenharmony_ci help 4058c2ecf20Sopenharmony_ci The arch chooses to provide its own hardlockup detector, which is 4068c2ecf20Sopenharmony_ci a superset of the HAVE_NMI_WATCHDOG. It also conforms to config 4078c2ecf20Sopenharmony_ci interfaces and parameters provided by hardlockup detector subsystem. 4088c2ecf20Sopenharmony_ci 4098c2ecf20Sopenharmony_ciconfig HAVE_PERF_REGS 4108c2ecf20Sopenharmony_ci bool 4118c2ecf20Sopenharmony_ci help 4128c2ecf20Sopenharmony_ci Support selective register dumps for perf events. This includes 4138c2ecf20Sopenharmony_ci bit-mapping of each registers and a unique architecture id. 4148c2ecf20Sopenharmony_ci 4158c2ecf20Sopenharmony_ciconfig HAVE_PERF_USER_STACK_DUMP 4168c2ecf20Sopenharmony_ci bool 4178c2ecf20Sopenharmony_ci help 4188c2ecf20Sopenharmony_ci Support user stack dumps for perf event samples. This needs 4198c2ecf20Sopenharmony_ci access to the user stack pointer which is not unified across 4208c2ecf20Sopenharmony_ci architectures. 4218c2ecf20Sopenharmony_ci 4228c2ecf20Sopenharmony_ciconfig HAVE_ARCH_JUMP_LABEL 4238c2ecf20Sopenharmony_ci bool 4248c2ecf20Sopenharmony_ci 4258c2ecf20Sopenharmony_ciconfig HAVE_ARCH_JUMP_LABEL_RELATIVE 4268c2ecf20Sopenharmony_ci bool 4278c2ecf20Sopenharmony_ci 4288c2ecf20Sopenharmony_ciconfig MMU_GATHER_TABLE_FREE 4298c2ecf20Sopenharmony_ci bool 4308c2ecf20Sopenharmony_ci 4318c2ecf20Sopenharmony_ciconfig MMU_GATHER_RCU_TABLE_FREE 4328c2ecf20Sopenharmony_ci bool 4338c2ecf20Sopenharmony_ci select MMU_GATHER_TABLE_FREE 4348c2ecf20Sopenharmony_ci 4358c2ecf20Sopenharmony_ciconfig MMU_GATHER_PAGE_SIZE 4368c2ecf20Sopenharmony_ci bool 4378c2ecf20Sopenharmony_ci 4388c2ecf20Sopenharmony_ciconfig MMU_GATHER_NO_RANGE 4398c2ecf20Sopenharmony_ci bool 4408c2ecf20Sopenharmony_ci 4418c2ecf20Sopenharmony_ciconfig MMU_GATHER_NO_GATHER 4428c2ecf20Sopenharmony_ci bool 4438c2ecf20Sopenharmony_ci depends on MMU_GATHER_TABLE_FREE 4448c2ecf20Sopenharmony_ci 4458c2ecf20Sopenharmony_ciconfig ARCH_WANT_IRQS_OFF_ACTIVATE_MM 4468c2ecf20Sopenharmony_ci bool 4478c2ecf20Sopenharmony_ci help 4488c2ecf20Sopenharmony_ci Temporary select until all architectures can be converted to have 4498c2ecf20Sopenharmony_ci irqs disabled over activate_mm. Architectures that do IPI based TLB 4508c2ecf20Sopenharmony_ci shootdowns should enable this. 4518c2ecf20Sopenharmony_ci 4528c2ecf20Sopenharmony_ciconfig ARCH_HAVE_NMI_SAFE_CMPXCHG 4538c2ecf20Sopenharmony_ci bool 4548c2ecf20Sopenharmony_ci 4558c2ecf20Sopenharmony_ciconfig HAVE_ALIGNED_STRUCT_PAGE 4568c2ecf20Sopenharmony_ci bool 4578c2ecf20Sopenharmony_ci help 4588c2ecf20Sopenharmony_ci This makes sure that struct pages are double word aligned and that 4598c2ecf20Sopenharmony_ci e.g. the SLUB allocator can perform double word atomic operations 4608c2ecf20Sopenharmony_ci on a struct page for better performance. However selecting this 4618c2ecf20Sopenharmony_ci might increase the size of a struct page by a word. 4628c2ecf20Sopenharmony_ci 4638c2ecf20Sopenharmony_ciconfig HAVE_CMPXCHG_LOCAL 4648c2ecf20Sopenharmony_ci bool 4658c2ecf20Sopenharmony_ci 4668c2ecf20Sopenharmony_ciconfig HAVE_CMPXCHG_DOUBLE 4678c2ecf20Sopenharmony_ci bool 4688c2ecf20Sopenharmony_ci 4698c2ecf20Sopenharmony_ciconfig ARCH_WEAK_RELEASE_ACQUIRE 4708c2ecf20Sopenharmony_ci bool 4718c2ecf20Sopenharmony_ci 4728c2ecf20Sopenharmony_ciconfig ARCH_WANT_IPC_PARSE_VERSION 4738c2ecf20Sopenharmony_ci bool 4748c2ecf20Sopenharmony_ci 4758c2ecf20Sopenharmony_ciconfig ARCH_WANT_COMPAT_IPC_PARSE_VERSION 4768c2ecf20Sopenharmony_ci bool 4778c2ecf20Sopenharmony_ci 4788c2ecf20Sopenharmony_ciconfig ARCH_WANT_OLD_COMPAT_IPC 4798c2ecf20Sopenharmony_ci select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 4808c2ecf20Sopenharmony_ci bool 4818c2ecf20Sopenharmony_ci 4828c2ecf20Sopenharmony_ciconfig HAVE_ARCH_SECCOMP 4838c2ecf20Sopenharmony_ci bool 4848c2ecf20Sopenharmony_ci help 4858c2ecf20Sopenharmony_ci An arch should select this symbol to support seccomp mode 1 (the fixed 4868c2ecf20Sopenharmony_ci syscall policy), and must provide an overrides for __NR_seccomp_sigreturn, 4878c2ecf20Sopenharmony_ci and compat syscalls if the asm-generic/seccomp.h defaults need adjustment: 4888c2ecf20Sopenharmony_ci - __NR_seccomp_read_32 4898c2ecf20Sopenharmony_ci - __NR_seccomp_write_32 4908c2ecf20Sopenharmony_ci - __NR_seccomp_exit_32 4918c2ecf20Sopenharmony_ci - __NR_seccomp_sigreturn_32 4928c2ecf20Sopenharmony_ci 4938c2ecf20Sopenharmony_ciconfig HAVE_ARCH_SECCOMP_FILTER 4948c2ecf20Sopenharmony_ci bool 4958c2ecf20Sopenharmony_ci select HAVE_ARCH_SECCOMP 4968c2ecf20Sopenharmony_ci help 4978c2ecf20Sopenharmony_ci An arch should select this symbol if it provides all of these things: 4988c2ecf20Sopenharmony_ci - all the requirements for HAVE_ARCH_SECCOMP 4998c2ecf20Sopenharmony_ci - syscall_get_arch() 5008c2ecf20Sopenharmony_ci - syscall_get_arguments() 5018c2ecf20Sopenharmony_ci - syscall_rollback() 5028c2ecf20Sopenharmony_ci - syscall_set_return_value() 5038c2ecf20Sopenharmony_ci - SIGSYS siginfo_t support 5048c2ecf20Sopenharmony_ci - secure_computing is called from a ptrace_event()-safe context 5058c2ecf20Sopenharmony_ci - secure_computing return value is checked and a return value of -1 5068c2ecf20Sopenharmony_ci results in the system call being skipped immediately. 5078c2ecf20Sopenharmony_ci - seccomp syscall wired up 5088c2ecf20Sopenharmony_ci 5098c2ecf20Sopenharmony_ciconfig SECCOMP 5108c2ecf20Sopenharmony_ci prompt "Enable seccomp to safely execute untrusted bytecode" 5118c2ecf20Sopenharmony_ci def_bool y 5128c2ecf20Sopenharmony_ci depends on HAVE_ARCH_SECCOMP 5138c2ecf20Sopenharmony_ci help 5148c2ecf20Sopenharmony_ci This kernel feature is useful for number crunching applications 5158c2ecf20Sopenharmony_ci that may need to handle untrusted bytecode during their 5168c2ecf20Sopenharmony_ci execution. By using pipes or other transports made available 5178c2ecf20Sopenharmony_ci to the process as file descriptors supporting the read/write 5188c2ecf20Sopenharmony_ci syscalls, it's possible to isolate those applications in their 5198c2ecf20Sopenharmony_ci own address space using seccomp. Once seccomp is enabled via 5208c2ecf20Sopenharmony_ci prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be 5218c2ecf20Sopenharmony_ci disabled and the task is only allowed to execute a few safe 5228c2ecf20Sopenharmony_ci syscalls defined by each seccomp mode. 5238c2ecf20Sopenharmony_ci 5248c2ecf20Sopenharmony_ci If unsure, say Y. 5258c2ecf20Sopenharmony_ci 5268c2ecf20Sopenharmony_ciconfig SECCOMP_FILTER 5278c2ecf20Sopenharmony_ci def_bool y 5288c2ecf20Sopenharmony_ci depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET 5298c2ecf20Sopenharmony_ci help 5308c2ecf20Sopenharmony_ci Enable tasks to build secure computing environments defined 5318c2ecf20Sopenharmony_ci in terms of Berkeley Packet Filter programs which implement 5328c2ecf20Sopenharmony_ci task-defined system call filtering polices. 5338c2ecf20Sopenharmony_ci 5348c2ecf20Sopenharmony_ci See Documentation/userspace-api/seccomp_filter.rst for details. 5358c2ecf20Sopenharmony_ci 5368c2ecf20Sopenharmony_ciconfig HAVE_ARCH_STACKLEAK 5378c2ecf20Sopenharmony_ci bool 5388c2ecf20Sopenharmony_ci help 5398c2ecf20Sopenharmony_ci An architecture should select this if it has the code which 5408c2ecf20Sopenharmony_ci fills the used part of the kernel stack with the STACKLEAK_POISON 5418c2ecf20Sopenharmony_ci value before returning from system calls. 5428c2ecf20Sopenharmony_ci 5438c2ecf20Sopenharmony_ciconfig HAVE_STACKPROTECTOR 5448c2ecf20Sopenharmony_ci bool 5458c2ecf20Sopenharmony_ci help 5468c2ecf20Sopenharmony_ci An arch should select this symbol if: 5478c2ecf20Sopenharmony_ci - it has implemented a stack canary (e.g. __stack_chk_guard) 5488c2ecf20Sopenharmony_ci 5498c2ecf20Sopenharmony_ciconfig STACKPROTECTOR 5508c2ecf20Sopenharmony_ci bool "Stack Protector buffer overflow detection" 5518c2ecf20Sopenharmony_ci depends on HAVE_STACKPROTECTOR 5528c2ecf20Sopenharmony_ci depends on $(cc-option,-fstack-protector) 5538c2ecf20Sopenharmony_ci default y 5548c2ecf20Sopenharmony_ci help 5558c2ecf20Sopenharmony_ci This option turns on the "stack-protector" GCC feature. This 5568c2ecf20Sopenharmony_ci feature puts, at the beginning of functions, a canary value on 5578c2ecf20Sopenharmony_ci the stack just before the return address, and validates 5588c2ecf20Sopenharmony_ci the value just before actually returning. Stack based buffer 5598c2ecf20Sopenharmony_ci overflows (that need to overwrite this return address) now also 5608c2ecf20Sopenharmony_ci overwrite the canary, which gets detected and the attack is then 5618c2ecf20Sopenharmony_ci neutralized via a kernel panic. 5628c2ecf20Sopenharmony_ci 5638c2ecf20Sopenharmony_ci Functions will have the stack-protector canary logic added if they 5648c2ecf20Sopenharmony_ci have an 8-byte or larger character array on the stack. 5658c2ecf20Sopenharmony_ci 5668c2ecf20Sopenharmony_ci This feature requires gcc version 4.2 or above, or a distribution 5678c2ecf20Sopenharmony_ci gcc with the feature backported ("-fstack-protector"). 5688c2ecf20Sopenharmony_ci 5698c2ecf20Sopenharmony_ci On an x86 "defconfig" build, this feature adds canary checks to 5708c2ecf20Sopenharmony_ci about 3% of all kernel functions, which increases kernel code size 5718c2ecf20Sopenharmony_ci by about 0.3%. 5728c2ecf20Sopenharmony_ci 5738c2ecf20Sopenharmony_ciconfig STACKPROTECTOR_STRONG 5748c2ecf20Sopenharmony_ci bool "Strong Stack Protector" 5758c2ecf20Sopenharmony_ci depends on STACKPROTECTOR 5768c2ecf20Sopenharmony_ci depends on $(cc-option,-fstack-protector-strong) 5778c2ecf20Sopenharmony_ci default y 5788c2ecf20Sopenharmony_ci help 5798c2ecf20Sopenharmony_ci Functions will have the stack-protector canary logic added in any 5808c2ecf20Sopenharmony_ci of the following conditions: 5818c2ecf20Sopenharmony_ci 5828c2ecf20Sopenharmony_ci - local variable's address used as part of the right hand side of an 5838c2ecf20Sopenharmony_ci assignment or function argument 5848c2ecf20Sopenharmony_ci - local variable is an array (or union containing an array), 5858c2ecf20Sopenharmony_ci regardless of array type or length 5868c2ecf20Sopenharmony_ci - uses register local variables 5878c2ecf20Sopenharmony_ci 5888c2ecf20Sopenharmony_ci This feature requires gcc version 4.9 or above, or a distribution 5898c2ecf20Sopenharmony_ci gcc with the feature backported ("-fstack-protector-strong"). 5908c2ecf20Sopenharmony_ci 5918c2ecf20Sopenharmony_ci On an x86 "defconfig" build, this feature adds canary checks to 5928c2ecf20Sopenharmony_ci about 20% of all kernel functions, which increases the kernel code 5938c2ecf20Sopenharmony_ci size by about 2%. 5948c2ecf20Sopenharmony_ci 5958c2ecf20Sopenharmony_ciconfig ARCH_SUPPORTS_SHADOW_CALL_STACK 5968c2ecf20Sopenharmony_ci bool 5978c2ecf20Sopenharmony_ci help 5988c2ecf20Sopenharmony_ci An architecture should select this if it supports Clang's Shadow 5998c2ecf20Sopenharmony_ci Call Stack and implements runtime support for shadow stack 6008c2ecf20Sopenharmony_ci switching. 6018c2ecf20Sopenharmony_ci 6028c2ecf20Sopenharmony_ciconfig SHADOW_CALL_STACK 6038c2ecf20Sopenharmony_ci bool "Clang Shadow Call Stack" 6048c2ecf20Sopenharmony_ci depends on CC_IS_CLANG && ARCH_SUPPORTS_SHADOW_CALL_STACK 6058c2ecf20Sopenharmony_ci depends on DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER 6068c2ecf20Sopenharmony_ci help 6078c2ecf20Sopenharmony_ci This option enables Clang's Shadow Call Stack, which uses a 6088c2ecf20Sopenharmony_ci shadow stack to protect function return addresses from being 6098c2ecf20Sopenharmony_ci overwritten by an attacker. More information can be found in 6108c2ecf20Sopenharmony_ci Clang's documentation: 6118c2ecf20Sopenharmony_ci 6128c2ecf20Sopenharmony_ci https://clang.llvm.org/docs/ShadowCallStack.html 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_ci Note that security guarantees in the kernel differ from the 6158c2ecf20Sopenharmony_ci ones documented for user space. The kernel must store addresses 6168c2ecf20Sopenharmony_ci of shadow stacks in memory, which means an attacker capable of 6178c2ecf20Sopenharmony_ci reading and writing arbitrary memory may be able to locate them 6188c2ecf20Sopenharmony_ci and hijack control flow by modifying the stacks. 6198c2ecf20Sopenharmony_ci 6208c2ecf20Sopenharmony_ciconfig LTO 6218c2ecf20Sopenharmony_ci bool 6228c2ecf20Sopenharmony_ci help 6238c2ecf20Sopenharmony_ci Selected if the kernel will be built using the compiler's LTO feature. 6248c2ecf20Sopenharmony_ci 6258c2ecf20Sopenharmony_ciconfig LTO_CLANG 6268c2ecf20Sopenharmony_ci bool 6278c2ecf20Sopenharmony_ci select LTO 6288c2ecf20Sopenharmony_ci help 6298c2ecf20Sopenharmony_ci Selected if the kernel will be built using Clang's LTO feature. 6308c2ecf20Sopenharmony_ci 6318c2ecf20Sopenharmony_ciconfig ARCH_SUPPORTS_LTO_CLANG 6328c2ecf20Sopenharmony_ci bool 6338c2ecf20Sopenharmony_ci help 6348c2ecf20Sopenharmony_ci An architecture should select this option if it supports: 6358c2ecf20Sopenharmony_ci - compiling with Clang, 6368c2ecf20Sopenharmony_ci - compiling inline assembly with Clang's integrated assembler, 6378c2ecf20Sopenharmony_ci - and linking with LLD. 6388c2ecf20Sopenharmony_ci 6398c2ecf20Sopenharmony_ciconfig ARCH_SUPPORTS_LTO_CLANG_THIN 6408c2ecf20Sopenharmony_ci bool 6418c2ecf20Sopenharmony_ci help 6428c2ecf20Sopenharmony_ci An architecture should select this option if it can support Clang's 6438c2ecf20Sopenharmony_ci ThinLTO mode. 6448c2ecf20Sopenharmony_ci 6458c2ecf20Sopenharmony_ciconfig HAS_LTO_CLANG 6468c2ecf20Sopenharmony_ci def_bool y 6478c2ecf20Sopenharmony_ci # Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510 6488c2ecf20Sopenharmony_ci depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD 6498c2ecf20Sopenharmony_ci depends on $(success,test $(LLVM_IAS) -eq 1) 6508c2ecf20Sopenharmony_ci depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) 6518c2ecf20Sopenharmony_ci depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) 6528c2ecf20Sopenharmony_ci depends on ARCH_SUPPORTS_LTO_CLANG 6538c2ecf20Sopenharmony_ci depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT 6548c2ecf20Sopenharmony_ci depends on !KASAN 6558c2ecf20Sopenharmony_ci depends on !GCOV_KERNEL 6568c2ecf20Sopenharmony_ci help 6578c2ecf20Sopenharmony_ci The compiler and Kconfig options support building with Clang's 6588c2ecf20Sopenharmony_ci LTO. 6598c2ecf20Sopenharmony_ci 6608c2ecf20Sopenharmony_cichoice 6618c2ecf20Sopenharmony_ci prompt "Link Time Optimization (LTO)" 6628c2ecf20Sopenharmony_ci default LTO_NONE 6638c2ecf20Sopenharmony_ci help 6648c2ecf20Sopenharmony_ci This option enables Link Time Optimization (LTO), which allows the 6658c2ecf20Sopenharmony_ci compiler to optimize binaries globally. 6668c2ecf20Sopenharmony_ci 6678c2ecf20Sopenharmony_ci If unsure, select LTO_NONE. Note that LTO is very resource-intensive 6688c2ecf20Sopenharmony_ci so it's disabled by default. 6698c2ecf20Sopenharmony_ci 6708c2ecf20Sopenharmony_ciconfig LTO_NONE 6718c2ecf20Sopenharmony_ci bool "None" 6728c2ecf20Sopenharmony_ci help 6738c2ecf20Sopenharmony_ci Build the kernel normally, without Link Time Optimization (LTO). 6748c2ecf20Sopenharmony_ci 6758c2ecf20Sopenharmony_ciconfig LTO_CLANG_FULL 6768c2ecf20Sopenharmony_ci bool "Clang Full LTO (EXPERIMENTAL)" 6778c2ecf20Sopenharmony_ci depends on HAS_LTO_CLANG 6788c2ecf20Sopenharmony_ci depends on !COMPILE_TEST 6798c2ecf20Sopenharmony_ci select LTO_CLANG 6808c2ecf20Sopenharmony_ci help 6818c2ecf20Sopenharmony_ci This option enables Clang's full Link Time Optimization (LTO), which 6828c2ecf20Sopenharmony_ci allows the compiler to optimize the kernel globally. If you enable 6838c2ecf20Sopenharmony_ci this option, the compiler generates LLVM bitcode instead of ELF 6848c2ecf20Sopenharmony_ci object files, and the actual compilation from bitcode happens at 6858c2ecf20Sopenharmony_ci the LTO link step, which may take several minutes depending on the 6868c2ecf20Sopenharmony_ci kernel configuration. More information can be found from LLVM's 6878c2ecf20Sopenharmony_ci documentation: 6888c2ecf20Sopenharmony_ci 6898c2ecf20Sopenharmony_ci https://llvm.org/docs/LinkTimeOptimization.html 6908c2ecf20Sopenharmony_ci 6918c2ecf20Sopenharmony_ci During link time, this option can use a large amount of RAM, and 6928c2ecf20Sopenharmony_ci may take much longer than the ThinLTO option. 6938c2ecf20Sopenharmony_ci 6948c2ecf20Sopenharmony_ciconfig LTO_CLANG_THIN 6958c2ecf20Sopenharmony_ci bool "Clang ThinLTO (EXPERIMENTAL)" 6968c2ecf20Sopenharmony_ci depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN 6978c2ecf20Sopenharmony_ci select LTO_CLANG 6988c2ecf20Sopenharmony_ci help 6998c2ecf20Sopenharmony_ci This option enables Clang's ThinLTO, which allows for parallel 7008c2ecf20Sopenharmony_ci optimization and faster incremental compiles compared to the 7018c2ecf20Sopenharmony_ci CONFIG_LTO_CLANG_FULL option. More information can be found 7028c2ecf20Sopenharmony_ci from Clang's documentation: 7038c2ecf20Sopenharmony_ci 7048c2ecf20Sopenharmony_ci https://clang.llvm.org/docs/ThinLTO.html 7058c2ecf20Sopenharmony_ci 7068c2ecf20Sopenharmony_ci If unsure, say Y. 7078c2ecf20Sopenharmony_ciendchoice 7088c2ecf20Sopenharmony_ci 7098c2ecf20Sopenharmony_ciconfig ARCH_SUPPORTS_CFI_CLANG 7108c2ecf20Sopenharmony_ci bool 7118c2ecf20Sopenharmony_ci help 7128c2ecf20Sopenharmony_ci An architecture should select this option if it can support Clang's 7138c2ecf20Sopenharmony_ci Control-Flow Integrity (CFI) checking. 7148c2ecf20Sopenharmony_ci 7158c2ecf20Sopenharmony_ciconfig CFI_CLANG 7168c2ecf20Sopenharmony_ci bool "Use Clang's Control Flow Integrity (CFI)" 7178c2ecf20Sopenharmony_ci depends on LTO_CLANG && ARCH_SUPPORTS_CFI_CLANG 7188c2ecf20Sopenharmony_ci # Clang >= 12: 7198c2ecf20Sopenharmony_ci # - https://bugs.llvm.org/show_bug.cgi?id=46258 7208c2ecf20Sopenharmony_ci # - https://bugs.llvm.org/show_bug.cgi?id=47479 7218c2ecf20Sopenharmony_ci depends on CLANG_VERSION >= 120000 7228c2ecf20Sopenharmony_ci select KALLSYMS 7238c2ecf20Sopenharmony_ci help 7248c2ecf20Sopenharmony_ci This option enables Clang’s forward-edge Control Flow Integrity 7258c2ecf20Sopenharmony_ci (CFI) checking, where the compiler injects a runtime check to each 7268c2ecf20Sopenharmony_ci indirect function call to ensure the target is a valid function with 7278c2ecf20Sopenharmony_ci the correct static type. This restricts possible call targets and 7288c2ecf20Sopenharmony_ci makes it more difficult for an attacker to exploit bugs that allow 7298c2ecf20Sopenharmony_ci the modification of stored function pointers. More information can be 7308c2ecf20Sopenharmony_ci found from Clang's documentation: 7318c2ecf20Sopenharmony_ci 7328c2ecf20Sopenharmony_ci https://clang.llvm.org/docs/ControlFlowIntegrity.html 7338c2ecf20Sopenharmony_ci 7348c2ecf20Sopenharmony_ciconfig CFI_CLANG_SHADOW 7358c2ecf20Sopenharmony_ci bool "Use CFI shadow to speed up cross-module checks" 7368c2ecf20Sopenharmony_ci default y 7378c2ecf20Sopenharmony_ci depends on CFI_CLANG && MODULES 7388c2ecf20Sopenharmony_ci help 7398c2ecf20Sopenharmony_ci If you select this option, the kernel builds a fast look-up table of 7408c2ecf20Sopenharmony_ci CFI check functions in loaded modules to reduce performance overhead. 7418c2ecf20Sopenharmony_ci 7428c2ecf20Sopenharmony_ci If unsure, say Y. 7438c2ecf20Sopenharmony_ci 7448c2ecf20Sopenharmony_ciconfig CFI_PERMISSIVE 7458c2ecf20Sopenharmony_ci bool "Use CFI in permissive mode" 7468c2ecf20Sopenharmony_ci depends on CFI_CLANG 7478c2ecf20Sopenharmony_ci help 7488c2ecf20Sopenharmony_ci When selected, Control Flow Integrity (CFI) violations result in a 7498c2ecf20Sopenharmony_ci warning instead of a kernel panic. This option should only be used 7508c2ecf20Sopenharmony_ci for finding indirect call type mismatches during development. 7518c2ecf20Sopenharmony_ci 7528c2ecf20Sopenharmony_ci If unsure, say N. 7538c2ecf20Sopenharmony_ci 7548c2ecf20Sopenharmony_ciconfig HAVE_ARCH_WITHIN_STACK_FRAMES 7558c2ecf20Sopenharmony_ci bool 7568c2ecf20Sopenharmony_ci help 7578c2ecf20Sopenharmony_ci An architecture should select this if it can walk the kernel stack 7588c2ecf20Sopenharmony_ci frames to determine if an object is part of either the arguments 7598c2ecf20Sopenharmony_ci or local variables (i.e. that it excludes saved return addresses, 7608c2ecf20Sopenharmony_ci and similar) by implementing an inline arch_within_stack_frames(), 7618c2ecf20Sopenharmony_ci which is used by CONFIG_HARDENED_USERCOPY. 7628c2ecf20Sopenharmony_ci 7638c2ecf20Sopenharmony_ciconfig HAVE_CONTEXT_TRACKING 7648c2ecf20Sopenharmony_ci bool 7658c2ecf20Sopenharmony_ci help 7668c2ecf20Sopenharmony_ci Provide kernel/user boundaries probes necessary for subsystems 7678c2ecf20Sopenharmony_ci that need it, such as userspace RCU extended quiescent state. 7688c2ecf20Sopenharmony_ci Syscalls need to be wrapped inside user_exit()-user_enter(), either 7698c2ecf20Sopenharmony_ci optimized behind static key or through the slow path using TIF_NOHZ 7708c2ecf20Sopenharmony_ci flag. Exceptions handlers must be wrapped as well. Irqs are already 7718c2ecf20Sopenharmony_ci protected inside rcu_irq_enter/rcu_irq_exit() but preemption or signal 7728c2ecf20Sopenharmony_ci handling on irq exit still need to be protected. 7738c2ecf20Sopenharmony_ci 7748c2ecf20Sopenharmony_ciconfig HAVE_TIF_NOHZ 7758c2ecf20Sopenharmony_ci bool 7768c2ecf20Sopenharmony_ci help 7778c2ecf20Sopenharmony_ci Arch relies on TIF_NOHZ and syscall slow path to implement context 7788c2ecf20Sopenharmony_ci tracking calls to user_enter()/user_exit(). 7798c2ecf20Sopenharmony_ci 7808c2ecf20Sopenharmony_ciconfig HAVE_VIRT_CPU_ACCOUNTING 7818c2ecf20Sopenharmony_ci bool 7828c2ecf20Sopenharmony_ci 7838c2ecf20Sopenharmony_ciconfig ARCH_HAS_SCALED_CPUTIME 7848c2ecf20Sopenharmony_ci bool 7858c2ecf20Sopenharmony_ci 7868c2ecf20Sopenharmony_ciconfig HAVE_VIRT_CPU_ACCOUNTING_GEN 7878c2ecf20Sopenharmony_ci bool 7888c2ecf20Sopenharmony_ci default y if 64BIT 7898c2ecf20Sopenharmony_ci help 7908c2ecf20Sopenharmony_ci With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. 7918c2ecf20Sopenharmony_ci Before enabling this option, arch code must be audited 7928c2ecf20Sopenharmony_ci to ensure there are no races in concurrent read/write of 7938c2ecf20Sopenharmony_ci cputime_t. For example, reading/writing 64-bit cputime_t on 7948c2ecf20Sopenharmony_ci some 32-bit arches may require multiple accesses, so proper 7958c2ecf20Sopenharmony_ci locking is needed to protect against concurrent accesses. 7968c2ecf20Sopenharmony_ci 7978c2ecf20Sopenharmony_ci 7988c2ecf20Sopenharmony_ciconfig HAVE_IRQ_TIME_ACCOUNTING 7998c2ecf20Sopenharmony_ci bool 8008c2ecf20Sopenharmony_ci help 8018c2ecf20Sopenharmony_ci Archs need to ensure they use a high enough resolution clock to 8028c2ecf20Sopenharmony_ci support irq time accounting and then call enable_sched_clock_irqtime(). 8038c2ecf20Sopenharmony_ci 8048c2ecf20Sopenharmony_ciconfig HAVE_MOVE_PMD 8058c2ecf20Sopenharmony_ci bool 8068c2ecf20Sopenharmony_ci help 8078c2ecf20Sopenharmony_ci Archs that select this are able to move page tables at the PMD level. 8088c2ecf20Sopenharmony_ci 8098c2ecf20Sopenharmony_ciconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE 8108c2ecf20Sopenharmony_ci bool 8118c2ecf20Sopenharmony_ci 8128c2ecf20Sopenharmony_ciconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 8138c2ecf20Sopenharmony_ci bool 8148c2ecf20Sopenharmony_ci 8158c2ecf20Sopenharmony_ciconfig HAVE_ARCH_HUGE_VMAP 8168c2ecf20Sopenharmony_ci bool 8178c2ecf20Sopenharmony_ci 8188c2ecf20Sopenharmony_ciconfig ARCH_WANT_HUGE_PMD_SHARE 8198c2ecf20Sopenharmony_ci bool 8208c2ecf20Sopenharmony_ci 8218c2ecf20Sopenharmony_ciconfig HAVE_ARCH_SOFT_DIRTY 8228c2ecf20Sopenharmony_ci bool 8238c2ecf20Sopenharmony_ci 8248c2ecf20Sopenharmony_ciconfig HAVE_MOD_ARCH_SPECIFIC 8258c2ecf20Sopenharmony_ci bool 8268c2ecf20Sopenharmony_ci help 8278c2ecf20Sopenharmony_ci The arch uses struct mod_arch_specific to store data. Many arches 8288c2ecf20Sopenharmony_ci just need a simple module loader without arch specific data - those 8298c2ecf20Sopenharmony_ci should not enable this. 8308c2ecf20Sopenharmony_ci 8318c2ecf20Sopenharmony_ciconfig MODULES_USE_ELF_RELA 8328c2ecf20Sopenharmony_ci bool 8338c2ecf20Sopenharmony_ci help 8348c2ecf20Sopenharmony_ci Modules only use ELF RELA relocations. Modules with ELF REL 8358c2ecf20Sopenharmony_ci relocations will give an error. 8368c2ecf20Sopenharmony_ci 8378c2ecf20Sopenharmony_ciconfig MODULES_USE_ELF_REL 8388c2ecf20Sopenharmony_ci bool 8398c2ecf20Sopenharmony_ci help 8408c2ecf20Sopenharmony_ci Modules only use ELF REL relocations. Modules with ELF RELA 8418c2ecf20Sopenharmony_ci relocations will give an error. 8428c2ecf20Sopenharmony_ci 8438c2ecf20Sopenharmony_ciconfig HAVE_IRQ_EXIT_ON_IRQ_STACK 8448c2ecf20Sopenharmony_ci bool 8458c2ecf20Sopenharmony_ci help 8468c2ecf20Sopenharmony_ci Architecture doesn't only execute the irq handler on the irq stack 8478c2ecf20Sopenharmony_ci but also irq_exit(). This way we can process softirqs on this irq 8488c2ecf20Sopenharmony_ci stack instead of switching to a new one when we call __do_softirq() 8498c2ecf20Sopenharmony_ci in the end of an hardirq. 8508c2ecf20Sopenharmony_ci This spares a stack switch and improves cache usage on softirq 8518c2ecf20Sopenharmony_ci processing. 8528c2ecf20Sopenharmony_ci 8538c2ecf20Sopenharmony_ciconfig PGTABLE_LEVELS 8548c2ecf20Sopenharmony_ci int 8558c2ecf20Sopenharmony_ci default 2 8568c2ecf20Sopenharmony_ci 8578c2ecf20Sopenharmony_ciconfig ARCH_HAS_ELF_RANDOMIZE 8588c2ecf20Sopenharmony_ci bool 8598c2ecf20Sopenharmony_ci help 8608c2ecf20Sopenharmony_ci An architecture supports choosing randomized locations for 8618c2ecf20Sopenharmony_ci stack, mmap, brk, and ET_DYN. Defined functions: 8628c2ecf20Sopenharmony_ci - arch_mmap_rnd() 8638c2ecf20Sopenharmony_ci - arch_randomize_brk() 8648c2ecf20Sopenharmony_ci 8658c2ecf20Sopenharmony_ciconfig HAVE_ARCH_MMAP_RND_BITS 8668c2ecf20Sopenharmony_ci bool 8678c2ecf20Sopenharmony_ci help 8688c2ecf20Sopenharmony_ci An arch should select this symbol if it supports setting a variable 8698c2ecf20Sopenharmony_ci number of bits for use in establishing the base address for mmap 8708c2ecf20Sopenharmony_ci allocations, has MMU enabled and provides values for both: 8718c2ecf20Sopenharmony_ci - ARCH_MMAP_RND_BITS_MIN 8728c2ecf20Sopenharmony_ci - ARCH_MMAP_RND_BITS_MAX 8738c2ecf20Sopenharmony_ci 8748c2ecf20Sopenharmony_ciconfig HAVE_EXIT_THREAD 8758c2ecf20Sopenharmony_ci bool 8768c2ecf20Sopenharmony_ci help 8778c2ecf20Sopenharmony_ci An architecture implements exit_thread. 8788c2ecf20Sopenharmony_ci 8798c2ecf20Sopenharmony_ciconfig ARCH_MMAP_RND_BITS_MIN 8808c2ecf20Sopenharmony_ci int 8818c2ecf20Sopenharmony_ci 8828c2ecf20Sopenharmony_ciconfig ARCH_MMAP_RND_BITS_MAX 8838c2ecf20Sopenharmony_ci int 8848c2ecf20Sopenharmony_ci 8858c2ecf20Sopenharmony_ciconfig ARCH_MMAP_RND_BITS_DEFAULT 8868c2ecf20Sopenharmony_ci int 8878c2ecf20Sopenharmony_ci 8888c2ecf20Sopenharmony_ciconfig ARCH_MMAP_RND_BITS 8898c2ecf20Sopenharmony_ci int "Number of bits to use for ASLR of mmap base address" if EXPERT 8908c2ecf20Sopenharmony_ci range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX 8918c2ecf20Sopenharmony_ci default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT 8928c2ecf20Sopenharmony_ci default ARCH_MMAP_RND_BITS_MIN 8938c2ecf20Sopenharmony_ci depends on HAVE_ARCH_MMAP_RND_BITS 8948c2ecf20Sopenharmony_ci help 8958c2ecf20Sopenharmony_ci This value can be used to select the number of bits to use to 8968c2ecf20Sopenharmony_ci determine the random offset to the base address of vma regions 8978c2ecf20Sopenharmony_ci resulting from mmap allocations. This value will be bounded 8988c2ecf20Sopenharmony_ci by the architecture's minimum and maximum supported values. 8998c2ecf20Sopenharmony_ci 9008c2ecf20Sopenharmony_ci This value can be changed after boot using the 9018c2ecf20Sopenharmony_ci /proc/sys/vm/mmap_rnd_bits tunable 9028c2ecf20Sopenharmony_ci 9038c2ecf20Sopenharmony_ciconfig HAVE_ARCH_MMAP_RND_COMPAT_BITS 9048c2ecf20Sopenharmony_ci bool 9058c2ecf20Sopenharmony_ci help 9068c2ecf20Sopenharmony_ci An arch should select this symbol if it supports running applications 9078c2ecf20Sopenharmony_ci in compatibility mode, supports setting a variable number of bits for 9088c2ecf20Sopenharmony_ci use in establishing the base address for mmap allocations, has MMU 9098c2ecf20Sopenharmony_ci enabled and provides values for both: 9108c2ecf20Sopenharmony_ci - ARCH_MMAP_RND_COMPAT_BITS_MIN 9118c2ecf20Sopenharmony_ci - ARCH_MMAP_RND_COMPAT_BITS_MAX 9128c2ecf20Sopenharmony_ci 9138c2ecf20Sopenharmony_ciconfig ARCH_MMAP_RND_COMPAT_BITS_MIN 9148c2ecf20Sopenharmony_ci int 9158c2ecf20Sopenharmony_ci 9168c2ecf20Sopenharmony_ciconfig ARCH_MMAP_RND_COMPAT_BITS_MAX 9178c2ecf20Sopenharmony_ci int 9188c2ecf20Sopenharmony_ci 9198c2ecf20Sopenharmony_ciconfig ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 9208c2ecf20Sopenharmony_ci int 9218c2ecf20Sopenharmony_ci 9228c2ecf20Sopenharmony_ciconfig ARCH_MMAP_RND_COMPAT_BITS 9238c2ecf20Sopenharmony_ci int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT 9248c2ecf20Sopenharmony_ci range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX 9258c2ecf20Sopenharmony_ci default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 9268c2ecf20Sopenharmony_ci default ARCH_MMAP_RND_COMPAT_BITS_MIN 9278c2ecf20Sopenharmony_ci depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS 9288c2ecf20Sopenharmony_ci help 9298c2ecf20Sopenharmony_ci This value can be used to select the number of bits to use to 9308c2ecf20Sopenharmony_ci determine the random offset to the base address of vma regions 9318c2ecf20Sopenharmony_ci resulting from mmap allocations for compatible applications This 9328c2ecf20Sopenharmony_ci value will be bounded by the architecture's minimum and maximum 9338c2ecf20Sopenharmony_ci supported values. 9348c2ecf20Sopenharmony_ci 9358c2ecf20Sopenharmony_ci This value can be changed after boot using the 9368c2ecf20Sopenharmony_ci /proc/sys/vm/mmap_rnd_compat_bits tunable 9378c2ecf20Sopenharmony_ci 9388c2ecf20Sopenharmony_ciconfig HAVE_ARCH_COMPAT_MMAP_BASES 9398c2ecf20Sopenharmony_ci bool 9408c2ecf20Sopenharmony_ci help 9418c2ecf20Sopenharmony_ci This allows 64bit applications to invoke 32-bit mmap() syscall 9428c2ecf20Sopenharmony_ci and vice-versa 32-bit applications to call 64-bit mmap(). 9438c2ecf20Sopenharmony_ci Required for applications doing different bitness syscalls. 9448c2ecf20Sopenharmony_ci 9458c2ecf20Sopenharmony_ci# This allows to use a set of generic functions to determine mmap base 9468c2ecf20Sopenharmony_ci# address by giving priority to top-down scheme only if the process 9478c2ecf20Sopenharmony_ci# is not in legacy mode (compat task, unlimited stack size or 9488c2ecf20Sopenharmony_ci# sysctl_legacy_va_layout). 9498c2ecf20Sopenharmony_ci# Architecture that selects this option can provide its own version of: 9508c2ecf20Sopenharmony_ci# - STACK_RND_MASK 9518c2ecf20Sopenharmony_ciconfig ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 9528c2ecf20Sopenharmony_ci bool 9538c2ecf20Sopenharmony_ci depends on MMU 9548c2ecf20Sopenharmony_ci select ARCH_HAS_ELF_RANDOMIZE 9558c2ecf20Sopenharmony_ci 9568c2ecf20Sopenharmony_ciconfig HAVE_STACK_VALIDATION 9578c2ecf20Sopenharmony_ci bool 9588c2ecf20Sopenharmony_ci help 9598c2ecf20Sopenharmony_ci Architecture supports the 'objtool check' host tool command, which 9608c2ecf20Sopenharmony_ci performs compile-time stack metadata validation. 9618c2ecf20Sopenharmony_ci 9628c2ecf20Sopenharmony_ciconfig HAVE_RELIABLE_STACKTRACE 9638c2ecf20Sopenharmony_ci bool 9648c2ecf20Sopenharmony_ci help 9658c2ecf20Sopenharmony_ci Architecture has either save_stack_trace_tsk_reliable() or 9668c2ecf20Sopenharmony_ci arch_stack_walk_reliable() function which only returns a stack trace 9678c2ecf20Sopenharmony_ci if it can guarantee the trace is reliable. 9688c2ecf20Sopenharmony_ci 9698c2ecf20Sopenharmony_ciconfig HAVE_ARCH_HASH 9708c2ecf20Sopenharmony_ci bool 9718c2ecf20Sopenharmony_ci default n 9728c2ecf20Sopenharmony_ci help 9738c2ecf20Sopenharmony_ci If this is set, the architecture provides an <asm/hash.h> 9748c2ecf20Sopenharmony_ci file which provides platform-specific implementations of some 9758c2ecf20Sopenharmony_ci functions in <linux/hash.h> or fs/namei.c. 9768c2ecf20Sopenharmony_ci 9778c2ecf20Sopenharmony_ciconfig HAVE_ARCH_NVRAM_OPS 9788c2ecf20Sopenharmony_ci bool 9798c2ecf20Sopenharmony_ci 9808c2ecf20Sopenharmony_ciconfig ISA_BUS_API 9818c2ecf20Sopenharmony_ci def_bool ISA 9828c2ecf20Sopenharmony_ci 9838c2ecf20Sopenharmony_ci# 9848c2ecf20Sopenharmony_ci# ABI hall of shame 9858c2ecf20Sopenharmony_ci# 9868c2ecf20Sopenharmony_ciconfig CLONE_BACKWARDS 9878c2ecf20Sopenharmony_ci bool 9888c2ecf20Sopenharmony_ci help 9898c2ecf20Sopenharmony_ci Architecture has tls passed as the 4th argument of clone(2), 9908c2ecf20Sopenharmony_ci not the 5th one. 9918c2ecf20Sopenharmony_ci 9928c2ecf20Sopenharmony_ciconfig CLONE_BACKWARDS2 9938c2ecf20Sopenharmony_ci bool 9948c2ecf20Sopenharmony_ci help 9958c2ecf20Sopenharmony_ci Architecture has the first two arguments of clone(2) swapped. 9968c2ecf20Sopenharmony_ci 9978c2ecf20Sopenharmony_ciconfig CLONE_BACKWARDS3 9988c2ecf20Sopenharmony_ci bool 9998c2ecf20Sopenharmony_ci help 10008c2ecf20Sopenharmony_ci Architecture has tls passed as the 3rd argument of clone(2), 10018c2ecf20Sopenharmony_ci not the 5th one. 10028c2ecf20Sopenharmony_ci 10038c2ecf20Sopenharmony_ciconfig ODD_RT_SIGACTION 10048c2ecf20Sopenharmony_ci bool 10058c2ecf20Sopenharmony_ci help 10068c2ecf20Sopenharmony_ci Architecture has unusual rt_sigaction(2) arguments 10078c2ecf20Sopenharmony_ci 10088c2ecf20Sopenharmony_ciconfig OLD_SIGSUSPEND 10098c2ecf20Sopenharmony_ci bool 10108c2ecf20Sopenharmony_ci help 10118c2ecf20Sopenharmony_ci Architecture has old sigsuspend(2) syscall, of one-argument variety 10128c2ecf20Sopenharmony_ci 10138c2ecf20Sopenharmony_ciconfig OLD_SIGSUSPEND3 10148c2ecf20Sopenharmony_ci bool 10158c2ecf20Sopenharmony_ci help 10168c2ecf20Sopenharmony_ci Even weirder antique ABI - three-argument sigsuspend(2) 10178c2ecf20Sopenharmony_ci 10188c2ecf20Sopenharmony_ciconfig OLD_SIGACTION 10198c2ecf20Sopenharmony_ci bool 10208c2ecf20Sopenharmony_ci help 10218c2ecf20Sopenharmony_ci Architecture has old sigaction(2) syscall. Nope, not the same 10228c2ecf20Sopenharmony_ci as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2), 10238c2ecf20Sopenharmony_ci but fairly different variant of sigaction(2), thanks to OSF/1 10248c2ecf20Sopenharmony_ci compatibility... 10258c2ecf20Sopenharmony_ci 10268c2ecf20Sopenharmony_ciconfig COMPAT_OLD_SIGACTION 10278c2ecf20Sopenharmony_ci bool 10288c2ecf20Sopenharmony_ci 10298c2ecf20Sopenharmony_ciconfig COMPAT_32BIT_TIME 10308c2ecf20Sopenharmony_ci bool "Provide system calls for 32-bit time_t" 10318c2ecf20Sopenharmony_ci default !64BIT || COMPAT 10328c2ecf20Sopenharmony_ci help 10338c2ecf20Sopenharmony_ci This enables 32 bit time_t support in addition to 64 bit time_t support. 10348c2ecf20Sopenharmony_ci This is relevant on all 32-bit architectures, and 64-bit architectures 10358c2ecf20Sopenharmony_ci as part of compat syscall handling. 10368c2ecf20Sopenharmony_ci 10378c2ecf20Sopenharmony_ciconfig ARCH_NO_PREEMPT 10388c2ecf20Sopenharmony_ci bool 10398c2ecf20Sopenharmony_ci 10408c2ecf20Sopenharmony_ciconfig ARCH_SUPPORTS_RT 10418c2ecf20Sopenharmony_ci bool 10428c2ecf20Sopenharmony_ci 10438c2ecf20Sopenharmony_ciconfig CPU_NO_EFFICIENT_FFS 10448c2ecf20Sopenharmony_ci def_bool n 10458c2ecf20Sopenharmony_ci 10468c2ecf20Sopenharmony_ciconfig HAVE_ARCH_VMAP_STACK 10478c2ecf20Sopenharmony_ci def_bool n 10488c2ecf20Sopenharmony_ci help 10498c2ecf20Sopenharmony_ci An arch should select this symbol if it can support kernel stacks 10508c2ecf20Sopenharmony_ci in vmalloc space. This means: 10518c2ecf20Sopenharmony_ci 10528c2ecf20Sopenharmony_ci - vmalloc space must be large enough to hold many kernel stacks. 10538c2ecf20Sopenharmony_ci This may rule out many 32-bit architectures. 10548c2ecf20Sopenharmony_ci 10558c2ecf20Sopenharmony_ci - Stacks in vmalloc space need to work reliably. For example, if 10568c2ecf20Sopenharmony_ci vmap page tables are created on demand, either this mechanism 10578c2ecf20Sopenharmony_ci needs to work while the stack points to a virtual address with 10588c2ecf20Sopenharmony_ci unpopulated page tables or arch code (switch_to() and switch_mm(), 10598c2ecf20Sopenharmony_ci most likely) needs to ensure that the stack's page table entries 10608c2ecf20Sopenharmony_ci are populated before running on a possibly unpopulated stack. 10618c2ecf20Sopenharmony_ci 10628c2ecf20Sopenharmony_ci - If the stack overflows into a guard page, something reasonable 10638c2ecf20Sopenharmony_ci should happen. The definition of "reasonable" is flexible, but 10648c2ecf20Sopenharmony_ci instantly rebooting without logging anything would be unfriendly. 10658c2ecf20Sopenharmony_ci 10668c2ecf20Sopenharmony_ciconfig VMAP_STACK 10678c2ecf20Sopenharmony_ci default y 10688c2ecf20Sopenharmony_ci bool "Use a virtually-mapped stack" 10698c2ecf20Sopenharmony_ci depends on HAVE_ARCH_VMAP_STACK 10708c2ecf20Sopenharmony_ci depends on !KASAN || KASAN_VMALLOC 10718c2ecf20Sopenharmony_ci help 10728c2ecf20Sopenharmony_ci Enable this if you want the use virtually-mapped kernel stacks 10738c2ecf20Sopenharmony_ci with guard pages. This causes kernel stack overflows to be 10748c2ecf20Sopenharmony_ci caught immediately rather than causing difficult-to-diagnose 10758c2ecf20Sopenharmony_ci corruption. 10768c2ecf20Sopenharmony_ci 10778c2ecf20Sopenharmony_ci To use this with KASAN, the architecture must support backing 10788c2ecf20Sopenharmony_ci virtual mappings with real shadow memory, and KASAN_VMALLOC must 10798c2ecf20Sopenharmony_ci be enabled. 10808c2ecf20Sopenharmony_ci 10818c2ecf20Sopenharmony_ciconfig ARCH_OPTIONAL_KERNEL_RWX 10828c2ecf20Sopenharmony_ci def_bool n 10838c2ecf20Sopenharmony_ci 10848c2ecf20Sopenharmony_ciconfig ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 10858c2ecf20Sopenharmony_ci def_bool n 10868c2ecf20Sopenharmony_ci 10878c2ecf20Sopenharmony_ciconfig ARCH_HAS_STRICT_KERNEL_RWX 10888c2ecf20Sopenharmony_ci def_bool n 10898c2ecf20Sopenharmony_ci 10908c2ecf20Sopenharmony_ciconfig STRICT_KERNEL_RWX 10918c2ecf20Sopenharmony_ci bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX 10928c2ecf20Sopenharmony_ci depends on ARCH_HAS_STRICT_KERNEL_RWX 10938c2ecf20Sopenharmony_ci default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 10948c2ecf20Sopenharmony_ci help 10958c2ecf20Sopenharmony_ci If this is set, kernel text and rodata memory will be made read-only, 10968c2ecf20Sopenharmony_ci and non-text memory will be made non-executable. This provides 10978c2ecf20Sopenharmony_ci protection against certain security exploits (e.g. executing the heap 10988c2ecf20Sopenharmony_ci or modifying text) 10998c2ecf20Sopenharmony_ci 11008c2ecf20Sopenharmony_ci These features are considered standard security practice these days. 11018c2ecf20Sopenharmony_ci You should say Y here in almost all cases. 11028c2ecf20Sopenharmony_ci 11038c2ecf20Sopenharmony_ciconfig ARCH_HAS_STRICT_MODULE_RWX 11048c2ecf20Sopenharmony_ci def_bool n 11058c2ecf20Sopenharmony_ci 11068c2ecf20Sopenharmony_ciconfig STRICT_MODULE_RWX 11078c2ecf20Sopenharmony_ci bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX 11088c2ecf20Sopenharmony_ci depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES 11098c2ecf20Sopenharmony_ci default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 11108c2ecf20Sopenharmony_ci help 11118c2ecf20Sopenharmony_ci If this is set, module text and rodata memory will be made read-only, 11128c2ecf20Sopenharmony_ci and non-text memory will be made non-executable. This provides 11138c2ecf20Sopenharmony_ci protection against certain security exploits (e.g. writing to text) 11148c2ecf20Sopenharmony_ci 11158c2ecf20Sopenharmony_ci# select if the architecture provides an asm/dma-direct.h header 11168c2ecf20Sopenharmony_ciconfig ARCH_HAS_PHYS_TO_DMA 11178c2ecf20Sopenharmony_ci bool 11188c2ecf20Sopenharmony_ci 11198c2ecf20Sopenharmony_ciconfig HAVE_ARCH_COMPILER_H 11208c2ecf20Sopenharmony_ci bool 11218c2ecf20Sopenharmony_ci help 11228c2ecf20Sopenharmony_ci An architecture can select this if it provides an 11238c2ecf20Sopenharmony_ci asm/compiler.h header that should be included after 11248c2ecf20Sopenharmony_ci linux/compiler-*.h in order to override macro definitions that those 11258c2ecf20Sopenharmony_ci headers generally provide. 11268c2ecf20Sopenharmony_ci 11278c2ecf20Sopenharmony_ciconfig HAVE_ARCH_PREL32_RELOCATIONS 11288c2ecf20Sopenharmony_ci bool 11298c2ecf20Sopenharmony_ci help 11308c2ecf20Sopenharmony_ci May be selected by an architecture if it supports place-relative 11318c2ecf20Sopenharmony_ci 32-bit relocations, both in the toolchain and in the module loader, 11328c2ecf20Sopenharmony_ci in which case relative references can be used in special sections 11338c2ecf20Sopenharmony_ci for PCI fixup, initcalls etc which are only half the size on 64 bit 11348c2ecf20Sopenharmony_ci architectures, and don't require runtime relocation on relocatable 11358c2ecf20Sopenharmony_ci kernels. 11368c2ecf20Sopenharmony_ci 11378c2ecf20Sopenharmony_ciconfig ARCH_USE_MEMREMAP_PROT 11388c2ecf20Sopenharmony_ci bool 11398c2ecf20Sopenharmony_ci 11408c2ecf20Sopenharmony_ciconfig LOCK_EVENT_COUNTS 11418c2ecf20Sopenharmony_ci bool "Locking event counts collection" 11428c2ecf20Sopenharmony_ci depends on DEBUG_FS 11438c2ecf20Sopenharmony_ci help 11448c2ecf20Sopenharmony_ci Enable light-weight counting of various locking related events 11458c2ecf20Sopenharmony_ci in the system with minimal performance impact. This reduces 11468c2ecf20Sopenharmony_ci the chance of application behavior change because of timing 11478c2ecf20Sopenharmony_ci differences. The counts are reported via debugfs. 11488c2ecf20Sopenharmony_ci 11498c2ecf20Sopenharmony_ci# Select if the architecture has support for applying RELR relocations. 11508c2ecf20Sopenharmony_ciconfig ARCH_HAS_RELR 11518c2ecf20Sopenharmony_ci bool 11528c2ecf20Sopenharmony_ci 11538c2ecf20Sopenharmony_ciconfig RELR 11548c2ecf20Sopenharmony_ci bool "Use RELR relocation packing" 11558c2ecf20Sopenharmony_ci depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR 11568c2ecf20Sopenharmony_ci default y 11578c2ecf20Sopenharmony_ci help 11588c2ecf20Sopenharmony_ci Store the kernel's dynamic relocations in the RELR relocation packing 11598c2ecf20Sopenharmony_ci format. Requires a compatible linker (LLD supports this feature), as 11608c2ecf20Sopenharmony_ci well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy 11618c2ecf20Sopenharmony_ci are compatible). 11628c2ecf20Sopenharmony_ci 11638c2ecf20Sopenharmony_ciconfig ARCH_HAS_MEM_ENCRYPT 11648c2ecf20Sopenharmony_ci bool 11658c2ecf20Sopenharmony_ci 11668c2ecf20Sopenharmony_ciconfig ARCH_HAS_CC_PLATFORM 11678c2ecf20Sopenharmony_ci bool 11688c2ecf20Sopenharmony_ci 11698c2ecf20Sopenharmony_ciconfig HAVE_SPARSE_SYSCALL_NR 11708c2ecf20Sopenharmony_ci bool 11718c2ecf20Sopenharmony_ci help 11728c2ecf20Sopenharmony_ci An architecture should select this if its syscall numbering is sparse 11738c2ecf20Sopenharmony_ci to save space. For example, MIPS architecture has a syscall array with 11748c2ecf20Sopenharmony_ci entries at 4000, 5000 and 6000 locations. This option turns on syscall 11758c2ecf20Sopenharmony_ci related optimizations for a given architecture. 11768c2ecf20Sopenharmony_ci 11778c2ecf20Sopenharmony_ciconfig ARCH_HAS_VDSO_DATA 11788c2ecf20Sopenharmony_ci bool 11798c2ecf20Sopenharmony_ci 11808c2ecf20Sopenharmony_ciconfig HAVE_STATIC_CALL 11818c2ecf20Sopenharmony_ci bool 11828c2ecf20Sopenharmony_ci 11838c2ecf20Sopenharmony_ciconfig HAVE_STATIC_CALL_INLINE 11848c2ecf20Sopenharmony_ci bool 11858c2ecf20Sopenharmony_ci depends on HAVE_STATIC_CALL 11868c2ecf20Sopenharmony_ci 11878c2ecf20Sopenharmony_ciconfig ARCH_WANT_LD_ORPHAN_WARN 11888c2ecf20Sopenharmony_ci bool 11898c2ecf20Sopenharmony_ci help 11908c2ecf20Sopenharmony_ci An arch should select this symbol once all linker sections are explicitly 11918c2ecf20Sopenharmony_ci included, size-asserted, or discarded in the linker scripts. This is 11928c2ecf20Sopenharmony_ci important because we never want expected sections to be placed heuristically 11938c2ecf20Sopenharmony_ci by the linker, since the locations of such sections can change between linker 11948c2ecf20Sopenharmony_ci versions. 11958c2ecf20Sopenharmony_ci 11968c2ecf20Sopenharmony_ciconfig ARCH_SPLIT_ARG64 11978c2ecf20Sopenharmony_ci bool 11988c2ecf20Sopenharmony_ci help 11998c2ecf20Sopenharmony_ci If a 32-bit architecture requires 64-bit arguments to be split into 12008c2ecf20Sopenharmony_ci pairs of 32-bit arguments, select this option. 12018c2ecf20Sopenharmony_ci 12028c2ecf20Sopenharmony_cisource "kernel/gcov/Kconfig" 12038c2ecf20Sopenharmony_ci 12048c2ecf20Sopenharmony_cisource "scripts/gcc-plugins/Kconfig" 12058c2ecf20Sopenharmony_ci 12068c2ecf20Sopenharmony_ciendmenu 1207