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