<div dir="ltr">Let me revert for now, and we can figure out a fix tomorrow.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 13, 2015 at 8:13 PM, Stephen Crane <span dir="ltr"><<a href="mailto:sjcrane@uci.edu" target="_blank">sjcrane@uci.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Adding llvm-commits. Sorry, didn't realize it wasn't on here.<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Jan 13, 2015 at 7:43 PM, Stephen Crane <<a href="mailto:sjcrane@uci.edu">sjcrane@uci.edu</a>> wrote:<br>
> Here's a patch that should fix the RNG distribution initialization<br>
> compilation failure on Windows. Relevant buildbot failure:<br>
> <a href="http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/16201" target="_blank">http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/16201</a><br>
><br>
> I'm not even sure if this static initializer is allowed in LLVM's<br>
> codebase. If not, we can just initialize a Distribution for each<br>
> runOnMachineFunction or allocate a Distribution in the constructor.<br>
><br>
> There are also test failures on Linux. I'll figure out why in a bit<br>
> when I've finished recompiling on a linux machine. Relevant BB<br>
> failures:<br>
> <a href="http://lab.llvm.org:8011/builders/llvm-s390x-linux1/builds/12598" target="_blank">http://lab.llvm.org:8011/builders/llvm-s390x-linux1/builds/12598</a><br>
> <a href="http://lab.llvm.org:8011/builders/llvm-aarch64-linux/builds/6051" target="_blank">http://lab.llvm.org:8011/builders/llvm-aarch64-linux/builds/6051</a><br>
> <a href="http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/20016" target="_blank">http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/20016</a><br>
> <a href="http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/22286" target="_blank">http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/22286</a><br>
><br>
> - stephen<br>
><br>
> On Tue, Jan 13, 2015 at 5:18 PM, JF Bastien <<a href="mailto:jfb@chromium.org">jfb@chromium.org</a>> wrote:<br>
>> Insert random noops to increase security against ROP attacks (llvm)<br>
>><br>
>> A pass that adds random noops to X86 binaries to introduce diversity with the goal of increasing security against most return-oriented programming attacks.<br>
>><br>
>> Command line options:<br>
>><br>
>>   -noop-insertion // Enable noop insertion.<br>
>>   -noop-insertion-percentage=X // X% of assembly instructions will have a noop prepended (default: 50%, requires -noop-insertion)<br>
>>   -max-noops-per-instruction=X // Randomly generate X noops per instruction. ie. roll the dice X times with probability set above (default: 1). This doesn't guarantee X noop instructions.<br>
>><br>
>> In addition, the following 'quick switch' in clang enables basic diversity using default settings (currently: noop insertion and schedule randomization; it is intended to be extended in the future).<br>
>><br>
>>   -fdiversify<br>
>><br>
>> This is the llvm part of the patch.<br>
>> clang part: <a href="http://reviews.llvm.org/D3393" target="_blank">http://reviews.llvm.org/D3393</a><br>
>><br>
>> <a href="http://reviews.llvm.org/D3392" target="_blank">http://reviews.llvm.org/D3392</a><br>
>> Patch by Stephen Crane (@rinon)<br>
>><br>
>><br>
>> AFFECTED FILES<br>
>>   /llvm/trunk/include/llvm/CodeGen/CommandFlags.h<br>
>>   /llvm/trunk/include/llvm/CodeGen/NoopInsertion.h<br>
>>   /llvm/trunk/include/llvm/CodeGen/Passes.h<br>
>>   /llvm/trunk/include/llvm/InitializePasses.h<br>
>>   /llvm/trunk/include/llvm/Support/RandomNumberGenerator.h<br>
>>   /llvm/trunk/include/llvm/Target/TargetInstrInfo.h<br>
>>   /llvm/trunk/include/llvm/Target/TargetOptions.h<br>
>>   /llvm/trunk/lib/CodeGen/CMakeLists.txt<br>
>>   /llvm/trunk/lib/CodeGen/CodeGen.cpp<br>
>>   /llvm/trunk/lib/CodeGen/NoopInsertion.cpp<br>
>>   /llvm/trunk/lib/CodeGen/Passes.cpp<br>
>>   /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp<br>
>>   /llvm/trunk/lib/Target/X86/X86InstrInfo.h<br>
>>   /llvm/trunk/test/CodeGen/Mips/noop-insert.ll<br>
>>   /llvm/trunk/test/CodeGen/PowerPC/noop-insert.ll<br>
>>   /llvm/trunk/test/CodeGen/X86/noop-insert-percentage.ll<br>
>>   /llvm/trunk/test/CodeGen/X86/noop-insert.ll<br>
>><br>
>> USERS<br>
>>   jfb (Author)<br>
>>   dsanders (Auditor)<br>
>><br>
>> <a href="http://reviews.llvm.org/rL225908" target="_blank">http://reviews.llvm.org/rL225908</a><br>
>><br>
>> EMAIL PREFERENCES<br>
>>   <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
>><br>
>><br>
</div></div></blockquote></div><br></div>