Linux 6.14-rc1
[linux-stable.git] / init / Kconfig
blobd0d021b3fa3b3da5576421b4e1c63baf6c8afc09
1 # SPDX-License-Identifier: GPL-2.0-only
2 config CC_VERSION_TEXT
3         string
4         default "$(CC_VERSION_TEXT)"
5         help
6           This is used in unclear ways:
8           - Re-run Kconfig when the compiler is updated
9             The 'default' property references the environment variable,
10             CC_VERSION_TEXT so it is recorded in include/config/auto.conf.cmd.
11             When the compiler is updated, Kconfig will be invoked.
13           - Ensure full rebuild when the compiler is updated
14             include/linux/compiler-version.h contains this option in the comment
15             line so fixdep adds include/config/CC_VERSION_TEXT into the
16             auto-generated dependency. When the compiler is updated, syncconfig
17             will touch it and then every file will be rebuilt.
19 config CC_IS_GCC
20         def_bool $(success,test "$(cc-name)" = GCC)
22 config GCC_VERSION
23         int
24         default $(cc-version) if CC_IS_GCC
25         default 0
27 config CC_IS_CLANG
28         def_bool $(success,test "$(cc-name)" = Clang)
30 config CLANG_VERSION
31         int
32         default $(cc-version) if CC_IS_CLANG
33         default 0
35 config AS_IS_GNU
36         def_bool $(success,test "$(as-name)" = GNU)
38 config AS_IS_LLVM
39         def_bool $(success,test "$(as-name)" = LLVM)
41 config AS_VERSION
42         int
43         # Use clang version if this is the integrated assembler
44         default CLANG_VERSION if AS_IS_LLVM
45         default $(as-version)
47 config LD_IS_BFD
48         def_bool $(success,test "$(ld-name)" = BFD)
50 config LD_VERSION
51         int
52         default $(ld-version) if LD_IS_BFD
53         default 0
55 config LD_IS_LLD
56         def_bool $(success,test "$(ld-name)" = LLD)
58 config LLD_VERSION
59         int
60         default $(ld-version) if LD_IS_LLD
61         default 0
63 config RUSTC_VERSION
64         int
65         default $(rustc-version)
66         help
67           It does not depend on `RUST` since that one may need to use the version
68           in a `depends on`.
70 config RUST_IS_AVAILABLE
71         def_bool $(success,$(srctree)/scripts/rust_is_available.sh)
72         help
73           This shows whether a suitable Rust toolchain is available (found).
75           Please see Documentation/rust/quick-start.rst for instructions on how
76           to satisfy the build requirements of Rust support.
78           In particular, the Makefile target 'rustavailable' is useful to check
79           why the Rust toolchain is not being detected.
81 config RUSTC_LLVM_VERSION
82         int
83         default $(rustc-llvm-version)
85 config CC_CAN_LINK
86         bool
87         default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag)) if 64BIT
88         default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag))
90 config CC_CAN_LINK_STATIC
91         bool
92         default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag) -static) if 64BIT
93         default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag) -static)
95 # Fixed in GCC 14, 13.3, 12.4 and 11.5
96 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
97 config GCC_ASM_GOTO_OUTPUT_BROKEN
98         bool
99         depends on CC_IS_GCC
100         default y if GCC_VERSION < 110500
101         default y if GCC_VERSION >= 120000 && GCC_VERSION < 120400
102         default y if GCC_VERSION >= 130000 && GCC_VERSION < 130300
104 config CC_HAS_ASM_GOTO_OUTPUT
105         def_bool y
106         depends on !GCC_ASM_GOTO_OUTPUT_BROKEN
107         depends on $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null)
109 config CC_HAS_ASM_GOTO_TIED_OUTPUT
110         depends on CC_HAS_ASM_GOTO_OUTPUT
111         # Detect buggy gcc and clang, fixed in gcc-11 clang-14.
112         def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null)
114 config TOOLS_SUPPORT_RELR
115         def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
117 config CC_HAS_ASM_INLINE
118         def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
120 config CC_HAS_NO_PROFILE_FN_ATTR
121         def_bool $(success,echo '__attribute__((no_profile_instrument_function)) int x();' | $(CC) -x c - -c -o /dev/null -Werror)
123 config CC_HAS_COUNTED_BY
124         # TODO: when gcc 15 is released remove the build test and add
125         # a gcc version check
126         def_bool $(success,echo 'struct flex { int count; int array[] __attribute__((__counted_by__(count))); };' | $(CC) $(CLANG_FLAGS) -x c - -c -o /dev/null -Werror)
127         # clang needs to be at least 19.1.3 to avoid __bdos miscalculations
128         # https://github.com/llvm/llvm-project/pull/110497
129         # https://github.com/llvm/llvm-project/pull/112636
130         depends on !(CC_IS_CLANG && CLANG_VERSION < 190103)
132 config RUSTC_HAS_COERCE_POINTEE
133         def_bool RUSTC_VERSION >= 108400
135 config PAHOLE_VERSION
136         int
137         default $(shell,$(srctree)/scripts/pahole-version.sh $(PAHOLE))
139 config CONSTRUCTORS
140         bool
142 config IRQ_WORK
143         def_bool y if SMP
145 config BUILDTIME_TABLE_SORT
146         bool
148 config THREAD_INFO_IN_TASK
149         bool
150         help
151           Select this to move thread_info off the stack into task_struct.  To
152           make this work, an arch will need to remove all thread_info fields
153           except flags and fix any runtime bugs.
155           One subtle change that will be needed is to use try_get_task_stack()
156           and put_task_stack() in save_thread_stack_tsk() and get_wchan().
158 menu "General setup"
160 config BROKEN
161         bool
163 config BROKEN_ON_SMP
164         bool
165         depends on BROKEN || !SMP
166         default y
168 config INIT_ENV_ARG_LIMIT
169         int
170         default 32 if !UML
171         default 128 if UML
172         help
173           Maximum of each of the number of arguments and environment
174           variables passed to init from the kernel command line.
176 config COMPILE_TEST
177         bool "Compile also drivers which will not load"
178         depends on HAS_IOMEM
179         help
180           Some drivers can be compiled on a different platform than they are
181           intended to be run on. Despite they cannot be loaded there (or even
182           when they load they cannot be used due to missing HW support),
183           developers still, opposing to distributors, might want to build such
184           drivers to compile-test them.
186           If you are a developer and want to build everything available, say Y
187           here. If you are a user/distributor, say N here to exclude useless
188           drivers to be distributed.
190 config WERROR
191         bool "Compile the kernel with warnings as errors"
192         default COMPILE_TEST
193         help
194           A kernel build should not cause any compiler warnings, and this
195           enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
196           to enforce that rule by default. Certain warnings from other tools
197           such as the linker may be upgraded to errors with this option as
198           well.
200           However, if you have a new (or very old) compiler or linker with odd
201           and unusual warnings, or you have some architecture with problems,
202           you may need to disable this config option in order to
203           successfully build the kernel.
205           If in doubt, say Y.
207 config UAPI_HEADER_TEST
208         bool "Compile test UAPI headers"
209         depends on HEADERS_INSTALL && CC_CAN_LINK
210         help
211           Compile test headers exported to user-space to ensure they are
212           self-contained, i.e. compilable as standalone units.
214           If you are a developer or tester and want to ensure the exported
215           headers are self-contained, say Y here. Otherwise, choose N.
217 config LOCALVERSION
218         string "Local version - append to kernel release"
219         help
220           Append an extra string to the end of your kernel version.
221           This will show up when you type uname, for example.
222           The string you set here will be appended after the contents of
223           any files with a filename matching localversion* in your
224           object and source tree, in that order.  Your total string can
225           be a maximum of 64 characters.
227 config LOCALVERSION_AUTO
228         bool "Automatically append version information to the version string"
229         default y
230         depends on !COMPILE_TEST
231         help
232           This will try to automatically determine if the current tree is a
233           release tree by looking for git tags that belong to the current
234           top of tree revision.
236           A string of the format -gxxxxxxxx will be added to the localversion
237           if a git-based tree is found.  The string generated by this will be
238           appended after any matching localversion* files, and after the value
239           set in CONFIG_LOCALVERSION.
241           (The actual string used here is the first 12 characters produced
242           by running the command:
244             $ git rev-parse --verify HEAD
246           which is done within the script "scripts/setlocalversion".)
248 config BUILD_SALT
249         string "Build ID Salt"
250         default ""
251         help
252           The build ID is used to link binaries and their debug info. Setting
253           this option will use the value in the calculation of the build id.
254           This is mostly useful for distributions which want to ensure the
255           build is unique between builds. It's safe to leave the default.
257 config HAVE_KERNEL_GZIP
258         bool
260 config HAVE_KERNEL_BZIP2
261         bool
263 config HAVE_KERNEL_LZMA
264         bool
266 config HAVE_KERNEL_XZ
267         bool
269 config HAVE_KERNEL_LZO
270         bool
272 config HAVE_KERNEL_LZ4
273         bool
275 config HAVE_KERNEL_ZSTD
276         bool
278 config HAVE_KERNEL_UNCOMPRESSED
279         bool
281 choice
282         prompt "Kernel compression mode"
283         default KERNEL_GZIP
284         depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 || HAVE_KERNEL_ZSTD || HAVE_KERNEL_UNCOMPRESSED
285         help
286           The linux kernel is a kind of self-extracting executable.
287           Several compression algorithms are available, which differ
288           in efficiency, compression and decompression speed.
289           Compression speed is only relevant when building a kernel.
290           Decompression speed is relevant at each boot.
292           If you have any problems with bzip2 or lzma compressed
293           kernels, mail me (Alain Knaff) <alain@knaff.lu>. (An older
294           version of this functionality (bzip2 only), for 2.4, was
295           supplied by Christian Ludwig)
297           High compression options are mostly useful for users, who
298           are low on disk space (embedded systems), but for whom ram
299           size matters less.
301           If in doubt, select 'gzip'
303 config KERNEL_GZIP
304         bool "Gzip"
305         depends on HAVE_KERNEL_GZIP
306         help
307           The old and tried gzip compression. It provides a good balance
308           between compression ratio and decompression speed.
310 config KERNEL_BZIP2
311         bool "Bzip2"
312         depends on HAVE_KERNEL_BZIP2
313         help
314           Its compression ratio and speed is intermediate.
315           Decompression speed is slowest among the choices.  The kernel
316           size is about 10% smaller with bzip2, in comparison to gzip.
317           Bzip2 uses a large amount of memory. For modern kernels you
318           will need at least 8MB RAM or more for booting.
320 config KERNEL_LZMA
321         bool "LZMA"
322         depends on HAVE_KERNEL_LZMA
323         help
324           This compression algorithm's ratio is best.  Decompression speed
325           is between gzip and bzip2.  Compression is slowest.
326           The kernel size is about 33% smaller with LZMA in comparison to gzip.
328 config KERNEL_XZ
329         bool "XZ"
330         depends on HAVE_KERNEL_XZ
331         help
332           XZ uses the LZMA2 algorithm and instruction set specific
333           BCJ filters which can improve compression ratio of executable
334           code. The size of the kernel is about 30% smaller with XZ in
335           comparison to gzip. On architectures for which there is a BCJ
336           filter (i386, x86_64, ARM, ARM64, RISC-V, big endian PowerPC,
337           and SPARC), XZ will create a few percent smaller kernel than
338           plain LZMA.
340           The speed is about the same as with LZMA: The decompression
341           speed of XZ is better than that of bzip2 but worse than gzip
342           and LZO. Compression is slow.
344 config KERNEL_LZO
345         bool "LZO"
346         depends on HAVE_KERNEL_LZO
347         help
348           Its compression ratio is the poorest among the choices. The kernel
349           size is about 10% bigger than gzip; however its speed
350           (both compression and decompression) is the fastest.
352 config KERNEL_LZ4
353         bool "LZ4"
354         depends on HAVE_KERNEL_LZ4
355         help
356           LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding.
357           A preliminary version of LZ4 de/compression tool is available at
358           <https://code.google.com/p/lz4/>.
360           Its compression ratio is worse than LZO. The size of the kernel
361           is about 8% bigger than LZO. But the decompression speed is
362           faster than LZO.
364 config KERNEL_ZSTD
365         bool "ZSTD"
366         depends on HAVE_KERNEL_ZSTD
367         help
368           ZSTD is a compression algorithm targeting intermediate compression
369           with fast decompression speed. It will compress better than GZIP and
370           decompress around the same speed as LZO, but slower than LZ4. You
371           will need at least 192 KB RAM or more for booting. The zstd command
372           line tool is required for compression.
374 config KERNEL_UNCOMPRESSED
375         bool "None"
376         depends on HAVE_KERNEL_UNCOMPRESSED
377         help
378           Produce uncompressed kernel image. This option is usually not what
379           you want. It is useful for debugging the kernel in slow simulation
380           environments, where decompressing and moving the kernel is awfully
381           slow. This option allows early boot code to skip the decompressor
382           and jump right at uncompressed kernel image.
384 endchoice
386 config DEFAULT_INIT
387         string "Default init path"
388         default ""
389         help
390           This option determines the default init for the system if no init=
391           option is passed on the kernel command line. If the requested path is
392           not present, we will still then move on to attempting further
393           locations (e.g. /sbin/init, etc). If this is empty, we will just use
394           the fallback list when init= is not passed.
396 config DEFAULT_HOSTNAME
397         string "Default hostname"
398         default "(none)"
399         help
400           This option determines the default system hostname before userspace
401           calls sethostname(2). The kernel traditionally uses "(none)" here,
402           but you may wish to use a different default here to make a minimal
403           system more usable with less configuration.
405 config SYSVIPC
406         bool "System V IPC"
407         help
408           Inter Process Communication is a suite of library functions and
409           system calls which let processes (running programs) synchronize and
410           exchange information. It is generally considered to be a good thing,
411           and some programs won't run unless you say Y here. In particular, if
412           you want to run the DOS emulator dosemu under Linux (read the
413           DOSEMU-HOWTO, available from <http://www.tldp.org/docs.html#howto>),
414           you'll need to say Y here.
416           You can find documentation about IPC with "info ipc" and also in
417           section 6.4 of the Linux Programmer's Guide, available from
418           <http://www.tldp.org/guides.html>.
420 config SYSVIPC_SYSCTL
421         bool
422         depends on SYSVIPC
423         depends on SYSCTL
424         default y
426 config SYSVIPC_COMPAT
427         def_bool y
428         depends on COMPAT && SYSVIPC
430 config POSIX_MQUEUE
431         bool "POSIX Message Queues"
432         depends on NET
433         help
434           POSIX variant of message queues is a part of IPC. In POSIX message
435           queues every message has a priority which decides about succession
436           of receiving it by a process. If you want to compile and run
437           programs written e.g. for Solaris with use of its POSIX message
438           queues (functions mq_*) say Y here.
440           POSIX message queues are visible as a filesystem called 'mqueue'
441           and can be mounted somewhere if you want to do filesystem
442           operations on message queues.
444           If unsure, say Y.
446 config POSIX_MQUEUE_SYSCTL
447         bool
448         depends on POSIX_MQUEUE
449         depends on SYSCTL
450         default y
452 config WATCH_QUEUE
453         bool "General notification queue"
454         default n
455         help
457           This is a general notification queue for the kernel to pass events to
458           userspace by splicing them into pipes.  It can be used in conjunction
459           with watches for key/keyring change notifications and device
460           notifications.
462           See Documentation/core-api/watch_queue.rst
464 config CROSS_MEMORY_ATTACH
465         bool "Enable process_vm_readv/writev syscalls"
466         depends on MMU
467         default y
468         help
469           Enabling this option adds the system calls process_vm_readv and
470           process_vm_writev which allow a process with the correct privileges
471           to directly read from or write to another process' address space.
472           See the man page for more details.
474 config USELIB
475         bool "uselib syscall (for libc5 and earlier)"
476         default ALPHA || M68K || SPARC
477         help
478           This option enables the uselib syscall, a system call used in the
479           dynamic linker from libc5 and earlier.  glibc does not use this
480           system call.  If you intend to run programs built on libc5 or
481           earlier, you may need to enable this syscall.  Current systems
482           running glibc can safely disable this.
484 config AUDIT
485         bool "Auditing support"
486         depends on NET
487         help
488           Enable auditing infrastructure that can be used with another
489           kernel subsystem, such as SELinux (which requires this for
490           logging of avc messages output).  System call auditing is included
491           on architectures which support it.
493 config HAVE_ARCH_AUDITSYSCALL
494         bool
496 config AUDITSYSCALL
497         def_bool y
498         depends on AUDIT && HAVE_ARCH_AUDITSYSCALL
499         select FSNOTIFY
501 source "kernel/irq/Kconfig"
502 source "kernel/time/Kconfig"
503 source "kernel/bpf/Kconfig"
504 source "kernel/Kconfig.preempt"
506 menu "CPU/Task time and stats accounting"
508 config VIRT_CPU_ACCOUNTING
509         bool
511 choice
512         prompt "Cputime accounting"
513         default TICK_CPU_ACCOUNTING
515 # Kind of a stub config for the pure tick based cputime accounting
516 config TICK_CPU_ACCOUNTING
517         bool "Simple tick based cputime accounting"
518         depends on !S390 && !NO_HZ_FULL
519         help
520           This is the basic tick based cputime accounting that maintains
521           statistics about user, system and idle time spent on per jiffies
522           granularity.
524           If unsure, say Y.
526 config VIRT_CPU_ACCOUNTING_NATIVE
527         bool "Deterministic task and CPU time accounting"
528         depends on HAVE_VIRT_CPU_ACCOUNTING && !NO_HZ_FULL
529         select VIRT_CPU_ACCOUNTING
530         help
531           Select this option to enable more accurate task and CPU time
532           accounting.  This is done by reading a CPU counter on each
533           kernel entry and exit and on transitions within the kernel
534           between system, softirq and hardirq state, so there is a
535           small performance impact.  In the case of s390 or IBM POWER > 5,
536           this also enables accounting of stolen time on logically-partitioned
537           systems.
539 config VIRT_CPU_ACCOUNTING_GEN
540         bool "Full dynticks CPU time accounting"
541         depends on HAVE_CONTEXT_TRACKING_USER
542         depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
543         depends on GENERIC_CLOCKEVENTS
544         select VIRT_CPU_ACCOUNTING
545         select CONTEXT_TRACKING_USER
546         help
547           Select this option to enable task and CPU time accounting on full
548           dynticks systems. This accounting is implemented by watching every
549           kernel-user boundaries using the context tracking subsystem.
550           The accounting is thus performed at the expense of some significant
551           overhead.
553           For now this is only useful if you are working on the full
554           dynticks subsystem development.
556           If unsure, say N.
558 endchoice
560 config IRQ_TIME_ACCOUNTING
561         bool "Fine granularity task level IRQ time accounting"
562         depends on HAVE_IRQ_TIME_ACCOUNTING && !VIRT_CPU_ACCOUNTING_NATIVE
563         help
564           Select this option to enable fine granularity task irq time
565           accounting. This is done by reading a timestamp on each
566           transitions between softirq and hardirq state, so there can be a
567           small performance impact.
569           If in doubt, say N here.
571 config HAVE_SCHED_AVG_IRQ
572         def_bool y
573         depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING
574         depends on SMP
576 config SCHED_HW_PRESSURE
577         bool
578         default y if ARM && ARM_CPU_TOPOLOGY
579         default y if ARM64
580         depends on SMP
581         depends on CPU_FREQ_THERMAL
582         help
583           Select this option to enable HW pressure accounting in the
584           scheduler. HW pressure is the value conveyed to the scheduler
585           that reflects the reduction in CPU compute capacity resulted from
586           HW throttling. HW throttling occurs when the performance of
587           a CPU is capped due to high operating temperatures as an example.
589           If selected, the scheduler will be able to balance tasks accordingly,
590           i.e. put less load on throttled CPUs than on non/less throttled ones.
592           This requires the architecture to implement
593           arch_update_hw_pressure() and arch_scale_thermal_pressure().
595 config BSD_PROCESS_ACCT
596         bool "BSD Process Accounting"
597         depends on MULTIUSER
598         help
599           If you say Y here, a user level program will be able to instruct the
600           kernel (via a special system call) to write process accounting
601           information to a file: whenever a process exits, information about
602           that process will be appended to the file by the kernel.  The
603           information includes things such as creation time, owning user,
604           command name, memory usage, controlling terminal etc. (the complete
605           list is in the struct acct in <file:include/linux/acct.h>).  It is
606           up to the user level program to do useful things with this
607           information.  This is generally a good idea, so say Y.
609 config BSD_PROCESS_ACCT_V3
610         bool "BSD Process Accounting version 3 file format"
611         depends on BSD_PROCESS_ACCT
612         default n
613         help
614           If you say Y here, the process accounting information is written
615           in a new file format that also logs the process IDs of each
616           process and its parent. Note that this file format is incompatible
617           with previous v0/v1/v2 file formats, so you will need updated tools
618           for processing it. A preliminary version of these tools is available
619           at <http://www.gnu.org/software/acct/>.
621 config TASKSTATS
622         bool "Export task/process statistics through netlink"
623         depends on NET
624         depends on MULTIUSER
625         default n
626         help
627           Export selected statistics for tasks/processes through the
628           generic netlink interface. Unlike BSD process accounting, the
629           statistics are available during the lifetime of tasks/processes as
630           responses to commands. Like BSD accounting, they are sent to user
631           space on task exit.
633           Say N if unsure.
635 config TASK_DELAY_ACCT
636         bool "Enable per-task delay accounting"
637         depends on TASKSTATS
638         select SCHED_INFO
639         help
640           Collect information on time spent by a task waiting for system
641           resources like cpu, synchronous block I/O completion and swapping
642           in pages. Such statistics can help in setting a task's priorities
643           relative to other tasks for cpu, io, rss limits etc.
645           Say N if unsure.
647 config TASK_XACCT
648         bool "Enable extended accounting over taskstats"
649         depends on TASKSTATS
650         help
651           Collect extended task accounting data and send the data
652           to userland for processing over the taskstats interface.
654           Say N if unsure.
656 config TASK_IO_ACCOUNTING
657         bool "Enable per-task storage I/O accounting"
658         depends on TASK_XACCT
659         help
660           Collect information on the number of bytes of storage I/O which this
661           task has caused.
663           Say N if unsure.
665 config PSI
666         bool "Pressure stall information tracking"
667         select KERNFS
668         help
669           Collect metrics that indicate how overcommitted the CPU, memory,
670           and IO capacity are in the system.
672           If you say Y here, the kernel will create /proc/pressure/ with the
673           pressure statistics files cpu, memory, and io. These will indicate
674           the share of walltime in which some or all tasks in the system are
675           delayed due to contention of the respective resource.
677           In kernels with cgroup support, cgroups (cgroup2 only) will
678           have cpu.pressure, memory.pressure, and io.pressure files,
679           which aggregate pressure stalls for the grouped tasks only.
681           For more details see Documentation/accounting/psi.rst.
683           Say N if unsure.
685 config PSI_DEFAULT_DISABLED
686         bool "Require boot parameter to enable pressure stall information tracking"
687         default n
688         depends on PSI
689         help
690           If set, pressure stall information tracking will be disabled
691           per default but can be enabled through passing psi=1 on the
692           kernel commandline during boot.
694           This feature adds some code to the task wakeup and sleep
695           paths of the scheduler. The overhead is too low to affect
696           common scheduling-intense workloads in practice (such as
697           webservers, memcache), but it does show up in artificial
698           scheduler stress tests, such as hackbench.
700           If you are paranoid and not sure what the kernel will be
701           used for, say Y.
703           Say N if unsure.
705 endmenu # "CPU/Task time and stats accounting"
707 config CPU_ISOLATION
708         bool "CPU isolation"
709         depends on SMP || COMPILE_TEST
710         default y
711         help
712           Make sure that CPUs running critical tasks are not disturbed by
713           any source of "noise" such as unbound workqueues, timers, kthreads...
714           Unbound jobs get offloaded to housekeeping CPUs. This is driven by
715           the "isolcpus=" boot parameter.
717           Say Y if unsure.
719 source "kernel/rcu/Kconfig"
721 config IKCONFIG
722         tristate "Kernel .config support"
723         help
724           This option enables the complete Linux kernel ".config" file
725           contents to be saved in the kernel. It provides documentation
726           of which kernel options are used in a running kernel or in an
727           on-disk kernel.  This information can be extracted from the kernel
728           image file with the script scripts/extract-ikconfig and used as
729           input to rebuild the current kernel or to build another kernel.
730           It can also be extracted from a running kernel by reading
731           /proc/config.gz if enabled (below).
733 config IKCONFIG_PROC
734         bool "Enable access to .config through /proc/config.gz"
735         depends on IKCONFIG && PROC_FS
736         help
737           This option enables access to the kernel configuration file
738           through /proc/config.gz.
740 config IKHEADERS
741         tristate "Enable kernel headers through /sys/kernel/kheaders.tar.xz"
742         depends on SYSFS
743         help
744           This option enables access to the in-kernel headers that are generated during
745           the build process. These can be used to build eBPF tracing programs,
746           or similar programs.  If you build the headers as a module, a module called
747           kheaders.ko is built which can be loaded on-demand to get access to headers.
749 config LOG_BUF_SHIFT
750         int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
751         range 12 25
752         default 17
753         depends on PRINTK
754         help
755           Select the minimal kernel log buffer size as a power of 2.
756           The final size is affected by LOG_CPU_MAX_BUF_SHIFT config
757           parameter, see below. Any higher size also might be forced
758           by "log_buf_len" boot parameter.
760           Examples:
761                      17 => 128 KB
762                      16 => 64 KB
763                      15 => 32 KB
764                      14 => 16 KB
765                      13 =>  8 KB
766                      12 =>  4 KB
768 config LOG_CPU_MAX_BUF_SHIFT
769         int "CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB)"
770         depends on SMP
771         range 0 21
772         default 0 if BASE_SMALL
773         default 12
774         depends on PRINTK
775         help
776           This option allows to increase the default ring buffer size
777           according to the number of CPUs. The value defines the contribution
778           of each CPU as a power of 2. The used space is typically only few
779           lines however it might be much more when problems are reported,
780           e.g. backtraces.
782           The increased size means that a new buffer has to be allocated and
783           the original static one is unused. It makes sense only on systems
784           with more CPUs. Therefore this value is used only when the sum of
785           contributions is greater than the half of the default kernel ring
786           buffer as defined by LOG_BUF_SHIFT. The default values are set
787           so that more than 16 CPUs are needed to trigger the allocation.
789           Also this option is ignored when "log_buf_len" kernel parameter is
790           used as it forces an exact (power of two) size of the ring buffer.
792           The number of possible CPUs is used for this computation ignoring
793           hotplugging making the computation optimal for the worst case
794           scenario while allowing a simple algorithm to be used from bootup.
796           Examples shift values and their meaning:
797                      17 => 128 KB for each CPU
798                      16 =>  64 KB for each CPU
799                      15 =>  32 KB for each CPU
800                      14 =>  16 KB for each CPU
801                      13 =>   8 KB for each CPU
802                      12 =>   4 KB for each CPU
804 config PRINTK_INDEX
805         bool "Printk indexing debugfs interface"
806         depends on PRINTK && DEBUG_FS
807         help
808           Add support for indexing of all printk formats known at compile time
809           at <debugfs>/printk/index/<module>.
811           This can be used as part of maintaining daemons which monitor
812           /dev/kmsg, as it permits auditing the printk formats present in a
813           kernel, allowing detection of cases where monitored printks are
814           changed or no longer present.
816           There is no additional runtime cost to printk with this enabled.
819 # Architectures with an unreliable sched_clock() should select this:
821 config HAVE_UNSTABLE_SCHED_CLOCK
822         bool
824 config GENERIC_SCHED_CLOCK
825         bool
827 menu "Scheduler features"
829 config UCLAMP_TASK
830         bool "Enable utilization clamping for RT/FAIR tasks"
831         depends on CPU_FREQ_GOV_SCHEDUTIL
832         help
833           This feature enables the scheduler to track the clamped utilization
834           of each CPU based on RUNNABLE tasks scheduled on that CPU.
836           With this option, the user can specify the min and max CPU
837           utilization allowed for RUNNABLE tasks. The max utilization defines
838           the maximum frequency a task should use while the min utilization
839           defines the minimum frequency it should use.
841           Both min and max utilization clamp values are hints to the scheduler,
842           aiming at improving its frequency selection policy, but they do not
843           enforce or grant any specific bandwidth for tasks.
845           If in doubt, say N.
847 config UCLAMP_BUCKETS_COUNT
848         int "Number of supported utilization clamp buckets"
849         range 5 20
850         default 5
851         depends on UCLAMP_TASK
852         help
853           Defines the number of clamp buckets to use. The range of each bucket
854           will be SCHED_CAPACITY_SCALE/UCLAMP_BUCKETS_COUNT. The higher the
855           number of clamp buckets the finer their granularity and the higher
856           the precision of clamping aggregation and tracking at run-time.
858           For example, with the minimum configuration value we will have 5
859           clamp buckets tracking 20% utilization each. A 25% boosted tasks will
860           be refcounted in the [20..39]% bucket and will set the bucket clamp
861           effective value to 25%.
862           If a second 30% boosted task should be co-scheduled on the same CPU,
863           that task will be refcounted in the same bucket of the first task and
864           it will boost the bucket clamp effective value to 30%.
865           The clamp effective value of a bucket is reset to its nominal value
866           (20% in the example above) when there are no more tasks refcounted in
867           that bucket.
869           An additional boost/capping margin can be added to some tasks. In the
870           example above the 25% task will be boosted to 30% until it exits the
871           CPU. If that should be considered not acceptable on certain systems,
872           it's always possible to reduce the margin by increasing the number of
873           clamp buckets to trade off used memory for run-time tracking
874           precision.
876           If in doubt, use the default value.
878 endmenu
881 # For architectures that want to enable the support for NUMA-affine scheduler
882 # balancing logic:
884 config ARCH_SUPPORTS_NUMA_BALANCING
885         bool
888 # For architectures that prefer to flush all TLBs after a number of pages
889 # are unmapped instead of sending one IPI per page to flush. The architecture
890 # must provide guarantees on what happens if a clean TLB cache entry is
891 # written after the unmap. Details are in mm/rmap.c near the check for
892 # should_defer_flush. The architecture should also consider if the full flush
893 # and the refill costs are offset by the savings of sending fewer IPIs.
894 config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
895         bool
897 config CC_HAS_INT128
898         def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
900 config CC_IMPLICIT_FALLTHROUGH
901         string
902         default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
903         default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
905 # Currently, disable gcc-10+ array-bounds globally.
906 # It's still broken in gcc-13, so no upper bound yet.
907 config GCC10_NO_ARRAY_BOUNDS
908         def_bool y
910 config CC_NO_ARRAY_BOUNDS
911         bool
912         default y if CC_IS_GCC && GCC_VERSION >= 90000 && GCC10_NO_ARRAY_BOUNDS
914 # Currently, disable -Wstringop-overflow for GCC globally.
915 config GCC_NO_STRINGOP_OVERFLOW
916         def_bool y
918 config CC_NO_STRINGOP_OVERFLOW
919         bool
920         default y if CC_IS_GCC && GCC_NO_STRINGOP_OVERFLOW
922 config CC_STRINGOP_OVERFLOW
923         bool
924         default y if CC_IS_GCC && !CC_NO_STRINGOP_OVERFLOW
927 # For architectures that know their GCC __int128 support is sound
929 config ARCH_SUPPORTS_INT128
930         bool
932 # For architectures that (ab)use NUMA to represent different memory regions
933 # all cpu-local but of different latencies, such as SuperH.
935 config ARCH_WANT_NUMA_VARIABLE_LOCALITY
936         bool
938 config NUMA_BALANCING
939         bool "Memory placement aware NUMA scheduler"
940         depends on ARCH_SUPPORTS_NUMA_BALANCING
941         depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY
942         depends on SMP && NUMA && MIGRATION && !PREEMPT_RT
943         help
944           This option adds support for automatic NUMA aware memory/task placement.
945           The mechanism is quite primitive and is based on migrating memory when
946           it has references to the node the task is running on.
948           This system will be inactive on UMA systems.
950 config NUMA_BALANCING_DEFAULT_ENABLED
951         bool "Automatically enable NUMA aware memory/task placement"
952         default y
953         depends on NUMA_BALANCING
954         help
955           If set, automatic NUMA balancing will be enabled if running on a NUMA
956           machine.
958 config SLAB_OBJ_EXT
959         bool
961 menuconfig CGROUPS
962         bool "Control Group support"
963         select KERNFS
964         help
965           This option adds support for grouping sets of processes together, for
966           use with process control subsystems such as Cpusets, CFS, memory
967           controls or device isolation.
968           See
969                 - Documentation/scheduler/sched-design-CFS.rst  (CFS)
970                 - Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation
971                                           and resource control)
973           Say N if unsure.
975 if CGROUPS
977 config PAGE_COUNTER
978         bool
980 config CGROUP_FAVOR_DYNMODS
981         bool "Favor dynamic modification latency reduction by default"
982         help
983           This option enables the "favordynmods" mount option by default
984           which reduces the latencies of dynamic cgroup modifications such
985           as task migrations and controller on/offs at the cost of making
986           hot path operations such as forks and exits more expensive.
988           Say N if unsure.
990 config MEMCG
991         bool "Memory controller"
992         select PAGE_COUNTER
993         select EVENTFD
994         select SLAB_OBJ_EXT
995         help
996           Provides control over the memory footprint of tasks in a cgroup.
998 config MEMCG_V1
999         bool "Legacy cgroup v1 memory controller"
1000         depends on MEMCG
1001         default n
1002         help
1003           Legacy cgroup v1 memory controller which has been deprecated by
1004           cgroup v2 implementation. The v1 is there for legacy applications
1005           which haven't migrated to the new cgroup v2 interface yet. If you
1006           do not have any such application then you are completely fine leaving
1007           this option disabled.
1009           Please note that feature set of the legacy memory controller is likely
1010           going to shrink due to deprecation process. New deployments with v1
1011           controller are highly discouraged.
1013           Say N if unsure.
1015 config BLK_CGROUP
1016         bool "IO controller"
1017         depends on BLOCK
1018         default n
1019         help
1020         Generic block IO controller cgroup interface. This is the common
1021         cgroup interface which should be used by various IO controlling
1022         policies.
1024         Currently, CFQ IO scheduler uses it to recognize task groups and
1025         control disk bandwidth allocation (proportional time slice allocation)
1026         to such task groups. It is also used by bio throttling logic in
1027         block layer to implement upper limit in IO rates on a device.
1029         This option only enables generic Block IO controller infrastructure.
1030         One needs to also enable actual IO controlling logic/policy. For
1031         enabling proportional weight division of disk bandwidth in CFQ, set
1032         CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
1033         CONFIG_BLK_DEV_THROTTLING=y.
1035         See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
1037 config CGROUP_WRITEBACK
1038         bool
1039         depends on MEMCG && BLK_CGROUP
1040         default y
1042 menuconfig CGROUP_SCHED
1043         bool "CPU controller"
1044         default n
1045         help
1046           This feature lets CPU scheduler recognize task groups and control CPU
1047           bandwidth allocation to such task groups. It uses cgroups to group
1048           tasks.
1050 if CGROUP_SCHED
1051 config GROUP_SCHED_WEIGHT
1052         def_bool n
1054 config FAIR_GROUP_SCHED
1055         bool "Group scheduling for SCHED_OTHER"
1056         depends on CGROUP_SCHED
1057         select GROUP_SCHED_WEIGHT
1058         default CGROUP_SCHED
1060 config CFS_BANDWIDTH
1061         bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
1062         depends on FAIR_GROUP_SCHED
1063         default n
1064         help
1065           This option allows users to define CPU bandwidth rates (limits) for
1066           tasks running within the fair group scheduler.  Groups with no limit
1067           set are considered to be unconstrained and will run with no
1068           restriction.
1069           See Documentation/scheduler/sched-bwc.rst for more information.
1071 config RT_GROUP_SCHED
1072         bool "Group scheduling for SCHED_RR/FIFO"
1073         depends on CGROUP_SCHED
1074         default n
1075         help
1076           This feature lets you explicitly allocate real CPU bandwidth
1077           to task groups. If enabled, it will also make it impossible to
1078           schedule realtime tasks for non-root users until you allocate
1079           realtime bandwidth for them.
1080           See Documentation/scheduler/sched-rt-group.rst for more information.
1082 config EXT_GROUP_SCHED
1083         bool
1084         depends on SCHED_CLASS_EXT && CGROUP_SCHED
1085         select GROUP_SCHED_WEIGHT
1086         default y
1088 endif #CGROUP_SCHED
1090 config SCHED_MM_CID
1091         def_bool y
1092         depends on SMP && RSEQ
1094 config UCLAMP_TASK_GROUP
1095         bool "Utilization clamping per group of tasks"
1096         depends on CGROUP_SCHED
1097         depends on UCLAMP_TASK
1098         default n
1099         help
1100           This feature enables the scheduler to track the clamped utilization
1101           of each CPU based on RUNNABLE tasks currently scheduled on that CPU.
1103           When this option is enabled, the user can specify a min and max
1104           CPU bandwidth which is allowed for each single task in a group.
1105           The max bandwidth allows to clamp the maximum frequency a task
1106           can use, while the min bandwidth allows to define a minimum
1107           frequency a task will always use.
1109           When task group based utilization clamping is enabled, an eventually
1110           specified task-specific clamp value is constrained by the cgroup
1111           specified clamp value. Both minimum and maximum task clamping cannot
1112           be bigger than the corresponding clamping defined at task group level.
1114           If in doubt, say N.
1116 config CGROUP_PIDS
1117         bool "PIDs controller"
1118         help
1119           Provides enforcement of process number limits in the scope of a
1120           cgroup. Any attempt to fork more processes than is allowed in the
1121           cgroup will fail. PIDs are fundamentally a global resource because it
1122           is fairly trivial to reach PID exhaustion before you reach even a
1123           conservative kmemcg limit. As a result, it is possible to grind a
1124           system to halt without being limited by other cgroup policies. The
1125           PIDs controller is designed to stop this from happening.
1127           It should be noted that organisational operations (such as attaching
1128           to a cgroup hierarchy) will *not* be blocked by the PIDs controller,
1129           since the PIDs limit only affects a process's ability to fork, not to
1130           attach to a cgroup.
1132 config CGROUP_RDMA
1133         bool "RDMA controller"
1134         help
1135           Provides enforcement of RDMA resources defined by IB stack.
1136           It is fairly easy for consumers to exhaust RDMA resources, which
1137           can result into resource unavailability to other consumers.
1138           RDMA controller is designed to stop this from happening.
1139           Attaching processes with active RDMA resources to the cgroup
1140           hierarchy is allowed even if can cross the hierarchy's limit.
1142 config CGROUP_DMEM
1143         bool "Device memory controller (DMEM)"
1144         select PAGE_COUNTER
1145         help
1146           The DMEM controller allows compatible devices to restrict device
1147           memory usage based on the cgroup hierarchy.
1149           As an example, it allows you to restrict VRAM usage for applications
1150           in the DRM subsystem.
1152 config CGROUP_FREEZER
1153         bool "Freezer controller"
1154         help
1155           Provides a way to freeze and unfreeze all tasks in a
1156           cgroup.
1158           This option affects the ORIGINAL cgroup interface. The cgroup2 memory
1159           controller includes important in-kernel memory consumers per default.
1161           If you're using cgroup2, say N.
1163 config CGROUP_HUGETLB
1164         bool "HugeTLB controller"
1165         depends on HUGETLB_PAGE
1166         select PAGE_COUNTER
1167         default n
1168         help
1169           Provides a cgroup controller for HugeTLB pages.
1170           When you enable this, you can put a per cgroup limit on HugeTLB usage.
1171           The limit is enforced during page fault. Since HugeTLB doesn't
1172           support page reclaim, enforcing the limit at page fault time implies
1173           that, the application will get SIGBUS signal if it tries to access
1174           HugeTLB pages beyond its limit. This requires the application to know
1175           beforehand how much HugeTLB pages it would require for its use. The
1176           control group is tracked in the third page lru pointer. This means
1177           that we cannot use the controller with huge page less than 3 pages.
1179 config CPUSETS
1180         bool "Cpuset controller"
1181         depends on SMP
1182         select UNION_FIND
1183         help
1184           This option will let you create and manage CPUSETs which
1185           allow dynamically partitioning a system into sets of CPUs and
1186           Memory Nodes and assigning tasks to run only within those sets.
1187           This is primarily useful on large SMP or NUMA systems.
1189           Say N if unsure.
1191 config CPUSETS_V1
1192         bool "Legacy cgroup v1 cpusets controller"
1193         depends on CPUSETS
1194         default n
1195         help
1196           Legacy cgroup v1 cpusets controller which has been deprecated by
1197           cgroup v2 implementation. The v1 is there for legacy applications
1198           which haven't migrated to the new cgroup v2 interface yet. If you
1199           do not have any such application then you are completely fine leaving
1200           this option disabled.
1202           Say N if unsure.
1204 config PROC_PID_CPUSET
1205         bool "Include legacy /proc/<pid>/cpuset file"
1206         depends on CPUSETS
1207         default y
1209 config CGROUP_DEVICE
1210         bool "Device controller"
1211         help
1212           Provides a cgroup controller implementing whitelists for
1213           devices which a process in the cgroup can mknod or open.
1215 config CGROUP_CPUACCT
1216         bool "Simple CPU accounting controller"
1217         help
1218           Provides a simple controller for monitoring the
1219           total CPU consumed by the tasks in a cgroup.
1221 config CGROUP_PERF
1222         bool "Perf controller"
1223         depends on PERF_EVENTS
1224         help
1225           This option extends the perf per-cpu mode to restrict monitoring
1226           to threads which belong to the cgroup specified and run on the
1227           designated cpu.  Or this can be used to have cgroup ID in samples
1228           so that it can monitor performance events among cgroups.
1230           Say N if unsure.
1232 config CGROUP_BPF
1233         bool "Support for eBPF programs attached to cgroups"
1234         depends on BPF_SYSCALL
1235         select SOCK_CGROUP_DATA
1236         help
1237           Allow attaching eBPF programs to a cgroup using the bpf(2)
1238           syscall command BPF_PROG_ATTACH.
1240           In which context these programs are accessed depends on the type
1241           of attachment. For instance, programs that are attached using
1242           BPF_CGROUP_INET_INGRESS will be executed on the ingress path of
1243           inet sockets.
1245 config CGROUP_MISC
1246         bool "Misc resource controller"
1247         default n
1248         help
1249           Provides a controller for miscellaneous resources on a host.
1251           Miscellaneous scalar resources are the resources on the host system
1252           which cannot be abstracted like the other cgroups. This controller
1253           tracks and limits the miscellaneous resources used by a process
1254           attached to a cgroup hierarchy.
1256           For more information, please check misc cgroup section in
1257           /Documentation/admin-guide/cgroup-v2.rst.
1259 config CGROUP_DEBUG
1260         bool "Debug controller"
1261         default n
1262         depends on DEBUG_KERNEL
1263         help
1264           This option enables a simple controller that exports
1265           debugging information about the cgroups framework. This
1266           controller is for control cgroup debugging only. Its
1267           interfaces are not stable.
1269           Say N.
1271 config SOCK_CGROUP_DATA
1272         bool
1273         default n
1275 endif # CGROUPS
1277 menuconfig NAMESPACES
1278         bool "Namespaces support" if EXPERT
1279         depends on MULTIUSER
1280         default !EXPERT
1281         help
1282           Provides the way to make tasks work with different objects using
1283           the same id. For example same IPC id may refer to different objects
1284           or same user id or pid may refer to different tasks when used in
1285           different namespaces.
1287 if NAMESPACES
1289 config UTS_NS
1290         bool "UTS namespace"
1291         default y
1292         help
1293           In this namespace tasks see different info provided with the
1294           uname() system call
1296 config TIME_NS
1297         bool "TIME namespace"
1298         depends on GENERIC_VDSO_TIME_NS
1299         default y
1300         help
1301           In this namespace boottime and monotonic clocks can be set.
1302           The time will keep going with the same pace.
1304 config IPC_NS
1305         bool "IPC namespace"
1306         depends on (SYSVIPC || POSIX_MQUEUE)
1307         default y
1308         help
1309           In this namespace tasks work with IPC ids which correspond to
1310           different IPC objects in different namespaces.
1312 config USER_NS
1313         bool "User namespace"
1314         default n
1315         help
1316           This allows containers, i.e. vservers, to use user namespaces
1317           to provide different user info for different servers.
1319           When user namespaces are enabled in the kernel it is
1320           recommended that the MEMCG option also be enabled and that
1321           user-space use the memory control groups to limit the amount
1322           of memory a memory unprivileged users can use.
1324           If unsure, say N.
1326 config PID_NS
1327         bool "PID Namespaces"
1328         default y
1329         help
1330           Support process id namespaces.  This allows having multiple
1331           processes with the same pid as long as they are in different
1332           pid namespaces.  This is a building block of containers.
1334 config NET_NS
1335         bool "Network namespace"
1336         depends on NET
1337         default y
1338         help
1339           Allow user space to create what appear to be multiple instances
1340           of the network stack.
1342 endif # NAMESPACES
1344 config CHECKPOINT_RESTORE
1345         bool "Checkpoint/restore support"
1346         depends on PROC_FS
1347         select PROC_CHILDREN
1348         select KCMP
1349         default n
1350         help
1351           Enables additional kernel features in a sake of checkpoint/restore.
1352           In particular it adds auxiliary prctl codes to setup process text,
1353           data and heap segment sizes, and a few additional /proc filesystem
1354           entries.
1356           If unsure, say N here.
1358 config SCHED_AUTOGROUP
1359         bool "Automatic process group scheduling"
1360         select CGROUPS
1361         select CGROUP_SCHED
1362         select FAIR_GROUP_SCHED
1363         help
1364           This option optimizes the scheduler for common desktop workloads by
1365           automatically creating and populating task groups.  This separation
1366           of workloads isolates aggressive CPU burners (like build jobs) from
1367           desktop applications.  Task group autogeneration is currently based
1368           upon task session.
1370 config RELAY
1371         bool "Kernel->user space relay support (formerly relayfs)"
1372         select IRQ_WORK
1373         help
1374           This option enables support for relay interface support in
1375           certain file systems (such as debugfs).
1376           It is designed to provide an efficient mechanism for tools and
1377           facilities to relay large amounts of data from kernel space to
1378           user space.
1380           If unsure, say N.
1382 config BLK_DEV_INITRD
1383         bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
1384         help
1385           The initial RAM filesystem is a ramfs which is loaded by the
1386           boot loader (loadlin or lilo) and that is mounted as root
1387           before the normal boot procedure. It is typically used to
1388           load modules needed to mount the "real" root file system,
1389           etc. See <file:Documentation/admin-guide/initrd.rst> for details.
1391           If RAM disk support (BLK_DEV_RAM) is also included, this
1392           also enables initial RAM disk (initrd) support and adds
1393           15 Kbytes (more on some other architectures) to the kernel size.
1395           If unsure say Y.
1397 if BLK_DEV_INITRD
1399 source "usr/Kconfig"
1401 endif
1403 config BOOT_CONFIG
1404         bool "Boot config support"
1405         select BLK_DEV_INITRD if !BOOT_CONFIG_EMBED
1406         help
1407           Extra boot config allows system admin to pass a config file as
1408           complemental extension of kernel cmdline when booting.
1409           The boot config file must be attached at the end of initramfs
1410           with checksum, size and magic word.
1411           See <file:Documentation/admin-guide/bootconfig.rst> for details.
1413           If unsure, say Y.
1415 config BOOT_CONFIG_FORCE
1416         bool "Force unconditional bootconfig processing"
1417         depends on BOOT_CONFIG
1418         default y if BOOT_CONFIG_EMBED
1419         help
1420           With this Kconfig option set, BOOT_CONFIG processing is carried
1421           out even when the "bootconfig" kernel-boot parameter is omitted.
1422           In fact, with this Kconfig option set, there is no way to
1423           make the kernel ignore the BOOT_CONFIG-supplied kernel-boot
1424           parameters.
1426           If unsure, say N.
1428 config BOOT_CONFIG_EMBED
1429         bool "Embed bootconfig file in the kernel"
1430         depends on BOOT_CONFIG
1431         help
1432           Embed a bootconfig file given by BOOT_CONFIG_EMBED_FILE in the
1433           kernel. Usually, the bootconfig file is loaded with the initrd
1434           image. But if the system doesn't support initrd, this option will
1435           help you by embedding a bootconfig file while building the kernel.
1437           If unsure, say N.
1439 config BOOT_CONFIG_EMBED_FILE
1440         string "Embedded bootconfig file path"
1441         depends on BOOT_CONFIG_EMBED
1442         help
1443           Specify a bootconfig file which will be embedded to the kernel.
1444           This bootconfig will be used if there is no initrd or no other
1445           bootconfig in the initrd.
1447 config INITRAMFS_PRESERVE_MTIME
1448         bool "Preserve cpio archive mtimes in initramfs"
1449         default y
1450         help
1451           Each entry in an initramfs cpio archive carries an mtime value. When
1452           enabled, extracted cpio items take this mtime, with directory mtime
1453           setting deferred until after creation of any child entries.
1455           If unsure, say Y.
1457 choice
1458         prompt "Compiler optimization level"
1459         default CC_OPTIMIZE_FOR_PERFORMANCE
1461 config CC_OPTIMIZE_FOR_PERFORMANCE
1462         bool "Optimize for performance (-O2)"
1463         help
1464           This is the default optimization level for the kernel, building
1465           with the "-O2" compiler flag for best performance and most
1466           helpful compile-time warnings.
1468 config CC_OPTIMIZE_FOR_SIZE
1469         bool "Optimize for size (-Os)"
1470         help
1471           Choosing this option will pass "-Os" to your compiler resulting
1472           in a smaller kernel.
1474 endchoice
1476 config HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1477         bool
1478         help
1479           This requires that the arch annotates or otherwise protects
1480           its external entry points from being discarded. Linker scripts
1481           must also merge .text.*, .data.*, and .bss.* correctly into
1482           output sections. Care must be taken not to pull in unrelated
1483           sections (e.g., '.text.init'). Typically '.' in section names
1484           is used to distinguish them from label names / C identifiers.
1486 config LD_DEAD_CODE_DATA_ELIMINATION
1487         bool "Dead code and data elimination (EXPERIMENTAL)"
1488         depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1489         depends on EXPERT
1490         depends on $(cc-option,-ffunction-sections -fdata-sections)
1491         depends on $(ld-option,--gc-sections)
1492         help
1493           Enable this if you want to do dead code and data elimination with
1494           the linker by compiling with -ffunction-sections -fdata-sections,
1495           and linking with --gc-sections.
1497           This can reduce on disk and in-memory size of the kernel
1498           code and static data, particularly for small configs and
1499           on small systems. This has the possibility of introducing
1500           silently broken kernel if the required annotations are not
1501           present. This option is not well tested yet, so use at your
1502           own risk.
1504 config LD_ORPHAN_WARN
1505         def_bool y
1506         depends on ARCH_WANT_LD_ORPHAN_WARN
1507         depends on $(ld-option,--orphan-handling=warn)
1508         depends on $(ld-option,--orphan-handling=error)
1510 config LD_ORPHAN_WARN_LEVEL
1511         string
1512         depends on LD_ORPHAN_WARN
1513         default "error" if WERROR
1514         default "warn"
1516 config SYSCTL
1517         bool
1519 config HAVE_UID16
1520         bool
1522 config SYSCTL_EXCEPTION_TRACE
1523         bool
1524         help
1525           Enable support for /proc/sys/debug/exception-trace.
1527 config SYSCTL_ARCH_UNALIGN_NO_WARN
1528         bool
1529         help
1530           Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
1531           Allows arch to define/use @no_unaligned_warning to possibly warn
1532           about unaligned access emulation going on under the hood.
1534 config SYSCTL_ARCH_UNALIGN_ALLOW
1535         bool
1536         help
1537           Enable support for /proc/sys/kernel/unaligned-trap
1538           Allows arches to define/use @unaligned_enabled to runtime toggle
1539           the unaligned access emulation.
1540           see arch/parisc/kernel/unaligned.c for reference
1542 config HAVE_PCSPKR_PLATFORM
1543         bool
1545 menuconfig EXPERT
1546         bool "Configure standard kernel features (expert users)"
1547         # Unhide debug options, to make the on-by-default options visible
1548         select DEBUG_KERNEL
1549         help
1550           This option allows certain base kernel options and settings
1551           to be disabled or tweaked. This is for specialized
1552           environments which can tolerate a "non-standard" kernel.
1553           Only use this if you really know what you are doing.
1555 config UID16
1556         bool "Enable 16-bit UID system calls" if EXPERT
1557         depends on HAVE_UID16 && MULTIUSER
1558         default y
1559         help
1560           This enables the legacy 16-bit UID syscall wrappers.
1562 config MULTIUSER
1563         bool "Multiple users, groups and capabilities support" if EXPERT
1564         default y
1565         help
1566           This option enables support for non-root users, groups and
1567           capabilities.
1569           If you say N here, all processes will run with UID 0, GID 0, and all
1570           possible capabilities.  Saying N here also compiles out support for
1571           system calls related to UIDs, GIDs, and capabilities, such as setuid,
1572           setgid, and capset.
1574           If unsure, say Y here.
1576 config SGETMASK_SYSCALL
1577         bool "sgetmask/ssetmask syscalls support" if EXPERT
1578         default PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
1579         help
1580           sys_sgetmask and sys_ssetmask are obsolete system calls
1581           no longer supported in libc but still enabled by default in some
1582           architectures.
1584           If unsure, leave the default option here.
1586 config SYSFS_SYSCALL
1587         bool "Sysfs syscall support" if EXPERT
1588         default y
1589         help
1590           sys_sysfs is an obsolete system call no longer supported in libc.
1591           Note that disabling this option is more secure but might break
1592           compatibility with some systems.
1594           If unsure say Y here.
1596 config FHANDLE
1597         bool "open by fhandle syscalls" if EXPERT
1598         select EXPORTFS
1599         default y
1600         help
1601           If you say Y here, a user level program will be able to map
1602           file names to handle and then later use the handle for
1603           different file system operations. This is useful in implementing
1604           userspace file servers, which now track files using handles instead
1605           of names. The handle would remain the same even if file names
1606           get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2)
1607           syscalls.
1609 config POSIX_TIMERS
1610         bool "Posix Clocks & timers" if EXPERT
1611         default y
1612         help
1613           This includes native support for POSIX timers to the kernel.
1614           Some embedded systems have no use for them and therefore they
1615           can be configured out to reduce the size of the kernel image.
1617           When this option is disabled, the following syscalls won't be
1618           available: timer_create, timer_gettime: timer_getoverrun,
1619           timer_settime, timer_delete, clock_adjtime, getitimer,
1620           setitimer, alarm. Furthermore, the clock_settime, clock_gettime,
1621           clock_getres and clock_nanosleep syscalls will be limited to
1622           CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_BOOTTIME only.
1624           If unsure say y.
1626 config PRINTK
1627         default y
1628         bool "Enable support for printk" if EXPERT
1629         select IRQ_WORK
1630         help
1631           This option enables normal printk support. Removing it
1632           eliminates most of the message strings from the kernel image
1633           and makes the kernel more or less silent. As this makes it
1634           very difficult to diagnose system problems, saying N here is
1635           strongly discouraged.
1637 config BUG
1638         bool "BUG() support" if EXPERT
1639         default y
1640         help
1641           Disabling this option eliminates support for BUG and WARN, reducing
1642           the size of your kernel image and potentially quietly ignoring
1643           numerous fatal conditions. You should only consider disabling this
1644           option for embedded systems with no facilities for reporting errors.
1645           Just say Y.
1647 config ELF_CORE
1648         depends on COREDUMP
1649         default y
1650         bool "Enable ELF core dumps" if EXPERT
1651         help
1652           Enable support for generating core dumps. Disabling saves about 4k.
1655 config PCSPKR_PLATFORM
1656         bool "Enable PC-Speaker support" if EXPERT
1657         depends on HAVE_PCSPKR_PLATFORM
1658         select I8253_LOCK
1659         default y
1660         help
1661           This option allows to disable the internal PC-Speaker
1662           support, saving some memory.
1664 config BASE_SMALL
1665         bool "Enable smaller-sized data structures for core" if EXPERT
1666         help
1667           Enabling this option reduces the size of miscellaneous core
1668           kernel data structures. This saves memory on small machines,
1669           but may reduce performance.
1671 config FUTEX
1672         bool "Enable futex support" if EXPERT
1673         depends on !(SPARC32 && SMP)
1674         default y
1675         imply RT_MUTEXES
1676         help
1677           Disabling this option will cause the kernel to be built without
1678           support for "fast userspace mutexes".  The resulting kernel may not
1679           run glibc-based applications correctly.
1681 config FUTEX_PI
1682         bool
1683         depends on FUTEX && RT_MUTEXES
1684         default y
1686 config EPOLL
1687         bool "Enable eventpoll support" if EXPERT
1688         default y
1689         help
1690           Disabling this option will cause the kernel to be built without
1691           support for epoll family of system calls.
1693 config SIGNALFD
1694         bool "Enable signalfd() system call" if EXPERT
1695         default y
1696         help
1697           Enable the signalfd() system call that allows to receive signals
1698           on a file descriptor.
1700           If unsure, say Y.
1702 config TIMERFD
1703         bool "Enable timerfd() system call" if EXPERT
1704         default y
1705         help
1706           Enable the timerfd() system call that allows to receive timer
1707           events on a file descriptor.
1709           If unsure, say Y.
1711 config EVENTFD
1712         bool "Enable eventfd() system call" if EXPERT
1713         default y
1714         help
1715           Enable the eventfd() system call that allows to receive both
1716           kernel notification (ie. KAIO) or userspace notifications.
1718           If unsure, say Y.
1720 config SHMEM
1721         bool "Use full shmem filesystem" if EXPERT
1722         default y
1723         depends on MMU
1724         help
1725           The shmem is an internal filesystem used to manage shared memory.
1726           It is backed by swap and manages resource limits. It is also exported
1727           to userspace as tmpfs if TMPFS is enabled. Disabling this
1728           option replaces shmem and tmpfs with the much simpler ramfs code,
1729           which may be appropriate on small systems without swap.
1731 config AIO
1732         bool "Enable AIO support" if EXPERT
1733         default y
1734         help
1735           This option enables POSIX asynchronous I/O which may by used
1736           by some high performance threaded applications. Disabling
1737           this option saves about 7k.
1739 config IO_URING
1740         bool "Enable IO uring support" if EXPERT
1741         select IO_WQ
1742         default y
1743         help
1744           This option enables support for the io_uring interface, enabling
1745           applications to submit and complete IO through submission and
1746           completion rings that are shared between the kernel and application.
1748 config GCOV_PROFILE_URING
1749         bool "Enable GCOV profiling on the io_uring subsystem"
1750         depends on GCOV_KERNEL
1751         help
1752           Enable GCOV profiling on the io_uring subsystem, to facilitate
1753           code coverage testing.
1755           If unsure, say N.
1757           Note that this will have a negative impact on the performance of
1758           the io_uring subsystem, hence this should only be enabled for
1759           specific test purposes.
1761 config ADVISE_SYSCALLS
1762         bool "Enable madvise/fadvise syscalls" if EXPERT
1763         default y
1764         help
1765           This option enables the madvise and fadvise syscalls, used by
1766           applications to advise the kernel about their future memory or file
1767           usage, improving performance. If building an embedded system where no
1768           applications use these syscalls, you can disable this option to save
1769           space.
1771 config MEMBARRIER
1772         bool "Enable membarrier() system call" if EXPERT
1773         default y
1774         help
1775           Enable the membarrier() system call that allows issuing memory
1776           barriers across all running threads, which can be used to distribute
1777           the cost of user-space memory barriers asymmetrically by transforming
1778           pairs of memory barriers into pairs consisting of membarrier() and a
1779           compiler barrier.
1781           If unsure, say Y.
1783 config KCMP
1784         bool "Enable kcmp() system call" if EXPERT
1785         help
1786           Enable the kernel resource comparison system call. It provides
1787           user-space with the ability to compare two processes to see if they
1788           share a common resource, such as a file descriptor or even virtual
1789           memory space.
1791           If unsure, say N.
1793 config RSEQ
1794         bool "Enable rseq() system call" if EXPERT
1795         default y
1796         depends on HAVE_RSEQ
1797         select MEMBARRIER
1798         help
1799           Enable the restartable sequences system call. It provides a
1800           user-space cache for the current CPU number value, which
1801           speeds up getting the current CPU number from user-space,
1802           as well as an ABI to speed up user-space operations on
1803           per-CPU data.
1805           If unsure, say Y.
1807 config DEBUG_RSEQ
1808         default n
1809         bool "Enable debugging of rseq() system call" if EXPERT
1810         depends on RSEQ && DEBUG_KERNEL
1811         help
1812           Enable extra debugging checks for the rseq system call.
1814           If unsure, say N.
1816 config CACHESTAT_SYSCALL
1817         bool "Enable cachestat() system call" if EXPERT
1818         default y
1819         help
1820           Enable the cachestat system call, which queries the page cache
1821           statistics of a file (number of cached pages, dirty pages,
1822           pages marked for writeback, (recently) evicted pages).
1824           If unsure say Y here.
1826 config PC104
1827         bool "PC/104 support" if EXPERT
1828         help
1829           Expose PC/104 form factor device drivers and options available for
1830           selection and configuration. Enable this option if your target
1831           machine has a PC/104 bus.
1833 config KALLSYMS
1834         bool "Load all symbols for debugging/ksymoops" if EXPERT
1835         default y
1836         help
1837           Say Y here to let the kernel print out symbolic crash information and
1838           symbolic stack backtraces. This increases the size of the kernel
1839           somewhat, as all symbols have to be loaded into the kernel image.
1841 config KALLSYMS_SELFTEST
1842         bool "Test the basic functions and performance of kallsyms"
1843         depends on KALLSYMS
1844         default n
1845         help
1846           Test the basic functions and performance of some interfaces, such as
1847           kallsyms_lookup_name. It also calculates the compression rate of the
1848           kallsyms compression algorithm for the current symbol set.
1850           Start self-test automatically after system startup. Suggest executing
1851           "dmesg | grep kallsyms_selftest" to collect test results. "finish" is
1852           displayed in the last line, indicating that the test is complete.
1854 config KALLSYMS_ALL
1855         bool "Include all symbols in kallsyms"
1856         depends on DEBUG_KERNEL && KALLSYMS
1857         help
1858           Normally kallsyms only contains the symbols of functions for nicer
1859           OOPS messages and backtraces (i.e., symbols from the text and inittext
1860           sections). This is sufficient for most cases. And only if you want to
1861           enable kernel live patching, or other less common use cases (e.g.,
1862           when a debugger is used) all symbols are required (i.e., names of
1863           variables from the data sections, etc).
1865           This option makes sure that all symbols are loaded into the kernel
1866           image (i.e., symbols from all sections) in cost of increased kernel
1867           size (depending on the kernel configuration, it may be 300KiB or
1868           something like this).
1870           Say N unless you really need all symbols, or kernel live patching.
1872 config KALLSYMS_ABSOLUTE_PERCPU
1873         bool
1874         depends on KALLSYMS
1875         default X86_64 && SMP
1877 # end of the "standard kernel features (expert users)" menu
1879 config ARCH_HAS_MEMBARRIER_CALLBACKS
1880         bool
1882 config ARCH_HAS_MEMBARRIER_SYNC_CORE
1883         bool
1885 config HAVE_PERF_EVENTS
1886         bool
1887         help
1888           See tools/perf/design.txt for details.
1890 config GUEST_PERF_EVENTS
1891         bool
1892         depends on HAVE_PERF_EVENTS
1894 config PERF_USE_VMALLOC
1895         bool
1896         help
1897           See tools/perf/design.txt for details
1899 menu "Kernel Performance Events And Counters"
1901 config PERF_EVENTS
1902         bool "Kernel performance events and counters"
1903         default y if PROFILING
1904         depends on HAVE_PERF_EVENTS
1905         select IRQ_WORK
1906         help
1907           Enable kernel support for various performance events provided
1908           by software and hardware.
1910           Software events are supported either built-in or via the
1911           use of generic tracepoints.
1913           Most modern CPUs support performance events via performance
1914           counter registers. These registers count the number of certain
1915           types of hw events: such as instructions executed, cachemisses
1916           suffered, or branches mis-predicted - without slowing down the
1917           kernel or applications. These registers can also trigger interrupts
1918           when a threshold number of events have passed - and can thus be
1919           used to profile the code that runs on that CPU.
1921           The Linux Performance Event subsystem provides an abstraction of
1922           these software and hardware event capabilities, available via a
1923           system call and used by the "perf" utility in tools/perf/. It
1924           provides per task and per CPU counters, and it provides event
1925           capabilities on top of those.
1927           Say Y if unsure.
1929 config DEBUG_PERF_USE_VMALLOC
1930         default n
1931         bool "Debug: use vmalloc to back perf mmap() buffers"
1932         depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
1933         select PERF_USE_VMALLOC
1934         help
1935           Use vmalloc memory to back perf mmap() buffers.
1937           Mostly useful for debugging the vmalloc code on platforms
1938           that don't require it.
1940           Say N if unsure.
1942 endmenu
1944 config SYSTEM_DATA_VERIFICATION
1945         def_bool n
1946         select SYSTEM_TRUSTED_KEYRING
1947         select KEYS
1948         select CRYPTO
1949         select CRYPTO_RSA
1950         select ASYMMETRIC_KEY_TYPE
1951         select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
1952         select ASN1
1953         select OID_REGISTRY
1954         select X509_CERTIFICATE_PARSER
1955         select PKCS7_MESSAGE_PARSER
1956         help
1957           Provide PKCS#7 message verification using the contents of the system
1958           trusted keyring to provide public keys.  This then can be used for
1959           module verification, kexec image verification and firmware blob
1960           verification.
1962 config PROFILING
1963         bool "Profiling support"
1964         help
1965           Say Y here to enable the extended profiling support mechanisms used
1966           by profilers.
1968 config RUST
1969         bool "Rust support"
1970         depends on HAVE_RUST
1971         depends on RUST_IS_AVAILABLE
1972         select EXTENDED_MODVERSIONS if MODVERSIONS
1973         depends on !MODVERSIONS || GENDWARFKSYMS
1974         depends on !GCC_PLUGIN_RANDSTRUCT
1975         depends on !RANDSTRUCT
1976         depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE
1977         depends on !CFI_CLANG || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
1978         select CFI_ICALL_NORMALIZE_INTEGERS if CFI_CLANG
1979         depends on !CALL_PADDING || RUSTC_VERSION >= 108100
1980         depends on !KASAN_SW_TAGS
1981         depends on !(MITIGATION_RETHUNK && KASAN) || RUSTC_VERSION >= 108300
1982         help
1983           Enables Rust support in the kernel.
1985           This allows other Rust-related options, like drivers written in Rust,
1986           to be selected.
1988           It is also required to be able to load external kernel modules
1989           written in Rust.
1991           See Documentation/rust/ for more information.
1993           If unsure, say N.
1995 config RUSTC_VERSION_TEXT
1996         string
1997         depends on RUST
1998         default "$(RUSTC_VERSION_TEXT)"
1999         help
2000           See `CC_VERSION_TEXT`.
2002 config BINDGEN_VERSION_TEXT
2003         string
2004         depends on RUST
2005         # The dummy parameter `workaround-for-0.69.0` is required to support 0.69.0
2006         # (https://github.com/rust-lang/rust-bindgen/pull/2678) and 0.71.0
2007         # (https://github.com/rust-lang/rust-bindgen/pull/3040). It can be removed
2008         # when the minimum version is upgraded past the latter (0.69.1 and 0.71.1
2009         # both fixed the issue).
2010         default "$(shell,$(BINDGEN) --version workaround-for-0.69.0 2>/dev/null)"
2013 # Place an empty function call at each tracepoint site. Can be
2014 # dynamically changed for a probe function.
2016 config TRACEPOINTS
2017         bool
2018         select TASKS_TRACE_RCU
2020 source "kernel/Kconfig.kexec"
2022 endmenu         # General setup
2024 source "arch/Kconfig"
2026 config RT_MUTEXES
2027         bool
2028         default y if PREEMPT_RT
2030 config MODULE_SIG_FORMAT
2031         def_bool n
2032         select SYSTEM_DATA_VERIFICATION
2034 source "kernel/module/Kconfig"
2036 config INIT_ALL_POSSIBLE
2037         bool
2038         help
2039           Back when each arch used to define their own cpu_online_mask and
2040           cpu_possible_mask, some of them chose to initialize cpu_possible_mask
2041           with all 1s, and others with all 0s.  When they were centralised,
2042           it was better to provide this option than to break all the archs
2043           and have several arch maintainers pursuing me down dark alleys.
2045 source "block/Kconfig"
2047 config PREEMPT_NOTIFIERS
2048         bool
2050 config PADATA
2051         depends on SMP
2052         bool
2054 config ASN1
2055         tristate
2056         help
2057           Build a simple ASN.1 grammar compiler that produces a bytecode output
2058           that can be interpreted by the ASN.1 stream decoder and used to
2059           inform it as to what tags are to be expected in a stream and what
2060           functions to call on what tags.
2062 source "kernel/Kconfig.locks"
2064 config ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
2065         bool
2067 config ARCH_HAS_PREPARE_SYNC_CORE_CMD
2068         bool
2070 config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
2071         bool
2073 # It may be useful for an architecture to override the definitions of the
2074 # SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>
2075 # and the COMPAT_ variants in <linux/compat.h>, in particular to use a
2076 # different calling convention for syscalls. They can also override the
2077 # macros for not-implemented syscalls in kernel/sys_ni.c and
2078 # kernel/time/posix-stubs.c. All these overrides need to be available in
2079 # <asm/syscall_wrapper.h>.
2080 config ARCH_HAS_SYSCALL_WRAPPER
2081         def_bool n