Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:btf_add_type

Proto:static int btf_add_type(struct btf_verifier_env *env, struct btf_type *t)

Type:int

Parameter:

TypeParameterName
struct btf_verifier_env *env
struct btf_type *t
817  btf = btf
823  If types_size - nr_types < 2 Then
830  btf_verifier_log(env, "Exceeded max num of types")
831  Return -E2BIG
834  expand_by = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, types_size >> 2, 16)
835  new_size = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, Max # of type identifier , types_size + expand_by)
838  new_types = kvcalloc(new_size, size of new_types , GFP_KERNEL | DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.)
840  If Not new_types Then Return -ENOMEM
843  If nr_types == 0 Then new_types[0] = btf_void
845  Else No 3D Now!(new_types, types, size of types * (nr_types + 1))
849  kvfree(types)
850  types = new_types
851  types_size = new_size
854  types[++(nr_types)] = t
856  Return 0
Caller
NameDescribe
btf_check_all_metas