<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 26, 2015 at 7:07 AM, Christian Huitema <span dir="ltr"><<a href="mailto:huitema@huitema.net" target="_blank">huitema@huitema.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Sunday, October 25, 2015 10:33 PM, Rob Meijer wrote:<br>
<br>
> 2015-10-25 2:35 GMT+01:00 Ray Dillinger <<a href="mailto:bear@sonic.net">bear@sonic.net</a>>:<br>
><br>
>> I would be in favor of an extended standard for "Crypto C" such<br>
>> that <br></span></blockquote><div>... </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">In the sample, the compiler could perform the optimizations safely</blockquote><div> </div><div>Writing compiler systems is a competitive event!</div><div>Any benchmark pattern will be gamed.</div><div>The notion of safety is ill defined so far in this discussion.<br>Any advantage that can be discovered will be acted on</div><div> (both by compiler authors and by attackers).</div><div><br></div><div>As far as safety is concerned one attack on a secret system is</div><div>the timing of actions based on input.   A "safe" system would have</div><div>little or no variance but wall time is the most common area of </div><div>compiler work.  Performance cannot be ignored simply because</div><div>a slow system may be displaced by a quicker protocol that is</div><div>less worthy.</div><div><br></div><div>The only solutions I know to address this are:<br> *) to craft benchmarks of computer languages that test and validate code that matters.</div><div> *) design a special purpose language, test and benchmark.</div><div> *) eliminate actors that fiddle with the code at all levels.</div><div> *) vigilance</div><div><br></div><div>On some systems a runtime link loader or system link loader may inspect code</div><div>and because it can see all the moving parts and raid functions in an object</div><div>to inline based on cache size and other system knowledge.</div><div><br></div><div>Some system objects like init and sh can be fully linked and distributed <br>with no symbols.  N.B.  Today even the kernel is linked and reloaded as needed.<br>A fully linked object can still be analyzed by a JIT runtime compiler system.<br>Some systems do scan objects for runtime bugs and edit the object</div><div>at the time it is loaded into memory.<br><br>The VW Diesel CO2/NO  emission gamesmanship are a current example that</div><div>proves my point that this is a competitive event.</div><div><br></div><div>A partial solution is the one Knuth took with TeX.  He used a subset</div><div>of a version of Pascal to craft TeX (tangle, web, weave).   By using a minimum</div><div>subset of a language including formatting and optional syntax he simplified</div><div>much of his work.</div><div><br></div><div>Minimization can be extended to assembly language and calling conventions.</div><div><br></div><div>A possibly better solution is to start over and design something like Magic 1</div><div>(<a href="http://www.homebrewcpu.com/">http://www.homebrewcpu.com/</a>) where the hardware, compiler, os was as</div><div>minimum as a single individual could grock.  While impractical this shows that</div><div>much of the collection of moving parts in a modern system is extra and</div><div>a minimum system could serve as a touchstone.<br><br></div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">  T o m    M i t c h e l l</div></div>
</div></div>