diff options
author | Julien Thierry <julien.thierry@arm.com> | 2017-10-25 10:04:33 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-10-25 11:57:33 +0100 |
commit | 6436beeee5721a8e906e9eabf866f12d04470437 (patch) | |
tree | 022956462f870882d483fe09492a0c2f679d61eb /arch/arm64/include/asm/traps.h | |
parent | e28cc0255997e9b770039d87276c1b9fd8bc231d (diff) |
arm64: Fix single stepping in kernel traps
Software Step exception is missing after stepping a trapped instruction.
Ensure SPSR.SS gets set to 0 after emulating/skipping a trapped instruction
before doing ERET.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[will: replaced AARCH32_INSN_SIZE with 4]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/traps.h')
-rw-r--r-- | arch/arm64/include/asm/traps.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/traps.h b/arch/arm64/include/asm/traps.h index d131501c6222..45e3da34bdc4 100644 --- a/arch/arm64/include/asm/traps.h +++ b/arch/arm64/include/asm/traps.h @@ -37,6 +37,12 @@ void unregister_undef_hook(struct undef_hook *hook); void arm64_notify_segfault(struct pt_regs *regs, unsigned long addr); +/* + * Move regs->pc to next instruction and do necessary setup before it + * is executed. + */ +void arm64_skip_faulting_instruction(struct pt_regs *regs, unsigned long size); + static inline int __in_irqentry_text(unsigned long ptr) { return ptr >= (unsigned long)&__irqentry_text_start && |