函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Return true if it's OK to have the same insn return a different type.

函数原型:static bool reg_type_mismatch_ok(enum bpf_reg_type type)

返回类型:bool

参数:

类型参数名称
enum bpf_reg_typetype
7703  :type恒等于g points to bpf_context
7704  :type恒等于g points to struct bpf_sock
7705  :type恒等于g points to struct bpf_sock or NULL
7706  :type恒等于g points to sock_common
7707  :type恒等于g points to sock_common or NULL
7708  :type恒等于g points to struct tcp_sock
7709  :type恒等于g points to struct tcp_sock or NULL
7710  :type恒等于g points to struct xdp_sock
7711  :type恒等于g points to kernel struct
7712  返回:false
7713  默认
7714  返回:true
调用者
名称描述
reg_type_mismatchIf an instruction was previously used with particular pointer types, then we* need to be careful to avoid cases such as the below, where it may be ok* for one branch accessing the pointer, but not ok for the other branch:* R1 = sock_ptr* goto X;*