> > 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. >
thank you. I didnt know about that. I added an extra pad arg and I'm still getting weirdness: p2 = __syscall(197, 0x100000, 4*4096, 7, MAP_ANON, -1, 0, 0); results in 1947 a.out CALL mmap(0x100000,0x4000,0x7<PROT_READ|PROT_WRITE|PROT_EXEC>,0x1000<MAP_ANON>,-1,0x7f7f00000000) vs straight call: 1947 a.out CALL mmap(0,0x10000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0) -- Tim Newsham | www.thenewsh.com/~newsham | @newshtwit | thenewsh.blogspot.com