From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.3199.1587091878830105929 for ; Thu, 16 Apr 2020 19:51:18 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: siyuan.fu@intel.com) IronPort-SDR: a5hc9hQCixNGMkrkGkqdP1f1j30fFrFHyXDOBuunhZ5xl6WncXVBlRHjASz8qNne5mezVHouek FGUrxW8VAYew== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 19:51:17 -0700 IronPort-SDR: 362g25pRO4SyS1nQnNLxtfzRScpf/v41d+lbQIpPx9fv7wrGMcvfzYuYIQ5hRCtDHSvVK7enk3 Xz5OFY4nMzGg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,393,1580803200"; d="scan'208";a="278223410" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 16 Apr 2020 19:51:17 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Apr 2020 19:51:17 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Apr 2020 19:51:16 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.146]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.129]) with mapi id 14.03.0439.000; Fri, 17 Apr 2020 10:51:14 +0800 From: "Siyuan, Fu" To: "devel@edk2.groups.io" , "michael.kubacki@outlook.com" CC: Maciej Rabeda , "Wu, Jiaxin" Subject: Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Prevent invalid PCI BAR access Thread-Topic: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Prevent invalid PCI BAR access Thread-Index: AQHWDhtfajNMmHgba0+8lwq56pVJvqh8qd3Q Date: Fri, 17 Apr 2020 02:51:14 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: siyuan.fu@intel.com Content-Language: en-US Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 UmV2aWV3ZWQtYnk6IFNpeXVhbiBGdSA8c2l5dWFuLmZ1QGludGVsLmNvbT4NCg0KPiAtLS0tLU9y aWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBkZXZlbEBlZGsyLmdyb3Vwcy5pbyA8ZGV2ZWxA ZWRrMi5ncm91cHMuaW8+IE9uIEJlaGFsZiBPZiBNaWNoYWVsDQo+IEt1YmFja2kNCj4gU2VudDog MjAyMMTqNNTCOcjVIDExOjAyDQo+IFRvOiBkZXZlbEBlZGsyLmdyb3Vwcy5pbw0KPiBDYzogRnUs IFNpeXVhbiA8c2l5dWFuLmZ1QGludGVsLmNvbT47IE1hY2llaiBSYWJlZGENCj4gPG1hY2llai5y YWJlZGFAbGludXguaW50ZWwuY29tPjsgV3UsIEppYXhpbiA8amlheGluLnd1QGludGVsLmNvbT4N Cj4gU3ViamVjdDogW2VkazItZGV2ZWxdIFtQQVRDSCB2MSAxLzFdIE5ldHdvcmtQa2cvU25wRHhl OiBQcmV2ZW50IGludmFsaWQgUENJDQo+IEJBUiBhY2Nlc3MNCj4gDQo+IEZyb206IE1pY2hhZWwg S3ViYWNraSA8bWljaGFlbC5rdWJhY2tpQG1pY3Jvc29mdC5jb20+DQo+IA0KPiBSRUY6aHR0cHM6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GJhc2UgYWRkcmVzcw0KPiAtICAgICAgICAgICAgICAgICAgICAgTWVtT3JQb3J0 QWRkciwNCj4gLSAgICAgICAgICAgICAgICAgICAgIDEsICAgICAgICAgICAgICAgICAgICAvLyBj b3VudA0KPiAtICAgICAgICAgICAgICAgICAgICAgKFZPSUQgKikgKFVJTlROKSBCdWZmZXJQdHIN Cj4gLSAgICAgICAgICAgICAgICAgICAgICk7DQo+ICsgICAgQVNTRVJUIChTbnAtPklvQmFySW5k ZXggPCBQQ0lfTUFYX0JBUik7DQo+ICsgICAgaWYgKFNucC0+SW9CYXJJbmRleCA8IFBDSV9NQVhf QkFSKSB7DQo+ICsgICAgICBTbnAtPlBjaUlvLT5Jby5SZWFkICgNCj4gKyAgICAgICAgICAgICAg ICAgICAgICAgU25wLT5QY2lJbywNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgV2lkdGgsDQo+ ICsgICAgICAgICAgICAgICAgICAgICAgIFNucC0+SW9CYXJJbmRleCwgICAgICAvLyBCQVIgMSAo Zm9yIDMyYml0IHJlZ3MpLCBJTyBiYXNlIGFkZHJlc3MNCj4gKyAgICAgICAgICAgICAgICAgICAg ICAgTWVtT3JQb3J0QWRkciwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgMSwgICAgICAgICAg ICAgICAgICAgIC8vIGNvdW50DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIChWT0lEICopIChV SU5UTikgQnVmZmVyUHRyDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICk7DQo+ICsgICAgfQ0K PiAgICAgIGJyZWFrOw0KPiANCj4gICAgY2FzZSBQWEVfSU9fV1JJVEU6DQo+IC0gICAgU25wLT5Q Y2lJby0+SW8uV3JpdGUgKA0KPiAtICAgICAgICAgICAgICAgICAgICAgU25wLT5QY2lJbywNCj4g LSAgICAgICAgICAgICAgICAgICAgIFdpZHRoLA0KPiAtICAgICAgICAgICAgICAgICAgICAgU25w LT5Jb0JhckluZGV4LCAgICAgIC8vIEJBUiAxIChmb3IgMzJiaXQgcmVncyksIElPIGJhc2UgYWRk cmVzcw0KPiAtICAgICAgICAgICAgICAgICAgICAgTWVtT3JQb3J0QWRkciwNCj4gLSAgICAgICAg ICAgICAgICAgICAgIDEsICAgICAgICAgICAgICAgICAgICAvLyBjb3VudA0KPiAtICAgICAgICAg ICAgICAgICAgICAgKFZPSUQgKikgKFVJTlROKSBCdWZmZXJQdHINCj4gLSAgICAgICAgICAgICAg ICAgICAgICk7DQo+ICsgICAgQVNTRVJUIChTbnAtPklvQmFySW5kZXggPCBQQ0lfTUFYX0JBUik7 DQo+ICsgICAgaWYgKFNucC0+SW9CYXJJbmRleCA8IFBDSV9NQVhfQkFSKSB7DQo+ICsgICAgICBT bnAtPlBjaUlvLT5Jby5Xcml0ZSAoDQo+ICsgICAgICAgICAgICAgICAgICAgICAgIFNucC0+UGNp SW8sDQo+ICsgICAgICAgICAgICAgICAgICAgICAgIFdpZHRoLA0KPiArICAgICAgICAgICAgICAg ICAgICAgICBTbnAtPklvQmFySW5kZXgsICAgICAgLy8gQkFSIDEgKGZvciAzMmJpdCByZWdzKSwg SU8gYmFzZSBhZGRyZXNzDQo+ICsgICAgICAgICAgICAgICAgICAgICAgIE1lbU9yUG9ydEFkZHIs DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIDEsICAgICAgICAgICAgICAgICAgICAvLyBjb3Vu dA0KPiArICAgICAgICAgICAgICAgICAgICAgICAoVk9JRCAqKSAoVUlOVE4pIEJ1ZmZlclB0cg0K PiArICAgICAgICAgICAgICAgICAgICAgICApOw0KPiArICAgIH0NCj4gICAgICBicmVhazsNCj4g DQo+ICAgIGNhc2UgUFhFX01FTV9SRUFEOg0KPiAtICAgIFNucC0+UGNpSW8tPk1lbS5SZWFkICgN Cj4gLSAgICAgICAgICAgICAgICAgICAgICBTbnAtPlBjaUlvLA0KPiAtICAgICAgICAgICAgICAg ICAgICAgIFdpZHRoLA0KPiAtICAgICAgICAgICAgICAgICAgICAgIFNucC0+TWVtb3J5QmFySW5k ZXgsICAvLyBCQVIgMCwgTWVtb3J5IGJhc2UgYWRkcmVzcw0KPiAtICAgICAgICAgICAgICAgICAg ICAgIE1lbU9yUG9ydEFkZHIsDQo+IC0gICAgICAgICAgICAgICAgICAgICAgMSwgICAgICAgICAg ICAgICAgICAgIC8vIGNvdW50DQo+IC0gICAgICAgICAgICAgICAgICAgICAgKFZPSUQgKikgKFVJ TlROKSBCdWZmZXJQdHINCj4gLSAgICAgICAgICAgICAgICAgICAgICApOw0KPiArICAgIEFTU0VS VCAoU25wLT5NZW1vcnlCYXJJbmRleCA8IFBDSV9NQVhfQkFSKTsNCj4gKyAgICBpZiAoU25wLT5N ZW1vcnlCYXJJbmRleCA8IFBDSV9NQVhfQkFSKSB7DQo+ICsgICAgICBTbnAtPlBjaUlvLT5NZW0u UmVhZCAoDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICBTbnAtPlBjaUlvLA0KPiArICAgICAg ICAgICAgICAgICAgICAgICAgV2lkdGgsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICBTbnAt Pk1lbW9yeUJhckluZGV4LCAgLy8gQkFSIDAsIE1lbW9yeSBiYXNlIGFkZHJlc3MNCj4gKyAgICAg ICAgICAgICAgICAgICAgICAgIE1lbU9yUG9ydEFkZHIsDQo+ICsgICAgICAgICAgICAgICAgICAg ICAgICAxLCAgICAgICAgICAgICAgICAgICAgLy8gY291bnQNCj4gKyAgICAgICAgICAgICAgICAg ICAgICAgIChWT0lEICopIChVSU5UTikgQnVmZmVyUHRyDQo+ICsgICAgICAgICAgICAgICAgICAg ICAgICApOw0KPiArICAgIH0NCj4gICAgICBicmVhazsNCj4gDQo+ICAgIGNhc2UgUFhFX01FTV9X UklURToNCj4gLSAgICBTbnAtPlBjaUlvLT5NZW0uV3JpdGUgKA0KPiAtICAgICAgICAgICAgICAg ICAgICAgIFNucC0+UGNpSW8sDQo+IC0gICAgICAgICAgICAgICAgICAgICAgV2lkdGgsDQo+IC0g ICAgICAgICAgICAgICAgICAgICAgU25wLT5NZW1vcnlCYXJJbmRleCwgIC8vIEJBUiAwLCBNZW1v cnkgYmFzZSBhZGRyZXNzDQo+IC0gICAgICAgICAgICAgICAgICAgICAgTWVtT3JQb3J0QWRkciwN Cj4gLSAgICAgICAgICAgICAgICAgICAgICAxLCAgICAgICAgICAgICAgICAgICAgLy8gY291bnQN Cj4gLSAgICAgICAgICAgICAgICAgICAgICAoVk9JRCAqKSAoVUlOVE4pIEJ1ZmZlclB0cg0KPiAt ICAgICAgICAgICAgICAgICAgICAgICk7DQo+ICsgICAgQVNTRVJUIChTbnAtPk1lbW9yeUJhcklu ZGV4IDwgUENJX01BWF9CQVIpOw0KPiArICAgIGlmIChTbnAtPk1lbW9yeUJhckluZGV4IDwgUENJ X01BWF9CQVIpIHsNCj4gKyAgICAgIFNucC0+UGNpSW8tPk1lbS5Xcml0ZSAoDQo+ICsgICAgICAg ICAgICAgICAgICAgICAgICBTbnAtPlBjaUlvLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAg V2lkdGgsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICBTbnAtPk1lbW9yeUJhckluZGV4LCAg Ly8gQkFSIDAsIE1lbW9yeSBiYXNlIGFkZHJlc3MNCj4gKyAgICAgICAgICAgICAgICAgICAgICAg IE1lbU9yUG9ydEFkZHIsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAxLCAgICAgICAgICAg ICAgICAgICAgLy8gY291bnQNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgIChWT0lEICopIChV SU5UTikgQnVmZmVyUHRyDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICApOw0KPiArICAgIH0N Cj4gICAgICBicmVhazsNCj4gICAgfQ0KPiANCj4gZGlmZiAtLWdpdCBhL05ldHdvcmtQa2cvU25w RHhlL1NucC5jIGIvTmV0d29ya1BrZy9TbnBEeGUvU25wLmMNCj4gaW5kZXggMDc4YjI3Y2Y1ZWRk Li5kYTlmYmE1MWVmZjUgMT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