3 ms·
Be careful, let's not forget the lesson of Ken Thompson's Reflections on Trusting Trust. It's more accurate to say that compilation is a function that takes two
by kibwen 9y ago
Be careful, let's not forget the lesson of Ken Thompson's Reflections on Trusting Trust. It's more accurate to say that compilation is a function that takes two arguments: the source code, and the compiler itself; this is how trusting-trust attacks propagate despite total absence from the source code.
- hasenj 9y agoAnd even if you could manually verify the binary output of a compiler and prove it correct, you still don't know that the CPU itself is not malicious.
- weberc2 9y agoYou're being pedantic, but your pedantry is incorrect, so allow me to be pedantic in correcting you :p. The output of all pure functions depends on the function and its inputs; this isn't more true for compilers than, say, addition. The problem with Trusting Trust is that the function isn't practically inspectable, not that the function is impure. A trusting trust compiler is still pure.
- falcolas 9y agoA functionally pure compiler would always provide the same output for the given source code. The challenges in creating repeatable builds of highly popular open source projects shows that the average compiler is anything but functionally pure. The global state of the system running the compiler has a huge impact on the output of the compiler.
- weberc2 9y agoI agree, but that's irrelevant to the Trusting Trust topic.
- alphaalpha101 9y agoThat's like saying any function is a function from its argument and itself to its output i.e. rather silly.