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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 5F25DC4363A for ; Tue, 27 Oct 2020 00:40:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C21F720760 for ; Tue, 27 Oct 2020 00:40:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C21F720760 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 115786B005C; Mon, 26 Oct 2020 20:40:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C65F6B005D; Mon, 26 Oct 2020 20:40:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ECF5E6B006E; Mon, 26 Oct 2020 20:40:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0038.hostedemail.com [216.40.44.38]) by kanga.kvack.org (Postfix) with ESMTP id C0C116B005C for ; Mon, 26 Oct 2020 20:40:54 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5D4BE8249980 for ; Tue, 27 Oct 2020 00:40:54 +0000 (UTC) X-FDA: 77415850428.18.skirt98_14047ac27277 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 442F6100ED0E4 for ; Tue, 27 Oct 2020 00:40:54 +0000 (UTC) X-HE-Tag: skirt98_14047ac27277 X-Filterd-Recvd-Size: 3905 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Tue, 27 Oct 2020 00:40:53 +0000 (UTC) IronPort-SDR: tNSDHG20EZG1LwebYxnKFRBKO+IYI5TUT4Hs3eu+K1l7cFCKv/OtjHtG9Bgu6b4WB5g06XcCj8 7ITrEjPQqKoA== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="147292234" X-IronPort-AV: E=Sophos;i="5.77,421,1596524400"; d="scan'208";a="147292234" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 17:40:51 -0700 IronPort-SDR: os461CjYNM3H4l2jv7ewAZ4j2EOy4Rs+7Bp43uIB9IyeLcIxtvzxY2ip6+5KItGClBh6ZQbLuR E4LNYcB7UQGw== X-IronPort-AV: E=Sophos;i="5.77,421,1596524400"; d="scan'208";a="322739919" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.160]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 17:40:50 -0700 Date: Mon, 26 Oct 2020 17:40:49 -0700 From: Sean Christopherson To: Andy Lutomirski Cc: "Dr. Greg" , Dave Hansen , Jarkko Sakkinen , Haitao Huang , Andy Lutomirski , X86 ML , linux-sgx@vger.kernel.org, LKML , Linux-MM , Andrew Morton , Matthew Wilcox , Jethro Beekman , Darren Kenny , Andy Shevchenko , asapek@google.com, Borislav Petkov , "Xing, Cedric" , chenalexchen@google.com, Conrad Parker , cyhanish@google.com, "Huang, Haitao" , Josh Triplett , "Huang, Kai" , "Svahn, Kai" , Keith Moyer , Christian Ludloff , Neil Horman , Nathaniel McCallum , Patrick Uiterwijk , David Rientjes , Thomas Gleixner , yaozhangx@google.com Subject: Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect() Message-ID: <20201027004048.GC28122@linux.intel.com> References: <20201026105128.GA30004@wind.enjellic.com> <4B39703F-280C-4AED-B4BB-047BD216B792@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B39703F-280C-4AED-B4BB-047BD216B792@amacapital.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Oct 26, 2020 at 03:59:35PM -0700, Andy Lutomirski wrote: > > On Oct 26, 2020, at 3:51 AM, Dr. Greg wrote: > > The open question in all of this is that the EDMM paper, as well as > > the SDM, indicate the effects of an ENCLU[EMODPE] are immediate inside > > of a running enclave. I'm assuming that this does NOT mean that once > > a context of execution is running in enclave mode it would be capable > > of evading standard page protections but the 'immediate' is somewhat > > disquieting and probably deserves clarification, despite Dave Hansen's > > adament concerns about discussing the instruction... :-) > > If EMODPE writes an entry into the TLB that violates PTE permissions, then we > have a real problem. I would be very surprised if this were to be the case. EMODPE only affects the EPCM, it doesn't magically change the PTEs or insert into the TLB. The "immediate" wording in the whitepaper is differentiating it from EMODPR and EMODT, where the modifications only take effect after they have been verified by the enclave via EACCEPT.