Re: RFC: [PATCH] resource: ensure MMIO exclusivity for devicedrivers

From: Ingo Molnar
Date: Mon Oct 27 2008 - 11:32:30 EST



* Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:

>
> From: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
> Date: Wed, 22 Oct 2008 19:55:31 -0700
> Subject: [PATCH] resource: ensure MMIO exclusivity for device drivers
>
> 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 or via various sysfs resource mappings.
>
> This patch adds the option for device drivers to cause their reserved
> regions to be on the "banned from /dev/mem use" list, so now both kernel memory
> and device-exclusive MMIO regions are banned.
> NOTE: This is only active when CONFIG_STRICT_DEVMEM is set.
>
> In addition to the config option, a kernel parameter iomem=relaxed is
> provided for the cases where developers want to diagnose, in the field,
> drivers issues from userspace despite the drivers explicit request.
>
> Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>

the concept looks fine to me - the stricter we are in this area the
better IMO. Unless there are objections, i guess it's best to do this
via the PCI tree?

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/