arm64: KVM: Fix user access for debug registers
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 16 Sep 2015 09:54:37 +0000 (10:54 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 16 Sep 2015 13:50:04 +0000 (14:50 +0100)
commit1713e5aa05fff3951e747548b373bd2c81be4e7a
treed8d1c9a4e9ae3b81de11343139c56b29c7d2e043
parent43297dda0a51e4ffed0888ce727c218cfb7474b6
arm64: KVM: Fix user access for debug registers

When setting the debug register from userspace, make sure that
copy_from_user() is called with its parameters in the expected
order. It otherwise doesn't do what you think.

Fixes: 84e690bfbed1 ("KVM: arm64: introduce vcpu->arch.debug_ptr")
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Cc: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/kvm/sys_regs.c