svn commit: r256941 - head/sys/arm/arm

Olivier Houchard cognet at FreeBSD.org
Tue Oct 22 21:47:35 UTC 2013


Author: cognet
Date: Tue Oct 22 21:47:34 2013
New Revision: 256941
URL: http://svnweb.freebsd.org/changeset/base/256941

Log:
  Try to make sure the frame is indeed in the kernel memory.

Modified:
  head/sys/arm/arm/stack_machdep.c

Modified: head/sys/arm/arm/stack_machdep.c
==============================================================================
--- head/sys/arm/arm/stack_machdep.c	Tue Oct 22 21:32:28 2013	(r256940)
+++ head/sys/arm/arm/stack_machdep.c	Tue Oct 22 21:47:34 2013	(r256941)
@@ -43,13 +43,16 @@ __FBSDID("$FreeBSD$");
  * APCS where it lays out the stack incorrectly. Because of this we disable
  * this when building for ARM EABI or when building with clang.
  */
+
+extern vm_offset_t kernel_vm_end;
+
 static void
 stack_capture(struct stack *st, u_int32_t *frame)
 {
 #if !defined(__ARM_EABI__) && !defined(__clang__)
 	vm_offset_t callpc;
 
-	while (INKERNEL(frame)) {
+	while (INKERNEL(frame) && (vm_offset_t)frame < kernel_vm_end) {
 		callpc = frame[FR_SCP];
 		if (stack_put(st, callpc) == -1)
 			break;


More information about the svn-src-all mailing list