From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.137]) by mx.groups.io with SMTP id smtpd.web11.1117.1591681786900793910 for ; Mon, 08 Jun 2020 22:49:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=ApZDczAk; spf=pass (domain: microsoft.com, ip: 40.107.93.137, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nxxVDd1ISmBisg+A17PxKA43svYw9QmpNi3P7O8DUwhsd5hVdm42wCd0mYNko3I6IzpRjMfDqMI+X7lZAAc07wAG5/k+6TnAb8RNWcJkYir0dG0/10Yipa5i9UCU5V2Rqt6voEgOBERN4UyFBFrg6/2oC4YPG+LY2YNvz8skBcXdj3SmlO4Ozaq9V4OUho46LbPFGaSYBD+h8aryIEk3zgmc2k40Nm5DhIZKwlKO8UDbINuYIzdY5lP0jbHt93Q+jxWNLI09m6oHXppJg9nLbyVjWvfbrIZ33dc2CET2zAla4dQGQ47fByHZhy+w2jdp2SoKz+k/MX1U0DefEfnk4A== 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=2FxlIF9guDbFAmK/SstF8Px6NZ8kpf+Z6skrFRV88HM=; b=cKB56UEv5yQHu5kX2HnbZLNrfCh2yRJ7uUfhKvkw2pp3PpR3Yt+KCpSXcQYZE5bNJ8Fk+gDqzn2pc4q8hH2+aA9L3sov4Zf7qEb274E1Qbw/fP36cEHvqAEC7GFJgOrpZqB8dMPFPegsrDb/vEuPfgWcxB4Q7zgUTCXNhp/QDnndITNxWMB09zywcurMkWf5QFQexAoE5R6y+Pwr/LE/PB1k4R1tSp1XdIn8Ed6uIzvl4OGF2mKUBiOZyZQXGeee9j4XJ/ktNIL9BoD5+J5Yu4wc77r7oj5acM4CGoWz3naZ6xxN1MxAIfcAV8H+1P9PgFS61swUkv+/s/AAolmPVQ== 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=2FxlIF9guDbFAmK/SstF8Px6NZ8kpf+Z6skrFRV88HM=; b=ApZDczAkLxqczGdAA85Sqjloy9yOk3dD2uY7zMPE+kRUgcPlfypVKUCegJrDc5cAy3jgEj84H6TR4yuT1EeZrCCAdbx/BwPcjPC/sUN7S/dfrYR78CaQXeNw135MFcdfJGWytNQFAgRw4pB+fLhctDAplswjl72f79ZggRGoWpo= Received: from CY4PR21MB0743.namprd21.prod.outlook.com (2603:10b6:903:b2::9) by CY4PR21MB0136.namprd21.prod.outlook.com (2603:10b6:903:b2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.3; Tue, 9 Jun 2020 05:49:44 +0000 Received: from CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::f112:82fb:d4fd:f7dd]) by CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::f112:82fb:d4fd:f7dd%11]) with mapi id 15.20.3088.000; Tue, 9 Jun 2020 05:49:44 +0000 From: "Bret Barkelew" To: "devel@edk2.groups.io" , "leif@nuviainc.com" , "bret@corthon.com" CC: liming.gao , Laszlo Ersek , Ard Biesheuvel , Andrew Fish Subject: Re: [EXTERNAL] Re: [edk2-devel] [PATCH v5 00/14] Add the VariablePolicy feature Thread-Topic: [EXTERNAL] Re: [edk2-devel] [PATCH v5 00/14] Add the VariablePolicy feature Thread-Index: AQHWObj1sBv4SxlK1U2GqBaVeUcVLKjPzwaA Date: Tue, 9 Jun 2020 05:49:44 +0000 Message-ID: References: <20200603065810.806-1-brbarkel@microsoft.com>,<20200603150913.GS28566@vanye> In-Reply-To: <20200603150913.GS28566@vanye> 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:45:51.2251616Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [71.212.136.24] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 0db3512e-18d9-458a-da86-08d80c38e94e x-ms-traffictypediagnostic: CY4PR21MB0136: x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 042957ACD7 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tqebiFH+VFEWSePiD+MPY+NIJf491YtJF8sL14jJ0gLLKQKagWAxcYCjIylvZIqoSyHhQgohP22Ym12tysvYXawdcH7tDxcyxIaXvxsQoYLt2jJiBcu9FQV4kWV3cqZNYR+Uw68om5Y2ZE3TfGIzVBcvXCiRd0dhgPjTh6KhGnWwZfqOaVh+CM9859H6wOnBvkSlWvCfcPp41LzKIzSc2HJNem6RvmSp+rvqyGlpiC61OR2pnfDxt4PCq7V/Cobi17GXkB+4NYoaEGwenvz2kT/85HhWlc4qmBxM94/NLtGyCVwTfu6XEp6ozqDbyn2UshoyqMdXwsJJEQKm3+nvlUCVlTNTZCiEEnsyq9knH02znQ258sLwZBNNtpDrWnEM/aRescIpZm6Wb2Lj6HsKDo8Gtg51xQA6gXStqAmud2Lx+w4Yn1ckN1r1Qi1FInitulqJn0Rp9nXUgy0/KgBx8w== 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)(366004)(346002)(136003)(376002)(39860400002)(396003)(66476007)(86362001)(166002)(55016002)(9686003)(10290500003)(52536014)(478600001)(82960400001)(5660300002)(966005)(82950400001)(30864003)(33656002)(8676002)(8990500004)(71200400001)(4326008)(8936002)(91956017)(76116006)(2906002)(110136005)(64756008)(66446008)(83380400001)(66556008)(54906003)(6506007)(53546011)(186003)(26005)(66946007)(7696005)(316002)(164314003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: ilKBo5mHJvQjEV+G/SxhLBusqmzG0RUULxeXOP312Vd9JMktz7IJfAD0hdpVl7wNH4IBa2mS1xVqkHJR5x0SyprDX9WoOaTV2xBlzGYbGikcEdxbrSJllQgELoM01yiD+FRJ4wgyZ6oJbuQtD/2JYsv3dz1aaputYIF1FMhFDHeCu9Sh6dW9SmLDBbdEf624MKQLgwIX8cpPRgYPtAbzSG+6vJNGlrKbrPpCRXEzs+/3+iA1I1G9F1WPUpGncKrjMi19knonmEwabmhIUBslE9YwB9c0oFD4EzZ9/qrH4yMtElETnILM2+SXg8GLNNFeNKd4s6p5eVZOJ8/bsKO2ZgCRJgXDbd+77+ptJrmCorK8hPxrZkbjhuV6L41UTykR5L7XVm4b9mkCJkD24Rm7HYmm3bpzCX8giqv7XpAcISkgSjx4OGIS6tvU9MWmHtiWvYftkK7FL/1zFEhj/Rw2EJt85x99Kw21jsUSnYUHv2XJ2uTIhm024TmhvRNBJyW2 x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0db3512e-18d9-458a-da86-08d80c38e94e X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jun 2020 05:49:44.3746 (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: wVRUhfry572HtZQZPaVy6mQeDW4qGjEPw7erEA6PJPjNK7RHFdlVLilbSIWuvlWxYmU76mmNH6banrZYiDQSpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0136 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CY4PR21MB074355E50128850116232C2AEF820CY4PR21MB0743namp_" --_000_CY4PR21MB074355E50128850116232C2AEF820CY4PR21MB0743namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Happy to take a look at that, and thanks for all the tips. I had tried to register an email address for groups.io that had a =93+edk= =94 so that I could filter the emails to be forwarded differently, but it = won=92t send from that address so that=92s probably causing some confusion. Yes, I would prefer to use brbarkel@microsoft.com as the committer. Thanks! - Bret From: Leif Lindholm via groups.io Sent: Wednesday, June 3, 2020 8:09 AM To: devel@edk2.groups.io; bret@corthon.com Cc: liming.gao; Laszlo Ersek; Ard Biesheuvel; Andrew Fish Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v5 00/14] Add the VariablePoli= cy feature Hi Bret, I don't have any comments on the content of these patches, but I have a couple about metadata: You're submitting the patches from bret@corthon.org, but signing them off with Bret Barkelew . This way the Microsoft authorship metadata is not preserved, which I think is unfortunate. It also leaves the relationship between bret@corthon.com and brbarkel@microsoft.com somewhat unofficial. If this is exactly as intended, feel free to stop reading here. If not, I have some suggestions. - It would be a good clarification if one of you could submit a patch to edk2/.mailmap associating the addresses, and the other giving it a Reviewed-by. - Can we use brbarkel@microsoft.com as the author of the patches? I'm sure whoever stages this set as a pull request would be happy to do it this time around, but for future sets, if you set up local git configuration for edk2 with user.email as @microsoft.com, you should still be able to set (local or global) sendemail.from as @corthon.com. Finally, it would be nice if bret@corthon.com could "become a member" of edk2.groups.io, and then set the subscription to "no email". This way, you don't get duplicated emails, but it lets us add the corthon address to the sender whitelist, so your patches stop getting stuck in moderation. Best Regards, Leif On Tue, Jun 02, 2020 at 23:57:56 -0700, Bret Barkelew wrote: > REF:https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2F= bugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2522&data=3D02%7C01%7CBret= .Barkelew%40microsoft.com%7Cd3a155807aa94d55cab008d807d01722%7C72f988bf86f1= 41af91ab2d7cd011db47%7C1%7C0%7C637267937612562800&sdata=3Dwui8HYOzgyeqH= YOqH6ZBlYaLwoKc0l0Yn7UylYq3cf0%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 librar= ies, > a protocol, an SMI communication handler, and VariableServices integrati= on, > the patches are broken up by individual library additions and then a fin= al > 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%2Fgith= ub.com%2Ftianocore%2Ftianocore.github.io%2Fwiki%2FVariablePolicy-Protocol--= -Enhanced-Method-for-Managing-Variables%23platform-porting&data=3D02%7C= 01%7CBret.Barkelew%40microsoft.com%7Cd3a155807aa94d55cab008d807d01722%7C72f= 988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637267937612562800&sdata=3DfC0h= hqa%2BmxNRBLByRuZeoMQKTdFU%2BGpB9gfnI3c%2BSA4%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= .groups.io%2Fg%2Fdevel%2Fmessage%2F53712&data=3D02%7C01%7CBret.Barkelew= %40microsoft.com%7Cd3a155807aa94d55cab008d807d01722%7C72f988bf86f141af91ab2= d7cd011db47%7C1%7C0%7C637267937612562800&sdata=3DVUXP%2FHLvoVnamzbnHq4R= RLWLLIiH1JJTYV7sHPVNzEQ%3D&reserved=3D0 > (the code branches shared in that discussion are now out of date, but th= e > 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 plat= forms > * Rebase on master > * Migrate to new MmCommunicate2 protocol > * Fix an oversight in the default return value for InitMmCommonCommBuffe= r > * Fix in VariablePolicyLib to allow ExtraInitRuntimeDxe to consume varia= bles > > 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 gVariablePolicyProtocol= Guid > 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 platfor= ms > 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/VariablePolicyExtraInitRuntimeDx= e.c | 85 + > MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c = | 813 +++++++ > MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariableP= olicyUnitTest.c | 2436 ++++++++++++++++++++ > MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/VariablePolicyFun= cTestApp.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.in= f | 35 + > MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.un= i | 12 + > MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf = | 44 + > MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.uni = | 12 + > MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf = | 51 + > MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariableP= olicyUnitTest.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/VariablePolicyFun= cTestApp.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/VarCheckPolic= yLib.c > create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/Variabl= ePolicyHelperLib.c > create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolic= yExtraInitNull.c > create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolic= yExtraInitRuntimeDxe.c > create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolic= yLib.c > create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolic= yUnitTest/VariablePolicyUnitTest.c > create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestAp= p/VariablePolicyFuncTestApp.c > create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableL= ockRequstToLock.c > create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableP= olicySmmDxe.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/VarCheckPolic= yLib.inf > create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolic= yLib.uni > create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/Variabl= ePolicyHelperLib.inf > create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/Variabl= ePolicyHelperLib.uni > create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolic= yLib.inf > create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolic= yLib.uni > create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolic= yLibRuntimeDxe.inf > create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolic= yUnitTest/VariablePolicyUnitTest.inf > create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestAp= p/Readme.md > create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestAp= p/VariablePolicyFuncTestApp.inf > > -- > 2.26.2.windows.1.8.g01c50adf56.20200515075929 > > > > --_000_CY4PR21MB074355E50128850116232C2AEF820CY4PR21MB0743namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable

Happy to take a look at that, and thanks for all th= e tips.

 

I had tried to register an email address for groups= .io that had a =93+edk=94 so that I could filter the emails to be forwa= rded differently, but it won=92t send from that address so that=92s probabl= y causing some confusion.

 

Yes, I would prefer to use brbarkel@microsoft.com as the committer. Thanks!

 

- Bret

 

 

Hi Bret,

I don't have any comments on the content of these patches, but I have
a couple about metadata:
You're submitting the patches from bret@corthon.org, but signing them
off with Bret Barkelew <brbarkel@microsoft.com>.

This way the Microsoft authorship metadata is not preserved, which I
think is unfortunate. It also leaves the relationship between
bret@corthon.com and brbarkel@microsoft.com somewhat unofficial.

If this is exactly as intended, feel free to stop reading here.

If not, I have some suggestions.

- It would be a good clarification if one of you could submit a patch
  to edk2/.mailmap associating the addresses, and the other giving it=
  a Reviewed-by.
- Can we use brbarkel@microsoft.com as the author of the patches?
  I'm sure whoever stages this set as a pull request would be happy t= o
  do it this time around, but for future sets, if you set up local gi= t
  configuration for edk2 with user.email as @microsoft.com, you shoul= d
  still be able to set (local or global) sendemail.from as
  @corthon.com.

Finally, it would be nice if bret@corthon.com could "become a member&= quot;
of edk2.groups.io, and then set the subscription to "no email". = This
way, you don't get duplicated emails, but it lets us add the corthon
address to the sender whitelist, so your patches stop getting stuck in
moderation.

Best Regards,

Leif

On Tue, Jun 02, 2020 at 23:57:56 -0700, Bret Barkelew wrote:
> REF:https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F= %2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2522&amp;data=3D02%7C01= %7CBret.Barkelew%40microsoft.com%7Cd3a155807aa94d55cab008d807d01722%7C72f98= 8bf86f141af91ab2d7cd011db47%7C1%7C0%7C637267937612562800&amp;sdata=3Dwu= i8HYOzgyeqHYOqH6ZBlYaLwoKc0l0Yn7UylYq3cf0%3D&amp;reserved=3D0
>
> The 14 patches in this series add the VariablePolicy feature to the c= ore,
> deprecate Edk2VarLock (while adding a compatibility layer to reduce c= ode
> churn), and integrate the VariablePolicy libraries and protocols into=
> Variable Services.
>
> Since the integration requires multiple changes, including adding lib= raries,
> a protocol, an SMI communication handler, and VariableServices integr= ation,
> the patches are broken up by individual library additions and then a = final
> integration. Security-sensitive changes like bypassing Authenticated<= br> > Variable enforcement are also broken out into individual patches so t= hat
> 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%7Cd3a155807aa94d55cab008d807d01722%7C7= 2f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637267937612562800&amp;sdata= =3DfC0hhqa%2BmxNRBLByRuZeoMQKTdFU%2BGpB9gfnI3c%2BSA4%3D&amp;reserved= =3D0
>
> Discussion of the feature can be found in multiple places throughout<= br> > 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&amp;data=3D02%7C01%7CBret.Barkel= ew%40microsoft.com%7Cd3a155807aa94d55cab008d807d01722%7C72f988bf86f141af91a= b2d7cd011db47%7C1%7C0%7C637267937612562800&amp;sdata=3DVUXP%2FHLvoVnamz= bnHq4RRLWLLIiH1JJTYV7sHPVNzEQ%3D&amp;reserved=3D0
> (the code branches shared in that discussion are now out of date, but= the
> whitepapers and discussion are relevant).
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Chao Zhang <chao.b.zhang@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Andrew Fish <afish@apple.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Bret Barkelew <brbarkel@microsoft.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 p= latforms
> * Rebase on master
> * Migrate to new MmCommunicate2 protocol
> * Fix an oversight in the default return value for InitMmCommonCommBu= ffer
> * Fix in VariablePolicyLib to allow ExtraInitRuntimeDxe to consume va= riables
>
> 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 driv= er
>   (now allocates its own buffer)
> * Change names from VARIABLE_POLICY_PROTOCOL and gVariablePolicyProto= colGuid
>   to EDKII_VARIABLE_POLICY_PROTOCOL and gEdkiiVariablePolic= yProtocolGuid
> * 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 plat= forms
>   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 interfac= e
>   MdeModulePkg: Define the VariablePolicyLib
>   MdeModulePkg: Define the VariablePolicyHelperLib
>   MdeModulePkg: Define the VarCheckPolicyLib and SMM interf= ace
>   OvmfPkg: Add VariablePolicy engine to OvmfPkg platform >   EmulatorPkg: Add VariablePolicy engine to EmulatorPkg pla= tform
>   ArmVirtPkg: Add VariablePolicy engine to ArmVirtPkg platf= orm
>   UefiPayloadPkg: Add VariablePolicy engine to UefiPayloadP= kg platform
>   MdeModulePkg: Connect VariablePolicy business logic to >     VariableServices
>   MdeModulePkg: Allow VariablePolicy state to delete protec= ted variables
>   SecurityPkg: Allow VariablePolicy state to delete authent= icated
>     variables
>   MdeModulePkg: Change TCG MOR variables to use VariablePol= icy
>   MdeModulePkg: Drop VarLock from RuntimeDxe variable drive= r
>   MdeModulePkg: Add a shell-based functional test for Varia= blePolicy
>
>  MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c = ;            &n= bsp;            = ;     |  320 +++
>  MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelp= erLib.c           &n= bsp;       |  396 ++++ >  MdeModulePkg/Library/VariablePolicyLib/VariablePolicyExtraInitN= ull.c           &nbs= p;         |   46 + >  MdeModulePkg/Library/VariablePolicyLib/VariablePolicyExtraInitR= untimeDxe.c          &nbs= p;    |   85 +
>  MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c = ;            &n= bsp;            = ;     |  813 +++++++ >  MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/V= ariablePolicyUnitTest.c   | 2436 ++++++&#= 43;+++++++++++++
>  MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/VariableP= olicyFuncTestApp.c        | 1978 +&#= 43;++++++++++++++ >  MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c = ;            &n= bsp;            = ;     |   52 +-
>  MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c = ;            &n= bsp;            = ;     |   60 +-
>  MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c &nbs= p;            &= nbsp;           &nbs= p;         |   49 +-<= br> >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c &= nbsp;           &nbs= p;            &= nbsp;      |   53 +
>  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequstTo= Lock.c           &nb= sp;        |   71 +
>  MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe= .c            &= nbsp;           |  6= 42 ++++++
>  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDx= e.c            =            |   = 14 +
>  SecurityPkg/Library/AuthVariableLib/AuthService.c  &n= bsp;            = ;            &n= bsp;            |&nb= sp;  22 +-
>  ArmVirtPkg/ArmVirt.dsc.inc      &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;      |    4 +
>  EmulatorPkg/EmulatorPkg.dsc      =             &nb= sp;            =             &nb= sp;            =       |    3 +
>  MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h   =             &nb= sp;            =             &nb= sp;   |   54 +
>  MdeModulePkg/Include/Library/VariablePolicyHelperLib.h &nb= sp;            =             &nb= sp;        |  164 ++
>  MdeModulePkg/Include/Library/VariablePolicyLib.h  &nb= sp;            =             &nb= sp;            = |  207 ++
>  MdeModulePkg/Include/Protocol/VariablePolicy.h   = ;            &n= bsp;            = ;            &n= bsp;  |  157 ++
>  MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf&nb= sp;            =             &nb= sp;   |   42 +
>  MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.uni&nb= sp;            =             &nb= sp;   |   12 +
>  MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelp= erLib.inf           =       |   35 +
>  MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelp= erLib.uni           =       |   12 +
>  MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf&nb= sp;            =             &nb= sp;   |   44 +
>  MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.uni&nb= sp;            =             &nb= sp;   |   12 +
>  MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntime= Dxe.inf           &n= bsp;       |   51 +
>  MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/V= ariablePolicyUnitTest.inf |   40 +
>  MdeModulePkg/MdeModulePkg.ci.yaml     =             &nb= sp;            =             &nb= sp;            = |    4 +-
>  MdeModulePkg/MdeModulePkg.dec     &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    |   26 +-
>  MdeModulePkg/MdeModulePkg.dsc     &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    |   15 +
>  MdeModulePkg/MdeModulePkg.uni     &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    |    7 +
>  MdeModulePkg/Test/MdeModulePkgHostTest.dsc   &nb= sp;            =             &nb= sp;            =       |   11 +
>  MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/Readme.md=             &nb= sp;            = |   55 +
>  MdeModulePkg/Test/ShellTest/VariablePolicyFuncTestApp/VariableP= olicyFuncTestApp.inf      |   42 + >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.i= nf            &= nbsp;           | &n= bsp;  5 +
>  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf = ;            &n= bsp;            = ;     |    4 +
>  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDx= e.inf           &nbs= p;         |   10 + >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm= .inf            = ;          |   = 4 +
>  OvmfPkg/OvmfPkgIa32.dsc      &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;         |    5 &#= 43;
>  OvmfPkg/OvmfPkgIa32X64.dsc      &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;      |    5 +
>  OvmfPkg/OvmfPkgX64.dsc       = ;            &n= bsp;            = ;            &n= bsp;            = ;          |   = 5 +
>  OvmfPkg/OvmfXen.dsc       &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp;            |&nb= sp;   4 +
>  SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf &n= bsp;            = ;            &n= bsp;       |    2 +
>  UefiPayloadPkg/UefiPayloadPkgIa32.dsc    &n= bsp;            = ;            &n= bsp;            = ;          |   = 4 +
>  UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc    = ;            &n= bsp;            = ;            &n= bsp;       |    4 +
>  47 files changed, 8008 insertions(+), 78 deletions(-)
>  create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCh= eckPolicyLib.c
>  create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib= /VariablePolicyHelperLib.c
>  create mode 100644 MdeModulePkg/Library/VariablePolicyLib/Varia= blePolicyExtraInitNull.c
>  create mode 100644 MdeModulePkg/Library/VariablePolicyLib/Varia= blePolicyExtraInitRuntimeDxe.c
>  create mode 100644 MdeModulePkg/Library/VariablePolicyLib/Varia= blePolicyLib.c
>  create mode 100644 MdeModulePkg/Library/VariablePolicyLib/Varia= blePolicyUnitTest/VariablePolicyUnitTest.c
>  create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFu= ncTestApp/VariablePolicyFuncTestApp.c
>  create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/V= ariableLockRequstToLock.c
>  create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/V= ariablePolicySmmDxe.c
>  create mode 100644 MdeModulePkg/Include/Guid/VarCheckPolicyMmi.= h
>  create mode 100644 MdeModulePkg/Include/Library/VariablePolicyH= elperLib.h
>  create mode 100644 MdeModulePkg/Include/Library/VariablePolicyL= ib.h
>  create mode 100644 MdeModulePkg/Include/Protocol/VariablePolicy= .h
>  create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCh= eckPolicyLib.inf
>  create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCh= eckPolicyLib.uni
>  create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib= /VariablePolicyHelperLib.inf
>  create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib= /VariablePolicyHelperLib.uni
>  create mode 100644 MdeModulePkg/Library/VariablePolicyLib/Varia= blePolicyLib.inf
>  create mode 100644 MdeModulePkg/Library/VariablePolicyLib/Varia= blePolicyLib.uni
>  create mode 100644 MdeModulePkg/Library/VariablePolicyLib/Varia= blePolicyLibRuntimeDxe.inf
>  create mode 100644 MdeModulePkg/Library/VariablePolicyLib/Varia= blePolicyUnitTest/VariablePolicyUnitTest.inf
>  create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFu= ncTestApp/Readme.md
>  create mode 100644 MdeModulePkg/Test/ShellTest/VariablePolicyFu= ncTestApp/VariablePolicyFuncTestApp.inf
>
> --
> 2.26.2.windows.1.8.g01c50adf56.20200515075929
>
>
>
>

 

--_000_CY4PR21MB074355E50128850116232C2AEF820CY4PR21MB0743namp_--