Re: do_execve().

From: Brian Gerst (bgerst@quark.vpplus.com)
Date: Fri May 05 2000 - 08:08:29 EST


Paul Burkacki wrote:
>
> Greetings,
>
> I am tryimg to execute do_execve() from within a driver to
> trigger execution of a script in user mode. The call fails
> with -14 (EFAULT, I believe). I *think* I am setting up all
> arguments for do_execve() correctly but, since I haven't found
> any examples of its use, I am not sure.
>
> Could anyone point me to where I could find exmples of how to
> correctly call do_execve()? I am particularly curious about
> envp and pt_regs.

You need to call kernel_thread() before you can use exec, and don't call
do_execve() directly. Look at exec_modprobe() in kernel/kmod.c for an
example of how this is supposed to be done.

--

Brian Gerst

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:17 EST