Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:btf_resolve_valid

Proto:static bool btf_resolve_valid(struct btf_verifier_env *env, const struct btf_type *t, u32 type_id)

Type:bool

Parameter:

TypeParameterName
struct btf_verifier_env *env
const struct btf_type *t
u32type_id
3072  btf = btf
3074  If Not env_type_is_resolved(env, type_id) Then Return false
3077  If is only a special case of struct:* all its offsetof(member) == 0 || btf_type_is_datasec(t) Then Return Not resolved_ids[type_id] && Not resolved_sizes[type_id]
3081  If btf_type_is_modifier(t) || btf_type_is_ptr(t) || btf_type_is_var(t) Then
3083  t = The input param "type_id" must point to a needs_resolve type
3084  Return t && Not btf_type_is_modifier(t) && Not btf_type_is_var(t) && Not btf_type_is_datasec(t)
3090  If btf_type_is_array(t) Then
3091  array = btf_type_array(t)
3093  elem_type_id = type
3096  elem_type = btf_type_id_size(btf, & elem_type_id, & elem_size)
3097  Return elem_type && Not btf_type_is_modifier(elem_type) && nelems * elem_size == resolved_sizes[type_id]
3102  Return false
Caller
NameDescribe
btf_resolve