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