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