public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName
@ 2022-08-17 14:35 Dimitrije Pavlov
  2022-08-17 20:44 ` Samer El-Haj-Mahmoud
  2022-08-19 14:46 ` Sunny Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Dimitrije Pavlov @ 2022-08-17 14:35 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Jiewen Yao, Liming Gao, Sunny Wang,
	Jeff Booher-Kaeding, Samer El-Haj-Mahmoud

Per the UEFI specification, a device driver implementation should return
EFI_UNSUPPORTED if the ChildHandle argument in
EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() is not NULL.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Sunny Wang <Sunny.Wang@arm.com>
Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>

Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>
---
 OvmfPkg/VirtioNetDxe/ComponentName.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/OvmfPkg/VirtioNetDxe/ComponentName.c b/OvmfPkg/VirtioNetDxe/ComponentName.c
index e340ca2f8fe4..718096630f6f 100644
--- a/OvmfPkg/VirtioNetDxe/ComponentName.c
+++ b/OvmfPkg/VirtioNetDxe/ComponentName.c
@@ -129,6 +129,13 @@ VirtioNetGetControllerName (
     return EFI_INVALID_PARAMETER;
   }
 
+  //
+  // This is a device driver, so ChildHandle must be NULL.
+  //
+  if (ChildHandle != NULL) {
+    return EFI_UNSUPPORTED;
+  }
+
   //
   // confirm that the device is managed by this driver, using the VirtIo
   // Protocol
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName
  2022-08-17 14:35 [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName Dimitrije Pavlov
@ 2022-08-17 20:44 ` Samer El-Haj-Mahmoud
  2022-08-19 14:46 ` Sunny Wang
  1 sibling, 0 replies; 5+ messages in thread
From: Samer El-Haj-Mahmoud @ 2022-08-17 20:44 UTC (permalink / raw)
  To: Dimitrije Pavlov, devel@edk2.groups.io
  Cc: Ard Biesheuvel, Jiewen Yao, Liming Gao, Sunny Wang,
	Jeff Booher-Kaeding, Samer El-Haj-Mahmoud

Reviewed-By: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>

> -----Original Message-----
> From: Dimitrije Pavlov <dimitrije.pavlov@arm.com>
> Sent: Wednesday, August 17, 2022 10:35 AM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao
> <jiewen.yao@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Sunny
> Wang <Sunny.Wang@arm.com>; Jeff Booher-Kaeding <Jeff.Booher-
> Kaeding@arm.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>
> Subject: [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in
> GetControllerName
>
> Per the UEFI specification, a device driver implementation should return
> EFI_UNSUPPORTED if the ChildHandle argument in
> EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() is not NULL.
>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Sunny Wang <Sunny.Wang@arm.com>
> Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
>
> Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>
> ---
>  OvmfPkg/VirtioNetDxe/ComponentName.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/OvmfPkg/VirtioNetDxe/ComponentName.c
> b/OvmfPkg/VirtioNetDxe/ComponentName.c
> index e340ca2f8fe4..718096630f6f 100644
> --- a/OvmfPkg/VirtioNetDxe/ComponentName.c
> +++ b/OvmfPkg/VirtioNetDxe/ComponentName.c
> @@ -129,6 +129,13 @@ VirtioNetGetControllerName (
>      return EFI_INVALID_PARAMETER;
>    }
>
> +  //
> +  // This is a device driver, so ChildHandle must be NULL.
> +  //
> +  if (ChildHandle != NULL) {
> +    return EFI_UNSUPPORTED;
> +  }
> +
>    //
>    // confirm that the device is managed by this driver, using the VirtIo
>    // Protocol
> --
> 2.37.2

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName
  2022-08-17 14:35 [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName Dimitrije Pavlov
  2022-08-17 20:44 ` Samer El-Haj-Mahmoud
@ 2022-08-19 14:46 ` Sunny Wang
  2022-09-28 13:32   ` Samer El-Haj-Mahmoud
  1 sibling, 1 reply; 5+ messages in thread
From: Sunny Wang @ 2022-08-19 14:46 UTC (permalink / raw)
  To: Dimitrije Pavlov, devel@edk2.groups.io
  Cc: Ard Biesheuvel, Jiewen Yao, Liming Gao, Jeff Booher-Kaeding,
	Samer El-Haj-Mahmoud, Sunny Wang

Looks good.
Reviewed-by: Sunny Wang <sunny.wang@arm.com>

-----Original Message-----
From: Dimitrije Pavlov <dimitrije.pavlov@arm.com>
Sent: 17 August 2022 15:35
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao <jiewen.yao@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Sunny Wang <Sunny.Wang@arm.com>; Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName

Per the UEFI specification, a device driver implementation should return
EFI_UNSUPPORTED if the ChildHandle argument in
EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() is not NULL.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Sunny Wang <Sunny.Wang@arm.com>
Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>

Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>
---
 OvmfPkg/VirtioNetDxe/ComponentName.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/OvmfPkg/VirtioNetDxe/ComponentName.c b/OvmfPkg/VirtioNetDxe/ComponentName.c
index e340ca2f8fe4..718096630f6f 100644
--- a/OvmfPkg/VirtioNetDxe/ComponentName.c
+++ b/OvmfPkg/VirtioNetDxe/ComponentName.c
@@ -129,6 +129,13 @@ VirtioNetGetControllerName (
     return EFI_INVALID_PARAMETER;
   }

+  //
+  // This is a device driver, so ChildHandle must be NULL.
+  //
+  if (ChildHandle != NULL) {
+    return EFI_UNSUPPORTED;
+  }
+
   //
   // confirm that the device is managed by this driver, using the VirtIo
   // Protocol
--
2.37.2

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName
  2022-08-19 14:46 ` Sunny Wang
@ 2022-09-28 13:32   ` Samer El-Haj-Mahmoud
  2022-10-10 10:18     ` [edk2-devel] " Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Samer El-Haj-Mahmoud @ 2022-09-28 13:32 UTC (permalink / raw)
  To: Sunny Wang, Dimitrije Pavlov, devel@edk2.groups.io
  Cc: Ard Biesheuvel, Jiewen Yao, Liming Gao, Jeff Booher-Kaeding,
	Samer El-Haj-Mahmoud

Hi Ard,

Any luck getting this one merged?

Thanks,
--Samer

> -----Original Message-----
> From: Sunny Wang <Sunny.Wang@arm.com>
> Sent: Friday, August 19, 2022 10:47 AM
> To: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>; devel@edk2.groups.io
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao
> <jiewen.yao@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Jeff
> Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>; Samer El-Haj-Mahmoud
> <Samer.El-Haj-Mahmoud@arm.com>; Sunny Wang <Sunny.Wang@arm.com>
> Subject: RE: [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument
> in GetControllerName
>
> Looks good.
> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
>
> -----Original Message-----
> From: Dimitrije Pavlov <dimitrije.pavlov@arm.com>
> Sent: 17 August 2022 15:35
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao
> <jiewen.yao@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Sunny
> Wang <Sunny.Wang@arm.com>; Jeff Booher-Kaeding <Jeff.Booher-
> Kaeding@arm.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>
> Subject: [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in
> GetControllerName
>
> Per the UEFI specification, a device driver implementation should return
> EFI_UNSUPPORTED if the ChildHandle argument in
> EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() is not NULL.
>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Sunny Wang <Sunny.Wang@arm.com>
> Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
>
> Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>
> ---
>  OvmfPkg/VirtioNetDxe/ComponentName.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/OvmfPkg/VirtioNetDxe/ComponentName.c
> b/OvmfPkg/VirtioNetDxe/ComponentName.c
> index e340ca2f8fe4..718096630f6f 100644
> --- a/OvmfPkg/VirtioNetDxe/ComponentName.c
> +++ b/OvmfPkg/VirtioNetDxe/ComponentName.c
> @@ -129,6 +129,13 @@ VirtioNetGetControllerName (
>      return EFI_INVALID_PARAMETER;
>    }
>
> +  //
> +  // This is a device driver, so ChildHandle must be NULL.
> +  //
> +  if (ChildHandle != NULL) {
> +    return EFI_UNSUPPORTED;
> +  }
> +
>    //
>    // confirm that the device is managed by this driver, using the VirtIo
>    // Protocol
> --
> 2.37.2
>

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName
  2022-09-28 13:32   ` Samer El-Haj-Mahmoud
@ 2022-10-10 10:18     ` Ard Biesheuvel
  0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2022-10-10 10:18 UTC (permalink / raw)
  To: devel, samer.el-haj-mahmoud
  Cc: Sunny Wang, Dimitrije Pavlov, Ard Biesheuvel, Jiewen Yao,
	Liming Gao, Jeff Booher-Kaeding

On Wed, 28 Sept 2022 at 15:32, Samer El-Haj-Mahmoud
<samer.el-haj-mahmoud@arm.com> wrote:
>
> Hi Ard,
>
> Any luck getting this one merged?
>

Merged #3460 into master.

Thanks,

> > -----Original Message-----
> > From: Sunny Wang <Sunny.Wang@arm.com>
> > Sent: Friday, August 19, 2022 10:47 AM
> > To: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>; devel@edk2.groups.io
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao
> > <jiewen.yao@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Jeff
> > Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>; Samer El-Haj-Mahmoud
> > <Samer.El-Haj-Mahmoud@arm.com>; Sunny Wang <Sunny.Wang@arm.com>
> > Subject: RE: [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument
> > in GetControllerName
> >
> > Looks good.
> > Reviewed-by: Sunny Wang <sunny.wang@arm.com>
> >
> > -----Original Message-----
> > From: Dimitrije Pavlov <dimitrije.pavlov@arm.com>
> > Sent: 17 August 2022 15:35
> > To: devel@edk2.groups.io
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao
> > <jiewen.yao@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Sunny
> > Wang <Sunny.Wang@arm.com>; Jeff Booher-Kaeding <Jeff.Booher-
> > Kaeding@arm.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-
> > Mahmoud@arm.com>
> > Subject: [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in
> > GetControllerName
> >
> > Per the UEFI specification, a device driver implementation should return
> > EFI_UNSUPPORTED if the ChildHandle argument in
> > EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() is not NULL.
> >
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Sunny Wang <Sunny.Wang@arm.com>
> > Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
> > Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
> >
> > Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>
> > ---
> >  OvmfPkg/VirtioNetDxe/ComponentName.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/OvmfPkg/VirtioNetDxe/ComponentName.c
> > b/OvmfPkg/VirtioNetDxe/ComponentName.c
> > index e340ca2f8fe4..718096630f6f 100644
> > --- a/OvmfPkg/VirtioNetDxe/ComponentName.c
> > +++ b/OvmfPkg/VirtioNetDxe/ComponentName.c
> > @@ -129,6 +129,13 @@ VirtioNetGetControllerName (
> >      return EFI_INVALID_PARAMETER;
> >    }
> >
> > +  //
> > +  // This is a device driver, so ChildHandle must be NULL.
> > +  //
> > +  if (ChildHandle != NULL) {
> > +    return EFI_UNSUPPORTED;
> > +  }
> > +
> >    //
> >    // confirm that the device is managed by this driver, using the VirtIo
> >    // Protocol
> > --
> > 2.37.2
> >
>
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>
>
> 
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-10 10:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-17 14:35 [PATCH v1 1/1] OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName Dimitrije Pavlov
2022-08-17 20:44 ` Samer El-Haj-Mahmoud
2022-08-19 14:46 ` Sunny Wang
2022-09-28 13:32   ` Samer El-Haj-Mahmoud
2022-10-10 10:18     ` [edk2-devel] " Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox