<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 22, 2016 at 8:40 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><br><hr><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"Rui Ueyama" <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>><br><b>To: </b>"Hal Finkel" <<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>><br><b>Cc: </b>"David Blaikie" <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>>, "llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>, "Bruce Hoult" <<a href="mailto:bruce@hoult.org" target="_blank">bruce@hoult.org</a>><br><b>Sent: </b>Tuesday, March 22, 2016 2:36:34 PM<span class=""><br><b>Subject: </b>Re: [llvm-dev] Need help with code generation<br><br></span><span class=""><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 22, 2016 at 7:36 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I have a question. If there is a ELF verifier function that walks every part of an ELF file to verify that the file is sane, and if you can call that before calling LLD's function, are you guys happy with that?</div></blockquote><div><br></div><div>I'd like to get you guys opinion on this question.</div></div></div></div></span></blockquote><br>I'll echo Rafael here. What does "sane" mean? If I define sane to mean, "will not cause lld to exhibit undefined behavior if later run over the same input", then this seems like the most efficient way of satisfying that goal (perhaps staged to avoid cache thrashing), and I'd like to know how much overhead it would add to run it in lld by default (even if we have an option to disable it for absolute speed).<br></div></div></blockquote><div><br></div><div>ELF is a documented file format so if you are not sure if something should be considered valid, you can take a look at the spec to determine whether it is valid or not. File validity is an independent concept from LLD and I think we can determine it according to the spec.</div><div><br></div><div>I have a different opinion about how it could be implemented. We have no idea if it'd be faster if it is "embedded" to LLD, at least. And usually separating passes leads to cleaner and more readable code.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000">Thanks again,<br>Hal<div><div class="h5"><br><br><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 22, 2016 at 6:39 PM, Hal Finkel via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:rgb(0,0,0)"><br><hr><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"David Blaikie via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br><b>To: </b>"Rafael Espíndola" <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>><span><br><b>Cc: </b>"llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>, "Bruce Hoult" <<a href="mailto:bruce@hoult.org" target="_blank">bruce@hoult.org</a>><br></span><b>Sent: </b>Tuesday, March 22, 2016 10:18:03 AM<span><br><b>Subject: </b>Re: [llvm-dev] Need help with code generation<br><br></span><div dir="ltr"><br><div class="gmail_extra"><br><span><div class="gmail_quote">On Tue, Mar 22, 2016 at 4:27 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>> Maybe not, but it's not impossible either - browsers manage to harden themselves against malicious input and they operate in a far hostile environment with many more input formats than we do.<br>
<br>
</span>It is important to note how different they are. Both Firefox and<br>
Chromium have people working just to try to make them more secure.<br>
Compare that with LLVM: One week ago I pointed out that your patch<br>
(r263521) introduces a crash. It still hasn't been reverted or even<br>
acknowledge yet.<br>
<span><br>
<br>
> I'm not trying to shift your personal goal, or to direct the features that you choose to put your time into, but I am interested in project policy.<br>
<br>
</span>Why do you care about policy that is not followed? A policy saying<br>
llvm should not crash on any input is as relevant as one that says<br>
that clang should keep bootstrapping in under one second.<br></blockquote><div><br></div><div>It's pretty different when you say, essentially, that patches to address these things are unlikely to be accepted. It doesn't seem surprising that people wouldn't try to provide those patches and would choose not to use the project if that's the expressed policy of the developers on the project and doesn't line up with the needs of other people.</div></div></span></div></div></blockquote><br>+1<br><br> -Hal<span><br><br><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
So, if we stick to reality, what we have is that lld (ELF and COFF)<br>
are already the most reliable parts of the toolchain. If not for Rui<br>
and I being upfront about it most people would not even know that you<br>
could crash it. So please, just let us keep working on the most<br>
reliable part of the toolchain.<br>
<div><div><br>
Cheers,<br>
Rafael<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div></div>
<br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></blockquote><br><br><br></span><span>-- <br><div><span></span>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory<span></span><br></div></span></div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>
</blockquote><br><br><br>-- <br><div><span name="x"></span>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory<span name="x"></span><br></div></div></div></div></div></blockquote></div><br></div></div>