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