xref: /linux/init/Kconfig (revision e9ef810dfee7a2227da9d423aecb0ced35faddbe)
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
881config SCHED_PROXY_EXEC
882	bool "Proxy Execution"
883	# Avoid some build failures w/ PREEMPT_RT until it can be fixed
884	depends on !PREEMPT_RT
885	# Need to investigate how to inform sched_ext of split contexts
886	depends on !SCHED_CLASS_EXT
887	# Not particularly useful until we get to multi-rq proxying
888	depends on EXPERT
889	help
890	  This option enables proxy execution, a mechanism for mutex-owning
891	  tasks to inherit the scheduling context of higher priority waiters.
892
893endmenu
894
895#
896# For architectures that want to enable the support for NUMA-affine scheduler
897# balancing logic:
898#
899config ARCH_SUPPORTS_NUMA_BALANCING
900	bool
901
902#
903# For architectures that prefer to flush all TLBs after a number of pages
904# are unmapped instead of sending one IPI per page to flush. The architecture
905# must provide guarantees on what happens if a clean TLB cache entry is
906# written after the unmap. Details are in mm/rmap.c near the check for
907# should_defer_flush. The architecture should also consider if the full flush
908# and the refill costs are offset by the savings of sending fewer IPIs.
909config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
910	bool
911
912config CC_HAS_INT128
913	def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
914
915config CC_IMPLICIT_FALLTHROUGH
916	string
917	default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
918	default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
919
920# Currently, disable gcc-10+ array-bounds globally.
921# It's still broken in gcc-13, so no upper bound yet.
922config GCC10_NO_ARRAY_BOUNDS
923	def_bool y
924
925config CC_NO_ARRAY_BOUNDS
926	bool
927	default y if CC_IS_GCC && GCC_VERSION >= 90000 && GCC10_NO_ARRAY_BOUNDS
928
929# Currently, disable -Wstringop-overflow for GCC globally.
930config GCC_NO_STRINGOP_OVERFLOW
931	def_bool y
932
933config CC_NO_STRINGOP_OVERFLOW
934	bool
935	default y if CC_IS_GCC && GCC_NO_STRINGOP_OVERFLOW
936
937config CC_STRINGOP_OVERFLOW
938	bool
939	default y if CC_IS_GCC && !CC_NO_STRINGOP_OVERFLOW
940
941#
942# For architectures that know their GCC __int128 support is sound
943#
944config ARCH_SUPPORTS_INT128
945	bool
946
947# For architectures that (ab)use NUMA to represent different memory regions
948# all cpu-local but of different latencies, such as SuperH.
949#
950config ARCH_WANT_NUMA_VARIABLE_LOCALITY
951	bool
952
953config NUMA_BALANCING
954	bool "Memory placement aware NUMA scheduler"
955	depends on ARCH_SUPPORTS_NUMA_BALANCING
956	depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY
957	depends on SMP && NUMA && MIGRATION && !PREEMPT_RT
958	help
959	  This option adds support for automatic NUMA aware memory/task placement.
960	  The mechanism is quite primitive and is based on migrating memory when
961	  it has references to the node the task is running on.
962
963	  This system will be inactive on UMA systems.
964
965config NUMA_BALANCING_DEFAULT_ENABLED
966	bool "Automatically enable NUMA aware memory/task placement"
967	default y
968	depends on NUMA_BALANCING
969	help
970	  If set, automatic NUMA balancing will be enabled if running on a NUMA
971	  machine.
972
973config SLAB_OBJ_EXT
974	bool
975
976menuconfig CGROUPS
977	bool "Control Group support"
978	select KERNFS
979	help
980	  This option adds support for grouping sets of processes together, for
981	  use with process control subsystems such as Cpusets, CFS, memory
982	  controls or device isolation.
983	  See
984		- Documentation/scheduler/sched-design-CFS.rst	(CFS)
985		- Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation
986					  and resource control)
987
988	  Say N if unsure.
989
990if CGROUPS
991
992config PAGE_COUNTER
993	bool
994
995config CGROUP_FAVOR_DYNMODS
996        bool "Favor dynamic modification latency reduction by default"
997        help
998          This option enables the "favordynmods" mount option by default
999          which reduces the latencies of dynamic cgroup modifications such
1000          as task migrations and controller on/offs at the cost of making
1001          hot path operations such as forks and exits more expensive.
1002
1003          Say N if unsure.
1004
1005config MEMCG
1006	bool "Memory controller"
1007	select PAGE_COUNTER
1008	select EVENTFD
1009	select SLAB_OBJ_EXT
1010	select VM_EVENT_COUNTERS
1011	help
1012	  Provides control over the memory footprint of tasks in a cgroup.
1013
1014config MEMCG_NMI_UNSAFE
1015	bool
1016	depends on MEMCG
1017	depends on HAVE_NMI
1018	depends on !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && !ARCH_HAVE_NMI_SAFE_CMPXCHG
1019	default y
1020
1021config MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
1022	bool
1023	depends on MEMCG
1024	depends on HAVE_NMI
1025	depends on !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && ARCH_HAVE_NMI_SAFE_CMPXCHG
1026	default y
1027
1028config MEMCG_V1
1029	bool "Legacy cgroup v1 memory controller"
1030	depends on MEMCG
1031	default n
1032	help
1033	  Legacy cgroup v1 memory controller which has been deprecated by
1034	  cgroup v2 implementation. The v1 is there for legacy applications
1035	  which haven't migrated to the new cgroup v2 interface yet. If you
1036	  do not have any such application then you are completely fine leaving
1037	  this option disabled.
1038
1039	  Please note that feature set of the legacy memory controller is likely
1040	  going to shrink due to deprecation process. New deployments with v1
1041	  controller are highly discouraged.
1042
1043	  Say N if unsure.
1044
1045config BLK_CGROUP
1046	bool "IO controller"
1047	depends on BLOCK
1048	default n
1049	help
1050	Generic block IO controller cgroup interface. This is the common
1051	cgroup interface which should be used by various IO controlling
1052	policies.
1053
1054	Currently, CFQ IO scheduler uses it to recognize task groups and
1055	control disk bandwidth allocation (proportional time slice allocation)
1056	to such task groups. It is also used by bio throttling logic in
1057	block layer to implement upper limit in IO rates on a device.
1058
1059	This option only enables generic Block IO controller infrastructure.
1060	One needs to also enable actual IO controlling logic/policy. For
1061	enabling proportional weight division of disk bandwidth in CFQ, set
1062	CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
1063	CONFIG_BLK_DEV_THROTTLING=y.
1064
1065	See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
1066
1067config CGROUP_WRITEBACK
1068	bool
1069	depends on MEMCG && BLK_CGROUP
1070	default y
1071
1072menuconfig CGROUP_SCHED
1073	bool "CPU controller"
1074	default n
1075	help
1076	  This feature lets CPU scheduler recognize task groups and control CPU
1077	  bandwidth allocation to such task groups. It uses cgroups to group
1078	  tasks.
1079
1080if CGROUP_SCHED
1081config GROUP_SCHED_WEIGHT
1082	def_bool n
1083
1084config GROUP_SCHED_BANDWIDTH
1085        def_bool n
1086
1087config FAIR_GROUP_SCHED
1088	bool "Group scheduling for SCHED_OTHER"
1089	depends on CGROUP_SCHED
1090	select GROUP_SCHED_WEIGHT
1091	default CGROUP_SCHED
1092
1093config CFS_BANDWIDTH
1094	bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
1095	depends on FAIR_GROUP_SCHED
1096	select GROUP_SCHED_BANDWIDTH
1097	default n
1098	help
1099	  This option allows users to define CPU bandwidth rates (limits) for
1100	  tasks running within the fair group scheduler.  Groups with no limit
1101	  set are considered to be unconstrained and will run with no
1102	  restriction.
1103	  See Documentation/scheduler/sched-bwc.rst for more information.
1104
1105config RT_GROUP_SCHED
1106	bool "Group scheduling for SCHED_RR/FIFO"
1107	depends on CGROUP_SCHED
1108	default n
1109	help
1110	  This feature lets you explicitly allocate real CPU bandwidth
1111	  to task groups. If enabled, it will also make it impossible to
1112	  schedule realtime tasks for non-root users until you allocate
1113	  realtime bandwidth for them.
1114	  See Documentation/scheduler/sched-rt-group.rst for more information.
1115
1116config RT_GROUP_SCHED_DEFAULT_DISABLED
1117	bool "Require boot parameter to enable group scheduling for SCHED_RR/FIFO"
1118	depends on RT_GROUP_SCHED
1119	default n
1120	help
1121	  When set, the RT group scheduling is disabled by default. The option
1122	  is in inverted form so that mere RT_GROUP_SCHED enables the group
1123	  scheduling.
1124
1125	  Say N if unsure.
1126
1127config EXT_GROUP_SCHED
1128	bool
1129	depends on SCHED_CLASS_EXT && CGROUP_SCHED
1130	select GROUP_SCHED_WEIGHT
1131	select GROUP_SCHED_BANDWIDTH
1132	default y
1133
1134endif #CGROUP_SCHED
1135
1136config SCHED_MM_CID
1137	def_bool y
1138	depends on SMP && RSEQ
1139
1140config UCLAMP_TASK_GROUP
1141	bool "Utilization clamping per group of tasks"
1142	depends on CGROUP_SCHED
1143	depends on UCLAMP_TASK
1144	default n
1145	help
1146	  This feature enables the scheduler to track the clamped utilization
1147	  of each CPU based on RUNNABLE tasks currently scheduled on that CPU.
1148
1149	  When this option is enabled, the user can specify a min and max
1150	  CPU bandwidth which is allowed for each single task in a group.
1151	  The max bandwidth allows to clamp the maximum frequency a task
1152	  can use, while the min bandwidth allows to define a minimum
1153	  frequency a task will always use.
1154
1155	  When task group based utilization clamping is enabled, an eventually
1156	  specified task-specific clamp value is constrained by the cgroup
1157	  specified clamp value. Both minimum and maximum task clamping cannot
1158	  be bigger than the corresponding clamping defined at task group level.
1159
1160	  If in doubt, say N.
1161
1162config CGROUP_PIDS
1163	bool "PIDs controller"
1164	help
1165	  Provides enforcement of process number limits in the scope of a
1166	  cgroup. Any attempt to fork more processes than is allowed in the
1167	  cgroup will fail. PIDs are fundamentally a global resource because it
1168	  is fairly trivial to reach PID exhaustion before you reach even a
1169	  conservative kmemcg limit. As a result, it is possible to grind a
1170	  system to halt without being limited by other cgroup policies. The
1171	  PIDs controller is designed to stop this from happening.
1172
1173	  It should be noted that organisational operations (such as attaching
1174	  to a cgroup hierarchy) will *not* be blocked by the PIDs controller,
1175	  since the PIDs limit only affects a process's ability to fork, not to
1176	  attach to a cgroup.
1177
1178config CGROUP_RDMA
1179	bool "RDMA controller"
1180	help
1181	  Provides enforcement of RDMA resources defined by IB stack.
1182	  It is fairly easy for consumers to exhaust RDMA resources, which
1183	  can result into resource unavailability to other consumers.
1184	  RDMA controller is designed to stop this from happening.
1185	  Attaching processes with active RDMA resources to the cgroup
1186	  hierarchy is allowed even if can cross the hierarchy's limit.
1187
1188config CGROUP_DMEM
1189	bool "Device memory controller (DMEM)"
1190	select PAGE_COUNTER
1191	help
1192	  The DMEM controller allows compatible devices to restrict device
1193	  memory usage based on the cgroup hierarchy.
1194
1195	  As an example, it allows you to restrict VRAM usage for applications
1196	  in the DRM subsystem.
1197
1198config CGROUP_FREEZER
1199	bool "Freezer controller"
1200	help
1201	  Provides a way to freeze and unfreeze all tasks in a
1202	  cgroup.
1203
1204	  This option affects the ORIGINAL cgroup interface. The cgroup2 memory
1205	  controller includes important in-kernel memory consumers per default.
1206
1207	  If you're using cgroup2, say N.
1208
1209config CGROUP_HUGETLB
1210	bool "HugeTLB controller"
1211	depends on HUGETLB_PAGE
1212	select PAGE_COUNTER
1213	default n
1214	help
1215	  Provides a cgroup controller for HugeTLB pages.
1216	  When you enable this, you can put a per cgroup limit on HugeTLB usage.
1217	  The limit is enforced during page fault. Since HugeTLB doesn't
1218	  support page reclaim, enforcing the limit at page fault time implies
1219	  that, the application will get SIGBUS signal if it tries to access
1220	  HugeTLB pages beyond its limit. This requires the application to know
1221	  beforehand how much HugeTLB pages it would require for its use. The
1222	  control group is tracked in the third page lru pointer. This means
1223	  that we cannot use the controller with huge page less than 3 pages.
1224
1225config CPUSETS
1226	bool "Cpuset controller"
1227	depends on SMP
1228	select UNION_FIND
1229	help
1230	  This option will let you create and manage CPUSETs which
1231	  allow dynamically partitioning a system into sets of CPUs and
1232	  Memory Nodes and assigning tasks to run only within those sets.
1233	  This is primarily useful on large SMP or NUMA systems.
1234
1235	  Say N if unsure.
1236
1237config CPUSETS_V1
1238	bool "Legacy cgroup v1 cpusets controller"
1239	depends on CPUSETS
1240	default n
1241	help
1242	  Legacy cgroup v1 cpusets controller which has been deprecated by
1243	  cgroup v2 implementation. The v1 is there for legacy applications
1244	  which haven't migrated to the new cgroup v2 interface yet. Legacy
1245	  interface includes cpuset filesystem and /proc/<pid>/cpuset. If you
1246	  do not have any such application then you are completely fine leaving
1247	  this option disabled.
1248
1249	  Say N if unsure.
1250
1251config PROC_PID_CPUSET
1252	bool "Include legacy /proc/<pid>/cpuset file"
1253	depends on CPUSETS_V1
1254	default y
1255
1256config CGROUP_DEVICE
1257	bool "Device controller"
1258	help
1259	  Provides a cgroup controller implementing whitelists for
1260	  devices which a process in the cgroup can mknod or open.
1261
1262config CGROUP_CPUACCT
1263	bool "Simple CPU accounting controller"
1264	help
1265	  Provides a simple controller for monitoring the
1266	  total CPU consumed by the tasks in a cgroup.
1267
1268config CGROUP_PERF
1269	bool "Perf controller"
1270	depends on PERF_EVENTS
1271	help
1272	  This option extends the perf per-cpu mode to restrict monitoring
1273	  to threads which belong to the cgroup specified and run on the
1274	  designated cpu.  Or this can be used to have cgroup ID in samples
1275	  so that it can monitor performance events among cgroups.
1276
1277	  Say N if unsure.
1278
1279config CGROUP_BPF
1280	bool "Support for eBPF programs attached to cgroups"
1281	depends on BPF_SYSCALL
1282	select SOCK_CGROUP_DATA
1283	help
1284	  Allow attaching eBPF programs to a cgroup using the bpf(2)
1285	  syscall command BPF_PROG_ATTACH.
1286
1287	  In which context these programs are accessed depends on the type
1288	  of attachment. For instance, programs that are attached using
1289	  BPF_CGROUP_INET_INGRESS will be executed on the ingress path of
1290	  inet sockets.
1291
1292config CGROUP_MISC
1293	bool "Misc resource controller"
1294	default n
1295	help
1296	  Provides a controller for miscellaneous resources on a host.
1297
1298	  Miscellaneous scalar resources are the resources on the host system
1299	  which cannot be abstracted like the other cgroups. This controller
1300	  tracks and limits the miscellaneous resources used by a process
1301	  attached to a cgroup hierarchy.
1302
1303	  For more information, please check misc cgroup section in
1304	  /Documentation/admin-guide/cgroup-v2.rst.
1305
1306config CGROUP_DEBUG
1307	bool "Debug controller"
1308	default n
1309	depends on DEBUG_KERNEL
1310	help
1311	  This option enables a simple controller that exports
1312	  debugging information about the cgroups framework. This
1313	  controller is for control cgroup debugging only. Its
1314	  interfaces are not stable.
1315
1316	  Say N.
1317
1318config SOCK_CGROUP_DATA
1319	bool
1320	default n
1321
1322endif # CGROUPS
1323
1324menuconfig NAMESPACES
1325	bool "Namespaces support" if EXPERT
1326	depends on MULTIUSER
1327	default !EXPERT
1328	help
1329	  Provides the way to make tasks work with different objects using
1330	  the same id. For example same IPC id may refer to different objects
1331	  or same user id or pid may refer to different tasks when used in
1332	  different namespaces.
1333
1334if NAMESPACES
1335
1336config UTS_NS
1337	bool "UTS namespace"
1338	default y
1339	help
1340	  In this namespace tasks see different info provided with the
1341	  uname() system call
1342
1343config TIME_NS
1344	bool "TIME namespace"
1345	depends on GENERIC_VDSO_TIME_NS
1346	default y
1347	help
1348	  In this namespace boottime and monotonic clocks can be set.
1349	  The time will keep going with the same pace.
1350
1351config IPC_NS
1352	bool "IPC namespace"
1353	depends on (SYSVIPC || POSIX_MQUEUE)
1354	default y
1355	help
1356	  In this namespace tasks work with IPC ids which correspond to
1357	  different IPC objects in different namespaces.
1358
1359config USER_NS
1360	bool "User namespace"
1361	default n
1362	help
1363	  This allows containers, i.e. vservers, to use user namespaces
1364	  to provide different user info for different servers.
1365
1366	  When user namespaces are enabled in the kernel it is
1367	  recommended that the MEMCG option also be enabled and that
1368	  user-space use the memory control groups to limit the amount
1369	  of memory a memory unprivileged users can use.
1370
1371	  If unsure, say N.
1372
1373config PID_NS
1374	bool "PID Namespaces"
1375	default y
1376	help
1377	  Support process id namespaces.  This allows having multiple
1378	  processes with the same pid as long as they are in different
1379	  pid namespaces.  This is a building block of containers.
1380
1381config NET_NS
1382	bool "Network namespace"
1383	depends on NET
1384	default y
1385	help
1386	  Allow user space to create what appear to be multiple instances
1387	  of the network stack.
1388
1389endif # NAMESPACES
1390
1391config CHECKPOINT_RESTORE
1392	bool "Checkpoint/restore support"
1393	depends on PROC_FS
1394	select PROC_CHILDREN
1395	select KCMP
1396	default n
1397	help
1398	  Enables additional kernel features in a sake of checkpoint/restore.
1399	  In particular it adds auxiliary prctl codes to setup process text,
1400	  data and heap segment sizes, and a few additional /proc filesystem
1401	  entries.
1402
1403	  If unsure, say N here.
1404
1405config SCHED_AUTOGROUP
1406	bool "Automatic process group scheduling"
1407	select CGROUPS
1408	select CGROUP_SCHED
1409	select FAIR_GROUP_SCHED
1410	help
1411	  This option optimizes the scheduler for common desktop workloads by
1412	  automatically creating and populating task groups.  This separation
1413	  of workloads isolates aggressive CPU burners (like build jobs) from
1414	  desktop applications.  Task group autogeneration is currently based
1415	  upon task session.
1416
1417config RELAY
1418	bool "Kernel->user space relay support (formerly relayfs)"
1419	select IRQ_WORK
1420	help
1421	  This option enables support for relay interface support in
1422	  certain file systems (such as debugfs).
1423	  It is designed to provide an efficient mechanism for tools and
1424	  facilities to relay large amounts of data from kernel space to
1425	  user space.
1426
1427	  If unsure, say N.
1428
1429config BLK_DEV_INITRD
1430	bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
1431	help
1432	  The initial RAM filesystem is a ramfs which is loaded by the
1433	  boot loader (loadlin or lilo) and that is mounted as root
1434	  before the normal boot procedure. It is typically used to
1435	  load modules needed to mount the "real" root file system,
1436	  etc. See <file:Documentation/admin-guide/initrd.rst> for details.
1437
1438	  If RAM disk support (BLK_DEV_RAM) is also included, this
1439	  also enables initial RAM disk (initrd) support and adds
1440	  15 Kbytes (more on some other architectures) to the kernel size.
1441
1442	  If unsure say Y.
1443
1444if BLK_DEV_INITRD
1445
1446source "usr/Kconfig"
1447
1448endif
1449
1450config BOOT_CONFIG
1451	bool "Boot config support"
1452	select BLK_DEV_INITRD if !BOOT_CONFIG_EMBED
1453	help
1454	  Extra boot config allows system admin to pass a config file as
1455	  complemental extension of kernel cmdline when booting.
1456	  The boot config file must be attached at the end of initramfs
1457	  with checksum, size and magic word.
1458	  See <file:Documentation/admin-guide/bootconfig.rst> for details.
1459
1460	  If unsure, say Y.
1461
1462config BOOT_CONFIG_FORCE
1463	bool "Force unconditional bootconfig processing"
1464	depends on BOOT_CONFIG
1465	default y if BOOT_CONFIG_EMBED
1466	help
1467	  With this Kconfig option set, BOOT_CONFIG processing is carried
1468	  out even when the "bootconfig" kernel-boot parameter is omitted.
1469	  In fact, with this Kconfig option set, there is no way to
1470	  make the kernel ignore the BOOT_CONFIG-supplied kernel-boot
1471	  parameters.
1472
1473	  If unsure, say N.
1474
1475config BOOT_CONFIG_EMBED
1476	bool "Embed bootconfig file in the kernel"
1477	depends on BOOT_CONFIG
1478	help
1479	  Embed a bootconfig file given by BOOT_CONFIG_EMBED_FILE in the
1480	  kernel. Usually, the bootconfig file is loaded with the initrd
1481	  image. But if the system doesn't support initrd, this option will
1482	  help you by embedding a bootconfig file while building the kernel.
1483
1484	  If unsure, say N.
1485
1486config BOOT_CONFIG_EMBED_FILE
1487	string "Embedded bootconfig file path"
1488	depends on BOOT_CONFIG_EMBED
1489	help
1490	  Specify a bootconfig file which will be embedded to the kernel.
1491	  This bootconfig will be used if there is no initrd or no other
1492	  bootconfig in the initrd.
1493
1494config INITRAMFS_PRESERVE_MTIME
1495	bool "Preserve cpio archive mtimes in initramfs"
1496	default y
1497	help
1498	  Each entry in an initramfs cpio archive carries an mtime value. When
1499	  enabled, extracted cpio items take this mtime, with directory mtime
1500	  setting deferred until after creation of any child entries.
1501
1502	  If unsure, say Y.
1503
1504config INITRAMFS_TEST
1505	bool "Test initramfs cpio archive extraction" if !KUNIT_ALL_TESTS
1506	depends on BLK_DEV_INITRD && KUNIT=y
1507	default KUNIT_ALL_TESTS
1508	help
1509	  Build KUnit tests for initramfs. See Documentation/dev-tools/kunit
1510
1511choice
1512	prompt "Compiler optimization level"
1513	default CC_OPTIMIZE_FOR_PERFORMANCE
1514
1515config CC_OPTIMIZE_FOR_PERFORMANCE
1516	bool "Optimize for performance (-O2)"
1517	help
1518	  This is the default optimization level for the kernel, building
1519	  with the "-O2" compiler flag for best performance and most
1520	  helpful compile-time warnings.
1521
1522config CC_OPTIMIZE_FOR_SIZE
1523	bool "Optimize for size (-Os)"
1524	help
1525	  Choosing this option will pass "-Os" to your compiler resulting
1526	  in a smaller kernel.
1527
1528endchoice
1529
1530config HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1531	bool
1532	help
1533	  This requires that the arch annotates or otherwise protects
1534	  its external entry points from being discarded. Linker scripts
1535	  must also merge .text.*, .data.*, and .bss.* correctly into
1536	  output sections. Care must be taken not to pull in unrelated
1537	  sections (e.g., '.text.init'). Typically '.' in section names
1538	  is used to distinguish them from label names / C identifiers.
1539
1540config LD_DEAD_CODE_DATA_ELIMINATION
1541	bool "Dead code and data elimination (EXPERIMENTAL)"
1542	depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1543	depends on EXPERT
1544	depends on $(cc-option,-ffunction-sections -fdata-sections)
1545	depends on $(ld-option,--gc-sections)
1546	help
1547	  Enable this if you want to do dead code and data elimination with
1548	  the linker by compiling with -ffunction-sections -fdata-sections,
1549	  and linking with --gc-sections.
1550
1551	  This can reduce on disk and in-memory size of the kernel
1552	  code and static data, particularly for small configs and
1553	  on small systems. This has the possibility of introducing
1554	  silently broken kernel if the required annotations are not
1555	  present. This option is not well tested yet, so use at your
1556	  own risk.
1557
1558config LD_ORPHAN_WARN
1559	def_bool y
1560	depends on ARCH_WANT_LD_ORPHAN_WARN
1561	depends on $(ld-option,--orphan-handling=warn)
1562	depends on $(ld-option,--orphan-handling=error)
1563
1564config LD_ORPHAN_WARN_LEVEL
1565        string
1566        depends on LD_ORPHAN_WARN
1567        default "error" if WERROR
1568        default "warn"
1569
1570config SYSCTL
1571	bool
1572
1573config HAVE_UID16
1574	bool
1575
1576config SYSCTL_EXCEPTION_TRACE
1577	bool
1578	help
1579	  Enable support for /proc/sys/debug/exception-trace.
1580
1581config SYSCTL_ARCH_UNALIGN_NO_WARN
1582	bool
1583	help
1584	  Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
1585	  Allows arch to define/use @no_unaligned_warning to possibly warn
1586	  about unaligned access emulation going on under the hood.
1587
1588config SYSCTL_ARCH_UNALIGN_ALLOW
1589	bool
1590	help
1591	  Enable support for /proc/sys/kernel/unaligned-trap
1592	  Allows arches to define/use @unaligned_enabled to runtime toggle
1593	  the unaligned access emulation.
1594	  see arch/parisc/kernel/unaligned.c for reference
1595
1596config SYSFS_SYSCALL
1597	bool "Sysfs syscall support"
1598	default n
1599	help
1600	  sys_sysfs is an obsolete system call no longer supported in libc.
1601	  Note that disabling this option is more secure but might break
1602	  compatibility with some systems.
1603
1604	  If unsure say N here.
1605
1606config HAVE_PCSPKR_PLATFORM
1607	bool
1608
1609menuconfig EXPERT
1610	bool "Configure standard kernel features (expert users)"
1611	# Unhide debug options, to make the on-by-default options visible
1612	select DEBUG_KERNEL
1613	help
1614	  This option allows certain base kernel options and settings
1615	  to be disabled or tweaked. This is for specialized
1616	  environments which can tolerate a "non-standard" kernel.
1617	  Only use this if you really know what you are doing.
1618
1619config UID16
1620	bool "Enable 16-bit UID system calls" if EXPERT
1621	depends on HAVE_UID16 && MULTIUSER
1622	default y
1623	help
1624	  This enables the legacy 16-bit UID syscall wrappers.
1625
1626config MULTIUSER
1627	bool "Multiple users, groups and capabilities support" if EXPERT
1628	default y
1629	help
1630	  This option enables support for non-root users, groups and
1631	  capabilities.
1632
1633	  If you say N here, all processes will run with UID 0, GID 0, and all
1634	  possible capabilities.  Saying N here also compiles out support for
1635	  system calls related to UIDs, GIDs, and capabilities, such as setuid,
1636	  setgid, and capset.
1637
1638	  If unsure, say Y here.
1639
1640config SGETMASK_SYSCALL
1641	bool "sgetmask/ssetmask syscalls support" if EXPERT
1642	default PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
1643	help
1644	  sys_sgetmask and sys_ssetmask are obsolete system calls
1645	  no longer supported in libc but still enabled by default in some
1646	  architectures.
1647
1648	  If unsure, leave the default option here.
1649
1650config FHANDLE
1651	bool "open by fhandle syscalls" if EXPERT
1652	select EXPORTFS
1653	default y
1654	help
1655	  If you say Y here, a user level program will be able to map
1656	  file names to handle and then later use the handle for
1657	  different file system operations. This is useful in implementing
1658	  userspace file servers, which now track files using handles instead
1659	  of names. The handle would remain the same even if file names
1660	  get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2)
1661	  syscalls.
1662
1663config POSIX_TIMERS
1664	bool "Posix Clocks & timers" if EXPERT
1665	default y
1666	help
1667	  This includes native support for POSIX timers to the kernel.
1668	  Some embedded systems have no use for them and therefore they
1669	  can be configured out to reduce the size of the kernel image.
1670
1671	  When this option is disabled, the following syscalls won't be
1672	  available: timer_create, timer_gettime: timer_getoverrun,
1673	  timer_settime, timer_delete, clock_adjtime, getitimer,
1674	  setitimer, alarm. Furthermore, the clock_settime, clock_gettime,
1675	  clock_getres and clock_nanosleep syscalls will be limited to
1676	  CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_BOOTTIME only.
1677
1678	  If unsure say y.
1679
1680config PRINTK
1681	default y
1682	bool "Enable support for printk" if EXPERT
1683	select IRQ_WORK
1684	help
1685	  This option enables normal printk support. Removing it
1686	  eliminates most of the message strings from the kernel image
1687	  and makes the kernel more or less silent. As this makes it
1688	  very difficult to diagnose system problems, saying N here is
1689	  strongly discouraged.
1690
1691config BUG
1692	bool "BUG() support" if EXPERT
1693	default y
1694	help
1695	  Disabling this option eliminates support for BUG and WARN, reducing
1696	  the size of your kernel image and potentially quietly ignoring
1697	  numerous fatal conditions. You should only consider disabling this
1698	  option for embedded systems with no facilities for reporting errors.
1699	  Just say Y.
1700
1701config ELF_CORE
1702	depends on COREDUMP
1703	default y
1704	bool "Enable ELF core dumps" if EXPERT
1705	help
1706	  Enable support for generating core dumps. Disabling saves about 4k.
1707
1708
1709config PCSPKR_PLATFORM
1710	bool "Enable PC-Speaker support" if EXPERT
1711	depends on HAVE_PCSPKR_PLATFORM
1712	select I8253_LOCK
1713	default y
1714	help
1715	  This option allows to disable the internal PC-Speaker
1716	  support, saving some memory.
1717
1718config BASE_SMALL
1719	bool "Enable smaller-sized data structures for core" if EXPERT
1720	help
1721	  Enabling this option reduces the size of miscellaneous core
1722	  kernel data structures. This saves memory on small machines,
1723	  but may reduce performance.
1724
1725config FUTEX
1726	bool "Enable futex support" if EXPERT
1727	depends on !(SPARC32 && SMP)
1728	default y
1729	imply RT_MUTEXES
1730	help
1731	  Disabling this option will cause the kernel to be built without
1732	  support for "fast userspace mutexes".  The resulting kernel may not
1733	  run glibc-based applications correctly.
1734
1735config FUTEX_PI
1736	bool
1737	depends on FUTEX && RT_MUTEXES
1738	default y
1739
1740config FUTEX_PRIVATE_HASH
1741	bool
1742	depends on FUTEX && !BASE_SMALL && MMU
1743	default y
1744
1745config FUTEX_MPOL
1746	bool
1747	depends on FUTEX && NUMA
1748	default y
1749
1750config EPOLL
1751	bool "Enable eventpoll support" if EXPERT
1752	default y
1753	help
1754	  Disabling this option will cause the kernel to be built without
1755	  support for epoll family of system calls.
1756
1757config SIGNALFD
1758	bool "Enable signalfd() system call" if EXPERT
1759	default y
1760	help
1761	  Enable the signalfd() system call that allows to receive signals
1762	  on a file descriptor.
1763
1764	  If unsure, say Y.
1765
1766config TIMERFD
1767	bool "Enable timerfd() system call" if EXPERT
1768	default y
1769	help
1770	  Enable the timerfd() system call that allows to receive timer
1771	  events on a file descriptor.
1772
1773	  If unsure, say Y.
1774
1775config EVENTFD
1776	bool "Enable eventfd() system call" if EXPERT
1777	default y
1778	help
1779	  Enable the eventfd() system call that allows to receive both
1780	  kernel notification (ie. KAIO) or userspace notifications.
1781
1782	  If unsure, say Y.
1783
1784config SHMEM
1785	bool "Use full shmem filesystem" if EXPERT
1786	default y
1787	depends on MMU
1788	help
1789	  The shmem is an internal filesystem used to manage shared memory.
1790	  It is backed by swap and manages resource limits. It is also exported
1791	  to userspace as tmpfs if TMPFS is enabled. Disabling this
1792	  option replaces shmem and tmpfs with the much simpler ramfs code,
1793	  which may be appropriate on small systems without swap.
1794
1795config AIO
1796	bool "Enable AIO support" if EXPERT
1797	default y
1798	help
1799	  This option enables POSIX asynchronous I/O which may by used
1800	  by some high performance threaded applications. Disabling
1801	  this option saves about 7k.
1802
1803config IO_URING
1804	bool "Enable IO uring support" if EXPERT
1805	select IO_WQ
1806	default y
1807	help
1808	  This option enables support for the io_uring interface, enabling
1809	  applications to submit and complete IO through submission and
1810	  completion rings that are shared between the kernel and application.
1811
1812config GCOV_PROFILE_URING
1813	bool "Enable GCOV profiling on the io_uring subsystem"
1814	depends on IO_URING && GCOV_KERNEL
1815	help
1816	  Enable GCOV profiling on the io_uring subsystem, to facilitate
1817	  code coverage testing.
1818
1819	  If unsure, say N.
1820
1821	  Note that this will have a negative impact on the performance of
1822	  the io_uring subsystem, hence this should only be enabled for
1823	  specific test purposes.
1824
1825config IO_URING_MOCK_FILE
1826	tristate "Enable io_uring mock files (Experimental)" if EXPERT
1827	default n
1828	depends on IO_URING
1829	help
1830	  Enable mock files for io_uring subststem testing. The ABI might
1831	  still change, so it's still experimental and should only be enabled
1832	  for specific test purposes.
1833
1834	  If unsure, say N.
1835
1836config ADVISE_SYSCALLS
1837	bool "Enable madvise/fadvise syscalls" if EXPERT
1838	default y
1839	help
1840	  This option enables the madvise and fadvise syscalls, used by
1841	  applications to advise the kernel about their future memory or file
1842	  usage, improving performance. If building an embedded system where no
1843	  applications use these syscalls, you can disable this option to save
1844	  space.
1845
1846config MEMBARRIER
1847	bool "Enable membarrier() system call" if EXPERT
1848	default y
1849	help
1850	  Enable the membarrier() system call that allows issuing memory
1851	  barriers across all running threads, which can be used to distribute
1852	  the cost of user-space memory barriers asymmetrically by transforming
1853	  pairs of memory barriers into pairs consisting of membarrier() and a
1854	  compiler barrier.
1855
1856	  If unsure, say Y.
1857
1858config KCMP
1859	bool "Enable kcmp() system call" if EXPERT
1860	help
1861	  Enable the kernel resource comparison system call. It provides
1862	  user-space with the ability to compare two processes to see if they
1863	  share a common resource, such as a file descriptor or even virtual
1864	  memory space.
1865
1866	  If unsure, say N.
1867
1868config RSEQ
1869	bool "Enable rseq() system call" if EXPERT
1870	default y
1871	depends on HAVE_RSEQ
1872	select MEMBARRIER
1873	help
1874	  Enable the restartable sequences system call. It provides a
1875	  user-space cache for the current CPU number value, which
1876	  speeds up getting the current CPU number from user-space,
1877	  as well as an ABI to speed up user-space operations on
1878	  per-CPU data.
1879
1880	  If unsure, say Y.
1881
1882config DEBUG_RSEQ
1883	default n
1884	bool "Enable debugging of rseq() system call" if EXPERT
1885	depends on RSEQ && DEBUG_KERNEL
1886	help
1887	  Enable extra debugging checks for the rseq system call.
1888
1889	  If unsure, say N.
1890
1891config CACHESTAT_SYSCALL
1892	bool "Enable cachestat() system call" if EXPERT
1893	default y
1894	help
1895	  Enable the cachestat system call, which queries the page cache
1896	  statistics of a file (number of cached pages, dirty pages,
1897	  pages marked for writeback, (recently) evicted pages).
1898
1899	  If unsure say Y here.
1900
1901config KALLSYMS
1902	bool "Load all symbols for debugging/ksymoops" if EXPERT
1903	default y
1904	help
1905	  Say Y here to let the kernel print out symbolic crash information and
1906	  symbolic stack backtraces. This increases the size of the kernel
1907	  somewhat, as all symbols have to be loaded into the kernel image.
1908
1909config KALLSYMS_SELFTEST
1910	bool "Test the basic functions and performance of kallsyms"
1911	depends on KALLSYMS
1912	default n
1913	help
1914	  Test the basic functions and performance of some interfaces, such as
1915	  kallsyms_lookup_name. It also calculates the compression rate of the
1916	  kallsyms compression algorithm for the current symbol set.
1917
1918	  Start self-test automatically after system startup. Suggest executing
1919	  "dmesg | grep kallsyms_selftest" to collect test results. "finish" is
1920	  displayed in the last line, indicating that the test is complete.
1921
1922config KALLSYMS_ALL
1923	bool "Include all symbols in kallsyms"
1924	depends on DEBUG_KERNEL && KALLSYMS
1925	help
1926	  Normally kallsyms only contains the symbols of functions for nicer
1927	  OOPS messages and backtraces (i.e., symbols from the text and inittext
1928	  sections). This is sufficient for most cases. And only if you want to
1929	  enable kernel live patching, or other less common use cases (e.g.,
1930	  when a debugger is used) all symbols are required (i.e., names of
1931	  variables from the data sections, etc).
1932
1933	  This option makes sure that all symbols are loaded into the kernel
1934	  image (i.e., symbols from all sections) in cost of increased kernel
1935	  size (depending on the kernel configuration, it may be 300KiB or
1936	  something like this).
1937
1938	  Say N unless you really need all symbols, or kernel live patching.
1939
1940# end of the "standard kernel features (expert users)" menu
1941
1942config ARCH_HAS_MEMBARRIER_CALLBACKS
1943	bool
1944
1945config ARCH_HAS_MEMBARRIER_SYNC_CORE
1946	bool
1947
1948config ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
1949	bool
1950	help
1951	  Control MSEAL_SYSTEM_MAPPINGS access based on architecture.
1952
1953	  A 64-bit kernel is required for the memory sealing feature.
1954	  No specific hardware features from the CPU are needed.
1955
1956	  To enable this feature, the architecture needs to update their
1957	  special mappings calls to include the sealing flag and confirm
1958	  that it doesn't unmap/remap system mappings during the life
1959	  time of the process. The existence of this flag for an architecture
1960	  implies that it does not require the remapping of the system
1961	  mappings during process lifetime, so sealing these mappings is safe
1962	  from a kernel perspective.
1963
1964	  After the architecture enables this, a distribution can set
1965	  CONFIG_MSEAL_SYSTEM_MAPPING to manage access to the feature.
1966
1967	  For complete descriptions of memory sealing, please see
1968	  Documentation/userspace-api/mseal.rst
1969
1970config HAVE_PERF_EVENTS
1971	bool
1972	help
1973	  See tools/perf/design.txt for details.
1974
1975config GUEST_PERF_EVENTS
1976	bool
1977	depends on HAVE_PERF_EVENTS
1978
1979config PERF_USE_VMALLOC
1980	bool
1981	help
1982	  See tools/perf/design.txt for details
1983
1984menu "Kernel Performance Events And Counters"
1985
1986config PERF_EVENTS
1987	bool "Kernel performance events and counters"
1988	default y if PROFILING
1989	depends on HAVE_PERF_EVENTS
1990	select IRQ_WORK
1991	help
1992	  Enable kernel support for various performance events provided
1993	  by software and hardware.
1994
1995	  Software events are supported either built-in or via the
1996	  use of generic tracepoints.
1997
1998	  Most modern CPUs support performance events via performance
1999	  counter registers. These registers count the number of certain
2000	  types of hw events: such as instructions executed, cachemisses
2001	  suffered, or branches mis-predicted - without slowing down the
2002	  kernel or applications. These registers can also trigger interrupts
2003	  when a threshold number of events have passed - and can thus be
2004	  used to profile the code that runs on that CPU.
2005
2006	  The Linux Performance Event subsystem provides an abstraction of
2007	  these software and hardware event capabilities, available via a
2008	  system call and used by the "perf" utility in tools/perf/. It
2009	  provides per task and per CPU counters, and it provides event
2010	  capabilities on top of those.
2011
2012	  Say Y if unsure.
2013
2014config DEBUG_PERF_USE_VMALLOC
2015	default n
2016	bool "Debug: use vmalloc to back perf mmap() buffers"
2017	depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
2018	select PERF_USE_VMALLOC
2019	help
2020	  Use vmalloc memory to back perf mmap() buffers.
2021
2022	  Mostly useful for debugging the vmalloc code on platforms
2023	  that don't require it.
2024
2025	  Say N if unsure.
2026
2027endmenu
2028
2029config SYSTEM_DATA_VERIFICATION
2030	def_bool n
2031	select SYSTEM_TRUSTED_KEYRING
2032	select KEYS
2033	select CRYPTO
2034	select CRYPTO_RSA
2035	select ASYMMETRIC_KEY_TYPE
2036	select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
2037	select ASN1
2038	select OID_REGISTRY
2039	select X509_CERTIFICATE_PARSER
2040	select PKCS7_MESSAGE_PARSER
2041	help
2042	  Provide PKCS#7 message verification using the contents of the system
2043	  trusted keyring to provide public keys.  This then can be used for
2044	  module verification, kexec image verification and firmware blob
2045	  verification.
2046
2047config PROFILING
2048	bool "Profiling support"
2049	help
2050	  Say Y here to enable the extended profiling support mechanisms used
2051	  by profilers.
2052
2053config RUST
2054	bool "Rust support"
2055	depends on HAVE_RUST
2056	depends on RUST_IS_AVAILABLE
2057	select EXTENDED_MODVERSIONS if MODVERSIONS
2058	depends on !MODVERSIONS || GENDWARFKSYMS
2059	depends on !GCC_PLUGIN_RANDSTRUCT
2060	depends on !RANDSTRUCT
2061	depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
2062	depends on !CFI_CLANG || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
2063	select CFI_ICALL_NORMALIZE_INTEGERS if CFI_CLANG
2064	depends on !CALL_PADDING || RUSTC_VERSION >= 108100
2065	depends on !KASAN_SW_TAGS
2066	depends on !(MITIGATION_RETHUNK && KASAN) || RUSTC_VERSION >= 108300
2067	help
2068	  Enables Rust support in the kernel.
2069
2070	  This allows other Rust-related options, like drivers written in Rust,
2071	  to be selected.
2072
2073	  It is also required to be able to load external kernel modules
2074	  written in Rust.
2075
2076	  See Documentation/rust/ for more information.
2077
2078	  If unsure, say N.
2079
2080config RUSTC_VERSION_TEXT
2081	string
2082	depends on RUST
2083	default "$(RUSTC_VERSION_TEXT)"
2084	help
2085	  See `CC_VERSION_TEXT`.
2086
2087config BINDGEN_VERSION_TEXT
2088	string
2089	depends on RUST
2090	# The dummy parameter `workaround-for-0.69.0` is required to support 0.69.0
2091	# (https://github.com/rust-lang/rust-bindgen/pull/2678) and 0.71.0
2092	# (https://github.com/rust-lang/rust-bindgen/pull/3040). It can be removed
2093	# when the minimum version is upgraded past the latter (0.69.1 and 0.71.1
2094	# both fixed the issue).
2095	default "$(shell,$(BINDGEN) --version workaround-for-0.69.0 2>/dev/null)"
2096
2097#
2098# Place an empty function call at each tracepoint site. Can be
2099# dynamically changed for a probe function.
2100#
2101config TRACEPOINTS
2102	bool
2103	select TASKS_TRACE_RCU
2104
2105source "kernel/Kconfig.kexec"
2106
2107endmenu		# General setup
2108
2109source "arch/Kconfig"
2110
2111config RT_MUTEXES
2112	bool
2113	default y if PREEMPT_RT
2114
2115config MODULE_SIG_FORMAT
2116	def_bool n
2117	select SYSTEM_DATA_VERIFICATION
2118
2119source "kernel/module/Kconfig"
2120
2121config INIT_ALL_POSSIBLE
2122	bool
2123	help
2124	  Back when each arch used to define their own cpu_online_mask and
2125	  cpu_possible_mask, some of them chose to initialize cpu_possible_mask
2126	  with all 1s, and others with all 0s.  When they were centralised,
2127	  it was better to provide this option than to break all the archs
2128	  and have several arch maintainers pursuing me down dark alleys.
2129
2130source "block/Kconfig"
2131
2132config PREEMPT_NOTIFIERS
2133	bool
2134
2135config PADATA
2136	depends on SMP
2137	bool
2138
2139config ASN1
2140	tristate
2141	help
2142	  Build a simple ASN.1 grammar compiler that produces a bytecode output
2143	  that can be interpreted by the ASN.1 stream decoder and used to
2144	  inform it as to what tags are to be expected in a stream and what
2145	  functions to call on what tags.
2146
2147source "kernel/Kconfig.locks"
2148
2149config ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
2150	bool
2151
2152config ARCH_HAS_PREPARE_SYNC_CORE_CMD
2153	bool
2154
2155config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
2156	bool
2157
2158# It may be useful for an architecture to override the definitions of the
2159# SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>
2160# and the COMPAT_ variants in <linux/compat.h>, in particular to use a
2161# different calling convention for syscalls. They can also override the
2162# macros for not-implemented syscalls in kernel/sys_ni.c and
2163# kernel/time/posix-stubs.c. All these overrides need to be available in
2164# <asm/syscall_wrapper.h>.
2165config ARCH_HAS_SYSCALL_WRAPPER
2166	def_bool n
2167