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