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:   Tue, 12 Jun 2018 09:28:09 +0530
From:   Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
To:     Sandipan Das <sandipan@...ux.ibm.com>, acme@...nel.org
Cc:     jolsa@...hat.com, linux-kernel@...r.kernel.org,
        naveen.n.rao@...ux.vnet.ibm.com, sukadev@...ux.vnet.ibm.com,
        Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Subject: Re: [PATCH] perf report powerpc: Fix crash if callchain is empty



On 06/11/2018 04:10 PM, Sandipan Das wrote:
> For some cases, the callchain provided by the kernel may be
> empty. So, the callchain ip filtering code will cause a crash
> if we do not check whether the struct ip_callchain pointer is
> NULL before accessing any members.
> 
> This can be observed on a powerpc64le system running Fedora 27
> as shown below.
> 
>   # perf record -b -e cycles:u ls
> 
> Before applying this patch:
> 
>   # perf report --branch-history
> 
>   perf: Segmentation fault
>   -------- backtrace --------
>   perf[0x1027615c]
>   linux-vdso64.so.1(__kernel_sigtramp_rt64+0x0)[0x7fff856304d8]
>   perf(arch_skip_callchain_idx+0x44)[0x10257c58]
>   perf[0x1017f2e4]
>   perf(thread__resolve_callchain+0x124)[0x1017ff5c]
>   perf(sample__resolve_callchain+0xf0)[0x10172788]
>   ...
> 
> After applying this patch:
> 
>   # perf report --branch-history
> 
>   Samples: 25  of event 'cycles:u', Event count (approx.): 2306870
>     Overhead  Source:Line            Symbol                   Shared Object
>   +   11.60%  _init+35736            [.] _init                ls
>   +    9.84%  strcoll_l.c:137        [.] __strcoll_l          libc-2.26.so
>   +    9.16%  memcpy.S:175           [.] __memcpy_power7      libc-2.26.so
>   +    9.01%  gconv_charset.h:54     [.] _nl_find_locale      libc-2.26.so
>   +    8.87%  dl-addr.c:52           [.] _dl_addr             libc-2.26.so
>   +    8.83%  _init+236              [.] _init                ls
>   ...
> 
> Reported-by: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
> Signed-off-by: Sandipan Das <sandipan@...ux.ibm.com>


Acked-by: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ