Skip to content

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

Open
blktests-ci[bot] wants to merge 6 commits intolinus-master_basefrom
series/1049076=>linus-master
Open

Extend Single User Mode (SUM) support in sed-opal.#528
blktests-ci[bot] wants to merge 6 commits intolinus-master_basefrom
series/1049076=>linus-master

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Jan 30, 2026

Pull request for series with
subject: Extend Single User Mode (SUM) support in sed-opal.
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1049076

@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 30, 2026

Upstream branch: 8dfce89
series: https://patchwork.kernel.org/project/linux-block/list/?series=1049076
version: 1

@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 3, 2026

Upstream branch: de0674d
series: https://patchwork.kernel.org/project/linux-block/list/?series=1049076
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1049076=>linus-master branch from a6d9bd4 to 8763004 Compare February 3, 2026 19:12
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 9d3c6de to 7c2ae0a Compare February 5, 2026 03:28
oniko added 3 commits February 5, 2026 12:34
This adds the 'Reactivate' method as described in the
"TCG Storage Opal SSC Feature Set: Single User Mode"
document (ch. 3.1.1.1).

The method enables switching an already active SED OPAL2 device,
with appropriate firmware support for Single User Mode (SUM),
to or from SUM.

Signed-off-by: Ondrej Kozina <[email protected]>
IOC_OPAL_LR_SETUP is used to set up a locking range entirely under a
single authority (usually Admin1), but for Single User Mode (SUM),
the permissions for attributes (RangeStart, RangeLength)
and (ReadLockEnable, WriteLockEnable, ReadLocked, WriteLocked)
may be split between two different authorities. Typically, it is Admin1
for the former and the User associated with the LockingRange in SUM
for the latter.

This commit only splits the internals in preparation for the introduction
of separate ioctls for setting RangeStart, RangeLength and the rest
using new ioctl calls.

Signed-off-by: Ondrej Kozina <[email protected]>
This ioctl is used to set up locking range start (offset)
and locking range length attributes only.

In Single User Mode (SUM), if the RangeStartRangeLengthPolicy parameter
is set in the 'Reactivate' method, only Admin authority maintains the
locking range length and start (offset) attributes of Locking objects
set up for SUM. All other attributes from struct opal_user_lr_setup
(RLE - read locking enabled, WLE - write locking enabled) shall
remain in possession of the User authority associated with the Locking
object set for SUM.

Therefore, we need a separate function for setting up locking range
start and locking range length because it may require two different
authorities (and sessions) if the RangeStartRangeLengthPolicy attribute
is set.

With the IOC_OPAL_LR_SET_START_LEN ioctl, the opal_user_lr_setup
members 'RLE' and 'WLE' of the ioctl argument are ignored.

The RangeStartRangeLengthPolicy attribute is described in ch.
3.1.1.1.1.2 of the TCG Storage Opal SSC Feature Set: Single User Mode
document.

Signed-off-by: Ondrej Kozina <[email protected]>
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 5, 2026

Upstream branch: f14faaf
series: https://patchwork.kernel.org/project/linux-block/list/?series=1049076
version: 1

oniko added 3 commits February 5, 2026 12:34
This ioctl is used to set up RLE (read lock enabled) and WLE (write
lock enabled) parameters of the Locking object.

In Single User Mode (SUM), if the RangeStartRangeLengthPolicy parameter
is set in the 'Reactivate' method, only Admin authority maintains the
locking range length and start (offset) attributes of Locking objects
set up for SUM. All other attributes from struct opal_user_lr_setup
(RLE - read locking enabled, WLE - write locking enabled) shall
remain in possession of the User authority associated with the Locking
object set for SUM.

With the IOC_OPAL_ENABLE_DISABLE_LR ioctl, the opal_user_lr_setup
members 'range_start' and 'range_length' of the ioctl argument are
ignored.

The RangeStartRangeLengthPolicy attribute is described in ch.
3.1.1.1.1.2 of the TCG Storage Opal SSC Feature Set: Single User Mode
document.

Signed-off-by: Ondrej Kozina <[email protected]>
Change the column parameter in response_get_column() from u8 to u64
to support the full range of column identifiers.

Signed-off-by: Ondrej Kozina <[email protected]>
This adds a function for retrieving the set of Locking objects enabled
for Single User Mode (SUM) and the value of the
RangeStartRangeLengthPolicy parameter.

Signed-off-by: Ondrej Kozina <[email protected]>
@blktests-ci blktests-ci bot force-pushed the series/1049076=>linus-master branch from 8763004 to 79226cf Compare February 5, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant