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