函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:check_xadd

函数原型:static int check_xadd(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn)

返回类型:int

参数:

类型参数名称
struct bpf_verifier_env *env
intinsn_idx
struct bpf_insn *insn
3071  如果ld/ldx fields ( opcode )不等于32-bit ld/ldx fields ( opcode )不等于double word (64-bit) signed immediate constant 不等于0则
3073  verbose(env, "BPF_XADD uses reserved fields\n")
3074  返回:负EINVAL
3078  err等于check_reg_arg(env, source register , register is used as source operand )
3079  如果err则返回:err
3083  err等于check_reg_arg(env, dest register , register is used as source operand )
3084  如果err则返回:err
3087  如果is_pointer_value(env, source register )则
3088  verbose(env, "R%d leaks addr into mem\n", source register )
3089  返回:负EACCES
3092  如果is_ctx_reg(env, dest register )或is_pkt_reg(env, dest register )或is_flow_key_reg(env, dest register )或is_sk_reg(env, dest register )则
3096  verbose(env, "BPF_XADD stores into R%d %s is not allowed\n", dest register , string representation of 'enum bpf_reg_type' [type])
3099  返回:负EACCES
3103  err等于heck 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 &&
3105  如果err则返回:err
3109  返回:heck 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 &&
调用者
名称描述
do_check