* [edk2-devel] [PATCH v1] Pyrite support - Secure erase is only available if encryption is supported.
@ 2023-09-04 8:38 Linus Liu
2023-09-07 8:13 ` Yao, Jiewen
0 siblings, 1 reply; 4+ messages in thread
From: Linus Liu @ 2023-09-04 8:38 UTC (permalink / raw)
To: devel; +Cc: Linus Liu, Qi Zhang, Rahul Kumar, Jiewen Yao
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 (#108253): https://edk2.groups.io/g/devel/message/108253
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH v1] Pyrite support - Secure erase is only available if encryption is supported.
[not found] <1781A5556E472CC8.20961@groups.io>
@ 2023-09-05 8:38 ` Linus Liu
0 siblings, 0 replies; 4+ messages in thread
From: Linus Liu @ 2023-09-05 8:38 UTC (permalink / raw)
To: devel@edk2.groups.io, Liu, Linus
Cc: Zhang, Qi1, Kumar, Rahul R, Yao, Jiewen, Chen, Tina, Chen, Xiao X
++ Tina , Chen Xiao
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Linus Liu
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: [edk2-devel] [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 (#108253): https://edk2.groups.io/g/devel/message/108253
Mute This Topic: https://groups.io/mt/101144585/7575003
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [linus.liu@intel.com] -=-=-=-=-=-=
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108279): https://edk2.groups.io/g/devel/message/108279
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH v1] Pyrite support - Secure erase is only available if encryption is supported.
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
2023-09-07 9:10 ` Linus Liu
0 siblings, 1 reply; 4+ messages in thread
From: Yao, Jiewen @ 2023-09-07 8:13 UTC (permalink / raw)
To: Liu, Linus, devel@edk2.groups.io; +Cc: Zhang, Qi1, Kumar, Rahul R
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH v1] Pyrite support - Secure erase is only available if encryption is supported.
2023-09-07 8:13 ` Yao, Jiewen
@ 2023-09-07 9:10 ` Linus Liu
0 siblings, 0 replies; 4+ messages in thread
From: Linus Liu @ 2023-09-07 9:10 UTC (permalink / raw)
To: Yao, Jiewen, devel@edk2.groups.io
Cc: Zhang, Qi1, Kumar, Rahul R, Chen, Tina, Chen, Xiao X
[-- Attachment #1: Type: text/plain, Size: 2841 bytes --]
Hi Jiewan
For 1) , please see V2 patch.
And 2) , please help to look at the setup option.
Thanks.
-----Original Message-----
From: Yao, Jiewen <jiewen.yao@intel.com>
Sent: Thursday, September 7, 2023 4:13 PM
To: Liu, Linus <linus.liu@intel.com>; devel@edk2.groups.io
Cc: Zhang, Qi1 <qi1.zhang@intel.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>
Subject: RE: [PATCH v1] Pyrite support - Secure erase is only available if encryption is supported.
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 (#108369): https://edk2.groups.io/g/devel/message/108369
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]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Secure_erase_setup_option.jpg --]
[-- Type: image/jpeg, Size: 224423 bytes --]
[-- Attachment #3: Type: message/rfc822, Size: 5591 bytes --]
From: "Liu, Linus" <linus.liu@intel.com>
To: "devel@edk2.groups.io" <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>, "Chen, Tina" <tina.chen@intel.com>, "Chen, Xiao X" <xiao.x.chen@intel.com>
Subject: [PATCH v2] Pyrite support - Secure erase is only available if encryption is supported.
Date: Thu, 7 Sep 2023 09:02:12 +0000
Message-ID: <20230907090212.485-1-linus.liu@intel.com>
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>
Cc: Tina Chen <tina.chen@intel.com>
Cc: Xiao X Chen <xiao.x.chen@intel.com>
---
SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
index e2e77cbc24..ba9fa66c60 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
@@ -87,7 +87,11 @@ 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->SecureErase = 0;
+ }
} else {
AvalDiskActions->PsidRevert = 0;
AvalDiskActions->SecureErase = 0;
--
2.39.2.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-07 9:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-09-07 9:10 ` Linus Liu
[not found] <1781A5556E472CC8.20961@groups.io>
2023-09-05 8:38 ` Linus Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox