uprobe 76 include/linux/uprobes.h struct uprobe *active_uprobe; uprobe 84 include/linux/uprobes.h struct uprobe *uprobe; uprobe 82 kernel/events/uprobes.c struct uprobe *uprobe; uprobe 293 kernel/events/uprobes.c delayed_uprobe_check(struct uprobe *uprobe, struct mm_struct *mm) uprobe 298 kernel/events/uprobes.c if (du->uprobe == uprobe && du->mm == mm) uprobe 303 kernel/events/uprobes.c static int delayed_uprobe_add(struct uprobe *uprobe, struct mm_struct *mm) uprobe 307 kernel/events/uprobes.c if (delayed_uprobe_check(uprobe, mm)) uprobe 314 kernel/events/uprobes.c du->uprobe = uprobe; uprobe 328 kernel/events/uprobes.c static void delayed_uprobe_remove(struct uprobe *uprobe, struct mm_struct *mm) uprobe 333 kernel/events/uprobes.c if (!uprobe && !mm) uprobe 339 kernel/events/uprobes.c if (uprobe && du->uprobe != uprobe) uprobe 348 kernel/events/uprobes.c static bool valid_ref_ctr_vma(struct uprobe *uprobe, uprobe 351 kernel/events/uprobes.c unsigned long vaddr = offset_to_vaddr(vma, uprobe->ref_ctr_offset); uprobe 353 kernel/events/uprobes.c return uprobe->ref_ctr_offset && uprobe 355 kernel/events/uprobes.c file_inode(vma->vm_file) == uprobe->inode && uprobe 362 kernel/events/uprobes.c find_ref_ctr_vma(struct uprobe *uprobe, struct mm_struct *mm) uprobe 367 kernel/events/uprobes.c if (valid_ref_ctr_vma(uprobe, tmp)) uprobe 413 kernel/events/uprobes.c static void update_ref_ctr_warn(struct uprobe *uprobe, uprobe 418 kernel/events/uprobes.c d > 0 ? "increment" : "decrement", uprobe->inode->i_ino, uprobe 419 kernel/events/uprobes.c (unsigned long long) uprobe->offset, uprobe 420 kernel/events/uprobes.c (unsigned long long) uprobe->ref_ctr_offset, mm); uprobe 423 kernel/events/uprobes.c static int update_ref_ctr(struct uprobe *uprobe, struct mm_struct *mm, uprobe 430 kernel/events/uprobes.c rc_vma = find_ref_ctr_vma(uprobe, mm); uprobe 433 kernel/events/uprobes.c rc_vaddr = offset_to_vaddr(rc_vma, uprobe->ref_ctr_offset); uprobe 436 kernel/events/uprobes.c update_ref_ctr_warn(uprobe, mm, d); uprobe 444 kernel/events/uprobes.c ret = delayed_uprobe_add(uprobe, mm); uprobe 446 kernel/events/uprobes.c delayed_uprobe_remove(uprobe, mm); uprobe 472 kernel/events/uprobes.c struct uprobe *uprobe; uprobe 480 kernel/events/uprobes.c uprobe = container_of(auprobe, struct uprobe, arch); uprobe 502 kernel/events/uprobes.c if (!ref_ctr_updated && uprobe->ref_ctr_offset) { uprobe 503 kernel/events/uprobes.c ret = update_ref_ctr(uprobe, mm, is_register ? 1 : -1); uprobe 562 kernel/events/uprobes.c update_ref_ctr(uprobe, mm, -1); uprobe 601 kernel/events/uprobes.c static struct uprobe *get_uprobe(struct uprobe *uprobe) uprobe 603 kernel/events/uprobes.c refcount_inc(&uprobe->ref); uprobe 604 kernel/events/uprobes.c return uprobe; uprobe 607 kernel/events/uprobes.c static void put_uprobe(struct uprobe *uprobe) uprobe 609 kernel/events/uprobes.c if (refcount_dec_and_test(&uprobe->ref)) { uprobe 616 kernel/events/uprobes.c delayed_uprobe_remove(uprobe, NULL); uprobe 618 kernel/events/uprobes.c kfree(uprobe); uprobe 622 kernel/events/uprobes.c static int match_uprobe(struct uprobe *l, struct uprobe *r) uprobe 639 kernel/events/uprobes.c static struct uprobe *__find_uprobe(struct inode *inode, loff_t offset) uprobe 641 kernel/events/uprobes.c struct uprobe u = { .inode = inode, .offset = offset }; uprobe 643 kernel/events/uprobes.c struct uprobe *uprobe; uprobe 647 kernel/events/uprobes.c uprobe = rb_entry(n, struct uprobe, rb_node); uprobe 648 kernel/events/uprobes.c match = match_uprobe(&u, uprobe); uprobe 650 kernel/events/uprobes.c return get_uprobe(uprobe); uprobe 664 kernel/events/uprobes.c static struct uprobe *find_uprobe(struct inode *inode, loff_t offset) uprobe 666 kernel/events/uprobes.c struct uprobe *uprobe; uprobe 669 kernel/events/uprobes.c uprobe = __find_uprobe(inode, offset); uprobe 672 kernel/events/uprobes.c return uprobe; uprobe 675 kernel/events/uprobes.c static struct uprobe *__insert_uprobe(struct uprobe *uprobe) uprobe 679 kernel/events/uprobes.c struct uprobe *u; uprobe 684 kernel/events/uprobes.c u = rb_entry(parent, struct uprobe, rb_node); uprobe 685 kernel/events/uprobes.c match = match_uprobe(uprobe, u); uprobe 697 kernel/events/uprobes.c rb_link_node(&uprobe->rb_node, parent, p); uprobe 698 kernel/events/uprobes.c rb_insert_color(&uprobe->rb_node, &uprobes_tree); uprobe 700 kernel/events/uprobes.c refcount_set(&uprobe->ref, 2); uprobe 713 kernel/events/uprobes.c static struct uprobe *insert_uprobe(struct uprobe *uprobe) uprobe 715 kernel/events/uprobes.c struct uprobe *u; uprobe 718 kernel/events/uprobes.c u = __insert_uprobe(uprobe); uprobe 725 kernel/events/uprobes.c ref_ctr_mismatch_warn(struct uprobe *cur_uprobe, struct uprobe *uprobe) uprobe 729 kernel/events/uprobes.c uprobe->inode->i_ino, (unsigned long long) uprobe->offset, uprobe 731 kernel/events/uprobes.c (unsigned long long) uprobe->ref_ctr_offset); uprobe 734 kernel/events/uprobes.c static struct uprobe *alloc_uprobe(struct inode *inode, loff_t offset, uprobe 737 kernel/events/uprobes.c struct uprobe *uprobe, *cur_uprobe; uprobe 739 kernel/events/uprobes.c uprobe = kzalloc(sizeof(struct uprobe), GFP_KERNEL); uprobe 740 kernel/events/uprobes.c if (!uprobe) uprobe 743 kernel/events/uprobes.c uprobe->inode = inode; uprobe 744 kernel/events/uprobes.c uprobe->offset = offset; uprobe 745 kernel/events/uprobes.c uprobe->ref_ctr_offset = ref_ctr_offset; uprobe 746 kernel/events/uprobes.c init_rwsem(&uprobe->register_rwsem); uprobe 747 kernel/events/uprobes.c init_rwsem(&uprobe->consumer_rwsem); uprobe 750 kernel/events/uprobes.c cur_uprobe = insert_uprobe(uprobe); uprobe 753 kernel/events/uprobes.c if (cur_uprobe->ref_ctr_offset != uprobe->ref_ctr_offset) { uprobe 754 kernel/events/uprobes.c ref_ctr_mismatch_warn(cur_uprobe, uprobe); uprobe 756 kernel/events/uprobes.c kfree(uprobe); uprobe 759 kernel/events/uprobes.c kfree(uprobe); uprobe 760 kernel/events/uprobes.c uprobe = cur_uprobe; uprobe 763 kernel/events/uprobes.c return uprobe; uprobe 766 kernel/events/uprobes.c static void consumer_add(struct uprobe *uprobe, struct uprobe_consumer *uc) uprobe 768 kernel/events/uprobes.c down_write(&uprobe->consumer_rwsem); uprobe 769 kernel/events/uprobes.c uc->next = uprobe->consumers; uprobe 770 kernel/events/uprobes.c uprobe->consumers = uc; uprobe 771 kernel/events/uprobes.c up_write(&uprobe->consumer_rwsem); uprobe 779 kernel/events/uprobes.c static bool consumer_del(struct uprobe *uprobe, struct uprobe_consumer *uc) uprobe 784 kernel/events/uprobes.c down_write(&uprobe->consumer_rwsem); uprobe 785 kernel/events/uprobes.c for (con = &uprobe->consumers; *con; con = &(*con)->next) { uprobe 792 kernel/events/uprobes.c up_write(&uprobe->consumer_rwsem); uprobe 819 kernel/events/uprobes.c static int copy_insn(struct uprobe *uprobe, struct file *filp) uprobe 821 kernel/events/uprobes.c struct address_space *mapping = uprobe->inode->i_mapping; uprobe 822 kernel/events/uprobes.c loff_t offs = uprobe->offset; uprobe 823 kernel/events/uprobes.c void *insn = &uprobe->arch.insn; uprobe 824 kernel/events/uprobes.c int size = sizeof(uprobe->arch.insn); uprobe 829 kernel/events/uprobes.c if (offs >= i_size_read(uprobe->inode)) uprobe 845 kernel/events/uprobes.c static int prepare_uprobe(struct uprobe *uprobe, struct file *file, uprobe 850 kernel/events/uprobes.c if (test_bit(UPROBE_COPY_INSN, &uprobe->flags)) uprobe 854 kernel/events/uprobes.c down_write(&uprobe->consumer_rwsem); uprobe 855 kernel/events/uprobes.c if (test_bit(UPROBE_COPY_INSN, &uprobe->flags)) uprobe 858 kernel/events/uprobes.c ret = copy_insn(uprobe, file); uprobe 863 kernel/events/uprobes.c if (is_trap_insn((uprobe_opcode_t *)&uprobe->arch.insn)) uprobe 866 kernel/events/uprobes.c ret = arch_uprobe_analyze_insn(&uprobe->arch, mm, vaddr); uprobe 871 kernel/events/uprobes.c set_bit(UPROBE_COPY_INSN, &uprobe->flags); uprobe 874 kernel/events/uprobes.c up_write(&uprobe->consumer_rwsem); uprobe 885 kernel/events/uprobes.c static bool filter_chain(struct uprobe *uprobe, uprobe 891 kernel/events/uprobes.c down_read(&uprobe->consumer_rwsem); uprobe 892 kernel/events/uprobes.c for (uc = uprobe->consumers; uc; uc = uc->next) { uprobe 897 kernel/events/uprobes.c up_read(&uprobe->consumer_rwsem); uprobe 903 kernel/events/uprobes.c install_breakpoint(struct uprobe *uprobe, struct mm_struct *mm, uprobe 909 kernel/events/uprobes.c ret = prepare_uprobe(uprobe, vma->vm_file, mm, vaddr); uprobe 921 kernel/events/uprobes.c ret = set_swbp(&uprobe->arch, mm, vaddr); uprobe 931 kernel/events/uprobes.c remove_breakpoint(struct uprobe *uprobe, struct mm_struct *mm, unsigned long vaddr) uprobe 934 kernel/events/uprobes.c return set_orig_insn(&uprobe->arch, mm, vaddr); uprobe 937 kernel/events/uprobes.c static inline bool uprobe_is_active(struct uprobe *uprobe) uprobe 939 kernel/events/uprobes.c return !RB_EMPTY_NODE(&uprobe->rb_node); uprobe 946 kernel/events/uprobes.c static void delete_uprobe(struct uprobe *uprobe) uprobe 948 kernel/events/uprobes.c if (WARN_ON(!uprobe_is_active(uprobe))) uprobe 952 kernel/events/uprobes.c rb_erase(&uprobe->rb_node, &uprobes_tree); uprobe 954 kernel/events/uprobes.c RB_CLEAR_NODE(&uprobe->rb_node); /* for uprobe_is_active() */ uprobe 955 kernel/events/uprobes.c put_uprobe(uprobe); uprobe 1042 kernel/events/uprobes.c register_for_each_vma(struct uprobe *uprobe, struct uprobe_consumer *new) uprobe 1049 kernel/events/uprobes.c info = build_map_info(uprobe->inode->i_mapping, uprobe 1050 kernel/events/uprobes.c uprobe->offset, is_register); uprobe 1066 kernel/events/uprobes.c file_inode(vma->vm_file) != uprobe->inode) uprobe 1070 kernel/events/uprobes.c vaddr_to_offset(vma, info->vaddr) != uprobe->offset) uprobe 1077 kernel/events/uprobes.c err = install_breakpoint(uprobe, mm, vma, info->vaddr); uprobe 1079 kernel/events/uprobes.c if (!filter_chain(uprobe, uprobe 1081 kernel/events/uprobes.c err |= remove_breakpoint(uprobe, mm, info->vaddr); uprobe 1096 kernel/events/uprobes.c __uprobe_unregister(struct uprobe *uprobe, struct uprobe_consumer *uc) uprobe 1100 kernel/events/uprobes.c if (WARN_ON(!consumer_del(uprobe, uc))) uprobe 1103 kernel/events/uprobes.c err = register_for_each_vma(uprobe, NULL); uprobe 1105 kernel/events/uprobes.c if (!uprobe->consumers && !err) uprobe 1106 kernel/events/uprobes.c delete_uprobe(uprobe); uprobe 1117 kernel/events/uprobes.c struct uprobe *uprobe; uprobe 1119 kernel/events/uprobes.c uprobe = find_uprobe(inode, offset); uprobe 1120 kernel/events/uprobes.c if (WARN_ON(!uprobe)) uprobe 1123 kernel/events/uprobes.c down_write(&uprobe->register_rwsem); uprobe 1124 kernel/events/uprobes.c __uprobe_unregister(uprobe, uc); uprobe 1125 kernel/events/uprobes.c up_write(&uprobe->register_rwsem); uprobe 1126 kernel/events/uprobes.c put_uprobe(uprobe); uprobe 1151 kernel/events/uprobes.c struct uprobe *uprobe; uprobe 1175 kernel/events/uprobes.c uprobe = alloc_uprobe(inode, offset, ref_ctr_offset); uprobe 1176 kernel/events/uprobes.c if (!uprobe) uprobe 1178 kernel/events/uprobes.c if (IS_ERR(uprobe)) uprobe 1179 kernel/events/uprobes.c return PTR_ERR(uprobe); uprobe 1185 kernel/events/uprobes.c down_write(&uprobe->register_rwsem); uprobe 1187 kernel/events/uprobes.c if (likely(uprobe_is_active(uprobe))) { uprobe 1188 kernel/events/uprobes.c consumer_add(uprobe, uc); uprobe 1189 kernel/events/uprobes.c ret = register_for_each_vma(uprobe, uc); uprobe 1191 kernel/events/uprobes.c __uprobe_unregister(uprobe, uc); uprobe 1193 kernel/events/uprobes.c up_write(&uprobe->register_rwsem); uprobe 1194 kernel/events/uprobes.c put_uprobe(uprobe); uprobe 1225 kernel/events/uprobes.c struct uprobe *uprobe; uprobe 1229 kernel/events/uprobes.c uprobe = find_uprobe(inode, offset); uprobe 1230 kernel/events/uprobes.c if (WARN_ON(!uprobe)) uprobe 1233 kernel/events/uprobes.c down_write(&uprobe->register_rwsem); uprobe 1234 kernel/events/uprobes.c for (con = uprobe->consumers; con && con != uc ; con = con->next) uprobe 1237 kernel/events/uprobes.c ret = register_for_each_vma(uprobe, add ? uc : NULL); uprobe 1238 kernel/events/uprobes.c up_write(&uprobe->register_rwsem); uprobe 1239 kernel/events/uprobes.c put_uprobe(uprobe); uprobe 1244 kernel/events/uprobes.c static int unapply_uprobe(struct uprobe *uprobe, struct mm_struct *mm) uprobe 1255 kernel/events/uprobes.c file_inode(vma->vm_file) != uprobe->inode) uprobe 1259 kernel/events/uprobes.c if (uprobe->offset < offset || uprobe 1260 kernel/events/uprobes.c uprobe->offset >= offset + vma->vm_end - vma->vm_start) uprobe 1263 kernel/events/uprobes.c vaddr = offset_to_vaddr(vma, uprobe->offset); uprobe 1264 kernel/events/uprobes.c err |= remove_breakpoint(uprobe, mm, vaddr); uprobe 1277 kernel/events/uprobes.c struct uprobe *u = rb_entry(n, struct uprobe, rb_node); uprobe 1306 kernel/events/uprobes.c struct uprobe *u; uprobe 1316 kernel/events/uprobes.c u = rb_entry(t, struct uprobe, rb_node); uprobe 1323 kernel/events/uprobes.c u = rb_entry(t, struct uprobe, rb_node); uprobe 1346 kernel/events/uprobes.c !valid_ref_ctr_vma(du->uprobe, vma)) uprobe 1349 kernel/events/uprobes.c vaddr = offset_to_vaddr(vma, du->uprobe->ref_ctr_offset); uprobe 1352 kernel/events/uprobes.c update_ref_ctr_warn(du->uprobe, vma->vm_mm, 1); uprobe 1371 kernel/events/uprobes.c struct uprobe *uprobe, *u; uprobe 1396 kernel/events/uprobes.c list_for_each_entry_safe(uprobe, u, &tmp_list, pending_list) { uprobe 1398 kernel/events/uprobes.c filter_chain(uprobe, UPROBE_FILTER_MMAP, vma->vm_mm)) { uprobe 1399 kernel/events/uprobes.c unsigned long vaddr = offset_to_vaddr(vma, uprobe->offset); uprobe 1400 kernel/events/uprobes.c install_breakpoint(uprobe, vma->vm_mm, vma, vaddr); uprobe 1402 kernel/events/uprobes.c put_uprobe(uprobe); uprobe 1617 kernel/events/uprobes.c static unsigned long xol_get_insn_slot(struct uprobe *uprobe) uprobe 1631 kernel/events/uprobes.c &uprobe->arch.ixol, sizeof(uprobe->arch.ixol)); uprobe 1714 kernel/events/uprobes.c put_uprobe(ri->uprobe); uprobe 1775 kernel/events/uprobes.c get_uprobe(n->uprobe); uprobe 1867 kernel/events/uprobes.c static void prepare_uretprobe(struct uprobe *uprobe, struct pt_regs *regs) uprobe 1918 kernel/events/uprobes.c ri->uprobe = get_uprobe(uprobe); uprobe 1935 kernel/events/uprobes.c pre_ssout(struct uprobe *uprobe, struct pt_regs *regs, unsigned long bp_vaddr) uprobe 1945 kernel/events/uprobes.c xol_vaddr = xol_get_insn_slot(uprobe); uprobe 1952 kernel/events/uprobes.c err = arch_uprobe_pre_xol(&uprobe->arch, regs); uprobe 1958 kernel/events/uprobes.c utask->active_uprobe = uprobe; uprobe 2050 kernel/events/uprobes.c static struct uprobe *find_active_uprobe(unsigned long bp_vaddr, int *is_swbp) uprobe 2053 kernel/events/uprobes.c struct uprobe *uprobe = NULL; uprobe 2063 kernel/events/uprobes.c uprobe = find_uprobe(inode, offset); uprobe 2066 kernel/events/uprobes.c if (!uprobe) uprobe 2072 kernel/events/uprobes.c if (!uprobe && test_and_clear_bit(MMF_RECALC_UPROBES, &mm->flags)) uprobe 2076 kernel/events/uprobes.c return uprobe; uprobe 2079 kernel/events/uprobes.c static void handler_chain(struct uprobe *uprobe, struct pt_regs *regs) uprobe 2085 kernel/events/uprobes.c down_read(&uprobe->register_rwsem); uprobe 2086 kernel/events/uprobes.c for (uc = uprobe->consumers; uc; uc = uc->next) { uprobe 2102 kernel/events/uprobes.c prepare_uretprobe(uprobe, regs); /* put bp at return */ uprobe 2104 kernel/events/uprobes.c if (remove && uprobe->consumers) { uprobe 2105 kernel/events/uprobes.c WARN_ON(!uprobe_is_active(uprobe)); uprobe 2106 kernel/events/uprobes.c unapply_uprobe(uprobe, current->mm); uprobe 2108 kernel/events/uprobes.c up_read(&uprobe->register_rwsem); uprobe 2114 kernel/events/uprobes.c struct uprobe *uprobe = ri->uprobe; uprobe 2117 kernel/events/uprobes.c down_read(&uprobe->register_rwsem); uprobe 2118 kernel/events/uprobes.c for (uc = uprobe->consumers; uc; uc = uc->next) { uprobe 2122 kernel/events/uprobes.c up_read(&uprobe->register_rwsem); uprobe 2196 kernel/events/uprobes.c struct uprobe *uprobe; uprobe 2204 kernel/events/uprobes.c uprobe = find_active_uprobe(bp_vaddr, &is_swbp); uprobe 2205 kernel/events/uprobes.c if (!uprobe) { uprobe 2231 kernel/events/uprobes.c if (unlikely(!test_bit(UPROBE_COPY_INSN, &uprobe->flags))) uprobe 2247 kernel/events/uprobes.c if (arch_uprobe_ignore(&uprobe->arch, regs)) uprobe 2250 kernel/events/uprobes.c handler_chain(uprobe, regs); uprobe 2252 kernel/events/uprobes.c if (arch_uprobe_skip_sstep(&uprobe->arch, regs)) uprobe 2255 kernel/events/uprobes.c if (!pre_ssout(uprobe, regs, bp_vaddr)) uprobe 2260 kernel/events/uprobes.c put_uprobe(uprobe); uprobe 2269 kernel/events/uprobes.c struct uprobe *uprobe; uprobe 2272 kernel/events/uprobes.c uprobe = utask->active_uprobe; uprobe 2274 kernel/events/uprobes.c err = arch_uprobe_post_xol(&uprobe->arch, regs); uprobe 2276 kernel/events/uprobes.c arch_uprobe_abort_xol(&uprobe->arch, regs); uprobe 2280 kernel/events/uprobes.c put_uprobe(uprobe); uprobe 5021 tools/lib/bpf/libbpf.c static int perf_event_open_probe(bool uprobe, bool retprobe, const char *name, uprobe 5028 tools/lib/bpf/libbpf.c type = uprobe ? determine_uprobe_perf_type() uprobe 5032 tools/lib/bpf/libbpf.c uprobe ? "uprobe" : "kprobe", uprobe 5037 tools/lib/bpf/libbpf.c int bit = uprobe ? determine_uprobe_retprobe_bit() uprobe 5042 tools/lib/bpf/libbpf.c uprobe ? "uprobe" : "kprobe", uprobe 5062 tools/lib/bpf/libbpf.c uprobe ? "uprobe" : "kprobe", uprobe 799 tools/perf/util/probe-event.c bool uprobe, struct debuginfo *dinfo) uprobe 803 tools/perf/util/probe-event.c if (uprobe) uprobe 2737 tools/perf/util/probe-event.c static int __open_probe_file_and_namelist(bool uprobe, uprobe 2742 tools/perf/util/probe-event.c fd = probe_file__open(PF_FL_RW | (uprobe ? PF_FL_UPROBE : 0)); uprobe 34 tools/perf/util/probe-file.c static void print_open_warning(int err, bool uprobe) uprobe 41 tools/perf/util/probe-file.c if (uprobe) uprobe 48 tools/perf/util/probe-file.c uprobe ? 'u' : 'k', config); uprobe 53 tools/perf/util/probe-file.c uprobe ? 'u' : 'k',