All of lore.kernel.org
 help / color / mirror / Atom feed
* insmod module-loading errors, Linux-2.6.9
@ 2004-11-08 15:12 linux-os
  2004-11-08 16:56 ` Colin Leroy
  0 siblings, 1 reply; 8+ messages in thread
From: linux-os @ 2004-11-08 15:12 UTC (permalink / raw)
  To: Linux kernel


Hello module wizards,

If one makes changes to the kernel configuration,
compiles, then attempts to install the new kernel,
there are two possible things that happen.

(1) One does `make modules_install` before `make install`
or...
(2) One does `make install` before `make modules_install'.

In the first case, `make install` may fail because the
loop device module fails to load with:

Script started on Mon 08 Nov 2004 09:07:41 AM EST
# insmod loop.ko
insmod: error inserting 'loop.ko': -1 Invalid module format
# insmod -f loop.ko
insmod: error inserting 'loop.ko': -1 Invalid module format
# dmesg | tail --lines 2
loop: version magic '2.6.9 SMP preempt PENTIUM4 gcc-3.3' should be '2.6.9 SMP PENTIUM4 gcc-3.3'
loop: version magic '2.6.9 SMP preempt PENTIUM4 gcc-3.3' should be '2.6.9 SMP PENTIUM4 gcc-3.3'
# exit
Script done on Mon 08 Nov 2004 09:08:35 AM EST

..OR..

The installation seems to work, but the system won't complete
a boot because modules from the previous configuration were used
in the `initrd` procedure.

This all comes about because the new module loading procedure
won't allow (ignores) the "-f" (force) parameter. So, one
is screwed trying to do something simple like substituting
a preemptive kernel for another if there isn't already an
alternate bootable system on the disk.

Please restore the "-f" parameter passed to insmod. It
was there for a very good reason. This allows one
who encounters the module-loading error while installing
the kernel to force the module loading. In this way, the
correct modules are used to generate the new `initrd` image.


Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
  Notice : All mail here is now cached for review by John Ashcroft.
                  98.36% of all statistics are fiction.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: insmod module-loading errors, Linux-2.6.9
  2004-11-08 15:12 insmod module-loading errors, Linux-2.6.9 linux-os
@ 2004-11-08 16:56 ` Colin Leroy
  2004-11-08 17:52   ` linux-os
  0 siblings, 1 reply; 8+ messages in thread
From: Colin Leroy @ 2004-11-08 16:56 UTC (permalink / raw)
  To: linux-os; +Cc: Linux kernel

On 08 Nov 2004 at 10h11, linux-os wrote:

Hi, 

> Please restore the "-f" parameter passed to insmod. It
> was there for a very good reason. This allows one
> who encounters the module-loading error while installing
> the kernel to force the module loading. In this way, the
> correct modules are used to generate the new `initrd` image.

Wouldn't using the EXTRAVERSION field save you from such hassles?

-- 
Colin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: insmod module-loading errors, Linux-2.6.9
  2004-11-08 16:56 ` Colin Leroy
@ 2004-11-08 17:52   ` linux-os
  2004-11-09  0:00     ` Valdis.Kletnieks
  0 siblings, 1 reply; 8+ messages in thread
From: linux-os @ 2004-11-08 17:52 UTC (permalink / raw)
  To: Colin Leroy; +Cc: Linux kernel

On Mon, 8 Nov 2004, Colin Leroy wrote:

> On 08 Nov 2004 at 10h11, linux-os wrote:
>
> Hi,
>
>> Please restore the "-f" parameter passed to insmod. It
>> was there for a very good reason. This allows one
>> who encounters the module-loading error while installing
>> the kernel to force the module loading. In this way, the
>> correct modules are used to generate the new `initrd` image.
>
> Wouldn't using the EXTRAVERSION field save you from such hassles?
>
> -- 
> Colin
>

There are certainly work-arounds for problems that shouldn't
exist at all. So, every time I do something to a kernel, I
have to change whatever the EXTRAVERSION field is?  Then, when
a customer demands that the kernel version be exactly the
same that was shipped with Fedora or whatever, I'm screwed.

They simply should not have removed the "-f" option of
insmod. It's just that simple. This option allowed transient
(possible) incompatibilities so that one could be productive
and not spend a whole day reinstalling from a distribution
CD because the new modules wouldn't work because somebody
decided that their special VERMAGIC_STRING was so ")@*&#$%)"
important that they preempted my work. Don't get me started....

Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
  Notice : All mail here is now cached for review by John Ashcroft.
                  98.36% of all statistics are fiction.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: insmod module-loading errors, Linux-2.6.9
  2004-11-08 17:52   ` linux-os
@ 2004-11-09  0:00     ` Valdis.Kletnieks
  2004-11-09 12:46       ` linux-os
  2004-11-10 17:38       ` Bill Davidsen
  0 siblings, 2 replies; 8+ messages in thread
From: Valdis.Kletnieks @ 2004-11-09  0:00 UTC (permalink / raw)
  To: linux-os; +Cc: Colin Leroy, Linux kernel

[-- Attachment #1: Type: text/plain, Size: 1378 bytes --]

On Mon, 08 Nov 2004 12:52:18 EST, linux-os said:

> There are certainly work-arounds for problems that shouldn't
> exist at all. So, every time I do something to a kernel, I
> have to change whatever the EXTRAVERSION field is?  Then, when
> a customer demands that the kernel version be exactly the
> same that was shipped with Fedora or whatever, I'm screwed.

If you didn't have the foresight to keep that kernel version around,
there isn't much we can do to help you.  Yes, this may mean you have
a big bunch of /usr/src/linux-2.6.* directories.

Note that you can *still* get screwed unless you keep the same
compiler toolchain around...

> They simply should not have removed the "-f" option of
> insmod. It's just that simple. This option allowed transient
> (possible) incompatibilities so that one could be productive
> and not spend a whole day reinstalling from a distribution
> CD because the new modules wouldn't work because somebody
> decided that their special VERMAGIC_STRING was so ")@*&#$%)"
> important that they preempted my work. Don't get me started....

Yes, instead you can spend a whole day reinstalling from a
distribution CD, and then restoring user files from backup,
because the new module you just 'insmod -f' had a different
number of parameters to some kernel call, and as a result your
stack got smashed and took the root filesystem with it....

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: insmod module-loading errors, Linux-2.6.9
  2004-11-09  0:00     ` Valdis.Kletnieks
@ 2004-11-09 12:46       ` linux-os
  2004-11-09 18:04         ` Mike Waychison
  2004-11-10 17:38       ` Bill Davidsen
  1 sibling, 1 reply; 8+ messages in thread
From: linux-os @ 2004-11-09 12:46 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: Colin Leroy, Linux kernel

On Mon, 8 Nov 2004 Valdis.Kletnieks@vt.edu wrote:

> On Mon, 08 Nov 2004 12:52:18 EST, linux-os said:
>
>> There are certainly work-arounds for problems that shouldn't
>> exist at all. So, every time I do something to a kernel, I
>> have to change whatever the EXTRAVERSION field is?  Then, when
>> a customer demands that the kernel version be exactly the
>> same that was shipped with Fedora or whatever, I'm screwed.
>
> If you didn't have the foresight to keep that kernel version around,
> there isn't much we can do to help you.  Yes, this may mean you have
> a big bunch of /usr/src/linux-2.6.* directories.
>

Wrong. Whoever put the module-loading code INSIDE the kernel,
for POLITICAL reasons, created a new POLICY.

[SNIPPED...]



Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
  Notice : All mail here is now cached for review by John Ashcroft.
                  98.36% of all statistics are fiction.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: insmod module-loading errors, Linux-2.6.9
  2004-11-09 12:46       ` linux-os
@ 2004-11-09 18:04         ` Mike Waychison
  2004-11-09 23:37           ` Rusty Russell
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Waychison @ 2004-11-09 18:04 UTC (permalink / raw)
  To: linux-os; +Cc: Valdis.Kletnieks, Colin Leroy, Linux kernel, rusty

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

linux-os wrote:
> On Mon, 8 Nov 2004 Valdis.Kletnieks@vt.edu wrote:
> 
>> On Mon, 08 Nov 2004 12:52:18 EST, linux-os said:
>>
>>> There are certainly work-arounds for problems that shouldn't
>>> exist at all. So, every time I do something to a kernel, I
>>> have to change whatever the EXTRAVERSION field is?  Then, when
>>> a customer demands that the kernel version be exactly the
>>> same that was shipped with Fedora or whatever, I'm screwed.
>>
>>
>> If you didn't have the foresight to keep that kernel version around,
>> there isn't much we can do to help you.  Yes, this may mean you have
>> a big bunch of /usr/src/linux-2.6.* directories.
>>
> 
> Wrong. Whoever put the module-loading code INSIDE the kernel,
> for POLITICAL reasons, created a new POLICY.
> 

No.  Version information is still stripped in module-init-tools in
_userspace_ for modprobe --force.  The fact that insmod doesn't support
'-f' is probably an oversight and Rusty would likely accept a patch.

- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE:  The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBkQbBdQs4kOxk3/MRArfFAJ9So6d7pRXqAgkuGj9XhsELsrymdgCfZs+x
Yz1bhTMbZkD35dbd8CEk+vk=
=kAgK
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: insmod module-loading errors, Linux-2.6.9
  2004-11-09 18:04         ` Mike Waychison
@ 2004-11-09 23:37           ` Rusty Russell
  0 siblings, 0 replies; 8+ messages in thread
From: Rusty Russell @ 2004-11-09 23:37 UTC (permalink / raw)
  To: Mike Waychison
  Cc: linux-os, Valdis.Kletnieks, Colin Leroy, lkml - Kernel Mailing List

On Tue, 2004-11-09 at 13:04 -0500, Mike Waychison wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> linux-os wrote:
> > On Mon, 8 Nov 2004 Valdis.Kletnieks@vt.edu wrote:
> > 
> >> On Mon, 08 Nov 2004 12:52:18 EST, linux-os said:
> >>
> >>> There are certainly work-arounds for problems that shouldn't
> >>> exist at all. So, every time I do something to a kernel, I
> >>> have to change whatever the EXTRAVERSION field is?  Then, when
> >>> a customer demands that the kernel version be exactly the
> >>> same that was shipped with Fedora or whatever, I'm screwed.
> >>
> >>
> >> If you didn't have the foresight to keep that kernel version around,
> >> there isn't much we can do to help you.  Yes, this may mean you have
> >> a big bunch of /usr/src/linux-2.6.* directories.
> >>
> > 
> > Wrong. Whoever put the module-loading code INSIDE the kernel,
> > for POLITICAL reasons, created a new POLICY.
> > 
> 
> No.  Version information is still stripped in module-init-tools in
> _userspace_ for modprobe --force.  The fact that insmod doesn't support
> '-f' is probably an oversight and Rusty would likely accept a patch.

Hmm, insmod is actually designed to be a minimal system call wrapper
(ie. most people probably shouldn't be using it).  However, it accepts
standard input and objcopy will happily strip sections out of a module.

Cheers,
Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: insmod module-loading errors, Linux-2.6.9
  2004-11-09  0:00     ` Valdis.Kletnieks
  2004-11-09 12:46       ` linux-os
@ 2004-11-10 17:38       ` Bill Davidsen
  1 sibling, 0 replies; 8+ messages in thread
From: Bill Davidsen @ 2004-11-10 17:38 UTC (permalink / raw)
  To: linux-kernel, Valdis.Kletnieks; +Cc: linux-os, Colin Leroy, Linux kernel

Valdis.Kletnieks@vt.edu wrote:
> On Mon, 08 Nov 2004 12:52:18 EST, linux-os said:

>>They simply should not have removed the "-f" option of
>>insmod. It's just that simple. This option allowed transient
>>(possible) incompatibilities so that one could be productive
>>and not spend a whole day reinstalling from a distribution
>>CD because the new modules wouldn't work because somebody
>>decided that their special VERMAGIC_STRING was so ")@*&#$%)"
>>important that they preempted my work. Don't get me started....
> 
> 
> Yes, instead you can spend a whole day reinstalling from a
> distribution CD, and then restoring user files from backup,
> because the new module you just 'insmod -f' had a different
> number of parameters to some kernel call, and as a result your
> stack got smashed and took the root filesystem with it....

This is Linux, not MS-DOS, where the system works for the user and you 
shouldn't have to do nonsense like "do you really want to load the 
module?" I agree with Dick, you shouldn't have to recompile the whole 
kernel to fix a trivial change. If you shoot yourself in the foot it's 
your fault, taking away the the gun is the policy of another o/s I won't 
name.

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-11-10 20:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-08 15:12 insmod module-loading errors, Linux-2.6.9 linux-os
2004-11-08 16:56 ` Colin Leroy
2004-11-08 17:52   ` linux-os
2004-11-09  0:00     ` Valdis.Kletnieks
2004-11-09 12:46       ` linux-os
2004-11-09 18:04         ` Mike Waychison
2004-11-09 23:37           ` Rusty Russell
2004-11-10 17:38       ` Bill Davidsen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.