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