Have insmod fail w/ modules compiled into kernel

Kurt Garloff (garloff@suse.de)
Fri, 3 Sep 1999 09:53:17 +0200


--10jrOL3x2xqLmOsH
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Keith,

here is a feature request for insmod:

When I try to load a module and the same module already exists in kernel,
this will be detected and the module won't be loaded twice. Fine.

However, if you try to load a module and the same code is compiled
statically into the kernel, you're out of luck. This typically happens with
distributions, that provide several kernels but just one set of modules, BT=
W.

For most of the modules, we are lucky, they register a blockdevice or a
hardware ressource and fail, so module initialization fails. However, this
is not safe. scsi_mod, e.g. does not have such a protection. (Before you
try: Prepare for rebooting, afterwards.)

I'd like insmod to detect this. As it read the symbol table of the running
kernel anyway, it could check for symbols being defined and exported from
both the kernel and module being loaded. If there are, let insmod fail.
(And provide an option to override it, either with -f or with a new one.)

Comments?
--=20
Kurt Garloff <garloff@suse.de> Wuppertal, FRG
PGP2 key: See mail header, key servers Linux kernel development
SuSE GmbH, N=FCrnberg, FRG SCSI drivers: tmscsim(DC390), DC395

--10jrOL3x2xqLmOsH
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i

iQCVAwUBN89+bRaQN/7O/JIVAQHZZQP/cYVfFe6TnTP1hSj+LcUCj14ES5DYRFcQ
QP7pKBljwCQ1+qBp1SwJEdeeg5zJbBXDTsSRkam+e6UsCn4cBWDvDHG4FO6erhAV
l5+xqkYMhHGznSqGa9LlpvuZHcIXyXz5gWkNnFldrfqL4mkQgxRw8WgkhU205llZ
mEvaQbpcIZI=
=VS92
-----END PGP SIGNATURE-----

--10jrOL3x2xqLmOsH--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/