From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from thebe.hi.pengutronix.de ([2001:67c:670:100:5e26:aff:fe2b:7cc4] helo=thebe) by metis.ext.pengutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1bwUXl-00062Y-Fv for ptxdist@pengutronix.de; Tue, 18 Oct 2016 15:35:01 +0200 From: Juergen Borleis Date: Tue, 18 Oct 2016 15:36:25 +0200 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201610181536.26042.jbe@pengutronix.de> Subject: [ptxdist] valgrind: add support for compressed debug-info List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de UFRYZGlzdCBzZXBhcmF0ZXMgdGhlIGRlYnVnLWluZm8gZnJvbSB0aGUgcHJvZ3JhbXMgYW5kIGxp YnJhcmllcyBhbmQKcHJvdmlkZXMgdGhlbSBpbiBhIC5kZWJ1ZyBzdWItZGlyZWN0b3J5IG5lYXIg dGhlIHByb2dyYW1zIGFuZCBsaWJyYXJpZXMKaW4gYSBjb21wcmVzc2VkIG1hbm5lciAodG9vbGNo YWluIGZlYXR1cmUpLgpUaGlzIGNoYW5nZSBlbmFibGVzIHZhbGdyaW5kIHRvIHN0aWxsIHVzZSB0 aGUgY29tcHJlc3NlZCBkZWJ1Zy1pbmZvIHRvCmltcHJvdmUgaXRzIG91dHB1dCBsb2dzLgoKTm90 ZTogdGhpcyBuZXcgcGF0Y2ggY2FuIGJlIHJlbW92ZWQgYWdhaW4gb24gdGhlIG5leHQgcmVsZWFz ZSBvZiB2YWxncmluZC4KICAgIApTaWduZWQtb2ZmLWJ5OiBKdWVyZ2VuIEJvcmxlaXMgPGpiZUBw ZW5ndXRyb25peC5kZT4KCmRpZmYgLS1naXQgYS9wYXRjaGVzL3ZhbGd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ICAgcmV0dXJuICZpbWctPmNzbGNbaV07CisrICAgfQorKyAgIHJldHVybiBO VUxMOworK30KKysKKyAvKiBBbGxvY2F0ZSBhIG5ldyBDRW50LCBjb25uZWN0IGl0IHRvIHxpbWd8 LCBhbmQgcmV0dXJuIGl0cyBpbmRleC4gKi8KKy1zdGF0aWMgVUludCBhbGxvY19DRW50ICggRGlJ bWFnZSogaW1nICkKKytzdGF0aWMgVUludCBhbGxvY19DRW50ICggRGlJbWFnZSogaW1nLCBTaXpl VCBzekIgKQorIHsKKy0gICB2Z19hc3NlcnQoaW1nKTsKKysgICB2Z19hc3NlcnQoaW1nICE9IE5V TEwpOworICAgIHZnX2Fzc2VydChpbWctPmNlc191c2VkIDwgQ0FDSEVfTl9FTlRSSUVTKTsKKysg ICB2Z19hc3NlcnQoc3pCID49IENBQ0hFX0VOVFJZX1NJWkUpOworICAgIFVJbnQgZW50Tm8gPSBp bWctPmNlc191c2VkOworICAgIGltZy0+Y2VzX3VzZWQrKzsKKyAgICB2Z19hc3NlcnQoaW1nLT5j ZXNbZW50Tm9dID09IE5VTEwpOworLSAgIGltZy0+Y2VzW2VudE5vXSA9IE1MXyhkaW5mb196YWxs b2MpKCJkaS5hbGxvY19DRW50LjEiLCBzaXplb2YoQ0VudCkpOworKyAgIGltZy0+Y2VzW2VudE5v XSA9IE1MXyhkaW5mb196YWxsb2MpKCJkaS5hbGxvY19DRW50LjEiLAorKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldG9mKENFbnQsIGRhdGEpICsgc3pCKTsKKysg ICBpbWctPmNlc1tlbnROb10tPnNpemUgPSBzekI7CisgICAgcmV0dXJuIGVudE5vOworIH0KKyAK KytzdGF0aWMgdm9pZCByZWFsbG9jX0NFbnQgKCBEaUltYWdlKiBpbWcsIFVJbnQgZW50Tm8sIFNp emVUIHN6QiApIHsKKysgICB2Z19hc3NlcnQoaW1nICE9IE5VTEwpOworKyAgIHZnX2Fzc2VydChz ekIgP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mZiApCisgICAgaWYgKGkgPT0gaW1nLT5jZXNfdXNlZCkgeworICAgICAg IC8qIEl0J3Mgbm90IGluIGFueSBlbnRyeS4gIEVpdGhlciBhbGxvY2F0ZSBhIG5ldyBlbnRyeSBv cgorICAgICAgICAgIHJlY3ljbGUgdGhlIExSVSBvbmUuICovCisrCisrICAgICAgQ1NsYyogY3Ns YyA9IGZpbmRfY3NsYyhpbWcsIG9mZik7CisrICAgICAgVUNoYXIqIGJ1ZiA9IE5VTEw7CisrICAg ICAgaWYgKGNzbGMgIT0gTlVMTCkgeworKyAgICAgICAgIFNpemVUIGxlbiA9IDA7CisrICAgICAg ICAgYnVmID0gTUxfKGRpbmZvX3phbGxvYykoImRpLmltYWdlLmdldF9zbG93Y2FzZS4xIiwgY3Ns Yy0+c3pDKTsKKysgICAgICAgICAvLyBnZXQgY29tcHJlc3NlZCBkYXRhCisrICAgICAgICAgd2hp bGUgKGxlbiA8IGNzbGMtPnN6QykKKysgICAgICAgICAgICBsZW4gKz0gTUxfKGltZ19nZXRfc29t ZSkoYnVmICsgbGVuLCBpbWcsIGNzbGMtPm9mZkMgKyBsZW4sCisrICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGNzbGMtPnN6QyAtIGxlbik7CisrICAgICAgfQorKworICAgICAg IGlmIChpbWctPmNlc191c2VkID09IENBQ0hFX05fRU5UUklFUykgeworICAgICAgICAgIC8qIEFs bCBlbnRyaWVzIGluIHVzZS4gIFJlY3ljbGUgdGhlIChvc3RlbnNpYmx5KSBMUlUgb25lLiAqLwor LSAgICAgICAgIHNldF9DRW50KGltZywgQ0FDSEVfTl9FTlRSSUVTLTEsIG9mZik7CisgICAgICAg ICAgaSA9IENBQ0hFX05fRU5UUklFUy0xOworKyAgICAgICAgIGlmICgoY3NsYyAhPSBOVUxMKSAm JiAoY3NsYy0+c3pEID4gaW1nLT5jZXNbaV0tPnNpemUpKQorKyAgICAgICAgICAgIHJlYWxsb2Nf Q0VudChpbWcsIGksIGNzbGMtPnN6RCk7CisgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAvKiBB bGxvY2F0ZSBhIG5ldyBvbmUsIGFuZCBmaWxsIGl0IGluLiAqLworLSAgICAgICAgIFVJbnQgZW50 Tm8gPSBhbGxvY19DRW50KGltZyk7CistICAgICAgICAgc2V0X0NFbnQoaW1nLCBlbnRObywgb2Zm KTsKKy0gICAgICAgICBpID0gZW50Tm87CisrICAgICAgICAgU2l6ZVQgc2l6ZSA9IENBQ0hFX0VO VFJZX1NJWkU7CisrICAgICAgICAgaWYgKChjc2xjICE9IE5VTEwpICYmIChjc2xjLT5zekQgPiBD QUNIRV9FTlRSWV9TSVpFKSkKKysgICAgICAgICAgICBzaXplID0gY3NsYy0+c3pEOworKyAgICAg ICAgIGkgPSBhbGxvY19DRW50KGltZywgc2l6ZSk7CisrICAgICAgfQorKworKyAgICAgIGlmIChj c2xjICE9IE5VTEwpIHsKKysgICAgICAgICBTaXplVCBsZW4gPSB0aW5mbF9kZWNvbXByZXNzX21l bV90b19tZW0oCisrICAgICAgICAgICAgICAgICAgICAgICAgaW1nLT5jZXNbaV0tPmRhdGEsIGNz bGMtPnN6RCwKKysgICAgICAgICAgICAgICAgICAgICAgICBidWYsIGNzbGMtPnN6QywKKysgICAg ICAgICAgICAgICAgICAgICAgICBUSU5GTF9GTEFHX1VTSU5HX05PTl9XUkFQUElOR19PVVRQVVRf QlVGCisrICAgICAgICAgICAgICAgICAgICAgICAgfCBUSU5GTF9GTEFHX1BBUlNFX1pMSUJfSEVB REVSKTsKKysgICAgICAgICB2Z19hc3NlcnQobGVuID09IGNzbGMtPnN6RCk7CisrICAgICAgICAg aW1nLT5jZXNbaV0tPnVzZWQgPSBjc2xjLT5zekQ7CisrICAgICAgICAgaW1nLT5jZXNbaV0tPm9m ZiA9IGNzbGMtPm9mZkQ7CisrICAgICAgICAgTUxfKGRpbmZvX2ZyZWUpKGJ1Zik7CisrICAgICAg fSBlbHNlIHsKKysgICAgICAgICBzZXRfQ0VudChpbWcsIGksIG9mZik7CisgICAgICAgfQorKwor ICAgIH0gZWxzZSB7CisgICAgICAgLyogV2UgZm91bmQgaXQgYXQgcG9zaXRpb24gJ2knLiAqLwor ICAgICAgIHZnX2Fzc2VydChpID4gMCk7CitAQCAtNjI2LDE1ICs3MDMsMTkgQEAgRGlJbWFnZSog TUxfKGltZ19mcm9tX2xvY2FsX2ZpbGUpKGNvbnN0IEhDaGFyKiBmdWxscGF0aCkKKyAgICAgICAg fHwgLyogc2l6ZSBpcyB1bnJlcHJlc2VudGFibGUgYXMgYSBTaXplVCAqLworICAgICAgICAgICBz aXplICE9IChEaU9mZlQpKFNpemVUKShzaXplKSkgeworICAgICAgIFZHXyhjbG9zZSkoc3JfUmVz KGZkKSk7CistICAgICAgcmV0dXJuIE5VTEw7IAorKyAgICAgIHJldHVybiBOVUxMOworICAgIH0K KyAKKyAgICBEaUltYWdlKiBpbWcgPSBNTF8oZGluZm9femFsbG9jKSgiZGkuaW1hZ2UuTUxfaWZs Zi4xIiwgc2l6ZW9mKERpSW1hZ2UpKTsKKyAgICBpbWctPnNvdXJjZS5pc19sb2NhbCA9IFRydWU7 CisgICAgaW1nLT5zb3VyY2UuZmQgICAgICAgPSBzcl9SZXMoZmQpOworICAgIGltZy0+c2l6ZSAg ICAgICAgICAgID0gc2l6ZTsKKysgICBpbWctPnJlYWxfc2l6ZSAgICAgICA9IHNpemU7CisgICAg aW1nLT5jZXNfdXNlZCAgICAgICAgPSAwOworICAgIGltZy0+c291cmNlLm5hbWUgICAgID0gTUxf KGRpbmZvX3N0cmR1cCkoImRpLmltYWdlLk1MX2lmbGYuMiIsIGZ1bGxwYXRoKTsKKysgICBpbWct PmNzbGMgICAgICAgICAgICA9IE5VTEw7CisrICAgaW1nLT5jc2xjX3NpemUgICAgICAgPSAwOwor KyAgIGltZy0+Y3NsY191c2VkICAgICAgID0gMDsKKyAgICAvKiBpbWctPmNlcyBpcyBhbHJlYWR5 IHplcm9lZCBvdXQgKi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ZGlfc2VydmVyKShj b25zdCBIQ2hhciogZmlsZW5hbWUsCisgCisgICAgLyogU2VlIGNvbW1lbnQgb24gZXF1aXZhbGVu dCBiaXQgaW4gTUxfKGltZ19mcm9tX2xvY2FsX2ZpbGUpIGZvcgorICAgICAgIHJhdGlvbmFsZS4g Ki8KKy0gICBVSW50IGVudE5vID0gYWxsb2NfQ0VudChpbWcpOworKyAgIFVJbnQgZW50Tm8gPSBh bGxvY19DRW50KGltZywgQ0FDSEVfRU5UUllfU0laRSk7CisgICAgdmdfYXNzZXJ0KGVudE5vID09 IDApOworICAgIHNldF9DRW50KGltZywgMCwgMCk7CisgCitAQCAtNzU2LDkgKzgzNywzMiBAQCBE aUltYWdlKiBNTF8oaW1nX2Zyb21fZGlfc2VydmVyKShjb25zdCBIQ2hhciogZmlsZW5hbWUsCisg ICAgcmV0dXJuIE5VTEw7CisgfQorIAorK0RpT2ZmVCBNTF8oaW1nX21hcmtfY29tcHJlc3NlZF9w YXJ0KShEaUltYWdlKiBpbWcsIERpT2ZmVCBvZmZzZXQsIFNpemVUIHN6QywKKysgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgU2l6ZVQgc3pEKQorK3sKKysgICBEaU9mZlQgcmV0 OworKyAgIHZnX2Fzc2VydChpbWcgIT0gTlVMTCk7CisrICAgdmdfYXNzZXJ0KG9mZnNldCArIHN6 QyA8PSBpbWctPnNpemUpOworKworKyAgIGlmIChpbWctPmNzbGNfdXNlZCA9PSBpbWctPmNzbGNf c2l6ZSkgeworKyAgICAgIGltZy0+Y3NsY19zaXplICs9IENPTU1QUkVTU0VEX1NMSUNFX0FSUkFZ X0dST1dfU0laRTsKKysgICAgICBpbWctPmNzbGMgPSBNTF8oZGluZm9fcmVhbGxvYykoImRpLmlt YWdlLk1MX2ltZ19tYXJrX2NvbXByZXNzZWRfcGFydC4xIiwKKysgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgaW1nLT5jc2xjLCBpbWctPmNzbG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iICAgICAgICAvKiAnY29zIEVM RiBjb250YWlucyBEV0FSRiAqLworICNpbmNsdWRlICJwcml2X3JlYWRkd2FyZjMuaCIKKyAjaW5j bHVkZSAicHJpdl9yZWFkZXhpZHguaCIKKysjaW5jbHVkZSAiY29uZmlnLmgiCisgCisgLyogLS0t ICEhISAtLS0gRVhURVJOQUwgSEVBREVSUyBzdGFydCAtLS0gISEhIC0tLSAqLworICNpbmNsdWRl IDxlbGYuaD4KK0BAIC01OSw2ICs2MCwzMyBAQAorICNlbmRpZgorIC8qIC0tLSAhISEgLS0tIEVY VEVSTkFMIEhFQURFUlMgZW5kIC0tLSAhISEgLS0tICovCisgCisrI2lmICFkZWZpbmVkKEhBVkVf RUxGMzJfQ0hEUikKKysgICB0eXBlZGVmIHN0cnVjdCB7CisrICAgICAgRWxmMzJfV29yZCAgY2hf dHlwZTsKKysgICAgICBFbGYzMl9Xb3JkICBjaF9zaXplOworKyAgICAgIEVsZjMyX1dvcmQgIGNo X2FkZHJhbGlnbjsKKysgICB9IEVsZjMyX0NoZHI7CisrI2VuZGlmCisrCisrI2lmICFkZWZpbmVk KEhBVkVfRUxGNjRfQ0hEUikKKysgICB0eXBlZGVmIHN0cnVjdCB7CisrICAgICAgRWxmNjRfV29y ZCAgY2hfdHlwZTsKKysgICAgICBFbGY2NF9Xb3JkICBjaF9yZXNlcnZlZDsKKysgICAgICBFbGY2 NF9Yd29yZCBjaF9zaXplOworKyAgICAgIEVsZjY0X1h3b3JkIGNoX2FkZHJhbGlnbjsKKysgICB9 IEVsZjY0X0NoZHI7CisrI2VuZGlmCisrCisrI2lmICFkZWZpbmVkKFNIRl9DT01QUkVTU0VEKQor KyAgICNkZWZpbmUgU0hGX0NPTVBSRVNTRUQgKDEgPDwgMTEpCisrI2VuZGlmCisrCisrI2lmICFk ZWZpbmVkKEVMRkNPTVBSRVNTX1pMSUIpCisrICAgI2RlZmluZSBFTEZDT01QUkVTU19aTElCIDEK KysjZW5kaWYKKysKKysjZGVmaW5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N2bWEgKyBkaS0+dGV4dF9zaXplKSB7CisgICAgICAgKmlzX3RleHRfb3V0 ID0gVHJ1ZTsKKyAgICAgICAoKnN5bV9hdm1hc19vdXQpLm1haW4gKz0gdGV4dF9iaWFzOworICAg IH0gZWxzZQorICAgIGlmIChkaS0+ZGF0YV9wcmVzZW50CisgICAgICAgICYmIGRpLT5kYXRhX3Np emUgPiAwCistICAgICAgICYmIHN5bV9zdm1hID49IGRhdGFfc3ZtYSAKKysgICAgICAgJiYgc3lt X3N2bWEgPj0gZGF0YV9zdm1hCisgICAgICAgICYmIHN5bV9zdm1hIDwgZGF0YV9zdm1hICsgZGkt PmRhdGFfc2l6ZSkgeworICAgICAgICppc190ZXh0X291dCA9IEZhbHNlOworICAgICAgICgqc3lt X2F2bWFzX291dCkubWFpbiArPSBkYXRhX2JpYXM7CisgICAgfSBlbHNlCisgICAgaWYgKGRpLT5z ZGF0YV9wcmVzZW50CisgICAgICAgICYmIGRpLT5zZGF0YV9zaXplID4gMAorLSAgICAgICAmJiBz eW1fc3ZtYSA+PSBzZGF0YV9zdm1hIAorKyAgICAgICAmJiBzeW1fc3ZtYSA+PSBzZGF0YV9zdm1h CisgICAgICAgICYmIHN5bV9zdm1hIDwgc2RhdGFfc3ZtYSArIGRpLT5zZGF0YV9zaXplKSB7Cisg ICAgICAgKmlzX3RleHRfb3V0ID0gRmFsc2U7CisgICAgICAgKCpzeW1fYXZtYXNfb3V0KS5tYWlu ICs9IHNkYXRhX2JpYXM7CisgICAgfSBlbHNlCisgICAgaWYgKGRpLT5yb2RhdGFfcHJlc2VudAor ICAgICAgICAmJiBkaS0+cm9kYXRhX3NpemUgPiAwCistICAgICAgICYmIHN5bV9zdm1hID49IHJv ZGF0YV9zdm1hIAorKyAgICAgICAmJiBzeW1fc3ZtYSA+PSByb2RhdGFfc3ZtYQorICAgICAgICAm JiBzeW1fc3ZtYSA8IHJvZGF0YV9zdm1hICsgZGktPnJvZGF0YV9zaXplKSB7CisgICAgICAgKmlz X3RleHRfb3V0ID0gRmFsc2U7CisgICAgICAgKCpzeW1fYXZtYXNfb3V0KS5tYWluICs9IHJvZGF0 YV9iaWFzOworICAgIH0gZWxzZQorICAgIGlmIChkaS0+YnNzX3ByZXNlbnQKKyAgICAgICAgJiYg ZGktPmJzc19zaXplID4gMAorLSAgICAgICAmJiBzeW1fc3ZtYSA+PSBic3Nfc3ZtYSAKKysgICAg ICAgJiYgc3ltX3N2bWEgPj0gYnNzX3N2bWEKKyAgICAgICAgJiYgc3ltX3N2bWEgPCBic3Nfc3Zt YSArIGRpLT5ic3Nfc2l6ZSkgeworICAgICAgICppc190ZXh0X291dCA9IEZhbHNlOworICAgICAg ICgqc3ltX2F2bWFzX291dCkubWFpbiArPSBic3NfYmlhczsKKyAgICB9IGVsc2UKKyAgICBpZiAo ZGktPnNic3NfcHJlc2VudAorICAgICAgICAmJiBkaS0+c2Jzc19zaXplID4gMAorLSAgICAgICAm JiBzeW1fc3ZtYSA+PSBzYnNzX3N2bWEgCisrICAgICAgICYmIHN5bV9zdm1hID49IHNic3Nfc3Zt YQorICAgICAgICAmJiBzeW1fc3ZtYSA8IHNic3Nfc3ZtYSArIGRpLT5zYnNzX3NpemUpIHsKKyAg ICAgICAqaXNfdGV4dF9vdXQgPSBGYWxzZTsKKyAgICAgICAoKnN5bV9hdm1hc19vdXQpLm1haW4g Kz0gc2Jzc19iaWFzOworQEAgLTQ1Niw3ICs0ODYsNyBAQCBCb29sIGdldF9lbGZfc3ltYm9sX2lu Zm8gKAorICAgICAgIHN5bWJvbCBkZWZpbmVkIGVsc2V3aGVyZSwgc28gaWdub3JlIGl0LiAqLwor ICAgIGlmIChkaS0+Z290X3ByZXNlbnQKKyAgICAgICAgJiYgZGktPmdvdF9zaXplID4gMAorLSAg ICAgICAmJiAoKnN5bV9hdm1hc19vdXQpLm1haW4gPj0gZGktPmdvdF9hdm1hIAorKyAgICAgICAm JiAoKnN5bV9hdm1hc19vdXQpLm1haW4gPj0gZGktPmdvdF9hdm1hCisgICAgICAgICYmICgqc3lt X2F2bWFzX291dCkubWFpbiA8ICBkaS0+Z290X2F2bWEgKyBkaS0+Z290X3NpemUpIHsKKyAgICAg ICBpZiAoVFJBQ0VfU1lNVEFCX0VOQUJMRUQpIHsKKyAgICAgICAgICBIQ2hhciogc3ltX25hbWUg PSBNTF8oaW1nX3N0cmR1cCkoZXNjbl9zdHJ0YWItPmltZywKK0BAIC01MDksNyArNTM5LDcgQEAg Qm9vbCBnZXRfZWxmX3N5bWJvbF9pbmZvICgKKyAgICAgICBCb29sICAgZGV0YWlscyA9IDF8fEZh bHNlOworIAorICAgICAgIGlmIChkZXRhaWxzKQorLSAgICAgICAgIFRSQUNFX1NZTVRBQigib3Bk WFhYOiBvcGRfYmlhcyAlcCwgc3ltX3N2bWFfb3V0ICVwXG4iLCAKKysgICAgICAgICBUUkFDRV9T WU1UQUIoIm9wZFhYWDogb3BkX2JpYXMgJXAsIHN5bV9zdm1hX291dCAlcFxuIiwKKyAgICAgICAg ICAgICAgICAgICAgICAgKHZvaWQqKShvcGRfYmlhcyksICh2b2lkKikoKnN5bV9hdm1hc19vdXQp Lm1haW4pOworIAorICAgICAgIGlmICghVkdfSVNfOF9BTElHTkVEKCgqc3ltX2F2bWFzX291dCku bWFpbikpIHsKK0BAIC01NjIsMTAgKzU5MiwxMCBAQCBCb29sIGdldF9lbGZfc3ltYm9sX2luZm8g KAorICAgICAgIE1MXyhpbWdfZ2V0KSgmZm5fZGVzY3JbMF0sIGVzY25fb3BkLT5pbWcsCisgICAg ICAgICAgICAgICAgICAgIGVzY25fb3BkLT5pb2ZmICsgb2Zmc2V0X2luX29wZCwgc2l6ZW9mKGZu X2Rlc2NyKSk7CisgCistICAgICAgaWYgKGRldGFpbHMpIAorLSAgICAgICAgIFRSQUNFX1NZTVRB Qigib3BkWFhZOiBvZmZzZXQgJWQsICBmbl9kZXNjciAlcFxuIiwgCisrICAgICAgaWYgKGRldGFp bHMpCisrICAgICAgICAgVFJBQ0VfU1lNVEFCKCJvcGRYWFk6IG9mZnNldCAlZCwgIGZuX2Rlc2Ny ICVwXG4iLAorICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXRfaW5fb3BkLCBmbl9kZXNjcik7 CistICAgICAgaWYgKGRldGFpbHMpIAorKyAgICAgIGlmIChkZXRhaWxzKQorICAgICAgICAgIFRS QUNFX1NZTVRBQigib3BkWFhaOiAqZm5fZGVzY3IgJXBcbiIsICh2b2lkKikoZm5fZGVzY3JbMF0p KTsKKyAKKyAgICAgICAvKiBvcGRfYmlhcyBpcyB0aGUgd2hhdCB3ZSBoYXZlIHRvIGFkZCB0byBT Vk1BcyBmb3VuZCBpbiAub3BkIHRvCitAQCAtNjAzLDM4ICs2MzMsMzggQEAgQm9vbCBnZXRfZWxm X3N5bWJvbF9pbmZvICgKKyAKKyAgICAvKiBJZiBubyBwYXJ0IG9mIHRoZSBzeW1ib2wgZmFsbHMg d2l0aGluIHRoZSBtYXBwZWQgcmFuZ2UsCisgICAgICAgaWdub3JlIGl0LiAqLworLSAgIAorLSAg IGluX3RleHQgCisrCisrICAgaW5fdGV4dAorICAgICAgID0gZGktPnRleHRfcHJlc2VudAorICAg ICAgICAgJiYgZGktPnRleHRfc2l6ZSA+IDAKKyAgICAgICAgICYmICEoKCpzeW1fYXZtYXNfb3V0 KS5tYWluICsgKnN5bV9zaXplX291dCA8PSBkaS0+dGV4dF9hdm1hCisgICAgICAgICAgICAgIHx8 ICgqc3ltX2F2bWFzX291dCkubWFpbiA+PSBkaS0+dGV4dF9hdm1hICsgZGktPnRleHRfc2l6ZSk7 CisgCistICAgaW5fZGF0YSAKKysgICBpbl9kYXRhCisgICAgICAgPSBkaS0+ZGF0YV9wcmVzZW50 CisgICAgICAgICAmJiBkaS0+ZGF0YV9zaXplID4gMAorICAgICAgICAgJiYgISgoKnN5bV9hdm1h c19vdXQpLm1haW4gKyAqc3ltX3NpemVfb3V0IDw9IGRpLT5kYXRhX2F2bWEKKyAgICAgICAgICAg ICAgfHwgKCpzeW1fYXZtYXNfb3V0KS5tYWluID49IGRpLT5kYXRhX2F2bWEgKyBkaS0+ZGF0YV9z aXplKTsKKyAKKy0gICBpbl9zZGF0YSAKKysgICBpbl9zZGF0YQorICAgICAgID0gZGktPnNkYXRh X3ByZXNlbnQKKyAgICAgICAgICYmIGRpLT5zZGF0YV9zaXplID4gMAorICAgICAgICAgJiYgISgo KnN5bV9hdm1hc19vdXQpLm1haW4gKyAqc3ltX3NpemVfb3V0IDw9IGRpLT5zZGF0YV9hdm1hCisg ICAgICAgICAgICAgIHx8ICgqc3ltX2F2bWFzX291dCkubWFpbiA+PSBkaS0+c2RhdGFfYXZtYSAr IGRpLT5zZGF0YV9zaXplKTsKKyAKKy0gICBpbl9yb2RhdGEgCisrICAgaW5fcm9kYXRhCisgICAg ICAgPSBkaS0+cm9kYXRhX3ByZXNlbnQKKyAgICAgICAgICYmIGRpLT5yb2RhdGFfc2l6ZSA+IDAK KyAgICAgICAgICYmICEoKCpzeW1fYXZtYXNfb3V0KS5tYWluICsgKnN5bV9zaXplX291dCA8PSBk aS0+cm9kYXRhX2F2bWEKKyAgICAgICAgICAgICAgfHwgKCpzeW1fYXZtYXNfb3V0KS5tYWluID49 IGRpLT5yb2RhdGFfYXZtYSArIGRpLT5yb2RhdGFfc2l6ZSk7CisgCistICAgaW5fYnNzIAorKyAg IGluX2JzcworICAgICAgID0gZGktPmJzc19wcmVzZW50CisgICAgICAgICAmJiBkaS0+YnNzX3Np emUgPiAwCisgICAgICAgICAmJiAhKCgqc3ltX2F2bWFzX291dCkubWFpbiArICpzeW1fc2l6ZV9v dXQgPD0gZGktPmJzc19hdm1hCisgICAgICAgICAgICAgIHx8ICgqc3ltX2F2bWFzX291dCkubWFp biA+PSBkaS0+YnNzX2F2bWEgKyBkaS0+YnNzX3NpemUpOworIAorLSAgIGluX3Nic3MgCisrICAg aW5fc2JzcworICAgICAgID0gZGktPnNic3NfcHJlc2VudAorICAgICAgICAgJiYgZGktPnNic3Nf c2l6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luX2RlYnVnLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGVzY25fb3BkLCBkaS0+dGV4dF9iaWFzLAorLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICZzeW1fbmFtZV9yZWFsbHksIAorKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICZzeW1fbmFtZV9yZWFsbHksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JnN5bV9hdm1hc19yZWFsbHksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnN5bV9z aXplLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZmcm9tX29wZCwgJmlzX3RleHQs ICZpc19pZnVuYykpIHsKK0BAIC04MjksNyArODU5LDcgQEAgdm9pZCByZWFkX2VsZl9zeW10YWJf X25vcm1hbCgKKyAgICBwcGM2NGJlLWxpbnV4LCB3aGljaCByZXF1aXJlcyBzcGVjaWFsIHRyZWF0 bWVudC4gKi8KKyAKKyB0eXBlZGVmCistICAgc3RydWN0IHsgCisrICAgc3RydWN0IHsKKyAgICAg ICBBZGRyICAgYWRkcjsKKyAgICAgICBEaU9mZlQgbmFtZTsKKyAgICAgICAvKiBXZSBoYXZlIHRv IHN0b3JlIGFsc28gdGhlIERpSW1hZ2UqIHNvIGFzIHRvIGdpdmUgY29udGV4dCBmb3IKK0BAIC04 NjgsNyArODk4LDcgQEAgdm9pZCByZWFkX2VsZl9zeW10YWJfX3BwYzY0YmVfbGludXgoCisgICAg ICAgICBzdHJ1Y3QgX0RlYnVnSW5mbyogZGksIGNvbnN0IEhDaGFyKiB0YWJfbmFtZSwKKyAgICAg ICAgIERpU2xpY2UqICAgZXNjbl9zeW10YWIsCisgICAgICAgICBEaVNsaWNlKiAgIGVzY25fc3Ry dGFiLAorLSAgICAgICAgRGlTbGljZSogICBlc2NuX29wZCwgLyogcHBjNjRiZS1saW51eCBvbmx5 ICovIAorKyAgICAgICAgRGlTbGljZSogICBlc2NuX29wZCwgLyogcHBjNjRiZS1saW51eCBvbmx5 ICovCisgICAgICAgICBCb29sICAgICAgIHN5bXRhYl9pbl9kZWJ1ZworICAgICAgKQorIHsKK0BA IC04OTAsOCArOTIwLDggQEAgdm9pZCByZWFkX2VsZl9zeW10YWJfX3BwYzY0YmVfbGludXgoCisg ICAgVFJBQ0VfU1lNVEFCKCJcbi0tLSBSZWFkaW5nIChFTEYsIHBwYzY0YmUtbGludXgpICVzICgl bGx1IGVudHJpZXMpIC0tLVxuIiwKKyAgICAgICAgICAgICAgICAgdGFiX25hbWUsIGVzY25fc3lt dGFiLT5zekIvc2l6ZW9mKEVsZlhYX1N5bSkgKTsKKyAKKy0gICBvc2V0ID0gVkdfKE9TZXRHZW5f Q3JlYXRlKSggb2Zmc2V0b2YoVGVtcFN5bSxrZXkpLCAKKy0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKE9TZXRDbXBfdCljbXBfVGVtcFN5bUtleSwgCisrICAgb3NldCA9IFZHXyhPU2V0 R2VuX0NyZWF0ZSkoIG9mZnNldG9mKFRlbXBTeW0sa2V5KSwKKysgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKE9TZXRDbXBfdCljbXBfVGVtcFN5bUtleSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgTUxfKGRpbmZvX3phbGxvYyksICJkaS5yZXNwbC4xIiwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgTUxfKGRpbmZvX2ZyZWUpICk7CisgCitAQCAtOTIwLDcg Kzk1MCw3IEBAIHZvaWQgcmVhZF9lbGZfc3ltdGFiX19wcGM2NGJlX2xpbnV4KAorICAgICAgIGlm IChnZXRfZWxmX3N5bWJvbF9pbmZvKGRpLCAmc3ltLCBzeW1fbmFtZSwgZXNjbl9zdHJ0YWIsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3ltX3N2bWEsIHN5bXRhYl9pbl9kZWJ1ZywK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlc2NuX29wZCwgZGktPnRleHRfYmlhcywK Ky0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmc3ltX25hbWVfcmVhbGx5LCAKKysgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmc3ltX25hbWVfcmVhbGx5LAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICZzeW1fYXZtYXNfcmVhbGx5LAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICZzeW1fc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm ZnJvbV9vcGQsICZpc190ZXh0LCAmaXNfaWZ1bmMpKSB7CitAQCAtOTM4LDcgKzk2OCw3IEBAIHZv aWQgcmVhZF9lbGZfc3ltdGFiX19wcGM2NGJlX2xpbnV4KAorICAgICAgICAgICAgIG1vZGlmeV90 b2NwdHIgPSBGYWxzZTsKKyAgICAgICAgICAgICBvbGRfc2l6ZSAgID0gMDsKKyAKKy0gICAgICAg ICAgICBpZiAocHJldi0+ZnJvbV9vcGQgJiYgIWZyb21fb3BkIAorKyAgICAgICAgICAgIGlmIChw cmV2LT5mcm9tX29wZCAmJiAhZnJvbV9vcGQKKyAgICAgICAgICAgICAgICAgJiYgKHByZXYtPnNp emUgPT0gMjQgfHwgcHJldi0+c2l6ZSA9PSAxNikKKyAgICAgICAgICAgICAgICAgJiYgc3ltX3Np emUgIT0gcHJldi0+c2l6ZSkgeworICAgICAgICAgICAgICAgIC8qIEV4aXN0aW5nIG9uZSBpcyBh biBvcGQtcmVkaXJlY3QsIHdpdGggYSBib2d1cyBzaXplLAorQEAgLTk3Miw3ICsxMDAyLDcgQEAg dm9pZCByZWFkX2VsZl9zeW10YWJfX3BwYzY0YmVfbGludXgoCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgb2xkX3NpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldi0+a2V5 LmFkZHIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldi0+dG9jcHRyLAorLSAgICAg ICAgICAgICAgICAgICAgICAgICAgIHByZXYtPnNpemUsIAorKyAgICAgICAgICAgICAgICAgICAg ICAgICAgIHByZXYtPnNpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldi0+a2V5 Lm5hbWUKKyAgICAgICAgICAgICAgICApOworICAgICAgICAgICAgIH0KK0BAIC0xMDk1LDcgKzEx MjUsNyBAQCBIQ2hhciogZmluZF9idWlsZGlkKERpSW1hZ2UqIGltZywgQm9vbCByZWxfb2ssIEJv b2wgc2VhcmNoX3NoZHJzKQorICAgICAgICAgICAgICAgICAgIFdvcmQgajsKKyAgICAgICAgICAg ICAgICAgICBmb3IgKGogPSAwOyBqIDwgbm90ZS5uX2Rlc2NzejsgaisrKSB7CisgICAgICAgICAg ICAgICAgICAgICAgVUNoYXIgZGVzY19qID0gTUxfKGltZ19nZXRfVUNoYXIpKGltZywgZGVzY19p b2ZmICsgaik7CistICAgICAgICAgICAgICAgICAgICAgVkdfKHNwcmludGYpKGJ1aWxkaWQgKyBW R18oc3RybGVuKShidWlsZGlkKSwgCisrICAgICAgICAgICAgICAgICAgICAgVkdfKHNwcmludGYp KGJ1aWxkaWQgKyBWR18oc3RybGVuKShidWlsZGlkKSwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIiUwMngiLCAoVUludClkZXNjX2opOworICAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICB9CitAQCAtMTEwMyw3ICsxMTMzLDcgQEAgSENoYXIqIGZpbmRfYnVp bGRpZChEaUltYWdlKiBpbWcsIEJvb2wgcmVsX29rLCBCb29sIHNlYXJjaF9zaGRycykKKyAgICAg ICAgICAgICAgICBub3RlX2lvZmYgPSBub3RlX2lvZmYgKyBzaXplb2YoRWxmWFhfTmhkcikKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAoKG5vdGUubl9uYW1lc3ogKyAz KSAmIH4zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArICgobm90ZS5u X2Rlc2NzeiArIDMpICYgfjMpOworLSAgICAgICAgICAgIH0gICAgICAgICAgICAKKysgICAgICAg ICAgICB9CisgICAgICAgICAgfQorICAgICAgIH0KKyAKK0BAIC0xMTM1LDcgKzExNjUsNyBAQCBI Q2hhciogZmluZF9idWlsZGlkKERpSW1hZ2UqIGltZywgQm9vbCByZWxfb2ssIEJvb2wgc2VhcmNo X3NoZHJzKQorICAgICAgICAgICAgICAgICAgIFdvcmQgajsKKyAgICAgICAgICAgICAgICAgICBm b3IgKGogPSAwOyBqIDwgbm90ZS5uX2Rlc2NzejsgaisrKSB7CisgICAgICAgICAgICAgICAgICAg ICAgVUNoYXIgZGVzY19qID0gTUxfKGltZ19nZXRfVUNoYXIpKGltZywgZGVzY19pb2ZmICsgaik7 CistICAgICAgICAgICAgICAgICAgICAgVkdfKHNwcmludGYpKGJ1aWxkaWQgKyBWR18oc3RybGVu KShidWlsZGlkKSwgCisrICAgICAgICAgICAgICAgICAgICAgVkdfKHNwcmludGYpKGJ1aWxkaWQg KyBWR18oc3RybGVuKShidWlsZGlkKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIiUwMngiLCAoVUludClkZXNjX2opOworICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgICAgICB9CitAQCAtMTE0Myw3ICsxMTczLDcgQEAgSENoYXIqIGZpbmRfYnVpbGRpZChEaUlt YWdlKiBpbWcsIEJvb2wgcmVsX29rLCBCb29sIHNlYXJjaF9zaGRycykKKyAgICAgICAgICAgICAg ICBub3RlX2lvZmYgPSBub3RlX2lvZmYgKyBzaXplb2YoRWxmWFhfTmhkcikKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAoKG5vdGUubl9uYW1lc3ogKyAzKSAmIH4zKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArICgobm90ZS5uX2Rlc2NzeiAr IDMpICYgfjMpOworLSAgICAgICAgICAgIH0gICAgICAgICAgICAKKysgICAgICAgICAgICB9Cisg ICAgICAgICAgfQorICAgICAgIH0KKyAgICB9CitAQCAtMTE2Nyw3ICsxMTk3LDcgQEAgc3RhdGlj CisgRGlJbWFnZSogb3Blbl9kZWJ1Z19maWxlKCBjb25zdCBIQ2hhciogbmFtZSwgY29uc3QgSENo YXIqIGJ1aWxkaWQsIFVJbnQgY3JjLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgQm9vbCBy ZWxfb2ssIGNvbnN0IEhDaGFyKiBzZXJ2ZXJBZGRyICkKKyB7CistICAgRGlJbWFnZSogZGltZyAK KysgICBEaUltYWdlKiBkaW1nCisgICAgICA9IHNlcnZlckFkZHIgPyBNTF8oaW1nX2Zyb21fZGlf c2VydmVyKShuYW1lLCBzZXJ2ZXJBZGRyKQorICAgICAgICAgICAgICAgICAgIDogTUxfKGltZ19m cm9tX2xvY2FsX2ZpbGUpKG5hbWUpOworICAgIGlmIChkaW1nID09IE5VTEwpCitAQCAtMTE5MSw4 ICsxMjIxLDggQEAgRGlJbWFnZSogb3Blbl9kZWJ1Z19maWxlKCBjb25zdCBIQ2hhciogbmFtZSwg Y29uc3QgSENoYXIqIGJ1aWxkaWQsIFVJbnQgY3JjLAorICAgICAgIGlmIChkZWJ1Z19idWlsZGlk ID09IE5VTEwgfHwgVkdfKHN0cmNtcCkoYnVpbGRpZCwgZGVidWdfYnVpbGRpZCkgIT0gMCkgewor ICAgICAgICAgIE1MXyhpbWdfZG9uZSkoZGltZyk7CisgICAgICAgICAgaWYgKFZHXyhjbG9fdmVy Ym9zaXR5KSA+IDEpCistICAgICAgICAgICAgVkdfKG1lc3NhZ2UpKFZnX0RlYnVnTXNnLCAKKy0g ICAgICAgICAgICAgICAiICAuLiBidWlsZC1pZCBtaXNtYXRjaCAoZm91bmQgJXMgd2FudGVkICVz KVxuIiwgCisrICAgICAgICAgICAgVkdfKG1lc3NhZ2UpKFZnX0RlYnVnTXNnLAorKyAgICAgICAg ICAgICAgICIgIC4uIGJ1aWxkLWlkIG1pc21hdGNoIChmb3VuZCAlcyB3YW50ZWQgJXMpXG4iLAor ICAgICAgICAgICAgICAgIGRlYnVnX2J1aWxkaWQsIGJ1aWxkaWQpOworICAgICAgICAgIE1MXyhk aW5mb19mcmVlKShkZWJ1Z19idWlsZGlkKTsKKyAgICAgICAgICByZXR1cm4gTlVMTDsKK0BAIC0x MjA1LDcgKzEyMzUsNyBAQCBEaUltYWdlKiBvcGVuX2RlYnVnX2ZpbGUoIGNvbnN0IEhDaGFyKiBu YW1lLCBjb25zdCBIQ2hhciogYnVpbGRpZCwgVUludCBjcmMsCisgICAgICAgaWYgKGNhbGNjcmMg IT0gY3JjKSB7CisgICAgICAgICAgTUxfKGltZ19kb25lKShkaW1nKTsKKyAgICAgICAgICBpZiAo VkdfKGNsb192ZXJib3NpdHkpID4gMSkKKy0gICAgICAgICAgICBWR18obWVzc2FnZSkoVmdfRGVi dWdNc2csIAorKyAgICAgICAgICAgIFZHXyhtZXNzYWdlKShWZ19EZWJ1Z01zZywKKyAgICAgICAg ICAgICAgICAiICAuLiBDUkMgbWlzbWF0Y2ggKGNvbXB1dGVkICUwOHggd2FudGVkICUwOHgpXG4i LCBjYWxjY3JjLCBjcmMpOworICAgICAgICAgIHJldHVybiBOVUxMOworICAgICAgIH0KK0BAIC0x MjEzLDcgKzEyNDMsNyBAQCBEaUltYWdlKiBvcGVuX2RlYnVnX2ZpbGUoIGNvbnN0IEhDaGFyKiBu YW1lLCBjb25zdCBIQ2hhciogYnVpbGRpZCwgVUludCBjcmMsCisgICAgICAgaWYgKFZHXyhjbG9f dmVyYm9zaXR5KSA+IDEpCisgICAgICAgICAgVkdfKG1lc3NhZ2UpKFZnX0RlYnVnTXNnLCAiICAu LiBDUkMgaXMgdmFsaWRcbiIpOworICAgIH0KKy0gICAKKysKKyAgICByZXR1cm4gZGltZzsKKyB9 CisgCitAQCAtMTI3MCw3ICsxMzAwLDcgQEAgRGlJbWFnZ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ZYWF9DaGRyKSk7CisrICAgICAgaWYgKGNoZHIuY2hfdHlwZSAhPSBFTEZDT01QUkVTU19aTElC KQorKyAgICAgICAgIHJldHVybiBGYWxzZTsKKysgICAgICBzLT5pb2ZmID0gTUxfKGltZ19tYXJr X2NvbXByZXNzZWRfcGFydCkocy0+aW1nLAorKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBzLT5pb2ZmICsgc2l6ZW9mKEVsZlhYX0NoZHIpLAorKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzLT5zekIgLSBzaXplb2YoRWxm WFhfQ2hkciksCisrICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChTaXplVCljaGRyLmNoX3NpemUpOworKyAgICAgIHMtPnN6QiA9IGNoZHIuY2hfc2l6ZTsKKysg ICAgfSBlbHNlIGlmIChoLT5zaF9zaXplID4gU0laRV9PRl9aTElCX0hFQURFUikgeworKyAgICAg ICAvKiBSZWFkIHRoZSB6bGliIGhlYWRlci4gIEluIHRoaXMgY2FzZSwgaXQgc2hvdWxkIGJlICJa TElCIgorKyAgICAgICBmb2xsb3dlZCBieSB0aGUgdW5jb21wcmVzc2VkIHNlY3Rpb24gc2l6ZSwg OCBieXRlcyBpbiBCRSBvcmRlci4gKi8KKysgICAgICAgVUNoYXIgdG1wW1NJWkVfT0ZfWkxJQl9I RUFERVJdOworKyAgICAgICBNTF8oaW1nX2dldCkodG1wLCBzLT5pbWcsIHMtPmlvZmYsIFNJWkVf T0ZfWkxJQl9IRUFERVIpOworKyAgICAgICBpZiAoVkdfKG1lbWNtcCkodG1wLCAiWkxJQiIsIDQp ID09IDApIHsKKysgICAgICAgICAgU2l6ZVQgc2l6ZTsKKysjICAgICAgICAgaWYgKFZHX1dPUkRT SVpFID09IDgpCisrICAgICAgICAgICAgIHNpemUgPSB0bXBbNF07IHNpemUgPDw9IDg7CisrICAg ICAgICAgICAgIHNpemUgKz0gdG1wWzVdOyBzaXplIDw8PSA4OworKyAgICAgICAgICAgICBzaXpl ICs9IHRtcFs2XTsgc2l6ZSA8PD0gODsKKysgICAgICAgICAgICAgc2l6ZSArPSB0bXBbN107IHNp emUgPDw9IDg7CisrIyAgICAgICAgIGVsc2UKKysgICAgICAgICAgICAgdmdfYXNzZXJ0KCh0bXBb NF0gPT0gMCkgJiYgKHRtcFs1XSA9PSAwKSAmJiAodG1wWzZdID09IDApCisrICAgICAgICAgICAg ICAgICAgICAgICAmJiAodG1wWzddID09IDApKTsKKysgICAgICAgICAgICAgc2l6ZSA9IDA7Cisr IyAgICAgICAgIGVuZGlmCisrICAgICAgICAgIHNpemUgKz0gdG1wWzhdOyBzaXplIDw8PSA4Owor KyAgICAgICAgICBzaXplICs9IHRtcFs5XTsgc2l6ZSA8PD0gODsKKysgICAgICAgICAgc2l6ZSAr PSB0bXBbMTBdOyBzaXplIDw8PSA4OworKyAgICAgICAgICBzaXplICs9IHRtcFsxMV07CisrICAg ICAgICAgIHMtPmlvZmYgPSBNTF8oaW1nX21hcmtfY29tcHJlc3NlZF9wYXJ0KShzLT5pbWcsCisr ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzLT5pb2Zm ICsgU0laRV9PRl9aTElCX0hFQURFUiwKKysgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHMtPnN6QiAtIFNJWkVfT0ZfWkxJQl9IRUFERVIsCisrICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplKTsKKysgICAg ICAgICAgcy0+c3pCID0gc2l6ZTsKKysgICAgICAgfQorKyAgICB9CisrICAgIHJldHVybiBUcnVl OworK30KKyAKKyAvKiBUaGUgY2VudHJhbCBmdW5jdGlvbiBmb3IgcmVhZGluZyBFTEYgZGVidWcg aW5mby4gIEZvciB0aGUKKyAgICBvYmplY3QvZXhlIHNwZWNpZmllZCBieSB0aGUgRGVidWdJbmZv LCBmaW5kIEVMRiBzZWN0aW9ucywgdGhlbiByZWFkCitAQCAtMTYzOSw3ICsxNzEzLDcgQEAgQm9v bCBNTF8ocmVhZF9lbGZfZGVidWdfaW5mbykgKCBzdHJ1Y3QgX0RlYnVnSW5mbyogZGkgKQorICAg ICAgc2hkcl9zdHJ0YWJfbWlvZmYKKyAgICAgICAgID0gZWhkcl9taW9mZiAvKiBpc24ndCB0aGlz IGFsd2F5cyB6ZXJvPyAqLyArIGFfc2hkci5zaF9vZmZzZXQ7CisgCistICAgICBpZiAoIU1MXyhp bWdfdmFsaWQpKG1pbWcsIHNoZHJfc3RydGFiX21pb2ZmLCAKKysgICAgIGlmICghTUxfKGltZ192 YWxpZCkobWltZywgc2hkcl9zdHJ0YWJfbWlvZmYsCisgICAgICAgICAgICAgICAgICAgICAgICAg IDEvKmJvZ3VzLCBidXQgd2UgZG9uJ3Qga25vdyB0aGUgcmVhbCBzaXplKi8gKSkgeworICAgICAg ICAgTUxfKHN5bWVycikoZGksIFRydWUsICJJbnZhbGlkIEVMRiBTZWN0aW9uIEhlYWRlciBTdHJp bmcgVGFibGUiKTsKKyAgICAgICAgIGdvdG8gb3V0OworQEAgLTE2OTcsNyArMTc3MSw3IEBAIEJv b2wgTUxfKHJlYWRfZWxmX2RlYnVnX2luZm8pICggc3RydWN0IF9EZWJ1Z0luZm8qIGRpICkKKyAg ICAgICAgICAgICAgICAgICAgICAgJiYgbWFwLT5zaXplID4gMCAvKiBzdGF5IHNhbmUgKi8KKyAg ICAgICAgICAgICAgICAgICAgICAgJiYgYV9waGRyLnBfb2Zmc2V0ID49IG1hcC0+Zm9mZgorICAg ICAgICAgICAgICAgICAgICAgICAmJiBhX3BoZHIucF9vZmZzZXQgPCAgbWFwLT5mb2ZmICsgbWFw LT5zaXplCistICAgICAgICAgICAgICAgICAgICAgICYmIGFfcGhkci5wX29mZnNldCArIGFfcGhk ci5wX2ZpbGVzeiAKKysgICAgICAgICA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w ICBuYW1lIFwiJXNcIlxuIiwKKyAgICAgICAgICAgICAgICAgICAgaSwgaW5yeCA/ICJyeCIgOiAi ICAiLCBpbnJ3ID8gInJ3IiA6ICIgICIsIGFseW4sCisgICAgICAgICAgICAgICAgICAgIGZvZmYs IGZvZmYrc2l6ZS0xLCAodm9pZCopc3ZtYSwgbmFtZSk7CisgCitAQCAtMTkxOSwxMCArMTk5Mywx MCBAQCBCb29sIE1MXyhyZWFkX2VsZl9kZWJ1Z19pbmZvKSAoIHN0cnVjdCBfRGVidWdJbmZvKiBk aSApCisgICAgICAgICAgICAgZGktPnRleHRfZGVidWdfc3ZtYSA9IHN2bWE7CisgICAgICAgICAg ICAgZGktPnRleHRfZGVidWdfYmlhcyA9IGlucngtPmJpYXM7CisgICAgICAgICAgICAgVFJBQ0Vf U1lNVEFCKCJhY3F1aXJpbmcgLnRleHQgc3ZtYSA9ICUjbHggLi4gJSNseFxuIiwKKy0gICAgICAg ICAgICAgICAgICAgICAgICAgZGktPnRleHRfc3ZtYSwgCisrICAgICAgICAgICAgICAgICAgICAg ICAgIGRpLT50ZXh0X3N2bWEsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGRpLT50ZXh0X3N2 bWEgKyBkaS0+dGV4dF9zaXplIC0gMSk7CisgICAgICAgICAgICAgVFJBQ0VfU1lNVEFCKCJhY3F1 aXJpbmcgLnRleHQgYXZtYSA9ICUjbHggLi4gJSNseFxuIiwKKy0gICAgICAgICAgICAgICAgICAg ICAgICAgZGktPnRleHRfYXZtYSwgCisrICAgICAgICAgICAgICAgICAgICAgICAgIGRpLT50ZXh0 X2F2bWEsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGRpLT50ZXh0X2F2bWEgKyBkaS0+dGV4 dF9zaXplIC0gMSk7CisgICAgICAgICAgICAgVFJBQ0VfU1lNVEFCKCJhY3F1aXJpbmcgLnRleHQg YmlhcyA9ICUjbHhcbiIsIChVV29yZClkaS0+dGV4dF9iaWFzKTsKKyAgICAgICAgICB9IGVsc2Ug eworQEAgLTIwNjksNyArMjE0Myw3IEBAIEJvb2wgTUxfKHJlYWRfZWxmX2RlYnVnX2luZm8pICgg c3RydWN0IF9EZWJ1Z0luZm8qIGRpICkKKyAgICAgICAgICAgICAgICBWR18obWVzc2FnZSkoVmdf VXNlck1zZywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIldhcm5pbmc6IHRoZSBmb2xs b3dpbmcgZmlsZSdzIC5ic3MgaXMgIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAibWFw cGVkIHIteCBvbmx5IC0gaWdub3JpbmcgLmJzcyBzeW1zXG4iKTsKKy0gICAgICAgICAgICAgICBW R18obWVzc2FnZSkoVmdfVXNlck1zZywgICAiICVzXG4iLCBkaS0+ZnNtLmZpbGVuYW1lIAorKyAg ICAgICAgICAgICAgIFZHXyhtZXNzYWdlKShWZ19Vc2VyTXNnLCAgICIgJXNcbiIsIGRpLT5mc20u ZmlsZW5hbWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA/IGRpLT5mc20uZmlsZW5hbWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6ICIobnVsbD8hKSIgKTsKKyAgICAgICAgICAgICB9 CitAQCAtMjIwMyw3ICsyMjc3LDcgQEAgQm9vbCBNTF8ocmVhZF9lbGZfZGVidWdfaW5mbykgKCBz dHJ1Y3QgX0RlYnVnSW5mbyogZGkgKQorICAgICAgICAgICAgIGRpLT5wbHRfYXZtYSA9IHN2bWEg KyBpbnJ3LT5iaWFzOworICAgICAgICAgICAgIGRpLT5wbHRfc2l6ZSA9IHNpemU7CisgICAgICAg ICAgICAgVFJBQ0VfU1lNVEFCKCJhY3F1aXJpbmcgLnBsdCBhdm1hID0gJSNseFxuIiwgZGktPnBs dF9hdm1hKTsKKy0gICAgICAgICB9IGVsc2UgCisrICAgICAgICAgfSBlbHNlCisgICAgICAgICAg aWYgKCghaW5ydykgJiYgKCFpbnJ4KSAmJiBzaXplID4gMCAmJiAhZGktPnBsdF9wcmVzZW50KSB7 CisgICAgICAgICAgICAgLyogRmlsZSBjb250YWlucyBhIC5wbHQsIGJ1dCBpdCBkaWRuJ3QgZ2V0 IG1hcHBlZC4KKyAgICAgICAgICAgICAgICBQcmVzdW1hYmx5IGl0IGlzIG5vdCByZXF1aXJlZCBv biB0aGlzIHBsYXRmb3JtLiAgQXQKK0BAIC0yMjY1LDEwICsyMzM5LDEwIEBAIEJvb2wgTUxfKHJl YWRfZWxmX2RlYnVnX2luZm8pICggc3RydWN0IF9EZWJ1Z0luZm8qIGRpICkKKyAgICAgICAgICAg ICBkaS0+ZXhpZHhfc2l6ZSA9IHNpemU7CisgICAgICAgICAgICAgZGktPmV4aWR4X2JpYXMgPSBp bnJ4LT5iaWFzOworICAgICAgICAgICAgIFRSQUNFX1NZTVRBQigiYWNxdWlyaW5nIC5leGlkeCBz dm1hID0gJSNseCAuLiAlI2x4XG4iLAorLSAgICAgICAgICAgICAgICAgICAgICAgICBkaS0+ZXhp ZHhfc3ZtYSwgCisrICAgICAgICAgICAgICAgICAgICAgICAgIGRpLT5leGlkeF9zdm1hLAorICAg ICAgICAgICAgICAgICAgICAgICAgICBkaS0+ZXhpZHhfc3ZtYSArIGRpLT5leGlkeF9zaXplIC0g MSk7CisgICAgICAgICAgICAgVFJBQ0VfU1lNVEFCKCJhY3F1aXJpbmcgLmV4aWR4IGF2bWEgPSAl I2x4IC4uICUjbHhcbiIsCistICAgICAgICAgICAgICAgICAgICAgICAgIGRpLT5leGlkeF9hdm1h LCAKKysgICAgICAgICAgICAgICAgICAgICAgICAgZGktPmV4aWR4X2F2bWEsCisgICAgICAgICAg ICAgICAgICAgICAgICAgIGRpLT5leGlkeF9hdm1hICsgZGktPmV4aWR4X3NpemUgLSAxKTsKKyAg ICAgICAgICAgICBUUkFDRV9TWU1UQUIoImFjcXVpcmluZyAuZXhpZHggYmlhcyA9ICUjbHhcbiIs CisgICAgICAgICAgICAgICAgICAgICAgICAgIChVV29yZClkaS0+ZXhpZHhfYmlhcyk7CitAQCAt MjI4OCwxMCArMjM2MiwxMCBAQCBCb29sIE1MXyhyZWFkX2VsZl9kZWJ1Z19pbmZvKSAoIHN0cnVj dCBfRGVidWdJbmZvKiBkaSApCisgICAgICAgICAgICAgZGktPmV4dGFiX3NpemUgPSBzaXplOwor ICAgICAgICAgICAgIGRpLT5leHRhYl9iaWFzID0gaW5yeC0+YmlhczsKKyAgICAgICAgICAgICBU UkFDRV9TWU1UQUIoImFjcXVpcmluZyAuZXh0YWIgc3ZtYSA9ICUjbHggLi4gJSNseFxuIiwKKy0g ICAgICAgICAgICAgICAgICAgICAgICAgZGktPmV4dGFiX3N2bWEsIAorKyAgICAgICAgICAgICAg ICAgICAgICAgICBkaS0+ZXh0YWJfc3ZtYSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZGkt PmV4dGFiX3N2bWEgKyBkaS0+ZXh0YWJfc2l6ZSAtIDEpOworICAgICAgICAgICAgIFRSQUNFX1NZ TVRBQigiYWNxdWlyaW5nIC5leHRhYiBhdm1hID0gJSNseCAuLiAlI2x4XG4iLAorLSAgICAgICAg ICAgICAgICAgICAgICAgICBkaS0+ZXh0YWJfYXZtYSwgCisrICAgICAgICAgICAgICAgICAgICAg ICAgIGRpLT5leHRhYl9hdm1hLAorICAgICAgICAgICAgICAgICAgICAgICAgICBkaS0+ZXh0YWJf YXZtYSArIGRpLT5leHRhYl9zaXplIC0gMSk7CisgICAgICAgICAgICAgVFJBQ0VfU1lNVEFCKCJh Y3F1aXJpbmcgLmV4dGFiIGJpYXMgPSAlI2x4XG4iLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAoVVdvcmQpZGktPmV4dGFiX2JpYXMpOworQEAgLTIzNTQsNyArMjQyOCw3IEBAIEJvb2wgTUxf KHJlYWRfZWxmX2RlYnVnX2luZm8pICggc3RydWN0IF9EZWJ1Z0luZm8qIGRpICkKKyAgICAgICBE aVNsaWNlIGRlYnVnX3N0cl9hbHRfZXNjbiAgPSBEaVNsaWNlX0lOVkFMSUQ7IC8vIC5kZWJ1Z19z dHIgICAgKGFsdCkKKyAgICAgICBEaVNsaWNlIGR3YXJmMWRfZXNjbiAgICAgICAgPSBEaVNsaWNl X0lOVkFMSUQ7IC8vIC5kZWJ1ZyAgICAgICAgKGR3YXJmMSkKKyAgICAgICBEaVNsaWNlIGR3YXJm MWxfZXNjbiAgICAgICAgPSBEaVNsaWNlX0lOVkFMSUQ7IC8vIC5saW5lICAgICAgICAgKGR3YXJm MSkKKy0gICAgICBEaVNsaWNlIG9wZF9lc2NuICAgICAgICAgICAgPSBEaVNsaWNlX0lOVkFMSUQ7 IC8vIC5vcGQgKGR3YXJmMiwgCisrICAgICAgRGlTbGljZSBvcGRfZXNjbiAgICAgICAgICAgID0g RGlTbGljZV9JTlZBTElEOyAvLyAub3BkIChkd2FyZjIsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICBwcGM2NGJlLWxpbnV4KQor ICAgICAgIERpU2xpY2UgZWhmcmFtZV9lc2NuW05fRUhGUkFNRV9TRUNUU107ICAgICAgICAgLy8g LmVoX2ZyYW1lIChkd2FyZjIpCisgCitAQCAtMjM5MywxNSArMjQ2NywyMCBAQCBCb29sIE1MXyhy ZWFkX2VsZl9kZWJ1Z19pbmZvKSAoIHN0cnVjdCBfRGVidWdJbmZvKiBkaSApCisgICAgICAgICAg ICAgICAgX3NlY19lc2NuLmltZyAgPSBtaW1nOyBcCisgICAgICAgICAgICAgICAgX3NlY19lc2Nu LmlvZmYgPSAoRGlPZmZUKWFfc2hkci5zaF9vZmZzZXQ7IFwKKyAgICAgICAgICAgICAgICBfc2Vj X2VzY24uc3pCICA9IGFfc2hkci5zaF9zaXplOyBcCisrICAgICAgICAgICAgICAgaWYgKCFjaGVj a19jb21wcmVzc2lvbigmYV9zaGRyLCAmX3NlY19lc2NuKSkgeyBcCisrICAgICAgICAgICAgICAg ICAgTUxfKHN5bWVycikoZGksIFRydWUsICIgICBDb21wcmVzc2lvbiB0eXBlIGlzIHVuc3VwcG9y dGVkIik7IFwKKysgICAgICAgICAgICAgICAgICBnb3RvIG91dDsgXAorKyAgICAgICAgICAgICAg IH0gXAorICAgICAgICAgICAgICAgIG5vYml0cyAgICAgICAgID0gYV9zaGRyLnNoX3R5cGUgPT0g U0hUX05PQklUUzsgXAorICAgICAgICAgICAgICAgIHZnX2Fzc2VydChfc2VjX2VzY24uaW1nICAh PSBOVUxMKTsgXAorICAgICAgICAgICAgICAgIHZnX2Fzc2VydChfc2VjX2VzY24uaW9mZiAhPSBE aU9mZlRfSU5WQUxJRCk7IFwKKyAgICAgICAgICAgICAgICBUUkFDRV9TWU1UQUIoICIlLTE4czog IGlvZmYgJWxsdSAuLiAlbGx1XG4iLCBcCistICAgICAgICAgICAgICAgICAgICAgICAgICAgICBf c2VjX25hbWUsIChVTG9uZylfc2VjX2VzY24uaW9mZiwgXAorLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKChVTG9uZylfc2VjX2VzY24uaW9mZikgKyBfc2VjX2VzY24uc3pCIC0gMSk7IFwK KysgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9zZWNfbmFtZSwgKFVMb25nKWFfc2hkci5z aF9vZmZzZXQsIFwKKysgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoVUxvbmcpYV9zaGRy LnNoX29mZnNldCkgKyBhX3NoZHIuc2hfc2l6ZSAtIDEpOyBcCisgICAgICAgICAgICAgICAgLyog U0hUX05PQklUUyBzZWN0aW9ucyBoYXZlIHplcm8gc2l6ZSBpbiB0aGUgZmlsZS4gKi8gXAorICAg ICAgICAgICAgICAgIGlmICghbm9iaXRzICYmIFwKKy0gICAgICAgICAgICAgICAgICAgYV9zaGRy LnNoX29mZnNldCArIF9zZWNfZXNjbi5zekIgPiBNTF8oaW1nX3NpemUpKG1pbWcpICkgeyBcCisr ICAgICAgICAgICAgICAgICAgIGFfc2hkci5zaF9vZmZzZXQgKyBcCisrICAgICAgICAgICAgICAg ICAgICAgIGFfc2hkci5zaF9zaXplID4gTUxfKGltZ19yZWFsX3NpemUpKG1pbWcpKSB7IFwKKyAg ICAgICAgICAgICAgICAgICBNTF8oc3ltZXJyKShkaSwgVHJ1ZSwgXAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICIgICBzZWN0aW9uIGJleW9uZCBpbWFnZSBlbmQ/ISIpOyBcCisgICAg ICAgICAgICAgICAgICAgZ290byBvdXQ7IFwKK0BAIC0yNDE0LDMzICsyNDkzLDU2IEBAIEJvb2wg TUxfKHJlYWRfZWxmX2RlYnVnX2luZm8pICggc3RydWN0IF9EZWJ1Z0luZm8qIGRpICkKKyAjICAg ICAgICBkZWZpbmUgRklORChfc2VjX25hbWUsIF9zZWNfZXNjbikgXAorICAgICAgICAgICAgIEZJ TkRYKF9zZWNfbmFtZSwgX3NlY19lc2NuLCAvKiovKQorIAorLSAgICAgICAgIC8qICAgTkFNRSAg ICAgICAgICAgICAgICAgIEVsZlNlYyAqLworLSAgICAgICAgIEZJTkQoIi5keW5zeW0iLCAgICAg ICAgICAgIGR5bnN5bV9lc2NuKQorLSAgICAgICAgIEZJTkQoIi5keW5zdHIiLCAgICAgICAgICAg IGR5bnN0cl9lc2NuKQorLSAgICAgICAgIEZJTkQoIi5zeW10YWIiLCAgICAgICAgICAgIHN5bXRh Yl9lc2NuKQorLSAgICAgICAgIEZJTkQoIi5zdHJ0YWIiLCAgICAgICAgICAgIHN0cnRhYl9lc2Nu KQorKyAgICAgICAgIC8qICAgICAgTkFNRSAgICAgICAgICAgICAgICAgIEVsZlNlYyAqLworKyAg ICAgICAgIEZJTkQoICAgIi5keW5zeW0iLCAgICAgICAgICAgIGR5bnN5bV9lc2NuKQorKyAgICAg ICAgIEZJTkQoICAgIi5keW5zdHIiLCAgICAgICAgICAgIGR5bnN0cl9lc2NuKQorKyAgICAgICAg IEZJTkQoICAgIi5zeW10YWIiLCAgICAgICAgICAgIHN5bXRhYl9lc2NuKQorKyAgICAgICAgIEZJ TkQoICAgIi5zdHJ0YWIiLCAgICAgICAgICAgIHN0cnRhYl9lc2NuKQorICMgICAgICAgIGlmIGRl ZmluZWQoVkdPX3NvbGFyaXMpCistICAgICAgICAgRklORCgiLlNVTldfbGR5bnN5bSIsICAgICAg bGR5bnN5bV9lc2NuKQorKyAgICAgICAgIEZJTkQoICAgIi5TVU5XX2xkeW5zeW0iLCAgICAgIGxk eW5zeW1fZXNjbikKKyAjICAgICAgICBlbmRpZgorIAorLSAgICAgICAgIEZJTkQoIi5nbnVfZGVi dWdsaW5rIiwgICAgIGRlYnVnbGlua19lc2NuKQorLSAgICAgICAgIEZJTkQoIi5nbnVfZGVidWdh bHRsaW5rIiwgIGRlYnVnYWx0bGlua19lc2NuKQorKyAgICAgICAgIEZJTkQoICAgIi5nbnVfZGVi dWdsaW5rIiwgICAgIGRlYnVnbGlua19lc2NuKQorKyAgICAgICAgIEZJTkQoICAgIi5nbnVfZGVi dWdhbHRsaW5rIiwgIGRlYnVnYWx0bGlua19lc2NuKQorKworKyAgICAgICAgIEZJTkQoICAgIi5k ZWJ1Z19saW5lIiwgICAgICAgIGRlYnVnX2xpbmVfZXNjbikKKysgICAgICAgICBpZiAoIU1MXyhz bGlfaXNfdmFsaWQpKGRlYnVnX2xpbmVfZXNjbikpCisrICAgICAgICAgICAgRklORCgiLnpkZWJ1 Z19saW5lIiwgICAgICAgZGVidWdfbGluZV9lc2NuKQorKworKyAgICAgICAgIEZJTkQoICAgIi5k ZWJ1Z19pbmZvIiwgICAgICAgIGRlYnVnX2luZm9fZXNjbikKKysgICAgICAgICBpZiAoIU1MXyhz bGlfaXNfdmFsaWQpKGRlYnVnX2luZm9fZXNjbikpCisrICAgICAgICAgICAgRklORCgiLnpkZWJ1 Z19pbmZvIiwgICAgICAgZGVidWdfaW5mb19lc2NuKQorIAorLSAgICAgICAgIEZJTkQoIi5kZWJ1 Z19saW5lIiwgICAgICAgIGRlYnVnX2xpbmVfZXNjbikKKy0gICAgICAgICBGSU5EKCIuZGVidWdf aW5mbyIsICAgICAgICBkZWJ1Z19pbmZvX2VzY24pCistICAgICAgICAgRklORCgiLmRlYnVnX3R5 cGVzIiwgICAgICAgZGVidWdfdHlwZXNfZXNjbikKKy0gICAgICAgICBGSU5EKCIuZGVidWdfYWJi cmV2IiwgICAgICBkZWJ1Z19hYmJ2X2VzY24pCistICAgICAgICAgRklORCgiLmRlYnVnX3N0ciIs ICAgICAgICAgZGVidWdfc3RyX2VzY24pCistICAgICAgICAgRklORCgiLmRlYnVnX3JhbmdlcyIs ICAgICAgZGVidWdfcmFuZ2VzX2VzY24pCistICAgICAgICAgRklORCgiLmRlYnVnX2xvYyIsICAg ICAgICAgZGVidWdfbG9jX2VzY24pCistICAgICAgICAgRklORCgiLmRlYnVnX2ZyYW1lIiwgICAg ICAgZGVidWdfZnJhbWVfZXNjbikKKysgICAgICAgICBGSU5EKCAgICIuZGVidWdfdHlwZXMiLCAg ICAgICBkZWJ1Z190eXBlc19lc2NuKQorKyAgICAgICAgIGlmICghTUxfKHNsaV9pc192YWxpZCko ZGVidWdfdHlwZXNfZXNjbikpCisrICAgICAgICAgICAgRklORCgiLnpkZWJ1Z190eXBlcyIsICAg ICAgZGVidWdfdHlwZXNfZXNjbikKKyAKKy0gICAgICAgICBGSU5EKCIuZGVidWciLCAgICAgICAg ICAgICBkd2FyZjFkX2VzY24pCistICAgICAgICAgRklORCgiLmxpbmUiLCAgICAgICAgICAgICAg ZHdhcmYxbF9lc2NuKQorKyAgICAgICAgIEZJTkQoICAgIi5kZWJ1Z19hYmJyZXYiLCAgICAgIGRl YnVnX2FiYnZfZXNjbikKKysgICAgICAgICBpZiAoIU1MXyhzbGlfaXNfdmFsaWQpKGRlYnVnX2Fi YnZfZXNjbikpCisrICAgICAgICAgICAgRklORCgiLnpkZWJ1Z19hYmJyZXYiLCAgICAgZGVidWdf YWJidl9lc2NuKQorIAorLSAgICAgICAgIEZJTkQoIi5vcGQiLCAgICAgICAgICAgICAgIG9wZF9l c2NuKQorKyAgICAgICAgIEZJTkQoICAgIi5kZWJ1Z19zdHIiLCAgICAgICAgIGRlYnVnX3N0cl9l c2NuKQorKyAgICAgICAgIGlmICghTUxfKHNsaV9pc192YWxpZCkoZGVidWdfc3RyX2VzY24pKQor KyAgICAgICAgICAgIEZJTkQoIi56ZGVidWdfc3RyIiwgICAgICAgIGRlYnVnX3N0cl9lc2NuKQor IAorLSAgICAgICAgIEZJTkRYKCIuZWhfZnJhbWUiLCAgICAgICAgIGVoZnJhbWVfZXNjbltlaGZy YW1lX21peF0sCisrICAgICAgICAgRklORCggICAiLmRlYnVnX3JhbmdlcyIsICAgICAgZGVidWdf cmFuZ2VzX2VzY24pCisrICAgICAgICAgaWYgKCFNTF8oc2xpX2lzX3ZhbGlkKShkZWJ1Z19yYW5n ZXNfZXNjbikpCisrICAgICAgICAgICAgRklORCgiLnpkZWJ1Z19yYW5nZXMiLCAgICAgZGVidWdf cmFuZ2VzX2VzY24pCisrCisrICAgICAgICAgRklORCggICAiLmRlYnVnX2xvYyIsICAgICAgICAg ZGVidWdfbG9jX2VzY24pCisrICAgICAgICAgaWYgKCFNTF8oc2xpX2lzX3ZhbGlkKShkZWJ1Z19s b2NfZXNjbikpCisrICAgICAgICAgICAgRklORCgiLnpkZWJ1Z19sb2MiLCAgICBkZWJ1Z19sb2Nf ZXNjbikKKysKKysgICAgICAgICBGSU5EKCAgICIuZGVidWdfZnJhbWUiLCAgICAgICBkZWJ1Z19m cmFtZV9lc2NuKQorKyAgICAgICAgIGlmICghTUxfKHNsaV9pc192YWxpZCkoZGVidWdfZnJhbWVf ZXNjbikpCisrICAgICAgICAgICAgRklORCgiLnpkZWJ1Z19mcmFtZSIsICAgICAgZGVidWdfZnJh bWVfZXNjbikKKysKKysgICAgICAgICBGSU5EKCAgICIuZGVidWciLCAgICAgICAgICAgICBkd2Fy ZjFkX2VzY24pCisrICAgICAgICAgRklORCggICAiLmxpbmUiLCAgICAgICAgICAgICAgZHdhcmYx bF9lc2NuKQorKworKyAgICAgICAgIEZJTkQoICAgIi5vcGQiLCAgICAgICAgICAgICAgIG9wZF9l c2NuKQorKworKyAgICAgICAgIEZJTkRYKCAgIi5laF9mcmFtZSIsICAgICAgICAgIGVoZnJhbWVf ZXNjbltlaGZyYW1lX21peF0sCisgICAgICAgICAgICAgICAgZG8geyBlaGZyYW1lX21peCsrOyB2 Z19hc3NlcnQoZWhmcmFtZV9taXggPD0gTl9FSEZSQU1FX1NFQ1RTKTsKKyAgICAgICAgICAgICAg ICB9IHdoaWxlICgwKQorICAgICAgICAgICkKK0BAIC0yNDc2LDcgKzI1NzgsNyBAQCBCb29sIE1M XyhyZWFkX2VsZl9kZWJ1Z19pbmZvKSAoIHN0cnVjdCBfRGVidWdJbmZvKiBkaSApCisgICAgICAg aWYgKGJ1aWxkaWQgIT0gTlVMTCB8fCBkZWJ1Z2xpbmtfZXNjbi5pbWcgIT0gTlVMTCkgeworICAg ICAgICAgIC8qIERvIGhhdmUgYSBkZWJ1Z2xpbmsgc2VjdGlvbj8gKi8KKyAgICAgICAgICBpZiAo ZGVidWdsaW5rX2VzY24uaW1nICE9IE5VTEwpIHsKKy0gICAgICAgICAgICBVSW50IGNyY19vZmZz ZXQgCisrICAgICAgICAgICAgVUludCBjcmNfb2Zmc2V0CisgICAgICAgICAgICAgICAgPSBWR19S T1VORFVQKE1MXyhpbWdfc3RybGVuKShkZWJ1Z2xpbmtfZXNjbi5pbWcsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWJ1Z2xpbmtfZXNjbi5pb2ZmKSsxLCA0 KTsKKyAgICAgICAgICAgICB2Z19hc3NlcnQoY3JjX29mZnNldCArIHNpemVvZihVSW50KSA8PSBk ZWJ1Z2xpbmtfZXNjbi5zekIpOworQEAgLTI1ODIsNyArMjY4NCw3IEBAIEJvb2wgTUxfKHJlYWRf ZWxmX2RlYnVnX2luZm8pICggc3RydWN0IF9EZWJ1Z0luZm8qIGRpICkKKyAgICAgICAgICAgIHNo ZHJfc3RydGFiX2Rpb2ZmID0gYV9zaGRyLnNoX29mZnNldDsKKyAgICAgICAgICAgIGlmICghTUxf KGltZ192YWxpZCkoZGltZywgc2hkcl9zdHJ0YWJfZGlvZmYsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDEvKmJvZ3VzLCBidXQgd2UgZG9uJ3Qga25vdyB0aGUgcmVhbCBzaXplKi8p KSB7CistICAgICAgICAgICAgICBNTF8oc3ltZXJyKShkaSwgVHJ1ZSwgCisrICAgICAgICAgICAg ICBNTF8oc3ltZXJyKShkaSwgVHJ1ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICJJbnZh bGlkIEVMRiBTZWN0aW9uIEhlYWRlciBTdHJpbmcgVGFibGUiCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAiIChkZWJ1Z2luZm8gZmlsZSkiKTsKKyAgICAgICAgICAgICAgIGdvdG8gb3V0Owor QEAgLTI1OTIsNyArMjY5NCw3IEBAIEJvb2wgTUxfKHJlYWRfZWxmX2RlYnVnX2luZm8pICggc3Ry dWN0IF9EZWJ1Z0luZm8qIGRpICkKKyAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZWhkcl9kaW1n LmVfcGhudW07IGkrKykgeworICAgICAgICAgICAgIEVsZlhYX1BoZHIgYV9waGRyOworICAgICAg ICAgICAgIE1MXyhpbWdfZ2V0KSgmYV9waGRyLCBkaW1nLCBJTkRFWF9CSVMoZWhkcl9kaW1nLmVf cGhvZmYsCistICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBpLCBwaGRyX2RlbnRfc3pCKSwgCisrICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBpLCBwaGRyX2RlbnRfc3pCKSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICBzaXplb2YoYV9waGRyKSk7CisgICAgICAgICAgICAgaWYgKGFfcGhkci5wX3R5cGUg PT0gUFRfTE9BRCkgeworICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBWR18oc2l6ZVhB KShkaS0+ZnNtLm1hcHMpOyBqKyspIHsKK0BAIC0yNjI1LDcgKzI3MjcsNyBAQCBCb29sIE1MXyhy ZWFkX2VsZl9kZWJ1Z19pbmZvKSAoIHN0cnVjdCBfRGVidWdJbmZvKiBkaSApCisgICAgICAgICAg Zm9yIChpID0gMDsgaSA8IGVoZHJfZGltZy5lX3NobnVtOyBpKyspIHsKKyAKKyAgICAgICAgICAg ICAvKiBGaW5kIGRlYnVnIHN2bWEgYW5kIGJpYXMgaW5mb3JtYXRpb24gZm9yIHNlY3Rpb25zCist ICAgICAgICAgICAgICAgd2UgZm91bmQgaW4gdGhlIG1haW4gZmlsZS4gKi8gCisrICAgICAgICAg ICAgICAgd2UgZm91bmQgaW4gdGhlIG1haW4gZmlsZS4gKi8KKyAKKyAjICAgICAgICAgICBkZWZp bmUgRklORChfc2VjLCBfc2VnKSBcCisgICAgICAgICAgICAgZG8geyBcCitAQCAtMjY5MCwxNiAr Mjc5MiwyMCBAQCBCb29sIE1MXyhyZWFkX2VsZl9kZWJ1Z19pbmZvKSAoIHN0cnVjdCBfRGVidWdJ bmZvKiBkaSApCisgICAgICAgICAgICAgICAgICAgX3NlY19lc2NuLmltZyAgPSBkaW1nOyBcCisg ICAgICAgICAgICAgICAgICAgX3NlY19lc2NuLmlvZmYgPSAoRGlPZmZUKWFfc2hkci5zaF9vZmZz ZXQ7ICBcCisgICAgICAgICAgICAgICAgICAgX3NlY19lc2NuLnN6QiAgPSBhX3NoZHIuc2hfc2l6 ZTsgXAorKyAgICAgICAgICAgICAgICAgIGlmICghY2hlY2tfY29tcHJlc3Npb24oJmFfc2hkciwg Jl9zZWNfZXNjbikpIHsgXAorKyAgICAgICAgICAgICAgICAgICAgIE1MXyhzeW1lcnIpKGRpLCBU cnVlLCAiICAgQ29tcHJlc3Npb24gdHlwZSBpcyB1bnN1cHBvcnRlZCIpOyBcCisrICAgICAgICAg ICAgICAgICAgICAgZ290byBvdXQ7IFwKKysgICAgICAgICAgICAgICAgICB9IFwKKyAgICAgICAg ICAgICAgICAgICBub2JpdHMgICAgICAgICA9IGFfc2hkci5zaF90eXBlID09IFNIVF9OT0JJVFM7 IFwKKyAgICAgICAgICAgICAgICAgICB2Z19hc3NlcnQoX3NlY19lc2NuLmltZyAgIT0gTlVMTCk7 IFwKKyAgICAgICAgICAgICAgICAgICB2Z19hc3NlcnQoX3NlY19lc2NuLmlvZmYgIT0gRGlPZmZU X0lOVkFMSUQpOyBcCisgICAgICAgICAgICAgICAgICAgVFJBQ0VfU1lNVEFCKCAiJS0xOHM6IGRp b2ZmICVsbHUgLi4gJWxsdVxuIiwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg X3NlY19uYW1lLCBcCistICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoVUxvbmcpX3Nl Y19lc2NuLmlvZmYsIFwKKy0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoVUxvbmcp X3NlY19lc2NuLmlvZmYpICsgX3NlY19lc2NuLnN6QiAtIDEpOyBcCisrICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoVUxvbmcpYV9zaGRyLnNoX29mZnNldCwgXAorKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKChVTG9uZylhX3NoZHIuc2hfb2Zmc2V0KSArIGFfc2hkci5z aF9zaXplIC0gMSk7IFwKKyAgICAgICAgICAgICAgICAgICAvKiBTSFRfTk9CSVRTIHNlY3Rpb25z IGhhdmUgemVybyBzaXplIGluIHRoZSBmaWxlLiAqLyBcCisgICAgICAgICAgICAgICAgICAgaWYg KCFub2JpdHMgJiYgYV9zaGRyLnNoX29mZnNldCBcCistICAgICAgICAgICAgICAgICAgICAgICsg X3NlY19lc2NuLnN6QiA+IE1MXyhpbWdfc2l6ZSkoZGltZykpIHsgXAorKyAgICAgICAgICAgICAg ICAgICAgICArIGFfc2hkci5zaF9zaXplID4gTUxfKGltZ19yZWFsX3NpemUpKF9zZWNfZXNjbi5p bWcpKSB7IFwKKyAgICAgICAgICAgICAgICAgICAgICBNTF8oc3ltZXJyKShkaSwgVHJ1ZSwgXAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIgICBzZWN0aW9uIGJleW9uZCBpbWFn ZSBlbmQ/ISIpOyBcCisgICAgICAgICAgICAgICAgICAgICAgZ290byBvdXQ7IFwKK0BAIC0yNzA3 LDI0ICsyODEzLDQ1IEBAIEJvb2wgTUxfKHJlYWRfZWxmX2RlYnVnX2luZm8pICggc3RydWN0IF9E ZWJ1Z0luZm8qIGRpICkKKyAgICAgICAgICAgICAgICB9IFwKKyAgICAgICAgICAgICB9IHdoaWxl ICgwKTsKKyAKKy0gICAgICAgICAgICAvKiBORUVERUQ/ICAgICAgICBOQU1FICAgICAgICAgICAg IEVsZlNlYyAqLworLSAgICAgICAgICAgIEZJTkQobmVlZF9zeW10YWIsICIuc3ltdGFiIiwgICAg ICAgc3ltdGFiX2VzY24pCistICAgICAgICAgICAgRklORChuZWVkX3N5bXRhYiwgIi5zdHJ0YWIi LCAgICAgICBzdHJ0YWJfZXNjbikKKy0gICAgICAgICAgICBGSU5EKG5lZWRfZHdhcmYyLCAiLmRl YnVnX2xpbmUiLCAgIGRlYnVnX2xpbmVfZXNjbikKKy0gICAgICAgICAgICBGSU5EKG5lZWRfZHdh cmYyLCAiLmRlYnVnX2luZm8iLCAgIGRlYnVnX2luZm9fZXNjbikKKy0gICAgICAgICAgICBGSU5E KG5lZWRfZHdhcmYyLCAiLmRlYnVnX3R5cGVzIiwgIGRlYnVnX3R5cGVzX2VzY24pCisrICAgICAg ICAgICAgLyogTkVFREVEPyAgICAgICAgICAgICAgIE5BTUUgICAgICAgICAgICAgICAgIEVsZlNl YyAqLworKyAgICAgICAgICAgIEZJTkQoICAgbmVlZF9zeW10YWIsICAgICAiLnN5bXRhYiIsICAg ICAgICAgICBzeW10YWJfZXNjbikKKysgICAgICAgICAgICBGSU5EKCAgIG5lZWRfc3ltdGFiLCAg ICAgIi5zdHJ0YWIiLCAgICAgICAgICAgc3RydGFiX2VzY24pCisrICAgICAgICAgICAgRklORCgg ICBuZWVkX2R3YXJmMiwgICAgICIuZGVidWdfbGluZSIsICAgICAgIGRlYnVnX2xpbmVfZXNjbikK KysgICAgICAgICAgICBpZiAoIU1MXyhzbGlfaXNfdmFsaWQpKGRlYnVnX2xpbmVfZXNjbikpCisr ICAgICAgICAgICAgICAgRklORChuZWVkX2R3YXJmMiwgICAgICIuemRlYnVnX2xpbmUiLCAgICAg IGRlYnVnX2xpbmVfZXNjbikKKysKKysgICAgICAgICAgICBGSU5EKCAgIG5lZWRfZHdhcmYyLCAg ICAgIi5kZWJ1Z19pbmZvIiwgICAgICAgZGVidWdfaW5mb19lc2NuKQorKyAgICAgICAgICAgIGlm ICghTUxfKHNsaV9pc192YWxpZCkoZGVidWdfaW5mb19lc2NuKSkKKysgICAgICAgICAgICAgICBG SU5EKG5lZWRfZHdhcmYyLCAgICAgIi56ZGVidWdfaW5mbyIsICAgICAgZGVidWdfaW5mb19lc2Nu KQorKworKyAgICAgICAgICAgIEZJTkQoICAgbmVlZF9kd2FyZjIsICAgICAiLmRlYnVnX3R5cGVz IiwgICAgICBkZWJ1Z190eXBlc19lc2NuKQorKyAgICAgICAgICAgIGlmICghTUxfKHNsaV9pc192 YWxpZCkoZGVidWdfdHlwZXNfZXNjbikpCisrICAgICAgICAgICAgICAgRklORChuZWVkX2R3YXJm MiwgICAgICIuemRlYnVnX3R5cGVzIiwgICAgIGRlYnVnX3R5cGVzX2VzY24pCisrCisrICAgICAg ICAgICAgRklORCggICBuZWVkX2R3YXJmMiwgICAgICIuZGVidWdfYWJicmV2IiwgICAgIGRlYnVn X2FiYnZfZXNjbikKKysgICAgICAgICAgICBpZiAoIU1MXyhzbGlfaXNfdmFsaWQpKGRlYnVnX2Fi YnZfZXNjbikpCisrICAgICAgICAgICAgICAgRklORChuZWVkX2R3YXJmMiwgICAgICIuemRlYnVn X2FiYnJldiIsICAgIGRlYnVnX2FiYnZfZXNjbikKKysKKysgICAgICAgICAgICBGSU5EKCAgIG5l ZWRfZHdhcmYyLCAgICAgIi5kZWJ1Z19zdHIiLCAgICAgICAgZGVidWdfc3RyX2VzY24pCisrICAg ICAgICAgICAgaWYgKCFNTF8oc2xpX2lzX3ZhbGlkKShkZWJ1Z19zdHJfZXNjbikpCisrICAgICAg ICAgICAgICAgRklORChuZWVkX2R3YXJmMiwgICAgICIuemRlYnVnX3N0ciIsICAgICAgIGRlYnVn X3N0cl9lc2NuKQorKworKyAgICAgICAgICAgIEZJTkQoICAgbmVlZF9kd2FyZjIsICAgICAiLmRl YnVnX3JhbmdlcyIsICAgICBkZWJ1Z19yYW5nZXNfZXNjbikKKysgICAgICAgICAgICBpZiAoIU1M XyhzbGlfaXNfdmFsaWQpKGRlYnVnX3Jhbmdlc19lc2NuKSkKKysgICAgICAgICAgICAgICBGSU5E KG5lZWRfZHdhcmYyLCAgICAgIi56ZGVidWdfcmFuZ2VzIiwgICAgZGVidWdfcmFuZ2VzX2VzY24p CisgCistICAgICAgICAgICAgRklORChuZWVkX2R3YXJmMiwgIi5kZWJ1Z19hYmJyZXYiLCBkZWJ1 Z19hYmJ2X2VzY24pCistICAgICAgICAgICAgRklORChuZWVkX2R3YXJmMiwgIi5kZWJ1Z19zdHIi LCAgICBkZWJ1Z19zdHJfZXNjbikKKy0gICAgICAgICAgICBGSU5EKG5lZWRfZHdhcmYyLCAiLmRl YnVnX3JhbmdlcyIsIGRlYnVnX3Jhbmdlc19lc2NuKQorKyAgICAgICAgICAgIEZJTkQoICAgbmVl ZF9kd2FyZjIsICAgICAiLmRlYnVnX2xvYyIsICAgICAgICBkZWJ1Z19sb2NfZXNjbikKKysgICAg ICAgICAgICBpZiAoIU1MXyhzbGlfaXNfdmFsaWQpKGRlYnVnX2xvY19lc2NuKSkKKysgICAgICAg ICAgICAgICBGSU5EKG5lZWRfZHdhcmYyLCAgICAgIi56ZGVidWdfbG9jIiwgICAgICAgZGVidWdf bG9jX2VzY24pCisgCistICAgICAgICAgICAgRklORChuZWVkX2R3YXJmMiwgIi5kZWJ1Z19sb2Mi LCAgICBkZWJ1Z19sb2NfZXNjbikKKy0gICAgICAgICAgICBGSU5EKG5lZWRfZHdhcmYyLCAiLmRl YnVnX2ZyYW1lIiwgIGRlYnVnX2ZyYW1lX2VzY24pCisrICAgICAgICAgICAgRklORCggICBuZWVk X2R3YXJmMiwgICAgICIuZGVidWdfZnJhbWUiLCAgICAgIGRlYnVnX2ZyYW1lX2VzY24pCisrICAg ICAgICAgICAgaWYgKCFNTF8oc2xpX2lzX3ZhbGlkKShkZWJ1Z19mcmFtZV9lc2NuKSkKKysgICAg ICAgICAgICAgICBGSU5EKG5lZWRfZHdhcmYyLCAgICAgIi56ZGVidWdfZnJhbWUiLCAgICAgZGVi dWdfZnJhbWVfZXNjbikKKyAKKy0gICAgICAgICAgICBGSU5EKG5lZWRfZHdhcmYyLCAiLmdudV9k ZWJ1Z2FsdGxpbmsiLCBkZWJ1Z2FsdGxpbmtfZXNjbikKKysgICAgICAgICAgICBGSU5EKCAgIG5l ZWRfZHdhcmYyLCAgICAgIi5nbnVfZGVidWdhbHRsaW5rIiwgZGVidWdhbHRsaW5rX2VzY24pCisg CistICAgICAgICAgICAgRklORChuZWVkX2R3YXJmMSwgIi5kZWJ1ZyIsICAgICAgICBkd2FyZjFk X2VzY24pCistICAgICAgICAgICAgRklORChuZWVkX2R3YXJmMSwgIi5saW5lIiwgICAgICAgICBk d2FyZjFsX2VzY24pCisrICAgICAgICAgICAgRklORCggICBuZWVkX2R3YXJmMSwgICAgICIuZGVi dWciLCAgICAgICAgICAgIGR3YXJmMWRfZXNjbikKKysgICAgICAgICAgICBGSU5EKCAgIG5lZWRf ZHdhcmYxLCAgICAgIi5saW5lIiwgICAgICAgICAgICAgZHdhcmYxbF9lc2NuKQorIAorICMgICAg ICAgICAgIHVuZGVmIEZJTkQKKyAgICAgICAgICB9IC8qIEZpbmQgYWxsIGludGVyZXN0aW5nIHNl Y3Rpb25zICovCitAQCAtMjc1Niw3ICsyODgzLDcgQEAgQm9vbCBNTF8ocmVhZF9lbGZfZGVidWdf aW5mbykgKCBzdHJ1Y3QgX0RlYnVnSW5mbyogZGkgKQorICAgICAgICAgICAgIFZHXyhzcHJpbnRm KSgKKyAgICAgICAgICAgICAgICBhbHRidWlsZGlkICsgMiAqIGosICIlMDJ4IiwKKyAgICAgICAg ICAgICAgICAoVUludClNTF8oaW1nX2dldF9VQ2hhcikoZGVidWdhbHRsaW5rX2VzY24uaW1nLAor LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWJ1Z2FsdGxpbmtfZXNj bi5pb2ZmIAorKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWJ1Z2Fs dGxpbmtfZXNjbi5pb2ZmCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICsgYnVpbGRpZF9vZmZzZXQgKyBqKSk7CisgCisgICAgICAgICAgLyogU2VlIGlmIHdlIGNhbiBm aW5kIGEgbWF0Y2hpbmcgZGVidWcgZmlsZSAqLworQEAgLTI4MDcsNyArMjkzNCw3IEBAIEJvb2wg TUxfKHJlYWRfZWxmX2RlYnVnX2luZm8pICggc3RydWN0IF9EZWJ1Z0luZm8qIGRpICkKKyAgICAg ICAgICAgIHNoZHJfc3RydGFiX2Fpb2ZmID0gYV9zaGRyLnNoX29mZnNldDsKKyAgICAgICAgICAg IGlmICghTUxfKGltZ192YWxpZCkoYWltZywgc2hkcl9zdHJ0YWJfYWlvZmYsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDEvKmJvZ3VzLCBidXQgd2UgZG9uJ3Qga25vdyB0aGUgcmVh bCBzaXplKi8pKSB7CistICAgICAgICAgICAgICBNTF8oc3ltZXJyKShkaSwgVHJ1ZSwgCisrICAg ICAgICAgICAgICBNTF8oc3ltZXJyKShkaSwgVHJ1ZSwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICJJbnZhbGlkIEVMRiBTZWN0aW9uIEhlYWRlciBTdHJpbmcgVGFibGUiCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAiIChhbHRlcm5hdGUgZGVidWdpbmZvIGZpbGUpIik7CisgICAgICAg ICAgICAgICBnb3RvIG91dDsKK0BAIC0yODM0LDIwICsyOTYxLDM2IEBAIEJvb2wgTUxfKHJlYWRf ZWxmX2RlYnVnX2luZm8pICggc3RydWN0IF9EZWJ1Z0luZm8qIGRpICkKKyAgICAgICAgICAgICAg ICAgICBfc2VjX2VzY24uaW1nICA9IGFpbWc7IFwKKyAgICAgICAgICAgICAgICAgICBfc2VjX2Vz Y24uaW9mZiA9IChEaU9mZlQpYV9zaGRyLnNoX29mZnNldDsgXAorICAgICAgICAgICAgICAgICAg IF9zZWNfZXNjbi5zekIgID0gYV9zaGRyLnNoX3NpemU7IFwKKysgICAgICAgICAgICAgICAgICBp ZiAoIWNoZWNrX2NvbXByZXNzaW9uKCZhX3NoZHIsICZfc2VjX2VzY24pKSB7IFwKKysgICAgICAg ICAgICAgICAgICAgICBNTF8oc3ltZXJyKShkaSwgVHJ1ZSwgIiAgIENvbXByZXNzaW9uIHR5cGUg aXMgIiBcCisrICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJ1bnN1 cHBvcnRlZCIpOyBcCisrICAgICAgICAgICAgICAgICAgICAgZ290byBvdXQ7IFwKKysgICAgICAg ICAgICAgICAgICB9IFwKKyAgICAgICAgICAgICAgICAgICB2Z19hc3NlcnQoX3NlY19lc2NuLmlt ZyAgIT0gTlVMTCk7IFwKKyAgICAgICAgICAgICAgICAgICB2Z19hc3NlcnQoX3NlY19lc2NuLmlv ZmYgIT0gRGlPZmZUX0lOVkFMSUQpOyBcCisgICAgICAgICAgICAgICAgICAgVFJBQ0VfU1lNVEFC KCAiJS0xOHM6IGFpb2ZmICVsbHUgLi4gJWxsdVxuIiwgXAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgX3NlY19uYW1lLCBcCistICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoVUxvbmcpX3NlY19lc2NuLmlvZmYsIFwKKy0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICgoVUxvbmcpX3NlY19lc2NuLmlvZmYpICsgX3NlY19lc2NuLnN6QiAtIDEpOyBcCisrICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoVUxvbmcpYV9zaGRyLnNoX29mZnNldCwgXAor KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChVTG9uZylhX3NoZHIuc2hfb2Zmc2V0 KSArIGFfc2hkci5zaF9zaXplIC0gMSk7IFwKKyAgICAgICAgICAgICAgICB9IFwKKyAgICAgICAg ICAgICB9IHdoaWxlICgwKTsKKyAKKy0gICAgICAgICAgICAvKiAgIE5BTUUgICAgICAgICAgICAg RWxmU2VjICovCistICAgICAgICAgICAgRklORCgiLmRlYnVnX2xpbmUiLCAgIGRlYnVnX2xpbmVf YWx0X2VzY24pCistICAgICAgICAgICAgRklORCgiLmRlYnVnX2luZm8iLCAgIGRlYnVnX2luZm9f YWx0X2VzY24pCistICAgICAgICAgICAgRklORCgiLmRlYnVnX2FiYnJldiIsIGRlYnVnX2FiYnZf YWx0X2VzY24pCistICAgICAgICAgICAgRklORCgiLmRlYnVnX3N0ciIsICAgIGRlYnVnX3N0cl9h bHRfZXNjbikKKysgICAgICAgICAgICAvKiAgIE5BTUUgICAgICAgICAgICAgICAgIEVsZlNlYyAq LworKyAgICAgICAgICAgIEZJTkQoIi5kZWJ1Z19saW5lIiwgICAgICAgZGVidWdfbGluZV9hbHRf ZXNjbikKKysgICAgICAgICAgICBpZiAoIU1MXyhzbGlfaXNfdmFsaWQpKGRlYnVnX2xpbmVfYWx0 X2VzY24pKQorKyAgICAgICAgICAgICAgIEZJTkQoIi56ZGVidWdfbGluZSIsICAgZGVidWdfbGlu ZV9hbHRfZXNjbikKKysKKysgICAgICAgICAgICBGSU5EKCIuZGVidWdfaW5mbyIsICAgICAgIGRl YnVnX2luZm9fYWx0X2VzY24pCisrICAgICAgICAgICAgaWYgKCFNTF8oc2xpX2lzX3ZhbGlkKShk ZWJ1Z19pbmZvX2FsdF9lc2NuKSkKKysgICAgICAgICAgICAgICBGSU5EKCIuemRlYnVnX2luZm8i LCAgIGRlYnVnX2luZm9fYWx0X2VzY24pCisrCisrICAgICAgICAgICAgRklORCgiLmRlYnVnX2Fi YnJldiIsICAgICBkZWJ1Z19hYmJ2X2FsdF9lc2NuKQorKyAgICAgICAgICAgIGlmICghTUxfKHNs aV9pc192YWxpZCkoZGVidWdfYWJidl9hbHRfZXNjbikpCisrICAgICAgICAgICAgICAgRklORCgi LnpkZWJ1Z19hYmJyZXYiLCBkZWJ1Z19hYmJ2X2FsdF9lc2NuKQorKworKyAgICAgICAgICAgIEZJ TkQoIi5kZWJ1Z19zdHIiLCAgICAgICAgZGVidWdfc3RyX2FsdF9lc2NuKQorKyAgICAgICAgICAg IGlmICghTUxfKHNsaV9pc192YWxpZCkoZGVidWdfc3RyX2FsdF9lc2NuKSkKKysgICAgICAgICAg ICAgICBGSU5EKCIuemRlYnVnX3N0ciIsICAgIGRlYnVnX3N0cl9hbHRfZXNjbikKKyAKKyAjICAg ICAgICAgICB1bmRlZiBGSU5ECisgICAgICAgICAgfSAvKiBGaW5kIGFsbCBpbnRlcmVzdGluZyBz ZWN0aW9ucyAqLworQEAgLTI5MTQsNyArMzA1Nyw3IEBAIEJvb2wgTUxfKHJlYWRfZWxmX2RlYnVn X2luZm8pICggc3RydWN0IF9EZWJ1Z0luZm8qIGRpICkKKyAgICAgICAgICBkZWJ1Z2luZm8gcmVh ZGluZyBmb3IgdGhhdCByZWFzb24sIGJ1dCwg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G9mIEhlYWRlcjogSW1wbGVtZW50YXRpb24gZm9sbG93cy4gKElmIHlvdSBvbmx5IHdhbnQgdGhl IGhlYWRlciwgZGVmaW5lIE1JTklaX0hFQURFUl9GSUxFX09OTFkuKQorKworKyNpZm5kZWYgVElO RkxfSEVBREVSX0ZJTEVfT05MWQorKworKyNpbmNsdWRlICJwdWJfY29yZV9tYWxsb2NmcmVlLmgi CisrI2luY2x1ZGUgInB1Yl9jb3JlX2xpYmNiYXNlLmgiCisrCisrI2RlZmluZSBNWl9NQVgoYSxi KSAoKChhKT4oYikpPyhhKTooYikpCisrI2RlZmluZSBNWl9NSU4oYSxiKSAoKChhKTwoYikpPyhh KTooYikpCisrI2RlZmluZSBNWl9DTEVBUl9PQkoob2JqKSBWR18obWVtc2V0KSgmKG9iaiksIDAs IHNpemVvZihvYmopKQorKworKyNpZiBNSU5JWl9VU0VfVU5BTElHTkVEX0xPQURTX0FORF9TVE9S RVMgJiYgTUlOSVpfTElUVExFX0VORElBTgorKyAgI2RlZmluZSBNWl9SRUFEX0xFMTYocCkgKigo Y29uc3QgbXpfdWludDE2ICopKHApKQorKyAgI2RlZmluZSBNWl9SRUFEX0xFMzIocCkgKigoY29u c3QgbXpfdWludDMyICopKHApKQorKyNlbHNlCisrICAjZGVmaW5lIE1aX1JFQURfTEUxNihwKSAo KG16X3VpbnQzMikoKChjb25zdCBtel91aW50OCAqKShwKSlbMF0pIHwgKChtel91aW50MzIpKCgo Y29uc3QgbXpfdWludDggKikocCkpWzFdKSA8PCA4VSkpCisrICAjZGVmaW5lIE1aX1JFQURfTEUz MihwKSAoKG16X3VpbnQzMikoKChjb25zdCBtel91aW50OCAqKShwKSlbMF0pIHwgKChtel91aW50 MzIpKCgoY29uc3QgbXpfdWludDggKikocCkpWzFdKSA8PCA4VSkgfCAoKG16X3VpbnQzMikoKChj b25zdCBtel91aW50OCAqKShwKSlbMl0pIDw8IDE2VSkgfCAoKG16X3VpbnQzMikKKCgoY29uc3Qg bXpfdWludD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XJpby4KKysjZGVmaW5lIFRJTkZMX0dFVF9CWVRFKHN0YXRlX2luZGV4LCBjKSBkbyB7 IFwKKysgIGlmIChwSW5fYnVmX2N1ciA+PSBwSW5fYnVmX2VuZCkgeyBcCisrICAgIGZvciAoIDsg OyApIHsgXAorKyAgICAgIGlmIChkZWNvbXBfZmxhZ3MgJiBUSU5GTF9GTEFHX0hBU19NT1JFX0lO UFVUKSB7IFwKKysgICAgICAgIFRJTkZMX0NSX1JFVFVSTihzdGF0ZV9pbmRleCwgVElORkxfU1RB VFVTX05FRURTX01PUkVfSU5QVVQpOyBcCisrICAgICAgICBpZiAocEluX2J1Zl9jdXIgPCBwSW5f YnVmX2VuZCkgeyBcCisrICAgICAgICAgIGMgPSAqcEluX2J1Zl9jdXIrKzsgXAorKyAgICAgICAg ICBicmVhazsgXAorKyAgICAgICAgfSBcCisrICAgICAgfSBlbHNlIHsgXAorKyAgICAgICAgYyA9 IDA7IFwKKysgICAgICAgIGJyZWFrOyBcCisrICAgICAgfSBcCisrICAgIH0gXAorKyAgfSBlbHNl IGMgPSAqcEluX2J1Zl9jdXIrKzsgfSBNWl9NQUNST19FTkQKKysKKysjZGVmaW5lIFRJTkZMX05F RURfQklUUyhzdGF0ZV9pbmRleCwgbikgZG8geyBtel91aW50IGM7IFRJTkZMX0dFVF9CWVRFKHN0 YXRlX2luZGV4LCBjKTsgYml0X2J1ZiB8PSAoKCh0aW5mbF9iaXRfYnVmX3QpYykgPDwgbnVtX2Jp dHMpOyBudW1fYml0cyArPSA4OyB9IHdoaWxlIChudW1fYml0cyA8IChtel91aW50KShuKSkKKysj ZGVmaW5lIFRJTkZMX1NLSVBfQklUUyhzdGF0ZV9pbmRleCwgbikgZG8geyBpZiAobnVtX2JpdHMg PCAobXpfdWludCkobikpIHsgVElORkxfTkVFRF9CSVRTKHN0YXRlX2luZGV4LCBuKTsgfSBiaXRf YnVmID4+PSAobik7IG51bV9iaXRzIC09IChuKTsgfSBNWl9NQUNST19FTkQKKysj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SUJfSEVBREVSKQorKyAgeworKyAgICBUSU5GTF9HRVRfQllURSgxLCByLT5tX3po ZHIwKTsgVElORkxfR0VUX0JZVEUoMiwgci0+bV96aGRyMSk7CisrICAgIGNvdW50ZXIgPSAoKChy LT5tX3poZHIwICogMjU2ICsgci0+bV96aGRyMSkgJSAzMSAhPSAwKSB8fCAoci0+bV96aGRyMSAm IDMyKSB8fCAoKHItPm1femhkcjAgJiAxNSkgIT0gOCkpOworKyAgICBpZiAoIShkZWNvbXBfZmxh Z3MgJiBUSU5GTF9GTEFHX1VTSU5HX05PTl9XUkFQUElOR19PVVRQVVRfQlVGKSkgY291bnRlciB8 PSAoKCgxVSA8PCAoOFUgKyAoci0+bV96aGRyMCA+PiA0KSkpID4gMzI3NjhVKSB8fCAoKG91dF9i dWZfc2l6ZV9tYXNrICsgMSkgPCAoU2l6ZVQpKDFVIDw8ICg4VSArIAooci0+bV96aGRyMCA+PiA0 KSkpKSk7CisrICAgIGlmIChjb3VudGVyKSB7IFRJTkZMX0NSX1JFVFVSTl9GT1JFVkVSKDM2LCBU SU5GTF9TVEFUVVNfRkFJTEVEKTsgfQorKyAgfQorKworKyAgZG8KKysgIHsKKysgICAgVElORkxf R0VUX0JJVFMoMywgci0+bV9maW5hbCwgMyk7IHItPm1fdHlwZSA9IHItPm1fZmluYWwgPj4gMTsK KysgICAgaWYgKHItPm1fdHlwZSA9PSAwKQorKyAgICB7CisrICAgICAgVElORkxfU0tJUF9CSVRT KDUsIG51bV9iaXRzICYgNyk7CisrICAgICAgZm9yIChjb3VudGVyID0gMDsgY291bnRlciA8IDQ7 ICsrY291bnRlcikgeyBpZiAobnVtX2JpdHMpIFRJTkZMX0dFVF9CSVRTKDYsIHItPm1fcmF3X2hl YWRlcltjb3VudGVyXSwgOCk7IGVsc2UgVElORkxfR0VUX0JZVEUoNywgci0+bV9yYXdfaGVhZGVy W2NvdW50ZXJdKTsgfQorKyAgICAgIGlmICgoY291bnRlciA9IChyLT5tX3Jhd19oZWFkZXJbMF0g fCAoci0+bV9yYXdfaGVhZGVyWzFdIDw8IDgpKSkgIT0gKG16X3VpbnQpKDB4RkZGRiBeIChyLT5t X3Jhd19oZWFkZXJbMl0gfCAoci0+bV9yYXdfaGVhZGVyWzNdIDw8IDgpKSkpIHsgVElORkxfQ1Jf UkVUVVJOX0ZPUkVWRVIoMzksIApUSU5GTF9TVEFUVVNfRkFJTEVEKTsgfQorKyAgICAgIHdoaWxl ICgoY291bnRlcikgJiYgKG51bV9iaXRzKSkKKysgICAgICB7CisrICAgICAgICBUSU5GTF9HRVRf QklUUyg1MSwgZGlzdCwgOCk7CisrICAgICAgICB3aGlsZSAocE91dF9idWZfY3VyID49IHBPdXRf YnVmX2VuZCkgeyBUSU5GTF9DUl9SRVRVUk4oNTIsIFRJTkZMX1NUQVRVU19IQVNfTU9SRV9PVVRQ VVQpOyB9CisrICAgICAgICAqcE91dF9idWZfY3VyKysgPSAobXpfdWludDgpZGlzdDsKKysgICAg ICAgIGNvdW50ZXItLTsKKysgICAgICB9CisrICAgICAgd2hpbGUgKGNvdW50ZXIpCisrICAgICAg eworKyAgICAgICAgU2l6ZVQgbjsgd2hpbGUgKHBPdXRfYnVmX2N1ciA+PSBwT3V0X2J1Zl9lbmQp IHsgVElORkxfQ1JfUkVUVVJOKDksIFRJTkZMX1NUQVRVU19IQVNfTU9SRV9PVVRQVVQpOyB9Cisr ICAgICAgICB3aGlsZSAocEluX2J1Zl9jdXIgPj0gcEluX2J1Zl9lbmQpCisrICAgICAgICB7Cisr ICAgICAgICAgIGlmIChkZWNvbXBfZmxhZ3MgJiBUSU5GTF9GTEFHX0hBU19NT1JFX0lOUFVUKQor KyAgICAgICAgICB7CisrICAgICAgICAgICAgVElORkxfQ1JfUkVUVVJOKDM4LCBUSU5GTF9TVEFU VVNfTkVFRFNfTU9SRV9JTlBVVCk7CisrICAgICAgICAgIH0KKysgICAgICAgICAgZWxzZQorKyAg ICAgICAgICB7CisrICAgICAgICAgICAgVElORkxfQ1JfUkVUVVJOX0ZPUkVWRVIoNDAsIFRJTkZM X1NUQVRVU19GQUlMRUQpOworKyAgICAgICAgICB9CisrICAgICAgICB9CisrICAgICAgICBuID0g TVpfTUlOKE1aX01JTigoU2l6ZVQpKHBPdXRfYnVmX2VuZCAtIHBPdXRfYnVmX2N1ciksIChTaXpl VCkocEluX2J1Zl9lbmQgLSBwSW5fYnVmX2N1cikpLCBjb3VudGVyKTsKKysgICAgICAgIFRJTkZM X01FTUNQWShwT3V0X2J1Zl9jdXIsIHBJbl9idWZfY3VyLCBuKTsgcEluX2J1Zl9jdXIgKz0gbjsg cE91dF9idWZfY3VyICs9IG47IGNvdW50ZXIgLT0gKG16X3VpbnQpbjsKKysgICAgICB9CisrICAg IH0KKysgICAgZWxzZSBpZiAoci0+bV90eXBlID09IDMpCisrICAgIHsKKysgICAgICBUSU5GTF9D Ul9SRVRVUk5fRk9SRVZFUigxMCwgVElORkxfU1RBVFVTX0ZBSUxFRCk7CisrICAgIH0KKysgICAg ZWxzZQorKyAgICB7CisrICAgICAgaWYgKHItPm1fdHlwZSA9PSAxKQorKyAgICAgIHsKKysgICAg ICAgIG16X3VpbnQ4ICpwID0gci0+bV90YWJsZXNbMF0ubV9jb2RlX3NpemU7IG16X3VpbnQgaTsK KysgICAgICAgIHItPm1fdGFibGVfc2l6ZXNbMF0gPSAyODg7IHItPm1fdGFibGVfc2l6ZXNbMV0g PSAzMjsgVElORkxfTUVNU0VUKHItPm1fdGFibGVzWzFdLm1fY29kZV9zaXplLCA1LCAzMik7Cisr ICAgICAgICBmb3IgKCBpID0gMDsgaSA8PSAxNDM7ICsraSkgKnArKyA9IDg7IGZvciAoIDsgaSA8 PSAyNTU7ICsraSkgKnArKyA9IDk7IGZvciAoIDsgaSA8PSAyNzk7ICsraSkgKnArKyA9IDc7IGZv ciAoIDsgaSA8PSAyODc7ICsraSkgKnArKyA9IDg7CisrICAgICAgfQorKyAgICAgIGVsc2UKKysg ICAgICB7CisrICAgICAgICBmb3IgKGNvdW50ZXIgPSAwOyBjb3VudGVyIDwgMzsgY291bnRlcisr KSB7IFRJTkZMX0dFVF9CSVRTKDExLCByLT5tX3RhYmxlX3NpemVzW2NvdW50ZXJdLCAiXDA1XDA1 XDA0Iltjb3VudGVyXSk7IHItPm1fdGFibGVfc2l6ZXNbY291bnRlcl0gKz0gc19taW5fdGFibGVf c2l6ZXNbY291bnRlcl07IH0KKysgICAgICAgIE1aX0NMRUFSX09CSihyLT5tX3RhYmxlc1syXS5t X2NvZGVfc2l6ZSk7IGZvciAoY291bnRlciA9IDA7IGNvdW50ZXIgPCByLT5tX3RhYmxlX3NpemVz WzJdOyBjb3VudGVyKyspIHsgbXpfdWludCBzOyBUSU5GTF9HRVRfQklUUygxNCwgcywgMyk7IApy LT5tX3RhYmxlc1syXS5tX2NvZGVfc2l6ZVtzX2xlbmd0aF9kZXppZ3phZ1tjb3VudGVyXV0gPSAo bXpfdWludDgpczsgfQorKyAgICAgICAgci0+bV90YWJsZV9zaXplc1syXSA9IDE5OworKyAgICAg IH0KKysgICAgICBmb3IgKCA7IChpbnQpci0+bV90eXBlID49IDA7IHItPm1fdHlwZS0tKQorKyAg ICAgIHsKKysgICAgICAgIGludCB0cmVlX25leHQsIHRyZWVfY3VyOyB0aW5mbF9odWZmX3RhYmxl ICpwVGFibGU7CisrICAgICAgICBtel91aW50IGksIGosIHVzZWRfc3ltcywgdG90YWwsIHN5bV9p bmRleCwgbmV4dF9jb2RlWzE3XSwgdG90YWxfc3ltc1sxNl07IHBUYWJsZSA9ICZyLT5tX3RhYmxl c1tyLT5tX3R5cGVdOyBNWl9DTEVBUl9PQkoodG90YWxfc3ltcyk7IE1aX0NMRUFSX09CSihwVGFi bGUtPm1fbG9va191cCk7IApNWl9DTEVBUl9PQkoocFRhYmxlLT5tX3RyZWUpOworKyAgICAgICAg Zm9yIChpID0gMDsgaSA8IHItPm1fdGFibGVfc2l6ZXNbci0+bV90eXBlXTsgKytpKSB0b3RhbF9z eW1zW3BUYWJs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LSAxXSA9IChtel9pbnQxNilzeW1faW5kZXg7CisrICAgICAgICB9CisrICAgICAgICBpZiAo ci0+bV90eXBlID09IDIpCisrICAgICAgICB7CisrICAgICAgICAgIGZvciAoY291bnRlciA9IDA7 IGNvdW50ZXIgPCAoci0+bV90YWJsZV9zaXplc1swXSArIHItPm1fdGFibGVfc2l6ZXNbMV0pOyAp CisrICAgICAgICAgIHsKKysgICAgICAgICAgICBtel91aW50IHM7IFRJTkZMX0hVRkZfREVDT0RF KDE2LCBkaXN0LCAmci0+bV90YWJsZXNbMl0pOyBpZiAoZGlzdCA8IDE2KSB7IHItPm1fbGVuX2Nv ZGVzW2NvdW50ZXIrK10gPSAobXpfdWludDgpZGlzdDsgY29udGludWU7IH0KKysgICAgICAgICAg ICBpZiAoKGRpc3QgPT0gMTYpICYmICghY291bnRlcikpCisrICAgICAgICAgICAgeworKyAgICAg ICAgICAgICAgVElORkxfQ1JfUkVUVVJOX0ZPUkVWRVIoMTcsIFRJTkZMX1NUQVRVU19GQUlMRUQp OworKyAgICAgICAgICAgIH0KKysgICAgICAgICAgICBudW1fZXh0cmEgPSAiXDAyXDAzXDA3Iltk aXN0IC0gMTZdOyBUSU5GTF9HRVRfQklUUygxOCwgcywgbnVtX2V4dHJhKTsgcyArPSAiXDAzXDAz XDAxMyJbZGlzdCAtIDE2XTsKKysgICAgICAgICAgICBUSU5GTF9NRU1TRVQoci0+bV9sZW5fY29k ZXMgKyBjb3VudGVyLCAoZGlzdCA9PSAxNikgPyByLT5tX2xlbl9jb2Rlc1tjb3VudGVyIC0gMV0g OiAwLCBzKTsgY291bnRlciArPSBzOworKyAgICAgICAgICB9CisrICAgICAgICAgIGlmICgoci0+ bV90YWJsZV9zaXplc1swXSArIHItPm1fdGFibGVfc2l6ZXNbMV0pICE9IGNvdW50ZXIpCisrICAg ICAgICAgIHsKKysgICAgICAgICAgICBUSU5GTF9DUl9SRVRVUk5fRk9SRVZFUigyMSwgVElORkxf U1RBVFVTX0ZBSUxFRCk7CisrICAgICAgICAgIH0KKysgICAgICAgICAgVElORkxfTUVNQ1BZKHIt Pm1fdGFibGVzWzBdLm1fY29kZV9zaXplLCByLT5tX2xlbl9jb2Rlcywgci0+bV90YWJsZV9zaXpl c1swXSk7IFRJTkZMX01FTUNQWShyLT5tX3RhYmxlc1sxXS5tX2NvZGVfc2l6ZSwgci0+bV9sZW5f Y29kZXMgKyByLT5tX3RhYmxlX3NpemVzWzBdLCAKci0+bV90YWJsZV9zaXplc1sxXSk7CisrICAg ICAgICB9CisrICAgICAgfQorKyAgICAgIGZvciAoIDsgOyApCisrICAgICAgeworKyAgICAgICAg bXpfdWludDggKnBTcmM7CisrICAgICAgICBmb3IgKCA7IDsgKQorKyAgICAgICAgeworKyAgICAg ICAgICBpZiAoKChwSW5fYnVmX2VuZCAtIHBJbl9idWZfY3VyKSA8IDQpIHx8ICgocE91dF9idWZf ZW5kIC0gcE91dF9idWZfY3VyKSA8IDIpKQorKyAgICAgICAgICB7CisrICAgICAgICAgICAgVElO RkxfSFVGRl9ERUNPREUoMjMsIGNvdW50ZXIsICZyLT5tX3RhYmxlc1swXSk7CisrICAgICAgICAg ICAgaWYgKGNvdW50ZXIgPj0gMjU2KQorKyAgICAgICAgICAgICAgYnJlYWs7CisrICAgICAgICAg ICAgd2hpbGUgKHBPdXRfYnVmX2N1ciA+PSBwT3V0X2J1Zl9lbmQpIHsgVElORkxfQ1JfUkVUVVJO KDI0LCBUSU5GTF9TVEFUVVNfSEFTX01PUkVfT1VUUFVUKTsgfQorKyAgICAgICAgICAgICpwT3V0 X2J1Zl9jdXIrKyA9IChtel91aW50OCljb3VudGVyOworKyAgICAgICAgICB9CisrICAgICAgICAg IGVsc2UKKysgICAgICAgICAgeworKyAgICAgICAgICAgIGludCBzeW0yOyBtel91aW50IGNvZGVf bGVuOworKyNpZiBUSU5GTF9VU0VfNjRCSVRfQklUQlVGCisrICAgICAgICAgICAgaWYgKG51bV9i aXRzIDwgMzApIHsgYml0X2J1ZiB8PSAoKCh0aW5mbF9iaXRfYnVmX3QpTVpfUkVBRF9MRTMyKHBJ bl9idWZfY3VyKSkgPDwgbnVtX2JpdHMpOyBwSW5fYnVmX2N1ciArPSA0OyBudW1fYml0cyArPSAz MjsgfQorKyNlbHNlCisrICAgICAgICAgICAgaWYgKG51bV9iaXRzIDwgMTUpIHsgYml0X2J1ZiB8 PSAoKCh0aW5mbF9iaXRfYnVmX3QpTVpfUkVBRF9MRTE2KHBJbl9idWZfY3VyKSkgPDwgbnVtX2Jp dHMpOyBwSW5fYnVmX2N1ciArPSAyOyBudW1fYml0cyArPSAxNjsgfQorKyNlbmRpZgorKyAgICAg ICAgICAgIGlmICgoc3ltMiA9IHItPm1fdGFibGVzWzBdLm1fbG9va191cFtiaXRfYnVmICYgKFRJ TkZMX0ZBU1RfTE9PS1VQX1NJWkUgLSAxKV0pID49IDApCisrICAgICAgICAgICAgICBjb2RlX2xl biA9IHN5bTIgPj4gOTsKKysgICAgICAgICAgICBlbHNlCisrICAgICAgICAgICAgeworKyAgICAg ICAgICAgICAgY29kZV9sZW4gPSBUSU5GTF9GQVNUX0xPT0tVUF9CSVRTOyBkbyB7IHN5bTIgPSBy LT5tX3RhYmxlc1swXS5tX3RyZWVbfnN5bTIgKyAoKGJpdF9idWYgPj4gY29kZV9sZW4rKykgJiAx KV07IH0gd2hpbGUgKHN5bTIgPCAwKTsKKysgICAgICAgICAgICB9CisrICAgICAgICAgICAgY291 bnRlciA9IHN5bTI7IGJpdF9idWYgPj49IGNvZGVfbGVuOyBudW1fYml0cyAtPSBjb2RlX2xlbjsK KysgICAgICAgICAgICBpZiAoY291bnRlciAmIDI1NikKKysgICAgICAgICAgICAgIGJyZWFrOwor KworKyNpZiAhVElORkxfVVNFXzY0QklUX0JJVEJVRgorKyAgICAgICAgICAgIGlmIChudW1fYml0 cyA8IDE1KSB7IGJpdF9idWYgfD0gKCgodGluZmxfYml0X2J1Zl90KU1aX1JFQURfTEUxNihwSW5f YnVmX2N1cikpIDw8IG51bV9iaXRzKTsgcEluX2J1Zl9jdXIgKz0gMjsgbnVtX2JpdHMgKz0gMTY7 IH0KKysjZW5kaWYKKysgICAgICAgICAgICBpZiAoKHN5bTIgPSByLT5tX3RhYmxlc1swXS5tX2xv b2tfdXBbYml0X2J1ZiAmIChUSU5GTF9GQVNUX0xPT0tVUF9TSVpFIC0gMSldKSA+PSAwKQorKyAg ICAgICAgICAgICAgY29kZV9sZW4gPSBzeW0yID4+IDk7CisrICAgICAgICAgICAgZWxzZQorKyAg ICAgICAgICAgIHsKKysgICAgICAgICAgICAgIGNvZGVfbGVuID0gVElORkxfRkFTVF9MT09LVVBf QklUUzsgZG8geyBzeW0yID0gci0+bV90YWJsZXNbMF0ubV90cmVlW35zeW0yICsgKChiaXRfYnVm ID4+IGNvZGVfbGVuKyspICYgMSldOyB9IHdoaWxlIChzeW0yIDwgMCk7CisrICAgICAgICAgICAg fQorKyAgICAgICAgICAgIGJpdF9idWYgPj49IGNvZGVfbGVuOyBudW1fYml0cyAtPSBjb2RlX2xl bjsKKysKKysgICAgICAgICAgICBwT3V0X2J1Zl9jdXJbMF0gPSAobXpfdWludDgpY291bnRlcjsK KysgICAgICAgICAgICBpZiAoc3ltMiAmIDI1NikKKysgICAgICAgICAgICB7CisrICAgICAgICAg ICAgICBwT3V0X2J1Zl9jdXIrKzsKKysgICAgICAgICAgICAgIGNvdW50ZXIgPSBzeW0yOworKyAg ICAgICAgICAgICAgYnJlYWs7CisrICAgICAgICAgICAgfQorKyAgICAgICAgICAgIHBPdXRfYnVm X2N1clsxXSA9IChtel91aW50OClzeW0yOworKyAgICAgICAgICAgIHBPdXRfYnVmX2N1ciArPSAy OworKyAgICAgICAgICB9CisrICAgICAgICB9CisrICAgICAgICBpZiAoKGNvdW50ZXIgJj0gNTEx KSA9PSAyNTYpIGJyZWFrOworKworKyAgICAgICAgbnVtX2V4dHJhID0gc19sZW5ndGhfZXh0cmFb Y291bnRlciAtIDI1N107IGNvdW50ZXIgPSBzX2xl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ICAgd2hpbGUgKGNvdW50ZXItLSkKKysgICAgICAgICAgeworKyAgICAgICAgICAgIHdo aWxlIChwT3V0X2J1Zl9jdXIgPj0gcE91dF9idWZfZW5kKSB7IFRJTkZMX0NSX1JFVFVSTig1Mywg VElORkxfU1RBVFVTX0hBU19NT1JFX09VVFBVVCk7IH0KKysgICAgICAgICAgICAqcE91dF9idWZf Y3VyKysgPSBwT3V0X2J1Zl9zdGFydFsoZGlzdF9mcm9tX291dF9idWZfc3RhcnQrKyAtIGRpc3Qp ICYgb3V0X2J1Zl9zaXplX21hc2tdOworKyAgICAgICAgICB9CisrICAgICAgICAgIGNvbnRpbnVl OworKyAgICAgICAgfQorKyNpZiBNSU5JWl9VU0VfVU5BTElHTkVEX0xPQURTX0FORF9TVE9SRVMK KysgICAgICAgIGVsc2UgaWYgKChjb3VudGVyID49IDkpICYmIChjb3VudGVyIDw9IGRpc3QpKQor KyAgICAgICAgeworKyAgICAgICAgICBjb25zdCBtel91aW50OCAqcFNyY19lbmQgPSBwU3JjICsg KGNvdW50ZXIgJiB+Nyk7CisrICAgICAgICAgIGRvCisrICAgICAgICAgIHsKKysgICAgICAgICAg ICAoKG16X3VpbnQzMiAqKXBPdXRfYnVmX2N1cilbMF0gPSAoKGNvbnN0IG16X3VpbnQzMiAqKXBT cmMpWzBdOworKyAgICAgICAgICAgICgobXpfdWludDMyICopcE91dF9idWZfY3VyKVsxXSA9ICgo Y29uc3QgbXpfdWludDMyICopcFNyYylbMV07CisrICAgICAgICAgICAgcE91dF9idWZfY3VyICs9 IDg7CisrICAgICAgICAgIH0gd2hpbGUgKChwU3JjICs9IDgpIDwgcFNyY19lbmQpOworKyAgICAg ICAgICBpZiAoKGNvdW50ZXIgJj0gNykgPCAzKQorKyAgICAgICAgICB7CisrICAgICAgICAgICAg aWYgKGNvdW50ZXIpCisrICAgICAgICAgICAgeworKyAgICAgICAgICAgICAgcE91dF9idWZfY3Vy WzBdID0gcFNyY1swXTsKKysgICAgICAgICAgICAgIGlmIChjb3VudGVyID4gMSkKKysgICAgICAg ICAgICAgICAgcE91dF9idWZfY3VyWzFdID0gcFNyY1sxXTsKKysgICAgICAgICAgICAgIHBPdXRf YnVmX2N1ciArPSBjb3VudGVyOworKyAgICAgICAgICAgIH0KKysgICAgICAgICAgICBjb250aW51 ZTsKKysgICAgICAgICAgfQorKyAgICAgICAgfQorKyNlbmRpZgorKyAgICAgICAgZG8KKysgICAg ICAgIHsKKysgICAgICAgICAgcE91dF9idWZfY3VyWzBdID0gcFNyY1swXTsKKysgICAgICAgICAg cE91dF9idWZfY3VyWzFdID0gcFNyY1sxXTsKKysgICAgICAgICAgcE91dF9idWZfY3VyWzJdID0g cFNyY1syXTsKKysgICAgICAgICAgcE91dF9idWZfY3VyICs9IDM7IHBTcmMgKz0gMzsKKysgICAg ICAgIH0gd2hpbGUgKChpbnQpKGNvdW50ZXIgLT0gMykgPiAyKTsKKysgICAgICAgIGlmICgoaW50 KWNvdW50ZXIgPiAwKQorKyAgICAgICAgeworKyAgICAgICAgICBwT3V0X2J1Zl9jdXJbMF0gPSBw U3JjWzBdOworKyAgICAgICAgICBpZiAoKGludCljb3VudGVyID4gMSkKKysgICAgICAgICAgICBw T3V0X2J1Zl9jdXJbMV0gPSBwU3JjWzFdOworKyAgICAgICAgICBwT3V0X2J1Zl9jdXIgKz0gY291 bnRlcjsKKysgICAgICAgIH0KKysgICAgICB9CisrICAgIH0KKysgIH0gd2hpbGUgKCEoci0+bV9m aW5hbCAmIDEpKTsKKysgIGlmIChkZWNvbXBfZmxhZ3MgJiBUSU5GTF9GTEFHX1BBUlNFX1pMSUJf SEVBREVSKQorKyAgeworKyAgICBUSU5GTF9TS0lQX0JJVFMoMzIsIG51bV9iaXRzICYgNyk7IGZv ciAoY291bnRlciA9IDA7IGNvdW50ZXIgPCA0OyArK2NvdW50ZXIpIHsgbXpfdWludCBzOyBpZiAo bnVtX2JpdHMpIFRJTkZMX0dFVF9CSVRTKDQxLCBzLCA4KTsgZWxzZSB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yICs9IDgpCisrICAgICAgeworKyAgICAgICAgczEgKz0gcHRyWzBdLCBzMiArPSBz MTsgczEgKz0gcHRyWzFdLCBzMiArPSBzMTsgczEgKz0gcHRyWzJdLCBzMiArPSBzMTsgczEgKz0g cHRyWzNdLCBzMiArPSBzMTsKKysgICAgICAgIHMxICs9IHB0cls0XSwgczIgKz0gczE7IHMxICs9 IHB0cls1XSwgczIgKz0gczE7IHMxICs9IHB0cls2XSwgczIgKz0gczE7IHMxICs9IHB0cls3XSwg czIgKz0gczE7CisrICAgICAgfQorKyAgICAgIGZvciAoIDsgaSA8IGJsb2NrX2xlbjsgKytpKSBz MSArPSAqcHRyKyssIHMyICs9IHMxOworKyAgICAgIHMxICU9IDY1NTIxVSwgczIgJT0gNjU1MjFV OyBidWZfbGVuIC09IGJsb2NrX2xlbjsgYmxvY2tfbGVuID0gNTU1MjsKKysgICAgfQorKyAgICBy LT5tX2NoZWNrX2FkbGVyMzIgPSAoczIgPDwgMTYpICsgczE7IGlmICgoc3RhdHVzID09IFRJTkZM X1NUQVRVU19ET05FKSAmJiAoZGVjb21wX2ZsYWdzICYgVElORkxfRkxBR19QQVJTRV9aTElCX0hF QURFUikgJiYgKHItPm1fY2hlY2tfYWRsZXIzMiAhPSByLT5tX3pfYWRsZXIzMikpIHN0YXR1cyA9 IApUSU5GTF9TVEFUVVNfQURMRVIzMl9NSVNNQVRDSDsKKysgIH0KKysgIHJldHVybiBzdGF0dXM7 CisrfQorKworKy8vIEhpZ2hlciBsZXZlbCBoZWxwZXIgZnVuY3Rpb25zLgorK3ZvaWQgKnRpbmZs X2RlY29tcHJlc3NfbWVtX3RvX2hlYXAoY29uc3Qgdm9pZCAqcFNyY19idWYsIFNpemVUIHNyY19i dWZfbGVuLCBTaXplVCAqcE91dF9sZW4sIGludCBmbGFncykKKyt7CisrICB0aW5mbF9kZWNvbXBy ZXNzb3IgZGVjb21wOyB2b2lkICpwQnVmID0gTlVMTCwgKnBOZXdfYnVmOyBTaXplVCBzc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