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 = {
351
351
352
352
static bool bpf_sk_storage_tracing_allowed (const struct bpf_prog * prog )
353
353
{
354
- const struct btf * btf_vmlinux ;
355
- const struct btf_type * t ;
356
- const char * tname ;
357
- u32 btf_id ;
358
-
359
354
if (prog -> aux -> dst_prog )
360
355
return false;
361
356
@@ -370,13 +365,7 @@ static bool bpf_sk_storage_tracing_allowed(const struct bpf_prog *prog)
370
365
return true;
371
366
case BPF_TRACE_FENTRY :
372
367
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" ,
380
369
strlen ("bpf_sk_storage" ));
381
370
default :
382
371
return false;
You can’t perform that action at this time.
0 commit comments