[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/arm: arm64: Reserve a brk immediate to fault on purpose



commit c36eba84a11f7cc4b40cd181d2f1215b105fc72b
Author:     Julien Grall <julien.grall@xxxxxxx>
AuthorDate: Wed Jun 22 12:15:22 2016 +0100
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Wed Jul 13 18:30:46 2016 +0100

    xen/arm: arm64: Reserve a brk immediate to fault on purpose
    
    It may not possible to return a proper error when encoding an
    instruction. Instead, a handcrafted instruction will be returned.
    
    Also, provide the encoding for the faulting instruction.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
    Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/include/asm-arm/arm64/brk.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/xen/include/asm-arm/arm64/brk.h b/xen/include/asm-arm/arm64/brk.h
index 7867b07..04442c4 100644
--- a/xen/include/asm-arm/arm64/brk.h
+++ b/xen/include/asm-arm/arm64/brk.h
@@ -12,8 +12,21 @@
 /*
  * #imm16 values used for BRK instruction generation
  * 0x001: xen-mode BUG() and WARN() traps
+ * 0x002: for triggering a fault on purpose (reserved)
  */
 #define BRK_BUG_FRAME_IMM   1
+#define BRK_FAULT_IMM       2
+
+/*
+ * BRK instruction encoding
+ * The #imm16 value should be placed at bits[20:5] within BRK ins
+ */
+#define AARCH64_BREAK_MON 0xd4200000
+
+/*
+ * BRK instruction for provoking a fault on purpose
+ */
+#define AARCH64_BREAK_FAULT (AARCH64_BREAK_MON | (BRK_FAULT_IMM << 5))
 
 #endif /* !__ASM_ARM_ARM64_BRK */
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.