• Home
  • Raw
  • Download

Lines Matching refs:raw

32 static void *bpf_any_get(void *raw, enum bpf_type type)  in bpf_any_get()  argument
36 bpf_prog_inc(raw); in bpf_any_get()
39 bpf_map_inc_with_uref(raw); in bpf_any_get()
42 bpf_link_inc(raw); in bpf_any_get()
49 return raw; in bpf_any_get()
52 static void bpf_any_put(void *raw, enum bpf_type type) in bpf_any_put() argument
56 bpf_prog_put(raw); in bpf_any_put()
59 bpf_map_put_with_uref(raw); in bpf_any_put()
62 bpf_link_put(raw); in bpf_any_put()
72 void *raw; in bpf_fd_probe_obj() local
74 raw = bpf_map_get_with_uref(ufd); in bpf_fd_probe_obj()
75 if (!IS_ERR(raw)) { in bpf_fd_probe_obj()
77 return raw; in bpf_fd_probe_obj()
80 raw = bpf_prog_get(ufd); in bpf_fd_probe_obj()
81 if (!IS_ERR(raw)) { in bpf_fd_probe_obj()
83 return raw; in bpf_fd_probe_obj()
86 raw = bpf_link_get_from_fd(ufd); in bpf_fd_probe_obj()
87 if (!IS_ERR(raw)) { in bpf_fd_probe_obj()
89 return raw; in bpf_fd_probe_obj()
331 static int bpf_mkobj_ops(struct dentry *dentry, umode_t mode, void *raw, in bpf_mkobj_ops() argument
342 inode->i_private = raw; in bpf_mkobj_ops()
438 static int bpf_obj_do_pin(const char __user *pathname, void *raw, in bpf_obj_do_pin() argument
465 ret = vfs_mkobj(dentry, mode, bpf_mkprog, raw); in bpf_obj_do_pin()
468 ret = vfs_mkobj(dentry, mode, bpf_mkmap, raw); in bpf_obj_do_pin()
471 ret = vfs_mkobj(dentry, mode, bpf_mklink, raw); in bpf_obj_do_pin()
484 void *raw; in bpf_obj_pin_user() local
487 raw = bpf_fd_probe_obj(ufd, &type); in bpf_obj_pin_user()
488 if (IS_ERR(raw)) in bpf_obj_pin_user()
489 return PTR_ERR(raw); in bpf_obj_pin_user()
491 ret = bpf_obj_do_pin(pathname, raw, type); in bpf_obj_pin_user()
493 bpf_any_put(raw, type); in bpf_obj_pin_user()
503 void *raw; in bpf_obj_do_get() local
519 raw = bpf_any_get(inode->i_private, *type); in bpf_obj_do_get()
520 if (!IS_ERR(raw)) in bpf_obj_do_get()
524 return raw; in bpf_obj_do_get()
534 void *raw; in bpf_obj_get_user() local
541 raw = bpf_obj_do_get(pathname, &type, f_flags); in bpf_obj_get_user()
542 if (IS_ERR(raw)) in bpf_obj_get_user()
543 return PTR_ERR(raw); in bpf_obj_get_user()
546 ret = bpf_prog_new_fd(raw); in bpf_obj_get_user()
548 ret = bpf_map_new_fd(raw, f_flags); in bpf_obj_get_user()
550 ret = (f_flags != O_RDWR) ? -EINVAL : bpf_link_new_fd(raw); in bpf_obj_get_user()
555 bpf_any_put(raw, type); in bpf_obj_get_user()