Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1693879
| From | Marc Zyngier <marc.zyngier@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 11/16] ARM: Advance the IT state on successful emulation of an UNDEF |
| Date | 2017-07-21 19:20 +0200 |
| Message-ID | <u5JKO-7DO-19@gated-at.bofh.it> (permalink) |
| References | <u5JKN-7DO-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@arm.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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 11/16] ARM: Advance the IT state on successful emulation of an UNDEF Marc Zyngier <marc.zyngier@arm.com> - 2017-07-21 19:20 +0200
csiph-web