From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 16 07:53:31 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E33816A4CF for ; Sun, 16 Nov 2003 07:53:31 -0800 (PST) Received: from web21409.mail.yahoo.com (web21409.mail.yahoo.com [216.136.232.79]) by mx1.FreeBSD.org (Postfix) with SMTP id 1305F43FBD for ; Sun, 16 Nov 2003 07:53:30 -0800 (PST) (envelope-from zkzklj@yahoo.com) Message-ID: <20031116155330.42894.qmail@web21409.mail.yahoo.com> Received: from [129.130.5.229] by web21409.mail.yahoo.com via HTTP; Sun, 16 Nov 2003 07:53:30 PST Date: Sun, 16 Nov 2003 07:53:30 -0800 (PST) From: Kai Zhu To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Questions on intercepting execve syscall X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2003 15:53:31 -0000 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