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