[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMo8BfK5aEGae--xvboLxMXTe1orA7kmLR_uFNCqC6M-a=Om5Q@mail.gmail.com>
Date: Tue, 4 Dec 2018 14:23:47 -0800
From: Max Filippov <jcmvbkbc@...il.com>
To: Andrey Konovalov <andreyknvl@...gle.com>
Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>, glider@...gle.com,
Dmitry Vyukov <dvyukov@...gle.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Christoph Lameter <cl@...ux.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mark Rutland <mark.rutland@....com>, ndesaulniers@...gle.com,
marc.zyngier@....com, dave.martin@....com,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Ingo Molnar <mingo@...nel.org>, paullawrence@...gle.com,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Arnd Bergmann <arnd@...db.de>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kate Stewart <kstewart@...uxfoundation.org>,
rppt@...ux.vnet.ibm.com, kasan-dev@...glegroups.com,
linux-doc@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
linux-arm-kernel@...ts.infradead.org, linux-sparse@...r.kernel.org,
linux-mm@...ck.org, linux-kbuild <linux-kbuild@...r.kernel.org>,
kcc@...gle.com, eugenis@...gle.com, Lee.Smith@....com,
Ramana.Radhakrishnan@....com, Jacob.Bramley@....com,
Ruben.Ayrapetyan@....com, jannh@...gle.com, markbrand@...gle.com,
cpandya@...eaurora.org, vishwath@...gle.com
Subject: Re: [PATCH v12 05/25] kasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_SW_TAGS
Hello,
On Tue, Nov 27, 2018 at 9:00 AM Andrey Konovalov <andreyknvl@...gle.com> wrote:
>
> This commit splits the current CONFIG_KASAN config option into two:
> 1. CONFIG_KASAN_GENERIC, that enables the generic KASAN mode (the one
> that exists now);
> 2. CONFIG_KASAN_SW_TAGS, that enables the software tag-based KASAN mode.
[...]
> --- a/lib/Kconfig.kasan
> +++ b/lib/Kconfig.kasan
> @@ -1,35 +1,95 @@
> +# This config refers to the generic KASAN mode.
> config HAVE_ARCH_KASAN
> bool
>
> +config HAVE_ARCH_KASAN_SW_TAGS
> + bool
> +
> +config CC_HAS_KASAN_GENERIC
> + def_bool $(cc-option, -fsanitize=kernel-address)
> +
> +config CC_HAS_KASAN_SW_TAGS
> + def_bool $(cc-option, -fsanitize=kernel-hwaddress)
> +
> if HAVE_ARCH_KASAN
>
> config KASAN
> - bool "KASan: runtime memory debugger"
> + bool "KASAN: runtime memory debugger"
> + help
> + Enables KASAN (KernelAddressSANitizer) - runtime memory debugger,
> + designed to find out-of-bounds accesses and use-after-free bugs.
> + See Documentation/dev-tools/kasan.rst for details.
Perhaps KASAN should depend on
CC_HAS_KASAN_GENERIC || CC_HAS_KASAN_SW_TAGS,
otherwise make all*config may enable KASAN
for a compiler that does not have any -fsanitize=kernel-*address
support, resulting in build failures like this:
http://kisskb.ellerman.id.au/kisskb/buildresult/13606170/log/
--
Thanks.
-- Max
Powered by blists - more mailing lists