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