Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You should perhaps look into the history of the mmap syscall arguments.


4.2BSD System Manual specifies it as mmap(addr, len, prot, share, fd, pos). There are six arguments. My best guess is something went horribly wrong with off_t on big endian systems and that it somehow leaked into x86_64 system call abi. Do you know?


off_t needs 64bit alignment so registers get copied to the stack argument structure correctly on kernel entry. This is ancient voodoo.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: