Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2002 11:09:35 -0400 (EDT)
From:      Kenneth Culver <culverk@alpha.yumyumyum.org>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        freebsd-hackers@freebsd.org, <freebsd-current@freebsd.org>
Subject:   Re: implementing linux mmap2 syscall
Message-ID:  <20020423110747.C29188-100000@alpha.yumyumyum.org>
In-Reply-To: <15557.30571.834026.208654@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
>  > >  > Basically, linux_mmap2 takes 6 args, and this looks here like only 5 args are
>  > >  > making it in... I checked this because the sixth argument to linux_mmap2() in
>  > >  > truss was showing 0x6, but when I printed out that arg from the kernel, it
>  > >  > was showing 0x0. Am I correct here?
>  > >  >
>  > >  > Ken
>  > >
>  > > Yes.  According to http://john.fremlin.de/linux/asm/, linux used to
>  > > parse only 5 args but now it parses six.  Try adding:
>  > > 	  args[5] = tf->tf_ebp;
>  > >
>  > I don't think that arg is there:
>  >
>  > Apr 23 10:36:13 ken /kernel: tf->tf_ebp = -1077938040
>  >
>  > Ken
>
> My guess is that we're not doing something we should be doing in
> int0x80_syscall in order to get that last arg.  But I do not have
> enough x86 knowledge to understand how the trapframe is constructed,
> so I cannot tell what needs to be done.
>
> Perhaps somebody with more x86 fu can help.
>
> Sorry,

Crap, I don't know what's going on either, I was just looking at the asm
in src/sys/i386/i386/exception.s, but I'm not very good with asm either,
Can anyone help? I'm cross-posting to -current since nobody on hackers or
emulation is able to help.

Ken


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020423110747.C29188-100000>