• Home
  • Raw
  • Download

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

47 #include <asm/text-patching.h>
62 #include <asm/insn-eval.h>
68 #include <asm/processor-flags.h>
77 if (regs->flags & X86_EFLAGS_IF) in cond_local_irq_enable()
83 if (regs->flags & X86_EFLAGS_IF) in cond_local_irq_disable()
117 tsk->thread.error_code = error_code; in do_trap_no_signal()
118 tsk->thread.trap_nr = trapnr; in do_trap_no_signal()
131 tsk->thread.error_code = error_code; in do_trap_no_signal()
132 tsk->thread.trap_nr = trapnr; in do_trap_no_signal()
134 return -1; in do_trap_no_signal()
144 tsk->comm, task_pid_nr(tsk), type, desc, in show_signal()
145 regs->ip, regs->sp, error_code); in show_signal()
146 print_vma_addr(KERN_CONT " in ", regs->ip); in show_signal()
186 * This address is usually regs->ip, but when an uprobe moved the code out
187 * of line then regs->ip points to the XOL code which would confuse
189 * a trap happened in XOL code then uprobe maps regs->ip back to the
222 if (!is_valid_bugaddr(regs->ip)) in handle_bug()
233 if (regs->flags & X86_EFLAGS_IF) in handle_bug()
235 if (report_bug(regs->ip, regs) == BUG_TRAP_TYPE_WARN) { in handle_bug()
236 regs->ip += LEN_UD2; in handle_bug()
239 if (regs->flags & X86_EFLAGS_IF) in handle_bug()
317 (void *)fault_address, current->stack, in handle_stack_overflow()
318 (char *)current->stack + THREAD_SIZE - 1); in handle_stack_overflow()
335 * while the stack is read-only are, in fact, recoverable.
358 * If IRET takes a non-IST fault on the espfix64 stack, then we in DEFINE_IDTENTRY_DF()
371 if (((long)regs->sp >> P4D_SHIFT) == ESPFIX_PGD_ENTRY && in DEFINE_IDTENTRY_DF()
372 regs->cs == __KERNEL_CS && in DEFINE_IDTENTRY_DF()
373 regs->ip == (unsigned long)native_irq_return_iret) in DEFINE_IDTENTRY_DF()
375 struct pt_regs *gpregs = (struct pt_regs *)this_cpu_read(cpu_tss_rw.x86_tss.sp0) - 1; in DEFINE_IDTENTRY_DF()
376 unsigned long *p = (unsigned long *)regs->sp; in DEFINE_IDTENTRY_DF()
379 * regs->sp points to the failing IRET frame on the in DEFINE_IDTENTRY_DF()
381 * in gpregs->ss through gpregs->ip. in DEFINE_IDTENTRY_DF()
384 gpregs->ip = p[0]; in DEFINE_IDTENTRY_DF()
385 gpregs->cs = p[1]; in DEFINE_IDTENTRY_DF()
386 gpregs->flags = p[2]; in DEFINE_IDTENTRY_DF()
387 gpregs->sp = p[3]; in DEFINE_IDTENTRY_DF()
388 gpregs->ss = p[4]; in DEFINE_IDTENTRY_DF()
389 gpregs->orig_ax = 0; /* Missing (lost) #GP error code */ in DEFINE_IDTENTRY_DF()
402 regs->ip = (unsigned long)asm_exc_general_protection; in DEFINE_IDTENTRY_DF()
403 regs->sp = (unsigned long)&gpregs->orig_ax; in DEFINE_IDTENTRY_DF()
413 tsk->thread.error_code = error_code; in DEFINE_IDTENTRY_DF()
414 tsk->thread.trap_nr = X86_TRAP_DF; in DEFINE_IDTENTRY_DF()
420 * take any non-IST exception while too close to the bottom of in DEFINE_IDTENTRY_DF()
424 * According to the SDM (footnote in 6.15 under "Interrupt 14 - in DEFINE_IDTENTRY_DF()
425 * Page-Fault Exception (#PF): in DEFINE_IDTENTRY_DF()
454 if ((unsigned long)task_stack_page(tsk) - 1 - address < PAGE_SIZE) { in DEFINE_IDTENTRY_DF()
455 handle_stack_overflow("kernel stack overflow (double-fault)", in DEFINE_IDTENTRY_DF()
490 * out whether any part of the access to that address was non-canonical.
498 if (copy_from_kernel_nofault(insn_buf, (void *)regs->ip, in get_kernel_gp_address()
507 if (*addr == -1UL) in get_kernel_gp_address()
513 * - the operand is not in the kernel half in get_kernel_gp_address()
514 * - the last byte of the operand is not in the user canonical half in get_kernel_gp_address()
517 *addr + insn.opnd_bytes - 1 > __VIRTUAL_MASK) in get_kernel_gp_address()
528 struct thread_struct *t = &current->thread; in fixup_iopl_exception()
532 if (!IS_ENABLED(CONFIG_X86_IOPL_IOPERM) || t->iopl_emul != 3) in fixup_iopl_exception()
545 if (!t->iopl_warn && printk_ratelimit()) { in fixup_iopl_exception()
547 current->comm, task_pid_nr(current), ip); in fixup_iopl_exception()
550 t->iopl_warn = 1; in fixup_iopl_exception()
553 regs->ip += 1; in fixup_iopl_exception()
585 tsk->thread.error_code = error_code; in DEFINE_IDTENTRY_ERRORCODE()
586 tsk->thread.trap_nr = X86_TRAP_GP; in DEFINE_IDTENTRY_ERRORCODE()
596 tsk->thread.error_code = error_code; in DEFINE_IDTENTRY_ERRORCODE()
597 tsk->thread.trap_nr = X86_TRAP_GP; in DEFINE_IDTENTRY_ERRORCODE()
601 * from kprobe_running(), we have to be non-preemptible. in DEFINE_IDTENTRY_ERRORCODE()
613 snprintf(desc, sizeof(desc), "segment-related " GPFSTR); in DEFINE_IDTENTRY_ERRORCODE()
619 (hint == GP_NON_CANONICAL) ? "probably for non-canonical address" in DEFINE_IDTENTRY_ERRORCODE()
624 * KASAN is interested only in the non-canonical case, clear it in DEFINE_IDTENTRY_ERRORCODE()
702 * Help handler running on a per-cpu (IST or entry trampoline) stack
708 struct pt_regs *regs = (struct pt_regs *)this_cpu_read(cpu_current_top_of_stack) - 1; in sync_regs()
722 * In the SYSCALL entry path the RSP value comes from user-space - don't in vc_switch_off_ist()
733 * use the fall-back stack instead in this case. in vc_switch_off_ist()
735 sp = regs->sp; in vc_switch_off_ist()
744 * Found a safe stack - switch to it as if the entry didn't happen via in vc_switch_off_ist()
748 sp = ALIGN_DOWN(sp, 8) - sizeof(*regs_ret); in vc_switch_off_ist()
774 (struct bad_iret_stack *)__this_cpu_read(cpu_tss_rw.x86_tss.sp0) - 1; in fixup_bad_iret()
777 __memcpy(&tmp.regs.ip, (void *)s->regs.sp, 5*8); in fixup_bad_iret()
785 BUG_ON(!user_mode(&new_stack->regs)); in fixup_bad_iret()
794 * code that can be single-stepped in the SYSENTER entry path, then in is_sysenter_singlestep()
795 * assume that this is a useless single-step trap due to SYSENTER in is_sysenter_singlestep()
801 return (regs->ip - (unsigned long)__begin_SYSENTER_singlestep_region) < in is_sysenter_singlestep()
802 (unsigned long)__end_SYSENTER_singlestep_region - in is_sysenter_singlestep()
805 return (regs->ip - (unsigned long)entry_SYSENTER_compat) < in is_sysenter_singlestep()
806 (unsigned long)__end_entry_SYSENTER_compat - in is_sysenter_singlestep()
820 * Certain debug exceptions may clear bits 0-3. The remaining in debug_read_clear_dr6()
836 * Our handling of the processor debug registers is non-trivial.
840 * only set watchpoints on userspace addresses. Therefore the in-kernel
864 * consumed - hw_breakpoint_handler(), single_stop_cont(). in notify_debug()
867 * for signals - ptrace_triggered(), kgdb_hw_overflow_handler(). in notify_debug()
903 * it for userspace, but we just took a kernel #DB, so re-set in exc_debug_kernel()
930 * The kernel doesn't use TF single-step outside of: in exc_debug_kernel()
932 * - Kprobes, consumed through kprobe_debug_handler() in exc_debug_kernel()
933 * - KGDB, consumed through notify_debug() in exc_debug_kernel()
941 regs->flags &= ~X86_EFLAGS_TF; in exc_debug_kernel()
979 current->thread.virtual_dr6 = (dr6 & DR_STEP); in exc_debug_user()
1006 /* Add the virtual_dr6 bits for signals. */ in exc_debug_user()
1007 dr6 |= current->thread.virtual_dr6; in exc_debug_user()
1051 struct fpu *fpu = &task->thread.fpu; in math_error()
1062 task->thread.error_code = 0; in math_error()
1063 task->thread.trap_nr = trapnr; in math_error()
1076 task->thread.trap_nr = trapnr; in math_error()
1077 task->thread.error_code = 0; in math_error()
1112 * PROBLEM: If the APIC subsystem is configured in mixed mode with in DEFINE_IDTENTRY()
1155 * to kill the task than getting stuck in a never-ending in DEFINE_IDTENTRY()
1180 /* Init GHCB memory pages when running as an SEV-ES guest */ in trap_init()