Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2652159yba; Mon, 22 Apr 2019 10:31:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWBN1Xswbb1PYaIbnvtjb26UaIWDbUdVgsVvr3StwzS7ZD2IMewzGXZiSQOlVuVIMDqGvT X-Received: by 2002:a62:ed16:: with SMTP id u22mr21482046pfh.47.1555954267607; Mon, 22 Apr 2019 10:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555954267; cv=none; d=google.com; s=arc-20160816; b=aUx/ZLQh9zUD76jByv8QbariQsnQAYfdxx17in/NX0Hq75hncfpB3xfCHY/uG9sTwU pb3dLhBf2mCV27w7sJYnbTGrI0h5MIOlQF9JPx9tjXXw5UQFSSKrA2XZVOIyR8KRXNnn N5+fBeMByMgsgUChxyCaMyPXRRtw95V6xCWUcvS2x3ulYzrhYn0ExtmpACDMIjV0enuH 5p5hFWqmUOHXl4my3vd2NWGcsq2RDfbALnteh0h/2KmVV5OePTuDcWqHD0TjUP7I66L5 v0EM273i1na/U+/zBlRFcLH4aKFuvmGCV0QbPdCpuhcehfss6JDwZ1Dj2bHjEqQ4tmoH clVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8v3z1skgjAwbyhsl5OkKdHbkmqluWzC1rvv8KhWJHyk=; b=KrtTEPsz/NerfBniMn1Pxyi3SS4kve1ppTfC7VzgajZsB272szvDgi21nOpwdKZl1X f3xGD+Hc5FzLUbkMUz7bMxD/srYtsIeq8pyna1Dr4Qa5VUPq/32NvsOY3mKEhadYTzYY ATWGSdgteHBtukTzoSCkqdGLjSDNN0wGlJttRlPjiTAe1dq0f9xXVJnrY9KHfXlvjV2W KRGI3Ig1Nk7KuIap745LXHP6yYUxpcBvkL/fA3jDbm5afFsKbrK3+nPCsWXi/vvA3ND0 BQWhklEjap+MLY+LEd7pfpypz2vt0gKW3vcihSUUlFeWuJc2YgSFTH60hSsMOgggg2lI SjSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i68si14012108plb.194.2019.04.22.10.30.51; Mon, 22 Apr 2019 10:31:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727608AbfDVRRQ (ORCPT + 99 others); Mon, 22 Apr 2019 13:17:16 -0400 Received: from mga04.intel.com ([192.55.52.120]:48829 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbfDVRRQ (ORCPT ); Mon, 22 Apr 2019 13:17:16 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Apr 2019 10:17:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,382,1549958400"; d="scan'208";a="339751353" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.181]) by fmsmga006.fm.intel.com with ESMTP; 22 Apr 2019 10:17:15 -0700 Date: Mon, 22 Apr 2019 10:17:15 -0700 From: Sean Christopherson To: Linus Torvalds Cc: "Dr. Greg" , Thomas Gleixner , Jethro Beekman , Andy Lutomirski , Andy Lutomirski , Dave Hansen , Jarkko Sakkinen , LKML , X86 ML , "linux-sgx@vger.kernel.org" , Andrew Morton , "nhorman@redhat.com" , "npmccallum@redhat.com" , "Ayoun, Serge" , "Katz-zamir, Shay" , "Huang, Haitao" , Andy Shevchenko , "Svahn, Kai" , Borislav Petkov , Josh Triplett , "Huang, Kai" , David Rientjes Subject: Re: [PATCH v20 00/28] Intel SGX1 support Message-ID: <20190422171714.GE1236@linux.intel.com> References: <444537E3-4156-41FB-83CA-57C5B660523F@amacapital.net> <5854e66a-950e-1b12-5393-d9cdd15367dc@fortanix.com> <20190420160247.GA17291@wind.enjellic.com> <20190422150119.GA1236@linux.intel.com> <20190422162411.GA27389@wind.enjellic.com> <20190422164827.GC1236@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 22, 2019 at 09:55:47AM -0700, Linus Torvalds wrote: > On Mon, Apr 22, 2019 at 9:48 AM Sean Christopherson > wrote: > > > > Right, and loading a malicious enclave doesn't change those guarantees > > (for other enclaves). Ergo, restricting which enclaves can execute is > > orthogonal to the security provided by SGX. > > But it is absolutely worth noting that TSX made a lot of attacks both > easier to _do_, and also easier to _hide_. > > All while being basically completely worthless technology to everybody > except for some silly SAP benchmark. > > So it is definitely worth at least discussing the downsides of SGX. If > it ends up being another technology that makes it easier to create > malware, without actually having a lot of _good_ software use it, the > patches to enable it should make damn sure that the upsides actually > outweigh the downsides. > > And if the current setup basically is "you have to disable reasonable > SElinux protections that lots of distros use today", I think it's > entirely reasonable saying "the downsides are bigger than the > upsides". I'm not arguing against SGX playing nice with SELinux/LSMs, actually the opposite. I completely agree that enclaves should be subject to LSM restrictions. AIUI, Dr. Greg is proposing a framework that uses SGX's launch control mechanism to restrict what enclaves can run. My point is that restricting what enclaves can run is about protecting the kernel and/or platform, not the enclaves themselves, i.e. using launch control instead of, or in addition to, LSMs doesn't change the security guarantees of SGX.