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
89 for (reg = 10, x = 0, p = str; reg >= 0; reg--) { in dump_backtrace_stm()
91 p += sprintf(p, " r%d:%08x", reg, *stack--); in dump_backtrace_stm()
106 * physical memory. If it is not there, then we can't dump
113 return -EFAULT; in verify_stack()
120 * Dump out the contents of some memory nicely...
131 * to safely read from kernel space. Note that we now dump the in dump_mem()
144 str[sizeof(str) - 1] = '\0'; in dump_mem()
170 * Note that we now dump the code first, just in case the backtrace in __dump_instr()
174 for (i = -4; i < 1 + !!thumb; i++) { in __dump_instr()
237 pr_cont("no frame pointer"); in dump_backtrace()
285 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV); in __die()
292 TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), end_of_stack(tsk)); in __die()
295 dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp, in __die()
305 static int die_owner = -1;
320 /* nested oops. should stop eventually */; in oops_begin()
337 die_owner = -1; in oops_end()
339 die_nest_count--; in oops_end()
355 * This function is protected against re-entrancy.
364 bug_type = report_bug(regs->ARM_pc, regs); in die()
366 str = "Oops - BUG"; in die()
379 current->thread.error_code = err; in arm_notify_die()
380 current->thread.trap_no = trap; in arm_notify_die()
416 list_add(&hook->node, &undef_hook); in register_undef_hook()
425 list_del(&hook->node); in unregister_undef_hook()
438 if ((instr & hook->instr_mask) == hook->instr_val && in call_undef_hook()
439 (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) in call_undef_hook()
440 fn = hook->fn; in call_undef_hook()
489 current->comm, task_pid_nr(current), pc); in do_undefinstr()
494 arm_notify_die("Oops - undefined instruction", regs, in do_undefinstr()
503 * (NMIs can pre-empt critical sections meaning almost all locking is in NOKPROBE_SYMBOL()
505 * circumstances where non-maskability improves robustness, such as in NOKPROBE_SYMBOL()
528 * dump out some state information...
536 die("Oops - bad mode", regs, 0); in bad_mode()
543 if ((current->personality & PER_MASK) != PER_LINUX) { in bad_syscall()
545 return regs->ARM_r0; in bad_syscall()
551 task_pid_nr(current), current->comm, n); in bad_syscall()
556 arm_notify_die("Oops - bad syscall", regs, SIGILL, ILL_ILLTRP, in bad_syscall()
557 (void __user *)instruction_pointer(regs) - in bad_syscall()
561 return regs->ARM_r0; in bad_syscall()
570 unsigned long chunk = min(PAGE_SIZE, end - start); in __do_cache_op()
590 return -EINVAL; in do_cache_op()
592 if (!access_ok((void __user *)start, end - start)) in do_cache_op()
593 return -EFAULT; in do_cache_op()
600 * 0x9f0000 - 0x9fffff are some more esoteric system calls
602 #define NR(x) ((__ARM_NR_##x) - __ARM_NR_BASE)
603 asmlinkage int arm_syscall(int no, struct pt_regs *regs) in arm_syscall() argument
605 if ((no >> 16) != (__ARM_NR_BASE>> 16)) in arm_syscall()
606 return bad_syscall(no, regs); in arm_syscall()
608 switch (no & 0xffff) { in arm_syscall()
615 regs->ARM_pc -= thumb_mode(regs) ? 2 : 4; in arm_syscall()
617 return regs->ARM_r0; in arm_syscall()
621 * _exclusive_. There is no alignment requirement on either address; in arm_syscall()
634 return do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2); in arm_syscall()
639 regs->ARM_cpsr &= ~MODE32_BIT; in arm_syscall()
640 return regs->ARM_r0; in arm_syscall()
645 regs->ARM_cpsr |= MODE32_BIT; in arm_syscall()
646 return regs->ARM_r0; in arm_syscall()
649 set_tls(regs->ARM_r0); in arm_syscall()
653 return current_thread_info()->tp_value[0]; in arm_syscall()
656 /* Calls 9f00xx..9f07ff are defined to return -ENOSYS in arm_syscall()
660 if ((no & 0xffff) <= 0x7ff) in arm_syscall()
661 return -ENOSYS; in arm_syscall()
671 task_pid_nr(current), current->comm, no); in arm_syscall()
679 arm_notify_die("Oops - bad syscall(2)", regs, SIGILL, ILL_ILLTRP, in arm_syscall()
680 (void __user *)instruction_pointer(regs) - in arm_syscall()
682 no, 0); in arm_syscall()
691 * using a pre-ARMv6 processor (there are apparently a few prototypes like
701 regs->uregs[reg] = current_thread_info()->tp_value[0]; in get_tp_trap()
702 regs->ARM_pc += 4; in get_tp_trap()
735 pr_err("8<--- cut here ---\n"); in baddataabort()
737 task_pid_nr(current), current->comm, code, instr); in baddataabort()
739 show_pte(KERN_ERR, current->mm, addr); in baddataabort()
781 panic("Oops failed to kill thread"); in abort()
793 int kuser_sz = __kuser_helper_end - __kuser_helper_start; in kuser_init()
795 memcpy(vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); in kuser_init()
813 memcpy(vma, lma_start, lma_end - lma_start); in copy_from_lma()
832 pr_err("CPU%u: Spectre BHB workaround too late - system vulnerable\n", in spectre_bhb_update_vectors()
855 flush_vectors(vectors_page, 0, vec_end - vec_start); in spectre_bhb_update_vectors()
879 * Copy the vectors, stubs and kuser helpers (in entry-armv.S) in early_trap_init()
894 * on V7-M there is no need to copy the vector table to a dedicated in early_trap_init()