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