summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2014-03-26 16:43:23 -0700
committerGreg Hackmann <ghackmann@google.com>2014-03-27 10:20:42 -0700
commit0c423165c11dc5efe70a7f436080a7c549fc9878 (patch)
treebfdf70082352b3228df1ef3cc59d16987c2c26bc /include/uapi
parente42126fcf1525129f25c895d26ddd868e5d4dff9 (diff)
video: adf: ensure consistent alignment on userspace facing structs
64-bit types in structs create alignment problems when a 32-bit x86 userspace talks to an x86_64 kernel. In most cases the 64-bit types can be replaced with 32-bit ones, since they're being used for fds and should have been __s32 in the first place. For adf_vsync_event, alignment can be enforced by making the timestamp an __aligned_u64. Change-Id: I87cf73d8f57730bd7bb43ffce6b7b411eb0ff198 Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/video/adf.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/uapi/video/adf.h b/include/uapi/video/adf.h
index b703bf9e9a66..c5d2e62cdb9b 100644
--- a/include/uapi/video/adf.h
+++ b/include/uapi/video/adf.h
@@ -83,7 +83,7 @@ struct adf_event {
*/
struct adf_vsync_event {
struct adf_event base;
- __u64 timestamp;
+ __aligned_u64 timestamp;
};
/**
@@ -119,12 +119,12 @@ struct adf_buffer_config {
__u32 h;
__u32 format;
- __s64 fd[ADF_MAX_PLANES];
+ __s32 fd[ADF_MAX_PLANES];
__u32 offset[ADF_MAX_PLANES];
__u32 pitch[ADF_MAX_PLANES];
__u8 n_planes;
- __s64 acquire_fence;
+ __s32 acquire_fence;
};
#define ADF_MAX_BUFFERS (4096 / sizeof(struct adf_buffer_config))
@@ -150,7 +150,7 @@ struct adf_post_config {
size_t custom_data_size;
void __user *custom_data;
- __s64 complete_fence;
+ __s32 complete_fence;
};
#define ADF_MAX_INTERFACES (4096 / sizeof(__u32))
@@ -180,7 +180,7 @@ struct adf_simple_buffer_alloc {
__u16 h;
__u32 format;
- __s64 fd;
+ __s32 fd;
__u32 offset;
__u32 pitch;
};
@@ -195,7 +195,7 @@ struct adf_simple_buffer_alloc {
*/
struct adf_simple_post_config {
struct adf_buffer_config buf;
- __s64 complete_fence;
+ __s32 complete_fence;
};
/**