Andrey Konovalov d9b571c885 kasan: fix KASAN_STACK dependency for HW_TAGS
There's a runtime failure when running HW_TAGS-enabled kernel built with
GCC on hardware that doesn't support MTE.  GCC-built kernels always have
CONFIG_KASAN_STACK enabled, even though stack instrumentation isn't
supported by HW_TAGS.  Having that config enabled causes KASAN to issue
MTE-only instructions to unpoison kernel stacks, which causes the failure.

Fix the issue by disallowing CONFIG_KASAN_STACK when HW_TAGS is used.

(The commit that introduced CONFIG_KASAN_HW_TAGS specified proper
 dependency for CONFIG_KASAN_STACK_ENABLE but not for CONFIG_KASAN_STACK.)

Link: https://lkml.kernel.org/r/59e75426241dbb5611277758c8d4d6f5f9298dac.1615215441.git.andreyknvl@google.com
Fixes: 6a63a63ff1ac ("kasan: introduce CONFIG_KASAN_HW_TAGS")
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: <stable@vger.kernel.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Branislav Rankov <Branislav.Rankov@arm.com>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-03-13 11:27:31 -08:00
..
2020-08-09 14:10:26 -07:00
2020-10-30 17:34:45 +11:00
2020-05-24 20:48:11 +02:00
2020-10-16 11:11:19 -07:00
2018-08-16 12:14:42 -07:00
2021-02-08 12:24:26 +01:00
2021-01-21 14:06:00 -07:00
2021-01-03 20:05:18 -05:00
2014-04-30 19:49:37 +01:00
2020-10-20 14:39:37 -07:00
2021-02-26 09:41:02 -08:00
2021-02-26 09:41:05 -08:00
2018-10-16 13:45:44 +02:00
2021-02-15 15:31:52 -08:00
2021-02-03 19:10:42 +01:00
2020-10-20 14:39:37 -07:00
2020-12-07 17:12:49 -07:00
2020-06-15 18:22:43 -07:00
2019-07-11 15:17:41 -07:00
2020-12-15 22:46:16 -08:00
2018-10-15 16:31:29 -04:00
2020-12-15 22:46:16 -08:00
2021-02-22 11:04:36 -08:00
2021-02-26 09:41:05 -08:00
2020-10-20 14:39:37 -07:00
2021-02-26 09:41:05 -08:00
2020-10-20 14:39:37 -07:00