Is it possible to call a user-space callback function from kernel space in Linux (ioctl)?

Posted by Makis on Stack Overflow See other posts from Stack Overflow or by Makis
Published on 2010-04-22T10:29:58Z Indexed on 2010/04/22 10:33 UTC
Read the original article Hit count: 288

Is it possible to expand the ioctl interface in Linux so that the user-space application can send a pointer to a function to the kernel space driver?

I'm in particular thinking of ways to handle the stream in user-controllable way but doing it in the kernel. Those operations could be attached to the kernel module but this would make development a lot easier as I wouldn't need to mess with the kernel during development.

More specifically, this would be the process:

  1. Data is read by the driver to a buffer.
  2. Data is handled by these user-defined functions in place.
  3. Some more handling is done, possibly with some HW blocks.
  4. Data is used by a user-space application.

© Stack Overflow or respective owner

Related posts about linux-kernel

Related posts about linux-device-driver