xref: /linux/init/Kconfig (revision e86d265826b8dc54178e16c4027d3bd5d0299f12)
1# SPDX-License-Identifier: GPL-2.0-only
2config CC_VERSION_TEXT
3	string
4	default "$(CC_VERSION_TEXT)"
5	help
6	  This is used in unclear ways:
7
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.
12
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.
18
19config CC_IS_GCC
20	def_bool $(success,test "$(cc-name)" = GCC)
21
22config GCC_VERSION
23	int
24	default $(cc-version) if CC_IS_GCC
25	default 0
26
27config CC_IS_CLANG
28	def_bool $(success,test "$(cc-name)" = Clang)
29
30config CLANG_VERSION
31	int
32	default $(cc-version) if CC_IS_CLANG
33	default 0
34
35config AS_IS_GNU
36	def_bool $(success,test "$(as-name)" = GNU)
37
38config AS_IS_LLVM
39	def_bool $(success,test "$(as-name)" = LLVM)
40
41config 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)
46
47config LD_IS_BFD
48	def_bool $(success,test "$(ld-name)" = BFD)
49
50config LD_VERSION
51	int
52	default $(ld-version) if LD_IS_BFD
53	default 0
54
55config LD_IS_LLD
56	def_bool $(success,test "$(ld-name)" = LLD)
57
58config LLD_VERSION
59	int
60	default $(ld-version) if LD_IS_LLD
61	default 0
62
63config 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`.
69
70config 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).
74
75	  Please see Documentation/rust/quick-start.rst for instructions on how
76	  to satisfy the build requirements of Rust support.
77
78	  In particular, the Makefile target 'rustavailable' is useful to check
79	  why the Rust toolchain is not being detected.
80
81config RUSTC_LLVM_VERSION
82	int
83	default $(rustc-llvm-version)
84
85config RUSTC_LLVM_MAJOR_VERSION
86	int
87	default $(shell,expr $(rustc-llvm-version) / 10000)
88
89config RUSTC_CLANG_LLVM_COMPATIBLE
90	bool
91	default y if CC_IS_CLANG && RUSTC_LLVM_MAJOR_VERSION = $(shell,expr $(cc-version) / 10000)
92	help
93	  This indicates whether Rust and Clang use LLVM of the same major
94	  version.
95
96	  Operations involving handling LLVM IR or bitcode (e.g. cross-language
97	  LTO) require the same LLVM major version to work properly. For best
98	  compatibility it is recommended that the exact same LLVM is used.
99
100config ARCH_HAS_CC_CAN_LINK
101	bool
102
103config CC_CAN_LINK
104	bool
105	default ARCH_CC_CAN_LINK if ARCH_HAS_CC_CAN_LINK
106	default $(cc_can_link_user,$(m64-flag)) if 64BIT
107	default $(cc_can_link_user,$(m32-flag))
108
109# Fixed in GCC 14, 13.3, 12.4 and 11.5
110# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
111config GCC_ASM_GOTO_OUTPUT_BROKEN
112	bool
113	depends on CC_IS_GCC
114	default y if GCC_VERSION < 110500
115	default y if GCC_VERSION >= 120000 && GCC_VERSION < 120400
116	default y if GCC_VERSION >= 130000 && GCC_VERSION < 130300
117
118config CC_HAS_ASM_GOTO_OUTPUT
119	def_bool y
120	depends on !GCC_ASM_GOTO_OUTPUT_BROKEN
121	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)
122
123config CC_HAS_ASM_GOTO_TIED_OUTPUT
124	depends on CC_HAS_ASM_GOTO_OUTPUT
125	# Detect buggy gcc and clang, fixed in gcc-11 clang-14.
126	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)
127
128config TOOLS_SUPPORT_RELR
129	def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
130
131config CC_HAS_ASM_INLINE
132	def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
133
134config CC_HAS_ASSUME
135	bool
136	# clang needs to be at least 19.1.0 since the meaning of the assume
137	# attribute changed:
138	# https://github.com/llvm/llvm-project/commit/c44fa3e8a9a44c2e9a575768a3c185354b9f6c17
139	default y if CC_IS_CLANG && CLANG_VERSION >= 190100
140	# supported since gcc 13.1.0
141	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106654
142	default y if CC_IS_GCC && GCC_VERSION >= 130100
143
144config CC_HAS_NO_PROFILE_FN_ATTR
145	def_bool $(success,echo '__attribute__((no_profile_instrument_function)) int x();' | $(CC) -x c - -c -o /dev/null -Werror)
146
147config CC_HAS_COUNTED_BY
148	bool
149	# clang needs to be at least 20.1.0 to avoid potential crashes
150	# when building structures that contain __counted_by
151	# https://github.com/ClangBuiltLinux/linux/issues/2114
152	# https://github.com/llvm/llvm-project/commit/160fb1121cdf703c3ef5e61fb26c5659eb581489
153	default y if CC_IS_CLANG && CLANG_VERSION >= 200100
154	# supported since gcc 15.1.0
155	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896
156	default y if CC_IS_GCC && GCC_VERSION >= 150100
157
158config CC_HAS_COUNTED_BY_PTR
159	bool
160	# supported since clang 22
161	default y if CC_IS_CLANG && CLANG_VERSION >= 220100
162	# supported since gcc 16.0.0
163	default y if CC_IS_GCC && GCC_VERSION >= 160000
164
165config CC_HAS_BROKEN_COUNTED_BY_REF
166	bool
167	# https://github.com/llvm/llvm-project/issues/182575
168	default y if CC_IS_CLANG && CLANG_VERSION < 220100
169
170config CC_HAS_ALLOC_TOKEN
171	def_bool $(cc-option,-falloc-token-max=123)
172
173config CC_HAS_MULTIDIMENSIONAL_NONSTRING
174	def_bool $(success,echo 'char tag[][4] __attribute__((__nonstring__)) = { };' | $(CC) $(CLANG_FLAGS) -x c - -c -o /dev/null -Werror)
175
176config CC_OPT_INLINE_MEMSET
177	string
178	default "-finline-stringops=memset" if $(cc-option,-finline-stringops=memset)
179	default "-mllvm -max-store-memset=4294967294" if $(cc-option,-mllvm -max-store-memset=4294967294)
180
181config LD_CAN_USE_KEEP_IN_OVERLAY
182	# ld.lld prior to 21.0.0 did not support KEEP within an overlay description
183	# https://github.com/llvm/llvm-project/pull/130661
184	def_bool LD_IS_BFD || LLD_VERSION >= 210000
185
186config RUSTC_HAS_SPAN_FILE
187	def_bool RUSTC_VERSION >= 108800
188
189config RUSTC_HAS_UNNECESSARY_TRANSMUTES
190	def_bool RUSTC_VERSION >= 108800
191
192config RUSTC_HAS_FILE_WITH_NUL
193	def_bool RUSTC_VERSION >= 108900
194
195config RUSTC_HAS_FILE_AS_C_STR
196	def_bool RUSTC_VERSION >= 109100
197
198config RUSTC_HAS_SUSPICIOUS_RUNTIME_SYMBOL_DEFINITIONS
199	def_bool RUSTC_VERSION >= 109800
200
201config PAHOLE_VERSION
202	int
203	default "$(PAHOLE_VERSION)"
204
205config CONSTRUCTORS
206	bool
207
208config IRQ_WORK
209	def_bool y if SMP
210
211config BUILDTIME_TABLE_SORT
212	bool
213
214config THREAD_INFO_IN_TASK
215	bool
216	help
217	  Select this to move thread_info off the stack into task_struct.  To
218	  make this work, an arch will need to remove all thread_info fields
219	  except flags and fix any runtime bugs.
220
221	  One subtle change that will be needed is to use try_get_task_stack()
222	  and put_task_stack() in save_thread_stack_tsk() and get_wchan().
223
224menu "General setup"
225
226config BROKEN
227	bool
228	help
229	  This option allows you to choose whether you want to try to
230	  compile (and fix) old drivers that haven't been updated to
231	  new infrastructure.
232
233config BROKEN_ON_SMP
234	bool
235	depends on BROKEN || !SMP
236	default y
237
238config INIT_ENV_ARG_LIMIT
239	int
240	default 32 if !UML
241	default 128 if UML
242	help
243	  Maximum of each of the number of arguments and environment
244	  variables passed to init from the kernel command line.
245
246config COMPILE_TEST
247	bool "Compile also drivers which will not load"
248	depends on HAS_IOMEM
249	help
250	  Some drivers can be compiled on a different platform than they are
251	  intended to be run on. Despite they cannot be loaded there (or even
252	  when they load they cannot be used due to missing HW support),
253	  developers still, opposing to distributors, might want to build such
254	  drivers to compile-test them.
255
256	  If you are a developer and want to build everything available, say Y
257	  here. If you are a user/distributor, say N here to exclude useless
258	  drivers to be distributed.
259
260config WERROR
261	bool "Compile the kernel with warnings as errors"
262	default COMPILE_TEST
263	help
264	  A kernel build should not cause any compiler warnings, and this
265	  enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
266	  to enforce that rule by default. Certain warnings from other tools
267	  such as the linker may be upgraded to errors with this option as
268	  well.
269
270	  However, if you have a new (or very old) compiler or linker with odd
271	  and unusual warnings, or you have some architecture with problems,
272	  you may need to disable this config option in order to
273	  successfully build the kernel.
274
275	  If in doubt, say Y.
276
277config UAPI_HEADER_TEST
278	bool "Compile test UAPI headers"
279	depends on HEADERS_INSTALL
280	help
281	  Compile test headers exported to user-space to ensure they are
282	  self-contained, i.e. compilable as standalone units.
283
284	  If you are a developer or tester and want to ensure the exported
285	  headers are self-contained, say Y here. Otherwise, choose N.
286
287config LOCALVERSION
288	string "Local version - append to kernel release"
289	help
290	  Append an extra string to the end of your kernel version.
291	  This will show up when you type uname, for example.
292	  The string you set here will be appended after the contents of
293	  any files with a filename matching localversion* in your
294	  object and source tree, in that order.  Your total string can
295	  be a maximum of 64 characters.
296
297config LOCALVERSION_AUTO
298	bool "Automatically append version information to the version string"
299	default y
300	depends on !COMPILE_TEST
301	help
302	  This will try to automatically determine if the current tree is a
303	  release tree by looking for git tags that belong to the current
304	  top of tree revision.
305
306	  A string of the format -gxxxxxxxx will be added to the localversion
307	  if a git-based tree is found.  The string generated by this will be
308	  appended after any matching localversion* files, and after the value
309	  set in CONFIG_LOCALVERSION.
310
311	  (The actual string used here is the first 12 characters produced
312	  by running the command:
313
314	    $ git rev-parse --verify HEAD
315
316	  which is done within the script "scripts/setlocalversion".)
317
318config BUILD_SALT
319	string "Build ID Salt"
320	default ""
321	help
322	  The build ID is used to link binaries and their debug info. Setting
323	  this option will use the value in the calculation of the build id.
324	  This is mostly useful for distributions which want to ensure the
325	  build is unique between builds. It's safe to leave the default.
326
327config HAVE_KERNEL_GZIP
328	bool
329
330config HAVE_KERNEL_BZIP2
331	bool
332
333config HAVE_KERNEL_LZMA
334	bool
335
336config HAVE_KERNEL_XZ
337	bool
338
339config HAVE_KERNEL_LZO
340	bool
341
342config HAVE_KERNEL_LZ4
343	bool
344
345config HAVE_KERNEL_ZSTD
346	bool
347
348config HAVE_KERNEL_UNCOMPRESSED
349	bool
350
351choice
352	prompt "Kernel compression mode"
353	default KERNEL_GZIP
354	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
355	help
356	  The linux kernel is a kind of self-extracting executable.
357	  Several compression algorithms are available, which differ
358	  in efficiency, compression and decompression speed.
359	  Compression speed is only relevant when building a kernel.
360	  Decompression speed is relevant at each boot.
361
362	  If you have any problems with bzip2 or lzma compressed
363	  kernels, mail me (Alain Knaff) <alain@knaff.lu>. (An older
364	  version of this functionality (bzip2 only), for 2.4, was
365	  supplied by Christian Ludwig)
366
367	  High compression options are mostly useful for users, who
368	  are low on disk space (embedded systems), but for whom ram
369	  size matters less.
370
371	  If in doubt, select 'gzip'
372
373config KERNEL_GZIP
374	bool "Gzip"
375	depends on HAVE_KERNEL_GZIP
376	help
377	  The old and tried gzip compression. It provides a good balance
378	  between compression ratio and decompression speed.
379
380config KERNEL_BZIP2
381	bool "Bzip2"
382	depends on HAVE_KERNEL_BZIP2
383	help
384	  Its compression ratio and speed is intermediate.
385	  Decompression speed is slowest among the choices.  The kernel
386	  size is about 10% smaller with bzip2, in comparison to gzip.
387	  Bzip2 uses a large amount of memory. For modern kernels you
388	  will need at least 8MB RAM or more for booting.
389
390config KERNEL_LZMA
391	bool "LZMA"
392	depends on HAVE_KERNEL_LZMA
393	help
394	  This compression algorithm's ratio is best.  Decompression speed
395	  is between gzip and bzip2.  Compression is slowest.
396	  The kernel size is about 33% smaller with LZMA in comparison to gzip.
397
398config KERNEL_XZ
399	bool "XZ"
400	depends on HAVE_KERNEL_XZ
401	help
402	  XZ uses the LZMA2 algorithm and instruction set specific
403	  BCJ filters which can improve compression ratio of executable
404	  code. The size of the kernel is about 30% smaller with XZ in
405	  comparison to gzip. On architectures for which there is a BCJ
406	  filter (i386, x86_64, ARM, ARM64, RISC-V, big endian PowerPC,
407	  and SPARC), XZ will create a few percent smaller kernel than
408	  plain LZMA.
409
410	  The speed is about the same as with LZMA: The decompression
411	  speed of XZ is better than that of bzip2 but worse than gzip
412	  and LZO. Compression is slow.
413
414config KERNEL_LZO
415	bool "LZO"
416	depends on HAVE_KERNEL_LZO
417	help
418	  Its compression ratio is the poorest among the choices. The kernel
419	  size is about 10% bigger than gzip; however its speed
420	  (both compression and decompression) is the fastest.
421
422config KERNEL_LZ4
423	bool "LZ4"
424	depends on HAVE_KERNEL_LZ4
425	help
426	  LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding.
427	  A preliminary version of LZ4 de/compression tool is available at
428	  <https://code.google.com/p/lz4/>.
429
430	  Its compression ratio is worse than LZO. The size of the kernel
431	  is about 8% bigger than LZO. But the decompression speed is
432	  faster than LZO.
433
434config KERNEL_ZSTD
435	bool "ZSTD"
436	depends on HAVE_KERNEL_ZSTD
437	help
438	  ZSTD is a compression algorithm targeting intermediate compression
439	  with fast decompression speed. It will compress better than GZIP and
440	  decompress around the same speed as LZO, but slower than LZ4. You
441	  will need at least 192 KB RAM or more for booting. The zstd command
442	  line tool is required for compression.
443
444config KERNEL_UNCOMPRESSED
445	bool "None"
446	depends on HAVE_KERNEL_UNCOMPRESSED
447	help
448	  Produce uncompressed kernel image. This option is usually not what
449	  you want. It is useful for debugging the kernel in slow simulation
450	  environments, where decompressing and moving the kernel is awfully
451	  slow. This option allows early boot code to skip the decompressor
452	  and jump right at uncompressed kernel image.
453
454endchoice
455
456config DEFAULT_INIT
457	string "Default init path"
458	default ""
459	help
460	  This option determines the default init for the system if no init=
461	  option is passed on the kernel command line. If the requested path is
462	  not present, we will still then move on to attempting further
463	  locations (e.g. /sbin/init, etc). If this is empty, we will just use
464	  the fallback list when init= is not passed.
465
466config DEFAULT_HOSTNAME
467	string "Default hostname"
468	default "(none)"
469	help
470	  This option determines the default system hostname before userspace
471	  calls sethostname(2). The kernel traditionally uses "(none)" here,
472	  but you may wish to use a different default here to make a minimal
473	  system more usable with less configuration.
474
475config SYSVIPC
476	bool "System V IPC"
477	help
478	  Inter Process Communication is a suite of library functions and
479	  system calls which let processes (running programs) synchronize and
480	  exchange information. It is generally considered to be a good thing,
481	  and some programs won't run unless you say Y here. In particular, if
482	  you want to run the DOS emulator dosemu under Linux (read the
483	  DOSEMU-HOWTO, available from <http://www.tldp.org/docs.html#howto>),
484	  you'll need to say Y here.
485
486	  You can find documentation about IPC with "info ipc" and also in
487	  section 6.4 of the Linux Programmer's Guide, available from
488	  <http://www.tldp.org/guides.html>.
489
490config SYSVIPC_SYSCTL
491	bool
492	depends on SYSVIPC
493	depends on SYSCTL
494	default y
495
496config SYSVIPC_COMPAT
497	def_bool y
498	depends on COMPAT && SYSVIPC
499
500config POSIX_MQUEUE
501	bool "POSIX Message Queues"
502	depends on NET
503	help
504	  POSIX variant of message queues is a part of IPC. In POSIX message
505	  queues every message has a priority which decides about succession
506	  of receiving it by a process. If you want to compile and run
507	  programs written e.g. for Solaris with use of its POSIX message
508	  queues (functions mq_*) say Y here.
509
510	  POSIX message queues are visible as a filesystem called 'mqueue'
511	  and can be mounted somewhere if you want to do filesystem
512	  operations on message queues.
513
514	  If unsure, say Y.
515
516config POSIX_MQUEUE_SYSCTL
517	bool
518	depends on POSIX_MQUEUE
519	depends on SYSCTL
520	default y
521
522config WATCH_QUEUE
523	bool "General notification queue"
524	default n
525	help
526
527	  This is a general notification queue for the kernel to pass events to
528	  userspace by splicing them into pipes.  It can be used in conjunction
529	  with watches for key/keyring change notifications and device
530	  notifications.
531
532	  See Documentation/core-api/watch_queue.rst
533
534config CROSS_MEMORY_ATTACH
535	bool "Enable process_vm_readv/writev syscalls"
536	depends on MMU
537	default y
538	help
539	  Enabling this option adds the system calls process_vm_readv and
540	  process_vm_writev which allow a process with the correct privileges
541	  to directly read from or write to another process' address space.
542	  See the man page for more details.
543
544config AUDIT
545	bool "Auditing support"
546	depends on NET
547	help
548	  Enable auditing infrastructure that can be used with another
549	  kernel subsystem, such as SELinux (which requires this for
550	  logging of avc messages output).  System call auditing is included
551	  on architectures which support it.
552
553config HAVE_ARCH_AUDITSYSCALL
554	bool
555
556config AUDITSYSCALL
557	def_bool y
558	depends on AUDIT && HAVE_ARCH_AUDITSYSCALL
559	select FSNOTIFY
560
561source "kernel/irq/Kconfig"
562source "kernel/time/Kconfig"
563source "kernel/bpf/Kconfig"
564source "kernel/Kconfig.preempt"
565
566menu "CPU/Task time and stats accounting"
567
568config VIRT_CPU_ACCOUNTING
569	bool
570
571choice
572	prompt "Cputime accounting"
573	default VIRT_CPU_ACCOUNTING_GEN if NO_HZ_FULL
574	default TICK_CPU_ACCOUNTING
575
576# Kind of a stub config for the pure tick based cputime accounting
577config TICK_CPU_ACCOUNTING
578	bool "Simple tick based cputime accounting"
579	depends on !S390 && !NO_HZ_FULL
580	help
581	  This is the basic tick based cputime accounting that maintains
582	  statistics about user, system and idle time spent on per jiffies
583	  granularity.
584
585	  If unsure, say Y.
586
587config VIRT_CPU_ACCOUNTING_NATIVE
588	bool "Deterministic task and CPU time accounting"
589	depends on HAVE_VIRT_CPU_ACCOUNTING && !NO_HZ_FULL
590	select VIRT_CPU_ACCOUNTING
591	help
592	  Select this option to enable more accurate task and CPU time
593	  accounting.  This is done by reading a CPU counter on each
594	  kernel entry and exit and on transitions within the kernel
595	  between system, softirq and hardirq state, so there is a
596	  small performance impact.  In the case of s390 or IBM POWER > 5,
597	  this also enables accounting of stolen time on logically-partitioned
598	  systems.
599
600config VIRT_CPU_ACCOUNTING_GEN
601	bool "Full dynticks CPU time accounting"
602	depends on HAVE_CONTEXT_TRACKING_USER
603	depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
604	depends on GENERIC_CLOCKEVENTS
605	select VIRT_CPU_ACCOUNTING
606	select CONTEXT_TRACKING_USER
607	help
608	  Select this option to enable task and CPU time accounting on full
609	  dynticks systems. This accounting is implemented by watching every
610	  kernel-user boundaries using the context tracking subsystem.
611	  The accounting is thus performed at the expense of some significant
612	  overhead.
613
614	  For now this is only useful if you are working on the full
615	  dynticks subsystem development.
616
617	  If unsure, say N.
618
619endchoice
620
621config IRQ_TIME_ACCOUNTING
622	bool "Fine granularity task level IRQ time accounting"
623	depends on HAVE_IRQ_TIME_ACCOUNTING && !VIRT_CPU_ACCOUNTING_NATIVE
624	help
625	  Select this option to enable fine granularity task irq time
626	  accounting. This is done by reading a timestamp on each
627	  transitions between softirq and hardirq state, so there can be a
628	  small performance impact.
629
630	  If in doubt, say N here.
631
632config HAVE_SCHED_AVG_IRQ
633	def_bool y
634	depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING
635	depends on SMP
636
637config SCHED_HW_PRESSURE
638	bool
639	default y if ARM && ARM_CPU_TOPOLOGY
640	default y if ARM64
641	depends on SMP
642	depends on CPU_FREQ_THERMAL
643	help
644	  Select this option to enable HW pressure accounting in the
645	  scheduler. HW pressure is the value conveyed to the scheduler
646	  that reflects the reduction in CPU compute capacity resulted from
647	  HW throttling. HW throttling occurs when the performance of
648	  a CPU is capped due to high operating temperatures as an example.
649
650	  If selected, the scheduler will be able to balance tasks accordingly,
651	  i.e. put less load on throttled CPUs than on non/less throttled ones.
652
653	  This requires the architecture to implement
654	  arch_update_hw_pressure() and arch_scale_thermal_pressure().
655
656config BSD_PROCESS_ACCT
657	bool "BSD Process Accounting (DEPRECATED)"
658	depends on MULTIUSER
659	default n
660	help
661	  If you say Y here, a user level program will be able to instruct the
662	  kernel (via a special system call) to write process accounting
663	  information to a file: whenever a process exits, information about
664	  that process will be appended to the file by the kernel.  The
665	  information includes things such as creation time, owning user,
666	  command name, memory usage, controlling terminal etc. (the complete
667	  list is in the struct acct in <file:include/linux/acct.h>).  It is
668	  up to the user level program to do useful things with this
669	  information.  This mechanism is antiquated and has significant
670	  scalability issues.  You probably want to use eBPF instead.  Say
671	  N unless you really need this.
672
673config BSD_PROCESS_ACCT_V3
674	bool "BSD Process Accounting version 3 file format"
675	depends on BSD_PROCESS_ACCT
676	default n
677	help
678	  If you say Y here, the process accounting information is written
679	  in a new file format that also logs the process IDs of each
680	  process and its parent. Note that this file format is incompatible
681	  with previous v0/v1/v2 file formats, so you will need updated tools
682	  for processing it. A preliminary version of these tools is available
683	  at <http://www.gnu.org/software/acct/>.
684
685config TASKSTATS
686	bool "Export task/process statistics through netlink"
687	depends on NET
688	depends on MULTIUSER
689	default n
690	help
691	  Export selected statistics for tasks/processes through the
692	  generic netlink interface. Unlike BSD process accounting, the
693	  statistics are available during the lifetime of tasks/processes as
694	  responses to commands. Like BSD accounting, they are sent to user
695	  space on task exit.
696
697	  Say N if unsure.
698
699config TASK_DELAY_ACCT
700	bool "Enable per-task delay accounting"
701	depends on TASKSTATS
702	select SCHED_INFO
703	help
704	  Collect information on time spent by a task waiting for system
705	  resources like cpu, synchronous block I/O completion and swapping
706	  in pages. Such statistics can help in setting a task's priorities
707	  relative to other tasks for cpu, io, rss limits etc.
708
709	  Say N if unsure.
710
711config TASK_XACCT
712	bool "Enable extended accounting over taskstats"
713	depends on TASKSTATS
714	help
715	  Collect extended task accounting data and send the data
716	  to userland for processing over the taskstats interface.
717
718	  Say N if unsure.
719
720config TASK_IO_ACCOUNTING
721	bool "Enable per-task storage I/O accounting"
722	depends on TASK_XACCT
723	help
724	  Collect information on the number of bytes of storage I/O which this
725	  task has caused.
726
727	  Say N if unsure.
728
729config PSI
730	bool "Pressure stall information tracking"
731	select KERNFS
732	help
733	  Collect metrics that indicate how overcommitted the CPU, memory,
734	  and IO capacity are in the system.
735
736	  If you say Y here, the kernel will create /proc/pressure/ with the
737	  pressure statistics files cpu, memory, and io. These will indicate
738	  the share of walltime in which some or all tasks in the system are
739	  delayed due to contention of the respective resource.
740
741	  In kernels with cgroup support, cgroups (cgroup2 only) will
742	  have cpu.pressure, memory.pressure, and io.pressure files,
743	  which aggregate pressure stalls for the grouped tasks only.
744
745	  For more details see Documentation/accounting/psi.rst.
746
747	  Say N if unsure.
748
749config PSI_DEFAULT_DISABLED
750	bool "Require boot parameter to enable pressure stall information tracking"
751	default n
752	depends on PSI
753	help
754	  If set, pressure stall information tracking will be disabled
755	  per default but can be enabled through passing psi=1 on the
756	  kernel commandline during boot.
757
758	  This feature adds some code to the task wakeup and sleep
759	  paths of the scheduler. The overhead is too low to affect
760	  common scheduling-intense workloads in practice (such as
761	  webservers, memcache), but it does show up in artificial
762	  scheduler stress tests, such as hackbench.
763
764	  If you are paranoid and not sure what the kernel will be
765	  used for, say Y.
766
767	  Say N if unsure.
768
769endmenu # "CPU/Task time and stats accounting"
770
771config CPU_ISOLATION
772	bool "CPU isolation"
773	depends on SMP
774	default y
775	help
776	  Make sure that CPUs running critical tasks are not disturbed by
777	  any source of "noise" such as unbound workqueues, timers, kthreads...
778	  Unbound jobs get offloaded to housekeeping CPUs. This is driven by
779	  the "isolcpus=" boot parameter.
780
781	  Say Y if unsure.
782
783source "kernel/rcu/Kconfig"
784
785config IKCONFIG
786	tristate "Kernel .config support"
787	help
788	  This option enables the complete Linux kernel ".config" file
789	  contents to be saved in the kernel. It provides documentation
790	  of which kernel options are used in a running kernel or in an
791	  on-disk kernel.  This information can be extracted from the kernel
792	  image file with the script scripts/extract-ikconfig and used as
793	  input to rebuild the current kernel or to build another kernel.
794	  It can also be extracted from a running kernel by reading
795	  /proc/config.gz if enabled (below).
796
797config IKCONFIG_PROC
798	bool "Enable access to .config through /proc/config.gz"
799	depends on IKCONFIG && PROC_FS
800	help
801	  This option enables access to the kernel configuration file
802	  through /proc/config.gz.
803
804config IKHEADERS
805	tristate "Enable kernel headers through /sys/kernel/kheaders.tar.xz"
806	depends on SYSFS
807	help
808	  This option enables access to the in-kernel headers that are generated during
809	  the build process. These can be used to build eBPF tracing programs,
810	  or similar programs.  If you build the headers as a module, a module called
811	  kheaders.ko is built which can be loaded on-demand to get access to headers.
812
813config LOG_BUF_SHIFT
814	int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
815	range 12 25
816	default 17
817	depends on PRINTK
818	help
819	  Select the minimal kernel log buffer size as a power of 2.
820	  The final size is affected by LOG_CPU_MAX_BUF_SHIFT config
821	  parameter, see below. Any higher size also might be forced
822	  by "log_buf_len" boot parameter.
823
824	  Examples:
825		     17 => 128 KB
826		     16 => 64 KB
827		     15 => 32 KB
828		     14 => 16 KB
829		     13 =>  8 KB
830		     12 =>  4 KB
831
832config LOG_CPU_MAX_BUF_SHIFT
833	int "CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB)"
834	depends on SMP
835	range 0 21
836	default 0 if BASE_SMALL
837	default 12
838	depends on PRINTK
839	help
840	  This option allows to increase the default ring buffer size
841	  according to the number of CPUs. The value defines the contribution
842	  of each CPU as a power of 2. The used space is typically only few
843	  lines however it might be much more when problems are reported,
844	  e.g. backtraces.
845
846	  The increased size means that a new buffer has to be allocated and
847	  the original static one is unused. It makes sense only on systems
848	  with more CPUs. Therefore this value is used only when the sum of
849	  contributions is greater than the half of the default kernel ring
850	  buffer as defined by LOG_BUF_SHIFT. The default values are set
851	  so that more than 16 CPUs are needed to trigger the allocation.
852
853	  Also this option is ignored when "log_buf_len" kernel parameter is
854	  used as it forces an exact (power of two) size of the ring buffer.
855
856	  The number of possible CPUs is used for this computation ignoring
857	  hotplugging making the computation optimal for the worst case
858	  scenario while allowing a simple algorithm to be used from bootup.
859
860	  Examples shift values and their meaning:
861		     17 => 128 KB for each CPU
862		     16 =>  64 KB for each CPU
863		     15 =>  32 KB for each CPU
864		     14 =>  16 KB for each CPU
865		     13 =>   8 KB for each CPU
866		     12 =>   4 KB for each CPU
867
868config PRINTK_INDEX
869	bool "Printk indexing debugfs interface"
870	depends on PRINTK && DEBUG_FS
871	help
872	  Add support for indexing of all printk formats known at compile time
873	  at <debugfs>/printk/index/<module>.
874
875	  This can be used as part of maintaining daemons which monitor
876	  /dev/kmsg, as it permits auditing the printk formats present in a
877	  kernel, allowing detection of cases where monitored printks are
878	  changed or no longer present.
879
880	  There is no additional runtime cost to printk with this enabled.
881
882#
883# Architectures with an unreliable sched_clock() should select this:
884#
885config HAVE_UNSTABLE_SCHED_CLOCK
886	bool
887
888config GENERIC_SCHED_CLOCK
889	bool
890
891menu "Scheduler features"
892
893config UCLAMP_TASK
894	bool "Enable utilization clamping for RT/FAIR tasks"
895	depends on CPU_FREQ_GOV_SCHEDUTIL
896	help
897	  This feature enables the scheduler to track the clamped utilization
898	  of each CPU based on RUNNABLE tasks scheduled on that CPU.
899
900	  With this option, the user can specify the min and max CPU
901	  utilization allowed for RUNNABLE tasks. The max utilization defines
902	  the maximum frequency a task should use while the min utilization
903	  defines the minimum frequency it should use.
904
905	  Both min and max utilization clamp values are hints to the scheduler,
906	  aiming at improving its frequency selection policy, but they do not
907	  enforce or grant any specific bandwidth for tasks.
908
909	  If in doubt, say N.
910
911config UCLAMP_BUCKETS_COUNT
912	int "Number of supported utilization clamp buckets"
913	range 5 20
914	default 5
915	depends on UCLAMP_TASK
916	help
917	  Defines the number of clamp buckets to use. The range of each bucket
918	  will be SCHED_CAPACITY_SCALE/UCLAMP_BUCKETS_COUNT. The higher the
919	  number of clamp buckets the finer their granularity and the higher
920	  the precision of clamping aggregation and tracking at run-time.
921
922	  For example, with the minimum configuration value we will have 5
923	  clamp buckets tracking 20% utilization each. A 25% boosted tasks will
924	  be refcounted in the [20..39]% bucket and will set the bucket clamp
925	  effective value to 25%.
926	  If a second 30% boosted task should be co-scheduled on the same CPU,
927	  that task will be refcounted in the same bucket of the first task and
928	  it will boost the bucket clamp effective value to 30%.
929	  The clamp effective value of a bucket is reset to its nominal value
930	  (20% in the example above) when there are no more tasks refcounted in
931	  that bucket.
932
933	  An additional boost/capping margin can be added to some tasks. In the
934	  example above the 25% task will be boosted to 30% until it exits the
935	  CPU. If that should be considered not acceptable on certain systems,
936	  it's always possible to reduce the margin by increasing the number of
937	  clamp buckets to trade off used memory for run-time tracking
938	  precision.
939
940	  If in doubt, use the default value.
941
942config SCHED_PROXY_EXEC
943	bool "Proxy Execution"
944	# Avoid some build failures w/ PREEMPT_RT until it can be fixed
945	depends on !PREEMPT_RT
946	# Need to investigate how to inform sched_ext of split contexts
947	depends on !SCHED_CLASS_EXT
948	# Not particularly useful until we get to multi-rq proxying
949	depends on EXPERT
950	help
951	  This option enables proxy execution, a mechanism for mutex-owning
952	  tasks to inherit the scheduling context of higher priority waiters.
953
954endmenu
955
956#
957# For architectures that support present-but-inaccessible (PROT_NONE) page
958# table entries detectable via pte_protnone() / pmd_protnone():
959#
960config ARCH_HAS_PTE_PROTNONE
961	bool
962
963#
964# For architectures that want to enable the support for NUMA-affine scheduler
965# balancing logic:
966#
967config ARCH_SUPPORTS_NUMA_BALANCING
968	bool
969
970#
971# For architectures that prefer to flush all TLBs after a number of pages
972# are unmapped instead of sending one IPI per page to flush. The architecture
973# must provide guarantees on what happens if a clean TLB cache entry is
974# written after the unmap. Details are in mm/rmap.c near the check for
975# should_defer_flush. The architecture should also consider if the full flush
976# and the refill costs are offset by the savings of sending fewer IPIs.
977config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
978	bool
979
980config CC_HAS_INT128
981	def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
982
983config CC_IMPLICIT_FALLTHROUGH
984	string
985	default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
986	default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
987
988config CC_MS_EXTENSIONS
989	string
990	default "-fms-anonymous-structs" if $(cc-option,-fms-anonymous-structs)
991	default "-fms-extensions"
992
993# Currently, disable gcc-10+ array-bounds globally.
994# It's still broken in gcc-13, so no upper bound yet.
995config GCC10_NO_ARRAY_BOUNDS
996	def_bool y
997
998config CC_NO_ARRAY_BOUNDS
999	bool
1000	default y if CC_IS_GCC && GCC_VERSION >= 90000 && GCC10_NO_ARRAY_BOUNDS
1001
1002# Currently, disable -Wstringop-overflow for GCC globally.
1003config GCC_NO_STRINGOP_OVERFLOW
1004	def_bool y
1005
1006config CC_NO_STRINGOP_OVERFLOW
1007	bool
1008	default y if CC_IS_GCC && GCC_NO_STRINGOP_OVERFLOW
1009
1010config CC_STRINGOP_OVERFLOW
1011	bool
1012	default y if CC_IS_GCC && !CC_NO_STRINGOP_OVERFLOW
1013
1014#
1015# For architectures that know their GCC __int128 support is sound
1016#
1017config ARCH_SUPPORTS_INT128
1018	bool
1019
1020# For architectures that (ab)use NUMA to represent different memory regions
1021# all cpu-local but of different latencies, such as SuperH.
1022#
1023config ARCH_WANT_NUMA_VARIABLE_LOCALITY
1024	bool
1025
1026config NUMA_BALANCING
1027	bool "Memory placement aware NUMA scheduler"
1028	depends on ARCH_SUPPORTS_NUMA_BALANCING
1029	depends on ARCH_HAS_PTE_PROTNONE
1030	depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY
1031	depends on SMP && NUMA_MIGRATION && !PREEMPT_RT
1032	help
1033	  This option adds support for automatic NUMA aware memory/task placement.
1034	  The mechanism is quite primitive and is based on migrating memory when
1035	  it has references to the node the task is running on.
1036
1037	  This system will be inactive on UMA systems.
1038
1039config SCHED_CACHE
1040	bool "Cache aware load balance"
1041	default y
1042	depends on SMP
1043	help
1044	  When enabled, the scheduler will attempt to aggregate tasks from
1045	  the same process onto a single Last Level Cache (LLC) domain when
1046	  possible. This improves cache locality by keeping tasks that share
1047	  resources within the same cache domain, reducing cache misses and
1048	  lowering data access latency.
1049
1050config NUMA_BALANCING_DEFAULT_ENABLED
1051	bool "Automatically enable NUMA aware memory/task placement"
1052	default y
1053	depends on NUMA_BALANCING
1054	help
1055	  If set, automatic NUMA balancing will be enabled if running on a NUMA
1056	  machine.
1057
1058config SLAB_OBJ_EXT
1059	bool
1060
1061menuconfig CGROUPS
1062	bool "Control Group support"
1063	select KERNFS
1064	help
1065	  This option adds support for grouping sets of processes together, for
1066	  use with process control subsystems such as Cpusets, CFS, memory
1067	  controls or device isolation.
1068	  See
1069		- Documentation/scheduler/sched-design-CFS.rst	(CFS)
1070		- Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation
1071					  and resource control)
1072
1073	  Say N if unsure.
1074
1075if CGROUPS
1076
1077config PAGE_COUNTER
1078	bool
1079
1080config CGROUP_FAVOR_DYNMODS
1081	bool "Favor dynamic modification latency reduction by default"
1082	help
1083	  This option enables the "favordynmods" mount option by default
1084	  which reduces the latencies of dynamic cgroup modifications such
1085	  as task migrations and controller on/offs at the cost of making
1086	  hot path operations such as forks and exits more expensive.
1087
1088	  Say N if unsure.
1089
1090config MEMCG
1091	bool "Memory controller"
1092	select PAGE_COUNTER
1093	select EVENTFD
1094	select SLAB_OBJ_EXT
1095	select VM_EVENT_COUNTERS
1096	help
1097	  Provides control over the memory footprint of tasks in a cgroup.
1098
1099config MEMCG_NMI_UNSAFE
1100	bool
1101	depends on MEMCG
1102	depends on HAVE_NMI
1103	depends on !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && !ARCH_HAVE_NMI_SAFE_CMPXCHG
1104	default y
1105
1106config MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
1107	bool
1108	depends on MEMCG
1109	depends on HAVE_NMI
1110	depends on !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && ARCH_HAVE_NMI_SAFE_CMPXCHG
1111	default y
1112
1113config MEMCG_V1
1114	bool "Legacy cgroup v1 memory controller"
1115	depends on MEMCG
1116	default n
1117	help
1118	  Legacy cgroup v1 memory controller which has been deprecated by
1119	  cgroup v2 implementation. The v1 is there for legacy applications
1120	  which haven't migrated to the new cgroup v2 interface yet. If you
1121	  do not have any such application then you are completely fine leaving
1122	  this option disabled.
1123
1124	  Please note that feature set of the legacy memory controller is likely
1125	  going to shrink due to deprecation process. New deployments with v1
1126	  controller are highly discouraged.
1127
1128	  Say N if unsure.
1129
1130config BLK_CGROUP
1131	bool "IO controller"
1132	depends on BLOCK
1133	default n
1134	help
1135	Generic block IO controller cgroup interface. This is the common
1136	cgroup interface which should be used by various IO controlling
1137	policies.
1138
1139	Currently, CFQ IO scheduler uses it to recognize task groups and
1140	control disk bandwidth allocation (proportional time slice allocation)
1141	to such task groups. It is also used by bio throttling logic in
1142	block layer to implement upper limit in IO rates on a device.
1143
1144	This option only enables generic Block IO controller infrastructure.
1145	One needs to also enable actual IO controlling logic/policy. For
1146	enabling proportional weight division of disk bandwidth in CFQ, set
1147	CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
1148	CONFIG_BLK_DEV_THROTTLING=y.
1149
1150	See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
1151
1152config CGROUP_WRITEBACK
1153	bool
1154	depends on MEMCG && BLK_CGROUP
1155	default y
1156
1157menuconfig CGROUP_SCHED
1158	bool "CPU controller"
1159	default n
1160	help
1161	  This feature lets CPU scheduler recognize task groups and control CPU
1162	  bandwidth allocation to such task groups. It uses cgroups to group
1163	  tasks.
1164
1165if CGROUP_SCHED
1166config GROUP_SCHED_WEIGHT
1167	def_bool n
1168
1169config GROUP_SCHED_BANDWIDTH
1170	def_bool n
1171
1172config FAIR_GROUP_SCHED
1173	bool "Group scheduling for SCHED_OTHER"
1174	depends on CGROUP_SCHED
1175	select GROUP_SCHED_WEIGHT
1176	default CGROUP_SCHED
1177
1178config CFS_BANDWIDTH
1179	bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
1180	depends on FAIR_GROUP_SCHED
1181	select GROUP_SCHED_BANDWIDTH
1182	default n
1183	help
1184	  This option allows users to define CPU bandwidth rates (limits) for
1185	  tasks running within the fair group scheduler.  Groups with no limit
1186	  set are considered to be unconstrained and will run with no
1187	  restriction.
1188	  See Documentation/scheduler/sched-bwc.rst for more information.
1189
1190config RT_GROUP_SCHED
1191	bool "Group scheduling for SCHED_RR/FIFO"
1192	depends on CGROUP_SCHED
1193	default n
1194	help
1195	  This feature lets you explicitly allocate real CPU bandwidth
1196	  to task groups. If enabled, it will also make it impossible to
1197	  schedule realtime tasks for non-root users until you allocate
1198	  realtime bandwidth for them.
1199	  See Documentation/scheduler/sched-rt-group.rst for more information.
1200
1201config RT_GROUP_SCHED_DEFAULT_DISABLED
1202	bool "Require boot parameter to enable group scheduling for SCHED_RR/FIFO"
1203	depends on RT_GROUP_SCHED
1204	default n
1205	help
1206	  When set, the RT group scheduling is disabled by default. The option
1207	  is in inverted form so that mere RT_GROUP_SCHED enables the group
1208	  scheduling.
1209
1210	  Say N if unsure.
1211
1212config EXT_GROUP_SCHED
1213	bool
1214	depends on SCHED_CLASS_EXT && CGROUP_SCHED
1215	select GROUP_SCHED_WEIGHT
1216	select GROUP_SCHED_BANDWIDTH
1217	default y
1218
1219endif #CGROUP_SCHED
1220
1221config EXT_SUB_SCHED
1222        def_bool y
1223        depends on SCHED_CLASS_EXT && CGROUPS
1224
1225config SCHED_MM_CID
1226	def_bool y
1227	depends on SMP && RSEQ
1228
1229config UCLAMP_TASK_GROUP
1230	bool "Utilization clamping per group of tasks"
1231	depends on CGROUP_SCHED
1232	depends on UCLAMP_TASK
1233	default n
1234	help
1235	  This feature enables the scheduler to track the clamped utilization
1236	  of each CPU based on RUNNABLE tasks currently scheduled on that CPU.
1237
1238	  When this option is enabled, the user can specify a min and max
1239	  CPU bandwidth which is allowed for each single task in a group.
1240	  The max bandwidth allows to clamp the maximum frequency a task
1241	  can use, while the min bandwidth allows to define a minimum
1242	  frequency a task will always use.
1243
1244	  When task group based utilization clamping is enabled, an eventually
1245	  specified task-specific clamp value is constrained by the cgroup
1246	  specified clamp value. Both minimum and maximum task clamping cannot
1247	  be bigger than the corresponding clamping defined at task group level.
1248
1249	  If in doubt, say N.
1250
1251config CGROUP_PIDS
1252	bool "PIDs controller"
1253	help
1254	  Provides enforcement of process number limits in the scope of a
1255	  cgroup. Any attempt to fork more processes than is allowed in the
1256	  cgroup will fail. PIDs are fundamentally a global resource because it
1257	  is fairly trivial to reach PID exhaustion before you reach even a
1258	  conservative kmemcg limit. As a result, it is possible to grind a
1259	  system to halt without being limited by other cgroup policies. The
1260	  PIDs controller is designed to stop this from happening.
1261
1262	  It should be noted that organisational operations (such as attaching
1263	  to a cgroup hierarchy) will *not* be blocked by the PIDs controller,
1264	  since the PIDs limit only affects a process's ability to fork, not to
1265	  attach to a cgroup.
1266
1267config CGROUP_RDMA
1268	bool "RDMA controller"
1269	help
1270	  Provides enforcement of RDMA resources defined by IB stack.
1271	  It is fairly easy for consumers to exhaust RDMA resources, which
1272	  can result into resource unavailability to other consumers.
1273	  RDMA controller is designed to stop this from happening.
1274	  Attaching processes with active RDMA resources to the cgroup
1275	  hierarchy is allowed even if can cross the hierarchy's limit.
1276
1277config CGROUP_DMEM
1278	bool "Device memory controller (DMEM)"
1279	select PAGE_COUNTER
1280	help
1281	  The DMEM controller allows compatible devices to restrict device
1282	  memory usage based on the cgroup hierarchy.
1283
1284	  As an example, it allows you to restrict VRAM usage for applications
1285	  in the DRM subsystem.
1286
1287config CGROUP_FREEZER
1288	bool "Freezer controller"
1289	help
1290	  Provides a way to freeze and unfreeze all tasks in a
1291	  cgroup.
1292
1293	  This option affects the ORIGINAL cgroup interface. The cgroup2 memory
1294	  controller includes important in-kernel memory consumers per default.
1295
1296	  If you're using cgroup2, say N.
1297
1298config CGROUP_HUGETLB
1299	bool "HugeTLB controller"
1300	depends on HUGETLB_PAGE
1301	select PAGE_COUNTER
1302	default n
1303	help
1304	  Provides a cgroup controller for HugeTLB pages.
1305	  When you enable this, you can put a per cgroup limit on HugeTLB usage.
1306	  The limit is enforced during page fault. Since HugeTLB doesn't
1307	  support page reclaim, enforcing the limit at page fault time implies
1308	  that, the application will get SIGBUS signal if it tries to access
1309	  HugeTLB pages beyond its limit. This requires the application to know
1310	  beforehand how much HugeTLB pages it would require for its use. The
1311	  control group is tracked in the third page lru pointer. This means
1312	  that we cannot use the controller with huge page less than 3 pages.
1313
1314config CPUSETS
1315	bool "Cpuset controller"
1316	depends on SMP
1317	select UNION_FIND
1318	select CPU_ISOLATION
1319	help
1320	  This option will let you create and manage CPUSETs which
1321	  allow dynamically partitioning a system into sets of CPUs and
1322	  Memory Nodes and assigning tasks to run only within those sets.
1323	  This is primarily useful on large SMP or NUMA systems.
1324
1325	  Say N if unsure.
1326
1327config CPUSETS_V1
1328	bool "Legacy cgroup v1 cpusets controller"
1329	depends on CPUSETS
1330	default n
1331	help
1332	  Legacy cgroup v1 cpusets controller which has been deprecated by
1333	  cgroup v2 implementation. The v1 is there for legacy applications
1334	  which haven't migrated to the new cgroup v2 interface yet. Legacy
1335	  interface includes cpuset filesystem and /proc/<pid>/cpuset. If you
1336	  do not have any such application then you are completely fine leaving
1337	  this option disabled.
1338
1339	  Say N if unsure.
1340
1341config PROC_PID_CPUSET
1342	bool "Include legacy /proc/<pid>/cpuset file"
1343	depends on CPUSETS_V1
1344	default y
1345
1346config CGROUP_DEVICE
1347	bool "Device controller"
1348	help
1349	  Provides a cgroup controller implementing whitelists for
1350	  devices which a process in the cgroup can mknod or open.
1351
1352config CGROUP_CPUACCT
1353	bool "Simple CPU accounting controller"
1354	help
1355	  Provides a simple controller for monitoring the
1356	  total CPU consumed by the tasks in a cgroup.
1357
1358config CGROUP_PERF
1359	bool "Perf controller"
1360	depends on PERF_EVENTS
1361	help
1362	  This option extends the perf per-cpu mode to restrict monitoring
1363	  to threads which belong to the cgroup specified and run on the
1364	  designated cpu.  Or this can be used to have cgroup ID in samples
1365	  so that it can monitor performance events among cgroups.
1366
1367	  Say N if unsure.
1368
1369config CGROUP_BPF
1370	bool "Support for eBPF programs attached to cgroups"
1371	depends on BPF_SYSCALL
1372	select SOCK_CGROUP_DATA
1373	help
1374	  Allow attaching eBPF programs to a cgroup using the bpf(2)
1375	  syscall command BPF_PROG_ATTACH.
1376
1377	  In which context these programs are accessed depends on the type
1378	  of attachment. For instance, programs that are attached using
1379	  BPF_CGROUP_INET_INGRESS will be executed on the ingress path of
1380	  inet sockets.
1381
1382config CGROUP_MISC
1383	bool "Misc resource controller"
1384	default n
1385	help
1386	  Provides a controller for miscellaneous resources on a host.
1387
1388	  Miscellaneous scalar resources are the resources on the host system
1389	  which cannot be abstracted like the other cgroups. This controller
1390	  tracks and limits the miscellaneous resources used by a process
1391	  attached to a cgroup hierarchy.
1392
1393	  For more information, please check misc cgroup section in
1394	  /Documentation/admin-guide/cgroup-v2.rst.
1395
1396config CGROUP_DEBUG
1397	bool "Debug controller"
1398	default n
1399	depends on DEBUG_KERNEL
1400	help
1401	  This option enables a simple controller that exports
1402	  debugging information about the cgroups framework. This
1403	  controller is for control cgroup debugging only. Its
1404	  interfaces are not stable.
1405
1406	  Say N.
1407
1408config SOCK_CGROUP_DATA
1409	bool
1410	default n
1411
1412endif # CGROUPS
1413
1414menuconfig NAMESPACES
1415	bool "Namespaces support" if EXPERT
1416	depends on MULTIUSER
1417	default !EXPERT
1418	help
1419	  Provides the way to make tasks work with different objects using
1420	  the same id. For example same IPC id may refer to different objects
1421	  or same user id or pid may refer to different tasks when used in
1422	  different namespaces.
1423
1424if NAMESPACES
1425
1426config UTS_NS
1427	bool "UTS namespace"
1428	default y
1429	help
1430	  In this namespace tasks see different info provided with the
1431	  uname() system call
1432
1433config TIME_NS
1434	bool "TIME namespace"
1435	default y
1436	help
1437	  In this namespace boottime and monotonic clocks can be set.
1438	  The time will keep going with the same pace.
1439
1440config TIME_NS_VDSO
1441	def_bool TIME_NS && GENERIC_GETTIMEOFDAY
1442
1443config IPC_NS
1444	bool "IPC namespace"
1445	depends on (SYSVIPC || POSIX_MQUEUE)
1446	default y
1447	help
1448	  In this namespace tasks work with IPC ids which correspond to
1449	  different IPC objects in different namespaces.
1450
1451config USER_NS
1452	bool "User namespace"
1453	default n
1454	help
1455	  This allows containers, i.e. vservers, to use user namespaces
1456	  to provide different user info for different servers.
1457
1458	  When user namespaces are enabled in the kernel it is
1459	  recommended that the MEMCG option also be enabled and that
1460	  user-space use the memory control groups to limit the amount
1461	  of memory a memory unprivileged users can use.
1462
1463	  If unsure, say N.
1464
1465config USER_NS_MAP_KUNIT_TEST
1466	tristate "KUint test for user namespace map insertion" if !KUNIT_ALL_TESTS
1467	depends on USER_NS && KUNIT
1468	default KUNIT_ALL_TESTS
1469	help
1470	  This builds the KUnit test for user namespace uid/gid map insertion.
1471	  It validates map insertion, limits, dynamic allocation of the
1472	  extended extents array, and mapping sorting functions.
1473
1474	  If unsure, say N.
1475
1476config PID_NS
1477	bool "PID Namespaces"
1478	default y
1479	help
1480	  Support process id namespaces.  This allows having multiple
1481	  processes with the same pid as long as they are in different
1482	  pid namespaces.  This is a building block of containers.
1483
1484config NET_NS
1485	bool "Network namespace"
1486	depends on NET
1487	default y
1488	help
1489	  Allow user space to create what appear to be multiple instances
1490	  of the network stack.
1491
1492endif # NAMESPACES
1493
1494config CHECKPOINT_RESTORE
1495	bool "Checkpoint/restore support"
1496	depends on PROC_FS
1497	select PROC_CHILDREN
1498	select KCMP
1499	default n
1500	help
1501	  Enables additional kernel features in a sake of checkpoint/restore.
1502	  In particular it adds auxiliary prctl codes to setup process text,
1503	  data and heap segment sizes, and a few additional /proc filesystem
1504	  entries.
1505
1506	  If unsure, say N here.
1507
1508config SCHED_AUTOGROUP
1509	bool "Automatic process group scheduling"
1510	select CGROUPS
1511	select CGROUP_SCHED
1512	select FAIR_GROUP_SCHED
1513	help
1514	  This option optimizes the scheduler for common desktop workloads by
1515	  automatically creating and populating task groups.  This separation
1516	  of workloads isolates aggressive CPU burners (like build jobs) from
1517	  desktop applications.  Task group autogeneration is currently based
1518	  upon task session.
1519
1520config RELAY
1521	bool "Kernel->user space relay support (formerly relayfs)"
1522	select IRQ_WORK
1523	help
1524	  This option enables support for relay interface support in
1525	  certain file systems (such as debugfs).
1526	  It is designed to provide an efficient mechanism for tools and
1527	  facilities to relay large amounts of data from kernel space to
1528	  user space.
1529
1530	  If unsure, say N.
1531
1532config BLK_DEV_INITRD
1533	bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
1534	help
1535	  The initial RAM filesystem is a ramfs which is loaded by the
1536	  boot loader (loadlin or lilo) and that is mounted as root
1537	  before the normal boot procedure. It is typically used to
1538	  load modules needed to mount the "real" root file system,
1539	  etc. See <file:Documentation/admin-guide/initrd.rst> for details.
1540
1541	  If RAM disk support (BLK_DEV_RAM) is also included, this
1542	  also enables initial RAM disk (initrd) support and adds
1543	  15 Kbytes (more on some other architectures) to the kernel size.
1544
1545	  If unsure say Y.
1546
1547if BLK_DEV_INITRD
1548
1549source "usr/Kconfig"
1550
1551endif
1552
1553config BOOT_CONFIG
1554	bool "Boot config support"
1555	select BLK_DEV_INITRD if !BOOT_CONFIG_EMBED
1556	help
1557	  Extra boot config allows system admin to pass a config file as
1558	  complemental extension of kernel cmdline when booting.
1559	  The boot config file must be attached at the end of initramfs
1560	  with checksum, size and magic word.
1561	  See <file:Documentation/admin-guide/bootconfig.rst> for details.
1562
1563	  If unsure, say Y.
1564
1565config BOOT_CONFIG_FORCE
1566	bool "Force unconditional bootconfig processing"
1567	depends on BOOT_CONFIG
1568	default y if BOOT_CONFIG_EMBED
1569	help
1570	  With this Kconfig option set, BOOT_CONFIG processing is carried
1571	  out even when the "bootconfig" kernel-boot parameter is omitted.
1572	  In fact, with this Kconfig option set, there is no way to
1573	  make the kernel ignore the BOOT_CONFIG-supplied kernel-boot
1574	  parameters.
1575
1576	  If unsure, say N.
1577
1578config BOOT_CONFIG_EMBED
1579	bool "Embed bootconfig file in the kernel"
1580	depends on BOOT_CONFIG
1581	help
1582	  Embed a bootconfig file given by BOOT_CONFIG_EMBED_FILE in the
1583	  kernel. Usually, the bootconfig file is loaded with the initrd
1584	  image. But if the system doesn't support initrd, this option will
1585	  help you by embedding a bootconfig file while building the kernel.
1586
1587	  If unsure, say N.
1588
1589config BOOT_CONFIG_EMBED_FILE
1590	string "Embedded bootconfig file path"
1591	depends on BOOT_CONFIG_EMBED
1592	help
1593	  Specify a bootconfig file which will be embedded to the kernel.
1594	  This bootconfig will be used if there is no initrd or no other
1595	  bootconfig in the initrd.
1596
1597config ARCH_SUPPORTS_CMDLINE_FROM_BOOTCONFIG
1598	bool
1599	help
1600	  Silent symbol; no C code reads it directly. Architectures
1601	  select it once their setup_arch() calls
1602	  xbc_prepend_embedded_cmdline() before parse_early_param().
1603	  Its only role is to gate the user-visible
1604	  CMDLINE_FROM_BOOTCONFIG option per-arch, the same
1605	  ARCH_SUPPORTS_* idiom used by ARCH_SUPPORTS_CFI, etc.
1606
1607config CMDLINE_FROM_BOOTCONFIG
1608	bool "Render embedded bootconfig as kernel cmdline at build time"
1609	depends on BOOT_CONFIG_EMBED_FILE != ""
1610	depends on ARCH_SUPPORTS_CMDLINE_FROM_BOOTCONFIG
1611	depends on CMDLINE = ""
1612	default n
1613	help
1614	  Render the "kernel" subtree of the embedded bootconfig file into a
1615	  flat cmdline string at kernel build time and prepend it to
1616	  boot_command_line during early architecture setup. This makes
1617	  early_param() handlers (e.g. mem=, earlycon=, loglevel=) see the
1618	  values supplied via the embedded bootconfig.
1619
1620	  The runtime bootconfig parser is unaffected, so tree-structured
1621	  consumers such as ftrace boot-time tracing keep working.
1622
1623	  Note: when an initrd also carries a bootconfig, its "kernel"
1624	  subtree is still parsed at runtime, but the embedded "kernel"
1625	  keys remain in boot_command_line for parse_early_param() and
1626	  end up later than the initrd keys in saved_command_line, so
1627	  parse_args() last-wins favors the embedded values. If you need
1628	  initrd to override embedded kernel.* keys, leave this option
1629	  off.
1630
1631	  If unsure, say N.
1632
1633config CMDLINE_LOG_WRAP_IDEAL_LEN
1634	int "Length to try to wrap the cmdline when logged at boot"
1635	default 1021
1636	range 0 1021
1637	help
1638	  At boot time, the kernel command line is logged to the console.
1639	  The log message will start with the prefix "Kernel command line: ".
1640	  The log message will attempt to be wrapped (split into multiple log
1641	  messages) at spaces based on CMDLINE_LOG_WRAP_IDEAL_LEN characters.
1642	  If wrapping happens, each log message will start with the prefix and
1643	  all but the last message will end with " \". Messages may exceed the
1644	  ideal length if a place to wrap isn't found before the specified
1645	  number of characters.
1646
1647	  A value of 0 disables wrapping, though be warned that the maximum
1648	  length of a log message (1021 characters) may cause the cmdline to
1649	  be truncated.
1650
1651config INITRAMFS_PRESERVE_MTIME
1652	bool "Preserve cpio archive mtimes in initramfs"
1653	depends on BLK_DEV_INITRD
1654	default y
1655	help
1656	  Each entry in an initramfs cpio archive carries an mtime value. When
1657	  enabled, extracted cpio items take this mtime, with directory mtime
1658	  setting deferred until after creation of any child entries.
1659
1660	  If unsure, say Y.
1661
1662config INITRAMFS_TEST
1663	bool "Test initramfs cpio archive extraction" if !KUNIT_ALL_TESTS
1664	depends on BLK_DEV_INITRD && KUNIT=y
1665	default KUNIT_ALL_TESTS
1666	help
1667	  Build KUnit tests for initramfs. See Documentation/dev-tools/kunit
1668
1669choice
1670	prompt "Compiler optimization level"
1671	default CC_OPTIMIZE_FOR_PERFORMANCE
1672
1673config CC_OPTIMIZE_FOR_PERFORMANCE
1674	bool "Optimize for performance (-O2)"
1675	help
1676	  This is the default optimization level for the kernel, building
1677	  with the "-O2" compiler flag for best performance and most
1678	  helpful compile-time warnings.
1679
1680config CC_OPTIMIZE_FOR_SIZE
1681	bool "Optimize for size (-Os)"
1682	help
1683	  Choosing this option will pass "-Os" to your compiler resulting
1684	  in a smaller kernel.
1685
1686endchoice
1687
1688config HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1689	bool
1690	help
1691	  This requires that the arch annotates or otherwise protects
1692	  its external entry points from being discarded. Linker scripts
1693	  must also merge .text.*, .data.*, and .bss.* correctly into
1694	  output sections. Care must be taken not to pull in unrelated
1695	  sections (e.g., '.text.init'). Typically '.' in section names
1696	  is used to distinguish them from label names / C identifiers.
1697
1698config LD_DEAD_CODE_DATA_ELIMINATION
1699	bool "Dead code and data elimination (EXPERIMENTAL)"
1700	depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1701	depends on EXPERT
1702	depends on $(cc-option,-ffunction-sections -fdata-sections)
1703	depends on $(ld-option,--gc-sections)
1704	help
1705	  Enable this if you want to do dead code and data elimination with
1706	  the linker by compiling with -ffunction-sections -fdata-sections,
1707	  and linking with --gc-sections.
1708
1709	  This can reduce on disk and in-memory size of the kernel
1710	  code and static data, particularly for small configs and
1711	  on small systems. This has the possibility of introducing
1712	  silently broken kernel if the required annotations are not
1713	  present. This option is not well tested yet, so use at your
1714	  own risk.
1715
1716config LD_ORPHAN_WARN
1717	def_bool y
1718	depends on ARCH_WANT_LD_ORPHAN_WARN
1719	depends on $(ld-option,--orphan-handling=warn)
1720	depends on $(ld-option,--orphan-handling=error)
1721
1722config LD_ORPHAN_WARN_LEVEL
1723	string
1724	depends on LD_ORPHAN_WARN
1725	default "error" if WERROR
1726	default "warn"
1727
1728config HAVE_UID16
1729	bool
1730
1731config SYSCTL_EXCEPTION_TRACE
1732	bool
1733	help
1734	  Enable support for /proc/sys/debug/exception-trace.
1735
1736config SYSCTL_ARCH_UNALIGN_NO_WARN
1737	bool
1738	help
1739	  Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
1740	  Allows arch to define/use @no_unaligned_warning to possibly warn
1741	  about unaligned access emulation going on under the hood.
1742
1743config SYSCTL_ARCH_UNALIGN_ALLOW
1744	bool
1745	help
1746	  Enable support for /proc/sys/kernel/unaligned-trap
1747	  Allows arches to define/use @unaligned_enabled to runtime toggle
1748	  the unaligned access emulation.
1749	  see arch/parisc/kernel/unaligned.c for reference
1750
1751config SYSFS_SYSCALL
1752	bool "Sysfs syscall support"
1753	default n
1754	help
1755	  sys_sysfs is an obsolete system call no longer supported in libc.
1756	  Note that disabling this option is more secure but might break
1757	  compatibility with some systems.
1758
1759	  If unsure say N here.
1760
1761config HAVE_PCSPKR_PLATFORM
1762	bool
1763
1764menuconfig EXPERT
1765	bool "Configure standard kernel features (expert users)"
1766	# Unhide debug options, to make the on-by-default options visible
1767	select DEBUG_KERNEL
1768	help
1769	  This option allows certain base kernel options and settings
1770	  to be disabled or tweaked. This is for specialized
1771	  environments which can tolerate a "non-standard" kernel.
1772	  Only use this if you really know what you are doing.
1773
1774config UID16
1775	bool "Enable 16-bit UID system calls" if EXPERT
1776	depends on HAVE_UID16 && MULTIUSER
1777	default y
1778	help
1779	  This enables the legacy 16-bit UID syscall wrappers.
1780
1781config MULTIUSER
1782	bool "Multiple users, groups and capabilities support" if EXPERT
1783	default y
1784	help
1785	  This option enables support for non-root users, groups and
1786	  capabilities.
1787
1788	  If you say N here, all processes will run with UID 0, GID 0, and all
1789	  possible capabilities.  Saying N here also compiles out support for
1790	  system calls related to UIDs, GIDs, and capabilities, such as setuid,
1791	  setgid, and capset.
1792
1793	  If unsure, say Y here.
1794
1795config SGETMASK_SYSCALL
1796	bool "sgetmask/ssetmask syscalls support" if EXPERT
1797	default PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
1798	help
1799	  sys_sgetmask and sys_ssetmask are obsolete system calls
1800	  no longer supported in libc but still enabled by default in some
1801	  architectures.
1802
1803	  If unsure, leave the default option here.
1804
1805config FHANDLE
1806	bool "open by fhandle syscalls" if EXPERT
1807	select EXPORTFS
1808	default y
1809	help
1810	  If you say Y here, a user level program will be able to map
1811	  file names to handle and then later use the handle for
1812	  different file system operations. This is useful in implementing
1813	  userspace file servers, which now track files using handles instead
1814	  of names. The handle would remain the same even if file names
1815	  get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2)
1816	  syscalls.
1817
1818config POSIX_TIMERS
1819	bool "Posix Clocks & timers" if EXPERT
1820	default y
1821	help
1822	  This includes native support for POSIX timers to the kernel.
1823	  Some embedded systems have no use for them and therefore they
1824	  can be configured out to reduce the size of the kernel image.
1825
1826	  When this option is disabled, the following syscalls won't be
1827	  available: timer_create, timer_gettime: timer_getoverrun,
1828	  timer_settime, timer_delete, clock_adjtime, getitimer,
1829	  setitimer, alarm. Furthermore, the clock_settime, clock_gettime,
1830	  clock_getres and clock_nanosleep syscalls will be limited to
1831	  CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_BOOTTIME only.
1832
1833	  If unsure say y.
1834
1835config PRINTK
1836	default y
1837	bool "Enable support for printk" if EXPERT
1838	select IRQ_WORK
1839	help
1840	  This option enables normal printk support. Removing it
1841	  eliminates most of the message strings from the kernel image
1842	  and makes the kernel more or less silent. As this makes it
1843	  very difficult to diagnose system problems, saying N here is
1844	  strongly discouraged.
1845
1846config PRINTK_RINGBUFFER_KUNIT_TEST
1847	tristate "KUnit Test for the printk ringbuffer" if !KUNIT_ALL_TESTS
1848	depends on PRINTK && KUNIT
1849	default KUNIT_ALL_TESTS
1850	help
1851	  This builds the printk ringbuffer KUnit test suite.
1852
1853	  For more information on KUnit and unit tests in general, please refer
1854	  to the KUnit documentation.
1855
1856	  If unsure, say N.
1857
1858config BUG
1859	bool "BUG() support" if EXPERT
1860	default y
1861	help
1862	  Disabling this option eliminates support for BUG and WARN, reducing
1863	  the size of your kernel image and potentially quietly ignoring
1864	  numerous fatal conditions. You should only consider disabling this
1865	  option for embedded systems with no facilities for reporting errors.
1866	  Just say Y.
1867
1868config ELF_CORE
1869	depends on COREDUMP
1870	default y
1871	bool "Enable ELF core dumps" if EXPERT
1872	help
1873	  Enable support for generating core dumps. Disabling saves about 4k.
1874
1875
1876config PCSPKR_PLATFORM
1877	bool "Enable PC-Speaker support" if EXPERT
1878	depends on HAVE_PCSPKR_PLATFORM
1879	select I8253_LOCK
1880	default y
1881	help
1882	  This option allows to disable the internal PC-Speaker
1883	  support, saving some memory.
1884
1885config BASE_SMALL
1886	bool "Enable smaller-sized data structures for core" if EXPERT
1887	help
1888	  Enabling this option reduces the size of miscellaneous core
1889	  kernel data structures. This saves memory on small machines,
1890	  but may reduce performance.
1891
1892config FUTEX
1893	bool "Enable futex support" if EXPERT
1894	depends on !(SPARC32 && SMP)
1895	default y
1896	imply RT_MUTEXES
1897	help
1898	  Disabling this option will cause the kernel to be built without
1899	  support for "fast userspace mutexes".  The resulting kernel may not
1900	  run glibc-based applications correctly.
1901
1902config FUTEX_PI
1903	bool
1904	depends on FUTEX && RT_MUTEXES
1905	default y
1906
1907config FUTEX_PRIVATE_HASH
1908	bool
1909	depends on FUTEX && !BASE_SMALL && MMU
1910	default y
1911
1912config FUTEX_MPOL
1913	bool
1914	depends on FUTEX && NUMA
1915	default y
1916
1917config HAVE_FUTEX_ROBUST_UNLOCK
1918	bool
1919
1920config FUTEX_ROBUST_UNLOCK
1921	def_bool FUTEX && GENERIC_IRQ_ENTRY && RSEQ && HAVE_FUTEX_ROBUST_UNLOCK
1922
1923config EPOLL
1924	bool "Enable eventpoll support" if EXPERT
1925	default y
1926	help
1927	  Disabling this option will cause the kernel to be built without
1928	  support for epoll family of system calls.
1929
1930config SIGNALFD
1931	bool "Enable signalfd() system call" if EXPERT
1932	default y
1933	help
1934	  Enable the signalfd() system call that allows to receive signals
1935	  on a file descriptor.
1936
1937	  If unsure, say Y.
1938
1939config TIMERFD
1940	bool "Enable timerfd() system call" if EXPERT
1941	default y
1942	help
1943	  Enable the timerfd() system call that allows to receive timer
1944	  events on a file descriptor.
1945
1946	  If unsure, say Y.
1947
1948config EVENTFD
1949	bool "Enable eventfd() system call" if EXPERT
1950	default y
1951	help
1952	  Enable the eventfd() system call that allows to receive both
1953	  kernel notification (ie. KAIO) or userspace notifications.
1954
1955	  If unsure, say Y.
1956
1957config SHMEM
1958	bool "Use full shmem filesystem" if EXPERT
1959	default y
1960	depends on MMU
1961	help
1962	  The shmem is an internal filesystem used to manage shared memory.
1963	  It is backed by swap and manages resource limits. It is also exported
1964	  to userspace as tmpfs if TMPFS is enabled. Disabling this
1965	  option replaces shmem and tmpfs with the much simpler ramfs code,
1966	  which may be appropriate on small systems without swap.
1967
1968config AIO
1969	bool "Enable AIO support" if EXPERT
1970	default y
1971	help
1972	  This option enables POSIX asynchronous I/O which may by used
1973	  by some high performance threaded applications. Disabling
1974	  this option saves about 7k.
1975
1976config IO_URING
1977	bool "Enable IO uring support" if EXPERT
1978	select IO_WQ
1979	default y
1980	help
1981	  This option enables support for the io_uring interface, enabling
1982	  applications to submit and complete IO through submission and
1983	  completion rings that are shared between the kernel and application.
1984
1985config GCOV_PROFILE_URING
1986	bool "Enable GCOV profiling on the io_uring subsystem"
1987	depends on IO_URING && GCOV_KERNEL
1988	help
1989	  Enable GCOV profiling on the io_uring subsystem, to facilitate
1990	  code coverage testing.
1991
1992	  If unsure, say N.
1993
1994	  Note that this will have a negative impact on the performance of
1995	  the io_uring subsystem, hence this should only be enabled for
1996	  specific test purposes.
1997
1998config IO_URING_MOCK_FILE
1999	tristate "Enable io_uring mock files (Experimental)" if EXPERT
2000	default n
2001	depends on IO_URING
2002	help
2003	  Enable mock files for io_uring subsystem testing. The ABI might
2004	  still change, so it's still experimental and should only be enabled
2005	  for specific test purposes.
2006
2007	  If unsure, say N.
2008
2009config ADVISE_SYSCALLS
2010	bool "Enable madvise/fadvise syscalls" if EXPERT
2011	default y
2012	help
2013	  This option enables the madvise and fadvise syscalls, used by
2014	  applications to advise the kernel about their future memory or file
2015	  usage, improving performance. If building an embedded system where no
2016	  applications use these syscalls, you can disable this option to save
2017	  space.
2018
2019config MEMBARRIER
2020	bool "Enable membarrier() system call" if EXPERT
2021	default y
2022	help
2023	  Enable the membarrier() system call that allows issuing memory
2024	  barriers across all running threads, which can be used to distribute
2025	  the cost of user-space memory barriers asymmetrically by transforming
2026	  pairs of memory barriers into pairs consisting of membarrier() and a
2027	  compiler barrier.
2028
2029	  If unsure, say Y.
2030
2031config KCMP
2032	bool "Enable kcmp() system call" if EXPERT
2033	help
2034	  Enable the kernel resource comparison system call. It provides
2035	  user-space with the ability to compare two processes to see if they
2036	  share a common resource, such as a file descriptor or even virtual
2037	  memory space.
2038
2039	  If unsure, say N.
2040
2041config RSEQ
2042	bool "Enable rseq() system call" if EXPERT
2043	default y
2044	depends on HAVE_RSEQ
2045	select MEMBARRIER
2046	help
2047	  Enable the restartable sequences system call. It provides a
2048	  user-space cache for the current CPU number value, which
2049	  speeds up getting the current CPU number from user-space,
2050	  as well as an ABI to speed up user-space operations on
2051	  per-CPU data.
2052
2053	  If unsure, say Y.
2054
2055config RSEQ_SLICE_EXTENSION
2056	bool "Enable rseq-based time slice extension mechanism"
2057	depends on RSEQ && HIGH_RES_TIMERS && GENERIC_ENTRY && HAVE_GENERIC_TIF_BITS
2058	help
2059	  Allows userspace to request a limited time slice extension when
2060	  returning from an interrupt to user space via the RSEQ shared
2061	  data ABI. If granted, that allows to complete a critical section,
2062	  so that other threads are not stuck on a conflicted resource,
2063	  while the task is scheduled out.
2064
2065	  If unsure, say N.
2066
2067config RSEQ_STATS
2068	default n
2069	bool "Enable lightweight statistics of restartable sequences" if EXPERT
2070	depends on RSEQ && DEBUG_FS
2071	help
2072	  Enable lightweight counters which expose information about the
2073	  frequency of RSEQ operations via debugfs. Mostly interesting for
2074	  kernel debugging or performance analysis. While lightweight it's
2075	  still adding code into the user/kernel mode transitions.
2076
2077	  If unsure, say N.
2078
2079config RSEQ_DEBUG_DEFAULT_ENABLE
2080	default n
2081	bool "Enable restartable sequences debug mode by default" if EXPERT
2082	depends on RSEQ
2083	help
2084	  This enables the static branch for debug mode of restartable
2085	  sequences.
2086
2087	  This also can be controlled on the kernel command line via the
2088	  command line parameter "rseq_debug=0/1" and through debugfs.
2089
2090	  If unsure, say N.
2091
2092config DEBUG_RSEQ
2093	default n
2094	bool "Enable debugging of rseq() system call" if EXPERT
2095	depends on RSEQ && DEBUG_KERNEL && !GENERIC_ENTRY
2096	select RSEQ_DEBUG_DEFAULT_ENABLE
2097	help
2098	  Enable extra debugging checks for the rseq system call.
2099
2100	  If unsure, say N.
2101
2102config CACHESTAT_SYSCALL
2103	bool "Enable cachestat() system call" if EXPERT
2104	default y
2105	help
2106	  Enable the cachestat system call, which queries the page cache
2107	  statistics of a file (number of cached pages, dirty pages,
2108	  pages marked for writeback, (recently) evicted pages).
2109
2110	  If unsure say Y here.
2111
2112config KALLSYMS
2113	bool "Load all symbols for debugging/ksymoops" if EXPERT
2114	default y
2115	help
2116	  Say Y here to let the kernel print out symbolic crash information and
2117	  symbolic stack backtraces. This increases the size of the kernel
2118	  somewhat, as all symbols have to be loaded into the kernel image.
2119
2120config KALLSYMS_SELFTEST
2121	bool "Test the basic functions and performance of kallsyms"
2122	depends on KALLSYMS
2123	default n
2124	help
2125	  Test the basic functions and performance of some interfaces, such as
2126	  kallsyms_lookup_name. It also calculates the compression rate of the
2127	  kallsyms compression algorithm for the current symbol set.
2128
2129	  Start self-test automatically after system startup. Suggest executing
2130	  "dmesg | grep kallsyms_selftest" to collect test results. "finish" is
2131	  displayed in the last line, indicating that the test is complete.
2132
2133config KALLSYMS_ALL
2134	bool "Include all symbols in kallsyms"
2135	depends on DEBUG_KERNEL && KALLSYMS
2136	help
2137	  Normally kallsyms only contains the symbols of functions for nicer
2138	  OOPS messages and backtraces (i.e., symbols from the text and inittext
2139	  sections). This is sufficient for most cases. And only if you want to
2140	  enable kernel live patching, or other less common use cases (e.g.,
2141	  when a debugger is used) all symbols are required (i.e., names of
2142	  variables from the data sections, etc).
2143
2144	  This option makes sure that all symbols are loaded into the kernel
2145	  image (i.e., symbols from all sections) in cost of increased kernel
2146	  size (depending on the kernel configuration, it may be 300KiB or
2147	  something like this).
2148
2149	  Say N unless you really need all symbols, or kernel live patching.
2150
2151# end of the "standard kernel features (expert users)" menu
2152
2153config ARCH_HAS_MEMBARRIER_CALLBACKS
2154	bool
2155
2156config ARCH_HAS_MEMBARRIER_SYNC_CORE
2157	bool
2158
2159config ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
2160	bool
2161	help
2162	  Control MSEAL_SYSTEM_MAPPINGS access based on architecture.
2163
2164	  A 64-bit kernel is required for the memory sealing feature.
2165	  No specific hardware features from the CPU are needed.
2166
2167	  To enable this feature, the architecture needs to update their
2168	  special mappings calls to include the sealing flag and confirm
2169	  that it doesn't unmap/remap system mappings during the life
2170	  time of the process. The existence of this flag for an architecture
2171	  implies that it does not require the remapping of the system
2172	  mappings during process lifetime, so sealing these mappings is safe
2173	  from a kernel perspective.
2174
2175	  After the architecture enables this, a distribution can set
2176	  CONFIG_MSEAL_SYSTEM_MAPPINGS to manage access to the feature.
2177
2178	  For complete descriptions of memory sealing, please see
2179	  Documentation/userspace-api/mseal.rst
2180
2181config HAVE_PERF_EVENTS
2182	bool
2183	help
2184	  See tools/perf/design.txt for details.
2185
2186config GUEST_PERF_EVENTS
2187	bool
2188	depends on HAVE_PERF_EVENTS
2189
2190config PERF_GUEST_MEDIATED_PMU
2191	bool
2192	depends on GUEST_PERF_EVENTS
2193
2194config PERF_USE_VMALLOC
2195	bool
2196	help
2197	  See tools/perf/design.txt for details
2198
2199menu "Kernel Performance Events And Counters"
2200
2201config PERF_EVENTS
2202	bool "Kernel performance events and counters"
2203	default y if PROFILING
2204	depends on HAVE_PERF_EVENTS
2205	select IRQ_WORK
2206	help
2207	  Enable kernel support for various performance events provided
2208	  by software and hardware.
2209
2210	  Software events are supported either built-in or via the
2211	  use of generic tracepoints.
2212
2213	  Most modern CPUs support performance events via performance
2214	  counter registers. These registers count the number of certain
2215	  types of hw events: such as instructions executed, cachemisses
2216	  suffered, or branches mis-predicted - without slowing down the
2217	  kernel or applications. These registers can also trigger interrupts
2218	  when a threshold number of events have passed - and can thus be
2219	  used to profile the code that runs on that CPU.
2220
2221	  The Linux Performance Event subsystem provides an abstraction of
2222	  these software and hardware event capabilities, available via a
2223	  system call and used by the "perf" utility in tools/perf/. It
2224	  provides per task and per CPU counters, and it provides event
2225	  capabilities on top of those.
2226
2227	  Say Y if unsure.
2228
2229config DEBUG_PERF_USE_VMALLOC
2230	default n
2231	bool "Debug: use vmalloc to back perf mmap() buffers"
2232	depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
2233	select PERF_USE_VMALLOC
2234	help
2235	  Use vmalloc memory to back perf mmap() buffers.
2236
2237	  Mostly useful for debugging the vmalloc code on platforms
2238	  that don't require it.
2239
2240	  Say N if unsure.
2241
2242endmenu
2243
2244config SYSTEM_DATA_VERIFICATION
2245	def_bool n
2246	select SYSTEM_TRUSTED_KEYRING
2247	select KEYS
2248	select CRYPTO
2249	select CRYPTO_RSA
2250	select ASYMMETRIC_KEY_TYPE
2251	select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
2252	select ASN1
2253	select OID_REGISTRY
2254	select X509_CERTIFICATE_PARSER
2255	select PKCS7_MESSAGE_PARSER
2256	help
2257	  Provide PKCS#7 message verification using the contents of the system
2258	  trusted keyring to provide public keys.  This then can be used for
2259	  module verification, kexec image verification and firmware blob
2260	  verification.
2261
2262config PROFILING
2263	bool "Profiling support"
2264	help
2265	  Say Y here to enable the extended profiling support mechanisms used
2266	  by profilers.
2267
2268config RUST
2269	bool "Rust support"
2270	depends on HAVE_RUST
2271	depends on RUST_IS_AVAILABLE
2272	select EXTENDED_MODVERSIONS if MODVERSIONS
2273	depends on !MODVERSIONS || GENDWARFKSYMS
2274	depends on !GCC_PLUGIN_RANDSTRUCT
2275	depends on !RANDSTRUCT
2276	depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
2277	depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
2278	select CFI_ICALL_NORMALIZE_INTEGERS if CFI
2279	depends on !KASAN || CC_IS_CLANG
2280	depends on !KASAN_SW_TAGS || RUSTC_VERSION >= 109600
2281	help
2282	  Enables Rust support in the kernel.
2283
2284	  This allows other Rust-related options, like drivers written in Rust,
2285	  to be selected.
2286
2287	  It is also required to be able to load external kernel modules
2288	  written in Rust.
2289
2290	  See Documentation/rust/ for more information.
2291
2292	  If unsure, say N.
2293
2294source "rust/kernel/Kconfig.test"
2295
2296config RUSTC_VERSION_TEXT
2297	string
2298	depends on RUST
2299	default "$(RUSTC_VERSION_TEXT)"
2300	help
2301	  See `CC_VERSION_TEXT`.
2302
2303config BINDGEN_VERSION_TEXT
2304	string
2305	depends on RUST
2306	default "$(shell,$(BINDGEN) --version 2>/dev/null)"
2307
2308#
2309# Place an empty function call at each tracepoint site. Can be
2310# dynamically changed for a probe function.
2311#
2312config TRACEPOINTS
2313	bool
2314	select TASKS_TRACE_RCU
2315
2316source "kernel/Kconfig.kexec"
2317
2318source "kernel/liveupdate/Kconfig"
2319
2320endmenu		# General setup
2321
2322source "arch/Kconfig"
2323
2324config RT_MUTEXES
2325	bool
2326	default y if PREEMPT_RT
2327
2328config MODULE_SIG_FORMAT
2329	def_bool n
2330	select SYSTEM_DATA_VERIFICATION
2331
2332source "kernel/module/Kconfig"
2333
2334config INIT_ALL_POSSIBLE
2335	bool
2336	help
2337	  Back when each arch used to define their own cpu_online_mask and
2338	  cpu_possible_mask, some of them chose to initialize cpu_possible_mask
2339	  with all 1s, and others with all 0s.  When they were centralised,
2340	  it was better to provide this option than to break all the archs
2341	  and have several arch maintainers pursuing me down dark alleys.
2342
2343source "block/Kconfig"
2344
2345config PREEMPT_NOTIFIERS
2346	bool
2347
2348config PADATA
2349	depends on SMP
2350	bool
2351
2352config ASN1
2353	tristate
2354	help
2355	  Build a simple ASN.1 grammar compiler that produces a bytecode output
2356	  that can be interpreted by the ASN.1 stream decoder and used to
2357	  inform it as to what tags are to be expected in a stream and what
2358	  functions to call on what tags.
2359
2360source "kernel/Kconfig.locks"
2361
2362config ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
2363	bool
2364
2365config ARCH_HAS_PREPARE_SYNC_CORE_CMD
2366	bool
2367
2368config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
2369	bool
2370
2371# It may be useful for an architecture to override the definitions of the
2372# SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>
2373# and the COMPAT_ variants in <linux/compat.h>, in particular to use a
2374# different calling convention for syscalls. They can also override the
2375# macros for not-implemented syscalls in kernel/sys_ni.c and
2376# kernel/time/posix-stubs.c. All these overrides need to be available in
2377# <asm/syscall_wrapper.h>.
2378config ARCH_HAS_SYSCALL_WRAPPER
2379	def_bool n
2380