Debian Codegraph @

init/Kconfig

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