* [edk2-devel] [PATCH v3] Pyrite support - Secure erase is only available if encryption is supported.
@ 2023-09-12 1:41 Linus Liu
2023-09-13 2:03 ` Yao, Jiewen
0 siblings, 1 reply; 2+ messages in thread
From: Linus Liu @ 2023-09-12 1:41 UTC (permalink / raw)
To: devel; +Cc: Linus Liu, Qi Zhang, Rahul Kumar, Jiewen Yao, Tina Chen,
Xiao X Chen
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>
Signed-off-by: Linus Liu <linus.liu@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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108511): https://edk2.groups.io/g/devel/message/108511
Mute This Topic: https://groups.io/mt/101307436/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] 2+ messages in thread
* Re: [edk2-devel] [PATCH v3] Pyrite support - Secure erase is only available if encryption is supported.
2023-09-12 1:41 [edk2-devel] [PATCH v3] Pyrite support - Secure erase is only available if encryption is supported Linus Liu
@ 2023-09-13 2:03 ` Yao, Jiewen
0 siblings, 0 replies; 2+ messages in thread
From: Yao, Jiewen @ 2023-09-13 2:03 UTC (permalink / raw)
To: Liu, Linus, devel@edk2.groups.io
Cc: Zhang, Qi1, Kumar, Rahul R, Chen, Tina, Chen, Xiao X
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> -----Original Message-----
> From: Liu, Linus <linus.liu@intel.com>
> Sent: Tuesday, September 12, 2023 9:42 AM
> 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>; Chen,
> Tina <tina.chen@intel.com>; Chen, Xiao X <xiao.x.chen@intel.com>
> Subject: [PATCH v3] 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>
> Cc: Tina Chen <tina.chen@intel.com>
> Cc: Xiao X Chen <xiao.x.chen@intel.com>
> Signed-off-by: Linus Liu <linus.liu@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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108555): https://edk2.groups.io/g/devel/message/108555
Mute This Topic: https://groups.io/mt/101307436/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-13 2:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-12 1:41 [edk2-devel] [PATCH v3] Pyrite support - Secure erase is only available if encryption is supported Linus Liu
2023-09-13 2:03 ` Yao, Jiewen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox