[tip: x86/cleanups] x86 kvm page table walks: switch to explicit __get_user()
From: tip-bot2 for Al Viro
Date: Sat Mar 28 2020 - 07:00:32 EST
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: a4814443993c7c8686036bb8ca0df6abc499d63f
Gitweb: https://git.kernel.org/tip/a4814443993c7c8686036bb8ca0df6abc499d63f
Author: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
AuthorDate: Sat, 15 Feb 2020 11:29:04 -05:00
Committer: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
CommitterDate: Sat, 15 Feb 2020 17:26:26 -05:00
x86 kvm page table walks: switch to explicit __get_user()
Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---
arch/x86/kvm/mmu/paging_tmpl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mmu/paging_tmpl.h b/arch/x86/kvm/mmu/paging_tmpl.h
index 4e1ef04..5bea4cf 100644
--- a/arch/x86/kvm/mmu/paging_tmpl.h
+++ b/arch/x86/kvm/mmu/paging_tmpl.h
@@ -400,7 +400,7 @@ retry_walk:
goto error;
ptep_user = (pt_element_t __user *)((void *)host_addr + offset);
- if (unlikely(__copy_from_user(&pte, ptep_user, sizeof(pte))))
+ if (unlikely(__get_user(pte, ptep_user)))
goto error;
walker->ptep_user[walker->level - 1] = ptep_user;