Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
tedunangst
on Feb 2, 2021
|
parent
|
context
|
favorite
| on:
Go 1.16 will make system calls through Libc on Ope...
You should perhaps look into the history of the mmap syscall arguments.
jart
on Feb 2, 2021
[–]
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?
tedunangst
on Feb 2, 2021
|
parent
[–]
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: