kernel: add DEBUG_INFO_REDUCED config option
[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_SWAP
28 bool "Support for paging of anonymous memory (swap)"
29 default y if !SMALL_FLASH
30
31 config KERNEL_PROC_STRIPPED
32 bool "Strip non-essential /proc functionality to reduce code size"
33 default y if SMALL_FLASH
34
35 config KERNEL_DEBUG_FS
36 bool "Compile the kernel with debug filesystem enabled"
37 default y
38 help
39 debugfs is a virtual file system that kernel developers use to put
40 debugging files into. Enable this option to be able to read and
41 write to these files. Many common debugging facilities, such as
42 ftrace, require the existence of debugfs.
43
44 config KERNEL_MIPS_FP_SUPPORT
45 bool
46 default y if TARGET_pistachio
47
48 config KERNEL_ARM_PMU
49 bool
50 default n
51 depends on (arm || aarch64)
52
53 config KERNEL_X86_VSYSCALL_EMULATION
54 bool "Enable vsyscall emulation"
55 default n
56 depends on x86_64
57 help
58 This enables emulation of the legacy vsyscall page. Disabling
59 it is roughly equivalent to booting with vsyscall=none, except
60 that it will also disable the helpful warning if a program
61 tries to use a vsyscall. With this option set to N, offending
62 programs will just segfault, citing addresses of the form
63 0xffffffffff600?00.
64
65 This option is required by many programs built before 2013, and
66 care should be used even with newer programs if set to N.
67
68 Disabling this option saves about 7K of kernel size and
69 possibly 4K of additional runtime pagetable memory.
70
71 config KERNEL_PERF_EVENTS
72 bool "Compile the kernel with performance events and counters"
73 default n
74 select KERNEL_ARM_PMU if (arm || aarch64)
75
76 config KERNEL_PROFILING
77 bool "Compile the kernel with profiling enabled"
78 default n
79 select KERNEL_PERF_EVENTS
80 help
81 Enable the extended profiling support mechanisms used by profilers such
82 as OProfile.
83
84 config KERNEL_RPI_AXIPERF
85 bool "Compile the kernel with RaspberryPi AXI Performance monitors"
86 default y
87 depends on KERNEL_PERF_EVENTS && TARGET_bcm27xx
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_HIST_TRIGGERS
353 bool "Histogram triggers"
354 depends on KERNEL_FTRACE
355 help
356 Hist triggers allow one or more arbitrary trace event fields to be
357 aggregated into hash tables and dumped to stdout by reading a
358 debugfs/tracefs file. They're useful for gathering quick and dirty
359 (though precise) summaries of event activity as an initial guide for
360 further investigation using more advanced tools.
361
362 Inter-event tracing of quantities such as latencies is also
363 supported using hist triggers under this option.
364
365 config KERNEL_DEBUG_KERNEL
366 bool
367 default n
368
369 config KERNEL_DEBUG_INFO
370 bool "Compile the kernel with debug information"
371 default y if !SMALL_FLASH
372 select KERNEL_DEBUG_KERNEL
373 help
374 This will compile your kernel and modules with debug information.
375
376 config KERNEL_DEBUG_INFO_REDUCED
377 bool "Reduce debugging information"
378 default y
379 depends on KERNEL_DEBUG_INFO
380 help
381 If you say Y here gcc is instructed to generate less debugging
382 information for structure types. This means that tools that
383 need full debugging information (like kgdb or systemtap) won't
384 be happy. But if you merely need debugging information to
385 resolve line numbers there is no loss. Advantage is that
386 build directory object sizes shrink dramatically over a full
387 DEBUG_INFO build and compile times are reduced too.
388 Only works with newer gcc versions.
389
390 config KERNEL_DEBUG_LL_UART_NONE
391 bool
392 default n
393 depends on arm
394
395 config KERNEL_DEBUG_LL
396 bool
397 default n
398 depends on arm
399 select KERNEL_DEBUG_LL_UART_NONE
400 help
401 ARM low level debugging.
402
403 config KERNEL_DYNAMIC_DEBUG
404 bool "Compile the kernel with dynamic printk"
405 select KERNEL_DEBUG_FS
406 default n
407 help
408 Compiles debug level messages into the kernel, which would not
409 otherwise be available at runtime. These messages can then be
410 enabled/disabled based on various levels of scope - per source file,
411 function, module, format string, and line number. This mechanism
412 implicitly compiles in all pr_debug() and dev_dbg() calls, which
413 enlarges the kernel text size by about 2%.
414
415 config KERNEL_EARLY_PRINTK
416 bool "Compile the kernel with early printk"
417 default y if TARGET_bcm53xx
418 default n
419 depends on arm
420 select KERNEL_DEBUG_KERNEL
421 select KERNEL_DEBUG_LL if arm
422 help
423 Compile the kernel with early printk support. This is only useful for
424 debugging purposes to send messages over the serial console in early boot.
425 Enable this to debug early boot problems.
426
427 config KERNEL_KPROBES
428 bool "Compile the kernel with kprobes support"
429 default n
430 select KERNEL_FTRACE
431 select KERNEL_PERF_EVENTS
432 help
433 Compiles the kernel with KPROBES support, which allows you to trap
434 at almost any kernel address and execute a callback function.
435 register_kprobe() establishes a probepoint and specifies the
436 callback. Kprobes is useful for kernel debugging, non-intrusive
437 instrumentation and testing.
438 If in doubt, say "N".
439
440 config KERNEL_KPROBE_EVENTS
441 bool
442 default y if KERNEL_KPROBES
443
444 config KERNEL_BPF_KPROBE_OVERRIDE
445 bool
446 depends on KERNEL_KPROBES
447 default n
448
449 config KERNEL_AIO
450 bool "Compile the kernel with asynchronous IO support"
451 default y if !SMALL_FLASH
452
453 config KERNEL_IO_URING
454 bool "Compile the kernel with io_uring support"
455 default y if !SMALL_FLASH
456
457 config KERNEL_FHANDLE
458 bool "Compile the kernel with support for fhandle syscalls"
459 default y if !SMALL_FLASH
460
461 config KERNEL_FANOTIFY
462 bool "Compile the kernel with modern file notification support"
463 default y if !SMALL_FLASH
464
465 config KERNEL_BLK_DEV_BSG
466 bool "Compile the kernel with SCSI generic v4 support for any block device"
467 default n
468
469 config KERNEL_TRANSPARENT_HUGEPAGE
470 bool
471
472 choice
473 prompt "Transparent Hugepage Support sysfs defaults"
474 depends on KERNEL_TRANSPARENT_HUGEPAGE
475 default KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
476
477 config KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
478 bool "always"
479
480 config KERNEL_TRANSPARENT_HUGEPAGE_MADVISE
481 bool "madvise"
482 endchoice
483
484 config KERNEL_HUGETLBFS
485 bool
486
487 config KERNEL_HUGETLB_PAGE
488 bool "Compile the kernel with HugeTLB support"
489 select KERNEL_TRANSPARENT_HUGEPAGE
490 select KERNEL_HUGETLBFS
491 default n
492
493 config KERNEL_MAGIC_SYSRQ
494 bool "Compile the kernel with SysRq support"
495 default y
496
497 config KERNEL_DEBUG_PINCTRL
498 bool "Compile the kernel with pinctrl debugging"
499 select KERNEL_DEBUG_KERNEL
500
501 config KERNEL_DEBUG_GPIO
502 bool "Compile the kernel with gpio debugging"
503 select KERNEL_DEBUG_KERNEL
504
505 config KERNEL_COREDUMP
506 bool
507
508 config KERNEL_ELF_CORE
509 bool "Enable process core dump support"
510 select KERNEL_COREDUMP
511 default y if !SMALL_FLASH
512
513 config KERNEL_PROVE_LOCKING
514 bool "Enable kernel lock checking"
515 select KERNEL_DEBUG_KERNEL
516 default n
517
518 config KERNEL_SOFTLOCKUP_DETECTOR
519 bool "Compile the kernel with detect Soft Lockups"
520 depends on KERNEL_DEBUG_KERNEL
521 help
522 Say Y here to enable the kernel to act as a watchdog to detect
523 soft lockups.
524
525 Softlockups are bugs that cause the kernel to loop in kernel
526 mode for more than 20 seconds, without giving other tasks a
527 chance to run. The current stack trace is displayed upon
528 detection and the system will stay locked up.
529
530 config KERNEL_DETECT_HUNG_TASK
531 bool "Compile the kernel with detect Hung Tasks"
532 depends on KERNEL_DEBUG_KERNEL
533 default KERNEL_SOFTLOCKUP_DETECTOR
534 help
535 Say Y here to enable the kernel to detect "hung tasks",
536 which are bugs that cause the task to be stuck in
537 uninterruptible "D" state indefinitely.
538
539 When a hung task is detected, the kernel will print the
540 current stack trace (which you should report), but the
541 task will stay in uninterruptible state. If lockdep is
542 enabled then all held locks will also be reported. This
543 feature has negligible overhead.
544
545 config KERNEL_WQ_WATCHDOG
546 bool "Compile the kernel with detect Workqueue Stalls"
547 depends on KERNEL_DEBUG_KERNEL
548 help
549 Say Y here to enable stall detection on workqueues. If a
550 worker pool doesn't make forward progress on a pending work
551 item for over a given amount of time, 30s by default, a
552 warning message is printed along with dump of workqueue
553 state. This can be configured through kernel parameter
554 "workqueue.watchdog_thresh" and its sysfs counterpart.
555
556 config KERNEL_DEBUG_ATOMIC_SLEEP
557 bool "Compile the kernel with sleep inside atomic section checking"
558 depends on KERNEL_DEBUG_KERNEL
559 help
560 If you say Y here, various routines which may sleep will become very
561 noisy if they are called inside atomic sections: when a spinlock is
562 held, inside an rcu read side critical section, inside preempt disabled
563 sections, inside an interrupt, etc...
564
565 config KERNEL_DEBUG_VM
566 bool "Compile the kernel with debug VM"
567 depends on KERNEL_DEBUG_KERNEL
568 help
569 Enable this to turn on extended checks in the virtual-memory system
570 that may impact performance.
571
572 If unsure, say N.
573
574 config KERNEL_PRINTK_TIME
575 bool "Enable printk timestamps"
576 default y
577
578 config KERNEL_SLUB_DEBUG
579 bool
580
581 config KERNEL_SLUB_DEBUG_ON
582 bool
583
584 config KERNEL_SLABINFO
585 select KERNEL_SLUB_DEBUG
586 select KERNEL_SLUB_DEBUG_ON
587 bool "Enable /proc slab debug info"
588
589 config KERNEL_PROC_PAGE_MONITOR
590 bool "Enable /proc page monitoring"
591
592 config KERNEL_RELAY
593 bool
594
595 config KERNEL_KEXEC
596 bool "Enable kexec support"
597
598 config KERNEL_PROC_VMCORE
599 bool
600
601 config KERNEL_PROC_KCORE
602 bool
603
604 config KERNEL_CRASH_DUMP
605 depends on i386 || x86_64 || arm || armeb
606 select KERNEL_KEXEC
607 select KERNEL_PROC_VMCORE
608 select KERNEL_PROC_KCORE
609 bool "Enable support for kexec crashdump"
610 default y
611
612 config USE_RFKILL
613 bool "Enable rfkill support"
614 default RFKILL_SUPPORT
615
616 config USE_SPARSE
617 bool "Enable sparse check during kernel build"
618 default n
619
620 config KERNEL_DEVTMPFS
621 bool "Compile the kernel with device tmpfs enabled"
622 default n
623 help
624 devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
625 devices nodes for all registered devices to simplify boot, but leaves more
626 complex tasks to userspace (e.g. udev).
627
628 if KERNEL_DEVTMPFS
629
630 config KERNEL_DEVTMPFS_MOUNT
631 bool "Automatically mount devtmpfs after root filesystem is mounted"
632 default n
633
634 endif
635
636 config KERNEL_KEYS
637 bool "Enable kernel access key retention support"
638 default !SMALL_FLASH
639
640 config KERNEL_PERSISTENT_KEYRINGS
641 bool "Enable kernel persistent keyrings"
642 depends on KERNEL_KEYS
643 default n
644
645 config KERNEL_KEYS_REQUEST_CACHE
646 bool "Enable temporary caching of the last request_key() result"
647 depends on KERNEL_KEYS
648 default n
649
650 config KERNEL_BIG_KEYS
651 bool "Enable large payload keys on kernel keyrings"
652 depends on KERNEL_KEYS
653 default n
654
655 #
656 # CGROUP support symbols
657 #
658
659 config KERNEL_CGROUPS
660 bool "Enable kernel cgroups"
661 default y if !SMALL_FLASH
662
663 if KERNEL_CGROUPS
664
665 config KERNEL_CGROUP_DEBUG
666 bool "Example debug cgroup subsystem"
667 default n
668 help
669 This option enables a simple cgroup subsystem that
670 exports useful debugging information about the cgroups
671 framework.
672
673 config KERNEL_FREEZER
674 bool
675
676 config KERNEL_CGROUP_FREEZER
677 bool "legacy Freezer cgroup subsystem"
678 default n
679 select KERNEL_FREEZER
680 help
681 Provides a way to freeze and unfreeze all tasks in a
682 cgroup.
683 (legacy cgroup1-only controller, in cgroup2 freezer
684 is integrated in the Memory controller)
685
686 config KERNEL_CGROUP_DEVICE
687 bool "legacy Device controller for cgroups"
688 default n
689 help
690 Provides a cgroup implementing whitelists for devices which
691 a process in the cgroup can mknod or open.
692 (legacy cgroup1-only controller)
693
694 config KERNEL_CGROUP_HUGETLB
695 bool "HugeTLB controller"
696 default n
697 select KERNEL_HUGETLB_PAGE
698
699 config KERNEL_CGROUP_PIDS
700 bool "PIDs cgroup subsystem"
701 default y
702 help
703 Provides enforcement of process number limits in the scope of a
704 cgroup.
705
706 config KERNEL_CGROUP_RDMA
707 bool "RDMA controller for cgroups"
708 default y
709
710 config KERNEL_CGROUP_BPF
711 bool "Support for eBPF programs attached to cgroups"
712 default y
713
714 config KERNEL_CPUSETS
715 bool "Cpuset support"
716 default y
717 help
718 This option will let you create and manage CPUSETs which
719 allow dynamically partitioning a system into sets of CPUs and
720 Memory Nodes and assigning tasks to run only within those sets.
721 This is primarily useful on large SMP or NUMA systems.
722
723 config KERNEL_PROC_PID_CPUSET
724 bool "Include legacy /proc/<pid>/cpuset file"
725 default n
726 depends on KERNEL_CPUSETS
727
728 config KERNEL_CGROUP_CPUACCT
729 bool "Simple CPU accounting cgroup subsystem"
730 default y
731 help
732 Provides a simple Resource Controller for monitoring the
733 total CPU consumed by the tasks in a cgroup.
734
735 config KERNEL_RESOURCE_COUNTERS
736 bool "Resource counters"
737 default y
738 help
739 This option enables controller independent resource accounting
740 infrastructure that works with cgroups.
741
742 config KERNEL_MM_OWNER
743 bool
744 default y if KERNEL_MEMCG
745
746 config KERNEL_MEMCG
747 bool "Memory Resource Controller for Control Groups"
748 default y
749 select KERNEL_FREEZER
750 depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18
751 help
752 Provides a memory resource controller that manages both anonymous
753 memory and page cache. (See Documentation/cgroups/memory.txt)
754
755 Note that setting this option increases fixed memory overhead
756 associated with each page of memory in the system. By this,
757 20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory
758 usage tracking struct at boot. Total amount of this is printed out
759 at boot.
760
761 Only enable when you're ok with these tradeoffs and really
762 sure you need the memory resource controller. Even when you enable
763 this, you can set "cgroup_disable=memory" at your boot option to
764 disable memory resource controller and you can avoid overheads
765 (but lose benefits of memory resource controller).
766
767 This config option also selects MM_OWNER config option, which
768 could in turn add some fork/exit overhead.
769
770 config KERNEL_MEMCG_SWAP
771 bool "Memory Resource Controller Swap Extension"
772 default y
773 depends on KERNEL_MEMCG
774 help
775 Add swap management feature to memory resource controller. When you
776 enable this, you can limit mem+swap usage per cgroup. In other words,
777 when you disable this, memory resource controller has no cares to
778 usage of swap...a process can exhaust all of the swap. This extension
779 is useful when you want to avoid exhaustion swap but this itself
780 adds more overheads and consumes memory for remembering information.
781 Especially if you use 32bit system or small memory system, please
782 be careful about enabling this. When memory resource controller
783 is disabled by boot option, this will be automatically disabled and
784 there will be no overhead from this. Even when you set this config=y,
785 if boot option "swapaccount=0" is set, swap will not be accounted.
786 Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
787 size is 4096bytes, 512k per 1Gbytes of swap.
788
789 config KERNEL_MEMCG_SWAP_ENABLED
790 bool "Memory Resource Controller Swap Extension enabled by default"
791 default n
792 depends on KERNEL_MEMCG_SWAP
793 help
794 Memory Resource Controller Swap Extension comes with its price in
795 a bigger memory consumption. General purpose distribution kernels
796 which want to enable the feature but keep it disabled by default
797 and let the user enable it by swapaccount boot command line
798 parameter should have this option unselected.
799
800 Those who want to have the feature enabled by default should
801 select this option (if, for some reason, they need to disable it,
802 then swapaccount=0 does the trick).
803
804
805 config KERNEL_MEMCG_KMEM
806 bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
807 default y
808 depends on KERNEL_MEMCG
809 help
810 The Kernel Memory extension for Memory Resource Controller can limit
811 the amount of memory used by kernel objects in the system. Those are
812 fundamentally different from the entities handled by the standard
813 Memory Controller, which are page-based, and can be swapped. Users of
814 the kmem extension can use it to guarantee that no group of processes
815 will ever exhaust kernel resources alone.
816
817 config KERNEL_CGROUP_PERF
818 bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
819 select KERNEL_PERF_EVENTS
820 default n
821 help
822 This option extends the per-cpu mode to restrict monitoring to
823 threads which belong to the cgroup specified and run on the
824 designated cpu.
825
826 menuconfig KERNEL_CGROUP_SCHED
827 bool "Group CPU scheduler"
828 default y
829 help
830 This feature lets CPU scheduler recognize task groups and control CPU
831 bandwidth allocation to such task groups. It uses cgroups to group
832 tasks.
833
834 if KERNEL_CGROUP_SCHED
835
836 config KERNEL_FAIR_GROUP_SCHED
837 bool "Group scheduling for SCHED_OTHER"
838 default y
839
840 config KERNEL_CFS_BANDWIDTH
841 bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
842 default y
843 depends on KERNEL_FAIR_GROUP_SCHED
844 help
845 This option allows users to define CPU bandwidth rates (limits) for
846 tasks running within the fair group scheduler. Groups with no limit
847 set are considered to be unconstrained and will run with no
848 restriction.
849 See tip/Documentation/scheduler/sched-bwc.txt for more information.
850
851 config KERNEL_RT_GROUP_SCHED
852 bool "Group scheduling for SCHED_RR/FIFO"
853 default y
854 help
855 This feature lets you explicitly allocate real CPU bandwidth
856 to task groups. If enabled, it will also make it impossible to
857 schedule realtime tasks for non-root users until you allocate
858 realtime bandwidth for them.
859
860 endif
861
862 config KERNEL_BLK_CGROUP
863 bool "Block IO controller"
864 default y
865 help
866 Generic block IO controller cgroup interface. This is the common
867 cgroup interface which should be used by various IO controlling
868 policies.
869
870 Currently, CFQ IO scheduler uses it to recognize task groups and
871 control disk bandwidth allocation (proportional time slice allocation)
872 to such task groups. It is also used by bio throttling logic in
873 block layer to implement upper limit in IO rates on a device.
874
875 This option only enables generic Block IO controller infrastructure.
876 One needs to also enable actual IO controlling logic/policy. For
877 enabling proportional weight division of disk bandwidth in CFQ, set
878 CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
879 CONFIG_BLK_DEV_THROTTLING=y.
880
881 if KERNEL_BLK_CGROUP
882
883 config KERNEL_CFQ_GROUP_IOSCHED
884 bool "Proportional weight of disk bandwidth in CFQ"
885
886 config KERNEL_BLK_DEV_THROTTLING
887 bool "Enable throttling policy"
888 default y
889
890 config KERNEL_BLK_DEV_THROTTLING_LOW
891 bool "Block throttling .low limit interface support (EXPERIMENTAL)"
892 depends on KERNEL_BLK_DEV_THROTTLING
893 endif
894
895 config KERNEL_DEBUG_BLK_CGROUP
896 bool "Enable Block IO controller debugging"
897 default n
898 depends on KERNEL_BLK_CGROUP
899 help
900 Enable some debugging help. Currently it exports additional stat
901 files in a cgroup which can be useful for debugging.
902
903 config KERNEL_NET_CLS_CGROUP
904 bool "legacy Control Group Classifier"
905 default n
906
907 config KERNEL_CGROUP_NET_CLASSID
908 bool "legacy Network classid cgroup"
909 default n
910
911 config KERNEL_CGROUP_NET_PRIO
912 bool "legacy Network priority cgroup"
913 default n
914
915 endif
916
917 #
918 # Namespace support symbols
919 #
920
921 config KERNEL_NAMESPACES
922 bool "Enable kernel namespaces"
923 default y if !SMALL_FLASH
924
925 if KERNEL_NAMESPACES
926
927 config KERNEL_UTS_NS
928 bool "UTS namespace"
929 default y
930 help
931 In this namespace, tasks see different info provided
932 with the uname() system call.
933
934 config KERNEL_IPC_NS
935 bool "IPC namespace"
936 default y
937 help
938 In this namespace, tasks work with IPC ids which correspond to
939 different IPC objects in different namespaces.
940
941 config KERNEL_USER_NS
942 bool "User namespace (EXPERIMENTAL)"
943 default y
944 help
945 This allows containers, i.e. vservers, to use user namespaces
946 to provide different user info for different servers.
947
948 config KERNEL_PID_NS
949 bool "PID Namespaces"
950 default y
951 help
952 Support process id namespaces. This allows having multiple
953 processes with the same pid as long as they are in different
954 pid namespaces. This is a building block of containers.
955
956 config KERNEL_NET_NS
957 bool "Network namespace"
958 default y
959 help
960 Allow user space to create what appear to be multiple instances
961 of the network stack.
962
963 endif
964
965 config KERNEL_DEVPTS_MULTIPLE_INSTANCES
966 bool "Support multiple instances of devpts"
967 default y if !SMALL_FLASH
968 help
969 Enable support for multiple instances of devpts filesystem.
970 If you want to have isolated PTY namespaces (eg: in containers),
971 say Y here. Otherwise, say N. If enabled, each mount of devpts
972 filesystem with the '-o newinstance' option will create an
973 independent PTY namespace.
974
975 config KERNEL_POSIX_MQUEUE
976 bool "POSIX Message Queues"
977 default y if !SMALL_FLASH
978 help
979 POSIX variant of message queues is a part of IPC. In POSIX message
980 queues every message has a priority which decides about succession
981 of receiving it by a process. If you want to compile and run
982 programs written e.g. for Solaris with use of its POSIX message
983 queues (functions mq_*) say Y here.
984
985 POSIX message queues are visible as a filesystem called 'mqueue'
986 and can be mounted somewhere if you want to do filesystem
987 operations on message queues.
988
989
990 config KERNEL_SECCOMP_FILTER
991 bool
992 default y if !SMALL_FLASH
993
994 config KERNEL_SECCOMP
995 bool "Enable seccomp support"
996 depends on !(TARGET_uml)
997 select KERNEL_SECCOMP_FILTER
998 default y if !SMALL_FLASH
999 help
1000 Build kernel with support for seccomp.
1001
1002 #
1003 # IPv4 configuration
1004 #
1005
1006 config KERNEL_IP_MROUTE
1007 bool "Enable IPv4 multicast routing"
1008 default y
1009 help
1010 Multicast routing requires a multicast routing daemon in
1011 addition to kernel support.
1012
1013 if KERNEL_IP_MROUTE
1014
1015 config KERNEL_IP_MROUTE_MULTIPLE_TABLES
1016 def_bool y
1017
1018 config KERNEL_IP_PIMSM_V1
1019 def_bool y
1020
1021 config KERNEL_IP_PIMSM_V2
1022 def_bool y
1023
1024 endif
1025
1026 #
1027 # IPv6 configuration
1028 #
1029
1030 config KERNEL_IPV6
1031 def_bool IPV6
1032
1033 if KERNEL_IPV6
1034
1035 config KERNEL_IPV6_MULTIPLE_TABLES
1036 def_bool y
1037
1038 config KERNEL_IPV6_SUBTREES
1039 def_bool y
1040
1041 config KERNEL_IPV6_MROUTE
1042 bool "Enable IPv6 multicast routing"
1043 default y
1044 help
1045 Multicast routing requires a multicast routing daemon in
1046 addition to kernel support.
1047
1048 if KERNEL_IPV6_MROUTE
1049
1050 config KERNEL_IPV6_MROUTE_MULTIPLE_TABLES
1051 def_bool y
1052
1053 config KERNEL_IPV6_PIMSM_V2
1054 def_bool y
1055
1056 endif
1057
1058 config KERNEL_IPV6_SEG6_LWTUNNEL
1059 bool "Enable support for lightweight tunnels"
1060 default y if !SMALL_FLASH
1061 help
1062 Using lwtunnel (needed for IPv6 segment routing) requires ip-full package.
1063
1064 config KERNEL_LWTUNNEL_BPF
1065 def_bool n
1066
1067 endif
1068
1069 #
1070 # Miscellaneous network configuration
1071 #
1072
1073 config KERNEL_NET_L3_MASTER_DEV
1074 bool "L3 Master device support"
1075 help
1076 This module provides glue between core networking code and device
1077 drivers to support L3 master devices like VRF.
1078
1079 #
1080 # NFS related symbols
1081 #
1082 config KERNEL_IP_PNP
1083 bool "Compile the kernel with rootfs on NFS"
1084 help
1085 If you want to make your kernel boot off a NFS server as root
1086 filesystem, select Y here.
1087
1088 if KERNEL_IP_PNP
1089
1090 config KERNEL_IP_PNP_DHCP
1091 def_bool y
1092
1093 config KERNEL_IP_PNP_BOOTP
1094 def_bool n
1095
1096 config KERNEL_IP_PNP_RARP
1097 def_bool n
1098
1099 config KERNEL_NFS_FS
1100 def_bool y
1101
1102 config KERNEL_NFS_V2
1103 def_bool y
1104
1105 config KERNEL_NFS_V3
1106 def_bool y
1107
1108 config KERNEL_ROOT_NFS
1109 def_bool y
1110
1111 endif
1112
1113 menu "Filesystem ACL and attr support options"
1114 config USE_FS_ACL_ATTR
1115 bool "Use filesystem ACL and attr support by default"
1116 default n
1117 help
1118 Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default
1119 for kernel and packages, except tmpfs, flash filesystems,
1120 and old NFS. Also enable userspace extended attribute support
1121 by default. (OpenWrt already has an expection it will be
1122 present in the kernel).
1123
1124 config KERNEL_FS_POSIX_ACL
1125 bool "Enable POSIX ACL support"
1126 default y if USE_FS_ACL_ATTR
1127
1128 config KERNEL_BTRFS_FS_POSIX_ACL
1129 bool "Enable POSIX ACL for BtrFS Filesystems"
1130 select KERNEL_FS_POSIX_ACL
1131 default y if USE_FS_ACL_ATTR
1132
1133 config KERNEL_EXT4_FS_POSIX_ACL
1134 bool "Enable POSIX ACL for Ext4 Filesystems"
1135 select KERNEL_FS_POSIX_ACL
1136 default y if USE_FS_ACL_ATTR
1137
1138 config KERNEL_F2FS_FS_POSIX_ACL
1139 bool "Enable POSIX ACL for F2FS Filesystems"
1140 select KERNEL_FS_POSIX_ACL
1141 default n
1142
1143 config KERNEL_JFFS2_FS_POSIX_ACL
1144 bool "Enable POSIX ACL for JFFS2 Filesystems"
1145 select KERNEL_FS_POSIX_ACL
1146 default n
1147
1148 config KERNEL_TMPFS_POSIX_ACL
1149 bool "Enable POSIX ACL for TMPFS Filesystems"
1150 select KERNEL_FS_POSIX_ACL
1151 default n
1152
1153 config KERNEL_CIFS_ACL
1154 bool "Enable CIFS ACLs"
1155 select KERNEL_FS_POSIX_ACL
1156 default y if USE_FS_ACL_ATTR
1157
1158 config KERNEL_HFS_FS_POSIX_ACL
1159 bool "Enable POSIX ACL for HFS Filesystems"
1160 select KERNEL_FS_POSIX_ACL
1161 default y if USE_FS_ACL_ATTR
1162
1163 config KERNEL_HFSPLUS_FS_POSIX_ACL
1164 bool "Enable POSIX ACL for HFS+ Filesystems"
1165 select KERNEL_FS_POSIX_ACL
1166 default y if USE_FS_ACL_ATTR
1167
1168 config KERNEL_NFS_ACL_SUPPORT
1169 bool "Enable ACLs for NFS"
1170 default y if USE_FS_ACL_ATTR
1171
1172 config KERNEL_NFS_V3_ACL_SUPPORT
1173 bool "Enable ACLs for NFSv3"
1174 default n
1175
1176 config KERNEL_NFSD_V2_ACL_SUPPORT
1177 bool "Enable ACLs for NFSDv2"
1178 default n
1179
1180 config KERNEL_NFSD_V3_ACL_SUPPORT
1181 bool "Enable ACLs for NFSDv3"
1182 default n
1183
1184 config KERNEL_REISER_FS_POSIX_ACL
1185 bool "Enable POSIX ACLs for ReiserFS"
1186 select KERNEL_FS_POSIX_ACL
1187 default y if USE_FS_ACL_ATTR
1188
1189 config KERNEL_XFS_POSIX_ACL
1190 bool "Enable POSIX ACLs for XFS"
1191 select KERNEL_FS_POSIX_ACL
1192 default y if USE_FS_ACL_ATTR
1193
1194 config KERNEL_JFS_POSIX_ACL
1195 bool "Enable POSIX ACLs for JFS"
1196 select KERNEL_FS_POSIX_ACL
1197 default y if USE_FS_ACL_ATTR
1198
1199 endmenu
1200
1201 config KERNEL_DEVMEM
1202 bool "/dev/mem virtual device support"
1203 help
1204 Say Y here if you want to support the /dev/mem device.
1205 The /dev/mem device is used to access areas of physical
1206 memory.
1207
1208 config KERNEL_DEVKMEM
1209 bool "/dev/kmem virtual device support"
1210 help
1211 Say Y here if you want to support the /dev/kmem device. The
1212 /dev/kmem device is rarely used, but can be used for certain
1213 kind of kernel debugging operations.
1214
1215 config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
1216 int "Number of squashfs fragments cached"
1217 default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
1218 default 3
1219
1220 config KERNEL_SQUASHFS_XATTR
1221 bool "Squashfs XATTR support"
1222
1223 #
1224 # compile optimization setting
1225 #
1226 choice
1227 prompt "Compiler optimization level"
1228 default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
1229
1230 config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
1231 bool "Optimize for performance"
1232 help
1233 This is the default optimization level for the kernel, building
1234 with the "-O2" compiler flag for best performance and most
1235 helpful compile-time warnings.
1236
1237 config KERNEL_CC_OPTIMIZE_FOR_SIZE
1238 bool "Optimize for size"
1239 help
1240 Enabling this option will pass "-Os" instead of "-O2" to
1241 your compiler resulting in a smaller kernel.
1242
1243 endchoice
1244
1245 config KERNEL_AUDIT
1246 bool "Auditing support"
1247
1248 config KERNEL_SECURITY
1249 bool "Enable different security models"
1250
1251 config KERNEL_SECURITY_NETWORK
1252 bool "Socket and Networking Security Hooks"
1253 select KERNEL_SECURITY
1254
1255 config KERNEL_SECURITY_SELINUX
1256 bool "NSA SELinux Support"
1257 select KERNEL_SECURITY_NETWORK
1258 select KERNEL_AUDIT
1259
1260 config KERNEL_SECURITY_SELINUX_BOOTPARAM
1261 bool "NSA SELinux boot parameter"
1262 depends on KERNEL_SECURITY_SELINUX
1263 default y
1264
1265 config KERNEL_SECURITY_SELINUX_DISABLE
1266 bool "NSA SELinux runtime disable"
1267 depends on KERNEL_SECURITY_SELINUX
1268
1269 config KERNEL_SECURITY_SELINUX_DEVELOP
1270 bool "NSA SELinux Development Support"
1271 depends on KERNEL_SECURITY_SELINUX
1272 default y
1273
1274 config KERNEL_SECURITY_SELINUX_SIDTAB_HASH_BITS
1275 int
1276 depends on KERNEL_SECURITY_SELINUX
1277 default 9
1278
1279 config KERNEL_SECURITY_SELINUX_SID2STR_CACHE_SIZE
1280 int
1281 depends on KERNEL_SECURITY_SELINUX
1282 default 256
1283
1284 config KERNEL_LSM
1285 string
1286 default "lockdown,yama,loadpin,safesetid,integrity,selinux"
1287 depends on KERNEL_SECURITY_SELINUX
1288
1289 config KERNEL_EXT4_FS_SECURITY
1290 bool "Ext4 Security Labels"
1291
1292 config KERNEL_F2FS_FS_SECURITY
1293 bool "F2FS Security Labels"
1294
1295 config KERNEL_UBIFS_FS_SECURITY
1296 bool "UBIFS Security Labels"
1297
1298 config KERNEL_JFFS2_FS_SECURITY
1299 bool "JFFS2 Security Labels"