From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 20:51: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 0B69AAC4; Fri, 24 Jan 2014 20:51: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB4F3178C; Fri, 24 Jan 2014 20:51:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OKpuZd020341; Fri, 24 Jan 2014 20:51:56 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OKpun0020340; Fri, 24 Jan 2014 20:51:56 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201401242051.s0OKpun0020340@svn.freebsd.org> From: Andrew Turner Date: Fri, 24 Jan 2014 20:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261137 - head/sys/arm/include X-SVN-Group: head 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.17 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: Fri, 24 Jan 2014 20:51:57 -0000 Author: andrew Date: Fri Jan 24 20:51:56 2014 New Revision: 261137 URL: http://svnweb.freebsd.org/changeset/base/261137 Log: Correct the alignment of sp through functions that use UNWINDSVCFRAME. We were incorrectly adding the trap frame padding to the stack pointer after reading it's value and unaligning it. Modified: head/sys/arm/include/asmacros.h Modified: head/sys/arm/include/asmacros.h ============================================================================== --- head/sys/arm/include/asmacros.h Fri Jan 24 20:26:00 2014 (r261136) +++ head/sys/arm/include/asmacros.h Fri Jan 24 20:51:56 2014 (r261137) @@ -216,8 +216,13 @@ ldmia sp, {sp, lr, pc}^ /* Restore lr and exit */ #endif #if defined(__ARM_EABI__) +/* + * Unwind hints so we can unwind past functions that use + * PULLFRAMEFROMSVCANDEXIT. They are run in reverse order. + * As the last thing we do is restore the stack pointer + * we can ignore the padding at the end of struct trapframe. + */ #define UNWINDSVCFRAME \ - .pad #(4); /* Skip stack alignment */ \ .save {r13-r15}; /* Restore sp, lr, pc */ \ .pad #(2*4); /* Skip user sp and lr */ \ .save {r0-r12}; /* Restore r0-r12 */ \