Re: insmod failing to insert a simple module

2016-09-29 Thread Valdis . Kletnieks
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?)


pgpZjkXZOERzq.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: insmod failing to insert a simple module

2016-09-29 Thread Greg KH
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

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: insmod failing to insert a simple module

2016-09-29 Thread Alexander Kapshuk
On Thu, Sep 29, 2016 at 3:24 PM, Madhu K  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 
> 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@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+.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: insmod failing to insert a simple module

2016-09-29 Thread Madhu K
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  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
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: insmod failing to insert a simple module

2016-09-29 Thread Madhu K
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 
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@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: insmod failing to insert a simple module

2016-09-29 Thread Greg KH
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

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: insmod failing to insert a simple module

2016-09-29 Thread Quentin Lambert


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  > 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@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: insmod failing to insert a simple module

2016-09-29 Thread Madhu K
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  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@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: insmod failing to insert a simple module

2016-09-29 Thread Greg KH
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@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: insmod failing to insert a simple module

2016-09-29 Thread Madhu K
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 
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  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@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>
>
> --
> Thomas PASQUIER (home page )
> Postdoctoral Fellow
> Center for Research on Computation and Society
> School of Engineering and Applied Sciences (SEAS)
> Harvard University
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: insmod failing to insert a simple module

2016-09-29 Thread Pasquier, Thomas
Did you verify that you are building your module against the correct
headers?

On Thu, Sep 29, 2016 at 5:56 AM, 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
>
> what does "mod_unload" mean here?
>
> Thanks,
>
> Madhu
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
Thomas PASQUIER (home page )
Postdoctoral Fellow
Center for Research on Computation and Society
School of Engineering and Applied Sciences (SEAS)
Harvard University
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


insmod failing to insert a simple module

2016-09-29 Thread Madhu K
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@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies