Skip to content

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

Open
blktests-ci[bot] wants to merge 9 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 9 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
@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

@blktests-ci blktests-ci bot force-pushed the series/1049076=>linus-master branch from 8763004 to 79226cf Compare February 5, 2026 03:34
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 7c2ae0a to 54294d6 Compare February 6, 2026 08:51
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 6, 2026

Upstream branch: b7ff715
series: https://patchwork.kernel.org/project/linux-block/list/?series=1051201
version: 2

@blktests-ci blktests-ci bot added V2 and removed V1 V1-ci-fail labels Feb 6, 2026
@blktests-ci blktests-ci bot force-pushed the series/1049076=>linus-master branch from 79226cf to 32f4c23 Compare February 6, 2026 14:26
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 54294d6 to eb49f7b Compare February 8, 2026 02:55
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 8, 2026

Upstream branch: e7aa572
series: https://patchwork.kernel.org/project/linux-block/list/?series=1051201
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1049076=>linus-master branch from 32f4c23 to 360bfe7 Compare February 8, 2026 04:17
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from eb49f7b to 30e5c22 Compare February 9, 2026 04:29
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 9, 2026

Upstream branch: 05f7e89
series: https://patchwork.kernel.org/project/linux-block/list/?series=1051201
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1049076=>linus-master branch from 360bfe7 to 9d91737 Compare February 9, 2026 04:32
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 30e5c22 to 519f160 Compare February 12, 2026 00:34
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 12, 2026

Upstream branch: c22e26b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1051201
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1049076=>linus-master branch from 9d91737 to fcb0307 Compare February 12, 2026 00:36
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 519f160 to 49ecc64 Compare February 12, 2026 06:28
As described in ch. 6.3, Table 240 in TCG Storage
Architecture Core Specification document.

It's also referenced in TCG Storage Opal SSC Feature Set:
Single User Mode document, ch. 3.1.1.1 Reactivate method.

It will be used later in Reactivate method implemetation
for sed-opal interface.

Signed-off-by: Ondrej Kozina <[email protected]>
As desribed in ch. 3.1.1.1.1.2 of TCG Storage Opal SSC Feature Set:
Single User Mode document.

To be used later in Reactivate method implementation and in function
for retrieving SUM device status.

Signed-off-by: Ondrej Kozina <[email protected]>
As desribed in ch. 3.1.1.1.1.3 of TCG Storage Opal SSC Feature Set:
Single User Mode document.

To be used later in Reactivate method implementation.

Signed-off-by: Ondrej Kozina <[email protected]>
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.

Signed-off-by: Ondrej Kozina <[email protected]>
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.

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.

It retrieves data from the LockingInfo table, specifically the
columns SingleUserModeRanges and RangeStartLengthPolicy, which
were added according to the TCG Opal Feature Set: Single User Mode,
as described in chapters 4.4.3.1 and 4.4.3.2.

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

blktests-ci bot commented Feb 12, 2026

Upstream branch: 37a93dd
series: https://patchwork.kernel.org/project/linux-block/list/?series=1051201
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1049076=>linus-master branch from fcb0307 to 7b38aee Compare February 12, 2026 06:30
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