public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-94514-4-8tsApXVMCV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94514-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94514

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Szabolcs Nagy <nsz@gcc.gnu.org>:

https://gcc.gnu.org/g:d523cd5109bc5ab42edf85385f6a1085e0d6028c

commit r8-10252-gd523cd5109bc5ab42edf85385f6a1085e0d6028c
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Fri Apr 3 09:35:41 2020 +0000

    aarch64, libgcc: Fix unwinding from pac-ret to normal frames [PR94514]

    With -mbranch-protection=pac-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=pac-ret to sign-return-address=all etc
    in the tests for the backport.

    gcc/testsuite/ChangeLog:

            Backport from mainline.
            2020-04-23  Szabolcs Nagy  <szabolcs.nagy@arm.com>

            PR target/94514
            * g++.target/aarch64/pr94514.C: Require lp64.
            * gcc.target/aarch64/pr94514.c: Likewise.

            Backport from mainline.
            2020-04-21  Szabolcs Nagy  <szabolcs.nagy@arm.com>

            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  <szabolcs.nagy@arm.com>

            PR target/94514
            * config/aarch64/aarch64-unwind.h (aarch64_frob_update_context):
            Update context->flags accroding to the frame state.

  parent reply	other threads:[~2020-05-14 15:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 11:28 [Bug target/94514] New: " nsz at gcc dot gnu.org
2020-04-21 16:50 ` [Bug target/94514] " cvs-commit at gcc dot gnu.org
2020-04-23 13:18 ` cvs-commit at gcc dot gnu.org
2020-05-14 15:17 ` cvs-commit at gcc dot gnu.org
2020-05-14 15:48 ` cvs-commit at gcc dot gnu.org [this message]
2020-05-14 15:51 ` nsz at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94514-4-8tsApXVMCV@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).