Thursday, October 25, 2007

Ouch, Theo!

Slashdot, by way of kerneltrap, picked up a hilarious flamewar over on the OpenBSD mailing list. The short version is that some guy thinks virtualization involves code, and code has bugs, and therefore virtualization is only ever bad. Or something. I'll leave the histrionics to those who think there's a substantial argument lurking in there somewhere, but I just couldn't help myself when I saw the following appeal to authority:

While x86 hardware has the same page-protection hardware that an IBM 390 architecture machine has, modern PC machines are a mess. They are architecturally so dirty, that parts of the video, keyboard, and other IO devices are interfaced with even to do simple things like context switching processes and handling interrupts. Those of us who have experience with the gory bits of the x86 architecture can clearly say that we know what would be involved in virtualizing it, and if it was so simple, we would not still be fixing bugs in the exact same area in our operating system going on 12 years.

I'd like to call "BS" on the above claim of inscrutability. No, you do not dork around with, e.g., the video card, to switch contexts. You may indeed mess about with an I/O device in "handling interrupts," but only because, gee, there's an interrupt to handle. In my seven years of debugging every goofball OS written for the PC on our VMM, I haven't encountered a single task switch that wasn't basically some variation of disabling interrupts, taking a couple spin locks, switching stacks, and changing the page table pointer. You know, kind of like it is on every architecture on the planet.


Blogger Ramesh said...

I hate Theo's rants as much as the next guy, but leaving aside the inanity of the quoted statement, it does seem like he's trying to attack the claim that running an application in a guest is somehow *more* secure than running it in a non-virtualized environment. Like there's some magical security dust that the virtualization layer can sprinkle on things...

I would argue that attacking such a claim is pointless, since to even make it in the first place, you would have to have a hopelessly naive and/or deliberately ignorant and misguided view of what the word "security" even means - or rather, that it even has a single meaning that's well-defined and accepted.

3:35 PM  

Post a Comment

<< Home