Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cgroup_storage_check_btf

Proto:static int cgroup_storage_check_btf(const struct bpf_map *map, const struct btf *btf, const struct btf_type *key_type, const struct btf_type *value_type)

Type:int

Parameter:

TypeParameterName
const struct bpf_map *map
const struct btf *btf
const struct btf_type *key_type
const struct btf_type *value_type
352  If BTF_INFO_KIND( "info" bits arrangement * bits 0-15: vlen (e.g. # of struct's members) * bits 16-23: unused * bits 24-27: kind (e.g. int, ptr, array...etc) * bits 28-30: unused * bit 31: kind_flag, currently used by * struct, union and fwd) != Struct || BTF_INFO_VLEN( "info" bits arrangement * bits 0-15: vlen (e.g. # of struct's members) * bits 16-23: unused * bits 24-27: kind (e.g. int, ptr, array...etc) * bits 28-30: unused * bit 31: kind_flag, currently used by * struct, union and fwd) != 2 Then Return -EINVAL
359  m = key_type + 1
360  size = sizeof_field(TYPE, MEMBER)*@TYPE: The structure containing the field of interest*@MEMBER: The field to return the size of(structbpf_cgroup_storage_key, cgroup_inode_id)
361  If Not Check that given struct member is a regular int with expected* offset and size. Then Return -EINVAL
367  m++
368  offset = offsetof(structbpf_cgroup_storage_key, attach_type)
369  size = sizeof_field(TYPE, MEMBER)*@TYPE: The structure containing the field of interest*@MEMBER: The field to return the size of(structbpf_cgroup_storage_key, attach_type)
370  If Not Check that given struct member is a regular int with expected* offset and size. Then Return -EINVAL
373  Return 0