Tim Newsham wrote:
> I just noticed that the __syscall call is dropping the 6th argument
> (providing garbage) when I use it on amd64.  The attached program
> makes an mmap call "normally" and with __syscall.  Running the
> program in ktrace reveals that the last argument is garbage when
> using the __syscall entry, and not when using the "normal" entry.
> Is this known/expected behavior or a bug?

If you look at sys/kern/syscalls.master:
197     STD             { void *sys_mmap(void *addr, size_t len, int prot, \
                            int flags, int fd, long pad, off_t pos); }

There's a pad before any off_t syscall argument because 1993 or whatever.

Reply via email to