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