From owner-svn-src-head@freebsd.org Fri Jan 17 23:41:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BF671FE369; Fri, 17 Jan 2020 23:41:36 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47zyJJ3GFlz4GDY; Fri, 17 Jan 2020 23:41:36 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AEC518D75; Fri, 17 Jan 2020 23:41:36 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00HNfaDC095050; Fri, 17 Jan 2020 23:41:36 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00HNfaRw095049; Fri, 17 Jan 2020 23:41:36 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202001172341.00HNfaRw095049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Fri, 17 Jan 2020 23:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356856 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 356856 X-SVN-Commit-Repository: base 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.29 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: Fri, 17 Jan 2020 23:41:36 -0000 Author: bdragon Date: Fri Jan 17 23:41:35 2020 New Revision: 356856 URL: https://svnweb.freebsd.org/changeset/base/356856 Log: [PowerPC] Save a dword in the powerpc64 signal trampoline In r291668, an instruction was added to sigcode64.S without the nop pad at the end being taken out. Due to alignment, this means that a dword is being wasted on the shared page for no reason. Take out this nop, and add some comments while I'm here. Reviewed by: jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D23055 Modified: head/sys/powerpc/powerpc/sigcode64.S Modified: head/sys/powerpc/powerpc/sigcode64.S ============================================================================== --- head/sys/powerpc/powerpc/sigcode64.S Fri Jan 17 22:26:41 2020 (r356855) +++ head/sys/powerpc/powerpc/sigcode64.S Fri Jan 17 23:41:35 2020 (r356856) @@ -63,9 +63,13 @@ CNAME(sigcode64_elfv2): addi 3,1,112+SF_UC /* restore sp, and get &frame->sf_uc */ li 0,SYS_sigreturn sc /* sigreturn(scp) */ + /* + * If we get back to here, it means sigreturn failed. + * As such, we are now stuck in the wrong context. + * Exit immediately without touching the stack. + */ li 0,SYS_exit sc /* exit(errno) */ - nop /* align to doubleword */ endsigcode64: .data