Help in 'kernel_execve'

Sam Ravnborg sam at ravnborg.org
Mon Jun 4 10:04:51 CDT 2007


On Mon, Jun 04, 2007 at 05:40:44PM +0530, biswa.nayak at wipro.com wrote:
> 
> > -----Original Message-----
> > From: Sam Ravnborg [mailto:sam at ravnborg.org] 
> > Subject: Re: Help in 'kernel_execve'
> > 
> > On Mon, Jun 04, 2007 at 12:57:06PM +0530, biswa.nayak at wipro.com wrote:
> > > 
> > > Hi
> > > I am currently trying to understand the boot sequence of Linux.
> > > 
> > > In the kernel, the 'init' thread after the system is setup for the 
> > > user processes it tries to spawn the first user process using 
> > > 'kernel_execve'
> > > 
> > > Now to test this I have written a small module, which when inserted 
> > > will spawn a user process from my home directory.
> > > 
> > > Now, when I compile the module I get error messages that
> > > 
> > > WARNING: "kernel_execve" [/c/test/skel.ko] undefined!
> > > 
> > > Why is this happening? Even after I exported the symbol 
> > 'kernel_execve'
> > > in the file
> > > <linux>/arch/i386/kernel/sys_i386.c
> > > I am still seeing the same message.
> > > 
> > > Is something else going in the back ground which I don't understand?
> > 
> > Please post your code + Makefile + command used to build the module.
> 
> Please find the attched module named skel.c and Makefile.
> To compile the module I use "make -C <Path_to_linux> M=`pwd` modules"
> 
> > Did you build the modified kernel? From the warning is does 
> > not like this.
> Yes My linux version is Linux-2.6.20.4

That does not look like a kernel you compiled yourself.
Did you really execute make in the <Path_to_linux> dir?
Otherwise your added export will not help you.

> 
> [biswa at nerdbox test]$ uname -a
> Linux nerdbox.nerdbox 2.6.20.4 #1 SMP Sat Jun 2 17:49:20 IST 2007 i686
> i686 i386 GNU/Linux
> 
> [biswa at nerdbox test]$ cat /proc/kallsyms | grep kernel_execve
> c01072ea T kernel_execve
This does not tell is a symbol is exported or not.
Try to look into modules.symvers wich list all exported functions.

	Sam


More information about the Kernel-mentors mailing list