An attempt to fix fcopy on i586 (bc5a5b0 Drivers: hv: util: Properly pack the data for file copy functionality) led to a regression on x86_64 (and actually didn't fix i586 breakage). Fcopy messages from Hyper-V host come in the following format: struct do_fcopy_hdr | 36 bytes 0000 | 4 bytes offset | 8 bytes size | 4 bytes data | 6144 bytes On x86_64 struct hv_do_fcopy matched this format without ' __attribute__((packed))' and on i586 adding ' __attribute__((packed))' to it doesn't change anything. Keep the structure packed and add padding to match re reality. Tested both i586 and x86_64 on Hyper-V Server 2012 R2.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -134,6 +134,7 @@ struct hv_start_fcopy { · 133 unmodified lines | ||
| 134 | 134 | |
| 135 | 135 | struct hv_do_fcopy { |
| 136 | 136 | struct hv_fcopy_hdr hdr; |
| 137 | + __u32 pad; | |
| 137 | 138 | __u64 offset; |
| 138 | 139 | __u32 size; |
| 139 | 140 | __u8 data[DATA_FRAGMENT]; |