From owner-svn-src-head@FreeBSD.ORG Tue May 27 23:57:22 2014 Return-Path: Delivered-To: svn-src-head@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 D8191C29; Tue, 27 May 2014 23:57:22 +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 AADAD23E1; Tue, 27 May 2014 23:57:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4RNvMOK002064; Tue, 27 May 2014 23:57:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4RNvMB8002062; Tue, 27 May 2014 23:57:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201405272357.s4RNvMB8002062@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 27 May 2014 23:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266778 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 23:57:22 -0000 Author: nwhitehorn Date: Tue May 27 23:57:22 2014 New Revision: 266778 URL: http://svnweb.freebsd.org/changeset/base/266778 Log: Repair nested signal handling on PowerPC. The signal trampoline code was not allocating space for the parameter save area in the stack frame. If the compiler chose to save the argument to the signal handler on the stack, it would overwrite the first 32 bits of the sigaction struct with it, corrupting it for a subsequent invocation. PR: powerpc/183040 MFC after: 8 days Modified: head/sys/powerpc/powerpc/sigcode32.S head/sys/powerpc/powerpc/sigcode64.S Modified: head/sys/powerpc/powerpc/sigcode32.S ============================================================================== --- head/sys/powerpc/powerpc/sigcode32.S Tue May 27 23:39:28 2014 (r266777) +++ head/sys/powerpc/powerpc/sigcode32.S Tue May 27 23:57:22 2014 (r266778) @@ -45,9 +45,9 @@ */ .globl CNAME(sigcode32),CNAME(szsigcode32) CNAME(sigcode32): - addi 1,1,-16 /* reserved space for callee */ + addi 1,1,-20 /* reserved space for callee */ blrl - addi 3,1,16+SF_UC /* restore sp, and get &frame->sf_uc */ + addi 3,1,20+SF_UC /* restore sp, and get &frame->sf_uc */ li 0,SYS_sigreturn sc /* sigreturn(scp) */ li 0,SYS_exit Modified: head/sys/powerpc/powerpc/sigcode64.S ============================================================================== --- head/sys/powerpc/powerpc/sigcode64.S Tue May 27 23:39:28 2014 (r266777) +++ head/sys/powerpc/powerpc/sigcode64.S Tue May 27 23:57:22 2014 (r266778) @@ -45,7 +45,7 @@ */ .globl CNAME(sigcode64),CNAME(szsigcode64) CNAME(sigcode64): - addi 1,1,-48 /* reserved space for callee */ + addi 1,1,-112 /* reserved space for callee */ mflr 2 /* resolve function descriptor */ ld 0,0(2) ld 2,8(2) @@ -53,7 +53,7 @@ CNAME(sigcode64): blrl - addi 3,1,48+SF_UC /* restore sp, and get &frame->sf_uc */ + addi 3,1,112+SF_UC /* restore sp, and get &frame->sf_uc */ li 0,SYS_sigreturn sc /* sigreturn(scp) */ li 0,SYS_exit