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