6 ms·
This brings to mind articles and discussions I read in the early 90s about differences in performance between running in real (or "unreal") mode and protected m
by userbinator 9y ago
This brings to mind articles and discussions I read in the early 90s about differences in performance between running in real (or "unreal") mode and protected mode --- yes, the extra permission checks, paging, segmentation, etc. definitely add some overhead:
https://groups.google.com/d/topic/comp.lang.asm.x86/YbQJ_m0dDUg https://groups.google.com/d/topic/comp.lang.asm.x86/YbQJ_m0d...
Thus they decided to do permissions checking in parallel with other operations, leading to Spectre. It's interesting to note that the original intent of protected mode was not as a real secure "security feature" immune from all attacks, but more to provide some isolation to guard against accidents and expand the available address space. The entire Win9x series of OSs embody this principle.
What would the TempleOS of CPUs look like, I wonder?
x86 running in unreal mode might be close. I wonder if anyone has done any benchmarking of recent x86 CPUs in that mode...
- Daishiman 9y agodoes modern x86 even support real mode?
- niftich 9y agoSure it does. All x86 CPUs boot up in real mode, for example. Bootloaders are written in real mode.
- wolfgke 9y ago> Bootloaders are written in real mode. Not when the bootloader is an UEFI application. UEFI puts the processor into 32 bit protected mode or typically long mode (64 bit). So when your bootloader that is implemented as an UEFI application is started, you are already out of real mode.
- userbinator 9y agoAFAIK all x86 processors start in real mode. Intel tried making a 386 variant with only protected mode a long time ago, and it didn't sell very well: https://en.wikipedia.org/wiki/Intel_80376 https://en.wikipedia.org/wiki/Intel_80376
- sebazzz 9y agoIt might have a better chance these days, with UEFI becoming the default.
- colejohnson66 9y agoRumor is Intel is trying to get rid of the BIOS and just start the processor in protected mode
- makomk 9y ago32-bit protected mode only, but with all support for paging and virtual memory removed? I can see why that combination never really caught on.
- Crontab 9y agoThey made it from 1989 to 2001 so it must have been okay for the embedded market that it targeted.
- wilun 9y ago> Thus they decided to do permissions checking in parallel with other operations, leading to Spectre No. Leading to Meltdown. Spectre is fundamental to the way we approached any speculative execution until now.
- amelius 9y agoAny idea what will be the solution? Keep more speculative data in the pipeline? Performance penalties on security faults? Complex rollback?
- convolvatron 9y agoyou could certainly extend the unused transactional support to do a chandy-lamport thing, with the difference that when you run out of space isolated cache versions, you just can't speculate any more. it would be a lot of machinery you could also do latency hiding with smt instead of trying to fight it head-on with speculation. ultimately probably more productive, but either the compiler or the programming model or the user has to expose that concurrency.
- jnwatson 9y agoIf all speculation used a separate cache that is only committed on retirement, that should keep the side channels at bay.
- bonzini 9y agoSpectre variant 2 is not fundamental to speculative execution. It can be fixed by tagging the indirect branch predictions with the full virtual address and the ASID, and flushing it together with the TLB.
- marvelous 9y ago> This brings to mind articles and discussions I read in the early 90s about differences in performance between running in real (or "unreal") mode and protected mode I remember a 10 years old Microsoft Research project that implemented an OS that would use the .NET managed runtime to implement security. IIRC, they had interesting differences with CPU memory isolation off. I like the idea that you don't need hardware barriers to isolate programs when they are lobotomized.
- _wmd 9y agoYou're speaking of Singularity and it's "software isolated processes", which amounted to static verification of IL before AOT compiling it to x86. From the perspective of Sing#, the only way to express IPC was in the form of protocols, which were essentially formalized function call dances between two processes. Singularity would be just as vulnerable to the recent bugs as contemporary OSes are, possibly more so because there is even less timing uncertainty when crossing privilege domains, making the attacks even easier
- sjmulder 9y agoCosmos OS is another .NET-based OS toolkit that does this. Here's a video of one of the developers talking about this, and other things: https://channel9.msdn.com/Shows/On-NET/Chad-Z-Hower-aka-Kudzu-Cosmos https://channel9.msdn.com/Shows/On-NET/Chad-Z-Hower-aka-Kudz...
- jnwatson 9y agoPlenty of embedded CPUs don't have MMUs. Having done multi-"process" programming on them, it is hard to appreciate how nice basic address space protection is from a debugging perspective.