From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mx.groups.io with SMTP id smtpd.web11.10564.1659245851702719585 for ; Sat, 30 Jul 2022 22:37:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mby+3xAQ; spf=pass (domain: gmail.com, ip: 209.85.215.173, mailfrom: kuqin12@gmail.com) Received: by mail-pg1-f173.google.com with SMTP id 206so3597210pgb.0 for ; Sat, 30 Jul 2022 22:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=YwMddBpuJ8O89k7+Bsz2Xi9Rh4rmfnU3F/9dD3JPnd8=; b=mby+3xAQt0M4pbA5+0S7GlFAccvGVs3saARe3zuJZcHSyltDGs8u8aGcN8a5qz0wyw SAjBr70Xxa18dDd/83lIxLiMg6c3lI3EgFFtZaPyIC0PxjzhyuomQTU8JywPLy0YyYCJ vXGVAIlMrGA4j1no2nBgnvJWopJXc+PuTEPMH5QUX5ealZyCUv6+L/hkkQndmf/pNZf7 kfQPi5WmPd3EiEVhy7nq6OPXkfb08nLpjUFH73vuISIE+nSZwh19XPXGj8ArmlkE1Bnt b+QjFS7us/DbOj/8SVXdVQ81ZfrEF385r3mdCBNry4El4cym9NEjyJwNkWu7BfNjmGOL Q7bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=YwMddBpuJ8O89k7+Bsz2Xi9Rh4rmfnU3F/9dD3JPnd8=; b=P3na3kmFrg32w0Wmrh9YH5R0KyBcEP47uAn4Tx5OziZb1lPGBkNiJsktUjXw6Vveg7 pTcOlk4GRAatzvFMSUgrJQ1myFHNyUt9ydqx0EpX9d9XYZtXL1wKP843Q/C5/Jb0iEet oJC3UaMZwL9DR2DZuaTZNi1YSDRJQxF6ZEv8g/rV4fEDmANqb9879jEM6RlqMu1S/6QP kLyaFOVmdFqpvedzu5M/bBgc3ELviYuHOHpoem7KBSrEOz03DbLSCnHqxNmSgzbPerT2 F+sXxbboAUTc4Vtz1bwfLCa3QOQZcKrxiJNHdj7nfJXeOpFTCVaEp04AK0S2mvRIK9t6 mYnA== X-Gm-Message-State: AJIora/0IyZyT80bX5Ch2gURL+ny42g8AMCQmn74Luox7Oi3SrUIMjBn OQTIkGWENF1zmIp8piyeZz9O7wpW6qk= X-Google-Smtp-Source: AGRyM1thXVF6i3kL/T3CKivN1eOmMRdEH+TkdrBFkSixv8A16PUmkW0qfZ4sKrF4r71ZMlmifQK0Sw== X-Received: by 2002:a05:6a00:450d:b0:52b:84ca:9509 with SMTP id cw13-20020a056a00450d00b0052b84ca9509mr10645492pfb.74.1659245852218; Sat, 30 Jul 2022 22:37:32 -0700 (PDT) Return-Path: Received: from MININT-0U7P5GU.redmond.corp.microsoft.com ([2001:4898:80e8:7:a09e:ed80:a0cd:1e24]) by smtp.gmail.com with ESMTPSA id x6-20020a1709029a4600b00168e83eda56sm6714524plv.3.2022.07.30.22.37.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jul 2022 22:37:31 -0700 (PDT) From: "Kun Qin" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov , Joe Lopez , Sami Mujawar , Pierre Gondois Subject: [PATCH v3 2/6] DynamicTablesPkg: DynamicPlatRepoLib: Fix incorrect dereferencing Date: Sat, 30 Jul 2022 22:37:23 -0700 Message-Id: <20220731053727.536-3-kuqin12@gmail.com> X-Mailer: git-send-email 2.37.1.windows.1 In-Reply-To: <20220731053727.536-1-kuqin12@gmail.com> References: <20220731053727.536-1-kuqin12@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3996 The content of token should be derived from the data section of the `CmObject` instead of the object itself. This change fixed the issue by dereferencing the token value from the data buffer of input CmObject. Cc: Sami Mujawar Cc: Alexei Fedorov Co-authored-by: Joe Lopez Signed-off-by: Kun Qin Reviewed-by: Sami Mujawar Reviewed-by: Pierre Gondois --- Notes: v2: - Added Reviewed-by tag [Sami] - Added Reviewed-by tag [Pierre] =20=20=20=20 v3: - No change. DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c | = 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTok= enFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectToke= nFixer.c index 80d0aa17bc1a..84e4bb7e3bc8 100644 --- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer= .c +++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer= .c @@ -60,7 +60,7 @@ TokenFixerItsGroup ( )=0D {=0D ASSERT (CmObject !=3D NULL);=0D - ((CM_ARM_ITS_GROUP_NODE *)CmObject)->Token =3D Token;=0D + ((CM_ARM_ITS_GROUP_NODE *)CmObject->Data)->Token =3D Token;=0D return EFI_SUCCESS;=0D }=0D =0D --=20 2.37.1.windows.1