^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # General architecture dependent options
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) # Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) # override the default values in this file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) source "arch/$(SRCARCH)/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) menu "General architecture-dependent options"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) config CRASH_CORE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) config KEXEC_CORE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) select CRASH_CORE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) config KEXEC_ELF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) config HAVE_IMA_KEXEC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) config SET_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) config HOTPLUG_SMT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) config GENERIC_ENTRY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) config OPROFILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) tristate "OProfile system profiling"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) depends on PROFILING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) depends on HAVE_OPROFILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) select RING_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) select RING_BUFFER_ALLOW_SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) OProfile is a profiling system capable of profiling the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) whole system, include the kernel, kernel modules, libraries,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) and applications.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) config OPROFILE_EVENT_MULTIPLEX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) bool "OProfile multiplexing support (EXPERIMENTAL)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) depends on OPROFILE && X86
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) The number of hardware counters is limited. The multiplexing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) feature enables OProfile to gather more events than counters
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) are provided by the hardware. This is realized by switching
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) between events at a user specified time interval.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) config HAVE_OPROFILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) config OPROFILE_NMI_TIMER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) config KPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) bool "Kprobes"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) depends on MODULES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) depends on HAVE_KPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) select KALLSYMS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) Kprobes allows you to trap at almost any kernel address and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) execute a callback function. register_kprobe() establishes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) a probepoint and specifies the callback. Kprobes is useful
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) for kernel debugging, non-intrusive instrumentation and testing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) If in doubt, say "N".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) config JUMP_LABEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) bool "Optimize very unlikely/likely branches"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) depends on HAVE_ARCH_JUMP_LABEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) depends on CC_HAS_ASM_GOTO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) This option enables a transparent branch optimization that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) makes certain almost-always-true or almost-always-false branch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) conditions even cheaper to execute within the kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) Certain performance-sensitive kernel code, such as trace points,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) scheduler functionality, networking code and KVM have such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) branches and include support for this optimization technique.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) If it is detected that the compiler has support for "asm goto",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) the kernel will compile such branches with just a nop
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) instruction. When the condition flag is toggled to true, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) nop will be converted to a jump instruction to execute the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) conditional block of instructions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) This technique lowers overhead and stress on the branch prediction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) of the processor and generally makes the kernel faster. The update
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) of the condition is slower, but those are always very rare.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) ( On 32-bit x86, the necessary options added to the compiler
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) flags may increase the size of the kernel slightly. )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) config STATIC_KEYS_SELFTEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) bool "Static key selftest"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) depends on JUMP_LABEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) Boot time self-test of the branch patching code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) config STATIC_CALL_SELFTEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) bool "Static call selftest"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) depends on HAVE_STATIC_CALL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) Boot time self-test of the call patching code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) config OPTPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) depends on KPROBES && HAVE_OPTPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) select TASKS_RCU if PREEMPTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) config KPROBES_ON_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) depends on KPROBES && HAVE_KPROBES_ON_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) depends on DYNAMIC_FTRACE_WITH_REGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) If function tracer is enabled and the arch supports full
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) passing of pt_regs to function tracing, then kprobes can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) optimize on top of function tracing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) config UPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) depends on ARCH_SUPPORTS_UPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) Uprobes is the user-space counterpart to kprobes: they
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) enable instrumentation applications (such as 'perf probe')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) to establish unintrusive probes in user-space binaries and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) libraries, by executing handler functions when the probes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) are hit by user-space applications.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) ( These probes come in the form of single-byte breakpoints,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) managed by the kernel and kept transparent to the probed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) application. )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) config HAVE_64BIT_ALIGNED_ACCESS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) Some architectures require 64 bit accesses to be 64 bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) aligned, which also requires structs containing 64 bit values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) to be 64 bit aligned too. This includes some 32 bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) architectures which can do 64 bit accesses, as well as 64 bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) architectures without unaligned access.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) This symbol should be selected by an architecture if 64 bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) accesses are required to be 64 bit aligned in this way even
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) though it is not a 64 bit architecture.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) See Documentation/unaligned-memory-access.txt for more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) information on the topic of unaligned memory accesses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) config HAVE_EFFICIENT_UNALIGNED_ACCESS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) Some architectures are unable to perform unaligned accesses
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) without the use of get_unaligned/put_unaligned. Others are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) unable to perform such accesses efficiently (e.g. trap on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) unaligned access and require fixing it up in the exception
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) handler.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) This symbol should be selected by an architecture if it can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) perform unaligned accesses efficiently to allow different
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) code paths to be selected for these cases. Some network
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) drivers, for example, could opt to not fix up alignment
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) problems with received packets if doing so would not help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) much.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) See Documentation/core-api/unaligned-memory-access.rst for more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) information on the topic of unaligned memory accesses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) config ARCH_USE_BUILTIN_BSWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) Modern versions of GCC (since 4.4) have builtin functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) for handling byte-swapping. Using these, instead of the old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) inline assembler that the architecture code provides in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) __arch_bswapXX() macros, allows the compiler to see what's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) happening and offers more opportunity for optimisation. In
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) particular, the compiler will be able to combine the byteswap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) with a nearby load or store and use load-and-swap or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) store-and-swap instructions if the architecture has them. It
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) should almost *never* result in code which is worse than the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) hand-coded assembler in <asm/swab.h>. But just in case it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) does, the use of the builtins is optional.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) Any architecture with load-and-swap or store-and-swap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) instructions should set this. And it shouldn't hurt to set it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) on architectures that don't have such instructions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) config KRETPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) depends on KPROBES && HAVE_KRETPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) config USER_RETURN_NOTIFIER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) depends on HAVE_USER_RETURN_NOTIFIER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) Provide a kernel-internal notification when a cpu is about to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) switch to user mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) config HAVE_IOREMAP_PROT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) config HAVE_KPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) config HAVE_KRETPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) config HAVE_OPTPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) config HAVE_KPROBES_ON_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) config HAVE_FUNCTION_ERROR_INJECTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) config HAVE_NMI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) # An arch should select this if it provides all these things:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) # task_pt_regs() in asm/processor.h or asm/ptrace.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) # arch_has_single_step() if there is hardware single-step support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) # arch_has_block_step() if there is hardware block-step support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) # asm/syscall.h supplying asm-generic/syscall.h interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) # linux/regset.h user_regset interfaces
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) # CORE_DUMP_USE_REGSET #define'd in linux/elf.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) # TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) # TIF_NOTIFY_RESUME calls tracehook_notify_resume()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) # signal delivery calls tracehook_signal_handler()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) config HAVE_ARCH_TRACEHOOK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) config HAVE_DMA_CONTIGUOUS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) config GENERIC_SMP_IDLE_THREAD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) config GENERIC_IDLE_POLL_SETUP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) config ARCH_HAS_FORTIFY_SOURCE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) An architecture should select this when it can successfully
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) build and run with CONFIG_FORTIFY_SOURCE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) # Select if the arch provides a historic keepinit alias for the retain_initrd
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) # command line option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) config ARCH_HAS_KEEPINITRD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) # Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) config ARCH_HAS_SET_MEMORY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) # Select if arch has all set_direct_map_invalid/default() functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) config ARCH_HAS_SET_DIRECT_MAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) # Select if the architecture provides the arch_dma_set_uncached symbol to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) # either provide an uncached segement alias for a DMA allocation, or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) # to remap the page tables in place.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) config ARCH_HAS_DMA_SET_UNCACHED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) # Select if the architectures provides the arch_dma_clear_uncached symbol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) # to undo an in-place page table remap for uncached access.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) config ARCH_HAS_DMA_CLEAR_UNCACHED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) # Select if arch init_task must go in the __init_task_data section
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) config ARCH_TASK_STRUCT_ON_STACK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) # Select if arch has its private alloc_task_struct() function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) config ARCH_TASK_STRUCT_ALLOCATOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) config HAVE_ARCH_THREAD_STRUCT_WHITELIST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) depends on !ARCH_TASK_STRUCT_ALLOCATOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) An architecture should select this to provide hardened usercopy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) knowledge about what region of the thread_struct should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) whitelisted for copying to userspace. Normally this is only the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) FPU registers. Specifically, arch_thread_struct_whitelist()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) should be implemented. Without this, the entire thread_struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) field in task_struct will be left whitelisted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) # Select if arch has its private alloc_thread_stack() function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) config ARCH_THREAD_STACK_ALLOCATOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) # Select if arch wants to size task_struct dynamically via arch_task_struct_size:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) config ARCH_WANTS_DYNAMIC_TASK_STRUCT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) config ARCH_32BIT_OFF_T
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) depends on !64BIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) All new 32-bit architectures should have 64-bit off_t type on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) userspace side which corresponds to the loff_t kernel type. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) is the requirement for modern ABIs. Some existing architectures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) still support 32-bit off_t. This option is enabled for all such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) architectures explicitly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) config HAVE_ASM_MODVERSIONS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) This symbol should be selected by an architecure if it provides
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) <asm/asm-prototypes.h> to support the module versioning for symbols
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) exported from assembly code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) config HAVE_REGS_AND_STACK_ACCESS_API
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) This symbol should be selected by an architecure if it supports
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) the API needed to access registers and stack entries from pt_regs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) declared in asm/ptrace.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) For example the kprobes-based event tracer needs this API.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) config HAVE_RSEQ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) depends on HAVE_REGS_AND_STACK_ACCESS_API
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) This symbol should be selected by an architecture if it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) supports an implementation of restartable sequences.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) config HAVE_FUNCTION_ARG_ACCESS_API
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) This symbol should be selected by an architecure if it supports
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) the API needed to access function arguments from pt_regs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) declared in asm/ptrace.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) config HAVE_HW_BREAKPOINT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) depends on PERF_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) config HAVE_MIXED_BREAKPOINTS_REGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) depends on HAVE_HW_BREAKPOINT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) Depending on the arch implementation of hardware breakpoints,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) some of them have separate registers for data and instruction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) breakpoints addresses, others have mixed registers to store
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) them but define the access type in a control register.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) Select this option if your arch implements breakpoints under the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) latter fashion.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) config HAVE_USER_RETURN_NOTIFIER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) config HAVE_PERF_EVENTS_NMI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) System hardware can generate an NMI using the perf event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) subsystem. Also has support for calculating CPU cycle events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) to determine how many clock cycles in a given period.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) config HAVE_HARDLOCKUP_DETECTOR_PERF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) depends on HAVE_PERF_EVENTS_NMI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) The arch chooses to use the generic perf-NMI-based hardlockup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) detector. Must define HAVE_PERF_EVENTS_NMI.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) config HAVE_NMI_WATCHDOG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) depends on HAVE_NMI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) The arch provides a low level NMI watchdog. It provides
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) asm/nmi.h, and defines its own arch_touch_nmi_watchdog().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) config HAVE_HARDLOCKUP_DETECTOR_ARCH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) select HAVE_NMI_WATCHDOG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) The arch chooses to provide its own hardlockup detector, which is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) a superset of the HAVE_NMI_WATCHDOG. It also conforms to config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) interfaces and parameters provided by hardlockup detector subsystem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) config HAVE_PERF_REGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) Support selective register dumps for perf events. This includes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) bit-mapping of each registers and a unique architecture id.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) config HAVE_PERF_USER_STACK_DUMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) Support user stack dumps for perf event samples. This needs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) access to the user stack pointer which is not unified across
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) architectures.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) config HAVE_ARCH_JUMP_LABEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) config HAVE_ARCH_JUMP_LABEL_RELATIVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) config MMU_GATHER_TABLE_FREE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) config MMU_GATHER_RCU_TABLE_FREE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) select MMU_GATHER_TABLE_FREE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) config MMU_GATHER_PAGE_SIZE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) config MMU_GATHER_NO_RANGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) config MMU_GATHER_NO_GATHER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) depends on MMU_GATHER_TABLE_FREE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) config ARCH_WANT_IRQS_OFF_ACTIVATE_MM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) Temporary select until all architectures can be converted to have
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) irqs disabled over activate_mm. Architectures that do IPI based TLB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) shootdowns should enable this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) config ARCH_HAVE_NMI_SAFE_CMPXCHG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) config HAVE_ALIGNED_STRUCT_PAGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) This makes sure that struct pages are double word aligned and that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) e.g. the SLUB allocator can perform double word atomic operations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) on a struct page for better performance. However selecting this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) might increase the size of a struct page by a word.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) config HAVE_CMPXCHG_LOCAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) config HAVE_CMPXCHG_DOUBLE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) config ARCH_WEAK_RELEASE_ACQUIRE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) config ARCH_WANT_IPC_PARSE_VERSION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) config ARCH_WANT_COMPAT_IPC_PARSE_VERSION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) config ARCH_WANT_OLD_COMPAT_IPC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) config HAVE_ARCH_SECCOMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) An arch should select this symbol to support seccomp mode 1 (the fixed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) syscall policy), and must provide an overrides for __NR_seccomp_sigreturn,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) and compat syscalls if the asm-generic/seccomp.h defaults need adjustment:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) - __NR_seccomp_read_32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) - __NR_seccomp_write_32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) - __NR_seccomp_exit_32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) - __NR_seccomp_sigreturn_32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) config HAVE_ARCH_SECCOMP_FILTER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) select HAVE_ARCH_SECCOMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) An arch should select this symbol if it provides all of these things:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) - all the requirements for HAVE_ARCH_SECCOMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) - syscall_get_arch()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) - syscall_get_arguments()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) - syscall_rollback()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) - syscall_set_return_value()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) - SIGSYS siginfo_t support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) - secure_computing is called from a ptrace_event()-safe context
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) - secure_computing return value is checked and a return value of -1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) results in the system call being skipped immediately.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) - seccomp syscall wired up
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) config SECCOMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) prompt "Enable seccomp to safely execute untrusted bytecode"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) depends on HAVE_ARCH_SECCOMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511) This kernel feature is useful for number crunching applications
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) that may need to handle untrusted bytecode during their
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) execution. By using pipes or other transports made available
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) to the process as file descriptors supporting the read/write
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) syscalls, it's possible to isolate those applications in their
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) own address space using seccomp. Once seccomp is enabled via
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) disabled and the task is only allowed to execute a few safe
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) syscalls defined by each seccomp mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) If unsure, say Y.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) config SECCOMP_FILTER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) Enable tasks to build secure computing environments defined
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) in terms of Berkeley Packet Filter programs which implement
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) task-defined system call filtering polices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) See Documentation/userspace-api/seccomp_filter.rst for details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) config HAVE_ARCH_STACKLEAK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) An architecture should select this if it has the code which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) fills the used part of the kernel stack with the STACKLEAK_POISON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) value before returning from system calls.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) config HAVE_STACKPROTECTOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) An arch should select this symbol if:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) - it has implemented a stack canary (e.g. __stack_chk_guard)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546) config STACKPROTECTOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) bool "Stack Protector buffer overflow detection"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548) depends on HAVE_STACKPROTECTOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549) depends on $(cc-option,-fstack-protector)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552) This option turns on the "stack-protector" GCC feature. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553) feature puts, at the beginning of functions, a canary value on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) the stack just before the return address, and validates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555) the value just before actually returning. Stack based buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) overflows (that need to overwrite this return address) now also
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557) overwrite the canary, which gets detected and the attack is then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) neutralized via a kernel panic.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560) Functions will have the stack-protector canary logic added if they
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) have an 8-byte or larger character array on the stack.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) This feature requires gcc version 4.2 or above, or a distribution
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) gcc with the feature backported ("-fstack-protector").
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) On an x86 "defconfig" build, this feature adds canary checks to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) about 3% of all kernel functions, which increases kernel code size
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) by about 0.3%.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) config STACKPROTECTOR_STRONG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) bool "Strong Stack Protector"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) depends on STACKPROTECTOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) depends on $(cc-option,-fstack-protector-strong)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) Functions will have the stack-protector canary logic added in any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) of the following conditions:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) - local variable's address used as part of the right hand side of an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580) assignment or function argument
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) - local variable is an array (or union containing an array),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) regardless of array type or length
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) - uses register local variables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) This feature requires gcc version 4.9 or above, or a distribution
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) gcc with the feature backported ("-fstack-protector-strong").
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) On an x86 "defconfig" build, this feature adds canary checks to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589) about 20% of all kernel functions, which increases the kernel code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) size by about 2%.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) config ARCH_SUPPORTS_SHADOW_CALL_STACK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595) An architecture should select this if it supports Clang's Shadow
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) Call Stack and implements runtime support for shadow stack
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) switching.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) config SHADOW_CALL_STACK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) bool "Clang Shadow Call Stack"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) depends on CC_IS_CLANG && ARCH_SUPPORTS_SHADOW_CALL_STACK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) depends on DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604) This option enables Clang's Shadow Call Stack, which uses a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) shadow stack to protect function return addresses from being
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606) overwritten by an attacker. More information can be found in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607) Clang's documentation:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609) https://clang.llvm.org/docs/ShadowCallStack.html
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) Note that security guarantees in the kernel differ from the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612) ones documented for user space. The kernel must store addresses
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) of shadow stacks in memory, which means an attacker capable of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) reading and writing arbitrary memory may be able to locate them
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) and hijack control flow by modifying the stacks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) config LTO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) Selected if the kernel will be built using the compiler's LTO feature.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622) config LTO_CLANG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) select LTO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) Selected if the kernel will be built using Clang's LTO feature.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) config ARCH_SUPPORTS_LTO_CLANG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) An architecture should select this option if it supports:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632) - compiling with Clang,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633) - compiling inline assembly with Clang's integrated assembler,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) - and linking with LLD.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) config ARCH_SUPPORTS_LTO_CLANG_THIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639) An architecture should select this option if it can support Clang's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) ThinLTO mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642) config HAS_LTO_CLANG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) # Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646) depends on $(success,test $(LLVM) -eq 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647) depends on $(success,test $(LLVM_IAS) -eq 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650) depends on ARCH_SUPPORTS_LTO_CLANG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652) depends on !KASAN || KASAN_HW_TAGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653) depends on !GCOV_KERNEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655) The compiler and Kconfig options support building with Clang's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656) LTO.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658) choice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659) prompt "Link Time Optimization (LTO)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660) default LTO_NONE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662) This option enables Link Time Optimization (LTO), which allows the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663) compiler to optimize binaries globally.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665) If unsure, select LTO_NONE. Note that LTO is very resource-intensive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666) so it's disabled by default.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668) config LTO_NONE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669) bool "None"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) Build the kernel normally, without Link Time Optimization (LTO).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) config LTO_CLANG_FULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674) bool "Clang Full LTO (EXPERIMENTAL)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675) depends on HAS_LTO_CLANG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676) depends on !COMPILE_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677) select LTO_CLANG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679) This option enables Clang's full Link Time Optimization (LTO), which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680) allows the compiler to optimize the kernel globally. If you enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681) this option, the compiler generates LLVM bitcode instead of ELF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682) object files, and the actual compilation from bitcode happens at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683) the LTO link step, which may take several minutes depending on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684) kernel configuration. More information can be found from LLVM's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685) documentation:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687) https://llvm.org/docs/LinkTimeOptimization.html
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689) During link time, this option can use a large amount of RAM, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690) may take much longer than the ThinLTO option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692) config LTO_CLANG_THIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693) bool "Clang ThinLTO (EXPERIMENTAL)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694) depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695) select LTO_CLANG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697) This option enables Clang's ThinLTO, which allows for parallel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698) optimization and faster incremental compiles compared to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699) CONFIG_LTO_CLANG_FULL option. More information can be found
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700) from Clang's documentation:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702) https://clang.llvm.org/docs/ThinLTO.html
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704) If unsure, say Y.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705) endchoice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707) config CFI_CLANG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708) bool "Use Clang's Control Flow Integrity (CFI)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709) depends on LTO_CLANG && KALLSYMS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711) This option enables Clang's Control Flow Integrity (CFI), which adds
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712) runtime checking for indirect function calls.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714) config CFI_CLANG_SHADOW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715) bool "Use CFI shadow to speed up cross-module checks"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717) depends on CFI_CLANG && MODULES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 719) If you select this option, the kernel builds a fast look-up table of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 720) CFI check functions in loaded modules to reduce overhead.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 721)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 722) config CFI_PERMISSIVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 723) bool "Use CFI in permissive mode"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 724) depends on CFI_CLANG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 725) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 726) When selected, Control Flow Integrity (CFI) violations result in a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 727) warning instead of a kernel panic. This option is useful for finding
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 728) CFI violations during development.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 729)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 730) config HAVE_ARCH_WITHIN_STACK_FRAMES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 731) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 732) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 733) An architecture should select this if it can walk the kernel stack
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 734) frames to determine if an object is part of either the arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 735) or local variables (i.e. that it excludes saved return addresses,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 736) and similar) by implementing an inline arch_within_stack_frames(),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 737) which is used by CONFIG_HARDENED_USERCOPY.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 738)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 739) config HAVE_CONTEXT_TRACKING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 740) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 741) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 742) Provide kernel/user boundaries probes necessary for subsystems
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 743) that need it, such as userspace RCU extended quiescent state.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 744) Syscalls need to be wrapped inside user_exit()-user_enter(), either
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 745) optimized behind static key or through the slow path using TIF_NOHZ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 746) flag. Exceptions handlers must be wrapped as well. Irqs are already
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 747) protected inside rcu_irq_enter/rcu_irq_exit() but preemption or signal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 748) handling on irq exit still need to be protected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 749)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 750) config HAVE_TIF_NOHZ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 751) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 752) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 753) Arch relies on TIF_NOHZ and syscall slow path to implement context
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 754) tracking calls to user_enter()/user_exit().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 755)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 756) config HAVE_VIRT_CPU_ACCOUNTING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 757) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 758)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 759) config ARCH_HAS_SCALED_CPUTIME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 760) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 761)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 762) config HAVE_VIRT_CPU_ACCOUNTING_GEN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 763) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 764) default y if 64BIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 765) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 766) With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 767) Before enabling this option, arch code must be audited
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 768) to ensure there are no races in concurrent read/write of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 769) cputime_t. For example, reading/writing 64-bit cputime_t on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 770) some 32-bit arches may require multiple accesses, so proper
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 771) locking is needed to protect against concurrent accesses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 772)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 773)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 774) config HAVE_IRQ_TIME_ACCOUNTING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 775) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 776) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 777) Archs need to ensure they use a high enough resolution clock to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 778) support irq time accounting and then call enable_sched_clock_irqtime().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 779)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 780) config HAVE_MOVE_PUD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 781) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 782) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 783) Architectures that select this are able to move page tables at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 784) PUD level. If there are only 3 page table levels, the move effectively
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 785) happens at the PGD level.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 786)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 787) config HAVE_MOVE_PMD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 788) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 789) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 790) Archs that select this are able to move page tables at the PMD level.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 791)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 792) config HAVE_ARCH_TRANSPARENT_HUGEPAGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 793) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 794)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 795) config HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 796) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 797)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 798) config HAVE_ARCH_HUGE_VMAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 799) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 800)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 801) config ARCH_WANT_HUGE_PMD_SHARE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 802) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 803)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 804) config HAVE_ARCH_SOFT_DIRTY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 805) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 806)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 807) config HAVE_MOD_ARCH_SPECIFIC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 808) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 809) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 810) The arch uses struct mod_arch_specific to store data. Many arches
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 811) just need a simple module loader without arch specific data - those
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 812) should not enable this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 813)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 814) config MODULES_USE_ELF_RELA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 815) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 816) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 817) Modules only use ELF RELA relocations. Modules with ELF REL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 818) relocations will give an error.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 819)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 820) config MODULES_USE_ELF_REL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 821) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 822) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 823) Modules only use ELF REL relocations. Modules with ELF RELA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 824) relocations will give an error.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 825)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 826) config HAVE_IRQ_EXIT_ON_IRQ_STACK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 827) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 828) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 829) Architecture doesn't only execute the irq handler on the irq stack
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 830) but also irq_exit(). This way we can process softirqs on this irq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 831) stack instead of switching to a new one when we call __do_softirq()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 832) in the end of an hardirq.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 833) This spares a stack switch and improves cache usage on softirq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 834) processing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 835)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 836) config PGTABLE_LEVELS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 837) int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 838) default 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 839)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 840) config ARCH_HAS_ELF_RANDOMIZE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 841) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 842) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 843) An architecture supports choosing randomized locations for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 844) stack, mmap, brk, and ET_DYN. Defined functions:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 845) - arch_mmap_rnd()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 846) - arch_randomize_brk()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 847)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 848) config HAVE_ARCH_MMAP_RND_BITS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 849) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 850) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 851) An arch should select this symbol if it supports setting a variable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 852) number of bits for use in establishing the base address for mmap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 853) allocations, has MMU enabled and provides values for both:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 854) - ARCH_MMAP_RND_BITS_MIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 855) - ARCH_MMAP_RND_BITS_MAX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 856)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 857) config HAVE_EXIT_THREAD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 858) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 859) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 860) An architecture implements exit_thread.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 861)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 862) config ARCH_MMAP_RND_BITS_MIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 863) int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 864)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 865) config ARCH_MMAP_RND_BITS_MAX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 866) int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 867)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 868) config ARCH_MMAP_RND_BITS_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 869) int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 870)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 871) config ARCH_MMAP_RND_BITS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 872) int "Number of bits to use for ASLR of mmap base address" if EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 873) range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 874) default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 875) default ARCH_MMAP_RND_BITS_MIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 876) depends on HAVE_ARCH_MMAP_RND_BITS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 877) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 878) This value can be used to select the number of bits to use to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 879) determine the random offset to the base address of vma regions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 880) resulting from mmap allocations. This value will be bounded
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 881) by the architecture's minimum and maximum supported values.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 882)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 883) This value can be changed after boot using the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 884) /proc/sys/vm/mmap_rnd_bits tunable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 885)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 886) config HAVE_ARCH_MMAP_RND_COMPAT_BITS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 887) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 888) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 889) An arch should select this symbol if it supports running applications
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 890) in compatibility mode, supports setting a variable number of bits for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 891) use in establishing the base address for mmap allocations, has MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 892) enabled and provides values for both:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 893) - ARCH_MMAP_RND_COMPAT_BITS_MIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 894) - ARCH_MMAP_RND_COMPAT_BITS_MAX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 895)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 896) config ARCH_MMAP_RND_COMPAT_BITS_MIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 897) int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 898)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 899) config ARCH_MMAP_RND_COMPAT_BITS_MAX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 900) int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 901)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 902) config ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 903) int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 904)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 905) config ARCH_MMAP_RND_COMPAT_BITS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 906) int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 907) range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 908) default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 909) default ARCH_MMAP_RND_COMPAT_BITS_MIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 910) depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 911) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 912) This value can be used to select the number of bits to use to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 913) determine the random offset to the base address of vma regions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 914) resulting from mmap allocations for compatible applications This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 915) value will be bounded by the architecture's minimum and maximum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 916) supported values.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 917)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 918) This value can be changed after boot using the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 919) /proc/sys/vm/mmap_rnd_compat_bits tunable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 920)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 921) config HAVE_ARCH_COMPAT_MMAP_BASES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 922) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 923) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 924) This allows 64bit applications to invoke 32-bit mmap() syscall
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 925) and vice-versa 32-bit applications to call 64-bit mmap().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 926) Required for applications doing different bitness syscalls.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 927)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 928) # This allows to use a set of generic functions to determine mmap base
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 929) # address by giving priority to top-down scheme only if the process
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 930) # is not in legacy mode (compat task, unlimited stack size or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 931) # sysctl_legacy_va_layout).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 932) # Architecture that selects this option can provide its own version of:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 933) # - STACK_RND_MASK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 934) config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 935) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 936) depends on MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 937) select ARCH_HAS_ELF_RANDOMIZE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 938)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 939) config HAVE_STACK_VALIDATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 940) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 941) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 942) Architecture supports the 'objtool check' host tool command, which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 943) performs compile-time stack metadata validation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 944)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 945) config HAVE_RELIABLE_STACKTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 946) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 947) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 948) Architecture has either save_stack_trace_tsk_reliable() or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 949) arch_stack_walk_reliable() function which only returns a stack trace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 950) if it can guarantee the trace is reliable.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 951)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 952) config HAVE_ARCH_HASH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 953) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 954) default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 955) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 956) If this is set, the architecture provides an <asm/hash.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 957) file which provides platform-specific implementations of some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 958) functions in <linux/hash.h> or fs/namei.c.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 959)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 960) config HAVE_ARCH_NVRAM_OPS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 961) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 962)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 963) config ISA_BUS_API
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 964) def_bool ISA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 965)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 966) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 967) # ABI hall of shame
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 968) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 969) config CLONE_BACKWARDS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 970) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 971) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 972) Architecture has tls passed as the 4th argument of clone(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 973) not the 5th one.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 974)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 975) config CLONE_BACKWARDS2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 976) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 977) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 978) Architecture has the first two arguments of clone(2) swapped.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 979)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 980) config CLONE_BACKWARDS3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 981) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 982) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 983) Architecture has tls passed as the 3rd argument of clone(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 984) not the 5th one.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 985)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 986) config ODD_RT_SIGACTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 987) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 988) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 989) Architecture has unusual rt_sigaction(2) arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 990)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 991) config OLD_SIGSUSPEND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 992) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 993) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 994) Architecture has old sigsuspend(2) syscall, of one-argument variety
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 995)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 996) config OLD_SIGSUSPEND3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 997) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 998) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 999) Even weirder antique ABI - three-argument sigsuspend(2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1001) config OLD_SIGACTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1002) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1003) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1004) Architecture has old sigaction(2) syscall. Nope, not the same
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1005) as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1006) but fairly different variant of sigaction(2), thanks to OSF/1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1007) compatibility...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1008)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1009) config COMPAT_OLD_SIGACTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1010) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1011)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1012) config COMPAT_32BIT_TIME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1013) bool "Provide system calls for 32-bit time_t"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1014) default !64BIT || COMPAT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1015) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1016) This enables 32 bit time_t support in addition to 64 bit time_t support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1017) This is relevant on all 32-bit architectures, and 64-bit architectures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1018) as part of compat syscall handling.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1019)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1020) config ARCH_NO_PREEMPT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1021) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1022)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1023) config ARCH_SUPPORTS_RT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1024) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1025)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1026) config CPU_NO_EFFICIENT_FFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1027) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1028)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1029) config HAVE_ARCH_VMAP_STACK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1030) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1031) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1032) An arch should select this symbol if it can support kernel stacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1033) in vmalloc space. This means:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1034)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1035) - vmalloc space must be large enough to hold many kernel stacks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1036) This may rule out many 32-bit architectures.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1037)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1038) - Stacks in vmalloc space need to work reliably. For example, if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1039) vmap page tables are created on demand, either this mechanism
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1040) needs to work while the stack points to a virtual address with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1041) unpopulated page tables or arch code (switch_to() and switch_mm(),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1042) most likely) needs to ensure that the stack's page table entries
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1043) are populated before running on a possibly unpopulated stack.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1044)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1045) - If the stack overflows into a guard page, something reasonable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1046) should happen. The definition of "reasonable" is flexible, but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1047) instantly rebooting without logging anything would be unfriendly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1048)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1049) config VMAP_STACK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1050) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1051) bool "Use a virtually-mapped stack"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1052) depends on HAVE_ARCH_VMAP_STACK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1053) depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1054) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1055) Enable this if you want the use virtually-mapped kernel stacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1056) with guard pages. This causes kernel stack overflows to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1057) caught immediately rather than causing difficult-to-diagnose
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1058) corruption.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1059)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1060) To use this with software KASAN modes, the architecture must support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1061) backing virtual mappings with real shadow memory, and KASAN_VMALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1062) must be enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1063)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1064) config ARCH_OPTIONAL_KERNEL_RWX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1065) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1066)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1067) config ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1068) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1069)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1070) config ARCH_HAS_STRICT_KERNEL_RWX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1071) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1072)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1073) config STRICT_KERNEL_RWX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1074) bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1075) depends on ARCH_HAS_STRICT_KERNEL_RWX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1076) default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1077) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1078) If this is set, kernel text and rodata memory will be made read-only,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1079) and non-text memory will be made non-executable. This provides
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1080) protection against certain security exploits (e.g. executing the heap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1081) or modifying text)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1082)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1083) These features are considered standard security practice these days.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1084) You should say Y here in almost all cases.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1085)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1086) config ARCH_HAS_STRICT_MODULE_RWX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1087) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1088)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1089) config STRICT_MODULE_RWX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1090) bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1091) depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1092) default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1093) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1094) If this is set, module text and rodata memory will be made read-only,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1095) and non-text memory will be made non-executable. This provides
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1096) protection against certain security exploits (e.g. writing to text)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1097)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1098) # select if the architecture provides an asm/dma-direct.h header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1099) config ARCH_HAS_PHYS_TO_DMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1100) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1102) config HAVE_ARCH_COMPILER_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1103) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1104) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1105) An architecture can select this if it provides an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1106) asm/compiler.h header that should be included after
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1107) linux/compiler-*.h in order to override macro definitions that those
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1108) headers generally provide.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1109)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1110) config HAVE_ARCH_PREL32_RELOCATIONS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1111) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1112) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1113) May be selected by an architecture if it supports place-relative
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1114) 32-bit relocations, both in the toolchain and in the module loader,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1115) in which case relative references can be used in special sections
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1116) for PCI fixup, initcalls etc which are only half the size on 64 bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1117) architectures, and don't require runtime relocation on relocatable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1118) kernels.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1119)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1120) config ARCH_USE_MEMREMAP_PROT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1121) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1123) config LOCK_EVENT_COUNTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1124) bool "Locking event counts collection"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1125) depends on DEBUG_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1126) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1127) Enable light-weight counting of various locking related events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1128) in the system with minimal performance impact. This reduces
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1129) the chance of application behavior change because of timing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1130) differences. The counts are reported via debugfs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1132) # Select if the architecture has support for applying RELR relocations.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1133) config ARCH_HAS_RELR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1134) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1135)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1136) config RELR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1137) bool "Use RELR relocation packing"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1138) depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1139) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1140) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1141) Store the kernel's dynamic relocations in the RELR relocation packing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1142) format. Requires a compatible linker (LLD supports this feature), as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1143) well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1144) are compatible).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1146) config ARCH_HAS_MEM_ENCRYPT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1147) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1149) config ARCH_HAS_CC_PLATFORM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1150) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1152) config HAVE_SPARSE_SYSCALL_NR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1153) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1154) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1155) An architecture should select this if its syscall numbering is sparse
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1156) to save space. For example, MIPS architecture has a syscall array with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1157) entries at 4000, 5000 and 6000 locations. This option turns on syscall
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1158) related optimizations for a given architecture.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1160) config ARCH_HAS_VDSO_DATA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1161) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1162)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1163) config HAVE_STATIC_CALL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1164) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1165)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1166) config HAVE_STATIC_CALL_INLINE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1167) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1168) depends on HAVE_STATIC_CALL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1169)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1170) config ARCH_WANT_LD_ORPHAN_WARN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1171) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1172) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1173) An arch should select this symbol once all linker sections are explicitly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1174) included, size-asserted, or discarded in the linker scripts. This is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1175) important because we never want expected sections to be placed heuristically
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1176) by the linker, since the locations of such sections can change between linker
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1177) versions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1179) config ARCH_SPLIT_ARG64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1180) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1181) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1182) If a 32-bit architecture requires 64-bit arguments to be split into
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1183) pairs of 32-bit arguments, select this option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1185) source "kernel/gcov/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1187) source "scripts/gcc-plugins/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1188)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1189) endmenu