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