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: <CAEf4BzZdjFotwX-ngjBCr+2mc4XOsYAxBe8rUBbw7mgQMMdc1w@mail.gmail.com>
Date:   Tue, 1 Oct 2019 14:28:11 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Song Liu <songliubraving@...com>
Cc:     Andrii Nakryiko <andriin@...com>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h
 into libbpf

On Tue, Oct 1, 2019 at 2:19 PM Song Liu <songliubraving@...com> wrote:
>
>
>
> > On Sep 30, 2019, at 11:58 AM, Andrii Nakryiko <andriin@...com> wrote:
> >
> > Make bpf_helpers.h and bpf_endian.h official part of libbpf. Ensure they
> > are installed along the other libbpf headers.
> >
> > Signed-off-by: Andrii Nakryiko <andriin@...com>
> > ---
> > tools/lib/bpf/Makefile      |   4 +-
> > tools/lib/bpf/bpf_endian.h  |  72 +++++
> > tools/lib/bpf/bpf_helpers.h | 527 ++++++++++++++++++++++++++++++++++++
> > 3 files changed, 602 insertions(+), 1 deletion(-)
> > create mode 100644 tools/lib/bpf/bpf_endian.h
> > create mode 100644 tools/lib/bpf/bpf_helpers.h
> >

[...]

> > +#endif /* __BPF_ENDIAN__ */
> > diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
> > new file mode 100644
> > index 000000000000..a1d9b97b8e15
> > --- /dev/null
> > +++ b/tools/lib/bpf/bpf_helpers.h
> > @@ -0,0 +1,527 @@
> > +/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
> > +#ifndef __BPF_HELPERS__
> > +#define __BPF_HELPERS__
> > +
> > +#define __uint(name, val) int (*name)[val]
> > +#define __type(name, val) val *name
>
> Similar to the concern with 4/6, maybe we should rename/prefix/postfix
> these two macros?

Those were specifically named so they are as clear and clean in user
code as possible, it was an explicit goal. Ideally they would be
"uint" and "type", but that's pushing it too far :)

>
> Thanks,
> Song
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ