3 ms·
Code - 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 k
by djcapelis 14y ago
Code - 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.