linux/arch/arm/kvm/hyp
Zhichao Huang 661e6b02b5 KVM: arm: plug potential guest hardware debug leakage
Hardware debugging in guests is not intercepted currently, it means
that a malicious guest can bring down the entire machine by writing
to the debug registers.

This patch enable trapping of all debug registers, preventing the
guests to access the debug registers. This includes access to the
debug mode(DBGDSCR) in the guest world all the time which could
otherwise mess with the host state. Reads return 0 and writes are
ignored (RAZ_WI).

The result is the guest cannot detect any working hardware based debug
support. As debug exceptions are still routed to the guest normal
debug using software based breakpoints still works.

To support debugging using hardware registers we need to implement a
debug register aware world switch as well as special trapping for
registers that may affect the host state.

Cc: stable@vger.kernel.org
Signed-off-by: Zhichao Huang <zhichao.huang@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
2017-05-15 14:29:19 +02:00
..
banked-sr.c ARM: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h 2016-02-29 18:34:18 +00:00
cp15-sr.c ARM: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h 2016-02-29 18:34:18 +00:00
entry.S arm: KVM: Handle async aborts delivered while at HYP 2016-09-08 12:53:00 +02:00
hyp-entry.S ARM: KVM: Fix idmap stub entry when running Thumb-2 code 2017-04-20 20:17:57 +02:00
Makefile arm: KVM: Do not use stack-protector to compile HYP code 2017-05-15 11:31:38 +02:00
s2-setup.c ARM: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h 2016-02-29 18:34:18 +00:00
switch.c KVM: arm: plug potential guest hardware debug leakage 2017-05-15 14:29:19 +02:00
tlb.c arm/arm64: KVM: Perform local TLB invalidation when multiplexing vcpus on a single CPU 2016-11-04 17:56:28 +00:00
vfp.S ARM: KVM: Add VFP save/restore 2016-02-29 18:34:13 +00:00