[llvm-commits] [PATCH] improve ARM halt encoding

Jim Grosbach grosbach at apple.com
Wed Jan 16 14:39:30 PST 2013


The entire encoding is semantically significant on Darwin. I suspect that's true on other platforms, too, but I don't know for sure.

-Jim

On Jan 16, 2013, at 2:20 PM, JF Bastien <jfb at chromium.org> wrote:

> We've defined a few other instructions in a similar manner, see:
>   http://src.chromium.org/viewvc/native_client/trunk/src/native_client/src/include/arm_sandbox.h?content-type=text%2Fplain
> 
> Abort now is indeed a single instruction that shouldn't occur often, but the others should. The goal is to progressively upstream PNaCl changes.
> 
> 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?
> 
> 
> On Wed, Jan 16, 2013 at 2:13 PM, Jim Grosbach <grosbach at apple.com> wrote:
> Hi JF,
> 
> 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.
> 
> 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?
> 
> -Jim
> 
> On Jan 16, 2013, at 12:46 PM, JF Bastien <jfb at chromium.org> wrote:
> 
> > 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).
> >
> > Note that the instruction itself isn't changing (it's still UDF), only the immediate.
> > <arm-halt.diff>_______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130116/81bcb9ba/attachment.html>


More information about the llvm-commits mailing list