13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 5y ago · link · parent
`sudo sh -c "echo 1 > /proc/sys/kernel/unprivileged_userns_clone`
Basically user namespaces let you do the same thing as pid or network namespaces, but with users. This means you can have a "fake" root user. The Linux kernel, marvel of software that it is, is easily confused by this and basically hands you trivial privescs if you're this "fake" root user.
This problem is pretty much only getting worse because user namespaces are becoming more powerful whereas kernel security is staying the same (ie: not moving at all).
That's why it's gated in most distros by default.
comment 5y ago · link · parent
This is basically what I'm saying... at some point nothing is preemptive ie: at the instruction level.
> that's a huge part of my point about the beam not really being preemptive.
OK but I think that's really semantics, it doesn't really matter though. You are right that BEAM can't yield within an instruction or during FFI. If you think that means it isn't preemptive, ok, but as I said I think at some point you end up with "nothing is preemptive" and then "why do we have the word preemptive" and then "because it's useful to describe systems like BEAM".
> Yes, that's my point. In erlang the conceptual arrow goes (resiliency => not-really-but-kinda-like-actors). In these other systems, or at least the ones I've peeked at, like pony and bastion the logic goes (actors => underpants gnomes => something like erlang). It's completely backwards.
Sure, actors aren't "the point". They just satisfy important properties that are necessary for resiliency. Pony takes a very very different approach from Erlang. Bastion seems closer.
I don't think "distance from Erlang" is really important or interesting though. Inspiration from Erlang is present in many of these systems, whether they re-implement the exact concepts or not.
comment 5y ago · link · parent
At some level this is true of all systems - you can't yield in the middle of a `mov`, for example. But as Erlang is interpreted it doesn't rely on yield points. The caveat is that it does if you use CFFI.
> You can use ets tables to coordinate processes (but don't).
Yeah I'm sure there are endless ways to bypass the intended use of Erlang, I don't think it's really important. This is way different from Go where data is trivially shared across a channel.
> The raison d'etre of erlang processes is not really message passing concurrency, it's failure domain definition and failure domain bundling
Yes, this is true. The foundation of Erlang is based on earlier research that Armstrong cites in his thesis paper, such as the persistent process and transaction as the basis of system resiliency. But it's not a coincidence he landed on actors to express those things.
comment 5y ago · link · parent
Some things that would make it more like Erlang than Go (but that I won't bother to verify):
1. Go isn't really pre-emptive, it just has a lot of hidden yield points afaik
2. Go doesn't enforce message passing, Erlang obviously does
3. When you send a message to a goroutine that has panicked you hang and, potentially at some point, panic. In Erlang an actor dying can send out a final exit message that other actors (likely a supervisor) can subscribe to.
So yeah IDK. To me if it's got lightweight processes, pre-emption, and message passing, it's got everything that makes Erlang special. If it says it's inspired by Erlang I'm going to assume that, along with those things, it also shares goals like fault tolerance.
comment 5y ago · link · parent
> All processes running on Lunatic are preemptively scheduled and executed by a work stealing async executor.
Sounds like Erlang to me.
comment 5y ago · link · parent
The reason developers are paid a lot is because they're worth a lot. That's it.
IMO If you're a CEO that's what you sign up for. If you can't handle that, find another job.
comment 5y ago · link · parent
Someone more familiar with TPM 2.0 could likely answer this authoritatively, but my assumption is that it's the latter.
Properly leveraging TPM 2.0 features would likely be the best way to solve this problem.
comment 5y ago · link · parent
Best of luck with the research, I'm quite bullish on the work.
comment 5y ago · link · parent
Further, CHERI is not enough to achieve temporal memory safety, it only provides the primitive that one could use to implement an efficient, correct tracing GC.
Perhaps most importantly, one can not use CHERI today. It is just not an option. Memory safe languages exist, and have existed for quite some time.
Pointer tagging and other approaches like CHERI are very promising. Keeping in mind of course that they double the size of pointers and have a global runtime performance cost. Less ambitious but otherwise similar mitigations are already being adopted.
comment 5y ago · link · parent
You define the threat model for your application and then justify why you're safe. In this case we'd be adding an explicit point to ensure that there are controls for attackers who can exploit memory safety issues.
You could end up with controls like:
1. We sandbox our code, so even though it's C we feel that we're safe
2. We use a memory safe language to reduce the risk of memory safety issues
3. We sanitizer inputs before providing them to the program
etc etc
What ends up being accepted as legitimate would be up to the auditors/ generally a matter of consensus.
comment 5y ago · link · parent
https://blog.stalkr.net/2015/04/golang-data-races-to-break-m...
Here you can find a POC.
You could argue that this is contrived, but it's also not going to be fixed. This is in contrast to Rust, where there may be implementation flaws leading to unsafety in safe code, but the language retains the right to fix those, even if it breaks code.
Still, I think there's really no question that Go is a major step up over C and C++.
comment 5y ago · link · parent
This work was mandated for projects that were, in aggregate, likely billions of dollars.
comment 5y ago · link · parent
That's billions of dollars that will get slowly steered in the right direction.