/kernel/bpf/preload/iterators/ |
D | iterators.lskel.h | 29 int fd = skel_link_create(prog_fd, 0, BPF_TRACE_ITER); in iterators_bpf__dump_bpf_map__attach() local 31 if (fd > 0) in iterators_bpf__dump_bpf_map__attach() 32 skel->links.dump_bpf_map_fd = fd; in iterators_bpf__dump_bpf_map__attach() 33 return fd; in iterators_bpf__dump_bpf_map__attach() 40 int fd = skel_link_create(prog_fd, 0, BPF_TRACE_ITER); in iterators_bpf__dump_bpf_prog__attach() local 42 if (fd > 0) in iterators_bpf__dump_bpf_prog__attach() 43 skel->links.dump_bpf_prog_fd = fd; in iterators_bpf__dump_bpf_prog__attach() 44 return fd; in iterators_bpf__dump_bpf_prog__attach()
|
/kernel/ |
D | pid.c | 525 struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags) in pidfd_get_pid() argument 527 struct fd f; in pidfd_get_pid() 530 f = fdget(fd); in pidfd_get_pid() 598 int fd; in pidfd_create() local 606 fd = anon_inode_getfd("[pidfd]", &pidfd_fops, get_pid(pid), in pidfd_create() 608 if (fd < 0) in pidfd_create() 611 return fd; in pidfd_create() 632 int fd; in SYSCALL_DEFINE2() local 645 fd = pidfd_create(p, flags); in SYSCALL_DEFINE2() 648 return fd; in SYSCALL_DEFINE2() [all …]
|
D | taskstats.c | 414 u32 fd; in cgroupstats_user_cmd() local 415 struct fd f; in cgroupstats_user_cmd() 421 fd = nla_get_u32(info->attrs[CGROUPSTATS_CMD_ATTR_FD]); in cgroupstats_user_cmd() 422 f = fdget(fd); in cgroupstats_user_cmd()
|
D | seccomp.c | 122 int fd; member 1058 int fd; in seccomp_handle_addfd() local 1066 fd = receive_fd(addfd->file, addfd->flags); in seccomp_handle_addfd() 1068 fd = receive_fd_replace(addfd->fd, addfd->file, addfd->flags); in seccomp_handle_addfd() 1069 addfd->ret = fd; in seccomp_handle_addfd() 1073 if (fd < 0) { in seccomp_handle_addfd() 1079 n->val = fd; in seccomp_handle_addfd() 1629 kaddfd.fd = addfd.newfd; in seccomp_notify_addfd()
|
D | uid16.c | 33 SYSCALL_DEFINE3(fchown16, unsigned int, fd, old_uid_t, user, old_gid_t, group) in SYSCALL_DEFINE3() argument 35 return ksys_fchown(fd, low2highuid(user), low2highgid(group)); in SYSCALL_DEFINE3()
|
D | watch_queue.c | 663 struct watch_queue *get_watch_queue(int fd) in get_watch_queue() argument 667 struct fd f; in get_watch_queue() 669 f = fdget(fd); in get_watch_queue()
|
D | nsproxy.c | 527 SYSCALL_DEFINE2(setns, int, fd, int, flags) in SYSCALL_DEFINE2() argument 534 file = fget(fd); in SYSCALL_DEFINE2()
|
D | audit.h | 194 int fd; member
|
D | fork.c | 3241 struct files_struct *fd = current->files; in unshare_fd() local 3245 (fd && atomic_read(&fd->count) > 1)) { in unshare_fd() 3246 *new_fdp = dup_fd(fd, max_fds, &error); in unshare_fd()
|
D | auditsc.c | 1459 audit_log_format(ab, "fd=%d flags=0x%x", context->mmap.fd, in show_special() 2850 void __audit_mmap_fd(int fd, int flags) in __audit_mmap_fd() argument 2854 context->mmap.fd = fd; in __audit_mmap_fd()
|
D | sys.c | 1885 static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd) in prctl_set_mm_exe_file() argument 1887 struct fd exe; in prctl_set_mm_exe_file() 1891 exe = fdget(fd); in prctl_set_mm_exe_file()
|
/kernel/bpf/ |
D | bpf_inode_storage.c | 109 int fd; in bpf_fd_inode_storage_lookup_elem() local 111 fd = *(int *)key; in bpf_fd_inode_storage_lookup_elem() 112 f = fget_raw(fd); in bpf_fd_inode_storage_lookup_elem() 126 int fd; in bpf_fd_inode_storage_update_elem() local 128 fd = *(int *)key; in bpf_fd_inode_storage_update_elem() 129 f = fget_raw(fd); in bpf_fd_inode_storage_update_elem() 160 int fd, err; in bpf_fd_inode_storage_delete_elem() local 162 fd = *(int *)key; in bpf_fd_inode_storage_delete_elem() 163 f = fget_raw(fd); in bpf_fd_inode_storage_delete_elem()
|
D | bpf_task_storage.c | 124 int fd, err; in bpf_pid_task_storage_lookup_elem() local 126 fd = *(int *)key; in bpf_pid_task_storage_lookup_elem() 127 pid = pidfd_get_pid(fd, &f_flags); in bpf_pid_task_storage_lookup_elem() 158 int fd, err; in bpf_pid_task_storage_update_elem() local 160 fd = *(int *)key; in bpf_pid_task_storage_update_elem() 161 pid = pidfd_get_pid(fd, &f_flags); in bpf_pid_task_storage_update_elem() 205 int fd, err; in bpf_pid_task_storage_delete_elem() local 207 fd = *(int *)key; in bpf_pid_task_storage_delete_elem() 208 pid = pidfd_get_pid(fd, &f_flags); in bpf_pid_task_storage_delete_elem()
|
D | task_iter.c | 275 u32 fd; member 283 unsigned int curr_fd = info->fd; in task_file_seq_get_next() 292 curr_fd = info->fd; in task_file_seq_get_next() 303 curr_fd = info->fd; in task_file_seq_get_next() 318 info->fd = curr_fd; in task_file_seq_get_next() 333 info->fd = 0; in task_file_seq_get_next() 356 ++info->fd; in task_file_seq_next() 364 u32 fd __aligned(8); 369 struct task_struct *task, u32 fd, in DEFINE_BPF_ITER_FUNC() argument 387 ctx.fd = info->fd; in DEFINE_BPF_ITER_FUNC()
|
D | syscall.c | 180 static int bpf_map_update_value(struct bpf_map *map, struct fd f, void *key, in bpf_map_update_value() 673 static fmode_t map_get_sys_perms(struct bpf_map *map, struct fd f) in map_get_sys_perms() 1200 struct bpf_map *__bpf_map_get(struct fd f) in __bpf_map_get() 1227 struct fd f = fdget(ufd); in bpf_map_get() 1243 struct fd f = fdget(ufd); in bpf_map_get_with_uref() 1318 struct fd f; in map_lookup_elem() 1393 struct fd f; in map_update_elem() 1446 struct fd f; in map_delete_elem() 1503 struct fd f; in map_get_next_key() 1626 struct fd f; in generic_map_update_batch() [all …]
|
D | cgroup_iter.c | 198 int fd = linfo->cgroup.cgroup_fd; in bpf_iter_attach_cgroup() local 209 if (fd && id) in bpf_iter_attach_cgroup() 212 if (fd) in bpf_iter_attach_cgroup() 213 cgrp = cgroup_v1v2_get_from_fd(fd); in bpf_iter_attach_cgroup()
|
D | reuseport_array.c | 244 int err, fd; in bpf_fd_reuseport_array_update_elem() local 257 fd = fd64; in bpf_fd_reuseport_array_update_elem() 259 fd = *(int *)value; in bpf_fd_reuseport_array_update_elem() 262 socket = sockfd_lookup(fd, &err); in bpf_fd_reuseport_array_update_elem()
|
D | cpumap.c | 98 value_size != offsetofend(struct bpf_cpumap_val, bpf_prog.fd)) || in cpu_map_alloc() 410 struct bpf_map *map, int fd) in __cpu_map_load_bpf_program() argument 414 prog = bpf_prog_get_type(fd, BPF_PROG_TYPE_XDP); in __cpu_map_load_bpf_program() 434 int numa, err, i, fd = value->bpf_prog.fd; in __cpu_map_entry_alloc() local 471 if (fd > 0 && __cpu_map_load_bpf_program(rcpu, map, fd)) in __cpu_map_entry_alloc()
|
D | bpf_iter.c | 641 int err, fd; in bpf_iter_new_fd() local 647 fd = get_unused_fd_flags(flags); in bpf_iter_new_fd() 648 if (fd < 0) in bpf_iter_new_fd() 649 return fd; in bpf_iter_new_fd() 662 fd_install(fd, file); in bpf_iter_new_fd() 663 return fd; in bpf_iter_new_fd() 668 put_unused_fd(fd); in bpf_iter_new_fd()
|
D | map_in_map.c | 14 struct fd f; in bpf_map_meta_alloc() 101 struct fd f; in bpf_map_fd_get_ptr()
|
D | arraymap.c | 886 struct file *map_file, int fd) in prog_fd_array_get_ptr() argument 888 struct bpf_prog *prog = bpf_prog_get(fd); in prog_fd_array_get_ptr() 1163 struct file *map_file, int fd) in perf_event_fd_array_get_ptr() argument 1170 perf_file = perf_event_get(fd); in perf_event_fd_array_get_ptr() 1237 int fd) in cgroup_fd_array_get_ptr() argument 1239 return cgroup_get_from_fd(fd); in cgroup_fd_array_get_ptr()
|
D | devmap.c | 121 valsize != offsetofend(struct bpf_devmap_val, bpf_prog.fd)) || in dev_map_init_map() 857 if (val->bpf_prog.fd > 0) { in __dev_map_alloc_node() 858 prog = bpf_prog_get_type_dev(val->bpf_prog.fd, in __dev_map_alloc_node() 909 if (val.bpf_prog.fd > 0) in __dev_map_update_elem()
|
D | btf.c | 6944 struct btf *btf_get_by_fd(int fd) in btf_get_by_fd() argument 6947 struct fd f; in btf_get_by_fd() 6949 f = fdget(fd); in btf_get_by_fd() 7029 int fd; in btf_get_fd_by_id() local 7040 fd = __btf_new_fd(btf); in btf_get_fd_by_id() 7041 if (fd < 0) in btf_get_fd_by_id() 7044 return fd; in btf_get_fd_by_id()
|
/kernel/events/ |
D | core.c | 917 static inline int perf_cgroup_connect(int fd, struct perf_event *event, in perf_cgroup_connect() argument 923 struct fd f = fdget(fd); in perf_cgroup_connect() 5672 static inline int perf_fget_light(int fd, struct fd *p) in perf_fget_light() argument 5674 struct fd f = fdget(fd); in perf_fget_light() 5734 struct fd output; in _perf_ioctl() 6471 static int perf_fasync(int fd, struct file *filp, int on) in perf_fasync() argument 6478 retval = fasync_helper(fd, filp, on, &event->fasync); in perf_fasync() 12276 struct fd group = {NULL, 0}; in SYSCALL_DEFINE5() 13138 struct file *perf_event_get(unsigned int fd) in perf_event_get() argument 13140 struct file *file = fget(fd); in perf_event_get()
|
/kernel/module/ |
D | main.c | 2983 SYSCALL_DEFINE3(finit_module, int, fd, const char __user *, uargs, int, flags) in SYSCALL_DEFINE3() argument 2994 pr_debug("finit_module: fd=%d, uargs=%p, flags=%i\n", fd, uargs, flags); in SYSCALL_DEFINE3() 3001 len = kernel_read_file_from_fd(fd, 0, &buf, INT_MAX, NULL, in SYSCALL_DEFINE3()
|