Preferred userspace IPC mechanism for new drivers?

Larrew, Jesse Jesse.Larrew at amd.com
Wed May 6 17:07:46 EDT 2015


Hello,
 
I’m writing a driver that needs to communicate with userspace applications. Userspace needs to be able to send commands and associated data to the driver, so the ioctl interface seems pretty straightforward. However, LDD3 states that new ioctls in the kernel are a no-no. If that’s the case, then what is the preferred interface to userspace for new drivers?
 
ProcFS seems to be discouraged. Sysfs seems to be more for exporting device model information rather than passing binary blobs back and forth. DebugFS seems to be intended only for debug. Generic Netlink seems like the most viable candidate that I’ve investigated so far. Is that what most people are using these days?
 
Any advice would be greatly appreciated. Thanks!

Sincerely,

Jesse Larrew
Senior Software Engineer
AMD Security Architecture R&D
jesse.larrew at amd.com
O: +(1) 512-602-0092 (x50092)
M: +(1) 512-791-4852


More information about the Kernelnewbies mailing list