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