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] [day] [month] [year] [list]
Date:   Sat, 23 Nov 2019 13:13:11 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Martin KaFai Lau <kafai@...com>
Cc:     bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        David Miller <davem@...emloft.net>,
        Kernel Team <kernel-team@...com>,
        Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: Introduce BPF_TRACE_x helper for the
 tracing tests

On Sat, Nov 23, 2019 at 12:25 PM Martin KaFai Lau <kafai@...com> wrote:
>
> For BPF_PROG_TYPE_TRACING, the bpf_prog's ctx is an array of u64.
> This patch borrows the idea from BPF_CALL_x in filter.h to
> convert a u64 to the arg type of the traced function.
>
> The new BPF_TRACE_x has an arg to specify the return type of a bpf_prog.
> It will be used in the future TCP-ops bpf_prog that may return "void".
>
> The new macros are defined in the new header file "bpf_trace_helpers.h".
> It is under selftests/bpf/ for now.  It could be moved to libbpf later
> after seeing more upcoming non-tracing use cases.
>
> The tests are changed to use these new macros also.  Hence,
> the k[s]u8/16/32/64 are no longer needed and they are removed
> from the bpf_helpers.h.
>
> Signed-off-by: Martin KaFai Lau <kafai@...com>
> ---
>  tools/lib/bpf/bpf_helpers.h                   | 13 ---
>  .../testing/selftests/bpf/bpf_trace_helpers.h | 58 +++++++++++++
>  .../testing/selftests/bpf/progs/fentry_test.c | 72 ++++------------
>  .../selftests/bpf/progs/fexit_bpf2bpf.c       | 27 ++----
>  .../testing/selftests/bpf/progs/fexit_test.c  | 83 +++++--------------
>  tools/testing/selftests/bpf/progs/kfree_skb.c | 43 +++-------
>  .../selftests/bpf/progs/test_overhead.c       | 16 ++--
>  7 files changed, 125 insertions(+), 187 deletions(-)

Very nice cleanup!
Applied. Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ