[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE[2]: Modules and the kernel



"Stanislav Malyshev a.k.a Frodo" <frodo@sharat.co.il> wrote:

>  On Mon, 30 Nov 1998, Leandro Dutra wrote:
>  
>  > > I *KNOW* you use the actual .o binaries, but I think (or at least
>  > *thought*)
>  > > that there are some hooks inside the kernel for calling the external
>  > object
>  > > file, i.e. some table linking the major/minor numbers of the device to
>  the
>  > > name of the module, if not something worse.
>  > 
>  > 	AFAIK the only modules which need such stuff are the sound modules

Not only. For example, I'd like to know how one can insert the ipx.o into a
kernel compiled without IPX being defined as a module. This doesn't tell,
however, whether the problem is "real" or can be solved by a cleaner module
design.

>  In fact, the do not really *need* it. They (OSS makers) inserted the check
>  just to avoid problems like "your module kills my kernel" - because they
>  sell it, so they have responcibility even when user messes it up.

But anyway, some dependence on the kernel structure must be present (at least,
at the current state of development). For example, practically any module to be
inserted into a SMP-aware kernel should be compiled with the __SMP__ defined
(BTW, OSS provide two types of modules - for SMP and uniprocessor kernels). I'm
not sure whether insmod'ing a SMP module will work with a single-CPU kernel, but
the opposite will definitly make the kernel crash.

Regards,

Evgeny


--
   ____________________________________________________________
  / Evgeny Stambulchik  <fnevgeny@plasma-gate.weizmann.ac.il>  \
 /  Plasma Laboratory, Weizmann Institute of Science, Israel \  \
 |  Phone : (972)8-934-3610  == | == FAX   : (972)8-934-3491 |  |
 |  URL   :    http://plasma-gate.weizmann.ac.il/~fnevgeny/  |  |
 |  Finger for PGP key >=====================================+  | 
 |______________________________________________________________|