|
From: Nicholas N. <nj...@ca...> - 2003-09-12 08:49:56
|
On Thu, 11 Sep 2003, Brian Mosher wrote: > A couple days ago there was an article on Slashdot discussing a tool created > by Eric S Raymond called the "comparator" that generated md5sum hashes for > every three lines of source code fed into it. See details here: > [snip] > I was thinking about this and was curious if something like this could be > used on the generated machine code as executed at runtime. Could a valgrind > skin be written to md5sum the running system at the micro-code level? It > seems like this might be possible with valgrind and/or user-mode linux > and/or some sort of bastardized Bochs/vmware type thing. > > Clearly the compiler/optimizer used would affect the generated machine code. > Assuming that you could somehow compile linux using the same > compiler/optimizer as the SCO release, what are some other problems that > would prevent this from being technically feasible? I'd be inclined to do it on the static machine code, rather than the dynamic instruction stream. One big problem: I expect that machine code is far less "stable" than source code, and tiny changes in the source code would make big differences in the machine code (eg. register allocation). Or if you used a different compiler or optimisation level. Also, I imagine machine code would be less "distinctive" than source code, for comparison purposes. Also, Valgrind can't run the Linux kernel (although maybe something could be done with UML). So I'm sceptical, but willing to be proven wrong :) For a discussion of a similar-ish idea, have a look at www.cl.cam.ac.uk/~njn25/pubs/redux2003.ps.gz N |