From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 17 17:43:27 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0310106566B for ; Wed, 17 Sep 2008 17:43:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8400D8FC1D for ; Wed, 17 Sep 2008 17:43:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m8HHhL6H007809; Wed, 17 Sep 2008 13:43:21 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 17 Sep 2008 11:36:24 -0400 User-Agent: KMail/1.9.7 References: <046601c918cc$786cc8c0$970da8c0@jam.zenon.net> In-Reply-To: <046601c918cc$786cc8c0$970da8c0@jam.zenon.net> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809171136.24300.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Wed, 17 Sep 2008 13:43:21 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8270/Wed Sep 17 09:15:56 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: "Andrew N. Below" Subject: Re: amd64, COMPAT_IA32 & syscall diverts X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2008 17:43:28 -0000 On Wednesday 17 September 2008 09:51:22 am Andrew N. Below wrote: > Hi all. > > We have loadable kernel module with > several syscall intercepting functions > (e.g., sysent[SYS___sysctl].sy_call). > Earlier, this module was built and used > on i386 platform, now we have to run it > on amd64. For some reasons we have to > enable COMPAT_IA32 option in kernel. > > Our syscall wrapper sucessfully receiving > syscalls from amd64 binaries, but we have > nothing from old i386 binaries. > > Seems like these calls are made bypassing > our kernel module. > > Is there any way to handle them? > > OS is freebsd 6.3-stable. You have to patch the sysent[] array in the compat/freebsd. There currently isn't a really clean way of doing this (and there really should be). -- John Baldwin