lkml.org 
[lkml]   [2014]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC/PATCH v2 01/10] Add kernel address sanitizer infrastructure.
    On 09/10/2014 10:31 AM, Andrey Ryabinin wrote:
    > +ifdef CONFIG_KASAN
    > + ifeq ($(call cc-option, $(CFLAGS_KASAN)),)
    > + $(warning Cannot use CONFIG_KASAN: \
    > + -fsanitize=kernel-address not supported by compiler)
    > + endif
    > +endif

    This seems to always indicate that my gcc doesn't support
    -fsanitize=kernel-address:

    Makefile:769: Cannot use CONFIG_KASAN: -fsanitize=kernel-address not supported by compiler

    Even though:

    $ gcc --version
    gcc (GCC) 5.0.0 20140904 (experimental)
    Copyright (C) 2014 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    $ cat test.c
    #include <stdio.h>
    #include <sys/mman.h>

    void __asan_init_v3(void) { }

    int main(int argc, char *argv[])
    {
    return 0;
    }
    $ gcc -fsanitize=kernel-address test.c
    $ ./a.out
    $


    Thanks,
    Sasha


    \
     
     \ /
      Last update: 2014-09-11 06:01    [W:4.043 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site