Home
last modified time | relevance | path

Searched refs:ufd (Results 1 – 25 of 25) sorted by relevance

/Linux-v5.10/fs/
Dsignalfd.c263 static int do_signalfd4(int ufd, sigset_t *mask, int flags) in do_signalfd4() argument
277 if (ufd == -1) { in do_signalfd4()
288 ufd = anon_inode_getfd("[signalfd]", &signalfd_fops, ctx, in do_signalfd4()
290 if (ufd < 0) in do_signalfd4()
293 struct fd f = fdget(ufd); in do_signalfd4()
309 return ufd; in do_signalfd4()
312 SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask, in SYSCALL_DEFINE4() argument
321 return do_signalfd4(ufd, &mask, flags); in SYSCALL_DEFINE4()
324 SYSCALL_DEFINE3(signalfd, int, ufd, sigset_t __user *, user_mask, in SYSCALL_DEFINE3() argument
333 return do_signalfd4(ufd, &mask, 0); in SYSCALL_DEFINE3()
[all …]
Dtimerfd.c392 int ufd; in SYSCALL_DEFINE2() local
430 ufd = anon_inode_getfd("[timerfd]", &timerfd_fops, ctx, in SYSCALL_DEFINE2()
432 if (ufd < 0) in SYSCALL_DEFINE2()
435 return ufd; in SYSCALL_DEFINE2()
438 static int do_timerfd_settime(int ufd, int flags, in do_timerfd_settime() argument
450 ret = timerfd_fget(ufd, &f); in do_timerfd_settime()
510 static int do_timerfd_gettime(int ufd, struct itimerspec64 *t) in do_timerfd_gettime() argument
514 int ret = timerfd_fget(ufd, &f); in do_timerfd_gettime()
542 SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags, in SYSCALL_DEFINE4() argument
551 ret = do_timerfd_settime(ufd, flags, &new, &old); in SYSCALL_DEFINE4()
[all …]
Dfile.c1057 int __receive_fd(int fd, struct file *file, int __user *ufd, unsigned int o_flags) in __receive_fd() argument
1074 if (ufd) { in __receive_fd()
1075 error = put_user(new_fd, ufd); in __receive_fd()
Duserfaultfd.c987 msg->arg.fork.ufd = fd; in resolve_userfault_fork()
/Linux-v5.10/include/linux/
Dfile.h95 extern int __receive_fd(int fd, struct file *file, int __user *ufd,
97 static inline int receive_fd_user(struct file *file, int __user *ufd, in receive_fd_user() argument
100 if (ufd == NULL) in receive_fd_user()
102 return __receive_fd(-1, file, ufd, o_flags); in receive_fd_user()
Dbpf.h1194 struct bpf_prog *bpf_prog_get(u32 ufd);
1195 struct bpf_prog *bpf_prog_get_type_dev(u32 ufd, enum bpf_prog_type type,
1210 struct bpf_map *bpf_map_get(u32 ufd);
1211 struct bpf_map *bpf_map_get_with_uref(u32 ufd);
1274 struct bpf_link *bpf_link_get_from_fd(u32 ufd);
1276 int bpf_obj_pin_user(u32 ufd, const char __user *pathname);
1451 static inline struct bpf_prog *bpf_prog_get(u32 ufd) in bpf_prog_get() argument
1456 static inline struct bpf_prog *bpf_prog_get_type_dev(u32 ufd, in bpf_prog_get_type_dev() argument
1646 static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, in bpf_prog_get_type() argument
1649 return bpf_prog_get_type_dev(ufd, type, false); in bpf_prog_get_type()
Dsyscalls.h505 asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask, size_t sizemask, int flags);
538 asmlinkage long sys_timerfd_settime(int ufd, int flags,
541 asmlinkage long sys_timerfd_gettime(int ufd, struct __kernel_itimerspec __user *otmr);
542 asmlinkage long sys_timerfd_gettime32(int ufd,
544 asmlinkage long sys_timerfd_settime32(int ufd, int flags,
1072 asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t sizemask);
Dcompat.h590 asmlinkage long compat_sys_signalfd4(int ufd,
809 asmlinkage long compat_sys_signalfd(int ufd,
Dfilter.h875 int sk_attach_bpf(u32 ufd, struct sock *sk);
877 int sk_reuseport_attach_bpf(u32 ufd, struct sock *sk);
/Linux-v5.10/tools/testing/selftests/vm/
Duserfaultfd.c339 static void wp_range(int ufd, __u64 start, __u64 len, bool wp) in wp_range() argument
349 if (ioctl(ufd, UFFDIO_WRITEPROTECT, &prms)) { in wp_range()
475 static void retry_copy_page(int ufd, struct uffdio_copy *uffdio_copy, in retry_copy_page() argument
481 if (ioctl(ufd, UFFDIO_COPY, uffdio_copy)) { in retry_copy_page()
494 static int __copy_page(int ufd, unsigned long offset, bool retry) in __copy_page() argument
510 if (ioctl(ufd, UFFDIO_COPY, &uffdio_copy)) { in __copy_page()
523 retry_copy_page(ufd, &uffdio_copy, offset); in __copy_page()
530 static int copy_page_retry(int ufd, unsigned long offset) in copy_page_retry() argument
532 return __copy_page(ufd, offset, true); in copy_page_retry()
535 static int copy_page(int ufd, unsigned long offset) in copy_page() argument
[all …]
/Linux-v5.10/tools/perf/
Dbuiltin-probe.c422 int ret, ret2, ufd = -1, kfd = -1; in perf_del_probe_events() local
436 ret = probe_file__open_both(&kfd, &ufd, PF_FL_RW); in perf_del_probe_events()
458 ret2 = probe_file__get_events(ufd, filter, ulist); in perf_del_probe_events()
463 ret2 = probe_file__del_strlist(ufd, ulist); in perf_del_probe_events()
477 if (ufd >= 0) in perf_del_probe_events()
478 close(ufd); in perf_del_probe_events()
/Linux-v5.10/kernel/bpf/
Dmap_in_map.c83 int ufd) in bpf_map_fd_get_ptr() argument
88 f = fdget(ufd); in bpf_map_fd_get_ptr()
Dsyscall.c929 struct bpf_map *bpf_map_get(u32 ufd) in bpf_map_get() argument
931 struct fd f = fdget(ufd); in bpf_map_get()
944 struct bpf_map *bpf_map_get_with_uref(u32 ufd) in bpf_map_get_with_uref() argument
946 struct fd f = fdget(ufd); in bpf_map_get_with_uref()
1006 int ufd = attr->map_fd; in map_lookup_elem() local
1019 f = fdget(ufd); in map_lookup_elem()
1073 int ufd = attr->map_fd; in map_update_elem() local
1083 f = fdget(ufd); in map_update_elem()
1137 int ufd = attr->map_fd; in map_delete_elem() local
1146 f = fdget(ufd); in map_delete_elem()
[all …]
Dinode.c70 static void *bpf_fd_probe_obj(u32 ufd, enum bpf_type *type) in bpf_fd_probe_obj() argument
74 raw = bpf_map_get_with_uref(ufd); in bpf_fd_probe_obj()
80 raw = bpf_prog_get(ufd); in bpf_fd_probe_obj()
86 raw = bpf_link_get_from_fd(ufd); in bpf_fd_probe_obj()
480 int bpf_obj_pin_user(u32 ufd, const char __user *pathname) in bpf_obj_pin_user() argument
486 raw = bpf_fd_probe_obj(ufd, &type); in bpf_obj_pin_user()
Dmap_in_map.h15 int ufd);
Darraymap.c738 u32 index = *(u32 *)key, ufd; in bpf_fd_array_map_update_elem() local
746 ufd = *(u32 *)value; in bpf_fd_array_map_update_elem()
747 new_ptr = map->ops->map_fd_get_ptr(map, map_file, ufd); in bpf_fd_array_map_update_elem()
Dhashtab.c2057 u32 ufd = *(u32 *)value; in bpf_fd_htab_map_update_elem() local
2059 ptr = map->ops->map_fd_get_ptr(map, map_file, ufd); in bpf_fd_htab_map_update_elem()
/Linux-v5.10/arch/parisc/kernel/
Dsys_parisc.c407 asmlinkage long parisc_signalfd4(int ufd, sigset_t __user *user_mask, in parisc_signalfd4() argument
411 return sys_signalfd4(ufd, user_mask, sizemask, flags); in parisc_signalfd4()
415 asmlinkage long parisc_compat_signalfd4(int ufd, in parisc_compat_signalfd4() argument
420 return compat_sys_signalfd4(ufd, user_mask, sizemask, flags); in parisc_compat_signalfd4()
/Linux-v5.10/net/core/
Dsock_map.c69 u32 ufd = attr->target_fd; in sock_map_get_from_fd() local
77 f = fdget(ufd); in sock_map_get_from_fd()
88 u32 ufd = attr->target_fd; in sock_map_prog_detach() local
97 f = fdget(ufd); in sock_map_prog_detach()
583 u64 ufd; in sock_map_update_elem_sys() local
586 ufd = *(u64 *)value; in sock_map_update_elem_sys()
588 ufd = *(u32 *)value; in sock_map_update_elem_sys()
589 if (ufd > S32_MAX) in sock_map_update_elem_sys()
592 sock = sockfd_lookup(ufd, &ret); in sock_map_update_elem_sys()
Dsock.c1066 u32 ufd; in sock_setsockopt() local
1069 if (copy_from_sockptr(&ufd, optval, sizeof(ufd))) in sock_setsockopt()
1072 ret = sk_attach_bpf(ufd, sk); in sock_setsockopt()
1087 u32 ufd; in sock_setsockopt() local
1090 if (copy_from_sockptr(&ufd, optval, sizeof(ufd))) in sock_setsockopt()
1093 ret = sk_reuseport_attach_bpf(ufd, sk); in sock_setsockopt()
Dfilter.c1561 static struct bpf_prog *__get_bpf(u32 ufd, struct sock *sk) in __get_bpf() argument
1566 return bpf_prog_get_type(ufd, BPF_PROG_TYPE_SOCKET_FILTER); in __get_bpf()
1569 int sk_attach_bpf(u32 ufd, struct sock *sk) in sk_attach_bpf() argument
1571 struct bpf_prog *prog = __get_bpf(ufd, sk); in sk_attach_bpf()
1586 int sk_reuseport_attach_bpf(u32 ufd, struct sock *sk) in sk_reuseport_attach_bpf() argument
1594 prog = bpf_prog_get_type(ufd, BPF_PROG_TYPE_SOCKET_FILTER); in sk_reuseport_attach_bpf()
1596 prog = bpf_prog_get_type(ufd, BPF_PROG_TYPE_SK_REUSEPORT); in sk_reuseport_attach_bpf()
/Linux-v5.10/tools/perf/util/
Dprobe-file.h42 int probe_file__open_both(int *kfd, int *ufd, int flag);
Dprobe-file.c117 int probe_file__open_both(int *kfd, int *ufd, int flag) in probe_file__open_both() argument
119 if (!kfd || !ufd) in probe_file__open_both()
123 *ufd = open_uprobe_events(flag & PF_FL_RW); in probe_file__open_both()
124 if (*kfd < 0 && *ufd < 0) { in probe_file__open_both()
125 print_both_open_warning(*kfd, *ufd); in probe_file__open_both()
Dprobe-event.c3568 int ret, ret2, ufd = -1, kfd = -1; in del_perf_probe_events() local
3575 ret = probe_file__open_both(&kfd, &ufd, PF_FL_RW); in del_perf_probe_events()
3583 ret2 = probe_file__del_events(ufd, filter); in del_perf_probe_events()
3593 if (ufd >= 0) in del_perf_probe_events()
3594 close(ufd); in del_perf_probe_events()
/Linux-v5.10/include/uapi/linux/
Duserfaultfd.h95 __u32 ufd; member