On 5/9/20 5:41 PM, Alexei Starovoitov wrote:
On Sat, May 09, 2020 at 10:59:00AM -0700, Yonghong Song wrote:
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 70ad009577f8..d725ff7d11db 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -7101,6 +7101,10 @@ static int check_return_code(struct bpf_verifier_env 
*env)
                        return 0;
                range = tnum_const(0);
                break;
+       case BPF_PROG_TYPE_TRACING:
+               if (env->prog->expected_attach_type != BPF_TRACE_ITER)
+                       return 0;
+               break;

Not related to this set, but I just noticed that I managed to forget to
add this check for fentry/fexit/freplace.
While it's not too late let's enforce return 0 for them ?
Could you follow up with a patch for bpf tree?

Sure. I can have a followup patch for this.

Reply via email to