函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cgroup_storage_check_btf

函数原型: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)

返回类型:int

参数:

类型参数名称
const struct bpf_map *map
const struct btf *btf
const struct btf_type *key_type
const struct btf_type *value_type
352  如果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则返回:负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  如果非Check that given struct member is a regular int with expected* offset and size.则返回:负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  如果非Check that given struct member is a regular int with expected* offset and size.则返回:负EINVAL
373  返回:0