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