From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7LHm-0007Ue-Bw for barebox@lists.infradead.org; Tue, 02 Oct 2018 14:04:41 +0000 From: Sascha Hauer Date: Tue, 2 Oct 2018 16:04:02 +0200 Message-Id: <20181002140403.3735-14-s.hauer@pengutronix.de> In-Reply-To: <20181002140403.3735-1-s.hauer@pengutronix.de> References: <20181002140403.3735-1-s.hauer@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 13/14] ubifs: Update to v4.18-rc6 To: Barebox List VGhpcyBzeW5jcyB0aGUgVUJJRlMgY29kZSB3aXRoIExpbnV4LTQuMTktcmM2LgoKVGhlcmUgYXJl IG1hbnkgZnVuY3Rpb25zIGluIHRoZSBMaW51eCBVQklGUyBjb2RlYmFzZSB0aGF0IHdlIGRvIG5v dCBuZWVkCmZvciBhIHJlYWRvbmx5IGltcGxlbWVudGF0aW9uLiBUaGVzZSBhcmUgbWlzc2luZyBo ZXJlLCBidXQgYWxsIHJlbW92ZWQKZnVuY3Rpb25zIGFyZSBhbm5vdGF0ZWQgYXMgc3VjaCBzbyBp dCBzaG91bGQgYmUgcmVsYXRpdmVseSBlYXN5IHRvIGNvcHkKYSBuZXdlciBjb2RlYmFzZSBvdmVy IHRoZSBjdXJyZW50IG9uZSBhbmQgdG8gc2VlIHdoaWNoIGZ1bmN0aW9ucyBzaGFsbApiZSByZW1v dmVkIGZyb20gdGhlIG5ld2VyIHZlcnNpb24uCgpTaWduZWQtb2ZmLWJ5OiBTYXNjaGEgSGF1ZXIg PHMuaGF1ZXJAcGVuZ3V0cm9uaXguZGU+Ci0tLQogZnMvdWJpZnMvTWFrZWZpbGUgICAgICB8ICAg MiArLQogZnMvdWJpZnMvZGVidWcuYyAgICAgICB8IDQyOSArKysrKysrKysrKysrKysrKysrKysr KysrKysrLS0tLS0tLS0tLS0tLQogZnMvdWJpZnMvZGVidWcuaCAgICAgICB8ICA1MCArKystLQog ZnMvdWJpZnMvZGlyLmMgICAgICAgICB8IDI5OCArKysrKysrKysrKysrKysrKysrKysrKy0tLS0t CiBmcy91Ymlmcy9pby5jICAgICAgICAgIHwgMTI5ICsrKysrKysrKysrKy0KIGZzL3ViaWZzL2tl eS5oICAgICAgICAgfCAgNTMgKysrLS0KIGZzL3ViaWZzL2xvZy5jICAgICAgICAgfCAgODEgKysr KysrKy0KIGZzL3ViaWZzL2xwdF9jb21taXQuYyAgfCAyNjkgKysrKysrKysrKysrKysrKysrKysr KysrKy0KIGZzL3ViaWZzL21hc3Rlci5jICAgICAgfCAgMTkgKy0KIGZzL3ViaWZzL21pc2MuYyAg ICAgICAgfCAgNjkgKysrKysrKwogZnMvdWJpZnMvbWlzYy5oICAgICAgICB8ICA0MSArKy0tCiBm cy91Ymlmcy9yZWNvdmVyeS5jICAgIHwgIDgxICsrKysrKy0tCiBmcy91Ymlmcy9yZXBsYXkuYyAg ICAgIHwgIDY1ICsrKysrLS0KIGZzL3ViaWZzL3NiLmMgICAgICAgICAgfCAgODEgKysrKysrKy0K IGZzL3ViaWZzL3NjYW4uYyAgICAgICAgfCAgMTcgKy0KIGZzL3ViaWZzL3N1cGVyLmMgICAgICAg fCAyNTQgKysrKysrKysrKysrKysrKystLS0tLS0tCiBmcy91Ymlmcy90bmMuYyAgICAgICAgIHwg NDEwICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKystLS0tLS0tLQogZnMvdWJpZnMvdG5j X21pc2MuYyAgICB8ICA1NCArKysrLS0KIGZzL3ViaWZzL3ViaWZzLW1lZGlhLmggfCAgNDggKysr LS0KIGZzL3ViaWZzL3ViaWZzLmMgICA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sZWJfdW5tYXAoc3RydWN0IHViaWZzX2luZm8gKmMsIGludCBsbnVtKQorICov CisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK2ludCBkYmdfbGViX21hcChzdHJ1Y3QgdWJp ZnNfaW5mbyAqYywgaW50IGxudW0pCisgKi8KKworLyoKKyAqIHJlbW92ZWQgaW4gYmFyZWJveAor c3RhdGljIGludCBkZnNfZmlsZV9vcGVuKHN0cnVjdCBpbm9kZSAqaW5vZGUsIHN0cnVjdCBmaWxl ICpmaWxlKQorICovCisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK3N0YXRpYyBpbnQgcHJv dmlkZV91c2VyX291dHB1dChpbnQgdmFsLCBjaGFyIF9fdXNlciAqdSwgc2l6ZV90IGNvdW50LAor CQkJICAgICAgIGxvZmZfdCAqcHBvcykKKyAqLworCisvKgorICogcmVtb3ZlZCBpbiBiYXJlYm94 CitzdGF0aWMgc3NpemVfdCBkZnNfZmlsZV9yZWFkKHN0cnVjdCBmaWxlICpmaWxlLCBjaGFyIF9f dXNlciAqdSwgc2l6ZV90IGNvdW50LAorCQkJICAgICBsb2ZmX3QgKnBwb3MpCisgKi8KKworLyoK KyAqIHJlbW92ZWQgaW4gYmFyZWJveAorc3RhdGljIGludCBpbnRlcnByZXRfdXNlcl9pbnB1dChj b25zdCBjaGFyIF9fdXNlciAqdSwgc2l6ZV90IGNvdW50KQorICovCiAKKy8qCisgKiByZW1vdmVk IGluIGJhcmVib3gKK3N0YXRpYyBzc2l6ZV90IGRmc19maWxlX3dyaXRlKHN0cnVjdCBmaWxlICpm aWxlLCBjb25zdCBjaGFyIF9fdXNlciAqdSwKKwkJCSAgICAgIHNpemVfdCBjb3VudCwgbG9mZl90 ICpwcG9zKQorICovCisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK2ludCBkYmdfZGVidWdm c19pbml0X2ZzKHN0cnVjdCB1Ymlmc19pbmZvICpjKQorICovCisKKy8qCisgKiByZW1vdmVkIGlu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fTsKIAot I2RlZmluZSB1Ymlmc19hc3NlcnQoZXhwcikgZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIFwKLQlpZiAoMCAmJiB1bmxpa2VseSghKGV4cHIpKSkgeyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQlwcl9jcml0 KCJVQklGUyBhc3NlcnQgZmFpbGVkIGluICVzIGF0ICV1XG4iLCAgICAgICAgICAgICAgICAgICBc Ci0JCSAgICAgICBfX2Z1bmNfXywgX19MSU5FX18pOyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIFwKLQkJZHVtcF9zdGFjaygpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgXAordm9pZCB1Ymlmc19hc3NlcnRfZmFpbGVkKHN0cnVjdCB1 Ymlmc19pbmZvICpjLCBjb25zdCBjaGFyICpleHByLAorCWNvbnN0IGNoYXIgKmZpbGUsIGludCBs aW5lKTsKKworI2RlZmluZSB1Ymlmc19hc3NlcnQoYywgZXhwcikgZG8geyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlpZiAodW5saWtlbHkoIShleHByKSkp IHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJdWJp ZnNfYXNzZXJ0X2ZhaWxlZCgoc3RydWN0IHViaWZzX2luZm8gKiljLCAjZXhwciwgX19GSUxFX18s ICAgXAorCQkgX19MSU5FX18pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBcCiAJfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiB9IHdoaWxlICgwKQogCiAjZGVmaW5l IHViaWZzX2Fzc2VydF9jbXRfbG9ja2VkKGMpIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgXAogCWlmICh1bmxpa2VseShkb3duX3dyaXRlX3RyeWxvY2soJihjKS0+ Y29tbWl0X3NlbSkpKSB7ICAgICAgICAgICAgICAgICAgXAogCQl1cF93cml0ZSgmKGMpLT5jb21t aXRfc2VtKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCXByX2NyaXQo ImNvbW1pdCBsb2NrIGlzIG5vdCBsb2NrZWQhXG4iKTsgICAgICAgICAgICAgICAgICAgICAgIFwK LQkJdWJpZnNfYXNzZXJ0KDApOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgXAorCQl1Ymlmc19lcnIoYywgImNvbW1pdCBsb2NrIGlzIG5vdCBsb2NrZWQhXG4i KTsgICAgICAgICAgICAgICAgICBcCisJCXViaWZzX2Fzc2VydChjLCAwKTsgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAl9ICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIH0gd2hp bGUgKDApCiAKICNkZWZpbmUgdWJpZnNfZGJnX21zZyh0eXBlLCBmbXQsIC4uLikgXAotCXByX2Rl YnVnKCJVQklGUyBEQkcgIiB0eXBlICI6ICIgZm10ICJcbiIsICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgXAotCQkgIyNfX1ZBX0FSR1NfXykKKwlwcl9kZWJ1ZygiVUJJRlMgREJHICIgdHlw ZSAiOiAiIGZtdCAiXG4iLCAjI19fVkFfQVJHU19fKQogCiAjZGVmaW5lIERCR19LRVlfQlVGX0xF TiA0OAotI2lmIGRlZmluZWQgQ09ORklHX01URF9ERUJVRwogI2RlZmluZSB1Ymlmc19kYmdfbXNn X2tleSh0eXBlLCBrZXksIGZtdCwgLi4uKSBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAg IFwKIAljaGFyIF9fdG1wX2tleV9idWZbREJHX0tFWV9CVUZfTEVOXTsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIFwKIAlwcl9kZWJ1ZygiVUJJRlMgREJHICIgdHlwZSAiOiAiIGZt dCAiJXNcbiIsICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJICMjX19WQV9BUkdTX18s ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkgZGJn X3NucHJpbnRmX2tleShjLCBrZXksIF9fdG1wX2tleV9idWYsIERCR19LRVlfQlVGX0xFTikpOyAg ICBcCiB9IHdoaWxlICgwKQotI2Vsc2UKLSNkZWZpbmUgdWJpZnNfZGJnX21zZ19rZXkodHlwZSwg a2V5LCBmbXQsIC4uLikgZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JcHJfZGVi dWcoIlVCSUZTIERCR1xuIik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBcCi19IHdoaWxlICgwKQotCi0jZW5kaWYKLQogCiAvKiBHZW5lcmFsIG1lc3NhZ2Vz ICovCiAjZGVmaW5lIGRiZ19nZW4oZm10LCAuLi4pICAgdWJpZnNfZGJnX21zZygiZ2VuIiwgZm10 LCAjI19fVkFfQVJHU19fKQpAQCAtMjA2LDM5ICsyMTAsNDcgQEAgc3RydWN0IHViaWZzX2dsb2Jh bF9kZWJ1Z19pbmZvIHsKIC8qIEFkZGl0aW9uYWwgcmVjb3ZlcnkgbWVzc2FnZXMgKi8KICNkZWZp bmUgZGJnX3JjdnJ5KGZtdCwgLi4uKSB1Ymlmc19kYmdfbXNnKCJyY3ZyeSIsIGZtdCwgIyNfX1ZB X0FSR1NfXykKIAorZXh0ZXJuIHN0cnVjdCB1Ymlmc19nbG9iYWxfZGVidWdfaW5mbyB1Ymlmc19k Ymc7CisKIHN0YXRpYyBpbmxpbmUgaW50IGRiZ19pc19jaGtfZ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FtZV9sZW4oJm5tKSA+IFVCSUZTX01BWF9OTEVOKSB7 CisJCWlub2RlID0gRVJSX1BUUigtRU5BTUVUT09MT05HKTsKKwkJZ290byBkb25lOworCX0KIAog CWRlbnQgPSBrbWFsbG9jKFVCSUZTX01BWF9ERU5UX05PREVfU1osIEdGUF9OT0ZTKTsKLQlpZiAo IWRlbnQpCi0JCXJldHVybiBFUlJfUFRSKC1FTk9NRU0pOworCWlmICghZGVudCkgeworCQlpbm9k ZSA9IEVSUl9QVFIoLUVOT01FTSk7CisJCWdvdG8gZG9uZTsKKwl9CiAKLQlkZW50X2tleV9pbml0 KGMsICZrZXksIGRpci0+aV9pbm8sICZkZW50cnktPmRfbmFtZSk7CisJaWYgKG5tLmhhc2gpIHsK KwkJdWJpZnNfYXNzZXJ0KGMsIGZuYW1lX2xlbigmbm0pID09IDApOworCQl1Ymlmc19hc3NlcnQo YywgZm5hbWVfbmFtZSgmbm0pID09IE5VTEwpOworCQlkZW50X2tleV9pbml0X2hhc2goYywgJmtl eSwgZGlyLT5pX2lubywgbm0uaGFzaCk7CisJCWVyciA9IHViaWZzX3RuY19sb29rdXBfZGgoYywg JmtleSwgZGVudCwgbm0ubWlub3JfaGFzaCk7CisJfSBlbHNlIHsKKwkJZGVudF9rZXlfaW5pdChj LCAma2V5LCBkaXItPmlfaW5vLCAmbm0pOworCQllcnIgPSB1Ymlmc190bmNfbG9va3VwX25tKGMs ICZrZXksIGRlbnQsICZubSk7CisJfQogCi0JZXJyID0gdWJpZnNfdG5jX2xvb2t1cF9ubShjLCAm a2V5LCBkZW50LCAmZGVudHJ5LT5kX25hbWUpOwogCWlmIChlcnIpIHsKLQkJaWYgKGVyciA9PSAt RU5PRU5UKSB7CisJCWlmIChlcnIgPT0gLUVOT0VOVCkKIAkJCWRiZ19nZW4oIm5vdCBmb3VuZCIp OwotCQkJZ290byBkb25lOwotCQl9Ci0JCWdvdG8gb3V0OworCQllbHNlCisJCQlpbm9kZSA9IEVS Ul9QVFIoZX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WduZWQgaW50IGZsYWdzKQorICov CisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK3N0YXRpYyBpbnQgdWJpZnNfZGlyX29wZW4o c3RydWN0IGlub2RlICpkaXIsIHN0cnVjdCBmaWxlICpmaWxlKQorICovCisKIGNvbnN0IHN0cnVj dCBpbm9kZV9vcGVyYXRpb25zIHViaWZzX2Rpcl9pbm9kZV9vcGVyYXRpb25zID0gewogCS5sb29r dXAgICAgICA9IHViaWZzX2xvb2t1cCwKKwkuY3JlYXRlICAgICAgPSBOVUxMLCAvKiBub3QgcHJl c2VudCBpbiBiYXJlYm94ICovCisJLmxpbmsgICAgICAgID0gTlVMTCwgLyogbm90IHByZXNlbnQg aW4gYmFyZWJveCAqLworCS5zeW1saW5rICAgICA9IE5VTEwsIC8qIG5vdCBwcmVzZW50IGluIGJh cmVib3ggKi8KKwkudW5saW5rICAgICAgPSBOVUxMLCAvKiBub3QgcHJlc2VudCBpbiBiYXJlYm94 ICovCisJLm1rZGlyICAgICAgID0gTlVMTCwgLyogbm90IHByZXNlbnQgaW4gYmFyZWJveCAqLwor CS5ybWRpciAgICAgICA9IE5VTEwsIC8qIG5vdCBwcmVzZW50IGluIGJhcmVib3ggKi8KKy8qIAku bWtub2QgICAgICAgPSBOVUxMLCBub3QgcHJlc2VudCBpbiBiYXJlYm94ICovCisJLnJlbmFtZSAg ICAgID0gTlVMTCwgLyogbm90IHByZXNlbnQgaW4gYmFyZWJveCAqLworLyoJLnNldGF0dHIgICAg ID0gTlVMTCwgbm90IHByZXNlbnQgaW4gYmFyZWJveCAqLworLyogCS5nZXRhdHRyICAgICA9IE5V TEwsIG5vdCBwcmVzZW50IGluIGJhcmVib3ggKi8KKyNpZmRlZiBDT05GSUdfVUJJRlNfRlNfWEFU VFIKKwkubGlzdHhhdHRyICAgPSBOVUxMLCAvKiBub3QgcHJlc2VudCBpbiBiYXJlYm94ICovCisj ZW5kaWYKKyNpZmRlZiBDT05GSUdfVUJJRlNfQVRJTU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orICovCisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK2ludCB1Ymlmc193YnVmX3N5bmNf bm9sb2NrKHN0cnVjdCB1Ymlmc193YnVmICp3YnVmKQorICovCisKKy8qCisgKiByZW1vdmVkIGlu IGJhcmVib3gKK2ludCB1Ymlmc193YnVmX3NlZWtfbm9sb2NrKHN0cnVjdCB1Ymlmc193YnVmICp3 YnVmLCBpbnQgbG51bSwgaW50IG9mZnMpCisgKi8KKworLyoKKyAqIHJlbW92ZWQgaW4gYmFyZWJv eAoraW50IHViaWZzX2JnX3didWZzX3N5bmMoc3RydWN0IHViaWZzX2luZm8gKmMpCisgKi8KKwor LyoKKyAqIHJlbW92ZWQgaW4gYmFyZWJveAoraW50IHViaWZzX3didWZfd3JpdGVfbm9sb2NrKHN0 cnVjdCB1Ymlmc193YnVmICp3YnVmLCB2b2lkICpidWYsIGludCBsZW4pCisgKi8KKworLyoKKyAq IHJlbW92ZWQgaW4gYmFyZWJveAoraW50IHViaWZzX3dyaXRlX25vZGUoc3RydWN0IHViaWZzX2lu Zm8gKmMsIHZvaWQgKmJ1ZiwgaW50IGxlbiwgaW50IGxudW0sCisJCSAgICAgaW50IG9mZnMpCisg Ki8KKworLyoKKyAqIHJlbW92ZWQgaW4gYmFyZWJveAoraW50IHViaWZzX3JlYWRfbm9kZV93YnVm KHN0cnVjdCB1Ymlmc193YnVmICp3YnVmLCB2b2lkICpidWYsIGludCB0eXBlLCBpbnQgbGVuLAor CQkJIGludCBsbnVtLCBpbnQgb2ZmcykKKyAqLworCiAvKioKICAqIHViaWZzX3JlYWRfbm9kZSAt IHJlYWQgbm9kZS4KICAqIEBjOiBVQklGUyBmaWxlLXN5c3RlbSBkZXNjcmlwdGlvbiBvYmplY3QK QEAgLTI3MCwxMCArMzY0LDEwIEBAIGludCB1Ymlmc19yZWFkX25vZGUoY29uc3Qgc3RydWN0IHVi aWZzX2luZm8gKmMsIHZvaWQgKmJ1ZiwgaW50IHR5cGUsIGludCBsZW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nNfaW5mbyAqYykKKyAqLworCisvKgorICogcmVt b3ZlZCBpbiBiYXJlYm94CitzdGF0aWMgdm9pZCBscHRfdGdjX3N0YXJ0KHN0cnVjdCB1Ymlmc19p bmZvICpjKQorICovCisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK3N0YXRpYyBpbnQgbHB0 X3RnY19lbmQoc3RydWN0IHViaWZzX2luZm8gKmMpCisgKi8KKworLyoKKyAqIHJlbW92ZWQgaW4g YmFyZWJveAorc3RhdGljIHZvaWQgcG9wdWxhdGVfbHNhdmUoc3RydWN0IHViaWZzX2luZm8gKmMp CisgKi8KKworLyoKKyAqIHJlbW92ZWQgaW4gYmFyZWJveAorc3RhdGljIHN0cnVjdCB1Ymlmc19u bm9kZSAqbm5vZGVfbG9va3VwKHN0cnVjdCB1Ymlmc19pbmZvICpjLCBpbnQgaSkKKyAqLworCisv KgorICogcmVtb3ZlZCBpbiBiYXJlYm94CitzdGF0aWMgaW50IG1ha2Vfbm5vZGVfZGlydHkoc3Ry dWN0IHViaWZzX2luZm8gKmMsIGludCBub2RlX251bSwgaW50IGxudW0sCisJCQkgICAgaW50IG9m ZnMpCisgKi8KKworLyoKKyAqIHJlbW92ZWQgaW4gYmFyZWJveAorc3RhdGljIGludCBtYWtlX3Bu b2RlX2RpcnR5KHN0cnVjdCB1Ymlmc19pbmZvICpjLCBpbnQgbm9kZV9udW0sIGludCBsbnVtLAor CQkJICAgIGludCBvZmZzKQorICovCisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK3N0YXRp YyBpbnQgbWFrZV9sdGFiX2RpcnR5KHN0cnVjdCB1Ymlmc19pbmZvICpjLCBpbnQgbG51bSwgaW50 IG9mZnMpCisgKi8KKworLyoKKyAqIHJlbW92ZWQgaW4gYmFyZWJveAorc3RhdGljIGludCBtYWtl X2xzYXZlX2RpcnR5KHN0cnVjdCB1Ymlmc19pbmZvICpjLCBpbnQgbG51bSwgaW50IG9mZnMpCisg Ki8KKworLyoKKyAqIHJlbW92ZWQgaW4gYmFyZWJveAorc3RhdGljIGludCBtYWtlX25vZGVfZGly dHkoc3RydWN0IHViaWZzX2luZm8gKmMsIGludCBub2RlX3R5cGUsIGludCBub2RlX251bSwKKwkJ CSAgIGludCBsbnVtLCBpbnQgb2ZmcykKKyAqLworCisvKgorICogcmVtb3ZlZCBpbiBiYXJlYm94 CitzdGF0aWMgaW50IGdldF9scHRfbm9kZV9sZW4oY29uc3Qgc3RydWN0IHViaWZzX2luZm8gKmMs IGludCBub2RlX3R5cGUpCisgKi8KKworLyoKKyAqIHJlbW92ZWQgaW4gYmFyZWJveAorc3RhdGlj IGludCBnZXRfcGFkX2xlbihjb25zdCBzdHJ1Y3QgdWJpZnNfaW5mbyAqYywgdWludDhfdCAqYnVm LCBpbnQgbGVuKQorICovCisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK3N0YXRpYyBpbnQg Z2V0X2xwdF9ub2RlX3R5cGUoY29uc3Qgc3RydWN0IHViaWZzX2luZm8gKmMsIHVpbnQ4X3QgKmJ1 ZiwKKwkJCSAgICAgaW50ICpub2RlX251bSkKKyAqLworCisvKgorICogcmVtb3ZlZCBpbiBiYXJl Ym94CitzdGF0aWMgaW50IGlzX2Ffbm9kZShjb25zdCBzdHJ1Y3QgdWJpZnNfaW5mbyAqYywgdWlu dDhfdCAqYnVmLCBpbnQgbGVuKQorICovCisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK3N0 YXRpYyBpbnQgbHB0X2djX2xudW0oc3RydWN0IHViaWZzX2luZm8gKmMsIGludCBsbnVtKQorICov CisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK3N0YXRpYyBpbnQgbHB0X2djKHN0cnVjdCB1 Ymlmc19pbmZvICpjKQorICovCisKKy8qCisgKiByZW1vdmVkIGluIGJhcmVib3gKK2ludCB1Ymlm c19scHRfc3RhcnRfY29tbWl0KHN0cnVjdCB1Ymlmc19pbmZvICpjKQorICovCisKKy8qCisgKiBy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19sb29rdXBfbm0oYywga2V5LCBub2RlLCBubSk7CiB9CiAKK3N0YXRpYyBp bnQgc2VhcmNoX2RoX2Nvb2tpZShzdHJ1Y3QgdWJpZnNfaW5mbyAqYywgY29uc3QgdW5pb24gdWJp ZnNfa2V5ICprZXksCisJCQkgICAgc3RydWN0IHViaWZzX2RlbnRfbm9kZSAqZGVudCwgdWludDMy X3QgY29va2llLAorCQkJICAgIHN0cnVjdCB1Ymlmc196bm9kZSAqKnpuLCBpbnQgKm4pCit7CisJ aW50IGVycjsKKwlzdHJ1Y3QgdWJpZnNfem5vZGUgKnpub2RlID0gKnpuOworCXN0cnVjdCB1Ymlm c196YnJhbmNoICp6YnI7CisJdW5pb24gdWJpZnNfa2V5ICpka2V5OworCisJZm9yICg7Oykgewor CQl6YnIgPSAmem5vZGUtPnpicmFuY2hbKm5dOworCQlka2V5ID0gJnpici0+a2V5OworCisJCWlm IChrZXlfaW51bShjLCBka2V5KSAhPSBrZXlfaW51bShjLCBrZXkpIHx8CisJCSAgICBrZXlfdHlw ZShjLCBka2V5KSAhPSBrZXlfdHlwZShjLCBrZXkpKSB7CisJCQlyZXR1cm4gLUVOT0VOVDsKKwkJ fQorCisJCWVyciA9IHRuY19yZWFkX2hhc2hlZF9ub2RlKGMsIHpiciwgZGVudCk7CisJCWlmIChl cnIpCisJCQlyZXR1cm4gZXJyOworCisJCWlmIChrZXlfaGFzaChjLCBrZXkpID09IGtleV9oYXNo KGMsIGRrZXkpICYmCisJCSAgICBsZTMyX3RvX2NwdShkZW50LT5jb29raWUpID09IGNvb2tpZSkg eworCQkJKnpuID0gem5vZGU7CisJCQlyZXR1cm4gMDsKKwkJfQorCisJCWVyciA9IHRuY19uZXh0 KGMsICZ6bm9kZSwgbik7CisJCWlmIChlcnIpCisJCQlyZXR1cm4gZXJyOworCX0KK30KKworc3Rh dGljIGludCBkb19sb29rdXBfZGgoc3RydWN0IHViaWZzX2luZm8gKmMsIGNvbnN0IHVuaW9uIHVi aWZzX2tleS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pbiBiYXJlYm94Citz dGF0aWMgaW50IGlzX2xlYWZfbm9kZV9pbl90bmMoc3RydWN0IHViaWZzX2luZm8gKmMsIHVuaW9u IHViaWZzX2tleSAqa2V5LAorCQkJICAgICAgIGludCBsbnVtLCBpbnQgb2ZmcykKKyAqLworCisv KgorICogcmVtb3ZlZCBpbiBiYXJlYm94CitpbnQgdWJpZnNfdG5jX2hhc19ub2RlKHN0cnVjdCB1 Ymlmc19pbmZvICpjLCB1bmlvbiB1Ymlmc19rZXkgKmtleSwgaW50IGxldmVsLAorCQkgICAgICAg aW50IGxudW0sIGludCBvZmZzLCBpbnQgaXNfaWR4KQorICovCisKKy8qCisgKiByZW1vdmVkIGlu IGJhcmVib3gKK2ludCB1Ymlmc19kaXJ0eV9pZHhfbm9kZShzdHJ1Y3QgdWJpZnNfaW5mbyAqYywg dW5pb24gdWJpZnNfa2V5ICprZXksIGludCBsZXZlbCwKKwkJCSBpbnQgbG51bSwgaW50IG9mZnMp CisgKi8KKworLyoKKyAqIHJlbW92ZWQgaW4gYmFyZWJveAoraW50IGRiZ19jaGVja19pbm9kZV9z aXplKHN0cnVjdCB1Ymlmc19pbmZvICpjLCBjb25zdCBzdHJ1Y3QgaW5vZGUgKmlub2RlLAorCQkJ IGxvZmZfdCBzaXplKQorICovCmRpZmYgLS1naXQgYS9mcy91Ymlmcy90bmNfbWlzYy5jIGIvZnMv dWJpZnMvdG5jX21pc2MuYwppbmRleCAxNjE5ZDA4YmU4Li4zMTA2YzlkNTExIDEwMDY0NAotLS0g YS9mcy91Ymlmcy90bmNfbWlzYy5jCisrKyBiL2ZzL3ViaWZzL3RuY19taXNjLmMKQEAgLTMsNyAr MywxOCBAQAogICoKICAqIENvcHlyaWdodCAoQykgMjAwNi0yMDA4IE5va2lhIENvcnBvcmF0aW9u LgogICoKLSAqIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOglHUEwtMi4wKworICogVGhpcyBwcm9n cmFtIGlzIGZyZWUgc29mdHdhcmU7IHl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ZGVmaW5lIHVi aWZzX21zZyhjLCBmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IFwKLQlwcl9ub3RpY2UoIlVCSUZTICh1YmklZDolZCk6ICIgZm10ICJcbiIsICAgICAgICAgICAg ICAgICAgICBcCi0JCSAgKGMpLT52aS51YmlfbnVtLCAoYyktPnZpLnZvbF9pZCwgIyNfX1ZBX0FS R1NfXykKLS8qIFVCSUZTIGVycm9yIG1lc3NhZ2VzICovCi0jZGVmaW5lIHViaWZzX2VycihjLCBm bXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlwcl9lcnIo IlVCSUZTIGVycm9yICh1YmklZDolZCBwaWQgJWQpOiAlczogIiBmbXQgIlxuIiwgICAgICBcCi0J ICAgICAgIChjKS0+dmkudWJpX251bSwgKGMpLT52aS52b2xfaWQsIDAsICAgICAgICAgICAgICAg ICAgXAotCSAgICAgICBfX2Z1bmNfXywgIyNfX1ZBX0FSR1NfXykKLS8qIFVCSUZTIHdhcm5pbmcg bWVzc2FnZXMgKi8KLSNkZWZpbmUgdWJpZnNfd2FybihjLCBmbXQsIC4uLikgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgXAotCXByX3dhcm4oIlVCSUZTIHdhcm5pbmcgKHViaSVk OiVkIHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAgIFwKLQkJKGMpLT52aS51YmlfbnVtLCAoYykt PnZpLnZvbF9pZCwgMCwgICAgICAgICAgICAgICAgIFwKLQkJX19mdW5jX18sICMjX19WQV9BUkdT X18pCi0KLS8qCi0gKiBBIHZhcmlhbnQgb2YgJ3ViaWZzX2VycigpJyB3aGljaCB0YWtlcyB0aGUg VUJJRlMgZmlsZS1zeXRlbSBkZXNjcmlwdGlvbgotICogb2JqZWN0IGFzIGFuIGFyZ3VtZW50Lgot ICovCi0jZGVmaW5lIHViaWZzX2VycmMoYywgZm10LCAuLi4pICAgICAgICA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