From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jaben.carsey@intel.com>
Received: from mga07.intel.com (mga07.intel.com [134.134.136.100])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by ml01.01.org (Postfix) with ESMTPS id D885382134
 for <edk2-devel@lists.01.org>; Fri, 17 Feb 2017 09:27:42 -0800 (PST)
Received: from fmsmga006.fm.intel.com ([10.253.24.20])
 by orsmga105.jf.intel.com with ESMTP; 17 Feb 2017 09:27:42 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.35,172,1484035200"; d="scan'208";a="67115593"
Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201])
 by fmsmga006.fm.intel.com with ESMTP; 17 Feb 2017 09:27:42 -0800
Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by
 FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Fri, 17 Feb 2017 09:27:42 -0800
Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.47]) by
 fmsmsx115.amr.corp.intel.com ([169.254.4.4]) with mapi id 14.03.0248.002;
 Fri, 17 Feb 2017 09:27:42 -0800
From: "Carsey, Jaben" <jaben.carsey@intel.com>
To: Jeff Westfahl <jeff.westfahl@ni.com>
CC: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>, "Ni, Ruiyu"
 <ruiyu.ni@intel.com>, "Carsey, Jaben" <jaben.carsey@intel.com>
Thread-Topic: [edk2] [PATCH] ShellPkg/HandleParsingLib: Correct format
 specifier for LoadedImage
Thread-Index: AQHShwzsy8lrFMjQHEef5anMn4XB26FpnqeAgAABMwCAAW/5AIAC5UwA//+CfUA=
Date: Fri, 17 Feb 2017 17:27:40 +0000
Message-ID: <CB6E33457884FA40993F35157061515C54B761FF@FMSMSX103.amr.corp.intel.com>
References: <62a8491631d9dbde89d160ab213d3a16a2e76534.1487107403.git.jeff.westfahl@ni.com>
 <66fef1ec77c84e188120b733da3d00a9@ausx13mps335.AMER.DELL.COM>
 <e2ce0ae16a7a4bc0bc1fb7cd122d37df@ausx13mps335.AMER.DELL.COM>
 <alpine.DEB.2.20.1702151438010.11386@jmw-lm181>
 <alpine.DEB.2.20.1702171053480.24730@jmw-lm181>
In-Reply-To: <alpine.DEB.2.20.1702171053480.24730@jmw-lm181>
Accept-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTg5NTZjNDItMzVjMC00YzU3LWEwOTAtY2VmMmFjNGUzMzc0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkpTM0pmQURWWVdsVVg2UnJrMjZKN2hzK3dNa2s3TFJ3ajlqTGlSRXF1Q0E9In0=
x-ctpclassification: CTP_IC
x-originating-ip: [10.1.200.108]
MIME-Version: 1.0
Subject: Re: [PATCH] ShellPkg/HandleParsingLib: Correct format specifier for LoadedImage
X-BeenThere: edk2-devel@lists.01.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: EDK II Development  <edk2-devel.lists.01.org>
List-Unsubscribe: <https://lists.01.org/mailman/options/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=unsubscribe>
List-Archive: <http://lists.01.org/pipermail/edk2-devel/>
List-Post: <mailto:edk2-devel@lists.01.org>
List-Help: <mailto:edk2-devel-request@lists.01.org?subject=help>
List-Subscribe: <https://lists.01.org/mailman/listinfo/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=subscribe>
X-List-Received-Date: Fri, 17 Feb 2017 17:27:43 -0000
Content-Language: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I was reading the email.  I was also waiting and making sure there was cons=
ensus since I didn't have a strong opinion.  I will let Ray check also, but=
 I think the fix is good.

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

> -----Original Message-----
> From: Jeff Westfahl [mailto:jeff.westfahl@ni.com]
> Sent: Friday, February 17, 2017 8:55 AM
> To: Jeff Westfahl <jeff.westfahl@ni.com>
> Cc: edk2-devel@lists.01.org; Carsey, Jaben <jaben.carsey@intel.com>; Ni,
> Ruiyu <ruiyu.ni@intel.com>
> Subject: Re: [edk2] [PATCH] ShellPkg/HandleParsingLib: Correct format
> specifier for LoadedImage
> Importance: High
>=20
> Jaben, Ruiyu,
>=20
> Sorry, I forgot to cc you as the ShellPkg maintainers when I submitted
> this patch.
>=20
> Regards,
> Jeff Westfahl
>=20
> On Wed, 15 Feb 2017, Jeff Westfahl wrote:
>=20
> > Jim,
> >
> > I agree that those are good ideas. However, such an implementation woul=
d
> > still crash on a BIOS built against the EDK II before commit 891d844. I=
 think
> > it might be best to resolve the crash with the simple patch I have made=
,
> and
> > defer your suggestions for now.
> >
> > Regards,
> > Jeff
> >
> > On Tue, 14 Feb 2017, Jim.Dailey@dell.com wrote:
> >
> >> Please disregard the earlier "Confidential" text. The stupid plug-in t=
hat
> >> adds this
> >> does not show the text in the mail when it is composed in text mode, s=
o I
> >> often
> >> forget to turn this "feature" off when posting.  Sorry.
> >>
> >> -----Original Message-----
> >> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> >> Dailey, Jim
> >> Sent: Tuesday, February 14, 2017 4:40 PM
> >> To: jeff.westfahl@ni.com; edk2-devel@lists.01.org
> >> Subject: Re: [edk2] [PATCH] ShellPkg/HandleParsingLib: Correct format
> >> specifier for LoadedImage
> >>
> >> Jeff,
> >>
> >> Perhaps a better approach is to print *all* the LoadOptions data as he=
x
> >> bytes?
> >>
> >> In addition, one might first analyze the LoadOptions data, and, when
> >> apropos,
> >> print obvious strings as strings?
> >>
> >> Regards,
> >> Jim
> >>
> >> -----Original Message-----
> >> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Jeff
> >> Westfahl
> >> Sent: Tuesday, February 14, 2017 3:54 PM
> >> To: edk2-devel@lists.01.org
> >> Subject: [edk2] [PATCH] ShellPkg/HandleParsingLib: Correct format
> specifier
> >> for LoadedImage
> >>
> >> The format specifier for the LoadOptions field of the LoadedImage
> protocol
> >> is "%s". However, the data in LoadOptions is often generic binary data=
. A
> >> format specifier of "%x" is more appropriate for this field.
> >>
> >> Using "dh -v" with format specifier "%s" on BIOS images based on EDK I=
I
> >> source before commit 891d844 can cause a crash.
> >>
> >> Contributed-under: TianoCore Contribution Agreement 1.0
> >> Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
> >> ---
> >> ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git
> a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> >> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> >> index 0d51627c5f..273a4201bc 100644
> >> --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> >> +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> >> @@ -354,7 +354,7 @@
> >>                                                   "     DeviceHandle..=
:
> >> %%H%x%%N\r\n"
> >>                                                   "     FilePath......=
:
> >> %%H%x%%N\r\n"
> >>                                                   "     OptionsSize...=
:
> >> %%H%x%%N\r\n"
> >> -                                                  "     LoadOptions..=
.:
> >> %%H%s%%N\r\n"
> >> +                                                  "     LoadOptions..=
.:
> >> %%H%x%%N\r\n"
> >>                                                   "     ImageBase.....=
:
> >> %%H%x%%N\r\n"
> >>                                                   "     ImageSize.....=
:
> >> %%H%Lx%%N\r\n"
> >>                                                   "     CodeType......=
:
> >> %%H%s%%N\r\n"
> >> --
> >> 2.11.0.windows.3
> >>
> >> _______________________________________________
> >> edk2-devel mailing list
> >> edk2-devel@lists.01.org
> >> https://lists.01.org/mailman/listinfo/edk2-devel
> >> _______________________________________________
> >> edk2-devel mailing list
> >> edk2-devel@lists.01.org
> >> https://lists.01.org/mailman/listinfo/edk2-devel
> >>
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> >