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