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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190118130106.GH5823@kernel.org>
Date:   Fri, 18 Jan 2019 10:01:06 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Andi Kleen <andi@...stfloor.org>, jolsa@...nel.org,
        linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] perf, script: Fix crash with printing mixed trace point
 and other events

Em Fri, Jan 18, 2019 at 09:59:20AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Jan 18, 2019 at 10:49:19AM +0100, Jiri Olsa escreveu:
> > On Thu, Jan 17, 2019 at 11:48:34AM -0800, Andi Kleen wrote:
> > > From: Andi Kleen <ak@...ux.intel.com>
> 
> > > perf script crashes currently when printing mixed trace points and other
> > > events because the trace format does not handle events without trace
> > > meta data. Add a simple check to avoid that.
> 
> > > % cat > test.c
> > > main()
> > > {
> > >     printf("Hello world\n");
> > > }
> > > ^D
> > > % gcc -g -o test test.c
> > > % sudo perf probe -x test 'test.c:3'
> > > % perf record -e '{cpu/cpu-cycles,period=10000/,probe_test:main}:S' ./test
> > > % perf script
> > > <segfault>
> 
> > > Signed-off-by: Andi Kleen <ak@...ux.intel.com>
>  
> > Acked-by: Jiri Olsa <jolsa@...nel.org>
> 
> Thanks, tested and applied.
> 
> While testing I found something odd, the cycles events are not showing
> the CPU and the probe events shows a "negative" CPU column,
> investigating.

The sample_type for those two events:

[root@...co wb]# perf evlist -v
cpu/cpu-cycles,period=10000/: type: 4, size: 112, config: 0x3c, { sample_period, sample_freq }: 10000, sample_type: IP|TID|TIME|READ|IDENTIFIER, read_format: ID|GROUP, disabled: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1
probe_libc:malloc: type: 2, size: 112, config: 0x790, sample_type: IP|TID|TIME|READ|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID|GROUP, sample_id_all: 1, exclude_guest: 1
# Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events
[root@...co wb]#

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ