Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Alan Hayward <Alan.Hayward@arm.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>,
	 nd <nd@arm.com>
Subject: Re: [PATCH V2] AArch64 pauth: Indicate unmasked addresses in backtrace
Date: Tue, 06 Aug 2019 16:15:00 -0000	[thread overview]
Message-ID: <87imra9snt.fsf@tromey.com> (raw)
In-Reply-To: <20190730144123.11135-1-alan.hayward@arm.com> (Alan Hayward's	message of "Tue, 30 Jul 2019 14:41:27 +0000")

>>>>> "Alan" == Alan Hayward <Alan.Hayward@arm.com> writes:

Alan> Armv8.3-a Pointer Authentication causes the function return address to be
Alan> obfuscated on entry to some functions. GDB must unmask the link register in
Alan> order to produce a backtrace.

Alan> The following patch adds markers of [PAC] to the bracktrace, to indicate
Alan> which addresses needed unmasking.  This includes the backtrace when using MI.

Thanks for the patch.  I don't think this was re-reviewed?

Alan> --- a/gdb/frame.c
Alan> +++ b/gdb/frame.c
Alan> @@ -124,6 +124,8 @@ struct frame_info
Alan>    struct {
Alan>      enum cached_copy_status status;
Alan>      CORE_ADDR value;
Alan> +    /* Did VALUE require unmasking when being read.  */
Alan> +    bool masked;
Alan>    } prev_pc;

I think putting the new field between "status" and "value" will pack the
structure a bit better.

Alan> +bool
Alan> +get_frame_pc_masked (struct frame_info *frame)

Maybe make the parameter "const"?  I see there isn't much use of const
in frame.h, but on the other hand, that's probably just historical and
not required.

Otherwise the patch looks fine to me.  It is ok.  I'd prefer those
changes but if you'd prefer not, a note to that effect is fine.

thanks,
Tom


  reply	other threads:[~2019-08-06 16:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 14:41 Alan Hayward
2019-08-06 16:15 ` Tom Tromey [this message]
2019-08-07 12:35   ` Alan Hayward
2019-08-07 19:24 ` Pedro Alves
2019-08-08  8:55   ` Alan Hayward
2019-08-08 10:33     ` Pedro Alves
2019-08-09 13:22       ` Alan Hayward
2019-08-09 14:17         ` Pedro Alves
2019-08-09 14:46           ` Alan Hayward
2019-08-09 16:51             ` Pedro Alves
2019-08-08 16:58   ` Tom Tromey
2019-08-09 14:11     ` Pedro Alves

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=87imra9snt.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=Alan.Hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.com \
    /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