From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web10.15373.1682583724791350067 for ; Thu, 27 Apr 2023 01:22:05 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=PKnKRAKJ; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682583724; x=1714119724; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5lXC8MygEZyKKKMtVCKcUrf1sFbbwJcoFSBSV8Qkd0c=; b=PKnKRAKJEf077LPo5GGEp2hyyRUy6+/DPi7q7eTxBW1v4+xFmzHTsjsg rar9z624jlPiFg9zowevzn1PGallkuTfjDkqexthI7a8TDtZIbn9C5HAR T3pInwIgwYqaivNwFc79kvqhcdNTSbTHlBAaBRbp4FjA6pj6TcIcc2dZY Cmt7P4zdWR2c4ByuJ1hESiP7tYcF2nFcExgsqPZ/4m3Di1R04DKbcx//6 x7jIAVOakWNMvEqh0LY9kRP3wd6FxiIq5ILTLjoNJUO2ts9xQZqy0bxYh Y1EDN/3S1Xe8F8jgElgB/4+iiFc0iPFMf1Otp7oHTT0TSiBUhqSAVYKew g==; X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="375344689" X-IronPort-AV: E=Sophos;i="5.99,230,1677571200"; d="scan'208";a="375344689" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2023 01:22:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="688322741" X-IronPort-AV: E=Sophos;i="5.99,230,1677571200"; d="scan'208";a="688322741" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga007.jf.intel.com with ESMTP; 27 Apr 2023 01:22:04 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 27 Apr 2023 01:22:03 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 27 Apr 2023 01:22:03 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Thu, 27 Apr 2023 01:22:03 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.108) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Thu, 27 Apr 2023 01:22:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H9AQBO7yG67ss6mjEwlZaN3wnprVpTX4/BZUYuEB9aJ6ytxHmi8kpusrC2IbR/Vovkdxd7forC2OC3R0iiQ41ZeKrdzg5vrz2F7ciEqCmyixYRm5T8PKXo/3fTV2dsh1L8VFH61lWZ/2x6vgpeuPBznfTtb6Pu3hPlEPEM1zwoh/RzTFpQtIyBhsVRYRx38RVn2DQ8smHuOIN3/z3t2SLtai3gr39oVKWI1XNCPOaUB+0lA6lQAfMcg1Ecz32iUI3+dV5ZH6GvmVoqDbzK0iGdI0ri/VXjDNoewFQsPNpX30ghcqLie00hy4FtwuODk4K3ynE9CVHlL58KQkDmTvTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OSn1gGjQ9zUipODfqjLXccLYskht9IiV60Zlg1igK34=; b=jpcovZjMIB/OjiLz2a3TGY2mCsSM+A9C4n+fNcUxD6V13GTpoNDfl5VDTzxvjI6BWNeJKGsFG5bWdp22d03PQ2LoSO/FA7Ju3y8MzhIyMFaaEsh5sbkkNdCk/cjv8WQSnmZ8iWcqA2EeXueW4qStCLwOMK1WfB3UC9TG34vYXMclmI2BIJMYTZIXY8kC0oFhaMEPnycUQGH430Ec/xc4dEtddSZ7V9lpqqGH1dogExb7CGWjN85ow65jOmobcmT8m06ZO9iBAwVM45yctHRpJ4ubRyPk1dCqgOsSvjBiK/xqhhFTpnKDApQ1QUXY2NeEsuRvlW+SPi+ol+ZdM59W6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by SA3PR11MB7414.namprd11.prod.outlook.com (2603:10b6:806:31c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Thu, 27 Apr 2023 08:22:00 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::48e9:aeb0:c365:388]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::48e9:aeb0:c365:388%6]) with mapi id 15.20.6319.022; Thu, 27 Apr 2023 08:22:00 +0000 From: "Yao, Jiewen" To: "Liu, Linus" , "devel@edk2.groups.io" CC: "Chu, Maggie" , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH v1] Securitypkg/hddpassword: Update HddPasswordDxeInit to use Variable Policy Thread-Topic: [edk2-devel] [PATCH v1] Securitypkg/hddpassword: Update HddPasswordDxeInit to use Variable Policy Thread-Index: AQHZbWtKJT3ZFvnUck2HBwIkYZqnT68yAIXAgAzgSpCAAAbtQA== Date: Thu, 27 Apr 2023 08:22:00 +0000 Message-ID: References: <175541A4396F6FE0.26696@groups.io> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|SA3PR11MB7414:EE_ x-ms-office365-filtering-correlation-id: 9e5d2ef0-592a-4e61-4b21-08db46f8798d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pS7mP17b5pTqaeE+10mJs9ShIvRpBdS8joXtt8C2mLij+JrWmoQvpmdZHfY/L2LR6mJmAl/hiGu8FgYcav9+Ng6yr5l4kheS0OFtI2J6mpUTm0dMt1lJq6tfDwB+696utN/OhQEW+IJms9a4fgK8aCEYl50pOw3NRs/Zr9j5sSAhecUqzjtBQrcJjy656FLHf+INacZnm+UU+gJqDaGVX3VaZ+T4kAH8HWYjqoDSfcidQ60xPomEZrfCzHWoQj9ySIeYrJsxDwON3tpVdJ1em9Q4i64/xz7r2i6BooUfHCJtYYjaL5p3wezU3vLNkeIll3bMMGp6ZmKfGqurxFk98RIXAzSL/+GCWsb2pzEcIiZtD++4mbCrBBVsYo9tW47EI7zrCvMfap8l//oB18vdsZGQsrhC+zW0nsOX4NMktX3s2r6XU9fNliBX2W9cnTUcjOHMob5gQZVOz1I7n6XM3EfQ1Tmjq4phP1pt64ITr4+V7Lj0hjxJaCtKk6knunyOj/fU1nYBFWVsj7Rvc1p/9PqAjnLQm4CDOmkXkjrFglmoq30r3ltwqTSKL/nBdwf2vXiX8ycfJUKR6xA+wmZpO6rd+JLVLDG3nQzZTvYtJ8b0+ecWUCFAqz4ahx1FkkyAoovemAJZ0KnrpWzGGGbHQA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(376002)(39860400002)(346002)(366004)(136003)(396003)(451199021)(8676002)(66446008)(66476007)(64756008)(66556008)(8936002)(54906003)(76116006)(66946007)(122000001)(38100700002)(15650500001)(478600001)(86362001)(2906002)(41300700001)(316002)(33656002)(4326008)(52536014)(110136005)(71200400001)(66899021)(7696005)(5660300002)(38070700005)(107886003)(53546011)(966005)(9686003)(26005)(6506007)(186003)(82960400001)(55016003)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Mb3mr7HJF6PU+1oIQezs+7eMN4/2y2Vj/t+JzhB2qO4phPL6jQ5htXiem7gR?= =?us-ascii?Q?TmHvB89hK0olXQIzYTuMFL536B800f+zcjFlv8Htel4xMj4oDbpnaE26kYRj?= =?us-ascii?Q?u1tNno/K8JikFmOwuXKjRaZpJpvd7uf55acWZpxCg9B6ZVXk8wthanY5Zyk0?= =?us-ascii?Q?QsTro/q0FLqekvn7LCM1MEzfZm39x2xAGZrIqdViFZCW5Y5YMeIXOmGvdeF6?= =?us-ascii?Q?xT6yxt9awaliRRzt0CmmCcjDpDZAdBokMFmQEil9ouCWZHXvEgwVaTBnnZCd?= =?us-ascii?Q?pdSdHFqHw57IkRFClS3h3bnApbp1pfgpZfl0hvVwILwxjjlLzD1eKROm85sU?= =?us-ascii?Q?n/Jvgt6MwDkBuzT5oedCmeZ0URhZvnZkH7VjHeJDU9r3AmKT6WzQA2Ezne5v?= =?us-ascii?Q?QRH+PdSZJcER6M4f/VNHNA8IcOUrkzFr6gec2CWJf5SieGNJUaBdDH54+vqN?= =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zRsHBonCJJfyJkhMlfBVKIc1p?= =?us-ascii?Q?1fwLF0OctwO9qTmFlqoVeIAZdDihFG8o3kXTVgHTsN0xKyXdpzSAKvf99cfm?= =?us-ascii?Q?fA4yZjn9Ndh4FACRRFRHtlr+vLAsaHv/o0ufkq+TzXdjqBJqvjtH1dUxYtwl?= =?us-ascii?Q?dC4xY1Qtmvso3tvf4vBYEyjjifRAnbv5ZzwNgcCn8U1HV6SlxndlkSlFdLgL?= =?us-ascii?Q?DIzU032C3CwNx0nWkMMU5/lpf4U3LyWmkhT+c/3P?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e5d2ef0-592a-4e61-4b21-08db46f8798d X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Apr 2023 08:22:00.8047 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Yy4dk0+V5m8Y+BNxjBmiPeRVQ6zE4/wIND7PY1XR9cdqB8EuXBHRuQVeX0hwMnOnuM/QmQpaBt8GhSKJI6dP3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR11MB7414 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This patch is unreadable to me. Would you please regenerate it with right format? > -----Original Message----- > From: Liu, Linus > Sent: Thursday, April 27, 2023 3:57 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Chu, Maggie > ; Kumar, Rahul R > Subject: RE: [edk2-devel] [PATCH v1] Securitypkg/hddpassword: Update > HddPasswordDxeInit to use Variable Policy >=20 > Hi Jiewen > Could you help to review the patch ? > Thanks >=20 >=20 > -----Original Message----- > From: Liu, Linus > Sent: Wednesday, April 19, 2023 11:21 AM > To: devel@edk2.groups.io; Liu, Linus > Cc: Yao, Jiewen ; Chu, Maggie > ; Zhang, Qi ; Kumar, Rahul R > > Subject: RE: [edk2-devel] [PATCH v1] Securitypkg/hddpassword: Update > HddPasswordDxeInit to use Variable Policy >=20 > Hi Zhang and Kumar > Could you help to review this patch ? >=20 > Thanks. >=20 >=20 > From: Linus Liu >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4408 >=20 > Change-Id: I3c4b466ef318766d6d70c9f73e36b94b5f10832c > Cc: Jiewen Yao > Cc: Maggie Chu > Signed-off-by: Linus Liu > --- > SecurityPkg/HddPassword/HddPasswordDxe.c | 16 +++++++++++----- > SecurityPkg/HddPassword/HddPasswordDxe.h | 1 - > SecurityPkg/HddPassword/HddPasswordDxe.inf | 3 ++- > SecurityPkg/SecurityPkg.dsc | 1 + > 4 files changed, 14 insertions(+), 7 deletions(-) >=20 > diff --git a/SecurityPkg/HddPassword/HddPasswordDxe.c > b/SecurityPkg/HddPassword/HddPasswordDxe.c > index a1a63b67a4..c20fdbe83f 100644 > --- a/SecurityPkg/HddPassword/HddPasswordDxe.c > +++ b/SecurityPkg/HddPassword/HddPasswordDxe.c > @@ -9,6 +9,7 @@ > **/ #include "HddPasswordDxe.h"+#include > EFI_GUID mHddPasswordVendorGuid > =3D HDD_PASSWORD_CONFIG_GUID; CHAR16 > mHddPasswordVendorStorageName[] =3D L"HDD_PASSWORD_CONFIG";@@ - > 2822,7 +2823,7 @@ HddPasswordDxeInit ( > HDD_PASSWORD_DXE_PRIVATE_DATA *Private; VOID > *Registration; EFI_EVENT EndOfDxeEvent;- > EDKII_VARIABLE_LOCK_PROTOCOL *VariableLock;+ > EDKII_VARIABLE_POLICY_PROTOCOL *VariablePolicy; Private =3D NULL; @@ > -2858,12 +2859,17 @@ HddPasswordDxeInit ( > // // Make HDD_PASSWORD_VARIABLE_NAME variable read-only. //- > Status =3D gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, > (VOID **)&VariableLock);+ Status =3D gBS->LocateProtocol > (&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID **)&VariablePolicy); if > (!EFI_ERROR (Status)) {- Status =3D VariableLock->RequestToLock (- > VariableLock,+ Status =3D RegisterBasicVariablePolicy (+ > VariablePolicy,+ &mHddPasswordVendorGuid, > HDD_PASSWORD_VARIABLE_NAME,- > &mHddPasswordVendorGuid+ > VARIABLE_POLICY_NO_MIN_SIZE,+ > VARIABLE_POLICY_NO_MAX_SIZE,+ > VARIABLE_POLICY_NO_MUST_ATTR,+ > VARIABLE_POLICY_NO_CANT_ATTR,+ > VARIABLE_POLICY_TYPE_LOCK_NOW ); DEBUG > ((DEBUG_INFO, "%a(): Lock %s variable (%r)\n", __FUNCTION__, > HDD_PASSWORD_VARIABLE_NAME, Status)); ASSERT_EFI_ERROR > (Status);diff --git a/SecurityPkg/HddPassword/HddPasswordDxe.h > b/SecurityPkg/HddPassword/HddPasswordDxe.h > index 231533e737..049a208794 100644 > --- a/SecurityPkg/HddPassword/HddPasswordDxe.h > +++ b/SecurityPkg/HddPassword/HddPasswordDxe.h > @@ -17,7 +17,6 @@ > #include #include #include > -#include #include > #include diff --git > a/SecurityPkg/HddPassword/HddPasswordDxe.inf > b/SecurityPkg/HddPassword/HddPasswordDxe.inf > index 06e8755ffc..2c0ebbcc78 100644 > --- a/SecurityPkg/HddPassword/HddPasswordDxe.inf > +++ b/SecurityPkg/HddPassword/HddPasswordDxe.inf > @@ -50,6 +50,7 @@ > PrintLib UefiLib LockBoxLib+ VariablePolicyHelperLib S3BootScri= ptLib > PciLib BaseCryptLib@@ -63,7 +64,7 @@ > gEfiHiiConfigAccessProtocolGuid ## PRODUCES > gEfiAtaPassThruProtocolGuid ## CONSUMES > gEfiPciIoProtocolGuid ## CONSUMES- > gEdkiiVariableLockProtocolGuid ## CONSUMES+ > gEdkiiVariablePolicyProtocolGuid ## CONSUMES [Pcd] > gEfiSecurityPkgTokenSpaceGuid.PcdSkipHddPasswordPrompt ## > CONSUMESdiff --git a/SecurityPkg/SecurityPkg.dsc > b/SecurityPkg/SecurityPkg.dsc > index 3bad5375c0..3c62205162 100644 > --- a/SecurityPkg/SecurityPkg.dsc > +++ b/SecurityPkg/SecurityPkg.dsc > @@ -74,6 +74,7 @@ >=20 > PlatformPKProtectionLib|SecurityPkg/Library/PlatformPKProtectionLibVarPo > licy/PlatformPKProtectionLibVarPolicy.inf > SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro > visionLib/SecureBootVariableProvisionLib.inf > TdxLib|MdePkg/Library/TdxLib/TdxLib.inf+ > VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/Var > iablePolicyHelperLib.inf [LibraryClasses.ARM, LibraryClasses.AARCH64] = #-- > 2.33.1.windows.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#102903): > https://edk2.groups.io/g/devel/message/102903 > Mute This Topic: https://groups.io/mt/98224857/7575003 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [linus.liu@intel.com] -= =3D- > =3D-=3D-=3D-=3D-=3D >=20