]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita49478e4a0c17954fee94c63cec38854bea492d7
treed8d1c9a4e9ae3b81de11343139c56b29c7d2e043
parente84c69f0eb369ccfc72c89f2dd7c7157129d52d9
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: 7da03afbbb99 ("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