Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1414715pxa; Sun, 2 Aug 2020 06:58:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXI5Ngak6uu5ffF3ZDmc7bC200cMoKP/xEBW8U6ZOAMTnGYcxv83nop4NAyrwWjpESqR1G X-Received: by 2002:a05:6402:3193:: with SMTP id di19mr11481420edb.98.1596376711674; Sun, 02 Aug 2020 06:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596376711; cv=none; d=google.com; s=arc-20160816; b=NQdEn5oWy2kFwgbapi1j3eaTJJcg4BcGK1kwZO1rYcGW2NWpddsX6k5rkHdeFH7SJT TO/1kx3OS47QCrt+dHP+8HatQLAAJB6oiB1j1emdndWFsTST0/rREmvsyA05MLpA8Rq7 tP1tBnXjv6kQMxYaaqa3iE0ibdSPG3gpZF9uhMEu6BmvmNkayguzqyTMjqMmyaZHe82x axvTecZDDeOls6LF5Shj+r22TSCOxApD6AmJ+xuBrJkvR0aLXf/VccQjYStXuQPSTBdn pWdrmSPctLpaCN5pzCryMnhWm62TJ51KlodRjCHrESUqQ9nUfr8HkWEpt+uEUT2dHFgV 9AHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from; bh=k8pc+qNPTU/UGQRTCjxlWUg5AlHlqb+MqNdCC4BE/Kg=; b=cjAUY7LmcpKmWYZMeMqJNiEoP5THjvjRymiSSFhvvhljjWN7VrLQHFZWkN03Fhurve UKYThk1+pyERJxPjbuLzkQUv0MQmpFgPs6xKnBQu7VxIVUJhPWfQouu49t94UBzE4/8p Quc9Z8bi/khMyx4lWOFcTNIvhkeMTq/U/50U+OCROeNDEoCLw9CZaNbzyDztnYyhVqaM ot5enGlw354aUj/K7jXR+RqybpJRvjhaY7EzF6LMk5nxl584Vz7scOO8K1HSQ50BgAXY UfKRqk4r2xgGbuQ0tLaeKe++b7QKxuX6if2QeoetQV/1Ws+scb1CWNXNR98/V5eLICwG NBnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si8768651edc.157.2020.08.02.06.58.04; Sun, 02 Aug 2020 06:58:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725906AbgHBN5p (ORCPT + 99 others); Sun, 2 Aug 2020 09:57:45 -0400 Received: from albireo.enyo.de ([37.24.231.21]:57926 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725290AbgHBN5p (ORCPT ); Sun, 2 Aug 2020 09:57:45 -0400 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1k2EUc-0007uG-D1; Sun, 02 Aug 2020 13:57:38 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1k2EUZ-0006B6-7g; Sun, 02 Aug 2020 15:57:35 +0200 From: Florian Weimer To: "Madhavan T. Venkataraman" Cc: Andy Lutomirski , Kernel Hardening , Linux API , linux-arm-kernel , Linux FS Devel , linux-integrity , LKML , LSM List , Oleg Nesterov , X86 ML Subject: Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor References: <20200728131050.24443-1-madvenka@linux.microsoft.com> <6540b4b7-3f70-adbf-c922-43886599713a@linux.microsoft.com> <46a1adef-65f0-bd5e-0b17-54856fb7e7ee@linux.microsoft.com> Date: Sun, 02 Aug 2020 15:57:35 +0200 In-Reply-To: <46a1adef-65f0-bd5e-0b17-54856fb7e7ee@linux.microsoft.com> (Madhavan T. Venkataraman's message of "Fri, 31 Jul 2020 12:13:49 -0500") Message-ID: <87o8nttak0.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Madhavan T. Venkataraman: > Standardization > --------------------- > > Trampfd is a framework that can be used to implement multiple > things. May be, a few of those things can also be implemented in > user land itself. But I think having just one mechanism to execute > dynamic code objects is preferable to having multiple mechanisms not > standardized across all applications. > > As an example, let us say that I am able to implement support for > JIT code. Let us say that an interpreter uses libffi to execute a > generated function. The interpreter would use trampfd for the JIT > code object and get an address. Then, it would pass that to libffi > which would then use trampfd for the trampoline. So, trampfd based > code objects can be chained. There is certainly value in coordination. For example, it would be nice if unwinders could recognize the trampolines during all phases and unwind correctly through them (including when interrupted by an asynchronous symbol). That requires some level of coordination with the unwinder and dynamic linker. A kernel solution could hide the intermediate state in a kernel-side trap handler, but I think it wouldn't reduce the overall complexity.