This is great! I think it could have uses far beyond the Raspberry Pi. As someone who's worked in the consumer electronics industry for years, I think we desperately need to rethink our approach to Linux-based electronics with respect to both the userland and the primary application. A legacy-free framework written in a safe language could go a long way to improving our currently lousy reputation with respect to secu…
Shameless self-promotion: also take a look at https://github.com/u-root/u-root :) (The gokrazy and u-root people all work at Google, I just contacted them to see if we can help each other. Not a competing project.)
Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
41–50 of 90 posts
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#42Earlier quoted context omitted.
Go is memory-safe. See also https://en.wikipedia.org/wiki/Memory_safety
Go is not memory safe (though is certainly safer than C++). Various Go constructs like interfaces and slices are implemented via non-atomic multiword structs, and data races may result in invalid values leading to memory corruption, etc. See https://blog.stalkr.net/2015/04/golang-data-races-to-break-m...
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#43Earlier quoted context omitted.
Shameless self-promotion: also take a look at https://github.com/u-root/u-root :) (The gokrazy and u-root people all work at Google, I just contacted them to see if we can help each other. Not a competing project.)
Any relation to https://github.com/u-boot/u-boot ?
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#44This is great! I think it could have uses far beyond the Raspberry Pi. As someone who's worked in the consumer electronics industry for years, I think we desperately need to rethink our approach to Linux-based electronics with respect to both the userland and the primary application. A legacy-free framework written in a safe language could go a long way to improving our currently lousy reputation with respect to secu…
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#45Earlier quoted context omitted.
Go is not memory safe (though is certainly safer than C++). Various Go constructs like interfaces and slices are implemented via non-atomic multiword structs, and data races may result in invalid values leading to memory corruption, etc. See https://blog.stalkr.net/2015/04/golang-data-races-to-break-m...
Yours is a stricter and not-commonly-used definition of "memory safe", which typically means "in the C sense" i.e. pointer arithmetic and bounds checking. Go is certainly memory safe by the typical definition.
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#46Earlier quoted context omitted.
Shameless self-promotion: also take a look at https://github.com/u-root/u-root :) (The gokrazy and u-root people all work at Google, I just contacted them to see if we can help each other. Not a competing project.)
Any relation to https://github.com/u-boot/u-boot ?
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#47This is great! I think it could have uses far beyond the Raspberry Pi. As someone who's worked in the consumer electronics industry for years, I think we desperately need to rethink our approach to Linux-based electronics with respect to both the userland and the primary application. A legacy-free framework written in a safe language could go a long way to improving our currently lousy reputation with respect to secu…
Nerves is based on a Buildroot core but most of the system is built with Elixir and BEAM/OTP. It's fantastic having a high level language built for robustness and reasonable security. Still, I have dreams of porting BEAM to Redox OS one day [2] and replacing the C userland-bits with Rust-bits. Especially if you could represent the micro-kernel services as actors. That would be amazing!
1: https://nerves-project.org/ 2: https://github.com/redox-os/redox
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#48Earlier quoted context omitted.
Go is not memory safe (though is certainly safer than C++). Various Go constructs like interfaces and slices are implemented via non-atomic multiword structs, and data races may result in invalid values leading to memory corruption, etc. See https://blog.stalkr.net/2015/04/golang-data-races-to-break-m...
Yours is a stricter and not-commonly-used definition of "memory safe", which typically means "in the C sense" i.e. pointer arithmetic and bounds checking. Go is certainly memory safe by the typical definition.
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#49This is great! I think it could have uses far beyond the Raspberry Pi. As someone who's worked in the consumer electronics industry for years, I think we desperately need to rethink our approach to Linux-based electronics with respect to both the userland and the primary application. A legacy-free framework written in a safe language could go a long way to improving our currently lousy reputation with respect to secu…
A large portion of the recent widely exploited NAT box / IP camera vulnerabilities and malware are exploiting logic bugs, backdoors and default passwods - instead of memory safety bugs. I agree memory safe systems are needed, but nontechnical changes are also needed to fix the widespread IoT vendor negligence.
gokrazy generates strong passwords by default and listens only on private IP addresses by default to reduce the attack surface.
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#50Earlier quoted context omitted.
It's everything the kernel doesn't do. In general, that means the surface with which you interact as a user. So if you're used to using a terminal, your SSH connection, your Bash session, are all userland programs (that use kernel features to do things). You can think of it as kernel is a framework like Rails and userland stuff is developers using and expending the interfaces... sort of. When your computer runs headl…
So it's a distribution ? ... that will have security issues, require updates, distribution maintenance, and all that stuff they claim is unacceptable ?
Updates are easy to fully automate with gokrazy (and I’ve been using that mechanism for a year at this point) because assembling a new image and installing it over the network is just one simple command. New kernel and firmware versions are provided automatically once they are verified to boot on real hardware.
There is no maintenance aspect in the actual installations (i.e. you don’t need to SSH into them, ran commands to update, etc.) — the root file system is read-only, and an update overwrites it completely. Unless the applications you want to use with gokrazy introduce state, gokrazy defaults to being stateless.
Hope that clarifies things, let me know if you have further questions.