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