All of lore.kernel.org
 help / color / mirror / Atom feed
* error : insmod
@ 2013-02-11  9:54 sunil
  2013-02-11 10:04 ` Ashish_Bunkar at Dell.com
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: sunil @ 2013-02-11  9:54 UTC (permalink / raw)
  To: kernelnewbies

hi all,
while inserting module to the linux kernel, m facing this problem
-------------------------------------------ERROR-----------------------------------------------------

sunil at ubuntu:~/test/drive$ insmod helloworld.ko
insmod: error inserting 'helloworld.ko': -1 Operation not permitted

sunil at ubuntu:~/test/drive$ sudo modprobe helloworld
FATAL: Module helloworld not found.

please help!!

thanks & regards
Sunil

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

* error : insmod
  2013-02-11  9:54 error : insmod sunil
@ 2013-02-11 10:04 ` Ashish_Bunkar at Dell.com
  2013-02-11 10:06 ` Jeff Kirsher
  2013-02-11 10:15 ` Kristof Provost
  2 siblings, 0 replies; 8+ messages in thread
From: Ashish_Bunkar at Dell.com @ 2013-02-11 10:04 UTC (permalink / raw)
  To: kernelnewbies

Try it through root access.

Regards
ASHU

-----Original Message-----
From: kernelnewbies-bounces@kernelnewbies.org [mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of sunil
Sent: Monday, February 11, 2013 3:24 PM
To: kernelnewbies at kernelnewbies.org
Subject: error : insmod

hi all,
while inserting module to the linux kernel, m facing this problem
-------------------------------------------ERROR-----------------------------------------------------

sunil at ubuntu:~/test/drive$ insmod helloworld.ko
insmod: error inserting 'helloworld.ko': -1 Operation not permitted

sunil at ubuntu:~/test/drive$ sudo modprobe helloworld
FATAL: Module helloworld not found.

please help!!

thanks & regards
Sunil

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* error : insmod
  2013-02-11  9:54 error : insmod sunil
  2013-02-11 10:04 ` Ashish_Bunkar at Dell.com
@ 2013-02-11 10:06 ` Jeff Kirsher
  2013-02-11 10:15 ` Kristof Provost
  2 siblings, 0 replies; 8+ messages in thread
From: Jeff Kirsher @ 2013-02-11 10:06 UTC (permalink / raw)
  To: kernelnewbies

On 02/11/2013 01:54 AM, sunil wrote:
> hi all,
> while inserting module to the linux kernel, m facing this problem
> -------------------------------------------ERROR-----------------------------------------------------
>
> sunil at ubuntu:~/test/drive$ insmod helloworld.ko
> insmod: error inserting 'helloworld.ko': -1 Operation not permitted
>
> sunil at ubuntu:~/test/drive$ sudo modprobe helloworld
> FATAL: Module helloworld not found.
>
It is a path issue, you need to specify the entire path to helloworld.ko.

For example:

sudo insmod /path/to/your/helloworld.ko

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130211/5bf00edb/attachment-0001.bin 

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

* error : insmod
  2013-02-11  9:54 error : insmod sunil
  2013-02-11 10:04 ` Ashish_Bunkar at Dell.com
  2013-02-11 10:06 ` Jeff Kirsher
@ 2013-02-11 10:15 ` Kristof Provost
       [not found]   ` <CABVh-rw+vBBEor8SP5m=Xf7RyzhMo5x4WSn9pzMc3xP3dZqtHA@mail.gmail.com>
  2 siblings, 1 reply; 8+ messages in thread
From: Kristof Provost @ 2013-02-11 10:15 UTC (permalink / raw)
  To: kernelnewbies

On 2013-02-11 15:24:08 (+0530), sunil <sunil.slvphsn@gmail.com> wrote:
> while inserting module to the linux kernel, m facing this problem
> -------------------------------------------ERROR-----------------------------------------------------
> 
> sunil at ubuntu:~/test/drive$ insmod helloworld.ko
> insmod: error inserting 'helloworld.ko': -1 Operation not permitted
> 
For obvious reasons normal users are not allowed to load kernel modules.
This requires root access (or more accurately, CAP_SYS_MODULE
capabilities). That's why your insmod fails.

> sunil at ubuntu:~/test/drive$ sudo modprobe helloworld
> FATAL: Module helloworld not found.
> 
This is a different action from 'insmod helloworld.ko'.

modprobe tries to load the module from /lib/modules/`uname -r`.
It's slightly more convenient because it will also load all modules this
one depends on.

In this case this fails because your module doesn't actually live in
/lib/modules/....

Try sudo insmod helloworld.ko instead.

Regards,
Kristof

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

* error : insmod
       [not found]       ` <CABVh-ryiHnMJcyodWZ4Wi-cz0Ec5F5-c_dxjdDiitXAW4EgKiw@mail.gmail.com>
@ 2013-02-11 10:48         ` Kristof Provost
       [not found]         ` <CABVh-rzw_voOn=Gh7k5BAk+UR9zgbeatEwLQ1AEEJ_wsRDT8mw@mail.gmail.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Kristof Provost @ 2013-02-11 10:48 UTC (permalink / raw)
  To: kernelnewbies

On 2013-02-11 16:10:38 (+0530), sunil <sunil.slvphsn@gmail.com> wrote:
> -------------output----------------------------
> sunil at ubuntu:~/test/drive$ sudo insmod ./helloworld.ko
> insmod: error inserting './helloworld.ko': -1 File exists
> 
This means you've already loaded the module.

Try 'sudo rmmod helloworld' to unload it first.
This should generate the 'Goodbye, cruel world' dmesg trace.
After that you can load the module again.

Regards,
Kristof

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

* error : insmod
       [not found]           ` <CABVh-rxKa0Ht1RX_JiYBtfOSYCWTynZFSoRD=vA=2mVQS3pJig@mail.gmail.com>
@ 2013-02-11 11:04             ` Kristof Provost
  2013-02-11 11:20               ` sunil
  0 siblings, 1 reply; 8+ messages in thread
From: Kristof Provost @ 2013-02-11 11:04 UTC (permalink / raw)
  To: kernelnewbies

On 2013-02-11 16:24:17 (+0530), sunil <sunil.slvphsn@gmail.com> wrote:
> Have a look at this:
> 
> donno wats happening:
> 
> sunil at ubuntu:~/test/drive$ sudo rmmod helloworld
> sunil at ubuntu:~/test/drive$ lsmod|grep hellow*
> Binary file helloworld.ko matches
> Binary file helloworld.o matches

This doesn't actually do what you seem to think it does.
You're not passing the 'hellow*' argument to grep. The 'hellow*' is
first expaned by your shell, so it probably turns that command line into
'lsmod | grep helloworld.c helloworld.o helloworld.ko'.
Try using 'lsmod | grep hellow' instead (i.e. without the *).

> sunil at ubuntu:~/test/drive$ modprobe -r helloworld
> FATAL: Module helloworld not found.

Obviously, because your previous command succeeded. The module is no
longer loaded.

Regards,
Kristof

PS: Please don't top-post.
PS 2: Please keep the mailing list in cc.

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

* error : insmod
  2013-02-11 11:04             ` Kristof Provost
@ 2013-02-11 11:20               ` sunil
  2013-02-11 11:27                 ` Kristof Provost
  0 siblings, 1 reply; 8+ messages in thread
From: sunil @ 2013-02-11 11:20 UTC (permalink / raw)
  To: kernelnewbies

Hi kristof,

when i executed the below line. i din't get what i suppose to
get...the message "hello, world"..

did i miss any steps
sunil at ubuntu:~/test/drive$ sudo insmod helloworld.ko


On Mon, Feb 11, 2013 at 4:34 PM, Kristof Provost <kristof@sigsegv.be> wrote:
> On 2013-02-11 16:24:17 (+0530), sunil <sunil.slvphsn@gmail.com> wrote:
>> Have a look at this:
>>
>> donno wats happening:
>>
>> sunil at ubuntu:~/test/drive$ sudo rmmod helloworld
>> sunil at ubuntu:~/test/drive$ lsmod|grep hellow*
>> Binary file helloworld.ko matches
>> Binary file helloworld.o matches
>
> This doesn't actually do what you seem to think it does.
> You're not passing the 'hellow*' argument to grep. The 'hellow*' is
> first expaned by your shell, so it probably turns that command line into
> 'lsmod | grep helloworld.c helloworld.o helloworld.ko'.
> Try using 'lsmod | grep hellow' instead (i.e. without the *).
>
>> sunil at ubuntu:~/test/drive$ modprobe -r helloworld
>> FATAL: Module helloworld not found.
>
> Obviously, because your previous command succeeded. The module is no
> longer loaded.
>
> Regards,
> Kristof
>
> PS: Please don't top-post.
> PS 2: Please keep the mailing list in cc.
>



-- 

Regards,
Sunil A S

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

* error : insmod
  2013-02-11 11:20               ` sunil
@ 2013-02-11 11:27                 ` Kristof Provost
  0 siblings, 0 replies; 8+ messages in thread
From: Kristof Provost @ 2013-02-11 11:27 UTC (permalink / raw)
  To: kernelnewbies

On 2013-02-11 16:50:45 (+0530), sunil <sunil.slvphsn@gmail.com> wrote:
> when i executed the below line. i din't get what i suppose to
> get...the message "hello, world"..
> 
> did i miss any steps
> sunil at ubuntu:~/test/drive$ sudo insmod helloworld.ko
> 
The traces you've inserted in your kernel module do not print to stdout.
They get logged in the kernel ring buffer.

Try 'dmesg' after loading your module.

Regards,
Kristof

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

end of thread, other threads:[~2013-02-11 11:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-11  9:54 error : insmod sunil
2013-02-11 10:04 ` Ashish_Bunkar at Dell.com
2013-02-11 10:06 ` Jeff Kirsher
2013-02-11 10:15 ` Kristof Provost
     [not found]   ` <CABVh-rw+vBBEor8SP5m=Xf7RyzhMo5x4WSn9pzMc3xP3dZqtHA@mail.gmail.com>
     [not found]     ` <20130211102731.GR71256@thebe.jupiter.sigsegv.be>
     [not found]       ` <CABVh-ryiHnMJcyodWZ4Wi-cz0Ec5F5-c_dxjdDiitXAW4EgKiw@mail.gmail.com>
2013-02-11 10:48         ` Kristof Provost
     [not found]         ` <CABVh-rzw_voOn=Gh7k5BAk+UR9zgbeatEwLQ1AEEJ_wsRDT8mw@mail.gmail.com>
     [not found]           ` <CABVh-rxKa0Ht1RX_JiYBtfOSYCWTynZFSoRD=vA=2mVQS3pJig@mail.gmail.com>
2013-02-11 11:04             ` Kristof Provost
2013-02-11 11:20               ` sunil
2013-02-11 11:27                 ` Kristof Provost

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.