Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2651997pxf; Sun, 4 Apr 2021 09:06:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzurjduAr0J4s+IuaEqHZvEVUtrQWLgxaWBJbSB1zev6I8+z8cXhj4HvhqOzVFNw6lC4rbI X-Received: by 2002:a17:906:c143:: with SMTP id dp3mr23845400ejc.499.1617552383447; Sun, 04 Apr 2021 09:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617552383; cv=none; d=google.com; s=arc-20160816; b=BVAxkQCzVRpZhKTshTV6lBp4AkUvMMFsNmZNVqAC55ndpEI4K2xl4BylYnrRACtdIj BjPy8QSNMhd8IQy1mqLEsT88xKvM7H0Qflzq97ERi70jK4gIvq9pLHei08u74w+4zBMn zTO+czVWGI1Dizo+DBa0t91qfsaXs4PBwYdhzUlhq3ACamTxZ/toJqkbrrX36bK7I/O2 OED/vLcaEfCo4kSXZqgI1osBjnkddwkfrm0Etzgje29SI1JM9SFaQULoc5c5qLfUMHsl htQI9MjbBoRg1ZFna1KqlzuQutg1fT+3qBnMTo2ZbtF0N6qd4ufAsRZTXUKCi3uEhuMb pBsw== 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=3n084KZdEuFMk2zj4F98rzE7TTJN0oUVa0xRFwEvpPM=; b=xMIV8x8ygsJTcaYQQpL7c0+esUd6ptDjMiF1DlofelJ1OBSVoJ3fdeqDDaLbs3Qag3 LyT0uX8oxYSCWNJmMp8pdA16M05HC1FALv/Gx614yhQkQi2meWiycjp8er7j+tpQxkBW 5VnIKPxIzvQdpKRoGFoClHrxET8RoCwbuCxiylika4jRYga3bXzqEnpIMLtKW4trEWXL tSOs+tC9rz+GbL/HHVIGItKBo+ZfKrECMaJI1zqCee7/gu8xFA27jykUwf6F+oq89HI+ 8C+JHHJBXCIqQuk9ID8p4ZTVtNtde8kPJHZKRZ0eADTojwyZ01Wne2BzF3kBXj/M9yDb /A1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kz6EoBcQ; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c8si2716016edt.512.2021.04.04.09.06.01; Sun, 04 Apr 2021 09:06:23 -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=@kernel.org header.s=k20201202 header.b=kz6EoBcQ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230494AbhDDQE0 (ORCPT + 99 others); Sun, 4 Apr 2021 12:04:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:49026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229861AbhDDQE0 (ORCPT ); Sun, 4 Apr 2021 12:04:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD4566136A; Sun, 4 Apr 2021 16:04:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617552261; bh=sEaItNntg9/E1pYVhYET1DAxvEy36SMyXpldPmdXlak=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kz6EoBcQwIMtC6ODI2PQujs3LKKx+BluYOuLVAPa3lazHbRrrJYqCeo0TWkaNkPjV nS3r4QLXsfkln8zsQ/OlK06mZLqyNVMiqZ8W9GZJxIqBvEra+nylwPfrykJsUB8Hoo t8AZf7wWGbLIAmkcG1wgS3jE4tAtLDbUMkRWlRsF0pqQ9wh6swyGPnDkEVCN6yysxT lGY4EcMIH2KBeQT4dhYQeFqMe4hzswaEWDSi6+pW2iS9kYq1b5z5Oh2HlEogswewCS o3ezocXKZlXDgshT6VME3SPX0iAjQlA0bVbX7Qdl6YKeWTA21qSIXM8w/yqmCTxAAw 8OYCnrMSq+P6w== Date: Sun, 4 Apr 2021 19:04:18 +0300 From: Jarkko Sakkinen To: Jethro Beekman Cc: Dave Hansen , Raoul Strackx , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND 0/3] x86/sgx: eextend ioctl Message-ID: References: <9688abee-6ba7-e1d9-701e-a5cabac36269@fortanix.com> <0498080e-6fdc-ed6d-8efa-d9c3265fe7e5@intel.com> <9d15aae0-078a-ed72-6c14-155cd1bf27c5@fortanix.com> <247ffbee-0ef6-1b6f-75aa-2dc06df42d5d@intel.com> <4a122198-054f-609e-e96c-b69ff941c8a7@intel.com> <9a841584-65e8-31e9-6bd4-0140b33434e8@fortanix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9a841584-65e8-31e9-6bd4-0140b33434e8@fortanix.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 02, 2021 at 08:31:19PM +0200, Jethro Beekman wrote: > On 2021-04-02 17:53, Dave Hansen wrote: > > On 4/2/21 1:38 AM, Jethro Beekman wrote: > >>> So, we're talking here about pages that have been EEADDED, but for > >>> which we do not want to include the entire contents of the page? > >>> Do these contents always include the beginning of the page, or can > >>> the holes be anywhere? > >> Holes can be anywhere, and EEXTEND calls need not be sequential in > >> memory address or even relate to the most recently EADDed page. > > > > I think you're referring to the SGX architecture itself here. The > > architecture permits this, right? > > Yes. > > > But, why would an enclave loader application ever do this? > > e.g. to save space > > > Is this something we want to support in Linux? > > Why not? Is there a good reason to not fully support this part of the CPU architecture? Yes, in generic sense :-) If one would disagree, that would be same as saying that everything should execute in ring-0 because that only gives "full support". /Jarkko