From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Avi Kivity <avi@qumranet.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-next: build failure after merge of the final tree (kvm tree related)
Date: Wed, 25 May 2011 10:02:23 +0200 [thread overview]
Message-ID: <20110525080223.GC2498@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20110525132809.6d85b3c2.sfr@canb.auug.org.au>
On Wed, May 25, 2011 at 01:28:09PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (powerpc
> ppc44x_defconfig) failed like this:
>
> cc1: warnings being treated as errors
> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function '__kvm_set_memory_region':
> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:654: error: cast to pointer from integer of different size
> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:654: error: cast to pointer from integer of different size
>
> Caused by commit 95de6ce677d6 ("KVM: add missing void __user * cast to
> access_ok() call").
>
> I have reverted that commit for today.
My fault.. sigh.
Avi could you apply the patch below as well (or merge with the previous one)?
Thanks!
Subject: [PATCH] KVM: fix userspace_addr cast in access_ok() call
From: Heiko Carstens <heiko.carstens@de.ibm.com>
mem->userspace_addr is u64. Casting that to a pointer will cause build
breakage (or warnings) on 32 bit architectures. So add an explicit
unsigned long cast as well...
Fixes this:
cc1: warnings being treated as errors
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function '__kvm_set_memory_region':
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:654: error: cast to pointer from integer of different size
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
virt/kvm/kvm_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -651,7 +651,8 @@ int __kvm_set_memory_region(struct kvm *
/* We can read the guest memory with __xxx_user() later on. */
if (user_alloc &&
((mem->userspace_addr & (PAGE_SIZE - 1)) ||
- !access_ok(VERIFY_WRITE, (void __user *)mem->userspace_addr,
+ !access_ok(VERIFY_WRITE,
+ (void __user *)(unsigned long)mem->userspace_addr,
mem->memory_size)))
goto out;
if (mem->slot >= KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS)
next prev parent reply other threads:[~2011-05-25 8:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 3:28 linux-next: build failure after merge of the final tree (kvm tree related) Stephen Rothwell
2011-05-25 8:02 ` Heiko Carstens [this message]
2011-05-26 6:42 ` Avi Kivity
-- strict thread matches above, loose matches on Subject: below --
2011-02-21 6:56 Stephen Rothwell
2011-02-21 8:10 ` Huang Ying
2011-02-28 2:15 ` Stephen Rothwell
2011-02-28 2:28 ` Huang Ying
2011-02-28 9:36 ` Avi Kivity
2010-09-03 1:32 Stephen Rothwell
2010-07-26 4:27 Stephen Rothwell
2010-08-02 0:33 ` Stephen Rothwell
2010-08-02 3:40 ` Avi Kivity
2010-08-02 4:25 ` Stephen Rothwell
2010-04-07 6:40 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110525080223.GC2498@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=avi@qumranet.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).