From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id A29013844026 for ; Thu, 28 Jan 2021 14:21:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A29013844026 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=moxielogic.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=green@moxielogic.com Received: by mail-lj1-x236.google.com with SMTP id a25so6542414ljn.0 for ; Thu, 28 Jan 2021 06:21:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=moxielogic-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9Mo6ZDdl95kBSTVQ7obbCeAaM1CFI7tyqiQVvCl6OxQ=; b=H34zB6fqN3N1kYy/3R5XuBiUYGaBM9OOmij+HwUC1axRwSj2118avWtBtjWLkiuuyT OcguCSrt2cVXz5C2yC+xRiVhKz5LuB2eET6H+39qKK4mq4FOwoylKkcudrVcGa0PGLUo vPuY9Crzioc0s84MmZzMFQ08B339SHJNHBscqS/EOXzZhJBenMcMcKsD9nqSYolKO0ir ioKUQGfjfWAKVTZXdM/cR1S/piGI9h5P5754phybGtUse/r7ctRM58q5KtyrnpPhaYpB AK/nzqkukoPFFOBcy7Qo2EI8aGgLpq24a4pWH0DYx1JrzKj2eGKpaofmVkBRkyflr/HK uYsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9Mo6ZDdl95kBSTVQ7obbCeAaM1CFI7tyqiQVvCl6OxQ=; b=maSrcoc7VOlyUd/3JgZhENf2iXqsHilQlvM/To4wTQqBk7qQ6JQ1079MDTzYfI7sAI +KLd4CFtNr3pZNtO4dFyhPlY7F7g3ICzGJtZd4XtHVIT3pp40ILsjefifY3uZFjcmq4c xvdwq8qoxvWUCNyDaDObl6bauQWMqvfOLzD/0ui4BrTC+CufQRWz+CWN/YfeTQVm32ld bmDikfjQp10j4z2TiCB72pEin3Ms+PYrKwsbT6ggl2v0FtWIw6KXyKL381YDp0l95LN3 5wGOP+Jw3CkGGVvE0IG9/wgkxTWMzcAORoItHDPMnsSASg5b0JWfYoAyb1iC7JmJG5Va 8keg== X-Gm-Message-State: AOAM533LqQowins15qJQpj/9QNNAuWFqvPacRhrWuy+eBrOUn+E6W+yd KPHRL5ztQYrSL8D9UmqZvhdop2inx/sTwKmwUWrroQ== X-Google-Smtp-Source: ABdhPJzghueog0UuMmR9y49JoNBOo3kvv64w//tSvjF9XRxLfgWJHiZdL8D/e5+hEs3H3Qc7J0lr6rmpbeOe+xv/dqw= X-Received: by 2002:a2e:9684:: with SMTP id q4mr9018927lji.159.1611843708506; Thu, 28 Jan 2021 06:21:48 -0800 (PST) MIME-Version: 1.0 References: <20210115184653.124913-1-madvenka@linux.microsoft.com> <849643ba-5c3e-31e6-b784-d0fc2345ce00@linux.microsoft.com> <811113c4-7bda-ee21-cdb9-4ab20d1fd291@linux.microsoft.com> In-Reply-To: <811113c4-7bda-ee21-cdb9-4ab20d1fd291@linux.microsoft.com> From: Anthony Green Date: Thu, 28 Jan 2021 09:21:37 -0500 Message-ID: Subject: Re: [RFC PATCH v3 0/5] Libffi Static Trampolines To: "Madhavan T. Venkataraman" Cc: libffi-discuss , fweimer@redhat.com, DJ Delorie X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libffi-discuss@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libffi-discuss mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2021 14:21:51 -0000 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