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