Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:btf_var_check_meta

Proto:static s32 btf_var_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left)

Type:s32

Parameter:

TypeParameterName
struct btf_verifier_env *env
const struct btf_type *t
u32meta_left
2653  meta_needed = size of var
2655  If meta_left < meta_needed Then
2656  btf_verifier_log_basic(env, t, "meta_left:%u meta_needed:%u", meta_left, meta_needed)
2659  Return -EINVAL
2662  If btf_type_vlen(t) Then
2663  btf_verifier_log_type(env, t, "vlen != 0")
2664  Return -EINVAL
2667  If btf_type_kflag(t) Then
2668  btf_verifier_log_type(env, t, "Invalid btf_info kind_flag")
2669  Return -EINVAL
2672  If Not name_off || Not __btf_name_valid(btf, name_off, true) Then
2674  btf_verifier_log_type(env, t, "Invalid name")
2675  Return -EINVAL
2679  If Not type || Not BTF_TYPE_ID_VALID(type) Then
2680  btf_verifier_log_type(env, t, "Invalid type_id")
2681  Return -EINVAL
2684  var = btf_type_var(t)
2685  If linkage != BTF_VAR_STATIC && linkage != BTF_VAR_GLOBAL_ALLOCATED Then
2687  btf_verifier_log_type(env, t, "Linkage not supported")
2688  Return -EINVAL
2691  btf_verifier_log_type(env, t, NULL)
2693  Return meta_needed