函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Acquire a pointer id from the env and update the state->refs to include* this new pointer reference.* On success, returns a valid pointer id to associate with the register* On failure, returns a negative errno.

函数原型:static int acquire_reference_state(struct bpf_verifier_env *env, int insn_idx)

返回类型:int

参数:

类型参数名称
struct bpf_verifier_env *env
intinsn_idx
677  state等于cur_func(env)
678  new_ofs等于The following fields should be last. See copy_func_state()
681  err等于alloc_reference_state()
682  如果err则返回:err
684  id等于used to generate unique reg IDs 先自加
685  Track each reference created with a unique id, even if the same * instruction creates the reference multiple times (eg, via CALL).等于id
686  Instruction where the allocation of this reference occurred. This * is used purely to inform the user of a reference leak.等于insn_idx
688  返回:id
调用者
名称描述
check_helper_call