Date: Sat, 3 Dec 2016 14:40:18 +0800 From: Ben Woods <woodsb02@gmail.com> To: Eric McCorkle <eric@metricspace.net> Cc: freebsd-hackers@freebsd.org, freebsd-amd64@freebsd.org, "current@freebsd.org" <current@freebsd.org> Subject: Re: CFT EFI Boot Refactoring Message-ID: <CAOc73CDzfzSw2SNeXiEZXR96hJxjtJHL75QzFhhRoVArGjnscA@mail.gmail.com> In-Reply-To: <d3aad5ef-2d6c-3d79-0fe8-91ee086ed2f8@metricspace.net> References: <d3aad5ef-2d6c-3d79-0fe8-91ee086ed2f8@metricspace.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--94eb2c058ce8fc2ff60542bb5373 Content-Type: text/plain; charset=UTF-8 Hi Eric, Thanks for your work on this. I just applied your diff to my subversion repository, and tried to buildworld, but the build failed with the following error: make[6]: make[6]: don't know how to make efipart.c. Stop make[6]: stopped in /usr/src/sys/boot/efi/drivers *** [all_subdir_sys/boot/efi/drivers] Error code 2 Does it build ok for you? Because I use subversion, and I wanted to build it from my main tree, I had to regenerate your patch using "git diff --no-prefix master..origin/efize_new > /tmp/efize_new.diff". I could then apply this cleanly with "svn patch /tmp/efize_new.diff". I checked the difference between your diff and the diff I generated, and the only differences were in the file headers. Therefore I don't think the patch change should make any difference. I have attached my version of the patch for reference. For example: diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile index 0ebcaf1..3b608c5 100644 --- a/lib/libstand/Makefile +++ b/lib/libstand/Makefile Became: diff --git lib/libstand/Makefile lib/libstand/Makefile index 0ebcaf1ccfd..3b608c5bc92 100644 --- lib/libstand/Makefile +++ lib/libstand/Makefile To show the differences with your patch applied: $ svn status M lib/libstand/Makefile M lib/libstand/stand.h M sys/boot/efi/Makefile M sys/boot/efi/boot1/Makefile M sys/boot/efi/boot1/Makefile.fat M sys/boot/efi/boot1/boot1.c D sys/boot/efi/boot1/boot_module.h M sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu M sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu M sys/boot/efi/boot1/fat-arm64.tmpl.bz2.uu M sys/boot/efi/boot1/fat-i386.tmpl.bz2.uu M sys/boot/efi/boot1/generate-fat.sh D sys/boot/efi/boot1/ufs_module.c D sys/boot/efi/boot1/zfs_module.c A sys/boot/efi/drivers A sys/boot/efi/drivers/Makefile A sys/boot/efi/drivers/efi_drivers.h A sys/boot/efi/drivers/fs_driver.c M sys/boot/efi/include/efilib.h M sys/boot/efi/include/efiprot.h A sys/boot/efi/include/string16.h M sys/boot/efi/libefi/Makefile A sys/boot/efi/libefi/efifs.c M sys/boot/efi/libefi/efipart.c M sys/boot/efi/libefi/errno.c M sys/boot/efi/libefi/handles.c A sys/boot/efi/libefi/string16.c M sys/boot/efi/libefi/time.c M sys/boot/efi/loader/Makefile M sys/boot/efi/loader/conf.c M sys/boot/efi/loader/loader_efi.h M sys/boot/efi/loader/main.c Regards, Ben -- From: Benjamin Woods woodsb02@gmail.com On 3 December 2016 at 01:02, Eric McCorkle <eric@metricspace.net> wrote: > Hello everyone, > > My work to refactor the EFI boot loader has been in review for some time > now. This work is a behavior-neutral refactoring which eliminates > duplicated code in boot1, provides better integration of boot1 and > loader with the EFI API, and moves towards better compliance with the > recommendations of the UEFI driver writer's guide. This work also > serves as a precursor to more work, such as GELI, hot-plugging, and > other things. > > One of the reviewers was able to trigger a hang on his setup; however, > it's not clear whether this is a problem in the refactoring, or whether > it's due to a related bug: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214423 > > Therefore, I would like to issue a CFT for this changeset. We need > people using the boot1/loader EFI boot setup to test their setup using > boot1 and loader as built with this patch applied. > > You can also get the source tree directly from my github > (https://github.com/emc2/freebsd.git). Use the efize_new branch to get > this changeset. Note that I am maintaining the state of this branch in > a single change at this point using rebase -i, so there *will* be forced > pushes to this branch. > > > Here are some notes on testing the changeset: > > * To test it, just do a buildworld, then copy loader.efi in place and > copy boot1.efi to /efi/BOOT/BOOTX64.EFI on your ESP. If your system > boots, then the test was successful (there are no new features in this > changeset). > > * The output of boot1 is slightly different, so you'll be able to tell > if you installed it correctly. > > * I recommend keeping a copy of the basic boot1 around on your ESP, just > in case something goes wrong. On my setup, I have a backup at > /efi/BOOT/BOOTX64.BAK (with the main program at /efi/BOOT/BOOTX64.EFI, > of course) > > * I have been using this on a machine with two disks, a ZFS pool > spanning both disks, and a dummy UFS filesystem for months now, so it > can be considered relatively safe. > > * This has also been tested on basic setups without incident, so > priority is on complex or odd setups. > > * If something goes wrong, you will most likely get a boot-hang. If > this happens, please contact me directly with the details, and I'll > coordinate on diagnosis. > --94eb2c058ce8fc2ff60542bb5373 Content-Type: text/plain; charset=US-ASCII; name="efize_new.diff" Content-Disposition: attachment; filename="efize_new.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iw8unfrw2 ZGlmZiAtLWdpdCBsaWIvbGlic3RhbmQvTWFrZWZpbGUgbGliL2xpYnN0YW5kL01ha2VmaWxlCmlu ZGV4IDBlYmNhZjFjY2ZkLi4zYjYwOGM1YmM5MiAxMDA2NDQKLS0tIGxpYi9saWJzdGFuZC9NYWtl ZmlsZQorKysgbGliL2xpYnN0YW5kL01ha2VmaWxlCkBAIC00MSw3ICs0MSw3IEBAIFNSQ1MrPSBu dG9oLmMKIC5QQVRIOiAke0xJQkNfU1JDfS9zdHJpbmcKIFNSQ1MrPQliY21wLmMgYmNvcHkuYyBi emVyby5jIGZmcy5jIGZscy5jIFwKIAltZW1jY3B5LmMgbWVtY2hyLmMgbWVtY21wLmMgbWVtY3B5 LmMgbWVtbW92ZS5jIG1lbXNldC5jIFwKLQlxZGl2cmVtLmMgc3RyY2F0LmMgc3RyY2hyLmMgc3Ry Y21wLmMgc3RyY3B5LmMgXAorCXFkaXZyZW0uYyBzdHJjYXQuYyBzdHJjaHIuYyBzdHJjbXAuYyBz dHJjcHkuYyBzdHBjcHkuYyBzdHBuY3B5LmMgXAogCXN0cmNzcG4uYyBzdHJsY2F0LmMgc3RybGNw eS5jIHN0cmxlbi5jIHN0cm5jYXQu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GSV9GSUxFX0lPX0lOVEVSRkFDRSAqaWZhY2U7CisgICAgICAgIEVGSV9GSUxFX0hBTkRM RSByb290OworICAgICAgICBFRklfRklMRV9IQU5ETEUgdGFyZ2V0OworICAgICAgICBDSEFSMTYg cGF0aDE2W3N0cmxlbihmaWxlcGF0aCkgKyAxXTsKKwl2b2lkICpidWY7CisKKyAgICAgICAgZmlu Zm8gPSBtYWxsb2MoaW5mb3NpemUpOworCisgICAgICAgIGlmIChmaW5mbyA9PSBOVUxMKSB7Cisg ICAgICAgICAgICAgICAgcmV0dXJuIChFRklfT1VUX09GX1JFU09VUkNFUyk7CisgICAgICAgIH0K KworCXN0YXR1cyA9IEJTLT5PcGVuUHJvdG9jb2woZGV2LCAmU2ltcGxlRmlsZVN5c3RlbVByb3Rv Y29sR1VJRCwKKyAgICAgICAgICAgICh2b2lkICoqKSZpZmFjZSwgSUgsIE5VTEwsIEVGSV9PUEVO X1BST1RPQ09MX0dFVF9QUk9UT0NPTCk7CisKKyAgICAgICAgaWYgKHN0YXR1cyAhPSBFRklfU1VD Q0VTUykgeworICAgICAgICAgICAgICAgIGZyZWUoZmluZm8pOworICAgICAgICAgICAgICAgIHBy aW50ZigiT3BlbiBwcm90b2NvbCBmYWlsZWQhICVsZFxuIiwgRUZJX0VSUk9SX0NPREUoc3RhdHVz KSk7CisgICAgICAgICAgICAgICAgcmV0dXJuIChzdGF0dXMpOworICAgICAgICB9CisKKyAgICAg ICAgc3RhdHVzID0gaWZhY2UtPk9wZW5Wb2x1bWUoaWZhY2UsICZyb290KTsKKworICAgICAgICBp ZiAoc3RhdHVzICE9IEVGSV9TVUNDRVNTKSB7CisgICAgICAgICAgICAgICAgQlMtPkNsb3NlUHJv dG9jb2woZGV2LCAmU2ltcGxlRmlsZVN5c3RlbVByb3RvY29sR1VJRCwgSUgsIE5VTEwpOworICAg ICAgICAgICAgICAgIGZyZWUoZmluZm8pOworICAgICAgICAgICAgICAgIHByaW50ZigiT3BlbiB2 b2x1bWUgZmFpbGVkISAlbGRcbiIsIEVGSV9FUlJPUl9DT0RFKHN0YXR1cykpOworICAgICAgICAg ICAgICAgIHJldHVybiAoc3RhdHVzKTsKKyAgICAgICAgfQorCisgICAgICAgIHN0cmNweV90b18x NihwYXRoMTYsIGZpbGVwYXRoKTsKKyAgICAgICAgc3RhdHVzID0gcm9vdC0+T3Blbihyb290LCAm dGFyZ2V0LCBwYXRoMTYsIEVGSV9GSUxFX01PREVfUkVBRCwgMCk7CisKKyAgICAgICAgaWYgKHN0 YXR1cyAhPSBFRklfU1VDQ0VTUykgeworICAgICAgICAgICAgICAgIEJTLT5DbG9zZVByb3RvY29s KGRldiwgJlNpbXBsZUZpbGVTeXN0ZW1Qcm90b2NvbEdVSUQsIElILCBOVUxMKTsKKyAgICAgICAg ICAgICAgICBmcmVlKGZpbmZvKTsKKworICAgICAgICAgICAgICAgIHJldHVybiAoc3RhdHVzKTsK KyAgICAgICAgfQorCisgICAgICAgICpidWZzaXplID0gaW5mb3NpemU7CisgICAgICAgIHN0YXR1 cyA9IHRhcmdldC0+R2V0SW5mbyh0YXJnZXQsICZGaWxlSW5mb0dVSUQsIGJ1ZnNpemUsIGZpbmZv KTsKKworICAgICAgICBpZiAoc3RhdHVzICE9IEVGSV9TVUNDRVNTKSB7CisgICAgICAgICAgICAg ICAgQlMtPkNsb3NlUHJvdG9jb2woZGV2LCAmU2ltcGxlRmlsZVN5c3RlbVByb3RvY29sR1VJRCwg SUgsIE5VTEwpOworICAgICAgICAgICAgICAgIGZyZWUoZmluZm8pOworICAgICAgICAgICAgICAg IHByaW50ZigiR2V0IGluZm8gZmFpbGVkISAlbGRcbiIsIEVGSV9FUlJPUl9DT0RFKHN0YXR1cykp OworICAgICAgICAgICAgICAgIHJldHVybiAoc3RhdHVzKTsKKyAgICAgICAgfQorCisgICAgICAg ICpidWZzaXplID0gZmluZm8tPkZpbGVTaXplOworCisgICAgICAgIGlmICgoYnVmID0gbWFsbG9j KGZpbmZvLT5GaWxlU2l6ZSkpID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICBCUy0+Q2xvc2VQ cm90b2NvbChkZXYsICZTaW1wbGVGaWxlU3lzdGVtUHJvdG9jb2xHVUlELCBJSCwgTlVMTCk7Cisg ICAgICAgICAgICAgICAgZnJlZShmaW5mbyk7CisgICAgICAgICAgICAgICAgcHJpbnRmKCJGYWls ZWQgdG8gYWxsb2NhdGUgbG9hZCBidWZmZXIgJXpkIGZvciAnJXMnICIKKyAgICAgICAgICAgICAg ICAgICAgICAgIiglbHUpXG4iLCBmaW5mby0+RmlsZVNpemUsIGZpbGVwYXRoLCBFRklfRVJST1Jf Q09ERShzdGF0dXMpKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gKEVGSV9PVVRfT0ZfUkVTT1VS Q0VTKTsKKyAgICAgICAgfQorCisgICAgICAgICpidWZwID0gYnVmOworICAgICAgICBzdGF0dXMg PSB0YXJnZXQtPlJlYWQodGFyZ2V0LCBidWZzaXplLCBidWYpOworICAgICAgICBCUy0+Q2xvc2VQ cm90b2NvbChkZXYsICZTaW1wbGVGaWxlU3lzdGVtUHJvdG9jb2xHVUlELCBJSCwgTlVMTCk7Cisg ICAgICAgIGZyZWUoZmluZm8pOworCisgICAgICAgIGlmIChzdGF0dXMgIT0gRUZJX1NVQ0NFU1Mp IHsKKyAgICAgICAgICAgICAgICBwcmludGYoIlJlYWQgZmFpbGVkISAlbGRcbiIsIEVGSV9FUlJP Ul9DT0RFKHN0YXR1cykpOworICAgICAgICAgICAgICAgIHJldHVybiAoc3RhdHVzKTsKKyAgICAg ICAgfQorCisgICAgICAgIHJldHVybiAoRUZJX1NVQ0NFU1MpOwogfQogCiAvKgogICogbG9hZF9s b2FkZXIgYXR0ZW1wdHMgdG8gbG9hZCB0aGUgbG9hZGVyIGltYWdlIGRhdGEuCiAgKgotICogSXQg dHJpZXMgZWFjaCBtb2R1bGUgYW5kIGl0cyByZXNwZWN0aXZlIGRldmljZXMsIGlkZW50aWZpZWQg YnkgbW9k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GljaCBoYW5kbGVzIGFyZSBwcmVmZXJyZWQgKi8KKyAgICAgICAgZm9yIChpID0gMDsgaSA8IG5o YW5kbGVzOyBpKyspIHsKKyAgICAgICAgICAgICAgICBpZiAoQlMtPk9wZW5Qcm90b2NvbChoYW5k bGVzW2ldLCAmRGV2aWNlUGF0aEdVSUQsCisgICAgICAgICAgICAgICAgICAgICh2b2lkICoqKSZk ZXZwYXRoLCBJSCwgTlVMTCwgRUZJX09QRU5fUFJPVE9DT0xfR0VUX1BST1RPQ09MKSA9PQorICAg ICAgICAgICAgICAgICAgICBFRklfU1VDQ0VTUykgeworICAgICAgICAgICAgICAgICAgICAgICAg aWYgKGRldmljZV9wYXRoc19tYXRjaChpbWdwYXRoLCBkZXZwYXRoKSkgeworICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBwcmVmZXJyZWRbbnByZWZlcnJlZF0gPSBoYW5kbGVzW2ldOwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBucHJlZmVycmVkKys7CisgICAgICAgICAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBCUy0+Q2xvc2VQcm90b2Nv bChoYW5kbGVzW2ldLCAmRGV2aWNlUGF0aEdVSUQsIElILCBOVUxMKTsKKyAgICAgICAgICAgICAg ICB9CisgICAgICAgIH0KKworICAgICAgICBCUy0+Q2xvc2VQcm90b2NvbChib290X2hhbmRsZSwg JkRldmljZVBhdGhHVUlELCBJSCwgTlVMTCk7CisKKyAgICAgICAgLyogVHJ5IHRoZSBwcmVmZXJy ZWQgaGFuZGxlcyBmaXJzdCwgdGhlbiBhbGwgdGhlIGhhbmRsZXMgKi8KKyAgICAgICAgZm9yIChp ID0gMDsgaSA8IG5wcmVmZXJyZWQ7IGkrKykgeworICAgICAgICAgICAgICAgIGlmIChlZmlfbG9h ZChwcmVmZXJyZWRbaV0sIFBBVEhfTE9BREVSX0VGSSwgYnVmcCwgYnVmc2l6ZSkgPT0KKyAgICAg ICAgICAgICAgICAgICBFRklfU1VDQ0VTUykgeworICAgICAgICAgICAgICAgICAgICAgICAgKmhh bmRsZXAgPSBwcmVmZXJyZWRbaV07CisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKEVG SV9TVUNDRVNTKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBmb3Ig KGkgPSAwOyBpIDwgbmhhbmRsZXM7IGkrKykgeworICAgICAgICAgICAgICAgIGlmIChlZmlfbG9h ZChoYW5kbGVzW2ldLCBQQVRIX0xPQURFUl9FRkksIGJ1ZnAsIGJ1ZnNpemUpID09CisgICAgICAg ICAgICAgICAgICAgRUZJX1NVQ0NFU1MpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICpoYW5k bGVwID0gaGFuZGxlc1tpXTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoRUZJX1NV Q0NFU1MpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAgIHByaW50Zigi RmFpbGVkIHRvIGxvYWQgJXMgZnJvbSBhbnkgZGV2aWNlIVxuIiwgUEFUSF9MT0FERVJfRUZJKTsK KwogCXJldHVybiAoRUZJX05PVF9GT1VORCk7CiB9CiAKQEAgLTM1OSwyMCArNTc1LDI3IEBAIHRy eV9ib290KHZvaWQpCiAJc2l6ZV90IGJ1ZnNpemUsIGxvYWRlcnNpemUsIGNtZHNpemU7CiAJdm9p ZCAqYnVmLCAqbG9hZGVyYnVmOwogCWNoYXIgKmNtZDsKLQlkZXZfaW5mb190ICpkZXY7Ci0JY29u c3QgYm9vdF9tb2R1bGVfdCAqbW9kOworICAgICAgICBFRklfSEFORExFIGZzaGFuZGxlOwogCUVG SV9IQU5ETEUgbG9hZGVyaGFuZGxlOwogCUVGSV9MT0FERURfSU1BR0UgKmxvYWRlZF9pbWFnZTsK IAlFRklfU1RBVFVTIHN0YXR1czsKKyAgICAgICAgRUZJX0RFVklDRV9QQVRIICpmc3BhdGg7CisK KwlzdGF0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AgICAgIEVGSV9ERVZJQ0VfUEFUSCAq ZGV2cGF0aCwgKmRldnBhdGhjcHksICp0bXBkZXZwYXRoLCAqbm9kZTsKKwlFRklfU1RBVFVTIHN0 YXR1czsKKyAgICAgICAgRUZJX0hBTkRMRSBhbGlhczsKKworICAgICAgICBkZXZwYXRoID0gZWZp X2xvb2t1cF9kZXZwYXRoKGhhbmRsZSk7CisKKyAgICAgICAgaWYgKGRldnBhdGggPT0gTlVMTCkg eworICAgICAgICAgICAgICAgIHJldHVybiAoRUZJX0RFVklDRV9FUlJPUik7CisgICAgICAgIH0K KworICAgICAgICBzdGF0dXMgPSBCUy0+SGFuZGxlUHJvdG9jb2woaGFuZGxlLCAmYmxraW9fZ3Vp ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh2b2lkKiopJmJsa2lvKTsK KyAgICAgICAgaWYgKEVGSV9FUlJPUihzdGF0dXMpKQorICAgICAgICAgICAgICAgIHJldHVybiAo c3RhdHVzKTsKKworICAgICAgICBpZiAoIWJsa2lvLT5NZWRpYS0+TG9naWNhbFBhcnRpdGlvbikg eworICAgICAgICAgICAgICAgICpucmRpc2srKzsKKyAgICAgICAgICAgICAgICByZXR1cm4gKEVG SV9VTlNVUFBPUlRFRCk7CisgICAgICAgIH0KKworICAgICAgICAvKgorICAgICAgICAgKiBJZiB3 ZSBjb21lIGFjcm9zcyBhIGxvZ2ljYWwgcGFydGl0aW9uIG9mIHN1YnR5cGUgQ0RST00KKyAgICAg ICAgICogaXQgZG9lc24ndCByZWZlciB0byB0aGUgQ0QgZmlsZXN5c3RlbSBpdHNlbGYsIGJ1dCBy YXRoZXIKKyAgICAgICAgICogdG8gYW55IHVzYWJsZSBFbCBUb3JpdG8gYm9vdCBpbWFnZSBvbiBp dC4gSW4gdGhpcyBjYXNlCisgICAgICAgICAqIHdlIHRyeSB0byBmaW5kIHRoZSBwYXJlbnQgZGV2 aWNlIGFuZCBhZGQgdGhhdCBpbnN0ZWFkIGFzCisgICAgICAgICAqIHRoYXQgd2lsbCBiZSB0aGUg Q0QgZmlsZXN5c3RlbS4KKyAgICAgICAgICovCisgICAgICAgIG5vZGUgPSBlZmlfZGV2cGF0aF9s YXN0X25vZGUoZGV2cGF0aCk7CisgICAgICAgIGlmIChEZXZpY2VQYXRoVHlwZShub2RlKSA9PSBN RURJQV9ERVZJQ0VfUEFUSCAmJgorICAgICAgICAgICAgRGV2aWNlUGF0aFN1YlR5cGUobm9kZSkg PT0gTUVESUFfQ0RST01fRFApIHsKKyAgICAgICAgICAgICAgICBkZXZwYXRoY3B5ID0gZWZpX2Rl dnBhdGhfdHJpbShkZXZwYXRoKTsKKyAgICAgICAgICAgICAgICB0bXBkZXZwYXRoID0gZGV2cGF0 aGNweTsKKyAgICAgICAgICAgICAgICBzdGF0dXMgPSBCUy0+TG9jYXRlRGV2aWNlUGF0aCgmYmxr aW9fZ3VpZCwgJnRtcGRldnBhdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJmFsaWFzKTsKKyAgICAgICAgICAgICAgICBmcmVlKGRldnBhdGhjcHkpOwor CisgICAgICAgICAgICAgICAgaWYgKEVGSV9FUlJPUihzdGF0dXMpKQorICAgICAgICAgICAgICAg ICAgICAgICAgcmV0dXJuIChzdGF0dXMpOworCisgICAgICAgICAgICAgICAgZWZpX3JlZ2lzdGVy X2hhbmRsZSgmZWZpcGFydF9kZXYsIGhhbmRsZSwgYWxpYXMpOworICAgICAgICB9IGVsc2UKKyAg ICAgICAgICAgICAgICBlZmlfcmVnaXN0ZXJfaGFuZGxlKCZlZmlwYXJ0X2RldiwgaGFuZGxlLCBO VUxMKTsKKworICAgICAgICBwZGluZm9bbnBkaW5mb10ucGRfb3BlbiA9IDA7CisgICAgICAgIHBk aW5mb1tucGRpbmZvXS5wZF9iY2FjaGUgPSBOVUxMOworICAgICAgICBwZGluZm9bbnBkaW5mb10u cGRfdW5pdCA9IG5wZGluZm87CisgICAgICAgIG5w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aWMgRUZJQVBJ IEVGSV9TVEFUVVMKK2ZpbGVfZmx1c2hfaW1wbChFRklfRklMRV9IQU5ETEUgRmlsZSk7CisKK3N0 YXRpYyBzdHJ1Y3QgZGV2ZGVzYyoKK2Nsb25lX2RldmRlc2Moc3RydWN0IGRldmRlc2MgKmRldikK K3sKKyAgICAgICAgc3RydWN0IGRldmRlc2MgKm91dDsKKworICAgICAgICBzd2l0Y2goZGV2LT5k X2Rldi0+ZHZfdHlwZSkgeworICAgICAgICBjYXNlIERFVlRfWkZTOgorICAgICAgICAgICAgICAg IG91dCA9IG1hbGxvYyhzaXplb2Yoc3RydWN0IHpmc19kZXZkZXNjKSk7CisKKyAgICAgICAgICAg ICAgICBpZiAob3V0ID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBO VUxMOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIG1lbWNweShvdXQsIGRl diwgc2l6ZW9mKHN0cnVjdCB6ZnNfZGV2ZGVzYykpOworCisgICAgICAgICAgICAgICAgcmV0dXJu IG91dDsKKworICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgIG91dCA9IG1hbGxvYyhz aXplb2Yoc3RydWN0IGRldmRlc2MpKTsKKworICAgICAgICAgICAgICAgIGlmIChvdXQgPT0gTlVM TCkgeworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE5VTEw7CisgICAgICAgICAgICAg ICAgfQorCisgICAgICAgICAgICAgICAgbWVtY3B5KG91dCwgZGV2LCBzaXplb2Yoc3RydWN0IGRl dmRlc2MpKTsKKworICAgICAgICAgICAgICAgIHJldHVybiBvdXQ7CisgICAgICAgIH0KK30KKwor c3RhdGljIEVGSV9TVEFUVVMKK2RvX2ZpbGVfb3Blbihjb25zdCB2b2xpbmZvX3QgKnZpbmZvLCBj b25zdCBjaGFyIGZpbGVwYXRoW10sCisgICAgICAgICAgICAgaW50IG1vZGUsIEVGSV9GSUxFX0hB TkRMRSAqb3V0KQoreworICAgICAgICBFRklfRklMRV9IQU5ETEUgZmhhbmRsZTsKKyAgICAgICAg ZmlsZWluZm9fdCAqZmluZm87CisgICAgICAgIHN0cnVjdCBzdGF0IHN0OworICAgICAgICBzdHJ1 Y3QgZGV2ZGVzYyAqdG1wZGV2OworCWludCBlcnI7CisKKyAgICAgICAgbWVtc2V0KCZzdCwgMCwg c2l6ZW9mKHN0cnVjdCBzdGF0KSk7CisgICAgICAgIGZoYW5kbGUgPSBtYWxsb2Moc2l6ZW9mKEVG SV9GSUxFKSArIHNpemVvZihmaWxlaW5mb190KSArCisgICAgICAgICAgICAgICAgICAgICAgICAg c3RybGVuKGZpbGVwYXRoKSArIDEpOworCisgICAgICAgIGlmIChmaGFuZGxlID09IE5VTEwpIHsK KyAgICAgICAgICAgICAgICByZXR1cm4gKEVGSV9PVVRfT0ZfUkVTT1VSQ0VTKTsKKyAgICAgICAg fQorCisgICAgICAgIHRtcGRldiA9IGNsb25lX2RldmRlc2ModmluZm8tPmRldik7CisKKyAgICAg ICAgaWYgKHRtcGRldiA9PSBOVUxMKSB7CisgICAgICAgICAgICAgICAgZnJlZShmaGFuZGxlKTsK KyAgICAgICAgICAgICAgICByZXR1cm4gKEVGSV9PVVRfT0ZfUkVTT1VSQ0VTKTsKKyAgICAgICAg fQorCisgICAgICAgIGZpbmZvID0gKGZpbGVpbmZvX3QqKShmaGFuZGxlICsgMSk7CisgICAgICAg IGZpbmZvLT5mZGF0YS5mX2ZsYWdzID0gbW9kZSArIDE7CisgICAgICAgIGZpbmZvLT5mZGF0YS5m X2RldiA9IE5VTEw7CisgICAgICAgIGZpbmZvLT5mZGF0YS5mX29wcyA9IE5VTEw7CisgICAgICAg IGZpbmZvLT5mZGF0YS5mX29mZnNldCA9IDA7CisgICAgICAgIGZpbmZvLT5mZGF0YS5mX2RldmRh dGEgPSBOVUxMOworCisgICAgICAgIGlmICgoZXJyID0gdmluZm8tPmRldi0+ZF9kZXYtPmR2X29w ZW4oJihmaW5mby0+ZmRhdGEpLCB0bXBkZXYpKSAhPSAwKSB7CisgICAgICAgICAgICAgICAgZnJl ZShmaGFuZGxlKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gKGVycm5vX3RvX2VmaV9zdGF0dXMo ZXJyKSk7CisgICAgICAgIH0KKworICAgICAgICBmaW5mby0+ZmRhdGEuZl9kZXYgPSB2aW5mby0+ ZGV2LT5kX2RldjsKKworICAgICAgICBpZiAoKGVyciA9IHZpbmZvLT5mc29wcy0+Zm9fb3Blbihm aWxlcGF0aCwgJihmaW5mby0+ZmRhdGEpKSkgIT0gMCkgeworICAgICAgICAgICAgICAgIGZyZWUo ZmhhbmRsZSk7CisgICAgICAgICAgICAgICAgcmV0dXJuIChlcnJub190b19lZmlfc3RhdHVzKGVy cikpOworICAgICAgICB9CisKKyAgICAgICAgZmluZm8tPmZkYXRhLmZfb3BzID0gdmluZm8tPmZz b3BzOworCisgICAgICAgIGlmICgoZXJyID0gdmluZm8tPmZzb3BzLT5mb19zdGF0KCYoZmluZm8t PmZkYXRhKSwgJnN0KSkgIT0gMCkgeworICAgICAgICAgICAgICAgIGZyZWUoZmhhbmRsZSk7Cisg ICAgICAgICAgICAgICAgcmV0dXJuIChlcnJub190b19lZmlfc3RhdHVzKGVycikpOworICAgICAg ICB9CisKKyAgICAgICAgc3RyY3B5KGZpbmZvLT5wYXRoLCBmaWxlcGF0aCk7CisgICAgICAgIGZp bmZvLT52aW5mbyA9IHZpbmZvOworICAgICAgICBmaGFuZGxlLT5SZXZpc2lvbiA9IEVGSV9GSUxF X0hBTkRMRV9SRVZJU0lPTjsKKyAgICAgICAgZmhhbmRsZS0+T3BlbiA9IGZpbGVfb3Blbl9pbXBs OworICAgICAgICBmaGFuZGxlLT5DbG9zZSA9IGZpbGVfY2xvc2VfaW1wbDsKKyAgICAgICAgZmhh bmRsZS0+RGVsZXRlID0gZmlsZV9kZWxldGVfaW1wbDsKKyAgICAgICAgZmhhbmRsZS0+U2V0UG9z aXRpb24gPSBmaWxlX3NldF9wb3NpdGlvbl9pbXBsOworICAgICAgICBmaGFuZGxlLT5HZXRQb3Np dGlvbiA9IGZpbGVfZ2V0X3Bvc2l0aW9uX2ltcGw7CisgICAgICAgIGZoYW5kbGUtPkdldEluZm8g PSBmaWxlX2dldF9pbmZvX2ltcGw7CisgICAgICAgIGZoYW5kbGUtPlNldEluZm8gPSBmaWxlX3Nl dF9pbmZvX2ltcGw7CisgICAgICAgIGZoYW5kbGUtPkZsdXNoID0gZmlsZV9mbHVzaF9pbXBsOwor CisgICAgICAgIGlmIChTX0lTRElSKHN0LnN0X21vZGUpKSB7CisgICAgICAgICAgICAgICAgZmhh bmRsZS0+UmVhZCA9IGRpcl9yZWFkX2ltcGw7CisgICAgICAgICAgICAgICAgZmhhbmRsZS0+V3Jp dGUgPSBkaXJfd3JpdGVfaW1wbDsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBm aGFuZGxlLT5SZWFkID0gZmlsZV9yZWFkX2ltcGw7CisgICAgICAgICAgICAgICAgZmhhbmRsZS0+ V3JpdGUgPSBmaWxlX3dyaXRlX2ltcGw7CisgICAgICAgIH0KKworICAgICAgICAqb3V0ID0gZmhh bmRsZTsKKworICAgICAgICByZXR1cm4gKEVGSV9TVUNDRVNTKTsKK30KKworc3RhdGljIGludAor bW9kZV9mcm9tX2VmaShVSU5UNjQgZWZpX21vZGUpCit7CisgICAgICAgIGludCBtb2RlID0gMDsK KworICAgICAgICBpZiAoZWZpX21vZGUgJiBFRklfRklMRV9NT0RFX1dSSVRFKSB7CisgICAgICAg ICAgICAgICAgbW9kZSB8PSBPX1dST05MWTsKKyAgICAgICAgfSBlbHNlIGlmIChlZmlfbW9kZSAm IEVGSV9GSUxFX01PREVfUkVBRCkgeworICAgICAgICAgICAgICAgIG1vZGUgfD0gT19SRE9OTFk7 CisgICAgICAgIH0gZWxzZSBpZiAoZWZpX21vZGUgJiBFRklfRklMRV9NT0RFX1JFQUQgJiYKKyAg ICAgICAgICAgICAgICAgICBlZmlfbW9kZSAmIEVGSV9GSUxFX01PREVfV1JJVEUpIHsKKyAgICAg ICAgICAgICAgICBtb2RlIHw9IE9fUkRXUjsKKyAgICAgICAgfQorCisgICAgICAgIHJldHVybiBt b2RlOworfQorCitzdGF0aWMgVUlOVDY0Cittb2RlX3RvX2VmaShpbnQgbW9kZSkKK3sKKyAgICAg ICAgVUlOVDY0IGVmaV9tb2RlID0gMDsKKworICAgICAgICBpZiAobW9kZSAmIE9fV1JPTkxZKSB7 CisgICAgICAgICAgICAgICAgZWZpX21vZGUgfD0gRUZJX0ZJTEVfTU9ERV9XUklURTsKKyAgICAg ICAgfSBlbHNlIGlmIChtb2RlICYgT19SRE9OTFkpIHsKKyAgICAgICAgICAgICAgICBlZmlfbW9k ZSB8PSBFRklfRklMRV9NT0RFX1JFQUQ7CisgICAgICAgIH0gZWxzZSBpZiAobW9kZSAmIE9fUkRX UikgeworICAgICAgICAgICAgICAgIGVmaV9tb2RlIHw9IEVGSV9GSUxFX01PREVfUkVBRDsKKyAg ICAgICAgICAgICAgICBlZmlfbW9kZSB8PSBFRklfRklMRV9NT0RFX1dSSVRFOworICAgICAgICB9 CisKKyAgICAgICAgcmV0dXJuIChlZmlfbW9kZSk7Cit9CisKK3N0YXRpYyBFRklBUEkgRUZJX1NU QVRVUworZmlsZV9vcGVuX2ltcGwoRUZJX0ZJTEVfSEFORExFIEZpbGUsIEVGSV9GSUxFX0hBTkRM RSAqTmV3SGFuZGxlLAorICAgICAgICAgICAgICAgQ0hBUjE2ICpGaWxlTmFtZSwgVUlOVDY0IE9w ZW5Nb2RlLCBVSU5UNjQgQXR0cmlidXRlcykKK3sKKyAgICAgICAgZmlsZWluZm9fdCAqZmluZm8g PSAoZmlsZWluZm9fdCopKEZpbGUgKyAxKTsKKyAgICAgICAgY2hhciBidWZbc3RybGVuKGZpbmZv LT5wYXRoKSArIHN0cmxlbjE2KEZpbGVOYW1lKSArIDFdOworCisgICAgICAgIHN0cmNweV9mcm9t XzE2KHN0cGNweShidWYsIGZpbmZvLT5wYXRoKSwgRmlsZU5hbWUpOworCisgICAgICAgIHJldHVy biBkb19maWxlX29wZW4oZmluZm8tPnZpbmZvLCBidWYsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgbW9kZV9mcm9tX2VmaShPcGVuTW9kZSksIE5ld0hhbmRsZSk7Cit9CisKK3N0YXRpYyBF RklBUEkgRUZJX1NUQVRVUworZmlsZV9jbG9zZV9pbXBsKEVGSV9GSUxFX0hBTkRMRSBGaWxlKQor eworICAgICAgICBmaWxlaW5mb190ICpmaW5mbyA9IChmaWxlaW5mb190KikoRmlsZSArIDEpOwor ICAgICAgICBpbnQgcmVzOworCisgICAgICAgIGlmICgocmVzID0gZmluZm8tPmZkYXRhLmZfb3Bz LT5mb19jbG9zZSgmKGZpbmZvLT5mZGF0YSkpKSAhPSAwKSB7CisgICAgICAgICAgICAgICAgcmV0 dXJuIChlcnJub190b19lZmlfc3RhdHVzKHJlcykpOworICAgICAgICB9CisKKyAgICAgICAgaWYg KChyZXMgPSBmaW5mby0+dmluZm8tPmRldi0+ZF9kZXYtPmR2X2Nsb3NlKCYoZmluZm8tPmZkYXRh KSkpICE9IDApIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gKGVycm5vX3RvX2VmaV9zdGF0dXMo cmVzKSk7CisgICAgICAgIH0KKworICAgICAgICBmcmVlKEZpbGUpOworICAgICAgICByZXR1cm4g KEVGSV9TVUNDRVNTKTsKK30KKworc3RhdGljIEVGSUFQSSBFRklfU1RBVFVTCitmaWxlX2RlbGV0 ZV9pbXBsKEVGSV9GSUxFX0hBTkRMRSBGaWxlKQoreworICAgICAgICBmaWxlX2Nsb3NlX2ltcGwo RmlsZSk7CisKKyAgICAgICAgcmV0dXJuIChFRklfV0FSTl9ERUxFVEVfRkFJTFVSRSk7Cit9CisK K3N0YXRpYyBFRklBUEkgRUZJX1NUQVRVUworZGlyX3JlYWRfaW1wbChFRklfRklMRV9IQU5ETEUg R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klfRklMRV9JTkZPKSArCisgICAgICAg ICAgKChzdHJsZW4oZC5kX25hbWUpICsgMSkgKiBzaXplb2YoQ0hBUjE2KSk7CisKKyAgICAgICAg aWYgKEJ1ZmZlciA9PSBOVUxMIHx8IGN1cnJzaXplIDwgcmVxc2l6ZSkgeworICAgICAgICAgICAg ICAgIGZpbmZvLT5mZGF0YS5mX29wcy0+Zm9fc2VlaygmKGZpbmZvLT5mZGF0YSksIGN1cnJwb3Ms IFNFRUtfU0VUKTsKKyAgICAgICAgICAgICAgICAqQnVmZmVyU2l6ZSA9IHJlcXNpemU7CisKKyAg ICAgICAgICAgICAgICByZXR1cm4gKEVGSV9CVUZGRVJfVE9PX1NNQUxMKTsKKyAgICAgICAgfQor CisgICAgICAgIC8vIFdlIGhhdmUgdG8gYWN0dWFsbHkgb3BlbiB0aGUgZmlsZSwgc2luY2UgRUZJ IGRpcmVjdG9yeQorICAgICAgICAvLyByZWFkcyBhcmUgc3VwcG9zZWQgdG8gcmV0dXJuIHN0YXQg aW5mb3JtYXRpb24uCisgICAgICAgIENIQVIxNiBidWZbZC5kX25hbWxlbl07CisgICAgICAgIHN0 cmNweV90b18xNihidWYsIGQuZF9uYW1lKTsKKyAgICAgICAgc3RhdHVzID0gZmlsZV9vcGVuX2lt cGwoRmlsZSwgJmVudGhhbmRsZSwgYnVmLCBFRklfRklMRV9SRUFEX09OTFksIDApOworCisgICAg ICAgIGlmIChFRklfRVJST1Ioc3RhdHVzKSkgeworICAgICAgICAgICAgICAgIGZpbmZvLT5mZGF0 YS5mX29wcy0+Zm9fc2VlaygmKGZpbmZvLT5mZGF0YSksIGN1cnJwb3MsIFNFRUtfU0VUKTsKKyAg ICAgICAgICAgICAgICByZXR1cm4gKHN0YXR1cyk7CisgICAgICAgIH0KKworICAgICAgICBlbnRp bmZvID0gKGZpbGVpbmZvX3QqKShlbnRoYW5kbGUgKyAxKTsKKworICAgICAgICBpZiAoKGVyciA9 IGZpbmZvLT5mZGF0YS5mX29wcy0+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c3Rf bW9kZSkpIHsKKyAgICAgICAgICAgICAgICBvdXQtPkF0dHJpYnV0ZSB8PSBFRklfRklMRV9ESVJF Q1RPUlk7CisgICAgICAgIH0KKworICAgICAgICBzdHJjcHlfdG9fMTYob3V0LT5GaWxlTmFtZSwg ZC5kX25hbWUpOworICAgICAgICAqQnVmZmVyU2l6ZSA9IHJlcXNpemU7CisKKyAgICAgICAgcmV0 dXJuIChFRklfU1VDQ0VTUyk7Cit9CisKK3N0YXRpYyBFRklBUEkgRUZJX1NUQVRVUworZGlyX3dy aXRlX2ltcGwoRUZJX0ZJTEVfSEFORExFIEZpbGUgX191bnVzZWQsIFVJTlROICpCdWZmZXJTaXpl IF9fdW51c2VkLAorICAgICAgICAgICAgICAgVk9JRCAqQnVmZmVyIF9fdW51c2VkKQoreworICAg ICAgICAvLyBFRkkgQVBJIGRvZXNuJ3QgYWxsb3cgd3JpdGluZyB0byBkaXJlY3RvcmllcworICAg ICAgICByZXR1cm4gKEVGSV9VTlNVUFBPUlRFRCk7Cit9CisKK3N0YXRpYyBFRklBUEkgRUZJX1NU QVRVUworZmlsZV9yZWFkX2ltcGwoRUZJX0ZJTEVfSEFORExFIEZpbGUsIFVJTlROICpCdWZmZXJT aXplLCBWT0lEICpCdWZmZXIpCit7CisgICAgICAgIGZpbGVpbmZvX3QgKmZpbmZvID0gKGZpbGVp bmZvX3QqKShGaWxlICsgMSk7CisgICAgICAgIHNpemVfdCByZWFkc2l6ZSA9ICpCdWZmZXJTaXpl OworICAgICAgICBzaXplX3QgcmVzaWQ7CisgICAgICAgIGludCBlcnI7CisKKwlpZiAoKGVyciA9 IGZpbmZvLT5mZGF0YS5mX29wcy0+Zm9fcmVhZCgmKGZpbmZvLT5mZGF0YSksIEJ1ZmZlciwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVhZHNpemUsICZy ZXNpZCkpICE9IDApIHsKKwkJcmV0dXJuIChlcnJub190b19lZmlfc3RhdHVzKGVycm5vKSk7CisJ fQorCisgICAgICAgICpCdWZmZXJTaXplID0gcmVhZHNpemUgLSByZXNpZDsKKworICAgICAgICBy ZXR1cm4gKEVGSV9TVUNDRVNTKTsKK30KKworc3RhdGljIEVGSUFQSSBFRklfU1RBVFVTCitmaWxl X3dyaXRlX2ltcGwoRUZJX0ZJTEVfSEFORExFIEZpbGUsIFVJTlROICpCdWZmZXJTaXplLCBWT0lE ICpCdWZmZXIpCit7CisgICAgICAgIGZpbGVpbmZvX3QgKmZpbmZvID0gKGZpbGVpbmZvX3QqKShG aWxlICsgMSk7CisgICAgICAgIHNpemVfdCB3cml0ZXNpemUgPSAqQnVmZmVyU2l6ZTsKKyAgICAg ICAgc2l6ZV90IHJlc2lkOworICAgICAgICBpbnQgZXJyOworCisJaWYgKChlcnIgPSBmaW5mby0+ ZmRhdGEuZl9vcHMtPmZvX3dyaXRlKCYoZmluZm8tPmZkYXRhKSwgQnVmZmVyLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVzaXplLCAmcmVzaWQp KSAhPSAwKSB7CisJCXJldHVybiAoZXJybm9fdG9fZWZpX3N0YXR1cyhlcnJubykpOworCX0KKwor ICAgICAgICAqQnVmZmVyU2l6ZSA9IHdyaXRlc2l6ZSAtIHJlc2lkOworCisgICAgICAgIHJldHVy biAoRUZJX1NVQ0NFU1MpOworfQorCitzdGF0aWMgRUZJQVBJIEVGSV9TVEFUVVMKK2ZpbGVfc2V0 X3Bvc2l0aW9uX2ltcGwoRUZJX0ZJTEVfSEFORExFIEZpbGUsIFVJTlQ2NCBQb3NpdGlvbikKK3sK KyAgICAgICAgZmlsZWluZm9fdCAqZmluZm8gPSAoZmlsZWluZm9fdCopKEZpbGUgKyAxKTsKKyAg ICAgICAgaW50IHJlczsKKworICAgICAgICBpZiAoUG9zaXRpb24gIT0gMHhmZmZmZmZmZmZmZmZm ZmZmTEwpIHsKKyAgICAgICAgICAgICAgICByZXMgPSBmaW5mby0+ZmRhdGEuZl9vcHMtPmZvX3Nl ZWsoJihmaW5mby0+ZmRhdGEpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBQb3NpdGlvbiwgU0VFS19TRVQpOworICAgICAgICB9IGVsc2UgeworICAg ICAgICAgICAgICAgIHJlcyA9IGZpbmZvLT5mZGF0YS5mX29wcy0+Zm9fc2VlaygmKGZpbmZvLT5m ZGF0YSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDAsIFNFRUtfRU5EKTsKKyAgICAgICAgfQorCisgICAgICAgIGlmIChyZXMgPiAwKSB7CisgICAg ICAgICAgICAgICAgcmV0dXJuIChFRklfU1VDQ0VTUyk7CisgICAgICAgIH0gZWxzZSB7CisgICAg ICAgICAgICAgICAgcmV0dXJuIChlcnJub190b19lZmlfc3RhdHVzKHJlcykpOworICAgICAgICB9 Cit9CisKKworc3RhdGljIEVGSUFQSSBFRklfU1RBVFVTCitmaWxlX2dldF9wb3NpdGlvbl9pbXBs KEVGSV9GSUxFX0hBTkRMRSBGaWxlLCBVSU5UNjQgKlBvc2l0aW9uKQoreworICAgICAgICBmaWxl aW5mb190ICpmaW5mbyA9IChmaWxlaW5mb190KikoRmlsZSArIDEpOworICAgICAgICBvZmZfdCBy ZXM7CisKKyAgICAgICAgcmVzID0gZmluZm8tPmZkYXRhLmZfb3BzLT5mb19zZWVrKCYoZmluZm8t PmZkYXRhKSwgMCwgU0VFS19DVVIpOworCisgICAgICAgIGlmIChyZXMgPiAwKSB7CisgICAgICAg ICAgICAgICAgKlBvc2l0aW9uID0gcmVzOworCisgICAgICAgICAgICAgICAgcmV0dXJuIChFRklf U1VDQ0VTUyk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIChlcnJu b190b19lZmlfc3RhdHVzKGVycm5vKSk7CisgICAgICAgIH0KK30KKworc3RhdGljIEVGSUFQSSBF RklfU1RBVFVTCitmaWxlX2dldF9pbmZvX2ltcGwoRUZJX0ZJTEVfSEFORExFIEZpbGUsIEVGSV9H VUlEICpJbmZvcm1hdGlvblR5cGUsCisgICAgICAgICAgICAgICAgICAgVUlOVE4gKkJ1ZmZlclNp emUsIFZPSUQgKkJ1ZmZlcikKK3sKKyAgICAgICAgZmlsZWluZm9fdCAqZmluZm8gPSAoZmlsZWlu Zm9fdCopKEZpbGUgKyAxKTsKKworICAgICAgICBpZiAoIW1lbWNtcChJbmZvcm1hdGlvblR5cGUs ICZGaWxlSW5mb0dVSUQsIHNpemVvZihFRklfR1VJRCkpKSB7CisgICAgICAgICAgICAgICAgRUZJ X0ZJTEVfSU5GTyAqb3V0ID0gKEVGSV9GSUxFX0lORk8qKUJ1ZmZlcjsKKyAgICAgICAgICAgICAg ICBVSU5UTiBzdHIxNmxlbiA9KHN0cmxlbihmaW5mby0+cGF0aCkgKyAxKSAqIHNpemVvZihDSEFS MTYpOworICAgICAgICAgICAgICAgIFVJTlROIGN1cnJzaXplID0gKkJ1ZmZlclNpemU7CisgICAg ICAgICAgICAgICAgVUlOVE4gcmVxc2l6ZSA9IHNpemVvZihFRklfRklMRV9JTkZPKSArIHN0cjE2 bGVuOworICAgICAgICAgICAgICAgIHN0cnVjdCBzdGF0IHN0OworICAgICAgICAgICAgICAgIGlu dCBlcnI7CisKKyAgICAgICAgICAgICAgICBtZW1zZXQoJnN0LCAwLCBzaXplb2Yoc3RydWN0IHN0 YXQpKTsKKyAgICAgICAgICAgICAgICAqQnVmZmVyU2l6ZSA9IHJlcXNpemU7CisKKyAgICAgICAg ICAgICAgICBpZiAoQnVmZmVyID09IE5VTEwgfHwKKyAgICAgICAgICAgICAgICAgICAgICAgY3Vy cnNpemUgPCBzaXplb2YoRUZJX0ZJTEVfSU5GTykgKyBzdHIxNmxlbikgeworICAgICAgICAgICAg ICAgICAgICAgICAgKkJ1ZmZlclNpemUgPSBzaXplb2YoRUZJX0ZJTEVfSU5GTykgKyBzdHIxNmxl bjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoRUZJX0JVRkZFUl9UT09fU01BTEwp OworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIGlmICgoZXJyID0gZmluZm8t PmZkYXRhLmZfb3BzLT5mb19zdGF0KCYoZmluZm8tPmZkYXRhKSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZzdCkpICE9IDApIHsKKyAgICAg ICAJCXJldHVybiAoZXJybm9fdG9fZWZpX3N0YXR1cyhlcnJubykpOworICAgICAgICAgICAgICAg IH0KKworICAgICAgICAgICAgICAgIG91dC0+U2l6ZSA9IHNpemVvZihFRklfRklMRV9JTkZPKSAr IHN0cjE2bGVuOworICAgICAgICAgICAgICAgIG91dC0+RmlsZVNpemUgPSBzdC5zdF9zaXplOwor ICAgICAgICAgICAgICAgIG91dC0+UGh5c2ljYWxTaXplID0gc3Quc3RfYmxvY2tzICogc3Quc3Rf Ymxrc2l6ZTsKKyAgICAgICAgICAgICAgICB0b19lZmlfdGltZSgmKG91dC0+TGFzdEFjY2Vzc1Rp bWUpLCBzdC5zdF9hdGltZSk7CisgICAgICAgICAgICAgICAgdG9fZWZpX3RpbWUoJihvdXQtPk1v ZGlmaWNhdGlvblRpbWUpLCBzdC5zdF9tdGltZSk7CisgICAgICAgICAgICAgICAgdG9fZWZpX3Rp bWUoJihvdXQtPkNyZWF0ZVRpbWUpLCBzdC5zdF9jdGltZSk7CisgICAgICAgICAgICAgICAgb3V0 LT5BdHRyaWJ1dGUgPSBtb2RlX3RvX2VmaShzdC5zdF9tb2RlKTsKKworICAgICAgICAgICAgICAg IGlmIChTX0lTRElSKHN0LnN0X21vZGUpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBvdXQt PkF0dHJpYnV0ZSB8PSBFRklfRklMRV9ESVJFQ1RPUlk7CisgICAgICAgICAgICAgICAgfQorCisg ICAgICAgICAgICAgICAgc3RyY3B5X3RvXzE2KG91dC0+RmlsZU5hbWUsIGZpbmZvLT5wYXRoKTsK KyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gKEVGSV9VTlNVUFBPUlRF RCk7CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gKEVGSV9TVUNDRVNTKTsKK30KKworc3Rh dGljIEVGSUFQSSBFRklfU1RBVFVTCitmaWxlX3NldF9pbmZvX2ltcGwoRUZJX0ZJTEVfSEFORExF IEZpbGUgX191bnVzZWQsCisgICAgICAgICAgICAgICAgICAgRUZJX0dVSUQgKkluZm9ybWF0aW9u VHlwZSBfX3VudXNlZCwKKyAgICAgICAgICAgICAgICAgICBVSU5UTiBCdWZmZXJTaXplIF9fdW51 c2VkLCBWT0lEICpCdWZmZXIgX191bnVzZWQpCit7CisgICAgICAgIHJldHVybiAoRUZJX1dSSVRF X1BST1RFQ1RFRCk7Cit9CisKK3N0YXRpYyBFRklBUEkgRUZJX1NUQVRVUworZmlsZV9mbHVzaF9p bXBsKEVGSV9GSUxFX0hBTkRMRSBGaWxlIF9fdW51c2VkKQoreworICAgICAgICByZXR1cm4gKEVG SV9TVUNDRVNTKTsKK30KKworc3RhdGljIEVGSUFQSSBFRklfU1RBVFVTCitvcGVuX3ZvbHVtZV9p bXBsKEVGSV9GSUxFX0lPX0lOVEVSRkFDRSAqVGhpcywgRUZJX0ZJTEVfSEFORExFICpSb290KQor eworICAgICAgICB2b2xpbmZvX3QgKnZpbmZvID0gKHZvbGluZm9fdCopKFRoaXMgKyAxKTsKKwor ICAgICAgICByZXR1cm4gZG9fZmlsZV9vcGVuKHZpbmZvLCAiIiwgT19SRE9OTFksIFJvb3QpOwor fQorCitzdGF0aWMgc3RydWN0IGZzX29wcyoKK2ZzX3Byb2JlKHN0cnVjdCBkZXZkZXNjICpkZXYp Cit7CisgICAgICAgIHN0cnVjdCBvcGVuX2ZpbGUgZjsKKwlpbnQgZXJyLCBpOworCisgICAgICAg IGYuZl9mbGFncyA9IE9fUkRPTkxZICsgMTsKKyAgICAgICAgZi5mX2RldiA9IChzdHJ1Y3QgZGV2 c3cgKikwOworICAgICAgICBmLmZfb3BzID0gKHN0cnVjdCBmc19vcHMgKikwOworICAgICAgICBm LmZfb2Zmc2V0ID0gMDsKKyAgICAgICAgZi5mX2RldmRhdGEgPSBkZXY7CisKKyAgICAgICAgaWYg KChlcnIgPSBkZXYtPmRfZGV2LT5kdl9vcGVuKCZmLCBkZXYpKSAhPSAwKSB7CisgICAgICAgICAg ICAgICAgcmV0dXJuIE5VTEw7CisgICAgICAgIH0KKworICAgICAgICBmb3IgKGkgPSAwOyBiYWNr ZW5kX2ZpbGVfc3lzdGVtW2ldICE9IE5VTEw7IGkrKykgeworICAgICAgICAgICAgICAgIGYuZl9v cHMgPSBiYWNrZW5kX2ZpbGVfc3lzdGVtW2ldOworCisgICAgICAgICAgICAgICAgaWYgKChlcnIg PSBmLmZfb3BzLT5mb19vcGVuKCIvIiwgJmYpKSA9PSAwKSB7CisgICAgICAgICAgICAgICAgICAg ICAgICByZXR1cm4gYmFja2VuZF9maWxlX3N5c3RlbVtpXTsKKyAgICAgICAgICAgICAgICB9Cisg ICAgICAgIH0KKworICAgICAgICByZXR1cm4gTlVMTDsKK30KKworc3RhdGljIEVGSV9TVEFUVVMK K21ha2VfZnNfZmlsZV9pb19pZmFjZShzdHJ1Y3QgZGV2ZGVzYyAqZGV2LCBFRklfRklMRV9JT19J TlRFUkZBQ0UgKipvdXQpCit7CisgICAgICAgIHN0YXRpYyBzdHJ1Y3QgZnNfb3BzKiBmc29wczsK KyAgICAgICAgRUZJX0ZJTEVfSU9fSU5URVJGQUNFKiBmaWZhY2U7CisgICAgICAgIHZvbGluZm9f dCAqdmluZm87CisKKyAgICAgICAgc3dpdGNoIChkZXYtPmRfdHlwZSkgeworI2lmZGVmIEVGSV9a RlNfQk9PVAorCWNhc2UgREVWVF9aRlM6CisgICAgICAgICAgICAgICAgZnNvcHMgPSAmemZzX2Zz b3BzOworICAgICAgICAgICAgICAgIGJyZWFrOworI2VuZGlmCisgICAgICAgIGRlZmF1bHQ6Cisg ICAgICAgICAgICAgICAgZnNvcHMgPSBmc19wcm9iZShkZXYpOworICAgICAgICAgICAgICAgIGJy ZWFrOworICAgICAgICB9CisKKyAgICAgICAgaWYgKGZzb3BzID09IE5VTEwpIHsKKyAgICAgICAg ICAgICAgICByZXR1cm4gKEVGSV9VTlNVUFBPUlRFRCk7CisgICAgICAgIH0KKworICAgICAgICBm aWZhY2UgPSBtYWxsb2Moc2l6ZW9mKEVGSV9GSUxFX0lPX0lOVEVSRkFDRSkgKyBzaXplb2Yodm9s aW5mb190KSk7CisKKyAgICAgICAgaWYgKGZpZmFjZSA9PSBOVUxMKSB7CisgICAgICAgICAgICAg ICAgcmV0dXJuIChFRklfT1VUX09GX1JFU09VUkNFUyk7CisgICAgICAgIH0KKworICAgICAgICB2 aW5mbyA9ICh2b2xpbmZvX3QqKShmaWZhY2UgKyAxKTsKKworICAgICAgICBmaWZhY2UtPlJldmlz aW9uID0gRUZJX0ZJTEVfSU9fSU5URVJGQUNFX1JFVklTSU9OOworICAgICAgICBmaWZhY2UtPk9w ZW5Wb2x1bWUgPSBvcGVuX3ZvbHVtZV9pbXBsOworICAgICAgICB2aW5mby0+ZGV2ID0gZGV2Owor ICAgICAgICB2aW5mby0+ZnNvcHMgPSBmc29wczsKKworICAgICAgICAqb3V0ID0gZmlmYWNlOwor CisgICAgICAgIHJldHVybiAoRUZJX1NVQ0NFU1MpOworfQorCitzdGF0aWMgRUZJQVBJIEVGSV9T VEFUVVMKK2JpbmRfaWZhY2UoRUZJX0hBTkRMRSBoYW5kbGUsIHN0cnVjdCBkZXZkZXNjICpkZXYp Cit7CisgICAgICAgIEVGSV9TVEFUVVMgc3RhdHVzOworICAgICAgICBFRklfRklMRV9JT19JTlRF UkZBQ0UgKmlmYWNlOworCisgICAgICAgIC8vIENoZWNrIGlmIHRoZXJlIGlzIGFscmVhZHkgYSBm aWxlc3lzdGVtIGludGVyZmFjZQorICAgICAgICBzdGF0dXMgPSBCUy0+T3BlblByb3RvY29sKGhh bmRsZSwgJlNpbXBsZUZpbGVTeXN0ZW1Qcm90b2NvbEdVSUQsCisgICAgICAgICAgICBOVUxMLCBJ SCwgaGFuZGxlLCBFRklfT1BFTl9QUk9UT0NPTF9URVNUX1BST1RPQ09MKTsKKworICAgICAgICBp ZiAoIUVGSV9FUlJPUihzdGF0dXMpKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIChFRklfQUND RVNTX0RFTklFRCk7CisgICAgICAgIH0gZWxzZSBpZiAoc3RhdHVzICE9IEVGSV9VTlNVUFBPUlRF RCkgeworICAgICAgICAgICAgICAgIHJldHVybiAoc3RhdHVzKTsKKyAgICAgICAgfQorCisgICAg ICAgIHN0YXR1cyA9IG1ha2VfZnNfZmlsZV9pb19pZmFjZShkZXYsICZpZmFjZSk7CisKKyAgICAg ICAgaWYgKEVGSV9FUlJPUihzdGF0dXMpKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIChzdGF0 dXMpOworICAgICAgICB9CisKKyAgICAgICAgc3RhdHVzID0gQlMtPkluc3RhbGxNdWx0aXBsZVBy b3RvY29sSW50ZXJmYWNlcygmaGFuZGxlLAorICAgICAgICAgICAgJlNpbXBsZUZpbGVTeXN0ZW1Q cm90b2NvbEdVSUQsIGlmYWNlLCBOVUxMKTsKKworICAgICAgICBpZiAoRUZJX0VSUk9SKHN0YXR1 cykpIHsKKyAgICAgICAgICAgICAgICBmcmVlKGlmYWNlKTsKKworICAgICAgICAgICAgICAgIHJl dHVybiAoc3RhdHVzKTsKKyAgICAgICAgfQorCisJcmV0dXJuIChzdGF0dXMpOworfQorCitzdGF0 aWMgRUZJQVBJIEVGSV9TVEFUVVMKK3N0b3BfaW1wbChFRklfRFJJVkVSX0JJTkRJTkcgKlRoaXMg X191bnVzZWQsIEVGSV9IQU5ETEUgQ29udHJvbGxlckhhbmRsZSBfX3VudXNlZCwKKyAgICAgIC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Mg dG8gYWxsIGVmaXBhcnQgZGV2aWNlcyAqLworCXVuaXQgPSAwOworCWggPSBlZmlfZmluZF9oYW5k bGUoJmVmaXBhcnRfZGV2LCAwKTsKKwlmb3IgKGkgPSAwOyBoICE9IE5VTEw7IGggPSBlZmlfZmlu ZF9oYW5kbGUoJmVmaXBhcnRfZGV2LCArK2kpKSB7CisJCXN0cnVjdCBkZXZkZXNjICpjdXJyZGV2 OworCisgICAgICAgICAgICAgICAgY3VycmRldiA9IG1hbGxvYyhzaXplb2Yoc3RydWN0IGRldmRl c2MpKTsKKworICAgICAgICAgICAgICAgIGlmIChjdXJyZGV2ID09IE5VTEwpIHsKKyAgICAgICAg ICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAg ICAgICAgIGlmIChlZmlfaGFuZGxlX2xvb2t1cChoLCAmZGV2LCAmdW5pdCwgJnBvb2xfZ3VpZCkg IT0gMCkgeworICAgICAgICAgICAgICAgICAgICAgICAgZnJlZShjdXJyZGV2KTsKKyAgICAgICAg ICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgIH0KKworCQljdXJyZGV2 LT5kX2RldiA9IGRldjsKKwkJY3VycmRldi0+ZF91bml0ID0gdW5pdDsKKwkJY3VycmRldi0+ZF9v cGVuZGF0YSA9IE5VTEw7CisJCWN1cnJkZXYtPmRfdHlwZSA9IGN1cnJkZXYtPmRfZGV2LT5kdl90 eXBlOworCisgICAgICAgICAgICAgICAgc3RhdHVzID0gYmluZF9pZmFjZShoLCBjdXJyZGV2KTsK KworICAgICAgICAgICAgICAgIGlmIChFRklfRVJST1Ioc3RhdHVzKSAmJiBzdGF0dXMgIT0gRUZJ X1VOU1VQUE9SVEVEICYmCisgICAgICAgICAgICAgICAgICAgc3RhdHVzICE9IEVGSV9BQ0NFU1Nf REVOSUVEKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRmKCJGYWlsZWQgdG8gYXR0 YWNoIGZpbGVzeXN0ZW0gaW50ZXJmYWNlIHRvIGVmaXBhcnQldSAoJWxkKVxuIiwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgdW5pdCwgRUZJX0VSUk9SX0NPREUoc3RhdHVzKSk7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgZnJlZShjdXJyZGV2KTsKKyAgICAgICAgICAgICAgICB9 CisgICAgICAgIH0KKworICAgICAgICAvKiBBdHRhY2ggU0lNUExFX0ZJTEVfU1lTVEVNIGludGVy ZmFjZSB0byBhbGwgWkZTIGRldmljZXMgKi8KKyNpZmRlZiBFRklfWkZTX0JPT1QKKwl1bml0ID0g MDsKKwloID0gZWZpX2ZpbmRfaGFuZGxlKCZ6ZnNfZGV2LCAwKTsKKwlmb3IgKGkgPSAwOyBoICE9 IE5VTEw7IGggPSBlZmlfZmluZF9oYW5kbGUoJnpmc19kZXYsICsraSkpIHsKKwkJc3RydWN0IHpm c19kZXZkZXNjICpjdXJyZGV2OworCisgICAgICAgICAgICAgICAgY3VycmRldiA9IG1hbGxvYyhz aXplb2Yoc3RydWN0IHpmc19kZXZkZXNjKSk7CisKKyAgICAgICAgICAgICAgICBpZiAoY3VycmRl diA9PSBOVUxMKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAg ICAgICAgICB9CisKKyAgICAgICAgICAgICAgICBpZiAoZWZpX2hhbmRsZV9sb29rdXAoaCwgJmRl diwgJnVuaXQsICZwb29sX2d1aWQpICE9IDApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGZy ZWUoY3VycmRldik7CisgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAg ICAgICAgICB9CisKKwkJY3VycmRldi0+ZF9kZXYgPSBkZXY7CisJCWN1cnJkZXYtPmRfdW5pdCA9 IHVuaXQ7CisJCWN1cnJkZXYtPmRfb3BlbmRhdGEgPSBOVUxMOworCQljdXJyZGV2LT5kX3R5cGUg PSB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iAoc3RhdHVzID09IEVGSV9CVUZGRVJfVE9PX1NNQUxMKSB7CisJCWhp biA9IChFRklfSEFORExFICopbWFsbG9jKHN6KTsKKwkJc3RhdHVzID0gQlMtPkxvY2F0ZUhhbmRs ZShCeVByb3RvY29sLAorICAgICAgICAgICAgICAgICAgICAmU2ltcGxlRmlsZVN5c3RlbVByb3Rv Y29sR1VJRCwgMCwgJnN6LCBoaW4pOworCQlpZiAoRUZJX0VSUk9SKHN0YXR1cykpCisJCQlmcmVl KGhpbik7CisJfQorCWlmIChFRklfRVJST1Ioc3RhdHVzKSkKKwkJcmV0dXJuIChlZmlfc3RhdHVz X3RvX2Vycm5vKHN0YXR1cykpOworCisJLyogRmlsdGVyIGhhbmRsZXMgdG8gb25seSBpbmNsdWRl IEZyZWVCU0QgcGFydGl0aW9ucy4gKi8KKwluaW4gPSBzeiAvIHNpemVvZihFRklfSEFORExFKTsK Kwl1bml0ID0gMDsKKworCWZvciAobiA9IDA7IG4gPCBuaW47IG4rKykgeworCQlzdGF0dXMgPSBC Uy0+T3BlblByb3RvY29sKGhpbltuXSwgJlNpbXBsZUZpbGVTeXN0ZW1Qcm90b2NvbEdVSUQsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCBJSCwgTlVMTCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVGSV9PUEVOX1BST1RP Q09MX1RFU1RfUFJPVE9DT0wpOworCQlpZiAoRUZJX0VSUk9SKHN0YXR1cykpCisJCQljb250aW51 ZTsKKworICAgICAgICAgICAgICAgIGVmaV9oYW5kbGVfdXBkYXRlX2RldihoaW5bbl0sICZlZmlm c19kZXYsIHVuaXQrKywgMCk7CisJfQorCisJZnJlZShoaW4pOworCXJldHVybiAoZXJyKTsKK30K KworCitzdGF0aWMgaW50CitlZmlmc19kZXZfcHJpbnQoaW50IHZlcmJvc2UpCit7CisJY2hhciBs aW5lWzgwXTsKKyAgICAgICAgRUZJX0RFVklDRV9QQVRIICpkZXZwYXRoOworICAgICAgICBFRklf QkxPQ0tfSU8gKmJsa2lvOworCUVGSV9IQU5ETEUgaCwgKmhpbjsKKwlFRklfU1RBVFVTIHN0YXR1 czsKKwl1X2ludCB1bml0LCBuOworCisJZm9yICh1bml0ID0gMCwgaCA9IGVmaV9maW5kX2hhbmRs ZSgmZWZpZnNfZGV2LCAwKTsKKwkgICAgaCAhPSBOVUxMOyBoID0gZWZpX2ZpbmRfaGFuZGxlKCZl Zmlmc19kZXYsICsrdW5pdCkpIHsKKwkJc3ByaW50ZihsaW5lLCAiICAgICVzJWQ6IiwgZWZpZnNf ZGV2LmR2X25hbWUsIHVuaXQpOworCQlwYWdlcl9vdXRwdXQobGluZSk7CisgICAgICAgICAgICAg ICAgcGFnZXJfb3V0cHV0KCIgICAgRUZJKFNJTVBMRV9GSUxFX1NZU1RFTSIpOworCisJCXN0YXR1 cyA9IEJTLT5IYW5kbGVQcm90b2NvbChoaW5bbl0sICZEZXZpY2VQYXRoR1VJRCwKKwkJICAgICh2 b2lkICoqKSZkZXZwYXRoKTsKKwkJaWYgKCFFRklfRVJST1Ioc3RhdHVzKSkgeworICAgICAgICAg ICAgICAgICAgICAgICAgcGFnZXJfb3V0cHV0KCIsIERFVklDRV9QQVRIIik7CisJCX0KKworCQlz dGF0dXMgPSBCUy0+SGFuZGxlUHJvdG9jb2woaGluW25dLCAmQmxvY2tJb1Byb3RvY29sR1VJRCwK KwkJICAgICh2b2lkICoqKSZibGtpbyk7CisJCWlmICghRUZJX0VSUk9SKHN0YXR1cykpIHsKKyAg ICAgICAgICAgICAgICAgICAgICAgIHBhZ2VyX291dHB1dCgiLCBCTE9DS19JTyIpOworCQl9CisJ CXBhZ2VyX291dHB1dCgiKVxuIik7CisJfQorICAgICAgICByZXR1cm4gKDApOworfQorCitzdGF0 aWMgaW50CitlZmlmc19kZXZfb3BlbihzdHJ1Y3Qgb3Blbl9maWxlICpmLCAuLi4pCit7CisJdmFf bGl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7CisgICAgICAgIEVGSV9TVEFUVVMgc3RhdHVzOworICAgICAgICBDSEFSMTYgcGF0aFtz dHJsZW4odXBhdGgpICsgMV07CisKKwlkZXYgPSAoc3RydWN0IGRldmRlc2MgKikoZi0+Zl9kZXZk YXRhKTsKKyAgICAgICAgZnNpZmFjZSA9IGRldi0+ZF9vcGVuZGF0YTsKKworICAgICAgICBpZiAo IXN0cmNtcCh1cGF0aCwgIiIpIHx8ICFzdHJjbXAodXBhdGgsICIvIikpIHsKKyAgICAgICAgICAg ICAgICByZXR1cm4gKGZzaWZhY2UtPk9wZW5Wb2x1bWUoZnNpZmFjZSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEVGSV9GSUxFX0hBTkRMRSopJihmLT5mX2Zz ZGF0YSkpKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBzdGF0dXMgPSBmc2lm YWNlLT5PcGVuVm9sdW1lKGZzaWZhY2UsICZyb290KTsKKworICAgICAgICAgICAgICAgIGlmIChF RklfRVJST1Ioc3RhdHVzKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChlZmlf c3RhdHVzX3RvX2Vycm5vKHN0YXR1cykpOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAg ICAgICAgIHN0cmNweV90b18xNihwYXRoLCB1cGF0aCk7CisgICAgICAgICAgICAgICAgc3RhdHVz ID0gcm9vdC0+T3Blbihyb290LCAoRUZJX0ZJTEVfSEFORExFKikmKGYtPmZfZnNkYXRhKSwgcGF0 aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVGSV9GSUxFX01PREVfUkVB RCwgMCk7CisKKyAgICAgICAgICAgICAgICByb290LT5DbG9zZShyb290KTsKKworICAgICAgICAg ICAgICAgIGlmIChFRklfRVJST1Ioc3RhdHVzKSkgeworICAgICAgICAgICAgICAgICAgICAgICAg cmV0dXJuIChlZmlfc3RhdHVzX3RvX2Vycm5vKHN0YXR1cykpOworICAgICAgICAgICAgICAgIH0K KworICAgICAgICAgICAgICAgIHJldHVybiAwOworICAgICAgICB9Cit9CisKK3N0YXRpYyBpbnQK K2VmaWZzX2Nsb3NlKHN0cnVjdCBvcGVuX2ZpbGUgKmYpCit7CisgICAgICAgIEVGSV9GSUxFX0hB TkRMRSBmaWxlID0gKEVGSV9GSUxFX0hBTkRMRSlmLT5mX2ZzZGF0YTsKKyAgICAgICAgRUZJX1NU QVRVUyBzdGF0dXM7CisKKyAgICAgICAgc3RhdHVzID0gZmlsZS0+Q2xvc2UoZmlsZSk7CisKKyAg ICAgICAgaWYgKEVGSV9FUlJPUihzdGF0dXMpKQorCQlyZXR1cm4gKGVmaV9zdGF0dXNfdG9fZXJy bm8oc3RhdHVzKSk7CisKKyAgICAgICAgcmV0dXJuICgwKTsKK30KKworc3RhdGljIGludAorZWZp ZnNfcmVhZChzdHJ1Y3Qgb3Blbl9maWxlICpmLCB2b2lkICpzdGFydCwgc2l6ZV90IHNpemUsIHNp emVfdCAqcmVzaWQgLyogb3V0ICovKQoreworICAgICAgICBFRklfRklMRV9IQU5ETEUgZmlsZSA9 IChFRklfRklMRV9IQU5ETEUpZi0+Zl9mc2RhdGE7CisgICAgICAgIFVJTlROIHJlYWRzaXplID0g c2l6ZTsKKyAgICAgICAgRUZJX1NUQVRVUyBzdGF0dXM7CisKKyAgICAgICAgc3RhdHVzID0gZmls ZS0+UmVhZChmaWxlLCAmcmVhZHNpemUsIHN0YXJ0KTsKKworICAgICAgICBpZiAoRUZJX0VSUk9S KHN0YXR1cykpCisJCXJldHVybiAoZWZpX3N0YXR1c190b19lcnJubyhzdGF0dXMpKTsKKworCWlm IChyZXNpZCkKKwkJKnJlc2lkID0gc2l6ZSAtIHJlYWRzaXplOworCisJcmV0dXJuICgwKTsKK30K Kworc3RhdGljIGludAorZWZpZnNfd3JpdGUoc3RydWN0IG9wZW5fZmlsZSAqZiwgdm9pZCAqc3Rh cnQsIHNpemVfdCBzaXplLAorICAgICAgICAgICAgc2l6ZV90ICpyZXNpZCAvKiBvdXQgKi8pCit7 CisgICAgICAgIEVGSV9GSUxFX0hBTkRMRSBmaWxlID0gKEVGSV9GSUxFX0hBTkRMRSlmLT5mX2Zz ZGF0YTsKKyAgICAgICAgVUlOVE4gd3JpdGVzaXplID0gc2l6ZTsKKyAgICAgICAgRUZJX1NUQVRV UyBzdGF0dXM7CisKKyAgICAgICAgc3RhdHVzID0gZmlsZS0+V3JpdGUoZmlsZSwgJndyaXRlc2l6 ZSwgc3RhcnQpOworCisgICAgICAgIGlmIChFRklfRVJST1Ioc3RhdHVzKSkKKwkJcmV0dXJuIChl Zmlfc3RhdHVzX3RvX2Vycm5vKHN0YXR1cykpOworCisJaWYgKHJlc2lkKQorCQkqcmVzaWQgPSBz aXplIC0gd3JpdGVzaXplOworCisJcmV0dXJuICgwKTsKK30KKworc3RhdGljIG9mZl90CitlZmlm c19zZWVrKHN0cnVjdCBvcGVuX2ZpbGUgKmYsIG9mZl90IG9mZnNldCwgaW50IHdoZXJlKQorewor ICAgICAgICBFRklfRklMRV9IQU5ETEUgZmlsZSA9IChFRklfRklMRV9IQU5ETEUpZi0+Zl9mc2Rh dGE7CisgICAgICAgIFVJTlQ2NCBwb3M7CisgICAgICAgIEVGSV9TVEFUVVMgc3RhdHVzOworCisJ c3dpdGNoICh3aGVyZSkgeworCWNhc2UgU0VFS19TRVQ6CisgICAgICAgICAgICAgICAgc3RhdHVz ID0gZmlsZS0+U2V0UG9zaXRpb24oZmlsZSwgb2Zmc2V0KTsKKworICAgICAgICAgICAgICAgIGlm IChzdGF0dXMgIT0gRUZJX1NVQ0NFU1MpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVycm5v ID0gKGVmaV9zdGF0dXNfdG9fZXJybm8oc3RhdHVzKSk7CisgICAgICAgICAgICAgICAgICAgICAg ICByZXR1cm4gLTE7CisgICAgICAgICAgICAgICAgfQorCisJCWJyZWFrOworCWNhc2UgU0VFS19D VVI6CisgICAgICAgICAgICAgICAgc3RhdHVzID0gZmlsZS0+R2V0UG9zaXRpb24oZmlsZSwgJnBv cyk7CisKKyAgICAgICAgICAgICAgICBpZiAoc3RhdHVzICE9IEVGSV9TVUNDRVNTKSB7CisgICAg ICAgICAgICAgICAgICAgICAgICBlcnJubyA9IChlZmlfc3RhdHVzX3RvX2Vycm5vKHN0YXR1cykp OworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICAgICAgICAgIH0K KworICAgICAgICAgICAgICAgIHN0YXR1cyA9IGZpbGUtPlNldFBvc2l0aW9uKGZpbGUsIHBvcyAr IG9mZnNldCk7CisKKyAgICAgICAgICAgICAgICBpZiAoc3RhdHVzICE9IEVGSV9TVUNDRVNTKSB7 CisgICAgICAgICAgICAgICAgICAgICAgICBlcnJubyA9IChlZmlfc3RhdHVzX3RvX2Vycm5vKHN0 YXR1cykpOworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICAgICAg ICAgIH0KKworCQlicmVhazsKKwljYXNlIFNFRUtfRU5EOgorICAgICAgICAgICAgICAgIHN0YXR1 cyA9IGZpbGUtPlNldFBvc2l0aW9uKGZpbGUsIDB4ZmZmZmZmZmZmZmZmZmZmZik7CisKKyAgICAg ICAgICAgICAgICBpZiAoc3RhdHVzICE9IEVGSV9TVUNDRVNTKSB7CisgICAgICAgICAgICAgICAg ICAgICAgICBlcnJubyA9IChlZmlfc3RhdHVzX3RvX2Vycm5vKHN0YXR1cykpOworICAgICAgICAg ICAgICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICAgICAgICAgIH0KKwlkZWZhdWx0Ogor CQllcnJubyA9IEVJTlZBTDsKKwkJcmV0dXJuICgtMSk7CisJfQorCisgICAgICAgIHN0YXR1cyA9 IGZpbGUtPkdldFBvc2l0aW9uKGZpbGUsICZwb3MpOworCisgICAgICAgIGlmIChzdGF0dXMgIT0g RUZJX1NVQ0NFU1MpIHsKKyAgICAgICAgICAgICAgICBlcnJubyA9IChlZmlfc3RhdHVzX3RvX2Vy cm5vKHN0YXR1cykpOworICAgICAgICAgICAgICAgIHJldHVybiAtMTsKKyAgICAgICAgfQorCisJ cmV0dXJuIChwb3MpOworfQorCisvKiBTSU1QTEVfRklMRV9TWVNURU1fUFJPVE9DT0wgaXMgZ2Vh cmVkIHRvd2FyZHMgRkFULCBzbyB3ZSBjYW4ndAorICogcmVwcm9kdWNlIHN0YXQgd2l0aCBhYnNv bHV0ZSBmaWRlbGl0eS4KKyAqLworc3RhdGljIGludAorZWZpZnNfc3RhdChzdHJ1Y3Qgb3Blbl9m aWxlICpmLCBzdHJ1Y3Qgc3RhdCAqc2IpCit7CisgICAgICAgIEVGSV9GSUxFX0hBTkRMRSBmaWxl OworICAgICAgICBVSU5UTiBzaXplID0gMDsKKyAgICAgICAgRUZJX0ZJTEVfSU5GTyAqZmluZm87 OworICAgICAgICBFRklfU1RBVFVTIHN0YXR1czsKKworICAgICAgICBmaWxlID0gKEVGSV9GSUxF X0hBTkRMRSlmLT5mX2ZzZGF0YTsKKyAgICAgICAgc3RhdHVzID0gZmlsZS0+R2V0SW5mbyhmaWxl LCAmRmlsZUluZm9HVUlELCAmc2l6ZSwgTlVMTCk7CisKKyAgICAgICAgaWYgKHN0YXR1cyAhPSBF RklfQlVGRkVSX1RPT19TTUFMTCkgeworICAgICAgICAgICAgICAgIGVycm5vID0gKGVmaV9zdGF0 dXNfdG9fZXJybm8oc3RhdHVzKSk7CisgICAgICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAg ICB9CisKKyAgICAgICAgZmluZm8gPSBtYWxsb2Moc2l6ZSk7CisgICAgICAgIHN0YXR1cyA9IGZp bGUtPkdldEluZm8oZmlsZSwgJkZpbGVJbmZvR1VJRCwgJnNpemUsIGZpbmZvKTsKKworICAgICAg ICBpZiAoc3RhdHVzICE9IEVGSV9TVUNDRVNTKSB7CisgICAgICAgICAgICAgICAgZXJybm8gPSAo ZWZpX3N0YXR1c190b19lcnJubyhzdGF0dXMpKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gLTE7 CisgICAgICAgIH0KKworICAgICAgICAvKiBXZSBjYW4ndCBwcm9wZXJseSBmaWxsIHRoZXNlIGlu Li4uICovCisgICAgICAgIHNiLT5zdF9pbm8gPSAwOworICAgICAgICBzYi0+c3RfbmxpbmsgPSAw OworICAgICAgICBzYi0+c3RfdWlkID0gMDsKKyAgICAgICAgc2ItPnN0X2dpZCA9IDA7CisgICAg ICAgIHNiLT5zdF9ibGtzaXplID0gNTEyOworICAgICAgICAvKiBCdWlsZCB0aGUgbW9kZSBmaWVs ZCAqLworICAgICAgICBpZiAoZmluZm8tPkF0dHJpYnV0ZSAmIEVGSV9GSUxFX0RJUkVDVE9SWSkg eworICAgICAgICAgICAgICAgIHNiLT5zdF9tb2RlID0gU19JRkRJUjsKKyAgICAgICAgfSBlbHNl IHsKKyAgICAgICAgICAgICAgICBzYi0+c3RfbW9kZSA9IFNfSUZSRUc7CisgICAgICAgIH0KKwor ICAgICAgICBpZiAoZmluZm8tPkF0dHJpYnV0ZSAmIEVGSV9GSUxFX01PREVfUkVBRCkgeworICAg ICAgICAgIHNiLT5zdF9tb2RlID0gU19JUlVTUiB8IFNfSVhVU1IgfCBTX0lSR1JQIHwKKyAgICAg ICAgICAgIFNfSVhHUlAgfCBTX0lST1RIIHwgU19JWE9USDsKKyAgICAgICAgfQorCisgICAgICAg IGlmIChmaW5mby0+QXR0cmlidXRlICYgRUZJX0ZJTEVfTU9ERV9SRUFEKSB7CisgICAgICAgICAg c2ItPnN0X21vZGUgPSBTX0lXVVNSIHwgU19JV0dSUCB8IFNfSVdPVEg7CisgICAgICAgIH0KKyAg ICAgICAgLyogVGhpcyBtYXkgb3IgbWF5IG5vdCBiZSBzdXBwb3J0ZWQsIGRlcGVuZGluZyBvbiB0 aGUgRlMgZHJpdmVyICovCisgICAgICAgIHNiLT5zdF9ibG9ja3MgPSBmaW5mby0+UGh5c2ljYWxT aXplIC8gNTEyOworICAgICAgICAvKiBUaGVzZSBmaWVsZHMgd2UgY2FuIGdldCByaWdodCAqLwor ICAgICAgICBzYi0+c3Rfc2l6ZSA9IGZpbmZvLT5GaWxlU2l6ZTsKKyAgICAgICAgc2ItPnN0X2F0 aW1lID0gZnJvbV9lZmlfdGltZSgmKGZpbmZvLT5MYXN0QWNjZXNzVGltZSkpOworICAgICAgICBz Yi0+c3RfbXRpbWUgPSBmcm9tX2VmaV90aW1lKCYoZmluZm8tPk1vZGlmaWNhdGlvblRpbWUpKTsK KyAgICAgICAgc2ItPnN0X2N0aW1lID0gZnJvbV9lZmlfdGltZSgmKGZpbmZvLT5DcmVhdGVUaW1l KSk7CisKKyAgICAgICAgZnJlZShmaW5mbyk7CisKKyAgICAgICAgcmV0dXJuICgwKTsKK30KKwor c3RhdGljIGludAorZWZpZnNfcmVhZGRpcihzdHJ1Y3Qgb3Blbl9maWxlICpmLCBzdHJ1Y3QgZGly ZW50ICpkKQoreworICAgICAgICBFRklfRklMRV9IQU5ETEUgZmlsZTsKKyAgICAgICAgVUlOVE4g c2l6ZSA9IDA7CisgICAgICAgIEVGSV9GSUxFX0lORk8gKmZpbmZvOzsKKyAgICAgICAgRUZJX1NU QVRVUyBzdGF0dXM7CisKKyAgICAgICAgZmlsZSA9IChFRklfRklMRV9IQU5ETEUpZi0+Zl9mc2Rh dGE7CisgICAgICAgIHN0YXR1cyA9IGZpbGUtPlJlYWQoZmlsZSwgJnNpemUsIE5VTEwpOworCisg ICAgICAgIGlmIChzdGF0dXMgIT0gRUZJX0JVRkZFUl9UT09fU01BTEwpIHsKKyAgICAgICAgICAg ICAgICBlcnJubyA9IChlZmlfc3RhdHVzX3RvX2Vycm5vKHN0YXR1cykpOworICAgICAgICAgICAg ICAgIHJldHVybiAtMTsKKyAgICAgICAgfQorCisgICAgICAgIGlmIChzaXplID09IDApIHsKKyAg ICAgICAgICAgICAgICByZXR1cm4gKEVOT0VOVCk7CisgICAgICAgIH0KKworICAgICAgICBmaW5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RvX2VmaV9zdGF0dXMoaW50IGVycm5vKQoreworICAgICAgICBFRklf U1RBVFVTIHN0YXR1czsKKworICAgICAgICBzd2l0Y2ggKGVycm5vKSB7CisgICAgICAgIGNhc2Ug RVBFUk06CisgICAgICAgICAgICAgICAgc3RhdHVzID0gRUZJX0FDQ0VTU19ERU5JRUQ7CisgICAg ICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBFT1ZFUkZMT1c6CisgICAgICAgICAg ICAgICAgc3RhdHVzID0gRUZJX0JVRkZFUl9UT09fU01BTEw7CisgICAgICAgICAgICAgICAgYnJl YWs7CisKKyAgICAgICAgY2FzZSBFSU86CisgICAgICAgICAgICAgICAgc3RhdHVzID0gRUZJX0RF VklDRV9FUlJPUjsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIEVJTlZB TDoKKyAgICAgICAgICAgICAgICBzdGF0dXMgPSBFRklfSU5WQUxJRF9QQVJBTUVURVI7CisgICAg ICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBFU1RBTEU6CisgICAgICAgICAgICAg ICAgc3RhdHVzID0gRUZJX01FRElBX0NIQU5HRUQ7CisgICAgICAgICAgICAgICAgYnJlYWs7CisK KyAgICAgICAgY2FzZSBFTlhJTzoKKyAgICAgICAgICAgICAgICBzdGF0dXMgPSBFRklfTk9fTUVE SUE7CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBFTk9FTlQ6CisgICAg ICAgICAgICAgICAgc3RhdHVzID0gRUZJX05PVF9GT1VORDsKKyAgICAgICAgICAgICAgICBicmVh azsKKworICAgICAgICBjYXNlIEVOT01FTToKKyAgICAgICAgICAgICAgICBzdGF0dXMgPSBFRklf T1VUX09GX1JFU09VUkNFUzsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNl IEVOT1RTVVA6CisgICAgICAgIGNhc2UgRU5PREVWOgorICAgICAgICAgICAgICAgIHN0YXR1cyA9 IEVGSV9VTlNVUFBPUlRFRDsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNl IEVOT1NQQzoKKyAgICAgICAgICAgICAgICBzdGF0dXMgPSBFRklfVk9MVU1FX0ZVTEw7CisgICAg ICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBFQUNDRVM6CisgICAgICAgICAgICAg ICAgc3RhdHVzID0gRUZJX1dSSVRFX1BST1RFQ1RFRDsKKyAgICAgICAgICAgICAgICBicmVhazsK KworICAgICAgICBjYXNlIDA6CisgICAgICAgICAgICAgICAgc3RhdHVzID0gRUZJX1NVQ0NFU1M7 CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAg ICAgICBzdGF0dXMgPSBFRklfREVWSUNFX0VSUk9SOworICAgICAgICAgICAgICAgIGJyZWFrOwor ICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIChzdGF0dXMpOworfQorCiBpbnQKIGVmaV9zdGF0 dXNfdG9fZXJybm8oRUZJX1NUQVRVUyBzdGF0dXMpCiB7CmRpZmYgLS1naXQgc3lzL2Jvb3QvZWZp L2xpYmVmaS9oYW5kbGVzLmMgc3lzL2Jvb3QvZWZpL2xpYmVmaS9oYW5kbGVzLmMKaW5kZXggMWU0 ZWY2ZmZiZDUuLmMxMTgwODVjMWM5IDEwMDY0NAotLS0gc3lzL2Jvb3QvZWZpL2xpYmVmaS9oYW5k bGVzLmMKKysrIHN5cy9ib290L2VmaS9saWJlZmkvaGFuZGxlcy5jCkBAIC00MSwyMSArNDEsMzYg QEAgc3RydWN0IGVudHJ5IHsKIHN0cnVjdCBlbnRyeSAqZW50cnk7CiBpbnQgbmVudHJpZXM7CiAK K3N0YXRpYyBpbnQKK2dldF9uZXh0X3VuaXQoc3RydWN0IGRldnN3ICpzdykKK3sKKyAgICAgICAg aW50IGksIGlkeDsKKworICAgICAgICBmb3IgKGkgPSAwLCBpZHggPSAw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VklDRVM7IExPU1MgT0Yg VVNFLCBEQVRBLCBPUiBQUk9GSVRTOyBPUiBCVVNJTkVTUyBJTlRFUlJVUFRJT04pCisgKiBIT1dF VkVSIENBVVNFRCBBTkQgT04gQU5ZIFRIRU9SWSBPRiBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQ09O VFJBQ1QsIFNUUklDVAorICogTElBQklMSVRZLCBPUiBUT1JUIChJTkNMVURJTkcgTkVHTElHRU5D RSBPUiBPVEhFUldJU0UpIEFSSVNJTkcgSU4gQU5ZIFdBWQorICogT1VUIE9GIFRIRSBVU0UgT0Yg VEhJUyBTT0ZUV0FSRSwgRVZFTiBJRiBBRFZJU0VEIE9GIFRIRSBQT1NTSUJJTElUWSBPRgorICog U1VDSCBEQU1BR0UuCisgKgorICogJEZyZWVCU0QkCisgKi8KKworI2luY2x1ZGUgInN0cmluZzE2 LmgiCisjaW5jbHVkZSA8c3RkZGVmLmg+CisKK3NpemVfdAorc3RybGVuMTYoY29uc3QgQ0hBUjE2 ICpzdHIpCit7CisgICAgICAgIHNpemVfdCBpOworCisgICAgICAgIGZvciAoaSA9IDA7IHN0cltp XSAhPSAwOyBpKyspOworCisgICAgICAgIHJldHVybiBpOworfQorCitDSEFSMTYgKgorc3RyY3B5 MTYoQ0hBUjE2ICpkc3QsIGNvbnN0IENIQVIxNiAqc3JjKQoreworICAgICAgICBzdHBjcHkxNihk c3QsIHNyYyk7CisKKyAgICAgICAgcmV0dXJuIChkc3QpOworfQorCitDSEFSMTYgKgorc3RwY3B5 MTYoQ0hBUjE2ICpkc3QsIGNvbnN0IENIQVIxNiAqc3JjKQoreworICAgICAgICBmb3IgKDsgKnNy YyAhPSAwOyBzcmMrKywgZHN0KyspIHsKKyAgICAgICAgICAgICAgICAqZHN0ID0gKnNyYzsKKyAg ICAgICAgfQorCisgICAgICAgICpkc3QgPSAqc3JjOworCisgICAgICAgIHJldHVybiBkc3Q7Cit9 CisKK2NoYXIgKgorc3RyY3B5X2Zyb21fMTYoY2hhciAqZHN0LCBjb25zdCBDSEFSMTYgKnNyYykK K3sKKyAgICAgICAgaW50IGk7CisKKyAgICAgICAgZm9yIChpID0gMDsgc3JjW2ldICE9IDA7IGkr KykgeworICAgICAgICAgICAgICAgIGRzdFtpXSA9IHNyY1tpXTsKKyAgICAgICAgfQorCisgICAg ICAgIGRzdFtpXSA9IDA7CisKKyAgICAgICAgcmV0dXJuIChkc3QpOworfQorCitDSEFSMTYgKgor c3RyY3B5X3RvXzE2KENIQVIxNiAqZHN0LCBjb25zdCBjaGFyICpzcmMpCit7CisgICAgICAgIGlu dCBpOworCisgICAgICAgIGZvciAoaSA9IDA7IHNyY1tpXSAhPSAwOyBpKyspIHsKKyAgICAgICAg ICAgICAgICBkc3RbaV0gPSBzcmNbaV07CisgICAgICAgIH0KKworICAgICAgICBkc3RbaV0gPSAw OworCisgICAgICAgIHJldHVybiAoZHN0KTsKK30KZGlmZiAtLWdpdCBzeXMvYm9vdC9lZmkvbGli ZWZpL3RpbWUuYyBzeXMvYm9vdC9lZmkvbGliZWZpL3RpbWUuYwppbmRleCA5OTgzMWUxY2YxYS4u MmRmNDY2ZTU3YjcgMTAwNjQ0Ci0tLSBzeXMvYm9vdC9lZmkvbGliZWZpL3RpbWUuYworKysgc3lz L2Jvb3QvZWZpL2xpYmVmaS90aW1lLmMKQEAgLTIsMjggKzIsMjggQEAKICAqIENvcHlyaWdodCAo YykgMTk5OSwgMjAwMAogICogSW50ZWwgQ29ycG9yYXRpb24uCiAgKiBBbGwgcmlnaHRzIHJlc2Vy dmVkLgotICogCisgKgogICogUmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJp bmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CiAgKiBtb2RpZmljYXRpb24sIGFyZSBwZXJtaXR0 ZWQgcHJvdmlkZWQgdGhhdCB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnMKICAqIGFyZSBtZXQ6Ci0g KiAKKyAqCiAg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SB5ZWFyLgorKi8KK3N0YXRpYyBjb25zdCB0aW1l X3QgQ3VtdWxhdGl2ZURheXNbMl1bMTRdID0geworICB7MCwKKyAgIDAsCisgICAzMSwKKyAgIDMx ICsgMjgsCisgICAzMSArIDI4ICsgMzEsCisgICAzMSArIDI4ICsgMzEgKyAzMCwKKyAgIDMxICsg MjggKyAzMSArIDMwICsgMzEsCisgICAzMSArIDI4ICsgMzEgKyAzMCArIDMxICsgMzAsCisgICAz MSArIDI4ICsgMzEgKyAzMCArIDMxICsgMzAgKyAzMSwKKyAgIDMxICsgMjggKyAzMSArIDMwICsg MzEgKyAzMCArIDMxICsgMzEsCisgICAzMSArIDI4ICsgMzEgKyAzMCArIDMxICsgMzAgKyAzMSAr IDMxICsgMzAsCisgICAzMSArIDI4ICsgMzEgKyAzMCArIDMxICsgMzAgKyAzMSArIDMxICsgMzAg KyAzMSwKKyAgIDMxICsgMjggKyAzMSArIDMwICsgMzEgKyAzMCArIDMxICsgMzEgKyAzMCArIDMx ICsgMzAsCisgICAzMSArIDI4ICsgMzEgKyAzMCArIDMxICsgMzAgKyAzMSArIDMxICsgMzAgKyAz MSArIDMwICsgMzEgfSwKKyAgezAsCisgICAwLAorICAgMzEsCisgICAzMSArIDI5LAorICAgMzEg KyAyOSArIDMxLAorICAgMzEgKyAyOSArIDMxICsgMzAsCisgICAzMSArIDI5ICsgMzEgKyAzMCAr IDMxLAorICAgMzEgKyAyOSArIDMxICsgMzAgKyAzMSArIDMwLAorICAgMzEgKyAyOSArIDMxICsg MzAgKyAzMSArIDMwICsgMzEsCisgICAzMSArIDI5ICsgMzEgKyAzMCArIDMxICsgMzAgKyAzMSAr IDMxLAorICAgMzEgKyAyOSArIDMxICsgMzAgKyAzMSArIDMwICsgMzEgKyAzMSArIDMwLAorICAg MzEgKyAyOSArIDMxICsgMzAgKyAzMSArIDMwICsgMzEgKyAzMSArIDMwICsgMzEsCisgICAzMSAr IDI5ICsgMzEgKyAzMCArIDMxICsgMzAgKyAzM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AzMCwK LSAgICAgMzEgKyAyOCArIDMxICsgMzAgKyAzMSArIDMwICsgMzEgKyAzMSArIDMwICsgMzEsCi0g ICAgIDMxICsgMjggKyAzMSArIDMwICsgMzEgKyAzMCArIDMxICsgMzEgKyAzMCArIDMxICsgMzAs Ci0gICAgIDMxICsgMjggKyAzMSArIDMwICsgMzEgKyAzMCArIDMxICsgMzEgKyAzMCArIDMxICsg MzAgKyAzMSB9LAotICAgIHswLAotICAgICAwLAotICAgICAzMSwKLSAgICAgMzEgKyAyOSwKLSAg ICAgMzEgKyAyOSArIDMxLAotICAgICAzMSArIDI5ICsgMzEgKyAzMCwKLSAgICAgMzEgKyAyOSAr IDMxICsgMzAgKyAzMSwKLSAgICAgMzEgKyAyOSArIDMxICsgMzAgKyAzMSArIDMwLAotICAgICAz MSArIDI5ICsgMzEgKyAzMCArIDMxICsgMzAgKyAzMSwKLSAgICAgMzEgKyAyOSArIDMxICsgMzAg KyAzMSArIDMwICsgMzEgKyAzMSwKLSAgICAgMzEgKyAyOSArIDMxICsgMzAgKyAzMSArIDMwICsg MzEgKyAzMSArIDMwLAotICAgICAzMSArIDI5ICsgMzEgKyAzMCArIDMxICsgMzAgKyAzMSArIDMx ICsgMzAgKyAzMSwKLSAgICAgMzEgKyAyOSArIDMxICsgMzAgKyAzMSArIDMwICsgMzEgKyAzMSAr IDMwICsgMzEgKyAzMCwKLSAgICAgMzEgKyAyOSArIDMxICsgMzAgKyAzMSArIDMwICsgMzEgKyAz MSArIDMwICsgMzEgKyAzMCArIDMxIH19OwotCi0gICAgdGltZV90ICBVVGltZTsgCisgICAgICAg IGlmICh0aW1lID49IDApIHsKKyAgICAgICAgICAgICAgICBmb3IgKGVmaV90aW1lLT5ZZWFyID0g MTk3MDsKKyAgICAgICAgICAgICAgICAgICAgdGltZSA+IEN1bXVsYXRpdmVEYXlzW2lzbGVhcChl ZmlfdGltZS0+WWVhcildWzEzXSAqIFNFQ1NQRVJEQVk7CisgICAgICAgICAgICAgICAgICAgIHRp bWUgLT0gQ3VtdWxhdGl2ZURheXNbaXNsZWFwKGVmaV90aW1lLT5ZZWFyKV1bMTNdICogU0VDU1BF UkRBWSwKKyAgICAgICAgICAgICAgICAgICAgZWZpX3RpbWUtPlllYXIrKyk7CisKKyAgICAgICAg ICAgICAgICBmb3IgKGVmaV90aW1lLT5Nb250aCA9IDA7CisgICAgICAgICAgICAgICAgICAgIHRp bWUgPiBDdW11bGF0aXZlRGF5c1tpc2xlYXAoZWZpX3RpbWUtPlllYXIpXVtlZmlfdGltZS0+TW9u dGhdICoKKyAgICAgICAgICAgICAgICAgICAgICBTRUNTUEVSREFZOworICAgICAgICAgICAgICAg ICAgICBlZmlfdGltZS0+TW9udGgrKyk7CisKKyAgICAgICAgICAgICAgICB0aW1lIC09IEN1bXVs YXRpdmVEYXlzW2lzbGVhcChlZmlfdGltZS0+WWVhcildW2VmaV90aW1lLT5Nb250aCAtIDFdICoK KyAgICAgICAgICAgICAgICAgICAgU0VDU1BFUkRBWTsKKworICAgICAgICAgICAgICAgIGZvciAo ZWZpX3RpbWUtPkRheSA9IDA7IHRpbWUgPiBTRUNTUEVSREFZOworICAgICAgICAgICAgICAgICAg ICB0aW1lIC09IFNFQ1NQRVJEQVksIGVmaV90aW1lLT5EYXkrKyk7CisKKyAgICAgICAgICAgICAg ICBmb3IgKGVmaV90aW1lLT5Ib3VyID0gMDsgdGltZSA+IFNFQ1NQRVJIT1VSOworICAgICAgICAg ICAgICAgICAgICB0aW1lIC09IFNFQ1NQRVJIT1VSLCBlZmlfdGltZS0+SG91cisrKTsKKworICAg ICAgICAgICAgICAgIGZvciAoZWZpX3RpbWUtPk1pbnV0ZSA9IDA7IHRpbWUgPiA2MDsKKyAgICAg ICAgICAgICAgICAgICAgdGltZSAtPSA2MCwgZWZpX3RpbWUtPk1pbnV0ZSsrKTsKKworICAgICAg ICAgICAgICAgIGVmaV90aW1lLT5TZWNvbmQgPSB0aW1lOworICAgICAgICAgICAgICAgIGVmaV90 aW1lLT5OYW5vc2Vjb25kID0gMDsKKyAgICAgICAgICAgICAgICBlZmlfdGltZS0+VGltZVpvbmUg PSAwOworICAgICAgICAgICAgICAgIGVmaV90aW1lLT5EYXlsaWdodCA9IDA7CisgICAgICAgIH0g ZWxzZSB7CisgICAgICAgICAgICAgICAgbWVtc2V0KGVmaV90aW1lLCAwLCBzaXplb2YoRUZJX1RJ TUUpKTsKKyAgICAgICAgfQorfQorCit0aW1lX3QKK2Zyb21fZWZpX3RpbWUoRUZJX1RJTUUgKkVU aW1lKQoreworCisgICAgdGltZV90ICBVVGltZTsKICAgICBpbnQgICAgIFllYXI7CiAKICAgICAv KgpAQCAtMTM0LDcgKzE3MCw3IEBAIGVmaV90aW1lKEVGSV9USU1FICpFVGltZSkKICAgICAvKgog ICAgIC8vIFVUaW1lIHNob3VsZCBub3cgYmUgc2V0IHRvIDAwOjAwOjAwIG9uIEphbiAxIG9mIHRo ZSBmaWxlJ3MgeWVhci4KICAgICAvLwotICAgIC8vIE1vbnRocyAgCisgICAgLy8gTW9udGhzCiAg ICAgKi8KICAgICBVVGltZSArPSAoQ3VtdWxhdGl2ZURheXNbaXNsZWFwKEVUaW1lLT5ZZWFyKV1b RVRpbWUtPk1vbnRoXSAqIFNFQ1NQRVJEQVkpOwogCkBAIC0xNzAsNyArMjA2LDcgQEAgZWZpX3Rp bWUoRUZJX1RJTUUgKkVUaW1lKQogICAgIAkqLwogICAgIAlVVGltZSArPSAoRVRpbWUtPlRpbWVa b25lICogNjApOwogICAgIH0KLSAgICAKKwogICAgIHJldHVybiBVVGltZTsKIH0KIApAQCAtMTk2 LDcgKzIzMiw3IEBAIEVGSV9HZXRUaW1lT2ZEYXkoCiAJLy8gIENvbnZlcnQgdG8gVU5JWCB0aW1l IChpZSBzZWNvbmRzIHNpbmNlIHRoZSBlcG9jaAogCSovCiAKLQl0cC0+dHZfc2VjICA9IGVmaV90 aW1lKCAmRWZpVGltZSApOworCXRwLT50dl9zZWMgID0gZnJvbV9lZmlfdG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Ug aGFuZGxpbmciLCBjb21tYW5kX2ZkdCk7CiAjZW5kaWYKLQotI2lmZGVmIEVGSV9aRlNfQk9PVAot c3RhdGljIHZvaWQKLWVmaV96ZnNfcHJvYmUodm9pZCkKLXsKLQlFRklfSEFORExFIGg7Ci0JdV9p bnQgdW5pdDsKLQlpbnQgaTsKLQljaGFyIGRuYW1lW1NQRUNOQU1FTEVOICsgMV07Ci0JdWludDY0 X3QgZ3VpZDsKLQotCXVuaXQgPSAwOwotCWggPSBlZmlfZmluZF9oYW5kbGUoJmVmaXBhcnRfZGV2 LCAwKTsKLQlmb3IgKGkgPSAwOyBoICE9IE5VTEw7IGggPSBlZmlfZmluZF9oYW5kbGUoJmVmaXBh cnRfZGV2LCArK2kpKSB7Ci0JCXNucHJpbnRmKGRuYW1lLCBzaXplb2YoZG5hbWUpLCAiJXMlZDoi LCBlZmlwYXJ0X2Rldi5kdl9uYW1lLCBpKTsKLQkJaWYgKHpmc19wcm9iZV9kZXYoZG5hbWUsICZn dWlkKSA9PSAwKQotCQkJKHZvaWQpZWZpX2hhbmRsZV91cGRhdGVfZGV2KGgsICZ6ZnNfZGV2LCB1 bml0KyssIGd1aWQpOwotCX0KLX0KLSNlbmRpZgo= --94eb2c058ce8fc2ff60542bb5373--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOc73CDzfzSw2SNeXiEZXR96hJxjtJHL75QzFhhRoVArGjnscA>