[cfe-dev] Zero'ing Registers on Function Return

David Chisnall David.Chisnall at cl.cam.ac.uk
Sun Sep 14 10:49:22 PDT 2014


On 14 Sep 2014, at 18:25, Russell Harmon <eatnumber1 at google.com> wrote:

> I'd love to discuss and/or have a look at your implementation. Szabolcs brings up some very good points about the difficulty of doing this correctly. Are you at the point where you're willing to share your work?

It's in the CTSRD-CHERI LLVM / Clang trees on GitHub.  It's quite MIPS / CHERI specific.  The implementation is mostly in the back end and stores 0 to any stack slot that is used and invalidates and registers that are used.  I did most of the implementation a year ago and haven't had a chance to get back to it.  There are a few known issues that are fixable, but not quite implemented.

I described it to Colin at BSDCan, but as it's unpublished work and needs a detailed security evaluation I haven't yet written it up properly.

David





More information about the cfe-dev mailing list