Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754398AbaKYKrw (ORCPT ); Tue, 25 Nov 2014 05:47:52 -0500 Received: from mail-ob0-f170.google.com ([209.85.214.170]:58911 "EHLO mail-ob0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753383AbaKYKrs convert rfc822-to-8bit (ORCPT ); Tue, 25 Nov 2014 05:47:48 -0500 MIME-Version: 1.0 In-Reply-To: References: <1404905415-9046-1-git-send-email-a.ryabinin@samsung.com> <1416852146-9781-1-git-send-email-a.ryabinin@samsung.com> <1416852146-9781-4-git-send-email-a.ryabinin@samsung.com> <54737CD7.7080908@oracle.com> From: Dmitry Chernenkov Date: Tue, 25 Nov 2014 14:47:27 +0400 Message-ID: Subject: Re: [PATCH v7 03/12] x86_64: add KASan support To: Andrey Ryabinin Cc: Sasha Levin , Andrey Ryabinin , Andrew Morton , Dmitry Vyukov , Konstantin Serebryany , Andrey Konovalov , Yuri Gribov , Konstantin Khlebnikov , Christoph Lameter , Joonsoo Kim , Dave Hansen , Andi Kleen , Vegard Nossum , "H. Peter Anvin" , Dave Jones , "x86@kernel.org" , "linux-mm@kvack.org" , LKML , Thomas Gleixner , Ingo Molnar Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org LGTM. Also, please send a pull request to google/kasan whenever you're ready (for the whole bulk of changes). On Tue, Nov 25, 2014 at 12:26 AM, Andrey Ryabinin wrote: > 2014-11-24 21:45 GMT+03:00 Sasha Levin : >> On 11/24/2014 01:02 PM, Andrey Ryabinin wrote: >>> +static int kasan_die_handler(struct notifier_block *self, >>> + unsigned long val, >>> + void *data) >>> +{ >>> + if (val == DIE_GPF) { >>> + pr_emerg("CONFIG_KASAN_INLINE enabled\n"); >>> + pr_emerg("GPF could be caused by NULL-ptr deref or user memory access\n"); >>> + } >>> + return NOTIFY_OK; >>> +} >>> + >>> +static struct notifier_block kasan_die_notifier = { >>> + .notifier_call = kasan_die_handler, >>> +}; >> >> This part fails to compile: >> >> CC arch/x86/mm/kasan_init_64.o >> arch/x86/mm/kasan_init_64.c: In function ‘kasan_die_handler’: >> arch/x86/mm/kasan_init_64.c:72:13: error: ‘DIE_GPF’ undeclared (first use in this function) >> if (val == DIE_GPF) { >> ^ >> arch/x86/mm/kasan_init_64.c:72:13: note: each undeclared identifier is reported only once for each function it appears in >> arch/x86/mm/kasan_init_64.c: In function ‘kasan_init’: >> arch/x86/mm/kasan_init_64.c:89:2: error: implicit declaration of function ‘register_die_notifier’ [-Werror=implicit-function-declaration] >> register_die_notifier(&kasan_die_notifier); >> ^ >> cc1: some warnings being treated as errors >> make[1]: *** [arch/x86/mm/kasan_init_64.o] Error 1 >> >> >> Simple fix: >> > > Thanks, I thought I've fixed this, but apparently I forgot to commit it. > > >> diff --git a/arch/x86/mm/kasan_init_64.c b/arch/x86/mm/kasan_init_64.c >> index 70041fd..c8f7f3e 100644 >> --- a/arch/x86/mm/kasan_init_64.c >> +++ b/arch/x86/mm/kasan_init_64.c >> @@ -5,6 +5,7 @@ >> #include >> >> #include >> +#include >> >> extern pgd_t early_level4_pgt[PTRS_PER_PGD]; >> extern struct range pfn_mapped[E820_X_MAX]; >> >> >> Thanks, >> Sasha >> > > -- > Best regards, > Andrey Ryabinin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/