From nobody Fri Apr 26 22:08:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66237+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66237+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1602746113; cv=none; d=zohomail.com; s=zohoarc; b=CPN6oFJE6CPCWLFpd5O6nxp43BiZFboqtBxfzpOko4zYc2SBu7BgK2+0jmIGBgLMPSXF/MyjzDPe/ZsuOgFkGepZBrMd5WqlpAWT6xwrnRChY4Ix5bS6piXk8VZo849uuCogA5XyewcnsJvn9R2kGw687MlOn7umk8Y4T2Dv2Q8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602746113; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=jluvNTba2iphg5Wn7jlbnfnZl54Sp0GhSimGpg3imP0=; b=R2X9B7sUHvzE6hsmNteVSPSq1svXjwRekwfZ5dVNz/Z2zomMbVzKcSbjTwnh5XBWL5Q8h2KLLLHjmykpclLU9J1j0lL2u090GX+LJFsSuGrRYaajksn/Tu4PnwZBlGnSHxjC0ANyieiF+aY00WIWyixn4JI9duliOlWlgwvO7pk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66237+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1602746113895241.15501680159662; Thu, 15 Oct 2020 00:15:13 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id EY8FYY1788612xQkw5Ho3rH6; Thu, 15 Oct 2020 00:15:13 -0700 X-Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.6954.1602746112886502181 for ; Thu, 15 Oct 2020 00:15:13 -0700 IronPort-SDR: ufRZkLTsnI6DTj+aznPm5EYyfH2MvMPpOvKSMMfGv5bPskD6ondluF3wUUaewcQpVFYEl4q03h MdPEJp7I7erA== X-IronPort-AV: E=McAfee;i="6000,8403,9774"; a="166341634" X-IronPort-AV: E=Sophos;i="5.77,378,1596524400"; d="scan'208";a="166341634" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2020 00:15:10 -0700 IronPort-SDR: KVSDgfhuVHrvocycQGVy896wWJehwut5vcaIGBwONOQFA3D/QTRqLk0ZslC/aXTdqaavRYv+v4 fcP3qCeHVdAA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,378,1596524400"; d="scan'208";a="314412893" X-Received: from chumaggi-mobl.gar.corp.intel.com ([10.5.241.223]) by orsmga003.jf.intel.com with ESMTP; 15 Oct 2020 00:15:08 -0700 From: "Maggie Chu" To: devel@edk2.groups.io Cc: Maggie Chu , Eric Dong , Jian J Wang , Jiewen Yao , Qi Zhang , Rahul Kumar Subject: [edk2-devel] [PATCH] SecurityPkg/OpalPassword: Secure erase is available if encryption is supported Date: Thu, 15 Oct 2020 15:14:42 +0800 Message-Id: <20201015071442.955-1-Maggie.Chu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,maggie.chu@intel.com X-Gm-Message-State: Gz3DXHLctUggOBMRFZPJuAKVx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1602746113; bh=yJ0/ePWXVNqUvT1NhQTS0BXdLSVZ0UfiaQ+fYIpPUJI=; h=Cc:Date:From:Reply-To:Subject:To; b=qWfD21DzmtFVITONv2S+X41Rb1osQsvMh9TUR3pkd0RnRMNSfVLmgPkDGwbRQyoTQjL Z6L/uFo53sCsG6z75CC9wLL4OSShYIoTfl+d5/aA+1QP1chrkPb6wqu0ioUgdfV/m7w4e 0s+7I96kJJAaGZINjIj3oidtHJDGqydPoIU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Maggie Chu https://bugzilla.tianocore.org/show_bug.cgi?id=3D3004 Secure erase is performed by generating a new encryption key, this is only available if encryption is supported. This commit will hide "secure erase" option from setup page if connected device doesn't support encryption. Signed-off-by: Maggie Chu Cc: Eric Dong Cc: Jian J Wang Cc: Jiewen Yao Cc: Qi Zhang Cc: Rahul Kumar Reviewed-by: Eric Dong Reviewed-by: Jiewen Yao --- 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/T= cg/Opal/OpalPassword/OpalDriver.c index b5b6aec98c..bf5e374163 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c @@ -88,7 +88,11 @@ OpalSupportGetAvailableActions( // Secure erase is performed by generating a new encryption key // this is only available if encryption is supported // - AvalDiskActions->SecureErase =3D 1; + if (SupportedAttributes->MediaEncryption) { + AvalDiskActions->SecureErase =3D 1; + } else { + AvalDiskActions->SecureErase =3D 0; + } } else { AvalDiskActions->PsidRevert =3D 0; AvalDiskActions->SecureErase =3D 0; --=20 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66237): https://edk2.groups.io/g/devel/message/66237 Mute This Topic: https://groups.io/mt/77523234/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-