git: DragonFly_RELEASE_3_2 kernel - Make pcb_onfault more robust.
Matthew Dillon
dillon at crater.dragonflybsd.org
Thu Oct 11 14:42:02 PDT 2012
commit 2f642e354bb29868dcd14bf46d3bb4561c1129cb
Author: Matthew Dillon <dillon at 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/2f642e354bb29868dcd14bf46d3bb4561c1129cb
--
DragonFly BSD source repository
More information about the Commits
mailing list