Binary compatibility in kernel

Binary compatibility in kernel

Shachar Shemesh shachar at shemesh.biz
Wed Feb 24 20:09:50 IST 2010


Ilya A. Volynets-Evenbakh wrote:
> Michael Sternberg wrote:
>   
>> Hello everybody
>>
>> I'm pretty new in Linux kernel development and seeking answers for
>> some questions related to binary compatibility between various kernels.
>>
>> I know that there is no stable kernel interface in Linux.
>> Here are appropriate articles that describe the problem:
>> http://www.kroah.com/log/linux/stable_api_nonsense.html
>> http://tinyurl.com/yane5lb
>>
>> I understand that the best way to make the GPLed module to be
>> supported in all future versions of kernel is to add it into the main
>> kernel tree.
>>
>> Question #1:
>> Where do I start if I want to add my module into main tree ?
>> What are chances that this process will succeed ?
>>     
> If your module is well-written, chances are pretty high.
>   
If your module is well-written and does something useful, and you are 
willing to spend the time answering change requests, and in some cases, 
nagging the maintainers until they respond, then pretty high.
>
> If it really is binary-only, you'll have to go "blob" way - provide your
> code inside
> a binary which uses your API, and sources for a wrapper, which can be
> compiled to
> particular kernel. That's how ATI, Nvidia, and other binary-only driver
> providers
> do it.
>   
I should point out that this way has two reasons. One is the one you 
stated. The other is that, under some circumstances, a GPL wrapper may 
be seen to isolate the binary blob from the GPL kernel.
>> Question #2:
>> Let's say I built a binary kernel module with headers of
>> 2.6.18-92.el5-i686 Red Hat kernel.
>> Will it work with another 2.6.18 Red Hat kernels ?
>> With plain vanilla 2.6.18 kernels ?
>> With other 2.6 kernels ?
>>     
> Depending on kernel build options, it might work in some very rare
> cases. Safe bet is "No"
>   
Basically, the answer is "it depends". If you happen to use an interface 
that RedHat did not touch, then it will work. If you did, tough cookie.

Basically, the more similar the kernels are, the more likely your module 
is to work. You will excuse me for stating the obvious.
>   
>> Are there any promises for kernel binary compatibility from, at least,
>> large vendors like RHEL and SLES ?
>>     
> No.
>   
I'm not sure there are no promises regarding patch revisions inside same 
version kernels (i.e. the different Redhat 2.6.18 kernels).

Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20100224/d067ec3f/attachment.html>


More information about the Linux-il mailing list