Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_obj_do_pin

Proto:static int bpf_obj_do_pin(const struct filename *pathname, void *raw, enum bpf_type type)

Type:int

Parameter:

TypeParameterName
const struct filename *pathname
void *raw
enum bpf_typetype
391  dentry = kern_path_create(Special value used to indicateopenat should use the currentworking directory. , pointer to actual string , & path, 0)
392  If IS_ERR(dentry) Then Return PTR_ERR(dentry)
395  mode = S_IFREG | (S_IRUSR | S_IWUSR) & ~current_umask()
397  ret = security_path_mknod( & path, dentry, mode, 0)
398  If ret Then Go to out
401  dir = d_inode - Get the actual inode of this dentry*@dentry: The dentry to query* This is the helper normal filesystems should use to get at their own inodes* in their own dentries and ignore the layering superimposed upon them.
402  If i_op != bpf_dir_iops Then
403  ret = -EPERM
404  Go to out
408  Case type == BPF_TYPE_PROG
410  Break
411  Case type == BPF_TYPE_MAP
413  Break
414  Default
415  ret = -EPERM
417  out :
418  done_path_create( & path, dentry)
419  Return ret
Caller
NameDescribe
bpf_obj_pin_user