qemu-kvm: fix __user export
PATCH 1/1 qemu-kvm: fix __user export
__user macro does not appear in exported headers
and should not be in headers qemu-kvm includes.
--- kvm/include/linux/kvm.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kvm/include/linux/kvm.h +1 -1
@@ -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; }; };
Signature · 1 line
1.6.5.2.143.g8cc62
Avi Kivity
AppliedQuoted 4 lines · Michael S. Tsirkin
__usermacro does not appear in exported headers
and should not be in headers qemu-kvm includes.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function
Am Montag 30 November 2009 13:02:08 schrieb Michael S. Tsirkin:
Quoted 14 lines
__usermacro does not appear in exported headers
and should not be in headers qemu-kvm includes.Signed-off-by Michael S. Tsirkin <[email protected]>--- kvm/include/linux/kvm.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)kvm/include/linux/kvm.h +0
-0
kvm/include/linux/kvm.h struct kvm_dirty_log { · line 315
Quoted 8 lines
kvm/include/linux/kvm.h +1
-1@@ -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.
Christian
Quoted 23 lines · Christian Borntraeger
Am Montag 30 November 2009 13:02:08 schrieb Michael S. Tsirkin:
Quoted 21 lines
__usermacro does not appear in exported headers
and should not be in headers qemu-kvm includes.Signed-off-by Michael S. Tsirkin<[email protected]>--- kvm/include/linux/kvm.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)kvm/include/linux/kvm.h +1
-1@@ -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; }; };
Quoted 10 lines
Quoted 2 lines
Huh?
Doesnt that create a sparse warning? You already mention that the exported header does not contain__userand that is perfectly ok:
- for the kerneldirty_bitmapis in the user address space, so we need the__user
- userspace does not know and need the__userso it is removed duringheaders_install.
This is in the copy of the headers that qemu-kvm.git carries, not the kernel master.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 2 lines
This is in the copy of the headers that qemu-kvm.git carries, not the kernel master.
Right, I missed that. Thanks