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