Skip to content

Extend Single User Mode (SUM) support in sed-opal.

Ondrej Kozina linux-block 3 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 12 repliesApplied
  2. v29 patches 5 repliesSuperseded
  3. v16 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Add code comments in the IOC_OPAL_GET_SUM_STATUS patch explaining the different code paths for key set or not set in the opal_sum_ranges ioctl parameter
- Extended IOC_OPAL_GET_SUM_STATUS commit message referencing the TCG doc where the new columns are described.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/9sed-opal: add UID of Locking Table.block/opal_proto.h block/sed-opal.c+3 -01 reply
2/9sed-opal: add RangeStartRangeLengthPolicy parameter.block/opal_proto.h+1 -01 reply
3/9sed-opal: add Admin1PIN parameter.block/opal_proto.h+1 -01 reply
4/9sed-opal: add IOC_OPAL_REACTIVATE_LSP.block/opal_proto.h block/sed-opal.c include/linux/sed-opal.h +1 more+115 -01 reply
5/9sed-opal: refactor (split) IOC_OPAL_LR_SETUP internals.block/sed-opal.c+45 -281 reply
6/9sed-opal: add IOC_OPAL_LR_SET_START_LEN ioctl.block/sed-opal.c include/linux/sed-opal.h include/uapi/linux/sed-opal.h+30 -01 reply
7/9sed-opal: add IOC_OPAL_ENABLE_DISABLE_LR.block/sed-opal.c include/linux/sed-opal.h include/uapi/linux/sed-opal.h+26 -01 reply
8/9sed-opal: increase column attribute type size to 64 bits.block/sed-opal.c+2 -21 reply
9/9sed-opal: add IOC_OPAL_GET_SUM_STATUS ioctl.block/sed-opal.c include/linux/sed-opal.h include/uapi/linux/sed-opal.h+173 -01 reply

Reviews trailers per patch

None of the 9 patches has a Reviewed-by or Acked-by.

PatchMilan Broz
1/9Reviewed-and-tested-by
2/9Reviewed-and-tested-by
3/9Reviewed-and-tested-by
4/9Reviewed-and-tested-by
5/9Reviewed-and-tested-by
6/9Reviewed-and-tested-by
7/9Reviewed-and-tested-by
8/9Reviewed-and-tested-by
9/9Reviewed-and-tested-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/9] Extend Single User Mode (SUM) support in sed-opal.

This patch series extends support for TCG Storage Opal SSC Single User Mode (SUM) in the sed-opal kernel interface. SUM addresses few shortcomins described in the chapter 2 of the OPAL2 sepecification extension (see below). It better isolates Admin authority from User stored data by taking the Lock/Unlock/Enable/Disable privileges from Admin when managing Locking Ranges configured for SUM.

This permission split necessitates separate ioctl calls for operations that previously could be performed atomically under a single authority. The series refactors existing code and introduces new ioctls to support this model:

- IOC_OPAL_REACTIVATE_LSP: Switch an active OPAL2 device to/from SUM
- IOC_OPAL_LR_SET_START_LEN: Set locking range boundaries only
- IOC_OPAL_ENABLE_DISABLE_LR: Set lock enable states only
- IOC_OPAL_GET_SUM_STATUS: Query SUM configuration status

References:
- TCG Storage Opal SSC Feature Set: Single User Mode specification
- cryptsetup code using the extended sed-opal interface:
https://gitlab.com/cryptsetup/cryptsetup/-/merge_requests/832

Changes since previus version:

v3:
- Add code comments in the IOC_OPAL_GET_SUM_STATUS patch explaining the different code paths for key set or not set in the opal_sum_ranges ioctl parameter
- Extended IOC_OPAL_GET_SUM_STATUS commit message referencing the TCG doc where the new columns are described.

v2:
- Make separate patch adding Locking table UID
- Make separate patch adding RangeStartRangeLengthPolicy parameter
- Make separate patch adding Admin1PIN parameter
- Add comments explaining differences between passing Locking table UID and separate Locking Ranges UID via array in IOC_OPAL_REACTIVATE_LSP
- Minor whitespace fixes
- Minor commit messages changes in IOC_OPAL_LR_SET_START_LEN and IOC_OPAL_ENABLE_DISABLE_LR ioctls patches.
- Additional comments explaining expected answer from the controller in IOC_OPAL_GET_SUM_STATUS ioctl.

Ondrej Kozina (9):
sed-opal: add UID of Locking Table.
sed-opal: add RangeStartRangeLengthPolicy parameter.
sed-opal: add Admin1PIN parameter.
sed-opal: add IOC_OPAL_REACTIVATE_LSP.
sed-opal: refactor (split) IOC_OPAL_LR_SETUP internals.
sed-opal: add IOC_OPAL_LR_SET_START_LEN ioctl.
sed-opal: add IOC_OPAL_ENABLE_DISABLE_LR.
sed-opal: increase column attribute type size to 64 bits.
sed-opal: add IOC_OPAL_GET_SUM_STATUS ioctl.

 block/opal_proto.h            |   4 +
 block/sed-opal.c              | 387 +++++++++++++++++++++++++++++++---
 include/linux/sed-opal.h      |   4 +
 include/uapi/linux/sed-opal.h |  29 +++
 4 files changed, 395 insertions(+), 29 deletions(-)
Signature · 1 line
2.52.0