Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp160317imu; Tue, 15 Jan 2019 18:53:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN7RGMcnrnnnCQC4ruRHwIf8UOLdgmswOn+pie6S6SCWWaOx0VjOGZ9L0WAKFDydEL8SLtRh X-Received: by 2002:a63:a35c:: with SMTP id v28mr6671726pgn.205.1547607201368; Tue, 15 Jan 2019 18:53:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547607201; cv=none; d=google.com; s=arc-20160816; b=oiVJBj9VGfBqZGfoKU+P3BcbfMODDXCmy+fq2L20A6QOcHgLCdjlaXyCNJa4q5O5x3 WyVYgoMyurd7AStxll3crgl9FNPrO2tZN+ujuwLwTWuZCiUgmD5ZbQ2Os1NqBWmfthKQ iy9KJnnR2VGzJt3K3B3haZmnUIKtogsARZ4DXvifiFBqAQ7/E8tNkVlbLcswgdGvyIfs KbXEd1XEwvuHZxTcN9RXKV48W6sVb56PCUMgJSluJWxG8wrMdelgtP4jOJSY23vLHnrh nGsZCnO5IDdaUSv3o2b4Nl3OsVHsoIxEbv1d66mooLDLcKd+jIuN4/If/2qkPTscBLVd 0Xfw== 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:from:references:cc:to:subject; bh=nENKXtIeRk0pL4PDs+855+sZPcy2RXCRnzi0F+u5nBg=; b=g4KkFH8AmzEEjbtlGtzdXZ5orw2m5GtWPHo1UeF4PmgbIN+gDfiwtTd8PTnNN+tBmF A7WhqLw/PbpgRBeamFUwPSRFEgHvDVY6oyPJNOYU1pvqPz98tIjzVwauQ1eRcYrmXV68 x3qiGSMRlyM1abQ1aiQ2TlLAHHABdaEi0faqSZRYrPK+BAkbwnhkSM5/9YKJ9dpvQ0Tz DYudElqtszWG5OjzjEEmdvmo2eu/83qtsw0X4akilBmUCVcgSA6+3tQZ9j9+cyhBzSK2 nLO14ZxaMb87a867r8l29nZpp9oFUR4w0Jx9ISUPkbpCRKxGKitYn7D21QTyF/UT/uu5 oYxw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n7si4898097plp.147.2019.01.15.18.53.03; Tue, 15 Jan 2019 18:53:21 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730298AbfAORXQ (ORCPT + 99 others); Tue, 15 Jan 2019 12:23:16 -0500 Received: from relay.sw.ru ([185.231.240.75]:53986 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728736AbfAORXP (ORCPT ); Tue, 15 Jan 2019 12:23:15 -0500 Received: from [172.16.25.12] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1gjSQi-0004bo-Mo; Tue, 15 Jan 2019 20:23:12 +0300 Subject: Re: [PATCH v3 3/3] powerpc/32: Add KASAN support To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin , "Aneesh Kumar K.V" , Alexander Potapenko , Dmitry Vyukov Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kasan-dev@googlegroups.com, linux-mm@kvack.org References: <935f9f83393affb5d55323b126468ecb90373b88.1547289808.git.christophe.leroy@c-s.fr> From: Andrey Ryabinin Message-ID: Date: Tue, 15 Jan 2019 20:23:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <935f9f83393affb5d55323b126468ecb90373b88.1547289808.git.christophe.leroy@c-s.fr> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/12/19 2:16 PM, Christophe Leroy wrote: > +KASAN_SANITIZE_early_32.o := n > +KASAN_SANITIZE_cputable.o := n > +KASAN_SANITIZE_prom_init.o := n > + Usually it's also good idea to disable branch profiling - define DISABLE_BRANCH_PROFILING either in top of these files or via Makefile. Branch profiling redefines if() statement and calls instrumented ftrace_likely_update in every if(). > diff --git a/arch/powerpc/mm/kasan_init.c b/arch/powerpc/mm/kasan_init.c > new file mode 100644 > index 000000000000..3edc9c2d2f3e > +void __init kasan_init(void) > +{ > + struct memblock_region *reg; > + > + for_each_memblock(memory, reg) > + kasan_init_region(reg); > + > + pr_info("KASAN init done\n"); Without "init_task.kasan_depth = 0;" kasan will not repot bugs. There is test_kasan module. Make sure that it produce reports.