From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 20:27:24 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 376E616A430 for ; Tue, 9 Aug 2005 20:27:23 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94933441C0 for ; Tue, 9 Aug 2005 19:26:15 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 21481 invoked from network); 9 Aug 2005 21:26:13 +0200 Received: from p508ffce4.dip.t-dialin.net (HELO localhost.skatecity) (80.143.252.228) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 9 Aug 2005 21:26:13 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j79JPVX5019365 for ; Tue, 9 Aug 2005 21:25:31 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j79JPVpp019364 for freebsd-hackers@freebsd.org; Tue, 9 Aug 2005 21:25:31 +0200 (CEST) (envelope-from arundel) From: alexander Date: Tue, 9 Aug 2005 21:25:30 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050809192530.GA19230@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050809133109.GA15300@skatecity> <20050809154541.C057243D45@mx1.FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050809154541.C057243D45@mx1.FreeBSD.org> Subject: Re: Using sysarch specific syscalls in assembly? 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: Tue, 09 Aug 2005 20:27:25 -0000 On Tue Aug 9 05, ari edelkind wrote: > > You need to push a _pointer_ to a structure as your second argument to > sysarch(2). This means something more along the lines of: > > ioperm_args dd 378h > dd 3 > dd 1 > > argp dd ioperm_args > > [...] > push dword argp > push dword I386_SET_IOPERM > [...] > > > Get this wrong, and you'll have unpredictable results. > > ari Nope. That doesn't work. The carry flag is being set and eax is 16h, which is: [EINVAL] An invalid range was specified by the start or length arguments. (quoted from i386_set_ioperm(2)). Here is some data that might be usefull (c&p from ddd): %esp = 0xbfbfea58 mem(%esp) = 0x00000004 0x0804a214 mem(0x0804a214) = 0x0804a1fc mem(0x0804a1fc) = 0x00000378 0x00000004 0x00000003