lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 29 Nov 2017 09:29:50 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Thomas-Mich Richter <tmricht@...ux.vnet.ibm.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "linux-perf-use." <linux-perf-users@...r.kernel.org>
Subject: Re: Question to perf annotate handling mov ...(%rip) instructions

On Tue, Nov 28, 2017 at 11:50:30AM -0300, Arnaldo Carvalho de Melo wrote:

SNIP

> > Function mov__parse() calls comment__symbol() which contains:
> > 
> >    static int comment__symbol(char *raw, char *comment, u64 *addrp, char **namep)
> >    {
> >         char *endptr, *name, *t;
> > 
> >         if (strstr(raw, "(%rip)") == NULL)
> >                 return 0;
> > 
> > This is architecture specific and does not work for non-Intel platforms.
> > 
> > I would like to fix perf annotate for s390x and above move instruction on s390x
> > is
> >      
> >     655a:       c0 10 00 01 9c eb       larl    %r1,39f30 <__gmon_start__>
> > 
> > There is a need to handle PLT resolution in an architecture independent way.
> > 
> > Ideas and suggestions?
> 
> Some historical background there, busy now, but you seem to be on the
> right track and IIRC you already sent a patch for this, right? I'll try
> to look at it.
> 
> Jiri may as well, since he worked a lot recently in this codebase, to
> refactor it some more to make it useful for annotating python code, perl
> next, other scripted languages should follow too.

so we try to parse each line out of objdump using arch specific
ops callbacks, check:

disasm_line__new
  disasm_line__init_ins
    dl->ins.ops->parse(...

the ops stuff are defined in:

static struct arch architectures[] = { 

        {
                .name = "s390",
                .init = s390__annotate_init,
                .objdump =  {
                        .comment_char = '#',
                },
        },

I'd check s390__annotate_init, there's some mechanism
of associating ops for arch and try to fit in ;-)

jirka

Powered by blists - more mailing lists