1 # SPDX-License-Identifier: GPL-2.0-only
3 # Copyright (C) 2006-2014 OpenWrt.org
5 config KERNEL_BUILD_USER
6 string "Custom Kernel Build User Name"
7 default "builder" if BUILDBOT
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.
14 config KERNEL_BUILD_DOMAIN
15 string "Custom Kernel Build Domain Name"
16 default "buildhost" if BUILDBOT
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.
24 bool "Enable support for printk"
28 bool "Support for paging of anonymous memory (swap)"
29 default y if !SMALL_FLASH
31 config KERNEL_PROC_STRIPPED
32 bool "Strip non-essential /proc functionality to reduce code size"
33 default y if SMALL_FLASH
35 config KERNEL_DEBUG_FS
36 bool "Compile the kernel with debug filesystem enabled"
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.
44 config KERNEL_MIPS_FP_SUPPORT
46 default y if TARGET_pistachio
50 default y if TARGET_armsr_armv8
51 depends on (arm || aarch64)
53 config KERNEL_RISCV_PMU
55 select KERNEL_RISCV_PMU_SBI
58 config KERNEL_RISCV_PMU_SBI
62 config KERNEL_X86_VSYSCALL_EMULATION
63 bool "Enable vsyscall emulation"
66 This enables emulation of the legacy vsyscall page. Disabling
67 it is roughly equivalent to booting with vsyscall=none, except
68 that it will also disable the helpful warning if a program
69 tries to use a vsyscall. With this option set to N, offending
70 programs will just segfault, citing addresses of the form
73 This option is required by many programs built before 2013, and
74 care should be used even with newer programs if set to N.
76 Disabling this option saves about 7K of kernel size and
77 possibly 4K of additional runtime pagetable memory.
79 config KERNEL_PERF_EVENTS
80 bool "Compile the kernel with performance events and counters"
81 select KERNEL_ARM_PMU if (arm || aarch64)
82 select KERNEL_RISCV_PMU if riscv64
84 config KERNEL_PROFILING
85 bool "Compile the kernel with profiling enabled"
86 select KERNEL_PERF_EVENTS
88 Enable the extended profiling support mechanisms used by profilers such
91 config KERNEL_RPI_AXIPERF
92 bool "Compile the kernel with RaspberryPi AXI Performance monitors"
94 depends on KERNEL_PERF_EVENTS && TARGET_bcm27xx
97 bool "Compile the kernel with undefined behaviour sanity checker"
99 This option enables undefined behaviour sanity checker
100 Compile-time instrumentation is used to detect various undefined
101 behaviours in runtime. Various types of checks may be enabled
102 via boot parameter ubsan_handle
103 (see: Documentation/dev-tools/ubsan.rst).
105 config KERNEL_UBSAN_SANITIZE_ALL
106 bool "Enable instrumentation for the entire kernel"
107 depends on KERNEL_UBSAN
110 This option activates instrumentation for the entire kernel.
111 If you don't enable this option, you have to explicitly specify
112 UBSAN_SANITIZE := y for the files/directories you want to check for UB.
113 Enabling this option will get kernel image size increased
116 config KERNEL_UBSAN_ALIGNMENT
117 bool "Enable checking of pointers alignment"
118 depends on KERNEL_UBSAN
120 This option enables detection of unaligned memory accesses.
121 Enabling this option on architectures that support unaligned
122 accesses may produce a lot of false positives.
124 config KERNEL_UBSAN_BOUNDS
125 bool "Perform array index bounds checking"
126 depends on KERNEL_UBSAN
128 This option enables detection of directly indexed out of bounds array
129 accesses, where the array size is known at compile time. Note that
130 this does not protect array overflows via bad calls to the
131 {str,mem}*cpy() family of functions (that is addressed by
134 config KERNEL_UBSAN_NULL
135 bool "Enable checking of null pointers"
136 depends on KERNEL_UBSAN
138 This option enables detection of memory accesses via a
141 config KERNEL_UBSAN_TRAP
142 bool "On Sanitizer warnings, abort the running kernel code"
143 depends on KERNEL_UBSAN
145 Building kernels with Sanitizer features enabled tends to grow the
146 kernel size by around 5%, due to adding all the debugging text on
147 failure paths. To avoid this, Sanitizer instrumentation can just
148 issue a trap. This reduces the kernel size overhead but turns all
149 warnings (including potentially harmless conditions) into full
150 exceptions that abort the running kernel code (regardless of context,
151 locks held, etc), which may destabilize the system. For some system
152 builders this is an acceptable trade-off.
155 bool "Compile the kernel with KASan: runtime memory debugger"
156 select KERNEL_SLUB_DEBUG
157 depends on (x86_64 || aarch64 || arm || powerpc || riscv64)
159 Enables kernel address sanitizer - runtime memory debugger,
160 designed to find out-of-bounds accesses and use-after-free bugs.
161 This is strictly a debugging feature and it requires a gcc version
162 of 4.9.2 or later. Detection of out of bounds accesses to stack or
163 global variables requires gcc 5.0 or later.
164 This feature consumes about 1/8 of available memory and brings about
165 ~x3 performance slowdown.
166 For better error detection enable CONFIG_STACKTRACE.
167 Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB
168 (the resulting kernel does not boot).
170 config KERNEL_KASAN_EXTRA
171 bool "KAsan: extra checks"
172 depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL
174 This enables further checks in the kernel address sanitizer, for now
175 it only includes the address-use-after-scope check that can lead
176 to excessive kernel stack usage, frame size warnings and longer
178 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
180 config KERNEL_KASAN_VMALLOC
181 bool "Back mappings in vmalloc space with real shadow memory"
182 depends on KERNEL_KASAN
184 By default, the shadow region for vmalloc space is the read-only
185 zero page. This means that KASAN cannot detect errors involving
188 Enabling this option will hook in to vmap/vmalloc and back those
189 mappings with real shadow memory allocated on demand. This allows
190 for KASAN to detect more sorts of errors (and to support vmapped
191 stacks), but at the cost of higher memory usage.
193 This option depends on HAVE_ARCH_KASAN_VMALLOC, but we can't
194 depend on that in here, so it is possible that enabling this
200 depends on KERNEL_KASAN
201 default KERNEL_KASAN_GENERIC
203 KASAN has three modes:
205 1. Generic KASAN (supported by many architectures, enabled with
206 CONFIG_KASAN_GENERIC, similar to userspace ASan),
207 2. Software Tag-Based KASAN (arm64 only, based on software memory
208 tagging, enabled with CONFIG_KASAN_SW_TAGS, similar to userspace
210 3. Hardware Tag-Based KASAN (arm64 only, based on hardware memory
211 tagging, enabled with CONFIG_KASAN_HW_TAGS).
213 config KERNEL_KASAN_GENERIC
215 select KERNEL_SLUB_DEBUG
217 Enables Generic KASAN.
219 Consumes about 1/8th of available memory at kernel start and adds an
220 overhead of ~50% for dynamic allocations.
221 The performance slowdown is ~x3.
223 config KERNEL_KASAN_SW_TAGS
224 bool "Software Tag-Based KASAN"
226 select KERNEL_SLUB_DEBUG
228 Enables Software Tag-Based KASAN.
230 Supported only on arm64 CPUs and relies on Top Byte Ignore.
232 Consumes about 1/16th of available memory at kernel start and
233 add an overhead of ~20% for dynamic allocations.
235 May potentially introduce problems related to pointer casting and
236 comparison, as it embeds a tag into the top byte of each pointer.
238 config KERNEL_KASAN_HW_TAGS
239 bool "Hardware Tag-Based KASAN"
241 select KERNEL_SLUB_DEBUG
242 select KERNEL_ARM64_MTE
244 Enables Hardware Tag-Based KASAN.
246 Supported only on arm64 CPUs starting from ARMv8.5 and relies on
247 Memory Tagging Extension and Top Byte Ignore.
249 Consumes about 1/32nd of available memory.
251 May potentially introduce problems related to pointer casting and
252 comparison, as it embeds a tag into the top byte of each pointer.
256 config KERNEL_ARM64_MTE
262 prompt "Instrumentation type"
263 depends on KERNEL_KASAN
264 depends on !KERNEL_KASAN_HW_TAGS
265 default KERNEL_KASAN_OUTLINE
267 config KERNEL_KASAN_OUTLINE
268 bool "Outline instrumentation"
270 Before every memory access compiler insert function call
271 __asan_load*/__asan_store*. These functions performs check
272 of shadow memory. This is slower than inline instrumentation,
273 however it doesn't bloat size of kernel's .text section so
276 config KERNEL_KASAN_INLINE
277 bool "Inline instrumentation"
279 Compiler directly inserts code checking shadow memory before
280 memory accesses. This is faster than outline (in some workloads
281 it gives about x2 boost over outline instrumentation), but
282 make kernel's .text size much bigger.
283 This requires a gcc version of 5.0 or later.
288 bool "Compile the kernel with code coverage for fuzzing"
289 select KERNEL_DEBUG_FS
291 KCOV exposes kernel code coverage information in a form suitable
292 for coverage-guided fuzzing (randomized testing).
294 If RANDOMIZE_BASE is enabled, PC values will not be stable across
295 different machines and across reboots. If you need stable PC values,
296 disable RANDOMIZE_BASE.
298 For more details, see Documentation/kcov.txt.
300 config KERNEL_KCOV_ENABLE_COMPARISONS
301 bool "Enable comparison operands collection by KCOV"
302 depends on KERNEL_KCOV
304 KCOV also exposes operands of every comparison in the instrumented
305 code along with operand sizes and PCs of the comparison instructions.
306 These operands can be used by fuzzing engines to improve the quality
309 config KERNEL_KCOV_INSTRUMENT_ALL
310 bool "Instrument all code by default"
311 depends on KERNEL_KCOV
312 default y if KERNEL_KCOV
314 If you are doing generic system call fuzzing (like e.g. syzkaller),
315 then you will want to instrument the whole kernel and you should
316 say y here. If you are doing more targeted fuzzing (like e.g.
317 filesystem fuzzing with AFL) then you will want to enable coverage
318 for more specific subsets of files, and should say n here.
320 config KERNEL_TASKSTATS
321 bool "Compile the kernel with task resource/io statistics and accounting"
323 Enable the collection and publishing of task/io statistics and
324 accounting. Enable this option to enable i/o monitoring in system
329 config KERNEL_TASK_DELAY_ACCT
332 config KERNEL_TASK_IO_ACCOUNTING
335 config KERNEL_TASK_XACCT
340 config KERNEL_KALLSYMS
341 bool "Compile the kernel with symbol table information"
342 default y if !SMALL_FLASH
344 This will give you more information in stack traces from kernel oopses.
347 bool "Compile the kernel with tracing support"
348 depends on !TARGET_uml
350 config KERNEL_FTRACE_SYSCALLS
351 bool "Trace system calls"
352 depends on KERNEL_FTRACE
354 config KERNEL_ENABLE_DEFAULT_TRACERS
355 bool "Trace process context switches and events"
356 depends on KERNEL_FTRACE
358 config KERNEL_FUNCTION_TRACER
359 bool "Function tracer"
360 depends on KERNEL_FTRACE
362 config KERNEL_FUNCTION_GRAPH_TRACER
363 bool "Function graph tracer"
364 depends on KERNEL_FUNCTION_TRACER
366 config KERNEL_DYNAMIC_FTRACE
367 bool "Enable/disable function tracing dynamically"
368 depends on KERNEL_FUNCTION_TRACER
370 config KERNEL_FUNCTION_PROFILER
371 bool "Function profiler"
372 depends on KERNEL_FUNCTION_TRACER
374 config KERNEL_IRQSOFF_TRACER
375 bool "Interrupts-off Latency Tracer"
376 depends on KERNEL_FTRACE
378 This option measures the time spent in irqs-off critical
379 sections, with microsecond accuracy.
381 The default measurement method is a maximum search, which is
382 disabled by default and can be runtime (re-)started
385 echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
387 (Note that kernel size and overhead increase with this option
388 enabled. This option and the preempt-off timing option can be
389 used together or separately.)
391 config KERNEL_PREEMPT_TRACER
392 bool "Preemption-off Latency Tracer"
393 depends on KERNEL_FTRACE
395 This option measures the time spent in preemption-off critical
396 sections, with microsecond accuracy.
398 The default measurement method is a maximum search, which is
399 disabled by default and can be runtime (re-)started
402 echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
404 (Note that kernel size and overhead increase with this option
405 enabled. This option and the irqs-off timing option can be
406 used together or separately.)
408 config KERNEL_HIST_TRIGGERS
409 bool "Histogram triggers"
410 depends on KERNEL_FTRACE
412 Hist triggers allow one or more arbitrary trace event fields to be
413 aggregated into hash tables and dumped to stdout by reading a
414 debugfs/tracefs file. They're useful for gathering quick and dirty
415 (though precise) summaries of event activity as an initial guide for
416 further investigation using more advanced tools.
418 Inter-event tracing of quantities such as latencies is also
419 supported using hist triggers under this option.
421 config KERNEL_DEBUG_KERNEL
424 config KERNEL_DEBUG_INFO
425 bool "Compile the kernel with debug information"
426 default y if !SMALL_FLASH
427 select KERNEL_DEBUG_KERNEL
429 This will compile your kernel and modules with debug information.
431 config KERNEL_DEBUG_INFO_BTF
433 bool "Enable additional BTF type information"
434 depends on !HOST_OS_MACOS
435 depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED
438 Generate BPF Type Format (BTF) information from DWARF debug info.
439 Turning this on expects presence of pahole tool, which will convert
440 DWARF type info into equivalent deduplicated BTF type info.
442 Required to run BPF CO-RE applications.
444 config KERNEL_MODULE_ALLOW_BTF_MISMATCH
445 bool "Allow loading modules with non-matching BTF type info"
446 depends on KERNEL_DEBUG_INFO_BTF
448 For modules whose split BTF does not match vmlinux, load without
449 BTF rather than refusing to load. The default behavior with
450 module BTF enabled is to reject modules with such mismatches;
451 this option will still load module BTF where possible but ignore
452 it when a mismatch is found.
454 config KERNEL_DEBUG_INFO_REDUCED
455 bool "Reduce debugging information"
457 depends on KERNEL_DEBUG_INFO
459 If you say Y here gcc is instructed to generate less debugging
460 information for structure types. This means that tools that
461 need full debugging information (like kgdb or systemtap) won't
462 be happy. But if you merely need debugging information to
463 resolve line numbers there is no loss. Advantage is that
464 build directory object sizes shrink dramatically over a full
465 DEBUG_INFO build and compile times are reduced too.
466 Only works with newer gcc versions.
468 config KERNEL_FRAME_WARN
471 default 1280 if KERNEL_KASAN && !ARCH_64BIT
472 default 1024 if !ARCH_64BIT
473 default 2048 if ARCH_64BIT
475 Tell the compiler to warn at build time for stack frames larger than this.
476 Setting this too low will cause a lot of warnings.
477 Setting it to 0 disables the warning.
479 # KERNEL_DEBUG_LL symbols must have the default value set as otherwise
480 # KConfig wont evaluate them unless KERNEL_EARLY_PRINTK is selected
481 # which means that buildroot wont override the DEBUG_LL symbols in target
482 # kernel configurations and lead to devices that dont have working console
483 config KERNEL_DEBUG_LL_UART_NONE
488 config KERNEL_DEBUG_LL
492 select KERNEL_DEBUG_LL_UART_NONE
494 ARM low level debugging.
496 config KERNEL_DEBUG_VIRTUAL
497 bool "Compile the kernel with VM translations debugging"
498 select KERNEL_DEBUG_KERNEL
500 Enable checks sanity checks to catch invalid uses of
501 virt_to_phys()/phys_to_virt() against the non-linear address space.
503 config KERNEL_DYNAMIC_DEBUG
504 bool "Compile the kernel with dynamic printk"
505 select KERNEL_DEBUG_FS
507 Compiles debug level messages into the kernel, which would not
508 otherwise be available at runtime. These messages can then be
509 enabled/disabled based on various levels of scope - per source file,
510 function, module, format string, and line number. This mechanism
511 implicitly compiles in all pr_debug() and dev_dbg() calls, which
512 enlarges the kernel text size by about 2%.
514 config KERNEL_EARLY_PRINTK
515 bool "Compile the kernel with early printk"
516 default y if TARGET_bcm53xx
518 select KERNEL_DEBUG_KERNEL
519 select KERNEL_DEBUG_LL if arm
521 Compile the kernel with early printk support. This is only useful for
522 debugging purposes to send messages over the serial console in early boot.
523 Enable this to debug early boot problems.
525 config KERNEL_KPROBES
526 bool "Compile the kernel with kprobes support"
528 select KERNEL_PERF_EVENTS
530 Compiles the kernel with KPROBES support, which allows you to trap
531 at almost any kernel address and execute a callback function.
532 register_kprobe() establishes a probepoint and specifies the
533 callback. Kprobes is useful for kernel debugging, non-intrusive
534 instrumentation and testing.
535 If in doubt, say "N".
537 config KERNEL_KPROBE_EVENTS
539 default y if KERNEL_KPROBES
541 config KERNEL_BPF_EVENTS
542 bool "Compile the kernel with BPF event support"
543 select KERNEL_KPROBES
545 Allows to attach BPF programs to kprobe, uprobe and tracepoint events.
546 This is required to use BPF maps of type BPF_MAP_TYPE_PERF_EVENT_ARRAY
547 for sending data from BPF programs to user-space for post-processing
550 config KERNEL_BPF_KPROBE_OVERRIDE
552 depends on KERNEL_KPROBES
556 bool "Compile the kernel with asynchronous IO support"
557 default y if !SMALL_FLASH
559 config KERNEL_IO_URING
560 bool "Compile the kernel with io_uring support"
561 depends on !SMALL_FLASH
562 default y if (x86_64 || aarch64)
564 config KERNEL_FHANDLE
565 bool "Compile the kernel with support for fhandle syscalls"
566 default y if !SMALL_FLASH
568 config KERNEL_FANOTIFY
569 bool "Compile the kernel with modern file notification support"
570 default y if !SMALL_FLASH
572 config KERNEL_BLK_DEV_BSG
573 bool "Compile the kernel with SCSI generic v4 support for any block device"
575 config KERNEL_TRANSPARENT_HUGEPAGE
579 prompt "Transparent Hugepage Support sysfs defaults"
580 depends on KERNEL_TRANSPARENT_HUGEPAGE
581 default KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
583 config KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
586 config KERNEL_TRANSPARENT_HUGEPAGE_MADVISE
590 config KERNEL_HUGETLBFS
593 config KERNEL_HUGETLB_PAGE
594 bool "Compile the kernel with HugeTLB support"
595 select KERNEL_TRANSPARENT_HUGEPAGE
596 select KERNEL_HUGETLBFS
598 config KERNEL_MAGIC_SYSRQ
599 bool "Compile the kernel with SysRq support"
602 config KERNEL_DEBUG_PINCTRL
603 bool "Compile the kernel with pinctrl debugging"
604 select KERNEL_DEBUG_KERNEL
606 config KERNEL_DEBUG_GPIO
607 bool "Compile the kernel with gpio debugging"
608 select KERNEL_DEBUG_KERNEL
610 config KERNEL_COREDUMP
613 config KERNEL_ELF_CORE
614 bool "Enable process core dump support"
615 select KERNEL_COREDUMP
616 default y if !SMALL_FLASH
618 config KERNEL_PROVE_LOCKING
619 bool "Enable kernel lock checking"
620 select KERNEL_DEBUG_KERNEL
622 config KERNEL_SOFTLOCKUP_DETECTOR
623 bool "Compile the kernel with detect Soft Lockups"
624 depends on KERNEL_DEBUG_KERNEL
626 Say Y here to enable the kernel to act as a watchdog to detect
629 Softlockups are bugs that cause the kernel to loop in kernel
630 mode for more than 20 seconds, without giving other tasks a
631 chance to run. The current stack trace is displayed upon
632 detection and the system will stay locked up.
634 config KERNEL_HARDLOCKUP_DETECTOR
635 bool "Compile the kernel with detect Hard Lockups"
636 depends on KERNEL_DEBUG_KERNEL
638 Say Y here to enable the kernel to act as a watchdog to detect
641 Hardlockups are bugs that cause the CPU to loop in kernel mode
642 for more than 10 seconds, without letting other interrupts have a
643 chance to run. The current stack trace is displayed upon detection
644 and the system will stay locked up.
646 config KERNEL_DETECT_HUNG_TASK
647 bool "Compile the kernel with detect Hung Tasks"
648 depends on KERNEL_DEBUG_KERNEL
649 default KERNEL_SOFTLOCKUP_DETECTOR
651 Say Y here to enable the kernel to detect "hung tasks",
652 which are bugs that cause the task to be stuck in
653 uninterruptible "D" state indefinitely.
655 When a hung task is detected, the kernel will print the
656 current stack trace (which you should report), but the
657 task will stay in uninterruptible state. If lockdep is
658 enabled then all held locks will also be reported. This
659 feature has negligible overhead.
661 config KERNEL_WQ_WATCHDOG
662 bool "Compile the kernel with detect Workqueue Stalls"
663 depends on KERNEL_DEBUG_KERNEL
665 Say Y here to enable stall detection on workqueues. If a
666 worker pool doesn't make forward progress on a pending work
667 item for over a given amount of time, 30s by default, a
668 warning message is printed along with dump of workqueue
669 state. This can be configured through kernel parameter
670 "workqueue.watchdog_thresh" and its sysfs counterpart.
672 config KERNEL_DEBUG_ATOMIC_SLEEP
673 bool "Compile the kernel with sleep inside atomic section checking"
674 depends on KERNEL_DEBUG_KERNEL
676 If you say Y here, various routines which may sleep will become very
677 noisy if they are called inside atomic sections: when a spinlock is
678 held, inside an rcu read side critical section, inside preempt disabled
679 sections, inside an interrupt, etc...
681 config KERNEL_DEBUG_VM
682 bool "Compile the kernel with debug VM"
683 depends on KERNEL_DEBUG_KERNEL
685 Enable this to turn on extended checks in the virtual-memory system
686 that may impact performance.
690 config KERNEL_PRINTK_TIME
691 bool "Enable printk timestamps"
694 config KERNEL_SLUB_DEBUG
695 bool "Enable SLUB debugging support"
697 This enables various debugging features:
698 - Accepts "slub_debug" kernel parameter
699 - Provides caches debugging options (e.g. tracing, validating)
700 - Adds /sys/kernel/slab/ attrs for reading amounts of *objects*
701 - Enables /proc/slabinfo support
702 - Prints info when running out of memory
704 Enabling this can result in a significant increase of code size.
706 config KERNEL_SLUB_DEBUG_ON
707 depends on KERNEL_SLUB_DEBUG
708 bool "Boot kernel with basic caches debugging enabled"
710 This enables by default sanity_checks, red_zone, poison and store_user
711 debugging options for all caches.
713 config KERNEL_SLABINFO
714 select KERNEL_SLUB_DEBUG
715 select KERNEL_SLUB_DEBUG_ON
716 bool "Enable /proc slab debug info"
718 config KERNEL_PROC_PAGE_MONITOR
719 bool "Enable /proc page monitoring"
725 bool "Enable kexec support"
727 config KERNEL_PROC_VMCORE
730 config KERNEL_PROC_KCORE
733 config KERNEL_CRASH_DUMP
734 depends on i386 || x86_64 || arm || armeb
736 select KERNEL_PROC_VMCORE
737 select KERNEL_PROC_KCORE
738 bool "Enable support for kexec crashdump"
742 bool "Enable rfkill support"
743 default RFKILL_SUPPORT
746 bool "Enable sparse check during kernel build"
748 config KERNEL_DEVTMPFS
749 bool "Compile the kernel with device tmpfs enabled"
751 devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
752 devices nodes for all registered devices to simplify boot, but leaves more
753 complex tasks to userspace (e.g. udev).
757 config KERNEL_DEVTMPFS_MOUNT
758 bool "Automatically mount devtmpfs after root filesystem is mounted"
763 bool "Enable kernel access key retention support"
766 config KERNEL_PERSISTENT_KEYRINGS
767 bool "Enable kernel persistent keyrings"
768 depends on KERNEL_KEYS
770 config KERNEL_KEYS_REQUEST_CACHE
771 bool "Enable temporary caching of the last request_key() result"
772 depends on KERNEL_KEYS
774 config KERNEL_BIG_KEYS
775 bool "Enable large payload keys on kernel keyrings"
776 depends on KERNEL_KEYS
779 # CGROUP support symbols
782 config KERNEL_CGROUPS
783 bool "Enable kernel cgroups"
784 default y if !SMALL_FLASH
788 config KERNEL_CGROUP_DEBUG
789 bool "Example debug cgroup subsystem"
791 This option enables a simple cgroup subsystem that
792 exports useful debugging information about the cgroups
795 config KERNEL_FREEZER
798 config KERNEL_CGROUP_FREEZER
799 bool "legacy Freezer cgroup subsystem"
800 select KERNEL_FREEZER
802 Provides a way to freeze and unfreeze all tasks in a
804 (legacy cgroup1-only controller, in cgroup2 freezer
805 is integrated in the Memory controller)
807 config KERNEL_CGROUP_DEVICE
808 bool "legacy Device controller for cgroups"
810 Provides a cgroup implementing whitelists for devices which
811 a process in the cgroup can mknod or open.
812 (legacy cgroup1-only controller)
814 config KERNEL_CGROUP_HUGETLB
815 bool "HugeTLB controller"
816 select KERNEL_HUGETLB_PAGE
818 config KERNEL_CGROUP_PIDS
819 bool "PIDs cgroup subsystem"
822 Provides enforcement of process number limits in the scope of a
825 config KERNEL_CGROUP_RDMA
826 bool "RDMA controller for cgroups"
829 config KERNEL_CGROUP_BPF
830 bool "Support for eBPF programs attached to cgroups"
833 config KERNEL_CPUSETS
834 bool "Cpuset support"
837 This option will let you create and manage CPUSETs which
838 allow dynamically partitioning a system into sets of CPUs and
839 Memory Nodes and assigning tasks to run only within those sets.
840 This is primarily useful on large SMP or NUMA systems.
842 config KERNEL_PROC_PID_CPUSET
843 bool "Include legacy /proc/<pid>/cpuset file"
844 depends on KERNEL_CPUSETS
846 config KERNEL_CGROUP_CPUACCT
847 bool "Simple CPU accounting cgroup subsystem"
850 Provides a simple Resource Controller for monitoring the
851 total CPU consumed by the tasks in a cgroup.
853 config KERNEL_RESOURCE_COUNTERS
854 bool "Resource counters"
857 This option enables controller independent resource accounting
858 infrastructure that works with cgroups.
860 config KERNEL_MM_OWNER
862 default y if KERNEL_MEMCG
865 bool "Memory Resource Controller for Control Groups"
867 select KERNEL_FREEZER
868 depends on KERNEL_RESOURCE_COUNTERS
870 Provides a memory resource controller that manages both anonymous
871 memory and page cache. (See Documentation/cgroups/memory.txt)
873 Note that setting this option increases fixed memory overhead
874 associated with each page of memory in the system. By this,
875 20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory
876 usage tracking struct at boot. Total amount of this is printed out
879 Only enable when you're ok with these tradeoffs and really
880 sure you need the memory resource controller. Even when you enable
881 this, you can set "cgroup_disable=memory" at your boot option to
882 disable memory resource controller and you can avoid overheads
883 (but lose benefits of memory resource controller).
885 This config option also selects MM_OWNER config option, which
886 could in turn add some fork/exit overhead.
888 config KERNEL_MEMCG_SWAP
889 bool "Memory Resource Controller Swap Extension"
891 depends on KERNEL_MEMCG
893 Add swap management feature to memory resource controller. When you
894 enable this, you can limit mem+swap usage per cgroup. In other words,
895 when you disable this, memory resource controller has no cares to
896 usage of swap...a process can exhaust all of the swap. This extension
897 is useful when you want to avoid exhaustion swap but this itself
898 adds more overheads and consumes memory for remembering information.
899 Especially if you use 32bit system or small memory system, please
900 be careful about enabling this. When memory resource controller
901 is disabled by boot option, this will be automatically disabled and
902 there will be no overhead from this. Even when you set this config=y,
903 if boot option "swapaccount=0" is set, swap will not be accounted.
904 Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
905 size is 4096bytes, 512k per 1Gbytes of swap.
907 config KERNEL_MEMCG_SWAP_ENABLED
908 bool "Memory Resource Controller Swap Extension enabled by default"
909 depends on KERNEL_MEMCG_SWAP
911 Memory Resource Controller Swap Extension comes with its price in
912 a bigger memory consumption. General purpose distribution kernels
913 which want to enable the feature but keep it disabled by default
914 and let the user enable it by swapaccount boot command line
915 parameter should have this option unselected.
917 Those who want to have the feature enabled by default should
918 select this option (if, for some reason, they need to disable it,
919 then swapaccount=0 does the trick).
922 config KERNEL_MEMCG_KMEM
923 bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
925 depends on KERNEL_MEMCG
927 The Kernel Memory extension for Memory Resource Controller can limit
928 the amount of memory used by kernel objects in the system. Those are
929 fundamentally different from the entities handled by the standard
930 Memory Controller, which are page-based, and can be swapped. Users of
931 the kmem extension can use it to guarantee that no group of processes
932 will ever exhaust kernel resources alone.
934 config KERNEL_CGROUP_PERF
935 bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
936 select KERNEL_PERF_EVENTS
938 This option extends the per-cpu mode to restrict monitoring to
939 threads which belong to the cgroup specified and run on the
942 menuconfig KERNEL_CGROUP_SCHED
943 bool "Group CPU scheduler"
946 This feature lets CPU scheduler recognize task groups and control CPU
947 bandwidth allocation to such task groups. It uses cgroups to group
950 if KERNEL_CGROUP_SCHED
952 config KERNEL_FAIR_GROUP_SCHED
953 bool "Group scheduling for SCHED_OTHER"
956 config KERNEL_CFS_BANDWIDTH
957 bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
959 depends on KERNEL_FAIR_GROUP_SCHED
961 This option allows users to define CPU bandwidth rates (limits) for
962 tasks running within the fair group scheduler. Groups with no limit
963 set are considered to be unconstrained and will run with no
965 See tip/Documentation/scheduler/sched-bwc.txt for more information.
967 config KERNEL_RT_GROUP_SCHED
968 bool "Group scheduling for SCHED_RR/FIFO"
971 This feature lets you explicitly allocate real CPU bandwidth
972 to task groups. If enabled, it will also make it impossible to
973 schedule realtime tasks for non-root users until you allocate
974 realtime bandwidth for them.
978 config KERNEL_BLK_CGROUP
979 bool "Block IO controller"
982 Generic block IO controller cgroup interface. This is the common
983 cgroup interface which should be used by various IO controlling
986 Currently, CFQ IO scheduler uses it to recognize task groups and
987 control disk bandwidth allocation (proportional time slice allocation)
988 to such task groups. It is also used by bio throttling logic in
989 block layer to implement upper limit in IO rates on a device.
991 This option only enables generic Block IO controller infrastructure.
992 One needs to also enable actual IO controlling logic/policy. For
993 enabling proportional weight division of disk bandwidth in CFQ, set
994 CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
995 CONFIG_BLK_DEV_THROTTLING=y.
999 config KERNEL_CFQ_GROUP_IOSCHED
1000 bool "Proportional weight of disk bandwidth in CFQ"
1002 config KERNEL_BLK_DEV_THROTTLING
1003 bool "Enable throttling policy"
1006 config KERNEL_BLK_DEV_THROTTLING_LOW
1007 bool "Block throttling .low limit interface support (EXPERIMENTAL)"
1008 depends on KERNEL_BLK_DEV_THROTTLING
1011 config KERNEL_DEBUG_BLK_CGROUP
1012 bool "Enable Block IO controller debugging"
1013 depends on KERNEL_BLK_CGROUP
1015 Enable some debugging help. Currently it exports additional stat
1016 files in a cgroup which can be useful for debugging.
1018 config KERNEL_NET_CLS_CGROUP
1019 bool "legacy Control Group Classifier"
1021 config KERNEL_CGROUP_NET_CLASSID
1022 bool "legacy Network classid cgroup"
1024 config KERNEL_CGROUP_NET_PRIO
1025 bool "legacy Network priority cgroup"
1030 # Namespace support symbols
1033 config KERNEL_NAMESPACES
1034 bool "Enable kernel namespaces"
1035 default y if !SMALL_FLASH
1037 if KERNEL_NAMESPACES
1039 config KERNEL_UTS_NS
1040 bool "UTS namespace"
1043 In this namespace, tasks see different info provided
1044 with the uname() system call.
1046 config KERNEL_IPC_NS
1047 bool "IPC namespace"
1050 In this namespace, tasks work with IPC ids which correspond to
1051 different IPC objects in different namespaces.
1053 config KERNEL_USER_NS
1054 bool "User namespace (EXPERIMENTAL)"
1057 This allows containers, i.e. vservers, to use user namespaces
1058 to provide different user info for different servers.
1060 config KERNEL_PID_NS
1061 bool "PID Namespaces"
1064 Support process id namespaces. This allows having multiple
1065 processes with the same pid as long as they are in different
1066 pid namespaces. This is a building block of containers.
1068 config KERNEL_NET_NS
1069 bool "Network namespace"
1072 Allow user space to create what appear to be multiple instances
1073 of the network stack.
1077 config KERNEL_DEVPTS_MULTIPLE_INSTANCES
1078 bool "Support multiple instances of devpts"
1079 default y if !SMALL_FLASH
1081 Enable support for multiple instances of devpts filesystem.
1082 If you want to have isolated PTY namespaces (eg: in containers),
1083 say Y here. Otherwise, say N. If enabled, each mount of devpts
1084 filesystem with the '-o newinstance' option will create an
1085 independent PTY namespace.
1087 config KERNEL_POSIX_MQUEUE
1088 bool "POSIX Message Queues"
1089 default y if !SMALL_FLASH
1091 POSIX variant of message queues is a part of IPC. In POSIX message
1092 queues every message has a priority which decides about succession
1093 of receiving it by a process. If you want to compile and run
1094 programs written e.g. for Solaris with use of its POSIX message
1095 queues (functions mq_*) say Y here.
1097 POSIX message queues are visible as a filesystem called 'mqueue'
1098 and can be mounted somewhere if you want to do filesystem
1099 operations on message queues.
1102 config KERNEL_SECCOMP_FILTER
1104 default y if !SMALL_FLASH
1106 config KERNEL_SECCOMP
1107 bool "Enable seccomp support"
1108 depends on !(TARGET_uml)
1109 select KERNEL_SECCOMP_FILTER
1110 default y if !SMALL_FLASH
1112 Build kernel with support for seccomp.
1115 # IPv4 configuration
1118 config KERNEL_IP_MROUTE
1119 bool "Enable IPv4 multicast routing"
1122 Multicast routing requires a multicast routing daemon in
1123 addition to kernel support.
1127 config KERNEL_IP_MROUTE_MULTIPLE_TABLES
1130 config KERNEL_IP_PIMSM_V1
1133 config KERNEL_IP_PIMSM_V2
1139 # IPv6 configuration
1147 config KERNEL_IPV6_MULTIPLE_TABLES
1150 config KERNEL_IPV6_SUBTREES
1153 config KERNEL_IPV6_MROUTE
1154 bool "Enable IPv6 multicast routing"
1157 Multicast routing requires a multicast routing daemon in
1158 addition to kernel support.
1160 if KERNEL_IPV6_MROUTE
1162 config KERNEL_IPV6_MROUTE_MULTIPLE_TABLES
1165 config KERNEL_IPV6_PIMSM_V2
1170 config KERNEL_IPV6_SEG6_LWTUNNEL
1171 bool "Enable support for lightweight tunnels"
1172 default y if !SMALL_FLASH
1174 Using lwtunnel (needed for IPv6 segment routing) requires ip-full package.
1176 config KERNEL_LWTUNNEL_BPF
1182 # Miscellaneous network configuration
1185 config KERNEL_NET_L3_MASTER_DEV
1186 bool "L3 Master device support"
1188 This module provides glue between core networking code and device
1189 drivers to support L3 master devices like VRF.
1191 config KERNEL_XDP_SOCKETS
1192 bool "XDP sockets support"
1194 XDP sockets allows a channel between XDP programs and
1195 userspace applications.
1197 config KERNEL_PAGE_POOL
1200 config KERNEL_PAGE_POOL_STATS
1201 bool "Page pool stats support"
1202 depends on KERNEL_PAGE_POOL
1205 # NFS related symbols
1207 config KERNEL_IP_PNP
1208 bool "Compile the kernel with rootfs on NFS"
1210 If you want to make your kernel boot off a NFS server as root
1211 filesystem, select Y here.
1215 config KERNEL_IP_PNP_DHCP
1218 config KERNEL_IP_PNP_BOOTP
1221 config KERNEL_IP_PNP_RARP
1224 config KERNEL_NFS_FS
1227 config KERNEL_NFS_V2
1230 config KERNEL_NFS_V3
1233 config KERNEL_ROOT_NFS
1238 menu "Filesystem ACL and attr support options"
1239 config USE_FS_ACL_ATTR
1240 bool "Use filesystem ACL and attr support by default"
1242 Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default
1243 for kernel and packages, except tmpfs, flash filesystems,
1244 and old NFS. Also enable userspace extended attribute support
1245 by default. (OpenWrt already has an expection it will be
1246 present in the kernel).
1248 config KERNEL_FS_POSIX_ACL
1249 bool "Enable POSIX ACL support"
1250 default y if USE_FS_ACL_ATTR
1252 config KERNEL_BTRFS_FS_POSIX_ACL
1253 bool "Enable POSIX ACL for BtrFS Filesystems"
1254 select KERNEL_FS_POSIX_ACL
1255 default y if USE_FS_ACL_ATTR
1257 config KERNEL_EXT4_FS_POSIX_ACL
1258 bool "Enable POSIX ACL for Ext4 Filesystems"
1259 select KERNEL_FS_POSIX_ACL
1260 default y if USE_FS_ACL_ATTR
1262 config KERNEL_F2FS_FS_POSIX_ACL
1263 bool "Enable POSIX ACL for F2FS Filesystems"
1264 select KERNEL_FS_POSIX_ACL
1266 config KERNEL_JFFS2_FS_POSIX_ACL
1267 bool "Enable POSIX ACL for JFFS2 Filesystems"
1268 select KERNEL_FS_POSIX_ACL
1270 config KERNEL_TMPFS_POSIX_ACL
1271 bool "Enable POSIX ACL for TMPFS Filesystems"
1272 select KERNEL_FS_POSIX_ACL
1274 config KERNEL_CIFS_ACL
1275 bool "Enable CIFS ACLs"
1276 select KERNEL_FS_POSIX_ACL
1277 default y if USE_FS_ACL_ATTR
1279 config KERNEL_HFS_FS_POSIX_ACL
1280 bool "Enable POSIX ACL for HFS Filesystems"
1281 select KERNEL_FS_POSIX_ACL
1282 default y if USE_FS_ACL_ATTR
1284 config KERNEL_HFSPLUS_FS_POSIX_ACL
1285 bool "Enable POSIX ACL for HFS+ Filesystems"
1286 select KERNEL_FS_POSIX_ACL
1287 default y if USE_FS_ACL_ATTR
1289 config KERNEL_NFS_ACL_SUPPORT
1290 bool "Enable ACLs for NFS"
1291 default y if USE_FS_ACL_ATTR
1293 config KERNEL_NFS_V3_ACL_SUPPORT
1294 bool "Enable ACLs for NFSv3"
1296 config KERNEL_NFSD_V2_ACL_SUPPORT
1297 bool "Enable ACLs for NFSDv2"
1299 config KERNEL_NFSD_V3_ACL_SUPPORT
1300 bool "Enable ACLs for NFSDv3"
1302 config KERNEL_REISER_FS_POSIX_ACL
1303 bool "Enable POSIX ACLs for ReiserFS"
1304 select KERNEL_FS_POSIX_ACL
1305 default y if USE_FS_ACL_ATTR
1307 config KERNEL_XFS_POSIX_ACL
1308 bool "Enable POSIX ACLs for XFS"
1309 select KERNEL_FS_POSIX_ACL
1310 default y if USE_FS_ACL_ATTR
1312 config KERNEL_JFS_POSIX_ACL
1313 bool "Enable POSIX ACLs for JFS"
1314 select KERNEL_FS_POSIX_ACL
1315 default y if USE_FS_ACL_ATTR
1319 config KERNEL_DEVMEM
1320 bool "/dev/mem virtual device support"
1322 Say Y here if you want to support the /dev/mem device.
1323 The /dev/mem device is used to access areas of physical
1326 config KERNEL_DEVKMEM
1327 bool "/dev/kmem virtual device support"
1329 Say Y here if you want to support the /dev/kmem device. The
1330 /dev/kmem device is rarely used, but can be used for certain
1331 kind of kernel debugging operations.
1333 config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
1334 int "Number of squashfs fragments cached"
1335 default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
1338 config KERNEL_SQUASHFS_XATTR
1339 bool "Squashfs XATTR support"
1342 # compile optimization setting
1345 prompt "Compiler optimization level"
1346 default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
1348 config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
1349 bool "Optimize for performance"
1351 This is the default optimization level for the kernel, building
1352 with the "-O2" compiler flag for best performance and most
1353 helpful compile-time warnings.
1355 config KERNEL_CC_OPTIMIZE_FOR_SIZE
1356 bool "Optimize for size"
1358 Enabling this option will pass "-Os" instead of "-O2" to
1359 your compiler resulting in a smaller kernel.
1364 bool "Auditing support"
1366 config KERNEL_SECURITY
1367 bool "Enable different security models"
1369 config KERNEL_SECURITY_NETWORK
1370 bool "Socket and Networking Security Hooks"
1371 select KERNEL_SECURITY
1373 config KERNEL_SECURITY_SELINUX
1374 bool "NSA SELinux Support"
1375 select KERNEL_SECURITY_NETWORK
1378 config KERNEL_SECURITY_SELINUX_BOOTPARAM
1379 bool "NSA SELinux boot parameter"
1380 depends on KERNEL_SECURITY_SELINUX
1383 config KERNEL_SECURITY_SELINUX_DISABLE
1384 bool "NSA SELinux runtime disable"
1385 depends on KERNEL_SECURITY_SELINUX
1387 config KERNEL_SECURITY_SELINUX_DEVELOP
1388 bool "NSA SELinux Development Support"
1389 depends on KERNEL_SECURITY_SELINUX
1392 config KERNEL_SECURITY_SELINUX_SIDTAB_HASH_BITS
1394 depends on KERNEL_SECURITY_SELINUX
1397 config KERNEL_SECURITY_SELINUX_SID2STR_CACHE_SIZE
1399 depends on KERNEL_SECURITY_SELINUX
1404 default "lockdown,yama,loadpin,safesetid,integrity,selinux"
1405 depends on KERNEL_SECURITY_SELINUX
1407 config KERNEL_EXT4_FS_SECURITY
1408 bool "Ext4 Security Labels"
1410 config KERNEL_F2FS_FS_SECURITY
1411 bool "F2FS Security Labels"
1413 config KERNEL_UBIFS_FS_SECURITY
1414 bool "UBIFS Security Labels"
1416 config KERNEL_JFFS2_FS_SECURITY
1417 bool "JFFS2 Security Labels"
1419 config KERNEL_WERROR
1420 bool "Compile the kernel with warnings as errors"
1422 A kernel build should not cause any compiler warnings, and this
1423 enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
1424 to enforce that rule by default. Certain warnings from other tools
1425 such as the linker may be upgraded to errors with this option as
1428 However, if you have a new (or very old) compiler or linker with odd
1429 and unusual warnings, or you have some architecture with problems,
1430 you may need to disable this config option in order to
1431 successfully build the kernel.