linux-mips-fnet
[Top] [All Lists]

Re: [patch] modutils 2.4.6: Make __dbe_table available to modules

To: Keith Owens <kaos@ocs.com.au>
Subject: Re: [patch] modutils 2.4.6: Make __dbe_table available to modules
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Mon, 13 Aug 2001 16:49:22 +0200 (MET DST)
Cc: Ralf Baechle <ralf@uni-koblenz.de>, Harald Koerfgen <hkoerfg@web.de>, linux-mips@fnet.fr, linux-mips@oss.sgi.com
In-reply-to: <15497.997712357@ocs3.ocs-net>
Organization: Technical University of Gdansk
On Tue, 14 Aug 2001, Keith Owens wrote:

> Checking dbe table is fine but where you placed the table in struct
> modules is wrong.  You must not insert fields in the middle of struct
> module, it introduces version skew between kernel and user space.  At
> the very least you have moved the can_unload which will break IPv6 plus
> a few other modules.
[...]

 Thanks a lot for the detailed explanation.  I'll cook an improvement
soon. 

> The only other change you have to make is to init_modules().  For mips
> you create pointers to the kernel dbe tables and fill in archdata start
> and end in kernel_module.  Since init_module is called before kmalloc
> is ready, make the kernel dbe table a static variable.

 __dbe_table is initialized exactly like __ex_table, i.e. it's a separate
ELF section with pointers to the start and the end computed in a linker
script.  Thus it is fine.  The table has actually been present in the
kernel for quite some time already. 

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

<Prev in Thread] Current Thread [Next in Thread>