Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:record_func_map

Proto:static int record_func_map(struct bpf_verifier_env *env, struct bpf_call_arg_meta *meta, int func_id, int insn_idx)

Type:int

Parameter:

TypeParameterName
struct bpf_verifier_env *env
struct bpf_call_arg_meta *meta
intfunc_id
intinsn_idx
4090  aux = array of per-insn state [insn_idx]
4091  map = map_ptr
4093  If func_id != BPF_FUNC_tail_call && func_id != BPF_FUNC_map_lookup_elem && func_id != BPF_FUNC_map_update_elem && func_id != BPF_FUNC_map_delete_elem && func_id != BPF_FUNC_map_push_elem && func_id != BPF_FUNC_map_pop_elem && func_id != BPF_FUNC_map_peek_elem Then Return 0
4102  If (map == NULL) Then
4103  verbose(env, "kernel subsystem misconfigured verifier\n")
4104  Return -EINVAL
4111  If map_flags & Flags for accessing BPF object from program side. && ( func_id == BPF_FUNC_map_delete_elem || func_id == BPF_FUNC_map_update_elem || func_id == BPF_FUNC_map_push_elem || func_id == BPF_FUNC_map_pop_elem ) Then
4116  verbose(env, "write into map forbidden\n")
4117  Return -EACCES
4120  If Not BPF_MAP_PTR( pointer/poison value for maps ) Then bpf_map_ptr_store(aux, map_ptr, unpriv_array)
4123  Else if BPF_MAP_PTR( pointer/poison value for maps ) != map_ptr Then bpf_map_ptr_store(aux, BPF_MAP_PTR_POISON, unpriv_array)
4126  Return 0
Caller
NameDescribe
check_helper_call