1. 21 4月, 2009 1 次提交
    • S
      x86-64: fix FPU corruption with signals and preemption · 06c38d5e
      Suresh Siddha 提交于
      In 64bit signal delivery path, clear_used_math() was happening before saving
      the current active FPU state on to the user stack for signal handling. Between
      clear_used_math() and the state store on to the user stack, potentially we
      can get a page fault for the user address and can block. Infact, while testing
      we were hitting the might_fault() in __clear_user() which can do a schedule().
      
      At a later point in time, we will schedule back into this process and
      resume the save state (using "xsave/fxsave" instruction) which can lead
      to DNA fault. And as used_math was cleared before, we will reinit the FP state
      in the DNA fault and continue. This reinit will result in loosing the
      FPU state of the process.
      
      Move clear_used_math() to a point after the FPU state has been stored
      onto the user stack.
      
      This issue is present from a long time (even before the xsave changes
      and the x86 merge). But it can easily be exposed in 2.6.28.x and 2.6.29.x
      series because of the __clear_user() in this path, which has an explicit
      __cond_resched() leading to a context switch with CONFIG_PREEMPT_VOLUNTARY.
      
      [ Impact: fix FPU state corruption ]
      Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Cc: <stable@kernel.org>			[2.6.28.x, 2.6.29.x]
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      06c38d5e
  2. 12 4月, 2009 1 次提交
  3. 31 12月, 2008 1 次提交
  4. 20 11月, 2008 1 次提交
  5. 22 10月, 2008 1 次提交
  6. 12 10月, 2008 1 次提交
    • I
      x86, fpu: check __clear_user() return value · 9f482807
      Ingo Molnar 提交于
      fix warning:
      
        arch/x86/kernel/xsave.c: In function ‘save_i387_xstate’:
        arch/x86/kernel/xsave.c:98: warning: ignoring return value of ‘__clear_user’, declared with attribute warn_unused_result
      
      check the return value and act on it. We should not be ignoring faults
      at this point.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9f482807
  7. 08 10月, 2008 2 次提交
  8. 07 9月, 2008 1 次提交
  9. 14 8月, 2008 2 次提交
  10. 31 7月, 2008 5 次提交