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TIyLDggKzEyMiw2IEBACiAgKgogICogRGVzY3JpcHRpb246ICBUaGlzIHJvdXRpbmUgZXhlY3V0ZXMgb24gQ1BVIHdoaWNoIHJlY2VpdmVkCiAgKiAgICAgICAgICAgICAgICdSRVNDSEVEVUxFX0lQSScuCi0gKiAgICAgICAgICAgICAgIFJlc2NoZWR1bGluZyBpcyBwcm9jZXNzZWQgYXQgdGhlIGV4aXQgb2YgaW50ZXJydXB0Ci0gKiAgICAgICAgICAgICAgIG9wZXJhdGlvbi4KICAqCiAgKiBCb3JuIG9uIERhdGU6IDIwMDIuMDIuMDUKICAqCkBAIC0xMzgsNyArMTM2LDcgQEAKICAqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogdm9pZCBzbXBfcmVzY2hlZHVsZV9pbnRlcnJ1cHQodm9pZCkKIHsKLQkvKiBub3RoaW5nIHRvIGRvICovCisJc2NoZWR1bGVyX2lwaSgpOwogfQogCiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09KgpkaWZmIC0tZ2l0IGEvYXJjaC9tNjhrL2F0YXJpL2F0YWtleWIuYyBiL2FyY2gvbTY4ay9hdGFyaS9hdGFrZXliLmMKaW5kZXggYjk5NTUxMy4uOTUwMjJiMCAxMDA2NDQKLS0tIGEvYXJjaC9tNjhrL2F0YXJpL2F0YWtleWIuYworKysgYi9hcmNoL202OGsvYXRhcmkvYXRha2V5Yi5jCkBAIC0zNiwxMyArMzYsMTAgQEAKIAogLyogSG9vayBmb3IgTUlESSBzZXJpYWwgZHJpdmVyICovCiB2b2lkICgqYXRhcmlfTUlESV9pbnRlcnJ1cHRfaG9vaykgKHZvaWQpOwotLyogSG9vayBmb3IgbW91c2UgZHJpdmVyICovCi12b2lkICgqYXRhcmlfbW91c2VfaW50ZXJydXB0X2hvb2spIChjaGFyICopOw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VjY4X1BBUlRJVElPTj15CitDT05GSUdfTkxTPXkKK0NPTkZJR19OTFNfREVGQVVMVD0iY3A0MzciCitDT05GSUdfTkxTX0NPREVQQUdFXzQzNz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzczNz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzc3NT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1MD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1Mj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1NT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1Nz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2MD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2MT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2Mj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2Mz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2ND1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2NT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2Nj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2OT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzkzNj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzk1MD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzkzMj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzk0OT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg3ND1tCitDT05GSUdfTkxTX0lTTzg4NTlfOD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzEyNTA9bQorQ09ORklHX05MU19DT0RFUEFHRV8xMjUxPW0KK0NPTkZJR19OTFNfQVNDSUk9bQorQ09ORklHX05MU19JU084ODU5XzE9bQorQ09ORklHX05MU19JU084ODU5XzI9bQorQ09ORklHX05MU19JU084ODU5XzM9bQorQ09ORklHX05MU19JU084ODU5XzQ9bQorQ09ORklHX05MU19JU084ODU5XzU9bQorQ09ORklHX05MU19JU084ODU5XzY9bQorQ09ORklHX05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nMgKi8KKwlpbml0X3hscl9pcnFzKCk7CisJd3JpdGVfYzBfZWltcihubG1faXJxX21hc2spOworfQorCit2b2lkIF9fY3B1aW5pdCBubG1fc21wX2lycV9pbml0KHZvaWQpCit7CisJLyogc2V0IGludGVycnVwdCBtYXNrIGZvciBub24temVybyBjcHVzICovCisJd3JpdGVfYzBfZWltcihubG1faXJxX21hc2spOworfQorCithc21saW5rYWdlIHZvaWQgcGxhdF9pcnFfZGlzcGF0Y2godm9pZCkKK3sKKwl1aW50NjRfdCBlaXJyOworCWludCBpOworCisJZWlyciA9IHJlYWRfYzBfZWlycigpICYgcmVhZF9jMF9laW1yKCk7CisJaWYgKCFlaXJyKQorCQlyZXR1cm47CisKKwkvKiBubyBuZWVkIG9mIEVJUlIgaGVyZSwgd3JpdGluZyBjb21wYXJlIGNsZWFycyBpbnRlcnJ1cHQgKi8KKwlpZiAoZWlyciAmICgxIDw8IElSUV9USU1FUikpIHsKKwkJZG9fSVJRKElSUV9USU1FUik7CisJCXJldHVybjsKKwl9CisKKwkvKiB1c2UgZGNsdHo6IG9wdGltaXplIGJlbG93IGNvZGUgKi8KKwlmb3IgKGkgPSA2MzsgaSAhPSAtMTsgaS0tKSB7CisJCWlmIChlaXJyICYgKDFVTEwgPDwgaSkpCisJCQlicmVhazsKKwl9CisJaWYgKGkgPT0gLTEpIHsKKwkJcHJfZXJyKCJubyBpbnRlcnJ1cHQgISFcbiIpOworCQlyZXR1cm47CisJfQorCisJLyogQWNrIGVpcnIgKi8KKwl3cml0ZV9jMF9laXJyKDFVTEwgPDwgaSk7CisKKwlkb19JUlEoaSk7Cit9CmRpZmYgLS1naXQgYS9hcmNoL21pcHMvbmV0bG9naWMveGxyL3BsYXRmb3JtLmMgYi9hcmNoL21pcHMvbmV0bG9naWMveGxyL3BsYXRmb3JtLmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNjA5ZWMyNQotLS0gL2Rldi9udWxsCisrKyBiL2FyY2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1wX2NvbW1hbmQoYWRkcmVzcyk7CiAJCWJyZWFrOwogCWNhc2UgRVZFTlRfVFlQRV9DTURfSEFSRF9FUlI6CkBAIC0zNjcsNyArMzY2LDcgQEAKIAlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZpb21tdS0+bG9jaywgZmxhZ3MpOwogfQogCi1pcnFyZXR1cm5fdCBhbWRfaW9tbXVfaW50X2hhbmRsZXIoaW50IGlycSwgdm9pZCAqZGF0YSkKK2lycXJldHVybl90IGFtZF9pb21tdV9pbnRfdGhyZWFkKGludCBpcnEsIHZvaWQgKmRhdGEpCiB7CiAJc3RydWN0IGFtZF9pb21tdSAqaW9tbXU7CiAKQEAgLTM3NywxMzAgKzM3NiwzNjAgQEAKIAlyZXR1cm4gSVJRX0hBTkRMRUQ7CiB9CiAKK2lycXJldHVybl90IGFtZF9pb21tdV9pbnRfaGFuZGxlcihpbnQgaXJxLCB2b2lkICpkYXRhKQoreworCXJldHVybiBJUlFfV0FLRV9USFJFQUQ7Cit9CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogSU9NTVUgY29tbWFuZCBxdWV1aW5nIGZ1bmN0aW9ucwogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0vKgotICogV3JpdGVzIHRoZSBjb21tYW5kIHRvIHRoZSBJT01NVXMgY29tbWFuZCBidWZmZXIgYW5kIGluZm9ybXMgdGhlCi0gKiBoYXJkd2FyZSBhYm91dCB0aGUgbmV3IGNvbW1hbmQuIE11c3QgYmUgY2FsbGVkIHdpdGggaW9tbXUtPmxvY2sgaGVsZC4KLSAqLwotc3RhdGljIGludCBfX2lvbW11X3F1ZXVlX2NvbW1hbmQoc3RydWN0IGFtZF9pb21tdSAqaW9tbXUsIHN0cnVjdCBpb21tdV9jbWQ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JTklUKGRldl9kb21haW5fbGlzdCk7CisKK3N0YXRpYyBzdHJ1Y3QgeGVuX2RldmljZV9kb21haW5fb3duZXIgKmZpbmRfZGV2aWNlKHN0cnVjdCBwY2lfZGV2ICpkZXYpCit7CisJc3RydWN0IHhlbl9kZXZpY2VfZG9tYWluX293bmVyICpvd25lcjsKKworCWxpc3RfZm9yX2VhY2hfZW50cnkob3duZXIsICZkZXZfZG9tYWluX2xpc3QsIGxpc3QpIHsKKwkJaWYgKG93bmVyLT5kZXYgPT0gZGV2KQorCQkJcmV0dXJuIG93bmVyOworCX0KKwlyZXR1cm4gTlVMTDsKK30KKworaW50IHhlbl9maW5kX2RldmljZV9kb21haW5fb3duZXIoc3RydWN0IHBjaV9kZXYgKmRldikKK3sKKwlzdHJ1Y3QgeGVuX2RldmljZV9kb21haW5fb3duZXIgKm93bmVyOworCWludCBkb21haW4gPSAtRU5PREVWOworCisJc3Bpbl9sb2NrKCZkZXZfZG9tYWluX2xpc3Rfc3BpbmxvY2spOworCW93bmVyID0gZmluZF9kZXZpY2UoZGV2KTsKKwlpZiAob3duZXIpCisJCWRvbWFpbiA9IG93bmVyLT5kb21haW47CisJc3Bpbl91bmxvY2soJmRldl9kb21haW5fbGlzdF9zcGlubG9jayk7CisJcmV0dXJuIGRvbWFpbjsKK30KK0VYUE9SVF9TWU1CT0xfR1BMKHhlbl9maW5kX2RldmljZV9kb21haW5fb3duZXIpOworCitpbnQgeGVuX3JlZ2lzdGVyX2RldmljZV9kb21haW5fb3duZXIoc3RydWN0IHBjaV9kZXYgKmRldiwgdWludDE2X3QgZG9tYWluKQoreworCXN0cnVjdCB4ZW5fZGV2aWNlX2RvbWFpbl9vd25lciAqb3duZXI7CisKKwlvd25lciA9IGt6YWxsb2Moc2l6ZW9mKHN0cnVjdCB4ZW5fZGV2aWNlX2RvbWFpbl9vd25lciksIEdGUF9LRVJORUwpOworCWlmICghb3duZXIpCisJCXJldHVybiAtRU5PREVWOworCisJc3Bpbl9sb2NrKCZkZXZfZG9tYWluX2xpc3Rfc3BpbmxvY2spOworCWlmIChmaW5kX2RldmljZShkZXYpKSB7CisJCXNwaW5fdW5sb2NrKCZkZXZfZG9tYWluX2xpc3Rfc3BpbmxvY2spOworCQlrZnJlZShvd25lcik7CisJCXJldHVybiAtRUVYSVNUOworCX0KKwlvd25lci0+ZG9tYWluID0gZG9tYWluOworCW93bmVyLT5kZXYgPSBkZXY7CisJbGlzdF9hZGRfdGFpbCgmb3duZXItPmxpc3QsICZkZXZfZG9tYWluX2xpc3QpOworCXNwaW5fdW5sb2NrKCZkZXZfZG9tYWluX2xpc3Rfc3BpbmxvY2spOworCXJldHVybiAwOworfQorRVhQT1JUX1NZTUJPTF9HUEwoeGVuX3JlZ2lzdGVyX2RldmljZV9kb21haW5fb3duZXIpOworCitpbnQgeGVuX3VucmVnaXN0ZXJfZGV2aWNlX2RvbWFpbl9vd25lcihzdHJ1Y3QgcGNpX2RldiAqZGV2KQoreworCXN0cnVjdCB4ZW5fZGV2aWNlX2RvbWFpbl9vd25lciAqb3duZXI7CisKKwlzcGluX2xvY2soJmRldl9kb21haW5fbGlzdF9zcGlubG9jayk7CisJb3duZXIgPSBmaW5kX2RldmljZShkZXYpOworCWlmICghb3duZXIpIHsKKwkJc3Bpbl91bmxvY2soJmRldl9kb21haW5fbGlzdF9zcGlubG9jayk7CisJCXJldHVybiAtRU5PREVWOworCX0KKwlsaXN0X2RlbCgmb3duZXItPmxpc3QpOworCXNwaW5fdW5sb2NrKCZkZXZfZG9tYWluX2xpc3Rfc3BpbmxvY2spOworCWtmcmVlKG93bmVyKTsKKwlyZXR1cm4gMDsKK30KK0VYUE9SVF9TWU1CT0xfR1BMKHhlbl91bnJlZ2lzdGVyX2RldmljZV9kb21haW5fb3duZXIpOworI2VuZGlmCmRpZmYgLS1naXQgYS9hcmNoL3g4Ni9wbGF0Zm9ybS91di90bGJfdXYuYyBiL2FyY2gveDg2L3BsYXRmb3JtL3V2L3RsYl91di5jCmluZGV4IDdj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AqIGZyb20gdGhlIG9uZSBzdG9yZWQgaW4gdGhlIHN0cnVjdCBwbV9jbGtfbm90aWZpZXJfYmxvY2sgb2JqZWN0LCB0aGUgZnVuY3Rpb24KKyAqIGRvZXMgbm90aGluZy4KKyAqLworc3RhdGljIGludCBwbV9ydW50aW1lX2Nsa19ub3RpZnkoc3RydWN0IG5vdGlmaWVyX2Jsb2NrICpuYiwKKwkJCQkgdW5zaWduZWQgbG9uZyBhY3Rpb24sIHZvaWQgKmRhdGEpCit7CisJc3RydWN0IHBtX2Nsa19ub3RpZmllcl9ibG9jayAqY2xrbmI7CisJc3RydWN0IGRldmljZSAqZGV2ID0gZGF0YTsKKwljaGFyICpjb25faWQ7CisJaW50IGVycm9yOworCisJZGV2X2RiZyhkZXYsICIlcygpICVsZFxuIiwgX19mdW5jX18sIGFjdGlvbik7CisKKwljbGtuYiA9IGNvbnRhaW5lcl9vZihuYiwgc3RydWN0IHBtX2Nsa19ub3RpZmllcl9ibG9jaywgbmIpOworCisJc3dpdGNoIChhY3Rpb24pIHsKKwljYXNlIEJVU19OT1RJRllfQUREX0RFVklDRToKKwkJaWYgKGRldi0+cHdyX2RvbWFpbikKKwkJCWJyZWFrOworCisJCWVycm9yID0gcG1fcnVudGltZV9jbGtfaW5pdChkZXYpOworCQlpZiAoZXJyb3IpCisJCQlicmVhazsKKworCQlkZXYtPnB3cl9kb21haW4gPSBjbGtuYi0+cHdyX2RvbWFpbjsKKwkJaWYgKGNsa25iLT5jb25faWRzWzBdKSB7CisJCQlmb3IgKGNvbl9pZCA9IGNsa25iLT5jb25faWRzWzBdOyAqY29uX2lkOyBjb25faWQrKykKKwkJCQlwbV9ydW50aW1lX2Nsa19hZGQoZGV2LCBjb25faWQpOworCQl9IGVsc2UgeworCQkJcG1fcnVudGltZV9jbGtfYWRkKGRldiwgTlVMTCk7CisJCX0KKworCQlicmVhazsKKwljYXNlIEJVU19OT1RJRllfREVMX0RFVklDRToKKwkJaWYgKGRldi0+cHdyX2RvbW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oQ1BVRlJFUV9ERUJVR19DT1JFLCAiZnJlcS10YWJsZSIsIG1zZykKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogICAgICAgICAgICAgICAgICAgICBGUkVRVUVOQ1kgVEFCTEUgSEVMUEVSUyAgICAgICAgICAgICAgICAgICAgICAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTMxLDExICsyOCwxMSBAQAogCWZvciAoaSA9IDA7ICh0YWJsZVtpXS5mcmVxdWVuY3kgIT0gQ1BVRlJFUV9UQUJMRV9FTkQpOyBpKyspIHsKIAkJdW5zaWduZWQgaW50IGZyZXEgPSB0YWJsZVtpXS5mcmVxdWVuY3k7CiAJCWlmIChmcmVxID09IENQVUZSRVFfRU5UUllfSU5WQUxJRCkgewotCQkJZHByaW50aygidGFibGUgZW50cnkgJXUgaXMgaW52YWxpZCwgc2tpcHBpbmdcbiIsIGkpOworCQkJcHJfZGVidWcoInRhYmxlIGVudHJ5ICV1IGlzIGludmFsaWQsIHNraXBwaW5nXG4iLCBpKTsKIAogCQkJY29udGludWU7CiAJCX0KLQkJZHByaW50aygidGFibGUgZW50cnkgJXU6ICV1IGtIeiwgJXUgaW5kZXhcbiIsCisJCXByX2RlYnVnKCJ0YWJsZSBlbnRyeSAldTogJXUga0h6LCAldSBpbmRleFxuIiwKIAkJCQkJaSwgZnJlcSwgdGFibGVbaV0uaW5kZXgpOwogCQlpZiAoZnJlcSA8IG1pbl9mcmVxKQogCQkJbWluX2ZyZXEgPSBmcmVxOwpAQCAtNjEsNyArNTgsNyBAQAogCXVuc2lnbmVkIGludCBpOwogCXVuc2lnbmVkIGludCBjb3VudCA9IDA7CiAKLQlkcHJpbnRrKCJyZXF1ZXN0IGZvciB2ZXJpZmljYXRpb24gb2YgcG9saWN5ICgldSAtICV1IGtIeikg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SB3aGVyZSB0aGlzIGxvY2sgaXMKKwkgKiBub3QgdGhlIHNhbWUgYXMgdGhlIHNhZmUgbG9jaywgdGhlbiB0aGUgbG9jayBjaGFpbiBpcworCSAqIHVzZWQgdG8gZGVzY3JpYmUgdGhlIHByb2JsZW0uIE90aGVyd2lzZSB3ZSB3b3VsZCBuZWVkCisJICogdG8gc2hvdyBhIGRpZmZlcmVudCBDUFUgY2FzZSBmb3IgZWFjaCBsaW5rIGluIHRoZSBjaGFpbgorCSAqIGZyb20gdGhlIHNhZmVfY2xhc3MgbG9jayB0byB0aGUgdW5zYWZlX2NsYXNzIGxvY2suCisJICovCisJaWYgKHBhcmVudCAhPSBzb3VyY2UpIHsKKwkJcHJpbnRrKCJDaGFpbiBleGlzdHMgb2Y6XG4gICIpOworCQlfX3ByaW50X2xvY2tfbmFtZShzb3VyY2UpOworCQlwcmludGsoIiAtLT4gIik7CisJCV9fcHJpbnRfbG9ja19uYW1lKHBhcmVudCk7CisJCXByaW50aygiIC0tPiAiKTsKKwkJX19wcmludF9sb2NrX25hbWUodGFyZ2V0KTsKKwkJcHJpbnRrKCJcblxuIik7CisJfQorCisJcHJpbnRrKCIgUG9zc2libGUgdW5zYWZlIGxvY2tpbmcgc2NlbmFyaW86XG5cbiIpOworCXByaW50aygiICAgICAgIENQVTAgICAgICAgICAgICAgICAgICAgIENQVTFcbiIpOworCXByaW50aygiICAgICAgIC0tLS0gICAgICAgICAgICAgICAgICAgIC0tLS1cbiIpOworCXByaW50aygiICBsb2NrKCIpOworCV9fcHJpbnRfbG9ja19uYW1lKHRhcmdldCk7CisJcHJpbnRrKCIpO1xuIik7CisJcHJpbnRrKCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jaygiKTsKKwlfX3ByaW50X2xvY2tfbmFtZShwYXJlbnQpOworCXByaW50aygiKTtcbiIpOworCXByaW50aygiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2soIik7CisJX19wcmludF9sb2NrX25hbWUod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biIpOworCXByaW50aygiICAgICAgIENQVTAgICAgICAgICAgICAgICAgICAgIENQVTFcbiIpOworCXByaW50aygiICAgICAgIC0tLS0gICAgICAgICAgICAgICAgICAgIC0tLS1cbiIpOworCXByaW50aygiICBsb2NrKCIpOworCV9fcHJpbnRfbG9ja19uYW1lKHVuc2FmZV9jbGFzcyk7CisJcHJpbnRrKCIpO1xuIik7CisJcHJpbnRrKCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYWxfaXJxX2Rpc2FibGUoKTtcbiIpOworCXByaW50aygiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2soIik7CisJX19wcmludF9sb2NrX25hbWUoc2FmZV9jbGFzcyk7CisJcHJpbnRrKCIpO1xuIik7CisJcHJpbnRrKCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jaygiKTsKKwlfX3ByaW50X2xvY2tfbmFtZShtaWRkbGVfY2xhc3MpOworCXByaW50aygiKTtcbiIpOworCXByaW50aygiICA8SW50ZXJydXB0PlxuIik7CisJcHJpbnRrKCIgICAgbG9jaygiKTsKKwlfX3ByaW50X2xvY2tfbmFtZShzYWZlX2NsYXNzKTsKKwlwcmludGsoIik7XG4iKTsKKwlwcmludGsoIlxuICoqKiBERUFETE9DSyAqKipcblxuIik7Cit9CisKIHN0YXRpYyBpbnQKIHByaW50X2JhZF9pcnFfZGVwZW5kZW5jeShzdHJ1Y3QgdGFza19zdHJ1Y3QgKmN1cnIsCiAJCQkgc3RydWN0IGxvY2tfbGlzdCAqcHJldl9yb290LApAQCAtMTM3Niw2ICsxNDk5LDkgQEAKIAlwcmludF9zdGFja190cmFjZShmb3J3YXJkc19lbnRyeS0+Y2xhc3MtPnVzYWdlX3RyYWNlcyArIGJpdDIsIDEpOwogCiAJcHJpbnRrKCJcbm90aGVyIGluZm8gdGhhdCBtaWdodCBoZWxwIHVzIGRlYnVnIHRoaXM6XG5cbiIpOworCXByaW50X2lycV9sb2NrX3NjZW5hcmlv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SAgICAgICAgICBcCi0oeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JdW5zaWduZWQgaW50IF9faTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlpbnQgX19yZXQgPSAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXN0cnVjdCBjb21wYXRfZWJ0X2VudHJ5X213dCAqX193YXRjaGVyOyAgICAgICAgICAgICBcCi0JICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlmb3IgKF9faSA9IGUtPndhdGNoZXJzX29mZnNldDsgICAgICAgICAgICAgICAgICAgICAgXAotCSAgICAgX19pIDwgKGUpLT50YXJnZXRfb2Zmc2V0OyAgICAgICAgICAgICAgICAgICAgICBcCi0JICAgICBfX2kgKz0gX193YXRjaGVyLT53YXRjaGVyX3NpemUgKyAgICAgICAgICAgICAgIFwKLQkgICAgIHNpemVvZihzdHJ1Y3QgY29tcGF0X2VidF9lbnRyeV9td3QpKSB7ICAgICAgICAgXAotCQlfX3dhdGNoZXIgPSAodm9pZCAqKShlKSArIF9faTsgICAgICAgICAgICAgIFwKLQkJX19yZXQgPSBmbihfX3dhdGNoZXIgLCAjIyBhcmdzKTsgICAgICAgICAgICBcCi0JCWlmIChfX3JldCAhPSAwKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJYnJlYWs7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JaWYgKF9fcmV0ID09IDApIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJaWYgKF9faSAhPSAoZSktPnRhcmdldF9vZmZzZXQpICAgICAgICAgICAgICBcCi0JCQlfX3JldCA9IC1FSU5WQUw7ICAgICAgICAgICAgICAgICAgICBcCi0JfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlfX3JldDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotfSkKLQotI2RlZmluZSBFQlRfQ09NUEFUX01BVENIX0lURVJBVEUoZSwgZm4sIGFyZ3MuLi4pICAgICAgICAgICAgXAotKHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXVuc2lnbmVkIGludCBfX2k7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JaW50IF9fcmV0ID0gMDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlzdHJ1Y3QgY29tcGF0X2VidF9lbnRyeV9td3QgKl9fbWF0Y2g7ICAgICAgICAgICAgICAgXAotCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JZm9yIChfX2kgPSBzaXplb2Yoc3RydWN0IGVidF9lbnRyeSk7ICAgICAgICAgICAgICAgIFwKLQkgICAgIF9faSA8IChlKS0+d2F0Y2hlcnNfb2Zmc2V0OyAgICAgICAgICAgICAgICAgICAgXAotCSAgICAgX19pICs9IF9fbWF0Y2gtPm1hdGNoX3NpemUgKyAgICAgICAgICAgICAgICAgICBcCi0JICAgICBzaXplb2Yoc3RydWN0IGNvbXBhdF9lYnRfZW50cnlfbXd0KSkgeyAgICAgICAgIFwKLQkJX19tYXRjaCA9ICh2b2lkICopKGUpICsgX19pOyAgICAgICAgICAgICAgICBcCi0JCV9fcmV0ID0gZm4oX19tYXRjaCAsICMjIGFyZ3MpOyAgICAgICAgICAgICAgXAotCQlpZiAoX19yZXQgIT0gMCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCWJyZWFrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCWlmIChfX3JldCA9PSAwKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCWlmIChfX2kgIT0gKGUpLT53YXRjaGVyc19vZmZzZXQpICAgICAgICAgICAgXAotCQkJX19yZXQgPSAtRUlOVkFMOyAgICAgICAgICAgICAgICAgICAgXAotCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JX19yZXQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0pCi0KIC8qIGNhbGxlZCBmb3IgYWxsIGVidF9lbnRyeSBzdHJ1Y3R1cmVzLiAqLwogc3RhdGljIGludCBzaXplX2VudHJ5X213dChzdHJ1Y3QgZWJ0X2VudHJ5ICplbnRyeSwgY29uc3QgdW5zaWduZWQgY2hhciAqYmFzZSwKIAkJCSAgdW5zaWduZWQgaW50ICp0b3RhbCwKQEAgLTIxMzIsNiArMjA4MSwxNCBAQAogCQl9CiAJfQogCisJaWYgKHN0YXRlLT5idWZfa2Vybl9zdGFydCA9PSBOVUxMKSB7CisJCXVuc2lnbmVkIGludCBvZmZzZXQgPSBidWZfc3RhcnQgLSAoY2hhciAqKSBiYXNlOworCisJCXJldCA9IHh0X2NvbXBhdF9hZGRfb2Zmc2V0KE5GUFJPVE9fQlJJREdFLCBvZmZzZXQsIG5ld19vZmZzZXQpOworCQlpZiAocmV0IDwgMCkKKwkJCXJldHVybiByZXQ7CisJfQorCiAJc3RhcnRvZmYgPSBzdGF0ZS0+YnVmX3VzZXJfb2Zmc2V0IC0gc3RhcnRvZmY7CiAKIAlCVUdfT04oKnRvdGFsIDwgc3RhcnRvZmYpOwpAQCAtMjI0MCw2ICsyMTk3LDcgQEAKIAogCXh0X2NvbXBhdF9sb2NrKE5GUFJPVE9fQlJJREdFKTsKIAorCXh0X2NvbXBhdF9pbml0X29mZnNldHMoTkZQU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FBZVEhPTl9FTUJFRF9DQ09QVFMpICQoUFlUSE9OX0VNQkVEX0xET1BUUykKKworICAgICAgaWZuZXEgKCQoY2FsbCB0cnktY2MsJChTT1VSQ0VfUFlUSE9OX0VNQkVEKSwkKEZMQUdTX1BZVEhPTl9FTUJFRCkpLHkpCisgICAgICAgICQoY2FsbCBkaXNhYmxlLXB5dGhvbixQeXRob24uaCAoZm9yIFB5dGhvbiAyLngpKQorICAgICAgZWxzZQorCisgICAgICAgIGlmbmVxICgkKGNhbGwgdHJ5LWNjLCQoU09VUkNFX1BZVEhPTl9WRVJTSU9OKSwkKEZMQUdTX1BZVEhPTl9FTUJFRCkpLHkpCisgICAgICAgICAgJCh3YXJuaW5nIFB5dGhvbiAzIGlzIG5vdCB5ZXQgc3VwcG9ydGVkOyBwbGVhc2Ugc2V0KQorICAgICAgICAgICQod2FybmluZyBQWVRIT04gYW5kL29yIFBZVEhPTl9DT05GSUcgYXBwcm9wcmlhdGVseS4pCisgICAgICAgICAgJCh3YXJuaW5nIElmIHlvdSBhbHNvIGhhdmUgUHl0aG9uIDIgaW5zdGFsbGVkLCB0aGVuKQorICAgICAgICAgICQod2FybmluZyB0cnkgc29tZXRoaW5nIGxpa2U6KQorICAgICAgICAgICQod2FybmluZyAkKGFuZCAsKSkKKyAgICAgICAgICAkKHdhcm5pbmcgJChhbmQgLCkgIG1ha2UgUFlUSE9OPXB5dGhvbjIpCisgICAgICAgICAgJCh3YXJuaW5nICQoYW5kICwpKQorICAgICAgICAgICQod2FybmluZyBPdGhlcndpc2UsIGRpc2FibGUgUHl0aG9uIHN1cHBvcnQgZW50aXJlbHk6KQorICAgICAgICAgICQod2FybmluZyAkKGFuZCAsKSkKKyAgICAgICAgICAkKHdhcm5pbmcgJChhbmQgLCkgIG1ha2UgTk9fTElCUFlUSE9OPTEpCisgICAgICAgICAgJCh3YXJuaW5nICQoYW5kICwpKQorICAgICAgICAgICQoZXJyb3IgICAkKGFuZCAsKSkKKyAgICAgICAgZWxzZ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BVIG1pZ3JhdGlvbnMgICAgICAgIyAgICAgICAwLjAwMCBNL3NlYwotICAgICAgICAgICAgIDE3NzU1ICBwYWdlZmF1bHRzICAgICAgICAgICAjICAgICAgIDAuMDE0IE0vc2VjCi0gICAgICAgIDM4MDgzMjMxODUgIENQVSBjeWNsZXMgICAgICAgICAgICMgICAgMzAzMy4yMTkgTS9zZWMKLSAgICAgICAgMTU3NTExMTE5MCAgaW5zdHJ1Y3Rpb25zICAgICAgICAgIyAgICAxMjU0LjUzMCBNL3NlYwotICAgICAgICAgIDE3MzY3ODk1ICBjYWNoZSByZWZlcmVuY2VzICAgICAjICAgICAgMTMuODMzIE0vc2VjCi0gICAgICAgICAgIDc2NzQ0MjEgIGNhY2hlIG1pc3NlcyAgICAgICAgICMgICAgICAgNi4xMTIgTS9zZWMKKyAgUGVyZm9ybWFuY2UgY291bnRlciBzdGF0cyBmb3IgJy4vaGFja2JlbmNoIDEwJzoKIAotICAgIFdhbGwtY2xvY2sgdGltZSBlbGFwc2VkOiAgIDEyMy43ODY2MjAgbXNlY3MKKyAgICAgICAxNzA4Ljc2MTMyMSB0YXNrLWNsb2NrICAgICAgICAgICAgICAgICMgICAxMS4wMzcgQ1BVcyB1dGlsaXplZAorICAgICAgICAgICAgNDEsMTkwIGNvbnRleHQtc3dpdGNoZXMgICAgICAgICAgIyAgICAwLjAyNCBNL3NlYworICAgICAgICAgICAgIDYsNzM1IENQVS1taWdyYXRpb25zICAgICAgICAgICAgIyAgICAwLjAwNCBNL3NlYworICAgICAgICAgICAgMTcsMzE4IHBhZ2UtZmF1bHRzICAgICAgICAgICAgICAgIyAgICAwLjAxMCBNL3NlYworICAgICA1LDIwNSwyMDIsMjQzIGN5Y2xlcyAgICAgICAgICAgICAgICAgICAgIyAgICAzLjA0NiBHSHoKKyAgICAgMyw4NTYsNDM2LDkyMCBzdGFsbGVkLWN5Y2xlcy1mcm9udGVuZCAgICMgICA3NC4wOSUgZnJvbnRlbmQgY3ljbGVzIGlkbGU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