Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp990756pxp; Wed, 16 Mar 2022 23:41:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzO3IXu0h6+mNoAE9lB4c+JXrj3AbK5FpcMCM1y4rhRtpyAUM8w+CbsXDbyd3tgqzitdn3Z X-Received: by 2002:a17:90b:2486:b0:1bc:9d6a:f22 with SMTP id nt6-20020a17090b248600b001bc9d6a0f22mr14167247pjb.211.1647499307680; Wed, 16 Mar 2022 23:41:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647499307; cv=none; d=google.com; s=arc-20160816; b=F5U0x/GpIW4jjZspBsdQu8mGZcLruTrha9Z+nhcWrUmW3I/XP35jc53jgamlAFi7al jCn1cR2uunx9OC40KCjPYHh3uRkwViKQU0z8fIEYJ/cEfysZ7BzWkbciTOQl5GP1Rczx 75jqYRIf1eFo3YEbowrD/rbZlM33xGCswZr+nxU2CV6OrY2+3LiuW6JrLPFa6H3n7dMT bjKw71L+GejgJ5NPgCWfgE//ytuUxQ8nzXgJVm3OjrOnaxa6XoAPylIL8Vy0Wrw10a3A H6e3gqJwFCph/Z9Cx3bYn1aLPX8AyVsmNmFQHLwJ3YsI+FIsTySZH6s2zOB9S5OyAC4b dtfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4LeHAKUO6CTj1rQy/hprbLnC5ErxQrPaQ4nGYqZ5ZM4=; b=HjsEb4b6aG9RusSj+DdYCE3gevs3ao5Mn/1flWOJFus92qvXMwnIjDTzIiQ2YFD5hv +WFRe9RVcupFyclBR0iUVX3pBcV0gjrJ97Kf57b7i9w2f/0Rv1cxka9m98oNYHXoc5GC z5dpDWX9f7CDTJrxa5uakxfx3IPy7LkAnG/oBNqM8U4hC7hfT58usbz6gC356DtVMhyn 2x+OlCz7uTtEK7dId3lUD86X54TxHT+LHXohkYDh1T2KdFhpG+4Q164q//IIyE6tjuZq r0sGjE8y8+5HiC42SFBK2TXqMMQ/VuRj/QrPqVrtd7yE0ih6ToMhtM1iuCWK8XfqIalq PCBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rFLzPGJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b17-20020a6567d1000000b003816043f066si1222555pgs.603.2022.03.16.23.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:41:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rFLzPGJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 548792E3584; Wed, 16 Mar 2022 22:31:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbiCQE4C (ORCPT + 99 others); Thu, 17 Mar 2022 00:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbiCQEzx (ORCPT ); Thu, 17 Mar 2022 00:55:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52B0314032; Wed, 16 Mar 2022 21:37:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 20D6D60F0A; Thu, 17 Mar 2022 04:29:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A975C340E9; Thu, 17 Mar 2022 04:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647491373; bh=Neci+Gx7EQANLBllG8qEVqee6Rk06O2hKQ7VcxDD5SA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rFLzPGJitUQLpWpLvTLS6Pd9Jo9WbMANCy0sdJZCliVpMsCuoWElqZck021vKBfC2 X1IA5SndaNeP11C/Oo90JsRhM0Kuu8o4A9wZ1s2DveLwpmoorBwH3DE+Rmw5oyX3Iz 3OVLbMNIWRMBBj28wgNSAzh+9Fm5XuDQLJUC7oQwDpdF1Kk2auKjEtEDcyHsrGRU0Z CoR4JkjZJFXB6OIvKsvidB15RkIvMLdetr/GR59XqZdLCu0IPch5lgmCci1ZYuHo8S U+TEDBU4G6d64B+WK+YLs7jTwdWoL3ysvoLBXot9FnuRNq4HP6ia6cHObSQecE8ZB7 PEQpKhDtyc0pw== Date: Thu, 17 Mar 2022 06:30:29 +0200 From: Jarkko Sakkinen To: Reinette Chatre Cc: Haitao Huang , "Dhanraj, Vijay" , "dave.hansen@linux.intel.com" , "tglx@linutronix.de" , "bp@alien8.de" , "Lutomirski, Andy" , "mingo@redhat.com" , "linux-sgx@vger.kernel.org" , "x86@kernel.org" , "Christopherson,, Sean" , "Huang, Kai" , "Zhang, Cathy" , "Xing, Cedric" , "Huang, Haitao" , "Shanahan, Mark" , "hpa@zytor.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH V2 16/32] x86/sgx: Support restricting of enclave page permissions Message-ID: References: <97565fed-dc67-bab1-28d4-c40201c9f055@intel.com> <7ff5e217-4042-764b-3d32-49314f00ff54@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ff5e217-4042-764b-3d32-49314f00ff54@intel.com> X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 14, 2022 at 08:32:28AM -0700, Reinette Chatre wrote: > Hi Jarkko, > > On 3/13/2022 8:42 PM, Jarkko Sakkinen wrote: > > On Fri, Mar 11, 2022 at 11:28:27AM -0800, Reinette Chatre wrote: > >> Supporting permission restriction in an ioctl() enables the runtime to manage > >> the enclave memory without needing to map it. > > > > Which is opposite what you do in EAUG. You can also augment pages without > > needing the map them. Sure you get that capability, but it is quite useless > > in practice. > > > >> I have considered the idea of supporting the permission restriction with > >> mprotect() but as you can see in this response I did not find it to be > >> practical. > > > > Where is it practical? What is your application? How is it practical to > > delegate the concurrency management of a split mprotect() to user space? > > How do we get rid off a useless up-call to the host? > > > > The email you responded to contained many obstacles against using mprotect() > but you chose to ignore them and snipped them all from your response. Could > you please address the issues instead of dismissing them? I did read the whole email but did not see anything that would make a case for fully exposed EMODPR, or having asymmetrical towards how EAUG works. I had the same discussion with Haitao about PROT_NONE earlier, and am fully aware that PROT_READ is required. BR, Jarkko