summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck/mce_64.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge2008-01-30 13:32:59 +0100
committerIngo Molnar2008-01-30 13:32:59 +0100
commitf29192320f22f1617d50a9c790862603eeef64e6 (patch)
treec496f893ee5d4e8c9636756483411a6ef46c6721 /arch/x86/kernel/cpu/mcheck/mce_64.c
parentxen: mask out PWT too (diff)
downloadkernel-qcow2-linux-f29192320f22f1617d50a9c790862603eeef64e6.tar.gz
kernel-qcow2-linux-f29192320f22f1617d50a9c790862603eeef64e6.tar.xz
kernel-qcow2-linux-f29192320f22f1617d50a9c790862603eeef64e6.zip
x86/pgtable: explain constant sign extension problem
When the _PAGE_FOO constants are defined as (1ul << _PAGE_BIT_FOO), they become unsigned longs. In 32-bit PAE mode, these end up being implicitly cast to 64-bit types when used to manipulate a pte, and because they're unsigned the top 32-bits are 0, destroying the upper bits of the pte. When _PAGE_FOO constants are given a signed integer type, the cast to 64-bits will sign-extend so that the upper bits are all ones, preserving the upper pte bits in manipulations. Explain this in a prominent place. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce_64.c')
0 files changed, 0 insertions, 0 deletions