md(4) ioctl ABI broken by r322969

Brooks Davis brooks at one-eyed-alien.net
Wed Mar 14 22:43:54 UTC 2018


Hi,

I just noticed that r322969 consumed part of md_pad in struct md_ioctl.
In moving the start of md_pad this broke the ABI of MDIOCLIST.

At a glance it looks like the struct was sufficiently incompetently
padded to begin with that the change of adding a char * and subtracting
an int did not change the size of the struct and break all the ioctls,
but this definitely warranted a comment in the commit.

At this point I'm not sure what the right thing to do is.  MDIOCLIST
isn't used by anything in the base system and is broken by design so
just deleting it might be acceptable.  A somewhat better approach
would be to delete it from public view and fix it up with a compatibility
shim so it works for old code.  We could put that under COMPAT11.  I
have a patch it the works that would make that easier to do.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20180314/9aa7825c/attachment.sig>


More information about the freebsd-current mailing list