/kernel/trace/ |
D | trace_events.c | 64 #define do_for_each_event_file(tr, file) \ argument 66 list_for_each_entry(file, &tr->events, list) 68 #define do_for_each_event_file_safe(tr, file) \ argument 71 list_for_each_entry_safe(file, ___n, &tr->events, list) 290 struct trace_event_file *file = data; in trace_event_reg() local 297 file); in trace_event_reg() 301 file); in trace_event_reg() 327 struct trace_event_file *file; in trace_event_enable_cmd_record() local 332 do_for_each_event_file(tr, file) { in trace_event_enable_cmd_record() 334 if (!(file->flags & EVENT_FILE_FL_ENABLED)) in trace_event_enable_cmd_record() [all …]
|
D | trace_events_trigger.c | 56 event_triggers_call(struct trace_event_file *file, void *rec, in event_triggers_call() argument 63 if (list_empty(&file->triggers)) in event_triggers_call() 66 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_call() 99 event_triggers_post_call(struct trace_event_file *file, in event_triggers_post_call() argument 104 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_post_call() 176 static int event_trigger_regex_open(struct inode *inode, struct file *file) in event_trigger_regex_open() argument 186 if (unlikely(!event_file_data(file))) { in event_trigger_regex_open() 191 if ((file->f_mode & FMODE_WRITE) && in event_trigger_regex_open() 192 (file->f_flags & O_TRUNC)) { in event_trigger_regex_open() 196 event_file = event_file_data(file); in event_trigger_regex_open() [all …]
|
D | trace_events_filter.c | 1047 static inline struct event_filter *event_filter(struct trace_event_file *file) in event_filter() argument 1049 return file->filter; in event_filter() 1053 void print_event_filter(struct trace_event_file *file, struct trace_seq *s) in print_event_filter() argument 1055 struct event_filter *filter = event_filter(file); in print_event_filter() 1091 static void filter_disable(struct trace_event_file *file) in filter_disable() argument 1093 unsigned long old_flags = file->flags; in filter_disable() 1095 file->flags &= ~EVENT_FILE_FL_FILTERED; in filter_disable() 1097 if (old_flags != file->flags) in filter_disable() 1116 static inline void __remove_filter(struct trace_event_file *file) in __remove_filter() argument 1118 filter_disable(file); in __remove_filter() [all …]
|
D | trace.h | 529 struct file *filp, char __user *ubuf, 532 struct file *filp, 729 int tracing_open_generic(struct inode *inode, struct file *filp); 730 int tracing_open_generic_tr(struct inode *inode, struct file *filp); 731 int tracing_open_file_tr(struct inode *inode, struct file *filp); 732 int tracing_release_file_tr(struct inode *inode, struct file *filp); 799 loff_t tracing_lseek(struct file *file, loff_t offset, int whence); 1501 __event_trigger_test_discard(struct trace_event_file *file, in __event_trigger_test_discard() argument 1507 unsigned long eflags = file->flags; in __event_trigger_test_discard() 1510 *tt = event_triggers_call(file, entry, event); in __event_trigger_test_discard() [all …]
|
D | trace_events_hist.c | 547 static void last_cmd_set(struct trace_event_file *file, char *str) in last_cmd_set() argument 558 if (file) { in last_cmd_set() 559 call = file->event_call; in last_cmd_set() 886 struct trace_event_file *file, in find_var() argument 899 list_for_each_entry(test, &file->triggers, list) { in find_var() 918 struct trace_event_file *file, *found = NULL; in find_var_file() local 925 file = var_hist_data->event_file; in find_var_file() 926 if (file == found) in find_var_file() 935 found = file; in find_var_file() 942 static struct hist_field *find_file_var(struct trace_event_file *file, in find_file_var() argument [all …]
|
D | trace_kprobe.c | 353 struct trace_event_file *file) in enable_trace_kprobe() argument 366 if (file) { in enable_trace_kprobe() 367 ret = trace_probe_add_file(tp, file); in enable_trace_kprobe() 390 if (file) in enable_trace_kprobe() 391 trace_probe_remove_file(tp, file); in enable_trace_kprobe() 404 struct trace_event_file *file) in disable_trace_kprobe() argument 412 if (file) { in disable_trace_kprobe() 413 if (!trace_probe_get_file_link(tp, file)) in disable_trace_kprobe() 425 if (file) in disable_trace_kprobe() 432 trace_probe_remove_file(tp, file); in disable_trace_kprobe() [all …]
|
D | trace_events_inject.c | 17 trace_inject_entry(struct trace_event_file *file, void *rec, int len) in trace_inject_entry() argument 24 entry = trace_event_buffer_reserve(&fbuffer, file, len); in trace_inject_entry() 279 event_inject_write(struct file *filp, const char __user *ubuf, size_t cnt, in event_inject_write() 283 struct trace_event_file *file; in event_inject_write() local 297 file = event_file_data(filp); in event_inject_write() 298 if (file) { in event_inject_write() 299 call = file->event_call; in event_inject_write() 304 err = trace_inject_entry(file, entry, size); in event_inject_write() 319 event_inject_read(struct file *file, char __user *buf, size_t size, in event_inject_read() argument
|
D | trace.c | 2804 struct trace_event_file *file; in output_printk() local 2818 file = fbuffer->trace_file; in output_printk() 2819 if (test_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags) || in output_printk() 2820 (unlikely(file->flags & EVENT_FILE_FL_FILTERED) && in output_printk() 2821 !filter_match_preds(file->filter, fbuffer->entry))) in output_printk() 4339 __tracing_open(struct inode *inode, struct file *file, bool snapshot) in __tracing_open() argument 4348 iter = __seq_open_private(file, &tracer_seq_ops, sizeof(*iter)); in __tracing_open() 4447 seq_release_private(inode, file); in __tracing_open() 4451 int tracing_open_generic(struct inode *inode, struct file *filp) in tracing_open_generic() 4472 int tracing_open_generic_tr(struct inode *inode, struct file *filp) in tracing_open_generic_tr() [all …]
|
D | trace_stat.c | 37 struct dentry *file; member 69 tracefs_remove(session->file); in destroy_session() 233 static int tracing_stat_open(struct inode *inode, struct file *file) in tracing_stat_open() argument 247 ret = seq_open(file, &trace_stat_seq_ops); in tracing_stat_open() 253 m = file->private_data; in tracing_stat_open() 261 static int tracing_stat_release(struct inode *i, struct file *f) in tracing_stat_release() 300 session->file = tracefs_create_file(session->ts->name, 0644, in init_stat_file() 303 if (!session->file) in init_stat_file()
|
D | trace_dynevent.c | 175 static int dyn_event_open(struct inode *inode, struct file *file) in dyn_event_open() argument 183 if ((file->f_mode & FMODE_WRITE) && (file->f_flags & O_TRUNC)) { in dyn_event_open() 189 return seq_open(file, &dyn_event_seq_op); in dyn_event_open() 192 static ssize_t dyn_event_write(struct file *file, const char __user *buffer, in dyn_event_write() argument 195 return trace_parse_run_command(file, buffer, count, ppos, in dyn_event_write()
|
D | trace_branch.c | 72 p = f->data.file + strlen(f->data.file); in probe_likely_condition() 73 while (p >= f->data.file && *p != '/') in probe_likely_condition() 78 strncpy(entry->file, p, TRACE_FILE_SIZE); in probe_likely_condition() 80 entry->file[TRACE_FILE_SIZE] = 0; in probe_likely_condition() 150 field->file, in trace_branch_print() 265 f = p->file + strlen(p->file); in branch_stat_process_file() 266 while (f >= p->file && *f != '/') in branch_stat_process_file()
|
D | trace_syscalls.c | 389 static int reg_event_syscall_enter(struct trace_event_file *file, in reg_event_syscall_enter() argument 392 struct trace_array *tr = file->tr; in reg_event_syscall_enter() 403 rcu_assign_pointer(tr->enter_syscall_files[num], file); in reg_event_syscall_enter() 410 static void unreg_event_syscall_enter(struct trace_event_file *file, in unreg_event_syscall_enter() argument 413 struct trace_array *tr = file->tr; in unreg_event_syscall_enter() 427 static int reg_event_syscall_exit(struct trace_event_file *file, in reg_event_syscall_exit() argument 430 struct trace_array *tr = file->tr; in reg_event_syscall_exit() 441 rcu_assign_pointer(tr->exit_syscall_files[num], file); in reg_event_syscall_exit() 448 static void unreg_event_syscall_exit(struct trace_event_file *file, in unreg_event_syscall_exit() argument 451 struct trace_array *tr = file->tr; in unreg_event_syscall_exit() [all …]
|
/kernel/ |
D | acct.c | 90 struct file *file; member 109 if (vfs_statfs(&acct->file->f_path, &sbuf)) in check_free_space() 186 struct file *file = acct->file; in close_work() local 187 if (file->f_op->flush) in close_work() 188 file->f_op->flush(file, NULL); in close_work() 189 __fput_sync(file); in close_work() 195 struct file *file; in acct_on() local 207 file = file_open_name(pathname, O_WRONLY|O_APPEND|O_LARGEFILE, 0); in acct_on() 208 if (IS_ERR(file)) { in acct_on() 210 return PTR_ERR(file); in acct_on() [all …]
|
D | usermode_driver.c | 16 struct file *file; in blob_to_mnt() local 29 file = file_open_root(mnt->mnt_root, mnt, name, O_CREAT | O_WRONLY, 0700); in blob_to_mnt() 30 if (IS_ERR(file)) { in blob_to_mnt() 32 return ERR_CAST(file); in blob_to_mnt() 35 written = kernel_write(file, data, len, &pos); in blob_to_mnt() 40 filp_close(file, NULL); in blob_to_mnt() 45 fput(file); in blob_to_mnt() 99 struct file *from_umh[2]; in umd_setup() 100 struct file *to_umh[2]; in umd_setup()
|
D | user_namespace.c | 27 static bool new_idmap_permitted(const struct file *file, 857 static bool verify_root_map(const struct file *file, in verify_root_map() argument 862 const struct user_namespace *file_ns = file->f_cred->user_ns; in verify_root_map() 892 if (!file_ns_capable(file, map_ns->parent, CAP_SETFCAP)) in verify_root_map() 899 static ssize_t map_write(struct file *file, const char __user *buf, in map_write() argument 905 struct seq_file *seq = file->private_data; in map_write() 953 if (cap_valid(cap_setid) && !file_ns_capable(file, map_ns, CAP_SYS_ADMIN)) in map_write() 1023 if (!new_idmap_permitted(file, map_ns, cap_setid, &new_map)) in map_write() 1087 ssize_t proc_uid_map_write(struct file *file, const char __user *buf, in proc_uid_map_write() argument 1090 struct seq_file *seq = file->private_data; in proc_uid_map_write() [all …]
|
D | pid.c | 530 if (!f.file) in pidfd_get_pid() 533 pid = pidfd_pid(f.file); in pidfd_get_pid() 536 *flags = f.file->f_flags; in pidfd_get_pid() 627 static struct file *__pidfd_fget(struct task_struct *task, int fd) in __pidfd_fget() 629 struct file *file; in __pidfd_fget() local 637 file = fget_task(task, fd); in __pidfd_fget() 639 file = ERR_PTR(-EPERM); in __pidfd_fget() 643 return file ?: ERR_PTR(-EBADF); in __pidfd_fget() 649 struct file *file; in pidfd_getfd() local 656 file = __pidfd_fget(task, fd); in pidfd_getfd() [all …]
|
D | kcmp.c | 61 static struct file * 64 struct file *file = NULL; in get_file_raw_ptr() local 70 file = fcheck_files(task->files, idx); in get_file_raw_ptr() 75 return file; in get_file_raw_ptr() 108 struct file *filp, *filp_epoll, *filp_tgt; in kcmp_epoll_target() 188 struct file *filp1, *filp2; in SYSCALL_DEFINE5()
|
/kernel/bpf/ |
D | task_iter.c | 138 static struct file * 186 struct file *f; in task_file_seq_get_next() 214 struct file *file; in task_file_seq_start() local 218 file = task_file_seq_get_next(info); in task_file_seq_start() 219 if (file && *pos == 0) in task_file_seq_start() 222 return file; in task_file_seq_start() 231 fput((struct file *)v); in task_file_seq_next() 239 __bpf_md_ptr(struct file *, file); 244 struct file *file) in DEFINE_BPF_ITER_FUNC() argument 246 static int __task_file_seq_show(struct seq_file *seq, struct file *file, in DEFINE_BPF_ITER_FUNC() [all …]
|
D | bpf_iter.c | 40 static int prepare_seq_file(struct file *file, struct bpf_iter_link *link, 80 static ssize_t bpf_seq_read(struct file *file, char __user *buf, size_t size, in bpf_seq_read() argument 83 struct seq_file *seq = file->private_data; in bpf_seq_read() 232 static int iter_open(struct inode *inode, struct file *file) in iter_open() argument 236 return prepare_seq_file(file, link, __get_seq_info(link)); in iter_open() 239 static int iter_release(struct inode *inode, struct file *file) in iter_release() argument 244 seq = file->private_data; in iter_release() 257 return seq_release_private(inode, file); in iter_release() 542 static int prepare_seq_file(struct file *file, struct bpf_iter_link *link, in prepare_seq_file() argument 560 priv_data = __seq_open_private(file, seq_info->seq_ops, in prepare_seq_file() [all …]
|
/kernel/irq/ |
D | proc.c | 137 static ssize_t write_irq_affinity(int type, struct file *file, in write_irq_affinity() argument 140 unsigned int irq = (int)(long)PDE_DATA(file_inode(file)); in write_irq_affinity() 179 static ssize_t irq_affinity_proc_write(struct file *file, in irq_affinity_proc_write() argument 182 return write_irq_affinity(0, file, buffer, count, pos); in irq_affinity_proc_write() 185 static ssize_t irq_affinity_list_proc_write(struct file *file, in irq_affinity_list_proc_write() argument 188 return write_irq_affinity(1, file, buffer, count, pos); in irq_affinity_list_proc_write() 191 static int irq_affinity_proc_open(struct inode *inode, struct file *file) in irq_affinity_proc_open() argument 193 return single_open(file, irq_affinity_proc_show, PDE_DATA(inode)); in irq_affinity_proc_open() 196 static int irq_affinity_list_proc_open(struct inode *inode, struct file *file) in irq_affinity_list_proc_open() argument 198 return single_open(file, irq_affinity_list_proc_show, PDE_DATA(inode)); in irq_affinity_list_proc_open() [all …]
|
/kernel/sched/ |
D | psi.c | 1129 static int psi_io_open(struct inode *inode, struct file *file) in psi_io_open() argument 1131 return single_open(file, psi_io_show, NULL); in psi_io_open() 1134 static int psi_memory_open(struct inode *inode, struct file *file) in psi_memory_open() argument 1136 return single_open(file, psi_memory_show, NULL); in psi_memory_open() 1139 static int psi_cpu_open(struct inode *inode, struct file *file) in psi_cpu_open() argument 1141 return single_open(file, psi_cpu_show, NULL); in psi_cpu_open() 1284 struct file *file, poll_table *wait) in psi_trigger_poll() argument 1296 poll_wait(file, &t->event_wait, wait); in psi_trigger_poll() 1304 static ssize_t psi_write(struct file *file, const char __user *user_buf, in psi_write() argument 1324 seq = file->private_data; in psi_write() [all …]
|
/kernel/kcsan/ |
D | debugfs.c | 189 static int show_info(struct seq_file *file, void *v) in show_info() argument 195 seq_printf(file, "enabled: %i\n", READ_ONCE(kcsan_enabled)); in show_info() 197 seq_printf(file, "%s: %ld\n", counter_names[i], in show_info() 203 seq_printf(file, "\n%s functions: %s\n", in show_info() 207 seq_printf(file, " %ps\n", (void *)report_filterlist.addrs[i]); in show_info() 213 static int debugfs_open(struct inode *inode, struct file *file) in debugfs_open() argument 215 return single_open(file, show_info, NULL); in debugfs_open() 219 debugfs_write(struct file *file, const char __user *buf, size_t count, loff_t *off) in debugfs_write() argument
|
/kernel/locking/ |
D | lock_events.c | 61 ssize_t __weak lockevent_read(struct file *file, char __user *user_buf, in lockevent_read() argument 71 id = (long)file_inode(file)->i_private; in lockevent_read() 88 static ssize_t lockevent_write(struct file *file, const char __user *user_buf, in lockevent_write() argument 96 if ((long)file_inode(file)->i_private != LOCKEVENT_reset_cnts) in lockevent_write()
|
/kernel/gcov/ |
D | fs.c | 178 static int gcov_seq_open(struct inode *inode, struct file *file) in gcov_seq_open() argument 198 rc = seq_open(file, &gcov_seq_ops); in gcov_seq_open() 201 seq = file->private_data; in gcov_seq_open() 218 static int gcov_seq_release(struct inode *inode, struct file *file) in gcov_seq_release() argument 224 seq = file->private_data; in gcov_seq_release() 229 seq_release(inode, file); in gcov_seq_release() 272 static ssize_t gcov_seq_write(struct file *file, const char __user *addr, in gcov_seq_write() argument 279 seq = file->private_data; in gcov_seq_write() 525 static ssize_t reset_write(struct file *file, const char __user *addr, in reset_write() argument 547 static ssize_t reset_read(struct file *file, char __user *addr, size_t len, in reset_read() argument
|
/kernel/time/ |
D | posix-clock.c | 20 static struct posix_clock *get_posix_clock(struct file *fp) in get_posix_clock() 39 static ssize_t posix_clock_read(struct file *fp, char __user *buf, in posix_clock_read() 56 static __poll_t posix_clock_poll(struct file *fp, poll_table *wait) in posix_clock_poll() 72 static long posix_clock_ioctl(struct file *fp, in posix_clock_ioctl() 90 static long posix_clock_compat_ioctl(struct file *fp, in posix_clock_compat_ioctl() 108 static int posix_clock_open(struct inode *inode, struct file *fp) in posix_clock_open() 134 static int posix_clock_release(struct inode *inode, struct file *fp) in posix_clock_release() 195 struct file *fp; 201 struct file *fp = fget(clockid_to_fd(id)); in get_clock_desc()
|