Lines Matching +full:in +full:- +full:kernel

3 The Linux Kernel Driver Interface
8 Greg Kroah-Hartman <greg@kroah.com>
11 kernel interface, nor does it have a stable kernel interface**.
15 Please realize that this article describes the **in kernel** interfaces, not
16 the kernel to userspace interfaces.
18 The kernel to userspace interface is the one that application programs use,
21 kernel that still work just fine on the latest 2.6 kernel release.
27 -----------------
28 You think you want a stable kernel interface, but you really do not, and
30 you get that only if your driver is in the main kernel tree. You also
31 get lots of other good benefits if your driver is in the main kernel
33 operating system which is the reason you are using it in the first
38 -----
40 It's only the odd person who wants to write a kernel driver that needs
41 to worry about the in-kernel interfaces changing. For the majority of
47 that describes kernel drivers that do not have their source code
53 So, there are two main topics here, binary kernel interfaces and stable
54 kernel source interfaces. They both depend on each other, but we will
58 Binary Kernel Interface
59 -----------------------
60 Assuming that we had a stable kernel source interface for the kernel, a
62 consider the following facts about the Linux kernel:
64 - Depending on the version of the C compiler you use, different kernel
66 possibly include different functions in different ways (putting
71 - Depending on what kernel build options you select, a wide range of
72 different things can be assumed by the kernel:
74 - different structures can contain different fields
75 - Some functions may not be implemented at all, (i.e. some locks
76 compile away to nothing for non-SMP builds.)
77 - Memory within the kernel can be aligned in different ways,
80 - Linux runs on a wide range of different processor architectures.
85 module for the exact specific kernel configuration, using the same exact
86 C compiler that the kernel was built with. This is sufficient if you
101 Stable Kernel Source Interfaces
102 -------------------------------
105 keep a Linux kernel driver that is not in the main kernel tree up to
108 Linux kernel development is continuous and at a rapid pace, never
109 stopping to slow down. As such, the kernel developers find bugs in
114 instances of where this interface is used within the kernel are fixed up
117 As a specific examples of this, the in-kernel USB interfaces have
122 - A change from a synchronous model of data streams to an asynchronous
126 - A change was made in the way data packets were allocated from the
131 This is in stark contrast to a number of closed source operating systems
134 interfaces and do things in improper ways, causing the stability of the
137 In both of these instances, all developers agreed that these were
147 security issue is found, it is fixed in a very short amount of time. A
148 number of times this has caused internal kernel interfaces to be
156 Kernel interfaces are cleaned up over time. If there is no one using a
157 current interface, it is deleted. This ensures that the kernel remains
164 ----------
166 So, if you have a Linux kernel driver that is not in the main kernel
168 driver for every different kernel version for every distribution is a
169 nightmare, and trying to keep up with an ever changing kernel interface
172 Simple, get your kernel driver into the main kernel tree (remember we are
173 talking about drivers released under a GPL-compatible license here, if your
175 you leech). If your driver is in the tree, and a kernel interface changes,
176 it will be fixed up by the person who did the kernel change in the first
180 The very good side effects of having your driver in the main kernel tree
183 - The quality of the driver will rise as the maintenance costs (to the
185 - Other developers will add features to your driver.
186 - Other people will find and fix bugs in your driver.
187 - Other people will find tuning opportunities in your driver.
188 - Other people will update the driver for you when external interface
190 - The driver automatically gets shipped in all Linux distributions
200 ------