Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:retrieve_ptr_limit

Proto:static int retrieve_ptr_limit(const struct bpf_reg_state *ptr_reg, u32 *ptr_limit, u8 opcode, bool off_is_neg)

Type:int

Parameter:

TypeParameterName
const struct bpf_reg_state *ptr_reg
u32 *ptr_limit
u8opcode
booloff_is_neg
4443  mask_to_left = opcode == BPF_ADD && off_is_neg || opcode == BPF_SUB && Not off_is_neg
4448  Case Ordering of fields matters. See states_equal() == g == frame_pointer + offset
4452  off = Fixed part of pointer offset, pointer types only + value
4453  If mask_to_left Then ptr_limit = BPF program can access up to 512 bytes of stack space. + off
4455  Else ptr_limit = -off
4457  Return 0
4458  Case Ordering of fields matters. See states_equal() == g points to map element value
4459  If mask_to_left Then
4461  Else
4463  ptr_limit = value_size - off
4465  Return 0
4466  Default
4467  Return -EINVAL
Caller
NameDescribe
sanitize_ptr_alu