Using indirect pointers in an ioctl command argument means that the layout is architecture specific, in particular we can't use the same one from 32-bit compat tasks. The general recommendation is to have __u64 members and use u64_to_user_ptr() to access it from the kernel if we are unable to avoid the pointers altogether.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -102,7 +102,7 @@ struct privcmd_mmap_resource { · 101 unmodified lines | |||
| 102 | #define PRIVCMD_IRQFD_FLAG_DEASSIGN (1 << 0) | 102 | #define PRIVCMD_IRQFD_FLAG_DEASSIGN (1 << 0) |
| 103 | 103 | ||
| 104 | struct privcmd_irqfd { | 104 | struct privcmd_irqfd { |
| 105 | void __user *dm_op; | 105 | __u64 dm_op; |
| 106 | __u32 size; /* Size of structure pointed by dm_op */ | 106 | __u32 size; /* Size of structure pointed by dm_op */ |
| 107 | __u32 fd; | 107 | __u32 fd; |
| 108 | __u32 flags; | 108 | __u32 flags; |