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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200529160225.GB537@kernel.org>
Date:   Fri, 29 May 2020 13:02:25 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Nick Gasson <nick.gasson@....com>, Jiri Olsa <jolsa@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Stephane Eranian <eranian@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] perf jit: Fix inaccurate DWARF line table

Em Thu, May 28, 2020 at 12:44:56AM -0700, Ian Rogers escreveu:
> On Wed, May 27, 2020 at 10:19 PM Nick Gasson <nick.gasson@....com> wrote:
> >
> > Fix an issue where addresses in the DWARF line table are offset by
> > -0x40 (GEN_ELF_TEXT_OFFSET). This can be seen with `objdump -S` on the
> > ELF files after perf inject.
> 
> Without too much knowledge this looks good to me. The original code
> came from oprofile's jit support:
> https://sourceforge.net/p/oprofile/oprofile/ci/master/tree/opjitconv/debug_line.c#l325
> 
> Acked-by: Ian Rogers <irogers@...gle.com>

Thanks, applied and added your comment,

- Arnaldo
 
> > Signed-off-by: Nick Gasson <nick.gasson@....com>
> > ---
> >  tools/perf/util/genelf_debug.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/perf/util/genelf_debug.c b/tools/perf/util/genelf_debug.c
> > index 30e9f618f6cd..dd40683bd4c0 100644
> > --- a/tools/perf/util/genelf_debug.c
> > +++ b/tools/perf/util/genelf_debug.c
> > @@ -342,7 +342,7 @@ static void emit_lineno_info(struct buffer_ext *be,
> >          */
> >
> >         /* start state of the state machine we take care of */
> > -       unsigned long last_vma = code_addr;
> > +       unsigned long last_vma = 0;
> >         char const  *cur_filename = NULL;
> >         unsigned long cur_file_idx = 0;
> >         int last_line = 1;
> > @@ -473,7 +473,7 @@ jit_process_debug_info(uint64_t code_addr,
> >                 ent = debug_entry_next(ent);
> >         }
> >         add_compilation_unit(di, buffer_ext_size(dl));
> > -       add_debug_line(dl, debug, nr_debug_entries, 0);
> > +       add_debug_line(dl, debug, nr_debug_entries, GEN_ELF_TEXT_OFFSET);
> >         add_debug_abbrev(da);
> >         if (0) buffer_ext_dump(da, "abbrev");
> >
> > --
> > 2.26.2
> >

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ