Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:check_ptr_alignment

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

Type:int

Parameter:

TypeParameterName
struct bpf_verifier_env *env
const struct bpf_reg_state *reg
intoff
intsize
boolstrict_alignment_once
2602  strict = perform strict pointer alignment checks || strict_alignment_once
2603  pointer_desc = ""
2606  Case Ordering of fields matters. See states_equal() == g points to skb->data
2607  Case Ordering of fields matters. See states_equal() == skb->data - meta_len
2611  Return check_pkt_ptr_alignment(env, reg, off, size, strict)
2612  Case Ordering of fields matters. See states_equal() == g points to bpf_flow_keys
2613  pointer_desc = "flow keys "
2614  Break
2615  Case Ordering of fields matters. See states_equal() == g points to map element value
2616  pointer_desc = "value "
2617  Break
2618  Case Ordering of fields matters. See states_equal() == g points to bpf_context
2619  pointer_desc = "context "
2620  Break
2621  Case Ordering of fields matters. See states_equal() == g == frame_pointer + offset
2622  pointer_desc = "stack "
2627  strict = true
2628  Break
2629  Case Ordering of fields matters. See states_equal() == g points to struct bpf_sock
2630  pointer_desc = "sock "
2631  Break
2632  Case Ordering of fields matters. See states_equal() == g points to sock_common
2633  pointer_desc = "sock_common "
2634  Break
2635  Case Ordering of fields matters. See states_equal() == g points to struct tcp_sock
2636  pointer_desc = "tcp_sock "
2637  Break
2638  Case Ordering of fields matters. See states_equal() == g points to struct xdp_sock
2639  pointer_desc = "xdp_sock "
2640  Break
2641  Default
2642  Break
2644  Return check_generic_ptr_alignment(env, reg, pointer_desc, off, size, strict)
Caller
NameDescribe
check_mem_accessheck whether memory at (regno + off) is accessible for t = (read | write)* if t==write, value_regno is a register which value is stored into memory* if t==read, value_regno is a register which will receive the value from memory* if t==write &&
check_func_arg