Re: [PATCH bpf-next v3 2/2] selftests/bpf: add test for map_ptr arithmetic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 08, 2020 at 04:11:21PM -0700, Andrii Nakryiko wrote:
> On Tue, Sep 8, 2020 at 10:58 AM Yonghong Song <yhs@xxxxxx> wrote:
> >
> > Change selftest map_ptr_kern.c with disabling inlining for
> > one of subtests, which will fail the test without previous
> > verifier change. Also added to verifier test for both
> > "map_ptr += scalar" and "scalar += map_ptr" arithmetic.
> >
> > Signed-off-by: Yonghong Song <yhs@xxxxxx>
> > ---
> 
> Acked-by: Andrii Nakryiko <andriin@xxxxxx>
> 
> >  .../selftests/bpf/progs/map_ptr_kern.c        | 10 +++++-
> >  .../testing/selftests/bpf/verifier/map_ptr.c  | 32 +++++++++++++++++++
> >  2 files changed, 41 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/bpf/progs/map_ptr_kern.c b/tools/testing/selftests/bpf/progs/map_ptr_kern.c
> > index 982a2d8aa844..0b754106407d 100644
> > --- a/tools/testing/selftests/bpf/progs/map_ptr_kern.c
> > +++ b/tools/testing/selftests/bpf/progs/map_ptr_kern.c
> > @@ -82,6 +82,14 @@ static inline int check_default(struct bpf_map *indirect,
> >         return 1;
> >  }
> >
> > +static __attribute__ ((noinline)) int
> 
> just fyi: there is now __noinline defined in bpf_helpers.h, saving a
> bunch of typing

I fixed it manually while applying.
Thanks everyone.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux