Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5670203imu; Mon, 26 Nov 2018 03:50:05 -0800 (PST) X-Google-Smtp-Source: AJdET5eaahq5p7jY8+SxmkyQM+D7f1rLGuV7GsnqdWcDqPp8lLARIMYRtF1Gk51TgqmfQHFy7GDP X-Received: by 2002:a62:db41:: with SMTP id f62mr28060360pfg.123.1543233005361; Mon, 26 Nov 2018 03:50:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543233005; cv=none; d=google.com; s=arc-20160816; b=zEa7NvFO6kEXgx36HhQMjMESlC7lO/7OI8GZBNIF2J8D4wV/Ztqonb9IdQdvX2RXGI 3tT//c+EdE/gf4Jo9QpPFUW7pME4Wg4oZQSXm1jV1DT9gfyMJRRCwMxjhERYDkHLvMXs yNVNW62+T/6i8d6bZ5nHGJK2nmad7EJHR4y0Gn4K+/zb9FPUIyhA/8oORnRdUND43tBI X5KC4ruluQFvXjq6K0CceAHIcq5iwK8SC23Ae4mseyr9QndWWiYGp8MXXIUgLrL1LPS8 ROS0lQ1ttabikdP/ba8FktteYmAcK+lHokd6z9mrlEI2+U9nTzGVgjmHNkAL9zzu7UMb I/mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:spamdiagnosticmetadata:spamdiagnosticoutput :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=r1Ero1ArpJYXV+3FHt+MywoO/c3TPjbSqWBfXSQHIA0=; b=S0u+W+TemvplAjOz9BCNtpSZVB/d2makDo0A8dY898N5wrpJo6KnRB+5G/oWTENZna f+A5s0N/6dvVxtIHUg7Jb8nJFcgFesBOtacPTrva0uaBf4+jLazvfOiWadrYANTQcYYF vhuLHOKFsIqFZ1p0d2sTIYyE9I4Y+YWVeSJW6ZIhNE2CtBn5jnQP8Qi9JdAIAKyPve2m SQStgABRmVQ+D+OWxFU5Ki7ZJtslxyiMQXEuY+TQvVQupCRn6rCKfdrmd28CnUMedpE0 X98iA5ORyljkxv37bdiCpjLrCRdkVDT25lqYMaptIaYukn4FrAgl6WIXViMiGYd0zE3b A6Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vmware.com header.s=selector1 header.b=rhVrKzQX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si55654pgv.512.2018.11.26.03.49.42; Mon, 26 Nov 2018 03:50:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@vmware.com header.s=selector1 header.b=rhVrKzQX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726442AbeKZWkL (ORCPT + 99 others); Mon, 26 Nov 2018 17:40:11 -0500 Received: from mail-eopbgr740070.outbound.protection.outlook.com ([40.107.74.70]:54144 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726219AbeKZWkL (ORCPT ); Mon, 26 Nov 2018 17:40:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r1Ero1ArpJYXV+3FHt+MywoO/c3TPjbSqWBfXSQHIA0=; b=rhVrKzQXLxg6iQdrfpYoXDlLCxCWRLfK6+cB4gqQXVMkkHTx3mwovnkampDRNjBpdr0gSa5GKB1bbkpkIZuIRFK1a9k9dCuL3egmtXceIXkY6rAUF6azvZBsh3rmUWsYq1+BsAioyhBbGlOOTJghUX/kg19o0fv/e3qV2/1BNt0= Received: from CY1PR05MB2780.namprd05.prod.outlook.com (10.167.18.26) by CY1PR05MB1897.namprd05.prod.outlook.com (10.162.167.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.14; Mon, 26 Nov 2018 11:46:10 +0000 Received: from CY1PR05MB2780.namprd05.prod.outlook.com ([fe80::15b6:42fc:a2fb:5a10]) by CY1PR05MB2780.namprd05.prod.outlook.com ([fe80::15b6:42fc:a2fb:5a10%8]) with mapi id 15.20.1361.019; Mon, 26 Nov 2018 11:46:10 +0000 From: Slavomir Kaslev To: Al Viro CC: syzbot , "davem@davemloft.net" , "gregkh@linuxfoundation.org" , "kgraul@linux.ibm.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "stranche@codeaurora.org" , "syzkaller-bugs@googlegroups.com" Subject: Re: WARNING in csum_and_copy_to_iter Thread-Topic: WARNING in csum_and_copy_to_iter Thread-Index: AQHUhD7qPzh66tdLZ0mFVn+6Poo4OaVfuiwAgAI2YoA= Date: Mon, 26 Nov 2018 11:46:10 +0000 Message-ID: References: <0000000000001ecaa1057b6e4489@google.com> <20181124200357.GC2217@ZenIV.linux.org.uk> <20181124211918.GA20435@box> <20181124214436.GD2217@ZenIV.linux.org.uk> <20181125015104.GE2217@ZenIV.linux.org.uk> In-Reply-To: <20181125015104.GE2217@ZenIV.linux.org.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: DM5PR2001CA0007.namprd20.prod.outlook.com (2603:10b6:4:16::17) To CY1PR05MB2780.namprd05.prod.outlook.com (2a01:111:e400:c63a::26) authentication-results: spf=none (sender IP is ) smtp.mailfrom=kaslevs@vmware.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [209.85.166.174] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR05MB1897;20:FL84MnsbWZZFCRpwNaenZ/+jVMGrYoU1/mHffMsv34MCJZEqz9+4JZf3UDgKIf8+JUu7py3GxJkKnh/cHdgCYvhU0V/F0qYjLKP1jaqROc/l77Cxqj4hrCGVLlBbbg1w+TFzlJXOPeabHtOuj+nLFMKq80t8WhoeYXKEP1tiOaE= x-ms-office365-filtering-correlation-id: ee287b3f-9045-46c1-31e6-08d65394c25b x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:CY1PR05MB1897; x-ms-traffictypediagnostic: CY1PR05MB1897: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231443)(944501410)(52105112)(10201501046)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:CY1PR05MB1897;BCL:0;PCL:0;RULEID:;SRVR:CY1PR05MB1897; x-forefront-prvs: 086831DFB4 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(39860400002)(136003)(396003)(346002)(376002)(199004)(189003)(99286004)(11346002)(55446002)(2906002)(476003)(14454004)(66066001)(61266001)(53936002)(6512007)(9686003)(61726006)(305945005)(7736002)(93886005)(86362001)(6862004)(446003)(6116002)(3846002)(316002)(486006)(68736007)(25786009)(76176011)(81156014)(6506007)(106356001)(8676002)(54906003)(102836004)(256004)(14444005)(53546011)(6486002)(81166006)(97736004)(386003)(5660300001)(105586002)(498394004)(478600001)(6246003)(33896004)(8936002)(450100002)(6436002)(52116002)(6306002)(7116003)(107886003)(26005)(71190400001)(186003)(71200400001)(966005)(4326008)(229853002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR05MB1897;H:CY1PR05MB2780.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: D4R+HaEdpjJo8w24dFK4E3J2khdbMHY05nH91oKjHwuDu3asZhHrfckQeCEF5ginqZDmzDHgqx+AHfLNxd2WJqsLKKtZjKPneMridt9MTex9A6V+omGpSJeQrA/jFI+kylCgPCMRmpijGu8cFTpymNyBYK57On6dBqESPWdtgTW3AiNCruyl5gr2QMQPajCZYSAJhOKx9aAWo0BShWw+zUNxra4xvDUam0V5mhB6HY2ovbfiG7lwWlnkYa0RkqYNE1u+1U4lqxPby6/6w8qdVHL2iHlsExBkccD3UwvNLJH+65fEK+sHtONXYi1+kQ/f5gDneNaShHOUpbdvUGOm5uRxstBg2BrWxrCfUgo7jlo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee287b3f-9045-46c1-31e6-08d65394c25b X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Nov 2018 11:46:10.3806 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB1897 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gU3VuLCBOb3YgMjUsIDIwMTggYXQgMzo1MiBBTSBBbCBWaXJvIDx2aXJ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emVfdCBieXRl cywNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX3dzdW0gKmNzdW0sIHN0cnVj dCBpb3ZfaXRlciAqaSkNCj4gK3sNCj4gKyAgICAgICBzdHJ1Y3QgcGlwZV9pbm9kZV9pbmZvICpw aXBlID0gaS0+cGlwZTsNCj4gKyAgICAgICBzaXplX3QgbiwgcjsNCj4gKyAgICAgICBzaXplX3Qg b2ZmID0gMDsNCj4gKyAgICAgICBfX3dzdW0gc3VtID0gKmNzdW07DQo+ICsgICAgICAgaW50IGlk eDsNCj4gKw0KPiArICAgICAgIGlmICghc2FuaXR5KGkpKQ0KPiArICAgICAgICAgICAgICAgcmV0 dXJuIDA7DQo+ICsNCj4gKyAgICAgICBieXRlcyA9IG4gPSBwdXNoX3BpcGUoaSwgYnl0ZXMsICZp ZHgsICZyKTsNCj4gKyAgICAgICBpZiAodW5saWtlbHkoIW4pKQ0KPiArICAgICAgICAgICAgICAg cmV0dXJuIDA7DQo+ICsgICAgICAgZm9yICggOyBuOyBpZHggPSBuZXh0X2lkeChpZHgsIHBpcGUp LCByID0gMCkgew0KPiArICAgICAgICAgICAgICAgc2l6ZV90IGNodW5rID0gbWluX3Qoc2l6ZV90 LCBuLCBQQUdFX1NJWkUgLSByKTsNCj4gKyAgICAgICAgICAgICAgIGNoYXIgKnAgPSBrbWFwX2F0 b21pYyhwaXBlLT5idWZzW2lkeF0ucGFnZSk7DQo+ICsgICAgICAgICAgICAgICBzdW0gPSBjc3Vt X2FuZF9tZW1jcHkocCArIHIsIGFkZHIsIGNodW5rLCBzdW0sIG9mZik7DQo+ICsgICAgICAgICAg ICAgICBrdW5tYXBfYXRvbWljKHApOw0KPiArICAgICAgICAgICAgICAgaS0+aWR4ID0gaWR4Ow0K PiArICAgICAgICAgICAgICAgaS0+aW92X29mZnNldCA9IHIgKyBjaHVuazsNCj4gKyAgICAgICAg ICAgICAgIG4gLT0gY2h1bms7DQo+ICsgICAgICAgICAgICAgICBvZmYgKz0gY2h1bms7DQo+ICsg ICAgICAgICAgICAgICBhZGRyICs9IGNodW5rOw0KPiArICAgICAgIH0NCj4gKyAgICAgICBpLT5j b3VudCAtPSBieXRlczsNCj4gKyAgICAgICAqY3N1bSA9IHN1bTsNCj4gKyAgICAgICByZXR1cm4g Ynl0ZXM7DQo+ICt9DQo+ICsNCj4gIHNpemVfdCBfY29weV90b19pdGVyKGNvbnN0IHZvaWQgKmFk ZHIsIHNpemVfdCBieXRlcywgc3RydWN0IGlvdl9pdGVyICppKQ0KPiAgew0KPiAgICAgICAgIGNv bnN0IGNoYXIgKmZyb20gPSBhZGRyOw0KPiBAQCAtMTM2OCwxNyArMTQwNiwxNSBAQCBzaXplX3Qg Y3N1bV9hbmRfY29weV9mcm9tX2l0ZXIodm9pZCAqYWRkciwgc2l6ZV90IGJ5dGVzLCBfX3dzdW0g KmNzdW0sDQo+ICAgICAgICAgICAgICAgICBlcnIgPyB2Lmlvdl9sZW4gOiAwOw0KPiAgICAgICAg IH0pLCAoew0KPiAgICAgICAgICAgICAgICAgY2hhciAqcCA9IGttYXBfYXRvbWljKHYuYnZfcGFn ZSk7DQo+IC0gICAgICAgICAgICAgICBuZXh0ID0gY3N1bV9wYXJ0aWFsX2NvcHlfbm9jaGVjayhw ICsgdi5idl9vZmZzZXQsDQo+IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAodG8gKz0gdi5idl9sZW4pIC0gdi5idl9sZW4sDQo+IC0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2LmJ2X2xlbiwgMCk7DQo+ICsgICAg ICAgICAgICAgICBzdW0gPSBjc3VtX2FuZF9tZW1jcHkoKHRvICs9IHYuYnZfbGVuKSAtIHYuYnZf bGVuLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgKyB2LmJ2X29m ZnNldCwgdi5idl9sZW4sDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg c3VtLCBvZmYpOw0KPiAgICAgICAgICAgICAgICAga3VubWFwX2F0b21pYyhwKTsNCj4gLSAgICAg ICAgICAgICAgIHN1bSA9IGNzdW1fYmxvY2tfYWRkKHN1bSwgbmV4dCwgb2ZmKTsNCj4gICAgICAg ICAgICAgICAgIG9mZiArPSB2LmJ2X2xlbjsNCj4gICAgICAgICB9KSwoew0KPiAtICAgICAgICAg ICAgICAgbmV4dCA9IGNzdW1fcGFydGlhbF9jb3B5X25vY2hlY2sodi5pb3ZfYmFzZSwNCj4gLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0byArPSB2Lmlv dl9sZW4pIC0gdi5pb3ZfbGVuLA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgdi5pb3ZfbGVuLCAwKTsNCj4gLSAgICAgICAgICAgICAgIHN1bSA9IGNz dW1fYmxvY2tfYWRkKHN1bSwgbmV4dCwgb2ZmKTsNCj4gKyAgICAgICAgICAgICAgIHN1bSA9IGNz dW1fYW5kX21lbWNweSgodG8gKz0gdi5pb3ZfbGVuKSAtIHYuaW92X2xlbiwNCj4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2Lmlvdl9iYXNlLCB2Lmlvdl9sZW4sDQo+ICsg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VtLCBvZmYpOw0KPiAgICAgICAg ICAgICAgICAgb2ZmICs9IHYuaW92X2xlbjsNCj4gICAgICAgICB9KQ0KPiAgICAgICAgICkNCj4g QEAgLTE0MTIsMTcgKzE0NDgsMTUgQEAgYm9vbCBjc3VtX2FuZF9jb3B5X2Zyb21faXRlcl9mdWxs KHZvaWQgKmFkZHIsIHNpemVfdCBieXRlcywgX193c3VtICpjc3VtLA0KPiAgICAgICAgICAgICAg ICAgMDsNCj4gICAgICAgICB9KSwgKHsNCj4gICAgICAgICAgICAgICAgIGNoYXIgKnAgPSBrbWFw X2F0b21pYyh2LmJ2X3BhZ2UpOw0KPiAtICAgICAgICAgICAgICAgbmV4dCA9IGNzdW1fcGFydGlh bF9jb3B5X25vY2hlY2socCArIHYuYnZfb2Zmc2V0LA0KPiAtICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRvICs9IHYuYnZfbGVuKSAtIHYuYnZfbGVuLA0K PiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdi5idl9s ZW4sIDApOw0KPiArICAgICAgICAgICAgICAgc3VtID0gY3N1bV9hbmRfbWVtY3B5KCh0byArPSB2 LmJ2X2xlbikgLSB2LmJ2X2xlbiwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBwICsgdi5idl9vZmZzZXQsIHYuYnZfbGVuLA0KPiArICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHN1bSwgb2ZmKTsNCj4gICAgICAgICAgICAgICAgIGt1bm1hcF9hdG9t aWMocCk7DQo+IC0gICAgICAgICAgICAgICBzdW0gPSBjc3VtX2Jsb2NrX2FkZChzdW0sIG5leHQs IG9mZik7DQo+ICAgICAgICAgICAgICAgICBvZmYgKz0gdi5idl9sZW47DQo+ICAgICAgICAgfSks KHsNCj4gLSAgICAgICAgICAgICAgIG5leHQgPSBjc3VtX3BhcnRpYWxfY29weV9ub2NoZWNrKHYu aW92X2Jhc2UsDQo+IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAodG8gKz0gdi5pb3ZfbGVuKSAtIHYuaW92X2xlbiwNCj4gLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYuaW92X2xlbiwgMCk7DQo+IC0gICAgICAg ICAgICAgICBzdW0gPSBjc3VtX2Jsb2NrX2FkZChzdW0sIG5leHQsIG9mZik7DQo+ICsgICAgICAg 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ywxNSBAQCBzaXplX3QgY3N1bV9hbmRfY29weV90 b19pdGVyKGNvbnN0IHZvaWQgKmFkZHIsIHNpemVfdCBieXRlcywgX193c3VtICpjc3VtLA0KPiAg ICAgICAgICAgICAgICAgZXJyID8gdi5pb3ZfbGVuIDogMDsNCj4gICAgICAgICB9KSwgKHsNCj4g ICAgICAgICAgICAgICAgIGNoYXIgKnAgPSBrbWFwX2F0b21pYyh2LmJ2X3BhZ2UpOw0KPiAtICAg ICAgICAgICAgICAgbmV4dCA9IGNzdW1fcGFydGlhbF9jb3B5X25vY2hlY2soKGZyb20gKz0gdi5i dl9sZW4pIC0gdi5idl9sZW4sDQo+IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBwICsgdi5idl9vZmZzZXQsDQo+IC0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB2LmJ2X2xlbiwgMCk7DQo+ICsgICAgICAgICAgICAg ICBzdW0gPSBjc3VtX2FuZF9tZW1jcHkocCArIHYuYnZfb2Zmc2V0LA0KPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChmcm9tICs9IHYuYnZfbGVuKSAtIHYuYnZfbGVuLA0K PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYuYnZfbGVuLCBzdW0sIG9m Zik7DQo+ICAgICAgICAgICAgICAgICBrdW5tYXBfYXRvbWljKHApOw0KPiAtICAgICAgICAgICAg ICAgc3VtID0gY3N1bV9ibG9ja19hZGQoc3VtLCBuZXh0LCBvZmYpOw0KPiAgICAgICAgICAgICAg ICAgb2ZmICs9IHYuYnZfbGVuOw0KPiAgICAgICAgIH0pLCh7DQo+IC0gICAgICAgICAgICAgICBu ZXh0ID0gY3N1bV9wYXJ0aWFsX2NvcHlfbm9jaGVjaygoZnJvbSArPSB2Lmlvdl9sZW4pIC0gdi5p b3ZfbGVuLA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdi5pb3ZfYmFzZSwNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHYuaW92X2xlbiwgMCk7DQo+IC0gICAgICAgICAgICAgICBzdW0gPSBjc3VtX2Js b2NrX2FkZChzdW0sIG5leHQsIG9mZik7DQo+ICsgICAgICAgICAgICAgICBzdW0gPSBjc3VtX2Fu ZF9tZW1jcHkodi5pb3ZfYmFzZSwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChmcm9tICs9IHYuaW92X2xlbikgLSB2Lmlvdl9sZW4sDQo+ICsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICB2Lmlvdl9sZW4sIHN1bSwgb2ZmKTsNCj4gICAgICAgICAgICAg ICAgIG9mZiArPSB2Lmlvdl9sZW47DQo+ICAgICAgICAgfSkNCj4gICAgICAgICApDQo=