lkml.org 
[lkml]   [2000]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: execve replacement.
On Wed, 4 Oct 2000, [iso-8859-1] Abel Muñoz Alcaraz wrote:

> Hi everybody,
>
> I have replaced the execve() kernel API with my own implementation but it
> doesn't work well.
>
> extern void * sys_call_table[]
>
> asmlinkage int (*system_execve)(const char *, const char **, const char
> **);
>

This is not the prototype of sys_execve(). It looks like this :

asmlinkage int sys_execve(struct pt_regs regs)

this syscall is a little more tricky to track than the others, because the
pt_regs is not a pointer here. That means you can't just stick in a call
inbetween like with most syscalls.

Instead you should just copy the code from sys_execve() and call do_execve
directly from the module (it is exported, so you can).

but - you will need to do this for all architectures as they differ

and are you really sure you need to do this ?

john




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

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.100 / U:7.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site