Lines Matching +full:mixed +full:- +full:signals

50 #include <asm/text-patching.h>
65 #include <asm/insn-eval.h>
73 #include <asm/processor-flags.h>
119 *len = addr - start; in decode_bug()
150 *len = addr - start; in decode_bug()
177 tsk->thread.error_code = error_code; in do_trap_no_signal()
178 tsk->thread.trap_nr = trapnr; in do_trap_no_signal()
194 tsk->thread.error_code = error_code; in do_trap_no_signal()
195 tsk->thread.trap_nr = trapnr; in do_trap_no_signal()
197 return -1; in do_trap_no_signal()
207 tsk->comm, task_pid_nr(tsk), type, desc, in show_signal()
208 regs->ip, regs->sp, error_code); in show_signal()
209 print_vma_addr(KERN_CONT " in ", regs->ip); in show_signal()
249 * This address is usually regs->ip, but when an uprobe moved the code out
250 * of line then regs->ip points to the XOL code which would confuse
252 * a trap happened in XOL code then uprobe maps regs->ip back to the
287 ud_type = decode_bug(regs->ip, &ud_imm, &ud_len); in handle_bug()
305 if (regs->flags & X86_EFLAGS_IF) in handle_bug()
310 if (report_bug(regs->ip, regs) == BUG_TRAP_TYPE_WARN || in handle_bug()
312 regs->ip += ud_len; in handle_bug()
321 (void *)regs->ip); in handle_bug()
329 if (regs->flags & X86_EFLAGS_IF) in handle_bug()
406 const char *name = stack_type_name(info->type); in handle_stack_overflow()
409 name, (void *)fault_address, info->begin, info->end); in handle_stack_overflow()
442 * while the stack is read-only are, in fact, recoverable.
466 * If IRET takes a non-IST fault on the espfix64 stack, then we in DEFINE_IDTENTRY_DF()
479 if (((long)regs->sp >> P4D_SHIFT) == ESPFIX_PGD_ENTRY && in DEFINE_IDTENTRY_DF()
480 regs->cs == __KERNEL_CS && in DEFINE_IDTENTRY_DF()
481 regs->ip == (unsigned long)native_irq_return_iret) in DEFINE_IDTENTRY_DF()
483 struct pt_regs *gpregs = (struct pt_regs *)this_cpu_read(cpu_tss_rw.x86_tss.sp0) - 1; in DEFINE_IDTENTRY_DF()
484 unsigned long *p = (unsigned long *)regs->sp; in DEFINE_IDTENTRY_DF()
487 * regs->sp points to the failing IRET frame on the in DEFINE_IDTENTRY_DF()
489 * in gpregs->ss through gpregs->ip. in DEFINE_IDTENTRY_DF()
492 gpregs->ip = p[0]; in DEFINE_IDTENTRY_DF()
493 gpregs->cs = p[1]; in DEFINE_IDTENTRY_DF()
494 gpregs->flags = p[2]; in DEFINE_IDTENTRY_DF()
495 gpregs->sp = p[3]; in DEFINE_IDTENTRY_DF()
496 gpregs->ss = p[4]; in DEFINE_IDTENTRY_DF()
497 gpregs->orig_ax = 0; /* Missing (lost) #GP error code */ in DEFINE_IDTENTRY_DF()
510 regs->ip = (unsigned long)asm_exc_general_protection; in DEFINE_IDTENTRY_DF()
511 regs->sp = (unsigned long)&gpregs->orig_ax; in DEFINE_IDTENTRY_DF()
521 tsk->thread.error_code = error_code; in DEFINE_IDTENTRY_DF()
522 tsk->thread.trap_nr = X86_TRAP_DF; in DEFINE_IDTENTRY_DF()
528 * take any non-IST exception while too close to the bottom of in DEFINE_IDTENTRY_DF()
532 * According to the SDM (footnote in 6.15 under "Interrupt 14 - in DEFINE_IDTENTRY_DF()
533 * Page-Fault Exception (#PF): in DEFINE_IDTENTRY_DF()
597 * out whether any part of the access to that address was non-canonical.
606 if (copy_from_kernel_nofault(insn_buf, (void *)regs->ip, in get_kernel_gp_address()
615 if (*addr == -1UL) in get_kernel_gp_address()
621 * - the operand is not in the kernel half in get_kernel_gp_address()
622 * - the last byte of the operand is not in the user canonical half in get_kernel_gp_address()
625 *addr + insn.opnd_bytes - 1 > __VIRTUAL_MASK) in get_kernel_gp_address()
636 struct thread_struct *t = &current->thread; in fixup_iopl_exception()
640 if (!IS_ENABLED(CONFIG_X86_IOPL_IOPERM) || t->iopl_emul != 3) in fixup_iopl_exception()
652 if (!t->iopl_warn && printk_ratelimit()) { in fixup_iopl_exception()
654 current->comm, task_pid_nr(current), ip); in fixup_iopl_exception()
657 t->iopl_warn = 1; in fixup_iopl_exception()
660 regs->ip += 1; in fixup_iopl_exception()
679 * in *before* interrupts are re-enabled. in try_fixup_enqcmd_gp()
694 if (!mm_valid_pasid(current->mm)) in try_fixup_enqcmd_gp()
697 pasid = current->mm->pasid; in try_fixup_enqcmd_gp()
703 if (current->pasid_activated) in try_fixup_enqcmd_gp()
707 current->pasid_activated = 1; in try_fixup_enqcmd_gp()
722 current->thread.error_code = error_code; in gp_try_fixup_and_notify()
723 current->thread.trap_nr = trapnr; in gp_try_fixup_and_notify()
727 * from kprobe_running(), we have to be non-preemptible. in gp_try_fixup_and_notify()
739 current->thread.error_code = error_code; in gp_user_force_sig_segv()
740 current->thread.trap_nr = trapnr; in gp_user_force_sig_segv()
783 snprintf(desc, sizeof(desc), "segment-related " GPFSTR); in DEFINE_IDTENTRY_ERRORCODE()
789 (hint == GP_NON_CANONICAL) ? "probably for non-canonical address" in DEFINE_IDTENTRY_ERRORCODE()
794 * KASAN is interested only in the non-canonical case, clear it in DEFINE_IDTENTRY_ERRORCODE()
872 * Help handler running on a per-cpu (IST or entry trampoline) stack
878 struct pt_regs *regs = (struct pt_regs *)this_cpu_read(pcpu_hot.top_of_stack) - 1; in sync_regs()
892 * In the SYSCALL entry path the RSP value comes from user-space - don't in vc_switch_off_ist()
903 * use the fall-back stack instead in this case. in vc_switch_off_ist()
905 sp = regs->sp; in vc_switch_off_ist()
914 * Found a safe stack - switch to it as if the entry didn't happen via in vc_switch_off_ist()
918 sp = ALIGN_DOWN(sp, 8) - sizeof(*regs_ret); in vc_switch_off_ist()
939 new_stack = (struct pt_regs *)__this_cpu_read(cpu_tss_rw.x86_tss.sp0) - 1; in fixup_bad_iret()
942 __memcpy(&tmp.ip, (void *)bad_regs->sp, 5*8); in fixup_bad_iret()
959 * code that can be single-stepped in the SYSENTER entry path, then in is_sysenter_singlestep()
960 * assume that this is a useless single-step trap due to SYSENTER in is_sysenter_singlestep()
966 return (regs->ip - (unsigned long)__begin_SYSENTER_singlestep_region) < in is_sysenter_singlestep()
967 (unsigned long)__end_SYSENTER_singlestep_region - in is_sysenter_singlestep()
970 return (regs->ip - (unsigned long)entry_SYSENTER_compat) < in is_sysenter_singlestep()
971 (unsigned long)__end_entry_SYSENTER_compat - in is_sysenter_singlestep()
985 * Certain debug exceptions may clear bits 0-3. The remaining in debug_read_clear_dr6()
1001 * Our handling of the processor debug registers is non-trivial.
1005 * only set watchpoints on userspace addresses. Therefore the in-kernel
1029 * consumed - hw_breakpoint_handler(), single_stop_cont(). in notify_debug()
1032 * for signals - ptrace_triggered(), kgdb_hw_overflow_handler(). in notify_debug()
1068 * it for userspace, but we just took a kernel #DB, so re-set in exc_debug_kernel()
1095 * The kernel doesn't use TF single-step outside of: in exc_debug_kernel()
1097 * - Kprobes, consumed through kprobe_debug_handler() in exc_debug_kernel()
1098 * - KGDB, consumed through notify_debug() in exc_debug_kernel()
1106 regs->flags &= ~X86_EFLAGS_TF; in exc_debug_kernel()
1144 current->thread.virtual_dr6 = (dr6 & DR_STEP); in exc_debug_user()
1175 /* Add the virtual_dr6 bits for signals. */ in exc_debug_user()
1176 dr6 |= current->thread.virtual_dr6; in exc_debug_user()
1220 struct fpu *fpu = &task->thread.fpu; in math_error()
1231 task->thread.error_code = 0; in math_error()
1232 task->thread.trap_nr = trapnr; in math_error()
1246 task->thread.trap_nr = trapnr; in math_error()
1247 task->thread.error_code = 0; in math_error()
1285 * PROBLEM: If the APIC subsystem is configured in mixed mode with in DEFINE_IDTENTRY()
1326 case -EPERM: in handle_xfd_event()
1329 case -EFAULT: in handle_xfd_event()
1366 * to kill the task than getting stuck in a never-ending in DEFINE_IDTENTRY()
1404 * never generated on accesses to normal, TD-private memory that has been
1411 * IRET will re-enable NMIs and nested NMI will corrupt the NMI stack.
1414 * the NMI entry code. Entry code paths do not access TD-shared memory,
1428 * the interrupt-disabled region before TDGETVEINFO, a #DF (fault
1441 * NMIs/Machine-checks/Interrupts will be in a disabled state in DEFINE_IDTENTRY()
1479 /* Init GHCB memory pages when running as an SEV-ES guest */ in trap_init()