HomeFreeBSD

md driver compat32: fix structure padding for arm, powerpc

Description

md driver compat32: fix structure padding for arm, powerpc

Because the 32-bit md_ioctl structure contains 64-bit members, arm
and powerpc add padding to a multiple of 8. i386 doesn't do this.
The md_ioctl32 definition was correct for amd64/i386 without padding,
but wrong for arm64 and powerpc64. Make packed conditional on
amd64, and test for the expected size on non-amd64. Note that
mdconfig is used in the ATF test suite. Note, I verified the
structure size for powerpc, but was unable to test.

MFC after: 1 week
Reviewed by: jrtc27
Differential Revision: https://reviews.freebsd.org/D41339
Discussed with: jhibbits

Details

Provenance
karelsAuthored on Aug 8 2023, 2:09 PM
Reviewer
jrtc27
Differential Revision
D41339: md driver compat32: fix structure padding for arm, powerpc
Parents
rGddefad7c4f48: arm64: rockchip: Tweak i2c, pmic and iodomain order
Branches
Unknown
Tags
Unknown