[edk2-devel] [PATCH v2] Pyrite support - Secure erase is only available if encryption is supported.

Linus Liu posted 1 patch 9 months, 1 week ago
Failed in applying to current master (apply log)
There is a newer version of this series
SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
[edk2-devel] [PATCH v2] Pyrite support - Secure erase is only available if encryption is supported.
Posted by Linus Liu 9 months, 1 week ago
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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108368): https://edk2.groups.io/g/devel/message/108368
Mute This Topic: https://groups.io/mt/101210886/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2] Pyrite support - Secure erase is only available if encryption is supported.
Posted by Ard Biesheuvel 9 months ago
On Thu, 7 Sept 2023 at 11:02, Linus Liu <linus.liu@intel.com> wrote:
>
> 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>

This patch is missing a signed-off-by line

> ---
>  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 (#108368): https://edk2.groups.io/g/devel/message/108368
> Mute This Topic: https://groups.io/mt/101210886/1131722
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [ardb@kernel.org]
> ------------
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108486): https://edk2.groups.io/g/devel/message/108486
Mute This Topic: https://groups.io/mt/101210886/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2] Pyrite support - Secure erase is only available if encryption is supported.
Posted by Linus Liu 9 months ago
Hi Ard 
V3 patch has updated.
Please help to check it.
Thanks.

-----Original Message-----
From: Ard Biesheuvel <ardb@kernel.org> 
Sent: Monday, September 11, 2023 9:14 PM
To: devel@edk2.groups.io; Liu, Linus <linus.liu@intel.com>
Cc: 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: Re: [edk2-devel] [PATCH v2] Pyrite support - Secure erase is only available if encryption is supported.

On Thu, 7 Sept 2023 at 11:02, Linus Liu <linus.liu@intel.com> wrote:
>
> 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>

This patch is missing a signed-off-by line

> ---
>  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 (#108368): https://edk2.groups.io/g/devel/message/108368
> Mute This Topic: https://groups.io/mt/101210886/1131722
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [ardb@kernel.org]
> ------------
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108513): https://edk2.groups.io/g/devel/message/108513
Mute This Topic: https://groups.io/mt/101210886/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


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/7575003
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [linus.liu@intel.com]
-=-=-=-=-=-=


Re: [edk2-devel] [PATCH v2] Pyrite support - Secure erase is only available if encryption is supported.
Posted by Yao, Jiewen 9 months ago
Reviewed-by: Jiewen Yao <Jiewen.yaso@intel.com>

> -----Original Message-----
> From: Liu, Linus <linus.liu@intel.com>
> Sent: Thursday, September 7, 2023 5:02 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>; 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.
> 
> 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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108485): https://edk2.groups.io/g/devel/message/108485
Mute This Topic: https://groups.io/mt/101210886/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-