minix/kernel/arch/i386
Ben Gras 2f892aca91 kernel fpu context switching: fix race condition
There seems to have been a broken assumption in the fpu context
restoring code.  It restores the context of the running process, without
guarantee that the current process is the one that will be scheduled.
This caused fpu saving for a different process to be triggered without
fpu hardware being enabled, causing an fpu exception in the kernel. This
practically only shows up with DEBUG_RACE on. Fix my thruby+me.

The fix
 . is to only set the fpu-in-use-by-this-process flag in the
   exception handler, and then take care of fpu restoring when
   actually returning to userspace

And the patch
 . translates fpu saving and restoring to c in arch_system.c,
   getting rid of a juicy chunk of assembly
 . makes osfxsr_feature private to arch_system.c
 . removes most of the arch dependent code from do_sigsend
2010-06-03 11:32:22 +00:00
..
include Convert kernel over to bsdmake 2010-04-01 22:22:33 +00:00
apic.c Removed some unused variables and functions. 2010-06-02 19:41:38 +00:00
apic.h Fixed some inconsistent strict typing declarations. 2010-05-25 07:23:24 +00:00
apic_asm.h Convert kernel over to bsdmake 2010-04-01 22:22:33 +00:00
apic_asm.S Buildsystem changes for GCC 2010-05-19 13:24:15 +00:00
arch_clock.c Removed some unused variables and functions. 2010-06-02 19:41:38 +00:00
arch_do_vmctl.c Oops, last commit included more than was intended 2010-05-20 08:07:47 +00:00
arch_system.c kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
arch_watchdog.c scheduling - time quantum in miliseconds 2010-05-25 08:06:14 +00:00
breakpoints.c Fix types in debug register functions 2010-04-28 08:35:05 +00:00
debugreg.h Fix types in debug register functions 2010-04-28 08:35:05 +00:00
debugreg.S Buildsystem changes for GCC 2010-05-19 13:24:15 +00:00
do_int86.c Convert kernel over to bsdmake 2010-04-01 22:22:33 +00:00
do_iopenable.c Convert kernel over to bsdmake 2010-04-01 22:22:33 +00:00
do_readbios.c Convert kernel over to bsdmake 2010-04-01 22:22:33 +00:00
do_sdevio.c Convert kernel over to bsdmake 2010-04-01 22:22:33 +00:00
exception.c kernel: small ammendment to pagefault-in-kernel panic 2010-05-12 08:56:11 +00:00
glo.h Local APIC 2009-11-16 21:41:44 +00:00
i8259.c remove intr_disabled() as interrupts are always disabled in the kernel now. 2010-04-26 15:32:42 +00:00
kernel.lds Buildsystem changes for GCC 2010-05-19 13:24:15 +00:00
klib.S kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
Makefile.inc kernel: oxpcie serial card support. 2010-05-19 10:00:02 +00:00
memory.c Oops, last commit included more than was intended 2010-05-20 08:07:47 +00:00
mpx.S kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
oxpcie.c kernel: oxpcie serial card support. 2010-05-19 10:00:02 +00:00
oxpcie.h kernel: oxpcie serial card support. 2010-05-19 10:00:02 +00:00
protect.c Fixed some inconsistent strict typing declarations. 2010-05-25 07:23:24 +00:00
proto.h kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
sconst.h kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
serial.h kernel: oxpcie serial card support. 2010-05-19 10:00:02 +00:00