forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/arch/Kconfig
....@@ -18,17 +18,25 @@
1818 select CRASH_CORE
1919 bool
2020
21
+config KEXEC_ELF
22
+ bool
23
+
2124 config HAVE_IMA_KEXEC
25
+ bool
26
+
27
+config SET_FS
2228 bool
2329
2430 config HOTPLUG_SMT
2531 bool
2632
33
+config GENERIC_ENTRY
34
+ bool
35
+
2736 config OPROFILE
2837 tristate "OProfile system profiling"
2938 depends on PROFILING
3039 depends on HAVE_OPROFILE
31
- depends on !PREEMPT_RT_FULL
3240 select RING_BUFFER
3341 select RING_BUFFER_ALLOW_SWAP
3442 help
....@@ -70,11 +78,11 @@
7078 If in doubt, say "N".
7179
7280 config JUMP_LABEL
73
- bool "Optimize very unlikely/likely branches"
74
- depends on HAVE_ARCH_JUMP_LABEL
75
- depends on CC_HAS_ASM_GOTO
76
- help
77
- This option enables a transparent branch optimization that
81
+ bool "Optimize very unlikely/likely branches"
82
+ depends on HAVE_ARCH_JUMP_LABEL
83
+ depends on CC_HAS_ASM_GOTO
84
+ help
85
+ This option enables a transparent branch optimization that
7886 makes certain almost-always-true or almost-always-false branch
7987 conditions even cheaper to execute within the kernel.
8088
....@@ -82,7 +90,7 @@
8290 scheduler functionality, networking code and KVM have such
8391 branches and include support for this optimization technique.
8492
85
- If it is detected that the compiler has support for "asm goto",
93
+ If it is detected that the compiler has support for "asm goto",
8694 the kernel will compile such branches with just a nop
8795 instruction. When the condition flag is toggled to true, the
8896 nop will be converted to a jump instruction to execute the
....@@ -101,10 +109,16 @@
101109 help
102110 Boot time self-test of the branch patching code.
103111
112
+config STATIC_CALL_SELFTEST
113
+ bool "Static call selftest"
114
+ depends on HAVE_STATIC_CALL
115
+ help
116
+ Boot time self-test of the call patching code.
117
+
104118 config OPTPROBES
105119 def_bool y
106120 depends on KPROBES && HAVE_OPTPROBES
107
- select TASKS_RCU if PREEMPT
121
+ select TASKS_RCU if PREEMPTION
108122
109123 config KPROBES_ON_FTRACE
110124 def_bool y
....@@ -161,12 +175,12 @@
161175 problems with received packets if doing so would not help
162176 much.
163177
164
- See Documentation/unaligned-memory-access.txt for more
178
+ See Documentation/core-api/unaligned-memory-access.rst for more
165179 information on the topic of unaligned memory accesses.
166180
167181 config ARCH_USE_BUILTIN_BSWAP
168
- bool
169
- help
182
+ bool
183
+ help
170184 Modern versions of GCC (since 4.4) have builtin functions
171185 for handling byte-swapping. Using these, instead of the old
172186 inline assembler that the architecture code provides in the
....@@ -235,10 +249,10 @@
235249 bool
236250
237251 config GENERIC_SMP_IDLE_THREAD
238
- bool
252
+ bool
239253
240254 config GENERIC_IDLE_POLL_SETUP
241
- bool
255
+ bool
242256
243257 config ARCH_HAS_FORTIFY_SOURCE
244258 bool
....@@ -246,13 +260,39 @@
246260 An architecture should select this when it can successfully
247261 build and run with CONFIG_FORTIFY_SOURCE.
248262
263
+#
264
+# Select if the arch provides a historic keepinit alias for the retain_initrd
265
+# command line option
266
+#
267
+config ARCH_HAS_KEEPINITRD
268
+ bool
269
+
249270 # Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h
250271 config ARCH_HAS_SET_MEMORY
251272 bool
252273
274
+# Select if arch has all set_direct_map_invalid/default() functions
275
+config ARCH_HAS_SET_DIRECT_MAP
276
+ bool
277
+
278
+#
279
+# Select if the architecture provides the arch_dma_set_uncached symbol to
280
+# either provide an uncached segement alias for a DMA allocation, or
281
+# to remap the page tables in place.
282
+#
283
+config ARCH_HAS_DMA_SET_UNCACHED
284
+ bool
285
+
286
+#
287
+# Select if the architectures provides the arch_dma_clear_uncached symbol
288
+# to undo an in-place page table remap for uncached access.
289
+#
290
+config ARCH_HAS_DMA_CLEAR_UNCACHED
291
+ bool
292
+
253293 # Select if arch init_task must go in the __init_task_data section
254294 config ARCH_TASK_STRUCT_ON_STACK
255
- bool
295
+ bool
256296
257297 # Select if arch has its private alloc_task_struct() function
258298 config ARCH_TASK_STRUCT_ALLOCATOR
....@@ -277,6 +317,23 @@
277317 config ARCH_WANTS_DYNAMIC_TASK_STRUCT
278318 bool
279319
320
+config ARCH_32BIT_OFF_T
321
+ bool
322
+ depends on !64BIT
323
+ help
324
+ All new 32-bit architectures should have 64-bit off_t type on
325
+ userspace side which corresponds to the loff_t kernel type. This
326
+ is the requirement for modern ABIs. Some existing architectures
327
+ still support 32-bit off_t. This option is enabled for all such
328
+ architectures explicitly.
329
+
330
+config HAVE_ASM_MODVERSIONS
331
+ bool
332
+ help
333
+ This symbol should be selected by an architecure if it provides
334
+ <asm/asm-prototypes.h> to support the module versioning for symbols
335
+ exported from assembly code.
336
+
280337 config HAVE_REGS_AND_STACK_ACCESS_API
281338 bool
282339 help
....@@ -292,11 +349,12 @@
292349 This symbol should be selected by an architecture if it
293350 supports an implementation of restartable sequences.
294351
295
-config HAVE_CLK
352
+config HAVE_FUNCTION_ARG_ACCESS_API
296353 bool
297354 help
298
- The <linux/clk.h> calls support software clock gating and
299
- thus are a key power management tool on many systems.
355
+ This symbol should be selected by an architecure if it supports
356
+ the API needed to access function arguments from pt_regs,
357
+ declared in asm/ptrace.h
300358
301359 config HAVE_HW_BREAKPOINT
302360 bool
....@@ -361,11 +419,25 @@
361419 config HAVE_ARCH_JUMP_LABEL
362420 bool
363421
364
-config HAVE_RCU_TABLE_FREE
422
+config HAVE_ARCH_JUMP_LABEL_RELATIVE
365423 bool
366424
367
-config HAVE_RCU_TABLE_INVALIDATE
425
+config MMU_GATHER_TABLE_FREE
368426 bool
427
+
428
+config MMU_GATHER_RCU_TABLE_FREE
429
+ bool
430
+ select MMU_GATHER_TABLE_FREE
431
+
432
+config MMU_GATHER_PAGE_SIZE
433
+ bool
434
+
435
+config MMU_GATHER_NO_RANGE
436
+ bool
437
+
438
+config MMU_GATHER_NO_GATHER
439
+ bool
440
+ depends on MMU_GATHER_TABLE_FREE
369441
370442 config ARCH_WANT_IRQS_OFF_ACTIVATE_MM
371443 bool
....@@ -404,10 +476,23 @@
404476 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
405477 bool
406478
407
-config HAVE_ARCH_SECCOMP_FILTER
479
+config HAVE_ARCH_SECCOMP
408480 bool
409481 help
482
+ An arch should select this symbol to support seccomp mode 1 (the fixed
483
+ syscall policy), and must provide an overrides for __NR_seccomp_sigreturn,
484
+ and compat syscalls if the asm-generic/seccomp.h defaults need adjustment:
485
+ - __NR_seccomp_read_32
486
+ - __NR_seccomp_write_32
487
+ - __NR_seccomp_exit_32
488
+ - __NR_seccomp_sigreturn_32
489
+
490
+config HAVE_ARCH_SECCOMP_FILTER
491
+ bool
492
+ select HAVE_ARCH_SECCOMP
493
+ help
410494 An arch should select this symbol if it provides all of these things:
495
+ - all the requirements for HAVE_ARCH_SECCOMP
411496 - syscall_get_arch()
412497 - syscall_get_arguments()
413498 - syscall_rollback()
....@@ -417,6 +502,23 @@
417502 - secure_computing return value is checked and a return value of -1
418503 results in the system call being skipped immediately.
419504 - seccomp syscall wired up
505
+
506
+config SECCOMP
507
+ prompt "Enable seccomp to safely execute untrusted bytecode"
508
+ def_bool y
509
+ depends on HAVE_ARCH_SECCOMP
510
+ help
511
+ This kernel feature is useful for number crunching applications
512
+ that may need to handle untrusted bytecode during their
513
+ execution. By using pipes or other transports made available
514
+ to the process as file descriptors supporting the read/write
515
+ syscalls, it's possible to isolate those applications in their
516
+ own address space using seccomp. Once seccomp is enabled via
517
+ prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be
518
+ disabled and the task is only allowed to execute a few safe
519
+ syscalls defined by each seccomp mode.
520
+
521
+ If unsure, say Y.
420522
421523 config SECCOMP_FILTER
422524 def_bool y
....@@ -428,14 +530,18 @@
428530
429531 See Documentation/userspace-api/seccomp_filter.rst for details.
430532
533
+config HAVE_ARCH_STACKLEAK
534
+ bool
535
+ help
536
+ An architecture should select this if it has the code which
537
+ fills the used part of the kernel stack with the STACKLEAK_POISON
538
+ value before returning from system calls.
539
+
431540 config HAVE_STACKPROTECTOR
432541 bool
433542 help
434543 An arch should select this symbol if:
435544 - it has implemented a stack canary (e.g. __stack_chk_guard)
436
-
437
-config CC_HAS_STACKPROTECTOR_NONE
438
- def_bool $(cc-option,-fno-stack-protector)
439545
440546 config STACKPROTECTOR
441547 bool "Stack Protector buffer overflow detection"
....@@ -483,117 +589,143 @@
483589 about 20% of all kernel functions, which increases the kernel code
484590 size by about 2%.
485591
592
+config ARCH_SUPPORTS_SHADOW_CALL_STACK
593
+ bool
594
+ help
595
+ An architecture should select this if it supports Clang's Shadow
596
+ Call Stack and implements runtime support for shadow stack
597
+ switching.
598
+
599
+config SHADOW_CALL_STACK
600
+ bool "Clang Shadow Call Stack"
601
+ depends on CC_IS_CLANG && ARCH_SUPPORTS_SHADOW_CALL_STACK
602
+ depends on DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER
603
+ help
604
+ This option enables Clang's Shadow Call Stack, which uses a
605
+ shadow stack to protect function return addresses from being
606
+ overwritten by an attacker. More information can be found in
607
+ Clang's documentation:
608
+
609
+ https://clang.llvm.org/docs/ShadowCallStack.html
610
+
611
+ Note that security guarantees in the kernel differ from the
612
+ ones documented for user space. The kernel must store addresses
613
+ of shadow stacks in memory, which means an attacker capable of
614
+ reading and writing arbitrary memory may be able to locate them
615
+ and hijack control flow by modifying the stacks.
616
+
486617 config LTO
487
- def_bool n
618
+ bool
619
+ help
620
+ Selected if the kernel will be built using the compiler's LTO feature.
621
+
622
+config LTO_CLANG
623
+ bool
624
+ select LTO
625
+ help
626
+ Selected if the kernel will be built using Clang's LTO feature.
488627
489628 config ARCH_SUPPORTS_LTO_CLANG
490629 bool
491630 help
492631 An architecture should select this option if it supports:
493
- - compiling with clang,
494
- - compiling inline assembly with clang's integrated assembler,
632
+ - compiling with Clang,
633
+ - compiling inline assembly with Clang's integrated assembler,
495634 - and linking with LLD.
496635
497
-config ARCH_SUPPORTS_THINLTO
636
+config ARCH_SUPPORTS_LTO_CLANG_THIN
498637 bool
499638 help
500
- An architecture should select this if it supports clang's ThinLTO.
639
+ An architecture should select this option if it can support Clang's
640
+ ThinLTO mode.
501641
502
-config THINLTO
503
- bool "Use clang ThinLTO (EXPERIMENTAL)"
504
- depends on LTO_CLANG && ARCH_SUPPORTS_THINLTO
505
- default y
642
+config HAS_LTO_CLANG
643
+ def_bool y
644
+ # Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510
645
+ depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD
646
+ depends on $(success,test $(LLVM) -eq 1)
647
+ depends on $(success,test $(LLVM_IAS) -eq 1)
648
+ depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
649
+ depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
650
+ depends on ARCH_SUPPORTS_LTO_CLANG
651
+ depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
652
+ depends on !KASAN || KASAN_HW_TAGS
653
+ depends on !GCOV_KERNEL
506654 help
507
- Use ThinLTO to speed up Link Time Optimization.
655
+ The compiler and Kconfig options support building with Clang's
656
+ LTO.
508657
509658 choice
510
- prompt "Link-Time Optimization (LTO) (EXPERIMENTAL)"
659
+ prompt "Link Time Optimization (LTO)"
511660 default LTO_NONE
512661 help
513
- This option turns on Link-Time Optimization (LTO).
662
+ This option enables Link Time Optimization (LTO), which allows the
663
+ compiler to optimize binaries globally.
664
+
665
+ If unsure, select LTO_NONE. Note that LTO is very resource-intensive
666
+ so it's disabled by default.
514667
515668 config LTO_NONE
516669 bool "None"
517
-
518
-config LTO_CLANG
519
- bool "Use clang Link Time Optimization (LTO) (EXPERIMENTAL)"
520
- depends on ARCH_SUPPORTS_LTO_CLANG
521
- depends on !FTRACE_MCOUNT_RECORD || HAVE_C_RECORDMCOUNT
522
- depends on !KASAN
523
- depends on CC_IS_CLANG && LD_IS_LLD
524
- select LTO
525670 help
526
- This option enables clang's Link Time Optimization (LTO), which allows
527
- the compiler to optimize the kernel globally at link time. If you
528
- enable this option, the compiler generates LLVM IR instead of object
529
- files, and the actual compilation from IR occurs at the LTO link step,
530
- which may take several minutes.
671
+ Build the kernel normally, without Link Time Optimization (LTO).
531672
532
- If you select this option, you must compile the kernel with clang and
533
- LLD.
673
+config LTO_CLANG_FULL
674
+ bool "Clang Full LTO (EXPERIMENTAL)"
675
+ depends on HAS_LTO_CLANG
676
+ depends on !COMPILE_TEST
677
+ select LTO_CLANG
678
+ help
679
+ This option enables Clang's full Link Time Optimization (LTO), which
680
+ allows the compiler to optimize the kernel globally. If you enable
681
+ this option, the compiler generates LLVM bitcode instead of ELF
682
+ object files, and the actual compilation from bitcode happens at
683
+ the LTO link step, which may take several minutes depending on the
684
+ kernel configuration. More information can be found from LLVM's
685
+ documentation:
534686
687
+ https://llvm.org/docs/LinkTimeOptimization.html
688
+
689
+ During link time, this option can use a large amount of RAM, and
690
+ may take much longer than the ThinLTO option.
691
+
692
+config LTO_CLANG_THIN
693
+ bool "Clang ThinLTO (EXPERIMENTAL)"
694
+ depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN
695
+ select LTO_CLANG
696
+ help
697
+ This option enables Clang's ThinLTO, which allows for parallel
698
+ optimization and faster incremental compiles compared to the
699
+ CONFIG_LTO_CLANG_FULL option. More information can be found
700
+ from Clang's documentation:
701
+
702
+ https://clang.llvm.org/docs/ThinLTO.html
703
+
704
+ If unsure, say Y.
535705 endchoice
536706
537
-config CFI
538
- bool
539
-
540
-config CFI_PERMISSIVE
541
- bool "Use CFI in permissive mode"
542
- depends on CFI
543
- help
544
- When selected, Control Flow Integrity (CFI) violations result in a
545
- warning instead of a kernel panic. This option is useful for finding
546
- CFI violations in drivers during development.
547
-
548707 config CFI_CLANG
549
- bool "Use clang Control Flow Integrity (CFI) (EXPERIMENTAL)"
550
- depends on LTO_CLANG
551
- depends on KALLSYMS
552
- select CFI
708
+ bool "Use Clang's Control Flow Integrity (CFI)"
709
+ depends on LTO_CLANG && KALLSYMS
553710 help
554
- This option enables clang Control Flow Integrity (CFI), which adds
711
+ This option enables Clang's Control Flow Integrity (CFI), which adds
555712 runtime checking for indirect function calls.
556713
557714 config CFI_CLANG_SHADOW
558715 bool "Use CFI shadow to speed up cross-module checks"
559716 default y
560
- depends on CFI_CLANG
717
+ depends on CFI_CLANG && MODULES
561718 help
562719 If you select this option, the kernel builds a fast look-up table of
563720 CFI check functions in loaded modules to reduce overhead.
564721
565
-config ARCH_SUPPORTS_SHADOW_CALL_STACK
566
- bool
722
+config CFI_PERMISSIVE
723
+ bool "Use CFI in permissive mode"
724
+ depends on CFI_CLANG
567725 help
568
- An architecture should select this if it supports Clang's Shadow
569
- Call Stack, has asm/scs.h, and implements runtime support for shadow
570
- stack switching.
571
-
572
-config SHADOW_CALL_STACK
573
- bool "Clang Shadow Call Stack"
574
- depends on ARCH_SUPPORTS_SHADOW_CALL_STACK
575
- help
576
- This option enables Clang's Shadow Call Stack, which uses a
577
- shadow stack to protect function return addresses from being
578
- overwritten by an attacker. More information can be found from
579
- Clang's documentation:
580
-
581
- https://clang.llvm.org/docs/ShadowCallStack.html
582
-
583
- Note that security guarantees in the kernel differ from the ones
584
- documented for user space. The kernel must store addresses of shadow
585
- stacks used by other tasks and interrupt handlers in memory, which
586
- means an attacker capable reading and writing arbitrary memory may
587
- be able to locate them and hijack control flow by modifying shadow
588
- stacks that are not currently in use.
589
-
590
-config SHADOW_CALL_STACK_VMAP
591
- bool "Use virtually mapped shadow call stacks"
592
- depends on SHADOW_CALL_STACK
593
- help
594
- Use virtually mapped shadow call stacks. Selecting this option
595
- provides better stack exhaustion protection, but increases per-thread
596
- memory consumption as a full page is allocated for each shadow stack.
726
+ When selected, Control Flow Integrity (CFI) violations result in a
727
+ warning instead of a kernel panic. This option is useful for finding
728
+ CFI violations during development.
597729
598730 config HAVE_ARCH_WITHIN_STACK_FRAMES
599731 bool
....@@ -609,11 +741,17 @@
609741 help
610742 Provide kernel/user boundaries probes necessary for subsystems
611743 that need it, such as userspace RCU extended quiescent state.
612
- Syscalls need to be wrapped inside user_exit()-user_enter() through
613
- the slow path using TIF_NOHZ flag. Exceptions handlers must be
614
- wrapped as well. Irqs are already protected inside
615
- rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
616
- irq exit still need to be protected.
744
+ Syscalls need to be wrapped inside user_exit()-user_enter(), either
745
+ optimized behind static key or through the slow path using TIF_NOHZ
746
+ flag. Exceptions handlers must be wrapped as well. Irqs are already
747
+ protected inside rcu_irq_enter/rcu_irq_exit() but preemption or signal
748
+ handling on irq exit still need to be protected.
749
+
750
+config HAVE_TIF_NOHZ
751
+ bool
752
+ help
753
+ Arch relies on TIF_NOHZ and syscall slow path to implement context
754
+ tracking calls to user_enter()/user_exit().
617755
618756 config HAVE_VIRT_CPU_ACCOUNTING
619757 bool
....@@ -639,6 +777,18 @@
639777 Archs need to ensure they use a high enough resolution clock to
640778 support irq time accounting and then call enable_sched_clock_irqtime().
641779
780
+config HAVE_MOVE_PUD
781
+ bool
782
+ help
783
+ Architectures that select this are able to move page tables at the
784
+ PUD level. If there are only 3 page table levels, the move effectively
785
+ happens at the PGD level.
786
+
787
+config HAVE_MOVE_PMD
788
+ bool
789
+ help
790
+ Archs that select this are able to move page tables at the PMD level.
791
+
642792 config HAVE_ARCH_TRANSPARENT_HUGEPAGE
643793 bool
644794
....@@ -646,6 +796,9 @@
646796 bool
647797
648798 config HAVE_ARCH_HUGE_VMAP
799
+ bool
800
+
801
+config ARCH_WANT_HUGE_PMD_SHARE
649802 bool
650803
651804 config HAVE_ARCH_SOFT_DIRTY
....@@ -772,12 +925,16 @@
772925 and vice-versa 32-bit applications to call 64-bit mmap().
773926 Required for applications doing different bitness syscalls.
774927
775
-config HAVE_COPY_THREAD_TLS
928
+# This allows to use a set of generic functions to determine mmap base
929
+# address by giving priority to top-down scheme only if the process
930
+# is not in legacy mode (compat task, unlimited stack size or
931
+# sysctl_legacy_va_layout).
932
+# Architecture that selects this option can provide its own version of:
933
+# - STACK_RND_MASK
934
+config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
776935 bool
777
- help
778
- Architecture provides copy_thread_tls to accept tls argument via
779
- normal C parameter passing, rather than extracting the syscall
780
- argument from pt_regs.
936
+ depends on MMU
937
+ select ARCH_HAS_ELF_RANDOMIZE
781938
782939 config HAVE_STACK_VALIDATION
783940 bool
....@@ -788,8 +945,9 @@
788945 config HAVE_RELIABLE_STACKTRACE
789946 bool
790947 help
791
- Architecture has a save_stack_trace_tsk_reliable() function which
792
- only returns a stack trace if it can guarantee the trace is reliable.
948
+ Architecture has either save_stack_trace_tsk_reliable() or
949
+ arch_stack_walk_reliable() function which only returns a stack trace
950
+ if it can guarantee the trace is reliable.
793951
794952 config HAVE_ARCH_HASH
795953 bool
....@@ -798,6 +956,9 @@
798956 If this is set, the architecture provides an <asm/hash.h>
799957 file which provides platform-specific implementations of some
800958 functions in <linux/hash.h> or fs/namei.c.
959
+
960
+config HAVE_ARCH_NVRAM_OPS
961
+ bool
801962
802963 config ISA_BUS_API
803964 def_bool ISA
....@@ -848,25 +1009,18 @@
8481009 config COMPAT_OLD_SIGACTION
8491010 bool
8501011
851
-config 64BIT_TIME
852
- def_bool ARCH_HAS_64BIT_TIME
853
- help
854
- This should be selected by all architectures that need to support
855
- new system calls with a 64-bit time_t. This is relevant on all 32-bit
856
- architectures, and 64-bit architectures as part of compat syscall
857
- handling.
858
-
8591012 config COMPAT_32BIT_TIME
860
- def_bool (!64BIT && 64BIT_TIME) || COMPAT
1013
+ bool "Provide system calls for 32-bit time_t"
1014
+ default !64BIT || COMPAT
8611015 help
8621016 This enables 32 bit time_t support in addition to 64 bit time_t support.
8631017 This is relevant on all 32-bit architectures, and 64-bit architectures
8641018 as part of compat syscall handling.
8651019
866
-config ARCH_NO_COHERENT_DMA_MMAP
1020
+config ARCH_NO_PREEMPT
8671021 bool
8681022
869
-config ARCH_NO_PREEMPT
1023
+config ARCH_SUPPORTS_RT
8701024 bool
8711025
8721026 config CPU_NO_EFFICIENT_FFS
....@@ -895,16 +1049,17 @@
8951049 config VMAP_STACK
8961050 default y
8971051 bool "Use a virtually-mapped stack"
898
- depends on HAVE_ARCH_VMAP_STACK && !KASAN
899
- ---help---
1052
+ depends on HAVE_ARCH_VMAP_STACK
1053
+ depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC
1054
+ help
9001055 Enable this if you want the use virtually-mapped kernel stacks
9011056 with guard pages. This causes kernel stack overflows to be
9021057 caught immediately rather than causing difficult-to-diagnose
9031058 corruption.
9041059
905
- This is presently incompatible with KASAN because KASAN expects
906
- the stack to map directly to the KASAN shadow map using a formula
907
- that is incorrect if the stack is in vmalloc space.
1060
+ To use this with software KASAN modes, the architecture must support
1061
+ backing virtual mappings with real shadow memory, and KASAN_VMALLOC
1062
+ must be enabled.
9081063
9091064 config ARCH_OPTIONAL_KERNEL_RWX
9101065 def_bool n
....@@ -944,27 +1099,6 @@
9441099 config ARCH_HAS_PHYS_TO_DMA
9451100 bool
9461101
947
-config ARCH_HAS_REFCOUNT
948
- bool
949
- help
950
- An architecture selects this when it has implemented refcount_t
951
- using open coded assembly primitives that provide an optimized
952
- refcount_t implementation, possibly at the expense of some full
953
- refcount state checks of CONFIG_REFCOUNT_FULL=y.
954
-
955
- The refcount overflow check behavior, however, must be retained.
956
- Catching overflows is the primary security concern for protecting
957
- against bugs in reference counts.
958
-
959
-config REFCOUNT_FULL
960
- bool "Perform full reference count validation at the expense of speed"
961
- help
962
- Enabling this switches the refcounting infrastructure from a fast
963
- unchecked atomic_t implementation to a fully state checked
964
- implementation, which can be (slightly) slower but provides protections
965
- against various use-after-free conditions that can be used in
966
- security flaw exploits.
967
-
9681102 config HAVE_ARCH_COMPILER_H
9691103 bool
9701104 help
....@@ -986,6 +1120,15 @@
9861120 config ARCH_USE_MEMREMAP_PROT
9871121 bool
9881122
1123
+config LOCK_EVENT_COUNTS
1124
+ bool "Locking event counts collection"
1125
+ depends on DEBUG_FS
1126
+ help
1127
+ Enable light-weight counting of various locking related events
1128
+ in the system with minimal performance impact. This reduces
1129
+ the chance of application behavior change because of timing
1130
+ differences. The counts are reported via debugfs.
1131
+
9891132 # Select if the architecture has support for applying RELR relocations.
9901133 config ARCH_HAS_RELR
9911134 bool
....@@ -1000,6 +1143,45 @@
10001143 well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy
10011144 are compatible).
10021145
1146
+config ARCH_HAS_MEM_ENCRYPT
1147
+ bool
1148
+
1149
+config ARCH_HAS_CC_PLATFORM
1150
+ bool
1151
+
1152
+config HAVE_SPARSE_SYSCALL_NR
1153
+ bool
1154
+ help
1155
+ An architecture should select this if its syscall numbering is sparse
1156
+ to save space. For example, MIPS architecture has a syscall array with
1157
+ entries at 4000, 5000 and 6000 locations. This option turns on syscall
1158
+ related optimizations for a given architecture.
1159
+
1160
+config ARCH_HAS_VDSO_DATA
1161
+ bool
1162
+
1163
+config HAVE_STATIC_CALL
1164
+ bool
1165
+
1166
+config HAVE_STATIC_CALL_INLINE
1167
+ bool
1168
+ depends on HAVE_STATIC_CALL
1169
+
1170
+config ARCH_WANT_LD_ORPHAN_WARN
1171
+ bool
1172
+ help
1173
+ An arch should select this symbol once all linker sections are explicitly
1174
+ included, size-asserted, or discarded in the linker scripts. This is
1175
+ important because we never want expected sections to be placed heuristically
1176
+ by the linker, since the locations of such sections can change between linker
1177
+ versions.
1178
+
1179
+config ARCH_SPLIT_ARG64
1180
+ bool
1181
+ help
1182
+ If a 32-bit architecture requires 64-bit arguments to be split into
1183
+ pairs of 32-bit arguments, select this option.
1184
+
10031185 source "kernel/gcov/Kconfig"
10041186
10051187 source "scripts/gcc-plugins/Kconfig"