4 ms·
Technically NX is the same memory, just different permissions applied to portions. It is possible to have an architecture where code and data are completely se
by rogerbinns 14y ago
Technically NX is the same memory, just different permissions applied to portions. It is possible to have an architecture where code and data are completely separate - http://en.wikipedia.org/wiki/Harvard_architecture http://en.wikipedia.org/wiki/Harvard_architecture
- djcapelis 14y agoCode - noun - Data you've labelled as code. Data - noun - Data you haven't labelled as code—yet. A python program is data that's just a text file. So. You know. There's that. Other things that are "data" but aren't: PDFs, Javascript and CSS. The idea that you're going to be able to wave a magic Harvard architecture wand and fix bad inputs causing things to do different things than intended is a misunderstanding of the problem.
- adlpz 14y agoNot really. The point is that what is code and what isn't should be decided at load time, and never be changed during the execution. Any resources loaded later must be data-only, and code memory must be read-only during the entire execution.
- Thrall 14y agoYou sacrifice an enormous amount of flexibility and extensibility by enforcing such distinctions. Much of the power and elegance of languages like lisp comes from blurring the boundary between code and data. To the C etc. mentality, it's unthinkable, but in lisp you can maintain (modify/extend/fix) a running application, without having to unload and reload everything.
- djcapelis 14y agoNot really. The problem is what you see as data can often be used to control code without modifying it. It doesn't have to run directly on the processor to end up being as powerful as code. You often find don't have to modify code to use the code the code that's already there to do what you please. This is true of a surprisingly large portion of modern exploits. A strict Harvard Architecture or the NX bit only helps with what is becoming an increasingly narrow portion of the attack surface. Again, see also: Python, PDF, Javascript, CSS for a few different types of "data" which end up being as powerful as code.
- Dylan16807 14y agoYes, it's possible to have more separation, but so what? Wiki link isn't going to help here.
- vy8vWJlco 14y agoA Harvard architecture can help in the same way NX does (as well as boost performance for fixed-purpose applications that rarely need to be re-programmed), but for it to still be Turing complete it's going to need some way to modify the executable code, including the potential for exploits, albeit Harvard architecture-specific ones. The Harvard architecture could be used as the basis for a more rigorous trust model (iff the owner of the system controlled the root of trust.) Democracy is out of fashion though, so we would undoubtedly get something similar to what we have today with Redhat (for all practical purposes) "having to" pay for the right to boot Linux on a system "certified for Windows 8"...