ipc: extra alignment bytes at the end of request rawdata
misson20000 opened this issue · comments
This pattern used all over the library include extraneous padding bytes at the end of the rawdata, since sizeof(struct)
is padded up to match the stride address. In this case, sizeof(*raw)
is u64 magic + u64 cmd_id + u32 flags + u32 padding = 16 bytes
instead of the correct 12 bytes
. Official server code permits extra rawdata, but I don't think official client code includes this padding.
Lines 796 to 802 in ac853db
Known old issue.
Yeah, I got sloppy when we realized it didn't matter :p
This issue is fixed with the new IPC redesign; and according to CMIF marshalling rules, arguments are ordered from lowest to highest required alignment, which ensures that no extra padding will need to be inserted at the end of the raw data payload.