]> git.baikalelectronics.ru Git - kernel.git/commit
x86: don't drop NX bit in pte modifier functions on 32-bit
authorAndi Kleen <ak@suse.de>
Wed, 30 Jan 2008 12:33:51 +0000 (13:33 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:33:51 +0000 (13:33 +0100)
commitbf439d50b7614336186fb6b9b71fb1a99e1d9cd2
tree57d9c67decf53c7cd6d522bb4797c45d2e2f7888
parent9ea9bd84073c7fdf846cc25e2502333f9b7b87c1
x86: don't drop NX bit in pte modifier functions on 32-bit

The pte_* modifier functions that cleared bits dropped the NX bit on 32bit
PAE because they only worked in int, but NX is in bit 63. Fix that
by adding appropiate casts so that the arithmetic happens as long long
on PAE kernels.

I decided to just use 64bit arithmetic instead of open coding like
pte_modify() because gcc should generate good enough code for that now.

Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/asm-x86/pgtable.h