]> git.baikalelectronics.ru Git - kernel.git/commit
block: sed-opal: Add support to read/write opal tables generically
authorRevanth Rajashekar <revanth.rajashekar@intel.com>
Thu, 31 Oct 2019 16:13:21 +0000 (10:13 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 4 Nov 2019 14:11:31 +0000 (07:11 -0700)
commitec355452bbc83ea09c8c0dde31252e4438a818f5
tree325f63d13354aaec384c572a4cd64efe4c0c5e4d
parent88eabaa67aa1f346e612eb7a1e8e89cdb25924c9
block: sed-opal: Add support to read/write opal tables generically

This feature gives the user RW access to any opal table with admin1
authority. The flags described in the new structure determines if the user
wants to read/write the data. Flags are checked for valid values in
order to allow future features to be added to the ioctl.

The user can provide the desired table's UID. Also, the ioctl provides a
size and offset field and internally will loop data accesses to return
the full data block. Read overrun is prevented by the initiator's
sec_send_recv() backend. The ioctl provides a private field with the
intention to accommodate any future expansions to the ioctl.

Reviewed-by: Scott Bauer <sbauer@plzdonthack.me>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/opal_proto.h
block/sed-opal.c
include/linux/sed-opal.h
include/uapi/linux/sed-opal.h