I'm developing a charachter device driver for Linux.
I want to implement file-descriptor-targeted read()
operation which will be a bit specific every time you open a device.
It is possible to identify the process where read()
called from (using kernel current
macro), but there can be several file descriptor associated with my device in this process.
I know that file descriptors got mapped to struct file
objects just before making system call but can I get it back?