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_ARM_PMUV3
55 default y if TARGET_armsr_armv8
56 depends on (arm_v7 || aarch64) && LINUX_6_6
58 config KERNEL_RISCV_PMU
60 select KERNEL_RISCV_PMU_SBI
63 config KERNEL_RISCV_PMU_SBI
67 config KERNEL_X86_VSYSCALL_EMULATION
68 bool "Enable vsyscall emulation"
71 This enables emulation of the legacy vsyscall page. Disabling
72 it is roughly equivalent to booting with vsyscall=none, except
73 that it will also disable the helpful warning if a program
74 tries to use a vsyscall. With this option set to N, offending
75 programs will just segfault, citing addresses of the form
78 This option is required by many programs built before 2013, and
79 care should be used even with newer programs if set to N.
81 Disabling this option saves about 7K of kernel size and
82 possibly 4K of additional runtime pagetable memory.
84 config KERNEL_PERF_EVENTS
85 bool "Compile the kernel with performance events and counters"
86 select KERNEL_ARM_PMU if (arm || aarch64)
87 select KERNEL_ARM_PMUV3 if (arm_v7 || aarch64) && LINUX_6_6
88 select KERNEL_RISCV_PMU if riscv64
90 config KERNEL_PROFILING
91 bool "Compile the kernel with profiling enabled"
92 select KERNEL_PERF_EVENTS
94 Enable the extended profiling support mechanisms used by profilers such
97 config KERNEL_RPI_AXIPERF
98 bool "Compile the kernel with RaspberryPi AXI Performance monitors"
100 depends on KERNEL_PERF_EVENTS && TARGET_bcm27xx
103 bool "Compile the kernel with undefined behaviour sanity checker"
105 This option enables undefined behaviour sanity checker
106 Compile-time instrumentation is used to detect various undefined
107 behaviours in runtime. Various types of checks may be enabled
108 via boot parameter ubsan_handle
109 (see: Documentation/dev-tools/ubsan.rst).
111 config KERNEL_UBSAN_SANITIZE_ALL
112 bool "Enable instrumentation for the entire kernel"
113 depends on KERNEL_UBSAN
116 This option activates instrumentation for the entire kernel.
117 If you don't enable this option, you have to explicitly specify
118 UBSAN_SANITIZE := y for the files/directories you want to check for UB.
119 Enabling this option will get kernel image size increased
122 config KERNEL_UBSAN_ALIGNMENT
123 bool "Enable checking of pointers alignment"
124 depends on KERNEL_UBSAN
126 This option enables detection of unaligned memory accesses.
127 Enabling this option on architectures that support unaligned
128 accesses may produce a lot of false positives.
130 config KERNEL_UBSAN_BOUNDS
131 bool "Perform array index bounds checking"
132 depends on KERNEL_UBSAN
134 This option enables detection of directly indexed out of bounds array
135 accesses, where the array size is known at compile time. Note that
136 this does not protect array overflows via bad calls to the
137 {str,mem}*cpy() family of functions (that is addressed by
140 config KERNEL_UBSAN_NULL
141 bool "Enable checking of null pointers"
142 depends on KERNEL_UBSAN
144 This option enables detection of memory accesses via a
147 config KERNEL_UBSAN_TRAP
148 bool "On Sanitizer warnings, abort the running kernel code"
149 depends on KERNEL_UBSAN
151 Building kernels with Sanitizer features enabled tends to grow the
152 kernel size by around 5%, due to adding all the debugging text on
153 failure paths. To avoid this, Sanitizer instrumentation can just
154 issue a trap. This reduces the kernel size overhead but turns all
155 warnings (including potentially harmless conditions) into full
156 exceptions that abort the running kernel code (regardless of context,
157 locks held, etc), which may destabilize the system. For some system
158 builders this is an acceptable trade-off.
161 bool "Compile the kernel with KASan: runtime memory debugger"
162 select KERNEL_SLUB_DEBUG
163 depends on (x86_64 || aarch64 || arm || powerpc || riscv64)
165 Enables kernel address sanitizer - runtime memory debugger,
166 designed to find out-of-bounds accesses and use-after-free bugs.
167 This is strictly a debugging feature and it requires a gcc version
168 of 4.9.2 or later. Detection of out of bounds accesses to stack or
169 global variables requires gcc 5.0 or later.
170 This feature consumes about 1/8 of available memory and brings about
171 ~x3 performance slowdown.
172 For better error detection enable CONFIG_STACKTRACE.
173 Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB
174 (the resulting kernel does not boot).
176 config KERNEL_KASAN_EXTRA
177 bool "KAsan: extra checks"
178 depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL
180 This enables further checks in the kernel address sanitizer, for now
181 it only includes the address-use-after-scope check that can lead
182 to excessive kernel stack usage, frame size warnings and longer
184 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
186 config KERNEL_KASAN_VMALLOC
187 bool "Back mappings in vmalloc space with real shadow memory"
188 depends on KERNEL_KASAN
190 By default, the shadow region for vmalloc space is the read-only
191 zero page. This means that KASAN cannot detect errors involving
194 Enabling this option will hook in to vmap/vmalloc and back those
195 mappings with real shadow memory allocated on demand. This allows
196 for KASAN to detect more sorts of errors (and to support vmapped
197 stacks), but at the cost of higher memory usage.
199 This option depends on HAVE_ARCH_KASAN_VMALLOC, but we can't
200 depend on that in here, so it is possible that enabling this
206 depends on KERNEL_KASAN
207 default KERNEL_KASAN_GENERIC
209 KASAN has three modes:
211 1. Generic KASAN (supported by many architectures, enabled with
212 CONFIG_KASAN_GENERIC, similar to userspace ASan),
213 2. Software Tag-Based KASAN (arm64 only, based on software memory
214 tagging, enabled with CONFIG_KASAN_SW_TAGS, similar to userspace
216 3. Hardware Tag-Based KASAN (arm64 only, based on hardware memory
217 tagging, enabled with CONFIG_KASAN_HW_TAGS).
219 config KERNEL_KASAN_GENERIC
221 select KERNEL_SLUB_DEBUG
223 Enables Generic KASAN.
225 Consumes about 1/8th of available memory at kernel start and adds an
226 overhead of ~50% for dynamic allocations.
227 The performance slowdown is ~x3.
229 config KERNEL_KASAN_SW_TAGS
230 bool "Software Tag-Based KASAN"
232 select KERNEL_SLUB_DEBUG
234 Enables Software Tag-Based KASAN.
236 Supported only on arm64 CPUs and relies on Top Byte Ignore.
238 Consumes about 1/16th of available memory at kernel start and
239 add an overhead of ~20% for dynamic allocations.
241 May potentially introduce problems related to pointer casting and
242 comparison, as it embeds a tag into the top byte of each pointer.
244 config KERNEL_KASAN_HW_TAGS
245 bool "Hardware Tag-Based KASAN"
247 select KERNEL_SLUB_DEBUG
248 select KERNEL_ARM64_MTE
250 Enables Hardware Tag-Based KASAN.
252 Supported only on arm64 CPUs starting from ARMv8.5 and relies on
253 Memory Tagging Extension and Top Byte Ignore.
255 Consumes about 1/32nd of available memory.
257 May potentially introduce problems related to pointer casting and
258 comparison, as it embeds a tag into the top byte of each pointer.
262 config KERNEL_ARM64_MTE
268 prompt "Instrumentation type"
269 depends on KERNEL_KASAN
270 depends on !KERNEL_KASAN_HW_TAGS
271 default KERNEL_KASAN_OUTLINE
273 config KERNEL_KASAN_OUTLINE
274 bool "Outline instrumentation"
276 Before every memory access compiler insert function call
277 __asan_load*/__asan_store*. These functions performs check
278 of shadow memory. This is slower than inline instrumentation,
279 however it doesn't bloat size of kernel's .text section so
282 config KERNEL_KASAN_INLINE
283 bool "Inline instrumentation"
285 Compiler directly inserts code checking shadow memory before
286 memory accesses. This is faster than outline (in some workloads
287 it gives about x2 boost over outline instrumentation), but
288 make kernel's .text size much bigger.
289 This requires a gcc version of 5.0 or later.
294 bool "Compile the kernel with code coverage for fuzzing"
295 select KERNEL_DEBUG_FS
297 KCOV exposes kernel code coverage information in a form suitable
298 for coverage-guided fuzzing (randomized testing).
300 If RANDOMIZE_BASE is enabled, PC values will not be stable across
301 different machines and across reboots. If you need stable PC values,
302 disable RANDOMIZE_BASE.
304 For more details, see Documentation/kcov.txt.
306 config KERNEL_KCOV_ENABLE_COMPARISONS
307 bool "Enable comparison operands collection by KCOV"
308 depends on KERNEL_KCOV
310 KCOV also exposes operands of every comparison in the instrumented
311 code along with operand sizes and PCs of the comparison instructions.
312 These operands can be used by fuzzing engines to improve the quality
315 config KERNEL_KCOV_INSTRUMENT_ALL
316 bool "Instrument all code by default"
317 depends on KERNEL_KCOV
318 default y if KERNEL_KCOV
320 If you are doing generic system call fuzzing (like e.g. syzkaller),
321 then you will want to instrument the whole kernel and you should
322 say y here. If you are doing more targeted fuzzing (like e.g.
323 filesystem fuzzing with AFL) then you will want to enable coverage
324 for more specific subsets of files, and should say n here.
326 config KERNEL_TASKSTATS
327 bool "Compile the kernel with task resource/io statistics and accounting"
329 Enable the collection and publishing of task/io statistics and
330 accounting. Enable this option to enable i/o monitoring in system
335 config KERNEL_TASK_DELAY_ACCT
338 config KERNEL_TASK_IO_ACCOUNTING
341 config KERNEL_TASK_XACCT
346 config KERNEL_KALLSYMS
347 bool "Compile the kernel with symbol table information"
348 default y if !SMALL_FLASH
350 This will give you more information in stack traces from kernel oopses.
353 bool "Compile the kernel with tracing support"
354 depends on !TARGET_uml
356 config KERNEL_FTRACE_SYSCALLS
357 bool "Trace system calls"
358 depends on KERNEL_FTRACE
360 config KERNEL_ENABLE_DEFAULT_TRACERS
361 bool "Trace process context switches and events"
362 depends on KERNEL_FTRACE
364 config KERNEL_FUNCTION_TRACER
365 bool "Function tracer"
366 depends on KERNEL_FTRACE
368 config KERNEL_FUNCTION_GRAPH_TRACER
369 bool "Function graph tracer"
370 depends on KERNEL_FUNCTION_TRACER
372 config KERNEL_DYNAMIC_FTRACE
373 bool "Enable/disable function tracing dynamically"
374 depends on KERNEL_FUNCTION_TRACER
376 config KERNEL_FUNCTION_PROFILER
377 bool "Function profiler"
378 depends on KERNEL_FUNCTION_TRACER
380 config KERNEL_IRQSOFF_TRACER
381 bool "Interrupts-off Latency Tracer"
382 depends on KERNEL_FTRACE
384 This option measures the time spent in irqs-off critical
385 sections, with microsecond accuracy.
387 The default measurement method is a maximum search, which is
388 disabled by default and can be runtime (re-)started
391 echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
393 (Note that kernel size and overhead increase with this option
394 enabled. This option and the preempt-off timing option can be
395 used together or separately.)
397 config KERNEL_PREEMPT_TRACER
398 bool "Preemption-off Latency Tracer"
399 depends on KERNEL_FTRACE
401 This option measures the time spent in preemption-off critical
402 sections, with microsecond accuracy.
404 The default measurement method is a maximum search, which is
405 disabled by default and can be runtime (re-)started
408 echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
410 (Note that kernel size and overhead increase with this option
411 enabled. This option and the irqs-off timing option can be
412 used together or separately.)
414 config KERNEL_HIST_TRIGGERS
415 bool "Histogram triggers"
416 depends on KERNEL_FTRACE
418 Hist triggers allow one or more arbitrary trace event fields to be
419 aggregated into hash tables and dumped to stdout by reading a
420 debugfs/tracefs file. They're useful for gathering quick and dirty
421 (though precise) summaries of event activity as an initial guide for
422 further investigation using more advanced tools.
424 Inter-event tracing of quantities such as latencies is also
425 supported using hist triggers under this option.
427 config KERNEL_DEBUG_KERNEL
430 config KERNEL_DEBUG_INFO
431 bool "Compile the kernel with debug information"
432 default y if !SMALL_FLASH
433 select KERNEL_DEBUG_KERNEL
435 This will compile your kernel and modules with debug information.
437 config KERNEL_DEBUG_INFO_BTF
439 bool "Enable additional BTF type information"
440 depends on !HOST_OS_MACOS
441 depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED
444 Generate BPF Type Format (BTF) information from DWARF debug info.
445 Turning this on expects presence of pahole tool, which will convert
446 DWARF type info into equivalent deduplicated BTF type info.
448 Required to run BPF CO-RE applications.
450 config KERNEL_MODULE_ALLOW_BTF_MISMATCH
451 bool "Allow loading modules with non-matching BTF type info"
452 depends on KERNEL_DEBUG_INFO_BTF
454 For modules whose split BTF does not match vmlinux, load without
455 BTF rather than refusing to load. The default behavior with
456 module BTF enabled is to reject modules with such mismatches;
457 this option will still load module BTF where possible but ignore
458 it when a mismatch is found.
460 config KERNEL_DEBUG_INFO_REDUCED
461 bool "Reduce debugging information"
463 depends on KERNEL_DEBUG_INFO
465 If you say Y here gcc is instructed to generate less debugging
466 information for structure types. This means that tools that
467 need full debugging information (like kgdb or systemtap) won't
468 be happy. But if you merely need debugging information to
469 resolve line numbers there is no loss. Advantage is that
470 build directory object sizes shrink dramatically over a full
471 DEBUG_INFO build and compile times are reduced too.
472 Only works with newer gcc versions.
474 config KERNEL_FRAME_WARN
477 default 1280 if KERNEL_KASAN && !ARCH_64BIT
478 default 1024 if !ARCH_64BIT
479 default 2048 if ARCH_64BIT
481 Tell the compiler to warn at build time for stack frames larger than this.
482 Setting this too low will cause a lot of warnings.
483 Setting it to 0 disables the warning.
485 # KERNEL_DEBUG_LL symbols must have the default value set as otherwise
486 # KConfig wont evaluate them unless KERNEL_EARLY_PRINTK is selected
487 # which means that buildroot wont override the DEBUG_LL symbols in target
488 # kernel configurations and lead to devices that dont have working console
489 config KERNEL_DEBUG_LL_UART_NONE
494 config KERNEL_DEBUG_LL
498 select KERNEL_DEBUG_LL_UART_NONE
500 ARM low level debugging.
502 config KERNEL_DEBUG_VIRTUAL
503 bool "Compile the kernel with VM translations debugging"
504 select KERNEL_DEBUG_KERNEL
506 Enable checks sanity checks to catch invalid uses of
507 virt_to_phys()/phys_to_virt() against the non-linear address space.
509 config KERNEL_DYNAMIC_DEBUG
510 bool "Compile the kernel with dynamic printk"
511 select KERNEL_DEBUG_FS
513 Compiles debug level messages into the kernel, which would not
514 otherwise be available at runtime. These messages can then be
515 enabled/disabled based on various levels of scope - per source file,
516 function, module, format string, and line number. This mechanism
517 implicitly compiles in all pr_debug() and dev_dbg() calls, which
518 enlarges the kernel text size by about 2%.
520 config KERNEL_EARLY_PRINTK
521 bool "Compile the kernel with early printk"
522 default y if TARGET_bcm53xx
524 select KERNEL_DEBUG_KERNEL
525 select KERNEL_DEBUG_LL if arm
527 Compile the kernel with early printk support. This is only useful for
528 debugging purposes to send messages over the serial console in early boot.
529 Enable this to debug early boot problems.
531 config KERNEL_KPROBES
532 bool "Compile the kernel with kprobes support"
534 select KERNEL_PERF_EVENTS
536 Compiles the kernel with KPROBES support, which allows you to trap
537 at almost any kernel address and execute a callback function.
538 register_kprobe() establishes a probepoint and specifies the
539 callback. Kprobes is useful for kernel debugging, non-intrusive
540 instrumentation and testing.
541 If in doubt, say "N".
543 config KERNEL_KPROBE_EVENTS
545 default y if KERNEL_KPROBES
547 config KERNEL_BPF_EVENTS
548 bool "Compile the kernel with BPF event support"
549 select KERNEL_KPROBES
551 Allows to attach BPF programs to kprobe, uprobe and tracepoint events.
552 This is required to use BPF maps of type BPF_MAP_TYPE_PERF_EVENT_ARRAY
553 for sending data from BPF programs to user-space for post-processing
556 config KERNEL_BPF_KPROBE_OVERRIDE
558 depends on KERNEL_KPROBES
562 bool "Compile the kernel with asynchronous IO support"
563 default y if !SMALL_FLASH
565 config KERNEL_IO_URING
566 bool "Compile the kernel with io_uring support"
567 depends on !SMALL_FLASH
568 default y if (x86_64 || aarch64)
570 config KERNEL_FHANDLE
571 bool "Compile the kernel with support for fhandle syscalls"
572 default y if !SMALL_FLASH
574 config KERNEL_FANOTIFY
575 bool "Compile the kernel with modern file notification support"
576 default y if !SMALL_FLASH
578 config KERNEL_BLK_DEV_BSG
579 bool "Compile the kernel with SCSI generic v4 support for any block device"
581 config KERNEL_TRANSPARENT_HUGEPAGE
585 prompt "Transparent Hugepage Support sysfs defaults"
586 depends on KERNEL_TRANSPARENT_HUGEPAGE
587 default KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
589 config KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
592 config KERNEL_TRANSPARENT_HUGEPAGE_MADVISE
596 config KERNEL_HUGETLBFS
599 config KERNEL_HUGETLB_PAGE
600 bool "Compile the kernel with HugeTLB support"
601 select KERNEL_TRANSPARENT_HUGEPAGE
602 select KERNEL_HUGETLBFS
604 config KERNEL_MAGIC_SYSRQ
605 bool "Compile the kernel with SysRq support"
608 config KERNEL_DEBUG_PINCTRL
609 bool "Compile the kernel with pinctrl debugging"
610 select KERNEL_DEBUG_KERNEL
612 config KERNEL_DEBUG_GPIO
613 bool "Compile the kernel with gpio debugging"
614 select KERNEL_DEBUG_KERNEL
616 config KERNEL_COREDUMP
619 config KERNEL_ELF_CORE
620 bool "Enable process core dump support"
621 select KERNEL_COREDUMP
622 default y if !SMALL_FLASH
624 config KERNEL_PROVE_LOCKING
625 bool "Enable kernel lock checking"
626 select KERNEL_DEBUG_KERNEL
628 config KERNEL_SOFTLOCKUP_DETECTOR
629 bool "Compile the kernel with detect Soft Lockups"
630 depends on KERNEL_DEBUG_KERNEL
632 Say Y here to enable the kernel to act as a watchdog to detect
635 Softlockups are bugs that cause the kernel to loop in kernel
636 mode for more than 20 seconds, without giving other tasks a
637 chance to run. The current stack trace is displayed upon
638 detection and the system will stay locked up.
640 config KERNEL_HARDLOCKUP_DETECTOR
641 bool "Compile the kernel with detect Hard Lockups"
642 depends on KERNEL_DEBUG_KERNEL
644 Say Y here to enable the kernel to act as a watchdog to detect
647 Hardlockups are bugs that cause the CPU to loop in kernel mode
648 for more than 10 seconds, without letting other interrupts have a
649 chance to run. The current stack trace is displayed upon detection
650 and the system will stay locked up.
652 config KERNEL_DETECT_HUNG_TASK
653 bool "Compile the kernel with detect Hung Tasks"
654 depends on KERNEL_DEBUG_KERNEL
655 default KERNEL_SOFTLOCKUP_DETECTOR
657 Say Y here to enable the kernel to detect "hung tasks",
658 which are bugs that cause the task to be stuck in
659 uninterruptible "D" state indefinitely.
661 When a hung task is detected, the kernel will print the
662 current stack trace (which you should report), but the
663 task will stay in uninterruptible state. If lockdep is
664 enabled then all held locks will also be reported. This
665 feature has negligible overhead.
667 config KERNEL_WQ_WATCHDOG
668 bool "Compile the kernel with detect Workqueue Stalls"
669 depends on KERNEL_DEBUG_KERNEL
671 Say Y here to enable stall detection on workqueues. If a
672 worker pool doesn't make forward progress on a pending work
673 item for over a given amount of time, 30s by default, a
674 warning message is printed along with dump of workqueue
675 state. This can be configured through kernel parameter
676 "workqueue.watchdog_thresh" and its sysfs counterpart.
678 config KERNEL_DEBUG_ATOMIC_SLEEP
679 bool "Compile the kernel with sleep inside atomic section checking"
680 depends on KERNEL_DEBUG_KERNEL
682 If you say Y here, various routines which may sleep will become very
683 noisy if they are called inside atomic sections: when a spinlock is
684 held, inside an rcu read side critical section, inside preempt disabled
685 sections, inside an interrupt, etc...
687 config KERNEL_DEBUG_VM
688 bool "Compile the kernel with debug VM"
689 depends on KERNEL_DEBUG_KERNEL
691 Enable this to turn on extended checks in the virtual-memory system
692 that may impact performance.
696 config KERNEL_PRINTK_TIME
697 bool "Enable printk timestamps"
700 config KERNEL_SLUB_DEBUG
701 bool "Enable SLUB debugging support"
703 This enables various debugging features:
704 - Accepts "slub_debug" kernel parameter
705 - Provides caches debugging options (e.g. tracing, validating)
706 - Adds /sys/kernel/slab/ attrs for reading amounts of *objects*
707 - Enables /proc/slabinfo support
708 - Prints info when running out of memory
710 Enabling this can result in a significant increase of code size.
712 config KERNEL_SLUB_DEBUG_ON
713 depends on KERNEL_SLUB_DEBUG
714 bool "Boot kernel with basic caches debugging enabled"
716 This enables by default sanity_checks, red_zone, poison and store_user
717 debugging options for all caches.
719 config KERNEL_SLABINFO
720 select KERNEL_SLUB_DEBUG
721 select KERNEL_SLUB_DEBUG_ON
722 bool "Enable /proc slab debug info"
724 config KERNEL_PROC_PAGE_MONITOR
725 bool "Enable /proc page monitoring"
731 bool "Enable kexec support"
733 config KERNEL_PROC_VMCORE
736 config KERNEL_PROC_KCORE
739 config KERNEL_CRASH_DUMP
740 depends on i386 || x86_64 || arm || armeb
742 select KERNEL_PROC_VMCORE
743 select KERNEL_PROC_KCORE
744 bool "Enable support for kexec crashdump"
748 bool "Enable rfkill support"
749 default RFKILL_SUPPORT
752 bool "Enable sparse check during kernel build"
754 config KERNEL_DEVTMPFS
755 bool "Compile the kernel with device tmpfs enabled"
757 devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
758 devices nodes for all registered devices to simplify boot, but leaves more
759 complex tasks to userspace (e.g. udev).
763 config KERNEL_DEVTMPFS_MOUNT
764 bool "Automatically mount devtmpfs after root filesystem is mounted"
769 bool "Enable kernel access key retention support"
772 config KERNEL_PERSISTENT_KEYRINGS
773 bool "Enable kernel persistent keyrings"
774 depends on KERNEL_KEYS
776 config KERNEL_KEYS_REQUEST_CACHE
777 bool "Enable temporary caching of the last request_key() result"
778 depends on KERNEL_KEYS
780 config KERNEL_BIG_KEYS
781 bool "Enable large payload keys on kernel keyrings"
782 depends on KERNEL_KEYS
785 # CGROUP support symbols
788 config KERNEL_CGROUPS
789 bool "Enable kernel cgroups"
790 default y if !SMALL_FLASH
794 config KERNEL_CGROUP_DEBUG
795 bool "Example debug cgroup subsystem"
797 This option enables a simple cgroup subsystem that
798 exports useful debugging information about the cgroups
801 config KERNEL_FREEZER
804 config KERNEL_CGROUP_FREEZER
805 bool "legacy Freezer cgroup subsystem"
806 select KERNEL_FREEZER
808 Provides a way to freeze and unfreeze all tasks in a
810 (legacy cgroup1-only controller, in cgroup2 freezer
811 is integrated in the Memory controller)
813 config KERNEL_CGROUP_DEVICE
814 bool "legacy Device controller for cgroups"
816 Provides a cgroup implementing whitelists for devices which
817 a process in the cgroup can mknod or open.
818 (legacy cgroup1-only controller)
820 config KERNEL_CGROUP_HUGETLB
821 bool "HugeTLB controller"
822 select KERNEL_HUGETLB_PAGE
824 config KERNEL_CGROUP_PIDS
825 bool "PIDs cgroup subsystem"
828 Provides enforcement of process number limits in the scope of a
831 config KERNEL_CGROUP_RDMA
832 bool "RDMA controller for cgroups"
835 config KERNEL_CGROUP_BPF
836 bool "Support for eBPF programs attached to cgroups"
839 config KERNEL_CPUSETS
840 bool "Cpuset support"
843 This option will let you create and manage CPUSETs which
844 allow dynamically partitioning a system into sets of CPUs and
845 Memory Nodes and assigning tasks to run only within those sets.
846 This is primarily useful on large SMP or NUMA systems.
848 config KERNEL_PROC_PID_CPUSET
849 bool "Include legacy /proc/<pid>/cpuset file"
850 depends on KERNEL_CPUSETS
852 config KERNEL_CGROUP_CPUACCT
853 bool "Simple CPU accounting cgroup subsystem"
856 Provides a simple Resource Controller for monitoring the
857 total CPU consumed by the tasks in a cgroup.
859 config KERNEL_RESOURCE_COUNTERS
860 bool "Resource counters"
863 This option enables controller independent resource accounting
864 infrastructure that works with cgroups.
866 config KERNEL_MM_OWNER
868 default y if KERNEL_MEMCG
871 bool "Memory Resource Controller for Control Groups"
873 select KERNEL_FREEZER
874 depends on KERNEL_RESOURCE_COUNTERS
876 Provides a memory resource controller that manages both anonymous
877 memory and page cache. (See Documentation/cgroups/memory.txt)
879 Note that setting this option increases fixed memory overhead
880 associated with each page of memory in the system. By this,
881 20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory
882 usage tracking struct at boot. Total amount of this is printed out
885 Only enable when you're ok with these tradeoffs and really
886 sure you need the memory resource controller. Even when you enable
887 this, you can set "cgroup_disable=memory" at your boot option to
888 disable memory resource controller and you can avoid overheads
889 (but lose benefits of memory resource controller).
891 This config option also selects MM_OWNER config option, which
892 could in turn add some fork/exit overhead.
894 config KERNEL_MEMCG_SWAP
895 bool "Memory Resource Controller Swap Extension"
897 depends on KERNEL_MEMCG
899 Add swap management feature to memory resource controller. When you
900 enable this, you can limit mem+swap usage per cgroup. In other words,
901 when you disable this, memory resource controller has no cares to
902 usage of swap...a process can exhaust all of the swap. This extension
903 is useful when you want to avoid exhaustion swap but this itself
904 adds more overheads and consumes memory for remembering information.
905 Especially if you use 32bit system or small memory system, please
906 be careful about enabling this. When memory resource controller
907 is disabled by boot option, this will be automatically disabled and
908 there will be no overhead from this. Even when you set this config=y,
909 if boot option "swapaccount=0" is set, swap will not be accounted.
910 Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
911 size is 4096bytes, 512k per 1Gbytes of swap.
913 config KERNEL_MEMCG_SWAP_ENABLED
914 bool "Memory Resource Controller Swap Extension enabled by default"
915 depends on KERNEL_MEMCG_SWAP
917 Memory Resource Controller Swap Extension comes with its price in
918 a bigger memory consumption. General purpose distribution kernels
919 which want to enable the feature but keep it disabled by default
920 and let the user enable it by swapaccount boot command line
921 parameter should have this option unselected.
923 Those who want to have the feature enabled by default should
924 select this option (if, for some reason, they need to disable it,
925 then swapaccount=0 does the trick).
928 config KERNEL_MEMCG_KMEM
929 bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
931 depends on KERNEL_MEMCG
933 The Kernel Memory extension for Memory Resource Controller can limit
934 the amount of memory used by kernel objects in the system. Those are
935 fundamentally different from the entities handled by the standard
936 Memory Controller, which are page-based, and can be swapped. Users of
937 the kmem extension can use it to guarantee that no group of processes
938 will ever exhaust kernel resources alone.
940 config KERNEL_CGROUP_PERF
941 bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
942 select KERNEL_PERF_EVENTS
944 This option extends the per-cpu mode to restrict monitoring to
945 threads which belong to the cgroup specified and run on the
948 menuconfig KERNEL_CGROUP_SCHED
949 bool "Group CPU scheduler"
952 This feature lets CPU scheduler recognize task groups and control CPU
953 bandwidth allocation to such task groups. It uses cgroups to group
956 if KERNEL_CGROUP_SCHED
958 config KERNEL_FAIR_GROUP_SCHED
959 bool "Group scheduling for SCHED_OTHER"
962 config KERNEL_CFS_BANDWIDTH
963 bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
965 depends on KERNEL_FAIR_GROUP_SCHED
967 This option allows users to define CPU bandwidth rates (limits) for
968 tasks running within the fair group scheduler. Groups with no limit
969 set are considered to be unconstrained and will run with no
971 See tip/Documentation/scheduler/sched-bwc.txt for more information.
973 config KERNEL_RT_GROUP_SCHED
974 bool "Group scheduling for SCHED_RR/FIFO"
977 This feature lets you explicitly allocate real CPU bandwidth
978 to task groups. If enabled, it will also make it impossible to
979 schedule realtime tasks for non-root users until you allocate
980 realtime bandwidth for them.
984 config KERNEL_BLK_CGROUP
985 bool "Block IO controller"
988 Generic block IO controller cgroup interface. This is the common
989 cgroup interface which should be used by various IO controlling
992 Currently, CFQ IO scheduler uses it to recognize task groups and
993 control disk bandwidth allocation (proportional time slice allocation)
994 to such task groups. It is also used by bio throttling logic in
995 block layer to implement upper limit in IO rates on a device.
997 This option only enables generic Block IO controller infrastructure.
998 One needs to also enable actual IO controlling logic/policy. For
999 enabling proportional weight division of disk bandwidth in CFQ, set
1000 CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
1001 CONFIG_BLK_DEV_THROTTLING=y.
1003 if KERNEL_BLK_CGROUP
1005 config KERNEL_CFQ_GROUP_IOSCHED
1006 bool "Proportional weight of disk bandwidth in CFQ"
1008 config KERNEL_BLK_DEV_THROTTLING
1009 bool "Enable throttling policy"
1012 config KERNEL_BLK_DEV_THROTTLING_LOW
1013 bool "Block throttling .low limit interface support (EXPERIMENTAL)"
1014 depends on KERNEL_BLK_DEV_THROTTLING
1017 config KERNEL_DEBUG_BLK_CGROUP
1018 bool "Enable Block IO controller debugging"
1019 depends on KERNEL_BLK_CGROUP
1021 Enable some debugging help. Currently it exports additional stat
1022 files in a cgroup which can be useful for debugging.
1024 config KERNEL_NET_CLS_CGROUP
1025 bool "legacy Control Group Classifier"
1027 config KERNEL_CGROUP_NET_CLASSID
1028 bool "legacy Network classid cgroup"
1030 config KERNEL_CGROUP_NET_PRIO
1031 bool "legacy Network priority cgroup"
1036 # Namespace support symbols
1039 config KERNEL_NAMESPACES
1040 bool "Enable kernel namespaces"
1041 default y if !SMALL_FLASH
1043 if KERNEL_NAMESPACES
1045 config KERNEL_UTS_NS
1046 bool "UTS namespace"
1049 In this namespace, tasks see different info provided
1050 with the uname() system call.
1052 config KERNEL_IPC_NS
1053 bool "IPC namespace"
1056 In this namespace, tasks work with IPC ids which correspond to
1057 different IPC objects in different namespaces.
1059 config KERNEL_USER_NS
1060 bool "User namespace (EXPERIMENTAL)"
1063 This allows containers, i.e. vservers, to use user namespaces
1064 to provide different user info for different servers.
1066 config KERNEL_PID_NS
1067 bool "PID Namespaces"
1070 Support process id namespaces. This allows having multiple
1071 processes with the same pid as long as they are in different
1072 pid namespaces. This is a building block of containers.
1074 config KERNEL_NET_NS
1075 bool "Network namespace"
1078 Allow user space to create what appear to be multiple instances
1079 of the network stack.
1083 config KERNEL_DEVPTS_MULTIPLE_INSTANCES
1084 bool "Support multiple instances of devpts"
1085 default y if !SMALL_FLASH
1087 Enable support for multiple instances of devpts filesystem.
1088 If you want to have isolated PTY namespaces (eg: in containers),
1089 say Y here. Otherwise, say N. If enabled, each mount of devpts
1090 filesystem with the '-o newinstance' option will create an
1091 independent PTY namespace.
1093 config KERNEL_POSIX_MQUEUE
1094 bool "POSIX Message Queues"
1095 default y if !SMALL_FLASH
1097 POSIX variant of message queues is a part of IPC. In POSIX message
1098 queues every message has a priority which decides about succession
1099 of receiving it by a process. If you want to compile and run
1100 programs written e.g. for Solaris with use of its POSIX message
1101 queues (functions mq_*) say Y here.
1103 POSIX message queues are visible as a filesystem called 'mqueue'
1104 and can be mounted somewhere if you want to do filesystem
1105 operations on message queues.
1108 config KERNEL_SECCOMP_FILTER
1110 default y if !SMALL_FLASH
1112 config KERNEL_SECCOMP
1113 bool "Enable seccomp support"
1114 depends on !(TARGET_uml)
1115 select KERNEL_SECCOMP_FILTER
1116 default y if !SMALL_FLASH
1118 Build kernel with support for seccomp.
1121 # IPv4 configuration
1124 config KERNEL_IP_MROUTE
1125 bool "Enable IPv4 multicast routing"
1128 Multicast routing requires a multicast routing daemon in
1129 addition to kernel support.
1133 config KERNEL_IP_MROUTE_MULTIPLE_TABLES
1136 config KERNEL_IP_PIMSM_V1
1139 config KERNEL_IP_PIMSM_V2
1145 # IPv6 configuration
1153 config KERNEL_IPV6_MULTIPLE_TABLES
1156 config KERNEL_IPV6_SUBTREES
1159 config KERNEL_IPV6_MROUTE
1160 bool "Enable IPv6 multicast routing"
1163 Multicast routing requires a multicast routing daemon in
1164 addition to kernel support.
1166 if KERNEL_IPV6_MROUTE
1168 config KERNEL_IPV6_MROUTE_MULTIPLE_TABLES
1171 config KERNEL_IPV6_PIMSM_V2
1176 config KERNEL_IPV6_SEG6_LWTUNNEL
1177 bool "Enable support for lightweight tunnels"
1178 default y if !SMALL_FLASH
1180 Using lwtunnel (needed for IPv6 segment routing) requires ip-full package.
1182 config KERNEL_LWTUNNEL_BPF
1188 # Miscellaneous network configuration
1191 config KERNEL_NET_L3_MASTER_DEV
1192 bool "L3 Master device support"
1194 This module provides glue between core networking code and device
1195 drivers to support L3 master devices like VRF.
1197 config KERNEL_XDP_SOCKETS
1198 bool "XDP sockets support"
1200 XDP sockets allows a channel between XDP programs and
1201 userspace applications.
1203 config KERNEL_PAGE_POOL
1206 config KERNEL_PAGE_POOL_STATS
1207 bool "Page pool stats support"
1208 depends on KERNEL_PAGE_POOL
1211 # NFS related symbols
1213 config KERNEL_IP_PNP
1214 bool "Compile the kernel with rootfs on NFS"
1216 If you want to make your kernel boot off a NFS server as root
1217 filesystem, select Y here.
1221 config KERNEL_IP_PNP_DHCP
1224 config KERNEL_IP_PNP_BOOTP
1227 config KERNEL_IP_PNP_RARP
1230 config KERNEL_NFS_FS
1233 config KERNEL_NFS_V2
1236 config KERNEL_NFS_V3
1239 config KERNEL_ROOT_NFS
1244 menu "Filesystem ACL and attr support options"
1245 config USE_FS_ACL_ATTR
1246 bool "Use filesystem ACL and attr support by default"
1248 Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default
1249 for kernel and packages, except tmpfs, flash filesystems,
1250 and old NFS. Also enable userspace extended attribute support
1251 by default. (OpenWrt already has an expection it will be
1252 present in the kernel).
1254 config KERNEL_FS_POSIX_ACL
1255 bool "Enable POSIX ACL support"
1256 default y if USE_FS_ACL_ATTR
1258 config KERNEL_BTRFS_FS_POSIX_ACL
1259 bool "Enable POSIX ACL for BtrFS Filesystems"
1260 select KERNEL_FS_POSIX_ACL
1261 default y if USE_FS_ACL_ATTR
1263 config KERNEL_EXT4_FS_POSIX_ACL
1264 bool "Enable POSIX ACL for Ext4 Filesystems"
1265 select KERNEL_FS_POSIX_ACL
1266 default y if USE_FS_ACL_ATTR
1268 config KERNEL_F2FS_FS_POSIX_ACL
1269 bool "Enable POSIX ACL for F2FS Filesystems"
1270 select KERNEL_FS_POSIX_ACL
1272 config KERNEL_JFFS2_FS_POSIX_ACL
1273 bool "Enable POSIX ACL for JFFS2 Filesystems"
1274 select KERNEL_FS_POSIX_ACL
1276 config KERNEL_TMPFS_POSIX_ACL
1277 bool "Enable POSIX ACL for TMPFS Filesystems"
1278 select KERNEL_FS_POSIX_ACL
1280 config KERNEL_CIFS_ACL
1281 bool "Enable CIFS ACLs"
1282 select KERNEL_FS_POSIX_ACL
1283 default y if USE_FS_ACL_ATTR
1285 config KERNEL_HFS_FS_POSIX_ACL
1286 bool "Enable POSIX ACL for HFS Filesystems"
1287 select KERNEL_FS_POSIX_ACL
1288 default y if USE_FS_ACL_ATTR
1290 config KERNEL_HFSPLUS_FS_POSIX_ACL
1291 bool "Enable POSIX ACL for HFS+ Filesystems"
1292 select KERNEL_FS_POSIX_ACL
1293 default y if USE_FS_ACL_ATTR
1295 config KERNEL_NFS_ACL_SUPPORT
1296 bool "Enable ACLs for NFS"
1297 default y if USE_FS_ACL_ATTR
1299 config KERNEL_NFS_V3_ACL_SUPPORT
1300 bool "Enable ACLs for NFSv3"
1302 config KERNEL_NFSD_V2_ACL_SUPPORT
1303 bool "Enable ACLs for NFSDv2"
1305 config KERNEL_NFSD_V3_ACL_SUPPORT
1306 bool "Enable ACLs for NFSDv3"
1308 config KERNEL_REISER_FS_POSIX_ACL
1309 bool "Enable POSIX ACLs for ReiserFS"
1310 select KERNEL_FS_POSIX_ACL
1311 default y if USE_FS_ACL_ATTR
1313 config KERNEL_XFS_POSIX_ACL
1314 bool "Enable POSIX ACLs for XFS"
1315 select KERNEL_FS_POSIX_ACL
1316 default y if USE_FS_ACL_ATTR
1318 config KERNEL_JFS_POSIX_ACL
1319 bool "Enable POSIX ACLs for JFS"
1320 select KERNEL_FS_POSIX_ACL
1321 default y if USE_FS_ACL_ATTR
1325 config KERNEL_DEVMEM
1326 bool "/dev/mem virtual device support"
1328 Say Y here if you want to support the /dev/mem device.
1329 The /dev/mem device is used to access areas of physical
1332 config KERNEL_DEVKMEM
1333 bool "/dev/kmem virtual device support"
1335 Say Y here if you want to support the /dev/kmem device. The
1336 /dev/kmem device is rarely used, but can be used for certain
1337 kind of kernel debugging operations.
1339 config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
1340 int "Number of squashfs fragments cached"
1341 default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
1344 config KERNEL_SQUASHFS_XATTR
1345 bool "Squashfs XATTR support"
1348 # compile optimization setting
1351 prompt "Compiler optimization level"
1352 default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
1354 config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
1355 bool "Optimize for performance"
1357 This is the default optimization level for the kernel, building
1358 with the "-O2" compiler flag for best performance and most
1359 helpful compile-time warnings.
1361 config KERNEL_CC_OPTIMIZE_FOR_SIZE
1362 bool "Optimize for size"
1364 Enabling this option will pass "-Os" instead of "-O2" to
1365 your compiler resulting in a smaller kernel.
1370 bool "Auditing support"
1372 config KERNEL_SECURITY
1373 bool "Enable different security models"
1375 config KERNEL_SECURITY_NETWORK
1376 bool "Socket and Networking Security Hooks"
1377 select KERNEL_SECURITY
1379 config KERNEL_SECURITY_SELINUX
1380 bool "NSA SELinux Support"
1381 select KERNEL_SECURITY_NETWORK
1384 config KERNEL_SECURITY_SELINUX_BOOTPARAM
1385 bool "NSA SELinux boot parameter"
1386 depends on KERNEL_SECURITY_SELINUX
1389 config KERNEL_SECURITY_SELINUX_DISABLE
1390 bool "NSA SELinux runtime disable"
1391 depends on KERNEL_SECURITY_SELINUX
1393 config KERNEL_SECURITY_SELINUX_DEVELOP
1394 bool "NSA SELinux Development Support"
1395 depends on KERNEL_SECURITY_SELINUX
1398 config KERNEL_SECURITY_SELINUX_SIDTAB_HASH_BITS
1400 depends on KERNEL_SECURITY_SELINUX
1403 config KERNEL_SECURITY_SELINUX_SID2STR_CACHE_SIZE
1405 depends on KERNEL_SECURITY_SELINUX
1410 default "lockdown,yama,loadpin,safesetid,integrity,selinux"
1411 depends on KERNEL_SECURITY_SELINUX
1413 config KERNEL_EXT4_FS_SECURITY
1414 bool "Ext4 Security Labels"
1416 config KERNEL_F2FS_FS_SECURITY
1417 bool "F2FS Security Labels"
1419 config KERNEL_UBIFS_FS_SECURITY
1420 bool "UBIFS Security Labels"
1422 config KERNEL_JFFS2_FS_SECURITY
1423 bool "JFFS2 Security Labels"
1425 config KERNEL_WERROR
1426 bool "Compile the kernel with warnings as errors"
1428 A kernel build should not cause any compiler warnings, and this
1429 enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
1430 to enforce that rule by default. Certain warnings from other tools
1431 such as the linker may be upgraded to errors with this option as
1434 However, if you have a new (or very old) compiler or linker with odd
1435 and unusual warnings, or you have some architecture with problems,
1436 you may need to disable this config option in order to
1437 successfully build the kernel.