函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\verifier.c Create Date:2022-07-27 14:12:29
Last Modify:2022-05-19 20:02:10 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__check_stack_boundary

函数原型:static int __check_stack_boundary(struct bpf_verifier_env *env, u32 regno, int off, int access_size, bool zero_size_allowed)

返回类型:int

参数:

类型参数名称
struct bpf_verifier_env *env
u32regno
intoff
intaccess_size
boolzero_size_allowed
3117  reg等于reg_state(env, regno)
3119  如果off大于等于0或off小于负BPF program can access up to 512 bytes of stack space. offaccess_size大于0或access_size小于0或access_size恒等于0且非zero_size_allowed
3122  verbose(env, "invalid stack type R%d off=%d access_size=%d\n", regno, off, access_size)
3124  否则
3128  verbose(env, "invalid stack type R%d var_off=%s access_size=%d\n", regno, tn_buf, access_size)
3131  返回:负EACCES
3133  返回:0
调用者
名称描述
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