Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SM bus ioctls incorrect in FreeBSD 11

7 views
Skip to first unread message

Lewis Donzis

unread,
Oct 13, 2016, 5:58:40 PM10/13/16
to freebs...@freebsd.org
After upgrading to FreeBSD 11.0 and changing source code to use the new version of “struct smbcmd”, some commands are not working as documented, specifically those that read data.

As an example, SMB_READW is documented as returning the word read from the device in rdata.word. However, this doesn’t happen, I think because the ioctl request value is defined using _IOW(), so the kernel doesn’t copy the data it read back out.

In prior versions, the structure had only a pointer to the data, and the smb.c code used copyout() to transfer the data back to userland.

As a temporary work-around, we added code to set rbuf to point to rdata.word and rcount to two.

Thanks,
lew

_______________________________________________
freebs...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs...@freebsd.org"
0 new messages