linux/arch/um/sys-i386
Ingo van Lil fbfe9c847e um: Save FPU registers between task switches
Some time ago Jeff prepared 42daba3165 ("uml: stop saving process FP
state") for UML to stop saving the process FP state between task
switches.  The assumption was that since with SKAS0 every guest process
runs inside a host process context the host OS will take care of keeping
the proper FP state.

Unfortunately this is not true for multi-threaded applications, where
all guest threads share a single host process context yet all may use
the FPU on their own.  Although I haven't verified it I suspect things
to be even worse in SKAS3 mode where all guest processes run inside a
single host process.

The patch reintroduces the saving and restoring of the FP context
between task switches.

[richard@nod.at: Ingo posted this patch in 2009, sadly it was never applied
and got lost. Now in 2011 the problem was reported by Gunnar.]

Signed-off-by: Ingo van Lil <inguin@gmx.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Reported-by: <gunnarlindroth@hotmail.com>
Tested-by: <gunnarlindroth@hotmail.com>
Cc: Stanislav Meduna <stano@meduna.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-14 18:09:37 -07:00
..
asm um: Set __HAVE_ARCH_GATE_AREA for i386 2011-07-25 20:57:13 -07:00
shared/sysdep um: Save FPU registers between task switches 2011-09-14 18:09:37 -07:00
atomic64_cx8_32.S um: mdd support for 64 bit atomic operations 2011-04-28 11:28:21 -07:00
bug.c uml: header untangling 2008-02-05 09:44:28 -08:00
bugs.c UML: make several more things static 2008-07-24 10:47:24 -07:00
checksum.S UML: make several more things static 2008-07-24 10:47:24 -07:00
delay.c um: clean up delay functions 2011-07-25 20:57:12 -07:00
elfcore.c elf coredump: add extended numbering support 2010-03-06 11:26:46 -08:00
fault.c uml: style fixes pass 3 2007-10-16 09:43:05 -07:00
ksyms.c Generic semaphore implementation 2008-04-17 10:42:34 -04:00
ldt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Makefile um: Set __HAVE_ARCH_GATE_AREA for i386 2011-07-25 20:57:13 -07:00
mem.c um: Set __HAVE_ARCH_GATE_AREA for i386 2011-07-25 20:57:13 -07:00
ptrace_user.c uml: style fixes in arch/um/sys-x86_64 2008-02-05 09:44:31 -08:00
ptrace.c ptrace: change signature of arch_ptrace() 2010-10-27 18:03:10 -07:00
setjmp.S
signal.c treewide: fix potentially dangerous trailing ';' in #defined values/expressions 2011-07-21 14:10:00 +02:00
stub_segv.c uml: simplify SIGSEGV handling 2008-02-05 09:44:28 -08:00
stub.S uml: fix a section warning 2009-06-16 19:47:47 -07:00
sys_call_table.S Add generic sys_old_mmap() 2010-03-12 15:52:32 -08:00
syscalls.c Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
sysrq.c
tls.c uml: host TLS diagnostics 2008-02-05 09:44:27 -08:00
user-offsets.c uml: tidy ptrace interface 2008-05-13 08:02:21 -07:00