linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
	lsf-pc@lists.linux-foundation.org,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>,
	"Shutemov, Kirill" <kirill.shutemov@intel.com>,
	"Schofield, Alison" <alison.schofield@intel.com>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@infradead.org>,
	Theodore Ts'o <tytso@mit.edu>, Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [LSF/MM TOPIC] Memory Encryption on top of filesystems
Date: Wed, 13 Feb 2019 12:29:21 -0800	[thread overview]
Message-ID: <cbbb8876-116c-5e02-d9a3-355b65a53e15@intel.com> (raw)
In-Reply-To: <20190213202147.GP20493@dastard>

On 2/13/19 12:21 PM, Dave Chinner wrote:
> On Wed, Feb 13, 2019 at 07:51:12AM -0800, Dave Hansen wrote:
>> On 2/12/19 7:31 PM, Dan Williams wrote:
>>> Thanks, yes, fscrypt needs a closer look. As far I can see at a quick
>>> glance fscrypt has the same physical block inputs for the encryption
>>> algorithm as MKTME so it seems it could be crafted as a drop in
>>> accelerator for fscrypt for pmem block devices.
>>
>> One bummer is that we have the platform tweak offsets to worry about.
> 
> What's a "platform tweak offset"?

AES-XTS uses a "tweak key" that is typically generated from the physical
address of the data being encrypted.  This mitigates block-relocation
attacks.

However, in a real server, the physical address of an NVDIMM might
change due to a bunch of things, like a PCI card or memory getting added
or removed.  The platform tweak offsets allow the physical address that
actually goes into generating the tweak key to be adjusted.  This can
keep the tweak key for a physical block constant even if the block moves
around in the address space.

>> As far as I know, those are opaque to software and practically prevent
>> us from replicating the MKTME hardware's encryption/decryption in software.
> 
> We're not trying to replicate the encryption in software, just use
> the existing software to manage the keys that get fed to the
> hardware so it can do the encrypt/decrypt operations as the data
> passes through it.

OK, managing the keys alone sounds sane.  I really need to do some
fscrypt homework to see how it manages keys.

      reply	other threads:[~2019-02-13 20:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 16:55 [LSF/MM TOPIC] Memory Encryption on top of filesystems Dave Hansen
2019-02-12 23:51 ` Dave Chinner
2019-02-13  0:27   ` Dan Williams
2019-02-13  2:13     ` Dave Chinner
2019-02-13  3:31       ` Dan Williams
2019-02-13 15:43         ` Theodore Y. Ts'o
2019-02-13 15:51         ` Dave Hansen
2019-02-13 20:21           ` Dave Chinner
2019-02-13 20:29             ` Dave Hansen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cbbb8876-116c-5e02-d9a3-355b65a53e15@intel.com \
    --to=dave.hansen@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=jaegeuk@kernel.org \
    --cc=kirill.shutemov@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).