Function report |
Source Code:kernel\bpf\btf.c |
Create Date:2022-07-28 13:18:08 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:btf_int_check_kflag_member
Proto:static int btf_int_check_kflag_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct btf_verifier_env * | env | |
const struct btf_type * | struct_type | |
const struct btf_member * | member | |
const struct btf_type * | member_type |
1271 | int_data = btf_type_int(member_type) |
1272 | struct_size = size |
1277 | btf_verifier_log_member(env, struct_type, member, "Invalid member base type") |
1279 | Return -EINVAL |
1285 | nr_int_data_bits = BTF_INT_BITS(int_data) |
1286 | If Not nr_bits Then |
1290 | If BITS_PER_BYTE_MASKED(struct_bits_off) Then |
1291 | btf_verifier_log_member(env, struct_type, member, "Invalid member offset") |
1293 | Return -EINVAL |
1296 | nr_bits = nr_int_data_bits |
1297 | Else if nr_bits > nr_int_data_bits Then |
1298 | btf_verifier_log_member(env, struct_type, member, "Invalid member bitfield_size") |
1300 | Return -EINVAL |
1306 | btf_verifier_log_member(env, struct_type, member, "nr_copy_bits exceeds 128") |
1308 | Return -EINVAL |
1311 | If struct_size < bytes_offset || struct_size - bytes_offset < BITS_ROUNDUP_BYTES(nr_copy_bits) Then |
1313 | btf_verifier_log_member(env, struct_type, member, "Member exceeds struct_size") |
1315 | Return -EINVAL |
1318 | Return 0 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |