函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bpf_map_direct_read

函数原型:static int bpf_map_direct_read(struct bpf_map *map, int off, int size, u64 *val)

返回类型:int

参数:

类型参数名称
struct bpf_map *map
intoff
intsize
u64 *val
2825  err等于map_direct_value_addr(map, & addr, off)
2826  如果err则返回:err
2828  ptr等于addroff
2831  :size恒等于sizeof(u8)
2832  * val = (u64) * ptr
2833  退出
2834  :size恒等于sizeof(u16)
2835  * val = (u64) * ptr
2836  退出
2837  :size恒等于sizeof(u32)
2838  * val = (u64) * ptr
2839  退出
2840  :size恒等于sizeof(u64)
2841  val等于ptr
2842  退出
2843  默认
2844  返回:负EINVAL
2846  返回:0
调用者
名称描述
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 &&