[edk2] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error

Jeff Fan posted 1 patch 7 years, 7 months ago
Failed in applying to current master (apply log)
UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[edk2] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error
Posted by Jeff Fan 7 years, 7 months ago
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
index 2713b19..9588eaf 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
@@ -267,7 +267,7 @@ IsInSmmRanges (
 {
   UINTN  Index;
 
-  if ((Address < mCpuHotPlugData.SmrrBase) || (Address >= mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
+  if ((Address >= mCpuHotPlugData.SmrrBase) && (Address < mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
     return TRUE;
   }
   for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {
-- 
2.9.3.windows.2

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error
Posted by Laszlo Ersek 7 years, 7 months ago
On 05/11/17 09:27, Jeff Fan wrote:
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff.fan@intel.com>
> ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> index 2713b19..9588eaf 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> @@ -267,7 +267,7 @@ IsInSmmRanges (
>  {
>    UINTN  Index;
>  
> -  if ((Address < mCpuHotPlugData.SmrrBase) || (Address >= mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
> +  if ((Address >= mCpuHotPlugData.SmrrBase) && (Address < mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
>      return TRUE;
>    }
>    for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {
> 

If this patch hasn't been committed yet, can you please update the
commit message with the use case or functionality that was previously
broken by this bug?

Thanks,
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error
Posted by Yao, Jiewen 7 years, 7 months ago
Reviewed-by: jiewen.yao@intel.com

> -----Original Message-----
> From: Fan, Jeff
> Sent: Thursday, May 11, 2017 3:27 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff.fan@intel.com>
> ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> index 2713b19..9588eaf 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> @@ -267,7 +267,7 @@ IsInSmmRanges (
>  {
>    UINTN  Index;
> 
> -  if ((Address < mCpuHotPlugData.SmrrBase) || (Address >=
> mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
> +  if ((Address >= mCpuHotPlugData.SmrrBase) && (Address <
> mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
>      return TRUE;
>    }
>    for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {
> --
> 2.9.3.windows.2

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