From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Liu, Linus" <linus.liu@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Zhang, Qi1" <qi1.zhang@intel.com>,
"Kumar, Rahul R" <rahul.r.kumar@intel.com>
Subject: Re: [edk2-devel] [PATCH v1] Pyrite support - Secure erase is only available if encryption is supported.
Date: Thu, 7 Sep 2023 08:13:09 +0000 [thread overview]
Message-ID: <MW4PR11MB5872F776A018F49E7350138E8CEEA@MW4PR11MB5872.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230904083815.412-1-linus.liu@intel.com>
Thanks.
1) I think we need an else branch for " SupportedAttributes->MediaEncryption ", to assign " AvalDiskActions->SecureErase = 0;"
> - AvalDiskActions->SecureErase = 1;
>
> + if (SupportedAttributes->MediaEncryption) {
>
> + AvalDiskActions->SecureErase = 1;
>
> + }
>
> } else {
>
> AvalDiskActions->PsidRevert = 0;
>
> AvalDiskActions->SecureErase = 0;
2) May I know what test you have done?
> -----Original Message-----
> From: Liu, Linus <linus.liu@intel.com>
> Sent: Monday, September 4, 2023 4:38 PM
> To: devel@edk2.groups.io
> Cc: Liu, Linus <linus.liu@intel.com>; Zhang, Qi1 <qi1.zhang@intel.com>; Kumar,
> Rahul R <rahul.r.kumar@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
> Subject: [PATCH v1] Pyrite support - Secure erase is only available if encryption is
> supported.
>
> From: Linus Liu <linus.liu@intel.com>
>
> https://bugzilla.tianocore.org/show_bug.cgi?id=3004
>
> Cc: Qi Zhang <qi1.zhang@intel.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> ---
> SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> index e2e77cbc24..88650a28dc 100644
> --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> @@ -87,7 +87,9 @@ OpalSupportGetAvailableActions (
> // Secure erase is performed by generating a new encryption key
>
> // this is only available if encryption is supported
>
> //
>
> - AvalDiskActions->SecureErase = 1;
>
> + if (SupportedAttributes->MediaEncryption) {
>
> + AvalDiskActions->SecureErase = 1;
>
> + }
>
> } else {
>
> AvalDiskActions->PsidRevert = 0;
>
> AvalDiskActions->SecureErase = 0;
>
> --
> 2.39.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108365): https://edk2.groups.io/g/devel/message/108365
Mute This Topic: https://groups.io/mt/101144585/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-09-07 8:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 8:38 [edk2-devel] [PATCH v1] Pyrite support - Secure erase is only available if encryption is supported Linus Liu
2023-09-07 8:13 ` Yao, Jiewen [this message]
2023-09-07 9:10 ` Linus Liu
[not found] <1781A5556E472CC8.20961@groups.io>
2023-09-05 8:38 ` Linus Liu
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-list 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=MW4PR11MB5872F776A018F49E7350138E8CEEA@MW4PR11MB5872.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox