/kernel/trace/ |
D | trace_events_trigger.c | 56 event_triggers_call(struct trace_event_file *file, in event_triggers_call() argument 64 if (list_empty(&file->triggers)) in event_triggers_call() 67 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_call() 87 bool __trace_trigger_soft_disabled(struct trace_event_file *file) in __trace_trigger_soft_disabled() argument 89 unsigned long eflags = file->flags; in __trace_trigger_soft_disabled() 92 event_triggers_call(file, NULL, NULL, NULL); in __trace_trigger_soft_disabled() 96 return trace_event_ignore_this_pid(file); in __trace_trigger_soft_disabled() 114 event_triggers_post_call(struct trace_event_file *file, in event_triggers_post_call() argument 119 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_post_call() 141 static bool check_user_trigger(struct trace_event_file *file) in check_user_trigger() argument [all …]
|
D | trace_events.c | 72 #define do_for_each_event_file(tr, file) \ argument 74 list_for_each_entry(file, &tr->events, list) 76 #define do_for_each_event_file_safe(tr, file) \ argument 79 list_for_each_entry_safe(file, ___n, &tr->events, list) 528 struct trace_event_file *file = data; in trace_event_reg() local 535 file); in trace_event_reg() 539 file); in trace_event_reg() 565 struct trace_event_file *file; in trace_event_enable_cmd_record() local 570 do_for_each_event_file(tr, file) { in trace_event_enable_cmd_record() 572 if (!(file->flags & EVENT_FILE_FL_ENABLED)) in trace_event_enable_cmd_record() [all …]
|
D | trace_eprobe.c | 40 struct trace_event_file *file; member 518 if (WARN_ON_ONCE(call != edata->file->event_call)) in __eprobe_trace_func() 521 if (trace_trigger_soft_disabled(edata->file)) in __eprobe_trace_func() 526 entry = trace_event_buffer_reserve(&fbuffer, edata->file, in __eprobe_trace_func() 584 struct trace_event_file *file, in eprobe_trigger_cmd_parse() argument 593 struct trace_event_file *file) in eprobe_trigger_reg_func() argument 600 struct trace_event_file *file) in eprobe_trigger_unreg_func() argument 624 new_eprobe_trigger(struct trace_eprobe *ep, struct trace_event_file *file) in new_eprobe_trigger() argument 652 ret = create_event_filter(file->tr, ep->event, in new_eprobe_trigger() 659 edata->file = file; in new_eprobe_trigger() [all …]
|
D | trace_recursion_record.c | 181 static int recursed_function_open(struct inode *inode, struct file *file) in recursed_function_open() argument 187 if ((file->f_mode & FMODE_WRITE) && (file->f_flags & O_TRUNC)) { in recursed_function_open() 196 if (file->f_mode & FMODE_READ) in recursed_function_open() 197 ret = seq_open(file, &recursed_function_seq_ops); in recursed_function_open() 203 static ssize_t recursed_function_write(struct file *file, in recursed_function_write() argument 210 static int recursed_function_release(struct inode *inode, struct file *file) in recursed_function_release() argument 212 if (file->f_mode & FMODE_READ) in recursed_function_release() 213 seq_release(inode, file); in recursed_function_release()
|
D | trace.h | 545 struct file *filp, char __user *ubuf, 548 struct file *filp, 589 int tracing_open_generic(struct inode *inode, struct file *filp); 590 int tracing_open_generic_tr(struct inode *inode, struct file *filp); 591 int tracing_open_file_tr(struct inode *inode, struct file *filp); 592 int tracing_release_file_tr(struct inode *inode, struct file *filp); 593 int tracing_single_release_file_tr(struct inode *inode, struct file *filp); 663 loff_t tracing_lseek(struct file *file, loff_t offset, int whence); 1371 __event_trigger_test_discard(struct trace_event_file *file, in __event_trigger_test_discard() argument 1377 unsigned long eflags = file->flags; in __event_trigger_test_discard() [all …]
|
D | trace_events_hist.c | 770 static void last_cmd_set(struct trace_event_file *file, char *str) in last_cmd_set() argument 791 if (file) { in last_cmd_set() 792 call = file->event_call; in last_cmd_set() 1126 struct trace_event_file *file, in find_var() argument 1139 list_for_each_entry(test, &file->triggers, list) { in find_var() 1158 struct trace_event_file *file, *found = NULL; in find_var_file() local 1165 file = var_hist_data->event_file; in find_var_file() 1166 if (file == found) in find_var_file() 1175 found = file; in find_var_file() 1182 static struct hist_field *find_file_var(struct trace_event_file *file, in find_file_var() argument [all …]
|
D | trace_events_filter.c | 1118 static inline struct event_filter *event_filter(struct trace_event_file *file) in event_filter() argument 1120 return file->filter; in event_filter() 1124 void print_event_filter(struct trace_event_file *file, struct trace_seq *s) in print_event_filter() argument 1126 struct event_filter *filter = event_filter(file); in print_event_filter() 1162 static void filter_disable(struct trace_event_file *file) in filter_disable() argument 1164 unsigned long old_flags = file->flags; in filter_disable() 1166 file->flags &= ~EVENT_FILE_FL_FILTERED; in filter_disable() 1168 if (old_flags != file->flags) in filter_disable() 1187 static inline void __remove_filter(struct trace_event_file *file) in __remove_filter() argument 1189 filter_disable(file); in __remove_filter() [all …]
|
D | trace_kprobe.c | 350 struct trace_event_file *file) in enable_trace_kprobe() argument 363 if (file) { in enable_trace_kprobe() 364 ret = trace_probe_add_file(tp, file); in enable_trace_kprobe() 386 if (file) in enable_trace_kprobe() 387 trace_probe_remove_file(tp, file); in enable_trace_kprobe() 400 struct trace_event_file *file) in disable_trace_kprobe() argument 408 if (file) { in disable_trace_kprobe() 409 if (!trace_probe_get_file_link(tp, file)) in disable_trace_kprobe() 421 if (file) in disable_trace_kprobe() 428 trace_probe_remove_file(tp, file); in disable_trace_kprobe() [all …]
|
D | trace.c | 2866 struct trace_event_file *file; in output_printk() local 2880 file = fbuffer->trace_file; in output_printk() 2881 if (test_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags) || in output_printk() 2882 (unlikely(file->flags & EVENT_FILE_FL_FILTERED) && in output_printk() 2883 !filter_match_preds(file->filter, fbuffer->entry))) in output_printk() 2934 struct trace_event_file *file = fbuffer->trace_file; in trace_event_buffer_commit() local 2936 if (__event_trigger_test_discard(file, fbuffer->buffer, fbuffer->event, in trace_event_buffer_commit() 2946 trace_buffer_unlock_commit_regs(file->tr, fbuffer->buffer, in trace_event_buffer_commit() 2951 event_triggers_post_call(file, tt); in trace_event_buffer_commit() 4735 __tracing_open(struct inode *inode, struct file *file, bool snapshot) in __tracing_open() argument [all …]
|
D | trace_events_user.c | 904 struct trace_event_file *file; in user_event_ftrace() local 909 file = (struct trace_event_file *)tpdata; in user_event_ftrace() 911 if (!file || in user_event_ftrace() 912 !(file->flags & EVENT_FILE_FL_ENABLED) || in user_event_ftrace() 913 trace_trigger_soft_disabled(file)) in user_event_ftrace() 917 entry = trace_event_buffer_reserve(&event_buffer, file, size); in user_event_ftrace() 1392 static ssize_t user_events_write_core(struct file *file, struct iov_iter *i) in user_events_write_core() argument 1394 struct user_event_file_info *info = file->private_data; in user_events_write_core() 1468 static int user_events_open(struct inode *node, struct file *file) in user_events_open() argument 1485 file->private_data = info; in user_events_open() [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() 284 event_inject_write(struct file *filp, const char __user *ubuf, size_t cnt, in event_inject_write() 288 struct trace_event_file *file; in event_inject_write() local 302 file = event_file_data(filp); in event_inject_write() 303 if (file) { in event_inject_write() 304 call = file->event_call; in event_inject_write() 309 err = trace_inject_entry(file, entry, size); in event_inject_write() 324 event_inject_read(struct file *file, char __user *buf, size_t size, in event_inject_read() argument
|
/kernel/ |
D | acct.c | 109 struct file *file; member 128 if (vfs_statfs(&acct->file->f_path, &sbuf)) in check_free_space() 205 struct file *file = acct->file; in close_work() local 206 if (file->f_op->flush) in close_work() 207 file->f_op->flush(file, NULL); in close_work() 208 __fput_sync(file); in close_work() 214 struct file *file; in acct_on() local 226 file = file_open_name(pathname, O_WRONLY|O_APPEND|O_LARGEFILE, 0); in acct_on() 227 if (IS_ERR(file)) { in acct_on() 229 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, 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 | 28 static bool new_idmap_permitted(const struct file *file, 878 static bool verify_root_map(const struct file *file, in verify_root_map() argument 883 const struct user_namespace *file_ns = file->f_cred->user_ns; in verify_root_map() 913 if (!file_ns_capable(file, map_ns->parent, CAP_SETFCAP)) in verify_root_map() 920 static ssize_t map_write(struct file *file, const char __user *buf, in map_write() argument 926 struct seq_file *seq = file->private_data; in map_write() 974 if (cap_valid(cap_setid) && !file_ns_capable(file, map_ns, CAP_SYS_ADMIN)) in map_write() 1044 if (!new_idmap_permitted(file, map_ns, cap_setid, &new_map)) in map_write() 1108 ssize_t proc_uid_map_write(struct file *file, const char __user *buf, in proc_uid_map_write() argument 1111 struct seq_file *seq = file->private_data; in proc_uid_map_write() [all …]
|
D | pid.c | 531 if (!f.file) in pidfd_get_pid() 534 pid = pidfd_pid(f.file); in pidfd_get_pid() 537 *flags = f.file->f_flags; in pidfd_get_pid() 669 static struct file *__pidfd_fget(struct task_struct *task, int fd) in __pidfd_fget() 671 struct file *file; in __pidfd_fget() local 679 file = fget_task(task, fd); in __pidfd_fget() 681 file = ERR_PTR(-EPERM); in __pidfd_fget() 685 return file ?: ERR_PTR(-EBADF); in __pidfd_fget() 691 struct file *file; in pidfd_getfd() local 698 file = __pidfd_fget(task, fd); in pidfd_getfd() [all …]
|
D | kcmp.c | 61 static struct file * 64 struct file *file; in get_file_raw_ptr() local 67 file = task_lookup_fd_rcu(task, idx); in get_file_raw_ptr() 70 return file; in get_file_raw_ptr() 103 struct file *filp, *filp_epoll, *filp_tgt; in kcmp_epoll_target() 171 struct file *filp1, *filp2; in SYSCALL_DEFINE5()
|
/kernel/bpf/ |
D | bpf_fuse.c | 73 struct bpf_prog *fuse_get_bpf_prog(struct file *file) in fuse_get_bpf_prog() argument 77 if (!file || IS_ERR(file)) in fuse_get_bpf_prog() 94 if (file->f_op != &bpf_prog_fops) in fuse_get_bpf_prog() 97 bpf_prog = file->private_data; in fuse_get_bpf_prog() 105 int task_fd = get_unused_fd_flags(file->f_flags); in fuse_get_bpf_prog() 110 fd_install(task_fd, file); in fuse_get_bpf_prog() 117 file = NULL; in fuse_get_bpf_prog() 122 if (file) in fuse_get_bpf_prog() 123 fput(file); in fuse_get_bpf_prog()
|
D | bpf_iter.c | 41 static int prepare_seq_file(struct file *file, struct bpf_iter_link *link, 94 static ssize_t bpf_seq_read(struct file *file, char __user *buf, size_t size, in bpf_seq_read() argument 97 struct seq_file *seq = file->private_data; in bpf_seq_read() 256 static int iter_open(struct inode *inode, struct file *file) in iter_open() argument 260 return prepare_seq_file(file, link, __get_seq_info(link)); in iter_open() 263 static int iter_release(struct inode *inode, struct file *file) in iter_release() argument 268 seq = file->private_data; in iter_release() 281 return seq_release_private(inode, file); in iter_release() 591 static int prepare_seq_file(struct file *file, struct bpf_iter_link *link, in prepare_seq_file() argument 609 priv_data = __seq_open_private(file, seq_info->seq_ops, in prepare_seq_file() [all …]
|
D | task_iter.c | 278 static struct file * 310 struct file *f; in task_file_seq_get_next() 341 struct file *file; in task_file_seq_start() local 344 file = task_file_seq_get_next(info); in task_file_seq_start() 345 if (file && *pos == 0) in task_file_seq_start() 348 return file; in task_file_seq_start() 357 fput((struct file *)v); in task_file_seq_next() 365 __bpf_md_ptr(struct file *, file); 370 struct file *file) in DEFINE_BPF_ITER_FUNC() argument 372 static int __task_file_seq_show(struct seq_file *seq, struct file *file, in DEFINE_BPF_ITER_FUNC() [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 | 1377 struct file *file, poll_table *wait) in psi_trigger_poll() argument 1389 poll_wait(file, &t->event_wait, wait); in psi_trigger_poll() 1413 static int psi_io_open(struct inode *inode, struct file *file) in psi_io_open() argument 1415 return single_open(file, psi_io_show, NULL); in psi_io_open() 1418 static int psi_memory_open(struct inode *inode, struct file *file) in psi_memory_open() argument 1420 return single_open(file, psi_memory_show, NULL); in psi_memory_open() 1423 static int psi_cpu_open(struct inode *inode, struct file *file) in psi_cpu_open() argument 1425 return single_open(file, psi_cpu_show, NULL); in psi_cpu_open() 1428 static ssize_t psi_write(struct file *file, const char __user *user_buf, in psi_write() argument 1448 seq = file->private_data; in psi_write() [all …]
|
/kernel/kcsan/ |
D | debugfs.c | 194 static int show_info(struct seq_file *file, void *v) in show_info() argument 200 seq_printf(file, "enabled: %i\n", READ_ONCE(kcsan_enabled)); in show_info() 202 seq_printf(file, "%s: %ld\n", counter_names[i], in show_info() 208 seq_printf(file, "\n%s functions: %s\n", in show_info() 212 seq_printf(file, " %ps\n", (void *)report_filterlist.addrs[i]); in show_info() 218 static int debugfs_open(struct inode *inode, struct file *file) in debugfs_open() argument 220 return single_open(file, show_info, NULL); in debugfs_open() 224 debugfs_write(struct file *file, const char __user *buf, size_t count, loff_t *off) in debugfs_write() argument
|
/kernel/trace/rv/ |
D | rv_reactors.c | 124 static int available_reactors_open(struct inode *inode, struct file *file) in available_reactors_open() argument 126 return seq_open(file, &available_reactors_seq_ops); in available_reactors_open() 187 monitor_reactors_write(struct file *file, const char __user *user_buf, in monitor_reactors_write() argument 217 seq_f = file->private_data; in monitor_reactors_write() 247 static int monitor_reactors_open(struct inode *inode, struct file *file) in monitor_reactors_open() argument 253 ret = seq_open(file, &monitor_reactors_seq_ops); in monitor_reactors_open() 260 seq_f = file->private_data; in monitor_reactors_open() 374 static ssize_t reacting_on_read_data(struct file *filp, in reacting_on_read_data() 399 static ssize_t reacting_on_write_data(struct file *filp, const char __user *user_buf, in reacting_on_write_data()
|
D | rv.c | 212 static ssize_t monitor_enable_read_data(struct file *filp, char __user *user_buf, size_t count, in monitor_enable_read_data() 282 static ssize_t monitor_enable_write_data(struct file *filp, const char __user *user_buf, in monitor_enable_write_data() 317 static ssize_t monitor_desc_read_data(struct file *filp, char __user *user_buf, size_t count, in monitor_desc_read_data() 467 static int available_monitors_open(struct inode *inode, struct file *file) in available_monitors_open() argument 469 return seq_open(file, &available_monitors_seq_ops); in available_monitors_open() 504 static int enabled_monitors_open(struct inode *inode, struct file *file) in enabled_monitors_open() argument 506 if ((file->f_mode & FMODE_WRITE) && (file->f_flags & O_TRUNC)) in enabled_monitors_open() 509 return seq_open(file, &enabled_monitors_seq_ops); in enabled_monitors_open() 512 static ssize_t enabled_monitors_write(struct file *filp, const char __user *user_buf, in enabled_monitors_write() 596 static ssize_t monitoring_on_read_data(struct file *filp, char __user *user_buf, in monitoring_on_read_data() [all …]
|
/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()
|