Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\inode.c Create Date:2022-07-28 13:06:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_obj_get_user

Proto:int bpf_obj_get_user(const char __user *pathname, int flags)

Type:int

Parameter:

TypeParameterName
const char __user *pathname
intflags
481  type = BPF_TYPE_UNSPEC
483  ret = -ENOENT
487  f_flags = bpf_get_file_flag(flags)
488  If f_flags < 0 Then Return f_flags
491  pname = getname(pathname)
492  If IS_ERR(pname) Then Return PTR_ERR(pname)
495  raw = bpf_obj_do_get(pname, & type, f_flags)
496  If IS_ERR(raw) Then
497  ret = PTR_ERR(raw)
498  Go to out
501  If type == BPF_TYPE_PROG Then ret = bpf_prog_new_fd(raw)
503  Else if type == BPF_TYPE_MAP Then ret = bpf_map_new_fd(raw, f_flags)
505  Else Go to out
508  If ret < 0 Then bpf_any_put(raw, type)
510  out :
511  putname(pname)
512  Return ret
Caller
NameDescribe
bpf_obj_get