Re: loading a module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

"your module
> will be loaded automatically when a user uses your module (thro system
> call)"
u mean when the user uses my new system call.

anyway
i checked /lib/modules/2.4.2-2/ directory
there is no misc directory under it
so i created a directory in the name "misc" and put my module inside that 
directory and called the system call using a user program it didnt work.I 
wonder how the kernel will know which module to be loaded.
Please clarify it.I m totally lost.

thanks and regards,
mohan.

On Thursday 04 October 2001 14:13, you wrote:
> Hi,
>
> If you want your module to be loaded automatically, then place your module
> inside the "/lib/modules/<version>/misc" directory, so that your module
> will be loaded automatically when a user uses your module (thro system
> call). Also this module will be automatically unloaded once when it not in
> use.
>
> Hope it helps.
>
> Warm regards,
> Mouli
>
> "C.Mohanasundaram" wrote:
> > thanks for ur quick response Mr.mouli
> >
> > the reason why want the module concept is i m not allowed to recompile
> > the kernel. Actually we are adding a patch kind of a thing for the kernel
> > that comes with RedHat 7.1(2.4.2-2).The user programs should be able to
> > use the new system call.
> > Is there a way to accomplish that.
> > I tried modifying /etc/rc.d/rc.sysinit adding a line
> > "insmod mymod.o"
> > it solves my problem
> > but as our's is a product i m looking for a more elegent solution.
> >
> > thanks and regards,
> > mohan.
> >
> > On Thursday 04 October 2001 11:40, you wrote:
> > > Hi,
> > >
> > > If you want your system call to be present all the time, then why do
> > > you want the module concept? Just add your entry in "entry.S" file and
> > > also in "asm/unistd.h" file so that your system call becomes a
> > > permanent addition in the OS. But think twice before doing this, since
> > > the goal you want to achieve
> > > can be accomplished through other means like a driver.
> > >
> > > Warm regards,
> > > Mouli.
> > >
> > > ---------------------------------------------------
> > > "If you want a thing well done, do it yourself."
> > >  -- Charles Haddon Spurgeon
> > > ---------------------------------------------------
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: owner-kernelnewbies@nl.linux.org
> > > [mailto:owner-kernelnewbies@nl.linux.org]On Behalf Of C.Mohanasundaram
> > > Sent: Thursday, 4 October 2001 11:14 AM
> > > To: kernelnewbies@nl.linux.org
> > > Subject: loading a module
> > >
> > >
> > > Hi all,
> > >
> > > I wrote a system call and loaded the module using insmod from my user
> > > land C program and called the system call. Everything worked fine.I
> > > tried all these as a root.But if i want to try this as some other user
> > > i know i wont be able to load the module.Is there a way to overcome
> > > this.The main idea is all the users should be able to use the new
> > > system call.Is there a way like loading the module at the boot time or
> > > something so that it will be available all the
> > > time and when the machine is shutdown it should be unloaded.
> > >
> > > thanks and regards,
> > > mohan.
> > >
> > > -
> > > Kernelnewbies: Help each other learn about the Linux kernel.
> > > Archive:       http://mail.nl.linux.org/kernelnewbies/
> > > IRC Channel:   irc.openprojects.net / #kernelnewbies
> > > Web Page:      http://www.kernelnewbies.org/
> >
> > -
> > Kernelnewbies: Help each other learn about the Linux kernel.
> > Archive:       http://mail.nl.linux.org/kernelnewbies/
> > IRC Channel:   irc.openprojects.net / #kernelnewbies
> > Web Page:      http://www.kernelnewbies.org/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux