BugsBunnySan | 8 years ago | on: How Dirty COW works from the Linux kernel’s perspective
BugsBunnySan's comments
BugsBunnySan | 9 years ago | on: Write a Shell in C (2015)
I guess, I might've been too optimistic about the power of parser generators. Still, I think if someone were to start implementing a shell, I'd advise them to start with the grammer/lexer/parser part, either implementing them themselves or trying some of the generators. I think it's the right way to go about it (just wasn't what I thought I'd be doing when implementing a shell, at the time)
I did do a few things with parser generators though. Granted, nothing (yet) as complex as bash or even just POSIX, but still, they each had their own little trickinesses. E.g.:
https://github.com/BugsBunnySan/edl (ANTLR4 / Python)
https://github.com/BugsBunnySan/Phat-Agnus (YAPP / Perl)
BugsBunnySan | 9 years ago | on: Write a Shell in C (2015)
Which made the whole project boring to me, since it would've just come down to 3 well-defined, already solved problems: 1. write shell language grammar file 2.Use something like flex/bison (nowadays maybe antlr, or whatever) to generate the shell language parser 3. Implement the behaviour of the shell as reactions to parser events
At that wasn't interesting because: 1. I wanted to be POSIX compatible, the POSIX shell langauge is well defined, writing the grammar for that would've been boring 2. Boring by design, the whole point of using parser generators is making compiler/interpreter writing an easy, boring task 3. Arguably, this would've been interesting, to see how to do it. But if you already have a deep understandidg how a *nix shell does what it does, not that interesting anymore...
BugsBunnySan | 9 years ago | on: Why does calloc exist?
(i.e., don't use a professional-grade band-saw, if you're not a professional)
BugsBunnySan | 9 years ago | on: The Curse of the Modern Office
http://winaero.com/blog/turn-on-xmouse-active-window-trackin...
BugsBunnySan | 9 years ago | on: The Curse of the Modern Office
For example because the window on top is a web browser and I'm referencing some API, or the window on top is another emacs window with another module I'm working on that I'm using, etc...
So I can tell the window manager where I want to type, decoupled from what windows I want to be stacked on top of each other in what order...
And, for example, right now, I have 6 emacs windows open for the project I'm working on, plus a few terminals to run the code, plus firefox. I don't see an efficient way to quickly shift focus to what I want, without tab-ing through all the windows looking for the one I need, potentially messing up the order I have the windows in...
Also, for me personally, using the mouse to tell the computer what I'm looking at, while the keyboard tells the computer what to do there is almost instinctive...
The result of more hours spent playing FPS games and the like than I care to think about. At one point, sitting down at a computer, without thinking about it, my left hand would automatically land on wasd and my right on the mouse XD
BugsBunnySan | 9 years ago | on: The Curse of the Modern Office
Which is even available on the crippled window manager that Windows has...
BugsBunnySan | 9 years ago | on: Multiple Bugs in OpenBSD Kernel
And then you run the tests and they will, hopefully, tell you if the how matches the what, and if it doesn't where the two differ, i.e. where the the code doesn't do what you intended...
BugsBunnySan | 9 years ago | on: Devastating Amazon hardware review of a wireless power switch
It would be pretty cool to remote control all of those sockets and make a blinkenlights display visible from space :D
BugsBunnySan | 9 years ago | on: Devastating Amazon hardware review of a wireless power switch
So, it's not that you can suddenly magically access devices by MAC address over the Internet (MAC addresses are still local network only), but since the sockets are all connected to a central server who knows them by their MAC address, that makes it possible to send those messages.
This would all not be a problem with good crypto for authentication (and secrecy), but apparently they put pretty much none of that into the product/app. So it should be realtivly easy to find out the MAC address and then very easy to talk to the central server and tell it to send messages to whatever device.
(It's a little like an open relay mail server, and bad for similar reasons)
BugsBunnySan | 9 years ago | on: Happy 20th Birthday, Quake
BugsBunnySan | 9 years ago | on: Contextual Identities on the Web
BugsBunnySan | 9 years ago | on: Contextual Identities on the Web
BugsBunnySan | 9 years ago | on: Contextual Identities on the Web
If there had been a safe way to secretly store that history, by having seperate identitie's in Firefox, (with password protection and crypto, etc...), that would've solved that case nicely.
And if you clear that secret, protected identitie's history, we'd have had 'Private Browsing', but also a ton more.
Which we're about to get now, it seems.
BugsBunnySan | 9 years ago | on: Contextual Identities on the Web
I think this is the actual solution to the problem that 'private browsing' was trying to fix when it first came out.
BugsBunnySan | 9 years ago | on: Microsoft to acquire LinkedIn for $26B
BugsBunnySan | 9 years ago | on: Reviewing Microsoft's Automatic Insertion of Telemetry into C++ Binaries
BugsBunnySan | 9 years ago | on: Two-hundred-terabyte math proof is largest ever
If I have the theory, that all positive integers smaller than 5 are also smaller than 6, I would assume I'm mathematically allowed to 'brute force' the proof by enumerating all the numbers > 0 and < 5 and then testing for each that it's also < 6.
If I can prove I enumerated all the positive integers smaller than 5 and didn't find any exceptions, I guess I proved my theory...
It's a silly way to prove my silly theory, but it is a proof. (I have also a truly remarkable proof, which this comment is too small to contain. ;) )
BugsBunnySan | 9 years ago | on: How an underwater fantasy blockbuster turned into a legendary movie fiasco
BugsBunnySan | 9 years ago | on: The Search for Our Missing Colors
Also, modern high end digital cameras can record a lot more color information than film can...
I can imagine someone looking at that code and the part where the kernel says one thing (I don't need write permissions) when that is not actually true and thinking that's a bad situation, that smells bad.
And the fact that the kernel does this is bad enough, but it's really just a symptom of an underlying problem. And that problem is the fact that the kernel code has to do this lying to prevent a loop, Which seems like bad code design (or the result of a hundred other factors that make it look, at first glance, like bad design). And the solution was done in a sloppy manner (dropping that write flag, instead of being honest and doing the little bit of extra work, which they did in the fix for the exploit with that extra flag).
And then maybe if you have experience with this stuff you might recognize that within this code there's that race condition.
And from those two things you might go see if other things nearby in the code can help you exploit it and it probably evolves from there into this very complex exploit.
The thing is, I think, one person looks at that code and is like, yeah the kernel lies a bit here, but whatever, sure it's grand. And in 99.999% percent of the time it is and you're fine with that and walk on.
And another person, who has Hacker Nature, might think like, a) this is bad as the tip of an iceberg is bad for a ship and more importantly b) I wonder what happens in the 0.001% of the time where this isn't fine...
Or, of course, maybe someone was standing on the edge of their toilet hanging a clock, the porcelain was wet, they slipped, hit their head on the sink, and when they came to they had a vision of this exploit. ;)