mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* WD My Passport SCSI commands, kernel driver?
@ 2013-04-23 21:54 Kenny MacDermid
  2013-04-24  1:12 ` Daniel Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Kenny MacDermid @ 2013-04-23 21:54 UTC (permalink / raw)
  To: linux-kernel

WD My Passport harddrives contain hardware encryption. An
unlock utility is provided for other OSes, but not for Linux.
I'd like to know if the kernel is the correct place for code
to unlock this device, and any tips on how it should be
implemented. I've reverse engineered the vendor specific
commands needed to unlock the device.

When connecting a locked drive the following is shown:

[] usb 1-1: new full-speed USB device number 2 using ohci_hcd
[] usb 1-1: New USB device found, idVendor=1058, idProduct=0748
[] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[] usb 1-1: Product: My Passport 0748
[] usb 1-1: Manufacturer: Western Digital
[] usb 1-1: SerialNumber: ________________________
[] Initializing USB Mass Storage driver...
[] scsi3 : usb-storage 1-1:1.0
[] usbcore: registered new interface driver usb-storage
[] USB Mass Storage support registered.
[] scsi 3:0:0:0: Direct-Access     WD       My Passport 0748 1019 PQ: 0 ANSI: 6
[] scsi 3:0:0:1: CD-ROM            WD       Virtual CD 0748  1019 PQ: 0 ANSI: 6
[] scsi 3:0:0:2: Enclosure         WD       SES Device       1019 PQ: 0 ANSI: 6
[] sd 3:0:0:0: Attached scsi generic sg3 type 0
[] sr2: scsi3-mmc drive: 51x/51x caddy
[] sr 3:0:0:1: Attached scsi CD-ROM sr2
[] sr 3:0:0:1: Attached scsi generic sg4 type 5
[] scsi 3:0:0:2: Attached scsi generic sg5 type 13
[] sd 3:0:0:0: [sdb] Unit Not Ready
[] sd 3:0:0:0: [sdb]  Sense Key : Data Protect [current]
[] sd 3:0:0:0: [sdb]  Add. Sense: Logical unit access not authorized
[] sd 3:0:0:0: [sdb] 3906963456 512-byte logical blocks: (2.00 TB/1.81 TiB)
[] sd 3:0:0:0: [sdb] Write Protect is off
[] sd 3:0:0:0: [sdb] Mode Sense: 47 00 10 08
[] sd 3:0:0:0: [sdb] No Caching mode page present
[] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[] sd 3:0:0:0: [sdb] Unit Not Ready
[] sd 3:0:0:0: [sdb]  Sense Key : Data Protect [current]
[] sd 3:0:0:0: [sdb]  Add. Sense: Logical unit access not authorized
[] sd 3:0:0:0: [sdb] No Caching mode page present
[] sd 3:0:0:0: [sdb] Assuming drive cache: write through

Followed by 160 read errors:

[] sd 3:0:0:0: [sdb] Unhandled sense code
[] sd 3:0:0:0: [sdb]  Result: hostbyte=invalid driverbyte=DRIVER_SENSE
[] sd 3:0:0:0: [sdb]  Sense Key : Data Protect [current]
[] sd 3:0:0:0: [sdb]  Add. Sense: Logical unit access not authorized
[] sd 3:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
[] end_request: critical target error, dev sdb, sector 0
[] Buffer I/O error on device sdb, logical block 0

After sending the correct command to the device using sg_raw,
including a hash of the password, the device will unlock and
sdb will be readable.

Is this something suited to the kernel, or better as a
standalone utility? And if it's suited for the kernel are there
any examples of other drives requiring unlock commands?

Thank you,

Kenny

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-24  1:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-23 21:54 WD My Passport SCSI commands, kernel driver? Kenny MacDermid
2013-04-24  1:12 ` Daniel Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®