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