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