summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2018-04-30 16:59:27 -0700
committerEric Anholt <eric@anholt.net>2018-05-03 15:20:09 -0700
commit4c70ac7639f6af6d7c2d01f0307665a4b9afada7 (patch)
tree01ddc441926bc795463f9104eec134e2a233f643 /include/uapi
parent0a4587a034a43e5076770df10446214cfb3de8f8 (diff)
drm/vc4: Add a pad field to align drm_vc4_submit_cl to 64 bits.
I had originally asked Stefan Schake to drop the pad field from the syncobj changes that just landed, because I couldn't come up with a reason to align to 64 bits. Talking with Dave Airlie about the new v3d driver's submit ioctl, we came up with a reason: sizeof() on 64-bit platforms may align to 64 bits, in which case the userspace will be submitting the aligned size and the final 32 bits won't be zero-padded by the kernel. If userspace doesn't zero-fill, then a future ABI change adding a 32-bit field at the end could potentially cause the kernel to read undefined data from old userspace (our userspace happens to use structure initialization that zero-fills, but as a general rule we try not to rely on that in the kernel). Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20180430235927.28712-1-eric@anholt.net Reviewed-by: Stefan Schake <stschake@gmail.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/vc4_drm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h
index 2be4fe3610b8..2cac6277a1d7 100644
--- a/include/uapi/drm/vc4_drm.h
+++ b/include/uapi/drm/vc4_drm.h
@@ -193,6 +193,8 @@ struct drm_vc4_submit_cl {
* render job. 0 means ignore.
*/
__u32 out_sync;
+
+ __u32 pad2;
};
/**