函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\btf.c Create Date:2022-07-27 14:37:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:btf_check_meta

函数原型:static s32 btf_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left)

返回类型:s32

参数:

类型参数名称
struct btf_verifier_env *env
const struct btf_type *t
u32meta_left
3003  saved_meta_left等于meta_left
3006  如果meta_left小于t的长度则
3007  btf_verifier_log(env, "[%u] meta_left:%u meta_needed:%zu", log_type_id, meta_left, t的长度)
3009  返回:负EINVAL
3011  meta_left减等于t的长度
3013  如果 "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按位与BTF_INFO_MASK的反则
3014  btf_verifier_log(env, "[%u] Invalid btf_info:%x", log_type_id, "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)
3016  返回:负EINVAL
3019  如果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)大于BTF_KIND_MAXBTF_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)恒等于Unknown
3021  btf_verifier_log(env, "[%u] Invalid kind:%u", log_type_id, 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))
3023  返回:负EINVAL
3026  如果非btf_name_offset_valid(btf, name_off)则
3027  btf_verifier_log(env, "[%u] Invalid name_offset:%u", log_type_id, name_off)
3029  返回:负EINVAL
3032  var_meta_size等于check_meta(env, t, meta_left)
3033  如果var_meta_size小于0则返回:var_meta_size
3036  meta_left减等于var_meta_size
3038  返回:saved_meta_leftmeta_left
调用者
名称描述
btf_check_all_metas