Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1316559ybg; Wed, 29 Jul 2020 10:56:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJimVMdHEpJrcDqITVaxbVzOrlFbnnO0QKdbgsLrn3O+/NJ68hDsh33XX6M20AOBEqoenv X-Received: by 2002:aa7:dd15:: with SMTP id i21mr18746629edv.153.1596045405122; Wed, 29 Jul 2020 10:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596045405; cv=none; d=google.com; s=arc-20160816; b=SERZ/2T5TfWC5F8Ud/dGseRTzEXIE+lr6cdKq0Hl1jcBkOg9huM2sZeUvWXCtwSKTK wCjX27vZ26AOqU9UsjYmRhdB3WF+B27GktnzkonRdCw4bB/RNCh1EZn4ytHuhdmJqXMy WUdC4V6/mzJLkX+NQce6yGlKDnpTNywHvOZuwmw5374/LVgzGEjT32Q9WFW89oPEixlg nmgcoUljy2TDw0iJwqBHE5vYxGCBGFqGmsCIhrJ0dX5pCg0e6ZLT8iX7xvocSSTijoyu 9uHSCmbAPk5LwbGbHKulTlniK8x8U2DINbPulPacDKvCYl+HlrGiaahICj//5t5cg2xe 8Rqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature:dkim-filter; bh=Nh1awxv8sYMWjyBdKzptNt/99nJiurbGvK4nLo6gXvU=; b=Hku6sWUJFmdHNiGxm0XgPPavksB++HQsvIHAeQh1j5ce/0+JYaPmLW5ovPnT6uFoNj Z3xjQ+PO9HySx4T9gbY97Pw0g58hG/Lxgx5uqupMwfE0PdD5QcblC3X8u+nq0e7Qppkd xfyykE/Ffb9rMaCLD4ul/YYLwkbeb8IWWe2zcg6O49SKXal7CJXNrJD2NJMpL3LfanF3 jxFS+bmW9VfLx3tjtZmUj6h062YF6kC/KQwQ5+KrJ6JQxz0FNMGnEzBUZbh4pkmAmVWN aXKFMvbPHAMbYSLS/W1GYtItv01HDLO6Q4HRP1MSrpBo2v5SNIHDfBPrJHbu9aV08kX1 oaMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="ET55hxg/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n6si1678302ejz.524.2020.07.29.10.56.22; Wed, 29 Jul 2020 10:56:45 -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; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="ET55hxg/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726909AbgG2Rzx (ORCPT + 99 others); Wed, 29 Jul 2020 13:55:53 -0400 Received: from linux.microsoft.com ([13.77.154.182]:33132 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgG2Rzx (ORCPT ); Wed, 29 Jul 2020 13:55:53 -0400 Received: from [192.168.254.32] (unknown [47.187.206.220]) by linux.microsoft.com (Postfix) with ESMTPSA id F0E4120B4908; Wed, 29 Jul 2020 10:55:51 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F0E4120B4908 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1596045352; bh=Nh1awxv8sYMWjyBdKzptNt/99nJiurbGvK4nLo6gXvU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ET55hxg/DBtDrPqMLvEgwflc/o1gjQ4X7Oa3dCnjuCAMmZs7sULLK5HNN8WxJb0i5 0ANYiCsQDqTi6GijyuIZbLq/tNbFUvpAB5eayNWW4/qmE/6W3Ct1DOBfa73pb1uSap kv37tbx4EFhfNrjIQ8YdBDHjoOhsdUZVP47hnYG0= Subject: Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor To: David Laight , Andy Lutomirski Cc: "kernel-hardening@lists.openwall.com" , "linux-api@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-fsdevel@vger.kernel.org" , "linux-integrity@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "oleg@redhat.com" , "x86@kernel.org" References: <20200728131050.24443-1-madvenka@linux.microsoft.com> <59246260-e535-a9f1-d89e-4e953288b977@linux.microsoft.com> From: "Madhavan T. Venkataraman" Message-ID: <98aa9d5e-6eb4-de29-2fc2-06f6dc52086f@linux.microsoft.com> Date: Wed, 29 Jul 2020 12:55:51 -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-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/29/20 3:36 AM, David Laight wrote: > From: Madhavan T. Venkataraman >> Sent: 28 July 2020 19:52 > ... >> trampfd faults are instruction faults that go through a different code path than >> the one that calls handle_mm_fault(). Perhaps, it is the handle_mm_fault() that >> is time consuming. Could you clarify? > Given that the expectation is a few instructions in userspace > (eg to pick up the original arguments for a nested call) > the (probable) thousands of clocks taken by entering the > kernel (especially with page table separation) is a massive > delta. > > If entering the kernel were cheap no one would have added > the DSO functions for getting the time of day. I hear you. BTW, I did not say that the overhead was trivial. I only said that in most cases, applications may not mind that extra overhead. However, since multiple people have raised that as an issue, I will address it. I mentioned before that the kernel can actually supply the code page that sets the context and jumps to a PC and map it so the performance issue can be addressed. I was planning to do that as a future enhancement. If there is a consensus that I must address it immediately, I could do that. I will continue this discussion in my reply to Andy's email. Let us pick it up from there. Thanks. Madhavan > > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales)