Message ID | 20201105115230.296657-1-lmb@cloudflare.com |
---|---|
State | Not Applicable |
Delegated to: | BPF Maintainers |
Headers | show |
Series | [bpf] tools/bpftool: fix attaching flow dissector | expand |
Context | Check | Description |
---|---|---|
jkicinski/header_inline | success | Link |
jkicinski/cover_letter | success | Link |
jkicinski/fixes_present | success | Link |
jkicinski/patch_count | success | Link |
jkicinski/tree_selection | success | Clearly marked for bpf |
jkicinski/subject_prefix | success | Link |
jkicinski/source_inline | success | Was 0 now: 0 |
jkicinski/verify_signedoff | success | Link |
jkicinski/module_param | success | Was 0 now: 0 |
jkicinski/build_32bit | fail | Errors and warnings before: 4 this patch: 4 |
jkicinski/kdoc | success | Errors and warnings before: 0 this patch: 0 |
jkicinski/verify_fixes | success | Link |
jkicinski/checkpatch | fail | Link |
jkicinski/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
jkicinski/stable | success | Stable not CCed |
On Thu, Nov 5, 2020 at 3:54 AM Lorenz Bauer <lmb@cloudflare.com> wrote: > > My earlier patch to reject non-zero arguments to flow dissector attach > broke attaching via bpftool. Instead of 0 it uses -1 for target_fd. > Fix this by passing a zero argument when attaching the flow dissector. > > Fixes: 1b514239e859 ("bpf: flow_dissector: Check value of unused flags to BPF_PROG_ATTACH") > Reported-by: Jiri Benc <jbenc@redhat.com> > Signed-off-by: Lorenz Bauer <lmb@cloudflare.com> Acked-by: Song Liu <songliubraving@fb.com> > --- > tools/bpf/bpftool/prog.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c > index d942c1e3372c..acdb2c245f0a 100644 > --- a/tools/bpf/bpftool/prog.c > +++ b/tools/bpf/bpftool/prog.c > @@ -940,7 +940,7 @@ static int parse_attach_detach_args(int argc, char **argv, int *progfd, > } > > if (*attach_type == BPF_FLOW_DISSECTOR) { > - *mapfd = -1; > + *mapfd = 0; > return 0; > } > > -- > 2.25.1 >
Hello: This patch was applied to bpf/bpf.git (refs/heads/master): On Thu, 5 Nov 2020 11:52:30 +0000 you wrote: > My earlier patch to reject non-zero arguments to flow dissector attach > broke attaching via bpftool. Instead of 0 it uses -1 for target_fd. > Fix this by passing a zero argument when attaching the flow dissector. > > Fixes: 1b514239e859 ("bpf: flow_dissector: Check value of unused flags to BPF_PROG_ATTACH") > Reported-by: Jiri Benc <jbenc@redhat.com> > Signed-off-by: Lorenz Bauer <lmb@cloudflare.com> > > [...] Here is the summary with links: - [bpf] tools/bpftool: fix attaching flow dissector https://git.kernel.org/bpf/bpf/c/f9b7ff0d7f7a You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index d942c1e3372c..acdb2c245f0a 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -940,7 +940,7 @@ static int parse_attach_detach_args(int argc, char **argv, int *progfd, } if (*attach_type == BPF_FLOW_DISSECTOR) { - *mapfd = -1; + *mapfd = 0; return 0; }
My earlier patch to reject non-zero arguments to flow dissector attach broke attaching via bpftool. Instead of 0 it uses -1 for target_fd. Fix this by passing a zero argument when attaching the flow dissector. Fixes: 1b514239e859 ("bpf: flow_dissector: Check value of unused flags to BPF_PROG_ATTACH") Reported-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Lorenz Bauer <lmb@cloudflare.com> --- tools/bpf/bpftool/prog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)