From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704AbbLaKvp (ORCPT ); Thu, 31 Dec 2015 05:51:45 -0500 Received: from ozlabs.org ([103.22.144.67]:53231 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751215AbbLaKvm (ORCPT ); Thu, 31 Dec 2015 05:51:42 -0500 Date: Thu, 31 Dec 2015 21:51:40 +1100 From: Stephen Rothwell To: Andrew Morton , Dan Williams Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Andrey Ryabinin Subject: linux-next: manual merge of the akpm-current tree with the nvdimm tree Message-ID: <20151231215140.4905c760@canb.auug.org.au> X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, Today's linux-next merge of the akpm-current tree got a conflict in: lib/Kconfig.debug between commit: 96efc4fed452 ("arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug") from the nvdimm tree and commit: 3e138efd477e ("UBSAN: run-time undefined behavior sanity checker") from the akpm-current tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au diff --cc lib/Kconfig.debug index 01be6fcceda2,19f7461e1594..000000000000 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@@ -1886,42 -1860,4 +1893,44 @@@ source "samples/Kconfig source "lib/Kconfig.kgdb" +config ARCH_HAS_DEVMEM_IS_ALLOWED + bool + +config STRICT_DEVMEM + bool "Filter access to /dev/mem" + depends on MMU + depends on ARCH_HAS_DEVMEM_IS_ALLOWED + default y if TILE || PPC + ---help--- + If this option is disabled, you allow userspace (root) access to all + of memory, including kernel and userspace memory. Accidental + access to this is obviously disastrous, but specific access can + be used by people debugging the kernel. Note that with PAT support + enabled, even in this case there are restrictions on /dev/mem + use due to the cache aliasing requirements. + + If this option is switched on, and IO_STRICT_DEVMEM=n, the /dev/mem + file only allows userspace access to PCI space and the BIOS code and + data regions. This is sufficient for dosemu and X and all common + users of /dev/mem. + + If in doubt, say Y. + +config IO_STRICT_DEVMEM + bool "Filter I/O access to /dev/mem" + depends on STRICT_DEVMEM + default STRICT_DEVMEM + ---help--- + If this option is disabled, you allow userspace (root) access to all + io-memory regardless of whether a driver is actively using that + range. Accidental access to this is obviously disastrous, but + specific access can be used by people debugging kernel drivers. + + If this option is switched on, the /dev/mem file only allows + userspace access to *idle* io-memory ranges (see /proc/iomem) This + may break traditional users of /dev/mem (dosemu, legacy X, etc...) + if the driver using a given range cannot be disabled. + + If in doubt, say Y. ++ + source "lib/Kconfig.ubsan"