6 ms·
...well, because of the primary shortcoming of the Go system: lack of standard infrastructure to manage the inevitable updates. Let's say I have replaced bind,
by dsr_ 11y ago
...well, because of the primary shortcoming of the Go system: lack of standard infrastructure to manage the inevitable updates.
Let's say I have replaced bind, unbound, ntpd, postfix, openssh, dovecot, snmpd and asterisk with Go-written equivalents. Three weeks later, there is a bug found in the standard Go TLS library.
My distro ships all the packages noted above, but not their Go-equivalents, so my work load now includes monitoring security-announce lists for eight different products, where before I monitored the security-announce list for my distro.
I need to be able to rebuild all eight systems myself, rather than getting automatic package updates to my test systems, and then promoting the packages through alpha and then production. Go is nicer than some other languages about that, but it builds binaries, not packages.
Next:
I'm pretty sure you can't build an snmpd without ASN.1 parsing, and ASN.1 parsing is the very model of a fraught and perilous splatter-fest. Will the Go ASN.1 parser be better maintained than libtasn? Maybe, maybe not. Repeat this for everything else.
Can these problems be solved? Sure. Are they ready right now? Not that I'm aware of. Please enlighten me, if you have good answers.
- tptacek 11y agoNo. I've written SNMP from scratch in Ruby, Python, and C++. DER ASN.1 for X.509 might be treacherous (simply in the sense that any mistake you make at all will be ruinous), but that's just not the case for SNMP's BER. The whole point of using Rust or Go instead of C is that the "peril" of implementing things like ASN.1/BER is pretty much eliminated. As for your former point: I don't follow. Go's deployment infrastructure is a superset of C's, and, if you're a masochist, almost everything in C's deployment toolkit is available to Go projects as well.
- dsr_ 11y agoThe viewpoint you were espousing was, if I understand correctly: I should replace all my existing services with Go/Rust equivalents, unless they handle packets directly. My objection is that you are advocating this in the same narrow-focused way that people advocate node with npm, python with pip, ruby with gem: little or no cooperation with the whole system is available yet. This is perfectly fine from the point of view of a group which does one thing, but not from my point of view, running large numbers of diverse systems. When libfoo gets updated, all N packages on the system which use it via dynamic linking gets the benefit as soon as the packages restart. This is highly desirable. If Go-libfoo is updated, each of those N packages needs to be rebuilt, but I don't have a programmatic way of finding out. If there are N teams developing those packages, some of them will be faster off the mark than others, and now I have a window of vulnerability that is larger than the one I had when I could update libfoo on day 1. You have multiplied my workload. I won't do that without a really good reason.
- nickpsecurity 11y agoHe gave you a really good reason: knocking out most severe, low-level errors in high-usage, critical services. You'll put work in for the risky ones. Why not the low-risk alternatives...
- pjmlp 11y agoStatic linking is also a thing in C. Apparently gcc seems to be the only C compiler lacking this capability, thanks to glibc. Also, you can use dynamic linking in Go since version 1.5.
- baq 11y agoi don't know if it counts, but there's musl-gcc, right?
- bogomipz 11y agocurious, is there no glibc solution? Its just the libnss* that requires dynamic linking?
- steveklabnik 11y agohttps://sourceware.org/glibc/wiki/FAQ#Even_statically_linked_programs_need_some_shared_libraries_which_is_not_acceptable_for_me.__What_can_I_do.3F https://sourceware.org/glibc/wiki/FAQ#Even_statically_linked...
- vbernat 11y agogcc has no problem with static linking. glibc can be statically linked (with gcc or clang) except the pluggable parts, which is NSS. How would you reconcile static linking and plugins?
- pjmlp 11y agoBy making use of plugin selection at compile time, like we used to do when dynamic linking wasn't available in mainstream OSes.
- solidsnack9000 11y ago> Go's deployment infrastructure is a superset of C's... That is true; but updates to native libs that would propagate to C, Python &al. will generally not propagate to Go because, like Java, Go eschews native bindings.
- noja 11y agoSo you install the go equivalents from your distro. If your distro doesn't have them, you vote for them to add them (or go through whatever process your distro has).
- alanctgardner3 11y agoThe repo maintainers are going to be on the hook to rebuild every dependency every time any package in the dependency chain changes. That sounds like a nightmare versus the current scenario where only one package gets revved when a library has a bug.
- dcposch 11y agoNot every time a library changes, only every time one has a security bug.
- noja 11y agoSo either the repo maintainers do it, or they stop being relevant (for this use case). Or someone else comes along to fill the gap.
- cyphar 11y agoIf you have an automated build system (like OBS -- the Open Build System used by openSUSE) where dependencies are rebuilt automatically and security fixes can be pushed to maintainence automatically.
- tobz 11y agoHaving the shared library that can be replaced by itself, instead of deploying N things, is nice. Not sure it's the end of the world, but it's nice. On the flipside, though, this is probably a case where using something like Rust could be excellent: stronger language support for eliminating entire classes of bugs but also able to be compiled down to something that can be a shared library. I'm not an ML expert, but reading about the things the Mirage project has done related to TLS, leveraging OCaml to provide compile-time guarantees, sounds very exciting. Rust feels like it could be that bridge. Start rewriting core libraries in it: cleaning up old code, removing dead code, avoiding bugs by virtue of the language/compiled, in one fell swoop.
- traverseda 11y agohttps://github.com/whyrusleeping/gx https://github.com/whyrusleeping/gx is pretty cool. You could handle it the same way that python handles it. Don't rely on a distro, have each person package their own stuff.
- cstrahan 11y agoRegarding packaging, I mostly agree. However, I would highly recommend looking into the Nix package manager and our packages (and packaging infrastructure). Updating one of our go packages is sufficient for all other go packages to be built with the new version. So that would mostly solve the problem you're talking about. https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/go-packages.nix https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/... (Sorry for being light on details; typing from phone)
- IshKebab 11y ago> Let's say I have replaced bind, unbound, ntpd, postfix, openssh, dovecot, snmpd and asterisk with Go-written equivalents. Three weeks later, there is a bug found in the standard Go TLS library. > My distro ships all the packages noted above, but not their Go-equivalents, so my work load now includes monitoring security-announce lists for eight different products, where before I monitored the security-announce list for my distro. But say your distro includes the Go versions, but not the C ones... You're basically complaining that your distro doesn't include everything.