From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3y9qVg2py5zDqv8 for ; Tue, 10 Oct 2017 06:07:07 +1100 (AEDT) Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v99J73hI025523 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 9 Oct 2017 19:07:04 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v99J73jT023372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 9 Oct 2017 19:07:03 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v99J73pc001335 for ; Mon, 9 Oct 2017 19:07:03 GMT Received: by mail-oi0-f49.google.com with SMTP id j126so17850290oib.8 for ; Mon, 09 Oct 2017 12:07:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20171009190213.GF30828@arm.com> References: <20170920201714.19817-1-pasha.tatashin@oracle.com> <20170920201714.19817-10-pasha.tatashin@oracle.com> <20171003144845.GD4931@leverpostej> <20171009171337.GE30085@arm.com> <20171009182217.GC30828@arm.com> <20171009184834.GE30828@arm.com> <20171009190213.GF30828@arm.com> From: Pavel Tatashin Date: Mon, 9 Oct 2017 15:07:01 -0400 Message-ID: Subject: Re: [PATCH v9 09/12] mm/kasan: kasan specific map populate function To: Will Deacon Cc: Mark Rutland , catalin.marinas@arm.com, 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, mhocko@kernel.org, Ard Biesheuvel , sam@ravnborg.org, mgorman@techsingularity.net, Steve Sistare , daniel.m.jordan@oracle.com, bob.picco@oracle.com Content-Type: text/plain; charset="UTF-8" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > > Ok, but I'm still missing why you think that is needed. What would be the > second page table walker that needs implementing? > > I guess we could implement that on arm64 using our current vmemmap_populate > logic and an explicit memset. > Hi Will, What do you mean by explicit memset()? We can't simply memset() from start to end without doing the page table walk, because at the time kasan is calling vmemmap_populate() we have a tmp_pg_dir instead of swapper_pg_dir. We could do the explicit memset() after cpu_replace_ttbr1(lm_alias(swapper_pg_dir)); but again, this was in one of my previous implementations, and I was asked to replace that. Pavel