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