Lines Matching refs:utask
1336 if (!tsk->mm || !tsk->mm->uprobes_state.xol_area || !tsk->utask) in xol_free_insn_slot()
1339 slot_addr = tsk->utask->xol_vaddr; in xol_free_insn_slot()
1360 tsk->utask->xol_vaddr = 0; in xol_free_insn_slot()
1392 struct uprobe_task *utask = current->utask; in uprobe_get_trap_addr() local
1394 if (unlikely(utask && utask->active_uprobe)) in uprobe_get_trap_addr()
1395 return utask->vaddr; in uprobe_get_trap_addr()
1414 struct uprobe_task *utask = t->utask; in uprobe_free_utask() local
1417 if (!utask) in uprobe_free_utask()
1420 if (utask->active_uprobe) in uprobe_free_utask()
1421 put_uprobe(utask->active_uprobe); in uprobe_free_utask()
1423 ri = utask->return_instances; in uprobe_free_utask()
1428 kfree(utask); in uprobe_free_utask()
1429 t->utask = NULL; in uprobe_free_utask()
1442 if (!current->utask) in get_utask()
1443 current->utask = kzalloc(sizeof(struct uprobe_task), GFP_KERNEL); in get_utask()
1444 return current->utask; in get_utask()
1455 t->utask = n_utask; in dup_utask()
1486 if (!__create_xol_area(current->utask->dup_xol_addr) && in dup_xol_work()
1496 struct uprobe_task *utask = current->utask; in uprobe_copy_process() local
1500 t->utask = NULL; in uprobe_copy_process()
1502 if (!utask || !utask->return_instances) in uprobe_copy_process()
1508 if (dup_utask(t, utask)) in uprobe_copy_process()
1519 t->utask->dup_xol_addr = area->vaddr; in uprobe_copy_process()
1520 init_task_work(&t->utask->dup_xol_work, dup_xol_work); in uprobe_copy_process()
1521 task_work_add(t, &t->utask->dup_xol_work, true); in uprobe_copy_process()
1543 static void cleanup_return_instances(struct uprobe_task *utask, bool chained, in cleanup_return_instances() argument
1546 struct return_instance *ri = utask->return_instances; in cleanup_return_instances()
1551 utask->depth--; in cleanup_return_instances()
1553 utask->return_instances = ri; in cleanup_return_instances()
1559 struct uprobe_task *utask; in prepare_uretprobe() local
1566 utask = get_utask(); in prepare_uretprobe()
1567 if (!utask) in prepare_uretprobe()
1570 if (utask->depth >= MAX_URETPROBE_DEPTH) { in prepare_uretprobe()
1588 cleanup_return_instances(utask, chained, regs); in prepare_uretprobe()
1596 if (!utask->return_instances) { in prepare_uretprobe()
1604 orig_ret_vaddr = utask->return_instances->orig_ret_vaddr; in prepare_uretprobe()
1613 utask->depth++; in prepare_uretprobe()
1614 ri->next = utask->return_instances; in prepare_uretprobe()
1615 utask->return_instances = ri; in prepare_uretprobe()
1626 struct uprobe_task *utask; in pre_ssout() local
1630 utask = get_utask(); in pre_ssout()
1631 if (!utask) in pre_ssout()
1638 utask->xol_vaddr = xol_vaddr; in pre_ssout()
1639 utask->vaddr = bp_vaddr; in pre_ssout()
1647 utask->active_uprobe = uprobe; in pre_ssout()
1648 utask->state = UTASK_SSTEP; in pre_ssout()
1664 struct uprobe_task *utask = t->utask; in uprobe_deny_signal() local
1666 if (likely(!utask || !utask->active_uprobe)) in uprobe_deny_signal()
1669 WARN_ON_ONCE(utask->state != UTASK_SSTEP); in uprobe_deny_signal()
1677 utask->state = UTASK_SSTEP_TRAPPED; in uprobe_deny_signal()
1825 struct uprobe_task *utask; in handle_trampoline() local
1829 utask = current->utask; in handle_trampoline()
1830 if (!utask) in handle_trampoline()
1833 ri = utask->return_instances; in handle_trampoline()
1852 utask->depth--; in handle_trampoline()
1856 utask->return_instances = ri; in handle_trampoline()
1945 static void handle_singlestep(struct uprobe_task *utask, struct pt_regs *regs) in handle_singlestep() argument
1950 uprobe = utask->active_uprobe; in handle_singlestep()
1951 if (utask->state == UTASK_SSTEP_ACK) in handle_singlestep()
1953 else if (utask->state == UTASK_SSTEP_TRAPPED) in handle_singlestep()
1959 utask->active_uprobe = NULL; in handle_singlestep()
1960 utask->state = UTASK_RUNNING; in handle_singlestep()
1986 struct uprobe_task *utask; in uprobe_notify_resume() local
1990 utask = current->utask; in uprobe_notify_resume()
1991 if (utask && utask->active_uprobe) in uprobe_notify_resume()
1992 handle_singlestep(utask, regs); in uprobe_notify_resume()
2007 (!current->utask || !current->utask->return_instances)) in uprobe_pre_sstep_notifier()
2020 struct uprobe_task *utask = current->utask; in uprobe_post_sstep_notifier() local
2022 if (!current->mm || !utask || !utask->active_uprobe) in uprobe_post_sstep_notifier()
2026 utask->state = UTASK_SSTEP_ACK; in uprobe_post_sstep_notifier()