From owner-svn-src-all@FreeBSD.ORG Sun May 18 16:02:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C5D7AAE; Sun, 18 May 2014 16:02:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 797BB2583; Sun, 18 May 2014 16:02:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IG2vDM002652; Sun, 18 May 2014 16:02:57 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IG2vVN002651; Sun, 18 May 2014 16:02:57 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405181602.s4IG2vVN002651@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 16:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266404 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 16:02:57 -0000 Author: ian Date: Sun May 18 16:02:56 2014 New Revision: 266404 URL: http://svnweb.freebsd.org/changeset/base/266404 Log: MFC 256941: make sure the frame is indeed in the kernel memory. Modified: stable/10/sys/arm/arm/stack_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/stack_machdep.c ============================================================================== --- stable/10/sys/arm/arm/stack_machdep.c Sun May 18 15:31:53 2014 (r266403) +++ stable/10/sys/arm/arm/stack_machdep.c Sun May 18 16:02:56 2014 (r266404) @@ -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;