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