[RFC PATCH v3 0/5] Libffi Static Trampolines

Anthony Green green@moxielogic.com
Thu Jan 28 14:21:37 GMT 2021


On Wed, Jan 27, 2021 at 2:45 PM Madhavan T. Venkataraman <
madvenka@linux.microsoft.com> wrote:

> On 1/27/21 12:00 PM, Anthony Green wrote:
> > Thanks, Madhaven.   I think I understand now.   Are these statements
> true?:
> >
> > (a) These patches implement trampoline tables, similar to what is
> implemented in the iOS port.  This hardens the library by eliminating the
> requirement for writable executable memory.
> > (b) These patches expose a new public API for hardened trampolines.  (a)
> uses (b), but doesn't require that (b) be public.
> > (c) We can release libffi with (a) and not (b).
> >
> > Is this correct?
> >
>
> Yes. This is correct. The public API part is not required.
>

In this case, my ask is that you split this into two patches.  The first
one, (a), I would like to merge as soon as it seems ready.

The second one I'm not so sure about yet.  Is it a solution in search of a
problem?  Is libffi the right place for it?   Should it live in libffi, or
be broken out into something that libstatictramp -- that perhaps lives in
the libffi repo but doesn't pollute the libffi API?  I don't know yet, but
opinions welcome.

Also, please use the github PR process for the next round so we can get
some automated CI going.  And I prefer reviewing patches within the github
UI, tbh.

And again -- I appreciate your effort here.  This is something I've wanted
more broadly in libffi ever since Landon Fuller implemented something
similar in the iOS port.

AG


More information about the Libffi-discuss mailing list