函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Uses signed min/max values to inform unsigned, and vice-versa

函数原型:static void __reg_deduce_bounds(struct bpf_reg_state *reg)

返回类型:void

参数:

类型参数名称
struct bpf_reg_state *reg
1002  如果 minimum possible (s64)value 大于等于0或 maximum possible (s64)value 小于0则
1003  minimum possible (s64)value 等于 minimum possible (u64)value 等于max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, minimum possible (s64)value , minimum possible (u64)value )
1005  maximum possible (s64)value 等于 maximum possible (u64)value 等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, maximum possible (s64)value , maximum possible (u64)value )
1007  返回
1012  如果 maximum possible (u64)value 大于等于0则
1016  minimum possible (s64)value 等于 minimum possible (u64)value
1017  maximum possible (s64)value 等于 maximum possible (u64)value 等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, maximum possible (s64)value , maximum possible (u64)value )
1019  否则如果 minimum possible (u64)value 小于0则
1023  minimum possible (s64)value 等于 minimum possible (u64)value 等于max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, minimum possible (s64)value , minimum possible (u64)value )
1025  maximum possible (s64)value 等于 maximum possible (u64)value
调用者
名称描述
do_refine_retval_range
adjust_ptr_min_max_valsHandles arithmetic on a pointer and a scalar: computes new min/max and var_off.* Caller should also handle BPF_MOV case separately.* If we return -EACCES, caller may want to try again treating pointer as a* scalar
adjust_scalar_min_max_valsWARNING: This function does calculations on 64-bit values, but the actual* execution may occur on 32-bit values. Therefore, things like bitshifts* need extra checks in the 32-bit case.
reg_set_min_maxAdjusts the register min/max values in the case that the dst_reg is the* variable register that we are working on, and src_reg is a constant or we're* simply doing a BPF_K check.* In JEQ/JNE cases we also adjust the var_off values.
reg_set_min_max_invSame as above, but for the case that dst_reg holds a constant and src_reg is* the variable reg.
__reg_combine_min_maxRegs are known to be equal, so intersect their min/max/var_off