zlacker

[parent] [thread] 16 comments
1. maskli+(OP)[view] [source] 2023-10-27 17:24:12
> It looks like golang is going to have to deal with — again — OpenBSD treating libc as the interface with the kernel instead of syscalls being the interface with the kernel.

Something they wouldn't have to do if they'd heeded the warnings they got since they first started going raw syscalls on non linux systems.

But as usual, go is uniquely american, only doing the right thing after it has tried everything else.

replies(4): >>PrimeM+v1 >>tadfis+y3 >>FullyF+lx >>akira2+mS
2. PrimeM+v1[view] [source] 2023-10-27 17:30:26
>>maskli+(OP)
> go is uniquely american, doing the right thing after it has tried everything else.

That doesn't seem like anything common to an American way of doing things. What an odd statement.

replies(1): >>kstrau+R2
◧◩
3. kstrau+R2[view] [source] [discussion] 2023-10-27 17:36:47
>>PrimeM+v1
It's a play on a quote often attributed to Winston Churchill: https://quoteinvestigator.com/2012/11/11/exhaust-alternative...
replies(1): >>arp242+LR
4. tadfis+y3[view] [source] 2023-10-27 17:39:42
>>maskli+(OP)
You could also describe it as doing the sane thing (avoiding hardcoding against the libc ABI through FFI) until the only sane option is removed. Did you know many libc APIs are preprocessor macros?
replies(1): >>maskli+l4
◧◩
5. maskli+l4[view] [source] [discussion] 2023-10-27 17:45:23
>>tadfis+y3
> You could also describe it as doing the sane thing (avoiding hardcoding against the libc ABI through FFI)

No, you could not.

On pretty much every system but linux the libc (or equivalent) is the officially supported API to the kernel. Bypassing it is not supported and thus definitionally can not be sane, that's like declaring that doing the sane thing is avoiding hardcoding against the front door and entering your home through the roof instead. The front door is what you're supposed to use, do hardcode against it. Same with libc.

And Go has been going "ouch" then putting its fingers straight back in the socket from the start, as it keeps trying to work around libcs on all the platform where it is not supported.

replies(3): >>dfox+Mv >>tadfis+ci1 >>clhoda+ru1
◧◩◪
6. dfox+Mv[view] [source] [discussion] 2023-10-27 20:07:00
>>maskli+l4
On linux the stable API and ABI that you are supposed to use is also just libc. But due to various reasons people think that the libc ABI is less stable than how stable it really is.

Edit: NT with its split OS API dll and separate libc is its own can of worms. You can have multiple instances of libc in the same address space, which among other things implies that you cannot safely malloc() in one module and free() in another, and don't even think about passing FILE* around.

replies(1): >>Grumpy+vH
7. FullyF+lx[view] [source] 2023-10-27 20:16:52
>>maskli+(OP)
I don't use Go, but I had the exact same reaction; C is the source of most of the problems and this is just codifies the use of C. The whole thing has a security by obscurity smell.
replies(1): >>MrRoll+DM
◧◩◪◨
8. Grumpy+vH[view] [source] [discussion] 2023-10-27 21:10:27
>>dfox+Mv
Linux doesn’t have an official libc. Raw syscalls are its only official API.
◧◩
9. MrRoll+DM[view] [source] [discussion] 2023-10-27 21:35:19
>>FullyF+lx
Your comment seems to conflate a language with an ABI. To what end? What is inherently insecure about the C ABI? Why is using a syscall interface any more secure?
replies(1): >>FullyF+H51
◧◩◪
10. arp242+LR[view] [source] [discussion] 2023-10-27 22:07:56
>>kstrau+R2
Bizarre nationalistic "they're doing it because they're Americans" rantings are still not okay even if they're a "play on a quote". I can "play" with all sorts of quotes to say all sorts of idiotic things.
replies(1): >>kstrau+uU
11. akira2+mS[view] [source] 2023-10-27 22:11:24
>>maskli+(OP)
> go is uniquely american, only doing the right thing after it has tried everything else.

Perhaps this is why most innovations are American. We don't automatically fall for the bully pulpit of the gnostic class.

> Something they wouldn't have to do

Yea, but they'll get it done anyways, and the language will continue to be excellent. I'm sure Google can absorb the engineering challenge without subtracting anything from us or other languages.

◧◩◪◨
12. kstrau+uU[view] [source] [discussion] 2023-10-27 22:24:51
>>arp242+LR
I guess. I'm proudly American and I thought it was funny, but everyone has different tolerances.
◧◩◪
13. FullyF+H51[view] [source] [discussion] 2023-10-27 23:59:42
>>MrRoll+DM
I'm not conflating anything. Why do you need to burden a language with a C ABI when you can just invoke the language independent mechanism directly?
replies(1): >>samus+0F1
◧◩◪
14. tadfis+ci1[view] [source] [discussion] 2023-10-28 01:43:05
>>maskli+l4
My point is that libc as the only system API is not a sane choice, and appeals to tradition don't make it less insane.
replies(1): >>maskli+XO1
◧◩◪
15. clhoda+ru1[view] [source] [discussion] 2023-10-28 04:01:47
>>maskli+l4
It's not about hardcoding, it's about the fact that libc isn't even an ABI, really. It's a C source API, which compiles down to a secret ABI that you can't know (you just have to expand all the macros and see what you get). That's sort of OK if every compiled program in the world is written in C, but as soon as you want to start writing in another language it kind of falls apart.
◧◩◪◨
16. samus+0F1[view] [source] [discussion] 2023-10-28 06:38:05
>>FullyF+H51
The C ABI is influenced by C's type model, but so is OpenBSD itself. There is no truly language independent mechanism. If a programming language implementation can't interface with a C ABI, how can it interface with the language independent mechanism?
◧◩◪◨
17. maskli+XO1[view] [source] [discussion] 2023-10-28 09:01:49
>>tadfis+ci1
> My point is that libc as the only system API is not a sane choice

That might be your new point after having yeeted the goalposts out, but it's definitely not your original statement.

> and appeals to tradition don't make it less insane.

This is not an appeal to tradition, it's how things work. If the authors and maintainers of the system tell you something is the supported API, wilfully bypassing that supported API is not "the sane thing", especially when you complain that your bypass blows your face off down the line, then you're an asshole too.

[go to top]