<div dir="ltr"><div class="gmail_default" style>The Thumb1 encoding is also valid in Thumb2, I therefore don't think this is an issue.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 16, 2013 at 2:35 PM, Renato Golin Linaro <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Bastien,<div><br></div><div>You have accounted for both ARM and Thumb1, but not Thumb2, which has yet another representation for UDFs, and I'm not sure you can accommodate all three into one representation (since the immediate slots are on odd places).</div>

<div><br></div><div>From (A8.8.247):</div><div><br></div><div><div>* Encoding A1:</div><div>*  1110 0111 1111 iiii iiii iiii 1111 iiii</div><div>* Encoding T2:</div><div>*  1111 0111 1111 iiii 1010 iiii iiii iiii</div>
<div>* Encoding T1:</div><div>*  1101 1110 iiii iiii</div><div><br></div><div>cheers,</div><div>--renato</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">

On 16 January 2013 20:46, JF Bastien <span dir="ltr"><<a href="mailto:jfb@chromium.org" target="_blank">jfb@chromium.org</a>></span> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
<div dir="ltr">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>


<div><br></div><div>Note that the instruction itself isn't changing (it's still UDF), only the immediate.</div></div>
<br></div><div class="im">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">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></div></blockquote></div><br></div>
</blockquote></div><br></div>