Date: Tue, 22 Oct 2013 21:47:34 +0000 (UTC) From: Olivier Houchard <cognet@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256941 - head/sys/arm/arm Message-ID: <201310222147.r9MLlYw0063531@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310222147.r9MLlYw0063531>