public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
To: Tom Tromey <tromey@redhat.com>
Cc: libc-ports@sourceware.org,
	Marcus Shawcroft <marcus.shawcroft@gmail.com>,
		Marcus Shawcroft <marcus.shawcroft@arm.com>,
	"Carlos O'Donell" <carlos@redhat.com>,
		Patch Tracking <patch@linaro.org>
Subject: Re: [PATCH] [AARCH64]: Pointer mangling support for Aarch64
Date: Tue, 07 Jan 2014 11:05:00 -0000	[thread overview]
Message-ID: <CAJK_mQ2isVSQgbARrRT6KYGODUyCgAavnD-TTYVYK7_bUjb6LQ@mail.gmail.com> (raw)
In-Reply-To: <87iotxm15i.fsf@fleche.redhat.com>

Hi,

The mangling patch is already up streamed. So I will include this
addition as a separate patch.

I looked at x86 and powerpc ports. So for Aarch64
longjmp/longjmp_target probe expects
   *  first argument 8@address of jmpbuf in x0.
   *  second argument -4@return val in x1.
   *  third argument 8@ address of target in LR/X30.

The patch below does that.

(--snip--)
--- a/ports/sysdeps/aarch64/__longjmp.S
+++ b/ports/sysdeps/aarch64/__longjmp.S
@@ -18,6 +18,7 @@

 #include <sysdep.h>
 #include <jmpbuf-offsets.h>
+#include <stap-probe.h>

 /* __longjmp(jmpbuf, val) */

@@ -56,6 +57,7 @@ ENTRY (__longjmp)
 #else
        ldp     x29, x30, [x0, #JB_X29<<3]
 #endif
+       LIBC_PROBE (longjmp, 3, 8@x0, -4@x1, 8@x30)
        ldp      d8,  d9, [x0, #JB_D8<<3]
        ldp     d10, d11, [x0, #JB_D10<<3]
        ldp     d12, d13, [x0, #JB_D12<<3]
@@ -97,6 +99,7 @@ ENTRY (__longjmp)
 #else
        ldr     x5, [x0, #JB_SP<<3]
 #endif
+       LIBC_PROBE (longjmp_target, 3, 8@x0, -4@x1, 8@x30)
        mov     sp, x5
        cmp     x1, #0
        mov     x0, #1
(--snip--)

Please let me know if this is fine,  I will start doing the testing.

regards,
Venkat.

On 6 January 2014 23:40, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> ">" == Venkataramanan Kumar <venkataramanan.kumar@linaro.org> writes:
>
>>> This patch adds pointer mangling support for Aarch64.
>
> IIRC the Aarch64 longjmp code doesn't have the sdt.h probes in place.
> If you add pointer mangling without also adding the sdt.h probes, then
> gdb's longjmp support will break.  You should be able to see this easily
> in the gdb test suite.
>
> Adding the probes is quite easy to do, so I encourage you to add that
> to the patch.
>
> thanks,
> Tom

  reply	other threads:[~2014-01-07 11:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-26 12:25 Venkataramanan Kumar
2013-12-26 19:33 ` Richard Henderson
2013-12-27  7:48   ` Venkataramanan Kumar
2013-12-27 15:09     ` Richard Henderson
2013-12-30  5:00       ` Venkataramanan Kumar
2013-12-30 14:45         ` Richard Henderson
2013-12-30 15:36           ` Venkataramanan Kumar
2013-12-30 22:20         ` Marcus Shawcroft
2013-12-31  5:15           ` Venkataramanan Kumar
2014-01-01 17:42             ` Marcus Shawcroft
2014-01-06 18:11 ` Tom Tromey
2014-01-07 11:05   ` Venkataramanan Kumar [this message]
2014-01-07 12:17     ` Marcus Shawcroft
2014-01-07 18:10       ` Tom Tromey
2014-01-10  9:54         ` Will Newton
2014-01-20  9:01         ` Will Newton
2014-01-20 16:45           ` Tom Tromey
2014-01-20 17:02             ` Will Newton
2014-01-08 10:32       ` Venkataramanan Kumar
2014-01-10 10:40         ` Marcus Shawcroft

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=CAJK_mQ2isVSQgbARrRT6KYGODUyCgAavnD-TTYVYK7_bUjb6LQ@mail.gmail.com \
    --to=venkataramanan.kumar@linaro.org \
    --cc=carlos@redhat.com \
    --cc=libc-ports@sourceware.org \
    --cc=marcus.shawcroft@arm.com \
    --cc=marcus.shawcroft@gmail.com \
    --cc=patch@linaro.org \
    --cc=tromey@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).