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: <E220DFC6-A2E2-4B3A-B52B-3B194315D2A0@fb.com>
Date:   Thu, 10 Jan 2019 19:45:09 +0000
From:   Song Liu <songliubraving@...com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        David Ahern <dsahern@...il.com>
CC:     lkml <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH v6 perf, bpf-next 1/7] perf, bpf: Introduce
 PERF_RECORD_KSYMBOL



> On Jan 10, 2019, at 11:30 AM, Song Liu <songliubraving@...com> wrote:
> 
> 
> 
>> On Jan 10, 2019, at 10:55 AM, Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
>> 
>> Em Thu, Jan 10, 2019 at 06:40:37PM +0000, Song Liu escreveu:
>>> 
>>> 
>>>> On Jan 10, 2019, at 10:24 AM, Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
>>>> 
>>>> Em Wed, Jan 09, 2019 at 11:21:05AM -0800, Song Liu escreveu:
>>>>> For better performance analysis of dynamically JITed and loaded kernel
>>>>> functions, such as BPF programs, this patch introduces
>>>>> PERF_RECORD_KSYMBOL, a new perf_event_type that exposes kernel symbol
>>>>> register/unregister information to user space.
>>>>> 
>>>>> The following data structure is used for PERF_RECORD_KSYMBOL.
>>>>> 
>>>>>  /*
>>>>>   * struct {
>>>>>   *      struct perf_event_header        header;
>>>>>   *      u64                             addr;
>>>>>   *      u32                             len;
>>>>>   *      u16                             ksym_type;
>>>>>   *      u16                             flags;
>>>>>   *      char                            name[];
>>>>>   *      struct sample_id                sample_id;
>>>>>   * };
>>>>>   */
>>>> 
>>>> So, I couldn't find where this gets used, the intention here is just to
>>>> add the interfaces and afterwards is that you will wire this up? I would
>>>> like to test the whole shebang to see it working.
>>> 
>>> I guess you meant PERF_RECORD_BPF_EVENT not being used? 
>>> 
>>> PERF_RECORD_KSYMBOL is used by BPF in 3/7 and 5/7. I tested 
>> 
>> Oops, I didn't look at 3/7, just read its cset summary line and as it
>> says:
>> 
>> Subject: [PATCH v6 perf, bpf-next 3/7] perf, bpf: introduce PERF_RECORD_BPF_EVENT
>> 
>> I didn't thought it was related, perhaps break it down into one that
>> states that it is wiring up PERF_RECORD_KSYMBOL, and at that point we
>> could just test it, getting the notifications for new kallsyms related
>> to BPF?
> 
> Good idea! I will split it into two patches as:
> 
> [3/8] perf, bpf: generate PERF_RECORD_KSYMBOL for BPF program 
> [4/8] perf, bpf: introduce PERF_RECORD_BPF_EVENT
> 
>> 
>>> PERF_RECORD_BPF_EVENT with dump_trace. As we separate RECORD_KSYMBOL from
>>> RECORD_BPF_EVENT, user space won't use BPF_EVENT until annotation support.  
>> 
>> Right, so why not just introduce PERF_RECORD_KSYMBOL, make it be used by
>> tooling, etc, then move on to PERF_RECORD_BPF_EVENT?
> 
> I'd like to make sure we all agree on the new ABI for RECORD_KSYMBOL and 
> RECORD_BPF_EVENT. Multiple user space tools dependent on RECORD_BPF_EVENT,
> for example, bcc and auditing. Finalizing RECORD_BPF_EVENT will unblock the 
> development of these tools. On perf side, it will take us quite some time 
> to finish annotation. Ideally, I don't want to block the development of 
> other tools for so long. 
> 
> Thanks,
> Song

+ DavidA

Hi David, 

Could you please share your feedback on PERF_RECORD_BPF_EVENT for auditing
use cases?

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ