nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: alison.schofield@intel.com, keescook@chromium.org,
	linux-nvdimm@lists.01.org, ebiggers3@gmail.com,
	keyrings@vger.kernel.org
Subject: Re: [PATCH v6 05/11] nfit/libnvdimm: add set passphrase support for Intel nvdimms
Date: Thu, 2 Aug 2018 15:29:22 -0700	[thread overview]
Message-ID: <465ca753-ad2c-6888-b139-8cb9c4472290@intel.com> (raw)
In-Reply-To: <20101.1533211253@warthog.procyon.org.uk>



On 08/02/2018 05:00 AM, David Howells wrote:
> Dave Jiang <dave.jiang@intel.com> wrote:
> 
>> +	/* request new key from userspace */
>> +	key = nvdimm_request_key(dev, update);
>> +	if (!key) {
>> +		dev_dbg(dev, "%s: failed to acquire new key\n", __func__);
>> +		rc = -ENXIO;
>> +		goto out;
>> +	}
> 
> I still think you're better taking two explicit key IDs as part of the command
> rather than using request_key() to *hopefully* pick the right target.

In order to do this, I would need to do a key_add() in userspace to add
a new key with the new payload before I can initiate update correct? So
for an update it would look something like:
1. (user) add key with new payload
2. (user) lookup old key
3. (user) write to sysfs update attrib: "update:<old id>:<new id>"
4. (kernel) check old_id against cached key and make sure they match
5. (kernel) check new key desc against old key and make sure they match
6. (kernel) update to hardware
6. (kernel) when success, link the new key to the kernel keyring and
it'll replace the old key?


_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2018-08-02 22:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 20:58 [PATCH v6 00/11] Adding security support for nvdimm Dave Jiang
2018-07-25 20:58 ` [PATCH v6 01/11] nfit: add support for Intel DSM 1.7 commands Dave Jiang
2018-07-25 20:58 ` [PATCH v6 02/11] libnvdimm: create keyring to store security keys Dave Jiang
2018-07-25 20:58 ` [PATCH v6 03/11] nfit/libnvdimm: store dimm id as a member to struct nvdimm Dave Jiang
2018-07-25 20:58 ` [PATCH v6 04/11] nfit/libnvdimm: add unlock of nvdimm support for Intel DIMMs Dave Jiang
2018-07-31 22:04   ` Alison Schofield
2018-07-31 22:48     ` Jiang, Dave
2018-07-25 20:58 ` [PATCH v6 05/11] nfit/libnvdimm: add set passphrase support for Intel nvdimms Dave Jiang
2018-07-25 20:59 ` [PATCH v6 06/11] nfit/libnvdimm: add disable passphrase support to Intel nvdimm Dave Jiang
2018-07-25 20:59 ` [PATCH v6 07/11] nfit/libnvdimm: add freeze security " Dave Jiang
2018-07-25 20:59 ` [PATCH v6 08/11] nfit/libnvdimm: add support for issue secure erase DSM " Dave Jiang
2018-07-25 20:59 ` [PATCH v6 09/11] nfit_test: add context to dimm_dev for nfit_test Dave Jiang
2018-07-25 20:59 ` [PATCH v6 10/11] nfit_test: add test support for Intel nvdimm security DSMs Dave Jiang
2018-07-25 20:59 ` [PATCH v6 11/11] libnvdimm: add documentation for nvdimm security support Dave Jiang
2018-08-02 11:58 ` [PATCH v6 04/11] nfit/libnvdimm: add unlock of nvdimm support for Intel DIMMs David Howells
2018-08-02 12:00 ` [PATCH v6 05/11] nfit/libnvdimm: add set passphrase support for Intel nvdimms David Howells
2018-08-02 22:29   ` Dave Jiang [this message]
2018-08-03  0:28     ` Dave Jiang
2018-08-03  8:32     ` David Howells
2018-08-03 16:07       ` Dave Jiang
2018-08-03  8:28   ` David Howells

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=465ca753-ad2c-6888-b139-8cb9c4472290@intel.com \
    --to=dave.jiang@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=dhowells@redhat.com \
    --cc=ebiggers3@gmail.com \
    --cc=keescook@chromium.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    /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).