Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__check_packet_access

Proto:static int __check_packet_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
2348  regs = cur_regs(env)
2349  reg = regs[regno]
2351  If off < 0 || size < 0 || size == 0 && Not zero_size_allowed || off + size > valid when type == PTR_TO_PACKET Then
2353  verbose(env, "invalid access to packet, off=%d size=%d, R%d(id=%d,off=%d,r=%d)\n", off, size, regno, For PTR_TO_PACKET, used to find other pointers with the same variable * offset, so they can share range knowledge. * For PTR_TO_MAP_VALUE_OR_NULL this is used to share which map value we * came from, when one is tested for != NULL. * For PTR_TO_SOCKET thi, Fixed part of pointer offset, pointer types only , valid when type == PTR_TO_PACKET )
2355  Return -EACCES
2357  Return 0
Caller
NameDescribe
check_packet_access