1
2
3
4
5
6config CRASH_CORE
7 bool
8
9config KEXEC_CORE
10 select CRASH_CORE
11 bool
12
13config HAVE_IMA_KEXEC
14 bool
15
16config HOTPLUG_SMT
17 bool
18
19config OPROFILE
20 tristate "OProfile system profiling"
21 depends on PROFILING
22 depends on HAVE_OPROFILE
23 select RING_BUFFER
24 select RING_BUFFER_ALLOW_SWAP
25 help
26 OProfile is a profiling system capable of profiling the
27 whole system, include the kernel, kernel modules, libraries,
28 and applications.
29
30 If unsure, say N.
31
32config OPROFILE_EVENT_MULTIPLEX
33 bool "OProfile multiplexing support (EXPERIMENTAL)"
34 default n
35 depends on OPROFILE && X86
36 help
37 The number of hardware counters is limited. The multiplexing
38 feature enables OProfile to gather more events than counters
39 are provided by the hardware. This is realized by switching
40 between events at a user specified time interval.
41
42 If unsure, say N.
43
44config HAVE_OPROFILE
45 bool
46
47config OPROFILE_NMI_TIMER
48 def_bool y
49 depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
50
51config KPROBES
52 bool "Kprobes"
53 depends on MODULES
54 depends on HAVE_KPROBES
55 select KALLSYMS
56 help
57 Kprobes allows you to trap at almost any kernel address and
58 execute a callback function. register_kprobe() establishes
59 a probepoint and specifies the callback. Kprobes is useful
60 for kernel debugging, non-intrusive instrumentation and testing.
61 If in doubt, say "N".
62
63config JUMP_LABEL
64 bool "Optimize very unlikely/likely branches"
65 depends on HAVE_ARCH_JUMP_LABEL
66 help
67 This option enables a transparent branch optimization that
68 makes certain almost-always-true or almost-always-false branch
69 conditions even cheaper to execute within the kernel.
70
71 Certain performance-sensitive kernel code, such as trace points,
72 scheduler functionality, networking code and KVM have such
73 branches and include support for this optimization technique.
74
75 If it is detected that the compiler has support for "asm goto",
76 the kernel will compile such branches with just a nop
77 instruction. When the condition flag is toggled to true, the
78 nop will be converted to a jump instruction to execute the
79 conditional block of instructions.
80
81 This technique lowers overhead and stress on the branch prediction
82 of the processor and generally makes the kernel faster. The update
83 of the condition is slower, but those are always very rare.
84
85 ( On 32-bit x86, the necessary options added to the compiler
86 flags may increase the size of the kernel slightly. )
87
88config STATIC_KEYS_SELFTEST
89 bool "Static key selftest"
90 depends on JUMP_LABEL
91 help
92 Boot time self-test of the branch patching code.
93
94config OPTPROBES
95 def_bool y
96 depends on KPROBES && HAVE_OPTPROBES
97 select TASKS_RCU if PREEMPTION
98
99config KPROBES_ON_FTRACE
100 def_bool y
101 depends on KPROBES && HAVE_KPROBES_ON_FTRACE
102 depends on DYNAMIC_FTRACE_WITH_REGS
103 help
104 If function tracer is enabled and the arch supports full
105 passing of pt_regs to function tracing, then kprobes can
106 optimize on top of function tracing.
107
108config UPROBES
109 def_bool n
110 depends on ARCH_SUPPORTS_UPROBES
111 help
112 Uprobes is the user-space counterpart to kprobes: they
113 enable instrumentation applications (such as 'perf probe')
114 to establish unintrusive probes in user-space binaries and
115 libraries, by executing handler functions when the probes
116 are hit by user-space applications.
117
118 ( These probes come in the form of single-byte breakpoints,
119 managed by the kernel and kept transparent to the probed
120 application. )
121
122config HAVE_64BIT_ALIGNED_ACCESS
123 def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS
124 help
125 Some architectures require 64 bit accesses to be 64 bit
126 aligned, which also requires structs containing 64 bit values
127 to be 64 bit aligned too. This includes some 32 bit
128 architectures which can do 64 bit accesses, as well as 64 bit
129 architectures without unaligned access.
130
131 This symbol should be selected by an architecture if 64 bit
132 accesses are required to be 64 bit aligned in this way even
133 though it is not a 64 bit architecture.
134
135 See Documentation/unaligned-memory-access.txt for more
136 information on the topic of unaligned memory accesses.
137
138config HAVE_EFFICIENT_UNALIGNED_ACCESS
139 bool
140 help
141 Some architectures are unable to perform unaligned accesses
142 without the use of get_unaligned/put_unaligned. Others are
143 unable to perform such accesses efficiently (e.g. trap on
144 unaligned access and require fixing it up in the exception
145 handler.)
146
147 This symbol should be selected by an architecture if it can
148 perform unaligned accesses efficiently to allow different
149 code paths to be selected for these cases. Some network
150 drivers, for example, could opt to not fix up alignment
151 problems with received packets if doing so would not help
152 much.
153
154 See Documentation/unaligned-memory-access.txt for more
155 information on the topic of unaligned memory accesses.
156
157config ARCH_USE_BUILTIN_BSWAP
158 bool
159 help
160 Modern versions of GCC (since 4.4) have builtin functions
161 for handling byte-swapping. Using these, instead of the old
162 inline assembler that the architecture code provides in the
163 __arch_bswapXX() macros, allows the compiler to see what's
164 happening and offers more opportunity for optimisation. In
165 particular, the compiler will be able to combine the byteswap
166 with a nearby load or store and use load-and-swap or
167 store-and-swap instructions if the architecture has them. It
168 should almost *never* result in code which is worse than the
169 hand-coded assembler in <asm/swab.h>. But just in case it
170 does, the use of the builtins is optional.
171
172 Any architecture with load-and-swap or store-and-swap
173 instructions should set this. And it shouldn't hurt to set it
174 on architectures that don't have such instructions.
175
176config KRETPROBES
177 def_bool y
178 depends on KPROBES && HAVE_KRETPROBES
179
180config USER_RETURN_NOTIFIER
181 bool
182 depends on HAVE_USER_RETURN_NOTIFIER
183 help
184 Provide a kernel-internal notification when a cpu is about to
185 switch to user mode.
186
187config HAVE_IOREMAP_PROT
188 bool
189
190config HAVE_KPROBES
191 bool
192
193config HAVE_KRETPROBES
194 bool
195
196config HAVE_OPTPROBES
197 bool
198
199config HAVE_KPROBES_ON_FTRACE
200 bool
201
202config HAVE_FUNCTION_ERROR_INJECTION
203 bool
204
205config HAVE_NMI
206 bool
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221config HAVE_ARCH_TRACEHOOK
222 bool
223
224config HAVE_DMA_CONTIGUOUS
225 bool
226
227config GENERIC_SMP_IDLE_THREAD
228 bool
229
230config GENERIC_IDLE_POLL_SETUP
231 bool
232
233config ARCH_HAS_FORTIFY_SOURCE
234 bool
235 help
236 An architecture should select this when it can successfully
237 build and run with CONFIG_FORTIFY_SOURCE.
238
239
240config ARCH_HAS_SET_MEMORY
241 bool
242
243
244config ARCH_HAS_SET_DIRECT_MAP
245 bool
246
247
248
249
250
251config ARCH_HAS_UNCACHED_SEGMENT
252 select ARCH_HAS_DMA_PREP_COHERENT
253 bool
254
255
256config ARCH_TASK_STRUCT_ON_STACK
257 bool
258
259
260config ARCH_TASK_STRUCT_ALLOCATOR
261 bool
262
263config HAVE_ARCH_THREAD_STRUCT_WHITELIST
264 bool
265 depends on !ARCH_TASK_STRUCT_ALLOCATOR
266 help
267 An architecture should select this to provide hardened usercopy
268 knowledge about what region of the thread_struct should be
269 whitelisted for copying to userspace. Normally this is only the
270 FPU registers. Specifically, arch_thread_struct_whitelist()
271 should be implemented. Without this, the entire thread_struct
272 field in task_struct will be left whitelisted.
273
274
275config ARCH_THREAD_STACK_ALLOCATOR
276 bool
277
278
279config ARCH_WANTS_DYNAMIC_TASK_STRUCT
280 bool
281
282config HAVE_REGS_AND_STACK_ACCESS_API
283 bool
284 help
285 This symbol should be selected by an architecure if it supports
286 the API needed to access registers and stack entries from pt_regs,
287 declared in asm/ptrace.h
288 For example the kprobes-based event tracer needs this API.
289
290config HAVE_RSEQ
291 bool
292 depends on HAVE_REGS_AND_STACK_ACCESS_API
293 help
294 This symbol should be selected by an architecture if it
295 supports an implementation of restartable sequences.
296
297config HAVE_CLK
298 bool
299 help
300 The <linux/clk.h> calls support software clock gating and
301 thus are a key power management tool on many systems.
302
303config HAVE_HW_BREAKPOINT
304 bool
305 depends on PERF_EVENTS
306
307config HAVE_MIXED_BREAKPOINTS_REGS
308 bool
309 depends on HAVE_HW_BREAKPOINT
310 help
311 Depending on the arch implementation of hardware breakpoints,
312 some of them have separate registers for data and instruction
313 breakpoints addresses, others have mixed registers to store
314 them but define the access type in a control register.
315 Select this option if your arch implements breakpoints under the
316 latter fashion.
317
318config HAVE_USER_RETURN_NOTIFIER
319 bool
320
321config HAVE_PERF_EVENTS_NMI
322 bool
323 help
324 System hardware can generate an NMI using the perf event
325 subsystem. Also has support for calculating CPU cycle events
326 to determine how many clock cycles in a given period.
327
328config HAVE_HARDLOCKUP_DETECTOR_PERF
329 bool
330 depends on HAVE_PERF_EVENTS_NMI
331 help
332 The arch chooses to use the generic perf-NMI-based hardlockup
333 detector. Must define HAVE_PERF_EVENTS_NMI.
334
335config HAVE_NMI_WATCHDOG
336 depends on HAVE_NMI
337 bool
338 help
339 The arch provides a low level NMI watchdog. It provides
340 asm/nmi.h, and defines its own arch_touch_nmi_watchdog().
341
342config HAVE_HARDLOCKUP_DETECTOR_ARCH
343 bool
344 select HAVE_NMI_WATCHDOG
345 help
346 The arch chooses to provide its own hardlockup detector, which is
347 a superset of the HAVE_NMI_WATCHDOG. It also conforms to config
348 interfaces and parameters provided by hardlockup detector subsystem.
349
350config HAVE_PERF_REGS
351 bool
352 help
353 Support selective register dumps for perf events. This includes
354 bit-mapping of each registers and a unique architecture id.
355
356config HAVE_PERF_USER_STACK_DUMP
357 bool
358 help
359 Support user stack dumps for perf event samples. This needs
360 access to the user stack pointer which is not unified across
361 architectures.
362
363config HAVE_ARCH_JUMP_LABEL
364 bool
365
366config HAVE_ARCH_JUMP_LABEL_RELATIVE
367 bool
368
369config HAVE_RCU_TABLE_FREE
370 bool
371
372config HAVE_RCU_TABLE_INVALIDATE
373 bool
374
375config ARCH_HAVE_NMI_SAFE_CMPXCHG
376 bool
377
378config HAVE_ALIGNED_STRUCT_PAGE
379 bool
380 help
381 This makes sure that struct pages are double word aligned and that
382 e.g. the SLUB allocator can perform double word atomic operations
383 on a struct page for better performance. However selecting this
384 might increase the size of a struct page by a word.
385
386config HAVE_CMPXCHG_LOCAL
387 bool
388
389config HAVE_CMPXCHG_DOUBLE
390 bool
391
392config ARCH_WEAK_RELEASE_ACQUIRE
393 bool
394
395config ARCH_WANT_IPC_PARSE_VERSION
396 bool
397
398config ARCH_WANT_COMPAT_IPC_PARSE_VERSION
399 bool
400
401config ARCH_WANT_OLD_COMPAT_IPC
402 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
403 bool
404
405config HAVE_ARCH_SECCOMP_FILTER
406 bool
407 help
408 An arch should select this symbol if it provides all of these things:
409 - syscall_get_arch()
410 - syscall_get_arguments()
411 - syscall_rollback()
412 - syscall_set_return_value()
413 - SIGSYS siginfo_t support
414 - secure_computing is called from a ptrace_event()-safe context
415 - secure_computing return value is checked and a return value of -1
416 results in the system call being skipped immediately.
417 - seccomp syscall wired up
418
419config SECCOMP_FILTER
420 def_bool y
421 depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
422 help
423 Enable tasks to build secure computing environments defined
424 in terms of Berkeley Packet Filter programs which implement
425 task-defined system call filtering polices.
426
427 See Documentation/userspace-api/seccomp_filter.rst for details.
428
429preferred-plugin-hostcc := $(if-success,[ $(gcc-version) -ge 40800 ],$(HOSTCXX),$(HOSTCC))
430
431config PLUGIN_HOSTCC
432 string
433 default "$(shell,$(srctree)/scripts/gcc-plugin.sh "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")"
434 help
435 Host compiler used to build GCC plugins. This can be $(HOSTCXX),
436 $(HOSTCC), or a null string if GCC plugin is unsupported.
437
438config HAVE_GCC_PLUGINS
439 bool
440 help
441 An arch should select this symbol if it supports building with
442 GCC plugins.
443
444menuconfig GCC_PLUGINS
445 bool "GCC plugins"
446 depends on HAVE_GCC_PLUGINS
447 depends on PLUGIN_HOSTCC != ""
448 help
449 GCC plugins are loadable modules that provide extra features to the
450 compiler. They are useful for runtime instrumentation and static analysis.
451
452 See Documentation/gcc-plugins.txt for details.
453
454config GCC_PLUGIN_CYC_COMPLEXITY
455 bool "Compute the cyclomatic complexity of a function" if EXPERT
456 depends on GCC_PLUGINS
457 depends on !COMPILE_TEST
458 help
459 The complexity M of a function's control flow graph is defined as:
460 M = E - N + 2P
461 where
462
463 E = the number of edges
464 N = the number of nodes
465 P = the number of connected components (exit nodes).
466
467 Enabling this plugin reports the complexity to stderr during the
468 build. It mainly serves as a simple example of how to create a
469 gcc plugin for the kernel.
470
471config GCC_PLUGIN_SANCOV
472 bool
473 depends on GCC_PLUGINS
474 help
475 This plugin inserts a __sanitizer_cov_trace_pc() call at the start of
476 basic blocks. It supports all gcc versions with plugin support (from
477 gcc-4.5 on). It is based on the commit "Add fuzzing coverage support"
478 by Dmitry Vyukov <dvyukov@google.com>.
479
480config GCC_PLUGIN_LATENT_ENTROPY
481 bool "Generate some entropy during boot and runtime"
482 depends on GCC_PLUGINS
483 help
484 By saying Y here the kernel will instrument some kernel code to
485 extract some entropy from both original and artificially created
486 program state. This will help especially embedded systems where
487 there is little 'natural' source of entropy normally. The cost
488 is some slowdown of the boot process (about 0.5%) and fork and
489 irq processing.
490
491 Note that entropy extracted this way is not cryptographically
492 secure!
493
494 This plugin was ported from grsecurity/PaX. More information at:
495 * https://grsecurity.net/
496 * https://pax.grsecurity.net/
497
498config GCC_PLUGIN_STRUCTLEAK
499 bool "Force initialization of variables containing userspace addresses"
500 depends on GCC_PLUGINS
501
502
503
504 depends on !KASAN_EXTRA
505 help
506 This plugin zero-initializes any structures containing a
507 __user attribute. This can prevent some classes of information
508 exposures.
509
510 This plugin was ported from grsecurity/PaX. More information at:
511 * https://grsecurity.net/
512 * https://pax.grsecurity.net/
513
514config GCC_PLUGIN_STRUCTLEAK_BYREF_ALL
515 bool "Force initialize all struct type variables passed by reference"
516 depends on GCC_PLUGIN_STRUCTLEAK
517 depends on !COMPILE_TEST
518 help
519 Zero initialize any struct type local variable that may be passed by
520 reference without having been initialized.
521
522config GCC_PLUGIN_STRUCTLEAK_VERBOSE
523 bool "Report forcefully initialized variables"
524 depends on GCC_PLUGIN_STRUCTLEAK
525 depends on !COMPILE_TEST
526 help
527 This option will cause a warning to be printed each time the
528 structleak plugin finds a variable it thinks needs to be
529 initialized. Since not all existing initializers are detected
530 by the plugin, this can produce false positive warnings.
531
532config GCC_PLUGIN_RANDSTRUCT
533 bool "Randomize layout of sensitive kernel structures"
534 depends on GCC_PLUGINS
535 select MODVERSIONS if MODULES
536 help
537 If you say Y here, the layouts of structures that are entirely
538 function pointers (and have not been manually annotated with
539 __no_randomize_layout), or structures that have been explicitly
540 marked with __randomize_layout, will be randomized at compile-time.
541 This can introduce the requirement of an additional information
542 exposure vulnerability for exploits targeting these structure
543 types.
544
545 Enabling this feature will introduce some performance impact,
546 slightly increase memory usage, and prevent the use of forensic
547 tools like Volatility against the system (unless the kernel
548 source tree isn't cleaned after kernel installation).
549
550 The seed used for compilation is located at
551 scripts/gcc-plgins/randomize_layout_seed.h. It remains after
552 a make clean to allow for external modules to be compiled with
553 the existing seed and will be removed by a make mrproper or
554 make distclean.
555
556 Note that the implementation requires gcc 4.7 or newer.
557
558 This plugin was ported from grsecurity/PaX. More information at:
559 * https://grsecurity.net/
560 * https://pax.grsecurity.net/
561
562config GCC_PLUGIN_RANDSTRUCT_PERFORMANCE
563 bool "Use cacheline-aware structure randomization"
564 depends on GCC_PLUGIN_RANDSTRUCT
565 depends on !COMPILE_TEST
566 help
567 If you say Y here, the RANDSTRUCT randomization will make a
568 best effort at restricting randomization to cacheline-sized
569 groups of elements. It will further not randomize bitfields
570 in structures. This reduces the performance hit of RANDSTRUCT
571 at the cost of weakened randomization.
572
573config HAVE_STACKPROTECTOR
574 bool
575 help
576 An arch should select this symbol if:
577 - it has implemented a stack canary (e.g. __stack_chk_guard)
578
579config CC_HAS_STACKPROTECTOR_NONE
580 def_bool $(cc-option,-fno-stack-protector)
581
582config STACKPROTECTOR
583 bool "Stack Protector buffer overflow detection"
584 depends on HAVE_STACKPROTECTOR
585 depends on $(cc-option,-fstack-protector)
586 default y
587 help
588 This option turns on the "stack-protector" GCC feature. This
589 feature puts, at the beginning of functions, a canary value on
590 the stack just before the return address, and validates
591 the value just before actually returning. Stack based buffer
592 overflows (that need to overwrite this return address) now also
593 overwrite the canary, which gets detected and the attack is then
594 neutralized via a kernel panic.
595
596 Functions will have the stack-protector canary logic added if they
597 have an 8-byte or larger character array on the stack.
598
599 This feature requires gcc version 4.2 or above, or a distribution
600 gcc with the feature backported ("-fstack-protector").
601
602 On an x86 "defconfig" build, this feature adds canary checks to
603 about 3% of all kernel functions, which increases kernel code size
604 by about 0.3%.
605
606config STACKPROTECTOR_STRONG
607 bool "Strong Stack Protector"
608 depends on STACKPROTECTOR
609 depends on $(cc-option,-fstack-protector-strong)
610 default y
611 help
612 Functions will have the stack-protector canary logic added in any
613 of the following conditions:
614
615 - local variable's address used as part of the right hand side of an
616 assignment or function argument
617 - local variable is an array (or union containing an array),
618 regardless of array type or length
619 - uses register local variables
620
621 This feature requires gcc version 4.9 or above, or a distribution
622 gcc with the feature backported ("-fstack-protector-strong").
623
624 On an x86 "defconfig" build, this feature adds canary checks to
625 about 20% of all kernel functions, which increases the kernel code
626 size by about 2%.
627
628config HAVE_ARCH_WITHIN_STACK_FRAMES
629 bool
630 help
631 An architecture should select this if it can walk the kernel stack
632 frames to determine if an object is part of either the arguments
633 or local variables (i.e. that it excludes saved return addresses,
634 and similar) by implementing an inline arch_within_stack_frames(),
635 which is used by CONFIG_HARDENED_USERCOPY.
636
637config HAVE_CONTEXT_TRACKING
638 bool
639 help
640 Provide kernel/user boundaries probes necessary for subsystems
641 that need it, such as userspace RCU extended quiescent state.
642 Syscalls need to be wrapped inside user_exit()-user_enter() through
643 the slow path using TIF_NOHZ flag. Exceptions handlers must be
644 wrapped as well. Irqs are already protected inside
645 rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
646 irq exit still need to be protected.
647
648config HAVE_VIRT_CPU_ACCOUNTING
649 bool
650
651config ARCH_HAS_SCALED_CPUTIME
652 bool
653
654config HAVE_VIRT_CPU_ACCOUNTING_GEN
655 bool
656 default y if 64BIT
657 help
658 With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit.
659 Before enabling this option, arch code must be audited
660 to ensure there are no races in concurrent read/write of
661 cputime_t. For example, reading/writing 64-bit cputime_t on
662 some 32-bit arches may require multiple accesses, so proper
663 locking is needed to protect against concurrent accesses.
664
665
666config HAVE_IRQ_TIME_ACCOUNTING
667 bool
668 help
669 Archs need to ensure they use a high enough resolution clock to
670 support irq time accounting and then call enable_sched_clock_irqtime().
671
672config HAVE_ARCH_TRANSPARENT_HUGEPAGE
673 bool
674
675config HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
676 bool
677
678config HAVE_ARCH_HUGE_VMAP
679 bool
680
681config HAVE_ARCH_SOFT_DIRTY
682 bool
683
684config HAVE_MOD_ARCH_SPECIFIC
685 bool
686 help
687 The arch uses struct mod_arch_specific to store data. Many arches
688 just need a simple module loader without arch specific data - those
689 should not enable this.
690
691config MODULES_USE_ELF_RELA
692 bool
693 help
694 Modules only use ELF RELA relocations. Modules with ELF REL
695 relocations will give an error.
696
697config MODULES_USE_ELF_REL
698 bool
699 help
700 Modules only use ELF REL relocations. Modules with ELF RELA
701 relocations will give an error.
702
703config HAVE_IRQ_EXIT_ON_IRQ_STACK
704 bool
705 help
706 Architecture doesn't only execute the irq handler on the irq stack
707 but also irq_exit(). This way we can process softirqs on this irq
708 stack instead of switching to a new one when we call __do_softirq()
709 in the end of an hardirq.
710 This spares a stack switch and improves cache usage on softirq
711 processing.
712
713config PGTABLE_LEVELS
714 int
715 default 2
716
717config ARCH_HAS_ELF_RANDOMIZE
718 bool
719 help
720 An architecture supports choosing randomized locations for
721 stack, mmap, brk, and ET_DYN. Defined functions:
722 - arch_mmap_rnd()
723 - arch_randomize_brk()
724
725config HAVE_ARCH_MMAP_RND_BITS
726 bool
727 help
728 An arch should select this symbol if it supports setting a variable
729 number of bits for use in establishing the base address for mmap
730 allocations, has MMU enabled and provides values for both:
731 - ARCH_MMAP_RND_BITS_MIN
732 - ARCH_MMAP_RND_BITS_MAX
733
734config HAVE_EXIT_THREAD
735 bool
736 help
737 An architecture implements exit_thread.
738
739config ARCH_MMAP_RND_BITS_MIN
740 int
741
742config ARCH_MMAP_RND_BITS_MAX
743 int
744
745config ARCH_MMAP_RND_BITS_DEFAULT
746 int
747
748config ARCH_MMAP_RND_BITS
749 int "Number of bits to use for ASLR of mmap base address" if EXPERT
750 range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
751 default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
752 default ARCH_MMAP_RND_BITS_MIN
753 depends on HAVE_ARCH_MMAP_RND_BITS
754 help
755 This value can be used to select the number of bits to use to
756 determine the random offset to the base address of vma regions
757 resulting from mmap allocations. This value will be bounded
758 by the architecture's minimum and maximum supported values.
759
760 This value can be changed after boot using the
761 /proc/sys/vm/mmap_rnd_bits tunable
762
763config HAVE_ARCH_MMAP_RND_COMPAT_BITS
764 bool
765 help
766 An arch should select this symbol if it supports running applications
767 in compatibility mode, supports setting a variable number of bits for
768 use in establishing the base address for mmap allocations, has MMU
769 enabled and provides values for both:
770 - ARCH_MMAP_RND_COMPAT_BITS_MIN
771 - ARCH_MMAP_RND_COMPAT_BITS_MAX
772
773config ARCH_MMAP_RND_COMPAT_BITS_MIN
774 int
775
776config ARCH_MMAP_RND_COMPAT_BITS_MAX
777 int
778
779config ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
780 int
781
782config ARCH_MMAP_RND_COMPAT_BITS
783 int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
784 range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
785 default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
786 default ARCH_MMAP_RND_COMPAT_BITS_MIN
787 depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
788 help
789 This value can be used to select the number of bits to use to
790 determine the random offset to the base address of vma regions
791 resulting from mmap allocations for compatible applications This
792 value will be bounded by the architecture's minimum and maximum
793 supported values.
794
795 This value can be changed after boot using the
796 /proc/sys/vm/mmap_rnd_compat_bits tunable
797
798config HAVE_ARCH_COMPAT_MMAP_BASES
799 bool
800 help
801 This allows 64bit applications to invoke 32-bit mmap() syscall
802 and vice-versa 32-bit applications to call 64-bit mmap().
803 Required for applications doing different bitness syscalls.
804
805config HAVE_COPY_THREAD_TLS
806 bool
807 help
808 Architecture provides copy_thread_tls to accept tls argument via
809 normal C parameter passing, rather than extracting the syscall
810 argument from pt_regs.
811
812config HAVE_STACK_VALIDATION
813 bool
814 help
815 Architecture supports the 'objtool check' host tool command, which
816 performs compile-time stack metadata validation.
817
818config HAVE_RELIABLE_STACKTRACE
819 bool
820 help
821 Architecture has a save_stack_trace_tsk_reliable() function which
822 only returns a stack trace if it can guarantee the trace is reliable.
823
824config HAVE_ARCH_HASH
825 bool
826 default n
827 help
828 If this is set, the architecture provides an <asm/hash.h>
829 file which provides platform-specific implementations of some
830 functions in <linux/hash.h> or fs/namei.c.
831
832config ISA_BUS_API
833 def_bool ISA
834
835
836
837
838config CLONE_BACKWARDS
839 bool
840 help
841 Architecture has tls passed as the 4th argument of clone(2),
842 not the 5th one.
843
844config CLONE_BACKWARDS2
845 bool
846 help
847 Architecture has the first two arguments of clone(2) swapped.
848
849config CLONE_BACKWARDS3
850 bool
851 help
852 Architecture has tls passed as the 3rd argument of clone(2),
853 not the 5th one.
854
855config ODD_RT_SIGACTION
856 bool
857 help
858 Architecture has unusual rt_sigaction(2) arguments
859
860config OLD_SIGSUSPEND
861 bool
862 help
863 Architecture has old sigsuspend(2) syscall, of one-argument variety
864
865config OLD_SIGSUSPEND3
866 bool
867 help
868 Even weirder antique ABI - three-argument sigsuspend(2)
869
870config OLD_SIGACTION
871 bool
872 help
873 Architecture has old sigaction(2) syscall. Nope, not the same
874 as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2),
875 but fairly different variant of sigaction(2), thanks to OSF/1
876 compatibility...
877
878config COMPAT_OLD_SIGACTION
879 bool
880
881config 64BIT_TIME
882 def_bool ARCH_HAS_64BIT_TIME
883 help
884 This should be selected by all architectures that need to support
885 new system calls with a 64-bit time_t. This is relevant on all 32-bit
886 architectures, and 64-bit architectures as part of compat syscall
887 handling.
888
889config COMPAT_32BIT_TIME
890 def_bool (!64BIT && 64BIT_TIME) || COMPAT
891 help
892 This enables 32 bit time_t support in addition to 64 bit time_t support.
893 This is relevant on all 32-bit architectures, and 64-bit architectures
894 as part of compat syscall handling.
895
896config ARCH_NO_PREEMPT
897 bool
898
899config ARCH_SUPPORTS_RT
900 bool
901
902config CPU_NO_EFFICIENT_FFS
903 def_bool n
904
905config HAVE_ARCH_VMAP_STACK
906 def_bool n
907 help
908 An arch should select this symbol if it can support kernel stacks
909 in vmalloc space. This means:
910
911 - vmalloc space must be large enough to hold many kernel stacks.
912 This may rule out many 32-bit architectures.
913
914 - Stacks in vmalloc space need to work reliably. For example, if
915 vmap page tables are created on demand, either this mechanism
916 needs to work while the stack points to a virtual address with
917 unpopulated page tables or arch code (switch_to() and switch_mm(),
918 most likely) needs to ensure that the stack's page table entries
919 are populated before running on a possibly unpopulated stack.
920
921 - If the stack overflows into a guard page, something reasonable
922 should happen. The definition of "reasonable" is flexible, but
923 instantly rebooting without logging anything would be unfriendly.
924
925config VMAP_STACK
926 default y
927 bool "Use a virtually-mapped stack"
928 depends on HAVE_ARCH_VMAP_STACK && !KASAN
929 ---help---
930 Enable this if you want the use virtually-mapped kernel stacks
931 with guard pages. This causes kernel stack overflows to be
932 caught immediately rather than causing difficult-to-diagnose
933 corruption.
934
935 This is presently incompatible with KASAN because KASAN expects
936 the stack to map directly to the KASAN shadow map using a formula
937 that is incorrect if the stack is in vmalloc space.
938
939config ARCH_OPTIONAL_KERNEL_RWX
940 def_bool n
941
942config ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
943 def_bool n
944
945config ARCH_HAS_STRICT_KERNEL_RWX
946 def_bool n
947
948config STRICT_KERNEL_RWX
949 bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX
950 depends on ARCH_HAS_STRICT_KERNEL_RWX
951 default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
952 help
953 If this is set, kernel text and rodata memory will be made read-only,
954 and non-text memory will be made non-executable. This provides
955 protection against certain security exploits (e.g. executing the heap
956 or modifying text)
957
958 These features are considered standard security practice these days.
959 You should say Y here in almost all cases.
960
961config ARCH_HAS_STRICT_MODULE_RWX
962 def_bool n
963
964config STRICT_MODULE_RWX
965 bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX
966 depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES
967 default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
968 help
969 If this is set, module text and rodata memory will be made read-only,
970 and non-text memory will be made non-executable. This provides
971 protection against certain security exploits (e.g. writing to text)
972
973
974config ARCH_HAS_PHYS_TO_DMA
975 bool
976
977config ARCH_HAS_REFCOUNT
978 bool
979 help
980 An architecture selects this when it has implemented refcount_t
981 using open coded assembly primitives that provide an optimized
982 refcount_t implementation, possibly at the expense of some full
983 refcount state checks of CONFIG_REFCOUNT_FULL=y.
984
985 The refcount overflow check behavior, however, must be retained.
986 Catching overflows is the primary security concern for protecting
987 against bugs in reference counts.
988
989config REFCOUNT_FULL
990 bool "Perform full reference count validation at the expense of speed"
991 help
992 Enabling this switches the refcounting infrastructure from a fast
993 unchecked atomic_t implementation to a fully state checked
994 implementation, which can be (slightly) slower but provides protections
995 against various use-after-free conditions that can be used in
996 security flaw exploits.
997
998config LOCK_EVENT_COUNTS
999 bool "Locking event counts collection"
1000 depends on DEBUG_FS
1001 ---help---
1002 Enable light-weight counting of various locking related events
1003 in the system with minimal performance impact. This reduces
1004 the chance of application behavior change because of timing
1005 differences. The counts are reported via debugfs.
1006
1007config ARCH_HAS_MEM_ENCRYPT
1008 bool
1009
1010source "kernel/gcov/Kconfig"
1011