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