Be a Linux Kernel hacker when needed

Ever wanted to start hacking the kernel? Don’t have a clue how to begin? Let us show you how it’s done… Be a kernel hacker – Write your first Linux Kernel module is article is a good starting point to learn about Linux kernel programming.

Kernel programming is often seen as a black magic because the Linux kernel is quite different from its user space. Linux kernel is just a very large and complex C program that is open for everyone to read, learn and improve, and you too can be a part of it.

Be a kernel hacker – Write your first Linux Kernel module article starts from probably the easiest way to start kernel programming is to write a module – a piece of code that can be dynamically loaded into the kernel and removed from it.The tutorial shows how to create a simple kernel module that creates a /dev/reverse device.

Kernel programming can be fun, but writing (and especially debugging) kernel code in a real-world project could cause headaches. Generally, native kernel code will perform better than user space implementation of same task, but for many projects this performance loss isn’t crucial.

Device drivers in user space article and Userspace vs kernel space driver discussion give some background when thinking of pros and cons between Kernel and user space drivers.

Device drivers in user space article tries to describe the benefits and some caveats to running data-path applications in the user space. Traditionally, packet-processing or data-path applications in Linux have run in the kernel space due to the infrastructure provided by the Linux network stack. However, a shift toward running data-path applications in the user-space context is now occurring. The Linux user space provides several advantages for applications, including more robust and flexible process management, standardized system-call interface, simpler resource management, a large number of libraries for XML, and regular expression parsing, among others.

A Simple Approach to Character Drivers in User Space article gives a practical example how to implement Linux drivers in user space. The presented ad hoc approach to building device drivers in user space has some nice features: It does not add a lot of kernel code and does not require any user-space libraries. Article presents you useful fanout and proxy modules.

Learn both Kernel and user space techniques, and use the technique which suits best for your given task.



1 Comment

Leave a Comment

Your email address will not be published. Required fields are marked *