|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: Don't emulate the MMIO access if the instruction syndrome is invalid
commit d2a167258b0b10567eb7abe3f34cf14660ed424e
Author: Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Thu Jul 25 16:21:30 2013 +0100
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Jul 29 16:54:48 2013 +0100
xen/arm: Don't emulate the MMIO access if the instruction syndrome is
invalid
When the instruction syndrome is not valid, the transfer register is
unknown.
If this register is used in the emulation code (it's the case for the VGIC),
Xen can retrieve wrong data.
For safety, consider invalid instruction syndrome as wrong memory access.
Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
xen/arch/arm/traps.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index f2ffcb7..2969039 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -1010,6 +1010,10 @@ static void do_trap_data_abort_guest(struct
cpu_user_regs *regs,
if ( rc == -EFAULT )
goto bad_data_abort;
+ /* XXX: Decode the instruction if ISS is not valid */
+ if ( !dabt.valid )
+ goto bad_data_abort;
+
if (handle_mmio(&info))
{
regs->pc += dabt.len ? 4 : 2;
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |