linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Move __hyp_text code under no-asan Makefiles
@ 2019-05-22 17:47 James Morse
  2019-05-22 17:47 ` [PATCH v2 1/2] KVM: arm64: Move pmu hyp code under hyp's Makefile to avoid instrumentation James Morse
  2019-05-22 17:47 ` [PATCH v2 2/2] KVM: arm/arm64: Move cc/it checks " James Morse
  0 siblings, 2 replies; 3+ messages in thread
From: James Morse @ 2019-05-22 17:47 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm
  Cc: Suzuki K Pouloze, Marc Zyngier, Julien Thierry, Christoffer Dall,
	James Morse, Andrew Murray

The fancy new pmu code added its __hyp_text code in part of the tree that
doesn't get covered by the no-asan/no-kcov kconfig decorations.
This shows up as a hyp-panic on v8.0 hardware when the host kernel is
built with debug options like kasan.

This same bug has been living happily in the aarch32 emulation code
since v4.9. (commit 8cebe750c4d9a "arm64: KVM: Make kvm_skip_instr32
available to HYP"). Patch 2 has the two relevant fixes tag, but won't
apply cleanly before v4.19 due to the churn.

Fix them both by shuffling the code around.

--
Changes since v1:
 * Made the two functions static in patch 1, removed the header entries.


Thanks,

James Morse (2):
  KVM: arm64: Move pmu hyp code under hyp's Makefile to avoid
    instrumentation
  KVM: arm/arm64: Move cc/it checks under hyp's Makefile to avoid
    instrumentation

 arch/arm/kvm/hyp/Makefile         |   1 +
 arch/arm64/include/asm/kvm_host.h |   3 -
 arch/arm64/kvm/hyp/Makefile       |   1 +
 arch/arm64/kvm/hyp/switch.c       |  39 +++++++++
 arch/arm64/kvm/pmu.c              |  38 ---------
 virt/kvm/arm/aarch32.c            | 121 --------------------------
 virt/kvm/arm/hyp/aarch32.c        | 136 ++++++++++++++++++++++++++++++
 7 files changed, 177 insertions(+), 162 deletions(-)
 create mode 100644 virt/kvm/arm/hyp/aarch32.c

-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-05-22 17:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 17:47 [PATCH v2 0/2] Move __hyp_text code under no-asan Makefiles James Morse
2019-05-22 17:47 ` [PATCH v2 1/2] KVM: arm64: Move pmu hyp code under hyp's Makefile to avoid instrumentation James Morse
2019-05-22 17:47 ` [PATCH v2 2/2] KVM: arm/arm64: Move cc/it checks " James Morse

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).