4 ms·
I've done stuff like this before; it works very well if you know the limitations, and I'd say that it even gives you a better understanding of how things actual
by userbinator 5y ago
I've done stuff like this before; it works very well if you know the limitations, and I'd say that it even gives you a better understanding of how things actually work. Of course, don't bother MS or any other "official" vendor if it doesn't work, because you are on your own in debugging it.
- Terry_Roll 5y ago>because you are on your own in debugging it. "The customer reported that this code “worked just fine on 32-bit x86 and 64-bit x86”, but it doesn’t work on Itanium." "Actually, I’m surprised that it worked even on x86!" And that is probably how Spectre and Meltdown were found! Differences in the cpu's.
- wyldfire 5y agoWell, it should work in some well-controlled cases and in those cases if you're writing this code you are probably an OS vendor. Examples of legit use case: an executable loader or some bootstrapping code/bootloader. When writing code like this, as Chen says, you are bound to the architectural rules regarding how to appropriately locate code and safely invalidate code caches etc. So if you follow the rules it doesn't work then typically I figure you'd take it up with the CPU vendor. While you could potentially do it and have a good reason to in userspace code, it should be heavily scrutinized because it's so unconventional.