<div dir="ltr"><div class="gmail_default" style>We've defined a few other instructions in a similar manner, see:</div><div class="gmail_default" style>  <a href="http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/include/arm_sandbox.h?content-type=text%2Fplain">http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/include/arm_sandbox.h?content-type=text%2Fplain</a></div>
<div class="gmail_default" style><br></div><div class="gmail_default" style>Abort now is indeed a single instruction that shouldn't occur often, but the others should. The goal is to progressively upstream PNaCl changes.</div>
<div class="gmail_default" style><br></div><div class="gmail_default" style>Other code that uses the instruction presumably only detects UDF, and not the immediate? Or is your concern that the actual immediate is what is looked at?</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 16, 2013 at 2:13 PM, Jim Grosbach <span dir="ltr"><<a href="mailto:grosbach@apple.com" target="_blank">grosbach@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi JF,<br>
<br>
There is a lot of extant code that uses the current values and has for quite a long time. Changing has pretty extreme ripple effects, to put it mildly.<br>
<br>
Given the circumstances for when the compiler will use a TRAP instruction, I'm pretty skeptical of any real-world security benefits to this. Can you elaborate?<br>
<br>
-Jim<br>
<div class="im"><br>
On Jan 16, 2013, at 12:46 PM, JF Bastien <<a href="mailto:jfb@chromium.org">jfb@chromium.org</a>> wrote:<br>
<br>
> I've attached a patch from PNaCl with changes the ARM halt encoding so that it also looks like a halt in Thumb. This can catch bugs when executing ARM code as Thumb, whether it be in the context of compiler/JIT bugs, or an attacker trying to get validated ARM code to execute as Thumb (which is a concern for PNaCl).<br>

><br>
> Note that the instruction itself isn't changing (it's still UDF), only the immediate.<br>
</div>> <arm-halt.diff>_______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote></div><br></div>