函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:btf_int_check_meta

函数原型:static s32 btf_int_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
1325  meta_needed等于int_data的长度
1328  如果meta_left小于meta_needed
1329  btf_verifier_log_basic(env, t, "meta_left:%u meta_needed:%u", meta_left, meta_needed)
1332  返回:负EINVAL
1335  如果btf_type_vlen(t)则
1336  btf_verifier_log_type(env, t, "vlen != 0")
1337  返回:负EINVAL
1340  如果btf_type_kflag(t)则
1341  btf_verifier_log_type(env, t, "Invalid btf_info kind_flag")
1342  返回:负EINVAL
1345  int_data等于btf_type_int(t)
1346  如果int_data按位与BTF_INT_MASK的反则
1347  btf_verifier_log_basic(env, t, "Invalid int_data:%x", int_data)
1349  返回:负EINVAL
1352  nr_bits等于BTF_INT_BITS(int_data)加BTF_INT_OFFSET(int_data)
1354  如果nr_bits大于BTF verification:* To verify BTF data, two passes are needed.* Pass #1* ~~~~~~~* The first pass is to collect all btf_type objects to* an array: "btf->types".* Depending on the C type that a btf_type is describing,
1355  btf_verifier_log_type(env, t, "nr_bits exceeds %zu", BTF verification:* To verify BTF data, two passes are needed.* Pass #1* ~~~~~~~* The first pass is to collect all btf_type objects to* an array: "btf->types".* Depending on the C type that a btf_type is describing,)
1357  返回:负EINVAL
1360  如果BITS_ROUNDUP_BYTES(nr_bits)大于size
1361  btf_verifier_log_type(env, t, "nr_bits exceeds type_size")
1362  返回:负EINVAL
1371  encoding等于BTF_KIND_INT is followed by a u32 and the following* is the 32 bits arrangement:(int_data)
1372  如果encodingencoding不等于Attributes stored in the BTF_INT_ENCODING encoding不等于BTF_INT_CHARencoding不等于BTF_INT_BOOL
1376  btf_verifier_log_type(env, t, "Unsupported encoding")
1377  返回:负Operation is not supported
1380  btf_verifier_log_type(env, t, NULL)
1382  返回:meta_needed