[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180115133205.93859-3-brijesh.singh@amd.com>
Date: Mon, 15 Jan 2018 07:32:03 -0600
From: Brijesh Singh <brijesh.singh@....com>
To: kvm@...r.kernel.org
Cc: Brijesh Singh <brijesh.singh@....com>,
Paolo Bonzini <pbonzini@...hat.com>,
Radim Krčmář <rkrcmar@...hat.com>,
Borislav Petkov <bp@...e.de>,
Tom Lendacky <thomas.lendacky@....com>,
linux-kernel@...r.kernel.org, Joerg Roedel <joro@...tes.org>
Subject: [PATCH 2/4] KVM: SVM: Fix sparse: incorrect type in argument 1 (different base types)
Fix sparse: incorrect type in argument 1 (different base types). Typecast
the userspace address argument.
Cc: Paolo Bonzini <pbonzini@...hat.com>
Cc: "Radim Krčmář" <rkrcmar@...hat.com>
Cc: Borislav Petkov <bp@...e.de>
Cc: Tom Lendacky <thomas.lendacky@....com>
Cc: linux-kernel@...r.kernel.org
Cc: Joerg Roedel <joro@...tes.org>
Signed-off-by: Brijesh Singh <brijesh.singh@....com>
---
arch/x86/kvm/svm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 99476c706c16..8ce5bb7b04d1 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -6135,7 +6135,9 @@ static int sev_launch_measure(struct kvm *kvm, struct kvm_sev_cmd *argp)
goto e_free;
}
- if (!access_ok(VERIFY_WRITE, params.uaddr, params.len)) {
+ if (!access_ok(VERIFY_WRITE,
+ (void __user *)(uintptr_t)params.uaddr,
+ params.len)) {
ret = -EFAULT;
goto e_free;
}
--
2.9.5
Powered by blists - more mailing lists