linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kasan: push back KASAN_STACK detection to clang-10
@ 2019-07-18 14:14 Arnd Bergmann
  2019-07-18 16:18 ` Andrey Ryabinin
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2019-07-18 14:14 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Qian Cai, Mark Brown, Arnd Bergmann, Andrey Ryabinin,
	Vasily Gorbik, Andrey Konovalov, linux-kernel, clang-built-linux

asan-stack mode still uses dangerously large kernel stacks of
tens of kilobytes in some drivers, and it does not seem that anyone
is working on the clang bug.

Let's push this back to clang-10 for now so users don't run into
this by accident, and we can test-build allmodconfig kernels using
clang-9 without drowning in warnings.

Link: https://bugs.llvm.org/show_bug.cgi?id=38809
Fixes: 6baec880d7a5 ("kasan: turn off asan-stack for clang-8 and earlier")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 lib/Kconfig.kasan | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index 4fafba1a923b..2f260bb63d77 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -106,7 +106,7 @@ endchoice
 
 config KASAN_STACK_ENABLE
 	bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && !COMPILE_TEST
-	default !(CLANG_VERSION < 90000)
+	default !(CLANG_VERSION < 100000)
 	depends on KASAN
 	help
 	  The LLVM stack address sanitizer has a know problem that
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] kasan: push back KASAN_STACK detection to clang-10
  2019-07-18 14:14 [PATCH] kasan: push back KASAN_STACK detection to clang-10 Arnd Bergmann
@ 2019-07-18 16:18 ` Andrey Ryabinin
  2019-07-18 16:23   ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Ryabinin @ 2019-07-18 16:18 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton
  Cc: Qian Cai, Mark Brown, Vasily Gorbik, Andrey Konovalov,
	linux-kernel, clang-built-linux



On 7/18/19 5:14 PM, Arnd Bergmann wrote:
> asan-stack mode still uses dangerously large kernel stacks of
> tens of kilobytes in some drivers, and it does not seem that anyone
> is working on the clang bug.
> 
> Let's push this back to clang-10 for now so users don't run into
> this by accident, and we can test-build allmodconfig kernels using
> clang-9 without drowning in warnings.
> 
> Link: https://bugs.llvm.org/show_bug.cgi?id=38809
> Fixes: 6baec880d7a5 ("kasan: turn off asan-stack for clang-8 and earlier")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  lib/Kconfig.kasan | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
> index 4fafba1a923b..2f260bb63d77 100644
> --- a/lib/Kconfig.kasan
> +++ b/lib/Kconfig.kasan
> @@ -106,7 +106,7 @@ endchoice
>  
>  config KASAN_STACK_ENABLE
>  	bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && !COMPILE_TEST
> -	default !(CLANG_VERSION < 90000)
> +	default !(CLANG_VERSION < 100000)

Wouldn't be better to make this thing for any clang version? And only when the bug is
finally fixed, specify the clang version which can enable this safely.


>  	depends on KASAN
>  	help
>  	  The LLVM stack address sanitizer has a know problem that
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kasan: push back KASAN_STACK detection to clang-10
  2019-07-18 16:18 ` Andrey Ryabinin
@ 2019-07-18 16:23   ` Mark Brown
  2019-07-18 22:09     ` Nick Desaulniers
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2019-07-18 16:23 UTC (permalink / raw)
  To: Andrey Ryabinin
  Cc: Arnd Bergmann, Andrew Morton, Qian Cai, Vasily Gorbik,
	Andrey Konovalov, linux-kernel, clang-built-linux

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

On Thu, Jul 18, 2019 at 07:18:28PM +0300, Andrey Ryabinin wrote:
> On 7/18/19 5:14 PM, Arnd Bergmann wrote:

> > asan-stack mode still uses dangerously large kernel stacks of
> > tens of kilobytes in some drivers, and it does not seem that anyone
> > is working on the clang bug.

> > -	default !(CLANG_VERSION < 90000)
> > +	default !(CLANG_VERSION < 100000)

> Wouldn't be better to make this thing for any clang version? And only when the bug is
> finally fixed, specify the clang version which can enable this safely.

Especially if nobody is currently working on it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kasan: push back KASAN_STACK detection to clang-10
  2019-07-18 16:23   ` Mark Brown
@ 2019-07-18 22:09     ` Nick Desaulniers
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Desaulniers @ 2019-07-18 22:09 UTC (permalink / raw)
  To: Mark Brown
  Cc: Andrey Ryabinin, Arnd Bergmann, Andrew Morton, Qian Cai,
	Vasily Gorbik, Andrey Konovalov, LKML, clang-built-linux,
	Kostya Serebryany, Dmitry Vyukov, Alexander Potapenko

On Thu, Jul 18, 2019 at 9:23 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, Jul 18, 2019 at 07:18:28PM +0300, Andrey Ryabinin wrote:
> > On 7/18/19 5:14 PM, Arnd Bergmann wrote:
>
> > > asan-stack mode still uses dangerously large kernel stacks of
> > > tens of kilobytes in some drivers, and it does not seem that anyone
> > > is working on the clang bug.
>
> > > -   default !(CLANG_VERSION < 90000)
> > > +   default !(CLANG_VERSION < 100000)
>
> > Wouldn't be better to make this thing for any clang version? And only when the bug is
> > finally fixed, specify the clang version which can enable this safely.
>
> Especially if nobody is currently working on it.

I agree.
-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-18 22:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 14:14 [PATCH] kasan: push back KASAN_STACK detection to clang-10 Arnd Bergmann
2019-07-18 16:18 ` Andrey Ryabinin
2019-07-18 16:23   ` Mark Brown
2019-07-18 22:09     ` Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).