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]
Date:   Wed, 30 Oct 2019 15:16:10 +0530
From:   Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
To:     Chandan Rajendra <chandanrlinux@...il.com>, acme@...nel.org
Cc:     linux-kernel@...r.kernel.org, peterz@...radead.org,
        mingo@...hat.com, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, rostedt@...dmis.org, tstoyanov@...are.com,
        gregkh@...uxfoundation.org, kstewart@...uxfoundation.org,
        tglx@...utronix.de, chandan@...ux.ibm.com,
        Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Subject: Re: [PATCH] perf script: Fix obtaining next event



On 10/30/19 2:10 PM, Chandan Rajendra wrote:
> The current code segfaults when perf.data file contains two or more
> events. This happens due to incorrect pointer arithmetic being performed
> in trace_find_next_event().
> 
> tep_handle->events is an array of pointers to 'struct tep_event'. The
> pointer arithmetic interprets tep_handle->events as an array of 'struct
> tep_event' elements.
> 
> This commit replaces the usage of pointer arithmetic with calls to
> tep_get_event().
> 
> Fixes: bb3dd7e ("tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file")
> Signed-off-by: Chandan Rajendra <chandanrlinux@...il.com>

   $ sudo ./perf record -e sched:sched_switch -e syscalls:sys_enter_openat -- make

Without patch:
   $ sudo ./perf script -g python
   Segmentation fault

With patch:
   $ sudo ./perf script -g python
   generated Python script: perf-script.py

Reviewed-and-tested-by: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ