Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1364370ybz; Wed, 29 Apr 2020 20:48:50 -0700 (PDT) X-Google-Smtp-Source: APiQypLi1Xh8YQCF+afErBvEl3G0STiw3yvUIAysb1zFnIGVPxRIelwUwCb5f+pJL0RtYcm46boU X-Received: by 2002:a17:906:7ac8:: with SMTP id k8mr848742ejo.235.1588218530438; Wed, 29 Apr 2020 20:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588218530; cv=none; d=google.com; s=arc-20160816; b=OyNtNlM6GnrmpqUWNhqBBvMt9D/CUSon+OgCLGbl9htXC3eKlfB3ZQkyyTo0k50s55 R8SGLmvEzQZOUmP6uYybY5qzKs26sUgDF17IIJx9x/OiU6oqtRXR7KGEH3p5Z55QaaQ4 JpQGLWCXaz4bn7LzwlIwvzoOaDy9njd6RaQxluztQYt92VVTWptDLjUML0uewyZ3LMLn k79kWR7NL2U8M0lcIDqxkgWCPpn0ByWalFUDXL30gIy3XnzbRmtfNG2SAyLqJOHAY4eE +vTPRqZSzVL6fAt+/T/mVAbcRlHNfRq7eDmlZjKZSuxzpv1N1+lwEXLdi0kZYFQUT6T5 BUkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=yQufyLxyFW41A9q1Un8Q8bdl0Uu+13cpUQYNXLm3SP4=; b=cfzJajevWD5LOHQNzUCn5wfTVuGMlpKWEWVKYhxfW9b6WXt8LQsgEWcf13yfdJ2u9h d6oz1v2LhSZvCA4k5WITyivl4CWqYNJhd3y5akRpHx3SFchNQ49LHxy2OxIq6tw13C4Z SujsEEhAz0KB6SKb5X+C/H8kxpltw0RENDjofELKSeHWbtGHRYgoq328c4A45Z92sBqQ YENdhUdgKmobAPywleYNeed9NQvsyPforpH39AaLPsZVdZIDLIok/M4Z7N24rAbVw9kP 3XHX78WPj37loTtxI2Vy56Rcj/lNb5w3qbnAQaLpActiCnBYIm/bHIS5lSs24aUpsVw9 QtUA== 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 h7si4783900eds.336.2020.04.29.20.48.26; Wed, 29 Apr 2020 20:48:50 -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 S1726435AbgD3DrG (ORCPT + 99 others); Wed, 29 Apr 2020 23:47:06 -0400 Received: from mga01.intel.com ([192.55.52.88]:31570 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbgD3DrG (ORCPT ); Wed, 29 Apr 2020 23:47:06 -0400 IronPort-SDR: mHnsCtM/I6+kPPJOsPpLirzb08jBUUnfp2t7nffLBle8Rs1kxiXyiJFHsagcmy5xp3Qwffjjzi 6S8PqrqD4doA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 20:47:05 -0700 IronPort-SDR: YtzPHEi4bPpgKzUT//KwUECmqlJcspg8GyNy3mkDGSdwUMjQ7GjjSXt6S6h0rsrEYcAbuTSPzf g4jRmHigkYTQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,333,1583222400"; d="scan'208";a="276380932" Received: from aanderso-mobl3.amr.corp.intel.com (HELO localhost) ([10.252.52.101]) by orsmga002.jf.intel.com with ESMTP; 29 Apr 2020 20:46:52 -0700 Date: Thu, 30 Apr 2020 06:46:51 +0300 From: Jarkko Sakkinen To: Jethro Beekman 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 Subject: Re: [PATCH v29 00/20] Intel SGX foundations Message-ID: <20200430034651.GB31820@linux.intel.com> References: <20200421215316.56503-1-jarkko.sakkinen@linux.intel.com> <07c1a36c-cebc-3a65-6f92-4a5498fcc369@fortanix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <07c1a36c-cebc-3a65-6f92-4a5498fcc369@fortanix.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 29, 2020 at 05:27:48PM +0200, Jethro Beekman wrote: > On 2020-04-21 23:52, 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 > > Let's merge this. So can I tag reviewed-by's? /Jarkko