Date: Sun, 16 Nov 2003 13:51:45 -0800 (PST) From: Kai Zhu <zkzklj@yahoo.com> To: Murat Balaban <murat@enderunix.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Questions on intercepting execve syscall Message-ID: <20031116215145.33059.qmail@web21407.mail.yahoo.com> In-Reply-To: <20031116201323.GA26716@enderunix.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks Murat! I have tried your example, and fixed the problem of my code accordingly. Murat Balaban <murat@enderunix.org> wrote: Hi, It might be that you have some bad address in the execve index of sysent array. See http://www.enderunix.org/murat/linux_subexec/linux_subexec.c for a simple example. PS: don't mind the naming :). On Sun, Nov 16, 2003 at 07:53:30AM -0800, Kai Zhu wrote: > Hello all, > > I am writing a KLD module to intercept execve() as following: > > static int my_execve(struct thread *td, struct execve_args *uap) > { > return(execve(td,uap)); > } > > As you can see, I first just want to make sure that my_execve won't affect the original execve, then I will add some new logic in my_execve before returning to execve(). > After kldload with this module, I always get "Bad address" error if I use any command like ls, cd, etc. > > Does anyone know where my problem is? Thanks! > > > --------------------------------- > Do you Yahoo!? > Protect your identity with Yahoo! Mail AddressGuard > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- "When all else fails, read the instructions -- Murphy's Technology Laws" Murat Balaban http://www.enderunix.org --------------------------------- Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031116215145.33059.qmail>