kernel-ark/include/asm-i386
Andi Kleen 18bd057b14 [PATCH] i386/x86-64: Fix x87 information leak between processes
AMD K7/K8 CPUs only save/restore the FOP/FIP/FDP x87 registers in FXSAVE
when an exception is pending.  This means the value leak through
context switches and allow processes to observe some x87 instruction
state of other processes.

This was actually documented by AMD, but nobody recognized it as
being different from Intel before.

The fix first adds an optimization: instead of unconditionally
calling FNCLEX after each FXSAVE test if ES is pending and skip
it when not needed. Then do a x87 load from a kernel variable to
clear FOP/FIP/FDP.

This means other processes always will only see a constant value
defined by the kernel in their FP state.

I took some pain to make sure to chose a variable that's already
in L1 during context switch to make the overhead of this low.

Also alternative() is used to patch away the new code on CPUs
who don't need it.

Patch for both i386/x86-64.

The problem was discovered originally by Jan Beulich. Richard
Brunner provided the basic code for the workarounds, with contribution
from Jan.

This is CVE-2006-1056

Cc: richard.brunner@amd.com
Cc: jbeulich@novell.com

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-20 07:58:11 -07:00
..
mach-bigsmp
mach-default [PATCH] RTC: Fix up some RTC whitespace and style 2006-03-28 09:16:01 -08:00
mach-es7000 [PATCH] Compilation fix for ES7000 when no ACPI is specified in config (i386) 2006-03-23 07:38:04 -08:00
mach-generic
mach-numaq
mach-summit
mach-visws [PATCH] i386: fix uses of user_mode() vs. user_mode_vm() 2006-03-23 07:38:05 -08:00
mach-voyager [PATCH] i386: fix uses of user_mode() vs. user_mode_vm() 2006-03-23 07:38:05 -08:00
8253pit.h
a.out.h
acpi.h [PATCH] don't call check_acpi_pci() on x86 with ACPI disabled 2006-03-22 07:53:54 -08:00
agp.h
alternative.h [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
apic.h [PATCH] i386: Consolidate modern APIC handling 2006-04-09 11:53:51 -07:00
apicdef.h [PATCH] i386 kdump timer vector lockup fix 2006-03-31 12:18:50 -08:00
arch_hooks.h [PATCH] x86: early printk handling fixes 2006-03-23 07:38:05 -08:00
atomic.h [PATCH] asm-i386/atomic.h: local_irq_save should be used instead of local_irq_disable 2006-04-19 09:13:50 -07:00
auxvec.h
bitops.h [PATCH] bitops: i386: use generic bitops 2006-03-26 08:57:12 -08:00
boot.h
bug.h
bugs.h
byteorder.h
cache.h [PATCH] Move read_mostly definition to asm/cache.h 2006-03-23 07:38:10 -08:00
cacheflush.h
checksum.h
cpu.h
cpufeature.h [PATCH] i386/x86-64: Fix x87 information leak between processes 2006-04-20 07:58:11 -07:00
cputime.h
current.h
debugreg.h
delay.h
desc.h [PATCH] x86: fix broken SMP boot sequence 2006-02-24 14:31:38 -08:00
div64.h
dma-mapping.h
dma.h
dmi.h [PATCH] x86_64: Implement early DMI scanning 2006-03-25 09:10:55 -08:00
e820.h [PATCH] x86_64: Introduce e820_all_mapped 2006-04-09 11:53:50 -07:00
edac.h
elf.h
emergency-restart.h
errno.h
fcntl.h
fixmap.h
floppy.h [PATCH] Remove long dead i386 floppy asm code 2006-03-31 12:18:50 -08:00
futex.h [PATCH] lightweight robust futexes updates 2006-03-27 08:44:49 -08:00
genapic.h
hardirq.h
highmem.h
hpet.h [PATCH] x86_64: Fix drift with HPET timer enabled 2006-04-09 11:53:53 -07:00
hw_irq.h
i387.h [PATCH] i386/x86-64: Fix x87 information leak between processes 2006-04-20 07:58:11 -07:00
i8253.h
i8259.h
ide.h
io_apic.h
io.h [PATCH] remove ISA legacy functions: remove the helpers 2006-03-24 07:33:19 -08:00
ioctl.h
ioctls.h
ipc.h
ipcbuf.h
irq.h
ist.h
kdebug.h [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
kexec.h
kmap_types.h
kprobes.h [PATCH] x86: kprobes-booster 2006-03-26 08:57:04 -08:00
ldt.h
linkage.h
local.h [PATCH] make local_t signed 2006-03-31 12:18:55 -08:00
math_emu.h
mc146818rtc.h
mca_dma.h
mca.h
mman.h [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
mmu_context.h
mmu.h
mmx.h
mmzone.h [PATCH] unify pfn_to_page: i386 pfn_to_page 2006-03-27 08:44:44 -08:00
module.h
mpspec_def.h
mpspec.h [PATCH] mptspec: remove duplicate #include 2006-04-11 06:18:34 -07:00
msgbuf.h
msi.h
msr.h
mtrr.h [PATCH] Fix the imlicit declaration of mtrr_centaur_report_mcr in arch/i386/kernel/cpu/centaur.c 2006-03-23 07:38:06 -08:00
mutex.h [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
namei.h
nmi.h
node.h
numa.h
numaq.h
page.h [PATCH] unify pfn_to_page: i386 pfn_to_page 2006-03-27 08:44:44 -08:00
param.h
parport.h
pci-direct.h
pci.h
percpu.h
pgalloc.h
pgtable-2level-defs.h
pgtable-2level.h [PATCH] i386: actively synchronize vmalloc area when registering certain callbacks 2006-03-23 07:38:05 -08:00
pgtable-3level-defs.h
pgtable-3level.h [PATCH] i386: actively synchronize vmalloc area when registering certain callbacks 2006-03-23 07:38:05 -08:00
pgtable.h [PATCH] Enable mprotect on huge pages 2006-03-22 07:54:03 -08:00
poll.h [PATCH] POLLRDHUP/EPOLLRDHUP handling for half-closed devices notifications 2006-03-25 08:22:56 -08:00
posix_types.h
processor.h [PATCH] arch/i386/kernel/microcode.c: remove the obsolete microcode_ioctl 2006-03-28 09:16:06 -08:00
ptrace.h
resource.h
rtc.h
rwlock.h [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
rwsem.h
scatterlist.h
seccomp.h
sections.h
segment.h
semaphore.h [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
sembuf.h
serial.h
setup.h [PATCH] unify PFN_* macros 2006-03-27 08:44:48 -08:00
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
smp.h
socket.h
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h [PATCH] i386 spinlocks: disable interrupts only if we enabled them 2006-03-23 07:38:06 -08:00
srat.h
stat.h [PATCH] 2TB files: st_blocks is invalid when calling stat64 2006-03-26 08:57:00 -08:00
statfs.h
string.h
suspend.h
system.h [PATCH] kill include/linux/platform.h, default_idle() cleanup 2006-03-24 07:33:21 -08:00
termbits.h
termios.h
thread_info.h [PATCH] i386: fix singlestepping though a syscall 2006-02-17 08:55:21 -08:00
timer.h
timex.h
tlb.h
tlbflush.h
topology.h [PATCH] sched: new sched domain for representing multi-core 2006-03-27 08:44:43 -08:00
types.h [PATCH] 2TB files: add blkcnt_t 2006-03-26 08:57:00 -08:00
uaccess.h [PATCH] i386: Add a temporary to make put_user more type safe 2006-03-23 07:38:04 -08:00
ucontext.h
unaligned.h
unistd.h [PATCH] splice: add support for sys_tee() 2006-04-11 15:51:17 +02:00
user.h
vga.h
vic.h
vm86.h
voyager.h
xor.h