From owner-freebsd-hackers Wed Apr 24 18:19:25 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mailhub.yumyumyum.org (dsl092-171-091.wdc1.dsl.speakeasy.net [66.92.171.91]) by hub.freebsd.org (Postfix) with SMTP id EA58937B41C for ; Wed, 24 Apr 2002 18:19:07 -0700 (PDT) Received: (qmail 40305 invoked from network); 25 Apr 2002 01:16:04 -0000 Received: from dsl092-171-091.wdc1.dsl.speakeasy.net (66.92.171.91) by dsl092-171-091.wdc1.dsl.speakeasy.net with SMTP; 25 Apr 2002 01:16:04 -0000 Date: Wed, 24 Apr 2002 21:16:04 -0400 (EDT) From: Kenneth Culver To: Peter Wemm Cc: John Baldwin , FreeBSD-CURRENT List , , Brandon S Allbery KF8NH , Andrew Gallatin Subject: Re: implementing linux mmap2 syscall In-Reply-To: <20020424200635.J39942-100000@alpha.yumyumyum.org> Message-ID: <20020424210936.S40254-100000@alpha.yumyumyum.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > yeah, I did that already, and have been running with that since yesterday > :-P > > still not working right though... I think it has something to do with that > nargs thing... I'm checking that out now... > Ehh, apparently sy_narg is getting set correctly too: struct linux_mmap2_args { l_ulong addr; char addr_[PAD_(l_ulong)]; l_ulong len; char len_[PAD_(l_ulong)]; l_ulong prot; char prot_[PAD_(l_ulong)]; l_ulong flags; char flags_[PAD_(l_ulong)]; l_ulong fd; char fd_[PAD_(l_ulong)]; l_ulong pgoff; char pgoff_[PAD_(l_ulong)]; }; #define AS(name) (sizeof(struct name) / sizeof(register_t)) { AS(linux_mmap2_args), (sy_call_t *)linux_mmap2 } not that it really matters, the linux_prepsyscall is setting the params to null: 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; args[5] = tf->tf_ebp; *params = NULL; /* no copyin */ } so the code in syscall2 will not even bother to try to copy in the args... it just uses whatever linux_prepsyscall tells it to use, and completely ignores nargs... at least as far as I can tell... Ken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message