Home
last modified time | relevance | path

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

12

/linux/kernel/events/
H A Duprobes.c39 * allows us to skip the uprobe_mmap if there are no uprobe events active
48 /* serialize uprobe->pending_list */
54 /* Covers return_instance's uprobe lifetime. */
60 struct uprobe {
91 struct uprobe *uprobe;
122 pr_warn("uprobe: %s:%d failed to %s\n", current->comm, current->pid, msg); in uprobe_warn()
295 delayed_uprobe_check(struct uprobe *uprobe, struct mm_struct *mm)
300 if (du->uprobe in delayed_uprobe_check()
61 struct uprobe { global() struct
82 inodeuprobe global() argument
87 archuprobe global() argument
92 struct uprobe *uprobe; global() member
296 delayed_uprobe_check(struct uprobe * uprobe,struct mm_struct * mm) delayed_uprobe_check() argument
306 delayed_uprobe_add(struct uprobe * uprobe,struct mm_struct * mm) delayed_uprobe_add() argument
331 delayed_uprobe_remove(struct uprobe * uprobe,struct mm_struct * mm) delayed_uprobe_remove() argument
351 valid_ref_ctr_vma(struct uprobe * uprobe,struct vm_area_struct * vma) valid_ref_ctr_vma() argument
365 find_ref_ctr_vma(struct uprobe * uprobe,struct mm_struct * mm) find_ref_ctr_vma() argument
416 update_ref_ctr_warn(struct uprobe * uprobe,struct mm_struct * mm,short d) update_ref_ctr_warn() argument
426 update_ref_ctr(struct uprobe * uprobe,struct mm_struct * mm,short d) update_ref_ctr() argument
476 struct uprobe *uprobe; uprobe_write_opcode() local
605 get_uprobe(struct uprobe * uprobe) get_uprobe() argument
617 try_get_uprobe(struct uprobe * uprobe) try_get_uprobe() argument
624 uprobe_is_active(struct uprobe * uprobe) uprobe_is_active() argument
631 struct uprobe *uprobe = container_of(rcu, struct uprobe, rcu); uprobe_free_rcu_tasks_trace() local
638 struct uprobe *uprobe = container_of(rcu, struct uprobe, rcu); uprobe_free_srcu() local
645 struct uprobe *uprobe = container_of(work, struct uprobe, work); uprobe_free_deferred() local
670 put_uprobe(struct uprobe * uprobe) put_uprobe() argument
680 hprobe_init_leased(struct hprobe * hprobe,struct uprobe * uprobe,int srcu_idx) hprobe_init_leased() argument
689 hprobe_init_stable(struct hprobe * hprobe,struct uprobe * uprobe) hprobe_init_stable() argument
788 struct uprobe *uprobe = try_get_uprobe(hprobe->uprobe); hprobe_expire() local
911 __insert_uprobe(struct uprobe * uprobe) __insert_uprobe() argument
935 insert_uprobe(struct uprobe * uprobe) insert_uprobe() argument
949 ref_ctr_mismatch_warn(struct uprobe * cur_uprobe,struct uprobe * uprobe) ref_ctr_mismatch_warn() argument
961 struct uprobe *uprobe, *cur_uprobe; alloc_uprobe() local
993 consumer_add(struct uprobe * uprobe,struct uprobe_consumer * uc) consumer_add() argument
1007 consumer_del(struct uprobe * uprobe,struct uprobe_consumer * uc) consumer_del() argument
1036 copy_insn(struct uprobe * uprobe,struct file * filp) copy_insn() argument
1062 prepare_uprobe(struct uprobe * uprobe,struct file * file,struct mm_struct * mm,unsigned long vaddr) prepare_uprobe() argument
1101 filter_chain(struct uprobe * uprobe,struct mm_struct * mm) filter_chain() argument
1118 install_breakpoint(struct uprobe * uprobe,struct mm_struct * mm,struct vm_area_struct * vma,unsigned long vaddr) install_breakpoint() argument
1146 remove_breakpoint(struct uprobe * uprobe,struct mm_struct * mm,unsigned long vaddr) remove_breakpoint() argument
1236 register_for_each_vma(struct uprobe * uprobe,struct uprobe_consumer * new) register_for_each_vma() argument
1298 uprobe_unregister_nosync(struct uprobe * uprobe,struct uprobe_consumer * uc) uprobe_unregister_nosync() argument
1355 struct uprobe *uprobe; uprobe_register() local
1410 uprobe_apply(struct uprobe * uprobe,struct uprobe_consumer * uc,bool add) uprobe_apply() argument
1431 unapply_uprobe(struct uprobe * uprobe,struct mm_struct * mm) unapply_uprobe() argument
1561 struct uprobe *uprobe, *u; uprobe_mmap() local
1819 xol_get_insn_slot(struct uprobe * uprobe,struct uprobe_task * utask) xol_get_insn_slot() argument
2010 struct uprobe *uprobe; dup_utask() local
2122 prepare_uretprobe(struct uprobe * uprobe,struct pt_regs * regs,struct return_instance * ri) prepare_uretprobe() argument
2189 pre_ssout(struct uprobe * uprobe,struct pt_regs * regs,unsigned long bp_vaddr) pre_ssout() argument
2302 struct uprobe *uprobe = NULL; find_active_uprobe_rcu() local
2370 handler_chain(struct uprobe * uprobe,struct pt_regs * regs) handler_chain() argument
2427 handle_uretprobe_chain(struct return_instance * ri,struct uprobe * uprobe,struct pt_regs * regs) handle_uretprobe_chain() argument
2466 struct uprobe *uprobe; uprobe_handle_trampoline() local
2535 struct uprobe *uprobe; handle_swbp() local
2610 struct uprobe *uprobe; handle_singlestep() local
[all...]
/linux/include/linux/
H A Duprobes.h20 struct uprobe;
115 struct uprobe *uprobe; member
139 struct uprobe *active_uprobe;
185 extern struct uprobe *uprobe_register(struct inode *inode, loff_t offset, loff_t ref_ctr_offset, st…
186 extern int uprobe_apply(struct uprobe *uprobe, struct uprobe_consumer *uc, bool);
187 extern void uprobe_unregister_nosync(struct uprobe *uprobe, struct uprobe_consumer *uc);
226 static inline struct uprobe *
232 uprobe_apply(struct uprobe* uprobe, struct uprobe_consumer *uc, bool add) in uprobe_apply() argument
237 uprobe_unregister_nosync(struct uprobe *uprobe, struct uprobe_consumer *uc) in uprobe_unregister_nosync() argument
/linux/tools/testing/selftests/bpf/bpf_testmod/
H A Dbpf_testmod.c512 struct uprobe *uprobe; member
518 static struct testmod_uprobe uprobe = { variable
526 if (uprobe.uprobe) in testmod_register_uprobe()
531 if (uprobe.uprobe) in testmod_register_uprobe()
534 err = kern_path("/proc/self/exe", LOOKUP_FOLLOW, &uprobe.path); in testmod_register_uprobe()
538 uprobe.uprobe = uprobe_register(d_real_inode(uprobe.path.dentry), in testmod_register_uprobe()
539 offset, 0, &uprobe.consumer); in testmod_register_uprobe()
540 if (IS_ERR(uprobe.uprobe)) { in testmod_register_uprobe()
541 err = PTR_ERR(uprobe.uprobe); in testmod_register_uprobe()
542 path_put(&uprobe.path); in testmod_register_uprobe()
[all …]
/linux/Documentation/bpf/libbpf/
H A Dprogram_types.rst94 … | | ``uprobe+`` [#uprobe]_ …
96 … | | ``uprobe.s+`` [#uprobe]_ |…
98 … | | ``uretprobe+`` [#uprobe]_ | …
100 … | | ``uretprobe.s+`` [#uprobe]_ | Yes …
221 .. [#uprobe] The ``uprobe`` attach format is ``uprobe[.s]/<path>:<function>[+<offset>]``.
/linux/Documentation/trace/
H A Duprobetracer.rst18 However unlike kprobe-event tracer, the uprobe event interface expects the
29 p[:[GRP/][EVENT]] PATH:OFFSET [FETCHARGS] : Set a uprobe
30 r[:[GRP/][EVENT]] PATH:OFFSET [FETCHARGS] : Set a return uprobe (uretprobe)
31 p[:[GRP/][EVENT]] PATH:OFFSET%return [FETCHARGS] : Set a return uprobe (uretprobe)
32 -:[GRP/][EVENT] : Clear uprobe or uretprobe event
58 (\*3) Unlike kprobe event, "u" prefix will just be ignored, because uprobe
87 * Add a probe as a new uprobe event, write a new definition to uprobe_events
88 as below (sets a uprobe at an offset of 0x4245c0 in the executable /bin/bash)::
118 0x00400000. Hence the command to uprobe would be::
184 Output shows us uprobe was triggered for a pid 24842 with ip being 0x446420
/linux/kernel/trace/
H A Dtrace_uprobe.c63 struct uprobe *uprobe; member
1110 struct uprobe *uprobe; in trace_uprobe_enable() local
1113 uprobe = uprobe_register(inode, tu->offset, tu->ref_ctr_offset, &tu->consumer); in trace_uprobe_enable()
1114 if (IS_ERR(uprobe)) in trace_uprobe_enable()
1115 return PTR_ERR(uprobe); in trace_uprobe_enable()
1117 tu->uprobe = uprobe; in trace_uprobe_enable()
1130 if (!tu->uprobe) in __probe_event_disable()
1133 uprobe_unregister_nosync(tu->uprobe, &tu->consumer); in __probe_event_disable()
1135 tu->uprobe = NULL; in __probe_event_disable()
1334 ret = uprobe_apply(tu->uprobe, &tu->consumer, false); in uprobe_perf_close()
[all …]
H A Dbpf_trace.c3119 struct uprobe *uprobe; member
3136 struct bpf_uprobe *uprobe; member
3144 uprobe_unregister_nosync(uprobes[i].uprobe, &uprobes[i].consumer); in bpf_uprobe_unregister()
3243 static int uprobe_prog_run(struct bpf_uprobe *uprobe, in uprobe_prog_run() argument
3248 struct bpf_uprobe_multi_link *link = uprobe->link; in uprobe_prog_run()
3255 .uprobe = uprobe, in uprobe_prog_run()
3288 struct bpf_uprobe *uprobe; in uprobe_multi_link_filter() local
3290 uprobe = container_of(con, struct bpf_uprobe, consumer); in uprobe_multi_link_filter()
3291 return uprobe->link->task->mm == mm; in uprobe_multi_link_filter()
3298 struct bpf_uprobe *uprobe; in uprobe_multi_link_handler() local
[all …]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dfill_link_info.c99 ASSERT_EQ(info.perf_event.uprobe.offset, offset, "uprobe_offset"); in verify_perf_link_info()
101 ASSERT_EQ(info.perf_event.uprobe.name_len, strlen(UPROBE_FILE) + 1, in verify_perf_link_info()
103 if (!info.perf_event.uprobe.file_name) { in verify_perf_link_info()
104 info.perf_event.uprobe.file_name = ptr_to_u64(&buf); in verify_perf_link_info()
105 info.perf_event.uprobe.name_len = sizeof(buf); in verify_perf_link_info()
109 ASSERT_EQ(info.perf_event.uprobe.cookie, PERF_EVENT_COOKIE, "uprobe_cookie"); in verify_perf_link_info()
111 err = strncmp(u64_to_ptr(info.perf_event.uprobe.file_name), UPROBE_FILE, in verify_perf_link_info()
H A Duprobe_multi_test.c278 skel->links.uprobe = bpf_program__attach_uprobe_multi(skel->progs.uprobe, pid, in __test_attach_api()
280 if (!ASSERT_OK_PTR(skel->links.uprobe, "bpf_program__attach_uprobe_multi")) in __test_attach_api()
575 skel->links.uprobe = bpf_program__attach_uprobe_multi(skel->progs.uprobe, -1, in attach_uprobe_fail_trap()
577 if (!ASSERT_ERR_PTR(skel->links.uprobe, "bpf_program__attach_uprobe_multi")) { in attach_uprobe_fail_trap()
578 bpf_link__destroy(skel->links.uprobe); in attach_uprobe_fail_trap()
579 skel->links.uprobe = NULL; in attach_uprobe_fail_trap()
688 prog_fd = bpf_program__fd(skel->progs.uprobe); in __test_link_api()
H A Dbpf_cookie.c16 /* uprobe attach point */
295 link1 = bpf_program__attach_uprobe_multi(skel->progs.uprobe, -1, in uprobe_multi_attach_api_subtest()
359 /* trigger uprobe && uretprobe */ in uprobe_subtest()
701 if (test__start_subtest("uprobe")) in test_bpf_cookie()
/linux/tools/perf/tests/shell/
H A Dtest_uprobe_from_different_cu.sh20 temp_dir=$(mktemp -d /tmp/perf-uprobe-different-cu-sh.XXXXXXXXXX)
25 if [[ "${temp_dir}" =~ ^/tmp/perf-uprobe-different-cu-sh.*$ ]]; then
/linux/tools/bpf/bpftool/
H A Dlink.c380 u64_to_ptr(info->perf_event.uprobe.file_name)); in show_perf_event_uprobe_json()
381 jsonw_uint_field(wtr, "offset", info->perf_event.uprobe.offset); in show_perf_event_uprobe_json()
382 jsonw_uint_field(wtr, "cookie", info->perf_event.uprobe.cookie); in show_perf_event_uprobe_json()
815 buf = u64_to_ptr(info->perf_event.uprobe.file_name); in show_perf_event_uprobe_plain()
823 printf("%s+%#x ", buf, info->perf_event.uprobe.offset); in show_perf_event_uprobe_plain()
824 if (info->perf_event.uprobe.cookie) in show_perf_event_uprobe_plain()
825 printf("cookie %llu ", info->perf_event.uprobe.cookie); in show_perf_event_uprobe_plain()
1081 if (!info.perf_event.uprobe.file_name) { in do_show_link()
1082 info.perf_event.uprobe.file_name = ptr_to_u64(&buf); in do_show_link()
1083 info.perf_event.uprobe.name_len = sizeof(buf); in do_show_link()
/linux/tools/bpf/bpftool/Documentation/
H A Dbpftool-perf.rst59 pid 21800 fd 5: prog_id 9 uprobe filename /home/yhs/a.out offset 1159
69 {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]
/linux/tools/testing/selftests/bpf/benchs/
H A Drun_bench_uprobes.sh5 for i in usermode-count syscall-count {uprobe,uretprobe}-{nop,push,ret}
/linux/tools/testing/selftests/bpf/
H A Duprobe_multi.c19 int __attribute__((weak)) uprobe(void) in uprobe() function
114 (void)uprobe(); in trigger_uprobe()
/linux/tools/testing/selftests/bpf/progs/
H A Duprobe_multi.c84 SEC("uprobe.multi//proc/self/exe:uprobe_multi_func_*") in uprobe_sleep()
85 int uprobe(struct pt_regs *ctx) in uprobe_sleep()
98 SEC("uprobe.multi.s//proc/self/exe:uprobe_multi_func_*") in uprobe_extra()
112 SEC("uprobe.multi//proc/self/exe:uprobe_multi_func_*")
70 int uprobe(struct pt_regs *ctx) uprobe() function
/linux/tools/perf/bench/
H A DBuild20 perf-bench-y += uprobe.o
/linux/tools/perf/util/
H A Dprobe-file.c3 * probe-file.c : operate ftrace k/uprobe events files
74 static void print_open_warning(int err, bool uprobe, bool readwrite) in print_open_warning() argument
81 if (print_configure_probe_event(uprobe ? 0 : err, uprobe ? err : 0)) in print_open_warning()
85 tracing_path_mount(), uprobe ? 'u' : 'k', in print_open_warning()
743 * this will be an index to get suffix of the uprobe name (defining in sdt_note__get_addr()
H A Dprobe-event.c904 bool uprobe, struct debuginfo *dinfo) in post_process_probe_trace_events()
908 if (uprobe) in post_process_probe_trace_events()
2219 * absolute address uprobe. in synthesize_probe_trace_command()
2847 /* Warn if the current kernel's uprobe implementation is old */ in probe_trace_event__set_name()
2860 /* Old uprobe event doesn't support memory dereference */ in probe_trace_event__set_name()
2940 static int __open_probe_file_and_namelist(bool uprobe, in __add_probe_trace_events()
2945 fd = probe_file__open(PF_FL_RW | (uprobe ? PF_FL_UPROBE : 0)); in __add_probe_trace_events()
900 post_process_probe_trace_events(struct perf_probe_event * pev,struct probe_trace_event * tevs,int ntevs,const char * module,bool uprobe,struct debuginfo * dinfo) post_process_probe_trace_events() argument
2891 __open_probe_file_and_namelist(bool uprobe,struct strlist ** namelist) __open_probe_file_and_namelist() argument
/linux/tools/perf/Documentation/
H A Dperf-bench.txt70 'uprobe'::
71 Benchmark overhead of uprobe + BPF.
H A Dperf-buildid-cache.txt74 used when creating a uprobe for a process that resides in a
H A Dperf-probe.txt135 used when creating a uprobe for a process that resides in a
173 …p name by 'GROUP', if omitted, set 'probe' is used for kprobe and 'probe_<bin>' is used for uprobe.
281 Add a uprobe to a target process running in a different mount namespace
/linux/kernel/bpf/
H A Dsyscall.c3783 uname = u64_to_user_ptr(info->perf_event.uprobe.file_name); in bpf_perf_link_fill_uprobe()
3784 ulen = info->perf_event.uprobe.name_len; in bpf_perf_link_fill_uprobe()
3794 info->perf_event.uprobe.name_len = ulen; in bpf_perf_link_fill_uprobe()
3795 info->perf_event.uprobe.offset = offset; in bpf_perf_link_fill_uprobe()
3796 info->perf_event.uprobe.cookie = event->bpf_cookie; in bpf_perf_link_fill_uprobe()
/linux/include/uapi/linux/
H A Dbpf.h6705 } uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */ member
/linux/tools/include/uapi/linux/
H A Dbpf.h6705 } uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */ member

12