lkml.org 
[lkml]   [2019]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 4.9 09/62] kasan: turn on -fsanitize-address-use-after-scope
    On Mon, May 06, 2019 at 05:55:54PM +0300, Andrey Ryabinin wrote:
    >
    >
    > On 5/6/19 5:32 PM, Greg Kroah-Hartman wrote:
    > > From: Andrey Ryabinin <aryabinin@virtuozzo.com>
    > >
    > > commit c5caf21ab0cf884ef15b25af234f620e4a233139 upstream.
    > >
    > > In the upcoming gcc7 release, the -fsanitize=kernel-address option at
    > > first implied new -fsanitize-address-use-after-scope option. This would
    > > cause link errors on older kernels because they don't have two new
    > > functions required for use-after-scope support. Therefore, gcc7 changed
    > > default to -fno-sanitize-address-use-after-scope.
    > >
    > > Now the kernel has everything required for that feature since commit
    > > 828347f8f9a5 ("kasan: support use-after-scope detection"). So, to make it
    > > work, we just have to enable use-after-scope in CFLAGS.
    > >
    > > Link: http://lkml.kernel.org/r/1481207977-28654-1-git-send-email-aryabinin@virtuozzo.com
    > > Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
    > > Acked-by: Dmitry Vyukov <dvyukov@google.com>
    > > Cc: Alexander Potapenko <glider@google.com>
    > > Cc: Andrey Konovalov <andreyknvl@google.com>
    > > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    > > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    > > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
    > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    > >
    > > ---
    > > scripts/Makefile.kasan | 2 ++
    > > 1 file changed, 2 insertions(+)
    > >
    > > --- a/scripts/Makefile.kasan
    > > +++ b/scripts/Makefile.kasan
    > > @@ -29,6 +29,8 @@ else
    > > endif
    > > endif
    > >
    > > +CFLAGS_KASAN += $(call cc-option, -fsanitize-address-use-after-scope)
    > > +
    > > CFLAGS_KASAN_NOSANITIZE := -fno-builtin
    > >
    > > endif
    > >
    > >
    >
    > This shouldn't be in the -stable.

    Why not? Does no one use gcc7 with this kernel and kasan?

    thanks,

    greg k-h

    \
     
     \ /
      Last update: 2019-05-06 17:13    [W:4.155 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site