2019-04-30 23:33:55

by David Kozub

[permalink] [raw]
Subject: [PATCH 0/3] block: sed-opal: add support for shadow MBR done flag and write

This patch series extends SED Opal support: it adds IOCTL for setting the shadow
MBR done flag which can be useful for unlocking an Opal disk on boot and it adds
IOCTL for writing to the shadow MBR.

The code has been already submitted in [1] but it was suggested to split this
part off. In comparison to that version, I tried to apply Scott's suggestions
from [2].

This series requires the previously-submitted Opal cleanup patches[3]. It
applies on current linux-next/master (e.g. next-20190430).

I successfully tested toggling the MBR done flag and writing the shadow MBR
using some tools I hacked together[4] with a Samsung SSD 850 EVO drive.

[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/lkml/20190210182655.GA20491@hacktheplanet/
[3] https://lore.kernel.org/lkml/[email protected]/
[4] https://gitlab.com/zub2/opalctl

Jonas Rabenstein (3):
block: sed-opal: add ioctl for done-mark of shadow mbr
block: sed-opal: ioctl for writing to shadow mbr
block: sed-opal: check size of shadow mbr

block/opal_proto.h | 16 ++++
block/sed-opal.c | 160 +++++++++++++++++++++++++++++++++-
include/linux/sed-opal.h | 2 +
include/uapi/linux/sed-opal.h | 20 +++++
4 files changed, 196 insertions(+), 2 deletions(-)

--
2.20.1


2019-04-30 23:34:37

by David Kozub

[permalink] [raw]
Subject: [PATCH 1/3] block: sed-opal: add ioctl for done-mark of shadow mbr

From: Jonas Rabenstein <[email protected]>

Enable users to mark the shadow mbr as done without completely
deactivating the shadow mbr feature. This may be useful on reboots,
when the power to the disk is not disconnected in between and the shadow
mbr stores the required boot files. Of course, this saves also the
(few) commands required to enable the feature if it is already enabled
and one only wants to mark the shadow mbr as done.

Co-authored-by: David Kozub <[email protected]>
Signed-off-by: Jonas Rabenstein <[email protected]>
Signed-off-by: David Kozub <[email protected]>
---
block/sed-opal.c | 27 +++++++++++++++++++++++++++
include/linux/sed-opal.h | 1 +
include/uapi/linux/sed-opal.h | 12 ++++++++++++
3 files changed, 40 insertions(+)

diff --git a/block/sed-opal.c b/block/sed-opal.c
index b1aa0cc25803..f1eb9c18e335 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -1986,6 +1986,30 @@ static int opal_enable_disable_shadow_mbr(struct opal_dev *dev,
return ret;
}

+static int opal_set_mbr_done(struct opal_dev *dev,
+ struct opal_mbr_done *mbr_done)
+{
+ u8 mbr_done_tf = mbr_done->done_flag == OPAL_MBR_DONE ?
+ OPAL_TRUE : OPAL_FALSE;
+
+ const struct opal_step mbr_steps[] = {
+ { start_admin1LSP_opal_session, &mbr_done->key },
+ { set_mbr_done, &mbr_done_tf },
+ { end_opal_session, }
+ };
+ int ret;
+
+ if (mbr_done->done_flag != OPAL_MBR_DONE &&
+ mbr_done->done_flag != OPAL_MBR_NOT_DONE)
+ return -EINVAL;
+
+ mutex_lock(&dev->dev_lock);
+ setup_opal_dev(dev);
+ ret = execute_steps(dev, mbr_steps, ARRAY_SIZE(mbr_steps));
+ mutex_unlock(&dev->dev_lock);
+ return ret;
+}
+
static int opal_save(struct opal_dev *dev, struct opal_lock_unlock *lk_unlk)
{
struct opal_suspend_data *suspend;
@@ -2299,6 +2323,9 @@ int sed_ioctl(struct opal_dev *dev, unsigned int cmd, void __user *arg)
case IOC_OPAL_ENABLE_DISABLE_MBR:
ret = opal_enable_disable_shadow_mbr(dev, p);
break;
+ case IOC_OPAL_MBR_DONE:
+ ret = opal_set_mbr_done(dev, p);
+ break;
case IOC_OPAL_ERASE_LR:
ret = opal_erase_locking_range(dev, p);
break;
diff --git a/include/linux/sed-opal.h b/include/linux/sed-opal.h
index 04b124fca51e..42b2ce5da7b3 100644
--- a/include/linux/sed-opal.h
+++ b/include/linux/sed-opal.h
@@ -47,6 +47,7 @@ static inline bool is_sed_ioctl(unsigned int cmd)
case IOC_OPAL_ENABLE_DISABLE_MBR:
case IOC_OPAL_ERASE_LR:
case IOC_OPAL_SECURE_ERASE_LR:
+ case IOC_OPAL_MBR_DONE:
return true;
}
return false;
diff --git a/include/uapi/linux/sed-opal.h b/include/uapi/linux/sed-opal.h
index e092e124dd16..81dd0e8886a1 100644
--- a/include/uapi/linux/sed-opal.h
+++ b/include/uapi/linux/sed-opal.h
@@ -29,6 +29,11 @@ enum opal_mbr {
OPAL_MBR_DISABLE = 0x01,
};

+enum opal_mbr_done_flag {
+ OPAL_MBR_NOT_DONE = 0x0,
+ OPAL_MBR_DONE = 0x01
+};
+
enum opal_user {
OPAL_ADMIN1 = 0x0,
OPAL_USER1 = 0x01,
@@ -104,6 +109,12 @@ struct opal_mbr_data {
__u8 __align[7];
};

+struct opal_mbr_done {
+ struct opal_key key;
+ __u8 done_flag;
+ __u8 __align[7];
+};
+
#define IOC_OPAL_SAVE _IOW('p', 220, struct opal_lock_unlock)
#define IOC_OPAL_LOCK_UNLOCK _IOW('p', 221, struct opal_lock_unlock)
#define IOC_OPAL_TAKE_OWNERSHIP _IOW('p', 222, struct opal_key)
@@ -116,5 +127,6 @@ struct opal_mbr_data {
#define IOC_OPAL_ENABLE_DISABLE_MBR _IOW('p', 229, struct opal_mbr_data)
#define IOC_OPAL_ERASE_LR _IOW('p', 230, struct opal_session_info)
#define IOC_OPAL_SECURE_ERASE_LR _IOW('p', 231, struct opal_session_info)
+#define IOC_OPAL_MBR_DONE _IOW('p', 232, struct opal_mbr_done)

#endif /* _UAPI_SED_OPAL_H */
--
2.20.1

2019-05-01 10:38:19

by David Kozub

[permalink] [raw]
Subject: Re: [PATCH 1/3] block: sed-opal: add ioctl for done-mark of shadow mbr

On Wed, 1 May 2019, David Kozub wrote:

> @@ -104,6 +109,12 @@ struct opal_mbr_data {
> __u8 __align[7];
> };
>
> +struct opal_mbr_done {
> + struct opal_key key;
> + __u8 done_flag;
> + __u8 __align[7];
> +};

While I just copied opal_mbr_data here, I wonder what is the point of
__align in these structs. By itself it just pads the structure to have a
size that is a multiple of 8. Is this to make sure that anything that lies
past the structure is 8-bytes aligned (assuming the start is 8-bytes
aligned too), perhaps for 32bit userspace with 64bit kernel?

And if it's this, is it needed for these IOCTL structs? (I can see it
being useful for struct opal_key.)

Best regards,
David

2019-05-01 13:52:26

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH 0/3] block: sed-opal: add support for shadow MBR done flag and write

> I successfully tested toggling the MBR done flag and writing the shadow MBR
> using some tools I hacked together[4] with a Samsung SSD 850 EVO drive.

Can you submit the tool to util-linux so that we get it into distros?

2019-05-02 13:53:04

by Scott Bauer

[permalink] [raw]
Subject: Re: [PATCH 0/3] block: sed-opal: add support for shadow MBR done flag and write

On Wed, May 01, 2019 at 01:20:56AM +0200, David Kozub wrote:
>
> Jonas Rabenstein (3):
> block: sed-opal: add ioctl for done-mark of shadow mbr
> block: sed-opal: ioctl for writing to shadow mbr
> block: sed-opal: check size of shadow mbr
>
> block/opal_proto.h | 16 ++++
> block/sed-opal.c | 160 +++++++++++++++++++++++++++++++++-
> include/linux/sed-opal.h | 2 +
> include/uapi/linux/sed-opal.h | 20 +++++
> 4 files changed, 196 insertions(+), 2 deletions(-)
>

I'll review this over the weekend. Is this essentially the same thing
we reviewed a month or two ago or are there little differences due to
it be split across two different series?


> --
> 2.20.1
>

2019-05-02 16:10:56

by David Kozub

[permalink] [raw]
Subject: Re: [PATCH 0/3] block: sed-opal: add support for shadow MBR done flag and write

On Thu, 2 May 2019, Scott Bauer wrote:

> On Wed, May 01, 2019 at 01:20:56AM +0200, David Kozub wrote:
>>
>> Jonas Rabenstein (3):
>> block: sed-opal: add ioctl for done-mark of shadow mbr
>> block: sed-opal: ioctl for writing to shadow mbr
>> block: sed-opal: check size of shadow mbr
>>
>> block/opal_proto.h | 16 ++++
>> block/sed-opal.c | 160 +++++++++++++++++++++++++++++++++-
>> include/linux/sed-opal.h | 2 +
>> include/uapi/linux/sed-opal.h | 20 +++++
>> 4 files changed, 196 insertions(+), 2 deletions(-)
>>
>
> I'll review this over the weekend. Is this essentially the same thing
> we reviewed a month or two ago or are there little differences due to
> it be split across two different series?

The first patch (block: sed-opal: add ioctl for done-mark of shadow mbr)
is a bit different because a new struct and enum were introduced. The rest
is pretty much the same. That's also why I kept the reviewd-by tags.

Best regards,
David

2019-05-03 21:17:01

by David Kozub

[permalink] [raw]
Subject: Re: [PATCH 0/3] block: sed-opal: add support for shadow MBR done flag and write

On Wed, 1 May 2019, Christoph Hellwig wrote:

>> I successfully tested toggling the MBR done flag and writing the shadow MBR
>> using some tools I hacked together[4] with a Samsung SSD 850 EVO drive.
>
> Can you submit the tool to util-linux so that we get it into distros?

There is already Scott's sed-opal-temp[1] and a fork by Jonas that adds
support for older version of these new IOCTLs[2]. There was already some
discussion of getting that to util-linux.[3]

While I like my hack, sed-opal-temp can do much more (my tool supports
just the few things I actually use). But there are two things which
sed-opal-temp currently lacks which my hack has:

* It can use a PBKDF2 hash (salted by disk serial number) of the password
rather than the password directly. This makes it compatible with sedutil
and I think it's also better practice (as firmware can contain many
surprises).

* It contains a 'PBA' (pre-boot authorization) tool. A tool intended to be
run from shadow mbr that asks for a password and uses it to unlock all
disks and set shadow mbr done flag, so after restart the computer boots
into the real OS.

@Scott: What are your plans with sed-opal-temp? If you want I can update
Jonas' patches to the adapted IOCTLs. What are your thoughts on PW hashing
and a PBA tool?

Best regards,
David

[1] https://github.com/ScottyBauer/sed-opal-temp
[2] https://github.com/ghostav/sed-opal-temp
[3] https://lkml.org/lkml/2019/2/4/736

2019-05-05 14:46:26

by Scott Bauer

[permalink] [raw]
Subject: Re: [PATCH 0/3] block: sed-opal: add support for shadow MBR done flag and write

On Fri, May 03, 2019 at 10:32:19PM +0200, David Kozub wrote:
> On Wed, 1 May 2019, Christoph Hellwig wrote:
>
> > > I successfully tested toggling the MBR done flag and writing the shadow MBR
> > > using some tools I hacked together[4] with a Samsung SSD 850 EVO drive.
> >
> > Can you submit the tool to util-linux so that we get it into distros?
>
> There is already Scott's sed-opal-temp[1] and a fork by Jonas that adds
> support for older version of these new IOCTLs[2]. There was already some
> discussion of getting that to util-linux.[3]
>
> While I like my hack, sed-opal-temp can do much more (my tool supports just
> the few things I actually use). But there are two things which sed-opal-temp
> currently lacks which my hack has:
>
> * It can use a PBKDF2 hash (salted by disk serial number) of the password
> rather than the password directly. This makes it compatible with sedutil
> and I think it's also better practice (as firmware can contain many
> surprises).
>
> * It contains a 'PBA' (pre-boot authorization) tool. A tool intended to be
> run from shadow mbr that asks for a password and uses it to unlock all
> disks and set shadow mbr done flag, so after restart the computer boots
> into the real OS.
>
> @Scott: What are your plans with sed-opal-temp? If you want I can update
> Jonas' patches to the adapted IOCTLs. What are your thoughts on PW hashing
> and a PBA tool?

I will accept any and all patches to sed opal tooling, I am not picky. I will
also give up maintainership of it is someone else feels they can (rightfully
so) do a better job.

Jon sent me a patch for the tool that will deal with writing to the shadow MBR,
so once we know these patches are going in i'll pull that patch into the tool.

Then I guess that leaves PBKDF2 which I don't think will be too hard to pull in.

With regard to your PBA tool, is that actually being run post-uefi/pre-linux?
IE are we writing your tool into the SMBR and that's what is being run on bootup?

Jon, if you think it's a good idea can you ask David if Revanth or you wants
to take over the tooling? Or if anyone else here wants to own it then let me know.

2019-05-05 14:56:47

by Scott Bauer

[permalink] [raw]
Subject: Re: [PATCH 1/3] block: sed-opal: add ioctl for done-mark of shadow mbr

On Wed, May 01, 2019 at 01:20:57AM +0200, David Kozub wrote:
> From: Jonas Rabenstein <[email protected]>
>
> Enable users to mark the shadow mbr as done without completely
> deactivating the shadow mbr feature. This may be useful on reboots,
> when the power to the disk is not disconnected in between and the shadow
> mbr stores the required boot files. Of course, this saves also the
> (few) commands required to enable the feature if it is already enabled
> and one only wants to mark the shadow mbr as done.
>
> Co-authored-by: David Kozub <[email protected]>
> Signed-off-by: Jonas Rabenstein <[email protected]>
> Signed-off-by: David Kozub <[email protected]>
Looks fine.
Reviewed by: Scott Bauer <[email protected]>

2019-05-06 20:03:52

by Jon Derrick

[permalink] [raw]
Subject: Re: [PATCH 1/3] block: sed-opal: add ioctl for done-mark of shadow mbr

LGTM

Reviewed-by: Jon Derrick <[email protected]>

On Wed, 2019-05-01 at 01:20 +0200, David Kozub wrote:
> From: Jonas Rabenstein <[email protected]>
>
> Enable users to mark the shadow mbr as done without completely
> deactivating the shadow mbr feature. This may be useful on reboots,
> when the power to the disk is not disconnected in between and the
> shadow
> mbr stores the required boot files. Of course, this saves also the
> (few) commands required to enable the feature if it is already
> enabled
> and one only wants to mark the shadow mbr as done.
>
> Co-authored-by: David Kozub <[email protected]>
> Signed-off-by: Jonas Rabenstein <
> [email protected]>
> Signed-off-by: David Kozub <[email protected]>
> ---
> block/sed-opal.c | 27 +++++++++++++++++++++++++++
> include/linux/sed-opal.h | 1 +
> include/uapi/linux/sed-opal.h | 12 ++++++++++++
> 3 files changed, 40 insertions(+)
>
> diff --git a/block/sed-opal.c b/block/sed-opal.c
> index b1aa0cc25803..f1eb9c18e335 100644
> --- a/block/sed-opal.c
> +++ b/block/sed-opal.c
> @@ -1986,6 +1986,30 @@ static int
> opal_enable_disable_shadow_mbr(struct opal_dev *dev,
> return ret;
> }
>
> +static int opal_set_mbr_done(struct opal_dev *dev,
> + struct opal_mbr_done *mbr_done)
> +{
> + u8 mbr_done_tf = mbr_done->done_flag == OPAL_MBR_DONE ?
> + OPAL_TRUE : OPAL_FALSE;
> +
> + const struct opal_step mbr_steps[] = {
> + { start_admin1LSP_opal_session, &mbr_done->key },
> + { set_mbr_done, &mbr_done_tf },
> + { end_opal_session, }
> + };
> + int ret;
> +
> + if (mbr_done->done_flag != OPAL_MBR_DONE &&
> + mbr_done->done_flag != OPAL_MBR_NOT_DONE)
> + return -EINVAL;
> +
> + mutex_lock(&dev->dev_lock);
> + setup_opal_dev(dev);
> + ret = execute_steps(dev, mbr_steps, ARRAY_SIZE(mbr_steps));
> + mutex_unlock(&dev->dev_lock);
> + return ret;
> +}
> +
> static int opal_save(struct opal_dev *dev, struct opal_lock_unlock
> *lk_unlk)
> {
> struct opal_suspend_data *suspend;
> @@ -2299,6 +2323,9 @@ int sed_ioctl(struct opal_dev *dev, unsigned
> int cmd, void __user *arg)
> case IOC_OPAL_ENABLE_DISABLE_MBR:
> ret = opal_enable_disable_shadow_mbr(dev, p);
> break;
> + case IOC_OPAL_MBR_DONE:
> + ret = opal_set_mbr_done(dev, p);
> + break;
> case IOC_OPAL_ERASE_LR:
> ret = opal_erase_locking_range(dev, p);
> break;
> diff --git a/include/linux/sed-opal.h b/include/linux/sed-opal.h
> index 04b124fca51e..42b2ce5da7b3 100644
> --- a/include/linux/sed-opal.h
> +++ b/include/linux/sed-opal.h
> @@ -47,6 +47,7 @@ static inline bool is_sed_ioctl(unsigned int cmd)
> case IOC_OPAL_ENABLE_DISABLE_MBR:
> case IOC_OPAL_ERASE_LR:
> case IOC_OPAL_SECURE_ERASE_LR:
> + case IOC_OPAL_MBR_DONE:
> return true;
> }
> return false;
> diff --git a/include/uapi/linux/sed-opal.h b/include/uapi/linux/sed-
> opal.h
> index e092e124dd16..81dd0e8886a1 100644
> --- a/include/uapi/linux/sed-opal.h
> +++ b/include/uapi/linux/sed-opal.h
> @@ -29,6 +29,11 @@ enum opal_mbr {
> OPAL_MBR_DISABLE = 0x01,
> };
>
> +enum opal_mbr_done_flag {
> + OPAL_MBR_NOT_DONE = 0x0,
> + OPAL_MBR_DONE = 0x01
> +};
> +
> enum opal_user {
> OPAL_ADMIN1 = 0x0,
> OPAL_USER1 = 0x01,
> @@ -104,6 +109,12 @@ struct opal_mbr_data {
> __u8 __align[7];
> };
>
> +struct opal_mbr_done {
> + struct opal_key key;
> + __u8 done_flag;
> + __u8 __align[7];
> +};
> +
> #define IOC_OPAL_SAVE _IOW('p', 220, struct
> opal_lock_unlock)
> #define IOC_OPAL_LOCK_UNLOCK _IOW('p', 221, struct
> opal_lock_unlock)
> #define IOC_OPAL_TAKE_OWNERSHIP _IOW('p', 222, struct
> opal_key)
> @@ -116,5 +127,6 @@ struct opal_mbr_data {
> #define IOC_OPAL_ENABLE_DISABLE_MBR _IOW('p', 229, struct
> opal_mbr_data)
> #define IOC_OPAL_ERASE_LR _IOW('p', 230, struct
> opal_session_info)
> #define IOC_OPAL_SECURE_ERASE_LR _IOW('p', 231, struct
> opal_session_info)
> +#define IOC_OPAL_MBR_DONE _IOW('p', 232, struct
> opal_mbr_done)
>
> #endif /* _UAPI_SED_OPAL_H */


Attachments:
smime.p7s (3.20 kB)

2019-05-09 19:33:27

by Jon Derrick

[permalink] [raw]
Subject: Re: [PATCH 0/3] block: sed-opal: add support for shadow MBR done flag and write

On Sun, 2019-05-05 at 10:43 -0400, Scott Bauer wrote:
> On Fri, May 03, 2019 at 10:32:19PM +0200, David Kozub wrote:
> > On Wed, 1 May 2019, Christoph Hellwig wrote:
> >
> > > > I successfully tested toggling the MBR done flag and writing
> > > > the shadow MBR
> > > > using some tools I hacked together[4] with a Samsung SSD 850
> > > > EVO drive.
> > >
> > > Can you submit the tool to util-linux so that we get it into
> > > distros?
> >
> > There is already Scott's sed-opal-temp[1] and a fork by Jonas that
> > adds
> > support for older version of these new IOCTLs[2]. There was already
> > some
> > discussion of getting that to util-linux.[3]
> >
> > While I like my hack, sed-opal-temp can do much more (my tool
> > supports just
> > the few things I actually use). But there are two things which sed-
> > opal-temp
> > currently lacks which my hack has:
> >
> > * It can use a PBKDF2 hash (salted by disk serial number) of the
> > password
> > rather than the password directly. This makes it compatible with
> > sedutil
> > and I think it's also better practice (as firmware can contain
> > many
> > surprises).
> >
> > * It contains a 'PBA' (pre-boot authorization) tool. A tool
> > intended to be
> > run from shadow mbr that asks for a password and uses it to
> > unlock all
> > disks and set shadow mbr done flag, so after restart the computer
> > boots
> > into the real OS.
> >
> > @Scott: What are your plans with sed-opal-temp? If you want I can
> > update
> > Jonas' patches to the adapted IOCTLs. What are your thoughts on PW
> > hashing
> > and a PBA tool?
>
> I will accept any and all patches to sed opal tooling, I am not
> picky. I will
> also give up maintainership of it is someone else feels they can
> (rightfully
> so) do a better job.
>
> Jon sent me a patch for the tool that will deal with writing to the
> shadow MBR,
> so once we know these patches are going in i'll pull that patch into
> the tool.
>
> Then I guess that leaves PBKDF2 which I don't think will be too hard
> to pull in.
>
> With regard to your PBA tool, is that actually being run post-
> uefi/pre-linux?
> IE are we writing your tool into the SMBR and that's what is being
> run on bootup?
>
> Jon, if you think it's a good idea can you ask David if Revanth or
> you wants
> to take over the tooling? Or if anyone else here wants to own it then
> let me know.
>

I'll get back to you on this. Let me know if it begins to pick up a lot
of steam and I can prioritize this.


Attachments:
smime.p7s (3.20 kB)

2019-05-13 22:13:44

by David Kozub

[permalink] [raw]
Subject: Re: [PATCH 0/3] block: sed-opal: add support for shadow MBR done flag and write

On Sun, 5 May 2019, Scott Bauer wrote:

> On Fri, May 03, 2019 at 10:32:19PM +0200, David Kozub wrote:
>> On Wed, 1 May 2019, Christoph Hellwig wrote:
>>
>>>> I successfully tested toggling the MBR done flag and writing the shadow MBR
>>>> using some tools I hacked together[4] with a Samsung SSD 850 EVO drive.
>>>
>>> Can you submit the tool to util-linux so that we get it into distros?
>>
>> There is already Scott's sed-opal-temp[1] and a fork by Jonas that adds
>> support for older version of these new IOCTLs[2]. There was already some
>> discussion of getting that to util-linux.[3]
>>
>> While I like my hack, sed-opal-temp can do much more (my tool supports just
>> the few things I actually use). But there are two things which sed-opal-temp
>> currently lacks which my hack has:
>>
>> * It can use a PBKDF2 hash (salted by disk serial number) of the password
>> rather than the password directly. This makes it compatible with sedutil
>> and I think it's also better practice (as firmware can contain many
>> surprises).
>>
>> * It contains a 'PBA' (pre-boot authorization) tool. A tool intended to be
>> run from shadow mbr that asks for a password and uses it to unlock all
>> disks and set shadow mbr done flag, so after restart the computer boots
>> into the real OS.
>>
>> @Scott: What are your plans with sed-opal-temp? If you want I can update
>> Jonas' patches to the adapted IOCTLs. What are your thoughts on PW hashing
>> and a PBA tool?
>
> I will accept any and all patches to sed opal tooling, I am not picky. I will
> also give up maintainership of it is someone else feels they can (rightfully
> so) do a better job.
>
> Jon sent me a patch for the tool that will deal with writing to the shadow MBR,
> so once we know these patches are going in i'll pull that patch into the tool.
>
> Then I guess that leaves PBKDF2 which I don't think will be too hard to pull in.

After (if) these patches are accepted, I can create a patch that adds it
to sed-opal-temp.

> With regard to your PBA tool, is that actually being run post-uefi/pre-linux?
> IE are we writing your tool into the SMBR and that's what is being run on bootup?

It's actually nothing fancy: It's just a linux program that asks for a
password and then uses it to unlock all block devices. It's intended to be
run from an initramfs. So the idea is you build a kernel + initramfs with
the tool so that the tool it started and after the tool returns, initramfs
does a reboot. This could be replaced just by a shell script, though then
you'd have to pass the password from the shell script to e.g.
sed-opal-temp.

But I think it covers the simple scenario: booting from a locked drive
with just one locking range. Possibly with other locked drives connected
that also have one locking range and use the same password (when using pwd
hash at least the Opal key is not the same).

> Jon, if you think it's a good idea can you ask David if Revanth or you wants
> to take over the tooling? Or if anyone else here wants to own it then let me know.

I got invoved in this just to scratch an itch so I would not be a good
candidate.

Best regards,
David