函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:check_ptr_alignment

函数原型:static int check_ptr_alignment(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int off, int size, bool strict_alignment_once)

返回类型:int

参数:

类型参数名称
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  : Ordering of fields matters. See states_equal() 恒等于g points to skb->data
2607  : Ordering of fields matters. See states_equal() 恒等于skb->data - meta_len
2611  返回:check_pkt_ptr_alignment(env, reg, off, size, strict)
2612  : Ordering of fields matters. See states_equal() 恒等于g points to bpf_flow_keys
2613  pointer_desc等于"flow keys "
2614  退出
2615  : Ordering of fields matters. See states_equal() 恒等于g points to map element value
2616  pointer_desc等于"value "
2617  退出
2618  : Ordering of fields matters. See states_equal() 恒等于g points to bpf_context
2619  pointer_desc等于"context "
2620  退出
2621  : Ordering of fields matters. See states_equal() 恒等于g == frame_pointer + offset
2622  pointer_desc等于"stack "
2627  strict = true
2628  退出
2629  : Ordering of fields matters. See states_equal() 恒等于g points to struct bpf_sock
2630  pointer_desc等于"sock "
2631  退出
2632  : Ordering of fields matters. See states_equal() 恒等于g points to sock_common
2633  pointer_desc等于"sock_common "
2634  退出
2635  : Ordering of fields matters. See states_equal() 恒等于g points to struct tcp_sock
2636  pointer_desc等于"tcp_sock "
2637  退出
2638  : Ordering of fields matters. See states_equal() 恒等于g points to struct xdp_sock
2639  pointer_desc等于"xdp_sock "
2640  退出
2641  默认
2642  退出
2644  返回:check_generic_ptr_alignment(env, reg, pointer_desc, off, size, strict)
调用者
名称描述
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