linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: scott.bauer@intel.com (Scott Bauer)
Subject: [PATCH v2 0/4] SED OPAL Library
Date: Tue, 29 Nov 2016 14:51:58 -0700	[thread overview]
Message-ID: <1480456322-27339-1-git-send-email-scott.bauer@intel.com> (raw)

Changes from v1->v2
1) Removed work queues and call backs. The code now operates in
   in a normal call chain fashion. Each opal command provides a
   series of commands it needs to run. next() iterates through
   the functions only calling the subsequent function once the
   current has finished and if no error has occured.

2) Refactored the ioctl handling. A driver that wants to
   support SED now sets up a block ioctl handler and forwards
   the request into the sed library.

3) The implementing ioctl handler in the driver now passes a
   combined send/recv function pointer and a pointer to "data"
   that may be necessary for sending data to the controller.
   In the case of nvme we send the "nvme_sec_submit" fn pointer
   as well as a nvme_ns sturcutre as the "data".

   When the sed library wants to send the opal packet to the
   controller it calls the fn pointer. In this case it calls
   nvme_sec_submit, and passes the nvme_ns. The nvme driver
   handles the actual submission to the controller.

4) Instead of passing around strings we now pass around major
   and minor numbers.

5) Removed the user-land pointer indirection.

6) Moved sed* from lib/ to block/

7) Removed the manditory secure erase when setting up a locking
   range. Instead made a new secure erase function.

9) Added a kref_get and nvme_ns_put in the unlock_from_suspend.

8) Added addition to MAINTAINERS
--------------------------------------------------------------------

This Patch series implements a large portion of the Opal protocol for
self encrypting devices. The driver has the capability of storing a
locking range's password. It either stores directly in the driver,
or in the Kernel's key managment. The password can then be replayed
during a resume from previous suspend-to-RAM.

The driver also supports logic to bring the device out of a factory
default-inactive state into a functional Opal state.

The following logic is supported in order to bring the tper into a
working state:

1) Taking Ownership of the drive (Setting the Admin CPIN).
2) Activating the Locking SP (In Single User Mode or Normal Mode).
3) Setting up Locking Ranges (Single User or Normal Mode).
4) Adding users to Locking Ranges (Normal Mode Only).
5) Locking or Unlocking Locking Rangs (Single User Mode or Normal Mode).
6) Reverting the TPer (Restore to factory default).
7) Setting LR/User passwords (Single User Mode or Normal Mode).
8) Eabling/disabling Shadow MBR.
9) Enabling Users in the LockingSP (Normal Mode Only).
10) Saving Password for resume from suspend.


Each command above is exported through an ioctl in the block layer.

Scott Bauer (4):
  include: Add definitions for sed
  block: Add Sed-opal library
  nvme: Implement resume_from_suspend and sed block ioctl
  Maintainers: Add Information for SED Opal library

 MAINTAINERS                   |   10 +
 block/Makefile                |    2 +-
 block/sed-opal.c              | 3157 +++++++++++++++++++++++++++++++++++++++++
 block/sed-opal_internal.h     |  601 ++++++++
 block/sed.c                   |  207 +++
 drivers/nvme/host/core.c      |   76 +
 drivers/nvme/host/nvme.h      |    4 +-
 drivers/nvme/host/pci.c       |    7 +-
 include/linux/sed-opal.h      |   57 +
 include/linux/sed.h           |   85 ++
 include/uapi/linux/sed-opal.h |  108 ++
 include/uapi/linux/sed.h      |   64 +
 12 files changed, 4375 insertions(+), 3 deletions(-)
 create mode 100644 block/sed-opal.c
 create mode 100644 block/sed-opal_internal.h
 create mode 100644 block/sed.c
 create mode 100644 include/linux/sed-opal.h
 create mode 100644 include/linux/sed.h
 create mode 100644 include/uapi/linux/sed-opal.h
 create mode 100644 include/uapi/linux/sed.h

             reply	other threads:[~2016-11-29 21:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 21:51 Scott Bauer [this message]
2016-11-29 21:51 ` [PATCH v2 1/4] include: Add definitions for sed Scott Bauer
2016-11-29 21:52 ` [PATCH v2 2/4] block: Add Sed-opal library Scott Bauer
2016-11-30 18:13   ` Keith Busch
2016-11-30 18:09     ` Scott Bauer
2016-12-01  0:50   ` Keith Busch
2016-12-01 10:04     ` Christoph Hellwig
2016-12-01 17:53       ` Scott Bauer
2016-12-01 18:22         ` Keith Busch
2016-12-09 17:45           ` Scott Bauer
2016-12-09 18:30             ` Christoph Hellwig
2016-12-09 18:50               ` Scott Bauer
2016-11-29 21:52 ` [PATCH v2 3/4] nvme: Implement resume_from_suspend and sed block ioctl Scott Bauer
2016-12-01  0:50   ` Keith Busch
2016-11-29 21:52 ` [PATCH v2 4/4] Maintainers: Add Information for SED Opal library Scott Bauer
2017-02-10 16:46   ` Elliott, Robert (Persistent Memory)
2017-02-10 16:44     ` Scott Bauer
2017-02-11  2:24       ` Elliott, Robert (Persistent Memory)
2017-02-13  8:04       ` hch

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=1480456322-27339-1-git-send-email-scott.bauer@intel.com \
    --to=scott.bauer@intel.com \
    /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).