Lines Matching +full:no +full:- +full:dump +full:- +full:oops
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 1995-2009 Russell King
80 frame = ((unsigned long *)frame)[-2] - 4; in dump_backtrace_entry()
104 for (reg = 10, x = 0, p = str; reg >= 0; reg--) { in dump_backtrace_stm()
106 p += sprintf(p, " r%d:%08x", reg, *stack--); in dump_backtrace_stm()
121 * physical memory. If it is not there, then we can't dump
129 return -EFAULT; in verify_stack()
136 * Dump out the contents of some memory nicely...
151 str[sizeof(str) - 1] = '\0'; in dump_mem()
175 * Note that we now dump the code first, just in case the backtrace in dump_instr()
179 for (i = -4; i < 1 + !!thumb; i++) { in dump_instr()
241 pr_cont("no frame pointer"); in dump_backtrace()
289 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV); in __die()
297 TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), end_of_stack(tsk)); in __die()
300 dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp, in __die()
301 ALIGN(regs->ARM_sp - THREAD_SIZE, THREAD_ALIGN) in __die()
311 static int die_owner = -1;
326 /* nested oops. should stop eventually */; in oops_begin()
343 die_owner = -1; in oops_end()
345 die_nest_count--; in oops_end()
361 * This function is protected against re-entrancy.
370 bug_type = report_bug(regs->ARM_pc, regs); in die()
372 str = "Oops - BUG"; in die()
385 current->thread.error_code = err; in arm_notify_die()
386 current->thread.trap_no = trap; in arm_notify_die()
422 list_add(&hook->node, &undef_hook); in register_undef_hook()
431 list_del(&hook->node); in unregister_undef_hook()
444 if ((instr & hook->instr_mask) == hook->instr_val && in call_undef_hook()
445 (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) in call_undef_hook()
446 fn = hook->fn; in call_undef_hook()
495 current->comm, task_pid_nr(current), pc); in do_undefinstr()
500 arm_notify_die("Oops - undefined instruction", regs, in do_undefinstr()
509 * (NMIs can pre-empt critical sections meaning almost all locking is in NOKPROBE_SYMBOL()
511 * circumstances where non-maskability improves robustness, such as in NOKPROBE_SYMBOL()
534 * dump out some state information...
542 die("Oops - bad mode", regs, 0); in bad_mode()
549 if ((current->personality & PER_MASK) != PER_LINUX) { in bad_syscall()
551 return regs->ARM_r0; in bad_syscall()
557 task_pid_nr(current), current->comm, n); in bad_syscall()
562 arm_notify_die("Oops - bad syscall", regs, SIGILL, ILL_ILLTRP, in bad_syscall()
563 (void __user *)instruction_pointer(regs) - in bad_syscall()
567 return regs->ARM_r0; in bad_syscall()
577 unsigned long chunk = min(PAGE_SIZE, end - start); in __do_cache_op()
599 return -EINVAL; in do_cache_op()
601 if (!access_ok((void __user *)start, end - start)) in do_cache_op()
602 return -EFAULT; in do_cache_op()
609 * 0x9f0000 - 0x9fffff are some more esoteric system calls
611 #define NR(x) ((__ARM_NR_##x) - __ARM_NR_BASE)
612 asmlinkage int arm_syscall(int no, struct pt_regs *regs) in arm_syscall() argument
614 if ((no >> 16) != (__ARM_NR_BASE>> 16)) in arm_syscall()
615 return bad_syscall(no, regs); in arm_syscall()
617 switch (no & 0xffff) { in arm_syscall()
624 regs->ARM_pc -= thumb_mode(regs) ? 2 : 4; in arm_syscall()
626 return regs->ARM_r0; in arm_syscall()
630 * _exclusive_. There is no alignment requirement on either address; in arm_syscall()
643 return do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2); in arm_syscall()
648 regs->ARM_cpsr &= ~MODE32_BIT; in arm_syscall()
649 return regs->ARM_r0; in arm_syscall()
654 regs->ARM_cpsr |= MODE32_BIT; in arm_syscall()
655 return regs->ARM_r0; in arm_syscall()
658 set_tls(regs->ARM_r0); in arm_syscall()
662 return current_thread_info()->tp_value[0]; in arm_syscall()
665 /* Calls 9f00xx..9f07ff are defined to return -ENOSYS in arm_syscall()
669 if ((no & 0xffff) <= 0x7ff) in arm_syscall()
670 return -ENOSYS; in arm_syscall()
680 task_pid_nr(current), current->comm, no); in arm_syscall()
688 arm_notify_die("Oops - bad syscall(2)", regs, SIGILL, ILL_ILLTRP, in arm_syscall()
689 (void __user *)instruction_pointer(regs) - in arm_syscall()
691 no, 0); in arm_syscall()
700 * using a pre-ARMv6 processor (there are apparently a few prototypes like
710 regs->uregs[reg] = current_thread_info()->tp_value[0]; in get_tp_trap()
711 regs->ARM_pc += 4; in get_tp_trap()
744 pr_err("8<--- cut here ---\n"); in baddataabort()
746 task_pid_nr(current), current->comm, code, instr); in baddataabort()
748 show_pte(KERN_ERR, current->mm, addr); in baddataabort()
792 panic("Oops failed to kill thread"); in abort()
799 int kuser_sz = __kuser_helper_end - __kuser_helper_start; in kuser_init()
801 memcpy(vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); in kuser_init()
819 memcpy(vma, lma_start, lma_end - lma_start); in copy_from_lma()
838 pr_err("CPU%u: Spectre BHB workaround too late - system vulnerable\n", in spectre_bhb_update_vectors()
861 flush_vectors(vectors_page, 0, vec_end - vec_start); in spectre_bhb_update_vectors()
885 * Copy the vectors, stubs and kuser helpers (in entry-armv.S) in early_trap_init()
900 * on V7-M there is no need to copy the vector table to a dedicated in early_trap_init()
921 return -ENOMEM; in allocate_overflow_stacks()
930 unsigned long tsk_stk = (unsigned long)current->stack; in handle_bad_stack()
943 irq_stk - THREAD_SIZE, irq_stk); in handle_bad_stack()
946 ovf_stk - OVERFLOW_STACK_SIZE, ovf_stk); in handle_bad_stack()