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

Russell Harmon eatnumber1 at google.com
Mon Sep 15 21:58:20 PDT 2014


David,

I had a look at your llvm changes, but wasn't able to find the clang ones.
Some questions.

How do you handle the calling of non-zero-on-return functions from within a
zero-on-return function?
How much of that work do you think is applicable to other architectures?
I'm interested in working on an implementation that (starting with x86)
will work across platforms. If you plan on revisiting your work on it
though and trying to get it committed upstream, I won't intrude.

On Sun Sep 14 2014 at 10:49:23 AM David Chisnall <
David.Chisnall at cl.cam.ac.uk> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140916/b4de9418/attachment.html>


More information about the cfe-dev mailing list