From patchwork Tue Jan 7 11:05:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkataramanan Kumar X-Patchwork-Id: 22909 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4AD48202E0 for ; Tue, 7 Jan 2014 11:05:27 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id o6sf6088583oag.7 for ; Tue, 07 Jan 2014 03:05:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=s4ER1BvDfkZS2NeeFi0J7tkiMa4AfeRIA44nux/h200=; b=NlIBEJ5Aor14Ic8i6kbrT8PAvRLY5fLbzRZFeIYwZ2JWeiUNU2bPF84cxpzbxllIHT 3g84Ij0GUf+YvTrzK1kIbuGkpemgt5lZdpiaoasnqzJVnvmxFgkXpEO6VYvFajH0sr5H rmKQImHlMtWeCJSRr5KLnDQdBEIRBvZQgM9a8JSxj3mXOwN3UpSpXVA7YTP3xni8r9pQ bqXvZox6bPSkysu2RJWCCIKjzdNac7dnxEapmYSecC4esgBYz5QgEt1GHmbb/r8Ltm77 cjt/2qVhWgyiXTPMUHo45Tga6ZCHUpYk8ynhBeIVEtcscR8aCdidsTD/gPgKe31iYfN4 bC+w== X-Gm-Message-State: ALoCoQlraMSEh3QtF4yY9NmzDZY1RYNitcURntnEAbgpDHNR6IiEsoJEmDzaMBfGQ/IF7or1QX9/ X-Received: by 10.50.12.68 with SMTP id w4mr12774759igb.0.1389092726699; Tue, 07 Jan 2014 03:05:26 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.128.200 with SMTP id nq8ls44981qeb.95.gmail; Tue, 07 Jan 2014 03:05:26 -0800 (PST) X-Received: by 10.58.146.5 with SMTP id sy5mr1224272veb.43.1389092726582; Tue, 07 Jan 2014 03:05:26 -0800 (PST) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id gx6si33259039vdc.76.2014.01.07.03.05.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jan 2014 03:05:26 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id p6so9805681vbe.30 for ; Tue, 07 Jan 2014 03:05:26 -0800 (PST) X-Received: by 10.52.158.170 with SMTP id wv10mr175006vdb.77.1389092726413; Tue, 07 Jan 2014 03:05:26 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp151394ved; Tue, 7 Jan 2014 03:05:25 -0800 (PST) X-Received: by 10.236.26.17 with SMTP id b17mr1373639yha.77.1389092725560; Tue, 07 Jan 2014 03:05:25 -0800 (PST) Received: from mail-qc0-f173.google.com (mail-qc0-f173.google.com [209.85.216.173]) by mx.google.com with ESMTPS id x29si19743836yha.136.2014.01.07.03.05.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jan 2014 03:05:25 -0800 (PST) Received-SPF: neutral (google.com: 209.85.216.173 is neither permitted nor denied by best guess record for domain of venkataramanan.kumar@linaro.org) client-ip=209.85.216.173; Received: by mail-qc0-f173.google.com with SMTP id m20so18389069qcx.4 for ; Tue, 07 Jan 2014 03:05:25 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.49.131.164 with SMTP id on4mr198027165qeb.16.1389092725116; Tue, 07 Jan 2014 03:05:25 -0800 (PST) Received: by 10.140.83.19 with HTTP; Tue, 7 Jan 2014 03:05:25 -0800 (PST) In-Reply-To: <87iotxm15i.fsf@fleche.redhat.com> References: <87iotxm15i.fsf@fleche.redhat.com> Date: Tue, 7 Jan 2014 16:35:25 +0530 Message-ID: Subject: Re: [PATCH] [AARCH64]: Pointer mangling support for Aarch64 From: Venkataramanan Kumar To: Tom Tromey Cc: libc-ports@sourceware.org, Marcus Shawcroft , Marcus Shawcroft , "Carlos O'Donell" , Patch Tracking X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: venkataramanan.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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--) (--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 wrote: >>>>>> ">" == Venkataramanan Kumar 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 --- a/ports/sysdeps/aarch64/__longjmp.S +++ b/ports/sysdeps/aarch64/__longjmp.S @@ -18,6 +18,7 @@ #include #include +#include /* __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