Commit 38dd767d authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Linus Torvalds

kasan: allow VMAP_STACK for HW_TAGS mode

Even though hardware tag-based mode currently doesn't support checking
vmalloc allocations, it doesn't use shadow memory and works with
VMAP_STACK as is. Change VMAP_STACK definition accordingly.

Link: https://lkml.kernel.org/r/ecdb2a1658ebd88eb276dee2493518ac0e82de41.1606162397.git.andreyknvl@google.com
Link: https://linux-review.googlesource.com/id/I3552cbc12321dec82cd7372676e9372a2eb452acSigned-off-by: default avatarAndrey Konovalov <andreyknvl@google.com>
Reviewed-by: default avatarMarco Elver <elver@google.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Reviewed-by: default avatarDmitry Vyukov <dvyukov@google.com>
Tested-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Branislav Rankov <Branislav.Rankov@arm.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d56a9ef8
...@@ -976,16 +976,16 @@ config VMAP_STACK ...@@ -976,16 +976,16 @@ config VMAP_STACK
default y default y
bool "Use a virtually-mapped stack" bool "Use a virtually-mapped stack"
depends on HAVE_ARCH_VMAP_STACK depends on HAVE_ARCH_VMAP_STACK
depends on !KASAN || KASAN_VMALLOC depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC
help help
Enable this if you want the use virtually-mapped kernel stacks Enable this if you want the use virtually-mapped kernel stacks
with guard pages. This causes kernel stack overflows to be with guard pages. This causes kernel stack overflows to be
caught immediately rather than causing difficult-to-diagnose caught immediately rather than causing difficult-to-diagnose
corruption. corruption.
To use this with KASAN, the architecture must support backing To use this with software KASAN modes, the architecture must support
virtual mappings with real shadow memory, and KASAN_VMALLOC must backing virtual mappings with real shadow memory, and KASAN_VMALLOC
be enabled. must be enabled.
config ARCH_OPTIONAL_KERNEL_RWX config ARCH_OPTIONAL_KERNEL_RWX
def_bool n def_bool n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment