Talk:IOCTL: Difference between revisions
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...") |
CelesteBlue (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
= | = Finding the IOCTL handler address for a device in kernel = | ||
<pre> | <pre> | ||
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. | |||
make_dev and mutex_init | 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. | ||
It is the handler function in charge of IOCTLs for that device. | |||
</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.