kernel-fxtec-pro1x/arch/x86/include/asm
Jeremy Fitzhardinge b534816b55 x86: don't apply __supported_pte_mask to non-present ptes
On an x86 system which doesn't support global mappings,
__supported_pte_mask has _PAGE_GLOBAL clear, to make sure it never
appears in the PTE.  pfn_pte() and so on will enforce it with:

static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
{
	return __pte((((phys_addr_t)page_nr << PAGE_SHIFT) |
		      pgprot_val(pgprot)) & __supported_pte_mask);
}

However, we overload _PAGE_GLOBAL with _PAGE_PROTNONE on non-present
ptes to distinguish them from swap entries.  However, applying
__supported_pte_mask indiscriminately will clear the bit and corrupt the
pte.

I guess the best fix is to only apply __supported_pte_mask to present
ptes.  This seems like the right solution to me, as it means we can
completely ignore the issue of overlaps between the present pte bits and
the non-present pte-as-swap entry use of the bits.

__supported_pte_mask contains the set of flags we support on the
current hardware.  We also use bits in the pte for things like
logically present ptes with no permissions, and swap entries for
swapped out pages.  We should only apply __supported_pte_mask to
present ptes, because otherwise we may destroy other information being
stored in the ptes.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-02-04 21:33:09 -08:00
..
bigsmp
es7000 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-10 06:13:09 -08:00
mach-default x86: fix apic.c build error on latest git 2009-01-12 19:24:23 +01:00
mach-generic x86: rename mp_config_table to mpc_table 2009-01-04 13:22:58 +01:00
mach-rdc321x
mach-voyager
numaq Merge branches 'x86/cleanups', 'x86/mpparse', 'x86/numa' and 'x86/uv' into x86/urgent 2009-01-06 17:39:52 +01:00
summit Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-10 06:13:09 -08:00
uv x86: uv_bau.h: fix dubious bitfield 2008-12-30 13:31:37 -08:00
visws
xen x86: don't apply __supported_pte_mask to non-present ptes 2009-02-04 21:33:09 -08:00
a.out-core.h
a.out.h
acpi.h
agp.h
alternative-asm.h
alternative.h
amd_iommu.h
amd_iommu_types.h AMD IOMMU: add init code for statistic collection 2009-01-03 14:11:58 +01:00
apic.h x86: apic.c: xapic_icr_read and x2apic_icr_read should be static 2008-12-30 13:31:28 -08:00
apicdef.h
arch_hooks.h
asm.h
atomic.h
atomic_32.h atomic_t: unify all arch definitions 2009-01-06 15:59:10 -08:00
atomic_64.h atomic_t: unify all arch definitions 2009-01-06 15:59:10 -08:00
auxvec.h
bios_ebda.h
bitops.h x86, generic: mark complex bitops.h inlines as __always_inline 2009-01-13 18:56:30 +01:00
boot.h
bootparam.h
bug.h
bugs.h
byteorder.h byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
cache.h
cacheflush.h
calgary.h
calling.h
checksum.h
checksum_32.h
checksum_64.h
cmpxchg.h
cmpxchg_32.h
cmpxchg_64.h
compat.h
cpu.h
cpufeature.h
cputime.h
current.h
debugreg.h
delay.h
desc.h x86: fix lguest used_vectors breakage, -v2 2008-12-23 22:37:28 +01:00
desc_defs.h
device.h
div64.h
dma-mapping.h Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
dma.h
dmi.h
ds.h
dwarf2.h
e820.h headers_check fix: x86, e820.h 2009-01-31 00:16:22 +05:30
edac.h
efi.h x86: efi.c declare add_efi_memmap before they get used 2008-12-29 18:17:32 +01:00
elf.h [S390] arch_setup_additional_pages arguments 2008-12-25 13:38:54 +01:00
emergency-restart.h
errno.h
fb.h
fcntl.h
fixmap.h
fixmap_32.h
fixmap_64.h
floppy.h
frame.h
ftrace.h
futex.h
gart.h
genapic.h
genapic_32.h x86: rename mpc_config_processor to mpc_cpu 2009-01-04 13:23:00 +01:00
genapic_64.h
geode.h
gpio.h
hardirq.h
hardirq_32.h
hardirq_64.h
highmem.h
hpet.h
hugetlb.h
hw_irq.h
hypertransport.h
hypervisor.h
i387.h
i8253.h
i8259.h
ia32.h
ia32_unistd.h
idle.h
intel_arch_perfmon.h
io.h x86: fix assumed to be contiguous leaf page tables for kmap_atomic region (take 2) 2009-01-16 13:47:04 +01:00
io_32.h
io_64.h
io_apic.h Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:20:19 -08:00
ioctl.h
ioctls.h
iomap.h
iommu.h Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:10:19 -08:00
ipcbuf.h
ipi.h
irq.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask 2009-01-03 18:53:31 +01:00
irq_regs.h
irq_regs_32.h
irq_regs_64.h
irq_remapping.h
irq_vectors.h
irqflags.h
ist.h
k8.h
Kbuild byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
kdebug.h
kexec.h
kgdb.h
kmap_types.h
kprobes.h
kvm.h headers_check fix: x86, kvm.h 2009-01-31 00:16:44 +05:30
kvm_host.h KVM: change KVM to use IOMMU API 2009-01-03 14:11:07 +01:00
kvm_para.h
kvm_x86_emulate.h KVM: x86 emulator: add Src2 decode set 2008-12-31 16:55:42 +02:00
ldt.h
lguest.h x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids 2009-01-03 19:00:55 +01:00
lguest_hcall.h
linkage.h
local.h
math_emu.h
mc146818rtc.h
mca.h
mca_dma.h
mce.h headers_check fix: x86, mce.h 2009-01-31 00:17:13 +05:30
microcode.h
mman.h
mmconfig.h
mmu.h
mmu_context.h
mmu_context_32.h
mmu_context_64.h
mmx.h
mmzone.h
mmzone_32.h
mmzone_64.h
module.h
mpspec.h x86: apic.c declare pic_mode before they get used 2008-12-29 18:17:30 +01:00
mpspec_def.h x86: rename all fields of mpc_table mpc_X to X 2009-01-05 14:08:34 +01:00
msgbuf.h
msidef.h
msr-index.h x86: add MSR_IA32_MISC_ENABLE bits to <asm/msr-index.h> 2009-01-21 15:13:53 -08:00
msr.h Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-28 12:21:10 -08:00
mtrr.h headers_check fix: x86, mtrr.h 2009-01-31 00:17:39 +05:30
mutex.h
mutex_32.h
mutex_64.h
nmi.h
nops.h
numa.h
numa_32.h
numa_64.h
numaq.h
olpc.h
page.h
page_32.h
page_64.h
param.h
paravirt.h
parport.h
pat.h
pci-direct.h
pci.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-12-31 23:05:57 +10:30
pci_32.h
pci_64.h
pci_x86.h x86, pci: move arch/x86/pci/pci.h to arch/x86/include/asm/pci_x86.h 2008-12-29 18:17:36 +01:00
pda.h
percpu.h
pgalloc.h x86, mm: fix pte_free() 2009-01-23 18:42:06 +01:00
pgtable-2level-defs.h
pgtable-2level.h
pgtable-3level-defs.h
pgtable-3level.h
pgtable.h x86: don't apply __supported_pte_mask to non-present ptes 2009-02-04 21:33:09 -08:00
pgtable_32.h
pgtable_64.h
poll.h
posix_types.h
posix_types_32.h
posix_types_64.h
prctl.h
processor-cyrix.h
processor-flags.h
processor.h Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-28 12:21:10 -08:00
proto.h
ptrace-abi.h headers_check fix: x86, ptrace-abi.h 2009-01-31 00:18:03 +05:30
ptrace.h
pvclock-abi.h
pvclock.h
reboot.h
reboot_fixups.h
required-features.h
resource.h
resume-trace.h
rio.h
rtc.h
rwlock.h
rwsem.h
scatterlist.h
seccomp.h
seccomp_32.h
seccomp_64.h
sections.h
segment.h
sembuf.h
serial.h
setup.h x86: rename mpc_config_oemtable to mpc_oemtable 2009-01-04 13:23:02 +01:00
shmbuf.h
shmparam.h
sigcontext.h headers_check fix: x86, sigcontext.h 2009-01-31 00:18:30 +05:30
sigcontext32.h headers_check fix: x86, sigcontext32.h 2009-01-31 00:18:58 +05:30
sigframe.h
siginfo.h
signal.h
smp.h x86: cleanup remaining cpumask_t ops in smpboot code 2009-01-04 15:39:26 +01:00
socket.h
sockios.h
sparsemem.h
spinlock.h
spinlock_types.h
srat.h
stacktrace.h
stat.h
statfs.h
string.h
string_32.h
string_64.h
suspend.h
suspend_32.h
suspend_64.h
svm.h KVM: SVM: move svm.h to include/asm 2008-12-31 16:52:28 +02:00
swab.h headers_check fix: x86, swab.h 2009-01-31 00:19:32 +05:30
swiotlb.h swiotlb: replace architecture-specific swiotlb.h with linux/swiotlb.h 2008-12-28 10:04:00 +01:00
sync_bitops.h
sys_ia32.h x86: introducing asm/sys_ia32.h 2008-12-29 13:18:40 +01:00
syscall.h
syscalls.h Revert "x86: signal: change type of paramter for sys_rt_sigreturn()" 2009-01-21 09:43:18 +01:00
system.h
system_64.h
tce.h
termbits.h
termios.h
therm_throt.h
thread_info.h Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-28 12:21:10 -08:00
time.h
timer.h
timex.h x86: use standard PIT frequency 2009-01-25 16:57:47 +01:00
tlb.h
tlbflush.h
topology.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask 2009-01-03 18:53:31 +01:00
trampoline.h
traps.h
tsc.h
types.h
uaccess.h Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:10:19 -08:00
uaccess_32.h
uaccess_64.h
ucontext.h
unaligned.h
unistd.h
unistd_32.h
unistd_64.h
user.h
user32.h
user_32.h
user_64.h
vdso.h
vga.h
vgtod.h
vic.h
virtext.h x86: cpu_emergency_svm_disable() function 2008-12-31 16:52:30 +02:00
vm86.h
vmi.h
vmi_time.h
vmware.h
vmx.h KVM: VMX: move ASM_VMX_* definitions from asm/kvm_host.h to asm/vmx.h 2008-12-31 16:52:28 +02:00
voyager.h
vsyscall.h
xcr.h
xor.h
xor_32.h
xor_64.h
xsave.h