2 # General architecture dependent options
6 tristate "OProfile system profiling"
8 depends on HAVE_OPROFILE
9 depends on !PREEMPT_RT_FULL
11 select RING_BUFFER_ALLOW_SWAP
13 OProfile is a profiling system capable of profiling the
14 whole system, include the kernel, kernel modules, libraries,
19 config OPROFILE_EVENT_MULTIPLEX
20 bool "OProfile multiplexing support (EXPERIMENTAL)"
22 depends on OPROFILE && X86
24 The number of hardware counters is limited. The multiplexing
25 feature enables OProfile to gather more events than counters
26 are provided by the hardware. This is realized by switching
27 between events at an user specified time interval.
34 config OPROFILE_NMI_TIMER
36 depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
41 depends on HAVE_KPROBES
44 Kprobes allows you to trap at almost any kernel address and
45 execute a callback function. register_kprobe() establishes
46 a probepoint and specifies the callback. Kprobes is useful
47 for kernel debugging, non-intrusive instrumentation and testing.
51 bool "Optimize very unlikely/likely branches"
52 depends on HAVE_ARCH_JUMP_LABEL
54 This option enables a transparent branch optimization that
55 makes certain almost-always-true or almost-always-false branch
56 conditions even cheaper to execute within the kernel.
58 Certain performance-sensitive kernel code, such as trace points,
59 scheduler functionality, networking code and KVM have such
60 branches and include support for this optimization technique.
62 If it is detected that the compiler has support for "asm goto",
63 the kernel will compile such branches with just a nop
64 instruction. When the condition flag is toggled to true, the
65 nop will be converted to a jump instruction to execute the
66 conditional block of instructions.
68 This technique lowers overhead and stress on the branch prediction
69 of the processor and generally makes the kernel faster. The update
70 of the condition is slower, but those are always very rare.
72 ( On 32-bit x86, the necessary options added to the compiler
73 flags may increase the size of the kernel slightly. )
77 depends on KPROBES && HAVE_OPTPROBES
80 config KPROBES_ON_FTRACE
82 depends on KPROBES && HAVE_KPROBES_ON_FTRACE
83 depends on DYNAMIC_FTRACE_WITH_REGS
85 If function tracer is enabled and the arch supports full
86 passing of pt_regs to function tracing, then kprobes can
87 optimize on top of function tracing.
93 Uprobes is the user-space counterpart to kprobes: they
94 enable instrumentation applications (such as 'perf probe')
95 to establish unintrusive probes in user-space binaries and
96 libraries, by executing handler functions when the probes
97 are hit by user-space applications.
99 ( These probes come in the form of single-byte breakpoints,
100 managed by the kernel and kept transparent to the probed
103 config HAVE_64BIT_ALIGNED_ACCESS
104 def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS
106 Some architectures require 64 bit accesses to be 64 bit
107 aligned, which also requires structs containing 64 bit values
108 to be 64 bit aligned too. This includes some 32 bit
109 architectures which can do 64 bit accesses, as well as 64 bit
110 architectures without unaligned access.
112 This symbol should be selected by an architecture if 64 bit
113 accesses are required to be 64 bit aligned in this way even
114 though it is not a 64 bit architecture.
116 See Documentation/unaligned-memory-access.txt for more
117 information on the topic of unaligned memory accesses.
119 config HAVE_EFFICIENT_UNALIGNED_ACCESS
122 Some architectures are unable to perform unaligned accesses
123 without the use of get_unaligned/put_unaligned. Others are
124 unable to perform such accesses efficiently (e.g. trap on
125 unaligned access and require fixing it up in the exception
128 This symbol should be selected by an architecture if it can
129 perform unaligned accesses efficiently to allow different
130 code paths to be selected for these cases. Some network
131 drivers, for example, could opt to not fix up alignment
132 problems with received packets if doing so would not help
135 See Documentation/unaligned-memory-access.txt for more
136 information on the topic of unaligned memory accesses.
138 config ARCH_USE_BUILTIN_BSWAP
141 Modern versions of GCC (since 4.4) have builtin functions
142 for handling byte-swapping. Using these, instead of the old
143 inline assembler that the architecture code provides in the
144 __arch_bswapXX() macros, allows the compiler to see what's
145 happening and offers more opportunity for optimisation. In
146 particular, the compiler will be able to combine the byteswap
147 with a nearby load or store and use load-and-swap or
148 store-and-swap instructions if the architecture has them. It
149 should almost *never* result in code which is worse than the
150 hand-coded assembler in <asm/swab.h>. But just in case it
151 does, the use of the builtins is optional.
153 Any architecture with load-and-swap or store-and-swap
154 instructions should set this. And it shouldn't hurt to set it
155 on architectures that don't have such instructions.
159 depends on KPROBES && HAVE_KRETPROBES
161 config USER_RETURN_NOTIFIER
163 depends on HAVE_USER_RETURN_NOTIFIER
165 Provide a kernel-internal notification when a cpu is about to
168 config HAVE_IOREMAP_PROT
174 config HAVE_KRETPROBES
177 config HAVE_OPTPROBES
180 config HAVE_KPROBES_ON_FTRACE
183 config HAVE_NMI_WATCHDOG
186 # An arch should select this if it provides all these things:
188 # task_pt_regs() in asm/processor.h or asm/ptrace.h
189 # arch_has_single_step() if there is hardware single-step support
190 # arch_has_block_step() if there is hardware block-step support
191 # asm/syscall.h supplying asm-generic/syscall.h interface
192 # linux/regset.h user_regset interfaces
193 # CORE_DUMP_USE_REGSET #define'd in linux/elf.h
194 # TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit}
195 # TIF_NOTIFY_RESUME calls tracehook_notify_resume()
196 # signal delivery calls tracehook_signal_handler()
198 config HAVE_ARCH_TRACEHOOK
201 config HAVE_DMA_ATTRS
204 config HAVE_DMA_CONTIGUOUS
207 config GENERIC_SMP_IDLE_THREAD
210 config GENERIC_IDLE_POLL_SETUP
213 # Select if arch init_task initializer is different to init/init_task.c
214 config ARCH_INIT_TASK
217 # Select if arch has its private alloc_task_struct() function
218 config ARCH_TASK_STRUCT_ALLOCATOR
221 # Select if arch has its private alloc_thread_info() function
222 config ARCH_THREAD_INFO_ALLOCATOR
225 config HAVE_REGS_AND_STACK_ACCESS_API
228 This symbol should be selected by an architecure if it supports
229 the API needed to access registers and stack entries from pt_regs,
230 declared in asm/ptrace.h
231 For example the kprobes-based event tracer needs this API.
236 The <linux/clk.h> calls support software clock gating and
237 thus are a key power management tool on many systems.
239 config HAVE_DMA_API_DEBUG
242 config HAVE_HW_BREAKPOINT
244 depends on PERF_EVENTS
246 config HAVE_MIXED_BREAKPOINTS_REGS
248 depends on HAVE_HW_BREAKPOINT
250 Depending on the arch implementation of hardware breakpoints,
251 some of them have separate registers for data and instruction
252 breakpoints addresses, others have mixed registers to store
253 them but define the access type in a control register.
254 Select this option if your arch implements breakpoints under the
257 config HAVE_USER_RETURN_NOTIFIER
260 config HAVE_PERF_EVENTS_NMI
263 System hardware can generate an NMI using the perf event
264 subsystem. Also has support for calculating CPU cycle events
265 to determine how many clock cycles in a given period.
267 config HAVE_PERF_REGS
270 Support selective register dumps for perf events. This includes
271 bit-mapping of each registers and a unique architecture id.
273 config HAVE_PERF_USER_STACK_DUMP
276 Support user stack dumps for perf event samples. This needs
277 access to the user stack pointer which is not unified across
280 config HAVE_ARCH_JUMP_LABEL
283 config HAVE_RCU_TABLE_FREE
286 config ARCH_HAVE_NMI_SAFE_CMPXCHG
289 config HAVE_ALIGNED_STRUCT_PAGE
292 This makes sure that struct pages are double word aligned and that
293 e.g. the SLUB allocator can perform double word atomic operations
294 on a struct page for better performance. However selecting this
295 might increase the size of a struct page by a word.
297 config HAVE_CMPXCHG_LOCAL
300 config HAVE_CMPXCHG_DOUBLE
303 config ARCH_WANT_IPC_PARSE_VERSION
306 config ARCH_WANT_COMPAT_IPC_PARSE_VERSION
309 config ARCH_WANT_OLD_COMPAT_IPC
310 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
313 config HAVE_ARCH_SECCOMP_FILTER
316 An arch should select this symbol if it provides all of these things:
318 - syscall_get_arguments()
320 - syscall_set_return_value()
321 - SIGSYS siginfo_t support
322 - secure_computing is called from a ptrace_event()-safe context
323 - secure_computing return value is checked and a return value of -1
324 results in the system call being skipped immediately.
325 - seccomp syscall wired up
327 For best performance, an arch should use seccomp_phase1 and
328 seccomp_phase2 directly. It should call seccomp_phase1 for all
329 syscalls if TIF_SECCOMP is set, but seccomp_phase1 does not
330 need to be called from a ptrace-safe context. It must then
331 call seccomp_phase2 if seccomp_phase1 returns anything other
332 than SECCOMP_PHASE1_OK or SECCOMP_PHASE1_SKIP.
334 As an additional optimization, an arch may provide seccomp_data
335 directly to seccomp_phase1; this avoids multiple calls
336 to the syscall_xyz helpers for every syscall.
338 config SECCOMP_FILTER
340 depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
342 Enable tasks to build secure computing environments defined
343 in terms of Berkeley Packet Filter programs which implement
344 task-defined system call filtering polices.
346 See Documentation/prctl/seccomp_filter.txt for details.
348 config HAVE_CC_STACKPROTECTOR
351 An arch should select this symbol if:
352 - its compiler supports the -fstack-protector option
353 - it has implemented a stack canary (e.g. __stack_chk_guard)
355 config CC_STACKPROTECTOR
358 Set when a stack-protector mode is enabled, so that the build
359 can enable kernel-side support for the GCC feature.
362 prompt "Stack Protector buffer overflow detection"
363 depends on HAVE_CC_STACKPROTECTOR
364 default CC_STACKPROTECTOR_NONE
366 This option turns on the "stack-protector" GCC feature. This
367 feature puts, at the beginning of functions, a canary value on
368 the stack just before the return address, and validates
369 the value just before actually returning. Stack based buffer
370 overflows (that need to overwrite this return address) now also
371 overwrite the canary, which gets detected and the attack is then
372 neutralized via a kernel panic.
374 config CC_STACKPROTECTOR_NONE
377 Disable "stack-protector" GCC feature.
379 config CC_STACKPROTECTOR_REGULAR
381 select CC_STACKPROTECTOR
383 Functions will have the stack-protector canary logic added if they
384 have an 8-byte or larger character array on the stack.
386 This feature requires gcc version 4.2 or above, or a distribution
387 gcc with the feature backported ("-fstack-protector").
389 On an x86 "defconfig" build, this feature adds canary checks to
390 about 3% of all kernel functions, which increases kernel code size
393 config CC_STACKPROTECTOR_STRONG
395 select CC_STACKPROTECTOR
397 Functions will have the stack-protector canary logic added in any
398 of the following conditions:
400 - local variable's address used as part of the right hand side of an
401 assignment or function argument
402 - local variable is an array (or union containing an array),
403 regardless of array type or length
404 - uses register local variables
406 This feature requires gcc version 4.9 or above, or a distribution
407 gcc with the feature backported ("-fstack-protector-strong").
409 On an x86 "defconfig" build, this feature adds canary checks to
410 about 20% of all kernel functions, which increases the kernel code
415 config HAVE_CONTEXT_TRACKING
418 Provide kernel/user boundaries probes necessary for subsystems
419 that need it, such as userspace RCU extended quiescent state.
420 Syscalls need to be wrapped inside user_exit()-user_enter() through
421 the slow path using TIF_NOHZ flag. Exceptions handlers must be
422 wrapped as well. Irqs are already protected inside
423 rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
424 irq exit still need to be protected.
426 config HAVE_VIRT_CPU_ACCOUNTING
429 config HAVE_VIRT_CPU_ACCOUNTING_GEN
433 With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit.
434 Before enabling this option, arch code must be audited
435 to ensure there are no races in concurrent read/write of
436 cputime_t. For example, reading/writing 64-bit cputime_t on
437 some 32-bit arches may require multiple accesses, so proper
438 locking is needed to protect against concurrent accesses.
441 config HAVE_IRQ_TIME_ACCOUNTING
444 Archs need to ensure they use a high enough resolution clock to
445 support irq time accounting and then call enable_sched_clock_irqtime().
447 config HAVE_ARCH_TRANSPARENT_HUGEPAGE
450 config HAVE_ARCH_HUGE_VMAP
453 config HAVE_ARCH_SOFT_DIRTY
456 config HAVE_MOD_ARCH_SPECIFIC
459 The arch uses struct mod_arch_specific to store data. Many arches
460 just need a simple module loader without arch specific data - those
461 should not enable this.
463 config MODULES_USE_ELF_RELA
466 Modules only use ELF RELA relocations. Modules with ELF REL
467 relocations will give an error.
469 config MODULES_USE_ELF_REL
472 Modules only use ELF REL relocations. Modules with ELF RELA
473 relocations will give an error.
475 config HAVE_UNDERSCORE_SYMBOL_PREFIX
478 Some architectures generate an _ in front of C symbols; things like
479 module loading and assembly files need to know about this.
481 config HAVE_IRQ_EXIT_ON_IRQ_STACK
484 Architecture doesn't only execute the irq handler on the irq stack
485 but also irq_exit(). This way we can process softirqs on this irq
486 stack instead of switching to a new one when we call __do_softirq()
487 in the end of an hardirq.
488 This spares a stack switch and improves cache usage on softirq
491 config PGTABLE_LEVELS
495 config ARCH_HAS_ELF_RANDOMIZE
498 An architecture supports choosing randomized locations for
499 stack, mmap, brk, and ET_DYN. Defined functions:
501 - arch_randomize_brk()
506 config CLONE_BACKWARDS
509 Architecture has tls passed as the 4th argument of clone(2),
512 config CLONE_BACKWARDS2
515 Architecture has the first two arguments of clone(2) swapped.
517 config CLONE_BACKWARDS3
520 Architecture has tls passed as the 3rd argument of clone(2),
523 config ODD_RT_SIGACTION
526 Architecture has unusual rt_sigaction(2) arguments
528 config OLD_SIGSUSPEND
531 Architecture has old sigsuspend(2) syscall, of one-argument variety
533 config OLD_SIGSUSPEND3
536 Even weirder antique ABI - three-argument sigsuspend(2)
541 Architecture has old sigaction(2) syscall. Nope, not the same
542 as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2),
543 but fairly different variant of sigaction(2), thanks to OSF/1
546 config COMPAT_OLD_SIGACTION
549 source "kernel/gcov/Kconfig"