pid_t tgid = task->tgid;
struct kprobe *p;
- p = get_uprobe(addr, tgid);
+ p = &get_uprobe(addr, tgid)->kp;
if (p && (check_validity_insn(p, regs, task) != 0)) {
printk("no_uprobe live\n");
}
}
-struct kprobe *get_uprobe(kprobe_opcode_t *addr, pid_t tgid)
+struct uprobe *get_uprobe(kprobe_opcode_t *addr, pid_t tgid)
{
struct hlist_head *head;
struct hlist_node *node;
head = &uprobe_table[hash_ptr(addr, UPROBE_HASH_BITS)];
hlist_for_each_entry_rcu(p, node, head, hlist) {
if (p->addr == addr && p->tgid == tgid) {
- return p;
+ return container_of(p, struct uprobe, kp);
}
}
#endif
// get the first item
- old_p = get_uprobe(p->addr, p->tgid);
+ old_p = &get_uprobe(p->addr, p->tgid)->kp;
if (old_p) {
#ifdef CONFIG_ARM
p->safe_arm = old_p->safe_arm;
int cleanup_p;
p = &up->kp;
- old_p = get_uprobe(p->addr, p->tgid);
+ old_p = &get_uprobe(p->addr, p->tgid)->kp;
if (unlikely(!old_p)) {
return;
}
void dbi_unregister_all_uprobes(struct task_struct *task, int atomic);
void dbi_uprobe_return(void);
-struct kprobe *get_uprobe(kprobe_opcode_t *addr, pid_t tgid);
+struct uprobe *get_uprobe(kprobe_opcode_t *addr, pid_t tgid);
void disarm_uprobe(struct kprobe *p, struct task_struct *task);