From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0ED417E450; Wed, 12 Jun 2024 14:29:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718202582; cv=none; b=MEwPYO5OSSFgDiWkS/ovvMc+KD3YPrQ9NCbTF5VQWGx7I7+H5myGWp2hBgXRC4u+VwmvoyWiukEkPLnIZ5jZSO0wZT+8fdCITl/MEBYrfdTwmZYnhi4wG2NvnqjBkh8LXfBnvYUPvyorsnj5MjvgeMZaI10R5cxGMVs188dHo1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718202582; c=relaxed/simple; bh=dgml0ADbrV9WTWvO7Dtquj/bqGpww43ynhzczcx1clk=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=G856iwPk/jrHvJxRzF+UzzfKmwxLOuL93qqhRAU5m91q2wlmILWmrd3SiwB9QgDDRX5yqaHSUVIDuvUBB6r9OozBE24EdtAHYx7HxTk7CGzuPo/luCnOcV62BiqF6aUaBMzPdZbNCZo/rImBUf8J895XXV0qj9IPyNSc4p2lED8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OYieAb3t; arc=none smtp.client-ip=209.85.128.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OYieAb3t" Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-63097363e63so1552707b3.3; Wed, 12 Jun 2024 07:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718202580; x=1718807380; darn=vger.kernel.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=r5vuFFO246jgRpb50c9zauBeHzQywoFZlu2XY2Bvdzw=; b=OYieAb3tcNYAzcS1E0lcSyawNa7PBTYoPDxOCBMcpELA0ZCnuxRyxJzt4VVxpIDCio +Z8bJvvnqxSn0K7yGZFYNqfRBq9Fwy07U8pH6ClGMywqFdhE6lFeShPs3GLihkzhv0cw BRDmfVk56lE65YOO9Qenq6JTXPFQ0pGT/uW+h+7cm7C/F1NPKyI+PeJaTyAhDTFuM4F/ TwssB1WhC09OGdAo55RWmIJ8Bb0rep4kmMm01ncoxJ5+NmDa/Lc62TQtxwNvI3EkpcD9 atO1J5Zs//JK31KeGcdfjxFigwONd+mxJRmpt0S0JXjmvKDzElxTH71nr80J8R0qA4xg gmCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718202580; x=1718807380; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=r5vuFFO246jgRpb50c9zauBeHzQywoFZlu2XY2Bvdzw=; b=Ip980M6gpHGC0pvwKwG8DprroOqdMtIIDokV80XMtIxrjaTv642C3bl14iG3urFhJd F70e63Xj7N+RK6jQMCtN5UdBtuZh0ptiXIknq1MCk7cfP6wK9myvauSivM3t6WVmAd38 s+l2lz+OIER/MZ8ax++Qwe7IISppO8UxCwUc6bxb/tPiHfc84U6Kw36aw4QiWXxHv2Y1 Bubchl26q9TgmoJjpIb5vtZeDoOKs8ddEyWQx1G+DXTSQhXFoXsjZTrxCEJSnvTDT3Xs Ir0HGkVyBGf9zbKEIETZX/o+2cBYFkL9vt+jUcXMiefWzQksmkhEzNzcNYVdl4EiW9TE i5xA== X-Forwarded-Encrypted: i=1; AJvYcCXqHedWm6UsA2PGcoU5ydamzA1b9WYi0WpV88vgQY4me6hejhGZf+ec7C494F3mnLTE43yofQAswFLl+EUHF79Qa14c5P2N4KCVmGy8JNOl66522W9TfsFsQESN0ztKIzdsCm4FXnc= X-Gm-Message-State: AOJu0Yy6CZG5V9hxmlRyqGmpTTWix1WspXeMSXQInKfB9wYfnu5Z8DUl undu28P4T9QwnRb6tTg1e7h3KoKC9Axy1pAm60NZlWp1qCJp50su8Ek2gDg3OGIK6vkH9lCWT9s 79ZIP2ekCC+DYPiWmmduBrIIAcb7wRjtXKWk= X-Google-Smtp-Source: AGHT+IEpHslh5S7XDOQt+hsxTeqiigA5xIs6zsrIZkEoGk+2A/kBcAiyTUp0pePJtc2R5YpwglCFX4+LsHzkp4OBU+Q= X-Received: by 2002:a81:6d57:0:b0:630:8fe1:b626 with SMTP id 00721157ae682-6308fe1b76bmr3755307b3.48.1718202579768; Wed, 12 Jun 2024 07:29:39 -0700 (PDT) Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: chase xd Date: Wed, 12 Jun 2024 16:29:29 +0200 Message-ID: Subject: [io-uring] WARNING in io_issue_sqe To: Jens Axboe , Pavel Begunkov , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: multipart/mixed; boundary="0000000000006b9fa6061ab23604" --0000000000006b9fa6061ab23604 Content-Type: text/plain; charset="UTF-8" Hi, Syzkaller hits a new bug in branch 6.10.0-rc1-00004-gff802a9f35cf-dirty #7. Note: this is also not a reliable repro, might need to try more times ``` [ 153.857557][T21250] apt-get (21250) used greatest stack depth: 22240 bytes left [ 249.711259][T57846] ------------[ cut here ]------------ [ 249.711626][T57846] WARNING: CPU: 1 PID: 57846 at io_uring/refs.h:38 io_issue_sqe+0x10dc/0x1720 [ 249.712188][T57846] Modules linked in: [ 249.712431][T57846] CPU: 1 PID: 57846 Comm: iou-wrk-57845 Not tainted 6.10.0-rc1-00004-gff802a9f35cf-dirty #7 [ 249.713020][T57846] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 [ 249.713566][T57846] RIP: 0010:io_issue_sqe+0x10dc/0x1720 [ 249.713894][T57846] Code: fc ff df 4c 89 e2 48 c1 ea 03 80 3c 02 00 0f 85 c6 05 00 00 49 89 1c 24 49f [ 249.715023][T57846] RSP: 0018:ffffc9000e84fc00 EFLAGS: 00010293 [ 249.715389][T57846] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff84139c3c [ 249.715855][T57846] RDX: ffff88801eaad640 RSI: ffffffff8413a70b RDI: 0000000000000007 [ 249.716300][T57846] RBP: ffffc9000e84fc80 R08: 0000000000000007 R09: 0000000000000000 [ 249.716676][T57846] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880001c3a00 [ 249.717042][T57846] R13: 0000000000000000 R14: ffff888010600040 R15: ffff8880001c3a48 [ 249.717428][T57846] FS: 00007f58ce931800(0000) GS:ffff88807ec00000(0000) knlGS:0000000000000000 [ 249.717837][T57846] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 249.718135][T57846] CR2: 00007f58ce932128 CR3: 000000001b08a000 CR4: 00000000000006f0 [ 249.718497][T57846] Call Trace: [ 249.718668][T57846] [ 249.718810][T57846] ? __warn+0xc7/0x2f0 [ 249.719003][T57846] ? io_issue_sqe+0x10dc/0x1720 [ 249.719233][T57846] ? report_bug+0x347/0x410 [ 249.719451][T57846] ? handle_bug+0x3d/0x80 [ 249.719654][T57846] ? exc_invalid_op+0x18/0x50 [ 249.719872][T57846] ? asm_exc_invalid_op+0x1a/0x20 [ 249.720127][T57846] ? io_issue_sqe+0x60c/0x1720 [ 249.720420][T57846] ? io_issue_sqe+0x10db/0x1720 [ 249.720711][T57846] ? io_issue_sqe+0x10dc/0x1720 [ 249.721012][T57846] ? __fget_files+0x1bc/0x3d0 [ 249.722194][T57846] ? io_wq_submit_work+0x264/0xcb0 [ 249.722521][T57846] io_wq_submit_work+0x264/0xcb0 [ 249.722826][T57846] io_worker_handle_work+0x97e/0x1790 [ 249.723159][T57846] io_wq_worker+0x38e/0xe50 [ 249.723435][T57846] ? __pfx_io_wq_worker+0x10/0x10 [ 249.723687][T57846] ? ret_from_fork+0x16/0x70 [ 249.723907][T57846] ? __pfx_lock_release+0x10/0x10 [ 249.724139][T57846] ? do_raw_spin_lock+0x12c/0x2b0 [ 249.724392][T57846] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 249.724706][T57846] ? __pfx_io_wq_worker+0x10/0x10 [ 249.725015][T57846] ret_from_fork+0x2f/0x70 [ 249.725300][T57846] ? __pfx_io_wq_worker+0x10/0x10 [ 249.725603][T57846] ret_from_fork_asm+0x1a/0x30 [ 249.725897][T57846] [ 249.726083][T57846] Kernel panic - not syncing: kernel: panic_on_warn set ... [ 249.726521][T57846] CPU: 1 PID: 57846 Comm: iou-wrk-57845 Not tainted 6.10.0-rc1-00004-gff802a9f35cf-dirty #7 [ 249.727110][T57846] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 [ 249.727647][T57846] Call Trace: [ 249.727842][T57846] [ 249.728018][T57846] panic+0x4fa/0x5a0 [ 249.728252][T57846] ? __pfx_panic+0x10/0x10 [ 249.728516][T57846] ? show_trace_log_lvl+0x284/0x390 [ 249.728832][T57846] ? io_issue_sqe+0x10dc/0x1720 [ 249.729120][T57846] check_panic_on_warn+0x61/0x80 [ 249.729416][T57846] __warn+0xd3/0x2f0 [ 249.729650][T57846] ? io_issue_sqe+0x10dc/0x1720 [ 249.729941][T57846] report_bug+0x347/0x410 [ 249.730206][T57846] handle_bug+0x3d/0x80 [ 249.730460][T57846] exc_invalid_op+0x18/0x50 [ 249.730730][T57846] asm_exc_invalid_op+0x1a/0x20 [ 249.731031][T57846] RIP: 0010:io_issue_sqe+0x10dc/0x1720 [ 249.731365][T57846] Code: fc ff df 4c 89 e2 48 c1 ea 03 80 3c 02 00 0f 85 c6 05 00 00 49 89 1c 24 49f [ 249.732508][T57846] RSP: 0018:ffffc9000e84fc00 EFLAGS: 00010293 [ 249.732873][T57846] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff84139c3c [ 249.733351][T57846] RDX: ffff88801eaad640 RSI: ffffffff8413a70b RDI: 0000000000000007 [ 249.733822][T57846] RBP: ffffc9000e84fc80 R08: 0000000000000007 R09: 0000000000000000 [ 249.734285][T57846] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880001c3a00 [ 249.734757][T57846] R13: 0000000000000000 R14: ffff888010600040 R15: ffff8880001c3a48 [ 249.735236][T57846] ? io_issue_sqe+0x60c/0x1720 [ 249.735529][T57846] ? io_issue_sqe+0x10db/0x1720 [ 249.735825][T57846] ? __fget_files+0x1bc/0x3d0 [ 249.736116][T57846] ? io_wq_submit_work+0x264/0xcb0 [ 249.736428][T57846] io_wq_submit_work+0x264/0xcb0 [ 249.736731][T57846] io_worker_handle_work+0x97e/0x1790 [ 249.737061][T57846] io_wq_worker+0x38e/0xe50 [ 249.737353][T57846] ? __pfx_io_wq_worker+0x10/0x10 [ 249.737646][T57846] ? ret_from_fork+0x16/0x70 [ 249.737861][T57846] ? __pfx_lock_release+0x10/0x10 [ 249.738091][T57846] ? do_raw_spin_lock+0x12c/0x2b0 [ 249.738398][T57846] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 249.738729][T57846] ? __pfx_io_wq_worker+0x10/0x10 [ 249.739033][T57846] ret_from_fork+0x2f/0x70 [ 249.739308][T57846] ? __pfx_io_wq_worker+0x10/0x10 [ 249.739617][T57846] ret_from_fork_asm+0x1a/0x30 [ 249.739913][T57846] [ 249.740236][T57846] Kernel Offset: disabled [ 249.740518][T57846] Rebooting in 86400 seconds.. ``` crepro is in attachments. Regards --0000000000006b9fa6061ab23604 Content-Type: application/octet-stream; name="repro.c" Content-Disposition: attachment; filename="repro.c" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lxbxd0ij0 Ly8gYXV0b2dlbmVyYXRlZCBieSBzeXprYWxsZXIgKGh0dHBzOi8vZ2l0aHViLmNvbS9nb29nbGUv c3l6a2FsbGVyKQoKI2RlZmluZSBfR05VX1NPVVJDRQoKI2luY2x1ZGUgPGRpcmVudC5oPgojaW5j bHVkZSA8ZW5kaWFuLmg+CiNpbmNsdWRlIDxlcnJuby5oPgojaW5jbHVkZSA8ZmNudGwuaD4KI2lu Y2x1ZGUgPHNldGptcC5oPgojaW5jbHVkZSA8c2lnbmFsLmg+CiNpbmNsdWRlIDxzdGRhcmcuaD4K I2luY2x1ZGUgPHN0ZGJvb2wuaD4KI2luY2x1ZGUgPHN0ZGludC5oPgojaW5jbHVkZSA8c3RkaW8u aD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RyaW5nLmg+CiNpbmNsdWRlIDxzeXMv bW1hbi5oPgojaW5jbHVkZSA8c3lzL3ByY3RsLmg+CiNpbmNsdWRlIDxzeXMvc3RhdC5oPgojaW5j bHVkZSA8c3lzL3N5c2NhbGwuaD4KI2luY2x1ZGUgPHN5cy90eXBlcy5oPgojaW5jbHVkZSA8c3lz L3dhaXQuaD4KI2luY2x1ZGUgPHRpbWUuaD4KI2luY2x1ZGUgPHVuaXN0ZC5oPgoKI2lmbmRlZiBf X05SX2lvX3VyaW5nX2VudGVyCiNkZWZpbmUgX19OUl9pb191cmluZ19lbnRlciA0MjYKI2VuZGlm CiNpZm5kZWYgX19OUl9pb191cmluZ19yZWdpc3RlcgojZGVmaW5lIF9fTlJfaW9fdXJpbmdfcmVn aXN0ZXIgNDI3CiNlbmRpZgojaWZuZGVmIF9fTlJfaW9fdXJpbmdfc2V0dXAKI2RlZmluZSBfX05S X2lvX3VyaW5nX3NldHVwIDQyNQojZW5kaWYKCnN0YXRpYyBfX3RocmVhZCBpbnQ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bmRsZXI7CiAgc2Euc2FfZmxhZ3MgPSBTQV9OT0RFRkVSIHwgU0FfU0lHSU5GTzsK ICBzaWdhY3Rpb24oU0lHU0VHViwgJnNhLCBOVUxMKTsKICBzaWdhY3Rpb24oU0lHQlVTLCAmc2Es IE5VTEwpOwp9CgojZGVmaW5lIE5PTkZBSUxJTkcoLi4uKSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICh7ICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg XAogICAgaW50IG9rID0gMTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgX19hdG9taWNfZmV0Y2hfYWRkKCZza2lwX3Nl Z3YsIDEsIF9fQVRPTUlDX1NFUV9DU1QpOyAgICAgICAgICAgICAgICAgICAgICAgXAogICAgaWYg KF9zZXRqbXAoc2Vndl9lbnYpID09IDApIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgXAogICAgICBfX1ZBX0FSR1NfXzsgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgfSBlbHNlICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgXAogICAgICBvayA9IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgX19hdG9taWNfZmV0Y2hfc3ViKCZz a2lwX3NlZ3YsIDEsIF9fQVRPTUlDX1NFUV9DU1QpOyAgICAgICAgICAgICAgICAgICAgICAgXAog ICAgb2s7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAg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GF0aWMg dm9pZCBraWxsX2FuZF93YWl0KGludCBwaWQsIGludCogc3RhdHVzKQp7CiAga2lsbCgtcGlkLCBT SUdLSUxMKTsKICBraWxsKHBpZCwgU0lHS0lMTCk7CiAgZm9yIChpbnQgaSA9IDA7IGkgPCAxMDA7 IGkrKykgewogICAgaWYgKHdhaXRwaWQoLTEsIHN0YXR1cywgV05PSEFORyB8IF9fV0FMTCkgPT0g cGlkKQogICAgICByZXR1cm47CiAgICB1c2xlZXAoMTAwMCk7CiAgfQogIERJUiogZGlyID0gb3Bl bmRpcigiL3N5cy9mcy9mdXNlL2Nvbm5lY3Rpb25zIik7CiAgaWYgKGRpcikgewogICAgZm9yICg7 OykgewogICAgICBzdHJ1Y3QgZGlyZW50KiBlbnQgPSByZWFkZGlyKGRpcik7CiAgICAgIGlmICgh ZW50KQogICAgICAgIGJyZWFrOwogICAgICBpZiAoc3RyY21wKGVudC0+ZF9uYW1lLCAiLiIpID09 IDAgfHwgc3RyY21wKGVudC0+ZF9uYW1lLCAiLi4iKSA9PSAwKQogICAgICAgIGNvbnRpbnVlOwog ICAgICBjaGFyIGFib3J0WzMwMF07CiAgICAgIHNucHJpbnRmKGFib3J0LCBzaXplb2YoYWJvcnQp LCAiL3N5cy9mcy9mdXNlL2Nvbm5lY3Rpb25zLyVzL2Fib3J0IiwKICAgICAgICAgICAgICAgZW50 LT5kX25hbWUpOwogICAgICBpbnQgZmQgPSBvcGVuKGFib3J0LCBPX1dST05MWSk7CiAgICAgIGlm IChmZCA9PSAtMSkgewogICAgICAgIGNvbnRpbnVlOwogICAgICB9CiAgICAgIGlmICh3cml0ZShm ZCwgYWJvcnQsIDEpIDwgMCkgewogICAgICB9CiAgICAgIGNsb3NlKGZkKTsKICAgIH0KICAgIGNs b3NlZGlyKGRpcik7CiAgfSBlbHNlIHsKICB9CiAgd2hpbGUgKHdhaXRwaWQoLTEsIHN0YXR1cywg X19XQUxMKSAhPSBwaWQpIHsKICB9Cn0KCnN0YXRpYyB2b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MDEgPSAw KTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDI5MDIgPSAwKTsKICBOT05GQUlMSU5H KG1lbXNldCgodm9pZCopMHgyMDAwMjkwNCwgMCwgMTIpKTsKICBOT05GQUlMSU5HKCoodWludDhf dCopMHgyMDAwMjkxMCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOTExID0g MCk7CiAgTk9ORkFJTElORygqKHVpbnQxNl90KikweDIwMDAyOTEyID0gMCk7CiAgTk9ORkFJTElO RygqKHVpbnQzMl90KikweDIwMDAyOTE0ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4 MjAwMDI5MTggPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjkxOSA9IDApOwog IE5PTkZBSUxJTkcoKih1aW50MTZfdCopMHgyMDAwMjkxYSA9IDApOwogIE5PTkZBSUxJTkcoKih1 aW50MzJfdCopMHgyMDAwMjkxYyA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAy OTIwID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5MjEgPSAwKTsKICBOT05G QUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDI5MjIgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDMy X3QqKTB4MjAwMDI5MjQgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjkyOCA9 IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOTI5ID0gMCk7CiAgTk9ORkFJTElO RygqKHVpbnQxNl90KikweDIwMDAyOTJhID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQzMl90Kikw eDIwMDAyOTJjID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5MzAgPSAwKTsK ICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjkzMSA9IDApOwogIE5PTkZBSUxJTkcoKih1 aW50MTZfdCopMHgyMDAwMjkzMiA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MzJfdCopMHgyMDAw MjkzNCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOTM4ID0gMCk7CiAgTk9O RkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5MzkgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDE2 X3QqKTB4MjAwMDI5M2EgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDMyX3QqKTB4MjAwMDI5M2Mg PSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjk0MCA9IDApOwogIE5PTkZBSUxJ TkcoKih1aW50OF90KikweDIwMDAyOTQxID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQxNl90Kikw eDIwMDAyOTQyID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQzMl90KikweDIwMDAyOTQ0ID0gMCk7 CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5NDggPSAwKTsKICBOT05GQUlMSU5HKCoo dWludDhfdCopMHgyMDAwMjk0OSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MTZfdCopMHgyMDAw Mjk0YSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MzJfdCopMHgyMDAwMjk0YyA9IDApOwogIE5P TkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOTUwID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4 X3QqKTB4MjAwMDI5NTEgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDI5NTIg PSAwKTsKICBOT05GQUlMSU5HKCoodWludDMyX3QqKTB4MjAwMDI5NTQgPSAwKTsKICBOT05GQUlM SU5HKCoodWludDhfdCopMHgyMDAwMjk1OCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90Kikw eDIwMDAyOTU5ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQxNl90KikweDIwMDAyOTVhID0gMCk7 CiAgTk9ORkFJTElORygqKHVpbnQzMl90KikweDIwMDAyOTVjID0gMCk7CiAgTk9ORkFJTElORygq KHVpbnQ4X3QqKTB4MjAwMDI5NjAgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAw Mjk2MSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MTZfdCopMHgyMDAwMjk2MiA9IDApOwogIE5P TkZBSUxJTkcoKih1aW50MzJfdCopMHgyMDAwMjk2NCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50 OF90KikweDIwMDAyOTY4ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5Njkg PSAwKTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDI5NmEgPSAwKTsKICBOT05GQUlM SU5HKCoodWludDMyX3QqKTB4MjAwMDI5NmMgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCop MHgyMDAwMjk3MCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOTcxID0gMCk7 CiAgTk9ORkFJTElORygqKHVpbnQxNl90KikweDIwMDAyOTcyID0gMCk7CiAgTk9ORkFJTElORygq KHVpbnQzMl90KikweDIwMDAyOTc0ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAw MDI5NzggPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjk3OSA9IDApOwogIE5P TkZBSUxJTkcoKih1aW50MTZfdCopMHgyMDAwMjk3YSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50 MzJfdCopMHgyMDAwMjk3YyA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOTgw ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5ODEgPSAwKTsKICBOT05GQUlM SU5HKCoodWludDE2X3QqKTB4MjAwMDI5ODIgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDMyX3Qq KTB4MjAwMDI5ODQgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjk4OCA9IDAp OwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOTg5ID0gMCk7CiAgTk9ORkFJTElORygq KHVpbnQxNl90KikweDIwMDAyOThhID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQzMl90KikweDIw MDAyOThjID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5OTAgPSAwKTsKICBO T05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjk5MSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50 MTZfdCopMHgyMDAwMjk5MiA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MzJfdCopMHgyMDAwMjk5 NCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOTk4ID0gMCk7CiAgTk9ORkFJ TElORygqKHVpbnQ4X3QqKTB4MjAwMDI5OTkgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDE2X3Qq KTB4MjAwMDI5OWEgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDMyX3QqKTB4MjAwMDI5OWMgPSAw KTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjlhMCA9IDApOwogIE5PTkZBSUxJTkco Kih1aW50OF90KikweDIwMDAyOWExID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQxNl90KikweDIw MDAyOWEyID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQzMl90KikweDIwMDAyOWE0ID0gMCk7CiAg Tk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5YTggPSAwKTsKICBOT05GQUlMSU5HKCoodWlu dDhfdCopMHgyMDAwMjlhOSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MTZfdCopMHgyMDAwMjlh YSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MzJfdCopMHgyMDAwMjlhYyA9IDApOwogIE5PTkZB SUxJTkcoKih1aW50OF90KikweDIwMDAyOWIwID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3Qq KTB4MjAwMDI5YjEgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDI5YjIgPSAw KTsKICBOT05GQUlMSU5HKCoodWludDMyX3QqKTB4MjAwMDI5YjQgPSAwKTsKICBOT05GQUlMSU5H KCoodWludDhfdCopMHgyMDAwMjliOCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIw MDAyOWI5ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQxNl90KikweDIwMDAyOWJhID0gMCk7CiAg Tk9ORkFJTElORygqKHVpbnQzMl90KikweDIwMDAyOWJjID0gMCk7CiAgTk9ORkFJTElORygqKHVp bnQ4X3QqKTB4MjAwMDI5YzAgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjlj MSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MTZfdCopMHgyMDAwMjljMiA9IDApOwogIE5PTkZB SUxJTkcoKih1aW50MzJfdCopMHgyMDAwMjljNCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90 KikweDIwMDAyOWM4ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5YzkgPSAw KTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDI5Y2EgPSAwKTsKICBOT05GQUlMSU5H KCoodWludDMyX3QqKTB4MjAwMDI5Y2MgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgy MDAwMjlkMCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOWQxID0gMCk7CiAg Tk9ORkFJTElORygqKHVpbnQxNl90KikweDIwMDAyOWQyID0gMCk7CiAgTk9ORkFJTElORygqKHVp bnQzMl90KikweDIwMDAyOWQ0ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5 ZDggPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjlkOSA9IDApOwogIE5PTkZB SUxJTkcoKih1aW50MTZfdCopMHgyMDAwMjlkYSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MzJf dCopMHgyMDAwMjlkYyA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOWUwID0g MCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5ZTEgPSAwKTsKICBOT05GQUlMSU5H KCoodWludDE2X3QqKTB4MjAwMDI5ZTIgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDMyX3QqKTB4 MjAwMDI5ZTQgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMjllOCA9IDApOwog IE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOWU5ID0gMCk7CiAgTk9ORkFJTElORygqKHVp bnQxNl90KikweDIwMDAyOWVhID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQzMl90KikweDIwMDAy OWVjID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDI5ZjAgPSAwKTsKICBOT05G QUlMSU5HKCoodWludDhfdCopMHgyMDAwMjlmMSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MTZf dCopMHgyMDAwMjlmMiA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MzJfdCopMHgyMDAwMjlmNCA9 IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyOWY4ID0gMCk7CiAgTk9ORkFJTElO RygqKHVpbnQ4X3QqKTB4MjAwMDI5ZjkgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4 MjAwMDI5ZmEgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDMyX3QqKTB4MjAwMDI5ZmMgPSAwKTsK ICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMmEwMCA9IDApOwogIE5PTkZBSUxJTkcoKih1 aW50OF90KikweDIwMDAyYTAxID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQxNl90KikweDIwMDAy YTAyID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQzMl90KikweDIwMDAyYTA0ID0gMCk7CiAgTk9O RkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDJhMDggPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhf dCopMHgyMDAwMmEwOSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MTZfdCopMHgyMDAwMmEwYSA9 IDApOwogIE5PTkZBSUxJTkcoKih1aW50MzJfdCopMHgyMDAwMmEwYyA9IDApOwogIE5PTkZBSUxJ TkcoKih1aW50OF90KikweDIwMDAyYTEwID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4 MjAwMDJhMTEgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDJhMTIgPSAwKTsK ICBOT05GQUlMSU5HKCoodWludDMyX3QqKTB4MjAwMDJhMTQgPSAwKTsKICBOT05GQUlMSU5HKCoo dWludDhfdCopMHgyMDAwMmExOCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAy YTE5ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQxNl90KikweDIwMDAyYTFhID0gMCk7CiAgTk9O RkFJTElORygqKHVpbnQzMl90KikweDIwMDAyYTFjID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4 X3QqKTB4MjAwMDJhMjAgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMmEyMSA9 IDApOwogIE5PTkZBSUxJTkcoKih1aW50MTZfdCopMHgyMDAwMmEyMiA9IDApOwogIE5PTkZBSUxJ TkcoKih1aW50MzJfdCopMHgyMDAwMmEyNCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90Kikw eDIwMDAyYTI4ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDJhMjkgPSAwKTsK ICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDJhMmEgPSAwKTsKICBOT05GQUlMSU5HKCoo dWludDMyX3QqKTB4MjAwMDJhMmMgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAw MmEzMCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyYTMxID0gMCk7CiAgTk9O RkFJTElORygqKHVpbnQxNl90KikweDIwMDAyYTMyID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQz Ml90KikweDIwMDAyYTM0ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDJhMzgg PSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMmEzOSA9IDApOwogIE5PTkZBSUxJ TkcoKih1aW50MTZfdCopMHgyMDAwMmEzYSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MzJfdCop MHgyMDAwMmEzYyA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyYTQwID0gMCk7 CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDJhNDEgPSAwKTsKICBOT05GQUlMSU5HKCoo dWludDE2X3QqKTB4MjAwMDJhNDIgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDMyX3QqKTB4MjAw MDJhNDQgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMmE0OCA9IDApOwogIE5P TkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyYTQ5ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQx Nl90KikweDIwMDAyYTRhID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQzMl90KikweDIwMDAyYTRj ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDJhNTAgPSAwKTsKICBOT05GQUlM SU5HKCoodWludDhfdCopMHgyMDAwMmE1MSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MTZfdCop MHgyMDAwMmE1MiA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MzJfdCopMHgyMDAwMmE1NCA9IDAp OwogIE5PTkZBSUxJTkcoKih1aW50OF90KikweDIwMDAyYTU4ID0gMCk7CiAgTk9ORkFJTElORygq KHVpbnQ4X3QqKTB4MjAwMDJhNTkgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAw MDJhNWEgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDMyX3QqKTB4MjAwMDJhNWMgPSAwKTsKICBO T05GQUlMSU5HKCoodWludDhfdCopMHgyMDAwMmE2MCA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50 OF90KikweDIwMDAyYTYxID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQxNl90KikweDIwMDAyYTYy ID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQzMl90KikweDIwMDAyYTY0ID0gMCk7CiAgTk9ORkFJ TElORygqKHVpbnQ4X3QqKTB4MjAwMDJhNjggPSAwKTsKICBOT05GQUlMSU5HKCoodWludDhfdCop MHgyMDAwMmE2OSA9IDApOwogIE5PTkZBSUxJTkcoKih1aW50MTZfdCopMHgyMDAwMmE2YSA9IDAp OwogIE5PTkZBSUxJTkcoKih1aW50MzJfdCopMHgyMDAwMmE2YyA9IDApOwogIE5PTkZBSUxJTkco Kih1aW50OF90KikweDIwMDAyYTcwID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAw MDJhNzEgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDJhNzIgPSAwKTsKICBO T05GQUlMSU5HKCoodWludDMyX3QqKTB4MjAwMDJhNzQgPSAwKTsKICBOT05GQUlMSU5HKCoodWlu dDhfdCopMHgyMDAw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7CiAgTk9ORkFJ TElORygqKHVpbnQzMl90KikweDIwMDAxNjljID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQ2NF90 KikweDIwMDAxNmEwID0gMCk7CiAgTk9ORkFJTElORygqKHVpbnQxNl90KikweDIwMDAxNmE4ID0g MCk7CiAgTk9ORkFJTElORygqKHVpbnQxNl90KikweDIwMDAxNmFhID0gMCk7CiAgTk9ORkFJTElO RyhtZW1zZXQoKHZvaWQqKTB4MjAwMDE2YWMsIDAsIDQpKTsKICBOT05GQUlMSU5HKG1lbXNldCgo dm9pZCopMHgyMDAwMTZiMCwgMCwgMTYpKTsKICBOT05GQUlMSU5HKHN5el9pb191cmluZ19zdWJt aXQoLypyaW5nX3B0cj0qL3JbMV0sIC8qc3Flc19wdHI9Ki9yWzJdLAogICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAvKnNxZT0qLzB4MjAwMDE2ODApKTsKICBOT05GQUlMSU5HKCoodWlu dDhfdCopMHgyMDAwMmE4MCA9IDB4ZSk7CiAgTk9ORkFJTElORygqKHVpbnQ4X3QqKTB4MjAwMDJh ODEgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDJhODIgPSAwKTsKICBOT05G QUlMSU5HKCoodWludDMyX3QqKTB4MjAwMDJhODQgPSAwKTsKICBOT05GQUlMSU5HKCoodWludDY0 X3QqKTB4MjAwMDJhODggPSAwKTsKICBOT05GQUlMSU5HKCoodWludDY0X3QqKTB4MjAwMDJhOTAg PSAwKTsKICBOT05GQUlMSU5HKCoodWludDMyX3QqKTB4MjAwMDJhOTggPSAwKTsKICBOT05GQUlM SU5HKCoodWludDMyX3QqKTB4MjAwMDJhOWMgPSA0KTsKICBOT05GQUlMSU5HKCoodWludDY0X3Qq KTB4MjAwMDJhYTAgPSAxKTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDJhYTggPSAw KTsKICBOT05GQUlMSU5HKCoodWludDE2X3QqKTB4MjAwMDJhYW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