# SPDX-License-Identifier: GPL-2.0
#
# General architecture dependent options
#
#
# Note: arch/$([31mCONFIG_SRCARCH[0m)/Kconfig needs to be included first so that it can
# override the default values in this file.
#
source "arch/$(SRCARCH)/Kconfig"
menu "General architecture-dependent options"
config [31mCONFIG_CRASH_CORE[0m
bool
config [31mCONFIG_KEXEC_CORE[0m
select [31mCONFIG_CRASH_CORE[0m
bool
config [31mCONFIG_KEXEC_ELF[0m
bool
config [31mCONFIG_HAVE_IMA_KEXEC[0m
bool
config [31mCONFIG_HOTPLUG_SMT[0m
bool
config [31mCONFIG_OPROFILE[0m
tristate "OProfile system profiling"
depends on [31mCONFIG_PROFILING[0m
depends on [31mCONFIG_HAVE_OPROFILE[0m
select [31mCONFIG_RING_BUFFER[0m
select [31mCONFIG_RING_BUFFER_ALLOW_SWAP[0m
help
OProfile is a profiling system capable of profiling the
whole system, include the kernel, kernel modules, libraries,
and applications.
If unsure, say N.
config [31mCONFIG_OPROFILE_EVENT_MULTIPLEX[0m
bool "OProfile multiplexing support (EXPERIMENTAL)"
default n
depends on [31mCONFIG_OPROFILE[0m && [31mCONFIG_X86[0m
help
The number of hardware counters is limited. The multiplexing
feature enables OProfile to gather more events than counters
are provided by the hardware. This is realized by switching
between events at a user specified time interval.
If unsure, say N.
config [31mCONFIG_HAVE_OPROFILE[0m
bool
config [31mCONFIG_OPROFILE_NMI_TIMER[0m
def_bool y
depends on [31mCONFIG_PERF_EVENTS[0m && [31mCONFIG_HAVE_PERF_EVENTS_NMI[0m && ![31mCONFIG_PPC64[0m
config [31mCONFIG_KPROBES[0m
bool "Kprobes"
depends on [31mCONFIG_MODULES[0m
depends on [31mCONFIG_HAVE_KPROBES[0m
select [31mCONFIG_KALLSYMS[0m
help
Kprobes allows you to trap at almost any kernel address and
execute a callback function. register_kprobe() establishes
a probepoint and specifies the callback. Kprobes is useful
for kernel debugging, non-intrusive instrumentation and testing.
If in doubt, say "N".
config [31mCONFIG_JUMP_LABEL[0m
bool "Optimize very unlikely/likely branches"
depends on [31mCONFIG_HAVE_ARCH_JUMP_LABEL[0m
depends on [31mCONFIG_CC_HAS_ASM_GOTO[0m
help
This option enables a transparent branch optimization that
makes certain almost-always-true or almost-always-false branch
conditions even cheaper to execute within the kernel.
Certain performance-sensitive kernel code, such as trace points,
scheduler functionality, networking code and [31mCONFIG_KVM[0m have such
branches and include support for this optimization technique.
If it is detected that the compiler has support for "asm goto",
the kernel will compile such branches with just a nop
instruction. When the condition flag is toggled to true, the
nop will be converted to a jump instruction to execute the
conditional block of instructions.
This technique lowers overhead and stress on the branch prediction
of the processor and generally makes the kernel faster. The update
of the condition is slower, but those are always very rare.
( On 32-bit x86, the necessary options added to the compiler
flags may increase the size of the kernel slightly. )
config [31mCONFIG_STATIC_KEYS_SELFTEST[0m
bool "Static key selftest"
depends on [31mCONFIG_JUMP_LABEL[0m
help
Boot time self-test of the branch patching code.
config [31mCONFIG_OPTPROBES[0m
def_bool y
depends on [31mCONFIG_KPROBES[0m && [31mCONFIG_HAVE_OPTPROBES[0m
select [31mCONFIG_TASKS_RCU[0m if [31mCONFIG_PREEMPTION[0m
config [31mCONFIG_KPROBES_ON_FTRACE[0m
def_bool y
depends on [31mCONFIG_KPROBES[0m && [31mCONFIG_HAVE_KPROBES_ON_FTRACE[0m
depends on [31mCONFIG_DYNAMIC_FTRACE_WITH_REGS[0m
help
If function tracer is enabled and the arch supports full
passing of pt_regs to function tracing, then kprobes can
optimize on top of function tracing.
config [31mCONFIG_UPROBES[0m
def_bool n
depends on [31mCONFIG_ARCH_SUPPORTS_UPROBES[0m
help
Uprobes is the user-space counterpart to kprobes: they
enable instrumentation applications (such as 'perf probe')
to establish unintrusive probes in user-space binaries and
libraries, by executing handler functions when the probes
are hit by user-space applications.
( These probes come in the form of single-byte breakpoints,
managed by the kernel and kept transparent to the probed
application. )
config [31mCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS[0m
bool
help
Some architectures are unable to perform unaligned accesses
without the use of get_unaligned/put_unaligned. Others are
unable to perform such accesses efficiently (e.g. trap on
unaligned access and require fixing it up in the exception
handler.)
This symbol should be selected by an architecture if it can
perform unaligned accesses efficiently to allow different
code paths to be selected for these cases. Some network
drivers, for example, could opt to not fix up alignment
problems with received packets if doing so would not help
much.
See Documentation/unaligned-memory-access.txt for more
information on the topic of unaligned memory accesses.
config [31mCONFIG_ARCH_USE_BUILTIN_BSWAP[0m
bool
help
Modern versions of GCC (since 4.4) have builtin functions
for handling byte-swapping. Using these, instead of the old
inline assembler that the architecture code provides in the
__arch_bswapXX() macros, allows the compiler to see what's
happening and offers more opportunity for optimisation. In
particular, the compiler will be able to combine the byteswap
with a nearby load or store and use load-and-swap or
store-and-swap instructions if the architecture has them. It
should almost *never* result in code which is worse than the
hand-coded assembler in <asm/swab.h>. But just in case it
does, the use of the builtins is optional.
Any architecture with load-and-swap or store-and-swap
instructions should set this. And it shouldn't hurt to set it
on architectures that don't have such instructions.
config [31mCONFIG_KRETPROBES[0m
def_bool y
depends on [31mCONFIG_KPROBES[0m && [31mCONFIG_HAVE_KRETPROBES[0m
config [31mCONFIG_USER_RETURN_NOTIFIER[0m
bool
depends on [31mCONFIG_HAVE_USER_RETURN_NOTIFIER[0m
help
Provide a kernel-internal notification when a cpu is about to
switch to user mode.
config [31mCONFIG_HAVE_IOREMAP_PROT[0m
bool
config [31mCONFIG_HAVE_KPROBES[0m
bool
config [31mCONFIG_HAVE_KRETPROBES[0m
bool
config [31mCONFIG_HAVE_OPTPROBES[0m
bool
config [31mCONFIG_HAVE_KPROBES_ON_FTRACE[0m
bool
config [31mCONFIG_HAVE_FUNCTION_ERROR_INJECTION[0m
bool
config [31mCONFIG_HAVE_NMI[0m
bool
#
# An arch should select this if it provides all these things:
#
# task_pt_regs() in asm/processor.h or asm/ptrace.h
# arch_has_single_step() if there is hardware single-step support
# arch_has_block_step() if there is hardware block-step support
# asm/syscall.h supplying asm-generic/syscall.h interface
# linux/regset.h user_regset interfaces
# CORE_DUMP_USE_REGSET #define'd in linux/elf.h
# TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit}
# TIF_NOTIFY_RESUME calls tracehook_notify_resume()
# signal delivery calls tracehook_signal_handler()
#
config [31mCONFIG_HAVE_ARCH_TRACEHOOK[0m
bool
config [31mCONFIG_HAVE_DMA_CONTIGUOUS[0m
bool
config [31mCONFIG_GENERIC_SMP_IDLE_THREAD[0m
bool
config [31mCONFIG_GENERIC_IDLE_POLL_SETUP[0m
bool
config [31mCONFIG_ARCH_HAS_FORTIFY_SOURCE[0m
bool
help
An architecture should select this when it can successfully
build and run with CONFIG_FORTIFY_SOURCE.
#
# Select if the arch provides a historic keepinit alias for the retain_initrd
# command line option
#
config [31mCONFIG_ARCH_HAS_KEEPINITRD[0m
bool
# Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h
config [31mCONFIG_ARCH_HAS_SET_MEMORY[0m
bool
# Select if arch has all set_direct_map_invalid/default() functions
config [31mCONFIG_ARCH_HAS_SET_DIRECT_MAP[0m
bool
#
# Select if arch has an uncached kernel segment and provides the
# uncached_kernel_address / cached_kernel_address symbols to use it
#
config [31mCONFIG_ARCH_HAS_UNCACHED_SEGMENT[0m
select [31mCONFIG_ARCH_HAS_DMA_PREP_COHERENT[0m
bool
# Select if arch init_task must go in the __init_task_data section
config [31mCONFIG_ARCH_TASK_STRUCT_ON_STACK[0m
bool
# Select if arch has its private alloc_task_struct() function
config [31mCONFIG_ARCH_TASK_STRUCT_ALLOCATOR[0m
bool
config [31mCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST[0m
bool
depends on ![31mCONFIG_ARCH_TASK_STRUCT_ALLOCATOR[0m
help
An architecture should select this to provide hardened usercopy
knowledge about what region of the thread_struct should be
whitelisted for copying to userspace. Normally this is only the
[31mCONFIG_FPU[0m registers. Specifically, arch_thread_struct_whitelist()
should be implemented. Without this, the entire thread_struct
field in task_struct will be left whitelisted.
# Select if arch has its private alloc_thread_stack() function
config [31mCONFIG_ARCH_THREAD_STACK_ALLOCATOR[0m
bool
# Select if arch wants to size task_struct dynamically via arch_task_struct_size:
config [31mCONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT[0m
bool
config [31mCONFIG_ARCH_32BIT_OFF_T[0m
bool
depends on ![31mCONFIG_64BIT[0m
help
All new 32-bit architectures should have 64-bit off_t type on
userspace side which corresponds to the loff_t kernel type. This
is the requirement for modern ABIs. Some existing architectures
still support 32-bit off_t. This option is enabled for all such
architectures explicitly.
config [31mCONFIG_HAVE_ASM_MODVERSIONS[0m
bool
help
This symbol should be selected by an architecure if it provides
<asm/asm-prototypes.h> to support the module versioning for symbols
exported from assembly code.
config [31mCONFIG_HAVE_REGS_AND_STACK_ACCESS_API[0m
bool
help
This symbol should be selected by an architecure if it supports
the API needed to access registers and stack entries from pt_regs,
declared in asm/ptrace.h
For example the kprobes-based event tracer needs this API.
config [31mCONFIG_HAVE_RSEQ[0m
bool
depends on [31mCONFIG_HAVE_REGS_AND_STACK_ACCESS_API[0m
help
This symbol should be selected by an architecture if it
supports an implementation of restartable sequences.
config [31mCONFIG_HAVE_FUNCTION_ARG_ACCESS_API[0m
bool
help
This symbol should be selected by an architecure if it supports
the API needed to access function arguments from pt_regs,
declared in asm/ptrace.h
config [31mCONFIG_HAVE_CLK[0m
bool
help
The <linux/clk.h> calls support software clock gating and
thus are a key power management tool on many systems.
config [31mCONFIG_HAVE_HW_BREAKPOINT[0m
bool
depends on [31mCONFIG_PERF_EVENTS[0m
config [31mCONFIG_HAVE_MIXED_BREAKPOINTS_REGS[0m
bool
depends on [31mCONFIG_HAVE_HW_BREAKPOINT[0m
help
Depending on the arch implementation of hardware breakpoints,
some of them have separate registers for data and instruction
breakpoints addresses, others have mixed registers to store
them but define the access type in a control register.
Select this option if your arch implements breakpoints under the
latter fashion.
config [31mCONFIG_HAVE_USER_RETURN_NOTIFIER[0m
bool
config [31mCONFIG_HAVE_PERF_EVENTS_NMI[0m
bool
help
System hardware can generate an NMI using the perf event
subsystem. Also has support for calculating CPU cycle events
to determine how many clock cycles in a given period.
config [31mCONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF[0m
bool
depends on [31mCONFIG_HAVE_PERF_EVENTS_NMI[0m
help
The arch chooses to use the generic perf-NMI-based hardlockup
detector. Must define [31mCONFIG_HAVE_PERF_EVENTS_NMI[0m.
config [31mCONFIG_HAVE_NMI_WATCHDOG[0m
depends on [31mCONFIG_HAVE_NMI[0m
bool
help
The arch provides a low level NMI watchdog. It provides
asm/nmi.h, and defines its own arch_touch_nmi_watchdog().
config [31mCONFIG_HAVE_HARDLOCKUP_DETECTOR_ARCH[0m
bool
select [31mCONFIG_HAVE_NMI_WATCHDOG[0m
help
The arch chooses to provide its own hardlockup detector, which is
a superset of the [31mCONFIG_HAVE_NMI_WATCHDOG[0m. It also conforms to config
interfaces and parameters provided by hardlockup detector subsystem.
config [31mCONFIG_HAVE_PERF_REGS[0m
bool
help
Support selective register dumps for perf events. This includes
bit-mapping of each registers and a unique architecture id.
config [31mCONFIG_HAVE_PERF_USER_STACK_DUMP[0m
bool
help
Support user stack dumps for perf event samples. This needs
access to the user stack pointer which is not unified across
architectures.
config [31mCONFIG_HAVE_ARCH_JUMP_LABEL[0m
bool
config [31mCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE[0m
bool
config [31mCONFIG_HAVE_RCU_TABLE_FREE[0m
bool
config [31mCONFIG_HAVE_RCU_TABLE_NO_INVALIDATE[0m
bool
config [31mCONFIG_HAVE_MMU_GATHER_PAGE_SIZE[0m
bool
config [31mCONFIG_HAVE_MMU_GATHER_NO_GATHER[0m
bool
config [31mCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG[0m
bool
config [31mCONFIG_HAVE_ALIGNED_STRUCT_PAGE[0m
bool
help
This makes sure that struct pages are double word aligned and that
e.g. the [31mCONFIG_SLUB[0m allocator can perform double word atomic operations
on a struct page for better performance. However selecting this
might increase the size of a struct page by a word.
config [31mCONFIG_HAVE_CMPXCHG_LOCAL[0m
bool
config [31mCONFIG_HAVE_CMPXCHG_DOUBLE[0m
bool
config [31mCONFIG_ARCH_WEAK_RELEASE_ACQUIRE[0m
bool
config [31mCONFIG_ARCH_WANT_IPC_PARSE_VERSION[0m
bool
config [31mCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION[0m
bool
config [31mCONFIG_ARCH_WANT_OLD_COMPAT_IPC[0m
select [31mCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION[0m
bool
config [31mCONFIG_HAVE_ARCH_SECCOMP_FILTER[0m
bool
help
An arch should select this symbol if it provides all of these things:
- syscall_get_arch()
- syscall_get_arguments()
- syscall_rollback()
- syscall_set_return_value()
- SIGSYS siginfo_t support
- secure_computing is called from a ptrace_event()-safe context
- secure_computing return value is checked and a return value of -1
results in the system call being skipped immediately.
- seccomp syscall wired up
config [31mCONFIG_SECCOMP_FILTER[0m
def_bool y
depends on [31mCONFIG_HAVE_ARCH_SECCOMP_FILTER[0m && [31mCONFIG_SECCOMP[0m && [31mCONFIG_NET[0m
help
Enable tasks to build secure computing environments defined
in terms of Berkeley Packet Filter programs which implement
task-defined system call filtering polices.
See Documentation/userspace-api/seccomp_filter.rst for details.
config [31mCONFIG_HAVE_ARCH_STACKLEAK[0m
bool
help
An architecture should select this if it has the code which
fills the used part of the kernel stack with the STACKLEAK_POISON
value before returning from system calls.
config [31mCONFIG_HAVE_STACKPROTECTOR[0m
bool
help
An arch should select this symbol if:
- it has implemented a stack canary (e.g. __stack_chk_guard)
config [31mCONFIG_CC_HAS_STACKPROTECTOR_NONE[0m
def_bool $(cc-option,-fno-stack-protector)
config [31mCONFIG_STACKPROTECTOR[0m
bool "Stack Protector buffer overflow detection"
depends on [31mCONFIG_HAVE_STACKPROTECTOR[0m
depends on $(cc-option,-fstack-protector)
default y
help
This option turns on the "stack-protector" GCC feature. This
feature puts, at the beginning of functions, a canary value on
the stack just before the return address, and validates
the value just before actually returning. Stack based buffer
overflows (that need to overwrite this return address) now also
overwrite the canary, which gets detected and the attack is then
neutralized via a kernel panic.
Functions will have the stack-protector canary logic added if they
have an 8-byte or larger character array on the stack.
This feature requires gcc version 4.2 or above, or a distribution
gcc with the feature backported ("-fstack-protector").
On an x86 "defconfig" build, this feature adds canary checks to
about 3% of all kernel functions, which increases kernel code size
by about 0.3%.
config [31mCONFIG_STACKPROTECTOR_STRONG[0m
bool "Strong Stack Protector"
depends on [31mCONFIG_STACKPROTECTOR[0m
depends on $(cc-option,-fstack-protector-strong)
default y
help
Functions will have the stack-protector canary logic added in any
of the following conditions:
- local variable's address used as part of the right hand side of an
assignment or function argument
- local variable is an array (or union containing an array),
regardless of array type or length
- uses register local variables
This feature requires gcc version 4.9 or above, or a distribution
gcc with the feature backported ("-fstack-protector-strong").
On an x86 "defconfig" build, this feature adds canary checks to
about 20% of all kernel functions, which increases the kernel code
size by about 2%.
config [31mCONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES[0m
bool
help
An architecture should select this if it can walk the kernel stack
frames to determine if an object is part of either the arguments
or local variables (i.e. that it excludes saved return addresses,
and similar) by implementing an inline arch_within_stack_frames(),
which is used by CONFIG_HARDENED_USERCOPY.
config [31mCONFIG_HAVE_CONTEXT_TRACKING[0m
bool
help
Provide kernel/user boundaries probes necessary for subsystems
that need it, such as userspace RCU extended quiescent state.
Syscalls need to be wrapped inside user_exit()-user_enter() through
the slow path using TIF_NOHZ flag. Exceptions handlers must be
wrapped as well. Irqs are already protected inside
rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
irq exit still need to be protected.
config [31mCONFIG_HAVE_VIRT_CPU_ACCOUNTING[0m
bool
config [31mCONFIG_ARCH_HAS_SCALED_CPUTIME[0m
bool
config [31mCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN[0m
bool
default y if [31mCONFIG_64BIT[0m
help
With [31mCONFIG_VIRT_CPU_ACCOUNTING_GEN[0m, cputime_t becomes 64-bit.
Before enabling this option, arch code must be audited
to ensure there are no races in concurrent read/write of
cputime_t. For example, reading/writing 64-bit cputime_t on
some 32-bit arches may require multiple accesses, so proper
locking is needed to protect against concurrent accesses.
config [31mCONFIG_HAVE_IRQ_TIME_ACCOUNTING[0m
bool
help
Archs need to ensure they use a high enough resolution clock to
support irq time accounting and then call enable_sched_clock_irqtime().
config [31mCONFIG_HAVE_MOVE_PMD[0m
bool
help
Archs that select this are able to move page tables at the PMD level.
config [31mCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE[0m
bool
config [31mCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD[0m
bool
config [31mCONFIG_HAVE_ARCH_HUGE_VMAP[0m
bool
config [31mCONFIG_ARCH_WANT_HUGE_PMD_SHARE[0m
bool
config [31mCONFIG_HAVE_ARCH_SOFT_DIRTY[0m
bool
config [31mCONFIG_HAVE_MOD_ARCH_SPECIFIC[0m
bool
help
The arch uses struct mod_arch_specific to store data. Many arches
just need a simple module loader without arch specific data - those
should not enable this.
config [31mCONFIG_MODULES_USE_ELF_RELA[0m
bool
help
Modules only use ELF RELA relocations. Modules with ELF REL
relocations will give an error.
config [31mCONFIG_MODULES_USE_ELF_REL[0m
bool
help
Modules only use ELF REL relocations. Modules with ELF RELA
relocations will give an error.
config [31mCONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK[0m
bool
help
Architecture doesn't only execute the irq handler on the irq stack
but also irq_exit(). This way we can process softirqs on this irq
stack instead of switching to a new one when we call __do_softirq()
in the end of an hardirq.
This spares a stack switch and improves cache usage on softirq
processing.
config [31mCONFIG_PGTABLE_LEVELS[0m
int
default 2
config [31mCONFIG_ARCH_HAS_ELF_RANDOMIZE[0m
bool
help
An architecture supports choosing randomized locations for
stack, mmap, brk, and ET_DYN. Defined functions:
- arch_mmap_rnd()
- arch_randomize_brk()
config [31mCONFIG_HAVE_ARCH_MMAP_RND_BITS[0m
bool
help
An arch should select this symbol if it supports setting a variable
number of bits for use in establishing the base address for mmap
allocations, has [31mCONFIG_MMU[0m enabled and provides values for both:
- [31mCONFIG_ARCH_MMAP_RND_BITS_MIN[0m
- [31mCONFIG_ARCH_MMAP_RND_BITS_MAX[0m
config [31mCONFIG_HAVE_EXIT_THREAD[0m
bool
help
An architecture implements exit_thread.
config [31mCONFIG_ARCH_MMAP_RND_BITS_MIN[0m
int
config [31mCONFIG_ARCH_MMAP_RND_BITS_MAX[0m
int
config [31mCONFIG_ARCH_MMAP_RND_BITS_DEFAULT[0m
int
config [31mCONFIG_ARCH_MMAP_RND_BITS[0m
int "Number of bits to use for ASLR of mmap base address" if [31mCONFIG_EXPERT[0m
range [31mCONFIG_ARCH_MMAP_RND_BITS_MIN[0m [31mCONFIG_ARCH_MMAP_RND_BITS_MAX[0m
default [31mCONFIG_ARCH_MMAP_RND_BITS_DEFAULT[0m if [31mCONFIG_ARCH_MMAP_RND_BITS_DEFAULT[0m
default [31mCONFIG_ARCH_MMAP_RND_BITS_MIN[0m
depends on [31mCONFIG_HAVE_ARCH_MMAP_RND_BITS[0m
help
This value can be used to select the number of bits to use to
determine the random offset to the base address of vma regions
resulting from mmap allocations. This value will be bounded
by the architecture's minimum and maximum supported values.
This value can be changed after boot using the
/proc/sys/vm/mmap_rnd_bits tunable
config [31mCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS[0m
bool
help
An arch should select this symbol if it supports running applications
in compatibility mode, supports setting a variable number of bits for
use in establishing the base address for mmap allocations, has [31mCONFIG_MMU[0m
enabled and provides values for both:
- [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN[0m
- [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX[0m
config [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN[0m
int
config [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX[0m
int
config [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS_DEFAULT[0m
int
config [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS[0m
int "Number of bits to use for ASLR of mmap base address for compatible applications" if [31mCONFIG_EXPERT[0m
range [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN[0m [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX[0m
default [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS_DEFAULT[0m if [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS_DEFAULT[0m
default [31mCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN[0m
depends on [31mCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS[0m
help
This value can be used to select the number of bits to use to
determine the random offset to the base address of vma regions
resulting from mmap allocations for compatible applications This
value will be bounded by the architecture's minimum and maximum
supported values.
This value can be changed after boot using the
/proc/sys/vm/mmap_rnd_compat_bits tunable
config [31mCONFIG_HAVE_ARCH_COMPAT_MMAP_BASES[0m
bool
help
This allows 64bit applications to invoke 32-bit mmap() syscall
and vice-versa 32-bit applications to call 64-bit mmap().
Required for applications doing different bitness syscalls.
# This allows to use a set of generic functions to determine mmap base
# address by giving priority to top-down scheme only if the process
# is not in legacy mode (compat task, unlimited stack size or
# sysctl_legacy_va_layout).
# Architecture that selects this option can provide its own version of:
# - STACK_RND_MASK
config [31mCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT[0m
bool
depends on [31mCONFIG_MMU[0m
select [31mCONFIG_ARCH_HAS_ELF_RANDOMIZE[0m
config [31mCONFIG_HAVE_COPY_THREAD_TLS[0m
bool
help
Architecture provides copy_thread_tls to accept tls argument via
normal [31mCONFIG_C[0m parameter passing, rather than extracting the syscall
argument from pt_regs.
config [31mCONFIG_HAVE_STACK_VALIDATION[0m
bool
help
Architecture supports the 'objtool check' host tool command, which
performs compile-time stack metadata validation.
config [31mCONFIG_HAVE_RELIABLE_STACKTRACE[0m
bool
help
Architecture has a save_stack_trace_tsk_reliable() function which
only returns a stack trace if it can guarantee the trace is reliable.
config [31mCONFIG_HAVE_ARCH_HASH[0m
bool
default n
help
If this is set, the architecture provides an <asm/hash.h>
file which provides platform-specific implementations of some
functions in <linux/hash.h> or fs/namei.c.
config [31mCONFIG_HAVE_ARCH_NVRAM_OPS[0m
bool
config [31mCONFIG_ISA_BUS_API[0m
def_bool [31mCONFIG_ISA[0m
#
# ABI hall of shame
#
config [31mCONFIG_CLONE_BACKWARDS[0m
bool
help
Architecture has tls passed as the 4th argument of clone(2),
not the 5th one.
config [31mCONFIG_CLONE_BACKWARDS2[0m
bool
help
Architecture has the first two arguments of clone(2) swapped.
config [31mCONFIG_CLONE_BACKWARDS3[0m
bool
help
Architecture has tls passed as the 3rd argument of clone(2),
not the 5th one.
config [31mCONFIG_ODD_RT_SIGACTION[0m
bool
help
Architecture has unusual rt_sigaction(2) arguments
config [31mCONFIG_OLD_SIGSUSPEND[0m
bool
help
Architecture has old sigsuspend(2) syscall, of one-argument variety
config [31mCONFIG_OLD_SIGSUSPEND3[0m
bool
help
Even weirder antique ABI - three-argument sigsuspend(2)
config [31mCONFIG_OLD_SIGACTION[0m
bool
help
Architecture has old sigaction(2) syscall. Nope, not the same
as [31mCONFIG_OLD_SIGSUSPEND[0m | [31mCONFIG_OLD_SIGSUSPEND3[0m - alpha has sigsuspend(2),
but fairly different variant of sigaction(2), thanks to OSF/1
compatibility...
config [31mCONFIG_COMPAT_OLD_SIGACTION[0m
bool
config [31mCONFIG_64BIT_TIME[0m
def_bool y
help
This should be selected by all architectures that need to support
new system calls with a 64-bit time_t. This is relevant on all 32-bit
architectures, and 64-bit architectures as part of compat syscall
handling.
config [31mCONFIG_COMPAT_32BIT_TIME[0m
def_bool ![31mCONFIG_64BIT[0m || [31mCONFIG_COMPAT[0m
help
This enables 32 bit time_t support in addition to 64 bit time_t support.
This is relevant on all 32-bit architectures, and 64-bit architectures
as part of compat syscall handling.
config [31mCONFIG_ARCH_NO_PREEMPT[0m
bool
config [31mCONFIG_ARCH_SUPPORTS_RT[0m
bool
config [31mCONFIG_CPU_NO_EFFICIENT_FFS[0m
def_bool n
config [31mCONFIG_HAVE_ARCH_VMAP_STACK[0m
def_bool n
help
An arch should select this symbol if it can support kernel stacks
in vmalloc space. This means:
- vmalloc space must be large enough to hold many kernel stacks.
This may rule out many 32-bit architectures.
- Stacks in vmalloc space need to work reliably. For example, if
vmap page tables are created on demand, either this mechanism
needs to work while the stack points to a virtual address with
unpopulated page tables or arch code (switch_to() and switch_mm(),
most likely) needs to ensure that the stack's page table entries
are populated before running on a possibly unpopulated stack.
- If the stack overflows into a guard page, something reasonable
should happen. The definition of "reasonable" is flexible, but
instantly rebooting without logging anything would be unfriendly.
config [31mCONFIG_VMAP_STACK[0m
default y
bool "Use a virtually-mapped stack"
depends on [31mCONFIG_HAVE_ARCH_VMAP_STACK[0m && ![31mCONFIG_KASAN[0m
---help---
Enable this if you want the use virtually-mapped kernel stacks
with guard pages. This causes kernel stack overflows to be
caught immediately rather than causing difficult-to-diagnose
corruption.
This is presently incompatible with [31mCONFIG_KASAN[0m because [31mCONFIG_KASAN[0m expects
the stack to map directly to the [31mCONFIG_KASAN[0m shadow map using a formula
that is incorrect if the stack is in vmalloc space.
config [31mCONFIG_ARCH_OPTIONAL_KERNEL_RWX[0m
def_bool n
config [31mCONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT[0m
def_bool n
config [31mCONFIG_ARCH_HAS_STRICT_KERNEL_RWX[0m
def_bool n
config [31mCONFIG_STRICT_KERNEL_RWX[0m
bool "Make kernel text and rodata read-only" if [31mCONFIG_ARCH_OPTIONAL_KERNEL_RWX[0m
depends on [31mCONFIG_ARCH_HAS_STRICT_KERNEL_RWX[0m
default ![31mCONFIG_ARCH_OPTIONAL_KERNEL_RWX[0m || [31mCONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT[0m
help
If this is set, kernel text and rodata memory will be made read-only,
and non-text memory will be made non-executable. This provides
protection against certain security exploits (e.g. executing the heap
or modifying text)
These features are considered standard security practice these days.
You should say Y here in almost all cases.
config [31mCONFIG_ARCH_HAS_STRICT_MODULE_RWX[0m
def_bool n
config [31mCONFIG_STRICT_MODULE_RWX[0m
bool "Set loadable kernel module data as NX and text as RO" if [31mCONFIG_ARCH_OPTIONAL_KERNEL_RWX[0m
depends on [31mCONFIG_ARCH_HAS_STRICT_MODULE_RWX[0m && [31mCONFIG_MODULES[0m
default ![31mCONFIG_ARCH_OPTIONAL_KERNEL_RWX[0m || [31mCONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT[0m
help
If this is set, module text and rodata memory will be made read-only,
and non-text memory will be made non-executable. This provides
protection against certain security exploits (e.g. writing to text)
# select if the architecture provides an asm/dma-direct.h header
config [31mCONFIG_ARCH_HAS_PHYS_TO_DMA[0m
bool
config [31mCONFIG_ARCH_HAS_REFCOUNT[0m
bool
help
An architecture selects this when it has implemented refcount_t
using open coded assembly primitives that provide an optimized
refcount_t implementation, possibly at the expense of some full
refcount state checks of CONFIG_REFCOUNT_FULL=y.
The refcount overflow check behavior, however, must be retained.
Catching overflows is the primary security concern for protecting
against bugs in reference counts.
config [31mCONFIG_REFCOUNT_FULL[0m
bool "Perform full reference count validation at the expense of speed"
help
Enabling this switches the refcounting infrastructure from a fast
unchecked atomic_t implementation to a fully state checked
implementation, which can be (slightly) slower but provides protections
against various use-after-free conditions that can be used in
security flaw exploits.
config [31mCONFIG_HAVE_ARCH_COMPILER_H[0m
bool
help
An architecture can select this if it provides an
asm/compiler.h header that should be included after
linux/compiler-*.h in order to override macro definitions that those
headers generally provide.
config [31mCONFIG_HAVE_ARCH_PREL32_RELOCATIONS[0m
bool
help
May be selected by an architecture if it supports place-relative
32-bit relocations, both in the toolchain and in the module loader,
in which case relative references can be used in special sections
for [31mCONFIG_PCI[0m fixup, initcalls etc which are only half the size on 64 bit
architectures, and don't require runtime relocation on relocatable
kernels.
config [31mCONFIG_ARCH_USE_MEMREMAP_PROT[0m
bool
config [31mCONFIG_LOCK_EVENT_COUNTS[0m
bool "Locking event counts collection"
depends on [31mCONFIG_DEBUG_FS[0m
---help---
Enable light-weight counting of various locking related events
in the system with minimal performance impact. This reduces
the chance of application behavior change because of timing
differences. The counts are reported via debugfs.
# Select if the architecture has support for applying [31mCONFIG_RELR[0m relocations.
config [31mCONFIG_ARCH_HAS_RELR[0m
bool
config [31mCONFIG_RELR[0m
bool "Use RELR relocation packing"
depends on [31mCONFIG_ARCH_HAS_RELR[0m && [31mCONFIG_TOOLS_SUPPORT_RELR[0m
default y
help
Store the kernel's dynamic relocations in the [31mCONFIG_RELR[0m relocation packing
format. Requires a compatible linker (LLD supports this feature), as
well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy
are compatible).
config [31mCONFIG_ARCH_HAS_MEM_ENCRYPT[0m
bool
source "kernel/gcov/Kconfig"
source "scripts/gcc-plugins/Kconfig"
endmenu