函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:btf_array_resolve

函数原型:static int btf_array_resolve(struct btf_verifier_env *env, const struct resolve_vertex *v)

返回类型:int

参数:

类型参数名称
struct btf_verifier_env *env
const struct resolve_vertex *v
2001  array等于btf_type_array(t)
2004  btf等于btf
2008  index_type_id等于index_type
2009  index_type等于btf_type_by_id(btf, index_type_id)
2010  如果btf_type_nosize_or_null(index_type)或Types that act only as a source, not sink or intermediate* type when resolving.
2012  btf_verifier_log_type(env, t, "Invalid index")
2013  返回:负EINVAL
2016  如果非env_type_is_resolve_sink(env, index_type)且非env_type_is_resolved(env, index_type_id)则返回:env_stack_push(env, index_type, index_type_id)
2020  index_type等于btf_type_id_size(btf, & index_type_id, NULL)
2021  如果非index_type或非btf_type_is_int(index_type)或非Regular int is not a bit field and it must be either* u8/u16/u32/u64 or __int128.
2023  btf_verifier_log_type(env, t, "Invalid index")
2024  返回:负EINVAL
2028  elem_type_id等于type
2029  elem_type等于btf_type_by_id(btf, elem_type_id)
2030  如果btf_type_nosize_or_null(elem_type)或Types that act only as a source, not sink or intermediate* type when resolving.
2032  btf_verifier_log_type(env, t, "Invalid elem")
2034  返回:负EINVAL
2037  如果非env_type_is_resolve_sink(env, elem_type)且非env_type_is_resolved(env, elem_type_id)则返回:env_stack_push(env, elem_type, elem_type_id)
2041  elem_type等于btf_type_id_size(btf, & elem_type_id, & elem_size)
2042  如果非elem_type
2043  btf_verifier_log_type(env, t, "Invalid elem")
2044  返回:负EINVAL
2047  如果btf_type_is_int(elem_type)且非Regular int is not a bit field and it must be either* u8/u16/u32/u64 or __int128.
2048  btf_verifier_log_type(env, t, "Invalid array of int")
2049  返回:负EINVAL
2052  如果nelemselem_size大于U32_MAXnelems
2053  btf_verifier_log_type(env, t, "Array size overflows U32_MAX")
2055  返回:负EINVAL
2058  env_stack_pop_resolved(env, elem_type_id, elem_size * nelems)
2060  返回:0