summaryrefslogtreecommitdiff
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorsukadev@linux.vnet.ibm.com <sukadev@linux.vnet.ibm.com>2011-08-30 13:19:17 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-11-28 04:42:08 +0400
commit1d54cf2b973a6265789b382b7d305771321b9b57 (patch)
tree8103c4c2accf96fd40cb1fb32ee9797aa97d17ed /arch/powerpc/include
parent56368797d6c2d093bb0e7a7e5fe7b267274b6c58 (diff)
downloadlinux-1d54cf2b973a6265789b382b7d305771321b9b57.tar.xz
powerpc: Implement CONFIG_STRICT_DEVMEM
As described in the help text in the patch, this token restricts general access to /dev/mem as a way of increasing the security. Specifically, access to exclusive IOMEM and kernel RAM is denied unless CONFIG_STRICT_DEVMEM is set to 'n'. Implement the 'devmem_is_allowed()' interface for Powerpc. It will be called from range_is_allowed() when userpsace attempts to access /dev/mem. This patch is based on an earlier patch from Steve Best and with input from Paul Mackerras and Scott Wood. [BenH] Fixed a typo or two and removed the generic change which should be submitted as a separate patch Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/page.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
index dd9c4fd038e0..9d7485c7e6f8 100644
--- a/arch/powerpc/include/asm/page.h
+++ b/arch/powerpc/include/asm/page.h
@@ -290,6 +290,7 @@ extern void clear_user_page(void *page, unsigned long vaddr, struct page *pg);
extern void copy_user_page(void *to, void *from, unsigned long vaddr,
struct page *p);
extern int page_is_ram(unsigned long pfn);
+extern int devmem_is_allowed(unsigned long pfn);
#ifdef CONFIG_PPC_SMLPAR
void arch_free_page(struct page *page, int order);