As we mentioned in the introduction, in this chapter, we wish to learn how to efficiently transfer information between a kernel-space component (often, this is a device driver, but it could be anything, really), and a user space process or thread. To begin, let's simply enumerate various techniques available to the kernel or driver author to communicate or interface with a user space C application. Well, the user space component could be a C app, a shell script (both of which we typically show in this book), or even other apps such as C++/Java apps, Python/Perl scripts, and more.
As we saw in the companion guide, Linux Kernel Programming, in Chapter 4, Writing Your First Kernel Module – LKMs Part 1, in the Library and System Call APIs subsection, the essential interface between user space applications and the kernel that includes the device drivers are the system call APIs. Now,...