Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760931AbbKTUMc (ORCPT ); Fri, 20 Nov 2015 15:12:32 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:43750 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751428AbbKTUMb (ORCPT ); Fri, 20 Nov 2015 15:12:31 -0500 Date: Fri, 20 Nov 2015 20:12:08 +0000 From: Russell King - ARM Linux To: Dan Williams Cc: linux-kernel@vger.kernel.org, Kees Cook , Greg Kroah-Hartman , Catalin Marinas , linux-nvdimm@ml01.01.org, Heiko Carstens , Will Deacon , Ingo Molnar , Benjamin Herrenschmidt , "H. Peter Anvin" , Martin Schwidefsky , Thomas Gleixner , Andrew Morton , linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH] restrict /dev/mem to idle io memory ranges Message-ID: <20151120201207.GH8644@n2100.arm.linux.org.uk> References: <20151120173133.24259.97028.stgit@dwillia2-desk3.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151120173133.24259.97028.stgit@dwillia2-desk3.jf.intel.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 Content-Length: 1285 Lines: 28 On Fri, Nov 20, 2015 at 09:31:33AM -0800, Dan Williams wrote: > This effectively promotes IORESOURCE_BUSY to IORESOURCE_EXCLUSIVE > semantics by default. If userspace really believes it is safe to access > the memory region it can also perform the extra step of disabling an > active driver. This protects device address ranges with read side > effects and otherwise directs userspace to use the driver. I'm happy with this as long as we retain the option to disable this new behaviour. The reason being, when developing a driver, it is _very_ useful to be able to poke around in the device's (and system memory) address spaces with tools like devmem2 to work out what's going on when things go wrong. To put it another way, I think it's a good idea to disable access to these regions on production systems, but for driver development, we want to retain the ability to poke around in physical address space in any way we so desire. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/