bcm47xx: 6.6: refresh patches
[openwrt/openwrt.git] / config / Config-kernel.in
index a770a9d797371dd128fab7cfb4aa7430aebb6bd3..2d90abcfe84a0d12f6790c542b003399fa32a0d2 100644 (file)
@@ -47,8 +47,23 @@ config KERNEL_MIPS_FP_SUPPORT
 
 config KERNEL_ARM_PMU
        bool
 
 config KERNEL_ARM_PMU
        bool
+       default y if TARGET_armsr_armv8
        depends on (arm || aarch64)
 
        depends on (arm || aarch64)
 
+config KERNEL_ARM_PMUV3
+       bool
+       default y if TARGET_armsr_armv8
+       depends on (arm_v7 || aarch64) && LINUX_6_6
+
+config KERNEL_RISCV_PMU
+       bool
+       select KERNEL_RISCV_PMU_SBI
+       depends on riscv64
+
+config KERNEL_RISCV_PMU_SBI
+       bool
+       depends on riscv64
+
 config KERNEL_X86_VSYSCALL_EMULATION
        bool "Enable vsyscall emulation"
        depends on x86_64
 config KERNEL_X86_VSYSCALL_EMULATION
        bool "Enable vsyscall emulation"
        depends on x86_64
@@ -69,6 +84,8 @@ config KERNEL_X86_VSYSCALL_EMULATION
 config KERNEL_PERF_EVENTS
        bool "Compile the kernel with performance events and counters"
        select KERNEL_ARM_PMU if (arm || aarch64)
 config KERNEL_PERF_EVENTS
        bool "Compile the kernel with performance events and counters"
        select KERNEL_ARM_PMU if (arm || aarch64)
+       select KERNEL_ARM_PMUV3 if (arm_v7 || aarch64) && LINUX_6_6
+       select KERNEL_RISCV_PMU if riscv64
 
 config KERNEL_PROFILING
        bool "Compile the kernel with profiling enabled"
 
 config KERNEL_PROFILING
        bool "Compile the kernel with profiling enabled"
@@ -143,7 +160,7 @@ config KERNEL_UBSAN_TRAP
 config KERNEL_KASAN
        bool "Compile the kernel with KASan: runtime memory debugger"
        select KERNEL_SLUB_DEBUG
 config KERNEL_KASAN
        bool "Compile the kernel with KASan: runtime memory debugger"
        select KERNEL_SLUB_DEBUG
-       depends on (x86_64 || aarch64)
+       depends on (x86_64 || aarch64 || arm || powerpc || riscv64)
        help
          Enables kernel address sanitizer - runtime memory debugger,
          designed to find out-of-bounds accesses and use-after-free bugs.
        help
          Enables kernel address sanitizer - runtime memory debugger,
          designed to find out-of-bounds accesses and use-after-free bugs.
@@ -184,16 +201,73 @@ config KERNEL_KASAN_VMALLOC
          will have no effect.
 
 if KERNEL_KASAN
          will have no effect.
 
 if KERNEL_KASAN
-       config KERNEL_KASAN_GENERIC
-       def_bool y
+choice
+       prompt "KASAN mode"
+       depends on KERNEL_KASAN
+       default KERNEL_KASAN_GENERIC
+       help
+         KASAN has three modes:
+
+         1. Generic KASAN (supported by many architectures, enabled with
+            CONFIG_KASAN_GENERIC, similar to userspace ASan),
+         2. Software Tag-Based KASAN (arm64 only, based on software memory
+            tagging, enabled with CONFIG_KASAN_SW_TAGS, similar to userspace
+            HWASan), and
+         3. Hardware Tag-Based KASAN (arm64 only, based on hardware memory
+            tagging, enabled with CONFIG_KASAN_HW_TAGS).
+
+config KERNEL_KASAN_GENERIC
+       bool "Generic KASAN"
+       select KERNEL_SLUB_DEBUG
+       help
+         Enables Generic KASAN.
+
+         Consumes about 1/8th of available memory at kernel start and adds an
+         overhead of ~50% for dynamic allocations.
+         The performance slowdown is ~x3.
+
+config KERNEL_KASAN_SW_TAGS
+       bool "Software Tag-Based KASAN"
+       depends on aarch64
+       select KERNEL_SLUB_DEBUG
+       help
+         Enables Software Tag-Based KASAN.
+
+         Supported only on arm64 CPUs and relies on Top Byte Ignore.
+
+         Consumes about 1/16th of available memory at kernel start and
+         add an overhead of ~20% for dynamic allocations.
+
+         May potentially introduce problems related to pointer casting and
+         comparison, as it embeds a tag into the top byte of each pointer.
+
+config KERNEL_KASAN_HW_TAGS
+       bool "Hardware Tag-Based KASAN"
+       depends on aarch64
+       select KERNEL_SLUB_DEBUG
+       select KERNEL_ARM64_MTE
+       help
+         Enables Hardware Tag-Based KASAN.
+
+         Supported only on arm64 CPUs starting from ARMv8.5 and relies on
+         Memory Tagging Extension and Top Byte Ignore.
+
+         Consumes about 1/32nd of available memory.
+
+         May potentially introduce problems related to pointer casting and
+         comparison, as it embeds a tag into the top byte of each pointer.
+
+endchoice
+
+       config KERNEL_ARM64_MTE
+               def_bool n
 
 
-       config KERNEL_KASAN_SW_TAGS
-       def_bool n
 endif
 
 choice
        prompt "Instrumentation type"
        depends on KERNEL_KASAN
 endif
 
 choice
        prompt "Instrumentation type"
        depends on KERNEL_KASAN
+       depends on !KERNEL_KASAN_HW_TAGS
        default KERNEL_KASAN_OUTLINE
 
 config KERNEL_KASAN_OUTLINE
        default KERNEL_KASAN_OUTLINE
 
 config KERNEL_KASAN_OUTLINE
@@ -361,7 +435,6 @@ config KERNEL_DEBUG_INFO
          This will compile your kernel and modules with debug information.
 
 config KERNEL_DEBUG_INFO_BTF
          This will compile your kernel and modules with debug information.
 
 config KERNEL_DEBUG_INFO_BTF
-
        bool "Enable additional BTF type information"
        depends on !HOST_OS_MACOS
        depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED
        bool "Enable additional BTF type information"
        depends on !HOST_OS_MACOS
        depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED
@@ -373,9 +446,13 @@ config KERNEL_DEBUG_INFO_BTF
 
          Required to run BPF CO-RE applications.
 
 
          Required to run BPF CO-RE applications.
 
+config KERNEL_DEBUG_INFO_BTF_MODULES
+       def_bool y
+       depends on KERNEL_DEBUG_INFO_BTF
+
 config KERNEL_MODULE_ALLOW_BTF_MISMATCH
        bool "Allow loading modules with non-matching BTF type info"
 config KERNEL_MODULE_ALLOW_BTF_MISMATCH
        bool "Allow loading modules with non-matching BTF type info"
-       depends on KERNEL_DEBUG_INFO_BTF
+       depends on KERNEL_DEBUG_INFO_BTF_MODULES
        help
          For modules whose split BTF does not match vmlinux, load without
          BTF rather than refusing to load. The default behavior with
        help
          For modules whose split BTF does not match vmlinux, load without
          BTF rather than refusing to load. The default behavior with
@@ -624,10 +701,23 @@ config KERNEL_PRINTK_TIME
        default y
 
 config KERNEL_SLUB_DEBUG
        default y
 
 config KERNEL_SLUB_DEBUG
-       bool
+       bool "Enable SLUB debugging support"
+       help
+         This enables various debugging features:
+           - Accepts "slub_debug" kernel parameter
+           - Provides caches debugging options (e.g. tracing, validating)
+           - Adds /sys/kernel/slab/ attrs for reading amounts of *objects*
+           - Enables /proc/slabinfo support
+           - Prints info when running out of memory
+
+         Enabling this can result in a significant increase of code size.
 
 config KERNEL_SLUB_DEBUG_ON
 
 config KERNEL_SLUB_DEBUG_ON
-       bool
+       depends on KERNEL_SLUB_DEBUG
+       bool "Boot kernel with basic caches debugging enabled"
+       help
+         This enables by default sanity_checks, red_zone, poison and store_user
+         debugging options for all caches.
 
 config KERNEL_SLABINFO
        select KERNEL_SLUB_DEBUG
 
 config KERNEL_SLABINFO
        select KERNEL_SLUB_DEBUG
@@ -1107,20 +1197,11 @@ config KERNEL_NET_L3_MASTER_DEV
          This module provides glue between core networking code and device
          drivers to support L3 master devices like VRF.
 
          This module provides glue between core networking code and device
          drivers to support L3 master devices like VRF.
 
-config KERNEL_WIRELESS_EXT
-       def_bool n
-
-config KERNEL_WEXT_CORE
-       def_bool KERNEL_WIRELESS_EXT
-
-config KERNEL_WEXT_PRIV
-       def_bool KERNEL_WIRELESS_EXT
-
-config KERNEL_WEXT_PROC
-       def_bool KERNEL_WIRELESS_EXT
-
-config KERNEL_WEXT_SPY
-       def_bool KERNEL_WIRELESS_EXT
+config KERNEL_XDP_SOCKETS
+       bool "XDP sockets support"
+       help
+         XDP sockets allows a channel between XDP programs and
+         userspace applications.
 
 config KERNEL_PAGE_POOL
        def_bool n
 
 config KERNEL_PAGE_POOL
        def_bool n
@@ -1346,8 +1427,6 @@ config KERNEL_JFFS2_FS_SECURITY
 
 config KERNEL_WERROR
        bool "Compile the kernel with warnings as errors"
 
 config KERNEL_WERROR
        bool "Compile the kernel with warnings as errors"
-       default BUILDBOT
-       default y if GCC_USE_VERSION_12
        help
          A kernel build should not cause any compiler warnings, and this
          enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
        help
          A kernel build should not cause any compiler warnings, and this
          enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags