lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181210205929.3213516-1-arnd@arndb.de>
Date:   Mon, 10 Dec 2018 21:58:54 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Andrey Konovalov <andreyknvl@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] kasan: add missing Kconfig dependencies

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@...db.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ