Lines Matching refs:utask

1636 	if (!tsk->mm || !tsk->mm->uprobes_state.xol_area || !tsk->utask)  in xol_free_insn_slot()
1639 slot_addr = tsk->utask->xol_vaddr; in xol_free_insn_slot()
1660 tsk->utask->xol_vaddr = 0; in xol_free_insn_slot()
1692 struct uprobe_task *utask = current->utask; in uprobe_get_trap_addr() local
1694 if (unlikely(utask && utask->active_uprobe)) in uprobe_get_trap_addr()
1695 return utask->vaddr; in uprobe_get_trap_addr()
1714 struct uprobe_task *utask = t->utask; in uprobe_free_utask() local
1717 if (!utask) in uprobe_free_utask()
1720 if (utask->active_uprobe) in uprobe_free_utask()
1721 put_uprobe(utask->active_uprobe); in uprobe_free_utask()
1723 ri = utask->return_instances; in uprobe_free_utask()
1728 kfree(utask); in uprobe_free_utask()
1729 t->utask = NULL; in uprobe_free_utask()
1742 if (!current->utask) in get_utask()
1743 current->utask = kzalloc(sizeof(struct uprobe_task), GFP_KERNEL); in get_utask()
1744 return current->utask; in get_utask()
1755 t->utask = n_utask; in dup_utask()
1786 if (!__create_xol_area(current->utask->dup_xol_addr) && in dup_xol_work()
1796 struct uprobe_task *utask = current->utask; in uprobe_copy_process() local
1800 t->utask = NULL; in uprobe_copy_process()
1802 if (!utask || !utask->return_instances) in uprobe_copy_process()
1808 if (dup_utask(t, utask)) in uprobe_copy_process()
1819 t->utask->dup_xol_addr = area->vaddr; in uprobe_copy_process()
1820 init_task_work(&t->utask->dup_xol_work, dup_xol_work); in uprobe_copy_process()
1821 task_work_add(t, &t->utask->dup_xol_work, TWA_RESUME); in uprobe_copy_process()
1843 static void cleanup_return_instances(struct uprobe_task *utask, bool chained, in cleanup_return_instances() argument
1846 struct return_instance *ri = utask->return_instances; in cleanup_return_instances()
1851 utask->depth--; in cleanup_return_instances()
1853 utask->return_instances = ri; in cleanup_return_instances()
1859 struct uprobe_task *utask; in prepare_uretprobe() local
1866 utask = get_utask(); in prepare_uretprobe()
1867 if (!utask) in prepare_uretprobe()
1870 if (utask->depth >= MAX_URETPROBE_DEPTH) { in prepare_uretprobe()
1888 cleanup_return_instances(utask, chained, regs); in prepare_uretprobe()
1896 if (!utask->return_instances) { in prepare_uretprobe()
1904 orig_ret_vaddr = utask->return_instances->orig_ret_vaddr; in prepare_uretprobe()
1913 utask->depth++; in prepare_uretprobe()
1914 ri->next = utask->return_instances; in prepare_uretprobe()
1915 utask->return_instances = ri; in prepare_uretprobe()
1926 struct uprobe_task *utask; in pre_ssout() local
1930 utask = get_utask(); in pre_ssout()
1931 if (!utask) in pre_ssout()
1938 utask->xol_vaddr = xol_vaddr; in pre_ssout()
1939 utask->vaddr = bp_vaddr; in pre_ssout()
1947 utask->active_uprobe = uprobe; in pre_ssout()
1948 utask->state = UTASK_SSTEP; in pre_ssout()
1964 struct uprobe_task *utask = t->utask; in uprobe_deny_signal() local
1966 if (likely(!utask || !utask->active_uprobe)) in uprobe_deny_signal()
1969 WARN_ON_ONCE(utask->state != UTASK_SSTEP); in uprobe_deny_signal()
1977 utask->state = UTASK_SSTEP_TRAPPED; in uprobe_deny_signal()
2128 struct uprobe_task *utask; in handle_trampoline() local
2132 utask = current->utask; in handle_trampoline()
2133 if (!utask) in handle_trampoline()
2136 ri = utask->return_instances; in handle_trampoline()
2155 utask->depth--; in handle_trampoline()
2159 utask->return_instances = ri; in handle_trampoline()
2256 static void handle_singlestep(struct uprobe_task *utask, struct pt_regs *regs) in handle_singlestep() argument
2261 uprobe = utask->active_uprobe; in handle_singlestep()
2262 if (utask->state == UTASK_SSTEP_ACK) in handle_singlestep()
2264 else if (utask->state == UTASK_SSTEP_TRAPPED) in handle_singlestep()
2270 utask->active_uprobe = NULL; in handle_singlestep()
2271 utask->state = UTASK_RUNNING; in handle_singlestep()
2297 struct uprobe_task *utask; in uprobe_notify_resume() local
2301 utask = current->utask; in uprobe_notify_resume()
2302 if (utask && utask->active_uprobe) in uprobe_notify_resume()
2303 handle_singlestep(utask, regs); in uprobe_notify_resume()
2318 (!current->utask || !current->utask->return_instances)) in uprobe_pre_sstep_notifier()
2331 struct uprobe_task *utask = current->utask; in uprobe_post_sstep_notifier() local
2333 if (!current->mm || !utask || !utask->active_uprobe) in uprobe_post_sstep_notifier()
2337 utask->state = UTASK_SSTEP_ACK; in uprobe_post_sstep_notifier()