1# SPDX-License-Identifier: GPL-2.0-only 2config DEFCONFIG_LIST 3 string 4 depends on !UML 5 option defconfig_list 6 default "/lib/modules/$(shell,uname -r)/.config" 7 default "/etc/kernel-config" 8 default "/boot/config-$(shell,uname -r)" 9 default "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)" 10 11config CC_VERSION_TEXT 12 string 13 default "$(CC_VERSION_TEXT)" 14 help 15 This is used in unclear ways: 16 17 - Re-run Kconfig when the compiler is updated 18 The 'default' property references the environment variable, 19 CC_VERSION_TEXT so it is recorded in include/config/auto.conf.cmd. 20 When the compiler is updated, Kconfig will be invoked. 21 22 - Ensure full rebuild when the compier is updated 23 include/linux/kconfig.h contains this option in the comment line so 24 fixdep adds include/config/cc/version/text.h into the auto-generated 25 dependency. When the compiler is updated, syncconfig will touch it 26 and then every file will be rebuilt. 27 28config CC_IS_GCC 29 def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q gcc) 30 31config GCC_VERSION 32 int 33 default $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC 34 default 0 35 36config LD_VERSION 37 int 38 default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh) 39 40config CC_IS_CLANG 41 def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q clang) 42 43config LD_IS_LLD 44 def_bool $(success,$(LD) -v | head -n 1 | grep -q LLD) 45 46config CLANG_VERSION 47 int 48 default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) 49 50config LLD_VERSION 51 int 52 default $(shell,$(srctree)/scripts/lld-version.sh $(LD)) 53 54config CC_CAN_LINK 55 bool 56 default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag)) if 64BIT 57 default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag)) 58 59config CC_CAN_LINK_STATIC 60 bool 61 default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag) -static) if 64BIT 62 default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag) -static) 63 64config CC_HAS_ASM_GOTO 65 def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC)) 66 67config CC_HAS_ASM_GOTO_OUTPUT 68 depends on CC_HAS_ASM_GOTO 69 def_bool $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null) 70 71config CC_HAS_ASM_GOTO_TIED_OUTPUT 72 depends on CC_HAS_ASM_GOTO_OUTPUT 73 # Detect buggy gcc and clang, fixed in gcc-11 clang-14. 74 def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .\n": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null) 75 76config TOOLS_SUPPORT_RELR 77 def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh) 78 79config CC_HAS_ASM_INLINE 80 def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null) 81 82config CONSTRUCTORS 83 bool 84 depends on !UML 85 86config IRQ_WORK 87 bool 88 89config BUILDTIME_TABLE_SORT 90 bool 91 92config THREAD_INFO_IN_TASK 93 bool 94 help 95 Select this to move thread_info off the stack into task_struct. To 96 make this work, an arch will need to remove all thread_info fields 97 except flags and fix any runtime bugs. 98 99 One subtle change that will be needed is to use try_get_task_stack() 100 and put_task_stack() in save_thread_stack_tsk() and get_wchan(). 101 102menu "General setup" 103 104config BROKEN 105 bool 106 107config BROKEN_ON_SMP 108 bool 109 depends on BROKEN || !SMP 110 default y 111 112config INIT_ENV_ARG_LIMIT 113 int 114 default 32 if !UML 115 default 128 if UML 116 help 117 Maximum of each of the number of arguments and environment 118 variables passed to init from the kernel command line. 119 120config COMPILE_TEST 121 bool "Compile also drivers which will not load" 122 depends on HAS_IOMEM 123 help 124 Some drivers can be compiled on a different platform than they are 125 intended to be run on. Despite they cannot be loaded there (or even 126 when they load they cannot be used due to missing HW support), 127 developers still, opposing to distributors, might want to build such 128 drivers to compile-test them. 129 130 If you are a developer and want to build everything available, say Y 131 here. If you are a user/distributor, say N here to exclude useless 132 drivers to be distributed. 133 134config UAPI_HEADER_TEST 135 bool "Compile test UAPI headers" 136 depends on HEADERS_INSTALL && CC_CAN_LINK 137 help 138 Compile test headers exported to user-space to ensure they are 139 self-contained, i.e. compilable as standalone units. 140 141 If you are a developer or tester and want to ensure the exported 142 headers are self-contained, say Y here. Otherwise, choose N. 143 144config LOCALVERSION 145 string "Local version - append to kernel release" 146 help 147 Append an extra string to the end of your kernel version. 148 This will show up when you type uname, for example. 149 The string you set here will be appended after the contents of 150 any files with a filename matching localversion* in your 151 object and source tree, in that order. Your total string can 152 be a maximum of 64 characters. 153 154config LOCALVERSION_AUTO 155 bool "Automatically append version information to the version string" 156 default y 157 depends on !COMPILE_TEST 158 help 159 This will try to automatically determine if the current tree is a 160 release tree by looking for git tags that belong to the current 161 top of tree revision. 162 163 A string of the format -gxxxxxxxx will be added to the localversion 164 if a git-based tree is found. The string generated by this will be 165 appended after any matching localversion* files, and after the value 166 set in CONFIG_LOCALVERSION. 167 168 (The actual string used here is the first eight characters produced 169 by running the command: 170 171 $ git rev-parse --verify HEAD 172 173 which is done within the script "scripts/setlocalversion".) 174 175config BUILD_SALT 176 string "Build ID Salt" 177 default "" 178 help 179 The build ID is used to link binaries and their debug info. Setting 180 this option will use the value in the calculation of the build id. 181 This is mostly useful for distributions which want to ensure the 182 build is unique between builds. It's safe to leave the default. 183 184config HAVE_KERNEL_GZIP 185 bool 186 187config HAVE_KERNEL_BZIP2 188 bool 189 190config HAVE_KERNEL_LZMA 191 bool 192 193config HAVE_KERNEL_XZ 194 bool 195 196config HAVE_KERNEL_LZO 197 bool 198 199config HAVE_KERNEL_LZ4 200 bool 201 202config HAVE_KERNEL_ZSTD 203 bool 204 205config HAVE_KERNEL_UNCOMPRESSED 206 bool 207 208choice 209 prompt "Kernel compression mode" 210 default KERNEL_GZIP 211 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 212 help 213 The linux kernel is a kind of self-extracting executable. 214 Several compression algorithms are available, which differ 215 in efficiency, compression and decompression speed. 216 Compression speed is only relevant when building a kernel. 217 Decompression speed is relevant at each boot. 218 219 If you have any problems with bzip2 or lzma compressed 220 kernels, mail me (Alain Knaff) <alain@knaff.lu>. (An older 221 version of this functionality (bzip2 only), for 2.4, was 222 supplied by Christian Ludwig) 223 224 High compression options are mostly useful for users, who 225 are low on disk space (embedded systems), but for whom ram 226 size matters less. 227 228 If in doubt, select 'gzip' 229 230config KERNEL_GZIP 231 bool "Gzip" 232 depends on HAVE_KERNEL_GZIP 233 help 234 The old and tried gzip compression. It provides a good balance 235 between compression ratio and decompression speed. 236 237config KERNEL_BZIP2 238 bool "Bzip2" 239 depends on HAVE_KERNEL_BZIP2 240 help 241 Its compression ratio and speed is intermediate. 242 Decompression speed is slowest among the choices. The kernel 243 size is about 10% smaller with bzip2, in comparison to gzip. 244 Bzip2 uses a large amount of memory. For modern kernels you 245 will need at least 8MB RAM or more for booting. 246 247config KERNEL_LZMA 248 bool "LZMA" 249 depends on HAVE_KERNEL_LZMA 250 help 251 This compression algorithm's ratio is best. Decompression speed 252 is between gzip and bzip2. Compression is slowest. 253 The kernel size is about 33% smaller with LZMA in comparison to gzip. 254 255config KERNEL_XZ 256 bool "XZ" 257 depends on HAVE_KERNEL_XZ 258 help 259 XZ uses the LZMA2 algorithm and instruction set specific 260 BCJ filters which can improve compression ratio of executable 261 code. The size of the kernel is about 30% smaller with XZ in 262 comparison to gzip. On architectures for which there is a BCJ 263 filter (i386, x86_64, ARM, IA-64, PowerPC, and SPARC), XZ 264 will create a few percent smaller kernel than plain LZMA. 265 266 The speed is about the same as with LZMA: The decompression 267 speed of XZ is better than that of bzip2 but worse than gzip 268 and LZO. Compression is slow. 269 270config KERNEL_LZO 271 bool "LZO" 272 depends on HAVE_KERNEL_LZO 273 help 274 Its compression ratio is the poorest among the choices. The kernel 275 size is about 10% bigger than gzip; however its speed 276 (both compression and decompression) is the fastest. 277 278config KERNEL_LZ4 279 bool "LZ4" 280 depends on HAVE_KERNEL_LZ4 281 help 282 LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding. 283 A preliminary version of LZ4 de/compression tool is available at 284 <https://code.google.com/p/lz4/>. 285 286 Its compression ratio is worse than LZO. The size of the kernel 287 is about 8% bigger than LZO. But the decompression speed is 288 faster than LZO. 289 290config KERNEL_ZSTD 291 bool "ZSTD" 292 depends on HAVE_KERNEL_ZSTD 293 help 294 ZSTD is a compression algorithm targeting intermediate compression 295 with fast decompression speed. It will compress better than GZIP and 296 decompress around the same speed as LZO, but slower than LZ4. You 297 will need at least 192 KB RAM or more for booting. The zstd command 298 line tool is required for compression. 299 300config KERNEL_UNCOMPRESSED 301 bool "None" 302 depends on HAVE_KERNEL_UNCOMPRESSED 303 help 304 Produce uncompressed kernel image. This option is usually not what 305 you want. It is useful for debugging the kernel in slow simulation 306 environments, where decompressing and moving the kernel is awfully 307 slow. This option allows early boot code to skip the decompressor 308 and jump right at uncompressed kernel image. 309 310endchoice 311 312config DEFAULT_INIT 313 string "Default init path" 314 default "" 315 help 316 This option determines the default init for the system if no init= 317 option is passed on the kernel command line. If the requested path is 318 not present, we will still then move on to attempting further 319 locations (e.g. /sbin/init, etc). If this is empty, we will just use 320 the fallback list when init= is not passed. 321 322config DEFAULT_HOSTNAME 323 string "Default hostname" 324 default "(none)" 325 help 326 This option determines the default system hostname before userspace 327 calls sethostname(2). The kernel traditionally uses "(none)" here, 328 but you may wish to use a different default here to make a minimal 329 system more usable with less configuration. 330 331# 332# For some reason microblaze and nios2 hard code SWAP=n. Hopefully we can 333# add proper SWAP support to them, in which case this can be remove. 334# 335config ARCH_NO_SWAP 336 bool 337 338config SWAP 339 bool "Support for paging of anonymous memory (swap)" 340 depends on MMU && BLOCK && !ARCH_NO_SWAP 341 default y 342 help 343 This option allows you to choose whether you want to have support 344 for so called swap devices or swap files in your kernel that are 345 used to provide more virtual memory than the actual RAM present 346 in your computer. If unsure say Y. 347 348config SYSVIPC 349 bool "System V IPC" 350 help 351 Inter Process Communication is a suite of library functions and 352 system calls which let processes (running programs) synchronize and 353 exchange information. It is generally considered to be a good thing, 354 and some programs won't run unless you say Y here. In particular, if 355 you want to run the DOS emulator dosemu under Linux (read the 356 DOSEMU-HOWTO, available from <http://www.tldp.org/docs.html#howto>), 357 you'll need to say Y here. 358 359 You can find documentation about IPC with "info ipc" and also in 360 section 6.4 of the Linux Programmer's Guide, available from 361 <http://www.tldp.org/guides.html>. 362 363config SYSVIPC_SYSCTL 364 bool 365 depends on SYSVIPC 366 depends on SYSCTL 367 default y 368 369config POSIX_MQUEUE 370 bool "POSIX Message Queues" 371 depends on NET 372 help 373 POSIX variant of message queues is a part of IPC. In POSIX message 374 queues every message has a priority which decides about succession 375 of receiving it by a process. If you want to compile and run 376 programs written e.g. for Solaris with use of its POSIX message 377 queues (functions mq_*) say Y here. 378 379 POSIX message queues are visible as a filesystem called 'mqueue' 380 and can be mounted somewhere if you want to do filesystem 381 operations on message queues. 382 383 If unsure, say Y. 384 385config POSIX_MQUEUE_SYSCTL 386 bool 387 depends on POSIX_MQUEUE 388 depends on SYSCTL 389 default y 390 391config WATCH_QUEUE 392 bool "General notification queue" 393 default n 394 help 395 396 This is a general notification queue for the kernel to pass events to 397 userspace by splicing them into pipes. It can be used in conjunction 398 with watches for key/keyring change notifications and device 399 notifications. 400 401 See Documentation/watch_queue.rst 402 403config CROSS_MEMORY_ATTACH 404 bool "Enable process_vm_readv/writev syscalls" 405 depends on MMU 406 default y 407 help 408 Enabling this option adds the system calls process_vm_readv and 409 process_vm_writev which allow a process with the correct privileges 410 to directly read from or write to another process' address space. 411 See the man page for more details. 412 413config USELIB 414 bool "uselib syscall" 415 def_bool ALPHA || M68K || SPARC || X86_32 || IA32_EMULATION 416 help 417 This option enables the uselib syscall, a system call used in the 418 dynamic linker from libc5 and earlier. glibc does not use this 419 system call. If you intend to run programs built on libc5 or 420 earlier, you may need to enable this syscall. Current systems 421 running glibc can safely disable this. 422 423config AUDIT 424 bool "Auditing support" 425 depends on NET 426 help 427 Enable auditing infrastructure that can be used with another 428 kernel subsystem, such as SELinux (which requires this for 429 logging of avc messages output). System call auditing is included 430 on architectures which support it. 431 432config HAVE_ARCH_AUDITSYSCALL 433 bool 434 435config AUDITSYSCALL 436 def_bool y 437 depends on AUDIT && HAVE_ARCH_AUDITSYSCALL 438 select FSNOTIFY 439 440source "kernel/irq/Kconfig" 441source "kernel/time/Kconfig" 442source "kernel/Kconfig.preempt" 443 444menu "CPU/Task time and stats accounting" 445 446config VIRT_CPU_ACCOUNTING 447 bool 448 449choice 450 prompt "Cputime accounting" 451 default TICK_CPU_ACCOUNTING if !PPC64 452 default VIRT_CPU_ACCOUNTING_NATIVE if PPC64 453 454# Kind of a stub config for the pure tick based cputime accounting 455config TICK_CPU_ACCOUNTING 456 bool "Simple tick based cputime accounting" 457 depends on !S390 && !NO_HZ_FULL 458 help 459 This is the basic tick based cputime accounting that maintains 460 statistics about user, system and idle time spent on per jiffies 461 granularity. 462 463 If unsure, say Y. 464 465config VIRT_CPU_ACCOUNTING_NATIVE 466 bool "Deterministic task and CPU time accounting" 467 depends on HAVE_VIRT_CPU_ACCOUNTING && !NO_HZ_FULL 468 select VIRT_CPU_ACCOUNTING 469 help 470 Select this option to enable more accurate task and CPU time 471 accounting. This is done by reading a CPU counter on each 472 kernel entry and exit and on transitions within the kernel 473 between system, softirq and hardirq state, so there is a 474 small performance impact. In the case of s390 or IBM POWER > 5, 475 this also enables accounting of stolen time on logically-partitioned 476 systems. 477 478config VIRT_CPU_ACCOUNTING_GEN 479 bool "Full dynticks CPU time accounting" 480 depends on HAVE_CONTEXT_TRACKING 481 depends on HAVE_VIRT_CPU_ACCOUNTING_GEN 482 depends on GENERIC_CLOCKEVENTS 483 select VIRT_CPU_ACCOUNTING 484 select CONTEXT_TRACKING 485 help 486 Select this option to enable task and CPU time accounting on full 487 dynticks systems. This accounting is implemented by watching every 488 kernel-user boundaries using the context tracking subsystem. 489 The accounting is thus performed at the expense of some significant 490 overhead. 491 492 For now this is only useful if you are working on the full 493 dynticks subsystem development. 494 495 If unsure, say N. 496 497endchoice 498 499config IRQ_TIME_ACCOUNTING 500 bool "Fine granularity task level IRQ time accounting" 501 depends on HAVE_IRQ_TIME_ACCOUNTING && !VIRT_CPU_ACCOUNTING_NATIVE 502 help 503 Select this option to enable fine granularity task irq time 504 accounting. This is done by reading a timestamp on each 505 transitions between softirq and hardirq state, so there can be a 506 small performance impact. 507 508 If in doubt, say N here. 509 510config HAVE_SCHED_AVG_IRQ 511 def_bool y 512 depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING 513 depends on SMP 514 515config SCHED_THERMAL_PRESSURE 516 bool 517 default y if ARM && ARM_CPU_TOPOLOGY 518 default y if ARM64 519 depends on SMP 520 depends on CPU_FREQ_THERMAL 521 help 522 Select this option to enable thermal pressure accounting in the 523 scheduler. Thermal pressure is the value conveyed to the scheduler 524 that reflects the reduction in CPU compute capacity resulted from 525 thermal throttling. Thermal throttling occurs when the performance of 526 a CPU is capped due to high operating temperatures. 527 528 If selected, the scheduler will be able to balance tasks accordingly, 529 i.e. put less load on throttled CPUs than on non/less throttled ones. 530 531 This requires the architecture to implement 532 arch_set_thermal_pressure() and arch_get_thermal_pressure(). 533 534config SCHED_WALT 535 bool "Support window based load tracking" 536 depends on SMP 537 help 538 This feature will allow the scheduler to maintain a tunable window 539 based set of metrics for tasks and runqueues. These metrics can be 540 used to guide task placement as well as task frequency requirements 541 for cpufreq governors. 542 543config BSD_PROCESS_ACCT 544 bool "BSD Process Accounting" 545 depends on MULTIUSER 546 help 547 If you say Y here, a user level program will be able to instruct the 548 kernel (via a special system call) to write process accounting 549 information to a file: whenever a process exits, information about 550 that process will be appended to the file by the kernel. The 551 information includes things such as creation time, owning user, 552 command name, memory usage, controlling terminal etc. (the complete 553 list is in the struct acct in <file:include/linux/acct.h>). It is 554 up to the user level program to do useful things with this 555 information. This is generally a good idea, so say Y. 556 557config BSD_PROCESS_ACCT_V3 558 bool "BSD Process Accounting version 3 file format" 559 depends on BSD_PROCESS_ACCT 560 default n 561 help 562 If you say Y here, the process accounting information is written 563 in a new file format that also logs the process IDs of each 564 process and its parent. Note that this file format is incompatible 565 with previous v0/v1/v2 file formats, so you will need updated tools 566 for processing it. A preliminary version of these tools is available 567 at <http://www.gnu.org/software/acct/>. 568 569config TASKSTATS 570 bool "Export task/process statistics through netlink" 571 depends on NET 572 depends on MULTIUSER 573 default n 574 help 575 Export selected statistics for tasks/processes through the 576 generic netlink interface. Unlike BSD process accounting, the 577 statistics are available during the lifetime of tasks/processes as 578 responses to commands. Like BSD accounting, they are sent to user 579 space on task exit. 580 581 Say N if unsure. 582 583config TASK_DELAY_ACCT 584 bool "Enable per-task delay accounting" 585 depends on TASKSTATS 586 select SCHED_INFO 587 help 588 Collect information on time spent by a task waiting for system 589 resources like cpu, synchronous block I/O completion and swapping 590 in pages. Such statistics can help in setting a task's priorities 591 relative to other tasks for cpu, io, rss limits etc. 592 593 Say N if unsure. 594 595config TASK_XACCT 596 bool "Enable extended accounting over taskstats" 597 depends on TASKSTATS 598 help 599 Collect extended task accounting data and send the data 600 to userland for processing over the taskstats interface. 601 602 Say N if unsure. 603 604config TASK_IO_ACCOUNTING 605 bool "Enable per-task storage I/O accounting" 606 depends on TASK_XACCT 607 help 608 Collect information on the number of bytes of storage I/O which this 609 task has caused. 610 611 Say N if unsure. 612 613config PSI 614 bool "Pressure stall information tracking" 615 help 616 Collect metrics that indicate how overcommitted the CPU, memory, 617 and IO capacity are in the system. 618 619 If you say Y here, the kernel will create /proc/pressure/ with the 620 pressure statistics files cpu, memory, and io. These will indicate 621 the share of walltime in which some or all tasks in the system are 622 delayed due to contention of the respective resource. 623 624 In kernels with cgroup support, cgroups (cgroup2 only) will 625 have cpu.pressure, memory.pressure, and io.pressure files, 626 which aggregate pressure stalls for the grouped tasks only. 627 628 For more details see Documentation/accounting/psi.rst. 629 630 Say N if unsure. 631 632config PSI_DEFAULT_DISABLED 633 bool "Require boot parameter to enable pressure stall information tracking" 634 default n 635 depends on PSI 636 help 637 If set, pressure stall information tracking will be disabled 638 per default but can be enabled through passing psi=1 on the 639 kernel commandline during boot. 640 641 This feature adds some code to the task wakeup and sleep 642 paths of the scheduler. The overhead is too low to affect 643 common scheduling-intense workloads in practice (such as 644 webservers, memcache), but it does show up in artificial 645 scheduler stress tests, such as hackbench. 646 647 If you are paranoid and not sure what the kernel will be 648 used for, say Y. 649 650 Say N if unsure. 651 652endmenu # "CPU/Task time and stats accounting" 653 654config CPU_ISOLATION 655 bool "CPU isolation" 656 depends on SMP || COMPILE_TEST 657 default y 658 help 659 Make sure that CPUs running critical tasks are not disturbed by 660 any source of "noise" such as unbound workqueues, timers, kthreads... 661 Unbound jobs get offloaded to housekeeping CPUs. This is driven by 662 the "isolcpus=" boot parameter. 663 664 Say Y if unsure. 665 666config SCHED_RUNNING_AVG 667 bool "per-rq and per-cluster running average statistics" 668 default n 669 670config CPU_ISOLATION_OPT 671 bool "CPU isolation optimization" 672 depends on SMP 673 default n 674 help 675 This option enables cpu isolation optimization, which allows 676 to isolate cpu dynamically. The isolated cpu will be unavailable 677 to scheduler and load balancer, and all its non-pinned timers, 678 IRQs and tasks will be migrated to other cpus, only pinned 679 kthread and IRQS are still allowed to run, this achieves 680 similar effect as hotplug but at lower latency cost. 681 682config SCHED_CORE_CTRL 683 bool "Core control" 684 depends on CPU_ISOLATION_OPT 685 select SCHED_RUNNING_AVG 686 default n 687 help 688 This option enables the core control functionality in 689 the scheduler. Core control automatically isolate and 690 unisolate cores based on cpu load and utilization. 691 692source "kernel/rcu/Kconfig" 693 694config BUILD_BIN2C 695 bool 696 default n 697 698config IKCONFIG 699 tristate "Kernel .config support" 700 help 701 This option enables the complete Linux kernel ".config" file 702 contents to be saved in the kernel. It provides documentation 703 of which kernel options are used in a running kernel or in an 704 on-disk kernel. This information can be extracted from the kernel 705 image file with the script scripts/extract-ikconfig and used as 706 input to rebuild the current kernel or to build another kernel. 707 It can also be extracted from a running kernel by reading 708 /proc/config.gz if enabled (below). 709 710config IKCONFIG_PROC 711 bool "Enable access to .config through /proc/config.gz" 712 depends on IKCONFIG && PROC_FS 713 help 714 This option enables access to the kernel configuration file 715 through /proc/config.gz. 716 717config IKHEADERS 718 tristate "Enable kernel headers through /sys/kernel/kheaders.tar.xz" 719 depends on SYSFS 720 help 721 This option enables access to the in-kernel headers that are generated during 722 the build process. These can be used to build eBPF tracing programs, 723 or similar programs. If you build the headers as a module, a module called 724 kheaders.ko is built which can be loaded on-demand to get access to headers. 725 726config LOG_BUF_SHIFT 727 int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" 728 range 12 25 if !H8300 729 range 12 19 if H8300 730 default 17 731 depends on PRINTK 732 help 733 Select the minimal kernel log buffer size as a power of 2. 734 The final size is affected by LOG_CPU_MAX_BUF_SHIFT config 735 parameter, see below. Any higher size also might be forced 736 by "log_buf_len" boot parameter. 737 738 Examples: 739 17 => 128 KB 740 16 => 64 KB 741 15 => 32 KB 742 14 => 16 KB 743 13 => 8 KB 744 12 => 4 KB 745 746config LOG_CPU_MAX_BUF_SHIFT 747 int "CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB)" 748 depends on SMP 749 range 0 21 750 default 12 if !BASE_SMALL 751 default 0 if BASE_SMALL 752 depends on PRINTK 753 help 754 This option allows to increase the default ring buffer size 755 according to the number of CPUs. The value defines the contribution 756 of each CPU as a power of 2. The used space is typically only few 757 lines however it might be much more when problems are reported, 758 e.g. backtraces. 759 760 The increased size means that a new buffer has to be allocated and 761 the original static one is unused. It makes sense only on systems 762 with more CPUs. Therefore this value is used only when the sum of 763 contributions is greater than the half of the default kernel ring 764 buffer as defined by LOG_BUF_SHIFT. The default values are set 765 so that more than 16 CPUs are needed to trigger the allocation. 766 767 Also this option is ignored when "log_buf_len" kernel parameter is 768 used as it forces an exact (power of two) size of the ring buffer. 769 770 The number of possible CPUs is used for this computation ignoring 771 hotplugging making the computation optimal for the worst case 772 scenario while allowing a simple algorithm to be used from bootup. 773 774 Examples shift values and their meaning: 775 17 => 128 KB for each CPU 776 16 => 64 KB for each CPU 777 15 => 32 KB for each CPU 778 14 => 16 KB for each CPU 779 13 => 8 KB for each CPU 780 12 => 4 KB for each CPU 781 782config PRINTK_SAFE_LOG_BUF_SHIFT 783 int "Temporary per-CPU printk log buffer size (12 => 4KB, 13 => 8KB)" 784 range 10 21 785 default 13 786 depends on PRINTK 787 help 788 Select the size of an alternate printk per-CPU buffer where messages 789 printed from usafe contexts are temporary stored. One example would 790 be NMI messages, another one - printk recursion. The messages are 791 copied to the main log buffer in a safe context to avoid a deadlock. 792 The value defines the size as a power of 2. 793 794 Those messages are rare and limited. The largest one is when 795 a backtrace is printed. It usually fits into 4KB. Select 796 8KB if you want to be on the safe side. 797 798 Examples: 799 17 => 128 KB for each CPU 800 16 => 64 KB for each CPU 801 15 => 32 KB for each CPU 802 14 => 16 KB for each CPU 803 13 => 8 KB for each CPU 804 12 => 4 KB for each CPU 805 806# 807# Architectures with an unreliable sched_clock() should select this: 808# 809config HAVE_UNSTABLE_SCHED_CLOCK 810 bool 811 812config GENERIC_SCHED_CLOCK 813 bool 814 815menu "Scheduler features" 816 817config UCLAMP_TASK 818 bool "Enable utilization clamping for RT/FAIR tasks" 819 depends on CPU_FREQ_GOV_SCHEDUTIL 820 help 821 This feature enables the scheduler to track the clamped utilization 822 of each CPU based on RUNNABLE tasks scheduled on that CPU. 823 824 With this option, the user can specify the min and max CPU 825 utilization allowed for RUNNABLE tasks. The max utilization defines 826 the maximum frequency a task should use while the min utilization 827 defines the minimum frequency it should use. 828 829 Both min and max utilization clamp values are hints to the scheduler, 830 aiming at improving its frequency selection policy, but they do not 831 enforce or grant any specific bandwidth for tasks. 832 833 If in doubt, say N. 834 835config UCLAMP_BUCKETS_COUNT 836 int "Number of supported utilization clamp buckets" 837 range 5 20 838 default 5 839 depends on UCLAMP_TASK 840 help 841 Defines the number of clamp buckets to use. The range of each bucket 842 will be SCHED_CAPACITY_SCALE/UCLAMP_BUCKETS_COUNT. The higher the 843 number of clamp buckets the finer their granularity and the higher 844 the precision of clamping aggregation and tracking at run-time. 845 846 For example, with the minimum configuration value we will have 5 847 clamp buckets tracking 20% utilization each. A 25% boosted tasks will 848 be refcounted in the [20..39]% bucket and will set the bucket clamp 849 effective value to 25%. 850 If a second 30% boosted task should be co-scheduled on the same CPU, 851 that task will be refcounted in the same bucket of the first task and 852 it will boost the bucket clamp effective value to 30%. 853 The clamp effective value of a bucket is reset to its nominal value 854 (20% in the example above) when there are no more tasks refcounted in 855 that bucket. 856 857 An additional boost/capping margin can be added to some tasks. In the 858 example above the 25% task will be boosted to 30% until it exits the 859 CPU. If that should be considered not acceptable on certain systems, 860 it's always possible to reduce the margin by increasing the number of 861 clamp buckets to trade off used memory for run-time tracking 862 precision. 863 864 If in doubt, use the default value. 865 866config SCHED_LATENCY_NICE 867 bool "Enable latency feature for FAIR tasks" 868 default n 869 help 870 This feature use latency nice priority to decide if a cfs task can 871 preempt the current running task. 872source "kernel/sched/rtg/Kconfig" 873 874config SCHED_EAS 875 bool "EAS scheduler optimization" 876 default n 877 help 878 Check and migrate the CFS process to a more suitable CPU in the tick. 879 880config SCHED_RT_CAS 881 bool "rt-cas optimization" 882 depends on SCHED_EAS 883 default n 884 help 885 RT task detects capacity during CPU selection 886 887config SCHED_RT_ACTIVE_LB 888 bool "RT Capacity Aware Misfit Task" 889 depends on SCHED_EAS 890 default n 891 help 892 Check and migrate the RT process to a more suitable CPU in the tick. 893 894endmenu 895 896# 897# For architectures that want to enable the support for NUMA-affine scheduler 898# balancing logic: 899# 900config ARCH_SUPPORTS_NUMA_BALANCING 901 bool 902 903# 904# For architectures that prefer to flush all TLBs after a number of pages 905# are unmapped instead of sending one IPI per page to flush. The architecture 906# must provide guarantees on what happens if a clean TLB cache entry is 907# written after the unmap. Details are in mm/rmap.c near the check for 908# should_defer_flush. The architecture should also consider if the full flush 909# and the refill costs are offset by the savings of sending fewer IPIs. 910config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH 911 bool 912 913config CC_HAS_INT128 914 def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT 915 916# 917# For architectures that know their GCC __int128 support is sound 918# 919config ARCH_SUPPORTS_INT128 920 bool 921 922# For architectures that (ab)use NUMA to represent different memory regions 923# all cpu-local but of different latencies, such as SuperH. 924# 925config ARCH_WANT_NUMA_VARIABLE_LOCALITY 926 bool 927 928config NUMA_BALANCING 929 bool "Memory placement aware NUMA scheduler" 930 depends on ARCH_SUPPORTS_NUMA_BALANCING 931 depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY 932 depends on SMP && NUMA && MIGRATION 933 help 934 This option adds support for automatic NUMA aware memory/task placement. 935 The mechanism is quite primitive and is based on migrating memory when 936 it has references to the node the task is running on. 937 938 This system will be inactive on UMA systems. 939 940config NUMA_BALANCING_DEFAULT_ENABLED 941 bool "Automatically enable NUMA aware memory/task placement" 942 default y 943 depends on NUMA_BALANCING 944 help 945 If set, automatic NUMA balancing will be enabled if running on a NUMA 946 machine. 947 948menuconfig CGROUPS 949 bool "Control Group support" 950 select KERNFS 951 help 952 This option adds support for grouping sets of processes together, for 953 use with process control subsystems such as Cpusets, CFS, memory 954 controls or device isolation. 955 See 956 - Documentation/scheduler/sched-design-CFS.rst (CFS) 957 - Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation 958 and resource control) 959 960 Say N if unsure. 961 962if CGROUPS 963 964config PAGE_COUNTER 965 bool 966 967config MEMCG 968 bool "Memory controller" 969 select PAGE_COUNTER 970 select EVENTFD 971 help 972 Provides control over the memory footprint of tasks in a cgroup. 973 974config MEMCG_SWAP 975 bool 976 depends on MEMCG && SWAP 977 default y 978 979config MEMCG_KMEM 980 bool 981 depends on MEMCG && !SLOB 982 default y 983 984config BLK_CGROUP 985 bool "IO controller" 986 depends on BLOCK 987 default n 988 help 989 Generic block IO controller cgroup interface. This is the common 990 cgroup interface which should be used by various IO controlling 991 policies. 992 993 Currently, CFQ IO scheduler uses it to recognize task groups and 994 control disk bandwidth allocation (proportional time slice allocation) 995 to such task groups. It is also used by bio throttling logic in 996 block layer to implement upper limit in IO rates on a device. 997 998 This option only enables generic Block IO controller infrastructure. 999 One needs to also enable actual IO controlling logic/policy. For 1000 enabling proportional weight division of disk bandwidth in CFQ, set 1001 CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set 1002 CONFIG_BLK_DEV_THROTTLING=y. 1003 1004 See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information. 1005 1006config CGROUP_WRITEBACK 1007 bool 1008 depends on MEMCG && BLK_CGROUP 1009 default y 1010 1011menuconfig CGROUP_SCHED 1012 bool "CPU controller" 1013 default n 1014 help 1015 This feature lets CPU scheduler recognize task groups and control CPU 1016 bandwidth allocation to such task groups. It uses cgroups to group 1017 tasks. 1018 1019if CGROUP_SCHED 1020config FAIR_GROUP_SCHED 1021 bool "Group scheduling for SCHED_OTHER" 1022 depends on CGROUP_SCHED 1023 default CGROUP_SCHED 1024 1025config CFS_BANDWIDTH 1026 bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED" 1027 depends on FAIR_GROUP_SCHED 1028 default n 1029 help 1030 This option allows users to define CPU bandwidth rates (limits) for 1031 tasks running within the fair group scheduler. Groups with no limit 1032 set are considered to be unconstrained and will run with no 1033 restriction. 1034 See Documentation/scheduler/sched-bwc.rst for more information. 1035 1036config RT_GROUP_SCHED 1037 bool "Group scheduling for SCHED_RR/FIFO" 1038 depends on CGROUP_SCHED 1039 default n 1040 help 1041 This feature lets you explicitly allocate real CPU bandwidth 1042 to task groups. If enabled, it will also make it impossible to 1043 schedule realtime tasks for non-root users until you allocate 1044 realtime bandwidth for them. 1045 See Documentation/scheduler/sched-rt-group.rst for more information. 1046 1047endif #CGROUP_SCHED 1048 1049config UCLAMP_TASK_GROUP 1050 bool "Utilization clamping per group of tasks" 1051 depends on CGROUP_SCHED 1052 depends on UCLAMP_TASK 1053 default n 1054 help 1055 This feature enables the scheduler to track the clamped utilization 1056 of each CPU based on RUNNABLE tasks currently scheduled on that CPU. 1057 1058 When this option is enabled, the user can specify a min and max 1059 CPU bandwidth which is allowed for each single task in a group. 1060 The max bandwidth allows to clamp the maximum frequency a task 1061 can use, while the min bandwidth allows to define a minimum 1062 frequency a task will always use. 1063 1064 When task group based utilization clamping is enabled, an eventually 1065 specified task-specific clamp value is constrained by the cgroup 1066 specified clamp value. Both minimum and maximum task clamping cannot 1067 be bigger than the corresponding clamping defined at task group level. 1068 1069 If in doubt, say N. 1070 1071config CGROUP_PIDS 1072 bool "PIDs controller" 1073 help 1074 Provides enforcement of process number limits in the scope of a 1075 cgroup. Any attempt to fork more processes than is allowed in the 1076 cgroup will fail. PIDs are fundamentally a global resource because it 1077 is fairly trivial to reach PID exhaustion before you reach even a 1078 conservative kmemcg limit. As a result, it is possible to grind a 1079 system to halt without being limited by other cgroup policies. The 1080 PIDs controller is designed to stop this from happening. 1081 1082 It should be noted that organisational operations (such as attaching 1083 to a cgroup hierarchy) will *not* be blocked by the PIDs controller, 1084 since the PIDs limit only affects a process's ability to fork, not to 1085 attach to a cgroup. 1086 1087config CGROUP_RDMA 1088 bool "RDMA controller" 1089 help 1090 Provides enforcement of RDMA resources defined by IB stack. 1091 It is fairly easy for consumers to exhaust RDMA resources, which 1092 can result into resource unavailability to other consumers. 1093 RDMA controller is designed to stop this from happening. 1094 Attaching processes with active RDMA resources to the cgroup 1095 hierarchy is allowed even if can cross the hierarchy's limit. 1096 1097config CGROUP_FREEZER 1098 bool "Freezer controller" 1099 help 1100 Provides a way to freeze and unfreeze all tasks in a 1101 cgroup. 1102 1103 This option affects the ORIGINAL cgroup interface. The cgroup2 memory 1104 controller includes important in-kernel memory consumers per default. 1105 1106 If you're using cgroup2, say N. 1107 1108config CGROUP_HUGETLB 1109 bool "HugeTLB controller" 1110 depends on HUGETLB_PAGE 1111 select PAGE_COUNTER 1112 default n 1113 help 1114 Provides a cgroup controller for HugeTLB pages. 1115 When you enable this, you can put a per cgroup limit on HugeTLB usage. 1116 The limit is enforced during page fault. Since HugeTLB doesn't 1117 support page reclaim, enforcing the limit at page fault time implies 1118 that, the application will get SIGBUS signal if it tries to access 1119 HugeTLB pages beyond its limit. This requires the application to know 1120 beforehand how much HugeTLB pages it would require for its use. The 1121 control group is tracked in the third page lru pointer. This means 1122 that we cannot use the controller with huge page less than 3 pages. 1123 1124config CPUSETS 1125 bool "Cpuset controller" 1126 depends on SMP 1127 help 1128 This option will let you create and manage CPUSETs which 1129 allow dynamically partitioning a system into sets of CPUs and 1130 Memory Nodes and assigning tasks to run only within those sets. 1131 This is primarily useful on large SMP or NUMA systems. 1132 1133 Say N if unsure. 1134 1135config PROC_PID_CPUSET 1136 bool "Include legacy /proc/<pid>/cpuset file" 1137 depends on CPUSETS 1138 default y 1139 1140config CGROUP_DEVICE 1141 bool "Device controller" 1142 help 1143 Provides a cgroup controller implementing whitelists for 1144 devices which a process in the cgroup can mknod or open. 1145 1146config CGROUP_CPUACCT 1147 bool "Simple CPU accounting controller" 1148 help 1149 Provides a simple controller for monitoring the 1150 total CPU consumed by the tasks in a cgroup. 1151 1152config CGROUP_PERF 1153 bool "Perf controller" 1154 depends on PERF_EVENTS 1155 help 1156 This option extends the perf per-cpu mode to restrict monitoring 1157 to threads which belong to the cgroup specified and run on the 1158 designated cpu. Or this can be used to have cgroup ID in samples 1159 so that it can monitor performance events among cgroups. 1160 1161 Say N if unsure. 1162 1163config CGROUP_BPF 1164 bool "Support for eBPF programs attached to cgroups" 1165 depends on BPF_SYSCALL 1166 select SOCK_CGROUP_DATA 1167 help 1168 Allow attaching eBPF programs to a cgroup using the bpf(2) 1169 syscall command BPF_PROG_ATTACH. 1170 1171 In which context these programs are accessed depends on the type 1172 of attachment. For instance, programs that are attached using 1173 BPF_CGROUP_INET_INGRESS will be executed on the ingress path of 1174 inet sockets. 1175 1176config CGROUP_DEBUG 1177 bool "Debug controller" 1178 default n 1179 depends on DEBUG_KERNEL 1180 help 1181 This option enables a simple controller that exports 1182 debugging information about the cgroups framework. This 1183 controller is for control cgroup debugging only. Its 1184 interfaces are not stable. 1185 1186 Say N. 1187 1188config SOCK_CGROUP_DATA 1189 bool 1190 default n 1191 1192endif # CGROUPS 1193 1194menuconfig NAMESPACES 1195 bool "Namespaces support" if EXPERT 1196 depends on MULTIUSER 1197 default !EXPERT 1198 help 1199 Provides the way to make tasks work with different objects using 1200 the same id. For example same IPC id may refer to different objects 1201 or same user id or pid may refer to different tasks when used in 1202 different namespaces. 1203 1204if NAMESPACES 1205 1206config UTS_NS 1207 bool "UTS namespace" 1208 default y 1209 help 1210 In this namespace tasks see different info provided with the 1211 uname() system call 1212 1213config TIME_NS 1214 bool "TIME namespace" 1215 depends on GENERIC_VDSO_TIME_NS 1216 default y 1217 help 1218 In this namespace boottime and monotonic clocks can be set. 1219 The time will keep going with the same pace. 1220 1221config IPC_NS 1222 bool "IPC namespace" 1223 depends on (SYSVIPC || POSIX_MQUEUE) 1224 default y 1225 help 1226 In this namespace tasks work with IPC ids which correspond to 1227 different IPC objects in different namespaces. 1228 1229config USER_NS 1230 bool "User namespace" 1231 default n 1232 help 1233 This allows containers, i.e. vservers, to use user namespaces 1234 to provide different user info for different servers. 1235 1236 When user namespaces are enabled in the kernel it is 1237 recommended that the MEMCG option also be enabled and that 1238 user-space use the memory control groups to limit the amount 1239 of memory a memory unprivileged users can use. 1240 1241 If unsure, say N. 1242 1243config PID_NS 1244 bool "PID Namespaces" 1245 default y 1246 help 1247 Support process id namespaces. This allows having multiple 1248 processes with the same pid as long as they are in different 1249 pid namespaces. This is a building block of containers. 1250 1251config NET_NS 1252 bool "Network namespace" 1253 depends on NET 1254 default y 1255 help 1256 Allow user space to create what appear to be multiple instances 1257 of the network stack. 1258 1259endif # NAMESPACES 1260 1261config CHECKPOINT_RESTORE 1262 bool "Checkpoint/restore support" 1263 select PROC_CHILDREN 1264 select KCMP 1265 default n 1266 help 1267 Enables additional kernel features in a sake of checkpoint/restore. 1268 In particular it adds auxiliary prctl codes to setup process text, 1269 data and heap segment sizes, and a few additional /proc filesystem 1270 entries. 1271 1272 If unsure, say N here. 1273 1274config SCHED_AUTOGROUP 1275 bool "Automatic process group scheduling" 1276 select CGROUPS 1277 select CGROUP_SCHED 1278 select FAIR_GROUP_SCHED 1279 help 1280 This option optimizes the scheduler for common desktop workloads by 1281 automatically creating and populating task groups. This separation 1282 of workloads isolates aggressive CPU burners (like build jobs) from 1283 desktop applications. Task group autogeneration is currently based 1284 upon task session. 1285 1286config SYSFS_DEPRECATED 1287 bool "Enable deprecated sysfs features to support old userspace tools" 1288 depends on SYSFS 1289 default n 1290 help 1291 This option adds code that switches the layout of the "block" class 1292 devices, to not show up in /sys/class/block/, but only in 1293 /sys/block/. 1294 1295 This switch is only active when the sysfs.deprecated=1 boot option is 1296 passed or the SYSFS_DEPRECATED_V2 option is set. 1297 1298 This option allows new kernels to run on old distributions and tools, 1299 which might get confused by /sys/class/block/. Since 2007/2008 all 1300 major distributions and tools handle this just fine. 1301 1302 Recent distributions and userspace tools after 2009/2010 depend on 1303 the existence of /sys/class/block/, and will not work with this 1304 option enabled. 1305 1306 Only if you are using a new kernel on an old distribution, you might 1307 need to say Y here. 1308 1309config SYSFS_DEPRECATED_V2 1310 bool "Enable deprecated sysfs features by default" 1311 default n 1312 depends on SYSFS 1313 depends on SYSFS_DEPRECATED 1314 help 1315 Enable deprecated sysfs by default. 1316 1317 See the CONFIG_SYSFS_DEPRECATED option for more details about this 1318 option. 1319 1320 Only if you are using a new kernel on an old distribution, you might 1321 need to say Y here. Even then, odds are you would not need it 1322 enabled, you can always pass the boot option if absolutely necessary. 1323 1324config RELAY 1325 bool "Kernel->user space relay support (formerly relayfs)" 1326 select IRQ_WORK 1327 help 1328 This option enables support for relay interface support in 1329 certain file systems (such as debugfs). 1330 It is designed to provide an efficient mechanism for tools and 1331 facilities to relay large amounts of data from kernel space to 1332 user space. 1333 1334 If unsure, say N. 1335 1336config BLK_DEV_INITRD 1337 bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support" 1338 help 1339 The initial RAM filesystem is a ramfs which is loaded by the 1340 boot loader (loadlin or lilo) and that is mounted as root 1341 before the normal boot procedure. It is typically used to 1342 load modules needed to mount the "real" root file system, 1343 etc. See <file:Documentation/admin-guide/initrd.rst> for details. 1344 1345 If RAM disk support (BLK_DEV_RAM) is also included, this 1346 also enables initial RAM disk (initrd) support and adds 1347 15 Kbytes (more on some other architectures) to the kernel size. 1348 1349 If unsure say Y. 1350 1351if BLK_DEV_INITRD 1352 1353source "usr/Kconfig" 1354 1355config INITRD_ASYNC 1356 bool "Initrd async" 1357 depends on NO_GKI 1358 help 1359 Init ramdisk async, can reduce kernel init time. 1360 1361endif 1362 1363config BOOT_CONFIG 1364 bool "Boot config support" 1365 select BLK_DEV_INITRD 1366 help 1367 Extra boot config allows system admin to pass a config file as 1368 complemental extension of kernel cmdline when booting. 1369 The boot config file must be attached at the end of initramfs 1370 with checksum, size and magic word. 1371 See <file:Documentation/admin-guide/bootconfig.rst> for details. 1372 1373 If unsure, say Y. 1374 1375choice 1376 prompt "Compiler optimization level" 1377 default CC_OPTIMIZE_FOR_PERFORMANCE 1378 1379config CC_OPTIMIZE_FOR_PERFORMANCE 1380 bool "Optimize for performance (-O2)" 1381 help 1382 This is the default optimization level for the kernel, building 1383 with the "-O2" compiler flag for best performance and most 1384 helpful compile-time warnings. 1385 1386config CC_OPTIMIZE_FOR_PERFORMANCE_O3 1387 bool "Optimize more for performance (-O3)" 1388 depends on ARC 1389 help 1390 Choosing this option will pass "-O3" to your compiler to optimize 1391 the kernel yet more for performance. 1392 1393config CC_OPTIMIZE_FOR_SIZE 1394 bool "Optimize for size (-Os)" 1395 help 1396 Choosing this option will pass "-Os" to your compiler resulting 1397 in a smaller kernel. 1398 1399endchoice 1400 1401config HAVE_LD_DEAD_CODE_DATA_ELIMINATION 1402 bool 1403 help 1404 This requires that the arch annotates or otherwise protects 1405 its external entry points from being discarded. Linker scripts 1406 must also merge .text.*, .data.*, and .bss.* correctly into 1407 output sections. Care must be taken not to pull in unrelated 1408 sections (e.g., '.text.init'). Typically '.' in section names 1409 is used to distinguish them from label names / C identifiers. 1410 1411config LD_DEAD_CODE_DATA_ELIMINATION 1412 bool "Dead code and data elimination (EXPERIMENTAL)" 1413 depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION 1414 depends on EXPERT 1415 depends on $(cc-option,-ffunction-sections -fdata-sections) 1416 depends on $(ld-option,--gc-sections) 1417 help 1418 Enable this if you want to do dead code and data elimination with 1419 the linker by compiling with -ffunction-sections -fdata-sections, 1420 and linking with --gc-sections. 1421 1422 This can reduce on disk and in-memory size of the kernel 1423 code and static data, particularly for small configs and 1424 on small systems. This has the possibility of introducing 1425 silently broken kernel if the required annotations are not 1426 present. This option is not well tested yet, so use at your 1427 own risk. 1428 1429config LD_ORPHAN_WARN 1430 def_bool y 1431 depends on ARCH_WANT_LD_ORPHAN_WARN 1432 depends on !LD_IS_LLD || LLD_VERSION >= 110000 1433 depends on $(ld-option,--orphan-handling=warn) 1434 1435config SYSCTL 1436 bool 1437 1438config HAVE_UID16 1439 bool 1440 1441config SYSCTL_EXCEPTION_TRACE 1442 bool 1443 help 1444 Enable support for /proc/sys/debug/exception-trace. 1445 1446config SYSCTL_ARCH_UNALIGN_NO_WARN 1447 bool 1448 help 1449 Enable support for /proc/sys/kernel/ignore-unaligned-usertrap 1450 Allows arch to define/use @no_unaligned_warning to possibly warn 1451 about unaligned access emulation going on under the hood. 1452 1453config SYSCTL_ARCH_UNALIGN_ALLOW 1454 bool 1455 help 1456 Enable support for /proc/sys/kernel/unaligned-trap 1457 Allows arches to define/use @unaligned_enabled to runtime toggle 1458 the unaligned access emulation. 1459 see arch/parisc/kernel/unaligned.c for reference 1460 1461config HAVE_PCSPKR_PLATFORM 1462 bool 1463 1464# interpreter that classic socket filters depend on 1465config BPF 1466 bool 1467 1468menuconfig EXPERT 1469 bool "Configure standard kernel features (expert users)" 1470 # Unhide debug options, to make the on-by-default options visible 1471 select DEBUG_KERNEL 1472 help 1473 This option allows certain base kernel options and settings 1474 to be disabled or tweaked. This is for specialized 1475 environments which can tolerate a "non-standard" kernel. 1476 Only use this if you really know what you are doing. 1477 1478config UID16 1479 bool "Enable 16-bit UID system calls" if EXPERT 1480 depends on HAVE_UID16 && MULTIUSER 1481 default y 1482 help 1483 This enables the legacy 16-bit UID syscall wrappers. 1484 1485config MULTIUSER 1486 bool "Multiple users, groups and capabilities support" if EXPERT 1487 default y 1488 help 1489 This option enables support for non-root users, groups and 1490 capabilities. 1491 1492 If you say N here, all processes will run with UID 0, GID 0, and all 1493 possible capabilities. Saying N here also compiles out support for 1494 system calls related to UIDs, GIDs, and capabilities, such as setuid, 1495 setgid, and capset. 1496 1497 If unsure, say Y here. 1498 1499config SGETMASK_SYSCALL 1500 bool "sgetmask/ssetmask syscalls support" if EXPERT 1501 def_bool PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH 1502 help 1503 sys_sgetmask and sys_ssetmask are obsolete system calls 1504 no longer supported in libc but still enabled by default in some 1505 architectures. 1506 1507 If unsure, leave the default option here. 1508 1509config SYSFS_SYSCALL 1510 bool "Sysfs syscall support" if EXPERT 1511 default y 1512 help 1513 sys_sysfs is an obsolete system call no longer supported in libc. 1514 Note that disabling this option is more secure but might break 1515 compatibility with some systems. 1516 1517 If unsure say Y here. 1518 1519config FHANDLE 1520 bool "open by fhandle syscalls" if EXPERT 1521 select EXPORTFS 1522 default y 1523 help 1524 If you say Y here, a user level program will be able to map 1525 file names to handle and then later use the handle for 1526 different file system operations. This is useful in implementing 1527 userspace file servers, which now track files using handles instead 1528 of names. The handle would remain the same even if file names 1529 get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2) 1530 syscalls. 1531 1532config POSIX_TIMERS 1533 bool "Posix Clocks & timers" if EXPERT 1534 default y 1535 help 1536 This includes native support for POSIX timers to the kernel. 1537 Some embedded systems have no use for them and therefore they 1538 can be configured out to reduce the size of the kernel image. 1539 1540 When this option is disabled, the following syscalls won't be 1541 available: timer_create, timer_gettime: timer_getoverrun, 1542 timer_settime, timer_delete, clock_adjtime, getitimer, 1543 setitimer, alarm. Furthermore, the clock_settime, clock_gettime, 1544 clock_getres and clock_nanosleep syscalls will be limited to 1545 CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_BOOTTIME only. 1546 1547 If unsure say y. 1548 1549config PRINTK 1550 default y 1551 bool "Enable support for printk" if EXPERT 1552 select IRQ_WORK 1553 help 1554 This option enables normal printk support. Removing it 1555 eliminates most of the message strings from the kernel image 1556 and makes the kernel more or less silent. As this makes it 1557 very difficult to diagnose system problems, saying N here is 1558 strongly discouraged. 1559 1560config PRINTK_NMI 1561 def_bool y 1562 depends on PRINTK 1563 depends on HAVE_NMI 1564 1565config BUG 1566 bool "BUG() support" if EXPERT 1567 default y 1568 help 1569 Disabling this option eliminates support for BUG and WARN, reducing 1570 the size of your kernel image and potentially quietly ignoring 1571 numerous fatal conditions. You should only consider disabling this 1572 option for embedded systems with no facilities for reporting errors. 1573 Just say Y. 1574 1575config ELF_CORE 1576 depends on COREDUMP 1577 default y 1578 bool "Enable ELF core dumps" if EXPERT 1579 help 1580 Enable support for generating core dumps. Disabling saves about 4k. 1581 1582 1583config PCSPKR_PLATFORM 1584 bool "Enable PC-Speaker support" if EXPERT 1585 depends on HAVE_PCSPKR_PLATFORM 1586 select I8253_LOCK 1587 default y 1588 help 1589 This option allows to disable the internal PC-Speaker 1590 support, saving some memory. 1591 1592config BASE_FULL 1593 default y 1594 bool "Enable full-sized data structures for core" if EXPERT 1595 help 1596 Disabling this option reduces the size of miscellaneous core 1597 kernel data structures. This saves memory on small machines, 1598 but may reduce performance. 1599 1600config FUTEX 1601 bool "Enable futex support" if EXPERT 1602 default y 1603 imply RT_MUTEXES 1604 help 1605 Disabling this option will cause the kernel to be built without 1606 support for "fast userspace mutexes". The resulting kernel may not 1607 run glibc-based applications correctly. 1608 1609config FUTEX_PI 1610 bool 1611 depends on FUTEX && RT_MUTEXES 1612 default y 1613 1614config HAVE_FUTEX_CMPXCHG 1615 bool 1616 depends on FUTEX 1617 help 1618 Architectures should select this if futex_atomic_cmpxchg_inatomic() 1619 is implemented and always working. This removes a couple of runtime 1620 checks. 1621 1622config EPOLL 1623 bool "Enable eventpoll support" if EXPERT 1624 default y 1625 help 1626 Disabling this option will cause the kernel to be built without 1627 support for epoll family of system calls. 1628 1629config SIGNALFD 1630 bool "Enable signalfd() system call" if EXPERT 1631 default y 1632 help 1633 Enable the signalfd() system call that allows to receive signals 1634 on a file descriptor. 1635 1636 If unsure, say Y. 1637 1638config TIMERFD 1639 bool "Enable timerfd() system call" if EXPERT 1640 default y 1641 help 1642 Enable the timerfd() system call that allows to receive timer 1643 events on a file descriptor. 1644 1645 If unsure, say Y. 1646 1647config EVENTFD 1648 bool "Enable eventfd() system call" if EXPERT 1649 default y 1650 help 1651 Enable the eventfd() system call that allows to receive both 1652 kernel notification (ie. KAIO) or userspace notifications. 1653 1654 If unsure, say Y. 1655 1656config SHMEM 1657 bool "Use full shmem filesystem" if EXPERT 1658 default y 1659 depends on MMU 1660 help 1661 The shmem is an internal filesystem used to manage shared memory. 1662 It is backed by swap and manages resource limits. It is also exported 1663 to userspace as tmpfs if TMPFS is enabled. Disabling this 1664 option replaces shmem and tmpfs with the much simpler ramfs code, 1665 which may be appropriate on small systems without swap. 1666 1667config AIO 1668 bool "Enable AIO support" if EXPERT 1669 default y 1670 help 1671 This option enables POSIX asynchronous I/O which may by used 1672 by some high performance threaded applications. Disabling 1673 this option saves about 7k. 1674 1675config IO_URING 1676 bool "Enable IO uring support" if EXPERT 1677 select IO_WQ 1678 default y 1679 help 1680 This option enables support for the io_uring interface, enabling 1681 applications to submit and complete IO through submission and 1682 completion rings that are shared between the kernel and application. 1683 1684config ADVISE_SYSCALLS 1685 bool "Enable madvise/fadvise syscalls" if EXPERT 1686 default y 1687 help 1688 This option enables the madvise and fadvise syscalls, used by 1689 applications to advise the kernel about their future memory or file 1690 usage, improving performance. If building an embedded system where no 1691 applications use these syscalls, you can disable this option to save 1692 space. 1693 1694config HAVE_ARCH_USERFAULTFD_WP 1695 bool 1696 help 1697 Arch has userfaultfd write protection support 1698 1699config MEMBARRIER 1700 bool "Enable membarrier() system call" if EXPERT 1701 default y 1702 help 1703 Enable the membarrier() system call that allows issuing memory 1704 barriers across all running threads, which can be used to distribute 1705 the cost of user-space memory barriers asymmetrically by transforming 1706 pairs of memory barriers into pairs consisting of membarrier() and a 1707 compiler barrier. 1708 1709 If unsure, say Y. 1710 1711config KALLSYMS 1712 bool "Load all symbols for debugging/ksymoops" if EXPERT 1713 default y 1714 help 1715 Say Y here to let the kernel print out symbolic crash information and 1716 symbolic stack backtraces. This increases the size of the kernel 1717 somewhat, as all symbols have to be loaded into the kernel image. 1718 1719config KALLSYMS_ALL 1720 bool "Include all symbols in kallsyms" 1721 depends on DEBUG_KERNEL && KALLSYMS 1722 help 1723 Normally kallsyms only contains the symbols of functions for nicer 1724 OOPS messages and backtraces (i.e., symbols from the text and inittext 1725 sections). This is sufficient for most cases. And only in very rare 1726 cases (e.g., when a debugger is used) all symbols are required (e.g., 1727 names of variables from the data sections, etc). 1728 1729 This option makes sure that all symbols are loaded into the kernel 1730 image (i.e., symbols from all sections) in cost of increased kernel 1731 size (depending on the kernel configuration, it may be 300KiB or 1732 something like this). 1733 1734 Say N unless you really need all symbols. 1735 1736config KALLSYMS_ABSOLUTE_PERCPU 1737 bool 1738 depends on KALLSYMS 1739 default X86_64 && SMP 1740 1741config KALLSYMS_BASE_RELATIVE 1742 bool 1743 depends on KALLSYMS 1744 default !IA64 1745 help 1746 Instead of emitting them as absolute values in the native word size, 1747 emit the symbol references in the kallsyms table as 32-bit entries, 1748 each containing a relative value in the range [base, base + U32_MAX] 1749 or, when KALLSYMS_ABSOLUTE_PERCPU is in effect, each containing either 1750 an absolute value in the range [0, S32_MAX] or a relative value in the 1751 range [base, base + S32_MAX], where base is the lowest relative symbol 1752 address encountered in the image. 1753 1754 On 64-bit builds, this reduces the size of the address table by 50%, 1755 but more importantly, it results in entries whose values are build 1756 time constants, and no relocation pass is required at runtime to fix 1757 up the entries based on the runtime load address of the kernel. 1758 1759# end of the "standard kernel features (expert users)" menu 1760 1761# syscall, maps, verifier 1762 1763config BPF_LSM 1764 bool "LSM Instrumentation with BPF" 1765 depends on BPF_EVENTS 1766 depends on BPF_SYSCALL 1767 depends on SECURITY 1768 depends on BPF_JIT 1769 help 1770 Enables instrumentation of the security hooks with eBPF programs for 1771 implementing dynamic MAC and Audit Policies. 1772 1773 If you are unsure how to answer this question, answer N. 1774 1775config BPF_SYSCALL 1776 bool "Enable bpf() system call" 1777 select BPF 1778 select IRQ_WORK 1779 select TASKS_TRACE_RCU 1780 default n 1781 help 1782 Enable the bpf() system call that allows to manipulate eBPF 1783 programs and maps via file descriptors. 1784 1785config ARCH_WANT_DEFAULT_BPF_JIT 1786 bool 1787 1788config BPF_JIT_ALWAYS_ON 1789 bool "Permanently enable BPF JIT and remove BPF interpreter" 1790 depends on BPF_SYSCALL && HAVE_EBPF_JIT && BPF_JIT 1791 help 1792 Enables BPF JIT and removes BPF interpreter to avoid 1793 speculative execution of BPF instructions by the interpreter 1794 1795config BPF_JIT_DEFAULT_ON 1796 def_bool ARCH_WANT_DEFAULT_BPF_JIT || BPF_JIT_ALWAYS_ON 1797 depends on HAVE_EBPF_JIT && BPF_JIT 1798 1799config BPF_UNPRIV_DEFAULT_OFF 1800 bool "Disable unprivileged BPF by default" 1801 depends on BPF_SYSCALL 1802 help 1803 Disables unprivileged BPF by default by setting the corresponding 1804 /proc/sys/kernel/unprivileged_bpf_disabled knob to 2. An admin can 1805 still reenable it by setting it to 0 later on, or permanently 1806 disable it by setting it to 1 (from which no other transition to 1807 0 is possible anymore). 1808 1809source "kernel/bpf/preload/Kconfig" 1810 1811config USERFAULTFD 1812 bool "Enable userfaultfd() system call" 1813 depends on MMU 1814 help 1815 Enable the userfaultfd() system call that allows to intercept and 1816 handle page faults in userland. 1817 1818config ARCH_HAS_MEMBARRIER_CALLBACKS 1819 bool 1820 1821config ARCH_HAS_MEMBARRIER_SYNC_CORE 1822 bool 1823 1824config KCMP 1825 bool "Enable kcmp() system call" if EXPERT 1826 help 1827 Enable the kernel resource comparison system call. It provides 1828 user-space with the ability to compare two processes to see if they 1829 share a common resource, such as a file descriptor or even virtual 1830 memory space. 1831 1832 If unsure, say N. 1833 1834config RSEQ 1835 bool "Enable rseq() system call" if EXPERT 1836 default y 1837 depends on HAVE_RSEQ 1838 select MEMBARRIER 1839 help 1840 Enable the restartable sequences system call. It provides a 1841 user-space cache for the current CPU number value, which 1842 speeds up getting the current CPU number from user-space, 1843 as well as an ABI to speed up user-space operations on 1844 per-CPU data. 1845 1846 If unsure, say Y. 1847 1848config DEBUG_RSEQ 1849 default n 1850 bool "Enabled debugging of rseq() system call" if EXPERT 1851 depends on RSEQ && DEBUG_KERNEL 1852 help 1853 Enable extra debugging checks for the rseq system call. 1854 1855 If unsure, say N. 1856 1857config EMBEDDED 1858 bool "Embedded system" 1859 option allnoconfig_y 1860 select EXPERT 1861 help 1862 This option should be enabled if compiling the kernel for 1863 an embedded system so certain expert options are available 1864 for configuration. 1865 1866config HAVE_PERF_EVENTS 1867 bool 1868 help 1869 See tools/perf/design.txt for details. 1870 1871config PERF_USE_VMALLOC 1872 bool 1873 help 1874 See tools/perf/design.txt for details 1875 1876config PC104 1877 bool "PC/104 support" if EXPERT 1878 help 1879 Expose PC/104 form factor device drivers and options available for 1880 selection and configuration. Enable this option if your target 1881 machine has a PC/104 bus. 1882 1883menu "Kernel Performance Events And Counters" 1884 1885config PERF_EVENTS 1886 bool "Kernel performance events and counters" 1887 default y if PROFILING 1888 depends on HAVE_PERF_EVENTS 1889 select IRQ_WORK 1890 select SRCU 1891 help 1892 Enable kernel support for various performance events provided 1893 by software and hardware. 1894 1895 Software events are supported either built-in or via the 1896 use of generic tracepoints. 1897 1898 Most modern CPUs support performance events via performance 1899 counter registers. These registers count the number of certain 1900 types of hw events: such as instructions executed, cachemisses 1901 suffered, or branches mis-predicted - without slowing down the 1902 kernel or applications. These registers can also trigger interrupts 1903 when a threshold number of events have passed - and can thus be 1904 used to profile the code that runs on that CPU. 1905 1906 The Linux Performance Event subsystem provides an abstraction of 1907 these software and hardware event capabilities, available via a 1908 system call and used by the "perf" utility in tools/perf/. It 1909 provides per task and per CPU counters, and it provides event 1910 capabilities on top of those. 1911 1912 Say Y if unsure. 1913 1914config DEBUG_PERF_USE_VMALLOC 1915 default n 1916 bool "Debug: use vmalloc to back perf mmap() buffers" 1917 depends on PERF_EVENTS && DEBUG_KERNEL && !PPC 1918 select PERF_USE_VMALLOC 1919 help 1920 Use vmalloc memory to back perf mmap() buffers. 1921 1922 Mostly useful for debugging the vmalloc code on platforms 1923 that don't require it. 1924 1925 Say N if unsure. 1926 1927endmenu 1928 1929config VM_EVENT_COUNTERS 1930 default y 1931 bool "Enable VM event counters for /proc/vmstat" if EXPERT 1932 help 1933 VM event counters are needed for event counts to be shown. 1934 This option allows the disabling of the VM event counters 1935 on EXPERT systems. /proc/vmstat will only show page counts 1936 if VM event counters are disabled. 1937 1938config SLUB_DEBUG 1939 default y 1940 bool "Enable SLUB debugging support" if EXPERT 1941 depends on SLUB && SYSFS 1942 help 1943 SLUB has extensive debug support features. Disabling these can 1944 result in significant savings in code size. This also disables 1945 SLUB sysfs support. /sys/slab will not exist and there will be 1946 no support for cache validation etc. 1947 1948config SLUB_MEMCG_SYSFS_ON 1949 default n 1950 bool "Enable memcg SLUB sysfs support by default" if EXPERT 1951 depends on SLUB && SYSFS && MEMCG 1952 help 1953 SLUB creates a directory under /sys/kernel/slab for each 1954 allocation cache to host info and debug files. If memory 1955 cgroup is enabled, each cache can have per memory cgroup 1956 caches. SLUB can create the same sysfs directories for these 1957 caches under /sys/kernel/slab/CACHE/cgroup but it can lead 1958 to a very high number of debug files being created. This is 1959 controlled by slub_memcg_sysfs boot parameter and this 1960 config option determines the parameter's default value. 1961 1962config COMPAT_BRK 1963 bool "Disable heap randomization" 1964 default y 1965 help 1966 Randomizing heap placement makes heap exploits harder, but it 1967 also breaks ancient binaries (including anything libc5 based). 1968 This option changes the bootup default to heap randomization 1969 disabled, and can be overridden at runtime by setting 1970 /proc/sys/kernel/randomize_va_space to 2. 1971 1972 On non-ancient distros (post-2000 ones) N is usually a safe choice. 1973 1974choice 1975 prompt "Choose SLAB allocator" 1976 default SLUB 1977 help 1978 This option allows to select a slab allocator. 1979 1980config SLAB 1981 bool "SLAB" 1982 select HAVE_HARDENED_USERCOPY_ALLOCATOR 1983 help 1984 The regular slab allocator that is established and known to work 1985 well in all environments. It organizes cache hot objects in 1986 per cpu and per node queues. 1987 1988config SLUB 1989 bool "SLUB (Unqueued Allocator)" 1990 select HAVE_HARDENED_USERCOPY_ALLOCATOR 1991 help 1992 SLUB is a slab allocator that minimizes cache line usage 1993 instead of managing queues of cached objects (SLAB approach). 1994 Per cpu caching is realized using slabs of objects instead 1995 of queues of objects. SLUB can use memory efficiently 1996 and has enhanced diagnostics. SLUB is the default choice for 1997 a slab allocator. 1998 1999config SLOB 2000 depends on EXPERT 2001 bool "SLOB (Simple Allocator)" 2002 help 2003 SLOB replaces the stock allocator with a drastically simpler 2004 allocator. SLOB is generally more space efficient but 2005 does not perform as well on large systems. 2006 2007endchoice 2008 2009config SLAB_MERGE_DEFAULT 2010 bool "Allow slab caches to be merged" 2011 default y 2012 help 2013 For reduced kernel memory fragmentation, slab caches can be 2014 merged when they share the same size and other characteristics. 2015 This carries a risk of kernel heap overflows being able to 2016 overwrite objects from merged caches (and more easily control 2017 cache layout), which makes such heap attacks easier to exploit 2018 by attackers. By keeping caches unmerged, these kinds of exploits 2019 can usually only damage objects in the same cache. To disable 2020 merging at runtime, "slab_nomerge" can be passed on the kernel 2021 command line. 2022 2023config SLAB_FREELIST_RANDOM 2024 bool "Randomize slab freelist" 2025 depends on SLAB || SLUB 2026 help 2027 Randomizes the freelist order used on creating new pages. This 2028 security feature reduces the predictability of the kernel slab 2029 allocator against heap overflows. 2030 2031config SLAB_FREELIST_HARDENED 2032 bool "Harden slab freelist metadata" 2033 depends on SLAB || SLUB 2034 help 2035 Many kernel heap attacks try to target slab cache metadata and 2036 other infrastructure. This options makes minor performance 2037 sacrifices to harden the kernel slab allocator against common 2038 freelist exploit methods. Some slab implementations have more 2039 sanity-checking than others. This option is most effective with 2040 CONFIG_SLUB. 2041 2042config SHUFFLE_PAGE_ALLOCATOR 2043 bool "Page allocator randomization" 2044 default SLAB_FREELIST_RANDOM && ACPI_NUMA 2045 help 2046 Randomization of the page allocator improves the average 2047 utilization of a direct-mapped memory-side-cache. See section 2048 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI 2049 6.2a specification for an example of how a platform advertises 2050 the presence of a memory-side-cache. There are also incidental 2051 security benefits as it reduces the predictability of page 2052 allocations to compliment SLAB_FREELIST_RANDOM, but the 2053 default granularity of shuffling on the "MAX_ORDER - 1" i.e, 2054 10th order of pages is selected based on cache utilization 2055 benefits on x86. 2056 2057 While the randomization improves cache utilization it may 2058 negatively impact workloads on platforms without a cache. For 2059 this reason, by default, the randomization is enabled only 2060 after runtime detection of a direct-mapped memory-side-cache. 2061 Otherwise, the randomization may be force enabled with the 2062 'page_alloc.shuffle' kernel command line parameter. 2063 2064 Say Y if unsure. 2065 2066config SLUB_CPU_PARTIAL 2067 default y 2068 depends on SLUB && SMP 2069 bool "SLUB per cpu partial cache" 2070 help 2071 Per cpu partial caches accelerate objects allocation and freeing 2072 that is local to a processor at the price of more indeterminism 2073 in the latency of the free. On overflow these caches will be cleared 2074 which requires the taking of locks that may cause latency spikes. 2075 Typically one would choose no for a realtime system. 2076 2077config MMAP_ALLOW_UNINITIALIZED 2078 bool "Allow mmapped anonymous memory to be uninitialized" 2079 depends on EXPERT && !MMU 2080 default n 2081 help 2082 Normally, and according to the Linux spec, anonymous memory obtained 2083 from mmap() has its contents cleared before it is passed to 2084 userspace. Enabling this config option allows you to request that 2085 mmap() skip that if it is given an MAP_UNINITIALIZED flag, thus 2086 providing a huge performance boost. If this option is not enabled, 2087 then the flag will be ignored. 2088 2089 This is taken advantage of by uClibc's malloc(), and also by 2090 ELF-FDPIC binfmt's brk and stack allocator. 2091 2092 Because of the obvious security issues, this option should only be 2093 enabled on embedded devices where you control what is run in 2094 userspace. Since that isn't generally a problem on no-MMU systems, 2095 it is normally safe to say Y here. 2096 2097 See Documentation/admin-guide/mm/nommu-mmap.rst for more information. 2098 2099config SYSTEM_DATA_VERIFICATION 2100 def_bool n 2101 select SYSTEM_TRUSTED_KEYRING 2102 select KEYS 2103 select CRYPTO 2104 select CRYPTO_RSA 2105 select ASYMMETRIC_KEY_TYPE 2106 select ASYMMETRIC_PUBLIC_KEY_SUBTYPE 2107 select ASN1 2108 select OID_REGISTRY 2109 select X509_CERTIFICATE_PARSER 2110 select PKCS7_MESSAGE_PARSER 2111 help 2112 Provide PKCS#7 message verification using the contents of the system 2113 trusted keyring to provide public keys. This then can be used for 2114 module verification, kexec image verification and firmware blob 2115 verification. 2116 2117config PROFILING 2118 bool "Profiling support" 2119 help 2120 Say Y here to enable the extended profiling support mechanisms used 2121 by profilers such as OProfile. 2122 2123# 2124# Place an empty function call at each tracepoint site. Can be 2125# dynamically changed for a probe function. 2126# 2127config TRACEPOINTS 2128 bool 2129 2130endmenu # General setup 2131 2132source "arch/Kconfig" 2133 2134config RT_MUTEXES 2135 bool 2136 2137config BASE_SMALL 2138 int 2139 default 0 if BASE_FULL 2140 default 1 if !BASE_FULL 2141 2142config MODULE_SIG_FORMAT 2143 def_bool n 2144 select SYSTEM_DATA_VERIFICATION 2145 2146menuconfig MODULES 2147 bool "Enable loadable module support" 2148 option modules 2149 help 2150 Kernel modules are small pieces of compiled code which can 2151 be inserted in the running kernel, rather than being 2152 permanently built into the kernel. You use the "modprobe" 2153 tool to add (and sometimes remove) them. If you say Y here, 2154 many parts of the kernel can be built as modules (by 2155 answering M instead of Y where indicated): this is most 2156 useful for infrequently used options which are not required 2157 for booting. For more information, see the man pages for 2158 modprobe, lsmod, modinfo, insmod and rmmod. 2159 2160 If you say Y here, you will need to run "make 2161 modules_install" to put the modules under /lib/modules/ 2162 where modprobe can find them (you may need to be root to do 2163 this). 2164 2165 If unsure, say Y. 2166 2167if MODULES 2168 2169config MODULE_FORCE_LOAD 2170 bool "Forced module loading" 2171 default n 2172 help 2173 Allow loading of modules without version information (ie. modprobe 2174 --force). Forced module loading sets the 'F' (forced) taint flag and 2175 is usually a really bad idea. 2176 2177config MODULE_UNLOAD 2178 bool "Module unloading" 2179 help 2180 Without this option you will not be able to unload any 2181 modules (note that some modules may not be unloadable 2182 anyway), which makes your kernel smaller, faster 2183 and simpler. If unsure, say Y. 2184 2185config MODULE_FORCE_UNLOAD 2186 bool "Forced module unloading" 2187 depends on MODULE_UNLOAD 2188 help 2189 This option allows you to force a module to unload, even if the 2190 kernel believes it is unsafe: the kernel will remove the module 2191 without waiting for anyone to stop using it (using the -f option to 2192 rmmod). This is mainly for kernel developers and desperate users. 2193 If unsure, say N. 2194 2195config MODVERSIONS 2196 bool "Module versioning support" 2197 help 2198 Usually, you have to use modules compiled with your kernel. 2199 Saying Y here makes it sometimes possible to use modules 2200 compiled for different kernels, by adding enough information 2201 to the modules to (hopefully) spot any changes which would 2202 make them incompatible with the kernel you are running. If 2203 unsure, say N. 2204 2205config ASM_MODVERSIONS 2206 bool 2207 default HAVE_ASM_MODVERSIONS && MODVERSIONS 2208 help 2209 This enables module versioning for exported symbols also from 2210 assembly. This can be enabled only when the target architecture 2211 supports it. 2212 2213config MODULE_REL_CRCS 2214 bool 2215 depends on MODVERSIONS 2216 2217config MODULE_SRCVERSION_ALL 2218 bool "Source checksum for all modules" 2219 help 2220 Modules which contain a MODULE_VERSION get an extra "srcversion" 2221 field inserted into their modinfo section, which contains a 2222 sum of the source files which made it. This helps maintainers 2223 see exactly which source was used to build a module (since 2224 others sometimes change the module source without updating 2225 the version). With this option, such a "srcversion" field 2226 will be created for all modules. If unsure, say N. 2227 2228config MODULE_SIG 2229 bool "Module signature verification" 2230 select MODULE_SIG_FORMAT 2231 help 2232 Check modules for valid signatures upon load: the signature 2233 is simply appended to the module. For more information see 2234 <file:Documentation/admin-guide/module-signing.rst>. 2235 2236 Note that this option adds the OpenSSL development packages as a 2237 kernel build dependency so that the signing tool can use its crypto 2238 library. 2239 2240 You should enable this option if you wish to use either 2241 CONFIG_SECURITY_LOCKDOWN_LSM or lockdown functionality imposed via 2242 another LSM - otherwise unsigned modules will be loadable regardless 2243 of the lockdown policy. 2244 2245 !!!WARNING!!! If you enable this option, you MUST make sure that the 2246 module DOES NOT get stripped after being signed. This includes the 2247 debuginfo strip done by some packagers (such as rpmbuild) and 2248 inclusion into an initramfs that wants the module size reduced. 2249 2250config MODULE_SIG_FORCE 2251 bool "Require modules to be validly signed" 2252 depends on MODULE_SIG 2253 help 2254 Reject unsigned modules or signed modules for which we don't have a 2255 key. Without this, such modules will simply taint the kernel. 2256 2257config MODULE_SIG_ALL 2258 bool "Automatically sign all modules" 2259 default y 2260 depends on MODULE_SIG 2261 help 2262 Sign all modules during make modules_install. Without this option, 2263 modules must be signed manually, using the scripts/sign-file tool. 2264 2265comment "Do not forget to sign required modules with scripts/sign-file" 2266 depends on MODULE_SIG_FORCE && !MODULE_SIG_ALL 2267 2268choice 2269 prompt "Which hash algorithm should modules be signed with?" 2270 depends on MODULE_SIG 2271 help 2272 This determines which sort of hashing algorithm will be used during 2273 signature generation. This algorithm _must_ be built into the kernel 2274 directly so that signature verification can take place. It is not 2275 possible to load a signed module containing the algorithm to check 2276 the signature on that module. 2277 2278config MODULE_SIG_SHA1 2279 bool "Sign modules with SHA-1" 2280 select CRYPTO_SHA1 2281 2282config MODULE_SIG_SHA224 2283 bool "Sign modules with SHA-224" 2284 select CRYPTO_SHA256 2285 2286config MODULE_SIG_SHA256 2287 bool "Sign modules with SHA-256" 2288 select CRYPTO_SHA256 2289 2290config MODULE_SIG_SHA384 2291 bool "Sign modules with SHA-384" 2292 select CRYPTO_SHA512 2293 2294config MODULE_SIG_SHA512 2295 bool "Sign modules with SHA-512" 2296 select CRYPTO_SHA512 2297 2298endchoice 2299 2300config MODULE_SIG_HASH 2301 string 2302 depends on MODULE_SIG 2303 default "sha1" if MODULE_SIG_SHA1 2304 default "sha224" if MODULE_SIG_SHA224 2305 default "sha256" if MODULE_SIG_SHA256 2306 default "sha384" if MODULE_SIG_SHA384 2307 default "sha512" if MODULE_SIG_SHA512 2308 2309config MODULE_COMPRESS 2310 bool "Compress modules on installation" 2311 help 2312 2313 Compresses kernel modules when 'make modules_install' is run; gzip or 2314 xz depending on "Compression algorithm" below. 2315 2316 module-init-tools MAY support gzip, and kmod MAY support gzip and xz. 2317 2318 Out-of-tree kernel modules installed using Kbuild will also be 2319 compressed upon installation. 2320 2321 Note: for modules inside an initrd or initramfs, it's more efficient 2322 to compress the whole initrd or initramfs instead. 2323 2324 Note: This is fully compatible with signed modules. 2325 2326 If in doubt, say N. 2327 2328choice 2329 prompt "Compression algorithm" 2330 depends on MODULE_COMPRESS 2331 default MODULE_COMPRESS_GZIP 2332 help 2333 This determines which sort of compression will be used during 2334 'make modules_install'. 2335 2336 GZIP (default) and XZ are supported. 2337 2338config MODULE_COMPRESS_GZIP 2339 bool "GZIP" 2340 2341config MODULE_COMPRESS_XZ 2342 bool "XZ" 2343 2344endchoice 2345 2346config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS 2347 bool "Allow loading of modules with missing namespace imports" 2348 help 2349 Symbols exported with EXPORT_SYMBOL_NS*() are considered exported in 2350 a namespace. A module that makes use of a symbol exported with such a 2351 namespace is required to import the namespace via MODULE_IMPORT_NS(). 2352 There is no technical reason to enforce correct namespace imports, 2353 but it creates consistency between symbols defining namespaces and 2354 users importing namespaces they make use of. This option relaxes this 2355 requirement and lifts the enforcement when loading a module. 2356 2357 If unsure, say N. 2358 2359config UNUSED_SYMBOLS 2360 bool "Enable unused/obsolete exported symbols" 2361 default y if X86 2362 help 2363 Unused but exported symbols make the kernel needlessly bigger. For 2364 that reason most of these unused exports will soon be removed. This 2365 option is provided temporarily to provide a transition period in case 2366 some external kernel module needs one of these symbols anyway. If you 2367 encounter such a case in your module, consider if you are actually 2368 using the right API. (rationale: since nobody in the kernel is using 2369 this in a module, there is a pretty good chance it's actually the 2370 wrong interface to use). If you really need the symbol, please send a 2371 mail to the linux kernel mailing list mentioning the symbol and why 2372 you really need it, and what the merge plan to the mainline kernel for 2373 your module is. 2374 2375config TRIM_UNUSED_KSYMS 2376 bool "Trim unused exported kernel symbols" 2377 depends on !UNUSED_SYMBOLS 2378 help 2379 The kernel and some modules make many symbols available for 2380 other modules to use via EXPORT_SYMBOL() and variants. Depending 2381 on the set of modules being selected in your kernel configuration, 2382 many of those exported symbols might never be used. 2383 2384 This option allows for unused exported symbols to be dropped from 2385 the build. In turn, this provides the compiler more opportunities 2386 (especially when using LTO) for optimizing the code and reducing 2387 binary size. This might have some security advantages as well. 2388 2389 If unsure, or if you need to build out-of-tree modules, say N. 2390 2391config UNUSED_KSYMS_WHITELIST 2392 string "Whitelist of symbols to keep in ksymtab" 2393 depends on TRIM_UNUSED_KSYMS 2394 help 2395 By default, all unused exported symbols will be un-exported from the 2396 build when TRIM_UNUSED_KSYMS is selected. 2397 2398 UNUSED_KSYMS_WHITELIST allows to whitelist symbols that must be kept 2399 exported at all times, even in absence of in-tree users. The value to 2400 set here is the path to a text file containing the list of symbols, 2401 one per line. The path can be absolute, or relative to the kernel 2402 source tree. 2403 2404endif # MODULES 2405 2406config MODULES_TREE_LOOKUP 2407 def_bool y 2408 depends on PERF_EVENTS || TRACING || CFI_CLANG 2409 2410config INIT_ALL_POSSIBLE 2411 bool 2412 help 2413 Back when each arch used to define their own cpu_online_mask and 2414 cpu_possible_mask, some of them chose to initialize cpu_possible_mask 2415 with all 1s, and others with all 0s. When they were centralised, 2416 it was better to provide this option than to break all the archs 2417 and have several arch maintainers pursuing me down dark alleys. 2418 2419source "block/Kconfig" 2420 2421config PREEMPT_NOTIFIERS 2422 bool 2423 2424config PADATA 2425 depends on SMP 2426 bool 2427 2428config ASN1 2429 tristate 2430 help 2431 Build a simple ASN.1 grammar compiler that produces a bytecode output 2432 that can be interpreted by the ASN.1 stream decoder and used to 2433 inform it as to what tags are to be expected in a stream and what 2434 functions to call on what tags. 2435 2436source "kernel/Kconfig.locks" 2437 2438config ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE 2439 bool 2440 2441config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE 2442 bool 2443 2444# It may be useful for an architecture to override the definitions of the 2445# SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h> 2446# and the COMPAT_ variants in <linux/compat.h>, in particular to use a 2447# different calling convention for syscalls. They can also override the 2448# macros for not-implemented syscalls in kernel/sys_ni.c and 2449# kernel/time/posix-stubs.c. All these overrides need to be available in 2450# <asm/syscall_wrapper.h>. 2451config ARCH_HAS_SYSCALL_WRAPPER 2452 def_bool n 2453