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