From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Wed, 8 Aug 2018 11:50:28 +0200 From: Roland Hieber Message-ID: <20180808095028.5icy6qduj53e6av3@pengutronix.de> References: <1533311096-14315-1-git-send-email-jon@ringle.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1533311096-14315-1-git-send-email-jon@ringle.org> Subject: Re: [ptxdist] [PATCH v4 1/2] Add libfaketime as a core component of ptxdist for patchin support 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 Cc: ptxdist@pengutronix.com, Jon Ringle T24gRnJpLCBBdWcgMDMsIDIwMTggYXQgMTE6NDQ6NTVBTSAtMDQwMCwgam9uQHJpbmdsZS5vcmcg d3JvdGU6Cj4gRnJvbTogSm9uIFJpbmdsZSA8anJpbmdsZUBncmlkcG9pbnQuY29tPgo+IAo+IGxp YmZha2V0aW1lIHdpbGwgYmUgdXNlZCBkdXJpbmcgcGF0Y2hpbiBzbyB0aGF0IGNvbW1pdHRlciB0 aW1lc3RhbXBzIGFsd2F5cwo+IGhhdmUgYSBmaXhlZCB2YWx1ZSBhbmQgdGhlcmVmb3JlIG1ha2lu ZyB0aGUgJHtQS0d9X1NFUklFU19TSEEyNTYgdmFsdWUKPiByZXBlYXRhYmxlCj4gCj4gVGhlIG1p bmltYWwgc2V0IG9mIHNvdXJjZSBmaWxlcyB3YXMgcGlja2VkIG91dCBvZiBsaWJmYWtldGltZS0w LjkuNwo+IAo+IFNpZ25lZC1vZmYtYnk6IEpvbiBSaW5nbGUgPGpyaW5nbGVAZ3JpZHBvaW50LmNv bT4KPiAtLS0KPiAgTWFrZWZpbGUuaW4gICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgMTQg Ky0KPiAgc2NyaXB0cy9saW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wK PiArICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCj4gKyAgICBjYWxsOyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgICAgZG9udF9mYWtlID0gZG9udF9mYWtl X29yaWc7ICAgICAgIFwKPiArICB9IHdoaWxlICgwKQo+ICsKPiArLyogcG9pbnRlcnMgdG8gcmVh bCAobm90IGZha2VkKSBmdW5jdGlvbnMgKi8KPiArc3RhdGljIGludCAgICAgICAgICAoKnJlYWxf c3RhdCkgICAgICAgICAgICAoaW50LCBjb25zdCBjaGFyICosIHN0cnVjdCBzdGF0ICopOwo+ICtz dGF0aWMgaW50ICAgICAgICAgICgqcmVhbF9mc3RhdCkgICAgICAgICAgIChpbnQsIGludCwgc3Ry dWN0IHN0YXQgKik7Cj4gK3N0YXRpYyBpbnQgICAgICAgICAgKCpyZWFsX2ZzdGF0YXQpICAgICAg ICAgKGludCwgaW50LCBjb25zdCBjaGFyICosIHN0cnVjdCBzdGF0ICosIGludCk7Cj4gK3N0YXRp YyBpbnQgICAgICAgICAgKCpyZWFsX2xzdGF0KSAgICAgICAgICAgKGludCwgY29uc3QgY2hhciAq LCBzdHJ1Y3Qgc3RhdCAqKTsKPiArc3RhdGljIGludCAgICAgICAgICAoKnJlYWxfc3RhdDY0KSAg ICAgICAgICAoaW50LCBjb25zdCBjaGFyICosIHN0cnVjdCBzdGF0NjQgKik7Cj4gK3N0YXRpYyBp bnQgICAgICAgICAgKCpyZWFsX2ZzdGF0NjQpICAgICAgICAgKGludCwgaW50ICwgc3RydWN0IHN0 YXQ2NCAqKTsKPiArc3RhdGljIGludCAgICAgICAgICAoKnJlYWxfZnN0YXRhdDY0KSAgICAgICAo aW50LCBpbnQgLCBjb25zdCBjaGFyICosIHN0cnVjdCBzdGF0NjQgKiwgaW50KTsKPiArc3RhdGlj IGludCAgICAgICAgICAoKnJlYWxfbHN0YXQ2NCkgICAgICAgICAoaW50LCBjb25zdCBjaGFyICos IHN0cnVj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lnbmVkIGludCAoKnJlYWxfYWxhcm0pICAgICAgICAgICAodW5zaWduZWQgaW50IHNlY29u ZHMpOwo+ICtzdGF0aWMgaW50ICAgICAgICAgICgqcmVhbF9wb2xsKSAgICAgICAgICAgIChzdHJ1 Y3QgcG9sbGZkICosIG5mZHNfdCwgaW50KTsKPiArc3RhdGljIGludCAgICAgICAgICAoKnJlYWxf cHBvbGwpICAgICAgICAgICAoc3RydWN0IHBvbGxmZCAqLCBuZmRzX3QsIGNvbnN0IHN0cnVjdCB0 aW1lc3BlYyAqLCBjb25zdCBzaWdzZXRfdCAqKTsKPiArc3RhdGljIGludCAgICAgICAgICAoKnJl YWxfc2VsZWN0KSAgICAgICAgICAoaW50IG5mZHMsIGZkX3NldCAqcmVzdHJpY3QgcmVhZGZkcywK PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmRfc2V0ICpy ZXN0cmljdCB3cml0ZWZkcywKPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgZmRfc2V0ICpyZXN0cmljdCBlcnJvcmZkcywKPiArICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHRpbWV2YWwgKnJlc3RyaWN0IHRpbWVv dXQpOwo+ICtzdGF0aWMgaW50ICAgICAgICAgICgqcmVhbF9zZW1fdGltZWR3YWl0KSAgIChzZW1f dCosIGNvbnN0IHN0cnVjdCB0aW1lc3BlYyopOwo+ICsjZW5kaWYKPiArI2lmZGVmIF9fQVBQTEVP U1hfXwo+ICtzdGF0aWMgaW50ICAgICAgICAgICgqcmVhbF9jbG9ja19nZXRfdGltZSkgIChjbG9j a19zZXJ2X3QgY2xvY2tfc2VydiwgbWFjaF90aW1lc3BlY190ICpjdXJfdGltZWNsb2NraWRfdCk7 Cj4gK3N0YXRpYyBpbnQgICAgICAgICAgYXBwbGVfY2xvY2tfZ2V0dGltZSAgICAgKGNsb2NraWRf dCBjbGt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MCwgLTF9Owo+ICsvKiBT cGVlZCB1cCBvciBzbG93IGRvd24gY2xvY2sgKi8KPiArc3RhdGljIGRvdWJsZSB1c2VyX3JhdGUg PSAxLjA7Cj4gK3N0YXRpYyBib29sIHVzZXJfcmF0ZV9zZXQgPSBmYWxzZTsKPiArc3RhdGljIHN0 cnVjdCB0aW1lc3BlYyB1c2VyX3Blcl90aWNrX2luYyA9IHswLCAtMX07Cj4gK3N0YXRpYyBib29s IHVzZXJfcGVyX3RpY2tfaW5jX3NldCA9IGZhbHNlOwo+ICsKPiArZW51bSBmdF9tb2RlX3Qge0ZU X0ZSRUVaRSwgRlRfU1RBUlRfQVQsIEZUX05PT1B9IGZ0X21vZGUgPSBGVF9GUkVFWkU7Cj4gKwo+ ICsvKiBUaW1lIHRvIGZha2UgaXMgbm90IHByb3ZpZGVkIHRocm91Z2ggRkFLRVRJTUUgZW52LiB2 YXIuICovCj4gK3N0YXRpYyBib29sIHBhcnNlX2NvbmZpZ19maWxlID0gdHJ1ZTsKPiArCj4gK3Zv aWQgZnRfY2xlYW51cCAodm9pZCkgX19hdHRyaWJ1dGVfXyAoKGRlc3RydWN0b3IpKTsKPiArdm9p ZCBmdHBsX2luaXQgKHZvaWQpIF9fYXR0cmlidXRlX18gKChjb25zdHJ1Y3RvcikpOwo+ICsKPiAr Cj4gKy8qCj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICogICAgICBTaGFyZWQgbWVtb3J5 IHJlbGF0ZWQgZnVuY3Rpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT09IFNI TQo+ICsgKiAgICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09Cj4gKyAqLwo+ICsKPiArc3RhdGljIHZvaWQgZnRf c2htX2luaXQgKHZvaWQpCj4gK3sKPiAr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XJyb3IoIm1tYXAiKTsKPiAr ICAgICAgZXhpdCgxKTsKPiArICAgIH0KPiArICB9Cj4gK30KPiArCj4gK3ZvaWQgZnRfY2xlYW51 cCAodm9pZCkKPiArewo+ICsgIC8qIGRldGFjaCBmcm9tIHNoYXJlZCBtZW1vcnkgKi8KPiArICBp ZiAoZnRfc2hhcmVkICE9IE5VTEwpCj4gKyAgewo+ICsgICAgbXVubWFwKGZ0X3NoYXJlZCwgc2l6 ZW9mKHVpbnQ2NF90KSk7Cj4gKyAgfQo+ICsgIGlmIChzdHNzICE9IE5VTEwpCj4gKyAgewo+ICsg ICAgbXVubWFwKHN0c3MsIGluZmlsZV9zaXplKTsKPiArICB9Cj4gKyAgaWYgKHNoYXJlZF9zZW0g IT0gTlVMTCkKPiArICB7Cj4gKyAgICBzZW1fY2xvc2Uoc2hhcmVkX3NlbSk7Cj4gKyAgfQo+ICt9 Cj4gKwo+ICsKPiArLyoKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKiAgICAgIEludGVy bmFsIHRpbWUgcmV0cmlldmFsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09 PSBJTlRUSU1FCj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICovCj4gKwo+ICsvKiBHZXQg c3lzdGVtIHRpbWUgZnJvbSBzeXN0ZW0gZm9yIGFsbCBjbG9ja3MgKi8KPiArc3RhdGljIHZvaWQg c3lzdGVtX3RpbWVfZnJvbV9zeXN0ZW0gKHN0cnVjdCBzeXN0ZW1fdGltZV9zICogc3lzdGltZSkK PiArewo+ICsjaWZkZWYgX19BUFBMRU9TWF9fCj4gKyAgLyogZnJvbSBodHRwOi8vc3RhY2tvdmVy Zmxvdy5jb20vcXVlc3Rpb25zLzUxNjcy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4aXQoMSk7Cj4gKyAgICB9Cj4gKyAgfQo+ ICt9Cj4gKwo+ICsKPiArLyoKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKiAgICAgIFNh dmluZyAmIGxvYWRpbmcgdGltZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID09PSBTQVZFCj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICovCj4gKwo+ICtzdGF0 aWMgdm9pZCBzYXZlX3RpbWUoc3RydWN0IHRpbWVzcGVjICp0cCkKPiArewo+ICsgIGlmICgoc2hh cmVkX3NlbSAhPSBOVUxMKSAmJiAob3V0ZmlsZSAhPSAtMSkpCj4gKyAgewo+ICsgICAgc3RydWN0 IHNhdmVkX3RpbWVzdGFtcCB0aW1lX3dyaXRlOwo+ICsgICAgc3NpemVfdCB3cml0dGVuOwo+ICsg ICAgc2l6ZV90IG4gPSAwOwo+ICsKPiArICAgIHRpbWVfd3JpdGUuc2VjID0gaHRvYmU2NCh0cC0+ dHZfc2VjKTsKPiArICAgIHRpbWVfd3JpdGUubnNlYyA9IGh0b2JlNjQodHAtPnR2X25zZWMpOwo+ ICsKPiArICAgIC8qIGxvY2sgKi8KPiArICAgIGlmIChzZW1fd2FpdChzaGFyZWRfc2VtKSA9PSAt MSkKPiArICAgIHsKPiArICAgICAgcGVycm9yKCJzZW1fd2FpdCIpOwo+ICsgICAgICBleGl0KDEp Owo+ICsgICAgfQo+ICsKPiArICAgIGxzZWVrKG91dGZpbGUsIDAsIFNFRUtfRU5EKTsKPiArICAg IGRvCj4gKyAgICB7Cj4gKyAgICAgIHdyaXR0ZW4gPSB3cml0ZShvdXRmaWxlLCAmKCgoY2hhciop JnRpbWVfd3JpdGUpW25dKSwgc2l6ZW9mKHR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keCsrOwo+ ICsgICAgICByZXQgPSB0cnVlOwo+ICsgICAgfQo+ICsKPiArICAgIC8qIHVubG9jayAqLwo+ICsg ICAgaWYgKHNlbV9wb3N0KHNoYXJlZF9zZW0pID09IC0xKQo+ICsgICAgewo+ICsgICAgICBwZXJy b3IoInNlbV9wb3N0Iik7Cj4gKyAgICAgIGV4aXQoMSk7Cj4gKyAgICB9Cj4gKyAgfQo+ICsgIHJl dHVybiByZXQ7Cj4gK30KPiArCj4gKwo+ICsvKgo+ICsgKiAgICAgID09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cj4g KyAqICAgICAgRmFrZWQgc3lzdGVtIGZ1bmN0aW9uczogZmlsZSByZWxhdGVkICAgICAgICAgICAg ICAgICAgICAgPT09IEZBS0UoRklMRSkKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKi8K PiArCj4gKyNpZmRlZiBGQUtFX1NUQVQKPiArCj4gKyNpZm5kZWYgTk9fQVRGSUxFCj4gKyNpZm5k ZWYgX0FURklMRV9TT1VSQ0UKPiArI2RlZmluZSBfQVRGSUxFX1NPVVJDRQo+ICsjZW5kaWYKPiAr I2luY2x1ZGUgPGZjbnRsLmg+IC8qIERlZmluaXRpb24gb2YgQVRfKiBjb25zdGFudHMgKi8KPiAr I2VuZGlmCj4gKwo+ICsjaW5jbHVkZSA8c3lzL3N0YXQuaD4KPiArCj4gK3N0YXRpYyBpbnQgZmFr ZV9zdGF0X2Rpc2FibGVkID0gMDsKPiArCj4gKyNkZWZpbmUgRkFLRV9TVFJVQ1RfU1RBVF9USU1F KHdoaWNoKSB7ICAgICAgICAgICAgICAgIFwKPiArICAgIHN0cnVjdCB0aW1lc3BlYyB0ID0ge2J1 Zi0+c3RfIyN3aGljaCMjdGltZSwgICAgICAgXAo+ICsgICAgIC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y2tfZ2V0dGltZSgpIG5vdCBmb3VuZC5cbiIpOwo+ICsjZW5kaWYKPiArICAgIHJldHVybiAtMTsg LyogcHJvcGFnYXRlIGVycm9yIHRvIGNhbGxlciAqLwo+ICsgIH0KPiArCj4gKyAgLyogaW5pdGlh bGl6ZSBvdXIgcmVzdWx0IHdpdGggdGhlIHJlYWwgY3VycmVudCB0aW1lICovCj4gKyAgRE9OVF9G QUtFX1RJTUUocmVzdWx0ID0gKCpyZWFsX2Nsb2NrX2dldHRpbWUpKGNsa19pZCwgdHApKTsKPiAr ICBpZiAocmVzdWx0ID09IC0xKSByZXR1cm4gcmVzdWx0OyAvKiBvcmlnaW5hbCBmdW5jdGlvbiBm YWlsZWQgKi8KPiArCj4gKyAgLyogcGFzcyB0aGUgcmVhbCBjdXJyZW50IHRpbWUgdG8gb3VyIGZh a2luZyB2ZXJzaW9uLCBvdmVyd3JpdGluZyBpdCAqLwo+ICsgIGlmIChmYWtlX21vbm90b25pY19j bG9jayB8fCBjbGtfaWQgIT0gQ0xPQ0tfTU9OT1RPTklDKQo+ICsgIHsKPiArICAgIHJlc3VsdCA9 IGZha2VfY2xvY2tfZ2V0dGltZShjbGtfaWQsIHRwKTsKPiArICB9Cj4gKwo+ICsgIC8qIHJldHVy biB0aGUgcmVzdWx0IHRvIHRoZSBjYWxsZXIgKi8KPiArICByZXR1cm4gcmVzdWx0Owo+ICt9Cj4g Kwo+ICsKPiArLyoKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKiAgICAgIFBhcnNpbmcg dGhlIHVzZXIncyBmYWtldGltZSByZXF1ZXN0cyAgICAgICAgICAgICAgICAgICAgICAgICAgPT09 IFBBUlNFCj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICovCj4gKwo+IC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Kwo+ ICsgIHN0cm5jcHkodXNlcl9mYWtlZF90aW1lX3NhdmVkLCB1c2VyX2Zha2VkX3RpbWUsIEJVRkZF UkxFTi0xKTsKPiArICB1c2VyX2Zha2VkX3RpbWVfc2F2ZWRbQlVGRkVSTEVOLTFdID0gMDsKPiAr I2lmZGVmIERFQlVHCj4gKyAgZnByaW50ZihzdGRlcnIsICJuZXcgRkFLRVRJTUU6ICVzXG4iLCB1 c2VyX2Zha2VkX3RpbWVfc2F2ZWQpOwo+ICsjZW5kaWYKPiArfQo+ICsKPiArCj4gKy8qCj4gKyAq ICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT0KPiArICogICAgICBJbml0aWFsaXphdGlvbiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PT0gSU5JVAo+ICsgKiAgICAg ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09Cj4gKyAqLwo+ICsKPiArdm9pZCBmdHBsX2luaXQodm9pZCkKPiArewo+ ICsgIGNoYXIgKnRtcF9lbnY7Cj4gKyAgYm9vbCBkb250X2Zha2VfZmluYWw7Cj4gKwo+ICsjaWZk ZWYgX19BUFBMRV9fCj4gKyAgY29uc3QgY2hhciAqcHJvZ25hbWUgPSBnZXRwcm9nbmFtZSgpOwo+ ICsjZWxzZQo+ICsgIGNvbnN0IGNoYXIgKnByb2duYW1lID0gX19wcm9nbmFtZTsKPiArI2VuZGlm Cj4gKwo+ICsgIC8qIExvb2sgdXAgYWxsIHJlYWxfKiBmdW5jdGlvbnMuIE5VTEwgd2lsbCBtYXJr IG1pc3Npbmcgb25lcy4gKi8KPiArICByZWFsX3N0YXQgPSAgICAgICAgICAgICAgIGRsc3ltKFJU TERfTkVYVCwgIl9feHN0YXQiKTsKPiArICByZWFsX2ZzdGF0ID0gICA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N0ZW1f dGltZV9mcm9tX3N5c3RlbSgmZnRwbF9zdGFydHRpbWUpOwo+ICsgICAgICBmdF9zaGFyZWQtPnN0 YXJ0X3RpbWUgPSBmdHBsX3N0YXJ0dGltZTsKPiArICAgIH0KPiArICAgIGVsc2UKPiArICAgIHsK PiArICAgICAgLyoqIGdldCBwcmVzZXQgc3RhcnQgdGltZSAqLwo+ICsgICAgICBmdHBsX3N0YXJ0 dGltZSA9IGZ0X3NoYXJlZC0+c3RhcnRfdGltZTsKPiArICAgIH0KPiArICAgIGlmIChzZW1fcG9z dChzaGFyZWRfc2VtKSA9PSAtMSkKPiArICAgIHsKPiArICAgICAgcGVycm9yKCJzZW1fcG9zdCIp Owo+ICsgICAgICBleGl0KDEpOwo+ICsgICAgfQo+ICsgIH0KPiArICBlbHNlCj4gKyAgewo+ICsg ICAgc3lzdGVtX3RpbWVfZnJvbV9zeXN0ZW0oJmZ0cGxfc3RhcnR0aW1lKTsKPiArICB9Cj4gKyAg LyogZmFrZSB0aW1lIHN1cHBsaWVkIGFzIGVudmlyb25tZW50IHZhcmlhYmxlPyAqLwo+ICsgIGlm IChOVUxMICE9ICh0bXBfZW52ID0gZ2V0ZW52KCJGQUtFVElNRSIpKSkKPiArICB7Cj4gKyAgICBw YXJzZV9jb25maWdfZmlsZSA9IGZhbHNlOwo+ICsgICAgcGFyc2VfZnRfc3RyaW5nKHRtcF9lbnYp Owo+ICsgIH0KPiArCj4gKyAgZG9udF9mYWtlID0gZG9udF9mYWtlX2ZpbmFsOwo+ICt9Cj4gKwo+ ICsKPiArLyoKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKiAgICAgIEhlbHBlciBmdW5j dGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PT0gSEVM UEVSCj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICovCj4gKwo+ICtzdGF0aWMgdm9pZCBy ZW1vdmVfdHJhaWxpbmdfZW9scyhjaGFyICpsaW5lKQo+ICt7Cj4gKyAgY2hhciAqZW5kcCA9IGxp bmUgKyBzdHJsZW4obGluZSk7Cj4gKyAgLyoKPiArICAgKiBlcmFzZSB0aGUgbGFzdCBjaGFyIGlm IGl0J3MgYSBuZXdsaW5lCj4gKyAgICogb3IgY2FycmlhZ2UgcmV0dXJuLCBhbmQgYmFjayB1cC4K PiArICAgKiBrZWVwIGRvaW5nIHRoaXMsIGJ1dCBkb24ndCBiYWNrIHVwCj4gKyAgICogcGFzdCB0 aGUgYmVnaW5uaW5nIG9mIHRoZSBzdHJpbmcuCj4gKyAgICovCj4gKyMgZGVmaW5lIGlzX2VvbGNo YXIoYykgKChjKSA9PSAnXG4nIHx8IChjKSA9PSAnXHInKQo+ICsgIHdoaWxlIChlbmRwID4gbGlu ZSAmJiBpc19lb2xjaGFyKGVuZHBbLTFdKSkKPiArICB7Cj4gKyAgICAqLS1lbmRwID0gJ1wwJzsK PiArICB9Cj4gK30KPiArCj4gKwo+ICsvKgo+ICsgKiAgICAgID09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cj4gKyAq ICAgICAgSW1wbGVtZW50YXRpb24gb2YgZmFrZWQgZnVuY3Rpb25zICAgICAgICAgICAgICAgICAg ICAgICAgPT09IEZBS0UoRkFLRSkKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKi8KPiAr Cj4gK2ludCBmYWtlX2Nsb2NrX2dldHRpbWUoY2xvY2tpZF90IGNsa19pZCwgc3RydWN0IHRpbWVz cGVjICp0cCkKPiArewo+ICsgIC8qIHZhcmlhYmxlcyB1c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j4gKyAgICAgICAgICAoZmFr ZXRpbWVyYyA9IGZvcGVuKCIvZXRjL2Zha2V0aW1lcmMiLCAicnQiKSkgIT0gTlVMTCkKPiArICAg ICAgewo+ICsgICAgICAgIGNoYXIgbGluZVtCVUZGRVJMRU5dOwo+ICsgICAgICAgIHdoaWxlKGZn ZXRzKGxpbmUsIEJVRkZFUkxFTiwgZmFrZXRpbWVyYykgIT0gTlVMTCkKPiArICAgICAgICB7Cj4g KyAgICAgICAgICBpZiAoKHN0cmxlbihsaW5lKSA+IDEpICYmIChsaW5lWzBdICE9ICcgJykgJiYK PiArICAgICAgICAgICAgICAobGluZVswXSAhPSAnIycpICYmIChsaW5lWzBdICE9ICc7JykpCj4g KyAgICAgICAgICB7Cj4gKyAgICAgICAgICAgIHJlbW92ZV90cmFpbGluZ19lb2xzKGxpbmUpOwo+ ICsgICAgICAgICAgICBzdHJuY3B5KHVzZXJfZmFrZWRfdGltZSwgbGluZSwgQlVGRkVSTEVOLTEp Owo+ICsgICAgICAgICAgICB1c2VyX2Zha2VkX3RpbWVbQlVGRkVSTEVOLTFdID0gMDsKPiArICAg ICAgICAgICAgYnJlYWs7Cj4gKyAgICAgICAgICB9Cj4gKyAgICAgICAgfQo+ICsgICAgICAgIGZj bG9zZShmYWtldGltZXJjKTsKPiArICAgICAgfQo+ICsgICAgfSAvKiByZWFkIGZha2UgdGltZSBm cm9tIGZpbGUgKi8KPiArICAgIHBhcnNlX2Z0X3N0cmluZyh1c2VyX2Zha2VkX3RpbWUpOwo+ICsg IH0gLyogY2FjaGUgaGFkIGV4cGlyZWQgKi8KPiArCj4gKyAgaWYgKGluZmlsZV9zZXQpCj4gKyAg ewo+ICsgICAgaWYgKGxvYWRfdGltZSh0cCkpCj4gKyAgICB7Cj4gKyAgICAgIHJldHVybiAwOwo+ ICsgICAgfQo+ICsgIH0KPiArCj4gKyAgLyogY2hlY2sgd2hldGhlciB0aGUgdXNlciBnYXZlIHVz IGFuIGFic29sdXRlIHRpbWUgdG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Qo+ICsj ZW5kaWYKPiArCj4gKwo+ICsvKgo+ICsgKiAgICAgID09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cj4gKyAqICAgICAg RmFrZWQgc3lzdGVtLWludGVybmFsIGZ1bmN0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgICAg ID09PSBGQUtFKElOVCkKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKi8KPiArCj4gKyNp ZmRlZiBGQUtFX0lOVEVSTkFMX0NBTExTCj4gK2ludCBfX2dldHRpbWVvZmRheShzdHJ1Y3QgdGlt ZXZhbCAqdHYsIHZvaWQgKnR6KQo+ICt7Cj4gKyAgaW50IHJlc3VsdDsKPiArCj4gKyAgLyogc2Fu aXR5IGNoZWNrICovCj4gKyAgaWYgKHR2ID09IE5VTEwpCj4gKyAgewo+ICsgICAgcmV0dXJuIC0x Owo+ICsgIH0KPiArCj4gKyAgLyogQ2hlY2sgd2hldGhlciB3ZSd2ZSBnb3QgYSBwb2ludGVyIHRv IHRoZSByZWFsIGZ0aW1lKCkgZnVuY3Rpb24geWV0ICovCj4gKyAgaWYgKE5VTEwgPT0gcmVhbF9f X2dldHRpbWVvZmRheSkKPiArICB7ICAvKiBkbHN5bSgpIGZhaWxlZCAqLwo+ICsjaWZkZWYgREVC VUcKPiArICAgICh2b2lkKSBmcHJpbnRmKHN0ZGVyciwgImZha2V0aW1lIHByb2JsZW06IG9yaWdp bmFsIF9fZ2V0dGltZW9mZGF5KCkgbm90IGZvdW5kLlxuIik7Cj4gKyNlbmRpZgo+ICsgICAgcmV0 dXJuIC0xOyAvKiBwcm9wYWdhdGUgZXJyb3IgdG8gY2FsbGVyICovCj4gKyAgfQo+ICsKPiArICAv KiBpbml0aWFsaXplIG91ciByZXN1bHQgd2l0aCB0aGUgcmVhbCB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ZSB0aW1lcmlz c2V0Mih0dnAsIHByZWZpeCkgKCh0dnApLT50dl9zZWMgfHwgKHR2cCktPnR2XyMjcHJlZml4IyNz ZWMpCj4gKyNkZWZpbmUgdGltZXJjbGVhcjIodHZwLCBwcmVmaXgpICgodHZwKS0+dHZfc2VjID0g KHR2cCktPnR2XyMjcHJlZml4IyNzZWMgPSAwKQo+ICsjZGVmaW5lIHRpbWVyY21wMihhLCBiLCBD TVAsIHByZWZpeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiArICAoKChhKS0+ dHZfc2VjID09IChiKS0+dHZfc2VjKSA/ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBcCj4gKyAgICgoYSktPnR2XyMjcHJlZml4IyNzZWMgQ01QIChiKS0+dHZfIyNwcmVmaXgjI3Nl YykgOiAgICAgICAgICAgICAgXAo+ICsgICAoKGEpLT50dl9zZWMgQ01QIChiKS0+dHZfc2VjKSkK PiArI2RlZmluZSB0aW1lcmFkZDIoYSwgYiwgcmVzdWx0LCBwcmVmaXgpICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBcCj4gKyAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgIHsgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiArICAgIChy ZXN1bHQpLT50dl9zZWMgPSAoYSktPnR2X3NlYyArIChiKS0+dHZfc2VjOyAgICAgICAgICAgICAg ICAgICBcCj4gKyAgICAocmVzdWx0KS0+dHZfIyNwcmVmaXgjI3NlYyA9IChhKS0+dHZfIyNwcmVm aXgjI3NlYyArICAgICAgICAgICAgXAo+ICsgICAgICAoYiktPnR2XyMjcHJlZml4IyNzZWM7ICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiArICAgIGlmICgocmVzdWx0 KS0+dHZfIyNwcmVmaXgjI3NlYyA+PSBTRUNfVE9fIyNwcmVmaXgjI1NFQykgICAgICAgICBcCj4g KyAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgXAo+ICsgICAgICAgICsrKHJlc3VsdCktPnR2X3NlYzsgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiArICAgICAgICAocmVzdWx0KS0+dHZfIyNw cmVmaXgjI3NlYyAtPSBTRUNfVE9fIyNwcmVmaXgjI1NFQzsgICAgICAgICBcCj4gKyAgICAgIH0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgXAo+ICsgIH0gd2hpbGUgKDApCj4gKyNkZWZpbmUgdGltZXJzdWIyKGEsIGIsIHJlc3VsdCwg cHJlZml4KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgIGRvICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiAr ICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBcCj4gKyAgICAocmVzdWx0KS0+dHZfc2VjID0gKGEpLT50dl9zZWMgLSAoYikt PnR2X3NlYzsgICAgICAgICAgICAgICAgICAgXAo+ICsgICAgKHJlc3VsdCktPnR2XyMjcHJlZml4 IyNzZWMgPSAoYSktPnR2XyMjcHJlZml4IyNzZWMgLSAgICAgICAgICAgIFwKPiArICAgICAgKGIp LT50dl8jI3ByZWZpeCMjc2VjOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBcCj4gKyAgICBpZiAoKHJlc3VsdCktPnR2XyMjcHJlZml4IyNzZWMgPCAwKSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgXAo+ICsgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiArICAgICAgLS0ocmVzdWx0KS0+ dHZfc2VjOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCj4gKyAg ICAgIChyZXN1bHQpLT50dl8jI3ByZWZpeCMjc2VjICs9IFNFQ19UT18jI3ByZWZpeCMjU0VDOyAg ICAgICAgICAgXAo+ICsgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiArICB9IHdoaWxlICgwKQo+ICsjZGVmaW5lIHRp bWVybXVsMih0dnAsIGMsIHJlc3VsdCwgcHJlZml4KSAgICAgICAgICAgICAgICAgICAgICAgICAg IFwKPiArICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBcCj4gKyAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgICAgbG9uZyBsb25nIHRtcF90 aW1lOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiArICAg IHRtcF90aW1lID0gKGMpICogKCh0dnApLT50dl9zZWMgKiBTRUNfVE9fIyNwcmVmaXgjI1NFQyAr ICAgICAgICBcCj4gKyAgICAgICAgICAgICAgICh0dnApLT50dl8jI3ByZWZpeCMjc2VjKTsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgICAgKHJlc3VsdCktPnR2XyMjcHJlZml4IyNz ZWMgPSB0bXBfdGltZSAlIFNFQ19UT18jI3ByZWZpeCMjU0VDOyAgIFwKPiArICAgIChyZXN1bHQp LT50dl9zZWMgPSAodG1wX3RpbWUgLSAocmVzdWx0KS0+dHZfIyNwcmVmaXgjI3NlYykgLyAgICBc Cj4gKyAgICAgIFNFQ19UT18jI3ByZWZpeCMjU0VDOyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgXAo+ICsgICAgaWYgKChyZXN1bHQpLT50dl8jI3ByZWZpeCMjc2VjIDwg MCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiArICAgIHsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCj4gKyAgICAg IChyZXN1bHQpLT50dl8jI3ByZWZpeCMjc2VjICs9ICBTRUNfVE9fIyNwcmVmaXgjI1NFQzsgICAg ICAgICAgXAo+ICsgICAgICAocmVzdWx0KS0+dHZfc2VjIC09IDE7ICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIFwKPiArICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCj4gKyAgfSB3aGlsZSAoMCkK PiArCj4gKy8qIG9wcyBmb3IgbWljcm9zZWNzICovCj4gKyNpZm5kZWYgdGltZXJpc3NldAo+ICsj ZGVmaW5lIHRpbWVyaXNzZXQodHZwKSB0aW1lcmlzc2V0Mih0dnAsdSkKPiArI2VuZGlmCj4gKyNp Zm5kZWYgdGltZXJjbGVhcgo+ICsjZGVmaW5lIHRpbWVyY2xlYXIodHZwKSB0aW1lcmNsZWFyMih0 dnAsIHUpCj4gKyNlbmRpZgo+ICsjaWZuZGVmIHRpbWVyY21wCj4gKyNkZWZpbmUgdGltZXJjbXAo YSwgYiwgQ01QKSB0aW1lcmNtcDIoYSwgYiwgQ01QLCB1KQo+ICsjZW5kaWYKPiArI2lmbmRlZiB0 aW1lcmFkZAo+ICsjZGVmaW5lIHRpbWVyYWRkKGEsIGIsIHJlc3VsdCkgdGltZXJhZGQyKGEsIGIs IHJlc3VsdCwgdSkKPiArI2VuZGlmCj4gKyNpZm5kZWYgdGltZXJzdWIKPiArI2RlZmluZSB0aW1l cnN1YihhLCBiLCByZXN1bHQpIHRp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