Talk:IOCTL: Difference between revisions

From PS4 Developer wiki
Jump to navigation Jump to search
(Created page with "= The process of ioctl in devices = <pre> find string of device in kernel find xrefs to func (should be two only) make_dev and mutex_init (we want make_dev) structure before...")
 
No edit summary
 
Line 1: Line 1:
= The process of ioctl in devices =
= Finding the IOCTL handler address for a device in kernel =


<pre>
<pre>
find string of device in kernel
Find a string of the device in kernel.
find xrefs to func (should be two only)
There should be only two cross-references from function: make_dev and mutex_init. make_dev is the interesting one.
make_dev and mutex_init (we want make_dev)
The structure before the device string is where we want to go.
structure before string is where we want to go
Follow the structure then go to the very last offset of the structure.
follow structure then go to the very last offset of structure
It is the handler function in charge of IOCTLs for that device.
it is func in charge of ioctls
</pre>
</pre>

Latest revision as of 20:14, 27 October 2024

Finding the IOCTL handler address for a device in kernel[edit source]

Find a string of the device in kernel.
There should be only two cross-references from function: make_dev and mutex_init. make_dev is the interesting one.
The structure before the device string is where we want to go.
Follow the structure then go to the very last offset of the structure.
It is the handler function in charge of IOCTLs for that device.