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

> Did you mean "portable"? Because the ABI to the Linux kernel system calls is very stable.

I think the GP meant that the Linux syscall ABI is indeed very stable and always has been, as you say, but that the syscall ABI of other OSs is not. So Linux is "unusual" in that sense, not in the sense that its syscall ABI is stable now but wasn't in the past.



Sorry, yes, I misunderstood the comment.

AFAICT, SunOS (Solaris), BSD, and Darwin have stable kernel ABIs for the core (UNIX) system calls. I've never used the Mach syscalls on Darwin, but I can imagine those changing more often, because Apple does that. I would imagine that Windows supports 32-bit syscalls still pretty well...but I stopped using Windows in 2002, so tbh, not sure.


Darwin has always explicitly not had a stable kernel ABI (https://developer.apple.com/library/archive/qa/qa1118/_index...). Go tried to bypass the system libraries on macOS and it resulted in things breaking, so now they do use system libraries (https://github.com/golang/go/issues/17490).


I have a very different understanding of the situation; the best description of the situation I can find is https://utcc.utoronto.ca/~cks/space/blog/programming/Go116Op... (discussed at https://news.ycombinator.com/item?id=25997506 ) - from that article,

> The official API for Illumos and Solaris system calls requires you to use their C library, and OpenBSD wants you to do this as well for security reasons (for OpenBSD system call origin verification). Go has used the C library on Solaris and Illumos for a long time, but through Go 1.15 it made direct system calls on OpenBSD and so current released versions of OpenBSD had a special exemption from their system call origin verification because of it.


read is unlikely to change anytime soon on macOS but Apple can and does change its numbering for lesser-used but still very important system calls all the time.


They also change the syscall abi without touching the numbering. gettimeofday(2) is a pretty famous one there.

Then there’s also the Linux-specific issue of vDSO, which are not kernel code and to which the article applies in full (see: “debugging an evil ho runtime bug”).




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

Search: