Theoretically, is there any way to perform any computations within the RAM, using memory related instructions such as move
, clflush
or whatever, su
Amazingly, yes, as per Paul R's comment: mov is Turing complete.
Such a mov
only computer would be (highly) impractical however. not to mention the fact that it would be fiendishly hard to write a compiler for it. There is a c compiler that translates general purpose c programs into x86 mov instructions. Amazingly it does allows floating point calculations.
Because it is based on a Turing machine and not a Von Neumann computer it is horribly slow, (but it's a great way to obfuscate your code :-1).
For all practical purposes you can only do calculations via registers.
AFIAK only movs
takes 2 memory operands, every other instruction that accesses memory uses a constant or register operand in addition.
Rowhammer is not a calculation mechanism, because it is non-deterministic.
It's also a artefact of the way dram is implemented, cache memory does not suffer from this effect.