Lines Matching refs:utask
1639 if (!tsk->mm || !tsk->mm->uprobes_state.xol_area || !tsk->utask) in xol_free_insn_slot()
1642 slot_addr = tsk->utask->xol_vaddr; in xol_free_insn_slot()
1663 tsk->utask->xol_vaddr = 0; in xol_free_insn_slot()
1695 struct uprobe_task *utask = current->utask; in uprobe_get_trap_addr() local
1697 if (unlikely(utask && utask->active_uprobe)) in uprobe_get_trap_addr()
1698 return utask->vaddr; in uprobe_get_trap_addr()
1717 struct uprobe_task *utask = t->utask; in uprobe_free_utask() local
1720 if (!utask) in uprobe_free_utask()
1723 if (utask->active_uprobe) in uprobe_free_utask()
1724 put_uprobe(utask->active_uprobe); in uprobe_free_utask()
1726 ri = utask->return_instances; in uprobe_free_utask()
1731 kfree(utask); in uprobe_free_utask()
1732 t->utask = NULL; in uprobe_free_utask()
1745 if (!current->utask) in get_utask()
1746 current->utask = kzalloc(sizeof(struct uprobe_task), GFP_KERNEL); in get_utask()
1747 return current->utask; in get_utask()
1758 t->utask = n_utask; in dup_utask()
1789 if (!__create_xol_area(current->utask->dup_xol_addr) && in dup_xol_work()
1799 struct uprobe_task *utask = current->utask; in uprobe_copy_process() local
1803 t->utask = NULL; in uprobe_copy_process()
1805 if (!utask || !utask->return_instances) in uprobe_copy_process()
1811 if (dup_utask(t, utask)) in uprobe_copy_process()
1822 t->utask->dup_xol_addr = area->vaddr; in uprobe_copy_process()
1823 init_task_work(&t->utask->dup_xol_work, dup_xol_work); in uprobe_copy_process()
1824 task_work_add(t, &t->utask->dup_xol_work, TWA_RESUME); in uprobe_copy_process()
1846 static void cleanup_return_instances(struct uprobe_task *utask, bool chained, in cleanup_return_instances() argument
1849 struct return_instance *ri = utask->return_instances; in cleanup_return_instances()
1854 utask->depth--; in cleanup_return_instances()
1856 utask->return_instances = ri; in cleanup_return_instances()
1862 struct uprobe_task *utask; in prepare_uretprobe() local
1869 utask = get_utask(); in prepare_uretprobe()
1870 if (!utask) in prepare_uretprobe()
1873 if (utask->depth >= MAX_URETPROBE_DEPTH) { in prepare_uretprobe()
1891 cleanup_return_instances(utask, chained, regs); in prepare_uretprobe()
1899 if (!utask->return_instances) { in prepare_uretprobe()
1907 orig_ret_vaddr = utask->return_instances->orig_ret_vaddr; in prepare_uretprobe()
1916 utask->depth++; in prepare_uretprobe()
1917 ri->next = utask->return_instances; in prepare_uretprobe()
1918 utask->return_instances = ri; in prepare_uretprobe()
1929 struct uprobe_task *utask; in pre_ssout() local
1933 utask = get_utask(); in pre_ssout()
1934 if (!utask) in pre_ssout()
1941 utask->xol_vaddr = xol_vaddr; in pre_ssout()
1942 utask->vaddr = bp_vaddr; in pre_ssout()
1950 utask->active_uprobe = uprobe; in pre_ssout()
1951 utask->state = UTASK_SSTEP; in pre_ssout()
1967 struct uprobe_task *utask = t->utask; in uprobe_deny_signal() local
1969 if (likely(!utask || !utask->active_uprobe)) in uprobe_deny_signal()
1972 WARN_ON_ONCE(utask->state != UTASK_SSTEP); in uprobe_deny_signal()
1980 utask->state = UTASK_SSTEP_TRAPPED; in uprobe_deny_signal()
2132 struct uprobe_task *utask; in handle_trampoline() local
2136 utask = current->utask; in handle_trampoline()
2137 if (!utask) in handle_trampoline()
2140 ri = utask->return_instances; in handle_trampoline()
2159 utask->depth--; in handle_trampoline()
2163 utask->return_instances = ri; in handle_trampoline()
2260 static void handle_singlestep(struct uprobe_task *utask, struct pt_regs *regs) in handle_singlestep() argument
2265 uprobe = utask->active_uprobe; in handle_singlestep()
2266 if (utask->state == UTASK_SSTEP_ACK) in handle_singlestep()
2268 else if (utask->state == UTASK_SSTEP_TRAPPED) in handle_singlestep()
2274 utask->active_uprobe = NULL; in handle_singlestep()
2275 utask->state = UTASK_RUNNING; in handle_singlestep()
2301 struct uprobe_task *utask; in uprobe_notify_resume() local
2305 utask = current->utask; in uprobe_notify_resume()
2306 if (utask && utask->active_uprobe) in uprobe_notify_resume()
2307 handle_singlestep(utask, regs); in uprobe_notify_resume()
2322 (!current->utask || !current->utask->return_instances)) in uprobe_pre_sstep_notifier()
2335 struct uprobe_task *utask = current->utask; in uprobe_post_sstep_notifier() local
2337 if (!current->mm || !utask || !utask->active_uprobe) in uprobe_post_sstep_notifier()
2341 utask->state = UTASK_SSTEP_ACK; in uprobe_post_sstep_notifier()