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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -39,6 +39,12 @@ struct dma_buf_sync { · 38 unmodified lines | ||
| 39 | 39 | |
| 40 | 40 | #define DMA_BUF_BASE 'b' |
| 41 | 41 | #define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync) |
| 42 | + | |
| 43 | +/* 32/64bitness of this uapi was botched in android, there's no difference | |
| 44 | + * between them in actual uapi, they're just different numbers. | |
| 45 | + */ | |
| 42 | 46 | #define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *) |
| 47 | +#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32) | |
| 48 | +#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64) | |
| 43 | 49 | |
| 44 | 50 | #endif |