From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760181AbcJ1LMV (ORCPT ); Fri, 28 Oct 2016 07:12:21 -0400 Received: from foss.arm.com ([217.140.101.70]:57092 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbcJ1LMU (ORCPT ); Fri, 28 Oct 2016 07:12:20 -0400 Date: Fri, 28 Oct 2016 12:11:46 +0100 From: Mark Rutland To: Ard Biesheuvel Cc: Laura Abbott , Will Deacon , Catalin Marinas , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC][PATCH] arm64: Add support for CONFIG_DEBUG_VIRTUAL Message-ID: <20161028111145.GG5806@leverpostej> References: <1477613892-26076-1-git-send-email-labbott@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 28, 2016 at 08:52:50AM +0100, Ard Biesheuvel wrote: > Hi Laura, > > On 28 October 2016 at 01:18, Laura Abbott wrote: > > x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks > > on virt_to_phys calls. The goal is to catch users who are calling > > virt_to_phys on non-linear addresses immediately. As features > > such as CONFIG_VMAP_STACK get enabled for arm64, this becomes > > increasingly important. Add checks to catch bad virt_to_phys > > usage. > > I think this is a useful thing to have. However, the Kconfig > description talks about virt to page translations, not virt to phys. > Of course, this is a shift away from being equivalent on x86, but not > so much on arm64. Any concerns there? See commit 59ea746337c69f6a ("MM: virtual address debug"); the existing x86 cases cover virt to phys also. The Kconfig text does say "and friends"... Thanks, Mark.