Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1227898ybk; Thu, 14 May 2020 03:52:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2pbyov+O3DO00+VglNHpzVPBca2wkETMZV6gVf2sS04VRi7b65uNIGwmWBR+BsBCjF102 X-Received: by 2002:a17:906:909:: with SMTP id i9mr3078561ejd.347.1589453524502; Thu, 14 May 2020 03:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589453524; cv=none; d=google.com; s=arc-20160816; b=NdgwPtMlLzUQ6O08dN1xosLzBckiUZ8+4XJkb7+RPkcUbHk5izAhVOdFTEhff2LfED 5BH0U6GlFqw2Squ1M23SLNkpGF3NZqocN7y1BLJfWG7A+IkAJ6zemD/ELlsGtwkERg+c xK4QH5QR3P+dIfysJ2GZV/R8rtocPZJgRcRVzLtiQPKsW95XMVYBvwwxcWZi1bzJ2Iat 7He3l3sB5nJqEekVksDlkLfohufSVExEVdlBHgzBPbk7aY0a+hoqjvPcPwEPWw/Gq7Vl YEc9aapwBFQQ9SWV4uzsAnrOiiiwVOd9A9XACHPCR/eFblp9u+U+sbUP1N7KSf+uMUei loKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:ironport-sdr:ironport-sdr; bh=MxLeUFx0pzIg6hTwmSOu1ONrdvBDKrcrHIAtEGKdaic=; b=iYbdZlBI7qnoS0NZG7EAuIN4ewCI2O2ZCGqLGwxNjUtknl8Me91ICGK8Uod+AKeIS+ 5ZskXmWDFagobb5eBRq4/zbCUws1YFM17GBkaIzUpk1KtJvLBzxYTFx/oqjBNZC3UZRN VoDw0e6MNoT4Agcbyqj4Lpm/g2Zm50Qb/cVSEDI8pztFQ+Vu7IGFjHCrwIfO10OpHPXN jz8iKGMyk4PS22BxMsxkMLCaerp3wQkCf+SvlkDDLGGdYHnW9qe9UAZr7T+C9Xrv5hzb EKSDdTpj96vfw6Pgzw7cwv5nyaprZsQKiSXv37xFZdDxiJfi+bpmmbXe/AyvkbK/ZEOB yj4g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b16si1382687edr.270.2020.05.14.03.51.41; Thu, 14 May 2020 03:52:04 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726660AbgENKuK (ORCPT + 99 others); Thu, 14 May 2020 06:50:10 -0400 Received: from mga12.intel.com ([192.55.52.136]:28179 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbgENKuJ (ORCPT ); Thu, 14 May 2020 06:50:09 -0400 IronPort-SDR: kZ3Yen+3b4qd8l7pSOm3gPb3Q3wsdhLP1/AJ/qTq4yxkWjgzIjIpQMYVpGI5xS4mFmO7b+0uCH wDmnVJklJQoQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 03:50:08 -0700 IronPort-SDR: 6yzv9taJo2YqKErlZKB5UQZ9/+NIvrUaZXECL/VKte8rmHcm0E7VoinncrcgWeBmL30R9hB9uf kMCl9r4b6X4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,391,1583222400"; d="scan'208";a="262798392" Received: from apogrebi-mobl2.ger.corp.intel.com ([10.249.39.119]) by orsmga003.jf.intel.com with ESMTP; 14 May 2020 03:49:59 -0700 Message-ID: Subject: Re: [PATCH v29 00/20] Intel SGX foundations From: Jarkko Sakkinen To: "Hui, Chunyang" Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, bp@alien8.de, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, cedric.xing@intel.com, puiterwijk@redhat.com Date: Thu, 14 May 2020 13:49:54 +0300 In-Reply-To: <20200512115551.GA84010@sanqian-dev-0.10.0> References: <20200421215316.56503-1-jarkko.sakkinen@linux.intel.com> <20200512115551.GA84010@sanqian-dev-0.10.0> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-05-12 at 19:55 +0800, Hui, Chunyang wrote: > On Wed, Apr 22, 2020 at 12:52:56AM +0300, Jarkko Sakkinen wrote: > > Intel(R) SGX is a set of CPU instructions that can be used by applications > > to set aside private regions of code and data. The code outside the enclave > > is disallowed to access the memory inside the enclave by the CPU access > > control. > > > > There is a new hardware unit in the processor called Memory Encryption > > Engine (MEE) starting from the Skylake microacrhitecture. BIOS can define > > one or many MEE regions that can hold enclave data by configuring them with > > PRMRR registers. > > > > The MEE automatically encrypts the data leaving the processor package to > > the MEE regions. The data is encrypted using a random key whose life-time > > is exactly one power cycle. > > > > The current implementation requires that the firmware sets > > IA32_SGXLEPUBKEYHASH* MSRs as writable so that ultimately the kernel can > > decide what enclaves it wants run. The implementation does not create > > any bottlenecks to support read-only MSRs later on. > > > > You can tell if your CPU supports SGX by looking into /proc/cpuinfo: > > > > cat /proc/cpuinfo | grep sgx > > Tested-by: Chunyang Hui > > Occlum project (https://github.com/occlum/occlum) is a libOS built on top of > Intel SGX feature. We ran Occlum tests using patch v29 on SGX hardware with > the Flexible Launch Control (FLC) feature and didn't find any problems. > As Occlum core developers, we would like these patches to be merged soon. Great, thanks adding tested by to the driver and reclaimer patch. /Jarkko