Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp15370imm; Thu, 28 Jun 2018 13:01:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLmL2NU3Du0mvLd/dAHNo8Tx5nb2V+fgWyj6+4eAIbMU5f/+0ap04Bzs90kABfyuHQQGl+G X-Received: by 2002:a17:902:a416:: with SMTP id p22-v6mr11905098plq.228.1530216064343; Thu, 28 Jun 2018 13:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530216064; cv=none; d=google.com; s=arc-20160816; b=BbqnMflyHUkuDWUk2TEJptu5xbsvhwOF3N5Gq+tY3QgmzArtLO3lPU86WsJUqQ7d+a 2zaxcgdq8Ul+5u0zAwPW69Mv0snN+OasnMjIV9PQ7anAWPJIHs5sECgDQlRFz2lj/dfS +7N+ZWln3NywuNjyq7wt0Yo4hOZKSUhJYx8e5CxV61ZCw+EY/cU0T/iw2qytruNq5PIy WHKFapG9N52CvCXAtvlAc8K90MvgspAWYSDiKO5uQQ27l8gDYv3XyGF1GtKAGOPV3IMb IVDwPwf1sitxSIz/iOuJsN7lxX1RaHKvxQHbWkAX0IVPO+9h17UpM1/9UHN6V3pgnF3q TIOw== 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:arc-authentication-results; bh=dpuyIwqLGEvjFHXXVfOltAvvZNTSVmAp8I4otWfSr6k=; b=RMfultxv9AhXTrjYuVFkbggZJtc5HkEPZEMGFAyVBb5yJd1QNopLJ2OZdMprvsQQor OP7jrxbhTsAaX/iqMBILJfsgKYxghf0iboC0TQwcf8CWriqrsMpjnQjGk/wNnXqQCKwM rzboidY2vHrNu0DqmYKpmi9rqfekLpChIpszD0xdNdAgzsuVJjTpy1TjyT1BaTplD5tv byr5oHaQPL42dml+/HCILcpblYQyYNT+S1mPdUrLCLNTsR4V4pPgKrMVX5Y+dmeqbedw I95pUsygD2ZIWa5KR+OVDrQXeZt7E5LcWuyzIsKnMzAdlfMHTpJb3HxZoZmSgnHR5a7o w2KA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4-v6si6225532pgv.621.2018.06.28.13.00.34; Thu, 28 Jun 2018 13:01:04 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030570AbeF1Swy (ORCPT + 99 others); Thu, 28 Jun 2018 14:52:54 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:47739 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932549AbeF1Swx (ORCPT ); Thu, 28 Jun 2018 14:52:53 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 3235C805BB; Thu, 28 Jun 2018 20:52:52 +0200 (CEST) Date: Thu, 28 Jun 2018 20:52:51 +0200 From: Pavel Machek To: "Kirill A. Shutemov" Cc: Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky , Dave Hansen , Kai Huang , Jacob Pan , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv3 00/17] MKTME enabling Message-ID: <20180628185251.GB5316@amd> References: <20180612143915.68065-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PmA2V3Z32TCmWXqI" Content-Disposition: inline In-Reply-To: <20180612143915.68065-1-kirill.shutemov@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --PmA2V3Z32TCmWXqI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > MKTME is built on top of TME. TME allows encryption of the entirety of > system memory using a single key. MKTME allows to have multiple encryption > domains, each having own key -- different memory pages can be encrypted > with different keys. >=20 > Key design points of Intel MKTME: >=20 > - Initial HW implementation would support upto 63 keys (plus one > default "up to" > TME key). But the number of keys may be as low as 3, depending to SKU > and BIOS settings >=20 > - To access encrypted memory you need to use mapping with proper KeyID > int the page table entry. KeyID is encoded in upper bits of PFN in page "in the" > table entry. >=20 > - CPU does not enforce coherency between mappings of the same physical > page with different KeyIDs or encryption keys. We wound need to take "would need" > care about flushing cache on allocation of encrypted page and on > returning it back to free pool. >=20 > - For managing keys, there's MKTME_KEY_PROGRAM leaf of the new PCONFIG > (platform configuration) instruction. It allows load and clear keys > associated with a KeyID. You can also ask CPU to generate a key for > you or disable memory encryption when a KeyID is used. Should this go to Documentation somewhere? And next question is -- what is it good for? Prevents attack where DRAM is frozen by liquid nitrogen and moved to another system to extract encryption keys? Does it prevent any attacks that don't involve manipulating hardware? Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --PmA2V3Z32TCmWXqI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAls1LoMACgkQMOfwapXb+vJ5mACglt4/cRyb/gt/KHOTiwID1t8V NhoAoKR8mceQbY+kMGFkXIOM0SabWH1J =JaRN -----END PGP SIGNATURE----- --PmA2V3Z32TCmWXqI--