函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\tnum.h Create Date:2022-07-27 14:08:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Returns true if @a is a known constant

函数原型:static inline bool tnum_is_const(struct tnum a)

返回类型:bool

参数:

类型参数名称
struct tnuma
56  返回:非mask
调用者
名称描述
print_verifier_state
register_is_const
check_stack_access
check_ctx_reg
check_tp_buffer_access
check_ptr_to_btf_access
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_stack_boundary
check_stack_boundarywhen register 'regno' is passed into function that will read 'access_size'* bytes from that pointer, make sure that it's within stack boundary* and all elements of stack are initialized
process_spin_lockImplementation details:* bpf_map_lookup returns PTR_TO_MAP_VALUE_OR_NULL* Two bpf_map_lookups (even with the same key) will have different reg->id
check_func_arg
check_reg_sane_offset
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.
is_branch_takenmpute branch direction of the expression "if (reg opcode val) goto target;"* and return:* 1 - branch will be taken and "goto target" will be executed* 0 - branch will not be taken and fall-through to next insn* -1 - unknown
check_cond_jmp_op
tnum_equals_constReturns true if @a == tnum_const(@b)