public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Chiu, Chasel" <chasel.chiu@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	"Dong, Eric" <eric.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH v1] MinPlatformPkg/Test: Fix DumpAcpiMadt infinite loop
Date: Thu, 9 May 2024 20:16:35 +0000	[thread overview]
Message-ID: <PH0PR11MB58326135A74C8D32A0710652CDE62@PH0PR11MB5832.namprd11.prod.outlook.com> (raw)
In-Reply-To: <2c10c7f9d2f548cf05cb23639dffe7c6576412ac.1713794592.git.AbdulLateef.Attar@amd.com>

Pushed as 3f89df4

> -----Original Message-----
> From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> Sent: Monday, April 22, 2024 7:04 AM
> To: devel@edk2.groups.io
> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Chiu, Chasel
> <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>;
> Dong, Eric <eric.dong@intel.com>
> Subject: [PATCH v1] MinPlatformPkg/Test: Fix DumpAcpiMadt infinite loop
> 
> Update the MadtLen varaible before the next record is read, to void infinite
> loop.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Eric Dong <eric.dong@intel.com>
> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> ---
>  .../Test/Library/TestPointCheckLib/DxeCheckAcpiMadt.c      | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpiMadt.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpiMadt.c
> index 7e29b47a0b..04cc6f963a 100644
> --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpiMadt.c
> +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpiMadt.c
> @@ -1,6 +1,7 @@
>  /** @file
>  
>  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
>  
>  **/
> @@ -235,8 +236,9 @@ DumpAcpiMadt (
>        DEBUG ((DEBUG_INFO, "\n"));
>        break;
>      }
> -    ApicStructHeader = (APIC_STRUCT_HEADER *)((UINT8 *)ApicStructHeader + ApicStructHeader->Length);
> +    // Update MadtLen first to avoid the dead loop and system hang
>      MadtLen         -= ApicStructHeader->Length;
> +    ApicStructHeader = (APIC_STRUCT_HEADER *)((UINT8 *)ApicStructHeader + ApicStructHeader->Length);
>    }
>  }
>  
> @@ -324,8 +326,9 @@ CheckAcpiMadt (
>      default:
>        break;
>      }
> -    ApicStructHeader = (APIC_STRUCT_HEADER *)((UINT8 *)ApicStructHeader + ApicStructHeader->Length);
> +    // Update MadtLen first to avoid the dead loop and system hang
>      MadtLen         -= ApicStructHeader->Length;
> +    ApicStructHeader = (APIC_STRUCT_HEADER *)((UINT8 *)ApicStructHeader + ApicStructHeader->Length);
>    }
>    return EFI_SUCCESS;
>  }
> \ No newline at end of file
> -- 
> 2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118770): https://edk2.groups.io/g/devel/message/118770
Mute This Topic: https://groups.io/mt/105669987/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      parent reply	other threads:[~2024-05-09 20:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 14:03 [edk2-devel] [PATCH v1] MinPlatformPkg/Test: Fix DumpAcpiMadt infinite loop Abdul Lateef Attar via groups.io
2024-05-09 19:19 ` Nate DeSimone
2024-05-09 20:16 ` Nate DeSimone [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR11MB58326135A74C8D32A0710652CDE62@PH0PR11MB5832.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox