3 ms·
Not 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
by adlpz 14y ago
Not 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.