Thread (21 messages) flat view 21 messages, 5 authors, 2014-08-27
STALE4407d

[PATCH 3/6] arm64: Add support for hooks to handle undefined instructions

From: Will Deacon <hidden>
Date: 2014-08-27 16:51:59

On Wed, Aug 27, 2014 at 05:47:14PM +0100, Catalin Marinas wrote:
On Tue, Aug 26, 2014 at 03:30:11PM +0100, Will Deacon wrote:
quoted
On Tue, Aug 26, 2014 at 03:21:09PM +0100, Ard Biesheuvel wrote:
quoted
You need this patch in order to be able to return from an undef
exception taken in EL1:
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -287,7 +287,9 @@ el1_undef:
         */
        enable_dbg
        mov     x0, sp
-       b       do_undefinstr
+       bl      do_undefinstr
+
+       kernel_exit 1
 el1_dbg:
        /*
         * Debug exception handling
Hmm, I'm surprised we don't already need something like this for KGDB...
We don't expect undef exceptions at EL1, so far they are fatal as we
don't have any hooks for them. Doesn't KGDB use dedicated breakpoint
instructions?
Ah yeah, we use magic immediates in the BRK instruction. I was getting
confused with arch/arm/, where we actually use an undefined encoding for
the same thing. That explains why things appear to be working!

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help