Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2015 17:28:20 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r287113 - head/sys/arm64/arm64
Message-ID:  <201508241728.t7OHSKhL042210@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Mon Aug 24 17:28:19 2015
New Revision: 287113
URL: https://svnweb.freebsd.org/changeset/base/287113

Log:
  Check the frame pointer is within the kernel before accessing it.

Modified:
  head/sys/arm64/arm64/unwind.c

Modified: head/sys/arm64/arm64/unwind.c
==============================================================================
--- head/sys/arm64/arm64/unwind.c	Mon Aug 24 16:32:57 2015	(r287112)
+++ head/sys/arm64/arm64/unwind.c	Mon Aug 24 17:28:19 2015	(r287113)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 
 #include <machine/stack.h>
+#include <machine/vmparam.h>
 
 int
 unwind_frame(struct unwind_state *frame)
@@ -39,7 +40,7 @@ unwind_frame(struct unwind_state *frame)
 	uint64_t fp;
 
 	fp = frame->fp;
-	if (fp == 0)
+	if (!INKERNEL(fp))
 		return (-1);
 
 	frame->sp = fp + 0x10;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508241728.t7OHSKhL042210>