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