Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__check_stack_boundary

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

Type:int

Parameter:

TypeParameterName
struct bpf_verifier_env *env
u32regno
intoff
intaccess_size
boolzero_size_allowed
3117  reg = reg_state(env, regno)
3119  If off >= 0 || off < -BPF program can access up to 512 bytes of stack space. || off + access_size > 0 || access_size < 0 || access_size == 0 && Not zero_size_allowed Then
3122  verbose(env, "invalid stack type R%d off=%d access_size=%d\n", regno, off, access_size)
3124  Else
3128  verbose(env, "invalid stack type R%d var_off=%s access_size=%d\n", regno, tn_buf, access_size)
3131  Return -EACCES
3133  Return 0
Caller
NameDescribe
check_stack_boundarywhen register 'regno' is passed into function that will read 'access_size'* bytes from that pointer, make sure that it's within stack boundary* and all elements of stack are initialized