Searched refs:path_fd (Results 1 – 8 of 8) sorted by relevance
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/ |
D | bpf_obj_pinning.c | 81 pin_opts.path_fd = mnt_fd; in bpf_obj_pinning_detached() 88 get_opts.path_fd = mnt_fd; in bpf_obj_pinning_detached() 148 pin_opts.path_fd = open("/sys/fs/bpf", O_PATH); in validate_pin() 149 ASSERT_GE(pin_opts.path_fd, 0, "path_fd"); in validate_pin() 159 if (path_kind == PATH_FD_REL && pin_opts.path_fd >= 0) in validate_pin() 160 close(pin_opts.path_fd); in validate_pin() 213 get_opts.path_fd = open("/sys/fs/bpf", O_PATH); in validate_get() 214 ASSERT_GE(get_opts.path_fd, 0, "path_fd"); in validate_get() 224 if (path_kind == PATH_FD_REL && get_opts.path_fd >= 0) in validate_get() 225 close(get_opts.path_fd); in validate_get()
|
/linux-6.6.21/kernel/bpf/ |
D | inode.c | 436 static int bpf_obj_do_pin(int path_fd, const char __user *pathname, void *raw, in bpf_obj_do_pin() argument 445 dentry = user_path_create(path_fd, pathname, &path, 0); in bpf_obj_do_pin() 478 int bpf_obj_pin_user(u32 ufd, int path_fd, const char __user *pathname) in bpf_obj_pin_user() argument 488 ret = bpf_obj_do_pin(path_fd, pathname, raw, type); in bpf_obj_pin_user() 495 static void *bpf_obj_do_get(int path_fd, const char __user *pathname, in bpf_obj_do_get() argument 503 ret = user_path_at(path_fd, pathname, LOOKUP_FOLLOW, &path); in bpf_obj_do_get() 527 int bpf_obj_get_user(int path_fd, const char __user *pathname, int flags) in bpf_obj_get_user() argument 538 raw = bpf_obj_do_get(path_fd, pathname, &type, f_flags); in bpf_obj_get_user()
|
D | syscall.c | 2792 #define BPF_OBJ_LAST_FIELD path_fd 2796 int path_fd; in bpf_obj_pin() local 2802 if (!(attr->file_flags & BPF_F_PATH_FD) && attr->path_fd) in bpf_obj_pin() 2805 path_fd = attr->file_flags & BPF_F_PATH_FD ? attr->path_fd : AT_FDCWD; in bpf_obj_pin() 2806 return bpf_obj_pin_user(attr->bpf_fd, path_fd, in bpf_obj_pin() 2812 int path_fd; in bpf_obj_get() local 2819 if (!(attr->file_flags & BPF_F_PATH_FD) && attr->path_fd) in bpf_obj_get() 2822 path_fd = attr->file_flags & BPF_F_PATH_FD ? attr->path_fd : AT_FDCWD; in bpf_obj_get() 2823 return bpf_obj_get_user(path_fd, u64_to_user_ptr(attr->pathname), in bpf_obj_get()
|
/linux-6.6.21/tools/lib/bpf/ |
D | bpf.h | 291 int path_fd; member 295 #define bpf_obj_pin_opts__last_field path_fd 305 int path_fd; member 309 #define bpf_obj_get_opts__last_field path_fd
|
D | bpf.c | 577 const size_t attr_sz = offsetofend(union bpf_attr, path_fd); in bpf_obj_pin_opts() 585 attr.path_fd = OPTS_GET(opts, path_fd, 0); in bpf_obj_pin_opts() 606 const size_t attr_sz = offsetofend(union bpf_attr, path_fd); in bpf_obj_get_opts() 614 attr.path_fd = OPTS_GET(opts, path_fd, 0); in bpf_obj_get_opts()
|
/linux-6.6.21/include/linux/ |
D | bpf.h | 2192 int bpf_obj_pin_user(u32 ufd, int path_fd, const char __user *pathname); 2193 int bpf_obj_get_user(int path_fd, const char __user *pathname, int flags);
|
/linux-6.6.21/tools/include/uapi/linux/ |
D | bpf.h | 1467 __s32 path_fd; member
|
/linux-6.6.21/include/uapi/linux/ |
D | bpf.h | 1467 __s32 path_fd; member
|