Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drive_encryption: Fix ata passthrough12 verify
Based on documentation SCSI Primary Commands - 4 (SPC-4) only first 7 bits of first byte in sense data are used to store response code. The current verification uses all 8 bits for comparison of response code. Incorrect verification may make impossible to use SATA disks with IMSM, because IMSM requires verification of the encryption state before use. There was issue in kernel libata [1]. This issue hides bug in mdadm because last bit was not set. Example output with affected mdadm: Port3 : /dev/sde (BTPR212503EK120LGN) mdadm: Failed ata passthrough12 ioctl. Device: /dev/sde. mdadm: Failed to get drive encryption information The fix is use the first 7 bits of Byte 0, to compare with the expected values. [1] https://git.kernel.org/pub/scm/linux/kernel/git/libata/linux.git/commit/?id=38dab832c3f4 Fixes: df38df3 ("Add reading SATA encryption information") Signed-off-by: Blazej Kucman <[email protected]>
- Loading branch information