Paul Bolle
2013-Apr-01 17:59 UTC
[PATCH 3/8] virtio: do not export "u16" and "u64" to userspace
virtio_balloon.h exports "u16" and "u64" to userspace. Use
"__u16" and
"__u64" instead.
Signed-off-by: Paul Bolle <pebolle at tiscali.nl>
---
0) Tested with a kernel build.
1) Both types are used in this header for quite some time now. So is my
patch flawed or doesn't userspace actually use virtio_balloon.h?
include/uapi/linux/virtio_balloon.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/virtio_balloon.h
b/include/uapi/linux/virtio_balloon.h
index 652dc8b..5e26f61 100644
--- a/include/uapi/linux/virtio_balloon.h
+++ b/include/uapi/linux/virtio_balloon.h
@@ -52,8 +52,8 @@ struct virtio_balloon_config
#define VIRTIO_BALLOON_S_NR 6
struct virtio_balloon_stat {
- u16 tag;
- u64 val;
+ __u16 tag;
+ __u64 val;
} __attribute__((packed));
#endif /* _LINUX_VIRTIO_BALLOON_H */
--
1.7.11.7
Rusty Russell
2013-Apr-01 23:29 UTC
[PATCH 3/8] virtio: do not export "u16" and "u64" to userspace
Paul Bolle <pebolle at tiscali.nl> writes:> virtio_balloon.h exports "u16" and "u64" to userspace. Use "__u16" and > "__u64" instead. > > Signed-off-by: Paul Bolle <pebolle at tiscali.nl> > --- > 0) Tested with a kernel build. > > 1) Both types are used in this header for quite some time now. So is my > patch flawed or doesn't userspace actually use virtio_balloon.h?qemu rolls its own copy, but this is still a valid fix. Thanks, Rusty.