From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 730EE396ECB0; Thu, 14 May 2020 15:48:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 730EE396ECB0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1589471285; bh=OWgqF4LUh9hoa4U+fAGxm0CC25PqMMetx4ZFWjwoC3w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E7c4L23KN13ytO7dWQ/q+Ohwj3Ia7pN2DhHdnGkm4e9pz930iAOc7M/adlqnSaVuw kpcQklNT7AzIwbsydVwoZ2BjZ3E9WJWl3zM+IdZrw/hLCST6nmDEFu3u8iN9VtOm7Q K1MQexnhRJ0kwP2HsDr4HVcIJTAh7c61EV/dGtuc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94514] aarch64: unwinding across mixed pac-ret and non-pac-ret frames is broken Date: Thu, 14 May 2020 15:48:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: EH X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: nsz at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2020 15:48:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94514 --- Comment #4 from CVS Commits --- The releases/gcc-8 branch has been updated by Szabolcs Nagy : https://gcc.gnu.org/g:d523cd5109bc5ab42edf85385f6a1085e0d6028c commit r8-10252-gd523cd5109bc5ab42edf85385f6a1085e0d6028c Author: Szabolcs Nagy Date: Fri Apr 3 09:35:41 2020 +0000 aarch64, libgcc: Fix unwinding from pac-ret to normal frames [PR94514] With -mbranch-protection=3Dpac-ret the debug info toggles the signedness state of the return address so the unwinder knows when the return address needs pointer authentication. The unwind context flags were not updated according to the dwarf frame info. This causes unwinding across frames that were built without pac-ret to incorrectly authenticate the return address wich corrupts the return address on a system where PAuth is enabled. Note: This even affects systems where all code use pac-ret because unwinding across a signal frame the return address is not signed. Changed branch-protection=3Dpac-ret to sign-return-address=3Dall etc in the tests for the backport. gcc/testsuite/ChangeLog: Backport from mainline. 2020-04-23 Szabolcs Nagy PR target/94514 * g++.target/aarch64/pr94514.C: Require lp64. * gcc.target/aarch64/pr94514.c: Likewise. Backport from mainline. 2020-04-21 Szabolcs Nagy PR target/94514 * g++.target/aarch64/pr94514.C: New test. * gcc.target/aarch64/pr94514.c: New test. libgcc/ChangeLog: Backport from mainline. 2020-04-21 Szabolcs Nagy PR target/94514 * config/aarch64/aarch64-unwind.h (aarch64_frob_update_context): Update context->flags accroding to the frame state.=