From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from host12.webserveralpha.com (host12.webserveralpha.com [69.167.158.73]) (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 E751821E87986 for ; Mon, 11 Sep 2017 13:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mc2research.org; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:In-Reply-To:References:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/9O6xl1DT7kJf+c0MHOrUS6AG+VQoQWMCJtk/d0wzSg=; b=AMI5pf7FGcWbYJGlcwLy8zGCBY x6SvFEu8lV8X4leCfG8EjMKoYMUoXPS018KJnMcPrs+HaowTgoIYmJwFlGXiAYXyHl+rR6sUDSmb4 qsy13Xb0rrf1Sgldl3kaPqlzn; Received: from mobile-166-176-186-121.mycingular.net ([166.176.186.121]:24873 helo=Willow) by host12.webserveralpha.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1drVUj-0008Pl-Qt; Mon, 11 Sep 2017 16:39:50 -0400 From: "Daryl McDaniel \(EDK2 Lists\)" To: "'Palmer, Thomas'" , "'Carsey, Jaben'" , References: <1502404487-12865-1-git-send-email-thomas.palmer@hpe.com> In-Reply-To: Date: Mon, 11 Sep 2017 13:39:48 -0700 Organization: Micronetics Message-ID: <074401d32b3e$1d6bd810$58438830$@mc2research.org> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQHHUFaOIeCifF7juXgXJ1gsGC6fvwF0qqWvAe8Geg+irLwYYA== X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host12.webserveralpha.com X-AntiAbuse: Original Domain - lists.01.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - mc2research.org X-Get-Message-Sender-Via: host12.webserveralpha.com: authenticated_id: darylm@mc2research.com X-Authenticated-Sender: host12.webserveralpha.com: darylm@mc2research.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PATCH 1/1] StdLib/EfiSocketLib: Fix ABI mismatch for 2 event functions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2017 20:36:56 -0000 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: en-us Thomas, I'll take a look at this. Have you determined what the impact of changing the signature of the functions (adding/removing parameters) will be? Can it adversely affect existing code? Sincerely, Daryl McDaniel > -----Original Message----- > From: Palmer, Thomas [mailto:thomas.palmer@hpe.com] > Sent: Monday, September 11, 2017 12:35 PM > To: Carsey, Jaben ; edk2-devel@lists.01.org; edk2- > lists@mc2research.org > Cc: edk2-lists@mc2research.org; Shifflett, Joseph > Subject: RE: [PATCH 1/1] StdLib/EfiSocketLib: Fix ABI mismatch for 2 event > functions > > Daryl? > > I haven't seen a comment on this patch since 8/10 > > > Regards, > > Thomas Palmer > > "I have only made this letter longer because I have not had the time to make it > shorter" - Blaise Pascal > > > -----Original Message----- > From: Carsey, Jaben [mailto:jaben.carsey@intel.com] > Sent: Thursday, August 10, 2017 5:59 PM > To: Palmer, Thomas ; edk2-devel@lists.01.org > Cc: edk2-lists@mc2research.org; Shifflett, Joseph > Subject: RE: [PATCH 1/1] StdLib/EfiSocketLib: Fix ABI mismatch for 2 event > functions > > Looks good to me. > > Daryl? > > > -----Original Message----- > > From: Thomas Palmer [mailto:thomas.palmer@hpe.com] > > Sent: Thursday, August 10, 2017 3:35 PM > > To: edk2-devel@lists.01.org > > Cc: edk2-lists@mc2research.org; Carsey, Jaben > > ; joseph.shifflett@hpe.com; Thomas Palmer > > > > Subject: [PATCH 1/1] StdLib/EfiSocketLib: Fix ABI mismatch for 2 event > > functions > > Importance: High > > > > The gBS->CreateEvent expects a EFI_EVENT_NOTIFY function as the third > > argument. The EFIAPI token is an important component of that > > prototype. Its absence can cause unexpected issues on DEBUG systems > > built with GCC due to ABI mismatches. > > > > Both EslTcp4ConnectComplete and EslTcp6ConnectComplete did not have > > the EFIAPI token required of a EFI_EVENT_NOTIFY function. GCC did not > > catch this because of the explicit EFI_EVENT_NOTIFY cast. By removing > > the cast, a build error ensues. > > > > This patch removes the cast and updates both functions to comply with > > EFI_EVENT_NOTIFY. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Thomas Palmer > > --- > > StdLib/EfiSocketLib/Tcp4.c | 8 ++++++-- StdLib/EfiSocketLib/Tcp6.c | > > 8 ++++++-- > > 2 files changed, 12 insertions(+), 4 deletions(-) > > > > diff --git a/StdLib/EfiSocketLib/Tcp4.c b/StdLib/EfiSocketLib/Tcp4.c > > index 68477fba6e70..8125a8d4f5ad 100644 > > --- a/StdLib/EfiSocketLib/Tcp4.c > > +++ b/StdLib/EfiSocketLib/Tcp4.c > > @@ -2,6 +2,7 @@ > > Implement the TCP4 driver support for the socket layer. > > > > Copyright (c) 2011 - 2015, Intel Corporation. All rights > > reserved.
> > + (C) Copyright 2017 Hewlett Packard Enterprise Development LP
> > This program and the accompanying materials are licensed and made > > available > > under the terms and conditions of the BSD License which accompanies this > > distribution. The full text of the license may be found at @@ > > -192,9 +193,10 @@ EslTcp4Accept ( > > > > **/ > > VOID > > +EFIAPI > > EslTcp4ConnectComplete ( > > IN EFI_EVENT Event, > > - IN ESL_PORT * pPort > > + IN VOID *Context > > ) > > { > > BOOLEAN bRemoveFirstPort; > > @@ -203,12 +205,14 @@ EslTcp4ConnectComplete ( > > ESL_SOCKET * pSocket; > > ESL_TCP4_CONTEXT * pTcp4; > > EFI_STATUS Status; > > + ESL_PORT * pPort; > > > > DBG_ENTER ( ); > > > > // > > // Locate the TCP context > > // > > + pPort = Context; > > pSocket = pPort->pSocket; > > pTcp4 = &pPort->Context.Tcp4; > > > > @@ -1288,7 +1292,7 @@ EslTcp4PortAllocate ( > > // > > Status = gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, > > TPL_SOCKETS, > > - (EFI_EVENT_NOTIFY)EslTcp4ConnectComplete, > > + EslTcp4ConnectComplete, > > pPort, > > &pTcp4->ConnectToken.CompletionToken.Event); > > if ( EFI_ERROR ( Status )) { > > diff --git a/StdLib/EfiSocketLib/Tcp6.c b/StdLib/EfiSocketLib/Tcp6.c > > index 0f6d2d6ac93c..9f9c00f6dc57 100644 > > --- a/StdLib/EfiSocketLib/Tcp6.c > > +++ b/StdLib/EfiSocketLib/Tcp6.c > > @@ -2,6 +2,7 @@ > > Implement the TCP6 driver support for the socket layer. > > > > Copyright (c) 2011 - 2014, Intel Corporation. All rights > > reserved.
> > + (C) Copyright 2017 Hewlett Packard Enterprise Development LP
> > This program and the accompanying materials are licensed and made > > available > > under the terms and conditions of the BSD License which accompanies this > > distribution. The full text of the license may be found at @@ > > -186,9 +187,10 @@ EslTcp6Accept ( > > > > **/ > > VOID > > +EFIAPI > > EslTcp6ConnectComplete ( > > IN EFI_EVENT Event, > > - IN ESL_PORT * pPort > > + IN VOID *Context > > ) > > { > > BOOLEAN bRemoveFirstPort; > > @@ -197,12 +199,14 @@ EslTcp6ConnectComplete ( > > ESL_SOCKET * pSocket; > > ESL_TCP6_CONTEXT * pTcp6; > > EFI_STATUS Status; > > + ESL_PORT * pPort; > > > > DBG_ENTER ( ); > > > > // > > // Locate the TCP context > > // > > + pPort = Context; > > pSocket = pPort->pSocket; > > pTcp6 = &pPort->Context.Tcp6; > > > > @@ -1339,7 +1343,7 @@ EslTcp6PortAllocate ( > > // > > Status = gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, > > TPL_SOCKETS, > > - (EFI_EVENT_NOTIFY)EslTcp6ConnectComplete, > > + EslTcp6ConnectComplete, > > pPort, > > &pTcp6->ConnectToken.CompletionToken.Event); > > if ( EFI_ERROR ( Status )) { > > -- > > 2.7.4