x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround
commitbbc220abf9c3e4dbfb7372596661f580fb15a7c8
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 12 Jan 2014 03:15:52 +0000 (11 19:15 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 15 Feb 2014 19:20:11 +0000 (15 19:20 +0000)
tree65f82420640b032463220430e70fd9fa6a3364af
parent6aa82e036079eaf208bd581c201dc61c9200bb2e
x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround

commit 26bef1318adc1b3a530ecc807ef99346db2aa8b0 upstream.

Before we do an EMMS in the AMD FXSAVE information leak workaround we
need to clear any pending exceptions, otherwise we trap with a
floating-point exception inside this code.

Reported-by: halfdog <me@halfdog.net>
Tested-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/CA%2B55aFxQnY_PCG_n4=0w-VG=YLXL-yr7oMxyy0WU2gCBAf3ydg@mail.gmail.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/kernel/traps.c