-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ioctl_readwrite_ptr missing #2098
Comments
Ok took some time. But think I under stand it now. The read and readwrite functions always use a pointer, as else there is no other way to get a value back from the kernal driver. For the write this is different, as you can write a value like char/int/long as a direct parameters, or as a pointer to the value. So the distinction between the two is needed there. |
So is your problem solved, or is there still something else that you need? |
@asomers My problem is fixed. Was planning on reading the documentation again to see if it could use an update to explain the situation with the Wat thrown me of is that the |
Fairly new with LKM's but I have a IOCtl function that is defined as
_IORW(MAGIC, 1, struct mystruct *)
and the LKM uses the pointer to read and to write to a field in the struct. According to [1] that means the function should be declared are RW.Looking at the issues, this is mentioned a couple of times and people give an implementation but it was never added. Is there any reason its not implemented? Considering the description in [1] I would expect all three variants:
ioctl_write_ptr
ioctl_read_ptr
ioctl_readwrite_ptr
but currently only
ioctl_write_ptr
is implemented.Merge requests that add's it: #965
Question with someone offering a implementation: #1386 (comment)
[1] https://www.kernel.org/doc/Documentation/core-api/ioctl.rst
The text was updated successfully, but these errors were encountered: