From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964795AbcKLFnT (ORCPT ); Sat, 12 Nov 2016 00:43:19 -0500 Received: from foss.arm.com ([217.140.101.70]:56824 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751643AbcKLFnQ (ORCPT ); Sat, 12 Nov 2016 00:43:16 -0500 Date: Sat, 12 Nov 2016 05:43:19 +0000 From: Will Deacon To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, Russell King , Catalin Marinas , Arnd Bergmann , Nicolas Pitre , Chris Brandt , Pratyush Anand , Ard Biesheuvel , Mark Rutland , James Morse , Neeraj Upadhyay , Laura Abbott , Andrew Morton , Vlastimil Babka , Michal Hocko , "Kirill A. Shutemov" , Jerome Marchand , Konstantin Khlebnikov , Joonsoo Kim , "moderated list:ARM PORT" , "open list:GENERIC INCLUDE/ASM HEADER FILES" , "open list:MEMORY MANAGEMENT" Subject: Re: [PATCH RFC] mm: Add debug_virt_to_phys() Message-ID: <20161112054318.GB24127@arm.com> References: <20161112004449.30566-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161112004449.30566-1-f.fainelli@gmail.com> 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, Nov 11, 2016 at 04:44:43PM -0800, Florian Fainelli wrote: > When CONFIG_DEBUG_VM is turned on, virt_to_phys() maps to > debug_virt_to_phys() which helps catch vmalloc space addresses being > passed. This is helpful in debugging bogus drivers that just assume > linear mappings all over the place. > > For ARM, ARM64, Unicore32 and Microblaze, the architectures define > __virt_to_phys() as being the functional implementation of the address > translation, so we special case the debug stub to call into > __virt_to_phys directly. > > Signed-off-by: Florian Fainelli > --- > arch/arm/include/asm/memory.h | 4 ++++ > arch/arm64/include/asm/memory.h | 4 ++++ > include/asm-generic/memory_model.h | 4 ++++ > mm/debug.c | 15 +++++++++++++++ > 4 files changed, 27 insertions(+) What's the interaction between this and the DEBUG_VIRTUAL patches from Laura? http://lkml.kernel.org/r/20161102210054.16621-7-labbott@redhat.com They seem to be tackling the exact same problem afaict. Will