From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 959F121F833D1 for ; Mon, 8 Jan 2018 13:01:10 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2018 13:06:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,332,1511856000"; d="scan'208";a="18481304" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 08 Jan 2018 13:06:19 -0800 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.195]) by fmsmsx107.amr.corp.intel.com ([169.254.6.59]) with mapi id 14.03.0319.002; Mon, 8 Jan 2018 13:06:19 -0800 From: "Carsey, Jaben" To: "Palmer, Thomas" , Laszlo Ersek , edk2-devel-01 CC: "Gao, Liming" , Rebecca Cran , "Ni, Ruiyu" Thread-Topic: [PATCH] ShellPkg/UefiShellLevel2CommandsLib: add missing EFIAPI call conv spec Thread-Index: AQHTiKuLAlVllAe2skSH9a9trrNiUqNqd6QA Date: Mon, 8 Jan 2018 21:06:18 +0000 Message-ID: References: <20180106200353.18334-1-lersek@redhat.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWUyMzNiY2QtZGYwNS00YjZmLWI4NDAtZTg0MzExZjNhNDJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InVZWW0yM1JMS3VONW92QzIxTFUrcmFYck1nOTJxbUtsRG5DQU9pTklWTnc9In0= x-ctpclassification: CTP_NT x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: [PATCH] ShellPkg/UefiShellLevel2CommandsLib: add missing EFIAPI call conv spec X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2018 21:01:11 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Agree that the internal use is questionable. Reviewed-by: Jaben Carsey > -----Original Message----- > From: Palmer, Thomas [mailto:thomas.palmer@hpe.com] > Sent: Monday, January 08, 2018 10:07 AM > To: Laszlo Ersek ; edk2-devel-01 devel@lists.01.org> > Cc: Carsey, Jaben ; Gao, Liming > ; Rebecca Cran ; Ni, Ruiyu > > Subject: RE: [PATCH] ShellPkg/UefiShellLevel2CommandsLib: add missing > EFIAPI call conv spec > Importance: High >=20 > Reviewed by thomas.palmer@hpe.com >=20 >=20 > Regards, >=20 > Thomas Palmer >=20 > "I have only made this letter longer because I have not had the time to m= ake > it shorter" - Blaise Pascal >=20 > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Saturday, January 6, 2018 2:04 PM > To: edk2-devel-01 > Cc: Jaben Carsey ; Liming Gao > ; Rebecca Cran ; Ruiyu Ni > ; Palmer, Thomas > Subject: [PATCH] ShellPkg/UefiShellLevel2CommandsLib: add missing EFIAPI > call conv spec >=20 > UefiShellLevel2CommandsLib (somewhat questionably) calls the BaseLib- > internal function InternalCharToUpper(). >=20 > This function is declared in "MdePkg/Library/BaseLib/BaseLibInternals.h", > which is not a public library class header. UefiShellLevel2CommandsLib > therefore duplicates the function declaration, but a mistake was made: th= e > EFIAPI calling convention is not spelled out on the duplicated declaratio= n. > Therefore calls made from UefiShellLevel2CommandsLib will not match the > actual function definition in "MdePkg/Library/BaseLib/String.c", > when GCC/X64 toolchains are used. >=20 > One consequence of this is that cross-filesystem copies don't work in the > UEFI shell (see the StrniCmp() function in "UefiShellLevel2CommandsLib.c"= ). > From the original report: >=20 > > FS0:\efi\ubuntu\> cp grubx64.efi fs1:\ > > > > cp: The source and destination are the same. >=20 > Copy the declaration from "BaseLibInternals.h" to > "UefiShellLevel2CommandsLib.c" verbatim. >=20 > Reported-by: Rebecca Cran > Analyzed-by: Thomas Palmer > Analyzed-by: Liming Gao > Ref: http://mid.mail-archive.com/47cd17d8-f022-6ca5-2f52- > 06a8250f8d14@cran.org.uk > Cc: Jaben Carsey > Cc: Liming Gao > Cc: Rebecca Cran > Cc: Ruiyu Ni > Cc: Thomas Palmer > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Laszlo Ersek > --- >=20 > ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib > .c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git > a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Commands > Lib.c > b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Commands > Lib.c > index 7948e53cfc46..e9ce63189224 100644 > --- > a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Commands > Lib.c > +++ > b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Command > +++ sLib.c > @@ -268,8 +268,9 @@ VerifyIntermediateDirectories ( > @return Char as an upper case character. > **/ > CHAR16 > +EFIAPI > InternalCharToUpper ( > - IN CONST CHAR16 Char > + IN CHAR16 Char > ); >=20 > /** > -- > 2.14.1.3.gb7cf6e02401b >=20