Re: [patch] x86: Fix /dev/mem mmap breakage when PAT is disabled

From: Arjan van de Ven
Date: Thu Oct 30 2008 - 16:20:54 EST


On Wed, 29 Oct 2008 19:02:03 -0700
Ravikiran G Thirumalai <kiran@xxxxxxxxxxxx> wrote:

> Fix mmap to /dev/mem when CONFIG_X86_PAT is off and
> CONFIG_STRICT_DEVMEM is off
>
> mmap to /dev/mem on kernel memory has been failing since the
> introduction of PAT (CONFIG_STRICT_DEVMEM=n case). Seems like
> the check to avoid cache aliasing with PAT is kicking in even
> when PAT is disabled. The bug seems to have crept in 2.6.26.
>
> This patch makes sure that mmap to regular kernel memory
> succeeds if CONFIG_STRICT_DEVMEM=n and
> PAT is disabled. The checks to avoid cache aliasing
> still happens if PAT is enabled.

well... technically the aliases are bad without PAT as well...


--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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/