Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\btf.c Create Date:2022-07-28 13:19:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:btf_func_proto_check

Proto:static int btf_func_proto_check(struct btf_verifier_env *env, const struct btf_type *t)

Type:int

Parameter:

TypeParameterName
struct btf_verifier_env *env
const struct btf_type *t
2873  btf = btf
2874  args = t + 1
2875  nr_args = btf_type_vlen(t)
2878  If type Then
2879  ret_type_id = type
2881  ret_type = btf_type_by_id(btf, ret_type_id)
2882  If Not ret_type Then
2883  btf_verifier_log_type(env, t, "Invalid return type")
2884  Return -EINVAL
2890  If err Then Return err
2895  If Not btf_type_id_size(btf, & ret_type_id, NULL) Then
2896  btf_verifier_log_type(env, t, "Invalid return type")
2897  Return -EINVAL
2901  If Not nr_args Then Return 0
2905  If Not type Then
2906  If name_off Then
2907  btf_verifier_log_type(env, t, "Invalid arg#%u", nr_args)
2909  Return -EINVAL
2911  nr_args--
2914  err = 0
2915  When i < nr_args cycle
2919  arg_type_id = type
2920  arg_type = btf_type_by_id(btf, arg_type_id)
2921  If Not arg_type Then
2922  btf_verifier_log_type(env, t, "Invalid arg#%u", i + 1)
2923  err = -EINVAL
2924  Break
2930  btf_verifier_log_type(env, t, "Invalid arg#%u", i + 1)
2932  err = -EINVAL
2933  Break
2939  If err Then Break
2943  If Not btf_type_id_size(btf, & arg_type_id, NULL) Then
2944  btf_verifier_log_type(env, t, "Invalid arg#%u", i + 1)
2945  err = -EINVAL
2946  Break
2950  Return err
Caller
NameDescribe
btf_check_all_types