Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\verifier.c Create Date:2022-07-28 12:58:23
Last Modify:2022-05-19 20:02:10 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_map_direct_read

Proto:static int bpf_map_direct_read(struct bpf_map *map, int off, int size, u64 *val)

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
intoff
intsize
u64 *val
2825  err = map_direct_value_addr(map, & addr, off)
2826  If err Then Return err
2828  ptr = addr + off
2831  Case size == sizeof(u8)
2832  * val = (u64) * ptr
2833  Break
2834  Case size == sizeof(u16)
2835  * val = (u64) * ptr
2836  Break
2837  Case size == sizeof(u32)
2838  * val = (u64) * ptr
2839  Break
2840  Case size == sizeof(u64)
2841  val = ptr
2842  Break
2843  Default
2844  Return -EINVAL
2846  Return 0
Caller
NameDescribe
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 &&