From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752280AbdHHNey (ORCPT ); Tue, 8 Aug 2017 09:34:54 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:16990 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752460AbdHHNeu (ORCPT ); Tue, 8 Aug 2017 09:34:50 -0400 Subject: Re: [v6 11/15] arm64/kasan: explicitly zero kasan shadow memory To: David Laight , Will Deacon Cc: "linux-s390@vger.kernel.org" , "ard.biesheuvel@linaro.org" , "sam@ravnborg.org" , "borntraeger@de.ibm.com" , "catalin.marinas@arm.com" , "x86@kernel.org" , "heiko.carstens@de.ibm.com" , "linux-kernel@vger.kernel.org" , "kasan-dev@googlegroups.com" , "mhocko@kernel.org" , "linux-mm@kvack.org" , "willy@infradead.org" , "sparclinux@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "davem@davemloft.net" , "linux-arm-kernel@lists.infradead.org" References: <1502138329-123460-1-git-send-email-pasha.tatashin@oracle.com> <1502138329-123460-12-git-send-email-pasha.tatashin@oracle.com> <20170808090743.GA12887@arm.com> <063D6719AE5E284EB5DD2968C1650D6DD004DA79@AcuExch.aculab.com> From: Pasha Tatashin Message-ID: <43c261e5-7568-0d5b-70ab-d1f82ef257ec@oracle.com> Date: Tue, 8 Aug 2017 09:30:58 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD004DA79@AcuExch.aculab.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-08-08 09:15, David Laight wrote: > From: Pasha Tatashin >> Sent: 08 August 2017 12:49 >> Thank you for looking at this change. What you described was in my >> previous iterations of this project. >> >> See for example here: https://lkml.org/lkml/2017/5/5/369 >> >> I was asked to remove that flag, and only zero memory in place when >> needed. Overall the current approach is better everywhere else in the >> kernel, but it adds a little extra code to kasan initialization. > > Perhaps you could #define the function prototype(s?) so that the flags > are not passed unless it is a kasan build? > Hi David, Thank you for suggestion. I think a kasan specific vmemmap (what I described in the previous e-mail) would be a better solution over having different prototypes with different builds. It would be cleaner to have all kasan specific code in one place. Pasha