fork: support VMAP_STACK with KASAN_VMALLOC
[linux-2.6-microblaze.git] / arch / Kconfig
index 69c87e8..ec07f9b 100644 (file)
@@ -843,16 +843,17 @@ config HAVE_ARCH_VMAP_STACK
 config VMAP_STACK
        default y
        bool "Use a virtually-mapped stack"
-       depends on HAVE_ARCH_VMAP_STACK && !KASAN
+       depends on HAVE_ARCH_VMAP_STACK
+       depends on !KASAN || KASAN_VMALLOC
        ---help---
          Enable this if you want the use virtually-mapped kernel stacks
          with guard pages.  This causes kernel stack overflows to be
          caught immediately rather than causing difficult-to-diagnose
          corruption.
 
-         This is presently incompatible with KASAN because KASAN expects
-         the stack to map directly to the KASAN shadow map using a formula
-         that is incorrect if the stack is in vmalloc space.
+         To use this with KASAN, the architecture must support backing
+         virtual mappings with real shadow memory, and KASAN_VMALLOC must
+         be enabled.
 
 config ARCH_OPTIONAL_KERNEL_RWX
        def_bool n
@@ -892,27 +893,6 @@ config STRICT_MODULE_RWX
 config ARCH_HAS_PHYS_TO_DMA
        bool
 
-config ARCH_HAS_REFCOUNT
-       bool
-       help
-         An architecture selects this when it has implemented refcount_t
-         using open coded assembly primitives that provide an optimized
-         refcount_t implementation, possibly at the expense of some full
-         refcount state checks of CONFIG_REFCOUNT_FULL=y.
-
-         The refcount overflow check behavior, however, must be retained.
-         Catching overflows is the primary security concern for protecting
-         against bugs in reference counts.
-
-config REFCOUNT_FULL
-       bool "Perform full reference count validation at the expense of speed"
-       help
-         Enabling this switches the refcounting infrastructure from a fast
-         unchecked atomic_t implementation to a fully state checked
-         implementation, which can be (slightly) slower but provides protections
-         against various use-after-free conditions that can be used in
-         security flaw exploits.
-
 config HAVE_ARCH_COMPILER_H
        bool
        help