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