Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\btf.c Create Date:2022-07-28 13:18:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:btf_array_check_meta

Proto:static s32 btf_array_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left)

Type:s32

Parameter:

TypeParameterName
struct btf_verifier_env *env
const struct btf_type *t
u32meta_left
1949  array = btf_type_array(t)
1950  meta_needed = size of array
1952  If meta_left < meta_needed Then
1953  btf_verifier_log_basic(env, t, "meta_left:%u meta_needed:%u", meta_left, meta_needed)
1956  Return -EINVAL
1960  If name_off Then
1961  btf_verifier_log_type(env, t, "Invalid name")
1962  Return -EINVAL
1965  If btf_type_vlen(t) Then
1966  btf_verifier_log_type(env, t, "vlen != 0")
1967  Return -EINVAL
1970  If btf_type_kflag(t) Then
1971  btf_verifier_log_type(env, t, "Invalid btf_info kind_flag")
1972  Return -EINVAL
1975  If size Then
1976  btf_verifier_log_type(env, t, "size != 0")
1977  Return -EINVAL
1983  If Not type || Not BTF_TYPE_ID_VALID(type) Then
1984  btf_verifier_log_type(env, t, "Invalid elem")
1985  Return -EINVAL
1988  If Not index_type || Not BTF_TYPE_ID_VALID(index_type) Then
1989  btf_verifier_log_type(env, t, "Invalid index")
1990  Return -EINVAL
1993  btf_verifier_log_type(env, t, NULL)
1995  Return meta_needed