[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+fCnZe=Wuj7bR77nUoWs6PSUJE4rFLpJabQbJKE=Wn24_Viow@mail.gmail.com>
Date: Sun, 3 Oct 2021 19:44:48 +0200
From: Andrey Konovalov <andreyknvl@...il.com>
To: Marco Elver <elver@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
kasan-dev <kasan-dev@...glegroups.com>,
LKML <linux-kernel@...r.kernel.org>,
Aleksandr Nogikh <nogikh@...gle.com>,
Taras Madan <tarasmadan@...gle.com>
Subject: Re: [PATCH] kasan: fix Kconfig check of CC_HAS_WORKING_NOSANITIZE_ADDRESS
On Fri, Sep 10, 2021 at 10:42 AM Marco Elver <elver@...gle.com> wrote:
>
> In the main KASAN config option CC_HAS_WORKING_NOSANITIZE_ADDRESS is
> checked for instrumentation-based modes. However, if
> HAVE_ARCH_KASAN_HW_TAGS is true all modes may still be selected.
>
> To fix, also make the software modes depend on
> CC_HAS_WORKING_NOSANITIZE_ADDRESS.
>
> Fixes: 6a63a63ff1ac ("kasan: introduce CONFIG_KASAN_HW_TAGS")
> Signed-off-by: Marco Elver <elver@...gle.com>
> ---
> lib/Kconfig.kasan | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
> index 1e2d10f86011..cdc842d090db 100644
> --- a/lib/Kconfig.kasan
> +++ b/lib/Kconfig.kasan
> @@ -66,6 +66,7 @@ choice
> config KASAN_GENERIC
> bool "Generic mode"
> depends on HAVE_ARCH_KASAN && CC_HAS_KASAN_GENERIC
> + depends on CC_HAS_WORKING_NOSANITIZE_ADDRESS
> select SLUB_DEBUG if SLUB
> select CONSTRUCTORS
> help
> @@ -86,6 +87,7 @@ config KASAN_GENERIC
> config KASAN_SW_TAGS
> bool "Software tag-based mode"
> depends on HAVE_ARCH_KASAN_SW_TAGS && CC_HAS_KASAN_SW_TAGS
> + depends on CC_HAS_WORKING_NOSANITIZE_ADDRESS
> select SLUB_DEBUG if SLUB
> select CONSTRUCTORS
> help
> --
> 2.33.0.309.g3052b89438-goog
>
Reviewed-by: Andrey Konovalov <andreyknvl@...il.com>
Powered by blists - more mailing lists