Lines Matching full:raw

33 static void *bpf_any_get(void *raw, enum bpf_type type)  in bpf_any_get()  argument
37 bpf_prog_inc(raw); in bpf_any_get()
40 bpf_map_inc_with_uref(raw); in bpf_any_get()
43 bpf_link_inc(raw); in bpf_any_get()
50 return raw; in bpf_any_get()
53 static void bpf_any_put(void *raw, enum bpf_type type) in bpf_any_put() argument
57 bpf_prog_put(raw); in bpf_any_put()
60 bpf_map_put_with_uref(raw); in bpf_any_put()
63 bpf_link_put(raw); in bpf_any_put()
73 void *raw; in bpf_fd_probe_obj() local
75 raw = bpf_map_get_with_uref(ufd); in bpf_fd_probe_obj()
76 if (!IS_ERR(raw)) { in bpf_fd_probe_obj()
78 return raw; in bpf_fd_probe_obj()
81 raw = bpf_prog_get(ufd); in bpf_fd_probe_obj()
82 if (!IS_ERR(raw)) { in bpf_fd_probe_obj()
84 return raw; in bpf_fd_probe_obj()
87 raw = bpf_link_get_from_fd(ufd); in bpf_fd_probe_obj()
88 if (!IS_ERR(raw)) { in bpf_fd_probe_obj()
90 return raw; in bpf_fd_probe_obj()
329 static int bpf_mkobj_ops(struct dentry *dentry, umode_t mode, void *raw, in bpf_mkobj_ops() argument
340 inode->i_private = raw; in bpf_mkobj_ops()
436 static int bpf_obj_do_pin(int path_fd, const char __user *pathname, void *raw, in bpf_obj_do_pin() argument
462 ret = vfs_mkobj(dentry, mode, bpf_mkprog, raw); in bpf_obj_do_pin()
465 ret = vfs_mkobj(dentry, mode, bpf_mkmap, raw); in bpf_obj_do_pin()
468 ret = vfs_mkobj(dentry, mode, bpf_mklink, raw); in bpf_obj_do_pin()
481 void *raw; in bpf_obj_pin_user() local
484 raw = bpf_fd_probe_obj(ufd, &type); in bpf_obj_pin_user()
485 if (IS_ERR(raw)) in bpf_obj_pin_user()
486 return PTR_ERR(raw); in bpf_obj_pin_user()
488 ret = bpf_obj_do_pin(path_fd, pathname, raw, type); in bpf_obj_pin_user()
490 bpf_any_put(raw, type); in bpf_obj_pin_user()
500 void *raw; in bpf_obj_do_get() local
516 raw = bpf_any_get(inode->i_private, *type); in bpf_obj_do_get()
517 if (!IS_ERR(raw)) in bpf_obj_do_get()
521 return raw; in bpf_obj_do_get()
531 void *raw; in bpf_obj_get_user() local
538 raw = bpf_obj_do_get(path_fd, pathname, &type, f_flags); in bpf_obj_get_user()
539 if (IS_ERR(raw)) in bpf_obj_get_user()
540 return PTR_ERR(raw); in bpf_obj_get_user()
543 ret = bpf_prog_new_fd(raw); in bpf_obj_get_user()
545 ret = bpf_map_new_fd(raw, f_flags); in bpf_obj_get_user()
547 ret = (f_flags != O_RDWR) ? -EINVAL : bpf_link_new_fd(raw); in bpf_obj_get_user()
552 bpf_any_put(raw, type); in bpf_obj_get_user()