All of lore.kernel.org
 help / color / mirror / Atom feed
* insmod failing to insert a simple module
@ 2016-09-29  9:56 Madhu K
  2016-09-29 10:30 ` Pasquier, Thomas
  2016-09-29 11:24 ` Greg KH
  0 siblings, 2 replies; 14+ messages in thread
From: Madhu K @ 2016-09-29  9:56 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

While inserting a kernel module, insmod is failing with following error.

insmod: error inserting 'page_walk.ko': Invalid module format.

I verified the modinfo of "page_walk.ko" it is showing version magic
as : 4.0.5_rc7+ SMP mod_unload modversions 686

what does "mod_unload" mean here?

Thanks,

Madhu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160929/0d95746c/attachment.html 

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

* insmod failing to insert a simple module
  2016-09-29  9:56 insmod failing to insert a simple module Madhu K
@ 2016-09-29 10:30 ` Pasquier, Thomas
  2016-09-29 10:43   ` Madhu K
  2016-09-29 11:24 ` Greg KH
  1 sibling, 1 reply; 14+ messages in thread
From: Pasquier, Thomas @ 2016-09-29 10:30 UTC (permalink / raw)
  To: kernelnewbies

Did you verify that you are building your module against the correct
headers?

On Thu, Sep 29, 2016 at 5:56 AM, Madhu K <madhu.sk89@gmail.com> wrote:

> Hi All,
>
> While inserting a kernel module, insmod is failing with following error.
>
> insmod: error inserting 'page_walk.ko': Invalid module format.
>
> I verified the modinfo of "page_walk.ko" it is showing version magic as : 4.0.5_rc7+ SMP mod_unload modversions 686
>
> what does "mod_unload" mean here?
>
> Thanks,
>
> Madhu
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
Thomas PASQUIER (home page <http://scholar.harvard.edu/tfjmp>)
Postdoctoral Fellow
Center for Research on Computation and Society
School of Engineering and Applied Sciences (SEAS)
Harvard University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160929/83ba81ac/attachment-0001.html 

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

* insmod failing to insert a simple module
  2016-09-29 10:30 ` Pasquier, Thomas
@ 2016-09-29 10:43   ` Madhu K
  0 siblings, 0 replies; 14+ messages in thread
From: Madhu K @ 2016-09-29 10:43 UTC (permalink / raw)
  To: kernelnewbies

How to check correct headers, and when I download or clone the latest
kernel don't they provide the headers along with kernel ?

Thanks,
Madhu

On Thu, Sep 29, 2016 at 4:00 PM, Pasquier, Thomas <tfjmp@g.harvard.edu>
wrote:

> Did you verify that you are building your module against the correct
> headers?
>
> On Thu, Sep 29, 2016 at 5:56 AM, Madhu K <madhu.sk89@gmail.com> wrote:
>
>> Hi All,
>>
>> While inserting a kernel module, insmod is failing with following error.
>>
>> insmod: error inserting 'page_walk.ko': Invalid module format.
>>
>> I verified the modinfo of "page_walk.ko" it is showing version magic as : 4.0.5_rc7+ SMP mod_unload modversions 686
>>
>> what does "mod_unload" mean here?
>>
>> Thanks,
>>
>> Madhu
>>
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>
>
> --
> Thomas PASQUIER (home page <http://scholar.harvard.edu/tfjmp>)
> Postdoctoral Fellow
> Center for Research on Computation and Society
> School of Engineering and Applied Sciences (SEAS)
> Harvard University
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160929/f74f4990/attachment.html 

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

* insmod failing to insert a simple module
  2016-09-29  9:56 insmod failing to insert a simple module Madhu K
  2016-09-29 10:30 ` Pasquier, Thomas
@ 2016-09-29 11:24 ` Greg KH
  2016-09-29 12:01   ` Madhu K
  1 sibling, 1 reply; 14+ messages in thread
From: Greg KH @ 2016-09-29 11:24 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Sep 29, 2016 at 03:26:49PM +0530, Madhu K wrote:
> Hi All,
> 
> While inserting a kernel module, insmod is failing with following error.
> 
> 
> insmod: error inserting 'page_walk.ko': Invalid module format.
> 
> I verified the modinfo of "page_walk.ko" it is showing version magic as : 4.0.5_rc7+ SMP mod_unload modversions 686

Is the kernel version that you are currently running also 4.0.5-rc7+?
That is a requirement :)

> what does "mod_unload" mean here?

You have enabled the ability to unload modules.

Also look in your kernel log for any specific error messages when trying
to load a module, it usually will be more verbous than the insmod
program itself.

good luck,

greg k-h

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

* insmod failing to insert a simple module
  2016-09-29 11:24 ` Greg KH
@ 2016-09-29 12:01   ` Madhu K
  2016-09-29 12:07     ` Quentin Lambert
                       ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Madhu K @ 2016-09-29 12:01 UTC (permalink / raw)
  To: kernelnewbies

No it is not the requirement, when I downloaded the source "4.0.5-rc7+" was
latest. Is there any problem with 4.0.5-rc7+?

Thanks,
Madhu

On Thu, Sep 29, 2016 at 4:54 PM, Greg KH <greg@kroah.com> wrote:

> On Thu, Sep 29, 2016 at 03:26:49PM +0530, Madhu K wrote:
> > Hi All,
> >
> > While inserting a kernel module, insmod is failing with following error.
> >
> >
> > insmod: error inserting 'page_walk.ko': Invalid module format.
> >
> > I verified the modinfo of "page_walk.ko" it is showing version magic as
> : 4.0.5_rc7+ SMP mod_unload modversions 686
>
> Is the kernel version that you are currently running also 4.0.5-rc7+?
> That is a requirement :)
>
> > what does "mod_unload" mean here?
>
> You have enabled the ability to unload modules.
>
> Also look in your kernel log for any specific error messages when trying
> to load a module, it usually will be more verbous than the insmod
> program itself.
>
> good luck,
>
> greg k-h
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160929/b5a86e57/attachment.html 

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

* insmod failing to insert a simple module
  2016-09-29 12:01   ` Madhu K
@ 2016-09-29 12:07     ` Quentin Lambert
  2016-09-29 12:10     ` AW:insmod " Johannes Thoma
  2016-09-29 12:14     ` Greg KH
  2 siblings, 0 replies; 14+ messages in thread
From: Quentin Lambert @ 2016-09-29 12:07 UTC (permalink / raw)
  To: kernelnewbies



On 29/09/2016 14:01, Madhu K wrote:
> No it is not the requirement, when I downloaded the source 
> "4.0.5-rc7+" was latest. Is there any problem with 4.0.5-rc7+?
What Greg is telling you is that for you to be able to insmod a module 
you need to be running the same kernel version as the source code 
against which you have compiled your module.

If you are running kernel 4.0.0, you won't be able to insmod your module 
that has been compiled using the "4.0.5-rc7+" source code.

Quentin
>
> Thanks,
> Madhu
>
> On Thu, Sep 29, 2016 at 4:54 PM, Greg KH <greg@kroah.com 
> <mailto:greg@kroah.com>> wrote:
>
>     On Thu, Sep 29, 2016 at 03:26:49PM +0530, Madhu K wrote:
>     > Hi All,
>     >
>     > While inserting a kernel module, insmod is failing with
>     following error.
>     >
>     >
>     > insmod: error inserting 'page_walk.ko': Invalid module format.
>     >
>     > I verified the modinfo of "page_walk.ko" it is showing version
>     magic as : 4.0.5_rc7+ SMP mod_unload modversions 686
>
>     Is the kernel version that you are currently running also 4.0.5-rc7+?
>     That is a requirement :)
>
>     > what does "mod_unload" mean here?
>
>     You have enabled the ability to unload modules.
>
>     Also look in your kernel log for any specific error messages when
>     trying
>     to load a module, it usually will be more verbous than the insmod
>     program itself.
>
>     good luck,
>
>     greg k-h
>
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* AW:insmod failing to insert a simple module
  2016-09-29 12:01   ` Madhu K
  2016-09-29 12:07     ` Quentin Lambert
@ 2016-09-29 12:10     ` Johannes Thoma
  2016-09-29 12:24       ` insmod " Madhu K
  2016-09-29 12:14     ` Greg KH
  2 siblings, 1 reply; 14+ messages in thread
From: Johannes Thoma @ 2016-09-29 12:10 UTC (permalink / raw)
  To: kernelnewbies

An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160929/c2033235/attachment.html 

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

* insmod failing to insert a simple module
  2016-09-29 12:01   ` Madhu K
  2016-09-29 12:07     ` Quentin Lambert
  2016-09-29 12:10     ` AW:insmod " Johannes Thoma
@ 2016-09-29 12:14     ` Greg KH
  2016-09-29 12:27       ` Madhu K
  2 siblings, 1 reply; 14+ messages in thread
From: Greg KH @ 2016-09-29 12:14 UTC (permalink / raw)
  To: kernelnewbies

A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?


http://daringfireball.net/2007/07/on_top

On Thu, Sep 29, 2016 at 05:31:52PM +0530, Madhu K wrote:
> No it is not the requirement, when I downloaded the source "4.0.5-rc7+" was
> latest. Is there any problem with 4.0.5-rc7+?

I do not understand these two sentences.

You said you tried to load a module built for the 4.0.5-rc7 kernel tree
(which is a very odd kernel version number, as I don't recall ever
making a -rc7 for 4.0.5, which was released way back in June of 2015,
but that's another issue...) In order to do that properly, you have to
be running that specific kernel version at the same time so this will
work properly.

So, what specific kernel version are you currently running?  Does it
match up with the kernel version of the module you are wanting to load?
(exercise for exactly how to determine both of these is left for the
reader...)

thanks,

greg k-h

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

* insmod failing to insert a simple module
  2016-09-29 12:10     ` AW:insmod " Johannes Thoma
@ 2016-09-29 12:24       ` Madhu K
  2016-09-29 12:30         ` Alexander Kapshuk
                           ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Madhu K @ 2016-09-29 12:24 UTC (permalink / raw)
  To: kernelnewbies

Hi,

uname -a output :

Linux BLR-PCUB-01141 4.5.0-rc7 #2 SMP Wed Mar 23 15:51:13 IST 2016 x86_64
x86_64 x86_64 GNU/Linux

And my modinfo of my module is :

icense:        Dual BSD/GPL
srcversion:     1D16256F51E63BC3632B65B
depends:
vermagic:       4.5.0-rc7+ SMP mod_unload modversions 686


So both are machining, what could be the problem?

Regards,
Madhu

On Thu, Sep 29, 2016 at 5:40 PM, Johannes Thoma <johannes@johannesthoma.com>
wrote:

> Type
>
> uname -a
>
> on the box where you try the insmod. If it says anything else than
> 4.0.5-rc7+ for the kernel version then this is the reason why insmod fails.
>
> Best
>
> Johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160929/9bb3e79d/attachment-0001.html 

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

* insmod failing to insert a simple module
  2016-09-29 12:14     ` Greg KH
@ 2016-09-29 12:27       ` Madhu K
  2016-09-29 12:37         ` Greg KH
  0 siblings, 1 reply; 14+ messages in thread
From: Madhu K @ 2016-09-29 12:27 UTC (permalink / raw)
  To: kernelnewbies

Hi,

I am runnig 4.0.5_rc7 kernel and I built the module for same kernel.

uname -a output :

Linux BLR-PCUB-01141 4.5.0-rc7 #2 SMP Wed Mar 23 15:51:13 IST 2016 x86_64
x86_64 x86_64 GNU/Linux

And my modinfo of my module is :

icense:        Dual BSD/GPL
srcversion:     1D16256F51E63BC3632B65B
depends:
vermagic:       4.5.0-rc7+ SMP mod_unload modversions 686

Regards,
Madhu

On Thu, Sep 29, 2016 at 5:44 PM, Greg KH <greg@kroah.com> wrote:

> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> A: No.
> Q: Should I include quotations after my reply?
>
>
> http://daringfireball.net/2007/07/on_top
>
> On Thu, Sep 29, 2016 at 05:31:52PM +0530, Madhu K wrote:
> > No it is not the requirement, when I downloaded the source "4.0.5-rc7+"
> was
> > latest. Is there any problem with 4.0.5-rc7+?
>
> I do not understand these two sentences.
>
> You said you tried to load a module built for the 4.0.5-rc7 kernel tree
> (which is a very odd kernel version number, as I don't recall ever
> making a -rc7 for 4.0.5, which was released way back in June of 2015,
> but that's another issue...) In order to do that properly, you have to
> be running that specific kernel version at the same time so this will
> work properly.
>
> So, what specific kernel version are you currently running?  Does it
> match up with the kernel version of the module you are wanting to load?
> (exercise for exactly how to determine both of these is left for the
> reader...)
>
> thanks,
>
> greg k-h
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160929/88374a59/attachment.html 

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

* insmod failing to insert a simple module
  2016-09-29 12:24       ` insmod " Madhu K
@ 2016-09-29 12:30         ` Alexander Kapshuk
  2016-09-29 12:31         ` François
  2016-09-29 14:30         ` Valdis.Kletnieks at vt.edu
  2 siblings, 0 replies; 14+ messages in thread
From: Alexander Kapshuk @ 2016-09-29 12:30 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Sep 29, 2016 at 3:24 PM, Madhu K <madhu.sk89@gmail.com> wrote:
> Hi,
>
> uname -a output :
>
> Linux BLR-PCUB-01141 4.5.0-rc7 #2 SMP Wed Mar 23 15:51:13 IST 2016 x86_64
> x86_64 x86_64 GNU/Linux
>
> And my modinfo of my module is :
>
> icense:        Dual BSD/GPL
> srcversion:     1D16256F51E63BC3632B65B
> depends:
> vermagic:       4.5.0-rc7+ SMP mod_unload modversions 686
>
>
> So both are machining, what could be the problem?
>
> Regards,
> Madhu
>
> On Thu, Sep 29, 2016 at 5:40 PM, Johannes Thoma <johannes@johannesthoma.com>
> wrote:
>>
>> Type
>>
>> uname -a
>>
>> on the box where you try the insmod. If it says anything else than
>> 4.0.5-rc7+ for the kernel version then this is the reason why insmod fails.
>>
>> Best
>>
>> Johannes
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

They do not match.

'uname -a': says 4.5.0-rc7.

Whereas your original post said: 4.0.5_rc7+.

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

* insmod failing to insert a simple module
  2016-09-29 12:24       ` insmod " Madhu K
  2016-09-29 12:30         ` Alexander Kapshuk
@ 2016-09-29 12:31         ` François
  2016-09-29 14:30         ` Valdis.Kletnieks at vt.edu
  2 siblings, 0 replies; 14+ messages in thread
From: François @ 2016-09-29 12:31 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Sep 29, 2016 at 05:54:55PM +0530, Madhu K wrote:

> So both are machining, what could be the problem?

You've been said to watch on the kernel logs.
What's in there?

What kind of simple module is that? Can you provide some code?
It's a bit hard to find issues with no informations...

-- 
Fran?ois

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

* insmod failing to insert a simple module
  2016-09-29 12:27       ` Madhu K
@ 2016-09-29 12:37         ` Greg KH
  0 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2016-09-29 12:37 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Sep 29, 2016 at 05:57:47PM +0530, Madhu K wrote:
> Hi,
> 
> I am runnig 4.0.5_rc7 kernel and I built the module for same kernel.
> 
> uname -a output :
> 
> Linux BLR-PCUB-01141 4.5.0-rc7 #2 SMP Wed Mar 23 15:51:13 IST 2016 x86_64
> x86_64 x86_64 GNU/Linux

"4.5.0-rc7" is different han "4.0.5_rc7" :)

> 
> And my modinfo of my module is :
> 
> icense:??????? Dual BSD/GPL
> srcversion:???? 1D16256F51E63BC3632B65B
> depends:???????
> vermagic:?????? 4.5.0-rc7+ SMP mod_unload modversions 686

That's the issue right there, the module was built for "4.5.0-rc7+" and
you are running "4.5.0-rc7".  Notice the "+" character?  That's the
problem here...

Run the same kernel version as your module and all should be fine.

Note, the "+" means that there are commits past the last tag in your
tree (or that it has been modified in some way since that tag).  So
there is a real difference here, which is why insmod is failing.

If you really think you can ignore this, you can always tell insmod to
ignore the kernel version check.  Read the man page for all of the
details there.

good luck!

greg k-h

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

* insmod failing to insert a simple module
  2016-09-29 12:24       ` insmod " Madhu K
  2016-09-29 12:30         ` Alexander Kapshuk
  2016-09-29 12:31         ` François
@ 2016-09-29 14:30         ` Valdis.Kletnieks at vt.edu
  2 siblings, 0 replies; 14+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2016-09-29 14:30 UTC (permalink / raw)
  To: kernelnewbies

On Thu, 29 Sep 2016 17:54:55 +0530, Madhu K said:

> Linux BLR-PCUB-01141 4.5.0-rc7
> vermagic:       4.5.0-rc7+ SMP mod_unload modversions 686

One is a straight 4.5.0-rc7 (and why are you using that and not the
released 4.5.0, anyhow?), and the other is 4.5.0-rc7+ with a plus sign,
which means you've changed the source tree (what did you do to it?)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160929/67bbb9b3/attachment.bin 

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

end of thread, other threads:[~2016-09-29 14:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29  9:56 insmod failing to insert a simple module Madhu K
2016-09-29 10:30 ` Pasquier, Thomas
2016-09-29 10:43   ` Madhu K
2016-09-29 11:24 ` Greg KH
2016-09-29 12:01   ` Madhu K
2016-09-29 12:07     ` Quentin Lambert
2016-09-29 12:10     ` AW:insmod " Johannes Thoma
2016-09-29 12:24       ` insmod " Madhu K
2016-09-29 12:30         ` Alexander Kapshuk
2016-09-29 12:31         ` François
2016-09-29 14:30         ` Valdis.Kletnieks at vt.edu
2016-09-29 12:14     ` Greg KH
2016-09-29 12:27       ` Madhu K
2016-09-29 12:37         ` Greg KH

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.