From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.104]) by mx.groups.io with SMTP id smtpd.web10.5355.1596073427683226624 for ; Wed, 29 Jul 2020 18:43:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=TMwLjwjf; spf=pass (domain: microsoft.com, ip: 40.107.243.104, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h8VemgAZngIbEFgl18ccOSGFmBcc/2sSokBNKWV/TKWwEsrvwZWZGViU/PjZoZ3gtuax5ykkxUk0FJqfqpKaxHMKJesjW0ei7LKBjR8Wvt9EdpCbqgFUJ2wKwEpfDU66TdkVglAuns7A3MXJqL22/OBisnmh9mzMq0z8xFIPEBX6vsW5yld9mGViIAeAwxPX2981VfBRRLz1vU3lx8N4MMjjfSSpVHfo5iGAbdBYogYESmm8lh5Js5hH6LDu1N/PgMbjdbOY+pcTBIT9SzxViyeiElZW4geQ3s47yzRG/li+LYJtwUhYCDxqaMOB3A/n8/8CCPayncaAXGFEQy8HZw== 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=bVCD94pPKbsoULs/ki06X3S4Mtl4tGbdMygdiXydJ3k=; b=eb1xMIQpSYNkfpGb6xANAxULUpbkbXq1j6OBeyKuqUkGP7nfCWvV64DKkjq7X5vPQDU3WlQQnSvPoFa7dyW6VUocusm0wxSUvLS+3/XqYcTTeW+Dtvab3twVLNV4eofwsS8PnisKA/XSOEiR7O9zdpmnoN2fzb4zC6f8zYES0lPhZcmK2P7QzfbYBFtiev/ZkI5vd42zkLl00ourgiOBCQlhq7PjGQIT9v+Qv3pmn1Z7Ez68gSDJBnsuLqZVFP6MzM2jUCTUPF9GKoRvrzVzE8mwzRfSyTDjHZgHPVV/n14PJNwpGi5hFPAbDQomBD3Qr7rFVV5QRhcWLVicOL/uPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bVCD94pPKbsoULs/ki06X3S4Mtl4tGbdMygdiXydJ3k=; b=TMwLjwjftzCpW/IZ7D8eUoVg9wYYyAQYXpJYweapcdaqvsB3bJr4MMbbof5kFMXVF034pbspEm0z583yY2QNlloeRR3w3q1ADqYAIe9+4VGidPsbaoOKeHrou5KWZAp+Az7KN6e4B2ZHmBHn4nmxTRSKpoRS1P3calP74wnBMnM= Received: from CY4PR21MB0743.namprd21.prod.outlook.com (2603:10b6:903:b2::9) by CY4PR21MB0504.namprd21.prod.outlook.com (2603:10b6:903:dc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.9; Thu, 30 Jul 2020 01:43:44 +0000 Received: from CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::2ca0:7d3e:e918:c47a]) by CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::2ca0:7d3e:e918:c47a%12]) with mapi id 15.20.3239.017; Thu, 30 Jul 2020 01:43:44 +0000 From: "Bret Barkelew" To: liming.gao , "devel@edk2.groups.io" , "bret@corthon.com" , Leif Lindholm CC: "Yao, Jiewen" , "Wang, Jian J" , "Wu, Hao A" , "Justen, Jordan L" , Laszlo Ersek , Ard Biesheuvel , Andrew Fish , "Ni, Ray" Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature Thread-Topic: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature Thread-Index: AQHWSVAfWf6kxpy2uESzF0E9XQt1tKkfMZctgABfaACAAAGyhg== Date: Thu, 30 Jul 2020 01:43:44 +0000 Message-ID: References: <20200623064104.1908-1-brbarkel@microsoft.com> , In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: yes 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-07-29T19:54:45.9373124Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [174.21.66.92] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: c8eed750-4611-42a7-cc79-08d83429fef6 x-ms-traffictypediagnostic: CY4PR21MB0504: x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5ijW+GQfPWwAQ5CgLWAT447Fz9GsQ6jN4m7ebZv1ndEWpYzQVnH6VfrnmCKHQCPXtvTx/d1m9vZlQ0biFX68R5dLaBbiK/HZYyL0Gp/RBo5cIIs8/EWE+sjnmbMRRjFe8ZJpA5LER5D+OvghveYuSMHr2PcDfciZheH3j53KHJdqvBYV4lkTQnM9z8lWqrVy1IdcocQaDTqT19t0VHEtO+oWO+TNssjL1X2J3dI+xsvJ/Bh+F1B9G7OKAKBVYHhsWE4l/nnrZsv0ubO4VFx/hlix5WHmIW2rxe80cONapVU9SWQ0TQv3UGFihBsnLV/OstEyW6GWNcUThr3iZvrKuJ/+VN9BReUlnMZzO5hjFpJyx8nLrqJ1ZO+s5SfCl28ZpE0qSDBeN/4ZYEGAvgKIIA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR21MB0743.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(396003)(366004)(376002)(346002)(966005)(53546011)(8936002)(7416002)(2906002)(316002)(186003)(8676002)(86362001)(166002)(6506007)(478600001)(76236003)(110136005)(99936003)(82960400001)(82950400001)(33656002)(54906003)(10290500003)(7696005)(83380400001)(66556008)(66476007)(66616009)(66946007)(66446008)(26005)(9686003)(76116006)(71200400001)(8990500004)(91956017)(64756008)(30864003)(55016002)(4326008)(5660300002)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: t9eyCAT4psk496+BNjyYqP2ZKGCC3Tca2NI7P6x3gLES5+Vr42bSfFesZdJTn4u3b63KD7p12aaS/7IRT1xns/ef5aq6gHswsnqC85Bg6/zEZraYdfTkk38heURG05kxfeHg/vEnqt8i3hj4K9VYZeaeIm5wRoOOSl7Pdu6sAs54NtEEE3W2CevzfYQMKDVekOZ5xU51MKYrFeiou4CcDmsLUfkC1PfllAN7eu2yYpZiTtFTSzTcUygC9EOaEpuJuM9hzJqekkJMrYiedURmPdCWNtnCtyFV7jWXjLZLzSaWt63wxwJBbdMNwweQkWjOczrT5YOua5xtnrIgl1ATCRTKMI8k1sNNH+kZlzLrsqyjKXfRh85fOgrOnSuwLIfUIfWEzBjwocEBlcqDtFWNK06hSFTNAHJWJi1WPoNRcFbjN4me43DoIat7+bgYLhiAwSPfP1IhFDprzcr68Pyobu4IGEJ0OKQdODNijnUQQvAXdaAQ90e9WwwWRxlUsu9eyt45fGgfXiKzA87V9m1xycipTzyVwPzWxqgP71+bvxMUlOd8xYYoNVkMI/C2p2uRtqw5VzbcvfeyHZQsQrWl04iH1uojJLd5KJcO+wwjr5Nd83+HQCkhTovD69VCmwC71Wmq9x5F90ujeOSOE6UMtQ== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR21MB0743.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8eed750-4611-42a7-cc79-08d83429fef6 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jul 2020 01:43:44.7226 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PELNlYjXyWpAjgnLulBOne3plJr7uLQ82rP2sdfsB8KWw4/jE4vlo72K50FKAzQryVTmCQdVoP2zLBIJ4lmiOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0504 X-Groupsio-MsgNum: 63464 Content-Language: en-US Content-Type: multipart/related; boundary="_004_CY4PR21MB074345AB8EBDADBA9BF2CC68EF710CY4PR21MB0743namp_"; type="multipart/alternative" --_004_CY4PR21MB074345AB8EBDADBA9BF2CC68EF710CY4PR21MB0743namp_ Content-Type: multipart/alternative; boundary="_000_CY4PR21MB074345AB8EBDADBA9BF2CC68EF710CY4PR21MB0743namp_" --_000_CY4PR21MB074345AB8EBDADBA9BF2CC68EF710CY4PR21MB0743namp_ Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable I believe the ARM platforms already have the change. At least the ArmVirt d= oes and some of the edk2-platforms. This is not news. It=1B$B!G=1B(Bs been broadcast repeatedly for the last 3= months. And the last 6 months. And the last 15 months. - Bret From: Gao, Liming Sent: Wednesday, July 29, 2020 6:36 PM To: devel@edk2.groups.io; Bret Barkelew; bret@corthon.com; = Leif Lindholm Cc: Yao, Jiewen; Wang, Jian J; Wu, Hao A; Justen, Jordan L; Laszlo Ersek; Ard = Biesheuvel; Andrew Fish; Ni, Ray Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePoli= cy feature Include Leif. This change adds new library class dependency for the variab= le driver. So, it requires to update the platform DSC file. It will impact = ARM platforms. Thanks Liming From: devel@edk2.groups.io On Behalf Of Bret Barkel= ew via groups.io Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B30=1B$BF|=1B(B 3:56 To: devel@edk2.groups.io; bret@corthon.com Cc: Yao, Jiewen ; Chao Zhang ; Wang, Jian J ; Wu, Hao A ; Ga= o, Liming ; Justen, Jordan L ; Laszlo Ersek ; Ard Biesheuvel ; Andrew Fish ; Ni, Ray Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePoli= cy feature Still waiting on some R-bs. Have a new doc that will make it into a v7, if it helps anyone with their = review=1B$B!D=1B(B https://github.com/microsoft/mu_basecore/blob/release/202005/MdeModulePkg/= Universal/Variable/UefiVariablePolicy/ReadMe.md Thanks! - Bret From: Bret Barkelew via groups.io Sent: Tuesday, June 23, 2020 4:19 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 v6 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%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141= af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&sdata=3D1%2F3MkPm5HuXeG= %2FEaQgl%2F%2F8Tqu3UvgDs6Ich2ezXgjuY%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%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f98= 8bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&sdata=3Db%2FFd= g6Sy2pdxbk3C%2FgVzXvoOWOxW6Z60QXRQ%2BVxGfFs%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%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7= cd011db47%7C1%7C0%7C637285079522114249&sdata=3DepDJobMGos0As5T2JSwhs2PT= y1IDt52oLqXkxEPJWLg%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 > v6 changes: * Fix an issue with uninitialized Status in InitVariablePolicyLib() and De= initVariablePolicyLib() * Fix GCC building in shell-based functional test * Rebase on latest origin/master 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 = | 816 +++++++ MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariablePol= icyUnitTest.c | 2440 ++++++++++++++++++++ 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, 8015 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_CY4PR21MB074345AB8EBDADBA9BF2CC68EF710CY4PR21MB0743namp_ Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable

I believe the ARM platforms already have the change= . At least the ArmVirt does and some of the edk2-platforms.

 

This is not news. It=1B$B!G=1B(Bs been broadcast re= peatedly for the last 3 months. And the last 6 months. And the last 15 mont= hs.

 

- Bret

 

From: Gao, Liming
Sent: Wednesday, July 29, 2020 6:36 PM
To: devel@edk2.groups.io; Bret Barkelew; bret@corthon.com; Leif Lindholm
Cc: Yao, Jiewen; Wang, Jian J; Wu, Hao A; Justen, Jordan L; Laszlo Ersek; Ard Biesheuvel; Andrew Fish; Ni, Ray
Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the Varia= blePolicy feature

 

Include Leif. This change adds new library class dependency for the vari= able driver. So, it requires to update the platform DSC file. It will impac= t ARM platforms.

 

Thanks

Liming

From: devel@edk2.groups.io <devel@edk2.gr= oups.io> On Behalf Of Bret Barkelew via groups.io
Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B30=1B$BF|=1B(B 3:56
To: devel@edk2.groups.io; bret@corthon.com
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Chao Zhang <chao.b= .zhang@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A= <hao.a.wu@intel.com>; Gao, Liming <liming.gao@intel.com>; Just= en, Jordan L <jordan.l.justen@intel.com>; Laszlo Ersek <lersek@red= hat.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 v6 00/14] Add the Varia= blePolicy feature

 

Still waiting on some R-bs.

 

Have a new doc that will make it into a v7, if it h= elps anyone with their review=1B$B!D=1B(B

https://github.com/microsoft/mu_basecore/blob/release/20200= 5/MdeModulePkg/Universal/Variable/UefiVariablePolicy/ReadMe.md

 

Thanks!

 

- Bret

 

From: Bret Barkelew via groups.io
Sent: Tuesday, June 23, 2020 4:19 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 v6 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%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db4= 7%7C1%7C0%7C637285079522114249&amp;sdata=3D1%2F3MkPm5HuXeG%2FEaQgl%2F%2= F8Tqu3UvgDs6Ich2ezXgjuY%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-Protocol---E= nhanced-Method-for-Managing-Variables%23platform-porting&amp;data=3D02%= 7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C7= 2f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&amp;sdata= =3Db%2FFdg6Sy2pdxbk3C%2FgVzXvoOWOxW6Z60QXRQ%2BVxGfFs%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://nam06.safelin= ks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2= Fmessage%2F53712&amp;data=3D02%7C01%7Cbret.barkelew%40microsoft.com%7Cd= f2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%= 7C637285079522114249&amp;sdata=3DepDJobMGos0As5T2JSwhs2PTy1IDt52oLqXkxE= PJWLg%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>

v6 changes:
* Fix an issue with uninitialized Status in InitVariablePolicyLib() and De= initVariablePolicyLib()
* Fix GCC building in shell-based functional test
* Rebase on latest origin/master

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;    |  816 +++++++
 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/Variab= lePolicyUnitTest.c   | 2440 ++++++++++++++++++++
 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/VariablePolicy= FuncTestApp.c        | 1978 ++++++++++++= ++++
 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 ++= +++
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c&n= bsp;            = ;          |   14 +<= br>  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 +<= br>  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 +<= br>  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 +<= br>  UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc    &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;      |    4 +
 47 files changed, 8015 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_CY4PR21MB074345AB8EBDADBA9BF2CC68EF710CY4PR21MB0743namp_-- --_004_CY4PR21MB074345AB8EBDADBA9BF2CC68EF710CY4PR21MB0743namp_ Content-Type: image/png; name="C91A1AC82CAD4CAF87A9F26E74F492D4.png" Content-Description: C91A1AC82CAD4CAF87A9F26E74F492D4.png Content-Disposition: inline; filename="C91A1AC82CAD4CAF87A9F26E74F492D4.png"; size=151; creation-date="Thu, 30 Jul 2020 01:43:43 GMT"; modification-date="Thu, 30 Jul 2020 01:43:43 GMT" Content-ID: Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAAsQAAAACCAYAAABfe8oDAAAAAXNSR0IArs4c6QAAAARnQU1BAACx jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAsSURBVFhH7dYBDQAwCASx928KBVOAGEhmg15S D5d6PQAAcNUf4kiSJEknSxbqaWoGh41h5wAAAABJRU5ErkJggg== --_004_CY4PR21MB074345AB8EBDADBA9BF2CC68EF710CY4PR21MB0743namp_--