6 Oct 02:59
RFC: banning device driver reserved resources from /dev/mem
From: Arjan van de Ven <arjan <at> infradead.org>
Subject: RFC: banning device driver reserved resources from /dev/mem
Newsgroups: gmane.linux.kernel
Date: 2008-10-06 01:01:54 GMT
Subject: RFC: banning device driver reserved resources from /dev/mem
Newsgroups: gmane.linux.kernel
Date: 2008-10-06 01:01:54 GMT
From: Arjan van de Ven <arjan <at> linux.intel.com> Date: Sun, 5 Oct 2008 18:00:15 -0700 Subject: [PATCH] resource: don't allow /dev/mem access reserved resources Device drivers that use pci_request_regions() (and similar APIs) have a reasonable expectation that they are the only ones accessing their device. As part of the e1000e hunt, we were afraid that some userland (X or some bootsplash stuff) was mapping the MMIO region, that the driver thought it had exclusively, via /dev/mem. This patch adds, to the existing config option to restrict /dev/mem, the reserved regions to the "banned from /dev/mem use" list, so now both kernel memory and device-exclusive MMIO regions are banned. The introduced iomem_is_reserved() function is also planned to be used for other patches in 2.6.28 (pci_ioremap) so is exported here as part of being introduced. Signed-of-by: Arjan van de Ven <arjan <at> linux.intel.com> --- arch/x86/mm/init_32.c | 2 ++ arch/x86/mm/init_64.c | 2 ++ include/linux/ioport.h | 1 + kernel/resource.c | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 63b71d3..c98f5e8 100644 --- a/arch/x86/mm/init_32.c(Continue reading)
RSS Feed