From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (EUR01-DB5-obe.outbound.protection.outlook.com [40.107.15.44]) by mx.groups.io with SMTP id smtpd.web08.6396.1649235804678775298 for ; Wed, 06 Apr 2022 02:03:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=bntQsWOB; spf=pass (domain: arm.com, ip: 40.107.15.44, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eDSPqsqArcPQkqoiKgRcmLQsqvtTmY3ESsJGdNkmnME=; b=bntQsWOBBCS4GLuD0mYEzUmXilBFZoLHjpTN+cN4nUqK3aISZB2uBe9pb/GCOquVgTGm/SatESDbxrJX7xtWGf5aBQeex3n1RAUrjm8PjbKwCHZ29OeD9T6vs/4w8GRMf+Z7uklUKkhNJAdb/GQvxcYwr+Q7OZ1IWokbmSanYs0= Received: from AM9P250CA0015.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:21c::20) by AM6PR08MB3111.eurprd08.prod.outlook.com (2603:10a6:209:48::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.19; Wed, 6 Apr 2022 09:03:16 +0000 Received: from VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:21c:cafe::68) by AM9P250CA0015.outlook.office365.com (2603:10a6:20b:21c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.21 via Frontend Transport; Wed, 6 Apr 2022 09:03:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT056.mail.protection.outlook.com (10.152.19.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.19 via Frontend Transport; Wed, 6 Apr 2022 09:03:15 +0000 Received: ("Tessian outbound 9511859e950a:v118"); Wed, 06 Apr 2022 09:03:15 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: dc905deb61787749 X-CR-MTA-TID: 64aa7808 Received: from 5947a82bda50.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A892A34F-8AFE-440C-BDEF-188A8BACD3EA.1; Wed, 06 Apr 2022 09:03:07 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5947a82bda50.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 06 Apr 2022 09:03:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HzugJzwD9g81adLSR0a+26O0m6EtegMTPpCclPhdXR+Q5jkfmcpW3gLCD+Qki/gpVYr10gUA0TV7ZYsJZYict++ETUadQFXj58e7nTrTuZlK6j86RMi4m4CVCyE0E4Ul6zHsqDAEZgJSJuexN2bgMuxbBYlnOQ9SG6dvBeZc2A+ofIOuAnXMmBZrh0ThI6N+FDmEr/gvAd2JHAE1eilMmTWDsdRoUmd5Wgf88B+kwwU2LnD12STf6ejeEsBDIG4f5HSReddkGrsoEKNSQs9PgkyYa2gaDm25jE4/cDzWA7vDisEicVZlUFnsv1R5TBNCMTyPl3kPTV/zJuo/1mP2rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eDSPqsqArcPQkqoiKgRcmLQsqvtTmY3ESsJGdNkmnME=; b=UgvPydObkrDNBXZpAn31aPV5XXvtQCqD2TaBj477JRluPYy/yBkokuj4JtvtrRScwxsYhxELkdVZWjPeynFOyLFMBTRWOG1d/ymDslIyfO1FeZtRyyFruTOykhjXlvCLHNIlXj4sHyrIJztiCpWkCFYyY/q9bYn1d7f46qqBnk7R8o0KJOeEjlb3AVa3CzGwqlSFfiEg6+spf7SyRxm65e/3HR4WYDVwWmIdANp3XX/7eDvWa6a7Bl20CHDxjmYlqd39SdV/Q5L5vTdVToLcVJugqAnhYRaaQpfIB28ZOFYR6qr0q3lw7F6nOMjMmtSVBgz9XM5T/EwDTtEM+N5KSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eDSPqsqArcPQkqoiKgRcmLQsqvtTmY3ESsJGdNkmnME=; b=bntQsWOBBCS4GLuD0mYEzUmXilBFZoLHjpTN+cN4nUqK3aISZB2uBe9pb/GCOquVgTGm/SatESDbxrJX7xtWGf5aBQeex3n1RAUrjm8PjbKwCHZ29OeD9T6vs/4w8GRMf+Z7uklUKkhNJAdb/GQvxcYwr+Q7OZ1IWokbmSanYs0= Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by DU2PR08MB7288.eurprd08.prod.outlook.com (2603:10a6:10:2d7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.19; Wed, 6 Apr 2022 09:03:01 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::f404:b189:3513:ae2b]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::f404:b189:3513:ae2b%9]) with mapi id 15.20.5123.031; Wed, 6 Apr 2022 09:03:01 +0000 From: "Sami Mujawar" To: Ming Huang , "devel@edk2.groups.io" , "ardb+tianocore@kernel.org" , "jiewen.yao@intel.com" , Supreeth Venkatesh CC: "ming.huang-@outlook.com" , nd Subject: Re: [PATCH edk2 v3 3/3] StandaloneMmPkg: Fix check buffer address failed issue from TF-A Thread-Topic: [PATCH edk2 v3 3/3] StandaloneMmPkg: Fix check buffer address failed issue from TF-A Thread-Index: AQHX/jaT/hsUhQd5IUemtk703S9JSazYNxSAgAsHfQA= Date: Wed, 6 Apr 2022 09:03:00 +0000 Message-ID: <843FF6EA-3E67-4802-B562-83FB7ADA823E@arm.com> References: <20211231110623.128888-1-huangming@linux.alibaba.com> <20211231110623.128888-4-huangming@linux.alibaba.com> <7a415d5e-701c-266d-3d0e-1617a31bc050@linux.alibaba.com> In-Reply-To: <7a415d5e-701c-266d-3d0e-1617a31bc050@linux.alibaba.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/16.59.22031300 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-MS-Office365-Filtering-Correlation-Id: 4e186c21-ee27-4d0e-45db-08da17ac4955 x-ms-traffictypediagnostic: DU2PR08MB7288:EE_|VE1EUR03FT056:EE_|AM6PR08MB3111:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: LN4O6zpdlDqDDJGhKWPAEG22nDf93d1SUTpSiysLt9i4ysgA93c2ESzhOTVHOv2EnJ5umQyDT9HmotAqzgWwkaiA05fEsYfymXt5voRGv4Se9njPG1GgfJTfyiApSvJ2wPt2KIRG1w+iTEFr/6s+Cp7FkQ/89UTPS9WOQDXzbKhJjKeIxEQZgF1w64SoyP48Os0/nKdZG88XBG9DMdYz7sBTz6+rnVz/vy0WrKQQSQrJwb8Uy9EN/OX9pCK8qlkG/i0omHRorRDEPSQSNwMXHaP/5nj/F3zWPiN2irwoQQUFbsWVRBQEoIc2iyBFILwsubHe5UxjMJSkXiCxNdP/eweo7/irPD/v5Dj3sYS8UJZ7T5k6k5DGJhI4icGUpwQ6LIeFZkvmJJFBt3WaXS+GRDBZEGT0C3d0xA+HRjU64V+8ws6el6S8tLOwXIbijuN3P7vPqdYOs2i8L20dt6MhnfWsF/GG1IDs/iZ7NCJV2Nwc6x8sAeAQwJrbSJyKxENtIbSnANRAo1y05iNp/yqnYlHI/5NW1rZNnqhL5QmY6sqSaVRpjmMcXhLfAI37DfChK6BZJ9UkMQXgHo+BxmqTtPo4pppEMVhlY0qtj5PF80/YrkhmXRC/ZOkjDk2A+pQUocUW/ln8/kZ500K7nWha31mZhBYIDJbIHihb2Eb02pkdJn2Txu1t4OQhIT/M5HSNmQW1nJJYnn0gwM/3b/MoRMemLWurZ2jSBOEER8B68HsS8b0FnVE5mUHtf/t/dl8g X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(6029001)(4636009)(366004)(110136005)(66946007)(66556008)(66446008)(36756003)(4326008)(64756008)(8676002)(6636002)(66476007)(86362001)(54906003)(83380400001)(6506007)(91956017)(6512007)(316002)(76116006)(186003)(38070700005)(122000001)(38100700002)(26005)(8936002)(5660300002)(2906002)(33656002)(508600001)(71200400001)(6486002)(2616005)(45980500001);DIR:OUT;SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB7288 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 866f127c-037f-46c9-8498-08da17ac408a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XBqeqiFNwZ5Q3LxZMmPovhQJA38s1DMszvk4+9UluPYgJ2nqG2LWMdOCeQqvLhcgb9hMzOEOscnWV+R63on0j4hmfqLtewQehv2JnkXKeFSbSdioj5o2rvVu4o8PBbiGRyqRVZNboXz9dbTYYXAIgjKyP39sYfc5OzkFpjUqica7o1gjhzBsdLiOJPdgyE4hqNyTiuqSfnI+J07/+N0eyL9GugjE2CNs6ry0uCuba5LOiTQ7rBZ+W3SkVqG7tmTUDI9fn43v7ornk5Ez0lXMexZoV3lOba64N62x0YBQSo3oTWgqlkGtWhEEyxlY8YCub2PkKxyQiuP5KxhCSTJLBuZv3W4U43eKj/ZOV13p02emALkpYq3k29xWXBSqfmmi9vAVs+FEqRtlVTT8ijqtmzzws0lqbtLd71Jt6Fdo4SzAUCe5p3MUrW5NaLA2+WXsVHcDKiH5JNYllJCzoclrtztYSQIEB8RdCa4vx10GIif1Pqg7D6BjnKAkneZHuDaT/atz6lDQZXqOYIC66inyfZua9Biyw9bEUB98iADkkWJ3E5i+I2eto3hX3rv7yGjwXQOUzjd/f+EepI14UXBGmOLrXL0pGyTcgCqJ5juhzGlD0UThh2oNBDMa5zpIjssJ3eBuwcJ3urBSicwEoKMf9MWttA4aGC/ku8ApJApDAjGLOgV3tOl12sysmA3m4jhJ X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230001)(6029001)(4636009)(40470700004)(36840700001)(46966006)(26005)(186003)(336012)(47076005)(33656002)(508600001)(83380400001)(2616005)(82310400005)(4326008)(70206006)(70586007)(81166007)(8676002)(6506007)(6636002)(54906003)(6512007)(6486002)(40460700003)(86362001)(356005)(2906002)(110136005)(36860700001)(316002)(36756003)(5660300002)(8936002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2022 09:03:15.6923 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e186c21-ee27-4d0e-45db-08da17ac4955 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3111 Content-Language: en-GB Content-Type: text/plain; charset="utf-8" Content-ID: <27BB784F3A68A145A1E94B689010C9E3@eurprd08.prod.outlook.com> Content-Transfer-Encoding: base64 SGkgTWluZywNCg0KSSBhbSBub3Qgc3VyZSBpZiB0aGlzIGlzIGFuIGlzc3VlIGF0IG15IGVuZCwg YnV0IEkgY2Fubm90IGFwcGx5IHRoaXMgcGF0Y2ggc2VyaWVzLCBjYW4geW91IGNoZWNrLCBwbGVh c2U/DQpBbHNvLCBpcyBpdCBwb3NzaWJs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NwdS9TdGFuZGFsb25lTW1DcHUuYw0KICAg ID4gQEAgLTEwNyw2ICsxMDcsNyBAQCBTdGFuZGFsb25lTW1DcHVJbml0aWFsaXplICgNCiAgICA+ ICAgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgIEluZGV4Ow0KICAgID4gICAgVUlO VE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQXJyYXlTaXplOw0KICAgID4gICAgVk9JRCAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqSG9iU3RhcnQ7DQogICAgPiArICBFRklfTU1SQU1f SE9CX0RFU0NSSVBUT1JfQkxPQ0sgICpNbXJhbVJhbmdlc0hvYjsNCiAgICA+ICANCiAgICA+ICAg IEFTU0VSVCAoU3lzdGVtVGFibGUgIT0gTlVMTCk7DQogICAgPiAgICBtTW1zdCA9IFN5c3RlbVRh YmxlOw0KICAgID4gQEAgLTE4Niw2ICsxODcsMjYgQEAgU3RhbmRhbG9uZU1tQ3B1SW5pdGlhbGl6 ZSAoDQogICAgPiAgICBDb3B5TWVtICgmbU5zQ29tbUJ1ZmZlciwgTnNDb21tQnVmTW1yYW1SYW5n ZSwgc2l6ZW9mKEVGSV9NTVJBTV9ERVNDUklQVE9SKSk7DQogICAgPiAgICBERUJVRyAoKERFQlVH X0lORk8sICJtTnNDb21tQnVmZmVyOiAweCUwMTZseCAtIDB4JWx4XG4iLCBtTnNDb21tQnVmZmVy LkNwdVN0YXJ0LCBtTnNDb21tQnVmZmVyLlBoeXNpY2FsU2l6ZSkpOw0KICAgID4gIA0KICAgID4g KyAgU3RhdHVzID0gR2V0R3VpZGVkSG9iRGF0YSAoDQogICAgPiArICAgICAgICAgICAgIEhvYlN0 YXJ0LA0KICAgID4gKyAgICAgICAgICAgICAmZ0VmaU1tUGVpTW1yYW1NZW1vcnlSZXNlcnZlR3Vp ZCwNCiAgICA+ICsgICAgICAgICAgICAgKFZPSUQgKiopICZNbXJhbVJhbmdlc0hvYg0KICAgID4g KyAgICAgICAgICA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