kernel: add another missing KASAN symbol
[openwrt/staging/thess.git] / config / Config-kernel.in
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # Copyright (C) 2006-2014 OpenWrt.org
4
5 config KERNEL_BUILD_USER
6 string "Custom Kernel Build User Name"
7 default "builder" if BUILDBOT
8 default ""
9 help
10 Sets the Kernel build user string, which for example will be returned
11 by 'uname -a' on running systems.
12 If not set, uses system user at build time.
13
14 config KERNEL_BUILD_DOMAIN
15 string "Custom Kernel Build Domain Name"
16 default "buildhost" if BUILDBOT
17 default ""
18 help
19 Sets the Kernel build domain string, which for example will be
20 returned by 'uname -a' on running systems.
21 If not set, uses system hostname at build time.
22
23 config KERNEL_PRINTK
24 bool "Enable support for printk"
25 default y
26
27 config KERNEL_CRASHLOG
28 bool "Crash logging"
29 depends on !(arm || powerpc || sparc || TARGET_uml || i386 || x86_64)
30 default y
31
32 config KERNEL_SWAP
33 bool "Support for paging of anonymous memory (swap)"
34 default y if !SMALL_FLASH
35
36 config KERNEL_PROC_STRIPPED
37 bool "Strip non-essential /proc functionality to reduce code size"
38 default y if SMALL_FLASH
39
40 config KERNEL_DEBUG_FS
41 bool "Compile the kernel with debug filesystem enabled"
42 default y
43 help
44 debugfs is a virtual file system that kernel developers use to put
45 debugging files into. Enable this option to be able to read and
46 write to these files. Many common debugging facilities, such as
47 ftrace, require the existence of debugfs.
48
49 config KERNEL_MIPS_FP_SUPPORT
50 bool
51 default y if TARGET_pistachio
52
53 config KERNEL_ARM_PMU
54 bool
55 default n
56 depends on (arm || aarch64)
57
58 config KERNEL_X86_VSYSCALL_EMULATION
59 bool "Enable vsyscall emulation"
60 default n
61 depends on x86_64
62 help
63 This enables emulation of the legacy vsyscall page. Disabling
64 it is roughly equivalent to booting with vsyscall=none, except
65 that it will also disable the helpful warning if a program
66 tries to use a vsyscall. With this option set to N, offending
67 programs will just segfault, citing addresses of the form
68 0xffffffffff600?00.
69
70 This option is required by many programs built before 2013, and
71 care should be used even with newer programs if set to N.
72
73 Disabling this option saves about 7K of kernel size and
74 possibly 4K of additional runtime pagetable memory.
75
76 config KERNEL_PERF_EVENTS
77 bool "Compile the kernel with performance events and counters"
78 default n
79 select KERNEL_ARM_PMU if (arm || aarch64)
80
81 config KERNEL_PROFILING
82 bool "Compile the kernel with profiling enabled"
83 default n
84 select KERNEL_PERF_EVENTS
85 help
86 Enable the extended profiling support mechanisms used by profilers such
87 as OProfile.
88
89 config KERNEL_UBSAN
90 bool "Compile the kernel with undefined behaviour sanity checker"
91 help
92 This option enables undefined behaviour sanity checker
93 Compile-time instrumentation is used to detect various undefined
94 behaviours in runtime. Various types of checks may be enabled
95 via boot parameter ubsan_handle
96 (see: Documentation/dev-tools/ubsan.rst).
97
98 config KERNEL_UBSAN_SANITIZE_ALL
99 bool "Enable instrumentation for the entire kernel"
100 depends on KERNEL_UBSAN
101 default y
102 help
103 This option activates instrumentation for the entire kernel.
104 If you don't enable this option, you have to explicitly specify
105 UBSAN_SANITIZE := y for the files/directories you want to check for UB.
106 Enabling this option will get kernel image size increased
107 significantly.
108
109 config KERNEL_UBSAN_ALIGNMENT
110 bool "Enable checking of pointers alignment"
111 depends on KERNEL_UBSAN
112 help
113 This option enables detection of unaligned memory accesses.
114 Enabling this option on architectures that support unaligned
115 accesses may produce a lot of false positives.
116
117 config KERNEL_UBSAN_BOUNDS
118 bool "Perform array index bounds checking"
119 depends on KERNEL_UBSAN
120 help
121 This option enables detection of directly indexed out of bounds array
122 accesses, where the array size is known at compile time. Note that
123 this does not protect array overflows via bad calls to the
124 {str,mem}*cpy() family of functions (that is addressed by
125 FORTIFY_SOURCE).
126
127 config KERNEL_UBSAN_NULL
128 bool "Enable checking of null pointers"
129 depends on KERNEL_UBSAN
130 help
131 This option enables detection of memory accesses via a
132 null pointer.
133
134 config KERNEL_UBSAN_TRAP
135 bool "On Sanitizer warnings, abort the running kernel code"
136 depends on KERNEL_UBSAN
137 help
138 Building kernels with Sanitizer features enabled tends to grow the
139 kernel size by around 5%, due to adding all the debugging text on
140 failure paths. To avoid this, Sanitizer instrumentation can just
141 issue a trap. This reduces the kernel size overhead but turns all
142 warnings (including potentially harmless conditions) into full
143 exceptions that abort the running kernel code (regardless of context,
144 locks held, etc), which may destabilize the system. For some system
145 builders this is an acceptable trade-off.
146
147 config KERNEL_KASAN
148 bool "Compile the kernel with KASan: runtime memory debugger"
149 select KERNEL_SLUB_DEBUG
150 depends on (x86_64 || aarch64)
151 help
152 Enables kernel address sanitizer - runtime memory debugger,
153 designed to find out-of-bounds accesses and use-after-free bugs.
154 This is strictly a debugging feature and it requires a gcc version
155 of 4.9.2 or later. Detection of out of bounds accesses to stack or
156 global variables requires gcc 5.0 or later.
157 This feature consumes about 1/8 of available memory and brings about
158 ~x3 performance slowdown.
159 For better error detection enable CONFIG_STACKTRACE.
160 Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB
161 (the resulting kernel does not boot).
162
163 config KERNEL_KASAN_EXTRA
164 bool "KAsan: extra checks"
165 depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL
166 help
167 This enables further checks in the kernel address sanitizer, for now
168 it only includes the address-use-after-scope check that can lead
169 to excessive kernel stack usage, frame size warnings and longer
170 compile time.
171 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
172
173 CONFIG KERNEL_KASAN_VMALLOC
174 bool "Back mappings in vmalloc space with real shadow memory"
175 depends on KERNEL_KASAN
176 By default, the shadow region for vmalloc space is the read-only
177 zero page. This means that KASAN cannot detect errors involving
178 vmalloc space.
179
180 Enabling this option will hook in to vmap/vmalloc and back those
181 mappings with real shadow memory allocated on demand. This allows
182 for KASAN to detect more sorts of errors (and to support vmapped
183 stacks), but at the cost of higher memory usage.
184
185 This option depends on HAVE_ARCH_KASAN_VMALLOC, but we can't
186 depend on that in here, so it is possible that enabling this
187 will have no effect.
188
189 if KERNEL_KASAN
190 config KERNEL_KASAN_GENERIC
191 def_bool y
192
193 config KERNEL_KASAN_SW_TAGS
194 def_bool n
195 endif
196
197 choice
198 prompt "Instrumentation type"
199 depends on KERNEL_KASAN
200 default KERNEL_KASAN_OUTLINE
201
202 config KERNEL_KASAN_OUTLINE
203 bool "Outline instrumentation"
204 help
205 Before every memory access compiler insert function call
206 __asan_load*/__asan_store*. These functions performs check
207 of shadow memory. This is slower than inline instrumentation,
208 however it doesn't bloat size of kernel's .text section so
209 much as inline does.
210
211 config KERNEL_KASAN_INLINE
212 bool "Inline instrumentation"
213 help
214 Compiler directly inserts code checking shadow memory before
215 memory accesses. This is faster than outline (in some workloads
216 it gives about x2 boost over outline instrumentation), but
217 make kernel's .text size much bigger.
218 This requires a gcc version of 5.0 or later.
219
220 endchoice
221
222 config KERNEL_KCOV
223 bool "Compile the kernel with code coverage for fuzzing"
224 select KERNEL_DEBUG_FS
225 help
226 KCOV exposes kernel code coverage information in a form suitable
227 for coverage-guided fuzzing (randomized testing).
228
229 If RANDOMIZE_BASE is enabled, PC values will not be stable across
230 different machines and across reboots. If you need stable PC values,
231 disable RANDOMIZE_BASE.
232
233 For more details, see Documentation/kcov.txt.
234
235 config KERNEL_KCOV_ENABLE_COMPARISONS
236 bool "Enable comparison operands collection by KCOV"
237 depends on KERNEL_KCOV
238 help
239 KCOV also exposes operands of every comparison in the instrumented
240 code along with operand sizes and PCs of the comparison instructions.
241 These operands can be used by fuzzing engines to improve the quality
242 of fuzzing coverage.
243
244 config KERNEL_KCOV_INSTRUMENT_ALL
245 bool "Instrument all code by default"
246 depends on KERNEL_KCOV
247 default y if KERNEL_KCOV
248 help
249 If you are doing generic system call fuzzing (like e.g. syzkaller),
250 then you will want to instrument the whole kernel and you should
251 say y here. If you are doing more targeted fuzzing (like e.g.
252 filesystem fuzzing with AFL) then you will want to enable coverage
253 for more specific subsets of files, and should say n here.
254
255 config KERNEL_TASKSTATS
256 bool "Compile the kernel with task resource/io statistics and accounting"
257 default n
258 help
259 Enable the collection and publishing of task/io statistics and
260 accounting. Enable this option to enable i/o monitoring in system
261 monitors.
262
263 if KERNEL_TASKSTATS
264
265 config KERNEL_TASK_DELAY_ACCT
266 def_bool y
267
268 config KERNEL_TASK_IO_ACCOUNTING
269 def_bool y
270
271 config KERNEL_TASK_XACCT
272 def_bool y
273
274 endif
275
276 config KERNEL_KALLSYMS
277 bool "Compile the kernel with symbol table information"
278 default y if !SMALL_FLASH
279 help
280 This will give you more information in stack traces from kernel oopses.
281
282 config KERNEL_FTRACE
283 bool "Compile the kernel with tracing support"
284 depends on !TARGET_uml
285 default n
286
287 config KERNEL_FTRACE_SYSCALLS
288 bool "Trace system calls"
289 depends on KERNEL_FTRACE
290 default n
291
292 config KERNEL_ENABLE_DEFAULT_TRACERS
293 bool "Trace process context switches and events"
294 depends on KERNEL_FTRACE
295 default n
296
297 config KERNEL_FUNCTION_TRACER
298 bool "Function tracer"
299 depends on KERNEL_FTRACE
300 default n
301
302 config KERNEL_FUNCTION_GRAPH_TRACER
303 bool "Function graph tracer"
304 depends on KERNEL_FUNCTION_TRACER
305 default n
306
307 config KERNEL_DYNAMIC_FTRACE
308 bool "Enable/disable function tracing dynamically"
309 depends on KERNEL_FUNCTION_TRACER
310 default n
311
312 config KERNEL_FUNCTION_PROFILER
313 bool "Function profiler"
314 depends on KERNEL_FUNCTION_TRACER
315 default n
316
317 config KERNEL_IRQSOFF_TRACER
318 bool "Interrupts-off Latency Tracer"
319 depends on KERNEL_FTRACE
320 help
321 This option measures the time spent in irqs-off critical
322 sections, with microsecond accuracy.
323
324 The default measurement method is a maximum search, which is
325 disabled by default and can be runtime (re-)started
326 via:
327
328 echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
329
330 (Note that kernel size and overhead increase with this option
331 enabled. This option and the preempt-off timing option can be
332 used together or separately.)
333
334 config KERNEL_PREEMPT_TRACER
335 bool "Preemption-off Latency Tracer"
336 depends on KERNEL_FTRACE
337 help
338 This option measures the time spent in preemption-off critical
339 sections, with microsecond accuracy.
340
341 The default measurement method is a maximum search, which is
342 disabled by default and can be runtime (re-)started
343 via:
344
345 echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
346
347 (Note that kernel size and overhead increase with this option
348 enabled. This option and the irqs-off timing option can be
349 used together or separately.)
350
351 config KERNEL_DEBUG_KERNEL
352 bool
353 default n
354
355 config KERNEL_DEBUG_INFO
356 bool "Compile the kernel with debug information"
357 default y if !SMALL_FLASH
358 select KERNEL_DEBUG_KERNEL
359 help
360 This will compile your kernel and modules with debug information.
361
362 config KERNEL_DEBUG_LL_UART_NONE
363 bool
364 default n
365 depends on arm
366
367 config KERNEL_DEBUG_LL
368 bool
369 default n
370 depends on arm
371 select KERNEL_DEBUG_LL_UART_NONE
372 help
373 ARM low level debugging.
374
375 config KERNEL_DYNAMIC_DEBUG
376 bool "Compile the kernel with dynamic printk"
377 select KERNEL_DEBUG_FS
378 default n
379 help
380 Compiles debug level messages into the kernel, which would not
381 otherwise be available at runtime. These messages can then be
382 enabled/disabled based on various levels of scope - per source file,
383 function, module, format string, and line number. This mechanism
384 implicitly compiles in all pr_debug() and dev_dbg() calls, which
385 enlarges the kernel text size by about 2%.
386
387 config KERNEL_EARLY_PRINTK
388 bool "Compile the kernel with early printk"
389 default y if TARGET_bcm53xx
390 default n
391 depends on arm
392 select KERNEL_DEBUG_KERNEL
393 select KERNEL_DEBUG_LL if arm
394 help
395 Compile the kernel with early printk support. This is only useful for
396 debugging purposes to send messages over the serial console in early boot.
397 Enable this to debug early boot problems.
398
399 config KERNEL_KPROBES
400 bool "Compile the kernel with kprobes support"
401 default n
402 select KERNEL_FTRACE
403 select KERNEL_PERF_EVENTS
404 help
405 Compiles the kernel with KPROBES support, which allows you to trap
406 at almost any kernel address and execute a callback function.
407 register_kprobe() establishes a probepoint and specifies the
408 callback. Kprobes is useful for kernel debugging, non-intrusive
409 instrumentation and testing.
410 If in doubt, say "N".
411
412 config KERNEL_KPROBE_EVENTS
413 bool
414 default y if KERNEL_KPROBES
415
416 config KERNEL_AIO
417 bool "Compile the kernel with asynchronous IO support"
418 default y if !SMALL_FLASH
419
420 config KERNEL_IO_URING
421 bool "Compile the kernel with io_uring support"
422 default y if !SMALL_FLASH
423
424 config KERNEL_FHANDLE
425 bool "Compile the kernel with support for fhandle syscalls"
426 default y if !SMALL_FLASH
427
428 config KERNEL_FANOTIFY
429 bool "Compile the kernel with modern file notification support"
430 default y if !SMALL_FLASH
431
432 config KERNEL_BLK_DEV_BSG
433 bool "Compile the kernel with SCSI generic v4 support for any block device"
434 default n
435
436 config KERNEL_TRANSPARENT_HUGEPAGE
437 bool
438
439 choice
440 prompt "Transparent Hugepage Support sysfs defaults"
441 depends on KERNEL_TRANSPARENT_HUGEPAGE
442 default KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
443
444 config KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
445 bool "always"
446
447 config KERNEL_TRANSPARENT_HUGEPAGE_MADVISE
448 bool "madvise"
449 endchoice
450
451 config KERNEL_HUGETLBFS
452 bool
453
454 config KERNEL_HUGETLB_PAGE
455 bool "Compile the kernel with HugeTLB support"
456 select KERNEL_TRANSPARENT_HUGEPAGE
457 select KERNEL_HUGETLBFS
458 default n
459
460 config KERNEL_MAGIC_SYSRQ
461 bool "Compile the kernel with SysRq support"
462 default y
463
464 config KERNEL_DEBUG_PINCTRL
465 bool "Compile the kernel with pinctrl debugging"
466 select KERNEL_DEBUG_KERNEL
467
468 config KERNEL_DEBUG_GPIO
469 bool "Compile the kernel with gpio debugging"
470 select KERNEL_DEBUG_KERNEL
471
472 config KERNEL_COREDUMP
473 bool
474
475 config KERNEL_ELF_CORE
476 bool "Enable process core dump support"
477 select KERNEL_COREDUMP
478 default y if !SMALL_FLASH
479
480 config KERNEL_PROVE_LOCKING
481 bool "Enable kernel lock checking"
482 select KERNEL_DEBUG_KERNEL
483 default n
484
485 config KERNEL_SOFTLOCKUP_DETECTOR
486 bool "Compile the kernel with detect Soft Lockups"
487 depends on KERNEL_DEBUG_KERNEL
488 help
489 Say Y here to enable the kernel to act as a watchdog to detect
490 soft lockups.
491
492 Softlockups are bugs that cause the kernel to loop in kernel
493 mode for more than 20 seconds, without giving other tasks a
494 chance to run. The current stack trace is displayed upon
495 detection and the system will stay locked up.
496
497 config KERNEL_DETECT_HUNG_TASK
498 bool "Compile the kernel with detect Hung Tasks"
499 depends on KERNEL_DEBUG_KERNEL
500 default KERNEL_SOFTLOCKUP_DETECTOR
501 help
502 Say Y here to enable the kernel to detect "hung tasks",
503 which are bugs that cause the task to be stuck in
504 uninterruptible "D" state indefinitely.
505
506 When a hung task is detected, the kernel will print the
507 current stack trace (which you should report), but the
508 task will stay in uninterruptible state. If lockdep is
509 enabled then all held locks will also be reported. This
510 feature has negligible overhead.
511
512 config KERNEL_WQ_WATCHDOG
513 bool "Compile the kernel with detect Workqueue Stalls"
514 depends on KERNEL_DEBUG_KERNEL
515 help
516 Say Y here to enable stall detection on workqueues. If a
517 worker pool doesn't make forward progress on a pending work
518 item for over a given amount of time, 30s by default, a
519 warning message is printed along with dump of workqueue
520 state. This can be configured through kernel parameter
521 "workqueue.watchdog_thresh" and its sysfs counterpart.
522
523 config KERNEL_DEBUG_ATOMIC_SLEEP
524 bool "Compile the kernel with sleep inside atomic section checking"
525 depends on KERNEL_DEBUG_KERNEL
526 help
527 If you say Y here, various routines which may sleep will become very
528 noisy if they are called inside atomic sections: when a spinlock is
529 held, inside an rcu read side critical section, inside preempt disabled
530 sections, inside an interrupt, etc...
531
532 config KERNEL_DEBUG_VM
533 bool "Compile the kernel with debug VM"
534 depends on KERNEL_DEBUG_KERNEL
535 help
536 Enable this to turn on extended checks in the virtual-memory system
537 that may impact performance.
538
539 If unsure, say N.
540
541 config KERNEL_PRINTK_TIME
542 bool "Enable printk timestamps"
543 default y
544
545 config KERNEL_SLUB_DEBUG
546 bool
547
548 config KERNEL_SLUB_DEBUG_ON
549 bool
550
551 config KERNEL_SLABINFO
552 select KERNEL_SLUB_DEBUG
553 select KERNEL_SLUB_DEBUG_ON
554 bool "Enable /proc slab debug info"
555
556 config KERNEL_PROC_PAGE_MONITOR
557 bool "Enable /proc page monitoring"
558
559 config KERNEL_RELAY
560 bool
561
562 config KERNEL_KEXEC
563 bool "Enable kexec support"
564
565 config KERNEL_PROC_VMCORE
566 bool
567
568 config KERNEL_PROC_KCORE
569 bool
570
571 config KERNEL_CRASH_DUMP
572 depends on i386 || x86_64 || arm || armeb
573 select KERNEL_KEXEC
574 select KERNEL_PROC_VMCORE
575 select KERNEL_PROC_KCORE
576 bool "Enable support for kexec crashdump"
577 default y
578
579 config USE_RFKILL
580 bool "Enable rfkill support"
581 default RFKILL_SUPPORT
582
583 config USE_SPARSE
584 bool "Enable sparse check during kernel build"
585 default n
586
587 config KERNEL_DEVTMPFS
588 bool "Compile the kernel with device tmpfs enabled"
589 default n
590 help
591 devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
592 devices nodes for all registered devices to simplify boot, but leaves more
593 complex tasks to userspace (e.g. udev).
594
595 if KERNEL_DEVTMPFS
596
597 config KERNEL_DEVTMPFS_MOUNT
598 bool "Automatically mount devtmpfs after root filesystem is mounted"
599 default n
600
601 endif
602
603 config KERNEL_KEYS
604 bool "Enable kernel access key retention support"
605 default !SMALL_FLASH
606
607 config KERNEL_PERSISTENT_KEYRINGS
608 bool "Enable kernel persistent keyrings"
609 depends on KERNEL_KEYS
610 default n
611
612 config KERNEL_KEYS_REQUEST_CACHE
613 bool "Enable temporary caching of the last request_key() result"
614 depends on KERNEL_KEYS
615 default n
616
617 config KERNEL_BIG_KEYS
618 bool "Enable large payload keys on kernel keyrings"
619 depends on KERNEL_KEYS
620 default n
621
622 #
623 # CGROUP support symbols
624 #
625
626 config KERNEL_CGROUPS
627 bool "Enable kernel cgroups"
628 default y if !SMALL_FLASH
629
630 if KERNEL_CGROUPS
631
632 config KERNEL_CGROUP_DEBUG
633 bool "Example debug cgroup subsystem"
634 default n
635 help
636 This option enables a simple cgroup subsystem that
637 exports useful debugging information about the cgroups
638 framework.
639
640 config KERNEL_FREEZER
641 bool
642
643 config KERNEL_CGROUP_FREEZER
644 bool "legacy Freezer cgroup subsystem"
645 default n
646 select KERNEL_FREEZER
647 help
648 Provides a way to freeze and unfreeze all tasks in a
649 cgroup.
650 (legacy cgroup1-only controller, in cgroup2 freezer
651 is integrated in the Memory controller)
652
653 config KERNEL_CGROUP_DEVICE
654 bool "legacy Device controller for cgroups"
655 default n
656 help
657 Provides a cgroup implementing whitelists for devices which
658 a process in the cgroup can mknod or open.
659 (legacy cgroup1-only controller)
660
661 config KERNEL_CGROUP_HUGETLB
662 bool "HugeTLB controller"
663 default n
664 select KERNEL_HUGETLB_PAGE
665
666 config KERNEL_CGROUP_PIDS
667 bool "PIDs cgroup subsystem"
668 default y
669 help
670 Provides enforcement of process number limits in the scope of a
671 cgroup.
672
673 config KERNEL_CGROUP_RDMA
674 bool "RDMA controller for cgroups"
675 default y
676
677 config KERNEL_CGROUP_BPF
678 bool "Support for eBPF programs attached to cgroups"
679 default y
680
681 config KERNEL_CPUSETS
682 bool "Cpuset support"
683 default y
684 help
685 This option will let you create and manage CPUSETs which
686 allow dynamically partitioning a system into sets of CPUs and
687 Memory Nodes and assigning tasks to run only within those sets.
688 This is primarily useful on large SMP or NUMA systems.
689
690 config KERNEL_PROC_PID_CPUSET
691 bool "Include legacy /proc/<pid>/cpuset file"
692 default n
693 depends on KERNEL_CPUSETS
694
695 config KERNEL_CGROUP_CPUACCT
696 bool "Simple CPU accounting cgroup subsystem"
697 default y
698 help
699 Provides a simple Resource Controller for monitoring the
700 total CPU consumed by the tasks in a cgroup.
701
702 config KERNEL_RESOURCE_COUNTERS
703 bool "Resource counters"
704 default y
705 help
706 This option enables controller independent resource accounting
707 infrastructure that works with cgroups.
708
709 config KERNEL_MM_OWNER
710 bool
711 default y if KERNEL_MEMCG
712
713 config KERNEL_MEMCG
714 bool "Memory Resource Controller for Control Groups"
715 default y
716 select KERNEL_FREEZER
717 depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18
718 help
719 Provides a memory resource controller that manages both anonymous
720 memory and page cache. (See Documentation/cgroups/memory.txt)
721
722 Note that setting this option increases fixed memory overhead
723 associated with each page of memory in the system. By this,
724 20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory
725 usage tracking struct at boot. Total amount of this is printed out
726 at boot.
727
728 Only enable when you're ok with these tradeoffs and really
729 sure you need the memory resource controller. Even when you enable
730 this, you can set "cgroup_disable=memory" at your boot option to
731 disable memory resource controller and you can avoid overheads
732 (but lose benefits of memory resource controller).
733
734 This config option also selects MM_OWNER config option, which
735 could in turn add some fork/exit overhead.
736
737 config KERNEL_MEMCG_SWAP
738 bool "Memory Resource Controller Swap Extension"
739 default y
740 depends on KERNEL_MEMCG
741 help
742 Add swap management feature to memory resource controller. When you
743 enable this, you can limit mem+swap usage per cgroup. In other words,
744 when you disable this, memory resource controller has no cares to
745 usage of swap...a process can exhaust all of the swap. This extension
746 is useful when you want to avoid exhaustion swap but this itself
747 adds more overheads and consumes memory for remembering information.
748 Especially if you use 32bit system or small memory system, please
749 be careful about enabling this. When memory resource controller
750 is disabled by boot option, this will be automatically disabled and
751 there will be no overhead from this. Even when you set this config=y,
752 if boot option "swapaccount=0" is set, swap will not be accounted.
753 Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
754 size is 4096bytes, 512k per 1Gbytes of swap.
755
756 config KERNEL_MEMCG_SWAP_ENABLED
757 bool "Memory Resource Controller Swap Extension enabled by default"
758 default n
759 depends on KERNEL_MEMCG_SWAP
760 help
761 Memory Resource Controller Swap Extension comes with its price in
762 a bigger memory consumption. General purpose distribution kernels
763 which want to enable the feature but keep it disabled by default
764 and let the user enable it by swapaccount boot command line
765 parameter should have this option unselected.
766
767 Those who want to have the feature enabled by default should
768 select this option (if, for some reason, they need to disable it,
769 then swapaccount=0 does the trick).
770
771
772 config KERNEL_MEMCG_KMEM
773 bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
774 default y
775 depends on KERNEL_MEMCG
776 help
777 The Kernel Memory extension for Memory Resource Controller can limit
778 the amount of memory used by kernel objects in the system. Those are
779 fundamentally different from the entities handled by the standard
780 Memory Controller, which are page-based, and can be swapped. Users of
781 the kmem extension can use it to guarantee that no group of processes
782 will ever exhaust kernel resources alone.
783
784 config KERNEL_CGROUP_PERF
785 bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
786 select KERNEL_PERF_EVENTS
787 default n
788 help
789 This option extends the per-cpu mode to restrict monitoring to
790 threads which belong to the cgroup specified and run on the
791 designated cpu.
792
793 menuconfig KERNEL_CGROUP_SCHED
794 bool "Group CPU scheduler"
795 default y
796 help
797 This feature lets CPU scheduler recognize task groups and control CPU
798 bandwidth allocation to such task groups. It uses cgroups to group
799 tasks.
800
801 if KERNEL_CGROUP_SCHED
802
803 config KERNEL_FAIR_GROUP_SCHED
804 bool "Group scheduling for SCHED_OTHER"
805 default y
806
807 config KERNEL_CFS_BANDWIDTH
808 bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
809 default y
810 depends on KERNEL_FAIR_GROUP_SCHED
811 help
812 This option allows users to define CPU bandwidth rates (limits) for
813 tasks running within the fair group scheduler. Groups with no limit
814 set are considered to be unconstrained and will run with no
815 restriction.
816 See tip/Documentation/scheduler/sched-bwc.txt for more information.
817
818 config KERNEL_RT_GROUP_SCHED
819 bool "Group scheduling for SCHED_RR/FIFO"
820 default y
821 help
822 This feature lets you explicitly allocate real CPU bandwidth
823 to task groups. If enabled, it will also make it impossible to
824 schedule realtime tasks for non-root users until you allocate
825 realtime bandwidth for them.
826
827 endif
828
829 config KERNEL_BLK_CGROUP
830 bool "Block IO controller"
831 default y
832 help
833 Generic block IO controller cgroup interface. This is the common
834 cgroup interface which should be used by various IO controlling
835 policies.
836
837 Currently, CFQ IO scheduler uses it to recognize task groups and
838 control disk bandwidth allocation (proportional time slice allocation)
839 to such task groups. It is also used by bio throttling logic in
840 block layer to implement upper limit in IO rates on a device.
841
842 This option only enables generic Block IO controller infrastructure.
843 One needs to also enable actual IO controlling logic/policy. For
844 enabling proportional weight division of disk bandwidth in CFQ, set
845 CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
846 CONFIG_BLK_DEV_THROTTLING=y.
847
848 if KERNEL_BLK_CGROUP
849
850 config KERNEL_CFQ_GROUP_IOSCHED
851 bool "Proportional weight of disk bandwidth in CFQ"
852
853 config KERNEL_BLK_DEV_THROTTLING
854 bool "Enable throttling policy"
855 default y
856
857 config KERNEL_BLK_DEV_THROTTLING_LOW
858 bool "Block throttling .low limit interface support (EXPERIMENTAL)"
859 depends on KERNEL_BLK_DEV_THROTTLING
860 endif
861
862 config KERNEL_DEBUG_BLK_CGROUP
863 bool "Enable Block IO controller debugging"
864 default n
865 depends on KERNEL_BLK_CGROUP
866 help
867 Enable some debugging help. Currently it exports additional stat
868 files in a cgroup which can be useful for debugging.
869
870 config KERNEL_NET_CLS_CGROUP
871 bool "legacy Control Group Classifier"
872 default n
873
874 config KERNEL_CGROUP_NET_CLASSID
875 bool "legacy Network classid cgroup"
876 default n
877
878 config KERNEL_CGROUP_NET_PRIO
879 bool "legacy Network priority cgroup"
880 default n
881
882 endif
883
884 #
885 # Namespace support symbols
886 #
887
888 config KERNEL_NAMESPACES
889 bool "Enable kernel namespaces"
890 default y if !SMALL_FLASH
891
892 if KERNEL_NAMESPACES
893
894 config KERNEL_UTS_NS
895 bool "UTS namespace"
896 default y
897 help
898 In this namespace, tasks see different info provided
899 with the uname() system call.
900
901 config KERNEL_IPC_NS
902 bool "IPC namespace"
903 default y
904 help
905 In this namespace, tasks work with IPC ids which correspond to
906 different IPC objects in different namespaces.
907
908 config KERNEL_USER_NS
909 bool "User namespace (EXPERIMENTAL)"
910 default y
911 help
912 This allows containers, i.e. vservers, to use user namespaces
913 to provide different user info for different servers.
914
915 config KERNEL_PID_NS
916 bool "PID Namespaces"
917 default y
918 help
919 Support process id namespaces. This allows having multiple
920 processes with the same pid as long as they are in different
921 pid namespaces. This is a building block of containers.
922
923 config KERNEL_NET_NS
924 bool "Network namespace"
925 default y
926 help
927 Allow user space to create what appear to be multiple instances
928 of the network stack.
929
930 endif
931
932 config KERNEL_DEVPTS_MULTIPLE_INSTANCES
933 bool "Support multiple instances of devpts"
934 default y if !SMALL_FLASH
935 help
936 Enable support for multiple instances of devpts filesystem.
937 If you want to have isolated PTY namespaces (eg: in containers),
938 say Y here. Otherwise, say N. If enabled, each mount of devpts
939 filesystem with the '-o newinstance' option will create an
940 independent PTY namespace.
941
942 config KERNEL_POSIX_MQUEUE
943 bool "POSIX Message Queues"
944 default y if !SMALL_FLASH
945 help
946 POSIX variant of message queues is a part of IPC. In POSIX message
947 queues every message has a priority which decides about succession
948 of receiving it by a process. If you want to compile and run
949 programs written e.g. for Solaris with use of its POSIX message
950 queues (functions mq_*) say Y here.
951
952 POSIX message queues are visible as a filesystem called 'mqueue'
953 and can be mounted somewhere if you want to do filesystem
954 operations on message queues.
955
956
957 config KERNEL_SECCOMP_FILTER
958 bool
959 default y if !SMALL_FLASH
960
961 config KERNEL_SECCOMP
962 bool "Enable seccomp support"
963 depends on !(TARGET_uml)
964 select KERNEL_SECCOMP_FILTER
965 default y if !SMALL_FLASH
966 help
967 Build kernel with support for seccomp.
968
969 #
970 # IPv4 configuration
971 #
972
973 config KERNEL_IP_MROUTE
974 bool "Enable IPv4 multicast routing"
975 default y
976 help
977 Multicast routing requires a multicast routing daemon in
978 addition to kernel support.
979
980 #
981 # IPv6 configuration
982 #
983
984 config KERNEL_IPV6
985 def_bool IPV6
986
987 if KERNEL_IPV6
988
989 config KERNEL_IPV6_MULTIPLE_TABLES
990 def_bool y
991
992 config KERNEL_IPV6_SUBTREES
993 def_bool y
994
995 config KERNEL_IPV6_MROUTE
996 bool "Enable IPv6 multicast routing"
997 default y
998 help
999 Multicast routing requires a multicast routing daemon in
1000 addition to kernel support.
1001
1002 config KERNEL_IPV6_PIMSM_V2
1003 def_bool n
1004
1005 config KERNEL_IPV6_SEG6_LWTUNNEL
1006 bool "Enable support for lightweight tunnels"
1007 default y if !SMALL_FLASH
1008 help
1009 Using lwtunnel (needed for IPv6 segment routing) requires ip-full package.
1010
1011 config KERNEL_LWTUNNEL_BPF
1012 def_bool n
1013
1014 endif
1015
1016 #
1017 # NFS related symbols
1018 #
1019 config KERNEL_IP_PNP
1020 bool "Compile the kernel with rootfs on NFS"
1021 help
1022 If you want to make your kernel boot off a NFS server as root
1023 filesystem, select Y here.
1024
1025 if KERNEL_IP_PNP
1026
1027 config KERNEL_IP_PNP_DHCP
1028 def_bool y
1029
1030 config KERNEL_IP_PNP_BOOTP
1031 def_bool n
1032
1033 config KERNEL_IP_PNP_RARP
1034 def_bool n
1035
1036 config KERNEL_NFS_FS
1037 def_bool y
1038
1039 config KERNEL_NFS_V2
1040 def_bool y
1041
1042 config KERNEL_NFS_V3
1043 def_bool y
1044
1045 config KERNEL_ROOT_NFS
1046 def_bool y
1047
1048 endif
1049
1050 menu "Filesystem ACL and attr support options"
1051 config USE_FS_ACL_ATTR
1052 bool "Use filesystem ACL and attr support by default"
1053 default n
1054 help
1055 Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default
1056 for kernel and packages, except tmpfs, flash filesystems,
1057 and old NFS. Also enable userspace extended attribute support
1058 by default. (OpenWrt already has an expection it will be
1059 present in the kernel).
1060
1061 config KERNEL_FS_POSIX_ACL
1062 bool "Enable POSIX ACL support"
1063 default y if USE_FS_ACL_ATTR
1064
1065 config KERNEL_BTRFS_FS_POSIX_ACL
1066 bool "Enable POSIX ACL for BtrFS Filesystems"
1067 select KERNEL_FS_POSIX_ACL
1068 default y if USE_FS_ACL_ATTR
1069
1070 config KERNEL_EXT4_FS_POSIX_ACL
1071 bool "Enable POSIX ACL for Ext4 Filesystems"
1072 select KERNEL_FS_POSIX_ACL
1073 default y if USE_FS_ACL_ATTR
1074
1075 config KERNEL_F2FS_FS_POSIX_ACL
1076 bool "Enable POSIX ACL for F2FS Filesystems"
1077 select KERNEL_FS_POSIX_ACL
1078 default n
1079
1080 config KERNEL_JFFS2_FS_POSIX_ACL
1081 bool "Enable POSIX ACL for JFFS2 Filesystems"
1082 select KERNEL_FS_POSIX_ACL
1083 default n
1084
1085 config KERNEL_TMPFS_POSIX_ACL
1086 bool "Enable POSIX ACL for TMPFS Filesystems"
1087 select KERNEL_FS_POSIX_ACL
1088 default n
1089
1090 config KERNEL_CIFS_ACL
1091 bool "Enable CIFS ACLs"
1092 select KERNEL_FS_POSIX_ACL
1093 default y if USE_FS_ACL_ATTR
1094
1095 config KERNEL_HFS_FS_POSIX_ACL
1096 bool "Enable POSIX ACL for HFS Filesystems"
1097 select KERNEL_FS_POSIX_ACL
1098 default y if USE_FS_ACL_ATTR
1099
1100 config KERNEL_HFSPLUS_FS_POSIX_ACL
1101 bool "Enable POSIX ACL for HFS+ Filesystems"
1102 select KERNEL_FS_POSIX_ACL
1103 default y if USE_FS_ACL_ATTR
1104
1105 config KERNEL_NFS_ACL_SUPPORT
1106 bool "Enable ACLs for NFS"
1107 default y if USE_FS_ACL_ATTR
1108
1109 config KERNEL_NFS_V3_ACL_SUPPORT
1110 bool "Enable ACLs for NFSv3"
1111 default n
1112
1113 config KERNEL_NFSD_V2_ACL_SUPPORT
1114 bool "Enable ACLs for NFSDv2"
1115 default n
1116
1117 config KERNEL_NFSD_V3_ACL_SUPPORT
1118 bool "Enable ACLs for NFSDv3"
1119 default n
1120
1121 config KERNEL_REISER_FS_POSIX_ACL
1122 bool "Enable POSIX ACLs for ReiserFS"
1123 select KERNEL_FS_POSIX_ACL
1124 default y if USE_FS_ACL_ATTR
1125
1126 config KERNEL_XFS_POSIX_ACL
1127 bool "Enable POSIX ACLs for XFS"
1128 select KERNEL_FS_POSIX_ACL
1129 default y if USE_FS_ACL_ATTR
1130
1131 config KERNEL_JFS_POSIX_ACL
1132 bool "Enable POSIX ACLs for JFS"
1133 select KERNEL_FS_POSIX_ACL
1134 default y if USE_FS_ACL_ATTR
1135
1136 endmenu
1137
1138 config KERNEL_DEVMEM
1139 bool "/dev/mem virtual device support"
1140 help
1141 Say Y here if you want to support the /dev/mem device.
1142 The /dev/mem device is used to access areas of physical
1143 memory.
1144
1145 config KERNEL_DEVKMEM
1146 bool "/dev/kmem virtual device support"
1147 help
1148 Say Y here if you want to support the /dev/kmem device. The
1149 /dev/kmem device is rarely used, but can be used for certain
1150 kind of kernel debugging operations.
1151
1152 config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
1153 int "Number of squashfs fragments cached"
1154 default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
1155 default 3
1156
1157 config KERNEL_SQUASHFS_XATTR
1158 bool "Squashfs XATTR support"
1159
1160 #
1161 # compile optimization setting
1162 #
1163 choice
1164 prompt "Compiler optimization level"
1165 default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
1166
1167 config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
1168 bool "Optimize for performance"
1169 help
1170 This is the default optimization level for the kernel, building
1171 with the "-O2" compiler flag for best performance and most
1172 helpful compile-time warnings.
1173
1174 config KERNEL_CC_OPTIMIZE_FOR_SIZE
1175 bool "Optimize for size"
1176 help
1177 Enabling this option will pass "-Os" instead of "-O2" to
1178 your compiler resulting in a smaller kernel.
1179
1180 endchoice
1181
1182 config KERNEL_AUDIT
1183 bool "Auditing support"
1184
1185 config KERNEL_SECURITY
1186 bool "Enable different security models"
1187
1188 config KERNEL_SECURITY_NETWORK
1189 bool "Socket and Networking Security Hooks"
1190 select KERNEL_SECURITY
1191
1192 config KERNEL_SECURITY_SELINUX
1193 bool "NSA SELinux Support"
1194 select KERNEL_SECURITY_NETWORK
1195 select KERNEL_AUDIT
1196
1197 config KERNEL_SECURITY_SELINUX_BOOTPARAM
1198 bool "NSA SELinux boot parameter"
1199 depends on KERNEL_SECURITY_SELINUX
1200 default y
1201
1202 config KERNEL_SECURITY_SELINUX_DISABLE
1203 bool "NSA SELinux runtime disable"
1204 depends on KERNEL_SECURITY_SELINUX
1205
1206 config KERNEL_SECURITY_SELINUX_DEVELOP
1207 bool "NSA SELinux Development Support"
1208 depends on KERNEL_SECURITY_SELINUX
1209 default y
1210
1211 config KERNEL_SECURITY_SELINUX_SIDTAB_HASH_BITS
1212 int
1213 depends on KERNEL_SECURITY_SELINUX
1214 default 9
1215
1216 config KERNEL_SECURITY_SELINUX_SID2STR_CACHE_SIZE
1217 int
1218 depends on KERNEL_SECURITY_SELINUX
1219 default 256
1220
1221 config KERNEL_LSM
1222 string
1223 default "lockdown,yama,loadpin,safesetid,integrity,selinux"
1224 depends on KERNEL_SECURITY_SELINUX
1225
1226 config KERNEL_EXT4_FS_SECURITY
1227 bool "Ext4 Security Labels"
1228
1229 config KERNEL_F2FS_FS_SECURITY
1230 bool "F2FS Security Labels"
1231
1232 config KERNEL_UBIFS_FS_SECURITY
1233 bool "UBIFS Security Labels"
1234
1235 config KERNEL_JFFS2_FS_SECURITY
1236 bool "JFFS2 Security Labels"