Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp272709yba; Fri, 3 May 2019 01:19:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyySCNL+h63ieQCwp1i6/Xj5EvfpWBnWLFMZAk5QNmfk/5Z9Sfb6bwA7bUA/LDjosaHRxVM X-Received: by 2002:aa7:93a7:: with SMTP id x7mr9169314pff.196.1556871569576; Fri, 03 May 2019 01:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556871569; cv=none; d=google.com; s=arc-20160816; b=t0N7MQJ7ajjAhgfqo18QNzb4lIDr4Y9mrdVJo3oDQQz3Sqmu49Ag/l1rYfW20wWh3X +VblHJ3jCqTq843JJucAENK8DA1zB7EWWqjmSM7FXvy4QuTI6T1xgEhU0U84/ovp4F2J rjmNwJwy150TlFGAOGdvZsdKqK/QDC+LY8L2ptEw0g7a4SELZWYXKQWz31nwgGhJ/rYW iChk0luy2l/Ca4jBcPTRYjsjtuJeZ582RCpaCF57xoCS66WO1JexN7zw7Duw72d5VVQu a9VHCzbX3kdpOcuH17dqckzltFqozO0qSD8bW4ruy/0FdW0UtcDW0VRiOKlLIEdXZKyo mjRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=22Xq3HEvd6Yru88xMDUMXzEqbO1waVFeR8bEmAMWSqI=; b=rbLN5wNfW/u/K5iWMSz8Fx/4Rswf63+hanAbupYMyDl3Wm3Uu4huHEdw29DQ015D9q x4BSnhF76rrG+nPOBMqmUh5rbct8mCChDfLkhzdCgbUzxP+IB6WL12Ld542U6Ye9f9qc vZu4z7FKWn89zIQ+YYwqQ5mdFi08mmkQIlH46y0QT7x6FMMJ2LBLZ5CyAhcH5R4Jl8SY sjO+sGoznGBnOW1vaSUO/IgNrRHLF0QKS/c5L4KrnLj+61oV2DK3cDjEcyYuJy57fvGH qQLHHoE/lz7novZAmqPiRsRNZgkm7GFC8WuZMwC2zCjBDZtBRN9IHpzLG+5bxOIBwdDB 6/Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=g6fjTQ0J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u30si1435839pgk.410.2019.05.03.01.19.14; Fri, 03 May 2019 01:19:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=g6fjTQ0J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726993AbfECHiK (ORCPT + 99 others); Fri, 3 May 2019 03:38:10 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:53716 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbfECHiK (ORCPT ); Fri, 3 May 2019 03:38:10 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44wPB63Wcfz9vFVp; Fri, 3 May 2019 09:38:06 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=g6fjTQ0J; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id Q6TCMmlYgt_T; Fri, 3 May 2019 09:38:06 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 44wPB62PVJz9vFVk; Fri, 3 May 2019 09:38:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1556869086; bh=22Xq3HEvd6Yru88xMDUMXzEqbO1waVFeR8bEmAMWSqI=; h=Subject:From:To:Cc:References:Date:In-Reply-To:From; b=g6fjTQ0JL6fwAUUHq8KpW3v/DHKD9rNsQD9jXKP6PVsqfF71wJQKid60dMBEjOjo/ CoL7j3j9LGBMaJdHGjv1jKHgt9s8cdw2G2D4RCHc+zjKGifCuOHw1si6VIDL07vOJg jd6jSKg4onNj6/g1KOMELNwy1JLElux28bsad5iw= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 556958B888; Fri, 3 May 2019 09:38:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id ppmZKOEr5jsr; Fri, 3 May 2019 09:38:07 +0200 (CEST) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.6]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0CA268B853; Fri, 3 May 2019 09:38:07 +0200 (CEST) Subject: Re: [PATCH v11 09/13] powerpc: disable KASAN instrumentation on early/critical files. From: Christophe Leroy To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin , "Aneesh Kumar K.V" , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Daniel Axtens Cc: linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com References: <867c149e77f80e855a9310a490fb15ca03ffd63d.1556295461.git.christophe.leroy@c-s.fr> Message-ID: <5cff9551-e0ce-a2a4-989c-6b55825fa171@c-s.fr> Date: Fri, 3 May 2019 09:38:06 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <867c149e77f80e855a9310a490fb15ca03ffd63d.1556295461.git.christophe.leroy@c-s.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 26/04/2019 à 18:23, Christophe Leroy a écrit : > All files containing functions run before kasan_early_init() is called > must have KASAN instrumentation disabled. > > For those file, branch profiling also have to be disabled otherwise > each if () generates a call to ftrace_likely_update(). > > Signed-off-by: Christophe Leroy > --- > arch/powerpc/kernel/Makefile | 12 ++++++++++++ > arch/powerpc/lib/Makefile | 8 ++++++++ > arch/powerpc/mm/Makefile | 6 ++++++ > arch/powerpc/platforms/powermac/Makefile | 6 ++++++ > arch/powerpc/purgatory/Makefile | 3 +++ > arch/powerpc/xmon/Makefile | 1 + > 6 files changed, 36 insertions(+) > [...] > diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile > index 3c1bd9fa23cd..dd945ca869b2 100644 > --- a/arch/powerpc/mm/Makefile > +++ b/arch/powerpc/mm/Makefile > @@ -7,6 +7,12 @@ ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC) > > CFLAGS_REMOVE_slb.o = $(CC_FLAGS_FTRACE) > > +KASAN_SANITIZE_ppc_mmu_32.o := n > + > +ifdef CONFIG_KASAN > +CFLAGS_ppc_mmu_32.o += -DDISABLE_BRANCH_PROFILING > +endif > + The above is missing in powerpc/next (should now be in arch/powerpc/mm/book3s32/Makefile ) Christophe