函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Check that given struct member is a regular int with expected* offset and size.

函数原型:bool btf_member_is_reg_int(const struct btf *btf, const struct btf_type *s, const struct btf_member *m, u32 expected_offset, u32 expected_size)

返回类型:bool

参数:

类型参数名称
const struct btf *btf
const struct btf_type *s
const struct btf_member *m
u32expected_offset
u32expected_size
620  id等于type
621  t等于btf_type_id_size(btf, & id, NULL)
622  如果非t或非btf_type_is_int(t)则返回:false
625  int_data等于btf_type_int(t)
626  nr_bits等于BTF_INT_BITS(int_data)
627  如果btf_type_kflag(s)则
628  bitfield_size等于If the struct/union type info kind_flag is set, the* following two macros are used to access bitfield_size* and bit_offset from btf_member.offset.(If the type info kind_flag is set, the btf_member offset* contains both member bitfield size and bit offset. The* bitfield size is set for bitfield members. If the type* info kind_flag is not set, the offset contains only bit* offset.)
629  bit_offset等于BTF_MEMBER_BIT_OFFSET(If the type info kind_flag is set, the btf_member offset* contains both member bitfield size and bit offset. The* bitfield size is set for bitfield members. If the type* info kind_flag is not set, the offset contains only bit* offset.)
634  返回:非bitfield_sizeBITS_ROUNDUP_BYTES(bit_offset)恒等于expected_offsetBITS_ROUNDUP_BYTES(nr_bits)恒等于expected_size
639  如果BTF_INT_OFFSET(int_data)或BITS_PER_BYTE_MASKED(If the type info kind_flag is set, the btf_member offset* contains both member bitfield size and bit offset. The* bitfield size is set for bitfield members. If the type* info kind_flag is not set, the offset contains only bit* offset.)或BITS_ROUNDUP_BYTES(If the type info kind_flag is set, the btf_member offset* contains both member bitfield size and bit offset. The* bitfield size is set for bitfield members. If the type* info kind_flag is not set, the offset contains only bit* offset.)不等于expected_offsetBITS_PER_BYTE_MASKED(nr_bits)或BITS_ROUNDUP_BYTES(nr_bits)不等于expected_size则返回:false
646  返回:true
调用者
名称描述
cgroup_storage_check_btf