Answer the question
In order to leave comments, you need to log in
Why doesn't the ioctl system call pass?
If you register an ioctl handler in the unlocked_ioctl field of the file_operations structure, then the ioctl handler is called if the user process connected to the driver via nodes 0,1, ...
If the user process connects via the 0xff configuration node, then the ioctl handler is not called by the kernel. -1 is returned to the user. But the operations open, close, mmap and others are executed correctly.
Registering an ioctl in the compat_ioctl field makes it impossible to work through any nodes. The handler is not called, and -1 is returned to the user.
How to make it possible for the handler to work through all nodes?
Answer the question
In order to leave comments, you need to log in
You would show the code of all structures from the device to file operations and the code for registering the device in the kernel.
And at the same time the code of your application sending ioctl.
I throw a link to the source code of the driver. The required handler is located in the dispatc.c file
https://yadi.sk/d/17TR71PKdupem
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question