From nobody Wed May 15 17:11:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+108056+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108056+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1693218703; cv=none; d=zohomail.com; s=zohoarc; b=dRZPrTWIbiWIEvNh/fsgCzjBJj/5bGEU/Yfzkql26Ek5DCwlR2JP9eDSsX/mWnGN/KtMKlwa4vp/wudEgFeQMRWqfT2APu/HciKdL7MbUNTXERnatK1F42t4T3XFEoX/Mpg/0g75EAIvIvctYwjIjQRDrnApWIrSnKyE8SSz9Bk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693218703; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=jB3aPSzw0mnsUYSN6CwynWtiddA6i1xI7g8tyn+UudQ=; b=TWRxse251DDQMcRB4JjBY/dzo1ZBZx3Ny3IgnStfD8y6nFq9pu6kzGwiyg4+GtzovNNeYBTQB6QrBoFXRgQabJKqKXceE4d2axtEfzfBZiMDRa+ZArW2iJRW5WR2IAjdL/wnOf2ErQ5o2G2UAgqr9rnUQVFznWbowGbk7V4JdYs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108056+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1693218703612601.7379600811342; Mon, 28 Aug 2023 03:31:43 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=O9PDpt+T1xIh2qDDr4hJ9CgZN1LFy+G4/Z9e+ujOnjc=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1693218703; v=1; b=aHl8YLvOCfCtQhLb2P5g0KS/v/Ql8jYv4ihdHK3oqjgp9zw2eLMzxcopnFgzsQsSuW8HcfHn BL2+uddihvc0KtoMnwhfZgZF9t5gloMbSGI74Lu4RLyKXOrMycGBek4lg2n2w+VJTtSVwWRR2E0 X6+EIpi0CrcBJdJNsShYVNv8= X-Received: by 127.0.0.2 with SMTP id 3AS1YY1788612xQytEUBja9i; Mon, 28 Aug 2023 03:31:43 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.10383.1693218698784023730 for ; Mon, 28 Aug 2023 03:31:42 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10815"; a="360065518" X-IronPort-AV: E=Sophos;i="6.02,207,1688454000"; d="scan'208";a="360065518" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2023 03:31:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10815"; a="912008104" X-IronPort-AV: E=Sophos;i="6.02,207,1688454000"; d="scan'208";a="912008104" X-Received: from njayapra-mobl.gar.corp.intel.com ([10.213.82.210]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2023 03:31:40 -0700 From: "Jayaprakash, N" To: devel@edk2.groups.io Cc: Jayaprakash N , Rebecca Cran , Michael D Kinney , Dimitry Kloper Subject: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc: Socket completion functions are not called on Linux Compilation Date: Mon, 28 Aug 2023 16:01:06 +0530 Message-Id: <20230828103106.1624-2-n.jayaprakash@intel.com> In-Reply-To: <20230828103106.1624-1-n.jayaprakash@intel.com> References: <20230828103106.1624-1-n.jayaprakash@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,n.jayaprakash@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ND5Ef3h9FEDEU50Ba1PslGOUx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1693218705004100007 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D983 From the bug description: Analysis and root cause ---------------------------- After some investigation and debugging I have figured out the following: The following function is implemented in file edk2/StdLib/EfiSocketLib/Tcp= 4.c VOID EslTcp4ListenComplete ( IN EFI_EVENT Event, IN ESL_PORT * pPort ); The function is used in EslTcp4Listen() as a callback for connection notification event, it is created by the following code: Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_SOCKETS, (EFI_EVENT_NOTIFY)EslTcp4ListenComplete, pPort, &pTcp4->ListenToken.CompletionToken.Event ); And this is actually introduces a bug: the CreateEvent() third parameter is= of type EFI_EVENT_NOTIFY which is defined as typedef VOID (EFIAPI *EFI_EVENT_NOTIFY) ( IN EFI_EVENT Event, IN VOID *Context ); That EFIAPI tag is important since it defines an ABI that is used by compil= er in order to call the callback function. Note that EslTcp4ListenComplete() is not marked as EFIAPI. Thus, on Linux, where gcc defaults to SYSV ABI, there will be mismatch betw= een arguments passed to EslTcp4ListenComplete() by the event dispatcher. It exp= ects function with WIN64 ABI, while its code compiled with default SYSV ABI. It = will look in wrong registers for arguments. Specifically pPort pointer references an wrong memory location. Luckily EslTcp4ListenComplete() performs sanity check of the pPort structure and discovers that it is invalid. This causes discarding of all incoming connections. Proposed fix --------------- The fix is trivial - mark EslTcp4ListenComplete() as EFIAPI. This is a litt= le more complicated, since there are additional callback functions that suffer from the same problem. In addition fixing those causes some compiler warnin= gs that shall be addressed. Attached patch fixes the problem for me. Cc: Rebecca Cran Cc: Michael D Kinney Cc: Jayaprakash N Signed-off-by: Dimitry Kloper --- StdLib/EfiSocketLib/Ip4.c | 11 +++++++---- StdLib/EfiSocketLib/Socket.c | 5 +++-- StdLib/EfiSocketLib/Socket.h | 12 ++++++------ StdLib/EfiSocketLib/Tcp4.c | 35 ++++++++++++++++++++--------------- StdLib/EfiSocketLib/Tcp6.c | 35 ++++++++++++++++++++--------------- StdLib/EfiSocketLib/Udp4.c | 10 ++++++---- StdLib/EfiSocketLib/Udp6.c | 10 ++++++---- 7 files changed, 68 insertions(+), 50 deletions(-) diff --git a/StdLib/EfiSocketLib/Ip4.c b/StdLib/EfiSocketLib/Ip4.c index 4b8f05b..8d25537 100644 --- a/StdLib/EfiSocketLib/Ip4.c +++ b/StdLib/EfiSocketLib/Ip4.c @@ -588,16 +588,17 @@ EslIp4RemoteAddressSet ( @param [in] pIo The address of an ::ESL_IO_MGMT structure =20 **/ -VOID +VOID EFIAPI EslIp4RxComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { size_t LengthInBytes; ESL_PACKET * pPacket; EFI_IP4_RECEIVE_DATA * pRxData; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT *)context; =20 DBG_ENTER ( ); =20 @@ -1117,10 +1118,10 @@ EslIp4TxBuffer ( @param [in] pIo The address of an ::ESL_IO_MGMT structure =20 **/ -VOID +VOID EFIAPI EslIp4TxComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { UINT32 LengthInBytes; @@ -1128,6 +1129,7 @@ EslIp4TxComplete ( ESL_PACKET * pPacket; ESL_SOCKET * pSocket; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 @@ -1341,6 +1343,7 @@ CONST ESL_PROTOCOL_API cEslIp4Api =3D { OFFSET_OF ( ESL_PORT, Context.Ip4.ModeData.ConfigData ), OFFSET_OF ( ESL_LAYER, pIp4List ), OFFSET_OF ( struct sockaddr_in, sin_zero ), + sizeof ( struct sockaddr_in ), AF_INET, sizeof (((ESL_PACKET *)0 )->Op.Ip4Rx ), diff --git a/StdLib/EfiSocketLib/Socket.c b/StdLib/EfiSocketLib/Socket.c index 59b8efa..ee15b62 100644 --- a/StdLib/EfiSocketLib/Socket.c +++ b/StdLib/EfiSocketLib/Socket.c @@ -3970,14 +3970,15 @@ EslSocketPortClose ( @param[in] Event The close completion event @param[in] pPort Address of an ::ESL_PORT structure. **/ -VOID +VOID EFIAPI EslSocketPortCloseComplete ( IN EFI_EVENT Event, - IN ESL_PORT * pPort + IN VOID *context ) { ESL_IO_MGMT * pIo; EFI_STATUS Status; + ESL_PORT * pPort =3D (ESL_PORT*) context; =20 DBG_ENTER ( ); VERIFY_AT_TPL ( TPL_SOCKETS ); diff --git a/StdLib/EfiSocketLib/Socket.h b/StdLib/EfiSocketLib/Socket.h index d7d55e6..81d3b2c 100644 --- a/StdLib/EfiSocketLib/Socket.h +++ b/StdLib/EfiSocketLib/Socket.h @@ -591,9 +591,9 @@ EFI_STATUS **/ typedef VOID -(* PFN_API_IO_COMPLETE) ( +(EFIAPI * PFN_API_IO_COMPLETE) ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *pIo //IN ESL_IO_MGMT * pIo ); =20 /** @@ -909,9 +909,9 @@ EFI_STATUS **/ typedef VOID -(* PFN_API_TX_COMPLETE) ( +(EFIAPI * PFN_API_TX_COMPLETE) ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *pIo //IN ESL_IO_MGMT * pIo ); =20 /** @@ -1433,10 +1433,10 @@ EslSocketPortClose ( @param [in] pPort Address of an ::ESL_PORT structure. =20 **/ -VOID +VOID EFIAPI EslSocketPortCloseComplete ( IN EFI_EVENT Event, - IN ESL_PORT * pPort + IN VOID *context ); =20 /** diff --git a/StdLib/EfiSocketLib/Tcp4.c b/StdLib/EfiSocketLib/Tcp4.c index 143b54b..0bd54ac 100644 --- a/StdLib/EfiSocketLib/Tcp4.c +++ b/StdLib/EfiSocketLib/Tcp4.c @@ -68,10 +68,10 @@ EslTcp4ConnectStart ( @param [in] pPort Address of an ::ESL_PORT structure. =20 **/ -VOID +VOID EFIAPI EslTcp4ListenComplete ( IN EFI_EVENT Event, - IN ESL_PORT * pPort + IN VOID *contet ); =20 =20 @@ -185,10 +185,10 @@ EslTcp4Accept ( @param [in] pPort Address of an ::ESL_PORT structure. =20 **/ -VOID +VOID EFIAPI EslTcp4ConnectComplete ( IN EFI_EVENT Event, - IN ESL_PORT * pPort + IN VOID *context ) { BOOLEAN bRemoveFirstPort; @@ -197,6 +197,7 @@ EslTcp4ConnectComplete ( ESL_SOCKET * pSocket; ESL_TCP4_CONTEXT * pTcp4; EFI_STATUS Status; + ESL_PORT * pPort =3D (ESL_PORT*)context; =20 DBG_ENTER ( ); =20 @@ -653,7 +654,7 @@ EslTcp4Listen ( pTcp4 =3D &pPort->Context.Tcp4; Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_SOCKETS, - (EFI_EVENT_NOTIFY)EslTcp4ListenComplet= e, + EslTcp4ListenComplete, pPort, &pTcp4->ListenToken.CompletionToken.Ev= ent ); if ( EFI_ERROR ( Status )) { @@ -825,10 +826,10 @@ EslTcp4Listen ( @param [in] pPort Address of an ::ESL_PORT structure. =20 **/ -VOID +VOID EFIAPI EslTcp4ListenComplete ( IN EFI_EVENT Event, - IN ESL_PORT * pPort + IN VOID *context ) { EFI_HANDLE ChildHandle; @@ -842,6 +843,7 @@ EslTcp4ListenComplete ( EFI_STATUS Status; EFI_HANDLE TcpPortHandle; EFI_STATUS TempStatus; + ESL_PORT * pPort =3D (ESL_PORT*)context; =20 DBG_ENTER ( ); VERIFY_AT_TPL ( TPL_SOCKETS ); @@ -1263,7 +1265,7 @@ EslTcp4PortAllocate ( pTcp4 =3D &pPort->Context.Tcp4; Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_SOCKETS, - (EFI_EVENT_NOTIFY)EslSocketPortCloseCompl= ete, + EslSocketPortCloseComplete, pPort, &pTcp4->CloseToken.CompletionToken.Event); if ( EFI_ERROR ( Status )) { @@ -1282,7 +1284,7 @@ EslTcp4PortAllocate ( // Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_SOCKETS, - (EFI_EVENT_NOTIFY)EslTcp4ConnectComplete, + EslTcp4ConnectComplete, pPort, &pTcp4->ConnectToken.CompletionToken.Even= t); if ( EFI_ERROR ( Status )) { @@ -1732,16 +1734,17 @@ EslTcp4RemoteAddressSet ( @param [in] pIo Address of an ::ESL_IO_MGMT structure =20 **/ -VOID +VOID EFIAPI EslTcp4RxComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { BOOLEAN bUrgent; size_t LengthInBytes; ESL_PACKET * pPacket; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 @@ -2121,10 +2124,10 @@ EslTcp4TxBuffer ( @param [in] pIo The ESL_IO_MGMT structure address =20 **/ -VOID +VOID EFIAPI EslTcp4TxComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { UINT32 LengthInBytes; @@ -2132,6 +2135,7 @@ EslTcp4TxComplete ( ESL_PORT * pPort; ESL_SOCKET * pSocket; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 @@ -2178,10 +2182,10 @@ EslTcp4TxComplete ( @param [in] pIo The ESL_IO_MGMT structure address =20 **/ -VOID +VOID EFIAPI EslTcp4TxOobComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { UINT32 LengthInBytes; @@ -2189,6 +2193,7 @@ EslTcp4TxOobComplete ( ESL_PORT * pPort; ESL_SOCKET * pSocket; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 diff --git a/StdLib/EfiSocketLib/Tcp6.c b/StdLib/EfiSocketLib/Tcp6.c index 2014298..62ebf00 100644 --- a/StdLib/EfiSocketLib/Tcp6.c +++ b/StdLib/EfiSocketLib/Tcp6.c @@ -68,10 +68,10 @@ EslTcp6ConnectStart ( @param [in] pPort Address of an ::ESL_PORT structure. =20 **/ -VOID +VOID EFIAPI EslTcp6ListenComplete ( IN EFI_EVENT Event, - IN ESL_PORT * pPort + IN VOID *pPort // IN ESL_PORT * pPort ); =20 =20 @@ -179,10 +179,10 @@ EslTcp6Accept ( @param [in] pPort Address of an ::ESL_PORT structure. =20 **/ -VOID +VOID EFIAPI EslTcp6ConnectComplete ( IN EFI_EVENT Event, - IN ESL_PORT * pPort + IN VOID *context ) { BOOLEAN bRemoveFirstPort; @@ -191,6 +191,7 @@ EslTcp6ConnectComplete ( ESL_SOCKET * pSocket; ESL_TCP6_CONTEXT * pTcp6; EFI_STATUS Status; + ESL_PORT * pPort =3D (ESL_PORT*)context; =20 DBG_ENTER ( ); =20 @@ -684,7 +685,7 @@ EslTcp6Listen ( pTcp6 =3D &pPort->Context.Tcp6; Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_SOCKETS, - (EFI_EVENT_NOTIFY)EslTcp6ListenComplet= e, + EslTcp6ListenComplete, pPort, &pTcp6->ListenToken.CompletionToken.Ev= ent ); if ( EFI_ERROR ( Status )) { @@ -856,10 +857,10 @@ EslTcp6Listen ( @param [in] pPort Address of an ::ESL_PORT structure. =20 **/ -VOID +VOID EFIAPI EslTcp6ListenComplete ( IN EFI_EVENT Event, - IN ESL_PORT * pPort + IN VOID *context ) { EFI_HANDLE ChildHandle; @@ -873,6 +874,7 @@ EslTcp6ListenComplete ( EFI_STATUS Status; EFI_HANDLE TcpPortHandle; EFI_STATUS TempStatus; + ESL_PORT * pPort =3D (ESL_PORT*)context; =20 DBG_ENTER ( ); VERIFY_AT_TPL ( TPL_SOCKETS ); @@ -1314,7 +1316,7 @@ EslTcp6PortAllocate ( pTcp6 =3D &pPort->Context.Tcp6; Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_SOCKETS, - (EFI_EVENT_NOTIFY)EslSocketPortCloseCompl= ete, + EslSocketPortCloseComplete, pPort, &pTcp6->CloseToken.CompletionToken.Event); if ( EFI_ERROR ( Status )) { @@ -1333,7 +1335,7 @@ EslTcp6PortAllocate ( // Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_SOCKETS, - (EFI_EVENT_NOTIFY)EslTcp6ConnectComplete, + EslTcp6ConnectComplete, pPort, &pTcp6->ConnectToken.CompletionToken.Even= t); if ( EFI_ERROR ( Status )) { @@ -1801,16 +1803,17 @@ EslTcp6RemoteAddressSet ( @param [in] pIo Address of an ::ESL_IO_MGMT structure =20 **/ -VOID +VOID EFIAPI EslTcp6RxComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { BOOLEAN bUrgent; size_t LengthInBytes; ESL_PACKET * pPacket; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 @@ -2190,10 +2193,10 @@ EslTcp6TxBuffer ( @param [in] pIo The ESL_IO_MGMT structure address =20 **/ -VOID +VOID EFIAPI EslTcp6TxComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { UINT32 LengthInBytes; @@ -2201,6 +2204,7 @@ EslTcp6TxComplete ( ESL_PORT * pPort; ESL_SOCKET * pSocket; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 @@ -2247,10 +2251,10 @@ EslTcp6TxComplete ( @param [in] pIo The ESL_IO_MGMT structure address =20 **/ -VOID +VOID EFIAPI EslTcp6TxOobComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { UINT32 LengthInBytes; @@ -2258,6 +2262,7 @@ EslTcp6TxOobComplete ( ESL_PORT * pPort; ESL_SOCKET * pSocket; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 diff --git a/StdLib/EfiSocketLib/Udp4.c b/StdLib/EfiSocketLib/Udp4.c index eafa014..ceaf3f4 100644 --- a/StdLib/EfiSocketLib/Udp4.c +++ b/StdLib/EfiSocketLib/Udp4.c @@ -484,16 +484,17 @@ EslUdp4RemoteAddressSet ( @param [in] pIo Address of an ::ESL_IO_MGMT structure =20 **/ -VOID +VOID EFIAPI EslUdp4RxComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { size_t LengthInBytes; ESL_PACKET * pPacket; EFI_UDP4_RECEIVE_DATA * pRxData; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 @@ -969,10 +970,10 @@ EslUdp4TxBuffer ( @param [in] pIo Address of an ::ESL_IO_MGMT structure =20 **/ -VOID +VOID EFIAPI EslUdp4TxComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { UINT32 LengthInBytes; @@ -980,6 +981,7 @@ EslUdp4TxComplete ( ESL_PACKET * pPacket; ESL_SOCKET * pSocket; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 diff --git a/StdLib/EfiSocketLib/Udp6.c b/StdLib/EfiSocketLib/Udp6.c index 67dbd32..dca55ec 100644 --- a/StdLib/EfiSocketLib/Udp6.c +++ b/StdLib/EfiSocketLib/Udp6.c @@ -478,16 +478,17 @@ EslUdp6RemoteAddressSet ( @param [in] pIo Address of an ::ESL_IO_MGMT structure =20 **/ -VOID +VOID EFIAPI EslUdp6RxComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { size_t LengthInBytes; ESL_PACKET * pPacket; EFI_UDP6_RECEIVE_DATA * pRxData; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 @@ -1021,10 +1022,10 @@ EslUdp6TxBuffer ( @param [in] pIo Address of an ::ESL_IO_MGMT structure =20 **/ -VOID +VOID EFIAPI EslUdp6TxComplete ( IN EFI_EVENT Event, - IN ESL_IO_MGMT * pIo + IN VOID *context ) { UINT32 LengthInBytes; @@ -1032,6 +1033,7 @@ EslUdp6TxComplete ( ESL_PACKET * pPacket; ESL_SOCKET * pSocket; EFI_STATUS Status; + ESL_IO_MGMT * pIo =3D (ESL_IO_MGMT*)context; =20 DBG_ENTER ( ); =20 --=20 2.40.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108056): https://edk2.groups.io/g/devel/message/108056 Mute This Topic: https://groups.io/mt/101006991/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-