Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:check_pkt_ptr_alignment

Proto:static int check_pkt_ptr_alignment(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int off, int size, bool strict)

Type:int

Parameter:

TypeParameterName
struct bpf_verifier_env *env
const struct bpf_reg_state *reg
intoff
intsize
boolstrict
2547  If Not strict || size == 1 Then Return 0
2558  ip_align = 2
2560  reg_off = Add two tnums, return @a + @b
2561  If Not Returns true if @a is known to be a multiple of @size.*@size must be a power of two. Then
2564  Format a tnum as a pair of hex numbers (value; mask)
2565  verbose(env, "misaligned packet access off %d+%s+%d+%d size %d\n", ip_align, tn_buf, Fixed part of pointer offset, pointer types only , off, size)
2568  Return -EACCES
2571  Return 0
Caller
NameDescribe
check_ptr_alignment