Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\verifier.c Create Date:2022-07-28 12:57:47
Last Modify:2022-05-19 20:02:10 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:heck read/write into map element returned by bpf_map_lookup_elem()

Proto:static int __check_map_access(struct bpf_verifier_env *env, u32 regno, int off, int size, bool zero_size_allowed)

Type:int

Parameter:

TypeParameterName
struct bpf_verifier_env *env
u32regno
intoff
intsize
boolzero_size_allowed
2221  regs = cur_regs(env)
2222  map = valid when type == CONST_PTR_TO_MAP | PTR_TO_MAP_VALUE | * PTR_TO_MAP_VALUE_OR_NULL
2224  If off < 0 || size < 0 || size == 0 && Not zero_size_allowed || off + size > value_size Then
2226  verbose(env, "invalid access to map value, value_size=%d off=%d size=%d\n", value_size, off, size)
2228  Return -EACCES
2230  Return 0
Caller
NameDescribe
check_map_accessheck read/write into a map element with possible variable offset