sed-opal: allow user authority to get locking range attributes.
authorOndrej Kozina <okozina@redhat.com>
Wed, 5 Apr 2023 11:12:21 +0000 (13:12 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 5 Apr 2023 13:46:25 +0000 (07:46 -0600)
commit8be19a02f1e373d406b3d9e0c17a90c786c51c1f
tree47cb7553d1c492978365da10631c8db0ad1947ac
parent175b654402a11b01870e823f4eaa913b27ed8a63
sed-opal: allow user authority to get locking range attributes.

Extend ACE set of locking range attributes accessible to user
authority. This patch allows user authority to get following
locking range attribues when user get added to locking range via
IOC_OPAL_ADD_USR_TO_LR:

locking range start
locking range end
read lock enabled
write lock enabled
read locked
write locked
lock on reset
active key

Note: Admin1 authority always remains in the ACE. Otherwise
it breaks current userspace expecting Admin1 in the ACE (sedutils).

See TCG OPAL2 s.4.3.1.7 "ACE_Locking_RangeNNNN_Get_RangeStartToActiveKey".

Signed-off-by: Ondrej Kozina <okozina@redhat.com>
Tested-by: Luca Boccassi <bluca@debian.org>
Tested-by: Milan Broz <gmazyland@gmail.com>
Acked-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230405111223.272816-4-okozina@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/opal_proto.h
block/sed-opal.c