Re: Nobody should ever need to patch the kernel!!



On 12 Oct 2006 01:11:41 -0700 440gtx@xxxxxxxxx wrote:

| I sympathize with you. I don't think people who live inside the kernel
| could understand the frustration. My conclusion is you are either part
| of the kernel distribution or you are screwed. 3rd party modules are
| impractical for two reasons:
|
| 1. Modules must be compiled for every single version of the kernel they
| will be used with or they are not allowed to load--this is unrealistic
| to try to supply since there are infinite versions floating around out
| there and constantly more. The other approach of expecting the
| customers to build and install modules from source code is even more
| unrealistic.

Interfaces change sometimes. Things inside the kernel not intended to
be exposed to userland process might change for good reasons, such as
changing an integer field in a struct from 16 bits to 32 bits. All code
that works with that struct must be compiled with that change. The code
inside the kernel would all be compiled at once and always match. The
code if a driver may not.

This is one reason proprietary modules are not always a good thing.
I personally avoid them unless I have source code and can recompile
them.

It seems to me the OP may have been tasked at work creating a proprietary
driver module that is to be distributed binary only, and is frustrated by
having many different versions of the kernel to compile against (headers
of).


| 2. Modules are not allowed to see or filter things as the kernel hides
| everything it can by not exporting it and provides no API's or
| architecture to allow access. You are either part of the kernel or you
| have no possibility of useful interaction.

There are APIs for the commonly expected things. It would be impractical
to have a hook for every possible thing because then you'd end up with a
hook every 3 or 4 lines of code, and a kernel many times its size.


| It is strange to me because layered drivers have been essential in
| other operating systems for the last 20 years or so. Even Dos was
| actually nice in that regard and everyone had their favorite cool
| tsr's. The linux model really strangles creative products.

TSR was a horrible hack. It doesn't work in modern Microsoft OSes.

Why don't you describe to me a "creative product" that is being strangled
because of Linux's model for driver interfacing? Be prepared for me to
describe bad hardware design and poor engineering if you choose to do so.
"Creative" should not be "neat tricks" to use the CPU to do the hardware's
work. A classic example of a very UN-creative product is the winmodem.

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2006-10-12-0721@xxxxxxxx |
|------------------------------------/-------------------------------------|
.



Relevant Pages

  • Compiling the drivers for a ADSL Modem (IceData500)
    ... My modem model is IceData500 and the vendor says it is compatible with RH ... The unicorn driver is a standard Linux ... PPPoE, PPPoA or RFC2684 protocols, the kernel may need to be patched. ... To compile the drivers, ...
    (Fedora)
  • Re: modules load
    ... The Handbook is not so clear about what you must compile ... > kernel, ... modules (the nVidia graphics driver is a good example of the latter). ... system sources, you can just look at the source code for each driver ...
    (freebsd-questions)
  • Re: Problems with kernel: no sound, printer, cdwriter
    ... Compile them, install them and then load the module. ... kernel, not as module. ... > Journalled Block Device driver loaded ...
    (Debian-User)
  • Re: Back to ubuntu
    ... but not in regular ubuntu 6.06 or any other version of ubuntu? ... so i attempted to compile the drivers on ubuntu 7.04, ... that under kubuntu 6.06 you were using a compatible kernel, ... unless you figure out how to get the driver to compile. ...
    (Ubuntu)
  • Re: kernel? 2.4.x vs 2.6.x
    ... Sorry about the contractions. ... > compile a new kernel and then compile the driverfrom ... this fails w.o custom kernel and I couldn't get syskonnects ... > driver to compile at all which googling suggested) This was all a good ...
    (Debian-User)