13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 8y ago · link · parent
No it isn't.
If every vulnerability in every product turned into a "We've been breached" disclosure the industry would be a disaster.
Yeah, they didn't keep sufficient logs and they fucked up really badly there. Still silly to call it a breach.
comment 8y ago · link · parent
The 'escape hatch' here is the .by_ref() but you could, if it's critical, write wrappers that don't provide those escape hatches.
If it were critical that the reuse never happened you can make it impossible, which is really cool. But, by default, for most APIs, it's just generally more difficult to mess up.
There are a bunch of articles on session types out there, where you represent each state in a state machine as a separate type, with transition methods that consume the previous state. If the correctness touted in this article sounds appealing, I highly recommend reading about session types.
comment 8y ago · link · parent
As for a kernel just ending up as a bunch of unsafe, doesn't seem grounded in reality.
https://os.phil-opp.com/minimal-rust-kernel/
> Note that there's an unsafe block around all memory writes. The reason is that the Rust compiler can't prove that the raw pointers we create are valid.
[..]
> I want to emphasize that this is not the way we want to do things in Rust! I
[..]
> So we want to minimize the use of unsafe as much as possible. Rust gives us the ability to do this by creating safe abstractions. For example, we could create a VGA buffer type that encapsulates all unsafety and ensures that it is impossible to do anything wrong from the outside. This way, we would only need minimal amounts of unsafe and can be sure that we don't violate memory safety. We will create such a safe VGA buffer abstraction in the next post.
As is always the response to the "A kernel in rust would be just as unsafe as a kernel in C", the goal is to build safe abstractions.
So you have unsafe, plus some constraints that you enforce at a module level, which wraps the unsafety.
This is not perfect - you'll still write vulnerable unsafe code, I'm sure, sometimes. But the rest of your code can be built on top of it, and now your unsafe code can be the main target of your testing and verification.
We have no real rust kernel the size of Linux to compare to but I think there's plenty of reason to believe that it would have considerably fewer vulnerabilities and would make auditing far simpler.
comment 8y ago · link · parent
Iterators are a typical example of this.
vec![0, 1, 2, 3].into_iter() .filter(|x| x % 2 == 0) // Keep the evens .map(|y| y + 1 ) // Add 1 to elements .rev(); // Reverse the iterator
Adding intermediates would just add noise for code like this.
comment 8y ago · link · parent
You have to be willfully ignorant to read it otherwise.
As blatant support of this,
"People give up ability to say certain things in the name of inclusion, and then lose ability to think those things in the first place."
This is a clear testament that there are two sides and you must 'give up' something (ie: become a pushover) to not be an asshole.
comment 8y ago · link · parent
Many of his attacks, especially long ago, were quite vitriolic and very much not technical. Oftentimes they weren't rants, just flat out insults, short and mean (I remember, in particular, posts directed towards PaX). They weren't productive, there wasn't a brash technical take buried in them - they were just insults.
Many people seem to just remember snippets of his more popular, more recent rants, which sometimes have some technical take in there at the least, but also, in my opinion, cross well over the line into personal attacks.
Glad he's owning up to the fact that he has some serious social baggage to deal with. I don't foresee the linux kernel community changing much in the near term though.
comment 8y ago · link · parent
The reason I've chosen this is because I do not want to manage an OS. Patch management is something I am not interested in tackling - it's a hard problem and AWS has it down anyways.
There are other reasons as well (I find ephemeral systems very appealing), but this is the most significant.
comment 8y ago · link · parent
I'm curious what size packages people are loading in lambdas currently. My largest lambda is a 4.7MB zip.
If anyone has some anecdotal info on runtime + package size I'm super curious to hear.
> So if you have to use an RDBMS, but put a service that handles connection pooling in the middle, maybe an auto scaling container of some description simply to handle that would be great.
Not sure I understand this. If I put another service in between me and the database don't I just end up having to open connections to that service?
I have an Aurora instance my lambda talks to, and it creates a new connection every time, and that's a bummer so I'm curious about how I could optimize that patch.