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