From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47DD4C433DF for ; Tue, 4 Aug 2020 14:49:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1CCDE206DA for ; Tue, 4 Aug 2020 14:49:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jgHQd+Xa"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="Zd9gPm9P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CCDE206DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9L37KF0SBUcM4ApbX39/WUz1nyZV3ZNCEmPeTHiojGg=; b=jgHQd+XabHmGKhTFmTDST9i3a IFHrK/YMI0wrOmu5YJhBe+zps6dU2//ZnLtL9Saro+BkC5gkVyF6rmx7LW7PUsKi8eY8dOiFhzFkp kRTm5k6YY1aBHHSwJ80H9hPQMWp4DJ2fP+myAhBr4gRTFfTWXUx/9M+CJx7Hm4bVRSFraUXOt3ZUE KQmsClys3Z3A0wVHzz3IHrIzJTLHpPov+QPLBjWjnWAvfsWu8jcq+vX6aXfXky8ArzBZvGfGup6oA mY8XjvGPr5OWu59FUA3nGzSaDBu9EgOmRgfaRMhGN7bKCzI3EmILl2Fnk3qtVmru9euN13/R8OPWm fadOBVDig==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2yEo-0001JY-NP; Tue, 04 Aug 2020 14:48:22 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2yEl-0001Gh-Mi for linux-arm-kernel@lists.infradead.org; Tue, 04 Aug 2020 14:48:20 +0000 Received: from [192.168.254.32] (unknown [47.187.206.220]) by linux.microsoft.com (Postfix) with ESMTPSA id C779220B4908; Tue, 4 Aug 2020 07:48:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C779220B4908 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1596552492; bh=WWoZU5hW4wXDmLDqxKWgVjJhEBnDZrlL0eZeSoA1M0E=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Zd9gPm9PZos91WvJOt0oayxz099VIuOsWoBZIXUJDFjP7lCj1dlQONa0QNp25lwdY dsm1r5OpjOcAXzNUDHh+nWWnMfnxq0oL6LMUtoVLftLBOD3ttlLrNDioYA+AS/vahh DP92H/rykDhIN5jKmVDwqf9m4OvMWrU04m/O4Ps0= Subject: Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor To: David Laight , 'Mark Rutland' References: <20200728131050.24443-1-madvenka@linux.microsoft.com> <6540b4b7-3f70-adbf-c922-43886599713a@linux.microsoft.com> <46a1adef-65f0-bd5e-0b17-54856fb7e7ee@linux.microsoft.com> <20200731183146.GD67415@C02TD0UTHF1T.local> <86625441-80f3-2909-2f56-e18e2b60957d@linux.microsoft.com> <20200804135558.GA7440@C02TD0UTHF1T.local> From: "Madhavan T. Venkataraman" Message-ID: <5f3c9616-52f5-f539-a39f-3fd3ada4f0aa@linux.microsoft.com> Date: Tue, 4 Aug 2020 09:48:11 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200804_104819_805264_57EC1BB4 X-CRM114-Status: GOOD ( 12.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kernel Hardening , Linux API , X86 ML , LKML , Oleg Nesterov , LSM List , Andy Lutomirski , Linux FS Devel , linux-integrity , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 8/4/20 9:33 AM, David Laight wrote: >>> If you look at the libffi reference patch I have included, the architecture >>> specific changes to use trampfd just involve a single C function call to >>> a common code function. > No idea what libffi is, but it must surely be simpler to > rewrite it to avoid nested function definitions. Sorry if I wasn't clear. libffi is a separate use case and GCC nested functions is a separate one. libffi is not used to solve the nested function stuff. For nested functions, GCC generates trampoline code and arranges to place it on the stack and execute it. I agree with your other points about nested function implementation. Madhavan > Or find a book from the 1960s on how to do recursive > calls and nested functions in FORTRAN-IV. > > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel