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
79 frame = ((unsigned long *)frame)[-2] - 4; in dump_backtrace_entry()
103 for (reg = 10, x = 0, p = str; reg >= 0; reg--) { in dump_backtrace_stm()
105 p += sprintf(p, " r%d:%08x", reg, *stack--); in dump_backtrace_stm()
120 * physical memory. If it is not there, then we can't dump
128 return -EFAULT; in verify_stack()
135 * Dump out the contents of some memory nicely...
150 str[sizeof(str) - 1] = '\0'; in dump_mem()
174 * Note that we now dump the code first, just in case the backtrace in dump_instr()
178 for (i = -4; i < 1 + !!thumb; i++) { in dump_instr()
240 pr_cont("no frame pointer"); in dump_backtrace()
288 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV); in __die()
296 TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), end_of_stack(tsk)); in __die()
299 dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp, in __die()
300 ALIGN(regs->ARM_sp - THREAD_SIZE, THREAD_ALIGN) in __die()
310 static int die_owner = -1;
325 /* nested oops. should stop eventually */; in oops_begin()
342 die_owner = -1; in oops_end()
344 die_nest_count--; in oops_end()
360 * This function is protected against re-entrancy.
369 bug_type = report_bug(regs->ARM_pc, regs); in die()
371 str = "Oops - BUG"; in die()
384 current->thread.error_code = err; in arm_notify_die()
385 current->thread.trap_no = trap; in arm_notify_die()
421 list_add(&hook->node, &undef_hook); in register_undef_hook()
430 list_del(&hook->node); in unregister_undef_hook()
443 if ((instr & hook->instr_mask) == hook->instr_val && in call_undef_hook()
444 (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) in call_undef_hook()
445 fn = hook->fn; in call_undef_hook()
494 current->comm, task_pid_nr(current), pc); in do_undefinstr()
499 arm_notify_die("Oops - undefined instruction", regs, in do_undefinstr()
508 * (NMIs can pre-empt critical sections meaning almost all locking is in NOKPROBE_SYMBOL()
510 * circumstances where non-maskability improves robustness, such as in NOKPROBE_SYMBOL()
533 * dump out some state information...
541 die("Oops - bad mode", regs, 0); in bad_mode()
548 if ((current->personality & PER_MASK) != PER_LINUX) { in bad_syscall()
550 return regs->ARM_r0; in bad_syscall()
556 task_pid_nr(current), current->comm, n); in bad_syscall()
561 arm_notify_die("Oops - bad syscall", regs, SIGILL, ILL_ILLTRP, in bad_syscall()
562 (void __user *)instruction_pointer(regs) - in bad_syscall()
566 return regs->ARM_r0; in bad_syscall()
575 unsigned long chunk = min(PAGE_SIZE, end - start); in __do_cache_op()
595 return -EINVAL; in do_cache_op()
597 if (!access_ok((void __user *)start, end - start)) in do_cache_op()
598 return -EFAULT; in do_cache_op()
605 * 0x9f0000 - 0x9fffff are some more esoteric system calls
607 #define NR(x) ((__ARM_NR_##x) - __ARM_NR_BASE)
608 asmlinkage int arm_syscall(int no, struct pt_regs *regs) in arm_syscall() argument
610 if ((no >> 16) != (__ARM_NR_BASE>> 16)) in arm_syscall()
611 return bad_syscall(no, regs); in arm_syscall()
613 switch (no & 0xffff) { in arm_syscall()
620 regs->ARM_pc -= thumb_mode(regs) ? 2 : 4; in arm_syscall()
622 return regs->ARM_r0; in arm_syscall()
626 * _exclusive_. There is no alignment requirement on either address; in arm_syscall()
639 return do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2); in arm_syscall()
644 regs->ARM_cpsr &= ~MODE32_BIT; in arm_syscall()
645 return regs->ARM_r0; in arm_syscall()
650 regs->ARM_cpsr |= MODE32_BIT; in arm_syscall()
651 return regs->ARM_r0; in arm_syscall()
654 set_tls(regs->ARM_r0); in arm_syscall()
658 return current_thread_info()->tp_value[0]; in arm_syscall()
661 /* Calls 9f00xx..9f07ff are defined to return -ENOSYS in arm_syscall()
665 if ((no & 0xffff) <= 0x7ff) in arm_syscall()
666 return -ENOSYS; in arm_syscall()
676 task_pid_nr(current), current->comm, no); in arm_syscall()
684 arm_notify_die("Oops - bad syscall(2)", regs, SIGILL, ILL_ILLTRP, in arm_syscall()
685 (void __user *)instruction_pointer(regs) - in arm_syscall()
687 no, 0); in arm_syscall()
696 * using a pre-ARMv6 processor (there are apparently a few prototypes like
706 regs->uregs[reg] = current_thread_info()->tp_value[0]; in get_tp_trap()
707 regs->ARM_pc += 4; in get_tp_trap()
740 pr_err("8<--- cut here ---\n"); in baddataabort()
742 task_pid_nr(current), current->comm, code, instr); in baddataabort()
744 show_pte(KERN_ERR, current->mm, addr); in baddataabort()
788 panic("Oops failed to kill thread"); in abort()
795 int kuser_sz = __kuser_helper_end - __kuser_helper_start; in kuser_init()
797 memcpy(vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); in kuser_init()
815 memcpy(vma, lma_start, lma_end - lma_start); in copy_from_lma()
834 pr_err("CPU%u: Spectre BHB workaround too late - system vulnerable\n", in spectre_bhb_update_vectors()
857 flush_vectors(vectors_page, 0, vec_end - vec_start); in spectre_bhb_update_vectors()
881 * Copy the vectors, stubs and kuser helpers (in entry-armv.S) in early_trap_init()
896 * on V7-M there is no need to copy the vector table to a dedicated in early_trap_init()
917 return -ENOMEM; in allocate_overflow_stacks()
926 unsigned long tsk_stk = (unsigned long)current->stack; in handle_bad_stack()
939 irq_stk - THREAD_SIZE, irq_stk); in handle_bad_stack()
942 ovf_stk - OVERFLOW_STACK_SIZE, ovf_stk); in handle_bad_stack()