[LLVMdev] Proposal: Adding aligned instruction bundle support to MC

Eli Bendersky eliben at google.com
Thu Dec 6 15:11:49 PST 2012


On Thu, Dec 6, 2012 at 3:04 PM, Greg Fitzgerald <garious at gmail.com> wrote:
>>>> groups of instructions between .bundle_lock and
>>>> .bundle_unlock directives cannot cross a bundle boundary
>>>
>>> Can this be relaxed to:  A data instruction cannot fall on a bundle
>>> boundary.  ?
>>
>> I'm not sure what you mean, can you elaborate?
>
> Nevermind, what I suggested was not strict enough.  I see now that the
> purpose of unlock/lock is to prevent particular instructions from landing on
> the bundle boundary.  For example, around a 'bic' and an indirect branch,
> where the compiler inserted the bic to make the branch safe.

Correct. Having a load and the bic protecting it separated by a bundle
boundary is not safe because malicious code can arrange to jump to the
load without the bic being executed and thus access arbitrary memory,
escaping the sandbox. For x86 bundle locking is also important to make
sure jumps into the middle of instructions are not allowed.

Eli



More information about the llvm-dev mailing list