函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:btf_check_sec_info

函数原型:static int btf_check_sec_info(struct btf_verifier_env *env, u32 btf_data_size)

返回类型:int

参数:

类型参数名称
struct btf_verifier_env *env
u32btf_data_size
3246  btf等于btf
3247  hdr等于hdr
3250 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(btf_sec_info_offset)循环secs[i]等于*hdrbtf_sec_info_offset[i]的和
3254  sort(secs, ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(btf_sec_info_offset), sizeof(structbtf_sec_info), btf_sec_info_cmp, NULL)
3258  total等于0
3259  expected_total等于btf_data_sizehdr_len
3260 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(btf_sec_info_offset)循环
3261  如果expected_total小于off
3262  btf_verifier_log(env, "Invalid section offset")
3263  返回:负EINVAL
3265  如果total小于off
3267  btf_verifier_log(env, "Unsupported section found")
3268  返回:负EINVAL
3270  如果total大于off
3271  btf_verifier_log(env, "Section overlap found")
3272  返回:负EINVAL
3274  如果expected_totaltotal小于len
3275  btf_verifier_log(env, "Total section length too long")
3277  返回:负EINVAL
3279  total加等于len
3283  如果expected_total不等于total
3284  btf_verifier_log(env, "Unsupported section found")
3285  返回:负EINVAL
3288  返回:0
调用者
名称描述
btf_parse_hdr