Re: [PATCH 1/2] tools, bpftool: Avoid array index warnings.

2020-10-28 Thread Tobias Klauser
On 2020-10-28 at 00:36:45 +0100, Ian Rogers wrote: > The bpf_caps array is shorter without CAP_BPF, avoid out of bounds reads > if this isn't defined. Working around this avoids -Wno-array-bounds with > clang. > > Signed-off-by: Ian Rogers Reviewed-by: Tobias Klauser

Re: [PATCH 1/2] tools, bpftool: Avoid array index warnings.

2020-10-28 Thread Andrii Nakryiko
On Tue, Oct 27, 2020 at 4:37 PM Ian Rogers wrote: > > The bpf_caps array is shorter without CAP_BPF, avoid out of bounds reads > if this isn't defined. Working around this avoids -Wno-array-bounds with > clang. > > Signed-off-by: Ian Rogers > --- Acked-by: Andrii Nakryiko > tools/bpf/bpftool/

[PATCH 1/2] tools, bpftool: Avoid array index warnings.

2020-10-27 Thread Ian Rogers
The bpf_caps array is shorter without CAP_BPF, avoid out of bounds reads if this isn't defined. Working around this avoids -Wno-array-bounds with clang. Signed-off-by: Ian Rogers --- tools/bpf/bpftool/feature.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/bpf/b