From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 20:20:40 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 30A5916A41F for ; Mon, 8 Aug 2005 20:20:40 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: from episec.com (episec.com [69.55.237.141]) by mx1.FreeBSD.org (Postfix) with SMTP id C988B43D48 for ; Mon, 8 Aug 2005 20:20:39 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: (qmail 44169 invoked from network); 8 Aug 2005 20:20:39 -0000 Received: from episec.com (HELO crypto.iownanisp.com) (69.55.237.141) by episec.com with SMTP; 8 Aug 2005 20:20:39 -0000 Received: from 199.172.169.7 (auth. user edelkind@episec.com) by crypto.iownanisp.com with HTTP; Mon, 08 Aug 2005 20:20:38 +0000 To: freebsd-hackers@freebsd.org Date: Mon, 08 Aug 2005 20:20:38 +0000 X-Mailer: IlohaMail/0.8.12 (On: crypto.iownanisp.com) In-Reply-To: <20050808191910.GA91484@skatecity> From: "ari edelkind" Bounce-To: "ari edelkind" Errors-To: "ari edelkind" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Message-Id: <20050808202039.C988B43D48@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: Mon, 08 Aug 2005 20:20:40 -0000 On 8/8/2005, "alexander" wrote: [...] >i386_set_ioperm(2) states that this procedure is a system call. So it should= be >easily accessable through assembly language and it's specific syscall id. >Unfortunately I wasn't able to find the syscall id in any of the >syscalls.master files that are part of the source tree. > > states that this is a sysarch specific syscall for i386 >(hence the i386_*). The following definitions are being made: > >#define I386_GET_IOPERM 3 >#define I386_SET_IOPERM 4 > >These syscall numbers however are already taken by read(2) and write(2). So >how can I make use of these i386 specific syscalls? Is it even possible? If you're unsure of how a function is called, you can always check the C library, under 'src/lib/libc/'. I won't repeat john baldwin's answer, but it's exactly what you'd find there. That said, C library calls are no more difficult to perform from assembly language than system calls, so long as you're willing to link in the standard C library. If you're trying to be more portable, then unless you have specific reasons for not doing so, perhaps it's something you'd like to consider. ari