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