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