<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 10, 2013 at 5:29 AM, David Chisnall <span dir="ltr"><<a href="mailto:David.Chisnall@cl.cam.ac.uk" target="_blank">David.Chisnall@cl.cam.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 10 Sep 2013, at 12:13, Kostya Serebryany <<a href="mailto:kcc@google.com">kcc@google.com</a>> wrote:<br>
<br>
> Well, ok, you can treat this as a 192-bit fat pointer, but AFAICT this is not the real intention of the MPX developers<br>
> since a fat pointer will break all ABIs, and MPX tries to preserve them.<br>
<br>
</div>MPX is an implementation of the HardBound concept from UPenn, where this was a design goal (see also their 'low-fat pointers' work).<br></blockquote><div><br></div><div>This one? <a href="http://acg.cis.upenn.edu/papers/asplos08_hardbound.pdf">http://acg.cis.upenn.edu/papers/asplos08_hardbound.pdf</a> </div>
<div>I didn't know. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br>
> I don't think we need fat pointers to support MPX in LLVM -- it will complicate the implementation beyond necessity. (My 2c)<br>
<br>
</div>Fat pointers, however, are required for other architectures (including ours) and it would be nice to use the same general representation for all implementations of bounds-checked pointers (whether you call them fat pointers or not).<br>
</blockquote><div><br></div><div>It may be nice to have fat pointers, but this is unrelated to MPX as an instruction set extension.</div><div>Consider, for example, possible uses of MPX not directly related to bound checking: e.g. implementing a software sandbox.</div>
<div>In this case you need intrinsics to get/set BNDx registers and to call BNDCU/BNDCL, but you don't need fat pointers at all. </div><div><br></div><div>--kcc </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br>
> All we need is to represent a 128-bit type that will live in BNDx registers.<br>
<br>
</div>Only if you want to push all of the work into the front end.<br>
<span class=""><font color="#888888"><br>
David<br>
<br>
</font></span></blockquote></div><br></div></div>