From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch [185.70.40.134]) by mx.groups.io with SMTP id smtpd.web12.35517.1578907177743331619 for ; Mon, 13 Jan 2020 01:19:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@protonmail.com header.s=default header.b=G9jt2n8/; spf=pass (domain: protonmail.com, ip: 185.70.40.134, mailfrom: vit9696@protonmail.com) Date: Mon, 13 Jan 2020 09:19:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1578907175; bh=bk/+nSyWVzJMnXR0ke/0GboH15b46z3sBqh12VrqwK8=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=G9jt2n8/mWJF7LUlcXLPV7BGOG8bR3eoJtHuNysBI/AlqNtaAIWoATbjnrbYTYJ1d vEd6Ickj0a2V4Co5yB/zD55UYLvkJPJjQnvpdpdV1Z4brzTjCK5EdKU9iMH+OnTka4 5urQn74Oeg+bIs0YliKs2YR8OdxfnIL5bmersCCM= To: "Gao, Zhichao" From: "Vitaly Cheptsov" Cc: "devel@edk2.groups.io" , "Ni, Ray" Reply-To: vit9696 Subject: Re: [edk2-devel] [PATCH 1/1] ShellPkg: Do not connect handles without device paths Message-ID: <9A165163-4BB4-434A-8C65-A84CDCB3C3C2@protonmail.com> In-Reply-To: <483a200323c14afb95bdb94ad447868d@intel.com> References: <20200112213845.96853-1-vit9696@protonmail.com> <20200112213845.96853-2-vit9696@protonmail.com> <483a200323c14afb95bdb94ad447868d@intel.com> Feedback-ID: p9QuX-L1wMgUm6nrSvNrf8juLupNs0VSnzXGVXuYDxlEahFdWtaedWDMB9zpwGDklGt7kzs1-RBc0cqz327Gcg==:Ext:ProtonMail MIME-Version: 1.0 X-Spam-Status: No, score=3.3 required=7.0 tests=ALL_TRUSTED,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.protonmail.ch X-Groupsio-MsgNum: 53187 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha256; boundary="---------------------e4bf99976ffbc32d6e004c18e2495076"; charset=UTF-8 -----------------------e4bf99976ffbc32d6e004c18e2495076 Cc: "devel@edk2.groups.io" , "Ni, Ray" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Date: Mon, 13 Jan 2020 12:18:28 +0300 From: vit9696 In-Reply-To: <483a200323c14afb95bdb94ad447868d@intel.com> Message-Id: <9A165163-4BB4-434A-8C65-A84CDCB3C3C2@protonmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) References: <20200112213845.96853-1-vit9696@protonmail.com> <20200112213845.96853-2-vit9696@protonmail.com> <483a200323c14afb95bdb94ad447868d@intel.com> Subject: Re: [edk2-devel] [PATCH 1/1] ShellPkg: Do not connect handles without device paths To: "Gao, Zhichao" X-Mailer: Apple Mail (2.3608.40.2.2.4) Hi, =E2=80=98Freeze=E2=80=99 means it is hung up forever, and we believe it = is caused by an invalid memory access in the firmware code. Using loading command with =E2=80=98-nc=E2=80=99 (no connect) will work = fine, but that is kind of expected, as the issue is caused exactly by = the connect logic. We do not believe it is possible for device controller to exist without = a device path protocol in the wild. Would you please provide an example? = If there is something we do not know about, I can imagine introducing a = PCD for this logic. Best wishes, Vitaly > 13 =D1=8F=D0=BD=D0=B2. 2020 =D0=B3., =D0=B2 11:11, Gao, Zhichao = =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0)= : >=20 >=20 > Hi, >=20 > What does 'freeze' mean? System blocked for a while or it hung up = forever? >=20 > The change would affect the operation of the 'load' command. If some = drivers need to connect to the device controller but it doesn't have a = device path protocol, the behavior of 'load' may be incorrect. > Is the option '-nc' working for your request? >=20 > Thanks, > Zhichao >=20 >> -----Original Message----- >> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >> Vitaly Cheptsov via Groups.Io >> Sent: Monday, January 13, 2020 5:39 AM >> To: devel@edk2.groups.io >> Subject: [edk2-devel] [PATCH 1/1] ShellPkg: Do not connect handles = without >> device paths >>=20 >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2460 >>=20 >> Doing this reduces the amount of needless work during device = connection >> and resolves issues with firmwares that freeze when connecting = handles >> without device paths. >>=20 >> Signed-off-by: Vitaly Cheptsov >> --- >> ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >>=20 >> diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c >> b/ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c >> index b6e7c952fa..083aac0dba 100644 >> --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c >> +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c >> @@ -32,8 +32,8 @@ ConnectAllEfi ( >> UINTN Index; >>=20 >> Status =3D gBS->LocateHandleBuffer ( >> - AllHandles, >> - NULL, >> + ByProtocol, >> + &gEfiDevicePathProtocolGuid, >> NULL, >> &HandleCount, >> &HandleBuffer >> -- >> 2.21.0 (Apple Git-122.2) >>=20 >>=20 >> -=3D-=3D-=3D-=3D-=3D-=3D >> Groups.io Links: You receive all messages sent to this group. >>=20 >> View/Reply Online (#53170): = https://edk2.groups.io/g/devel/message/53170 >> Mute This Topic: https://groups.io/mt/69653841/1768756 >> Group Owner: devel+owner@edk2.groups.io >> Unsubscribe: https://edk2.groups.io/g/devel/unsub >> [zhichao.gao@intel.com] >> -=3D-=3D-=3D-=3D-=3D-=3D >=20 -----------------------e4bf99976ffbc32d6e004c18e2495076 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wsBmBAEBCAAQBQJeHDYhCRBPsoxt7Hy0xQAKCRBPsoxt7Hy0xXJbB/9Aqz0Z 7ZNqoZ09MwMj7/0l9TQKRneCDU/Ezy9s+I51Qp6ecp+ZTX7OGyvNaNz2rWEf NyXUz4P8o5vVK1dYgNbOXvAbCX8jTlfFRbJ+Joca/c24irJDa0RHZzxTHmii wxBiPazlaqJV1rofiOfVDuPPFnm2CxT2oVZkEu1bfSa05h00BA28KDI7asXf u3c1bYpXjlReUaTHDZTOpuqHx9qjHr9a2J4+EQEBVr12l6kALxDA2CZ7Ys/R ZyYa9WF9pb+NtGP3nkZXN06mNxbZo001IOoTU9ygOe6fDlshb9x8AGSJYINJ Df4O5wfJpox9JA41mw8CCXV0t+UF6qNe3ePI =73Ky -----END PGP SIGNATURE----- -----------------------e4bf99976ffbc32d6e004c18e2495076--