linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix single step for traps
@ 2017-10-11 13:48 Julien Thierry
  2017-10-11 13:48 ` [PATCH v2 1/2] arm64: Use existing defines for mdscr Julien Thierry
  2017-10-11 13:48 ` [PATCH v2 2/2] arm64: Fix single stepping in kernel traps Julien Thierry
  0 siblings, 2 replies; 6+ messages in thread
From: Julien Thierry @ 2017-10-11 13:48 UTC (permalink / raw)
  To: linux-arm-kernel

When single stepping a trapped/emulated instruction, the instruction not
being actually executed, the PE ends up single stepping the instruction we
return to after ERET-ing from the trap.

First patch is just to avoid raw values when using single stepping
registers/bits.
Patches 2 fixes the issue for the kernel.

Changes since v1:
* Rename arm64_skip_trapped_instr to arm64_setup_next_instr
* Add defines for AARCH32 and Thumb instruction sizes
* Drop previous KVM patch, Alex Benn?e has a better approach

Cheers,

Julien Thierry

Julien Thierry (2):
  arm64: Use existing defines for mdscr
  arm64: Fix single stepping in kernel traps

 arch/arm64/include/asm/assembler.h   |  5 +++--
 arch/arm64/include/asm/insn.h        |  5 +++++
 arch/arm64/include/asm/traps.h       |  6 ++++++
 arch/arm64/kernel/armv8_deprecated.c |  8 ++++----
 arch/arm64/kernel/cpufeature.c       |  2 +-
 arch/arm64/kernel/traps.c            | 21 ++++++++++++++++-----
 6 files changed, 35 insertions(+), 12 deletions(-)

--
1.9.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-11 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-11 13:48 [PATCH v2 0/2] Fix single step for traps Julien Thierry
2017-10-11 13:48 ` [PATCH v2 1/2] arm64: Use existing defines for mdscr Julien Thierry
2017-10-11 16:52   ` Mark Rutland
2017-10-11 13:48 ` [PATCH v2 2/2] arm64: Fix single stepping in kernel traps Julien Thierry
2017-10-11 14:37   ` Will Deacon
2017-10-11 15:06     ` Julien Thierry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).