Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 5y ago · link · parent

I don't think that (3) is true.

comment 5y ago · link · parent

Yeah, kinda similar to rowhammer. I was just saying the other day that these exploit techniques are totally viable, but there's not much point - privesc is trivial on any desktop environment (linux or Windows, maybe less on osx), and usually not too hard on servers either. Fancy exploits aren't worth it when operating systems are so vulnerable to local attackers.

That said, the mitigations are assurances, and it also lets us point a finger at intel and say "fix your shit you just caused a global performance regression".

comment 5y ago · link · parent

Got it - thanks, I'd never really considered that.

comment 5y ago · link · parent

Something new is likely to try to correct perceived mistakes in something old. It shouldn't be taken as aggressive to try to say that one approach is better than another tbh.

comment 5y ago · link · parent

Why not?

comment 5y ago · link · parent

> Having a vast amount of bolted-on cruft with inconsistent design principles makes a language pretty horrible.

From what I can tell the vast majority of changes to Rust are small things like "Adding a method to Vec". These aren't really the type of things that turn into cruft/ radically change the language, but we also don't have to wait years for them.

comment 5y ago · link · parent

Yep, you nailed it.

comment 5y ago · link · parent

What you're arguing for is task preemption, and it has a global cost. If you're willing to pay global costs, Rust is probably not the right language for you.

comment 5y ago · link · parent

You still get preemption at the thread level.

comment 5y ago · link · parent

The mutable state isn't explicit here (it's internal mutability), but it's the TcpStream.

In an actor system the TcpStream would be local to an actor. You'd say "parse_line" by sending it a message. That message would be processed to-completion before another message could be processed - even if there is yielding internally.

You could also wrap TcpStream with some sort of wrapper that doesn't expose its internal mutability - that would let the type system ensure there isn't shared mutability across tasks I think...

comment 5y ago · link · parent

> In Rust, if you're actually doing any compute work, you're stalling out the async system.

Just use threads? Or add explicit yields.

comment 5y ago · link · parent

It feels like the fundamental issue here is shared mutable state, and much of the solution is to just not have that.

I don't believe this requires a change to async-await though. It just means you want to wrap up your async-await in its own synchronization primitive, or just avoid the need for it.

This is easy to do with a channel system, or an actor system, where the queue is the synchronizing primitive. An actor's message handler can internally be asynchronous, so long as it processes messages one at a time (but it can yield during processing to another actor).

We can get actors in rust pretty trivially imo. It's just a task with state and a message interface.

comment 5y ago · link · parent

325M is a shitload of money. I'm not making a judgment on if it's "enough" or a good sign or whatever. I'm just saying it's an insane amount of money.

comment 5y ago · link · parent

IDK, on the one hand it's a late round. On the other, as a CEO, the ability to just immediately raise 325 million dollars is both impressive and appealing. It's insane how far even one million dollars goes, 325 is mind boggling to me.

comment 5y ago · link · parent

> but you won’t be able to refactor logic-related parts “without a thought” on memory layout, even ownership, etc

This is sort of true, in that I might take reference where I used to take a value, or vice versa, but it's pretty trivial. It's extremely rare for borrow checking or memory layout to slow me down at all when refactoring.

comment 5y ago · link · parent

I learned rust just before 1.0. Probably one of my best decisions as an engineer. I now run a company where we're using it as the primary language for our services.

comment 5y ago · link · parent

Is it that hard to roll out MFA post-hoc? Feels like it shouldn't be, if it's a huge priority.

comment 5y ago · link · parent

I'm not knowledgeable on bittorrent but I feel like it should still be 'compatible' (with a shim layer) with S3, just maybe not natively.

comment 5y ago · link · parent

> There are bugs where you know exactly how to reproduce it, but it takes a long time (like 20 minutes or way longer) to reproduce the bug. This is hard because it’s hard to maintain your focus: maybe you can only try 1 experiment per day!

Ugh I hate these. It's almost worse than the "only happens sometimes". I'd rather walk down a longer path fast than a shorter path miserably slow.

> there’s no output at all

Hangs!! I hate hangs. I hate them. Crashes give information. Hangs could be so many things, but it is the absence of information.

> 4. one of your assumptions is wrong

#1 assumption I always make sure to check now is "is the code that's running actually from the source code I'm looking at". So may "impossible" bugs I run into are in fact impossible... in the codebase I'm looking at. And it turns out what's deployed is some other code where it is very much possible.

comment 5y ago · link · parent

> Anytime you're trying to color outside the tool's predefined lines you'll be hurting and spending ridiculous amounts of time.

This is exactly my experience. This comes up a lot when someone tries to take a 'DSL' approach to solve a general problem. "Look what you can do in just one simple line!", and it's true, one line and you've got something working.

Then you ask questions that weren't anticipated. How do I reuse the 5 lines I wrote here in another place? How do I write a test for those 5 lines? Can I log outputs in-between lines?

Those aren't exactly scary questions for any programming language - the answer is trivial, and what those languages solve for. But in these fancy no-code systems the answer is "you can't", more often than not. I care way more about how a system is going to evolve and how it will be maintained than solving trivial problems in one line.

They end up being completely unmaintainable and you lose more time than you save.

Frankly, coding isn't that hard. You don't need to be an expert to be effective, and there's a massive amount of tooling, knowledge-sharing, and investment already there.

All of this no-code shit is such a waste of time.

comment 5y ago · link · parent

> I am trying to argue that just by using a safer systems programming language, the security exploits don't go away.

No one's on the other side of that argument.

> Actix Web is a very good example

A very good example of a project using unsafe and the community rejecting that?

> just not zero effort to keep it safe.

No one said it was.

comment 5y ago · link · parent

This is an issue with no comments or response from DDG, and frankly not much of an explanation. Calling it "tricking" and insinuating that it's malicious seems totally unfair at this point.

comment 5y ago · link · parent

There are papers with Python kernels. Doesn't mean Python's a good language for writing a kernel. gVisor had to fight Go quite a lot, I think it was a huge mistake for them to choose it.

Ada is the only language you've mentioned that really fits IMO. One of the safe languages like P would be interesting but it's unproven in the space.

As for Ada, it's a sad story, but ultimately the language is unlikely to gain traction after too many early mistakes (particularly around licensing).

comment 5y ago · link · parent

I don't really agree, as someone who advocates for Rust usage.

> Ideally everything would just be in a single process.

Processes are an amazing boundary, probably the most powerful abstraction in existence.

> Why are new systems exposing the ability to dereference raw pointers to user programs?

This shouldn't be possible today - SMAP/SMEP are standard now.

> obsoleting the need for hardware isolation

I think if the last 3 years (sidechannel frenzy) has taught us anything, it's that software-isolation is extremely difficult. Even hardare isolation is difficult.

comment 5y ago · link · parent

FWIW I didn't scour pubmed, I had already read those studies quite some time ago. I didn't just google "metformin pubmed" or whatever.

comment 5y ago · link · parent

> It requires a human to actually look at the contents of the unsafe block.

Yes, that's an incredible capability - that a human can actually look to find bugs, that's insane, that's huge.

> Most of the time those humans are even rarer than those that validate unit tests are properly written.

Maybe, maybe. Is it rarer than fuzzing with sanitizers though? Or rarer than serious sandboxing efforts? When unsafe has been used gratuitously in Rust libraries the community has pushed back, to a fault.

I don't know what it is you want to try to argue here though. My questions were really targeted to someone at Google who can speak more directly to what I've been seeing for years.

comment 5y ago · link · parent

Yes they are, you just grep for "unsafe". Speaking from a career in information security, vuln research, and as a rust engineer.

comment 5y ago · link · parent

Yes, which means you can grep for vulnerabilities.
1
919293
164