Lines Matching refs:kcb
519 save_previous_kprobe(struct kprobe_ctlblk *kcb) in save_previous_kprobe() argument
521 kcb->prev_kprobe.kp = kprobe_running(); in save_previous_kprobe()
522 kcb->prev_kprobe.status = kcb->kprobe_status; in save_previous_kprobe()
523 kcb->prev_kprobe.old_flags = kcb->kprobe_old_flags; in save_previous_kprobe()
524 kcb->prev_kprobe.saved_flags = kcb->kprobe_saved_flags; in save_previous_kprobe()
528 restore_previous_kprobe(struct kprobe_ctlblk *kcb) in restore_previous_kprobe() argument
530 __this_cpu_write(current_kprobe, kcb->prev_kprobe.kp); in restore_previous_kprobe()
531 kcb->kprobe_status = kcb->prev_kprobe.status; in restore_previous_kprobe()
532 kcb->kprobe_old_flags = kcb->prev_kprobe.old_flags; in restore_previous_kprobe()
533 kcb->kprobe_saved_flags = kcb->prev_kprobe.saved_flags; in restore_previous_kprobe()
538 struct kprobe_ctlblk *kcb) in set_current_kprobe() argument
541 kcb->kprobe_saved_flags = kcb->kprobe_old_flags in set_current_kprobe()
544 kcb->kprobe_saved_flags &= ~X86_EFLAGS_IF; in set_current_kprobe()
579 struct kprobe_ctlblk *kcb, int reenter) in setup_singlestep() argument
599 save_previous_kprobe(kcb); in setup_singlestep()
600 set_current_kprobe(p, regs, kcb); in setup_singlestep()
601 kcb->kprobe_status = KPROBE_REENTER; in setup_singlestep()
603 kcb->kprobe_status = KPROBE_HIT_SS; in setup_singlestep()
622 struct kprobe_ctlblk *kcb) in reenter_kprobe() argument
624 switch (kcb->kprobe_status) { in reenter_kprobe()
629 setup_singlestep(p, regs, kcb, 1); in reenter_kprobe()
659 struct kprobe_ctlblk *kcb; in kprobe_int3_handler() local
671 kcb = get_kprobe_ctlblk(); in kprobe_int3_handler()
676 if (reenter_kprobe(p, regs, kcb)) in kprobe_int3_handler()
679 set_current_kprobe(p, regs, kcb); in kprobe_int3_handler()
680 kcb->kprobe_status = KPROBE_HIT_ACTIVE; in kprobe_int3_handler()
690 setup_singlestep(p, regs, kcb, 0); in kprobe_int3_handler()
870 struct kprobe_ctlblk *kcb) in resume_execution() argument
884 *tos |= kcb->kprobe_old_flags; in resume_execution()
939 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); in kprobe_debug_handler() local
944 resume_execution(cur, regs, kcb); in kprobe_debug_handler()
945 regs->flags |= kcb->kprobe_saved_flags; in kprobe_debug_handler()
947 if ((kcb->kprobe_status != KPROBE_REENTER) && cur->post_handler) { in kprobe_debug_handler()
948 kcb->kprobe_status = KPROBE_HIT_SSDONE; in kprobe_debug_handler()
953 if (kcb->kprobe_status == KPROBE_REENTER) { in kprobe_debug_handler()
954 restore_previous_kprobe(kcb); in kprobe_debug_handler()
974 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); in kprobe_fault_handler() local
978 WARN_ON(kcb->kprobe_status != KPROBE_HIT_SS && in kprobe_fault_handler()
979 kcb->kprobe_status != KPROBE_REENTER); in kprobe_fault_handler()
999 regs->flags |= kcb->kprobe_old_flags; in kprobe_fault_handler()
1001 if (kcb->kprobe_status == KPROBE_REENTER) in kprobe_fault_handler()
1002 restore_previous_kprobe(kcb); in kprobe_fault_handler()
1005 } else if (kcb->kprobe_status == KPROBE_HIT_ACTIVE || in kprobe_fault_handler()
1006 kcb->kprobe_status == KPROBE_HIT_SSDONE) { in kprobe_fault_handler()