From: James Hartley Subject: RE: [PATCH 1/2] crypto: Add Imagination Technologies hw hash accelerator Date: Tue, 18 Nov 2014 18:16:52 +0000 Message-ID: <72BC0C8BD7BB6F45988A99382E5FBAE544342784@hhmail02.hh.imgtec.org> References: <1415621455-10468-1-git-send-email-james.hartley@imgtec.com> <1415621455-10468-2-git-send-email-james.hartley@imgtec.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: Herbert Xu , "davem@davemloft.net" , Grant Likely , Rob Herring , "akpm@linux-foundation.org" , Greg Kroah-Hartman , "joe@perches.com" , "mchehab@osg.samsung.com" , Antti Palosaari , "jg1.han@samsung.com" , "linux-crypto@vger.kernel.org" , "devicetree@vger.kernel.org" , Pawel Moll , Mark Rutland , Ian Campbell , "Kumar Gala" , Ezequiel Garcia To: Andrew Bresticker Return-path: Received: from mailapp01.imgtec.com ([195.59.15.196]:12276 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753542AbaKRSRA (ORCPT ); Tue, 18 Nov 2014 13:17:00 -0500 In-Reply-To: Content-Language: en-US Sender: linux-crypto-owner@vger.kernel.org List-ID: QW5kcmV3LCANCg0KVGhhbmtzIGZvciB0aGUgcmV2aWV3DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNz YWdlLS0tLS0NCj4gRnJvbTogYWJyZXN0aWNAZ29vZ2xlLmNvbSBbbWFpbHRvOmFicmVzdGljQGdv b2dsZS5jb21dIE9uIEJlaGFsZiBPZg0KPiBBbmRyZXcgQnJlc3RpY2tlcg0KPiBTZW50OiAxNCBO b3ZlbWJlciAyMDE0IDIzOjU5DQo+IFRvOiBKYW1lcyBIYXJ0bGV5DQo+IENjOiBIZXJiZXJ0IFh1 OyBkYXZlbUBkYXZlbWxvZnQubmV0OyBHcmFudCBMaWtlbHk7IFJvYiBIZXJyaW5nOw0KPiBha3Bt QGxpbnV4LWZvdW5kYXRpb24ub3JnOyBHcmVnIE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ZGV2LT5sb2NrLCBmbGFncyk7DQo+ID4gKw0KPiA+ICsgICAgICAgaWYgKCFhc3lu Y19yZXEpDQo+ID4gKyAgICAgICAgICAgICAgIHJldHVybiByZXM7DQo+ID4gKw0KPiA+ICsgICAg ICAgaWYgKGJhY2tsb2cpDQo+ID4gKyAgICAgICAgICAgICAgIGJhY2tsb2ctPmNvbXBsZXRlKGJh Y2tsb2csIC1FSU5QUk9HUkVTUyk7DQo+ID4gKw0KPiA+ICsgICAgICAgcmVxID0gYWhhc2hfcmVx dWVzdF9jYXN0KGFzeW5jX3JlcSk7DQo+ID4gKyAgICAgICBoZGV2LT5yZXEgPSByZXE7DQo+ID4g KyAgICAgICBjdHggPSBhaGFzaF9yZXF1ZXN0X2N0eChyZXEpOw0KPiA+ICsNCj4gPiArICAgICAg IGRldl9pbmZvKGhkZXYtPmRldiwgImhhbmRsaW5nIG5ldyByZXEsIG9wOiAlbHUsIG5ieXRlczog JWRcbiIsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgY3R4LT5vcCwgcmVxLT5uYnl0ZXMpOw0KPiA+ICsNCj4gPiArICAgICAgIGVyciA9IGltZ19o YXNoX2h3X2luaXQoaGRldik7DQo+ID4gKw0KPiA+ICsgICAgICAgaWYgKGVycikNCj4gPiArICAg ICAgICAgICAgICAgZ290byBlcnIxOw0KPiA+ICsNCj4gPiArICAgICAgIGlmIChjdHgtPm9wID09 IE9QX1VQREFURSkgew0KPiA+ICsgICAgICAgICAgICAgICBlcnIgPSBpbWdfaGFzaF91cGRhdGVf cmVxKGhkZXYpOw0KPiA+ICsgICAgICAgICAgICAgICBpZiAoZXJyICE9IC1FSU5QUk9HUkVTUyAm JiAoY3R4LT5mbGFncyAmIERSSVZFUl9GTEFHU19GSU5VUCkpDQo+ID4gKyAgICAgICAgICAgICAg ICAgICAgICAgLyogdXBkYXRlIGRvZXMgbm90IGNhbGwgZmluYWwgc28gbXVzdCBoZXJlICov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ZhbGxiYWNrKTsNCj4gPiAr fQ0KPiA+ICsNCj4gPiArc3RhdGljIGlycXJldHVybl90IGltZ19pcnFfaGFuZGxlcihpbnQgaXJx LCB2b2lkICpkZXZfaWQpDQo+ID4gK3sNCj4gPiArICAgICAgIHN0cnVjdCBpbWdfaGFzaF9kZXYg KmhkZXYgPSBkZXZfaWQ7DQo+ID4gKyAgICAgICB1MzIgcmVnOw0KPiA+ICsNCj4gPiArICAgICAg IHJlZyA9IGltZ19oYXNoX3JlYWQoaGRldiwgQ1JfSU5UU1RBVCk7DQo+ID4gKyAgICAgICBpbWdf aGFzaF93cml0ZShoZGV2LCBDUl9JTlRDTEVBUiwgcmVnKTsNCj4gPiArDQo+ID4gKyAgICAgICBp ZiAocmVnICYgQ1JfSU5UX05FV19SRVNVTFRTX1NFVCkgew0KPiA+ICsgICAgICAgICAgICAgICBk ZXZfZGJnKGhkZXYtPmRldiwgIklSUSBDUl9JTlRfTkVXX1JFU1VMVFNfU0VUXG4iKTsNCj4gPiAr ICAgICAgICAgICAgICAgaWYgKERSSVZFUl9GTEFHU19CVVNZICYgaGRldi0+ZmxhZ3MpIHsNCj4g PiArICAgICAgICAgICAgICAgICAgICAgICBoZGV2LT5mbGFncyB8PSBEUklWRVJfRkxBR1NfT1VU UFVUX1JFQURZOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIGlmICghKERSSVZFUl9GTEFH U19DUFUgJiBoZGV2LT5mbGFncykpDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBoZGV2LT5mbGFncyB8PSBEUklWRVJfRkxBR1NfRE1BX1JFQURZOw0KPiA+ICsgICAgICAgICAg ICAgICAgICAgICAgIHRhc2tsZXRfc2NoZWR1bGUoJmhkZXYtPmRvbmVfdGFzayk7DQo+ID4gKyAg ICAgICAgICAgICAgIH0gZWxzZSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgZGV2X3dh cm4oaGRldi0+ZGV2LA0KPiA+ICsgICA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YWxnc1tdID0gew0KPiA+ICsgICAg ICAgew0KPiA+ICsgICAgICAgLmluaXQgPSBpbWdfaGFzaF9pbml0LA0KPiANCj4gSW5kZW50YXRp b24gaXMgb2ZmIGhlcmUuICBNZW1iZXJzIG9mIHRoZSBzdHJ1Y3Qgc2hvdWxkIGJlIGluZGVudGVk IG9uZQ0KPiBsZXZlbCBmcm9tIHRoZSBvcGVuIGJyYWNlLg0KDQpEb25lDQoNCj4gDQo+ID4gKyAg ICAgICAudXBkYXRlID0gaW1nX2hhc2hfdXBkYXRlLA0KPiA+ICsgICAgICAgLmZpbmFsID0gaW1n X2hhc2hfZmluYWwsDQo+ID4gKyAgICAgICAuZmludXAgPSBpbWdfaGFzaF9maW51cCwNCj4gPiAr ICAgICAgIC5kaWdlc3QgPSBpbWdfaGFzaF9kaWdlc3QsDQo+ID4gKyAgICAgICAuaGFsZyA9IHsN Cj4gPiArICAgICAgICAgICAgICAgLmRpZ2VzdHNpemUgPSBNRDVfRElHRVNUX1NJWkUsDQo+ID4g KyAgICAgICAgICAgICAgIC5iYXNlID0gew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIC5j cmFfbmFtZSA9ICJtZDUiLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNy YV9kcml2ZXJfbmFtZSA9ICJpbWctbWQ1IiwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIC5jcmFfcHJpb3JpdHkgPSAzMDEsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAg LmNyYV9mbGFncyA9DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgQ1JZUFRPX0FMR19BU1lO QyB8DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgQ1JZUFRPX0FMR19ORUVEX0ZBTExCQUNL LA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIC5jcmFfYmxvY2tzaXplID0gTUQ1X0JMT0NL X1NJWkUsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgLmNyYV9jdHhzaXplID0gc2l6ZW9m KHN0cnVjdCBpbWdfaGFzaF9jdHgpLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIC5jcmFf aW5pdCA9IGltZ19jcmFfbWQ1X2luaXQsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgLmNy YV9leGl0ID0gaW1nX2hhc2hfY3JhX2V4aXQsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAg LmNyYV9tb2R1bGUgPSBUSElTX01PRFVMRSwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICB9 DQo+ID4gKyAgICAgICAgICAgICAgIH0NCj4gPiArICAgICAgIH0sDQo+ID4gKyAgICAgICB7DQo+ ID4gKyAgICAgICAuaW5pdCA9IGltZ19oYXNoX2luaXQsDQo+ID4gKyAgICAgICAudXBkYXRlID0g aW1nX2hhc2hfdXBkYXRlLA0KPiA+ICsgICAgICAgLmZpbmFsID0gaW1nX2hhc2hfZmluYWwsDQo+ ID4gKyAgICAgICAuZmludXAgPSBpbWdfaGFzaF9maW51cCwNCj4gPiArICAgICAgIC5kaWdlc3Qg PSBpbWdfaGFzaF9kaWdlc3QsDQo+ID4gKyAgICAgICAuaGFsZyA9IHsNCj4gPiArICAgICAgICAg ICAgICAgLmRpZ2VzdHNpemUgPSBTSEExX0RJR0VTVF9TSVpFLA0KPiA+ICsgICAgICAgICAgICAg ICAuYmFzZSA9IHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAuY3JhX25hbWUgPSAic2hh MSIsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgLmNyYV9kcml2ZXJfbmFtZSA9ICJpbWct c2hhMSIsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgLmNyYV9wcmlvcml0eSA9IDMwMDAs DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgLmNyYV9mbGFncyA9DQo+ID4gKyAgICAgICAg ICAgICAgICAgICAgICAgQ1JZUFRPX0FMR19BU1lOQyB8DQo+ID4gKyAgICAgICAgICAgICAgICAg ICAgICAgQ1JZUFRPX0FMR19ORUVEX0ZBTExCQUNLLA0KPiA+ICsgICAgICAgICAgICAgICAgICAg ICAgIC5jcmFfYmxvY2tzaXplID0gU0hBMV9CTE9DS19TSVpFLA0KPiA+ICsgICAgICAgICAgICAg ICAgICAgICAgIC5jcmFfY3R4c2l6ZSA9IHNpemVvZihzdHJ1Y3QgaW1nX2hhc2hfY3R4KSwNCj4g PiArICAgICAgICAgICAgICAgICAgICAgICAuY3JhX2luaXQgPSBpbWdfY3JhX3NoYTFfaW5pdCwN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgICAuY3JhX2V4aXQgPSBpbWdfaGFzaF9jcmFfZXhp dCwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAuY3JhX21vZHVsZSA9IFRISVNfTU9EVUxF LA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIH0NCj4gPiArICAgICAgICAgICAgICAgfQ0K PiA+ICsgICAgICAgfSwNCj4gPiArICAgICAgIHsNCj4gPiArICAgICAgIC5pbml0ID0gaW1nX2hh c2hfaW5pdCwNCj4gPiArICAgICAgIC51cGRhdGUgPSBpbWdfaGFzaF91cGRhdGUsDQo+ID4gKyAg ICAgICAuZmluYWwgPSBpbWdfaGFzaF9maW5hbCwNCj4gPiArICAgICAgIC5maW51cCA9IGltZ19o YXNoX2ZpbnVwLA0KPiA+ICsgICAgICAgLmRpZ2VzdCA9IGltZ19oYXNoX2RpZ2VzdCwNCj4gPiAr ICAgICAgIC5oYWxnID0gew0KPiA+ICsgICAgICAgICAgICAgICAuZGlnZXN0c2l6ZSA9IFNIQTIy NF9ESUdFU1RfU0laRSwNCj4gPiArICAgICAgICAgICAgICAgLmJhc2UgPSB7DQo+ID4gKyAgICAg ICAgICAgICAgICAgICAgICAgLmNyYV9uYW1lID0gInNoYTIyNCIsDQo+ID4gKyAgICAgICAgICAg ICAgICAgICAgICAgLmNyYV9kcml2ZXJfbmFtZSA9ICJpbWctc2hhMjI0IiwNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgICAuY3JhX3ByaW9yaXR5ID0gMzAwMCwNCj4gPiArICAgICAgICAgICAg ICAgICAgICAgICAuY3JhX2ZsYWdzID0NCj4gPiArICAgICAgICAgICAgICAgICAgICAgICBDUllQ VE9fQUxHX0FTWU5DIHwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICBDUllQVE9fQUxHX05F RURfRkFMTEJBQ0ssDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgLmNyYV9ibG9ja3NpemUg PSBTSEEyMjRfQkxPQ0tfU0laRSwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAuY3JhX2N0 eHNpemUgPSBzaXplb2Yoc3RydWN0IGltZ19oYXNoX2N0eCksDQo+ID4gKyAgICAgICAgICAgICAg ICAgICAgICAgLmNyYV9pbml0ID0gaW1nX2NyYV9zaGEyMjRfaW5pdCwNCj4gPiArICAgICAgICAg ICAgICAgICAgICAgICAuY3JhX2V4aXQgPSBpbWdfaGFzaF9jcmFfZXhpdCwNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgICAuY3JhX21vZHVsZSA9IFRISVNfTU9EVUxFLA0KPiA+ICsgICAgICAg ICAgICAgICAgICAgICAgIH0NCj4gPiArICAgICAgICAgICAgICAgfQ0KPiA+ICsgICAgICAgfSwN Cj4gPiArICAgICAgIHsNCj4gPiArICAgICAgIC5pbml0ID0gaW1nX2hhc2hfaW5pdCwNCj4gPiAr ICAgICAgIC51cGRhdGUgPSBpbWdfaGFzaF91cGRhdGUsDQo+ID4gKyAgICAgICAuZmluYWwgPSBp bWdfaGFzaF9maW5hbCwNCj4gPiArICAgICAgIC5maW51cCA9IGltZ19oYXNoX2ZpbnVwLA0KPiA+ ICsgICAgICAgLmRpZ2VzdCA9IGltZ19oYXNoX2RpZ2VzdCwNCj4gPiArICAgICAgIC5oYWxnID0g ew0KPiA+ICsgICAgICAgICAgICAgICAuZGlnZXN0c2l6ZSA9IFNIQTI1Nl9ESUdFU1RfU0laRSwN Cj4gPiArICAgICAgICAgICAgICAgLmJhc2UgPSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAg ICAgLmNyYV9uYW1lID0gInNoYTI1NiIsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgLmNy YV9kcml2ZXJfbmFtZSA9ICJpbWctc2hhMjU2IiwNCj4gPiArICAgICAgICAgICAgICAgICAgICAg ICAuY3JhX3ByaW9yaXR5ID0gMzAxLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIC5jcmFf ZmxhZ3MgPQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIENSWVBUT19BTEdfQVNZTkMgfA0K PiA+ICsgICAgICAgICAgICAgICAgICAgICAgIENSWVBUT19BTEdfTkVFRF9GQUxMQkFDSywNCj4g PiArICAgICAgICAgICAgICAgICAgICAgICAuY3JhX2Jsb2Nrc2l6ZSA9IFNIQTI1Nl9CTE9DS19T SVpFLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIC5jcmFfY3R4c2l6ZSA9IHNpemVvZihz dHJ1Y3QgaW1nX2hhc2hfY3R4KSwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAuY3JhX2lu aXQgPSBpbWdfY3JhX3NoYTI1Nl9pbml0LA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIC5j cmFfZXhpdCA9IGltZ19oYXNoX2NyYV9leGl0LA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg IC5jcmFfbW9kdWxlID0gVEhJU19NT0RVTEUsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAg fQ0KPiA+ICsgICAgICAgICAgICAgICB9DQo+ID4gKyAgICAgICB9DQo+ID4gK307DQo+ID4gKw0K PiA+ICtzdGF0aWMgaW50IGltZ19yZWdpc3Rlcl9hbGdzKHN0cnVjdCBpbWdfaGFzaF9kZXYgKmhk ZXYpDQo+ID4gK3sNCj4gPiAr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fRE1B X1JFQURZICYgaGRldi0+ZmxhZ3MpIHsNCj4gPiArICAgICAgICAgICAgICAgaWYgKERSSVZFUl9G TEFHU19ETUFfQUNUSVZFICYgaGRldi0+ZmxhZ3MpIHsNCj4gPiArICAgICAgICAgICAgICAgICAg ICAgICBoZGV2LT5mbGFncyAmPSB+RFJJVkVSX0ZMQUdTX0RNQV9BQ1RJVkU7DQo+ID4gKyAgICAg ICAgICAgICAgICAgICAgICAgaW1nX2hhc2hfdXBkYXRlX2RtYV9zdG9wKGhkZXYpOw0KPiA+ICsg ICAgICAgICAgICAgICAgICAgICAgIGlmIChoZGV2LT5lcnIpIHsNCj4gPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGVyciA9IGhkZXYtPmVycjsNCj4gPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGdvdG8gZmluaXNoOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg IH0NCj4gPiArICAgICAgICAgICAgICAgfQ0KPiA+ICsgICAgICAgICAgICAgICBpZiAoRFJJVkVS X0ZMQUdTX09VVFBVVF9SRUFEWSAmIGhkZXYtPmZsYWdzKSB7DQo+ID4gKyAgICAgICAgICAgICAg ICAgICAgICAgaGRldi0+ZmxhZ3MgJj0gfihEUklWRVJfRkxBR1NfRE1BX1JFQURZIHwNCj4gPiAr ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRFJJVkVSX0ZMQUdTX09VVFBV VF9SRUFEWSk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgZ290byBmaW5pc2g7DQo+ID4g KyAgICAgICAgICAgICAgIH0NCj4gPiArICAgICAgIH0NCj4gPiArICAgICAgIHJldHVybjsNCj4g PiArDQo+ID4gK2ZpbmlzaDoNCj4gPiArICAgICAgIGltZ19oYXNoX2ZpbmlzaF9yZXEoaGRldi0+ cmVxLCBlcnIpOw0KPiA+ICt9DQo+ID4gKw0KPiA+ICtzdGF0aWMgdm9pZCBpbWdfaGFz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KGN0eC0+YnVmY250IDwgNCkpIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAg ICBsZW4gPSBjdHgtPnNnLT5sZW5ndGg7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgaWYg KGxpa2VseShsZW4gPiAoNCAtIGN0eC0+YnVmY250KSkpDQo+ID4gKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBsZW4gPSA0IC0gY3R4LT5idWZjbnQ7DQo+ID4gKyAgICAgICAgICAgICAg ICAgICAgICAgdGJjID0gc2dfcGNvcHlfdG9fYnVmZmVyKGN0eC0+c2dmaXJzdCwgY3R4LT5uZW50 cywNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4LT5idWZm ZXIgKyBjdHgtPmJ1ZmNudCwgbGVuLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBjdHgtPnNlbnQgKyBjdHgtPmJ1ZmNudCk7DQo+ID4gKyAgICAgICAgICAgICAg ICAgICAgICAgY3R4LT5idWZjbnQgKz0gdGJjOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg IGlmICh0YmMgPj0gY3R4LT5zZy0+bGVuZ3RoKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBjdHgtPnNnID0gc2dfbmV4dChjdHgtPnNnKTsNCj4gPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHRiYyA9IDA7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAg fQ0KPiA+ICsgICAgICAgICAgICAgICB9DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgICBjdHgt PnNlbnQgKz0gY3R4LT5idWZjbnQ7DQo+ID4gKyAgICAgICAgICAgICAgIGN0eC0+b2Zmc2V0ID0g dGJjOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgICAgaWYgKCFic2VuZCkNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgICBpbWd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Ar ICAgICAgIGhkZXYtPmNwdV9hZGRyID0gZGV2bV9pb3JlbWFwX3Jlc291cmNlKGRldiwgaGFzaF9y ZXMpOw0KPiANCj4gTmVlZCB0byBjaGVjayByZXR1cm4gdmFsdWUuDQoNCkRvbmUNCg0KPiANCj4g PiArICAgICAgIGhkZXYtPmlycSA9IHBsYXRmb3JtX2dldF9pcnEocGRldiwgMCk7DQo+ID4gKyAg ICAgICBpZiAoaGRldi0+aXJxIDwgMCkgew0KPiA+ICsgICAgICAgICAgICAgICBkZXZfZXJyKGRl diwgIm5vIElSUSByZXNvdXJjZSBpbmZvXG4iKTsNCj4gPiArICAgICAgICAgICAgICAgZXJyID0g aGRldi0+aXJxOw0KPiA+ICsgICAgICAgICAgICAgICBnb3RvIHJlc19lcnI7DQo+ID4gKyAgICAg ICB9DQo+ID4gKw0KPiA+ICsgICAgICAgZXJyID0gZGV2bV9yZXF1ZXN0X2lycShkZXYsIGhkZXYt PmlycSwgaW1nX2lycV9oYW5kbGVyLCAwLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICJp bWctaGFzaC1hY2NlbGVyYXRvci1yZXYxIiwgaGRldik7DQo+IA0KPiBZb3UgY291bGQgdXNlIGRl dl9uYW1lKGRldikuDQoNCkFoIG9rIC0gZG9uZQ0KDQo+IA0KPiA+ICsgICAgICAgaWYgKGVycikg ew0KPiA+ICsgICAgICAgICAgICAgICBkZXZfZXJyKGRldiwgInVuYWJsZSB0byByZXF1ZXN0IGlt Zy1oYXNoLWFjY2VsZXJhdG9yIGlycVxuIik7DQo+ID4gKyAgICAgICAgICAgICAgIGdvdG8gcmVz X2VycjsNCj4gPiArICAgICAgIH0NCj4gPiArICAgICAgIGRldl9pbmZvKGRldiwgInVzaW5nIElS USBjaGFubmVsICVkXG4iLCBoZGV2LT5pcnEpOw0KPiANCj4gZGV2X2luZm8oKSBpcyBhIGJpdCBt dWNoLiAgTWF5YmUganVzdCByZW1vdmUgaXQgb3IgbWFrZSBpdCBkZXZf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