xref: /linux/init/Kconfig (revision 23f09dcc0a0fa3b4e48516bdea1c90223dfb3d6c)
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"
628	depends on MULTIUSER
629	help
630	  If you say Y here, a user level program will be able to instruct the
631	  kernel (via a special system call) to write process accounting
632	  information to a file: whenever a process exits, information about
633	  that process will be appended to the file by the kernel.  The
634	  information includes things such as creation time, owning user,
635	  command name, memory usage, controlling terminal etc. (the complete
636	  list is in the struct acct in <file:include/linux/acct.h>).  It is
637	  up to the user level program to do useful things with this
638	  information.  This is generally a good idea, so say Y.
639
640config BSD_PROCESS_ACCT_V3
641	bool "BSD Process Accounting version 3 file format"
642	depends on BSD_PROCESS_ACCT
643	default n
644	help
645	  If you say Y here, the process accounting information is written
646	  in a new file format that also logs the process IDs of each
647	  process and its parent. Note that this file format is incompatible
648	  with previous v0/v1/v2 file formats, so you will need updated tools
649	  for processing it. A preliminary version of these tools is available
650	  at <http://www.gnu.org/software/acct/>.
651
652config TASKSTATS
653	bool "Export task/process statistics through netlink"
654	depends on NET
655	depends on MULTIUSER
656	default n
657	help
658	  Export selected statistics for tasks/processes through the
659	  generic netlink interface. Unlike BSD process accounting, the
660	  statistics are available during the lifetime of tasks/processes as
661	  responses to commands. Like BSD accounting, they are sent to user
662	  space on task exit.
663
664	  Say N if unsure.
665
666config TASK_DELAY_ACCT
667	bool "Enable per-task delay accounting"
668	depends on TASKSTATS
669	select SCHED_INFO
670	help
671	  Collect information on time spent by a task waiting for system
672	  resources like cpu, synchronous block I/O completion and swapping
673	  in pages. Such statistics can help in setting a task's priorities
674	  relative to other tasks for cpu, io, rss limits etc.
675
676	  Say N if unsure.
677
678config TASK_XACCT
679	bool "Enable extended accounting over taskstats"
680	depends on TASKSTATS
681	help
682	  Collect extended task accounting data and send the data
683	  to userland for processing over the taskstats interface.
684
685	  Say N if unsure.
686
687config TASK_IO_ACCOUNTING
688	bool "Enable per-task storage I/O accounting"
689	depends on TASK_XACCT
690	help
691	  Collect information on the number of bytes of storage I/O which this
692	  task has caused.
693
694	  Say N if unsure.
695
696config PSI
697	bool "Pressure stall information tracking"
698	select KERNFS
699	help
700	  Collect metrics that indicate how overcommitted the CPU, memory,
701	  and IO capacity are in the system.
702
703	  If you say Y here, the kernel will create /proc/pressure/ with the
704	  pressure statistics files cpu, memory, and io. These will indicate
705	  the share of walltime in which some or all tasks in the system are
706	  delayed due to contention of the respective resource.
707
708	  In kernels with cgroup support, cgroups (cgroup2 only) will
709	  have cpu.pressure, memory.pressure, and io.pressure files,
710	  which aggregate pressure stalls for the grouped tasks only.
711
712	  For more details see Documentation/accounting/psi.rst.
713
714	  Say N if unsure.
715
716config PSI_DEFAULT_DISABLED
717	bool "Require boot parameter to enable pressure stall information tracking"
718	default n
719	depends on PSI
720	help
721	  If set, pressure stall information tracking will be disabled
722	  per default but can be enabled through passing psi=1 on the
723	  kernel commandline during boot.
724
725	  This feature adds some code to the task wakeup and sleep
726	  paths of the scheduler. The overhead is too low to affect
727	  common scheduling-intense workloads in practice (such as
728	  webservers, memcache), but it does show up in artificial
729	  scheduler stress tests, such as hackbench.
730
731	  If you are paranoid and not sure what the kernel will be
732	  used for, say Y.
733
734	  Say N if unsure.
735
736endmenu # "CPU/Task time and stats accounting"
737
738config CPU_ISOLATION
739	bool "CPU isolation"
740	depends on SMP
741	default y
742	help
743	  Make sure that CPUs running critical tasks are not disturbed by
744	  any source of "noise" such as unbound workqueues, timers, kthreads...
745	  Unbound jobs get offloaded to housekeeping CPUs. This is driven by
746	  the "isolcpus=" boot parameter.
747
748	  Say Y if unsure.
749
750source "kernel/rcu/Kconfig"
751
752config IKCONFIG
753	tristate "Kernel .config support"
754	help
755	  This option enables the complete Linux kernel ".config" file
756	  contents to be saved in the kernel. It provides documentation
757	  of which kernel options are used in a running kernel or in an
758	  on-disk kernel.  This information can be extracted from the kernel
759	  image file with the script scripts/extract-ikconfig and used as
760	  input to rebuild the current kernel or to build another kernel.
761	  It can also be extracted from a running kernel by reading
762	  /proc/config.gz if enabled (below).
763
764config IKCONFIG_PROC
765	bool "Enable access to .config through /proc/config.gz"
766	depends on IKCONFIG && PROC_FS
767	help
768	  This option enables access to the kernel configuration file
769	  through /proc/config.gz.
770
771config IKHEADERS
772	tristate "Enable kernel headers through /sys/kernel/kheaders.tar.xz"
773	depends on SYSFS
774	help
775	  This option enables access to the in-kernel headers that are generated during
776	  the build process. These can be used to build eBPF tracing programs,
777	  or similar programs.  If you build the headers as a module, a module called
778	  kheaders.ko is built which can be loaded on-demand to get access to headers.
779
780config LOG_BUF_SHIFT
781	int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
782	range 12 25
783	default 17
784	depends on PRINTK
785	help
786	  Select the minimal kernel log buffer size as a power of 2.
787	  The final size is affected by LOG_CPU_MAX_BUF_SHIFT config
788	  parameter, see below. Any higher size also might be forced
789	  by "log_buf_len" boot parameter.
790
791	  Examples:
792		     17 => 128 KB
793		     16 => 64 KB
794		     15 => 32 KB
795		     14 => 16 KB
796		     13 =>  8 KB
797		     12 =>  4 KB
798
799config LOG_CPU_MAX_BUF_SHIFT
800	int "CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB)"
801	depends on SMP
802	range 0 21
803	default 0 if BASE_SMALL
804	default 12
805	depends on PRINTK
806	help
807	  This option allows to increase the default ring buffer size
808	  according to the number of CPUs. The value defines the contribution
809	  of each CPU as a power of 2. The used space is typically only few
810	  lines however it might be much more when problems are reported,
811	  e.g. backtraces.
812
813	  The increased size means that a new buffer has to be allocated and
814	  the original static one is unused. It makes sense only on systems
815	  with more CPUs. Therefore this value is used only when the sum of
816	  contributions is greater than the half of the default kernel ring
817	  buffer as defined by LOG_BUF_SHIFT. The default values are set
818	  so that more than 16 CPUs are needed to trigger the allocation.
819
820	  Also this option is ignored when "log_buf_len" kernel parameter is
821	  used as it forces an exact (power of two) size of the ring buffer.
822
823	  The number of possible CPUs is used for this computation ignoring
824	  hotplugging making the computation optimal for the worst case
825	  scenario while allowing a simple algorithm to be used from bootup.
826
827	  Examples shift values and their meaning:
828		     17 => 128 KB for each CPU
829		     16 =>  64 KB for each CPU
830		     15 =>  32 KB for each CPU
831		     14 =>  16 KB for each CPU
832		     13 =>   8 KB for each CPU
833		     12 =>   4 KB for each CPU
834
835config PRINTK_INDEX
836	bool "Printk indexing debugfs interface"
837	depends on PRINTK && DEBUG_FS
838	help
839	  Add support for indexing of all printk formats known at compile time
840	  at <debugfs>/printk/index/<module>.
841
842	  This can be used as part of maintaining daemons which monitor
843	  /dev/kmsg, as it permits auditing the printk formats present in a
844	  kernel, allowing detection of cases where monitored printks are
845	  changed or no longer present.
846
847	  There is no additional runtime cost to printk with this enabled.
848
849#
850# Architectures with an unreliable sched_clock() should select this:
851#
852config HAVE_UNSTABLE_SCHED_CLOCK
853	bool
854
855config GENERIC_SCHED_CLOCK
856	bool
857
858menu "Scheduler features"
859
860config UCLAMP_TASK
861	bool "Enable utilization clamping for RT/FAIR tasks"
862	depends on CPU_FREQ_GOV_SCHEDUTIL
863	help
864	  This feature enables the scheduler to track the clamped utilization
865	  of each CPU based on RUNNABLE tasks scheduled on that CPU.
866
867	  With this option, the user can specify the min and max CPU
868	  utilization allowed for RUNNABLE tasks. The max utilization defines
869	  the maximum frequency a task should use while the min utilization
870	  defines the minimum frequency it should use.
871
872	  Both min and max utilization clamp values are hints to the scheduler,
873	  aiming at improving its frequency selection policy, but they do not
874	  enforce or grant any specific bandwidth for tasks.
875
876	  If in doubt, say N.
877
878config UCLAMP_BUCKETS_COUNT
879	int "Number of supported utilization clamp buckets"
880	range 5 20
881	default 5
882	depends on UCLAMP_TASK
883	help
884	  Defines the number of clamp buckets to use. The range of each bucket
885	  will be SCHED_CAPACITY_SCALE/UCLAMP_BUCKETS_COUNT. The higher the
886	  number of clamp buckets the finer their granularity and the higher
887	  the precision of clamping aggregation and tracking at run-time.
888
889	  For example, with the minimum configuration value we will have 5
890	  clamp buckets tracking 20% utilization each. A 25% boosted tasks will
891	  be refcounted in the [20..39]% bucket and will set the bucket clamp
892	  effective value to 25%.
893	  If a second 30% boosted task should be co-scheduled on the same CPU,
894	  that task will be refcounted in the same bucket of the first task and
895	  it will boost the bucket clamp effective value to 30%.
896	  The clamp effective value of a bucket is reset to its nominal value
897	  (20% in the example above) when there are no more tasks refcounted in
898	  that bucket.
899
900	  An additional boost/capping margin can be added to some tasks. In the
901	  example above the 25% task will be boosted to 30% until it exits the
902	  CPU. If that should be considered not acceptable on certain systems,
903	  it's always possible to reduce the margin by increasing the number of
904	  clamp buckets to trade off used memory for run-time tracking
905	  precision.
906
907	  If in doubt, use the default value.
908
909config SCHED_PROXY_EXEC
910	bool "Proxy Execution"
911	# Avoid some build failures w/ PREEMPT_RT until it can be fixed
912	depends on !PREEMPT_RT
913	# Need to investigate how to inform sched_ext of split contexts
914	depends on !SCHED_CLASS_EXT
915	# Not particularly useful until we get to multi-rq proxying
916	depends on EXPERT
917	help
918	  This option enables proxy execution, a mechanism for mutex-owning
919	  tasks to inherit the scheduling context of higher priority waiters.
920
921endmenu
922
923#
924# For architectures that want to enable the support for NUMA-affine scheduler
925# balancing logic:
926#
927config ARCH_SUPPORTS_NUMA_BALANCING
928	bool
929
930#
931# For architectures that prefer to flush all TLBs after a number of pages
932# are unmapped instead of sending one IPI per page to flush. The architecture
933# must provide guarantees on what happens if a clean TLB cache entry is
934# written after the unmap. Details are in mm/rmap.c near the check for
935# should_defer_flush. The architecture should also consider if the full flush
936# and the refill costs are offset by the savings of sending fewer IPIs.
937config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
938	bool
939
940config CC_HAS_INT128
941	def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
942
943config CC_IMPLICIT_FALLTHROUGH
944	string
945	default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
946	default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
947
948# Currently, disable gcc-10+ array-bounds globally.
949# It's still broken in gcc-13, so no upper bound yet.
950config GCC10_NO_ARRAY_BOUNDS
951	def_bool y
952
953config CC_NO_ARRAY_BOUNDS
954	bool
955	default y if CC_IS_GCC && GCC_VERSION >= 90000 && GCC10_NO_ARRAY_BOUNDS
956
957# Currently, disable -Wstringop-overflow for GCC globally.
958config GCC_NO_STRINGOP_OVERFLOW
959	def_bool y
960
961config CC_NO_STRINGOP_OVERFLOW
962	bool
963	default y if CC_IS_GCC && GCC_NO_STRINGOP_OVERFLOW
964
965config CC_STRINGOP_OVERFLOW
966	bool
967	default y if CC_IS_GCC && !CC_NO_STRINGOP_OVERFLOW
968
969#
970# For architectures that know their GCC __int128 support is sound
971#
972config ARCH_SUPPORTS_INT128
973	bool
974
975# For architectures that (ab)use NUMA to represent different memory regions
976# all cpu-local but of different latencies, such as SuperH.
977#
978config ARCH_WANT_NUMA_VARIABLE_LOCALITY
979	bool
980
981config NUMA_BALANCING
982	bool "Memory placement aware NUMA scheduler"
983	depends on ARCH_SUPPORTS_NUMA_BALANCING
984	depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY
985	depends on SMP && NUMA && MIGRATION && !PREEMPT_RT
986	help
987	  This option adds support for automatic NUMA aware memory/task placement.
988	  The mechanism is quite primitive and is based on migrating memory when
989	  it has references to the node the task is running on.
990
991	  This system will be inactive on UMA systems.
992
993config NUMA_BALANCING_DEFAULT_ENABLED
994	bool "Automatically enable NUMA aware memory/task placement"
995	default y
996	depends on NUMA_BALANCING
997	help
998	  If set, automatic NUMA balancing will be enabled if running on a NUMA
999	  machine.
1000
1001config SLAB_OBJ_EXT
1002	bool
1003
1004menuconfig CGROUPS
1005	bool "Control Group support"
1006	select KERNFS
1007	help
1008	  This option adds support for grouping sets of processes together, for
1009	  use with process control subsystems such as Cpusets, CFS, memory
1010	  controls or device isolation.
1011	  See
1012		- Documentation/scheduler/sched-design-CFS.rst	(CFS)
1013		- Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation
1014					  and resource control)
1015
1016	  Say N if unsure.
1017
1018if CGROUPS
1019
1020config PAGE_COUNTER
1021	bool
1022
1023config CGROUP_FAVOR_DYNMODS
1024        bool "Favor dynamic modification latency reduction by default"
1025        help
1026          This option enables the "favordynmods" mount option by default
1027          which reduces the latencies of dynamic cgroup modifications such
1028          as task migrations and controller on/offs at the cost of making
1029          hot path operations such as forks and exits more expensive.
1030
1031          Say N if unsure.
1032
1033config MEMCG
1034	bool "Memory controller"
1035	select PAGE_COUNTER
1036	select EVENTFD
1037	select SLAB_OBJ_EXT
1038	select VM_EVENT_COUNTERS
1039	help
1040	  Provides control over the memory footprint of tasks in a cgroup.
1041
1042config MEMCG_NMI_UNSAFE
1043	bool
1044	depends on MEMCG
1045	depends on HAVE_NMI
1046	depends on !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && !ARCH_HAVE_NMI_SAFE_CMPXCHG
1047	default y
1048
1049config MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
1050	bool
1051	depends on MEMCG
1052	depends on HAVE_NMI
1053	depends on !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && ARCH_HAVE_NMI_SAFE_CMPXCHG
1054	default y
1055
1056config MEMCG_V1
1057	bool "Legacy cgroup v1 memory controller"
1058	depends on MEMCG
1059	default n
1060	help
1061	  Legacy cgroup v1 memory controller which has been deprecated by
1062	  cgroup v2 implementation. The v1 is there for legacy applications
1063	  which haven't migrated to the new cgroup v2 interface yet. If you
1064	  do not have any such application then you are completely fine leaving
1065	  this option disabled.
1066
1067	  Please note that feature set of the legacy memory controller is likely
1068	  going to shrink due to deprecation process. New deployments with v1
1069	  controller are highly discouraged.
1070
1071	  Say N if unsure.
1072
1073config BLK_CGROUP
1074	bool "IO controller"
1075	depends on BLOCK
1076	default n
1077	help
1078	Generic block IO controller cgroup interface. This is the common
1079	cgroup interface which should be used by various IO controlling
1080	policies.
1081
1082	Currently, CFQ IO scheduler uses it to recognize task groups and
1083	control disk bandwidth allocation (proportional time slice allocation)
1084	to such task groups. It is also used by bio throttling logic in
1085	block layer to implement upper limit in IO rates on a device.
1086
1087	This option only enables generic Block IO controller infrastructure.
1088	One needs to also enable actual IO controlling logic/policy. For
1089	enabling proportional weight division of disk bandwidth in CFQ, set
1090	CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
1091	CONFIG_BLK_DEV_THROTTLING=y.
1092
1093	See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
1094
1095config CGROUP_WRITEBACK
1096	bool
1097	depends on MEMCG && BLK_CGROUP
1098	default y
1099
1100menuconfig CGROUP_SCHED
1101	bool "CPU controller"
1102	default n
1103	help
1104	  This feature lets CPU scheduler recognize task groups and control CPU
1105	  bandwidth allocation to such task groups. It uses cgroups to group
1106	  tasks.
1107
1108if CGROUP_SCHED
1109config GROUP_SCHED_WEIGHT
1110	def_bool n
1111
1112config GROUP_SCHED_BANDWIDTH
1113        def_bool n
1114
1115config FAIR_GROUP_SCHED
1116	bool "Group scheduling for SCHED_OTHER"
1117	depends on CGROUP_SCHED
1118	select GROUP_SCHED_WEIGHT
1119	default CGROUP_SCHED
1120
1121config CFS_BANDWIDTH
1122	bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
1123	depends on FAIR_GROUP_SCHED
1124	select GROUP_SCHED_BANDWIDTH
1125	default n
1126	help
1127	  This option allows users to define CPU bandwidth rates (limits) for
1128	  tasks running within the fair group scheduler.  Groups with no limit
1129	  set are considered to be unconstrained and will run with no
1130	  restriction.
1131	  See Documentation/scheduler/sched-bwc.rst for more information.
1132
1133config RT_GROUP_SCHED
1134	bool "Group scheduling for SCHED_RR/FIFO"
1135	depends on CGROUP_SCHED
1136	default n
1137	help
1138	  This feature lets you explicitly allocate real CPU bandwidth
1139	  to task groups. If enabled, it will also make it impossible to
1140	  schedule realtime tasks for non-root users until you allocate
1141	  realtime bandwidth for them.
1142	  See Documentation/scheduler/sched-rt-group.rst for more information.
1143
1144config RT_GROUP_SCHED_DEFAULT_DISABLED
1145	bool "Require boot parameter to enable group scheduling for SCHED_RR/FIFO"
1146	depends on RT_GROUP_SCHED
1147	default n
1148	help
1149	  When set, the RT group scheduling is disabled by default. The option
1150	  is in inverted form so that mere RT_GROUP_SCHED enables the group
1151	  scheduling.
1152
1153	  Say N if unsure.
1154
1155config EXT_GROUP_SCHED
1156	bool
1157	depends on SCHED_CLASS_EXT && CGROUP_SCHED
1158	select GROUP_SCHED_WEIGHT
1159	select GROUP_SCHED_BANDWIDTH
1160	default y
1161
1162endif #CGROUP_SCHED
1163
1164config SCHED_MM_CID
1165	def_bool y
1166	depends on SMP && RSEQ
1167
1168config UCLAMP_TASK_GROUP
1169	bool "Utilization clamping per group of tasks"
1170	depends on CGROUP_SCHED
1171	depends on UCLAMP_TASK
1172	default n
1173	help
1174	  This feature enables the scheduler to track the clamped utilization
1175	  of each CPU based on RUNNABLE tasks currently scheduled on that CPU.
1176
1177	  When this option is enabled, the user can specify a min and max
1178	  CPU bandwidth which is allowed for each single task in a group.
1179	  The max bandwidth allows to clamp the maximum frequency a task
1180	  can use, while the min bandwidth allows to define a minimum
1181	  frequency a task will always use.
1182
1183	  When task group based utilization clamping is enabled, an eventually
1184	  specified task-specific clamp value is constrained by the cgroup
1185	  specified clamp value. Both minimum and maximum task clamping cannot
1186	  be bigger than the corresponding clamping defined at task group level.
1187
1188	  If in doubt, say N.
1189
1190config CGROUP_PIDS
1191	bool "PIDs controller"
1192	help
1193	  Provides enforcement of process number limits in the scope of a
1194	  cgroup. Any attempt to fork more processes than is allowed in the
1195	  cgroup will fail. PIDs are fundamentally a global resource because it
1196	  is fairly trivial to reach PID exhaustion before you reach even a
1197	  conservative kmemcg limit. As a result, it is possible to grind a
1198	  system to halt without being limited by other cgroup policies. The
1199	  PIDs controller is designed to stop this from happening.
1200
1201	  It should be noted that organisational operations (such as attaching
1202	  to a cgroup hierarchy) will *not* be blocked by the PIDs controller,
1203	  since the PIDs limit only affects a process's ability to fork, not to
1204	  attach to a cgroup.
1205
1206config CGROUP_RDMA
1207	bool "RDMA controller"
1208	help
1209	  Provides enforcement of RDMA resources defined by IB stack.
1210	  It is fairly easy for consumers to exhaust RDMA resources, which
1211	  can result into resource unavailability to other consumers.
1212	  RDMA controller is designed to stop this from happening.
1213	  Attaching processes with active RDMA resources to the cgroup
1214	  hierarchy is allowed even if can cross the hierarchy's limit.
1215
1216config CGROUP_DMEM
1217	bool "Device memory controller (DMEM)"
1218	select PAGE_COUNTER
1219	help
1220	  The DMEM controller allows compatible devices to restrict device
1221	  memory usage based on the cgroup hierarchy.
1222
1223	  As an example, it allows you to restrict VRAM usage for applications
1224	  in the DRM subsystem.
1225
1226config CGROUP_FREEZER
1227	bool "Freezer controller"
1228	help
1229	  Provides a way to freeze and unfreeze all tasks in a
1230	  cgroup.
1231
1232	  This option affects the ORIGINAL cgroup interface. The cgroup2 memory
1233	  controller includes important in-kernel memory consumers per default.
1234
1235	  If you're using cgroup2, say N.
1236
1237config CGROUP_HUGETLB
1238	bool "HugeTLB controller"
1239	depends on HUGETLB_PAGE
1240	select PAGE_COUNTER
1241	default n
1242	help
1243	  Provides a cgroup controller for HugeTLB pages.
1244	  When you enable this, you can put a per cgroup limit on HugeTLB usage.
1245	  The limit is enforced during page fault. Since HugeTLB doesn't
1246	  support page reclaim, enforcing the limit at page fault time implies
1247	  that, the application will get SIGBUS signal if it tries to access
1248	  HugeTLB pages beyond its limit. This requires the application to know
1249	  beforehand how much HugeTLB pages it would require for its use. The
1250	  control group is tracked in the third page lru pointer. This means
1251	  that we cannot use the controller with huge page less than 3 pages.
1252
1253config CPUSETS
1254	bool "Cpuset controller"
1255	depends on SMP
1256	select UNION_FIND
1257	select CPU_ISOLATION
1258	help
1259	  This option will let you create and manage CPUSETs which
1260	  allow dynamically partitioning a system into sets of CPUs and
1261	  Memory Nodes and assigning tasks to run only within those sets.
1262	  This is primarily useful on large SMP or NUMA systems.
1263
1264	  Say N if unsure.
1265
1266config CPUSETS_V1
1267	bool "Legacy cgroup v1 cpusets controller"
1268	depends on CPUSETS
1269	default n
1270	help
1271	  Legacy cgroup v1 cpusets controller which has been deprecated by
1272	  cgroup v2 implementation. The v1 is there for legacy applications
1273	  which haven't migrated to the new cgroup v2 interface yet. Legacy
1274	  interface includes cpuset filesystem and /proc/<pid>/cpuset. If you
1275	  do not have any such application then you are completely fine leaving
1276	  this option disabled.
1277
1278	  Say N if unsure.
1279
1280config PROC_PID_CPUSET
1281	bool "Include legacy /proc/<pid>/cpuset file"
1282	depends on CPUSETS_V1
1283	default y
1284
1285config CGROUP_DEVICE
1286	bool "Device controller"
1287	help
1288	  Provides a cgroup controller implementing whitelists for
1289	  devices which a process in the cgroup can mknod or open.
1290
1291config CGROUP_CPUACCT
1292	bool "Simple CPU accounting controller"
1293	help
1294	  Provides a simple controller for monitoring the
1295	  total CPU consumed by the tasks in a cgroup.
1296
1297config CGROUP_PERF
1298	bool "Perf controller"
1299	depends on PERF_EVENTS
1300	help
1301	  This option extends the perf per-cpu mode to restrict monitoring
1302	  to threads which belong to the cgroup specified and run on the
1303	  designated cpu.  Or this can be used to have cgroup ID in samples
1304	  so that it can monitor performance events among cgroups.
1305
1306	  Say N if unsure.
1307
1308config CGROUP_BPF
1309	bool "Support for eBPF programs attached to cgroups"
1310	depends on BPF_SYSCALL
1311	select SOCK_CGROUP_DATA
1312	help
1313	  Allow attaching eBPF programs to a cgroup using the bpf(2)
1314	  syscall command BPF_PROG_ATTACH.
1315
1316	  In which context these programs are accessed depends on the type
1317	  of attachment. For instance, programs that are attached using
1318	  BPF_CGROUP_INET_INGRESS will be executed on the ingress path of
1319	  inet sockets.
1320
1321config CGROUP_MISC
1322	bool "Misc resource controller"
1323	default n
1324	help
1325	  Provides a controller for miscellaneous resources on a host.
1326
1327	  Miscellaneous scalar resources are the resources on the host system
1328	  which cannot be abstracted like the other cgroups. This controller
1329	  tracks and limits the miscellaneous resources used by a process
1330	  attached to a cgroup hierarchy.
1331
1332	  For more information, please check misc cgroup section in
1333	  /Documentation/admin-guide/cgroup-v2.rst.
1334
1335config CGROUP_DEBUG
1336	bool "Debug controller"
1337	default n
1338	depends on DEBUG_KERNEL
1339	help
1340	  This option enables a simple controller that exports
1341	  debugging information about the cgroups framework. This
1342	  controller is for control cgroup debugging only. Its
1343	  interfaces are not stable.
1344
1345	  Say N.
1346
1347config SOCK_CGROUP_DATA
1348	bool
1349	default n
1350
1351endif # CGROUPS
1352
1353menuconfig NAMESPACES
1354	bool "Namespaces support" if EXPERT
1355	depends on MULTIUSER
1356	default !EXPERT
1357	help
1358	  Provides the way to make tasks work with different objects using
1359	  the same id. For example same IPC id may refer to different objects
1360	  or same user id or pid may refer to different tasks when used in
1361	  different namespaces.
1362
1363if NAMESPACES
1364
1365config UTS_NS
1366	bool "UTS namespace"
1367	default y
1368	help
1369	  In this namespace tasks see different info provided with the
1370	  uname() system call
1371
1372config TIME_NS
1373	bool "TIME namespace"
1374	depends on GENERIC_GETTIMEOFDAY
1375	default y
1376	help
1377	  In this namespace boottime and monotonic clocks can be set.
1378	  The time will keep going with the same pace.
1379
1380config IPC_NS
1381	bool "IPC namespace"
1382	depends on (SYSVIPC || POSIX_MQUEUE)
1383	default y
1384	help
1385	  In this namespace tasks work with IPC ids which correspond to
1386	  different IPC objects in different namespaces.
1387
1388config USER_NS
1389	bool "User namespace"
1390	default n
1391	help
1392	  This allows containers, i.e. vservers, to use user namespaces
1393	  to provide different user info for different servers.
1394
1395	  When user namespaces are enabled in the kernel it is
1396	  recommended that the MEMCG option also be enabled and that
1397	  user-space use the memory control groups to limit the amount
1398	  of memory a memory unprivileged users can use.
1399
1400	  If unsure, say N.
1401
1402config PID_NS
1403	bool "PID Namespaces"
1404	default y
1405	help
1406	  Support process id namespaces.  This allows having multiple
1407	  processes with the same pid as long as they are in different
1408	  pid namespaces.  This is a building block of containers.
1409
1410config NET_NS
1411	bool "Network namespace"
1412	depends on NET
1413	default y
1414	help
1415	  Allow user space to create what appear to be multiple instances
1416	  of the network stack.
1417
1418endif # NAMESPACES
1419
1420config CHECKPOINT_RESTORE
1421	bool "Checkpoint/restore support"
1422	depends on PROC_FS
1423	select PROC_CHILDREN
1424	select KCMP
1425	default n
1426	help
1427	  Enables additional kernel features in a sake of checkpoint/restore.
1428	  In particular it adds auxiliary prctl codes to setup process text,
1429	  data and heap segment sizes, and a few additional /proc filesystem
1430	  entries.
1431
1432	  If unsure, say N here.
1433
1434config SCHED_AUTOGROUP
1435	bool "Automatic process group scheduling"
1436	select CGROUPS
1437	select CGROUP_SCHED
1438	select FAIR_GROUP_SCHED
1439	help
1440	  This option optimizes the scheduler for common desktop workloads by
1441	  automatically creating and populating task groups.  This separation
1442	  of workloads isolates aggressive CPU burners (like build jobs) from
1443	  desktop applications.  Task group autogeneration is currently based
1444	  upon task session.
1445
1446config RELAY
1447	bool "Kernel->user space relay support (formerly relayfs)"
1448	select IRQ_WORK
1449	help
1450	  This option enables support for relay interface support in
1451	  certain file systems (such as debugfs).
1452	  It is designed to provide an efficient mechanism for tools and
1453	  facilities to relay large amounts of data from kernel space to
1454	  user space.
1455
1456	  If unsure, say N.
1457
1458config BLK_DEV_INITRD
1459	bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
1460	help
1461	  The initial RAM filesystem is a ramfs which is loaded by the
1462	  boot loader (loadlin or lilo) and that is mounted as root
1463	  before the normal boot procedure. It is typically used to
1464	  load modules needed to mount the "real" root file system,
1465	  etc. See <file:Documentation/admin-guide/initrd.rst> for details.
1466
1467	  If RAM disk support (BLK_DEV_RAM) is also included, this
1468	  also enables initial RAM disk (initrd) support and adds
1469	  15 Kbytes (more on some other architectures) to the kernel size.
1470
1471	  If unsure say Y.
1472
1473if BLK_DEV_INITRD
1474
1475source "usr/Kconfig"
1476
1477endif
1478
1479config BOOT_CONFIG
1480	bool "Boot config support"
1481	select BLK_DEV_INITRD if !BOOT_CONFIG_EMBED
1482	help
1483	  Extra boot config allows system admin to pass a config file as
1484	  complemental extension of kernel cmdline when booting.
1485	  The boot config file must be attached at the end of initramfs
1486	  with checksum, size and magic word.
1487	  See <file:Documentation/admin-guide/bootconfig.rst> for details.
1488
1489	  If unsure, say Y.
1490
1491config BOOT_CONFIG_FORCE
1492	bool "Force unconditional bootconfig processing"
1493	depends on BOOT_CONFIG
1494	default y if BOOT_CONFIG_EMBED
1495	help
1496	  With this Kconfig option set, BOOT_CONFIG processing is carried
1497	  out even when the "bootconfig" kernel-boot parameter is omitted.
1498	  In fact, with this Kconfig option set, there is no way to
1499	  make the kernel ignore the BOOT_CONFIG-supplied kernel-boot
1500	  parameters.
1501
1502	  If unsure, say N.
1503
1504config BOOT_CONFIG_EMBED
1505	bool "Embed bootconfig file in the kernel"
1506	depends on BOOT_CONFIG
1507	help
1508	  Embed a bootconfig file given by BOOT_CONFIG_EMBED_FILE in the
1509	  kernel. Usually, the bootconfig file is loaded with the initrd
1510	  image. But if the system doesn't support initrd, this option will
1511	  help you by embedding a bootconfig file while building the kernel.
1512
1513	  If unsure, say N.
1514
1515config BOOT_CONFIG_EMBED_FILE
1516	string "Embedded bootconfig file path"
1517	depends on BOOT_CONFIG_EMBED
1518	help
1519	  Specify a bootconfig file which will be embedded to the kernel.
1520	  This bootconfig will be used if there is no initrd or no other
1521	  bootconfig in the initrd.
1522
1523config CMDLINE_LOG_WRAP_IDEAL_LEN
1524	int "Length to try to wrap the cmdline when logged at boot"
1525	default 1021
1526	range 0 1021
1527	help
1528	  At boot time, the kernel command line is logged to the console.
1529	  The log message will start with the prefix "Kernel command line: ".
1530	  The log message will attempt to be wrapped (split into multiple log
1531	  messages) at spaces based on CMDLINE_LOG_WRAP_IDEAL_LEN characters.
1532	  If wrapping happens, each log message will start with the prefix and
1533	  all but the last message will end with " \". Messages may exceed the
1534	  ideal length if a place to wrap isn't found before the specified
1535	  number of characters.
1536
1537	  A value of 0 disables wrapping, though be warned that the maximum
1538	  length of a log message (1021 characters) may cause the cmdline to
1539	  be truncated.
1540
1541config INITRAMFS_PRESERVE_MTIME
1542	bool "Preserve cpio archive mtimes in initramfs"
1543	depends on BLK_DEV_INITRD
1544	default y
1545	help
1546	  Each entry in an initramfs cpio archive carries an mtime value. When
1547	  enabled, extracted cpio items take this mtime, with directory mtime
1548	  setting deferred until after creation of any child entries.
1549
1550	  If unsure, say Y.
1551
1552config INITRAMFS_TEST
1553	bool "Test initramfs cpio archive extraction" if !KUNIT_ALL_TESTS
1554	depends on BLK_DEV_INITRD && KUNIT=y
1555	default KUNIT_ALL_TESTS
1556	help
1557	  Build KUnit tests for initramfs. See Documentation/dev-tools/kunit
1558
1559choice
1560	prompt "Compiler optimization level"
1561	default CC_OPTIMIZE_FOR_PERFORMANCE
1562
1563config CC_OPTIMIZE_FOR_PERFORMANCE
1564	bool "Optimize for performance (-O2)"
1565	help
1566	  This is the default optimization level for the kernel, building
1567	  with the "-O2" compiler flag for best performance and most
1568	  helpful compile-time warnings.
1569
1570config CC_OPTIMIZE_FOR_SIZE
1571	bool "Optimize for size (-Os)"
1572	help
1573	  Choosing this option will pass "-Os" to your compiler resulting
1574	  in a smaller kernel.
1575
1576endchoice
1577
1578config HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1579	bool
1580	help
1581	  This requires that the arch annotates or otherwise protects
1582	  its external entry points from being discarded. Linker scripts
1583	  must also merge .text.*, .data.*, and .bss.* correctly into
1584	  output sections. Care must be taken not to pull in unrelated
1585	  sections (e.g., '.text.init'). Typically '.' in section names
1586	  is used to distinguish them from label names / C identifiers.
1587
1588config LD_DEAD_CODE_DATA_ELIMINATION
1589	bool "Dead code and data elimination (EXPERIMENTAL)"
1590	depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1591	depends on EXPERT
1592	depends on $(cc-option,-ffunction-sections -fdata-sections)
1593	depends on $(ld-option,--gc-sections)
1594	help
1595	  Enable this if you want to do dead code and data elimination with
1596	  the linker by compiling with -ffunction-sections -fdata-sections,
1597	  and linking with --gc-sections.
1598
1599	  This can reduce on disk and in-memory size of the kernel
1600	  code and static data, particularly for small configs and
1601	  on small systems. This has the possibility of introducing
1602	  silently broken kernel if the required annotations are not
1603	  present. This option is not well tested yet, so use at your
1604	  own risk.
1605
1606config LD_ORPHAN_WARN
1607	def_bool y
1608	depends on ARCH_WANT_LD_ORPHAN_WARN
1609	depends on $(ld-option,--orphan-handling=warn)
1610	depends on $(ld-option,--orphan-handling=error)
1611
1612config LD_ORPHAN_WARN_LEVEL
1613        string
1614        depends on LD_ORPHAN_WARN
1615        default "error" if WERROR
1616        default "warn"
1617
1618config SYSCTL
1619	bool
1620
1621config HAVE_UID16
1622	bool
1623
1624config SYSCTL_EXCEPTION_TRACE
1625	bool
1626	help
1627	  Enable support for /proc/sys/debug/exception-trace.
1628
1629config SYSCTL_ARCH_UNALIGN_NO_WARN
1630	bool
1631	help
1632	  Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
1633	  Allows arch to define/use @no_unaligned_warning to possibly warn
1634	  about unaligned access emulation going on under the hood.
1635
1636config SYSCTL_ARCH_UNALIGN_ALLOW
1637	bool
1638	help
1639	  Enable support for /proc/sys/kernel/unaligned-trap
1640	  Allows arches to define/use @unaligned_enabled to runtime toggle
1641	  the unaligned access emulation.
1642	  see arch/parisc/kernel/unaligned.c for reference
1643
1644config SYSFS_SYSCALL
1645	bool "Sysfs syscall support"
1646	default n
1647	help
1648	  sys_sysfs is an obsolete system call no longer supported in libc.
1649	  Note that disabling this option is more secure but might break
1650	  compatibility with some systems.
1651
1652	  If unsure say N here.
1653
1654config HAVE_PCSPKR_PLATFORM
1655	bool
1656
1657menuconfig EXPERT
1658	bool "Configure standard kernel features (expert users)"
1659	# Unhide debug options, to make the on-by-default options visible
1660	select DEBUG_KERNEL
1661	help
1662	  This option allows certain base kernel options and settings
1663	  to be disabled or tweaked. This is for specialized
1664	  environments which can tolerate a "non-standard" kernel.
1665	  Only use this if you really know what you are doing.
1666
1667config UID16
1668	bool "Enable 16-bit UID system calls" if EXPERT
1669	depends on HAVE_UID16 && MULTIUSER
1670	default y
1671	help
1672	  This enables the legacy 16-bit UID syscall wrappers.
1673
1674config MULTIUSER
1675	bool "Multiple users, groups and capabilities support" if EXPERT
1676	default y
1677	help
1678	  This option enables support for non-root users, groups and
1679	  capabilities.
1680
1681	  If you say N here, all processes will run with UID 0, GID 0, and all
1682	  possible capabilities.  Saying N here also compiles out support for
1683	  system calls related to UIDs, GIDs, and capabilities, such as setuid,
1684	  setgid, and capset.
1685
1686	  If unsure, say Y here.
1687
1688config SGETMASK_SYSCALL
1689	bool "sgetmask/ssetmask syscalls support" if EXPERT
1690	default PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
1691	help
1692	  sys_sgetmask and sys_ssetmask are obsolete system calls
1693	  no longer supported in libc but still enabled by default in some
1694	  architectures.
1695
1696	  If unsure, leave the default option here.
1697
1698config FHANDLE
1699	bool "open by fhandle syscalls" if EXPERT
1700	select EXPORTFS
1701	default y
1702	help
1703	  If you say Y here, a user level program will be able to map
1704	  file names to handle and then later use the handle for
1705	  different file system operations. This is useful in implementing
1706	  userspace file servers, which now track files using handles instead
1707	  of names. The handle would remain the same even if file names
1708	  get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2)
1709	  syscalls.
1710
1711config POSIX_TIMERS
1712	bool "Posix Clocks & timers" if EXPERT
1713	default y
1714	help
1715	  This includes native support for POSIX timers to the kernel.
1716	  Some embedded systems have no use for them and therefore they
1717	  can be configured out to reduce the size of the kernel image.
1718
1719	  When this option is disabled, the following syscalls won't be
1720	  available: timer_create, timer_gettime: timer_getoverrun,
1721	  timer_settime, timer_delete, clock_adjtime, getitimer,
1722	  setitimer, alarm. Furthermore, the clock_settime, clock_gettime,
1723	  clock_getres and clock_nanosleep syscalls will be limited to
1724	  CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_BOOTTIME only.
1725
1726	  If unsure say y.
1727
1728config PRINTK
1729	default y
1730	bool "Enable support for printk" if EXPERT
1731	select IRQ_WORK
1732	help
1733	  This option enables normal printk support. Removing it
1734	  eliminates most of the message strings from the kernel image
1735	  and makes the kernel more or less silent. As this makes it
1736	  very difficult to diagnose system problems, saying N here is
1737	  strongly discouraged.
1738
1739config PRINTK_RINGBUFFER_KUNIT_TEST
1740	tristate "KUnit Test for the printk ringbuffer" if !KUNIT_ALL_TESTS
1741	depends on PRINTK && KUNIT
1742	default KUNIT_ALL_TESTS
1743	help
1744	  This builds the printk ringbuffer KUnit test suite.
1745
1746	  For more information on KUnit and unit tests in general, please refer
1747	  to the KUnit documentation.
1748
1749	  If unsure, say N.
1750
1751config BUG
1752	bool "BUG() support" if EXPERT
1753	default y
1754	help
1755	  Disabling this option eliminates support for BUG and WARN, reducing
1756	  the size of your kernel image and potentially quietly ignoring
1757	  numerous fatal conditions. You should only consider disabling this
1758	  option for embedded systems with no facilities for reporting errors.
1759	  Just say Y.
1760
1761config ELF_CORE
1762	depends on COREDUMP
1763	default y
1764	bool "Enable ELF core dumps" if EXPERT
1765	help
1766	  Enable support for generating core dumps. Disabling saves about 4k.
1767
1768
1769config PCSPKR_PLATFORM
1770	bool "Enable PC-Speaker support" if EXPERT
1771	depends on HAVE_PCSPKR_PLATFORM
1772	select I8253_LOCK
1773	default y
1774	help
1775	  This option allows to disable the internal PC-Speaker
1776	  support, saving some memory.
1777
1778config BASE_SMALL
1779	bool "Enable smaller-sized data structures for core" if EXPERT
1780	help
1781	  Enabling this option reduces the size of miscellaneous core
1782	  kernel data structures. This saves memory on small machines,
1783	  but may reduce performance.
1784
1785config FUTEX
1786	bool "Enable futex support" if EXPERT
1787	depends on !(SPARC32 && SMP)
1788	default y
1789	imply RT_MUTEXES
1790	help
1791	  Disabling this option will cause the kernel to be built without
1792	  support for "fast userspace mutexes".  The resulting kernel may not
1793	  run glibc-based applications correctly.
1794
1795config FUTEX_PI
1796	bool
1797	depends on FUTEX && RT_MUTEXES
1798	default y
1799
1800config FUTEX_PRIVATE_HASH
1801	bool
1802	depends on FUTEX && !BASE_SMALL && MMU
1803	default y
1804
1805config FUTEX_MPOL
1806	bool
1807	depends on FUTEX && NUMA
1808	default y
1809
1810config EPOLL
1811	bool "Enable eventpoll support" if EXPERT
1812	default y
1813	help
1814	  Disabling this option will cause the kernel to be built without
1815	  support for epoll family of system calls.
1816
1817config SIGNALFD
1818	bool "Enable signalfd() system call" if EXPERT
1819	default y
1820	help
1821	  Enable the signalfd() system call that allows to receive signals
1822	  on a file descriptor.
1823
1824	  If unsure, say Y.
1825
1826config TIMERFD
1827	bool "Enable timerfd() system call" if EXPERT
1828	default y
1829	help
1830	  Enable the timerfd() system call that allows to receive timer
1831	  events on a file descriptor.
1832
1833	  If unsure, say Y.
1834
1835config EVENTFD
1836	bool "Enable eventfd() system call" if EXPERT
1837	default y
1838	help
1839	  Enable the eventfd() system call that allows to receive both
1840	  kernel notification (ie. KAIO) or userspace notifications.
1841
1842	  If unsure, say Y.
1843
1844config SHMEM
1845	bool "Use full shmem filesystem" if EXPERT
1846	default y
1847	depends on MMU
1848	help
1849	  The shmem is an internal filesystem used to manage shared memory.
1850	  It is backed by swap and manages resource limits. It is also exported
1851	  to userspace as tmpfs if TMPFS is enabled. Disabling this
1852	  option replaces shmem and tmpfs with the much simpler ramfs code,
1853	  which may be appropriate on small systems without swap.
1854
1855config AIO
1856	bool "Enable AIO support" if EXPERT
1857	default y
1858	help
1859	  This option enables POSIX asynchronous I/O which may by used
1860	  by some high performance threaded applications. Disabling
1861	  this option saves about 7k.
1862
1863config IO_URING
1864	bool "Enable IO uring support" if EXPERT
1865	select IO_WQ
1866	default y
1867	help
1868	  This option enables support for the io_uring interface, enabling
1869	  applications to submit and complete IO through submission and
1870	  completion rings that are shared between the kernel and application.
1871
1872config GCOV_PROFILE_URING
1873	bool "Enable GCOV profiling on the io_uring subsystem"
1874	depends on IO_URING && GCOV_KERNEL
1875	help
1876	  Enable GCOV profiling on the io_uring subsystem, to facilitate
1877	  code coverage testing.
1878
1879	  If unsure, say N.
1880
1881	  Note that this will have a negative impact on the performance of
1882	  the io_uring subsystem, hence this should only be enabled for
1883	  specific test purposes.
1884
1885config IO_URING_MOCK_FILE
1886	tristate "Enable io_uring mock files (Experimental)" if EXPERT
1887	default n
1888	depends on IO_URING
1889	help
1890	  Enable mock files for io_uring subststem testing. The ABI might
1891	  still change, so it's still experimental and should only be enabled
1892	  for specific test purposes.
1893
1894	  If unsure, say N.
1895
1896config ADVISE_SYSCALLS
1897	bool "Enable madvise/fadvise syscalls" if EXPERT
1898	default y
1899	help
1900	  This option enables the madvise and fadvise syscalls, used by
1901	  applications to advise the kernel about their future memory or file
1902	  usage, improving performance. If building an embedded system where no
1903	  applications use these syscalls, you can disable this option to save
1904	  space.
1905
1906config MEMBARRIER
1907	bool "Enable membarrier() system call" if EXPERT
1908	default y
1909	help
1910	  Enable the membarrier() system call that allows issuing memory
1911	  barriers across all running threads, which can be used to distribute
1912	  the cost of user-space memory barriers asymmetrically by transforming
1913	  pairs of memory barriers into pairs consisting of membarrier() and a
1914	  compiler barrier.
1915
1916	  If unsure, say Y.
1917
1918config KCMP
1919	bool "Enable kcmp() system call" if EXPERT
1920	help
1921	  Enable the kernel resource comparison system call. It provides
1922	  user-space with the ability to compare two processes to see if they
1923	  share a common resource, such as a file descriptor or even virtual
1924	  memory space.
1925
1926	  If unsure, say N.
1927
1928config RSEQ
1929	bool "Enable rseq() system call" if EXPERT
1930	default y
1931	depends on HAVE_RSEQ
1932	select MEMBARRIER
1933	help
1934	  Enable the restartable sequences system call. It provides a
1935	  user-space cache for the current CPU number value, which
1936	  speeds up getting the current CPU number from user-space,
1937	  as well as an ABI to speed up user-space operations on
1938	  per-CPU data.
1939
1940	  If unsure, say Y.
1941
1942config RSEQ_STATS
1943	default n
1944	bool "Enable lightweight statistics of restartable sequences" if EXPERT
1945	depends on RSEQ && DEBUG_FS
1946	help
1947	  Enable lightweight counters which expose information about the
1948	  frequency of RSEQ operations via debugfs. Mostly interesting for
1949	  kernel debugging or performance analysis. While lightweight it's
1950	  still adding code into the user/kernel mode transitions.
1951
1952	  If unsure, say N.
1953
1954config RSEQ_DEBUG_DEFAULT_ENABLE
1955	default n
1956	bool "Enable restartable sequences debug mode by default" if EXPERT
1957	depends on RSEQ
1958	help
1959	  This enables the static branch for debug mode of restartable
1960	  sequences.
1961
1962	  This also can be controlled on the kernel command line via the
1963	  command line parameter "rseq_debug=0/1" and through debugfs.
1964
1965	  If unsure, say N.
1966
1967config DEBUG_RSEQ
1968	default n
1969	bool "Enable debugging of rseq() system call" if EXPERT
1970	depends on RSEQ && DEBUG_KERNEL && !GENERIC_ENTRY
1971	select RSEQ_DEBUG_DEFAULT_ENABLE
1972	help
1973	  Enable extra debugging checks for the rseq system call.
1974
1975	  If unsure, say N.
1976
1977config CACHESTAT_SYSCALL
1978	bool "Enable cachestat() system call" if EXPERT
1979	default y
1980	help
1981	  Enable the cachestat system call, which queries the page cache
1982	  statistics of a file (number of cached pages, dirty pages,
1983	  pages marked for writeback, (recently) evicted pages).
1984
1985	  If unsure say Y here.
1986
1987config KALLSYMS
1988	bool "Load all symbols for debugging/ksymoops" if EXPERT
1989	default y
1990	help
1991	  Say Y here to let the kernel print out symbolic crash information and
1992	  symbolic stack backtraces. This increases the size of the kernel
1993	  somewhat, as all symbols have to be loaded into the kernel image.
1994
1995config KALLSYMS_SELFTEST
1996	bool "Test the basic functions and performance of kallsyms"
1997	depends on KALLSYMS
1998	default n
1999	help
2000	  Test the basic functions and performance of some interfaces, such as
2001	  kallsyms_lookup_name. It also calculates the compression rate of the
2002	  kallsyms compression algorithm for the current symbol set.
2003
2004	  Start self-test automatically after system startup. Suggest executing
2005	  "dmesg | grep kallsyms_selftest" to collect test results. "finish" is
2006	  displayed in the last line, indicating that the test is complete.
2007
2008config KALLSYMS_ALL
2009	bool "Include all symbols in kallsyms"
2010	depends on DEBUG_KERNEL && KALLSYMS
2011	help
2012	  Normally kallsyms only contains the symbols of functions for nicer
2013	  OOPS messages and backtraces (i.e., symbols from the text and inittext
2014	  sections). This is sufficient for most cases. And only if you want to
2015	  enable kernel live patching, or other less common use cases (e.g.,
2016	  when a debugger is used) all symbols are required (i.e., names of
2017	  variables from the data sections, etc).
2018
2019	  This option makes sure that all symbols are loaded into the kernel
2020	  image (i.e., symbols from all sections) in cost of increased kernel
2021	  size (depending on the kernel configuration, it may be 300KiB or
2022	  something like this).
2023
2024	  Say N unless you really need all symbols, or kernel live patching.
2025
2026# end of the "standard kernel features (expert users)" menu
2027
2028config ARCH_HAS_MEMBARRIER_CALLBACKS
2029	bool
2030
2031config ARCH_HAS_MEMBARRIER_SYNC_CORE
2032	bool
2033
2034config ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
2035	bool
2036	help
2037	  Control MSEAL_SYSTEM_MAPPINGS access based on architecture.
2038
2039	  A 64-bit kernel is required for the memory sealing feature.
2040	  No specific hardware features from the CPU are needed.
2041
2042	  To enable this feature, the architecture needs to update their
2043	  special mappings calls to include the sealing flag and confirm
2044	  that it doesn't unmap/remap system mappings during the life
2045	  time of the process. The existence of this flag for an architecture
2046	  implies that it does not require the remapping of the system
2047	  mappings during process lifetime, so sealing these mappings is safe
2048	  from a kernel perspective.
2049
2050	  After the architecture enables this, a distribution can set
2051	  CONFIG_MSEAL_SYSTEM_MAPPING to manage access to the feature.
2052
2053	  For complete descriptions of memory sealing, please see
2054	  Documentation/userspace-api/mseal.rst
2055
2056config HAVE_PERF_EVENTS
2057	bool
2058	help
2059	  See tools/perf/design.txt for details.
2060
2061config GUEST_PERF_EVENTS
2062	bool
2063	depends on HAVE_PERF_EVENTS
2064
2065config PERF_USE_VMALLOC
2066	bool
2067	help
2068	  See tools/perf/design.txt for details
2069
2070menu "Kernel Performance Events And Counters"
2071
2072config PERF_EVENTS
2073	bool "Kernel performance events and counters"
2074	default y if PROFILING
2075	depends on HAVE_PERF_EVENTS
2076	select IRQ_WORK
2077	help
2078	  Enable kernel support for various performance events provided
2079	  by software and hardware.
2080
2081	  Software events are supported either built-in or via the
2082	  use of generic tracepoints.
2083
2084	  Most modern CPUs support performance events via performance
2085	  counter registers. These registers count the number of certain
2086	  types of hw events: such as instructions executed, cachemisses
2087	  suffered, or branches mis-predicted - without slowing down the
2088	  kernel or applications. These registers can also trigger interrupts
2089	  when a threshold number of events have passed - and can thus be
2090	  used to profile the code that runs on that CPU.
2091
2092	  The Linux Performance Event subsystem provides an abstraction of
2093	  these software and hardware event capabilities, available via a
2094	  system call and used by the "perf" utility in tools/perf/. It
2095	  provides per task and per CPU counters, and it provides event
2096	  capabilities on top of those.
2097
2098	  Say Y if unsure.
2099
2100config DEBUG_PERF_USE_VMALLOC
2101	default n
2102	bool "Debug: use vmalloc to back perf mmap() buffers"
2103	depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
2104	select PERF_USE_VMALLOC
2105	help
2106	  Use vmalloc memory to back perf mmap() buffers.
2107
2108	  Mostly useful for debugging the vmalloc code on platforms
2109	  that don't require it.
2110
2111	  Say N if unsure.
2112
2113endmenu
2114
2115config SYSTEM_DATA_VERIFICATION
2116	def_bool n
2117	select SYSTEM_TRUSTED_KEYRING
2118	select KEYS
2119	select CRYPTO
2120	select CRYPTO_RSA
2121	select ASYMMETRIC_KEY_TYPE
2122	select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
2123	select ASN1
2124	select OID_REGISTRY
2125	select X509_CERTIFICATE_PARSER
2126	select PKCS7_MESSAGE_PARSER
2127	help
2128	  Provide PKCS#7 message verification using the contents of the system
2129	  trusted keyring to provide public keys.  This then can be used for
2130	  module verification, kexec image verification and firmware blob
2131	  verification.
2132
2133config PROFILING
2134	bool "Profiling support"
2135	help
2136	  Say Y here to enable the extended profiling support mechanisms used
2137	  by profilers.
2138
2139config RUST
2140	bool "Rust support"
2141	depends on HAVE_RUST
2142	depends on RUST_IS_AVAILABLE
2143	select EXTENDED_MODVERSIONS if MODVERSIONS
2144	depends on !MODVERSIONS || GENDWARFKSYMS
2145	depends on !GCC_PLUGIN_RANDSTRUCT
2146	depends on !RANDSTRUCT
2147	depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
2148	depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
2149	select CFI_ICALL_NORMALIZE_INTEGERS if CFI
2150	depends on !CALL_PADDING || RUSTC_VERSION >= 108100
2151	depends on !KASAN_SW_TAGS
2152	depends on !(MITIGATION_RETHUNK && KASAN) || RUSTC_VERSION >= 108300
2153	help
2154	  Enables Rust support in the kernel.
2155
2156	  This allows other Rust-related options, like drivers written in Rust,
2157	  to be selected.
2158
2159	  It is also required to be able to load external kernel modules
2160	  written in Rust.
2161
2162	  See Documentation/rust/ for more information.
2163
2164	  If unsure, say N.
2165
2166config RUSTC_VERSION_TEXT
2167	string
2168	depends on RUST
2169	default "$(RUSTC_VERSION_TEXT)"
2170	help
2171	  See `CC_VERSION_TEXT`.
2172
2173config BINDGEN_VERSION_TEXT
2174	string
2175	depends on RUST
2176	# The dummy parameter `workaround-for-0.69.0` is required to support 0.69.0
2177	# (https://github.com/rust-lang/rust-bindgen/pull/2678) and 0.71.0
2178	# (https://github.com/rust-lang/rust-bindgen/pull/3040). It can be removed
2179	# when the minimum version is upgraded past the latter (0.69.1 and 0.71.1
2180	# both fixed the issue).
2181	default "$(shell,$(BINDGEN) --version workaround-for-0.69.0 2>/dev/null)"
2182
2183#
2184# Place an empty function call at each tracepoint site. Can be
2185# dynamically changed for a probe function.
2186#
2187config TRACEPOINTS
2188	bool
2189	select TASKS_TRACE_RCU
2190
2191source "kernel/Kconfig.kexec"
2192
2193source "kernel/liveupdate/Kconfig"
2194
2195endmenu		# General setup
2196
2197source "arch/Kconfig"
2198
2199config RT_MUTEXES
2200	bool
2201	default y if PREEMPT_RT
2202
2203config MODULE_SIG_FORMAT
2204	def_bool n
2205	select SYSTEM_DATA_VERIFICATION
2206
2207source "kernel/module/Kconfig"
2208
2209config INIT_ALL_POSSIBLE
2210	bool
2211	help
2212	  Back when each arch used to define their own cpu_online_mask and
2213	  cpu_possible_mask, some of them chose to initialize cpu_possible_mask
2214	  with all 1s, and others with all 0s.  When they were centralised,
2215	  it was better to provide this option than to break all the archs
2216	  and have several arch maintainers pursuing me down dark alleys.
2217
2218source "block/Kconfig"
2219
2220config PREEMPT_NOTIFIERS
2221	bool
2222
2223config PADATA
2224	depends on SMP
2225	bool
2226
2227config ASN1
2228	tristate
2229	help
2230	  Build a simple ASN.1 grammar compiler that produces a bytecode output
2231	  that can be interpreted by the ASN.1 stream decoder and used to
2232	  inform it as to what tags are to be expected in a stream and what
2233	  functions to call on what tags.
2234
2235source "kernel/Kconfig.locks"
2236
2237config ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
2238	bool
2239
2240config ARCH_HAS_PREPARE_SYNC_CORE_CMD
2241	bool
2242
2243config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
2244	bool
2245
2246# It may be useful for an architecture to override the definitions of the
2247# SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>
2248# and the COMPAT_ variants in <linux/compat.h>, in particular to use a
2249# different calling convention for syscalls. They can also override the
2250# macros for not-implemented syscalls in kernel/sys_ni.c and
2251# kernel/time/posix-stubs.c. All these overrides need to be available in
2252# <asm/syscall_wrapper.h>.
2253config ARCH_HAS_SYSCALL_WRAPPER
2254	def_bool n
2255