public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Madhavan T. Venkataraman" <madvenka@linux.microsoft.com>
To: Anthony Green <green@moxielogic.com>
Cc: libffi-discuss <libffi-discuss@sourceware.org>,
	fweimer@redhat.com, DJ Delorie <dj@redhat.com>
Subject: Re: [RFC PATCH v3 0/5] Libffi Static Trampolines
Date: Thu, 28 Jan 2021 11:01:29 -0600	[thread overview]
Message-ID: <e294e952-09d2-6a32-fe7a-f449df5702b8@linux.microsoft.com> (raw)
In-Reply-To: <CACxje5-bD3jJQK8kX91=zuGdbaFAHSQaamgnoFPW0dAm7X3CkA@mail.gmail.com>



On 1/28/21 8:21 AM, Anthony Green wrote:
> On Wed, Jan 27, 2021 at 2:45 PM Madhavan T. Venkataraman <madvenka@linux.microsoft.com <mailto: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.  
> 

OK. I will remove the public API part, sync with the latest libffi and submit a PR.

> The second one I'm not so sure about yet.  Is it a solution in search of a problem?

The problem currently exists in a lot of applications. However, I have not been able to find
a good example in open source. It is all closed source.

> 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.

I like the idea of a libtramp living in the same repo publishing its own API.

First, let us just focus on (a).

Once that has been merged, I will work on the static trampoline library. I have never done library work
before. So, I will need guidance on library creation, configuration, how to expose an API, how to version it,
etc. I will pester you at that time with my questions. We will cross the bridge when we come to it.

> 
> 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.
> 

OK. Will do.

> 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.

Thanks!

Madhavan

  reply	other threads:[~2021-01-28 17:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1ef5c7e1c9a6ebb140a476ba555ec955681f4fba>
2021-01-15 18:46 ` madvenka
2021-01-15 18:46   ` [RFC PATCH v3 1/5] " madvenka
2021-01-27  3:31     ` DJ Delorie
2021-01-27 21:51       ` Madhavan T. Venkataraman
2021-01-27 22:15         ` DJ Delorie
2021-01-27 22:43           ` Madhavan T. Venkataraman
2021-01-15 18:46   ` [RFC PATCH v3 2/5] x86: Support for " madvenka
2021-01-27  3:31     ` DJ Delorie
2021-01-28 21:59       ` Madhavan T. Venkataraman
2021-01-28 22:17         ` DJ Delorie
2021-01-28 23:25           ` Madhavan T. Venkataraman
2021-01-29  2:09             ` DJ Delorie
2021-01-29  2:38               ` Madhavan T. Venkataraman
2021-01-29  2:48                 ` DJ Delorie
2021-01-29  3:24                   ` Madhavan T. Venkataraman
2021-01-29  6:07                     ` DJ Delorie
2021-02-01 19:46                 ` DJ Delorie
2021-01-15 18:46   ` [RFC PATCH v3 3/5] i386: " madvenka
2021-01-15 18:46   ` [RFC PATCH v3 4/5] arm64: " madvenka
2021-01-15 18:46   ` [RFC PATCH v3 5/5] arm: " madvenka
2021-01-26 23:41   ` [RFC PATCH v3 0/5] Libffi " Anthony Green
2021-01-27 17:20     ` Madhavan T. Venkataraman
2021-01-27 18:00       ` Anthony Green
2021-01-27 19:45         ` Madhavan T. Venkataraman
2021-01-28 14:21           ` Anthony Green
2021-01-28 17:01             ` Madhavan T. Venkataraman [this message]
2021-02-05 18:20               ` Madhavan T. Venkataraman
2021-02-05 18:46                 ` Anthony Green
2021-02-05 19:38                   ` Madhavan T. Venkataraman
2021-02-07 16:09                     ` Madhavan T. Venkataraman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e294e952-09d2-6a32-fe7a-f449df5702b8@linux.microsoft.com \
    --to=madvenka@linux.microsoft.com \
    --cc=dj@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=green@moxielogic.com \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).