git: kernel - Fix signal FP save/restore issues when AVX is enabled

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Jan 12 16:20:43 PST 2013


commit e6e019a801e99ba7888ed009c5c3b3c7b047af1e
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Jan 12 16:16:11 2013 -0800

    kernel - Fix signal FP save/restore issues when AVX is enabled
    
    * The kernel was not saving/restoring the full FP context when entering into
      or returning from a signal, leading to corrupt FP registers even when
      AVX is not used, when AVX is enabled in the kernel.
    
      ANY SIGNAL COULD CORRUPT THE FP STATE.
    
    * Fixed by adjusting the on-user-stack fpsave area sizes and operation.
    
    * This unfortunately changes a number of user visible structures.
      ucontext_t, mcontext_t, sigcontext, sigframe.
    
      It is POSSIBLE that most userland use cases will be unaffected, but I'm
      not holding my breath.
    
    Major-Sleuthing-by: ftigeot
    Testing-by: ftigeot, dillon

Summary of changes:
 sys/cpu/x86_64/include/signal.h    | 11 ++++-------
 sys/cpu/x86_64/include/ucontext.h  | 14 +++++++-------
 sys/platform/pc64/x86_64/machdep.c | 10 +++++++++-
 sys/platform/pc64/x86_64/npx.c     | 16 ++++++++++++----
 4 files changed, 32 insertions(+), 19 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e6e019a801e99ba7888ed009c5c3b3c7b047af1e


-- 
DragonFly BSD source repository



More information about the Commits mailing list