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