DragonFly BSD
DragonFly commits List (threaded) for 2012-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: kernel - Make pcb_onfault more robust.


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Oct 2012 12:16:11 -0700 (PDT)

commit 93ad6da25762a0c741b5f653bdd58afe310c4899
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Thu Oct 11 12:12:25 2012 -0700

    kernel - Make pcb_onfault more robust.
    
    * Record the expected kernel stack pointer along with the pcb_onfault
      action.  Adjust the trap code to only take the action if the frame's
      stack pointer matches the recorded expected stack pointer.
    
      Otherwise this might be a recursive trap and we definitely do NOT want
      to execute the on-fault stuff in that situation.
    
    * Prior to these changes recursive traps during uiomove()s could result
      in a kernel stack so corrupt that finding the actual cause of the panic
      becomes impossible.  This is believed to be making life difficult for us
      trying to track down a particular i386 panic.
    
    * On x86-64 we had to increase the size of the pcb structure.  kgdb on
      kernel cores and live kernels will be effected (needs recompile).

Summary of changes:
 sys/kern/lwkt_ipiq.c                  |    1 +
 sys/platform/pc32/i386/bcopy.s        |   13 ++++++++-----
 sys/platform/pc32/i386/genassym.c     |    1 +
 sys/platform/pc32/i386/support.s      |   17 ++++++++++++++++-
 sys/platform/pc32/i386/trap.c         |   19 +++++++++++++++++--
 sys/platform/pc32/i386/vm_machdep.c   |    5 +++--
 sys/platform/pc32/include/pcb.h       |    2 +-
 sys/platform/pc64/include/pcb.h       |   10 ++++++----
 sys/platform/pc64/x86_64/genassym.c   |    1 +
 sys/platform/pc64/x86_64/support.s    |   15 ++++++++++++++-
 sys/platform/pc64/x86_64/trap.c       |   26 +++++++++++++++++++++-----
 sys/platform/pc64/x86_64/vm_machdep.c |    3 ++-
 12 files changed, 91 insertions(+), 22 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/93ad6da25762a0c741b5f653bdd58afe310c4899


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]