Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:btf_ref_type_check_meta

Proto:static int btf_ref_type_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left)

Type:int

Parameter:

TypeParameterName
struct btf_verifier_env *env
const struct btf_type *t
u32meta_left
1643  If btf_type_vlen(t) Then
1644  btf_verifier_log_type(env, t, "vlen != 0")
1645  Return -EINVAL
1648  If btf_type_kflag(t) Then
1649  btf_verifier_log_type(env, t, "Invalid btf_info kind_flag")
1650  Return -EINVAL
1653  If Not BTF_TYPE_ID_VALID(type) Then
1654  btf_verifier_log_type(env, t, "Invalid type_id")
1655  Return -EINVAL
1661  If BTF_INFO_KIND( "info" bits arrangement * bits 0-15: vlen (e.g. # of struct's members) * bits 16-23: unused * bits 24-27: kind (e.g. int, ptr, array...etc) * bits 28-30: unused * bit 31: kind_flag, currently used by * struct, union and fwd) == Typedef Then
1664  btf_verifier_log_type(env, t, "Invalid name")
1665  Return -EINVAL
1667  Else
1668  If name_off Then
1669  btf_verifier_log_type(env, t, "Invalid name")
1670  Return -EINVAL
1674  btf_verifier_log_type(env, t, NULL)
1676  Return 0