Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK

2020-04-20 Thread Laszlo Ersek
On 04/16/20 18:12, Andrew Fish wrote: > Laszlo, > > This is "way back" but UNDI was defined in the Preboot Execution Environment > (PXE) Specification. I think version 2.1 was the last one in and it was > released in 1999. The how to do it in EFI ended up in the EFI spec. > > PXE was a PC

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Prevent invalid PCI BAR access

2020-04-17 Thread Maciej Rabeda
] [PATCH v1 1/1] NetworkPkg/SnpDxe: Prevent invalid PCI BAR access From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1563 SnpDxe initializes values for MemoryBarIndex and IoBarIndex to 0 and 1 respectively even if calls to PciIo->GetBarAttributes never return success. La

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/Ip6Dxe: Validate source data record length

2020-04-17 Thread Maciej Rabeda
Reviewed-by: Maciej Rabeda On 09-Apr-20 10:22, Siyuan, Fu wrote: Reviewed-by: Siyuan Fu -Original Message- From: michael.kuba...@outlook.com Sent: 2020年4月8日 13:47 To: devel@edk2.groups.io Cc: Fu, Siyuan ; Maciej Rabeda ; Wu, Jiaxin Subject: [PATCH v1 1/1] NetworkPkg/Ip6Dxe:

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Prevent invalid PCI BAR access

2020-04-16 Thread Siyuan, Fu
Reviewed-by: Siyuan Fu > -Original Message- > From: devel@edk2.groups.io On Behalf Of Michael > Kubacki > Sent: 2020年4月9日 11:02 > To: devel@edk2.groups.io > Cc: Fu, Siyuan ; Maciej Rabeda > ; Wu, Jiaxin > Subject: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: P

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK

2020-04-16 Thread Andrew Fish via groups.io
> On Apr 15, 2020, at 9:25 AM, Laszlo Ersek wrote: > > On 04/15/20 11:45, Rabeda, Maciej wrote: >> Siyuan, Jiaxin, Laszlo, >> >> It would be great to hear especially your opinion on the matter before >> decisions take place :) > > My understanding is that UNDI is yet another (historica?l)

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK

2020-04-16 Thread Maciej Rabeda
Laszlo, Thanks for the very thorough analysis - this is why I have called you out specifically :) I will file a bug against SnpDxe EBS for bookkeeping. Might end up as "won't fix" or "invalid", but a bit more time has to be spent to address it correctly. Michael, For your patch.

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK

2020-04-15 Thread Laszlo Ersek
On 04/15/20 18:25, Laszlo Ersek wrote: > In other words, I personally believe that bug#1974 should have been > closed as INVALID (without patching the edk2 source). The EBS handler in > SnpDxe is necessary (as long as it does not alter the UEFI memory map > itself), because sending the Shutdown

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK

2020-04-15 Thread Laszlo Ersek
On 04/15/20 11:45, Rabeda, Maciej wrote: > Siyuan, Jiaxin, Laszlo, > > It would be great to hear especially your opinion on the matter before > decisions take place :) My understanding is that UNDI is yet another (historica?l) NIC interface specification. I've failed to find a download location

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK

2020-04-15 Thread Maciej Rabeda
Siyuan, Jiaxin, Laszlo, It would be great to hear especially your opinion on the matter before decisions take place :) On 14-Apr-20 19:08, Michael Kubacki wrote: Hi Maciej, Thank you for summarizing the background. I would like to get others feedback as well. If the EBS notification is

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK

2020-04-14 Thread Michael Kubacki
Hi Maciej, Thank you for summarizing the background. I would like to get others feedback as well. If the EBS notification is kept, I'd like to request this patch be included in edk2-stable202005. Thanks, Michael On 4/14/2020 2:59 AM, Rabeda, Maciej wrote: Hi Michael, Some time ago we have

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK

2020-04-14 Thread Maciej Rabeda
Hi Michael, Some time ago we have introduced a patch in ExitBootServices (EBS) area for SnpDxe to allow for EBS event creation control. Commit: https://github.com/tianocore/edk2/commit/61bb6eeb4d93c0a34c1995d87914ab41398f9550 Patch: https://edk2.groups.io/g/devel/message/48899 Ideally, at

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg

2020-04-11 Thread Siyuan, Fu
Fu, Siyuan ; Wu, Jiaxin > Subject: [edk2-devel] [PATCH v1 1/1] NetworkPkg > > Add RISCV64 Arch. > > Signed-off-by: Abner Chang > Co-authored-by: Gilbert Chen > Reviewed-by: Leif Lindholm > > Cc: Siyuan Fu > Cc: Jiaxin Wu > Cc: Leif Lindholm > Cc: Gilbert

[edk2-devel] [PATCH v1 1/1] NetworkPkg

2020-04-10 Thread Abner Chang
Add RISCV64 Arch. Signed-off-by: Abner Chang Co-authored-by: Gilbert Chen Reviewed-by: Leif Lindholm Cc: Siyuan Fu Cc: Jiaxin Wu Cc: Leif Lindholm Cc: Gilbert Chen --- NetworkPkg/Network.dsc.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK

2020-04-09 Thread Michael Kubacki
From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1562 The current SnpDxe implementation registers its ExitBootServices event notification function (SnpNotifyExitBootServices ()) at TPL_NOTIFY. This function calls PxeShutdown() which issues an UNDI shutdown operation.

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/Ip6Dxe: Validate source data record length

2020-04-09 Thread Siyuan, Fu
Reviewed-by: Siyuan Fu > -Original Message- > From: michael.kuba...@outlook.com > Sent: 2020年4月8日 13:47 > To: devel@edk2.groups.io > Cc: Fu, Siyuan ; Maciej Rabeda > ; Wu, Jiaxin > Subject: [PATCH v1 1/1] NetworkPkg/Ip6Dxe: Validate source data record > length > > From: Michael

[edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Prevent invalid PCI BAR access

2020-04-08 Thread Michael Kubacki
From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1563 SnpDxe initializes values for MemoryBarIndex and IoBarIndex to 0 and 1 respectively even if calls to PciIo->GetBarAttributes never return success. Later, if the BAR is used to perform IO/Mem reads/writes, a

[edk2-devel] [PATCH v1 1/1] NetworkPkg/Ip6Dxe: Validate source data record length

2020-04-07 Thread Michael Kubacki
From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2273 Ip6ConfigReadConfigData() reads configuration data from a UEFI variable and copies the data to another buffer. This change checks that the length of the data record being copied does not exceed the size of the source

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg: Fixes to static code analysis hits

2019-11-28 Thread Wu, Jiaxin
Reviewed-by: Jiaxin Wu > -Original Message- > From: devel@edk2.groups.io On Behalf Of Maciej > Rabeda > Sent: Thursday, November 28, 2019 10:46 PM > To: devel@edk2.groups.io > Cc: Wu, Jiaxin ; Fu, Siyuan > Subject: [edk2-devel] [PATCH v1 1/1] NetworkPkg:

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg: Fixes to static code analysis hits

2019-11-28 Thread Siyuan, Fu
Reviewed-by: Siyuan Fu > -Original Message- > From: Maciej Rabeda > Sent: 2019年11月28日 22:46 > To: devel@edk2.groups.io > Cc: Wu, Jiaxin ; Fu, Siyuan > Subject: [PATCH v1 1/1] NetworkPkg: Fixes to static code analysis hits > > Introducing fixes to memory leak issues identified by

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg: Fixes to static code analysis hits

2019-11-28 Thread Philippe Mathieu-Daudé
On 11/28/19 3:46 PM, Maciej Rabeda via Groups.Io wrote: Introducing fixes to memory leak issues identified by static code analysis tool. Cc: Jiaxin Wu Cc: Siyuan Fu Signed-off-by: Maciej Rabeda --- NetworkPkg/Dhcp6Dxe/Dhcp6Io.c | 1 + NetworkPkg/Ip4Dxe/Ip4If.c | 6 +-

[edk2-devel] [PATCH v1 1/1] NetworkPkg: Fixes to static code analysis hits

2019-11-28 Thread Maciej Rabeda
Introducing fixes to memory leak issues identified by static code analysis tool. Cc: Jiaxin Wu Cc: Siyuan Fu Signed-off-by: Maciej Rabeda --- NetworkPkg/Dhcp6Dxe/Dhcp6Io.c | 1 + NetworkPkg/Ip4Dxe/Ip4If.c | 6 +- NetworkPkg/TcpDxe/TcpDispatcher.c | 1 + 3 files changed, 7

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-11 Thread Rabeda, Maciej
Cc: Wu, Jiaxin Subject: Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event On 10/11/19 02:14, Fu, Siyuan wrote: >> -Original Message- >> From: Laszlo Ersek >> Sent: 2019年10月11日 0:06 >> To: Fu, Siyuan ; devel@edk2.groups.io; Rabed

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-11 Thread Laszlo Ersek
On 10/11/19 02:14, Fu, Siyuan wrote: >> -Original Message- >> From: Laszlo Ersek >> Sent: 2019年10月11日 0:06 >> To: Fu, Siyuan ; devel@edk2.groups.io; Rabeda, >> Maciej >> Cc: Wu, Jiaxin >> Subject: Re: [edk2-devel] [PATCH v1 1/1] NetworkPk

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-10 Thread Siyuan, Fu
> -Original Message- > From: Laszlo Ersek > Sent: 2019年10月11日 0:06 > To: Fu, Siyuan ; devel@edk2.groups.io; Rabeda, > Maciej > Cc: Wu, Jiaxin > Subject: Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove > ExitBootServices event > > On 10

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-10 Thread Laszlo Ersek
On 10/10/19 11:29, Fu, Siyuan wrote: >> -Original Message- >> From: Laszlo Ersek >> Sent: 2019年10月10日 16:06 >> To: Fu, Siyuan ; devel@edk2.groups.io; Rabeda, >> Maciej >> Cc: Wu, Jiaxin >> Subject: Re: [edk2-devel] [PATCH v1 1/1] NetworkPk

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-10 Thread Siyuan, Fu
> -Original Message- > From: Laszlo Ersek > Sent: 2019年10月10日 16:06 > To: Fu, Siyuan ; devel@edk2.groups.io; Rabeda, > Maciej > Cc: Wu, Jiaxin > Subject: Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove > ExitBootServices event > > On 10/10/19 0

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-10 Thread Laszlo Ersek
correct the Bugzilla number in patch description as Laszlo pointed > out. > > Thanks. > > Best Regards > Siyuan > >> -Original Message- >> From: devel@edk2.groups.io On Behalf Of Laszlo >> Ersek >> Sent: 2019年10月10日 6:10 >> To: devel@edk2.gro

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-09 Thread Siyuan, Fu
ject: Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove > ExitBootServices event > > On 10/08/19 18:16, Rabeda, Maciej wrote: > > Patch addresses Bugzilla #1972. > > I think the BZ reference should be > <https://bugzilla.tianocore.org/show_bug.cgi?id=1974&

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-09 Thread Laszlo Ersek
On 10/08/19 18:16, Rabeda, Maciej wrote: > Patch addresses Bugzilla #1972. I think the BZ reference should be . (The cover letter has it right.) Thanks Laszlo > During ExitBootServices stage, drivers should not call any > functions known to

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-09 Thread Tomas Pilar (tpilar)
and signposted so others can audit their drivers. Cheers, Tom From: devel@edk2.groups.io on behalf of Rabeda, Maciej Sent: 09 October 2019 09:50 To: Fu, Siyuan; Devel EDK2 Cc: Wu, Jiaxin Subject: Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-09 Thread Rabeda, Maciej
Hi Siyuan, This change has no effect to Intel Ethernet Server UNDI drivers. They already handle ExitBootServices event and configure the Ethernet adapters not to perform any DMA at this point. As per whitepaper

Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-08 Thread Siyuan, Fu
Hi, Maciej Have you tested what will happen if this SNP co-work with those UNDI drivers which don't have an ExitBootService event callback to shut down its DMA activity? And what's the impact to OS if UNDI's DMA is not shut down? Best Regards Siyuan > -Original Message- > From:

[edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Remove ExitBootServices event

2019-10-08 Thread Rabeda, Maciej
Patch addresses Bugzilla #1972. During ExitBootServices stage, drivers should not call any functions known to use Memory Allocation Services. One of such functions (as per UEFI spec) is UNDI->Shutdown(). Since UNDI drivers during ExitBootServices phase are expected to put the adapter to such a