From: Arnd Bergmann <arnd@arndb.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Vasily Gorbik <gor@linux.ibm.com>,
Andrey Konovalov <andreyknvl@google.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] kasan: add missing Kconfig dependencies
Date: Mon, 10 Dec 2018 21:58:54 +0100 [thread overview]
Message-ID: <20181210205929.3213516-1-arnd@arndb.de> (raw)
Building with CONFIG_KASAN=y when neither KASAN_GENERIC nor KASAN_SW_TAGS
can be selected leads to a build error:
arch/arm64/mm/kasan_init.c: In function 'kasan_pte_populate':
arch/arm64/mm/kasan_init.c:106:28: error: 'KASAN_SHADOW_INIT' undeclared (first use in this function); did you mean 'KASAN_SHADOW_END'?
We should really only allow enabling KASAN when all its dependencies
are met as it was before the introduction of CONFIG_KASAN_SW_TAGS.
Fixes: b8440cc16515 ("kasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_SW_TAGS")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
lib/Kconfig.kasan | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index b5d0cbfce4a1..83286bca2f70 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -15,6 +15,8 @@ if HAVE_ARCH_KASAN
config KASAN
bool "KASAN: runtime memory debugger"
+ depends on CC_HAS_KASAN_GENERIC || CC_HAS_KASAN_SW_TAGS
+ depends on (SLUB && SYSFS) || (SLAB && !DEBUG_SLAB)
help
Enables KASAN (KernelAddressSANitizer) - runtime memory debugger,
designed to find out-of-bounds accesses and use-after-free bugs.
--
2.20.0
next reply other threads:[~2018-12-10 20:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-10 20:58 Arnd Bergmann [this message]
2018-12-10 21:14 ` Andrey Konovalov
2018-12-10 21:26 ` Arnd Bergmann
2018-12-10 22:09 ` Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181210205929.3213516-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=aryabinin@virtuozzo.com \
--cc=gor@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®