1
2
3
4
5config CRASH_CORE
6 bool
7
8config KEXEC_CORE
9 select CRASH_CORE
10 bool
11
12config OPROFILE
13 tristate "OProfile system profiling"
14 depends on PROFILING
15 depends on HAVE_OPROFILE
16 select RING_BUFFER
17 select RING_BUFFER_ALLOW_SWAP
18 help
19 OProfile is a profiling system capable of profiling the
20 whole system, include the kernel, kernel modules, libraries,
21 and applications.
22
23 If unsure, say N.
24
25config OPROFILE_EVENT_MULTIPLEX
26 bool "OProfile multiplexing support (EXPERIMENTAL)"
27 default n
28 depends on OPROFILE && X86
29 help
30 The number of hardware counters is limited. The multiplexing
31 feature enables OProfile to gather more events than counters
32 are provided by the hardware. This is realized by switching
33 between events at an user specified time interval.
34
35 If unsure, say N.
36
37config HAVE_OPROFILE
38 bool
39
40config OPROFILE_NMI_TIMER
41 def_bool y
42 depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
43
44config KPROBES
45 bool "Kprobes"
46 depends on MODULES
47 depends on HAVE_KPROBES
48 select KALLSYMS
49 help
50 Kprobes allows you to trap at almost any kernel address and
51 execute a callback function. register_kprobe() establishes
52 a probepoint and specifies the callback. Kprobes is useful
53 for kernel debugging, non-intrusive instrumentation and testing.
54 If in doubt, say "N".
55
56config JUMP_LABEL
57 bool "Optimize very unlikely/likely branches"
58 depends on HAVE_ARCH_JUMP_LABEL
59 help
60 This option enables a transparent branch optimization that
61 makes certain almost-always-true or almost-always-false branch
62 conditions even cheaper to execute within the kernel.
63
64 Certain performance-sensitive kernel code, such as trace points,
65 scheduler functionality, networking code and KVM have such
66 branches and include support for this optimization technique.
67
68 If it is detected that the compiler has support for "asm goto",
69 the kernel will compile such branches with just a nop
70 instruction. When the condition flag is toggled to true, the
71 nop will be converted to a jump instruction to execute the
72 conditional block of instructions.
73
74 This technique lowers overhead and stress on the branch prediction
75 of the processor and generally makes the kernel faster. The update
76 of the condition is slower, but those are always very rare.
77
78 ( On 32-bit x86, the necessary options added to the compiler
79 flags may increase the size of the kernel slightly. )
80
81config OPTPROBES
82 def_bool y
83 depends on KPROBES && HAVE_OPTPROBES
84 depends on !PREEMPT
85
86config KPROBES_ON_FTRACE
87 def_bool y
88 depends on KPROBES && HAVE_KPROBES_ON_FTRACE
89 depends on DYNAMIC_FTRACE_WITH_REGS
90 help
91 If function tracer is enabled and the arch supports full
92 passing of pt_regs to function tracing, then kprobes can
93 optimize on top of function tracing.
94
95config UPROBES
96 bool "Transparent user-space probes (EXPERIMENTAL)"
97 depends on UPROBE_EVENT && PERF_EVENTS
98 default n
99 select PERCPU_RWSEM
100 help
101 Uprobes is the user-space counterpart to kprobes: they
102 enable instrumentation applications (such as 'perf probe')
103 to establish unintrusive probes in user-space binaries and
104 libraries, by executing handler functions when the probes
105 are hit by user-space applications.
106
107 ( These probes come in the form of single-byte breakpoints,
108 managed by the kernel and kept transparent to the probed
109 application. )
110
111 If in doubt, say "N".
112
113config HAVE_64BIT_ALIGNED_ACCESS
114 def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS
115 help
116 Some architectures require 64 bit accesses to be 64 bit
117 aligned, which also requires structs containing 64 bit values
118 to be 64 bit aligned too. This includes some 32 bit
119 architectures which can do 64 bit accesses, as well as 64 bit
120 architectures without unaligned access.
121
122 This symbol should be selected by an architecture if 64 bit
123 accesses are required to be 64 bit aligned in this way even
124 though it is not a 64 bit architecture.
125
126 See Documentation/unaligned-memory-access.txt for more
127 information on the topic of unaligned memory accesses.
128
129config HAVE_EFFICIENT_UNALIGNED_ACCESS
130 bool
131 help
132 Some architectures are unable to perform unaligned accesses
133 without the use of get_unaligned/put_unaligned. Others are
134 unable to perform such accesses efficiently (e.g. trap on
135 unaligned access and require fixing it up in the exception
136 handler.)
137
138 This symbol should be selected by an architecture if it can
139 perform unaligned accesses efficiently to allow different
140 code paths to be selected for these cases. Some network
141 drivers, for example, could opt to not fix up alignment
142 problems with received packets if doing so would not help
143 much.
144
145 See Documentation/unaligned-memory-access.txt for more
146 information on the topic of unaligned memory accesses.
147
148config ARCH_USE_BUILTIN_BSWAP
149 bool
150 help
151 Modern versions of GCC (since 4.4) have builtin functions
152 for handling byte-swapping. Using these, instead of the old
153 inline assembler that the architecture code provides in the
154 __arch_bswapXX() macros, allows the compiler to see what's
155 happening and offers more opportunity for optimisation. In
156 particular, the compiler will be able to combine the byteswap
157 with a nearby load or store and use load-and-swap or
158 store-and-swap instructions if the architecture has them. It
159 should almost *never* result in code which is worse than the
160 hand-coded assembler in <asm/swab.h>. But just in case it
161 does, the use of the builtins is optional.
162
163 Any architecture with load-and-swap or store-and-swap
164 instructions should set this. And it shouldn't hurt to set it
165 on architectures that don't have such instructions.
166
167config KRETPROBES
168 def_bool y
169 depends on KPROBES && HAVE_KRETPROBES
170
171config USER_RETURN_NOTIFIER
172 bool
173 depends on HAVE_USER_RETURN_NOTIFIER
174 help
175 Provide a kernel-internal notification when a cpu is about to
176 switch to user mode.
177
178config HAVE_IOREMAP_PROT
179 bool
180
181config HAVE_KPROBES
182 bool
183
184config HAVE_KRETPROBES
185 bool
186
187config HAVE_OPTPROBES
188 bool
189
190config HAVE_KPROBES_ON_FTRACE
191 bool
192
193config HAVE_NMI_WATCHDOG
194 bool
195
196
197
198
199
200
201
202
203
204
205
206
207
208config HAVE_ARCH_TRACEHOOK
209 bool
210
211config HAVE_DMA_ATTRS
212 bool
213
214config HAVE_DMA_CONTIGUOUS
215 bool
216
217config USE_GENERIC_SMP_HELPERS
218 bool
219
220config GENERIC_SMP_IDLE_THREAD
221 bool
222
223config GENERIC_IDLE_POLL_SETUP
224 bool
225
226
227config ARCH_INIT_TASK
228 bool
229
230
231config ARCH_TASK_STRUCT_ALLOCATOR
232 bool
233
234
235config ARCH_THREAD_INFO_ALLOCATOR
236 bool
237
238config HAVE_REGS_AND_STACK_ACCESS_API
239 bool
240 help
241 This symbol should be selected by an architecure if it supports
242 the API needed to access registers and stack entries from pt_regs,
243 declared in asm/ptrace.h
244 For example the kprobes-based event tracer needs this API.
245
246config HAVE_CLK
247 bool
248 help
249 The <linux/clk.h> calls support software clock gating and
250 thus are a key power management tool on many systems.
251
252config HAVE_DMA_API_DEBUG
253 bool
254
255config HAVE_HW_BREAKPOINT
256 bool
257 depends on PERF_EVENTS
258
259config HAVE_MIXED_BREAKPOINTS_REGS
260 bool
261 depends on HAVE_HW_BREAKPOINT
262 help
263 Depending on the arch implementation of hardware breakpoints,
264 some of them have separate registers for data and instruction
265 breakpoints addresses, others have mixed registers to store
266 them but define the access type in a control register.
267 Select this option if your arch implements breakpoints under the
268 latter fashion.
269
270config HAVE_USER_RETURN_NOTIFIER
271 bool
272
273config HAVE_PERF_EVENTS_NMI
274 bool
275 help
276 System hardware can generate an NMI using the perf event
277 subsystem. Also has support for calculating CPU cycle events
278 to determine how many clock cycles in a given period.
279
280config HAVE_PERF_REGS
281 bool
282 help
283 Support selective register dumps for perf events. This includes
284 bit-mapping of each registers and a unique architecture id.
285
286config HAVE_PERF_USER_STACK_DUMP
287 bool
288 help
289 Support user stack dumps for perf event samples. This needs
290 access to the user stack pointer which is not unified across
291 architectures.
292
293config HAVE_ARCH_JUMP_LABEL
294 bool
295
296config HAVE_RCU_TABLE_FREE
297 bool
298
299config ARCH_HAVE_NMI_SAFE_CMPXCHG
300 bool
301
302config HAVE_ALIGNED_STRUCT_PAGE
303 bool
304 help
305 This makes sure that struct pages are double word aligned and that
306 e.g. the SLUB allocator can perform double word atomic operations
307 on a struct page for better performance. However selecting this
308 might increase the size of a struct page by a word.
309
310config HAVE_CMPXCHG_LOCAL
311 bool
312
313config HAVE_CMPXCHG_DOUBLE
314 bool
315
316config ARCH_WANT_IPC_PARSE_VERSION
317 bool
318
319config ARCH_WANT_COMPAT_IPC_PARSE_VERSION
320 bool
321
322config ARCH_WANT_OLD_COMPAT_IPC
323 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
324 bool
325
326config HAVE_ARCH_SECCOMP_FILTER
327 bool
328 help
329 An arch should select this symbol if it provides all of these things:
330 - syscall_get_arch()
331 - syscall_get_arguments()
332 - syscall_rollback()
333 - syscall_set_return_value()
334 - SIGSYS siginfo_t support
335 - secure_computing is called from a ptrace_event()-safe context
336 - secure_computing return value is checked and a return value of -1
337 results in the system call being skipped immediately.
338
339config SECCOMP_FILTER
340 def_bool y
341 depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
342 help
343 Enable tasks to build secure computing environments defined
344 in terms of Berkeley Packet Filter programs which implement
345 task-defined system call filtering polices.
346
347 See Documentation/prctl/seccomp_filter.txt for details.
348
349config HAVE_CC_STACKPROTECTOR
350 bool
351 help
352 An arch should select this symbol if:
353 - its compiler supports the -fstack-protector option
354 - it has implemented a stack canary (e.g. __stack_chk_guard)
355
356config CC_STACKPROTECTOR
357 def_bool n
358 help
359 Set when a stack-protector mode is enabled, so that the build
360 can enable kernel-side support for the GCC feature.
361
362choice
363 prompt "Stack Protector buffer overflow detection"
364 depends on HAVE_CC_STACKPROTECTOR
365 default CC_STACKPROTECTOR_NONE
366 help
367 This option turns on the "stack-protector" GCC feature. This
368 feature puts, at the beginning of functions, a canary value on
369 the stack just before the return address, and validates
370 the value just before actually returning. Stack based buffer
371 overflows (that need to overwrite this return address) now also
372 overwrite the canary, which gets detected and the attack is then
373 neutralized via a kernel panic.
374
375config CC_STACKPROTECTOR_NONE
376 bool "None"
377 help
378 Disable "stack-protector" GCC feature.
379
380config CC_STACKPROTECTOR_REGULAR
381 bool "Regular"
382 select CC_STACKPROTECTOR
383 help
384 Functions will have the stack-protector canary logic added if they
385 have an 8-byte or larger character array on the stack.
386
387 This feature requires gcc version 4.2 or above, or a distribution
388 gcc with the feature backported ("-fstack-protector").
389
390 On an x86 "defconfig" build, this feature adds canary checks to
391 about 3% of all kernel functions, which increases kernel code size
392 by about 0.3%.
393
394config CC_STACKPROTECTOR_STRONG
395 bool "Strong"
396 select CC_STACKPROTECTOR
397 help
398 Functions will have the stack-protector canary logic added in any
399 of the following conditions:
400
401 - local variable's address used as part of the right hand side of an
402 assignment or function argument
403 - local variable is an array (or union containing an array),
404 regardless of array type or length
405 - uses register local variables
406
407 This feature requires gcc version 4.9 or above, or a distribution
408 gcc with the feature backported ("-fstack-protector-strong").
409
410 On an x86 "defconfig" build, this feature adds canary checks to
411 about 20% of all kernel functions, which increases the kernel code
412 size by about 2%.
413
414endchoice
415
416config HAVE_CONTEXT_TRACKING
417 bool
418 help
419 Provide kernel/user boundaries probes necessary for subsystems
420 that need it, such as userspace RCU extended quiescent state.
421 Syscalls need to be wrapped inside user_exit()-user_enter() through
422 the slow path using TIF_NOHZ flag. Exceptions handlers must be
423 wrapped as well. Irqs are already protected inside
424 rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
425 irq exit still need to be protected.
426
427config HAVE_VIRT_CPU_ACCOUNTING
428 bool
429
430config HAVE_IRQ_TIME_ACCOUNTING
431 bool
432 help
433 Archs need to ensure they use a high enough resolution clock to
434 support irq time accounting and then call enable_sched_clock_irqtime().
435
436config HAVE_ARCH_TRANSPARENT_HUGEPAGE
437 bool
438
439config HAVE_ARCH_SOFT_DIRTY
440 bool
441
442config HAVE_ARCH_HUGE_VMAP
443 bool
444
445config HAVE_MOD_ARCH_SPECIFIC
446 bool
447 help
448 The arch uses struct mod_arch_specific to store data. Many arches
449 just need a simple module loader without arch specific data - those
450 should not enable this.
451
452config MODULES_USE_ELF_RELA
453 bool
454 help
455 Modules only use ELF RELA relocations. Modules with ELF REL
456 relocations will give an error.
457
458config MODULES_USE_ELF_REL
459 bool
460 help
461 Modules only use ELF REL relocations. Modules with ELF RELA
462 relocations will give an error.
463
464config HAVE_UNDERSCORE_SYMBOL_PREFIX
465 bool
466 help
467 Some architectures generate an _ in front of C symbols; things like
468 module loading and assembly files need to know about this.
469
470config HAVE_STACK_VALIDATION
471 bool
472 help
473 Architecture supports the 'objtool check' host tool command, which
474 performs compile-time stack metadata validation.
475
476config ARCH_HAS_ELF_RANDOMIZE
477 bool
478 help
479 An architecture supports choosing randomized locations for
480 stack, mmap, brk, and ET_DYN. Defined functions:
481 - arch_mmap_rnd()
482 - arch_randomize_brk()
483
484config HAVE_ARCH_MMAP_RND_BITS
485 bool
486 help
487 An arch should select this symbol if it supports setting a variable
488 number of bits for use in establishing the base address for mmap
489 allocations, has MMU enabled and provides values for both:
490 - ARCH_MMAP_RND_BITS_MIN
491 - ARCH_MMAP_RND_BITS_MAX
492
493config ARCH_MMAP_RND_BITS_MIN
494 int
495
496config ARCH_MMAP_RND_BITS_MAX
497 int
498
499config ARCH_MMAP_RND_BITS_DEFAULT
500 int
501
502config ARCH_MMAP_RND_BITS
503 int "Number of bits to use for ASLR of mmap base address" if EXPERT
504 range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
505 default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
506 default ARCH_MMAP_RND_BITS_MIN
507 depends on HAVE_ARCH_MMAP_RND_BITS
508 help
509 This value can be used to select the number of bits to use to
510 determine the random offset to the base address of vma regions
511 resulting from mmap allocations. This value will be bounded
512 by the architecture's minimum and maximum supported values.
513
514 This value can be changed after boot using the
515 /proc/sys/vm/mmap_rnd_bits tunable
516
517config HAVE_ARCH_MMAP_RND_COMPAT_BITS
518 bool
519 help
520 An arch should select this symbol if it supports running applications
521 in compatibility mode, supports setting a variable number of bits for
522 use in establishing the base address for mmap allocations, has MMU
523 enabled and provides values for both:
524 - ARCH_MMAP_RND_COMPAT_BITS_MIN
525 - ARCH_MMAP_RND_COMPAT_BITS_MAX
526
527config ARCH_MMAP_RND_COMPAT_BITS_MIN
528 int
529
530config ARCH_MMAP_RND_COMPAT_BITS_MAX
531 int
532
533config ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
534 int
535
536config ARCH_MMAP_RND_COMPAT_BITS
537 int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
538 range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
539 default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
540 default ARCH_MMAP_RND_COMPAT_BITS_MIN
541 depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
542 help
543 This value can be used to select the number of bits to use to
544 determine the random offset to the base address of vma regions
545 resulting from mmap allocations for compatible applications This
546 value will be bounded by the architecture's minimum and maximum
547 supported values.
548
549 This value can be changed after boot using the
550 /proc/sys/vm/mmap_rnd_compat_bits tunable
551
552
553
554
555config CLONE_BACKWARDS
556 bool
557 help
558 Architecture has tls passed as the 4th argument of clone(2),
559 not the 5th one.
560
561config CLONE_BACKWARDS2
562 bool
563 help
564 Architecture has the first two arguments of clone(2) swapped.
565
566config CLONE_BACKWARDS3
567 bool
568 help
569 Architecture has tls passed as the 3rd argument of clone(2),
570 not the 5th one.
571
572config ODD_RT_SIGACTION
573 bool
574 help
575 Architecture has unusual rt_sigaction(2) arguments
576
577config OLD_SIGSUSPEND
578 bool
579 help
580 Architecture has old sigsuspend(2) syscall, of one-argument variety
581
582config OLD_SIGSUSPEND3
583 bool
584 help
585 Even weirder antique ABI - three-argument sigsuspend(2)
586
587config OLD_SIGACTION
588 bool
589 help
590 Architecture has old sigaction(2) syscall. Nope, not the same
591 as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2),
592 but fairly different variant of sigaction(2), thanks to OSF/1
593 compatibility...
594
595config COMPAT_OLD_SIGACTION
596 bool
597
598source "kernel/gcov/Kconfig"
599