1# SPDX-License-Identifier: GPL-2.0 2# 3# General architecture dependent options 4# 5 6# 7# Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can 8# override the default values in this file. 9# 10source "arch/$(SRCARCH)/Kconfig" 11 12menu "General architecture-dependent options" 13 14config CRASH_CORE 15 bool 16 17config KEXEC_CORE 18 select CRASH_CORE 19 bool 20 21config KEXEC_ELF 22 bool 23 24config HAVE_IMA_KEXEC 25 bool 26 27config HOTPLUG_SMT 28 bool 29 30config OPROFILE 31 tristate "OProfile system profiling" 32 depends on PROFILING 33 depends on HAVE_OPROFILE 34 select RING_BUFFER 35 select RING_BUFFER_ALLOW_SWAP 36 help 37 OProfile is a profiling system capable of profiling the 38 whole system, include the kernel, kernel modules, libraries, 39 and applications. 40 41 If unsure, say N. 42 43config OPROFILE_EVENT_MULTIPLEX 44 bool "OProfile multiplexing support (EXPERIMENTAL)" 45 default n 46 depends on OPROFILE && X86 47 help 48 The number of hardware counters is limited. The multiplexing 49 feature enables OProfile to gather more events than counters 50 are provided by the hardware. This is realized by switching 51 between events at a user specified time interval. 52 53 If unsure, say N. 54 55config HAVE_OPROFILE 56 bool 57 58config OPROFILE_NMI_TIMER 59 def_bool y 60 depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64 61 62config KPROBES 63 bool "Kprobes" 64 depends on MODULES 65 depends on HAVE_KPROBES 66 select KALLSYMS 67 help 68 Kprobes allows you to trap at almost any kernel address and 69 execute a callback function. register_kprobe() establishes 70 a probepoint and specifies the callback. Kprobes is useful 71 for kernel debugging, non-intrusive instrumentation and testing. 72 If in doubt, say "N". 73 74config JUMP_LABEL 75 bool "Optimize very unlikely/likely branches" 76 depends on HAVE_ARCH_JUMP_LABEL 77 depends on CC_HAS_ASM_GOTO 78 help 79 This option enables a transparent branch optimization that 80 makes certain almost-always-true or almost-always-false branch 81 conditions even cheaper to execute within the kernel. 82 83 Certain performance-sensitive kernel code, such as trace points, 84 scheduler functionality, networking code and KVM have such 85 branches and include support for this optimization technique. 86 87 If it is detected that the compiler has support for "asm goto", 88 the kernel will compile such branches with just a nop 89 instruction. When the condition flag is toggled to true, the 90 nop will be converted to a jump instruction to execute the 91 conditional block of instructions. 92 93 This technique lowers overhead and stress on the branch prediction 94 of the processor and generally makes the kernel faster. The update 95 of the condition is slower, but those are always very rare. 96 97 ( On 32-bit x86, the necessary options added to the compiler 98 flags may increase the size of the kernel slightly. ) 99 100config STATIC_KEYS_SELFTEST 101 bool "Static key selftest" 102 depends on JUMP_LABEL 103 help 104 Boot time self-test of the branch patching code. 105 106config OPTPROBES 107 def_bool y 108 depends on KPROBES && HAVE_OPTPROBES 109 select TASKS_RCU if PREEMPTION 110 111config KPROBES_ON_FTRACE 112 def_bool y 113 depends on KPROBES && HAVE_KPROBES_ON_FTRACE 114 depends on DYNAMIC_FTRACE_WITH_REGS 115 help 116 If function tracer is enabled and the arch supports full 117 passing of pt_regs to function tracing, then kprobes can 118 optimize on top of function tracing. 119 120config UPROBES 121 def_bool n 122 depends on ARCH_SUPPORTS_UPROBES 123 help 124 Uprobes is the user-space counterpart to kprobes: they 125 enable instrumentation applications (such as 'perf probe') 126 to establish unintrusive probes in user-space binaries and 127 libraries, by executing handler functions when the probes 128 are hit by user-space applications. 129 130 ( These probes come in the form of single-byte breakpoints, 131 managed by the kernel and kept transparent to the probed 132 application. ) 133 134config HAVE_EFFICIENT_UNALIGNED_ACCESS 135 bool 136 help 137 Some architectures are unable to perform unaligned accesses 138 without the use of get_unaligned/put_unaligned. Others are 139 unable to perform such accesses efficiently (e.g. trap on 140 unaligned access and require fixing it up in the exception 141 handler.) 142 143 This symbol should be selected by an architecture if it can 144 perform unaligned accesses efficiently to allow different 145 code paths to be selected for these cases. Some network 146 drivers, for example, could opt to not fix up alignment 147 problems with received packets if doing so would not help 148 much. 149 150 See Documentation/unaligned-memory-access.txt for more 151 information on the topic of unaligned memory accesses. 152 153config ARCH_USE_BUILTIN_BSWAP 154 bool 155 help 156 Modern versions of GCC (since 4.4) have builtin functions 157 for handling byte-swapping. Using these, instead of the old 158 inline assembler that the architecture code provides in the 159 __arch_bswapXX() macros, allows the compiler to see what's 160 happening and offers more opportunity for optimisation. In 161 particular, the compiler will be able to combine the byteswap 162 with a nearby load or store and use load-and-swap or 163 store-and-swap instructions if the architecture has them. It 164 should almost *never* result in code which is worse than the 165 hand-coded assembler in <asm/swab.h>. But just in case it 166 does, the use of the builtins is optional. 167 168 Any architecture with load-and-swap or store-and-swap 169 instructions should set this. And it shouldn't hurt to set it 170 on architectures that don't have such instructions. 171 172config KRETPROBES 173 def_bool y 174 depends on KPROBES && HAVE_KRETPROBES 175 176config USER_RETURN_NOTIFIER 177 bool 178 depends on HAVE_USER_RETURN_NOTIFIER 179 help 180 Provide a kernel-internal notification when a cpu is about to 181 switch to user mode. 182 183config HAVE_IOREMAP_PROT 184 bool 185 186config HAVE_KPROBES 187 bool 188 189config HAVE_KRETPROBES 190 bool 191 192config HAVE_OPTPROBES 193 bool 194 195config HAVE_KPROBES_ON_FTRACE 196 bool 197 198config HAVE_FUNCTION_ERROR_INJECTION 199 bool 200 201config HAVE_NMI 202 bool 203 204# 205# An arch should select this if it provides all these things: 206# 207# task_pt_regs() in asm/processor.h or asm/ptrace.h 208# arch_has_single_step() if there is hardware single-step support 209# arch_has_block_step() if there is hardware block-step support 210# asm/syscall.h supplying asm-generic/syscall.h interface 211# linux/regset.h user_regset interfaces 212# CORE_DUMP_USE_REGSET #define'd in linux/elf.h 213# TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit} 214# TIF_NOTIFY_RESUME calls tracehook_notify_resume() 215# signal delivery calls tracehook_signal_handler() 216# 217config HAVE_ARCH_TRACEHOOK 218 bool 219 220config HAVE_DMA_CONTIGUOUS 221 bool 222 223config GENERIC_SMP_IDLE_THREAD 224 bool 225 226config GENERIC_IDLE_POLL_SETUP 227 bool 228 229config ARCH_HAS_FORTIFY_SOURCE 230 bool 231 help 232 An architecture should select this when it can successfully 233 build and run with CONFIG_FORTIFY_SOURCE. 234 235# 236# Select if the arch provides a historic keepinit alias for the retain_initrd 237# command line option 238# 239config ARCH_HAS_KEEPINITRD 240 bool 241 242# Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h 243config ARCH_HAS_SET_MEMORY 244 bool 245 246# Select if arch has all set_direct_map_invalid/default() functions 247config ARCH_HAS_SET_DIRECT_MAP 248 bool 249 250# 251# Select if arch has an uncached kernel segment and provides the 252# uncached_kernel_address / cached_kernel_address symbols to use it 253# 254config ARCH_HAS_UNCACHED_SEGMENT 255 select ARCH_HAS_DMA_PREP_COHERENT 256 bool 257 258# Select if arch init_task must go in the __init_task_data section 259config ARCH_TASK_STRUCT_ON_STACK 260 bool 261 262# Select if arch has its private alloc_task_struct() function 263config ARCH_TASK_STRUCT_ALLOCATOR 264 bool 265 266config HAVE_ARCH_THREAD_STRUCT_WHITELIST 267 bool 268 depends on !ARCH_TASK_STRUCT_ALLOCATOR 269 help 270 An architecture should select this to provide hardened usercopy 271 knowledge about what region of the thread_struct should be 272 whitelisted for copying to userspace. Normally this is only the 273 FPU registers. Specifically, arch_thread_struct_whitelist() 274 should be implemented. Without this, the entire thread_struct 275 field in task_struct will be left whitelisted. 276 277# Select if arch has its private alloc_thread_stack() function 278config ARCH_THREAD_STACK_ALLOCATOR 279 bool 280 281# Select if arch wants to size task_struct dynamically via arch_task_struct_size: 282config ARCH_WANTS_DYNAMIC_TASK_STRUCT 283 bool 284 285config ARCH_32BIT_OFF_T 286 bool 287 depends on !64BIT 288 help 289 All new 32-bit architectures should have 64-bit off_t type on 290 userspace side which corresponds to the loff_t kernel type. This 291 is the requirement for modern ABIs. Some existing architectures 292 still support 32-bit off_t. This option is enabled for all such 293 architectures explicitly. 294 295config HAVE_REGS_AND_STACK_ACCESS_API 296 bool 297 help 298 This symbol should be selected by an architecure if it supports 299 the API needed to access registers and stack entries from pt_regs, 300 declared in asm/ptrace.h 301 For example the kprobes-based event tracer needs this API. 302 303config HAVE_RSEQ 304 bool 305 depends on HAVE_REGS_AND_STACK_ACCESS_API 306 help 307 This symbol should be selected by an architecture if it 308 supports an implementation of restartable sequences. 309 310config HAVE_FUNCTION_ARG_ACCESS_API 311 bool 312 help 313 This symbol should be selected by an architecure if it supports 314 the API needed to access function arguments from pt_regs, 315 declared in asm/ptrace.h 316 317config HAVE_CLK 318 bool 319 help 320 The <linux/clk.h> calls support software clock gating and 321 thus are a key power management tool on many systems. 322 323config HAVE_HW_BREAKPOINT 324 bool 325 depends on PERF_EVENTS 326 327config HAVE_MIXED_BREAKPOINTS_REGS 328 bool 329 depends on HAVE_HW_BREAKPOINT 330 help 331 Depending on the arch implementation of hardware breakpoints, 332 some of them have separate registers for data and instruction 333 breakpoints addresses, others have mixed registers to store 334 them but define the access type in a control register. 335 Select this option if your arch implements breakpoints under the 336 latter fashion. 337 338config HAVE_USER_RETURN_NOTIFIER 339 bool 340 341config HAVE_PERF_EVENTS_NMI 342 bool 343 help 344 System hardware can generate an NMI using the perf event 345 subsystem. Also has support for calculating CPU cycle events 346 to determine how many clock cycles in a given period. 347 348config HAVE_HARDLOCKUP_DETECTOR_PERF 349 bool 350 depends on HAVE_PERF_EVENTS_NMI 351 help 352 The arch chooses to use the generic perf-NMI-based hardlockup 353 detector. Must define HAVE_PERF_EVENTS_NMI. 354 355config HAVE_NMI_WATCHDOG 356 depends on HAVE_NMI 357 bool 358 help 359 The arch provides a low level NMI watchdog. It provides 360 asm/nmi.h, and defines its own arch_touch_nmi_watchdog(). 361 362config HAVE_HARDLOCKUP_DETECTOR_ARCH 363 bool 364 select HAVE_NMI_WATCHDOG 365 help 366 The arch chooses to provide its own hardlockup detector, which is 367 a superset of the HAVE_NMI_WATCHDOG. It also conforms to config 368 interfaces and parameters provided by hardlockup detector subsystem. 369 370config HAVE_PERF_REGS 371 bool 372 help 373 Support selective register dumps for perf events. This includes 374 bit-mapping of each registers and a unique architecture id. 375 376config HAVE_PERF_USER_STACK_DUMP 377 bool 378 help 379 Support user stack dumps for perf event samples. This needs 380 access to the user stack pointer which is not unified across 381 architectures. 382 383config HAVE_ARCH_JUMP_LABEL 384 bool 385 386config HAVE_ARCH_JUMP_LABEL_RELATIVE 387 bool 388 389config HAVE_RCU_TABLE_FREE 390 bool 391 392config HAVE_RCU_TABLE_NO_INVALIDATE 393 bool 394 395config HAVE_MMU_GATHER_PAGE_SIZE 396 bool 397 398config HAVE_MMU_GATHER_NO_GATHER 399 bool 400 401config ARCH_HAVE_NMI_SAFE_CMPXCHG 402 bool 403 404config HAVE_ALIGNED_STRUCT_PAGE 405 bool 406 help 407 This makes sure that struct pages are double word aligned and that 408 e.g. the SLUB allocator can perform double word atomic operations 409 on a struct page for better performance. However selecting this 410 might increase the size of a struct page by a word. 411 412config HAVE_CMPXCHG_LOCAL 413 bool 414 415config HAVE_CMPXCHG_DOUBLE 416 bool 417 418config ARCH_WEAK_RELEASE_ACQUIRE 419 bool 420 421config ARCH_WANT_IPC_PARSE_VERSION 422 bool 423 424config ARCH_WANT_COMPAT_IPC_PARSE_VERSION 425 bool 426 427config ARCH_WANT_OLD_COMPAT_IPC 428 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 429 bool 430 431config HAVE_ARCH_SECCOMP_FILTER 432 bool 433 help 434 An arch should select this symbol if it provides all of these things: 435 - syscall_get_arch() 436 - syscall_get_arguments() 437 - syscall_rollback() 438 - syscall_set_return_value() 439 - SIGSYS siginfo_t support 440 - secure_computing is called from a ptrace_event()-safe context 441 - secure_computing return value is checked and a return value of -1 442 results in the system call being skipped immediately. 443 - seccomp syscall wired up 444 445config SECCOMP_FILTER 446 def_bool y 447 depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET 448 help 449 Enable tasks to build secure computing environments defined 450 in terms of Berkeley Packet Filter programs which implement 451 task-defined system call filtering polices. 452 453 See Documentation/userspace-api/seccomp_filter.rst for details. 454 455config HAVE_ARCH_STACKLEAK 456 bool 457 help 458 An architecture should select this if it has the code which 459 fills the used part of the kernel stack with the STACKLEAK_POISON 460 value before returning from system calls. 461 462config HAVE_STACKPROTECTOR 463 bool 464 help 465 An arch should select this symbol if: 466 - it has implemented a stack canary (e.g. __stack_chk_guard) 467 468config CC_HAS_STACKPROTECTOR_NONE 469 def_bool $(cc-option,-fno-stack-protector) 470 471config STACKPROTECTOR 472 bool "Stack Protector buffer overflow detection" 473 depends on HAVE_STACKPROTECTOR 474 depends on $(cc-option,-fstack-protector) 475 default y 476 help 477 This option turns on the "stack-protector" GCC feature. This 478 feature puts, at the beginning of functions, a canary value on 479 the stack just before the return address, and validates 480 the value just before actually returning. Stack based buffer 481 overflows (that need to overwrite this return address) now also 482 overwrite the canary, which gets detected and the attack is then 483 neutralized via a kernel panic. 484 485 Functions will have the stack-protector canary logic added if they 486 have an 8-byte or larger character array on the stack. 487 488 This feature requires gcc version 4.2 or above, or a distribution 489 gcc with the feature backported ("-fstack-protector"). 490 491 On an x86 "defconfig" build, this feature adds canary checks to 492 about 3% of all kernel functions, which increases kernel code size 493 by about 0.3%. 494 495config STACKPROTECTOR_STRONG 496 bool "Strong Stack Protector" 497 depends on STACKPROTECTOR 498 depends on $(cc-option,-fstack-protector-strong) 499 default y 500 help 501 Functions will have the stack-protector canary logic added in any 502 of the following conditions: 503 504 - local variable's address used as part of the right hand side of an 505 assignment or function argument 506 - local variable is an array (or union containing an array), 507 regardless of array type or length 508 - uses register local variables 509 510 This feature requires gcc version 4.9 or above, or a distribution 511 gcc with the feature backported ("-fstack-protector-strong"). 512 513 On an x86 "defconfig" build, this feature adds canary checks to 514 about 20% of all kernel functions, which increases the kernel code 515 size by about 2%. 516 517config HAVE_ARCH_WITHIN_STACK_FRAMES 518 bool 519 help 520 An architecture should select this if it can walk the kernel stack 521 frames to determine if an object is part of either the arguments 522 or local variables (i.e. that it excludes saved return addresses, 523 and similar) by implementing an inline arch_within_stack_frames(), 524 which is used by CONFIG_HARDENED_USERCOPY. 525 526config HAVE_CONTEXT_TRACKING 527 bool 528 help 529 Provide kernel/user boundaries probes necessary for subsystems 530 that need it, such as userspace RCU extended quiescent state. 531 Syscalls need to be wrapped inside user_exit()-user_enter() through 532 the slow path using TIF_NOHZ flag. Exceptions handlers must be 533 wrapped as well. Irqs are already protected inside 534 rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on 535 irq exit still need to be protected. 536 537config HAVE_VIRT_CPU_ACCOUNTING 538 bool 539 540config ARCH_HAS_SCALED_CPUTIME 541 bool 542 543config HAVE_VIRT_CPU_ACCOUNTING_GEN 544 bool 545 default y if 64BIT 546 help 547 With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. 548 Before enabling this option, arch code must be audited 549 to ensure there are no races in concurrent read/write of 550 cputime_t. For example, reading/writing 64-bit cputime_t on 551 some 32-bit arches may require multiple accesses, so proper 552 locking is needed to protect against concurrent accesses. 553 554 555config HAVE_IRQ_TIME_ACCOUNTING 556 bool 557 help 558 Archs need to ensure they use a high enough resolution clock to 559 support irq time accounting and then call enable_sched_clock_irqtime(). 560 561config HAVE_MOVE_PMD 562 bool 563 help 564 Archs that select this are able to move page tables at the PMD level. 565 566config HAVE_ARCH_TRANSPARENT_HUGEPAGE 567 bool 568 569config HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 570 bool 571 572config HAVE_ARCH_HUGE_VMAP 573 bool 574 575config ARCH_WANT_HUGE_PMD_SHARE 576 bool 577 578config HAVE_ARCH_SOFT_DIRTY 579 bool 580 581config HAVE_MOD_ARCH_SPECIFIC 582 bool 583 help 584 The arch uses struct mod_arch_specific to store data. Many arches 585 just need a simple module loader without arch specific data - those 586 should not enable this. 587 588config MODULES_USE_ELF_RELA 589 bool 590 help 591 Modules only use ELF RELA relocations. Modules with ELF REL 592 relocations will give an error. 593 594config MODULES_USE_ELF_REL 595 bool 596 help 597 Modules only use ELF REL relocations. Modules with ELF RELA 598 relocations will give an error. 599 600config HAVE_IRQ_EXIT_ON_IRQ_STACK 601 bool 602 help 603 Architecture doesn't only execute the irq handler on the irq stack 604 but also irq_exit(). This way we can process softirqs on this irq 605 stack instead of switching to a new one when we call __do_softirq() 606 in the end of an hardirq. 607 This spares a stack switch and improves cache usage on softirq 608 processing. 609 610config PGTABLE_LEVELS 611 int 612 default 2 613 614config ARCH_HAS_ELF_RANDOMIZE 615 bool 616 help 617 An architecture supports choosing randomized locations for 618 stack, mmap, brk, and ET_DYN. Defined functions: 619 - arch_mmap_rnd() 620 - arch_randomize_brk() 621 622config HAVE_ARCH_MMAP_RND_BITS 623 bool 624 help 625 An arch should select this symbol if it supports setting a variable 626 number of bits for use in establishing the base address for mmap 627 allocations, has MMU enabled and provides values for both: 628 - ARCH_MMAP_RND_BITS_MIN 629 - ARCH_MMAP_RND_BITS_MAX 630 631config HAVE_EXIT_THREAD 632 bool 633 help 634 An architecture implements exit_thread. 635 636config ARCH_MMAP_RND_BITS_MIN 637 int 638 639config ARCH_MMAP_RND_BITS_MAX 640 int 641 642config ARCH_MMAP_RND_BITS_DEFAULT 643 int 644 645config ARCH_MMAP_RND_BITS 646 int "Number of bits to use for ASLR of mmap base address" if EXPERT 647 range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX 648 default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT 649 default ARCH_MMAP_RND_BITS_MIN 650 depends on HAVE_ARCH_MMAP_RND_BITS 651 help 652 This value can be used to select the number of bits to use to 653 determine the random offset to the base address of vma regions 654 resulting from mmap allocations. This value will be bounded 655 by the architecture's minimum and maximum supported values. 656 657 This value can be changed after boot using the 658 /proc/sys/vm/mmap_rnd_bits tunable 659 660config HAVE_ARCH_MMAP_RND_COMPAT_BITS 661 bool 662 help 663 An arch should select this symbol if it supports running applications 664 in compatibility mode, supports setting a variable number of bits for 665 use in establishing the base address for mmap allocations, has MMU 666 enabled and provides values for both: 667 - ARCH_MMAP_RND_COMPAT_BITS_MIN 668 - ARCH_MMAP_RND_COMPAT_BITS_MAX 669 670config ARCH_MMAP_RND_COMPAT_BITS_MIN 671 int 672 673config ARCH_MMAP_RND_COMPAT_BITS_MAX 674 int 675 676config ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 677 int 678 679config ARCH_MMAP_RND_COMPAT_BITS 680 int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT 681 range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX 682 default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT 683 default ARCH_MMAP_RND_COMPAT_BITS_MIN 684 depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS 685 help 686 This value can be used to select the number of bits to use to 687 determine the random offset to the base address of vma regions 688 resulting from mmap allocations for compatible applications This 689 value will be bounded by the architecture's minimum and maximum 690 supported values. 691 692 This value can be changed after boot using the 693 /proc/sys/vm/mmap_rnd_compat_bits tunable 694 695config HAVE_ARCH_COMPAT_MMAP_BASES 696 bool 697 help 698 This allows 64bit applications to invoke 32-bit mmap() syscall 699 and vice-versa 32-bit applications to call 64-bit mmap(). 700 Required for applications doing different bitness syscalls. 701 702config HAVE_COPY_THREAD_TLS 703 bool 704 help 705 Architecture provides copy_thread_tls to accept tls argument via 706 normal C parameter passing, rather than extracting the syscall 707 argument from pt_regs. 708 709config HAVE_STACK_VALIDATION 710 bool 711 help 712 Architecture supports the 'objtool check' host tool command, which 713 performs compile-time stack metadata validation. 714 715config HAVE_RELIABLE_STACKTRACE 716 bool 717 help 718 Architecture has a save_stack_trace_tsk_reliable() function which 719 only returns a stack trace if it can guarantee the trace is reliable. 720 721config HAVE_ARCH_HASH 722 bool 723 default n 724 help 725 If this is set, the architecture provides an <asm/hash.h> 726 file which provides platform-specific implementations of some 727 functions in <linux/hash.h> or fs/namei.c. 728 729config HAVE_ARCH_NVRAM_OPS 730 bool 731 732config ISA_BUS_API 733 def_bool ISA 734 735# 736# ABI hall of shame 737# 738config CLONE_BACKWARDS 739 bool 740 help 741 Architecture has tls passed as the 4th argument of clone(2), 742 not the 5th one. 743 744config CLONE_BACKWARDS2 745 bool 746 help 747 Architecture has the first two arguments of clone(2) swapped. 748 749config CLONE_BACKWARDS3 750 bool 751 help 752 Architecture has tls passed as the 3rd argument of clone(2), 753 not the 5th one. 754 755config ODD_RT_SIGACTION 756 bool 757 help 758 Architecture has unusual rt_sigaction(2) arguments 759 760config OLD_SIGSUSPEND 761 bool 762 help 763 Architecture has old sigsuspend(2) syscall, of one-argument variety 764 765config OLD_SIGSUSPEND3 766 bool 767 help 768 Even weirder antique ABI - three-argument sigsuspend(2) 769 770config OLD_SIGACTION 771 bool 772 help 773 Architecture has old sigaction(2) syscall. Nope, not the same 774 as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2), 775 but fairly different variant of sigaction(2), thanks to OSF/1 776 compatibility... 777 778config COMPAT_OLD_SIGACTION 779 bool 780 781config 64BIT_TIME 782 def_bool y 783 help 784 This should be selected by all architectures that need to support 785 new system calls with a 64-bit time_t. This is relevant on all 32-bit 786 architectures, and 64-bit architectures as part of compat syscall 787 handling. 788 789config COMPAT_32BIT_TIME 790 def_bool !64BIT || COMPAT 791 help 792 This enables 32 bit time_t support in addition to 64 bit time_t support. 793 This is relevant on all 32-bit architectures, and 64-bit architectures 794 as part of compat syscall handling. 795 796config ARCH_NO_COHERENT_DMA_MMAP 797 bool 798 799config ARCH_NO_PREEMPT 800 bool 801 802config ARCH_SUPPORTS_RT 803 bool 804 805config CPU_NO_EFFICIENT_FFS 806 def_bool n 807 808config HAVE_ARCH_VMAP_STACK 809 def_bool n 810 help 811 An arch should select this symbol if it can support kernel stacks 812 in vmalloc space. This means: 813 814 - vmalloc space must be large enough to hold many kernel stacks. 815 This may rule out many 32-bit architectures. 816 817 - Stacks in vmalloc space need to work reliably. For example, if 818 vmap page tables are created on demand, either this mechanism 819 needs to work while the stack points to a virtual address with 820 unpopulated page tables or arch code (switch_to() and switch_mm(), 821 most likely) needs to ensure that the stack's page table entries 822 are populated before running on a possibly unpopulated stack. 823 824 - If the stack overflows into a guard page, something reasonable 825 should happen. The definition of "reasonable" is flexible, but 826 instantly rebooting without logging anything would be unfriendly. 827 828config VMAP_STACK 829 default y 830 bool "Use a virtually-mapped stack" 831 depends on HAVE_ARCH_VMAP_STACK && !KASAN 832 ---help--- 833 Enable this if you want the use virtually-mapped kernel stacks 834 with guard pages. This causes kernel stack overflows to be 835 caught immediately rather than causing difficult-to-diagnose 836 corruption. 837 838 This is presently incompatible with KASAN because KASAN expects 839 the stack to map directly to the KASAN shadow map using a formula 840 that is incorrect if the stack is in vmalloc space. 841 842config ARCH_OPTIONAL_KERNEL_RWX 843 def_bool n 844 845config ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 846 def_bool n 847 848config ARCH_HAS_STRICT_KERNEL_RWX 849 def_bool n 850 851config STRICT_KERNEL_RWX 852 bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX 853 depends on ARCH_HAS_STRICT_KERNEL_RWX 854 default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 855 help 856 If this is set, kernel text and rodata memory will be made read-only, 857 and non-text memory will be made non-executable. This provides 858 protection against certain security exploits (e.g. executing the heap 859 or modifying text) 860 861 These features are considered standard security practice these days. 862 You should say Y here in almost all cases. 863 864config ARCH_HAS_STRICT_MODULE_RWX 865 def_bool n 866 867config STRICT_MODULE_RWX 868 bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX 869 depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES 870 default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 871 help 872 If this is set, module text and rodata memory will be made read-only, 873 and non-text memory will be made non-executable. This provides 874 protection against certain security exploits (e.g. writing to text) 875 876# select if the architecture provides an asm/dma-direct.h header 877config ARCH_HAS_PHYS_TO_DMA 878 bool 879 880config ARCH_HAS_REFCOUNT 881 bool 882 help 883 An architecture selects this when it has implemented refcount_t 884 using open coded assembly primitives that provide an optimized 885 refcount_t implementation, possibly at the expense of some full 886 refcount state checks of CONFIG_REFCOUNT_FULL=y. 887 888 The refcount overflow check behavior, however, must be retained. 889 Catching overflows is the primary security concern for protecting 890 against bugs in reference counts. 891 892config REFCOUNT_FULL 893 bool "Perform full reference count validation at the expense of speed" 894 help 895 Enabling this switches the refcounting infrastructure from a fast 896 unchecked atomic_t implementation to a fully state checked 897 implementation, which can be (slightly) slower but provides protections 898 against various use-after-free conditions that can be used in 899 security flaw exploits. 900 901config HAVE_ARCH_COMPILER_H 902 bool 903 help 904 An architecture can select this if it provides an 905 asm/compiler.h header that should be included after 906 linux/compiler-*.h in order to override macro definitions that those 907 headers generally provide. 908 909config HAVE_ARCH_PREL32_RELOCATIONS 910 bool 911 help 912 May be selected by an architecture if it supports place-relative 913 32-bit relocations, both in the toolchain and in the module loader, 914 in which case relative references can be used in special sections 915 for PCI fixup, initcalls etc which are only half the size on 64 bit 916 architectures, and don't require runtime relocation on relocatable 917 kernels. 918 919config ARCH_USE_MEMREMAP_PROT 920 bool 921 922config LOCK_EVENT_COUNTS 923 bool "Locking event counts collection" 924 depends on DEBUG_FS 925 ---help--- 926 Enable light-weight counting of various locking related events 927 in the system with minimal performance impact. This reduces 928 the chance of application behavior change because of timing 929 differences. The counts are reported via debugfs. 930 931# Select if the architecture has support for applying RELR relocations. 932config ARCH_HAS_RELR 933 bool 934 935config RELR 936 bool "Use RELR relocation packing" 937 depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR 938 default y 939 help 940 Store the kernel's dynamic relocations in the RELR relocation packing 941 format. Requires a compatible linker (LLD supports this feature), as 942 well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy 943 are compatible). 944 945source "kernel/gcov/Kconfig" 946 947source "scripts/gcc-plugins/Kconfig" 948 949endmenu 950