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