From: Scott Bauer <sbauer@plzdonthack.me>
To: luca.boccassi@gmail.com
Cc: linux-block@vger.kernel.org, hch@infradead.org,
Jonathan.Derrick@solidigmtechnology.com,
dougmill@linux.vnet.ibm.com, brauner@kernel.org,
gmazyland@gmail.com
Subject: Re: [PATCH v6] block: sed-opal: Add ioctl to return device status
Date: Wed, 10 Aug 2022 08:54:39 -0400 [thread overview]
Message-ID: <20220810125439.GA17977@hacktheplanet> (raw)
In-Reply-To: <20220810123551.18268-1-luca.boccassi@gmail.com>
On Wed, Aug 10, 2022 at 01:35:51PM +0100, luca.boccassi@gmail.com wrote:
> From: "dougmill@linux.vnet.ibm.com" <dougmill@linux.vnet.ibm.com>
>
> Provide a mechanism to retrieve basic status information about
> the device, including the "supported" flag indicating whether
> SED-OPAL is supported. The information returned is from the various
> feature descriptors received during the discovery0 step, and so
> this ioctl does nothing more than perform the discovery0 step
> and then save the information received. See "struct opal_status"
> and OPAL_FL_* bits for the status information currently returned.
>
> This is necessary to be able to check whether a device is OPAL
> enabled, set up, locked or unlocked from userspace programs
> like systemd-cryptsetup and libcryptsetup. Right now we just
> have to assume the user 'knows' or blindly attempt setup/lock/unlock
> operations.
>
> Signed-off-by: Douglas Miller <dougmill@linux.vnet.ibm.com>
> Tested-by: Luca Boccassi <bluca@debian.org>
> ---
> v2: https://patchwork.kernel.org/project/linux-block/patch/612795b5.tj7FMS9wzchsMzrK%25dougmill@linux.vnet.ibm.com/
> v3: resend on request, after rebasing and testing on my machine
> https://patchwork.kernel.org/project/linux-block/patch/20220125215248.6489-1-luca.boccassi@gmail.com/
> v4: it's been more than 7 months and no alternative approach has appeared.
> we really need to be able to identify and query the status of a sed-opal
> device, so rebased and resending.
> v5: as requested by reviewer, add __32 reserved to the UAPI ioctl struct to align to 64
> bits and to reserve space for future expansion
> v6: as requested by reviewer, update commit message with use case
>
> block/opal_proto.h | 5 ++
> block/sed-opal.c | 90 ++++++++++++++++++++++++++++++-----
> include/linux/sed-opal.h | 1 +
> include/uapi/linux/sed-opal.h | 13 +++++
> 4 files changed, 97 insertions(+), 12 deletions(-)
looks fine
Reviewed-by: Scott Bauer <sbauer@plzdonthack.me>
next prev parent reply other threads:[~2022-08-10 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-10 12:35 [PATCH v6] block: sed-opal: Add ioctl to return device status luca.boccassi
2022-08-10 12:54 ` Scott Bauer [this message]
2022-08-16 10:37 ` Christian Brauner
2022-08-16 14:08 ` Luca Boccassi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220810125439.GA17977@hacktheplanet \
--to=sbauer@plzdonthack.me \
--cc=Jonathan.Derrick@solidigmtechnology.com \
--cc=brauner@kernel.org \
--cc=dougmill@linux.vnet.ibm.com \
--cc=gmazyland@gmail.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=luca.boccassi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.