From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] qemu-kvm: fix __user export Date: Wed, 02 Dec 2009 15:16:47 +0200 Message-ID: <4B1668BF.5@redhat.com> References: <20091130120207.GA26942@redhat.com> <200912021409.28573.borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Michael S. Tsirkin" , kvm@vger.kernel.org To: Christian Borntraeger Return-path: Received: from mx1.redhat.com ([209.132.183.28]:24881 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbZLBNQn (ORCPT ); Wed, 2 Dec 2009 08:16:43 -0500 In-Reply-To: <200912021409.28573.borntraeger@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/02/2009 03:09 PM, Christian Borntraeger wrote: > Am Montag 30 November 2009 13:02:08 schrieb Michael S. Tsirkin: > >> __user macro does not appear in exported headers >> and should not be in headers qemu-kvm includes. >> >> Signed-off-by: Michael S. Tsirkin >> --- >> kvm/include/linux/kvm.h | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h >> index 92045a9..db10887 100644 >> --- a/kvm/include/linux/kvm.h >> +++ b/kvm/include/linux/kvm.h >> @@ -309,7 +309,7 @@ struct kvm_dirty_log { >> __u32 slot; >> __u32 padding1; >> union { >> - void __user *dirty_bitmap; /* one bit per page */ >> + void *dirty_bitmap; /* one bit per page */ >> __u64 padding2; >> }; >> }; >> >> > Huh? > Doesnt that create a sparse warning? You already mention that the exported > header does not contain __user and that is perfectly ok: > - for the kernel dirty_bitmap is in the user address space, so we need the __user > - userspace does not know and need the __user so it is removed during > headers_install. > > This is in the copy of the headers that qemu-kvm.git carries, not the kernel master. -- error compiling committee.c: too many arguments to function