xref: /linux/init/Kconfig (revision d16738a4e79e55b2c3c9ff4fb7b74a4a24723515)
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	select CPU_ISOLATION
1261	help
1262	  This option will let you create and manage CPUSETs which
1263	  allow dynamically partitioning a system into sets of CPUs and
1264	  Memory Nodes and assigning tasks to run only within those sets.
1265	  This is primarily useful on large SMP or NUMA systems.
1266
1267	  Say N if unsure.
1268
1269config CPUSETS_V1
1270	bool "Legacy cgroup v1 cpusets controller"
1271	depends on CPUSETS
1272	default n
1273	help
1274	  Legacy cgroup v1 cpusets controller which has been deprecated by
1275	  cgroup v2 implementation. The v1 is there for legacy applications
1276	  which haven't migrated to the new cgroup v2 interface yet. Legacy
1277	  interface includes cpuset filesystem and /proc/<pid>/cpuset. If you
1278	  do not have any such application then you are completely fine leaving
1279	  this option disabled.
1280
1281	  Say N if unsure.
1282
1283config PROC_PID_CPUSET
1284	bool "Include legacy /proc/<pid>/cpuset file"
1285	depends on CPUSETS_V1
1286	default y
1287
1288config CGROUP_DEVICE
1289	bool "Device controller"
1290	help
1291	  Provides a cgroup controller implementing whitelists for
1292	  devices which a process in the cgroup can mknod or open.
1293
1294config CGROUP_CPUACCT
1295	bool "Simple CPU accounting controller"
1296	help
1297	  Provides a simple controller for monitoring the
1298	  total CPU consumed by the tasks in a cgroup.
1299
1300config CGROUP_PERF
1301	bool "Perf controller"
1302	depends on PERF_EVENTS
1303	help
1304	  This option extends the perf per-cpu mode to restrict monitoring
1305	  to threads which belong to the cgroup specified and run on the
1306	  designated cpu.  Or this can be used to have cgroup ID in samples
1307	  so that it can monitor performance events among cgroups.
1308
1309	  Say N if unsure.
1310
1311config CGROUP_BPF
1312	bool "Support for eBPF programs attached to cgroups"
1313	depends on BPF_SYSCALL
1314	select SOCK_CGROUP_DATA
1315	help
1316	  Allow attaching eBPF programs to a cgroup using the bpf(2)
1317	  syscall command BPF_PROG_ATTACH.
1318
1319	  In which context these programs are accessed depends on the type
1320	  of attachment. For instance, programs that are attached using
1321	  BPF_CGROUP_INET_INGRESS will be executed on the ingress path of
1322	  inet sockets.
1323
1324config CGROUP_MISC
1325	bool "Misc resource controller"
1326	default n
1327	help
1328	  Provides a controller for miscellaneous resources on a host.
1329
1330	  Miscellaneous scalar resources are the resources on the host system
1331	  which cannot be abstracted like the other cgroups. This controller
1332	  tracks and limits the miscellaneous resources used by a process
1333	  attached to a cgroup hierarchy.
1334
1335	  For more information, please check misc cgroup section in
1336	  /Documentation/admin-guide/cgroup-v2.rst.
1337
1338config CGROUP_DEBUG
1339	bool "Debug controller"
1340	default n
1341	depends on DEBUG_KERNEL
1342	help
1343	  This option enables a simple controller that exports
1344	  debugging information about the cgroups framework. This
1345	  controller is for control cgroup debugging only. Its
1346	  interfaces are not stable.
1347
1348	  Say N.
1349
1350config SOCK_CGROUP_DATA
1351	bool
1352	default n
1353
1354endif # CGROUPS
1355
1356menuconfig NAMESPACES
1357	bool "Namespaces support" if EXPERT
1358	depends on MULTIUSER
1359	default !EXPERT
1360	help
1361	  Provides the way to make tasks work with different objects using
1362	  the same id. For example same IPC id may refer to different objects
1363	  or same user id or pid may refer to different tasks when used in
1364	  different namespaces.
1365
1366if NAMESPACES
1367
1368config UTS_NS
1369	bool "UTS namespace"
1370	default y
1371	help
1372	  In this namespace tasks see different info provided with the
1373	  uname() system call
1374
1375config TIME_NS
1376	bool "TIME namespace"
1377	depends on GENERIC_GETTIMEOFDAY
1378	default y
1379	help
1380	  In this namespace boottime and monotonic clocks can be set.
1381	  The time will keep going with the same pace.
1382
1383config IPC_NS
1384	bool "IPC namespace"
1385	depends on (SYSVIPC || POSIX_MQUEUE)
1386	default y
1387	help
1388	  In this namespace tasks work with IPC ids which correspond to
1389	  different IPC objects in different namespaces.
1390
1391config USER_NS
1392	bool "User namespace"
1393	default n
1394	help
1395	  This allows containers, i.e. vservers, to use user namespaces
1396	  to provide different user info for different servers.
1397
1398	  When user namespaces are enabled in the kernel it is
1399	  recommended that the MEMCG option also be enabled and that
1400	  user-space use the memory control groups to limit the amount
1401	  of memory a memory unprivileged users can use.
1402
1403	  If unsure, say N.
1404
1405config PID_NS
1406	bool "PID Namespaces"
1407	default y
1408	help
1409	  Support process id namespaces.  This allows having multiple
1410	  processes with the same pid as long as they are in different
1411	  pid namespaces.  This is a building block of containers.
1412
1413config NET_NS
1414	bool "Network namespace"
1415	depends on NET
1416	default y
1417	help
1418	  Allow user space to create what appear to be multiple instances
1419	  of the network stack.
1420
1421endif # NAMESPACES
1422
1423config CHECKPOINT_RESTORE
1424	bool "Checkpoint/restore support"
1425	depends on PROC_FS
1426	select PROC_CHILDREN
1427	select KCMP
1428	default n
1429	help
1430	  Enables additional kernel features in a sake of checkpoint/restore.
1431	  In particular it adds auxiliary prctl codes to setup process text,
1432	  data and heap segment sizes, and a few additional /proc filesystem
1433	  entries.
1434
1435	  If unsure, say N here.
1436
1437config SCHED_AUTOGROUP
1438	bool "Automatic process group scheduling"
1439	select CGROUPS
1440	select CGROUP_SCHED
1441	select FAIR_GROUP_SCHED
1442	help
1443	  This option optimizes the scheduler for common desktop workloads by
1444	  automatically creating and populating task groups.  This separation
1445	  of workloads isolates aggressive CPU burners (like build jobs) from
1446	  desktop applications.  Task group autogeneration is currently based
1447	  upon task session.
1448
1449config RELAY
1450	bool "Kernel->user space relay support (formerly relayfs)"
1451	select IRQ_WORK
1452	help
1453	  This option enables support for relay interface support in
1454	  certain file systems (such as debugfs).
1455	  It is designed to provide an efficient mechanism for tools and
1456	  facilities to relay large amounts of data from kernel space to
1457	  user space.
1458
1459	  If unsure, say N.
1460
1461config BLK_DEV_INITRD
1462	bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
1463	help
1464	  The initial RAM filesystem is a ramfs which is loaded by the
1465	  boot loader (loadlin or lilo) and that is mounted as root
1466	  before the normal boot procedure. It is typically used to
1467	  load modules needed to mount the "real" root file system,
1468	  etc. See <file:Documentation/admin-guide/initrd.rst> for details.
1469
1470	  If RAM disk support (BLK_DEV_RAM) is also included, this
1471	  also enables initial RAM disk (initrd) support and adds
1472	  15 Kbytes (more on some other architectures) to the kernel size.
1473
1474	  If unsure say Y.
1475
1476if BLK_DEV_INITRD
1477
1478source "usr/Kconfig"
1479
1480endif
1481
1482config BOOT_CONFIG
1483	bool "Boot config support"
1484	select BLK_DEV_INITRD if !BOOT_CONFIG_EMBED
1485	help
1486	  Extra boot config allows system admin to pass a config file as
1487	  complemental extension of kernel cmdline when booting.
1488	  The boot config file must be attached at the end of initramfs
1489	  with checksum, size and magic word.
1490	  See <file:Documentation/admin-guide/bootconfig.rst> for details.
1491
1492	  If unsure, say Y.
1493
1494config BOOT_CONFIG_FORCE
1495	bool "Force unconditional bootconfig processing"
1496	depends on BOOT_CONFIG
1497	default y if BOOT_CONFIG_EMBED
1498	help
1499	  With this Kconfig option set, BOOT_CONFIG processing is carried
1500	  out even when the "bootconfig" kernel-boot parameter is omitted.
1501	  In fact, with this Kconfig option set, there is no way to
1502	  make the kernel ignore the BOOT_CONFIG-supplied kernel-boot
1503	  parameters.
1504
1505	  If unsure, say N.
1506
1507config BOOT_CONFIG_EMBED
1508	bool "Embed bootconfig file in the kernel"
1509	depends on BOOT_CONFIG
1510	help
1511	  Embed a bootconfig file given by BOOT_CONFIG_EMBED_FILE in the
1512	  kernel. Usually, the bootconfig file is loaded with the initrd
1513	  image. But if the system doesn't support initrd, this option will
1514	  help you by embedding a bootconfig file while building the kernel.
1515
1516	  If unsure, say N.
1517
1518config BOOT_CONFIG_EMBED_FILE
1519	string "Embedded bootconfig file path"
1520	depends on BOOT_CONFIG_EMBED
1521	help
1522	  Specify a bootconfig file which will be embedded to the kernel.
1523	  This bootconfig will be used if there is no initrd or no other
1524	  bootconfig in the initrd.
1525
1526config CMDLINE_LOG_WRAP_IDEAL_LEN
1527	int "Length to try to wrap the cmdline when logged at boot"
1528	default 1021
1529	range 0 1021
1530	help
1531	  At boot time, the kernel command line is logged to the console.
1532	  The log message will start with the prefix "Kernel command line: ".
1533	  The log message will attempt to be wrapped (split into multiple log
1534	  messages) at spaces based on CMDLINE_LOG_WRAP_IDEAL_LEN characters.
1535	  If wrapping happens, each log message will start with the prefix and
1536	  all but the last message will end with " \". Messages may exceed the
1537	  ideal length if a place to wrap isn't found before the specified
1538	  number of characters.
1539
1540	  A value of 0 disables wrapping, though be warned that the maximum
1541	  length of a log message (1021 characters) may cause the cmdline to
1542	  be truncated.
1543
1544config INITRAMFS_PRESERVE_MTIME
1545	bool "Preserve cpio archive mtimes in initramfs"
1546	depends on BLK_DEV_INITRD
1547	default y
1548	help
1549	  Each entry in an initramfs cpio archive carries an mtime value. When
1550	  enabled, extracted cpio items take this mtime, with directory mtime
1551	  setting deferred until after creation of any child entries.
1552
1553	  If unsure, say Y.
1554
1555config INITRAMFS_TEST
1556	bool "Test initramfs cpio archive extraction" if !KUNIT_ALL_TESTS
1557	depends on BLK_DEV_INITRD && KUNIT=y
1558	default KUNIT_ALL_TESTS
1559	help
1560	  Build KUnit tests for initramfs. See Documentation/dev-tools/kunit
1561
1562choice
1563	prompt "Compiler optimization level"
1564	default CC_OPTIMIZE_FOR_PERFORMANCE
1565
1566config CC_OPTIMIZE_FOR_PERFORMANCE
1567	bool "Optimize for performance (-O2)"
1568	help
1569	  This is the default optimization level for the kernel, building
1570	  with the "-O2" compiler flag for best performance and most
1571	  helpful compile-time warnings.
1572
1573config CC_OPTIMIZE_FOR_SIZE
1574	bool "Optimize for size (-Os)"
1575	help
1576	  Choosing this option will pass "-Os" to your compiler resulting
1577	  in a smaller kernel.
1578
1579endchoice
1580
1581config HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1582	bool
1583	help
1584	  This requires that the arch annotates or otherwise protects
1585	  its external entry points from being discarded. Linker scripts
1586	  must also merge .text.*, .data.*, and .bss.* correctly into
1587	  output sections. Care must be taken not to pull in unrelated
1588	  sections (e.g., '.text.init'). Typically '.' in section names
1589	  is used to distinguish them from label names / C identifiers.
1590
1591config LD_DEAD_CODE_DATA_ELIMINATION
1592	bool "Dead code and data elimination (EXPERIMENTAL)"
1593	depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1594	depends on EXPERT
1595	depends on $(cc-option,-ffunction-sections -fdata-sections)
1596	depends on $(ld-option,--gc-sections)
1597	help
1598	  Enable this if you want to do dead code and data elimination with
1599	  the linker by compiling with -ffunction-sections -fdata-sections,
1600	  and linking with --gc-sections.
1601
1602	  This can reduce on disk and in-memory size of the kernel
1603	  code and static data, particularly for small configs and
1604	  on small systems. This has the possibility of introducing
1605	  silently broken kernel if the required annotations are not
1606	  present. This option is not well tested yet, so use at your
1607	  own risk.
1608
1609config LD_ORPHAN_WARN
1610	def_bool y
1611	depends on ARCH_WANT_LD_ORPHAN_WARN
1612	depends on $(ld-option,--orphan-handling=warn)
1613	depends on $(ld-option,--orphan-handling=error)
1614
1615config LD_ORPHAN_WARN_LEVEL
1616        string
1617        depends on LD_ORPHAN_WARN
1618        default "error" if WERROR
1619        default "warn"
1620
1621config SYSCTL
1622	bool
1623
1624config HAVE_UID16
1625	bool
1626
1627config SYSCTL_EXCEPTION_TRACE
1628	bool
1629	help
1630	  Enable support for /proc/sys/debug/exception-trace.
1631
1632config SYSCTL_ARCH_UNALIGN_NO_WARN
1633	bool
1634	help
1635	  Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
1636	  Allows arch to define/use @no_unaligned_warning to possibly warn
1637	  about unaligned access emulation going on under the hood.
1638
1639config SYSCTL_ARCH_UNALIGN_ALLOW
1640	bool
1641	help
1642	  Enable support for /proc/sys/kernel/unaligned-trap
1643	  Allows arches to define/use @unaligned_enabled to runtime toggle
1644	  the unaligned access emulation.
1645	  see arch/parisc/kernel/unaligned.c for reference
1646
1647config SYSFS_SYSCALL
1648	bool "Sysfs syscall support"
1649	default n
1650	help
1651	  sys_sysfs is an obsolete system call no longer supported in libc.
1652	  Note that disabling this option is more secure but might break
1653	  compatibility with some systems.
1654
1655	  If unsure say N here.
1656
1657config HAVE_PCSPKR_PLATFORM
1658	bool
1659
1660menuconfig EXPERT
1661	bool "Configure standard kernel features (expert users)"
1662	# Unhide debug options, to make the on-by-default options visible
1663	select DEBUG_KERNEL
1664	help
1665	  This option allows certain base kernel options and settings
1666	  to be disabled or tweaked. This is for specialized
1667	  environments which can tolerate a "non-standard" kernel.
1668	  Only use this if you really know what you are doing.
1669
1670config UID16
1671	bool "Enable 16-bit UID system calls" if EXPERT
1672	depends on HAVE_UID16 && MULTIUSER
1673	default y
1674	help
1675	  This enables the legacy 16-bit UID syscall wrappers.
1676
1677config MULTIUSER
1678	bool "Multiple users, groups and capabilities support" if EXPERT
1679	default y
1680	help
1681	  This option enables support for non-root users, groups and
1682	  capabilities.
1683
1684	  If you say N here, all processes will run with UID 0, GID 0, and all
1685	  possible capabilities.  Saying N here also compiles out support for
1686	  system calls related to UIDs, GIDs, and capabilities, such as setuid,
1687	  setgid, and capset.
1688
1689	  If unsure, say Y here.
1690
1691config SGETMASK_SYSCALL
1692	bool "sgetmask/ssetmask syscalls support" if EXPERT
1693	default PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
1694	help
1695	  sys_sgetmask and sys_ssetmask are obsolete system calls
1696	  no longer supported in libc but still enabled by default in some
1697	  architectures.
1698
1699	  If unsure, leave the default option here.
1700
1701config FHANDLE
1702	bool "open by fhandle syscalls" if EXPERT
1703	select EXPORTFS
1704	default y
1705	help
1706	  If you say Y here, a user level program will be able to map
1707	  file names to handle and then later use the handle for
1708	  different file system operations. This is useful in implementing
1709	  userspace file servers, which now track files using handles instead
1710	  of names. The handle would remain the same even if file names
1711	  get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2)
1712	  syscalls.
1713
1714config POSIX_TIMERS
1715	bool "Posix Clocks & timers" if EXPERT
1716	default y
1717	help
1718	  This includes native support for POSIX timers to the kernel.
1719	  Some embedded systems have no use for them and therefore they
1720	  can be configured out to reduce the size of the kernel image.
1721
1722	  When this option is disabled, the following syscalls won't be
1723	  available: timer_create, timer_gettime: timer_getoverrun,
1724	  timer_settime, timer_delete, clock_adjtime, getitimer,
1725	  setitimer, alarm. Furthermore, the clock_settime, clock_gettime,
1726	  clock_getres and clock_nanosleep syscalls will be limited to
1727	  CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_BOOTTIME only.
1728
1729	  If unsure say y.
1730
1731config PRINTK
1732	default y
1733	bool "Enable support for printk" if EXPERT
1734	select IRQ_WORK
1735	help
1736	  This option enables normal printk support. Removing it
1737	  eliminates most of the message strings from the kernel image
1738	  and makes the kernel more or less silent. As this makes it
1739	  very difficult to diagnose system problems, saying N here is
1740	  strongly discouraged.
1741
1742config PRINTK_RINGBUFFER_KUNIT_TEST
1743	tristate "KUnit Test for the printk ringbuffer" if !KUNIT_ALL_TESTS
1744	depends on PRINTK && KUNIT
1745	default KUNIT_ALL_TESTS
1746	help
1747	  This builds the printk ringbuffer KUnit test suite.
1748
1749	  For more information on KUnit and unit tests in general, please refer
1750	  to the KUnit documentation.
1751
1752	  If unsure, say N.
1753
1754config BUG
1755	bool "BUG() support" if EXPERT
1756	default y
1757	help
1758	  Disabling this option eliminates support for BUG and WARN, reducing
1759	  the size of your kernel image and potentially quietly ignoring
1760	  numerous fatal conditions. You should only consider disabling this
1761	  option for embedded systems with no facilities for reporting errors.
1762	  Just say Y.
1763
1764config ELF_CORE
1765	depends on COREDUMP
1766	default y
1767	bool "Enable ELF core dumps" if EXPERT
1768	help
1769	  Enable support for generating core dumps. Disabling saves about 4k.
1770
1771
1772config PCSPKR_PLATFORM
1773	bool "Enable PC-Speaker support" if EXPERT
1774	depends on HAVE_PCSPKR_PLATFORM
1775	select I8253_LOCK
1776	default y
1777	help
1778	  This option allows to disable the internal PC-Speaker
1779	  support, saving some memory.
1780
1781config BASE_SMALL
1782	bool "Enable smaller-sized data structures for core" if EXPERT
1783	help
1784	  Enabling this option reduces the size of miscellaneous core
1785	  kernel data structures. This saves memory on small machines,
1786	  but may reduce performance.
1787
1788config FUTEX
1789	bool "Enable futex support" if EXPERT
1790	depends on !(SPARC32 && SMP)
1791	default y
1792	imply RT_MUTEXES
1793	help
1794	  Disabling this option will cause the kernel to be built without
1795	  support for "fast userspace mutexes".  The resulting kernel may not
1796	  run glibc-based applications correctly.
1797
1798config FUTEX_PI
1799	bool
1800	depends on FUTEX && RT_MUTEXES
1801	default y
1802
1803config FUTEX_PRIVATE_HASH
1804	bool
1805	depends on FUTEX && !BASE_SMALL && MMU
1806	default y
1807
1808config FUTEX_MPOL
1809	bool
1810	depends on FUTEX && NUMA
1811	default y
1812
1813config EPOLL
1814	bool "Enable eventpoll support" if EXPERT
1815	default y
1816	help
1817	  Disabling this option will cause the kernel to be built without
1818	  support for epoll family of system calls.
1819
1820config SIGNALFD
1821	bool "Enable signalfd() system call" if EXPERT
1822	default y
1823	help
1824	  Enable the signalfd() system call that allows to receive signals
1825	  on a file descriptor.
1826
1827	  If unsure, say Y.
1828
1829config TIMERFD
1830	bool "Enable timerfd() system call" if EXPERT
1831	default y
1832	help
1833	  Enable the timerfd() system call that allows to receive timer
1834	  events on a file descriptor.
1835
1836	  If unsure, say Y.
1837
1838config EVENTFD
1839	bool "Enable eventfd() system call" if EXPERT
1840	default y
1841	help
1842	  Enable the eventfd() system call that allows to receive both
1843	  kernel notification (ie. KAIO) or userspace notifications.
1844
1845	  If unsure, say Y.
1846
1847config SHMEM
1848	bool "Use full shmem filesystem" if EXPERT
1849	default y
1850	depends on MMU
1851	help
1852	  The shmem is an internal filesystem used to manage shared memory.
1853	  It is backed by swap and manages resource limits. It is also exported
1854	  to userspace as tmpfs if TMPFS is enabled. Disabling this
1855	  option replaces shmem and tmpfs with the much simpler ramfs code,
1856	  which may be appropriate on small systems without swap.
1857
1858config AIO
1859	bool "Enable AIO support" if EXPERT
1860	default y
1861	help
1862	  This option enables POSIX asynchronous I/O which may by used
1863	  by some high performance threaded applications. Disabling
1864	  this option saves about 7k.
1865
1866config IO_URING
1867	bool "Enable IO uring support" if EXPERT
1868	select IO_WQ
1869	default y
1870	help
1871	  This option enables support for the io_uring interface, enabling
1872	  applications to submit and complete IO through submission and
1873	  completion rings that are shared between the kernel and application.
1874
1875config GCOV_PROFILE_URING
1876	bool "Enable GCOV profiling on the io_uring subsystem"
1877	depends on IO_URING && GCOV_KERNEL
1878	help
1879	  Enable GCOV profiling on the io_uring subsystem, to facilitate
1880	  code coverage testing.
1881
1882	  If unsure, say N.
1883
1884	  Note that this will have a negative impact on the performance of
1885	  the io_uring subsystem, hence this should only be enabled for
1886	  specific test purposes.
1887
1888config IO_URING_MOCK_FILE
1889	tristate "Enable io_uring mock files (Experimental)" if EXPERT
1890	default n
1891	depends on IO_URING
1892	help
1893	  Enable mock files for io_uring subststem testing. The ABI might
1894	  still change, so it's still experimental and should only be enabled
1895	  for specific test purposes.
1896
1897	  If unsure, say N.
1898
1899config ADVISE_SYSCALLS
1900	bool "Enable madvise/fadvise syscalls" if EXPERT
1901	default y
1902	help
1903	  This option enables the madvise and fadvise syscalls, used by
1904	  applications to advise the kernel about their future memory or file
1905	  usage, improving performance. If building an embedded system where no
1906	  applications use these syscalls, you can disable this option to save
1907	  space.
1908
1909config MEMBARRIER
1910	bool "Enable membarrier() system call" if EXPERT
1911	default y
1912	help
1913	  Enable the membarrier() system call that allows issuing memory
1914	  barriers across all running threads, which can be used to distribute
1915	  the cost of user-space memory barriers asymmetrically by transforming
1916	  pairs of memory barriers into pairs consisting of membarrier() and a
1917	  compiler barrier.
1918
1919	  If unsure, say Y.
1920
1921config KCMP
1922	bool "Enable kcmp() system call" if EXPERT
1923	help
1924	  Enable the kernel resource comparison system call. It provides
1925	  user-space with the ability to compare two processes to see if they
1926	  share a common resource, such as a file descriptor or even virtual
1927	  memory space.
1928
1929	  If unsure, say N.
1930
1931config RSEQ
1932	bool "Enable rseq() system call" if EXPERT
1933	default y
1934	depends on HAVE_RSEQ
1935	select MEMBARRIER
1936	help
1937	  Enable the restartable sequences system call. It provides a
1938	  user-space cache for the current CPU number value, which
1939	  speeds up getting the current CPU number from user-space,
1940	  as well as an ABI to speed up user-space operations on
1941	  per-CPU data.
1942
1943	  If unsure, say Y.
1944
1945config RSEQ_STATS
1946	default n
1947	bool "Enable lightweight statistics of restartable sequences" if EXPERT
1948	depends on RSEQ && DEBUG_FS
1949	help
1950	  Enable lightweight counters which expose information about the
1951	  frequency of RSEQ operations via debugfs. Mostly interesting for
1952	  kernel debugging or performance analysis. While lightweight it's
1953	  still adding code into the user/kernel mode transitions.
1954
1955	  If unsure, say N.
1956
1957config RSEQ_DEBUG_DEFAULT_ENABLE
1958	default n
1959	bool "Enable restartable sequences debug mode by default" if EXPERT
1960	depends on RSEQ
1961	help
1962	  This enables the static branch for debug mode of restartable
1963	  sequences.
1964
1965	  This also can be controlled on the kernel command line via the
1966	  command line parameter "rseq_debug=0/1" and through debugfs.
1967
1968	  If unsure, say N.
1969
1970config DEBUG_RSEQ
1971	default n
1972	bool "Enable debugging of rseq() system call" if EXPERT
1973	depends on RSEQ && DEBUG_KERNEL && !GENERIC_ENTRY
1974	select RSEQ_DEBUG_DEFAULT_ENABLE
1975	help
1976	  Enable extra debugging checks for the rseq system call.
1977
1978	  If unsure, say N.
1979
1980config CACHESTAT_SYSCALL
1981	bool "Enable cachestat() system call" if EXPERT
1982	default y
1983	help
1984	  Enable the cachestat system call, which queries the page cache
1985	  statistics of a file (number of cached pages, dirty pages,
1986	  pages marked for writeback, (recently) evicted pages).
1987
1988	  If unsure say Y here.
1989
1990config KALLSYMS
1991	bool "Load all symbols for debugging/ksymoops" if EXPERT
1992	default y
1993	help
1994	  Say Y here to let the kernel print out symbolic crash information and
1995	  symbolic stack backtraces. This increases the size of the kernel
1996	  somewhat, as all symbols have to be loaded into the kernel image.
1997
1998config KALLSYMS_SELFTEST
1999	bool "Test the basic functions and performance of kallsyms"
2000	depends on KALLSYMS
2001	default n
2002	help
2003	  Test the basic functions and performance of some interfaces, such as
2004	  kallsyms_lookup_name. It also calculates the compression rate of the
2005	  kallsyms compression algorithm for the current symbol set.
2006
2007	  Start self-test automatically after system startup. Suggest executing
2008	  "dmesg | grep kallsyms_selftest" to collect test results. "finish" is
2009	  displayed in the last line, indicating that the test is complete.
2010
2011config KALLSYMS_ALL
2012	bool "Include all symbols in kallsyms"
2013	depends on DEBUG_KERNEL && KALLSYMS
2014	help
2015	  Normally kallsyms only contains the symbols of functions for nicer
2016	  OOPS messages and backtraces (i.e., symbols from the text and inittext
2017	  sections). This is sufficient for most cases. And only if you want to
2018	  enable kernel live patching, or other less common use cases (e.g.,
2019	  when a debugger is used) all symbols are required (i.e., names of
2020	  variables from the data sections, etc).
2021
2022	  This option makes sure that all symbols are loaded into the kernel
2023	  image (i.e., symbols from all sections) in cost of increased kernel
2024	  size (depending on the kernel configuration, it may be 300KiB or
2025	  something like this).
2026
2027	  Say N unless you really need all symbols, or kernel live patching.
2028
2029# end of the "standard kernel features (expert users)" menu
2030
2031config ARCH_HAS_MEMBARRIER_CALLBACKS
2032	bool
2033
2034config ARCH_HAS_MEMBARRIER_SYNC_CORE
2035	bool
2036
2037config ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
2038	bool
2039	help
2040	  Control MSEAL_SYSTEM_MAPPINGS access based on architecture.
2041
2042	  A 64-bit kernel is required for the memory sealing feature.
2043	  No specific hardware features from the CPU are needed.
2044
2045	  To enable this feature, the architecture needs to update their
2046	  special mappings calls to include the sealing flag and confirm
2047	  that it doesn't unmap/remap system mappings during the life
2048	  time of the process. The existence of this flag for an architecture
2049	  implies that it does not require the remapping of the system
2050	  mappings during process lifetime, so sealing these mappings is safe
2051	  from a kernel perspective.
2052
2053	  After the architecture enables this, a distribution can set
2054	  CONFIG_MSEAL_SYSTEM_MAPPING to manage access to the feature.
2055
2056	  For complete descriptions of memory sealing, please see
2057	  Documentation/userspace-api/mseal.rst
2058
2059config HAVE_PERF_EVENTS
2060	bool
2061	help
2062	  See tools/perf/design.txt for details.
2063
2064config GUEST_PERF_EVENTS
2065	bool
2066	depends on HAVE_PERF_EVENTS
2067
2068config PERF_USE_VMALLOC
2069	bool
2070	help
2071	  See tools/perf/design.txt for details
2072
2073menu "Kernel Performance Events And Counters"
2074
2075config PERF_EVENTS
2076	bool "Kernel performance events and counters"
2077	default y if PROFILING
2078	depends on HAVE_PERF_EVENTS
2079	select IRQ_WORK
2080	help
2081	  Enable kernel support for various performance events provided
2082	  by software and hardware.
2083
2084	  Software events are supported either built-in or via the
2085	  use of generic tracepoints.
2086
2087	  Most modern CPUs support performance events via performance
2088	  counter registers. These registers count the number of certain
2089	  types of hw events: such as instructions executed, cachemisses
2090	  suffered, or branches mis-predicted - without slowing down the
2091	  kernel or applications. These registers can also trigger interrupts
2092	  when a threshold number of events have passed - and can thus be
2093	  used to profile the code that runs on that CPU.
2094
2095	  The Linux Performance Event subsystem provides an abstraction of
2096	  these software and hardware event capabilities, available via a
2097	  system call and used by the "perf" utility in tools/perf/. It
2098	  provides per task and per CPU counters, and it provides event
2099	  capabilities on top of those.
2100
2101	  Say Y if unsure.
2102
2103config DEBUG_PERF_USE_VMALLOC
2104	default n
2105	bool "Debug: use vmalloc to back perf mmap() buffers"
2106	depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
2107	select PERF_USE_VMALLOC
2108	help
2109	  Use vmalloc memory to back perf mmap() buffers.
2110
2111	  Mostly useful for debugging the vmalloc code on platforms
2112	  that don't require it.
2113
2114	  Say N if unsure.
2115
2116endmenu
2117
2118config SYSTEM_DATA_VERIFICATION
2119	def_bool n
2120	select SYSTEM_TRUSTED_KEYRING
2121	select KEYS
2122	select CRYPTO
2123	select CRYPTO_RSA
2124	select ASYMMETRIC_KEY_TYPE
2125	select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
2126	select ASN1
2127	select OID_REGISTRY
2128	select X509_CERTIFICATE_PARSER
2129	select PKCS7_MESSAGE_PARSER
2130	help
2131	  Provide PKCS#7 message verification using the contents of the system
2132	  trusted keyring to provide public keys.  This then can be used for
2133	  module verification, kexec image verification and firmware blob
2134	  verification.
2135
2136config PROFILING
2137	bool "Profiling support"
2138	help
2139	  Say Y here to enable the extended profiling support mechanisms used
2140	  by profilers.
2141
2142config RUST
2143	bool "Rust support"
2144	depends on HAVE_RUST
2145	depends on RUST_IS_AVAILABLE
2146	select EXTENDED_MODVERSIONS if MODVERSIONS
2147	depends on !MODVERSIONS || GENDWARFKSYMS
2148	depends on !GCC_PLUGIN_RANDSTRUCT
2149	depends on !RANDSTRUCT
2150	depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
2151	depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
2152	select CFI_ICALL_NORMALIZE_INTEGERS if CFI
2153	depends on !CALL_PADDING || RUSTC_VERSION >= 108100
2154	depends on !KASAN_SW_TAGS
2155	depends on !(MITIGATION_RETHUNK && KASAN) || RUSTC_VERSION >= 108300
2156	help
2157	  Enables Rust support in the kernel.
2158
2159	  This allows other Rust-related options, like drivers written in Rust,
2160	  to be selected.
2161
2162	  It is also required to be able to load external kernel modules
2163	  written in Rust.
2164
2165	  See Documentation/rust/ for more information.
2166
2167	  If unsure, say N.
2168
2169config RUSTC_VERSION_TEXT
2170	string
2171	depends on RUST
2172	default "$(RUSTC_VERSION_TEXT)"
2173	help
2174	  See `CC_VERSION_TEXT`.
2175
2176config BINDGEN_VERSION_TEXT
2177	string
2178	depends on RUST
2179	# The dummy parameter `workaround-for-0.69.0` is required to support 0.69.0
2180	# (https://github.com/rust-lang/rust-bindgen/pull/2678) and 0.71.0
2181	# (https://github.com/rust-lang/rust-bindgen/pull/3040). It can be removed
2182	# when the minimum version is upgraded past the latter (0.69.1 and 0.71.1
2183	# both fixed the issue).
2184	default "$(shell,$(BINDGEN) --version workaround-for-0.69.0 2>/dev/null)"
2185
2186#
2187# Place an empty function call at each tracepoint site. Can be
2188# dynamically changed for a probe function.
2189#
2190config TRACEPOINTS
2191	bool
2192	select TASKS_TRACE_RCU
2193
2194source "kernel/Kconfig.kexec"
2195
2196source "kernel/liveupdate/Kconfig"
2197
2198endmenu		# General setup
2199
2200source "arch/Kconfig"
2201
2202config RT_MUTEXES
2203	bool
2204	default y if PREEMPT_RT
2205
2206config MODULE_SIG_FORMAT
2207	def_bool n
2208	select SYSTEM_DATA_VERIFICATION
2209
2210source "kernel/module/Kconfig"
2211
2212config INIT_ALL_POSSIBLE
2213	bool
2214	help
2215	  Back when each arch used to define their own cpu_online_mask and
2216	  cpu_possible_mask, some of them chose to initialize cpu_possible_mask
2217	  with all 1s, and others with all 0s.  When they were centralised,
2218	  it was better to provide this option than to break all the archs
2219	  and have several arch maintainers pursuing me down dark alleys.
2220
2221source "block/Kconfig"
2222
2223config PREEMPT_NOTIFIERS
2224	bool
2225
2226config PADATA
2227	depends on SMP
2228	bool
2229
2230config ASN1
2231	tristate
2232	help
2233	  Build a simple ASN.1 grammar compiler that produces a bytecode output
2234	  that can be interpreted by the ASN.1 stream decoder and used to
2235	  inform it as to what tags are to be expected in a stream and what
2236	  functions to call on what tags.
2237
2238source "kernel/Kconfig.locks"
2239
2240config ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
2241	bool
2242
2243config ARCH_HAS_PREPARE_SYNC_CORE_CMD
2244	bool
2245
2246config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
2247	bool
2248
2249# It may be useful for an architecture to override the definitions of the
2250# SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>
2251# and the COMPAT_ variants in <linux/compat.h>, in particular to use a
2252# different calling convention for syscalls. They can also override the
2253# macros for not-implemented syscalls in kernel/sys_ni.c and
2254# kernel/time/posix-stubs.c. All these overrides need to be available in
2255# <asm/syscall_wrapper.h>.
2256config ARCH_HAS_SYSCALL_WRAPPER
2257	def_bool n
2258