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