From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from rn-mailsvcp-ppex-lapp45.apple.com (rn-mailsvcp-ppex-lapp45.apple.com [17.179.253.49]) by mx.groups.io with SMTP id smtpd.web12.3626.1626322456724839077 for ; Wed, 14 Jul 2021 21:14:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=haSGtMRE; spf=pass (domain: apple.com, ip: 17.179.253.49, mailfrom: afish@apple.com) Received: from pps.filterd (rn-mailsvcp-ppex-lapp45.rno.apple.com [127.0.0.1]) by rn-mailsvcp-ppex-lapp45.rno.apple.com (8.16.1.2/8.16.1.2) with SMTP id 16F4CnbK011895; Wed, 14 Jul 2021 21:14:14 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : content-type : mime-version : subject : date : references : to : in-reply-to : message-id; s=20180706; bh=WqtnoiPLJBmBjplDwJIzXkYf7zrpISy9GGWKKiSfoW8=; b=haSGtMREu+42g/ciIn75kQfRUWT+UKYe/+iqZdYdGZKN1gFduoD4TZYo4UW+EoJ87y3f mOxc9R2KrSFpSC1iDJsb8ewbdXKzLzHP6LKQBDFPIXaOFoadxO/AeI/UPdFhDy+OvEwY rxY9yNevENu5r8bQmdujac6xiaWPYYvDU87LGxQ20OncPKcvhg7a4xo0ZX6+4wp7VJPG bhZNvQzhTSwRXaPsZq9mnYIb22y6PDp53cAZ9/mbRXcqQcz3XUnoHUj+VX1uCbFjV3o3 JEqMbqfnif9eA0QONP28BlhcCghFacKpZcjA0tOytULpQqeJMzxce7qwI3SIQFhw0AWh PA== Received: from rn-mailsvcp-mta-lapp01.rno.apple.com (rn-mailsvcp-mta-lapp01.rno.apple.com [10.225.203.149]) by rn-mailsvcp-ppex-lapp45.rno.apple.com with ESMTP id 39q9utpsd4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 14 Jul 2021 21:14:14 -0700 Received: from rn-mailsvcp-mmp-lapp02.rno.apple.com (rn-mailsvcp-mmp-lapp02.rno.apple.com [17.179.253.15]) by rn-mailsvcp-mta-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.9.20210415 64bit (built Apr 15 2021)) with ESMTPS id <0QW900Z5SQFQ5WE0@rn-mailsvcp-mta-lapp01.rno.apple.com>; Wed, 14 Jul 2021 21:14:14 -0700 (PDT) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp02.rno.apple.com by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.9.20210415 64bit (built Apr 15 2021)) id <0QW901100QB72700@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Wed, 14 Jul 2021 21:14:14 -0700 (PDT) X-Va-A: X-Va-T-CD: d5c51146d70274e1b1311a7ca8b2347f X-Va-E-CD: 637af1d9df85a624c3564dd9a66ce629 X-Va-R-CD: fdab3ba994f8172eee9669ab90e6135b X-Va-CD: 0 X-Va-ID: 3e1f68d3-4bb6-4244-8935-5ccc257c5e82 X-V-A: X-V-T-CD: d5c51146d70274e1b1311a7ca8b2347f X-V-E-CD: 637af1d9df85a624c3564dd9a66ce629 X-V-R-CD: fdab3ba994f8172eee9669ab90e6135b X-V-CD: 0 X-V-ID: 151e3ea4-d7ff-47c0-9343-921045474737 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-15_02:2021-07-14,2021-07-15 signatures=0 Received: from [17.235.46.184] (unknown [17.235.46.184]) by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.9.20210415 64bit (built Apr 15 2021)) with ESMTPSA id <0QW900PABQFOBO00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Wed, 14 Jul 2021 21:14:13 -0700 (PDT) From: "Andrew Fish" MIME-version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.1\)) Subject: Re: [edk2-devel] BaseCryptLib in ARM incorrectly marked as a DXE_DRIVER Date: Wed, 14 Jul 2021 21:14:11 -0700 References: To: edk2-devel-groups-io , arti.gupta@microsoft.com In-reply-to: Message-id: <7B759ABE-6B14-458D-B9E4-C11A2F3ABCE6@apple.com> X-Mailer: Apple Mail (2.3654.20.0.2.1) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-15_02:2021-07-14,2021-07-15 signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_0F2F961E-5389-4ACE-AB64-5FFD4C38F6C1" --Apple-Mail=_0F2F961E-5389-4ACE-AB64-5FFD4C38F6C1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Arti, Can you be a little more specific? Which INF file? How is it used? Sorry I= don=E2=80=99t know a lot about this library.=20 The different INF files pull in different allocation strategies for the co= mmon library code.=20 https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/BaseCryptL= ib/RuntimeCryptLib.inf SysCall/RuntimeMemAllocation.c https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/BaseCryptL= ib/BaseCryptLib.inf SysCall/BaseMemAllocation.c The most important line in the INF is: LIBRARY_CLASS =3D BaseCryptLib|DXE_RUNTIME_DRIVER or LIBRARY_CLASS =3D BaseCryptLib|DXE_DRIVER DXE_CORE UEFI_A= PPLICATION UEFI_DRIVER The list after the | is what module types this library can be linked into.= I don=E2=80=99t remember what issue a wrong MODULE_TYPE for a library woul= d cause. I think the LIBRARY_CLASS list may override the MODULE_TYPE in ter= ms of how this library gets consumed.=20 Thanks, Andrew Fish > On Jul 14, 2021, at 1:34 PM, Arti Gupta via groups.io wrote: >=20 > Hello, > > I am seeing that the BaseCryptLib in ARM is declared as a DXE_DRIVER ins= tead of a DXE_RUNTIME_DRIVER, however it has a RuntimeMemAllocation.c which= registers for the virtualaddresschange event so that tells me that the lib= is expected to live in runtime. Is this bug known? What are the next steps= for getting this fixed? > > Thanks, > Arti >=20 --Apple-Mail=_0F2F961E-5389-4ACE-AB64-5FFD4C38F6C1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Arti,

Can you be a little more specific? Which I= NF file? How is it used? Sorry I don=E2=80=99t know a lot about this librar= y. 

The diff= erent INF files pull in different allocation strategies for the common libr= ary code. 

<= a href=3D"https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/B= aseCryptLib/RuntimeCryptLib.inf" class=3D"">https://github.com/tianocore/ed= k2/blob/master/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
=
= <= td id=3D"L65" class=3D"blob-num js-line-number" data-line-number=3D"65" sty= le=3D"box-sizing: border-box; padding: 0px 10px; color: var(--color-diff-bl= ob-num-text); cursor: pointer; font-family: ui-monospace, SFMono-Regular, &= quot;SF Mono", Consolas, "Liberation Mono", Menlo, monospace= ; font-size: 12px; line-height: 20px; min-width: 50px; text-align: right; -= webkit-user-select: none; vertical-align: top; white-space: nowrap; width: = 50px;">
SysCall/RuntimeMemAllocation.c
= https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/BaseCryptLi= b/BaseCryptLib.inf
SysCall/BaseMemAllocati= on.c

The most important line in the INF is:

LIBRARY_CLAS= S =3D BaseCryptLib|DXE_RUNTIME_DRIVER

or

LIBRARY_CLASS = =3D BaseCryptLib|DXE_DRIVER DXE_CORE UEFI_APPLICATION UEFI_DRIVER

The list after the | is what module types this library can be linked= into. I don=E2=80=99t remember what issue a wrong MODULE_TYPE for a librar= y would cause. I think the LIBRARY_CLASS list may override the MODULE_TYPE = in terms of how this library gets consumed. 

Thanks,

Andrew Fish

On Jul 14, 2021, at 1:34 PM= , Arti Gupta via groups.io <= arti.gup= ta=3Dmicrosoft.com@groups.io> wrote:

Hello,
&nb= sp;
I am seeing that the BaseCryptLib in ARM is d= eclared as a DXE_DRIVER instead of a DXE_RUNTIME_DRIVER, however it has a R= untimeMemAllocation.c which registers for the virtualaddresschange event so= that tells me that the lib is expected to live in runtime. Is this bug kno= wn? What are the next steps for getting this fixed?
 
Thanks,=
Arti

--Apple-Mail=_0F2F961E-5389-4ACE-AB64-5FFD4C38F6C1--