Re: [PATCH bpf-next 06/10] selftests/bpf: add CO-RE relocs array tests

2019-07-26 Thread Andrii Nakryiko
On Thu, Jul 25, 2019 at 4:26 PM Alexei Starovoitov wrote: > > On Wed, Jul 24, 2019 at 12:27:38PM -0700, Andrii Nakryiko wrote: > > Add tests for various array handling/relocation scenarios. > > > > Signed-off-by: Andrii Nakryiko > ... > > + > > +#define CORE_READ(dst, src) \ > > + bpf_probe_r

Re: [PATCH bpf-next 06/10] selftests/bpf: add CO-RE relocs array tests

2019-07-25 Thread Alexei Starovoitov
On Wed, Jul 24, 2019 at 12:27:38PM -0700, Andrii Nakryiko wrote: > Add tests for various array handling/relocation scenarios. > > Signed-off-by: Andrii Nakryiko ... > + > +#define CORE_READ(dst, src) \ > + bpf_probe_read(dst, sizeof(*src), __builtin_preserve_access_index(src)) This is the ke

[PATCH bpf-next 06/10] selftests/bpf: add CO-RE relocs array tests

2019-07-24 Thread Andrii Nakryiko
Add tests for various array handling/relocation scenarios. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/core_reloc.c | 41 ++ .../bpf/progs/btf__core_reloc_arrays.c| 3 + .../btf__core_reloc_arrays___diff_arr_dim.c | 3 + ...btf__core_reloc_arrays___dif