Skip to contentSkip to conversation

How to ship binary proprietary modules?

DISCUSSION Arne Henrichsen 2 participants 2 messages Nov 3, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I would like to get some clarification on how to ship binary proprietary modules.

First some info. We want to ship our module in binary form, without ever releasing the source. We have marked the module:
MODULE_LICENSE("Proprietary");
The module is written for Linux 2.6.X, also build using the kernel build system. I have no problem loading the module, only when its loaded for a different version, then I get the following error:
insmod: error inserting './mymodule.ko': -1 Invalid module format

and in /var/log/messages:

kernel: mymodule: disagrees about version of symbol struct_module

I did compile my module under linux 2.6.8.1. and loaded it under 2.6.9. From what I understand of versioning it should check if the software interface is valid still and then allow the module to be loaded. Surely between version 2.6.8.1 and 2.6.9 nothing that drastic changed?

Or do I totally misunderstood versioning? Must a customer for instance request the module compiled for a specific kernel?

Thanks
Arne

#1 lore raw
Quoted 5 lines · Arne Henrichsen

Hi,

I would like to get some clarification on how to ship binary proprietary modules.

First of all you should really talk to your lawyer about if and how you can do this legally.

Quoted 5 lines

I did compile my module under linux 2.6.8.1. and loaded it under 2.6.9. From what I understand of versioning it should check if the software interface is valid still and then allow the module to be loaded. Surely between version 2.6.8.1 and 2.6.9 nothing that drastic changed?

A *lot* of things changed.

Quoted 1 line

Or do I totally misunderstood versioning?

Yes; basically versioning checks are a very rough approximation of a check on ABI. Linux does not keep abi for modules at all, every single release and a whopping lot of config options each result in an entirely different ABI. Heck even most bugfixes will change the abi.

Quoted 2 lines

Must a customer for instance
request the module compiled for a specific kernel?

yes; however you're much better off shipping the sourcecode of your module, or if your lawyer allows that (there may be some patent issues involved), you can choose to ship a .o file and a glue layer, where the glue layer abstracts the kernel ABI/API away entirely.