OSDN Git Service

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)
commit51f421c85c880dcb37df11e672b384eaa4444328
tree325f63d13354aaec384c572a4cd64efe4c0c5e4d
parent3495ea1b5f6083b03af062095eecb37283a2cc8f
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