search for: tsk_used_math

Displaying 3 results from an estimated 3 matches for "tsk_used_math".

2013 Nov 07
0
Xen PV ABI on FPU doesn't match with pvops kernel FPU code, reducing to a serious memory data damage
...kernel before 2.6.26 everything is fine since they don't sleep nor enable interrupts during the handler, however the current mainline pvops kernel has a schedule window opened within it. [Pls see the code below, void math_state_restore(void) { struct task_struct *tsk = current; if (!tsk_used_math(tsk)) { local_irq_enable(); <<<< Here it might open a schedule window /* * does a slab alloc which can sleep */ if (init_fpu(tsk)) { /* * ran out of memory! */ do_group_exit...
2013 Nov 07
0
Xen PV ABI on FPU doesn't match with pvops kernel FPU code, reducing to a serious memory data damage
...kernel before 2.6.26 everything is fine since they don't sleep nor enable interrupts during the handler, however the current mainline pvops kernel has a schedule window opened within it. [Pls see the code below, void math_state_restore(void) { struct task_struct *tsk = current; if (!tsk_used_math(tsk)) { local_irq_enable(); <<<< Here it might open a schedule window /* * does a slab alloc which can sleep */ if (init_fpu(tsk)) { /* * ran out of memory! */ do_group_exit...
2012 Jun 29
0
[PATCH] linux-2.6.18/x86: improve CR0 read/write handling
...kernel/traps-xen.c +++ b/arch/i386/kernel/traps-xen.c @@ -1057,6 +1057,7 @@ asmlinkage void math_state_restore(struc struct task_struct *tsk = thread->task; /* NB. ''clts'' is done for us by Xen during virtual trap. */ + __get_cpu_var(xen_x86_cr0) &= ~X86_CR0_TS; if (!tsk_used_math(tsk)) init_fpu(tsk); restore_fpu(tsk); --- a/arch/x86_64/kernel/process-xen.c +++ b/arch/x86_64/kernel/process-xen.c @@ -574,6 +574,8 @@ __switch_to(struct task_struct *prev_p, BUG_ON(mcl > _mcl + ARRAY_SIZE(_mcl)); if (unlikely(HYPERVISOR_multicall_check(_mcl, mcl - _mcl, NULL))) B...