minix/kernel
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
..
arch/i386 kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
system kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
clock.c scheduling - time quantum in miliseconds 2010-05-25 08:06:14 +00:00
clock.h scheduling - time quantum in miliseconds 2010-05-25 08:06:14 +00:00
config.h Driver refactory for live update and crash recovery. 2010-04-08 13:41:35 +00:00
const.h Fixed brackets in bitmap macros 2010-03-30 08:34:33 +00:00
debug.c kernel: don't try to lookup ANY in debug output. 2010-05-06 22:39:11 +00:00
debug.h Intermediate boot verbosity level EXTRA (2), MAX moved to 3 2010-05-10 18:07:59 +00:00
glo.h kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
interrupt.c kernel: print spurious interrupt message with increasing interval. 2010-05-08 17:21:37 +00:00
ipc.h Set IPC status code only for RECEIVE 2010-04-26 14:43:59 +00:00
kernel.h kernel: oxpcie serial card support. 2010-05-19 10:00:02 +00:00
main.c scheduling - time quantum in miliseconds 2010-05-25 08:06:14 +00:00
Makefile Minor makefile changes for GCC 2010-06-01 09:41:31 +00:00
priv.h kernel: increase some per-process privilege limits. 2010-05-06 22:21:08 +00:00
proc.c kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
proc.h kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
profile.c remove intr_disabled() as interrupts are always disabled in the kernel now. 2010-04-26 15:32:42 +00:00
profile.h cprofile not conditional 2009-01-09 21:44:52 +00:00
proto.h kernel fpu context switching: fix race condition 2010-06-03 11:32:22 +00:00
start.c kernel: oxpcie serial card support. 2010-05-19 10:00:02 +00:00
system.c KCall methods do not depend on m_source and m_type fields 2010-06-01 08:54:31 +00:00
system.h KCall methods do not depend on m_source and m_type fields 2010-06-01 08:54:31 +00:00
table.c GCC build fixes/updates 2010-05-26 18:45:55 +00:00
type.h scheduling - time quantum in miliseconds 2010-05-25 08:06:14 +00:00
utility.c scheduling - time quantum in miliseconds 2010-05-25 08:06:14 +00:00
vm.h intr_disabled() tests removed 2010-02-09 15:29:58 +00:00
watchdog.c Remove useless symbol declarations from headers, make symbols local where possible, add some explicit initialization to global variables. 2010-04-22 07:49:40 +00:00
watchdog.h Convert kernel over to bsdmake 2010-04-01 22:22:33 +00:00