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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 8 Nov 2023 21:36:15 -0800
From:   Namhyung Kim <namhyung@...nel.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Ingo Molnar <mingo@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-perf-users@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Stephane Eranian <eranian@...gle.com>,
        linux-toolchains@...r.kernel.org, linux-trace-devel@...r.kernel.org
Subject: Re: [PATCH 28/48] perf dwarf-aux: Add die_find_variable_by_addr()

On Mon, Nov 6, 2023 at 7:25 AM Masami Hiramatsu <mhiramat@...nel.org> wrote:
>
> On Wed, 11 Oct 2023 20:50:51 -0700
> Namhyung Kim <namhyung@...nel.org> wrote:
>
> > The die_find_variable_by_addr() is to find a variables in the given DIE
> > using given (PC-relative) address.  Global variables will have a
> > location expression with DW_OP_addr which has an address so can simply
> > compare it with the address.
> >
> >   <1><143a7>: Abbrev Number: 2 (DW_TAG_variable)
> >       <143a8>   DW_AT_name        : loops_per_jiffy
> >       <143ac>   DW_AT_type        : <0x1cca>
> >       <143b0>   DW_AT_external    : 1
> >       <143b0>   DW_AT_decl_file   : 193
> >       <143b1>   DW_AT_decl_line   : 213
> >       <143b2>   DW_AT_location    : 9 byte block: 3 b0 46 41 82 ff ff ff ff
> >                                      (DW_OP_addr: ffffffff824146b0)
> >
> > Note that the type-offset should be calculated from the base address of
> > the global variable.
> >
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
>
> Looks good to me.
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
>
> BTW, for the global variable, you can also find it via maps. Can't you?

What do you mean by 'via maps'?  The map in perf?

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ