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-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQLG9OcJh63rUN0JcgcfB1cCj6riFJBPwZoWe0V-u9bh6g@mail.gmail.com>
Date:   Mon, 14 Nov 2016 20:57:53 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Wang Nan <wangnan0@...wei.com>
Cc:     Arnaldo Carvalho de Melo <acme@...hat.com>,
        Alexei Starovoitov <ast@...com>, Zefan Li <lizefan@...wei.com>,
        He Kuang <hekuang@...wei.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        pi3orama <pi3orama@....com>, Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH 00/34] perf clang: Builtin clang and perfhook support

On Mon, Nov 14, 2016 at 8:05 PM, Wang Nan <wangnan0@...wei.com> wrote:
> This is version 2 of perf builtin clang patch series. Compare to v1,
> add an exciting feature: jit compiling perf hook functions. This
> features allows script writer report result through BPF map in a
> customized way.

looks great.

>   SEC("perfhook:record_start")
>   void record_start(void *ctx)
>   {
>         int perf_pid = getpid(), key = G_perf_pid;
>         printf("Start count, perfpid=%d\n", perf_pid);
>         jit_helper__map_update_elem(ctx, &GVALS, &key, &perf_pid, 0);

the name, I think, is too verbose.
Why not to keep them as bpf_map_update_elem
even for user space programs?

>   SEC("perfhook:record_end")
>   void record_end(void *ctx)
>   {
>         u64 key = -1, value;
>         while (!jit_helper__map_get_next_key(ctx, &syscall_counter, &key, &key)) {
>                 jit_helper__map_lookup_elem(ctx, &syscall_counter, &key, &value);
>                 printf("syscall %ld\tcount: %ld\n", (long)key, (long)value);

this loop will be less verbose as well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ