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, 21 Nov 2018 22:49:37 +0000
From:   Alexei Starovoitov <ast@...com>
To:     Song Liu <songliubraving@...com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "acme@...nel.org" <acme@...nel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH perf,bpf 5/5] perf util: generate bpf_prog_info_event for
 short living bpf programs

On 11/21/18 2:35 PM, Song Liu wrote:
> 
> 
>> On Nov 21, 2018, at 2:11 PM, Alexei Starovoitov <alexei.starovoitov@...il.com> wrote:
>>
>> On Wed, Nov 21, 2018 at 11:55:02AM -0800, Song Liu wrote:
>>> This patch enables perf-record to listen to bpf_event and generate
>>> bpf_prog_info_event for bpf programs loaded and unloaded during
>>> perf-record run.
>>>
>>> To minimize latency between bpf_event and following bpf calls, separate
>>> mmap with watermark of 1 is created to process these vip events. Then
>>> a separate dummy event is attached to the special mmap. A separate thread
>>> is used to only poll bpf events.
>>>
>>> By default, perf-record will listen to bpf_event. Option no-bpf-event is
>>> added in case the user would opt out.
>>
>> I think only default perf-record for sampling should include it.
>> perf record -e for tracepoints, kprobes and anything else should imply no-bpf-event.
>>
> 
> Maybe something like
>    
>     if (software_event && ! -g)
>          no_bpf_event = true;
> 
> ?
> 
> This will allow attaching kprobe on bpf helper and see which bpf program
> calls it.

right. good point about -g (I assume you mean callgraph collection).
Indeed, if bpf progs unload before perf-report they won't be seen in
callgraphs too even for sw events, so we have to enable bpf_events
to see them.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ