2f892aca91
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 |
||
---|---|---|
.. | ||
include | ||
apic.c | ||
apic.h | ||
apic_asm.h | ||
apic_asm.S | ||
arch_clock.c | ||
arch_do_vmctl.c | ||
arch_system.c | ||
arch_watchdog.c | ||
breakpoints.c | ||
debugreg.h | ||
debugreg.S | ||
do_int86.c | ||
do_iopenable.c | ||
do_readbios.c | ||
do_sdevio.c | ||
exception.c | ||
glo.h | ||
i8259.c | ||
kernel.lds | ||
klib.S | ||
Makefile.inc | ||
memory.c | ||
mpx.S | ||
oxpcie.c | ||
oxpcie.h | ||
protect.c | ||
proto.h | ||
sconst.h | ||
serial.h |