News for hackers. Stuff that matters.
Re:Uvloop: Fast Python networking by coderdude on Wednesday May 04, 2016 @02:46AM (#11626641)
It's the best of both worlds but doesn't shield you from the worst of one of the worlds. Untrusted input is still reaching code that has direct access to system memory. Hopefully not, anyway. But probably. Still, it's the way to go if performance is key.
Re:Uvloop: Fast Python networking by jgraham on Wednesday May 04, 2016 @03:28AM (#11626786)
These days you would probably want to write the parser part in Rust, with a small amount of unsafe code to implement a C-compatible API that could then be called from Python, or wherever. I did this for some regexp-based log parsing code written in Python, and saw a considerable (2-3x) performance win. The main outstanding issue is that Rust isn't as easy to distribute as C to random end users (e.g. it likely requires the user to have rustc installed for |pip install| to work, which is unlikely and not always possible through standard package managers).
Re:Uvloop: Fast Python networking by edraferi on Wednesday May 04, 2016 @06:41AM (#11627396)
Doesn't Conda help with that problem, allowing you to precompile rust extensions just like C extensions?
Re:Uvloop: Fast Python networking by haberman on Wednesday May 04, 2016 @03:08AM (#11626717)
Very true. Thankfully fuzzing tools are getting better all the time. LLVM's libfuzzer is great.
Re:Uvloop: Fast Python networking by coderdude on Wednesday May 04, 2016 @03:13AM (#11626735)
Absolutely it's a positive that this is an active area of research. One day these types of problems are going to be something future programmers joke about. Or don't even know existed.
Re:Uvloop: Fast Python networking by ericfrederich on Wednesday May 04, 2016 @02:25PM (#11630484)
I'd recommend to watch this: https://www.youtube.com/watch?v=y0hyqzR6hIY

He goes into detail about how these types of libraries are particularly difficult or impossible to fuzz. He uses OpenSSL as an example but I would imagine an http library being similar.

Re:Uvloop: Fast Python networking by haberman on Wednesday May 04, 2016 @03:46PM (#11631151)
> He goes into detail about how these types of libraries are particularly difficult or impossible to fuzz.

I just watched the video on 2x and I don't think that's a fair summary. He seems positive on fuzzing in general and mentions that fuzzing found two extremely tricky bugs in libsndfile and flac.

He does point out that there are some cases like OpenSSL that are particularly difficult to fuzz completely because they are encrypted and heavily stateful, creating transient keys on the fly and such. I don't think HTTP has this problem, for the most part.

Cool to see a video of Erik de Castro Lopo though -- I've worked with that guy since the early 2000s when I was working on Audacity (which uses his excellend libsndfile internally -- or at least did at the time).