All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix PC corruption when injecting a fault
@ 2015-12-22  9:55 ` Marc Zyngier
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Zyngier @ 2015-12-22  9:55 UTC (permalink / raw)
  To: Christoffer Dall; +Cc: Shannon Zhao, kvm, kvmarm, linux-arm-kernel

When injecting a fault as the result of a system register trap, we
change the PC to point to the fault handler. This clashes with the
code that increments the PC to skip over the emulated system register
access, leading to a situation where we skip the first instruction of
the fault handler.

The good news is that so far, we never do this, so I believe the
current code is safe. But the PMU code is soon going to exercise that
path, and I'd rather plug it sooner that later.

Thanks,

	M.

Marc Zyngier (2):
  arm: KVM: Do not update PC if the trap handler has updated it
  arm64: KVM: Do not update PC if the trap handler has updated it

 arch/arm/kvm/coproc.c     | 14 +++++++--
 arch/arm64/kvm/sys_regs.c | 73 +++++++++++++++++++++++------------------------
 2 files changed, 48 insertions(+), 39 deletions(-)

-- 
2.1.4


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

end of thread, other threads:[~2016-01-07  9:05 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22  9:55 [PATCH 0/2] Fix PC corruption when injecting a fault Marc Zyngier
2015-12-22  9:55 ` Marc Zyngier
2015-12-22  9:55 ` [PATCH 1/2] arm: KVM: Do not update PC if the trap handler has updated it Marc Zyngier
2015-12-22  9:55   ` Marc Zyngier
2015-12-22 10:35   ` Shannon Zhao
2015-12-22 10:35     ` Shannon Zhao
2015-12-22 11:08   ` Peter Maydell
2015-12-22 11:08     ` Peter Maydell
2015-12-22 14:39     ` Christoffer Dall
2015-12-22 14:39       ` Christoffer Dall
2015-12-22 14:50       ` Peter Maydell
2015-12-22 14:50         ` Peter Maydell
2016-01-07  8:50         ` Marc Zyngier
2016-01-07  8:50           ` Marc Zyngier
2016-01-07  8:59           ` Shannon Zhao
2016-01-07  8:59             ` Shannon Zhao
2016-01-07  9:05             ` Marc Zyngier
2016-01-07  9:05               ` Marc Zyngier
2015-12-22  9:55 ` [PATCH 2/2] arm64: " Marc Zyngier
2015-12-22  9:55   ` Marc Zyngier
2015-12-22 10:15   ` Shannon Zhao
2015-12-22 10:15     ` Shannon Zhao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.