From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.2563.1592379877702779875 for ; Wed, 17 Jun 2020 00:44:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=b3Tzvo1C; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: guomin.jiang@intel.com) IronPort-SDR: eNvy9xJ2atw8nUGsLC5WTDssNlEbB8fJ8L5OOnYPW2etA+b7jMI8LV/4tLh7gUHn2H0vtcLtXU XKE5w1y2c96g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2020 00:44:32 -0700 IronPort-SDR: 0crp4ZCq7mJ7zcDAU0vEnxMj/Yj5Z9XpD3R1P3HbnYi/IBpOLB9JwKMlexNSdry0vA7zxEx4hD J7u/iAKFi38Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,521,1583222400"; d="scan'208,217";a="273437755" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga003.jf.intel.com with ESMTP; 17 Jun 2020 00:44:32 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jun 2020 00:44:32 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 17 Jun 2020 00:44:31 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 17 Jun 2020 00:44:31 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jun 2020 00:44:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EBfncLX9OQVX1TD39E0nHLWUkT0JKKM+FhyjZsbBVsad9U4cEVrhbsbnRNL886b5qAlTvLfJ92XziJuTdV3Iy6j4LWpv6Eu8MsNSKKGkZIo2RkyAIJQtLnALb6YxftRZvhB0AsJC6huunYeLY3n4U1TnAGuSyTgWmfL+FL7lJettFATwjwwYEpXsJcMuj8BaG85rFaMXVbg6CqDsiVUmoyUYnVkyTmi9GKflxf0DCMGB8OwPw+cRMplbPNMhAGxST8MWpBePGaYoW40VEqJ/HHaZTE0LfrEPb/8BiFXz2Tddv6CbP6Rh2qEPnYq8okKmG6V7bSY1IP4VfP8fw4N3cw== 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-SenderADCheck; bh=QmD8ys8GBu1lmhiA07Mv3EvQOUKhskly///obekOqd8=; b=ihs3xOogZ8p0M0ho+sAyMprlChyXxthG4UrCHNOysCrFjacnMYet3oDqErTu0qQiqTE0S27fzHoONZoPcqwdZb8nik8/T+7EkG/c/55UIfCtIWiqfc4RA76BYy5jdCVPYPATCaXBhJ2BsGsBcHN7enSbxlyxZFzBdpuguBuaCw+d0Nsws5phccDnG1hiCbZmhTSX6q9NpTyzdlnadeppxMFdgs4BMj/vqccaB3pIYj7oCirGsKDnZezvOLSNCPG1B3KXuuSXCiraTdSCl4MIJk3QwhAfoUO/R4X6Rv86KQVdhn5Az6VO/2N8T1OKayO9rRZgUanVQ1R8HVsC9CgMaw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QmD8ys8GBu1lmhiA07Mv3EvQOUKhskly///obekOqd8=; b=b3Tzvo1CtwHLPcJFFn6konSe8thwyj+MHz+Y546n3HRjAnaNPVuOe/d3rz+4dJUHXePenfLsnxtXK9D/8WunwlnuErP+FuddE672OhBCdEz9TyiGAKx+AcHMxns+diisN7G0jhCses5l2tVOZ/DBiGALCrybEVof08DygLTkkPk= Received: from DM6PR11MB2955.namprd11.prod.outlook.com (2603:10b6:5:65::31) by DM6PR11MB3386.namprd11.prod.outlook.com (2603:10b6:5:5c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18; Wed, 17 Jun 2020 07:44:25 +0000 Received: from DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::ccd4:4b0d:535a:58be]) by DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::ccd4:4b0d:535a:58be%7]) with mapi id 15.20.3088.029; Wed, 17 Jun 2020 07:44:25 +0000 From: "Guomin Jiang" To: "devel@edk2.groups.io" , "bret.barkelew@microsoft.com" , "bret@corthon.com" CC: "Yao, Jiewen" , "Zhang, Chao B" , "Wang, Jian J" , "Wu, Hao A" , "Gao, Liming" , "Justen, Jordan L" , Laszlo Ersek , "Ard Biesheuvel" , Andrew Fish , "Ni, Ray" Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v5 00/14] Add the VariablePolicy feature Thread-Topic: [EXTERNAL] [edk2-devel] [PATCH v5 00/14] Add the VariablePolicy feature Thread-Index: AQHWOYzIMGe94UxmAk+6mWUEJT8VLajP0RaAgAyxSFA= Date: Wed, 17 Jun 2020 07:44:25 +0000 Message-ID: References: <20200603065810.806-1-brbarkel@microsoft.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-06-09T05:50:12.5542966Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.196] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ba5e3ff6-b7a0-466a-9ebb-08d812924210 x-ms-traffictypediagnostic: DM6PR11MB3386: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 04371797A5 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HbDV/bzy82CWNYro54xW0E9hU40PEdcafRIazBsiBLHRUn1nKr7D2+WzfTd8ihMnMkLtr9Hij/AbWHYsjz0BAtULulZtr4ZNGrErrIXsrkomZAwQTa4vHL8/pBc9cHz0TkrTMBDXqtJosGDLNr7rAmOM6voW4BMEGgXgtvy3Ri9xgnUubZYxLEO+OLdk/E31Lz2EiNL4icBTs0e6sdDssPSb+EbWm3w5l8Z6u9ylkFbdr32DMCKRpyR1eLnrAzr6QARG+hQat9PWJ72VXgUFL98kpFEDSy267SfAVFX5Mn+oDushoLD3OMPvwZzxpOfS/njDaPV8IljtYBTpfvjG9Fk5/03Pwnxt5qrCnGDDa9ATF4zBkBJzJ5OYP4BLZ2aJOMBwNo6QwaSyck4uzg6png== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB2955.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(39860400002)(346002)(396003)(136003)(376002)(83380400001)(186003)(7696005)(6506007)(53546011)(166002)(55016002)(107886003)(478600001)(26005)(2906002)(9686003)(45080400002)(86362001)(66946007)(64756008)(66446008)(66476007)(66556008)(33656002)(76116006)(71200400001)(4326008)(9326002)(8936002)(316002)(8676002)(30864003)(110136005)(966005)(52536014)(76236003)(54906003)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: 3wA1DwCYzD4fry/YJQgabDINlVhxXur+fUGHEZ++BG/C/zt5HDepqtiY+BRxuH5nTI4YBplhpmAqxDVP5WmzgBrw46kJdpTFJ0P9jPF1YQuYaMpttyNJY0N2PsCak0ZDes+Dn+BmkJIvfjSucuIJYresvRdejlJc/8OW+p03wlBIodQkGRFzh4jXENl1AWXKOwGsV1tdlrNPGkeuZatf3m6HQnT4XtrdXEu3Vaq73Hr6fnJINAzIadRm74GYieu6yeNe7yY26kkIs/1xc1W0TQKlcEB/FbQv29Fb1rw3kTFLpZQ1pAfpioo9mMIFV2EndZ93S4eCo8atk4XOPgmqvN6ySSJgWKZh/42eBZFBfYpEqTnEH1VHmEUPhNZl69aq52f0CkJg8HH3sf++WVMlpEkbh2AYwkaBnXZBNqQTFnA4Jk8xxNcGf5EyD3VJeQv83UDGOqTIdXzG6z8MW0pxia3ZOC8TDVGt8b58sBWVedo= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ba5e3ff6-b7a0-466a-9ebb-08d812924210 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jun 2020 07:44:25.2147 (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: 1jX0wogN8QV052NvSYxcrX3Zq1p7sEI3wSEkZdui3ByD2WH1rnEU7pd9VQIo+eGbBXHTqfmzitk7kJsshjNsVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3386 Return-Path: guomin.jiang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DM6PR11MB29557759875C3B4E3FF4DEBA9D9A0DM6PR11MB2955namp_" --_000_DM6PR11MB29557759875C3B4E3FF4DEBA9D9A0DM6PR11MB2955namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Bret, I plan to review it and give feedback before 7/31. Thanks and Sorry for inconveniences. Best Regards. From: devel@edk2.groups.io On Behalf Of Bret Barkel= ew via groups.io Sent: Tuesday, June 9, 2020 1:52 PM To: devel@edk2.groups.io; bret@corthon.com Cc: Yao, Jiewen ; Zhang, Chao B ; Wang, Jian J ; Wu, Hao A ;= Gao, Liming ; Justen, Jordan L ; Laszlo Ersek ; Ard Biesheuvel ; Andrew Fish ; Ni, Ray Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v5 00/14] Add the VariablePoli= cy feature Bump. Now that the stable tag is behind us, I'd like to get this in to have maxi= mum time before the next stable tag. I think the only reviews I've seen so far are for the platform integration= s (Arm, Ovmf, and Embedded). Need more eyeballs, please and thank you! - Bret From: Bret Barkelew via groups.io Sent: Wednesday, June 3, 2020 2:52 AM To: devel@edk2.groups.io Cc: Yao, Jiewen; Chao Zhang; Jian J Wang; Hao A Wu; liming.gao; Jordan Justen<= mailto:jordan.l.justen@intel.com>; Laszlo Ersek; = Ard Biesheuvel; Andrew Fish; Ni, Ray Subject: [EXTERNAL] [edk2-devel] [PATCH v5 00/14] Add the VariablePolicy f= eature REF:https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbu= gzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2522&data=3D02%7C01%7Cbret.b= arkelew%40microsoft.com%7C90bcb822fa054686203008d807a3e4ee%7C72f988bf86f141= af91ab2d7cd011db47%7C1%7C0%7C637267747784879051&sdata=3Dk9X9qPTDTQlno5%= 2Ff4koMn6bE9s6nTOIlJ886PQRw%2Bzc%3D&reserved=3D0 The 14 patches in this series add the VariablePolicy feature to the core, deprecate Edk2VarLock (while adding a compatibility layer to reduce code churn), and integrate the VariablePolicy libraries and protocols into Variable Services. Since the integration requires multiple changes, including adding librarie= s, a protocol, an SMI communication handler, and VariableServices integration= , the patches are broken up by individual library additions and then a final integration. Security-sensitive changes like bypassing Authenticated Variable enforcement are also broken out into individual patches so that attention can be called directly to them. Platform porting instructions are described in this wiki entry: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub= .com%2Ftianocore%2Ftianocore.github.io%2Fwiki%2FVariablePolicy-Protocol---E= nhanced-Method-for-Managing-Variables%23platform-porting&data=3D02%7C01= %7Cbret.barkelew%40microsoft.com%7C90bcb822fa054686203008d807a3e4ee%7C72f98= 8bf86f141af91ab2d7cd011db47%7C1%7C0%7C637267747784879051&sdata=3DeIQjfZ= JQGTECXzETa1iZ3T9vOdNiNEjIzVrjhDR%2B2CE%3D&reserved=3D0 Discussion of the feature can be found in multiple places throughout the last year on the RFC channel, staging branches, and in devel. Most recently, this subject was discussed in this thread: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.g= roups.io%2Fg%2Fdevel%2Fmessage%2F53712&data=3D02%7C01%7Cbret.barkelew%4= 0microsoft.com%7C90bcb822fa054686203008d807a3e4ee%7C72f988bf86f141af91ab2d7= cd011db47%7C1%7C0%7C637267747784879051&sdata=3DrhwUXzkU%2B71sFkomJvPzi4= IN6hz2JKIbDBnNt0wCJS8%3D&reserved=3D0 (the code branches shared in that discussion are now out of date, but the whitepapers and discussion are relevant). Cc: Jiewen Yao > Cc: Chao Zhang > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Liming Gao > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Cc: Andrew Fish > Cc: Ray Ni > Cc: Bret Barkelew > Signed-off-by: Bret Barkelew > v5 changes: * Fix the CONST mismatch in VariablePolicy.h and VariablePolicySmmDxe.c * Fix EFIAPI mismatches in the functional unittest * Rebase on latest origin/master v4 changes: * Remove Optional PcdAllowVariablePolicyEnforcementDisable PCD from platfo= rms * Rebase on master * Migrate to new MmCommunicate2 protocol * Fix an oversight in the default return value for InitMmCommonCommBuffer * Fix in VariablePolicyLib to allow ExtraInitRuntimeDxe to consume variabl= es V3 changes: * Address all non-unittest issues with ECC * Make additional style changes * Include section name in hunk headers in "ini-style" files * Remove requirement for the EdkiiPiSmmCommunicationsRegionTable driver (now allocates its own buffer) * Change names from VARIABLE_POLICY_PROTOCOL and gVariablePolicyProtocolGu= id to EDKII_VARIABLE_POLICY_PROTOCOL and gEdkiiVariablePolicyProtocolGuid * Fix GCC warning about initializing externs * Add UNI strings for new PCD * Add patches for ArmVirtPkg, OvmfXen, and UefiPayloadPkg * Reorder patches according to Liming's feedback about adding to platforms before changing variable driver V2 changes: * Fixed implementation for RuntimeDxe * Add PCD to block DisableVariablePolicy * Fix the DumpVariablePolicy pagination in SMM Bret Barkelew (14): MdeModulePkg: Define the VariablePolicy protocol interface MdeModulePkg: Define the VariablePolicyLib MdeModulePkg: Define the VariablePolicyHelperLib MdeModulePkg: Define the VarCheckPolicyLib and SMM interface OvmfPkg: Add VariablePolicy engine to OvmfPkg platform EmulatorPkg: Add VariablePolicy engine to EmulatorPkg platform ArmVirtPkg: Add VariablePolicy engine to ArmVirtPkg platform UefiPayloadPkg: Add VariablePolicy engine to UefiPayloadPkg platform MdeModulePkg: Connect VariablePolicy business logic to VariableServices MdeModulePkg: Allow VariablePolicy state to delete protected variables SecurityPkg: Allow VariablePolicy state to delete authenticated variables MdeModulePkg: Change TCG MOR variables to use VariablePolicy MdeModulePkg: Drop VarLock from RuntimeDxe variable driver MdeModulePkg: Add a shell-based functional test for VariablePolicy MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c = | 320 +++ MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.c = | 396 ++++ MdeModulePkg/Library/VariablePolicyLib/VariablePolicyExtraInitNull.c = | 46 + MdeModulePkg/Library/VariablePolicyLib/VariablePolicyExtraInitRuntimeDxe.= c | 85 + MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c = | 813 +++++++ MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariablePol= icyUnitTest.c | 2436 ++++++++++++++++++++ MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/VariablePolicyFuncT= estApp.c | 1978 ++++++++++++++++ MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c = | 52 +- MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c = | 60 +- MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c = | 49 +- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c = | 53 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequstToLock.c = | 71 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c = | 642 ++++++ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c = | 14 + SecurityPkg/Library/AuthVariableLib/AuthService.c = | 22 +- ArmVirtPkg/ArmVirt.dsc.inc = | 4 + EmulatorPkg/EmulatorPkg.dsc = | 3 + MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h = | 54 + MdeModulePkg/Include/Library/VariablePolicyHelperLib.h = | 164 ++ MdeModulePkg/Include/Library/VariablePolicyLib.h = | 207 ++ MdeModulePkg/Include/Protocol/VariablePolicy.h = | 157 ++ MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf = | 42 + MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.uni = | 12 + MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf = | 35 + MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.uni = | 12 + MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf = | 44 + MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.uni = | 12 + MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf = | 51 + MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariablePol= icyUnitTest.inf | 40 + MdeModulePkg/MdeModulePkg.ci.yaml = | 4 +- MdeModulePkg/MdeModulePkg.dec = | 26 +- MdeModulePkg/MdeModulePkg.dsc = | 15 + MdeModulePkg/MdeModulePkg.uni = | 7 + MdeModulePkg/Test/MdeModulePkgHostTest.dsc = | 11 + MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/Readme.md = | 55 + MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/VariablePolicyFuncT= estApp.inf | 42 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf = | 5 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf = | 4 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf = | 10 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf = | 4 + OvmfPkg/OvmfPkgIa32.dsc = | 5 + OvmfPkg/OvmfPkgIa32X64.dsc = | 5 + OvmfPkg/OvmfPkgX64.dsc = | 5 + OvmfPkg/OvmfXen.dsc = | 4 + SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf = | 2 + UefiPayloadPkg/UefiPayloadPkgIa32.dsc = | 4 + UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc = | 4 + 47 files changed, 8008 insertions(+), 78 deletions(-) create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyL= ib.c create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/VariableP= olicyHelperLib.c create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyE= xtraInitNull.c create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyE= xtraInitRuntimeDxe.c create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL= ib.c create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyU= nitTest/VariablePolicyUnitTest.c create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/= VariablePolicyFuncTestApp.c create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLoc= kRequstToLock.c create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePol= icySmmDxe.c create mode 100644 MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h create mode 100644 MdeModulePkg/Include/Library/VariablePolicyHelperLib.h create mode 100644 MdeModulePkg/Include/Library/VariablePolicyLib.h create mode 100644 MdeModulePkg/Include/Protocol/VariablePolicy.h create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyL= ib.inf create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyL= ib.uni create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/VariableP= olicyHelperLib.inf create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/VariableP= olicyHelperLib.uni create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL= ib.inf create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL= ib.uni create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL= ibRuntimeDxe.inf create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyU= nitTest/VariablePolicyUnitTest.inf create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/= Readme.md create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/= VariablePolicyFuncTestApp.inf -- 2.26.2.windows.1.8.g01c50adf56.20200515075929 --_000_DM6PR11MB29557759875C3B4E3FF4DEBA9D9A0DM6PR11MB2955namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Bret,

 

I plan to review it and give feedback before 7/31.<= o:p>

 

Thanks and Sorry for inconveniences.

 

Best Regards.

From: devel@edk2.groups.io <devel@edk2.gr= oups.io> On Behalf Of Bret Barkelew via groups.io
Sent: Tuesday, June 9, 2020 1:52 PM
To: devel@edk2.groups.io; bret@corthon.com
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Zhang, Chao B <cha= o.b.zhang@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Ha= o A <hao.a.wu@intel.com>; Gao, Liming <liming.gao@intel.com>; J= usten, Jordan L <jordan.l.justen@intel.com>; Laszlo Ersek <lersek@= redhat.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Andrew Fish <afish@appl= e.com>; Ni, Ray <ray.ni@intel.com>
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v5 00/14] Add the Varia= blePolicy feature

 

Bump.

Now that the stable tag is behind us, I’d lik= e to get this in to have maximum time before the next stable tag.

 

I think the only reviews I’ve seen so far are= for the platform integrations (Arm, Ovmf, and Embedded). Need more eyeball= s, please and thank you!

 

- Bret

 

From: Bret Barkelew via groups.io
Sent: Wednesday, June 3, 2020 2:52 AM
To: devel@edk2.groups.io
Cc:
Yao, Jiewen; Chao Zhang; Jian J Wang; = Hao A Wu; liming.gao; Jordan Justen; Laszlo Ersek; = Ard Biesheuvel; Andrew Fish; Ni, Ray
Subject: [EXTERNAL] [edk2-devel] [PATCH v5 00/14] Add the VariableP= olicy feature

 

REF:https://nam06.sa= felinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugzilla.tianocore.org%= 2Fshow_bug.cgi%3Fid%3D2522&amp;data=3D02%7C01%7Cbret.barkelew%40microso= ft.com%7C90bcb822fa054686203008d807a3e4ee%7C72f988bf86f141af91ab2d7cd011db4= 7%7C1%7C0%7C637267747784879051&amp;sdata=3Dk9X9qPTDTQlno5%2Ff4koMn6bE9s= 6nTOIlJ886PQRw%2Bzc%3D&amp;reserved=3D0

The 14 patches in this series add the VariablePolicy feature to the core,<= br> deprecate Edk2VarLock (while adding a compatibility layer to reduce code churn), and integrate the VariablePolicy libraries and protocols into
Variable Services.

Since the integration requires multiple changes, including adding librarie= s,
a protocol, an SMI communication handler, and VariableServices integration= ,
the patches are broken up by individual library additions and then a final=
integration. Security-sensitive changes like bypassing Authenticated
Variable enforcement are also broken out into individual patches so that attention can be called directly to them.

Platform porting instructions are described in this wiki entry:
https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%= 2Fgithub.com%2Ftianocore%2Ftianocore.github.io%2Fwiki%2FVariablePolicy-Prot= ocol---Enhanced-Method-for-Managing-Variables%23platform-porting&amp;da= ta=3D02%7C01%7Cbret.barkelew%40microsoft.com%7C90bcb822fa054686203008d807a3= e4ee%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637267747784879051&am= p;sdata=3DeIQjfZJQGTECXzETa1iZ3T9vOdNiNEjIzVrjhDR%2B2CE%3D&amp;reserved= = =3D0

Discussion of the feature can be found in multiple places throughout
the last year on the RFC channel, staging branches, and in devel.

Most recently, this subject was discussed in this thread:
https://n= am06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.groups.io%2= Fg%2Fdevel%2Fmessage%2F53712&amp;data=3D02%7C01%7Cbret.barkelew%40micro= soft.com%7C90bcb822fa054686203008d807a3e4ee%7C72f988bf86f141af91ab2d7cd011d= b47%7C1%7C0%7C637267747784879051&amp;sdata=3DrhwUXzkU%2B71sFkomJvPzi4IN= 6hz2JKIbDBnNt0wCJS8%3D&amp;reserved=3D0
(the code branches shared in that discussion are now out of date, but the<= br> whitepapers and discussion are relevant).

Cc: Jiewen Yao <jiewen.yao@inte= l.com>
Cc: Chao Zhang <chao.b.zhang@= intel.com>
Cc: Jian J Wang <jian.j.wang@i= ntel.com>
Cc: Hao A Wu <hao.a.wu@intel.com<= /a>>
Cc: Liming Gao <
liming.gao@inte= l.com>
Cc: Jordan Justen <jordan.= l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.co= m>
Cc: Ard Biesheuvel <ard.biesh= euvel@arm.com>
Cc: Andrew Fish <afish@apple.com= >
Cc: Ray Ni <ray.ni@intel.com>= ;
Cc: Bret Barkelew <brbarkel@m= icrosoft.com>
Signed-off-by: Bret Barkelew <brbarkel@microsoft.com>

v5 changes:
* Fix the CONST mismatch in VariablePolicy.h and VariablePolicySmmDxe.c * Fix EFIAPI mismatches in the functional unittest
* Rebase on latest origin/master

v4 changes:
* Remove Optional PcdAllowVariablePolicyEnforcementDisable PCD from platfo= rms
* Rebase on master
* Migrate to new MmCommunicate2 protocol
* Fix an oversight in the default return value for InitMmCommonCommBuffer<= br> * Fix in VariablePolicyLib to allow ExtraInitRuntimeDxe to consume variabl= es

V3 changes:
* Address all non-unittest issues with ECC
* Make additional style changes
* Include section name in hunk headers in "ini-style" files
* Remove requirement for the EdkiiPiSmmCommunicationsRegionTable driver   (now allocates its own buffer)
* Change names from VARIABLE_POLICY_PROTOCOL and gVariablePolicyProtocolGu= id
  to EDKII_VARIABLE_POLICY_PROTOCOL and gEdkiiVariablePolicyProtocolG= uid
* Fix GCC warning about initializing externs
* Add UNI strings for new PCD
* Add patches for ArmVirtPkg, OvmfXen, and UefiPayloadPkg
* Reorder patches according to Liming's feedback about adding to platforms=
  before changing variable driver

V2 changes:
* Fixed implementation for RuntimeDxe
* Add PCD to block DisableVariablePolicy
* Fix the DumpVariablePolicy pagination in SMM

Bret Barkelew (14):
  MdeModulePkg: Define the VariablePolicy protocol interface
  MdeModulePkg: Define the VariablePolicyLib
  MdeModulePkg: Define the VariablePolicyHelperLib
  MdeModulePkg: Define the VarCheckPolicyLib and SMM interface
  OvmfPkg: Add VariablePolicy engine to OvmfPkg platform
  EmulatorPkg: Add VariablePolicy engine to EmulatorPkg platform
  ArmVirtPkg: Add VariablePolicy engine to ArmVirtPkg platform
  UefiPayloadPkg: Add VariablePolicy engine to UefiPayloadPkg platfor= m
  MdeModulePkg: Connect VariablePolicy business logic to
    VariableServices
  MdeModulePkg: Allow VariablePolicy state to delete protected variab= les
  SecurityPkg: Allow VariablePolicy state to delete authenticated
    variables
  MdeModulePkg: Change TCG MOR variables to use VariablePolicy
  MdeModulePkg: Drop VarLock from RuntimeDxe variable driver
  MdeModulePkg: Add a shell-based functional test for VariablePolicy<= br>
 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c &nbs= p;            &= nbsp;           &nbs= p;    |  320 +++
 MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib= .c            &= nbsp;      |  396 ++++
 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyExtraInitNull.c=             &nb= sp;        |   46 +
 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyExtraInitRuntim= eDxe.c           &nb= sp;   |   85 +
 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c &nbs= p;            &= nbsp;           &nbs= p;    |  813 +++++++
 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/Variab= lePolicyUnitTest.c   | 2436 +++++++&#= 43;++++++++++++
 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/VariablePolicy= FuncTestApp.c        | 1978 ++&#= 43;+++++++++++++
 MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c &nbs= p;            &= nbsp;           &nbs= p;    |   52 +-
 MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c &nbs= p;            &= nbsp;           &nbs= p;    |   60 +-
 MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c  &nb= sp;            =             &nb= sp;        |   49 +-
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c  =             &nb= sp;            =       |   53 +
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequstToLock.= c            &n= bsp;       |   71 +
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c&nb= sp;            =            |  642 &#= 43;+++++
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c&n= bsp;            = ;          |   14 &#= 43;
 SecurityPkg/Library/AuthVariableLib/AuthService.c   &= nbsp;           &nbs= p;            &= nbsp;           | &n= bsp; 22 +-
 ArmVirtPkg/ArmVirt.dsc.inc       =             &nb= sp;            =             &nb= sp;            =       |    4 +
 EmulatorPkg/EmulatorPkg.dsc       = ;            &n= bsp;            = ;            &n= bsp;            = ;     |    3 +
 MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h    = ;            &n= bsp;            = ;            &n= bsp;  |   54 +
 MdeModulePkg/Include/Library/VariablePolicyHelperLib.h  &n= bsp;            = ;            &n= bsp;       |  164 ++
 MdeModulePkg/Include/Library/VariablePolicyLib.h   &n= bsp;            = ;            &n= bsp;            |&nb= sp; 207 ++
 MdeModulePkg/Include/Protocol/VariablePolicy.h   &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp; |  157 ++
 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf &n= bsp;            = ;            &n= bsp;  |   42 +
 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.uni &n= bsp;            = ;            &n= bsp;  |   12 +
 MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib= .inf            = ;     |   35 +
 MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib= .uni            = ;     |   12 +
 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf &n= bsp;            = ;            &n= bsp;  |   44 +
 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.uni &n= bsp;            = ;            &n= bsp;  |   12 +
 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.i= nf            &= nbsp;      |   51 +
 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/Variab= lePolicyUnitTest.inf |   40 +
 MdeModulePkg/MdeModulePkg.ci.yaml      = ;            &n= bsp;            = ;            &n= bsp;            |&nb= sp;   4 +-
 MdeModulePkg/MdeModulePkg.dec      &nb= sp;            =             &nb= sp;            =             &nb= sp;   |   26 +-
 MdeModulePkg/MdeModulePkg.dsc      &nb= sp;            =             &nb= sp;            =             &nb= sp;   |   15 +
 MdeModulePkg/MdeModulePkg.uni      &nb= sp;            =             &nb= sp;            =             &nb= sp;   |    7 +
 MdeModulePkg/Test/MdeModulePkgHostTest.dsc    &n= bsp;            = ;            &n= bsp;            = ;     |   11 +
 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/Readme.md = ;            &n= bsp;            |&nb= sp;  55 +
 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/VariablePolicy= FuncTestApp.inf      |   42 +
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf&nb= sp;            =            |  &= nbsp; 5 +
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf &nbs= p;            &= nbsp;           &nbs= p;    |    4 +
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf=             &nb= sp;        |   10 +
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf&= nbsp;           &nbs= p;         |    4 &#= 43;
 OvmfPkg/OvmfPkgIa32.dsc       &nb= sp;            =             &nb= sp;            =             &nb= sp;        |    5 +  OvmfPkg/OvmfPkgIa32X64.dsc       =             &nb= sp;            =             &nb= sp;            =       |    5 +
 OvmfPkg/OvmfPkgX64.dsc       &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;         |    5 &#= 43;
 OvmfPkg/OvmfXen.dsc        &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           | &n= bsp;  4 +
 SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf  &= nbsp;           &nbs= p;            &= nbsp;      |    2 +
 UefiPayloadPkg/UefiPayloadPkgIa32.dsc     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;         |    4 &#= 43;
 UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc    &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;      |    4 +
 47 files changed, 8008 insertions(+), 78 deletions(-)
 create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPo= licyLib.c
 create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/Vari= ablePolicyHelperLib.c
 create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePo= licyExtraInitNull.c
 create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePo= licyExtraInitRuntimeDxe.c
 create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePo= licyLib.c
 create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePo= licyUnitTest/VariablePolicyUnitTest.c
 create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTes= tApp/VariablePolicyFuncTestApp.c
 create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/Variab= leLockRequstToLock.c
 create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/Variab= lePolicySmmDxe.c
 create mode 100644 MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h
 create mode 100644 MdeModulePkg/Include/Library/VariablePolicyHelper= Lib.h
 create mode 100644 MdeModulePkg/Include/Library/VariablePolicyLib.h<= br>  create mode 100644 MdeModulePkg/Include/Protocol/VariablePolicy.h  create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPo= licyLib.inf
 create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPo= licyLib.uni
 create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/Vari= ablePolicyHelperLib.inf
 create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/Vari= ablePolicyHelperLib.uni
 create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePo= licyLib.inf
 create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePo= licyLib.uni
 create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePo= licyLibRuntimeDxe.inf
 create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePo= licyUnitTest/VariablePolicyUnitTest.inf
 create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTes= tApp/Readme.md
 create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTes= tApp/VariablePolicyFuncTestApp.inf

--
2.26.2.windows.1.8.g01c50adf56.20200515075929

 

--_000_DM6PR11MB29557759875C3B4E3FF4DEBA9D9A0DM6PR11MB2955namp_--