public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/Bds: Remove assertion in BmCharToUint
@ 2017-10-10  8:39 Ruiyu Ni
  2017-10-10  8:45 ` Ard Biesheuvel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ruiyu Ni @ 2017-10-10  8:39 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ard Biesheuvel, Laszlo Ersek

BmCharToUint() could be called using external data and it
already contains logic to return -1 when data is invalid,
so removing unnecessary assertion to avoid system hang.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Laszlo Ersek <lersek@redhat.com>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
index 11ab86792a..a3fa254245 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
@@ -420,7 +420,6 @@ BmCharToUint (
     return (Char - L'A' + 0xA);
   }
 
-  ASSERT (FALSE);
   return (UINTN) -1;
 }
 
-- 
2.12.2.windows.2



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

* Re: [PATCH] MdeModulePkg/Bds: Remove assertion in BmCharToUint
  2017-10-10  8:39 [PATCH] MdeModulePkg/Bds: Remove assertion in BmCharToUint Ruiyu Ni
@ 2017-10-10  8:45 ` Ard Biesheuvel
  2017-10-10 12:38 ` Zeng, Star
  2017-10-10 17:05 ` Laszlo Ersek
  2 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2017-10-10  8:45 UTC (permalink / raw)
  To: Ruiyu Ni; +Cc: edk2-devel@lists.01.org, Laszlo Ersek

On 10 October 2017 at 09:39, Ruiyu Ni <ruiyu.ni@intel.com> wrote:
> BmCharToUint() could be called using external data and it
> already contains logic to return -1 when data is invalid,
> so removing unnecessary assertion to avoid system hang.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Laszlo Ersek <lersek@redhat.com>

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>  MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
> index 11ab86792a..a3fa254245 100644
> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
> @@ -420,7 +420,6 @@ BmCharToUint (
>      return (Char - L'A' + 0xA);
>    }
>
> -  ASSERT (FALSE);
>    return (UINTN) -1;
>  }
>
> --
> 2.12.2.windows.2
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: [PATCH] MdeModulePkg/Bds: Remove assertion in BmCharToUint
  2017-10-10  8:39 [PATCH] MdeModulePkg/Bds: Remove assertion in BmCharToUint Ruiyu Ni
  2017-10-10  8:45 ` Ard Biesheuvel
@ 2017-10-10 12:38 ` Zeng, Star
  2017-10-10 17:05 ` Laszlo Ersek
  2 siblings, 0 replies; 4+ messages in thread
From: Zeng, Star @ 2017-10-10 12:38 UTC (permalink / raw)
  To: Ni, Ruiyu, edk2-devel@lists.01.org
  Cc: Laszlo Ersek, Ard Biesheuvel, Zeng, Star

Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ruiyu Ni
Sent: Tuesday, October 10, 2017 4:40 PM
To: edk2-devel@lists.01.org
Cc: Laszlo Ersek <lersek@redhat.com>; Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [edk2] [PATCH] MdeModulePkg/Bds: Remove assertion in BmCharToUint

BmCharToUint() could be called using external data and it already contains logic to return -1 when data is invalid, so removing unnecessary assertion to avoid system hang.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Laszlo Ersek <lersek@redhat.com>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
index 11ab86792a..a3fa254245 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
@@ -420,7 +420,6 @@ BmCharToUint (
     return (Char - L'A' + 0xA);
   }
 
-  ASSERT (FALSE);
   return (UINTN) -1;
 }
 
--
2.12.2.windows.2

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: [PATCH] MdeModulePkg/Bds: Remove assertion in BmCharToUint
  2017-10-10  8:39 [PATCH] MdeModulePkg/Bds: Remove assertion in BmCharToUint Ruiyu Ni
  2017-10-10  8:45 ` Ard Biesheuvel
  2017-10-10 12:38 ` Zeng, Star
@ 2017-10-10 17:05 ` Laszlo Ersek
  2 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2017-10-10 17:05 UTC (permalink / raw)
  To: Ruiyu Ni, edk2-devel; +Cc: Ard Biesheuvel

On 10/10/17 10:39, Ruiyu Ni wrote:
> BmCharToUint() could be called using external data and it
> already contains logic to return -1 when data is invalid,
> so removing unnecessary assertion to avoid system hang.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Laszlo Ersek <lersek@redhat.com>
> ---
>  MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
> index 11ab86792a..a3fa254245 100644
> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
> @@ -420,7 +420,6 @@ BmCharToUint (
>      return (Char - L'A' + 0xA);
>    }
>  
> -  ASSERT (FALSE);
>    return (UINTN) -1;
>  }
>  
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks!
Laszlo


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

end of thread, other threads:[~2017-10-10 17:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-10  8:39 [PATCH] MdeModulePkg/Bds: Remove assertion in BmCharToUint Ruiyu Ni
2017-10-10  8:45 ` Ard Biesheuvel
2017-10-10 12:38 ` Zeng, Star
2017-10-10 17:05 ` Laszlo Ersek

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