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

JF Bastien jfb at chromium.org
Wed Jan 16 14:20:04 PST 2013


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/1fa347bf/attachment.html>


More information about the llvm-commits mailing list