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