linux/arch/x86
Linus Torvalds 5b1cbac377 i387: make irq_fpu_usable() tests more robust
Some code - especially the crypto layer - wants to use the x86
FP/MMX/AVX register set in what may be interrupt (typically softirq)
context.

That *can* be ok, but the tests for when it was ok were somewhat
suspect.  We cannot touch the thread-specific status bits either, so
we'd better check that we're not going to try to save FP state or
anything like that.

Now, it may be that the TS bit is always cleared *before* we set the
USEDFPU bit (and only set when we had already cleared the USEDFP
before), so the TS bit test may actually have been sufficient, but it
certainly was not obviously so.

So this explicitly verifies that we will not touch the TS_USEDFPU bit,
and adds a few related sanity-checks.  Because it seems that somehow
AES-NI is corrupting user FP state.  The cause is not clear, and this
patch doesn't fix it, but while debugging it I really wanted the code to
be more obviously correct and robust.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-02-13 13:56:14 -08:00
..
boot x86/boot-image: Don't leak phdrs in arch/x86/boot/compressed/misc.c::Parse_elf() 2012-01-26 11:30:29 +01:00
configs iommu: Rename the DMAR and INTR_REMAP config options 2011-09-21 10:22:03 +02:00
crypto crypto: serpent-sse2 - remove unneeded LRW/XTS #ifdefs 2011-12-20 15:20:08 +08:00
ia32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit 2012-01-17 16:41:31 -08:00
include/asm i387: make irq_fpu_usable() tests more robust 2012-02-13 13:56:14 -08:00
kernel i387: make irq_fpu_usable() tests more robust 2012-02-13 13:56:14 -08:00
kvm KVM: do not #GP on perf MSR writes when vPMU is disabled 2012-02-01 11:44:46 +02:00
lguest lguest: Make sure interrupt is allocated ok by lguest_setup_irq 2012-01-12 15:44:47 +10:30
lib Merge branches 'sched-urgent-for-linus', 'perf-urgent-for-linus' and 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-01-19 14:53:06 -08:00
math-emu
mm Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus', 'sched-urgent-for-linus' and 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-02-02 11:11:13 -08:00
net net: bpf_jit: fix divide by 0 generation 2012-01-18 16:04:26 -05:00
oprofile Merge branch 'core' of git://amd64.org/linux/rric into perf/core 2011-11-15 11:05:18 +01:00
pci x86/PCI: build amd_bus.o only when CONFIG_AMD_NB=y 2012-01-12 07:54:18 -08:00
platform x86/uv: Fix uninitialized spinlocks 2012-01-26 10:58:34 +01:00
power x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:30:35 -04:00
syscalls x86, syscall: Allow syscall offset to be symbolic 2011-11-18 17:01:19 -08:00
tools x86/tools: Add decoded instruction dump mode 2011-12-05 14:53:23 +01:00
um uml: fix compile for x86-64 2012-01-18 19:26:11 -08:00
vdso Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2011-10-28 05:03:12 -07:00
video x86: fix up files really needing to include module.h 2011-10-31 19:30:36 -04:00
xen Merge commit 'v3.3-rc1' into stable/for-linus-fixes-3.3 2012-01-27 11:14:02 -05:00
.gitignore x86/kprobes: Add arch/x86/tools/insn_sanity to .gitignore 2012-01-16 08:21:59 +01:00
Kbuild
Kconfig x86/numachip: Drop unnecessary conflict with EDAC 2012-01-26 11:03:03 +01:00
Kconfig.cpu mm,x86,um: move CMPXCHG_DOUBLE config option 2012-01-12 20:13:03 -08:00
Kconfig.debug Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-01-11 19:13:40 -08:00
Makefile x86: Generate system call tables and unistd_*.h from tables 2011-11-17 13:35:37 -08:00
Makefile.um um: take arch/um/sys-x86 to arch/x86/um 2011-11-02 14:15:05 +01:00
Makefile_32.cpu