Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2002 10:14:59 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Kenneth Culver <culverk@yumyumyum.org>
Cc:        freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org
Subject:   Re: implementing linux mmap2 syscall
Message-ID:  <15557.27747.802212.659760@grasshopper.cs.duke.edu>
In-Reply-To: <200204222313.29181.culverk@yumyumyum.org>
References:  <200204211525.08827.culverk@yumyumyum.org> <15556.6399.62081.426193@grasshopper.cs.duke.edu> <200204222313.29181.culverk@yumyumyum.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Kenneth Culver writes:
 > OK, I found another problem, here it is:
 > 
 > static void
 > linux_prepsyscall(struct trapframe *tf, int *args, u_int *code, caddr_t 
 > *params)
 > {
 > 	args[0] = tf->tf_ebx;
 > 	args[1] = tf->tf_ecx;
 > 	args[2] = tf->tf_edx;
 > 	args[3] = tf->tf_esi;
 > 	args[4] = tf->tf_edi;
 > 	*params = NULL;		/* no copyin */
 > }
 > 
 > 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;

Drew

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?15557.27747.802212.659760>