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:   Thu, 7 Nov 2019 18:33:30 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Song Liu <songliubraving@...com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        David Miller <davem@...emloft.net>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "x86@...nel.org" <x86@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH v2 bpf-next 07/17] selftests/bpf: Add test for BPF
 trampoline

On Fri, Nov 08, 2019 at 01:17:50AM +0000, Song Liu wrote:
> 
> 
> > On Nov 6, 2019, at 9:46 PM, Alexei Starovoitov <ast@...nel.org> wrote:
> > 
> > Add sanity test for BPF trampoline that checks kernel functions
> > with up to 6 arguments of different sizes.
> > 
> > Signed-off-by: Alexei Starovoitov <ast@...nel.org>
> > ---
> > tools/lib/bpf/bpf_helpers.h                   | 13 +++
> > .../selftests/bpf/prog_tests/fentry_test.c    | 64 +++++++++++++
> > .../testing/selftests/bpf/progs/fentry_test.c | 90 +++++++++++++++++++
> > 3 files changed, 167 insertions(+)
> > create mode 100644 tools/testing/selftests/bpf/prog_tests/fentry_test.c
> > create mode 100644 tools/testing/selftests/bpf/progs/fentry_test.c
> > 
> > diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
> > index 0c7d28292898..c63ab1add126 100644
> > --- a/tools/lib/bpf/bpf_helpers.h
> > +++ b/tools/lib/bpf/bpf_helpers.h
> > @@ -44,4 +44,17 @@ enum libbpf_pin_type {
> > 	LIBBPF_PIN_BY_NAME,
> > };
> > 
> > +/* The following types should be used by BPF_PROG_TYPE_TRACING program to
> > + * access kernel function arguments. BPF trampoline and raw tracepoints
> > + * typecast arguments to 'unsigned long long'.
> > + */
> > +typedef int __attribute__((aligned(8))) ks32;
> > +typedef char __attribute__((aligned(8))) ks8;
> > +typedef short __attribute__((aligned(8))) ks16;
> > +typedef long long __attribute__((aligned(8))) ks64;
> > +typedef unsigned int __attribute__((aligned(8))) ku32;
> > +typedef unsigned char __attribute__((aligned(8))) ku8;
> > +typedef unsigned short __attribute__((aligned(8))) ku16;
> > +typedef unsigned long long __attribute__((aligned(8))) ku64;
> > +
> > #endif
> 
> Maybe a separate patch for bpf_helpers.h?

I squashed them to reduce the number of patches. It's already at 17
and I had to add another one. So v3 will have 18.

> Otherwise, 
> 
> Acked-by: Song Liu <songliubraving@...com>

Powered by blists - more mailing lists