From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp03.apple.com (ma1-aaemail-dr-lapp03.apple.com [17.171.2.72]) by mx.groups.io with SMTP id smtpd.web10.1699.1600896773278767809 for ; Wed, 23 Sep 2020 14:32:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=a1bYQmtz; spf=pass (domain: apple.com, ip: 17.171.2.72, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp03.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp03.apple.com (8.16.0.42/8.16.0.42) with SMTP id 08NLDQ7w013222; Wed, 23 Sep 2020 14:32:48 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=S4GlWQ5OIwuktwUsgGscgFwf22gwU/qhlQzBJoc/02A=; b=a1bYQmtzZjOvhgERX4SVuGYiDbAg7S22w58pVML0SeYiQF0xTbfKyy/EjLXzGR6NrIKo Z/Uw6IIlar37TjsmmUfCafr8Qqy50v0XnXw1M5PgkLqTIPU8ro7dIcGlhQmAE+nDzUW4 YIyzo6MOAv7grWkgJd/h+SP4egB0UqKAMANeQqK0TOAdE1USZ5LyFUEWBfSfj/nPVUV0 xAJGe/DlcsWAgupnslp667pBgUvGdJtCps9WwMhU3/5d8UCJ9sesPD8IDBzmeNow7B7Z hSLhOzy9NCZWW3Ja+lfm2TKVdiJiA1miQ5sGRln9Ww5umqlFOyQLDh6zvLV3wPFhW54x ww== Received: from rn-mailsvcp-mta-lapp02.rno.apple.com (rn-mailsvcp-mta-lapp02.rno.apple.com [10.225.203.150]) by ma1-aaemail-dr-lapp03.apple.com with ESMTP id 33ngyv1x33-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 23 Sep 2020 14:32:48 -0700 Received: from rn-mailsvcp-mmp-lapp04.rno.apple.com (rn-mailsvcp-mmp-lapp04.rno.apple.com [17.179.253.17]) by rn-mailsvcp-mta-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPS id <0QH400AXSRUNPK60@rn-mailsvcp-mta-lapp02.rno.apple.com>; Wed, 23 Sep 2020 14:32:47 -0700 (PDT) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp04.rno.apple.com by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) id <0QH400B00RLZ3C00@rn-mailsvcp-mmp-lapp04.rno.apple.com>; Wed, 23 Sep 2020 14:32:47 -0700 (PDT) X-Va-A: X-Va-T-CD: 518e84cde40ce7f627f69968c4f36337 X-Va-E-CD: a55bd6775857f7658a0b273c83da49d8 X-Va-R-CD: 5fff1c7fe3760ac057cde44ada8d2f00 X-Va-CD: 0 X-Va-ID: 45bf236c-e62b-4556-8caf-093c57922b80 X-V-A: X-V-T-CD: 518e84cde40ce7f627f69968c4f36337 X-V-E-CD: a55bd6775857f7658a0b273c83da49d8 X-V-R-CD: 5fff1c7fe3760ac057cde44ada8d2f00 X-V-CD: 0 X-V-ID: d67f8dc2-5488-4aa8-868d-1f547facd858 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-23_16:2020-09-23,2020-09-23 signatures=0 Received: from [17.235.51.77] (unknown [17.235.51.77]) by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPSA id <0QH400L3FRULMF00@rn-mailsvcp-mmp-lapp04.rno.apple.com>; Wed, 23 Sep 2020 14:32:47 -0700 (PDT) From: "Andrew Fish" Message-id: MIME-version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [edk2-devel] [EXTERNAL] [PATCH v8 00/14] Add the VariablePolicy feature Date: Wed, 23 Sep 2020 14:32:45 -0700 In-reply-to: Cc: Laszlo Ersek , Bret Barkelew , "Yao, Jiewen" , Dandan Bi , Chao Zhang , Jian J Wang , Hao A Wu , "liming.gao" , Jordan Justen , Ard Biesheuvel , "Ni, Ray" To: edk2-devel-groups-io , bret@corthon.com References: <20200923060748.3795-1-bret.barkelew@microsoft.com> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-23_16:2020-09-23,2020-09-23 signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_D9D807BD-A10B-4DD6-9EDF-C9F4024DA34C" --Apple-Mail=_D9D807BD-A10B-4DD6-9EDF-C9F4024DA34C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 23, 2020, at 2:14 PM, Bret Barkelew wrote: >=20 > As far as I can tell, this is exposing a pre-existing race condition in = EndOfDxe. It just so HAPPENS that the old "Disable RequestToLock" callback = executed after this TcgMor callback, whereas the new VariablePolicy callbac= k executes first. >=20 > I'm going to poke around for a solution, but this seems like an architec= tural problem with EndOfDxe. >=20 The architecture does not guarantee order for the events. So if the events= are dependent on the order of other events that is a bug in implementation= . These kind of bugs are hard to notice as the DXE Core implementation even= t dispatch in a fixed order, I think in the order the event was registered.= So it looks correct until you add more events.=20 Thanks, Andrew Fish > On Wed, Sep 23, 2020 at 6:02 AM Laszlo Ersek > wrote: > Hi Bret, >=20 > On 09/23/20 08:12, Bret Barkelew via groups.io wrote= : > > To whom it may concern, > > This is as done as it=C3=A2=E2=82=AC=E2=84=A2s going to get. > >=20 > > Thank you all for your help! >=20 > I tried to merge this via >, > but it failed. Please review the build report, and submit v9 if necessar= y. >=20 > Thanks! > Laszlo >=20 >=20 --Apple-Mail=_D9D807BD-A10B-4DD6-9EDF-C9F4024DA34C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Sep 23, 2= 020, at 2:14 PM, Bret Barkelew <bret@corthon.com> wrote:

As far as I can tell, = this is exposing a pre-existing race condition in EndOfDxe. It just so HAPP= ENS that the old "Disable RequestToLock" callback executed after = this TcgMor callback, whereas the new VariablePolicy callback executes firs= t.

I'm going to poke ar= ound for a solution, but this seems like an architectural problem with EndO= fDxe.


The architecture does not guarantee order for the events. So if the = events are dependent on the order of other events that is a bug in implemen= tation. These kind of bugs are hard to notice as the DXE Core implementatio= n event dispatch in a fixed order, I think in the order the event was regis= tered. So it looks correct until you add more events. 

Thanks,

Andrew Fis= h

=
On Wed, Se= p 23, 2020 at 6:02 AM Laszlo Ersek <lersek@redhat.com> wrote:
Hi Bret,

On 09/23/20 08:12, Bret Barkelew via groups.io wrote:
> To whom it may concern,
> This is as done as it=C3=A2=E2=82=AC=E2=84=A2s going to get.
>
> Thank you all for your help!

I tried to merge this via <https://github.c= om/tianocore/edk2/pull/954>,
but it failed. Please review the build report, and submit v9 if necessary.=

Thanks!
Laszlo


--Apple-Mail=_D9D807BD-A10B-4DD6-9EDF-C9F4024DA34C--