]> git.baikalelectronics.ru Git - kernel.git/commit
x86: fix PTE corruption issue while mapping RAM using /dev/mem
authorSuresh Siddha <suresh.b.siddha@intel.com>
Tue, 13 Jan 2009 18:21:30 +0000 (10:21 -0800)
committerIngo Molnar <mingo@elte.hu>
Wed, 21 Jan 2009 17:42:32 +0000 (18:42 +0100)
commit6f507b2b54b4ea2ffe5592155cd5f92011c8488d
tree0395c2d245709c0de13917b0a9e404a4b27d2817
parente3e8c3b601ebd8ca587de4dd81a303ca1af2dccb
x86: fix PTE corruption issue while mapping RAM using /dev/mem

Beschorner Daniel reported:
> hwinfo problem since 2.6.28, showing this in the oops:
> Corrupted page table at address 7fd04de3ec00

Also, PaX Team reported a regression with this commit:

> commit f2edf43435953966ab7c13333dbcdc1f7f6b19df
> Author: Suresh Siddha <suresh.b.siddha@intel.com>
> Date:   Wed Sep 24 08:53:33 2008 -0700
>
>     x86: track memtype for RAM in page struct

This commit breaks mapping any RAM page through /dev/mem, as the
reserve_memtype() was not initializing the return attribute type and as such
corrupting the PTE entry that was setup with the return attribute type.

Because of this bug, application mapping this RAM page through /dev/mem
will die with "Corrupted page table at address xxxx" message in the kernel
log and also the kernel identity mapping which maps the underlying RAM
page gets converted to UC.

Fix this by initializing the return attribute type before calling
reserve_ram_pages_type()

Reported-by: PaX Team <pageexec@freemail.hu>
Reported-and-tested-by: Beschorner Daniel <Daniel.Beschorner@facton.com>
Tested-and-Acked-by: PaX Team <pageexec@freemail.hu>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/pat.c