nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: "Schofield, Alison" <alison.schofield@intel.com>,
	Kees Cook <keescook@chromium.org>,
	linux-nvdimm <linux-nvdimm@lists.01.org>,
	Eric Biggers <ebiggers3@gmail.com>,
	David Howells <dhowells@redhat.com>,
	keyrings@vger.kernel.org
Subject: Re: [PATCH v9 05/12] nfit/libnvdimm: add unlock of nvdimm support for Intel DIMMs
Date: Tue, 25 Sep 2018 17:33:07 -0700	[thread overview]
Message-ID: <CAPcyv4jH3WyZtnEBQiKy48NtwmG001N-=Qf2iD5LOcM345mawA@mail.gmail.com> (raw)
In-Reply-To: <153791869334.70158.4241586057931564295.stgit@djiang5-desk3.ch.intel.com>

On Tue, Sep 25, 2018 at 4:39 PM Dave Jiang <dave.jiang@intel.com> wrote:
>
> Add support to allow query the security status of the Intel nvdimms and
> also unlock the dimm via the kernel key management APIs. The passphrase is
> expected to be pulled from userspace through keyutils. Moving the Intel
> related bits to its own source file as well.
>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>

The series is looking great, just a minor comment here...

[..]
> diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c
> index f414ed346215..b7e22e6b80db 100644
> --- a/drivers/nvdimm/dimm_devs.c
> +++ b/drivers/nvdimm/dimm_devs.c
[..]
> +int nvdimm_security_unlock_dimm(struct device *dev)
> +{
[..]
> +       if (rc == 0) {
> +               if (!cached_key) {
> +                       key_link(nvdimm_keyring, key);
> +                       nvdimm->key = key;
> +               }
> +               nvdimm->state = NVDIMM_SECURITY_UNLOCKED;
> +               dev_info(dev, "DIMM %s unlocked\n", dev_name(dev));

I predict the noise from this print will necessitate a dev_dbg()
conversion down the road. Let's go ahead and make it dev_dbg() now.

> +       } else {
> +               key_unlink(nvdimm_keyring, key);
> +               key_invalidate(key);
> +               nvdimm->key = NULL;
> +               dev_warn(dev, "Failed to unlock dimm: %s\n", dev_name(dev));

This looks good, let's only spam the logs when things go bad.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2018-09-26  0:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25 23:37 [PATCH v9 00/12] Adding security support for nvdimm Dave Jiang
2018-09-25 23:37 ` [PATCH v9 01/12] nfit: add support for Intel DSM 1.7 commands Dave Jiang
2018-09-25 23:37 ` [PATCH v9 02/12] libnvdimm: create keyring to store security keys Dave Jiang
2018-09-25 23:38 ` [PATCH v9 03/12] nfit/libnvdimm: store dimm id as a member to struct nvdimm Dave Jiang
2018-09-25 23:38 ` [PATCH v9 04/12] keys: export lookup_user_key to external users Dave Jiang
2018-09-25 23:38 ` [PATCH v9 05/12] nfit/libnvdimm: add unlock of nvdimm support for Intel DIMMs Dave Jiang
2018-09-26  0:33   ` Dan Williams [this message]
2018-09-25 23:38 ` [PATCH v9 06/12] nfit/libnvdimm: add set passphrase support for Intel nvdimms Dave Jiang
2018-09-26  0:42   ` Dan Williams
2018-09-25 23:38 ` [PATCH v9 07/12] nfit/libnvdimm: add disable passphrase support to Intel nvdimm Dave Jiang
2018-09-25 23:38 ` [PATCH v9 08/12] nfit/libnvdimm: add freeze security " Dave Jiang
2018-09-25 23:38 ` [PATCH v9 09/12] nfit/libnvdimm: add support for issue secure erase DSM " Dave Jiang
2018-09-26  1:04   ` Dan Williams
2018-09-25 23:38 ` [PATCH v9 10/12] nfit_test: add context to dimm_dev for nfit_test Dave Jiang
2018-09-25 23:38 ` [PATCH v9 11/12] nfit_test: add test support for Intel nvdimm security DSMs Dave Jiang
2018-09-25 23:38 ` [PATCH v9 12/12] libnvdimm: add documentation for nvdimm security support Dave Jiang

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='CAPcyv4jH3WyZtnEBQiKy48NtwmG001N-=Qf2iD5LOcM345mawA@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=dave.jiang@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).