summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorBlazej Kucman <blazej.kucman@intel.com>2024-03-22 12:51:17 +0100
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-04-02 08:28:04 +0200
commitdf38df3052c3386c0fd076e0d534b4f688b5c8a4 (patch)
tree6321f057bbc68e98aaef51da7d3682d74de398ae /mdadm.h
parentAdd reading Opal NVMe encryption information (diff)
downloadmdadm-df38df3052c3386c0fd076e0d534b4f688b5c8a4.tar.xz
mdadm-df38df3052c3386c0fd076e0d534b4f688b5c8a4.zip
Add reading SATA encryption information
Functionality reads information about SATA disk encryption. Technical documentation used is given in the implementation. The implementation is able to recognized two encryption standards for SATA drives, OPAL and ATA security. If the SATA drive supports OPAL, encryption status and ability are determined based on Opal Level 0 discovery response, for ATA security, based on ATA identify response. If SATA supports OPAL, ability is set to "SED", for ATA security to "Other". SED(Self-Encrypting Drive) is commonly used to describe drive which using OPAL or Enterprise standards developed by Trusted Computing Group. Ability "Other" is used for ATA security because we rely only on information from ATA identify which describe the overall state of encryption. It is allowed to mix disks with different encryption ability such as "SED" and "Other" and it is not security gap. Motivation for adding this functionality is to block mixing of disks in IMSM arrays with encryption enabled and disabled. The main goal is to not allow stealing data by rebuilding array to not encrypted drive which can be read elsewhere. For SATA Opal drives, libata allow_tmp parameter enabled is required, which is necessary for Opal Security commands to work, therefore, if the parameter is not enabled, SATA Opal disk cannot be used in case the encryption will be checked by metadata. Implemented functions will be used in one of the next patches. In one of the next patches, a flag will be added to enable disabling SATA Opal encryption checking due to allow_tpm kernel setting dependency. Signed-off-by: Blazej Kucman <blazej.kucman@intel.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index fbb161ba..52a66b9a 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -853,6 +853,7 @@ extern int restore_stripes(int *dest, unsigned long long *offsets,
int source, unsigned long long read_offset,
unsigned long long start, unsigned long long length,
char *src_buf);
+extern bool sysfs_is_libata_allow_tpm_enabled(const int verbose);
#ifndef Sendmail
#define Sendmail "/usr/lib/sendmail -t"