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-next>] [day] [month] [year] [list]
Message-ID: <CABPqkBRi5T2-hqgywLundiu=w1ekbjdAeKCrzRaUUrMSPSxvFw@mail.gmail.com>
Date:   Fri, 25 May 2018 17:19:54 -0700
From:   Stephane Eranian <eranian@...gle.com>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...hat.com>,
        Jiri Olsa <jolsa@...hat.com>, mingo@...e.hu,
        Peter Zijlstra <peterz@...radead.org>,
        Andi Kleen <ak@...ux.intel.com>,
        Vince Weaver <vincent.weaver@...ne.edu>
Subject: [BUG] perf/inject: crash in pipe mode

Hi,


With the latest tip.git perf, if you run

$ perf record -a -o - sleep 2 | perf inject -b -i - | perf buildid-list -i -
SEGFAULT in perf inject:
free_dup_event (oe=0x555555d25b88, oe=0x555555d25b88,
event=0x3030310931303031) at util/ordered-events.c:86
86 oe->cur_alloc_size -= event->header.size;
(gdb) bt
#0  free_dup_event (oe=0x555555d25b88, oe=0x555555d25b88,
event=0x3030310931303031) at util/ordered-events.c:86
#1  ordered_events__free (oe=oe@...ry=0x555555d25b88) at
util/ordered-events.c:310
#2  0x00005555557964f8 in __perf_session__process_pipe_events
(session=0x555555d1f910) at util/session.c:1778
#3  perf_session__process_events (session=session@...ry=0x555555d1f910) at
util/session.c:1958
#4  0x00005555556ef9b2 in __cmd_inject (inject=0x7fffffffda40) at
builtin-inject.c:697
#5  cmd_inject (argc=<optimized out>, argv=<optimized out>) at
builtin-inject.c:871
#6  0x000055555572e8b1 in run_builtin (p=0x555555be8f98 <commands+600>,
argc=4, argv=0x7fffffffe460) at perf.c:303
#7  0x000055555572ebae in handle_internal_command (argc=4,
argv=0x7fffffffe460) at perf.c:355
#8  0x00005555556ae1e1 in run_argv (argcp=<synthetic pointer>,
argv=<synthetic pointer>) at perf.c:399
#9  main (argc=<optimized out>, argv=0x7fffffffe460) at perf.c:521

In general I think the pipe mode is not very well tested. I think it could
be made the default file format. I believe perf can
autodetect file vs. pipe mode perf.data using the header.size field. This
would simplify a few things inside perf and ensure
the pipe mode format is well tested.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ