From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28549 invoked by alias); 9 Nov 2013 03:27:37 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 28538 invoked by uid 89); 9 Nov 2013 03:27:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,RDNS_NONE,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 09 Nov 2013 03:27:35 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rA93RPZL014476 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Nov 2013 22:27:25 -0500 Received: from [10.10.51.6] (vpn-51-6.rdu2.redhat.com [10.10.51.6]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rA93ROf0013571; Fri, 8 Nov 2013 22:27:24 -0500 Message-ID: <527DAB9B.9060304@redhat.com> Date: Sat, 09 Nov 2013 03:27:00 -0000 From: William Cohen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Sandeepa Prabhu CC: Petr Machata , Mark Wielaard , Masami Hiramatsu , systemtap@sourceware.org, Deepak Saxena , Krishna Dani , Jakub Pavelek , Mark Salter Subject: Re: [Fwd: Re: Regarding systemtap support for AArch64] References: <1383340682.3850.864.camel@bordewijk.wildebeest.org> <5277FBF2.2080108@redhat.com> <52791818.9070809@redhat.com> <527BAA13.4000301@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-q4/txt/msg00188.txt.bz2 On 11/07/2013 09:22 PM, Sandeepa Prabhu wrote: > Yes exactly, the trampoline was replacing exception return (ERET) > address not the function return (RET) address! (wrong manipulation of > saved pt_regs), so was firing ret-probe at the function entry not > return and x0 showed the function argument not the return value. > Thanks for pointing out this, have fixed this on my devel branch. > ~Sandeepa >> >> -Will Hi Sandeepa, The build of the devel branch kernel finally finished and I was able to boot it. The results look much better for the probe of vfs.return. Thanks for fixing this. Thanks so much for fixing the kretprobes. $ uname -a Linux localhost 3.12.0-rc5+ #6 SMP Thu Nov 7 21:27:15 EST 2013 aarch64 aarch64 aarch64 GNU/Linux $ sudo ~/systemtap_write/install/bin/stap -k -e 'probe vfs.read.return {printf("$return = 0x%x\n", $return);print_regs(); exit()}' [sudo] password for wcohen: $return = 0xc pc : [] lr : [] pstate: 40000145 sp : ffffffc05f6f7e80 x29: ffffffc05f6f7e80 x28: ffffffc05f6f4000 x27: ffffffc000835000 x26: 000000000000003f x25: 0000000000000112 x24: 0000000000000015 x23: 0000000080000000 x22: 0000007fa256eaa8 x21: 0000000000000001 x20: 0000007fdf0520e0 x19: ffffffc05f502100 x18: 0000007fdf050c70 x17: 0000007fa256ea50 x16: ffffffc0001868e0 x15: 0000000000000004 x14: 0000007fdf054420 x13: 0000000000000001 x12: 0000000000000008 x11: 00000000106180f0 x10: 0000000000401277 x9 : 0000000000000028 x8 : 000000000000003f x7 : 0000000000000005 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000001 x2 : 00000000000000a6 x1 : ffffffc072d62800 x0 : 000000000000000c Keeping temporary directory "/tmp/stapJO91tf" Looking at where the pc is in the disassembled vmlinux that seems to make sense. The instruction right after the call to vfs_read: ffffffc00018691c: f9001ba4 str x4, [x29,#48] ffffffc000186920: 97fffe04 bl ffffffc000186130 ffffffc000186924: aa0003f4 mov x20, x0 ffffffc000186928: b7f80074 tbnz x20, #63, ffffffc000186934 -Will