Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Apr 2002 21:16:04 -0400 (EDT)
From:      Kenneth Culver <culverk@alpha.yumyumyum.org>
To:        Peter Wemm <peter@wemm.org>
Cc:        John Baldwin <jhb@FreeBSD.ORG>, FreeBSD-CURRENT List <freebsd-current@FreeBSD.ORG>, <freebsd-hackers@FreeBSD.ORG>, Brandon S Allbery KF8NH <allbery@ece.cmu.edu>, Andrew Gallatin <gallatin@cs.duke.edu>
Subject:   Re: implementing linux mmap2 syscall 
Message-ID:  <20020424210936.S40254-100000@alpha.yumyumyum.org>
In-Reply-To: <20020424200635.J39942-100000@alpha.yumyumyum.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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-current" in the body of the message




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