Lines Matching +full:pre +full:- +full:configurable

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 1995-2009 Russell King
80 frame = ((unsigned long *)frame)[-2] - 4;
104 for (reg = 10, x = 0, p = str; reg >= 0; reg--) {
106 p += sprintf(p, " r%d:%08x", reg, *stack--);
129 return -EFAULT;
151 str[sizeof(str) - 1] = '\0';
179 for (i = -4; i < 1 + !!thumb; i++) {
282 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV);
290 TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), end_of_stack(tsk));
293 dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp,
294 ALIGN(regs->ARM_sp - THREAD_SIZE, THREAD_ALIGN)
304 static int die_owner = -1;
336 die_owner = -1;
338 die_nest_count--;
354 * This function is protected against re-entrancy.
363 bug_type = report_bug(regs->ARM_pc, regs);
365 str = "Oops - BUG";
378 current->thread.error_code = err;
379 current->thread.trap_no = trap;
415 list_add(&hook->node, &undef_hook);
424 list_del(&hook->node);
437 if ((instr & hook->instr_mask) == hook->instr_val &&
438 (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val)
439 fn = hook->fn;
488 current->comm, task_pid_nr(current), pc);
493 arm_notify_die("Oops - undefined instruction", regs,
502 * (NMIs can pre-empt critical sections meaning almost all locking is
504 * circumstances where non-maskability improves robustness, such as
535 die("Oops - bad mode", regs, 0);
542 if ((current->personality & PER_MASK) != PER_LINUX) {
544 return regs->ARM_r0;
550 task_pid_nr(current), current->comm, n);
555 arm_notify_die("Oops - bad syscall", regs, SIGILL, ILL_ILLTRP,
556 (void __user *)instruction_pointer(regs) -
560 return regs->ARM_r0;
570 unsigned long chunk = min(PAGE_SIZE, end - start);
592 return -EINVAL;
594 if (!access_ok((void __user *)start, end - start))
595 return -EFAULT;
602 * 0x9f0000 - 0x9fffff are some more esoteric system calls
604 #define NR(x) ((__ARM_NR_##x) - __ARM_NR_BASE)
617 regs->ARM_pc -= thumb_mode(regs) ? 2 : 4;
619 return regs->ARM_r0;
636 return do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2);
641 regs->ARM_cpsr &= ~MODE32_BIT;
642 return regs->ARM_r0;
647 regs->ARM_cpsr |= MODE32_BIT;
648 return regs->ARM_r0;
651 set_tls(regs->ARM_r0);
655 return current_thread_info()->tp_value[0];
658 /* Calls 9f00xx..9f07ff are defined to return -ENOSYS
663 return -ENOSYS;
673 task_pid_nr(current), current->comm, no);
681 arm_notify_die("Oops - bad syscall(2)", regs, SIGILL, ILL_ILLTRP,
682 (void __user *)instruction_pointer(regs) -
693 * using a pre-ARMv6 processor (there are apparently a few prototypes like
703 regs->uregs[reg] = current_thread_info()->tp_value[0];
704 regs->ARM_pc += 4;
737 pr_err("8<--- cut here ---\n");
739 task_pid_nr(current), current->comm, code, instr);
741 show_pte(KERN_ERR, current->mm, addr);
792 int kuser_sz = __kuser_helper_end - __kuser_helper_start;
794 memcpy(vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz);
812 memcpy(vma, lma_start, lma_end - lma_start);
831 pr_err("CPU%u: Spectre BHB workaround too late - system vulnerable\n",
854 flush_vectors(vectors_page, 0, vec_end - vec_start);
878 * Copy the vectors, stubs and kuser helpers (in entry-armv.S)
893 * on V7-M there is no need to copy the vector table to a dedicated
894 * memory area. The address is configurable and so a table in the kernel
914 return -ENOMEM;
923 unsigned long tsk_stk = (unsigned long)current->stack;
936 irq_stk - THREAD_SIZE, irq_stk);
939 ovf_stk - OVERFLOW_STACK_SIZE, ovf_stk);