Date: Tue, 9 Aug 2005 21:25:30 +0200 From: alexander <arundel@h3c.de> To: freebsd-hackers@freebsd.org Subject: Re: Using sysarch specific syscalls in assembly? Message-ID: <20050809192530.GA19230@skatecity> In-Reply-To: <20050809154541.C057243D45@mx1.FreeBSD.org> References: <20050809133109.GA15300@skatecity> <20050809154541.C057243D45@mx1.FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050809192530.GA19230>
