From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by kanga.kvack.org (Postfix) with ESMTP id 7A6626B0035 for ; Fri, 26 Sep 2014 13:17:36 -0400 (EDT) Received: by mail-vc0-f172.google.com with SMTP id hy10so9617582vcb.31 for ; Fri, 26 Sep 2014 10:17:36 -0700 (PDT) Received: from mail-vc0-x235.google.com (mail-vc0-x235.google.com [2607:f8b0:400c:c03::235]) by mx.google.com with ESMTPS id w8si2626157vcu.60.2014.09.26.10.17.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Sep 2014 10:17:35 -0700 (PDT) Received: by mail-vc0-f181.google.com with SMTP id hq12so3126969vcb.40 for ; Fri, 26 Sep 2014 10:17:34 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <54259BD4.8090508@oracle.com> References: <1404905415-9046-1-git-send-email-a.ryabinin@samsung.com> <1411562649-28231-1-git-send-email-a.ryabinin@samsung.com> <54259BD4.8090508@oracle.com> Date: Fri, 26 Sep 2014 21:17:34 +0400 Message-ID: Subject: Re: [PATCH v3 00/13] Kernel address sanitizer - runtime memory debugger. From: Andrey Ryabinin Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Sasha Levin Cc: Andrey Ryabinin , LKML , Dmitry Vyukov , Konstantin Serebryany , Dmitry Chernenkov , Andrey Konovalov , Yuri Gribov , Konstantin Khlebnikov , Michal Marek , Thomas Gleixner , Ingo Molnar , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Dave Hansen , Andi Kleen , Vegard Nossum , "H. Peter Anvin" , linux-kbuild@vger.kernel.org, x86@kernel.org, "linux-mm@kvack.org" , Randy Dunlap , Peter Zijlstra , Alexander Viro , Dave Jones 2014-09-26 21:01 GMT+04:00 Sasha Levin : > On 09/24/2014 08:43 AM, Andrey Ryabinin wrote: >> Hi. >> >> This is a third iteration of kerenel address sanitizer (KASan). >> >> KASan is a runtime memory debugger designed to find use-after-free >> and out-of-bounds bugs. >> >> Currently KASAN supported only for x86_64 architecture and requires kernel >> to be build with SLUB allocator. >> KASAN uses compile-time instrumentation for checking every memory access, therefore you >> will need a fresh GCC >= v5.0.0. > > Hi Andrey, > > I tried this patchset, with the latest gcc, and I'm seeing the following: > > arch/x86/kernel/head.o: In function `_GLOBAL__sub_I_00099_0_reserve_ebda_region': > /home/sasha/linux-next/arch/x86/kernel/head.c:71: undefined reference to `__asan_init_v4' > init/built-in.o: In function `_GLOBAL__sub_I_00099_0___ksymtab_system_state': > /home/sasha/linux-next/init/main.c:1034: undefined reference to `__asan_init_v4' > init/built-in.o: In function `_GLOBAL__sub_I_00099_0_init_uts_ns': > /home/sasha/linux-next/init/version.c:50: undefined reference to `__asan_init_v4' > init/built-in.o: In function `_GLOBAL__sub_I_00099_0_root_mountflags': > /home/sasha/linux-next/init/do_mounts.c:638: undefined reference to `__asan_init_v4' > init/built-in.o: In function `_GLOBAL__sub_I_00099_0_rd_prompt': > /home/sasha/linux-next/init/do_mounts_rd.c:361: undefined reference to `__asan_init_v4' > init/built-in.o:/home/sasha/linux-next/init/do_mounts_md.c:312: more undefined references to `__asan_init_v4' follow > > > What am I missing? > __asan_init_v* is a version of compiler's api. Recently it was changed in gcc - https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01872.html To fix this, just add: void __asan_init_v4(void) {} EXPORT_SYMBOL(__asan_init_v4); to the mm/kasan/kasan.c I'll fix this in next spin. > > Thanks, > Sasha > > -- -- Best regards, Andrey Ryabinin -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org