Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Oct 2016 16:39:06 -0500
From:      Lewis Donzis <lew@perftech.com>
To:        freebsd-bugs@freebsd.org
Subject:   SM bus ioctls incorrect in FreeBSD 11
Message-ID:  <06929AC5-D350-4236-A813-56C862B58174@perftech.com>

next in thread | raw e-mail | index | archive | help
After upgrading to FreeBSD 11.0 and changing source code to use the new =
version of =E2=80=9Cstruct smbcmd=E2=80=9D, 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=E2=80=99t happen, I think =
because the ioctl request value is defined using _IOW(), so the kernel =
doesn=E2=80=99t 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?06929AC5-D350-4236-A813-56C862B58174>