asmlinkage void asm_exit_to_user_mode(struct pt_regs *regs);
 
 void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs);
-void do_undefinstr(struct pt_regs *regs, unsigned long esr);
+void do_el0_undef(struct pt_regs *regs, unsigned long esr);
+void do_el1_undef(struct pt_regs *regs, unsigned long esr);
 void do_el0_bti(struct pt_regs *regs);
 void do_el1_bti(struct pt_regs *regs, unsigned long esr);
 void do_debug_exception(unsigned long addr_if_watchpoint, unsigned long esr,
 
 {
        enter_from_kernel_mode(regs);
        local_daif_inherit(regs);
-       do_undefinstr(regs, esr);
+       do_el1_undef(regs, esr);
        local_daif_mask();
        exit_to_kernel_mode(regs);
 }
 {
        enter_from_user_mode(regs);
        local_daif_restore(DAIF_PROCCTX);
-       do_undefinstr(regs, esr);
+       do_el0_undef(regs, esr);
        exit_to_user_mode(regs);
 }
 
 
        force_signal_inject(SIGSEGV, code, addr, 0);
 }
 
-void do_undefinstr(struct pt_regs *regs, unsigned long esr)
+void do_el0_undef(struct pt_regs *regs, unsigned long esr)
 {
        /* check for AArch32 breakpoint instructions */
        if (!aarch32_break_handler(regs))
        if (call_undef_hook(regs) == 0)
                return;
 
-       if (!user_mode(regs))
-               die("Oops - Undefined instruction", regs, esr);
-
        force_signal_inject(SIGILL, ILL_ILLOPC, regs->pc, 0);
 }
-NOKPROBE_SYMBOL(do_undefinstr);
+
+void do_el1_undef(struct pt_regs *regs, unsigned long esr)
+{
+       if (call_undef_hook(regs) == 0)
+               return;
+
+       die("Oops - Undefined instruction", regs, esr);
+}
 
 void do_el0_bti(struct pt_regs *regs)
 {
 {
        die("Oops - BTI", regs, esr);
 }
-NOKPROBE_SYMBOL(do_el1_bti);
 
 void do_el0_fpac(struct pt_regs *regs, unsigned long esr)
 {
         */
        die("Oops - FPAC", regs, esr);
 }
-NOKPROBE_SYMBOL(do_el1_fpac)
 
 #define __user_cache_maint(insn, address, res)                 \
        if (address >= TASK_SIZE_MAX) {                         \
                hook_base = cp15_64_hooks;
                break;
        default:
-               do_undefinstr(regs, esr);
+               do_el0_undef(regs, esr);
                return;
        }
 
         * EL0. Fall back to our usual undefined instruction handler
         * so that we handle these consistently.
         */
-       do_undefinstr(regs, esr);
+       do_el0_undef(regs, esr);
 }
 #endif
 
         * back to our usual undefined instruction handler so that we handle
         * these consistently.
         */
-       do_undefinstr(regs, esr);
+       do_el0_undef(regs, esr);
 }
 
 static const char *esr_class_str[] = {