* [PATCH] kasan: add missing Kconfig dependencies
@ 2018-12-10 20:58 Arnd Bergmann
2018-12-10 21:14 ` Andrey Konovalov
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2018-12-10 20:58 UTC (permalink / raw)
To: Andrew Morton
Cc: Arnd Bergmann, Andrey Ryabinin, Stephen Rothwell, Vasily Gorbik,
Andrey Konovalov, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kasan: add missing Kconfig dependencies
2018-12-10 20:58 [PATCH] kasan: add missing Kconfig dependencies Arnd Bergmann
@ 2018-12-10 21:14 ` Andrey Konovalov
2018-12-10 21:26 ` Arnd Bergmann
2018-12-10 22:09 ` Stephen Rothwell
0 siblings, 2 replies; 4+ messages in thread
From: Andrey Konovalov @ 2018-12-10 21:14 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Andrew Morton, Andrey Ryabinin, Stephen Rothwell, gor, LKML
On Mon, Dec 10, 2018 at 9:59 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> 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>
Hi Arnd,
Is this a patch against linux-next? The issue has been addressed by
v13 of the patchset, which is now in the mm tree and should end up in
the linux-next soon AFAIU.
Thanks!
> ---
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kasan: add missing Kconfig dependencies
2018-12-10 21:14 ` Andrey Konovalov
@ 2018-12-10 21:26 ` Arnd Bergmann
2018-12-10 22:09 ` Stephen Rothwell
1 sibling, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2018-12-10 21:26 UTC (permalink / raw)
To: Andrey Konovalov
Cc: Andrew Morton, Andrey Ryabinin, Stephen Rothwell, gor,
Linux Kernel Mailing List
On Mon, Dec 10, 2018 at 10:15 PM Andrey Konovalov <andreyknvl@google.com> wrote:
>
> On Mon, Dec 10, 2018 at 9:59 PM Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > 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>
>
> Hi Arnd,
>
> Is this a patch against linux-next? The issue has been addressed by
> v13 of the patchset, which is now in the mm tree and should end up in
> the linux-next soon AFAIU.
Yes, I tested on today's linux-next. I'll drop the patch tomorrow then from
my test tree.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kasan: add missing Kconfig dependencies
2018-12-10 21:14 ` Andrey Konovalov
2018-12-10 21:26 ` Arnd Bergmann
@ 2018-12-10 22:09 ` Stephen Rothwell
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2018-12-10 22:09 UTC (permalink / raw)
To: Andrey Konovalov; +Cc: Arnd Bergmann, Andrew Morton, Andrey Ryabinin, gor, LKML
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
Hi Andrey,
On Mon, 10 Dec 2018 22:14:57 +0100 Andrey Konovalov <andreyknvl@google.com> wrote:
>
> Is this a patch against linux-next? The issue has been addressed by
> v13 of the patchset, which is now in the mm tree and should end up in
> the linux-next soon AFAIU.
It may be in the mmots series, but it is not (yet) in the mmotm series
and so won't appear in linux-next today (unless Andrew updates mmotm
soon).
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-10 22:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 20:58 [PATCH] kasan: add missing Kconfig dependencies Arnd Bergmann
2018-12-10 21:14 ` Andrey Konovalov
2018-12-10 21:26 ` Arnd Bergmann
2018-12-10 22:09 ` Stephen Rothwell
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®