Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:btf_ptr_check_member

Proto:static int btf_ptr_check_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type)

Type:int

Parameter:

TypeParameterName
struct btf_verifier_env *env
const struct btf_type *struct_type
const struct btf_member *member
const struct btf_type *member_type
1620  struct_size = size
1621  struct_bits_off = 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.
1622  bytes_offset = BITS_ROUNDDOWN_BYTES(struct_bits_off)
1624  If BITS_PER_BYTE_MASKED(struct_bits_off) Then
1625  btf_verifier_log_member(env, struct_type, member, "Member is not byte aligned")
1627  Return -EINVAL
1630  If struct_size - bytes_offset < size of * Then
1631  btf_verifier_log_member(env, struct_type, member, "Member exceeds struct_size")
1633  Return -EINVAL
1636  Return 0