函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Same as above, but for the case that dst_reg holds a constant and src_reg is* the variable reg.

函数原型:static void reg_set_min_max_inv(struct bpf_reg_state *true_reg, struct bpf_reg_state *false_reg, u64 val, u8 opcode, bool is_jmp32)

返回类型:void

参数:

类型参数名称
struct bpf_reg_state *true_reg
struct bpf_reg_state *false_reg
u64val
u8opcode
boolis_jmp32
5701  如果__is_pointer_value(TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., false_reg)则返回
5704  val等于如果is_jmp32val否则val
5705  sval等于如果is_jmp32val否则val
5708  :opcode恒等于BPF_JEQ
5709  :opcode恒等于jump !=
5711  reg等于如果opcode恒等于BPF_JEQtrue_reg否则false_reg
5714  如果is_jmp32
5715  old_v等于value
5716  hi_mask等于0xffffffffULL的反
5718  value等于old_v按位与hi_mask按位或val
5719  mask与等于hi_mask
5720  否则
5723  退出
5725  :opcode恒等于BPF_JSET
5726  For scalar types (SCALAR_VALUE), this represents our knowledge of * the actual value. * For pointer types, this represents the variable part of the offset * from the pointed-to object, and is shared with all bpf_reg_states * with the same id as us.等于Bitwise-AND, return @a & @b
5728  如果s_power_of_2() - check if a value is a power of two*@n: the value to check* Determine whether some value is a power of two, where zero is* *not* considered a power of two.* Return: true if @n is a power of 2, otherwise false. For scalar types (SCALAR_VALUE), this represents our knowledge of * the actual value. * For pointer types, this represents the variable part of the offset * from the pointed-to object, and is shared with all bpf_reg_states * with the same id as us.等于Bitwise-OR, return @a | @b
5731  退出
5732  :opcode恒等于BPF_JGE
5733  :opcode恒等于BPF_JGT
5735  false_umin等于如果opcode恒等于BPF_JGTval否则val加1
5736  true_umax等于如果opcode恒等于BPF_JGTval减1否则val
5738  如果is_jmp32
5742  minimum possible (u64)value 等于两数取大( minimum possible (u64)value , false_umin)
5743  maximum possible (u64)value 等于两数取小( maximum possible (u64)value , true_umax)
5744  退出
5746  :opcode恒等于SGE is signed '>=', GE in x86
5747  :opcode恒等于SGT is signed '>', GT in x86
5749  false_smin等于如果opcode恒等于SGT is signed '>', GT in x86 sval否则sval加1
5750  true_smax等于如果opcode恒等于SGT is signed '>', GT in x86 sval减1否则sval
5752  如果is_jmp32且非Return true if VAL is compared with a s64 sign extended from s32, and they* are with the same signedness.退出
5754  minimum possible (s64)value 等于两数取大( minimum possible (s64)value , false_smin)
5755  maximum possible (s64)value 等于两数取小( maximum possible (s64)value , true_smax)
5756  退出
5758  :opcode恒等于LE is unsigned, '<='
5759  :opcode恒等于LT is unsigned, '<'
5761  false_umax等于如果opcode恒等于LT is unsigned, '<' val否则val减1
5762  true_umin等于如果opcode恒等于LT is unsigned, '<' val加1否则val
5764  如果is_jmp32
5768  maximum possible (u64)value 等于两数取小( maximum possible (u64)value , false_umax)
5769  minimum possible (u64)value 等于两数取大( minimum possible (u64)value , true_umin)
5770  退出
5772  :opcode恒等于SLE is signed, '<='
5773  :opcode恒等于SLT is signed, '<'
5775  false_smax等于如果opcode恒等于SLT is signed, '<' sval否则sval减1
5776  true_smin等于如果opcode恒等于SLT is signed, '<' sval加1否则sval
5778  如果is_jmp32且非Return true if VAL is compared with a s64 sign extended from s32, and they* are with the same signedness.退出
5780  maximum possible (s64)value 等于两数取小( maximum possible (s64)value , false_smax)
5781  minimum possible (s64)value 等于两数取大( minimum possible (s64)value , true_smin)
5782  退出
5784  默认
5785  退出
5788  Uses signed min/max values to inform unsigned, and vice-versa
5789  Uses signed min/max values to inform unsigned, and vice-versa
5791  Attempts to improve var_off based on unsigned min/max information
5792  Attempts to improve var_off based on unsigned min/max information
5793  如果is_jmp32
5794  __reg_bound_offset32(false_reg)
5795  __reg_bound_offset32(true_reg)
5801  Attempts to improve min/max values based on var_off information
5802  Attempts to improve min/max values based on var_off information
调用者
名称描述
check_cond_jmp_op