android_kernel_motorola_sm6225/arch/x86_64
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
..
boot [PATCH] vesafb: Fix incorrect logo colors in x86_64 2006-04-11 06:18:54 -07:00
crypto [CRYPTO] aes: Fixed array boundary violation 2006-03-21 20:14:10 +11:00
ia32 [PATCH] x86_64: Add tee and sync_file_range 2006-04-18 10:39:20 -07:00
kernel [PATCH] i386/x86-64: Fix x87 information leak between processes 2006-04-20 07:58:11 -07:00
lib [PATCH] x86_64: remove dead do_softirq_thunk 2006-03-25 09:10:53 -08:00
mm [PATCH] x86_64: Rename e820_mapped to e820_any_mapped 2006-04-09 11:53:17 -07:00
oprofile [PATCH] Move Kprobes and Oprofile to "Instrumentation Support" menu 2005-11-07 07:53:35 -08:00
pci [PATCH] x86_64: Fix embarassing typo in mmconfig bus check 2006-04-11 06:38:57 -07:00
defconfig [PATCH] x86_64: Update defconfig 2006-04-18 10:39:19 -07:00
Kconfig [PATCH] Configurable NODES_SHIFT 2006-04-11 06:18:39 -07:00
Kconfig.debug [PATCH] x86_64: Remove CONFIG_INIT_DEBUG 2006-02-04 16:43:13 -08:00
Makefile [PATCH] x86_64: fix CONFIG_REORDER 2006-04-09 11:53:53 -07:00