News for hackers. Stuff that matters.
Re:Linux Syscall Support by oguz-ismail on Thursday November 07, 2024 @06:55AM (#42075873)
> It causes issues in eg openbsd where you can only call syscalls from libc

OpenBSD allows making syscalls from static binaries as well. If Go binaries are static, it shouldn't cause any problems.

Re:Linux Syscall Support by kbolino on Thursday November 07, 2024 @09:20AM (#42076848)
> OpenBSD allows making syscalls from static binaries as well.

Do you have a source for this? My Google searches and personal recollections say that OpenBSD does not have a stable syscall ABI in the way that Linux does and the proper/supported way to make syscalls on OpenBSD is through dynamically linked libc; statically linking libc, or invoking the syscall mechanism it uses directly, results in binaries that can be broken on future OpenBSD versions.

Re:Linux Syscall Support by cesarb on Thursday November 07, 2024 @10:22AM (#42077417)
> > OpenBSD allows making syscalls from static binaries as well.

> Do you have a source for this?

One article from 2019 about this can be found at https://lwn.net/Articles/806776/ (later updates https://lwn.net/Articles/949078/ and https://lwn.net/Articles/959562/). Yes, it does not have a stable system call ABI, but as long as your program was statically compiled with the libc from the same OpenBSD release, AFAIK it should work.

Re:Linux Syscall Support by kbolino on Thursday November 07, 2024 @11:46AM (#42078318)
I upvoted for the great links, but I still don't think a static binary that will break in the future is meeting the expectations many have when static linking.
Re:Linux Syscall Support by oguz-ismail on Thursday November 07, 2024 @10:35AM (#42077535)
Yeah. Do you have any information as to how/when the OpenBSD system call ABI has changed recently? I wouldn't expect that to happen very often.
Re:Linux Syscall Support by WhyNotHugo on Friday November 08, 2024 @09:23AM (#42087050)
Re:Linux Syscall Support by kbolino on Friday November 08, 2024 @10:33AM (#42087592)
In particular, from Theo de Raadt himself:

> we here at OpenBSD are the kings of ABI-instability

> Program to the API rather than the ABI. When we see benefits, we change the ABI more often than the API.

> I have altered the ABI. Pray I do not alter it further.

The term ABI here though is a little imprecise. I believe it just refers to the syscall ABI. So, it should be possible to make an "almost static" binary by statically linking everything except libc, and that binary should continue to work in future versions of OpenBSD.

Re:Linux Syscall Support by tolciho on Thursday November 07, 2024 @12:02PM (#42078503)
Go recently got run through the wringer to remove syscalls (and various Go ports are probably still broken) due to pinsyscalls.