Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1426059

[PATCH 0/3] nvme: Don't add namespaces for locked drives

From Jethro Beekman <kernel@jbeekman.nl>
Newsgroups linux.kernel
Subject [PATCH 0/3] nvme: Don't add namespaces for locked drives
Date 2016-06-20 01:20 +0200
Message-ID <rLUat-pE-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi all,

If an NVMe drive is locked with ATA Security, most commands sent to the drive 
will fail. This includes commands sent by the kernel upon discovery to probe 
for partitions. The failing happens in such a way that trying to do anything 
with the drive (e.g. sending an unlock command; unloading the nvme module) is 
basically impossible with the high default command timeout.

This patch adds a check to see if the drive is locked, and if it is, its 
namespaces are not initialized. It is expected that userspace will send the 
proper "security send/unlock" command and then reset the controller. Userspace 
tools are available at [1].

This is my first kernel patch so please let me know if you have any feedback.

I intend to also submit a future patch that tracks ATA Security commands sent 
from userspace and remembers the password so it can be submitted to a locked 
drive upon pm_resume. (still WIP)

Jethro Beekman

[1] https://github.com/jethrogb/nvme-ata-security

Jethro Beekman (3):
  nvme: When scanning namespaces, make sure the drive is not locked
  nvme: Add function for NVMe security receive command
  nvme: Check if drive is locked using ATA Security

 drivers/nvme/host/core.c | 70 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

-- 
2.9.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] nvme: Don't add namespaces for locked drives Jethro Beekman <kernel@jbeekman.nl> - 2016-06-20 01:20 +0200
  Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives Sagi Grimberg <sagigrim@gmail.com> - 2016-06-20 09:00 +0200
  Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives Keith Busch <keith.busch@intel.com> - 2016-06-20 17:20 +0200
    Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives Jethro Beekman <kernel@jbeekman.nl> - 2016-06-20 21:10 +0200
      Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives Keith Busch <keith.busch@intel.com> - 2016-06-21 01:00 +0200
        Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives Jethro Beekman <kernel@jbeekman.nl> - 2016-06-21 06:00 +0200

csiph-web