From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751827AbdJMQSI (ORCPT ); Fri, 13 Oct 2017 12:18:08 -0400 Received: from foss.arm.com ([217.140.101.70]:35936 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751619AbdJMQSG (ORCPT ); Fri, 13 Oct 2017 12:18:06 -0400 Date: Fri, 13 Oct 2017 17:18:09 +0100 From: Will Deacon To: Pavel Tatashin Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, kasan-dev@googlegroups.com, borntraeger@de.ibm.com, heiko.carstens@de.ibm.com, davem@davemloft.net, willy@infradead.org, Michal Hocko , Ard Biesheuvel , Mark Rutland , catalin.marinas@arm.com, sam@ravnborg.org, mgorman@techsingularity.net, Steve Sistare , daniel.m.jordan@oracle.com, bob.picco@oracle.com Subject: Re: [PATCH v11 7/9] arm64/kasan: add and use kasan_map_populate() Message-ID: <20171013161809.GE4746@arm.com> References: <20171010155619.GA2517@arm.com> <20171010171047.GC2517@arm.com> <20171013144319.GB4746@arm.com> <20171013154426.GC4746@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 13, 2017 at 12:00:27PM -0400, Pavel Tatashin wrote: > BTW, don't we need the same aligments inside for_each_memblock() loop? Hmm, yes actually, given that we shift them right for the shadow address. > How about change kasan_map_populate() to accept regular VA start, end > address, and convert them internally after aligning to PAGE_SIZE? That's what my original patch did, but it doesn't help on its own because kasan_populate_zero_shadow would need the same change. Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Date: Fri, 13 Oct 2017 16:18:09 +0000 Subject: Re: [PATCH v11 7/9] arm64/kasan: add and use kasan_map_populate() Message-Id: <20171013161809.GE4746@arm.com> List-Id: References: <20171010155619.GA2517@arm.com> <20171010171047.GC2517@arm.com> <20171013144319.GB4746@arm.com> <20171013154426.GC4746@arm.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org On Fri, Oct 13, 2017 at 12:00:27PM -0400, Pavel Tatashin wrote: > BTW, don't we need the same aligments inside for_each_memblock() loop? Hmm, yes actually, given that we shift them right for the shadow address. > How about change kasan_map_populate() to accept regular VA start, end > address, and convert them internally after aligning to PAGE_SIZE? That's what my original patch did, but it doesn't help on its own because kasan_populate_zero_shadow would need the same change. Will From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f69.google.com (mail-oi0-f69.google.com [209.85.218.69]) by kanga.kvack.org (Postfix) with ESMTP id 66CD66B0033 for ; Fri, 13 Oct 2017 12:18:07 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id j126so6488588oib.2 for ; Fri, 13 Oct 2017 09:18:07 -0700 (PDT) Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id m34si381405otb.272.2017.10.13.09.18.05 for ; Fri, 13 Oct 2017 09:18:05 -0700 (PDT) Date: Fri, 13 Oct 2017 17:18:09 +0100 From: Will Deacon Subject: Re: [PATCH v11 7/9] arm64/kasan: add and use kasan_map_populate() Message-ID: <20171013161809.GE4746@arm.com> References: <20171010155619.GA2517@arm.com> <20171010171047.GC2517@arm.com> <20171013144319.GB4746@arm.com> <20171013154426.GC4746@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Pavel Tatashin Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, kasan-dev@googlegroups.com, borntraeger@de.ibm.com, heiko.carstens@de.ibm.com, davem@davemloft.net, willy@infradead.org, Michal Hocko , Ard Biesheuvel , Mark Rutland , catalin.marinas@arm.com, sam@ravnborg.org, mgorman@techsingularity.net, Steve Sistare , daniel.m.jordan@oracle.com, bob.picco@oracle.com On Fri, Oct 13, 2017 at 12:00:27PM -0400, Pavel Tatashin wrote: > BTW, don't we need the same aligments inside for_each_memblock() loop? Hmm, yes actually, given that we shift them right for the shadow address. > How about change kasan_map_populate() to accept regular VA start, end > address, and convert them internally after aligning to PAGE_SIZE? That's what my original patch did, but it doesn't help on its own because kasan_populate_zero_shadow would need the same change. Will -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Fri, 13 Oct 2017 17:18:09 +0100 Subject: [PATCH v11 7/9] arm64/kasan: add and use kasan_map_populate() In-Reply-To: References: <20171010155619.GA2517@arm.com> <20171010171047.GC2517@arm.com> <20171013144319.GB4746@arm.com> <20171013154426.GC4746@arm.com> Message-ID: <20171013161809.GE4746@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Oct 13, 2017 at 12:00:27PM -0400, Pavel Tatashin wrote: > BTW, don't we need the same aligments inside for_each_memblock() loop? Hmm, yes actually, given that we shift them right for the shadow address. > How about change kasan_map_populate() to accept regular VA start, end > address, and convert them internally after aligning to PAGE_SIZE? That's what my original patch did, but it doesn't help on its own because kasan_populate_zero_shadow would need the same change. Will