函数逻辑报告 |
Source Code:kernel\bpf\btf.c |
Create Date:2022-07-27 14:36:32 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:btf_struct_check_meta
函数原型:static s32 btf_struct_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 | |
u32 | meta_left |
2138 | struct_size等于size |
2142 | meta_needed等于btf_type_vlen(t)乘member的长度 |
2143 | 如果meta_left小于meta_needed则 |
2144 | btf_verifier_log_basic(env, t, "meta_left:%u meta_needed:%u", meta_left, meta_needed) |
2147 | 返回:负EINVAL |
2153 | btf_verifier_log_type(env, t, "Invalid name") |
2154 | 返回:负EINVAL |
2157 | btf_verifier_log_type(env, t, NULL) |
2159 | last_offset等于0 |
2161 | 如果非btf_name_offset_valid(btf, name_off)则 |
2162 | btf_verifier_log_member(env, t, member, "Invalid member name_offset:%u", name_off) |
2165 | 返回:负EINVAL |
2171 | btf_verifier_log_member(env, t, member, "Invalid name") |
2172 | 返回:负EINVAL |
2175 | 如果非type或非BTF_TYPE_ID_VALID(type)则 |
2176 | btf_verifier_log_member(env, t, member, "Invalid type_id") |
2178 | 返回:负EINVAL |
2181 | offset等于btf_member_bit_offset(t, member) |
2183 | btf_verifier_log_member(env, t, member, "Invalid member bits_offset") |
2185 | 返回:负EINVAL |
2192 | 如果last_offset大于offset则 |
2193 | btf_verifier_log_member(env, t, member, "Invalid member bits_offset") |
2195 | 返回:负EINVAL |
2198 | 如果BITS_ROUNDUP_BYTES(offset)大于struct_size则 |
2199 | btf_verifier_log_member(env, t, member, "Member bits_offset exceeds its struct size") |
2201 | 返回:负EINVAL |
2204 | btf_verifier_log_member(env, t, member, NULL) |
2205 | last_offset等于offset |
2208 | 返回:meta_needed |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |