History

bpf: save subprogram name in bpf_subprog_info

Subprogram name can be computed from function info and BTF, but it is convenient to have the name readily available for logging purposes. Update comment saying that bpf_subprog_info->start has to be the first field, this is no longer true, relevant sites access .start field by it's name.

Eduard Zingerman committed 7 months ago

Commit cf3ee1e1 parent 33dfc522 files · +2 −1Browse files

Showing the changes to kernel (1 of 2 files). Show all

Unified · Split

kernel/bpf/verifier.c+1−0
@@ -19797,6 +19797,7 @@ static int check_btf_func(struct bpf_verifier_env *env, · 19796 unmodified lines
1979719797 goto err_free;
1979819798 }
1979919799
19800+ env->subprog_info[i].name = btf_name_by_offset(btf, type->name_off);
1980019801 bpfptr_add(&urecord, urec_size);
1980119802 }
1980219803