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: <CAEf4BzY2dG0QrBQF8g2w=yvSeVJ7LtWrLOckrWsCAnBvtZgMiQ@mail.gmail.com>
Date:   Thu, 3 Oct 2019 14:22:20 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Song Liu <liu.song.a23@...il.com>
Cc:     Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>
Subject: Re: [PATCH v2 bpf-next 2/7] selftests/bpf: samples/bpf: split off
 legacy stuff from bpf_helpers.h

On Thu, Oct 3, 2019 at 1:09 PM Song Liu <liu.song.a23@...il.com> wrote:
>
> On Wed, Oct 2, 2019 at 3:01 PM Andrii Nakryiko <andriin@...com> wrote:
> >
> > Split off few legacy things from bpf_helpers.h into separate
> > bpf_legacy.h file:
> > - load_{byte|half|word};
> > - remove extra inner_idx and numa_node fields from bpf_map_def and
> >   introduce bpf_map_def_legacy for use in samples;
> > - move BPF_ANNOTATE_KV_PAIR into bpf_legacy.h.
> >
> > Adjust samples and selftests accordingly by either including
> > bpf_legacy.h and using bpf_map_def_legacy, or switching to BTF-defined
> > maps altogether.
> >
> > Signed-off-by: Andrii Nakryiko <andriin@...com>
>
> Acked-by: Song Liu <songliubraving@...com>
>
> with a nit below
>
> > ---
> >  samples/bpf/hbm_kern.h                        | 28 +++++++------
> >  samples/bpf/map_perf_test_kern.c              | 23 +++++------
> >  samples/bpf/parse_ldabs.c                     |  1 +
> >  samples/bpf/sockex1_kern.c                    |  1 +
> >  samples/bpf/sockex2_kern.c                    |  1 +
> >  samples/bpf/sockex3_kern.c                    |  1 +
> >  samples/bpf/tcbpf1_kern.c                     |  1 +
> >  samples/bpf/test_map_in_map_kern.c            | 15 +++----
> >  tools/testing/selftests/bpf/bpf_helpers.h     | 24 +-----------
> >  tools/testing/selftests/bpf/bpf_legacy.h      | 39 +++++++++++++++++++
> >  .../testing/selftests/bpf/progs/sockopt_sk.c  | 13 +++----
> >  tools/testing/selftests/bpf/progs/tcp_rtt.c   | 13 +++----
> >  .../selftests/bpf/progs/test_btf_haskv.c      |  1 +
> >  .../selftests/bpf/progs/test_btf_newkv.c      |  1 +
> >  14 files changed, 92 insertions(+), 70 deletions(-)
> >  create mode 100644 tools/testing/selftests/bpf/bpf_legacy.h
> >
> > diff --git a/samples/bpf/hbm_kern.h b/samples/bpf/hbm_kern.h
> > index aa207a2eebbd..91880a0e9c2f 100644
> > --- a/samples/bpf/hbm_kern.h
> > +++ b/samples/bpf/hbm_kern.h
> > @@ -24,6 +24,7 @@
> >  #include <net/inet_ecn.h>
> >  #include "bpf_endian.h"
> >  #include "bpf_helpers.h"
> > +#include "bpf_legacy.h"
>
> nit: I guess we don't need bpf_legacy.h here?

You are right, I converted maps to BTF-defined ones, dropping bpf_legacy.h.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ