aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorDaniel Vetter <[email protected]>2020-04-07 15:30:02 +0200
committerSumit Semwal <[email protected]>2020-04-27 16:29:41 +0530
commita5bff92eaac45bdf6221badf9505c26792fdf99e (patch)
treea12728f7c2d44acebd9711ee52ea8c89c3e72cf0 /include/uapi/linux
parent6292b8efe32e6be408af364132f09572aed14382 (diff)
dma-buf: Fix SET_NAME ioctl uapi
The uapi is the same on 32 and 64 bit, but the number isn't. Everyone who botched this please re-read: https://www.kernel.org/doc/html/v5.4-preprc-cpu/ioctl/botching-up-ioctls.html Also, the type argument for the ioctl macros is for the type the void __user *arg pointer points at, which in this case would be the variable-sized char[] of a 0 terminated string. So this was botched in more than just the usual ways. Cc: Sumit Semwal <[email protected]> Cc: Chenbo Feng <[email protected]> Cc: Greg Hackmann <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Martin Liu <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Tested-by: Martin Liu <[email protected]> Reviewed-by: Martin Liu <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> [sumits: updated some checkpatch fixes, corrected author email] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/dma-buf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/dma-buf.h b/include/uapi/linux/dma-buf.h
index dbc7092e04b5..7f30393b92c3 100644
--- a/include/uapi/linux/dma-buf.h
+++ b/include/uapi/linux/dma-buf.h
@@ -39,6 +39,12 @@ struct dma_buf_sync {
#define DMA_BUF_BASE 'b'
#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
+
+/* 32/64bitness of this uapi was botched in android, there's no difference
+ * between them in actual uapi, they're just different numbers.
+ */
#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
+#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32)
+#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64)
#endif