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