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