Lines Matching refs:ret
114 unsigned long ret; in get_user_stack_nth() local
119 if (copy_from_user(&ret, (void __force __user *) addr, sizeof(ret))) in get_user_stack_nth()
122 return ret; in get_user_stack_nth()
149 long ret; in fetch_store_string() local
159 ret = strlcpy(dst, current->comm, maxlen); in fetch_store_string()
161 ret = strncpy_from_user(dst, src, maxlen); in fetch_store_string()
162 if (ret >= 0) { in fetch_store_string()
163 if (ret == maxlen) in fetch_store_string()
164 dst[ret - 1] = '\0'; in fetch_store_string()
171 ret++; in fetch_store_string()
172 *(u32 *)dest = make_data_loc(ret, (void *)dst - base); in fetch_store_string()
176 return ret; in fetch_store_string()
342 int ret; in alloc_trace_uprobe() local
348 ret = trace_probe_init(&tu->tp, event, group, true); in alloc_trace_uprobe()
349 if (ret < 0) in alloc_trace_uprobe()
362 return ERR_PTR(ret); in alloc_trace_uprobe()
392 int ret; in unregister_trace_uprobe() local
401 ret = unregister_uprobe_event(tu); in unregister_trace_uprobe()
402 if (ret) in unregister_trace_uprobe()
403 return ret; in unregister_trace_uprobe()
443 int ret; in append_trace_uprobe() local
445 ret = trace_probe_compare_arg_type(&tu->tp, &to->tp); in append_trace_uprobe()
446 if (ret) { in append_trace_uprobe()
448 trace_probe_log_set_index(ret + 1); in append_trace_uprobe()
459 ret = trace_probe_append(&tu->tp, &to->tp); in append_trace_uprobe()
460 if (!ret) in append_trace_uprobe()
463 return ret; in append_trace_uprobe()
496 int ret; in register_trace_uprobe() local
500 ret = validate_ref_ctr_offset(tu); in register_trace_uprobe()
501 if (ret) in register_trace_uprobe()
511 ret = -EEXIST; in register_trace_uprobe()
513 ret = append_trace_uprobe(tu, old_tu); in register_trace_uprobe()
518 ret = register_uprobe_event(tu); in register_trace_uprobe()
519 if (ret) { in register_trace_uprobe()
520 if (ret == -EEXIST) { in register_trace_uprobe()
524 pr_warn("Failed to register probe event(%d)\n", ret); in register_trace_uprobe()
533 return ret; in register_trace_uprobe()
551 int i, ret; in __trace_uprobe_create() local
589 ret = kern_path(filename, LOOKUP_FOLLOW, &path); in __trace_uprobe_create()
590 if (ret) { in __trace_uprobe_create()
594 return ret; in __trace_uprobe_create()
598 ret = -EINVAL; in __trace_uprobe_create()
607 ret = -EINVAL; in __trace_uprobe_create()
613 ret = -EINVAL; in __trace_uprobe_create()
621 ret = kstrtoul(rctr, 0, &ref_ctr_offset); in __trace_uprobe_create()
622 if (ret) { in __trace_uprobe_create()
636 ret = -EINVAL; in __trace_uprobe_create()
642 ret = kstrtoul(arg, 0, &offset); in __trace_uprobe_create()
643 if (ret) { in __trace_uprobe_create()
651 ret = traceprobe_parse_event_name(&event, &group, gbuf, in __trace_uprobe_create()
653 if (ret) in __trace_uprobe_create()
663 ret = -ENOMEM; in __trace_uprobe_create()
681 ret = PTR_ERR(tu); in __trace_uprobe_create()
683 WARN_ON_ONCE(ret != -ENOMEM); in __trace_uprobe_create()
694 ret = traceprobe_parse_probe_arg(&tu->tp, i, argv[i], in __trace_uprobe_create()
696 if (ret) in __trace_uprobe_create()
701 ret = traceprobe_set_print_fmt(&tu->tp, ptype); in __trace_uprobe_create()
702 if (ret < 0) in __trace_uprobe_create()
705 ret = register_trace_uprobe(tu); in __trace_uprobe_create()
706 if (!ret) in __trace_uprobe_create()
713 return ret; in __trace_uprobe_create()
720 return ret; in __trace_uprobe_create()
730 int ret; in create_or_delete_trace_uprobe() local
735 ret = trace_uprobe_create(raw_command); in create_or_delete_trace_uprobe()
736 return ret == -ECANCELED ? -EINVAL : ret; in create_or_delete_trace_uprobe()
786 int ret; in probes_open() local
788 ret = security_locked_down(LOCKDOWN_TRACEFS); in probes_open()
789 if (ret) in probes_open()
790 return ret; in probes_open()
793 ret = dyn_events_release_all(&trace_uprobe_ops); in probes_open()
794 if (ret) in probes_open()
795 return ret; in probes_open()
841 int ret; in profile_open() local
843 ret = security_locked_down(LOCKDOWN_TRACEFS); in profile_open()
844 if (ret) in profile_open()
845 return ret; in profile_open()
899 int ret = 0; in uprobe_buffer_enable() local
904 ret = uprobe_buffer_init(); in uprobe_buffer_enable()
905 if (ret < 0) in uprobe_buffer_enable()
909 return ret; in uprobe_buffer_enable()
1060 int ret; in trace_uprobe_enable() local
1066 ret = uprobe_register_refctr(tu->inode, tu->offset, in trace_uprobe_enable()
1069 ret = uprobe_register(tu->inode, tu->offset, &tu->consumer); in trace_uprobe_enable()
1071 if (ret) in trace_uprobe_enable()
1074 return ret; in trace_uprobe_enable()
1099 int ret; in probe_event_enable() local
1111 ret = trace_probe_add_file(tp, file); in probe_event_enable()
1112 if (ret < 0) in probe_event_enable()
1113 return ret; in probe_event_enable()
1127 ret = uprobe_buffer_enable(); in probe_event_enable()
1128 if (ret) in probe_event_enable()
1132 ret = trace_uprobe_enable(tu, filter); in probe_event_enable()
1133 if (ret) { in probe_event_enable()
1150 return ret; in probe_event_enable()
1180 int ret, size; in uprobe_event_define_fields() local
1278 int ret = 0; in uprobe_perf_close() local
1289 ret = uprobe_apply(tu->inode, tu->offset, &tu->consumer, false); in uprobe_perf_close()
1290 if (ret) in uprobe_perf_close()
1294 return ret; in uprobe_perf_close()
1328 int ret; in uprobe_perf_filter() local
1334 ret = __uprobe_perf_filter(filter, mm); in uprobe_perf_filter()
1337 return ret; in uprobe_perf_filter()
1353 u32 ret; in __uprobe_perf_func() local
1355 ret = bpf_prog_run_array_sleepable(call->prog_array, regs, bpf_prog_run); in __uprobe_perf_func()
1356 if (!ret) in __uprobe_perf_func()
1483 int ret = 0; in uprobe_dispatcher() local
1504 ret |= uprobe_trace_func(tu, regs, ucb, dsize); in uprobe_dispatcher()
1508 ret |= uprobe_perf_func(tu, regs, ucb, dsize); in uprobe_dispatcher()
1511 return ret; in uprobe_dispatcher()
1589 int ret; in create_local_trace_uprobe() local
1591 ret = kern_path(name, LOOKUP_FOLLOW, &path); in create_local_trace_uprobe()
1592 if (ret) in create_local_trace_uprobe()
1593 return ERR_PTR(ret); in create_local_trace_uprobe()
1620 ret = -ENOMEM; in create_local_trace_uprobe()
1628 ret = -ENOMEM; in create_local_trace_uprobe()
1635 return ERR_PTR(ret); in create_local_trace_uprobe()
1651 int ret; in init_uprobe_trace() local
1653 ret = dyn_event_register(&trace_uprobe_ops); in init_uprobe_trace()
1654 if (ret) in init_uprobe_trace()
1655 return ret; in init_uprobe_trace()
1657 ret = tracing_init_dentry(); in init_uprobe_trace()
1658 if (ret) in init_uprobe_trace()