[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170721171542.27639-12-marc.zyngier@arm.com>
Date: Fri, 21 Jul 2017 18:15:37 +0100
From: Marc Zyngier <marc.zyngier@....com>
To: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: Mark Rutland <mark.rutland@....com>,
Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH 11/16] ARM: Advance the IT state on successful emulation of an UNDEF
When trapping a conditional Thumb instruction, we need to
advance the IT state accordingly, or we'll end-up corrupting
the execution of a subsequent instruction.
Let's add calls to arm_advance_itstate() in the relevant
spots.
Signed-off-by: Marc Zyngier <marc.zyngier@....com>
---
arch/arm/kernel/traps.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index ca51e80a60b6..b697e9234a07 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -472,11 +472,14 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
else
regs->ARM_pc +=4;
+ arm_advance_itstate(regs);
return;
}
- if (call_undef_hook(regs, instr) == 0)
+ if (call_undef_hook(regs, instr) == 0) {
+ arm_advance_itstate(regs);
return;
+ }
die_sig:
#ifdef CONFIG_DEBUG_USER
--
2.11.0
Powered by blists - more mailing lists