File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -351,11 +351,6 @@ const struct bpf_func_proto bpf_sk_storage_delete_proto = {
351351
352352static bool bpf_sk_storage_tracing_allowed (const struct bpf_prog * prog )
353353{
354- const struct btf * btf_vmlinux ;
355- const struct btf_type * t ;
356- const char * tname ;
357- u32 btf_id ;
358-
359354 if (prog -> aux -> dst_prog )
360355 return false;
361356
@@ -370,13 +365,7 @@ static bool bpf_sk_storage_tracing_allowed(const struct bpf_prog *prog)
370365 return true;
371366 case BPF_TRACE_FENTRY :
372367 case BPF_TRACE_FEXIT :
373- btf_vmlinux = bpf_get_btf_vmlinux ();
374- if (IS_ERR_OR_NULL (btf_vmlinux ))
375- return false;
376- btf_id = prog -> aux -> attach_btf_id ;
377- t = btf_type_by_id (btf_vmlinux , btf_id );
378- tname = btf_name_by_offset (btf_vmlinux , t -> name_off );
379- return !!strncmp (tname , "bpf_sk_storage" ,
368+ return !!strncmp (prog -> aux -> attach_func_name , "bpf_sk_storage" ,
380369 strlen ("bpf_sk_storage" ));
381370 default :
382371 return false;
You can’t perform that action at this time.
0 commit comments