Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2098469rwb; Thu, 19 Jan 2023 21:04:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXtO5X/XQhmx+hMV8E9A/Uy/0xcbDhHEDmDnVEH+9QJJhK2S607huHLYpSuNBEf+9j0sphu0 X-Received: by 2002:a17:907:b9da:b0:872:21b2:9a1f with SMTP id xa26-20020a170907b9da00b0087221b29a1fmr14377849ejc.58.1674191053855; Thu, 19 Jan 2023 21:04:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674191053; cv=pass; d=google.com; s=arc-20160816; b=dJ2651qFSeGC19Vb9a62soSmPJzJvWd9m+NPgK9e0ouXxINght2B4xwnjinD1EVDOU jsprwx1PENKp/9XYubQnjY3PinPrCEtsYw0j1QCfpwYXbyNjyUoS+6bWafmexipzgbvy 5nIJAYfWBOiY/4IbSUE2KdQAlzsxiGjGB/8o3dPbcYjrSv+znzga5ut3sMUY5EFGOagJ yXcPEY0gWd6PABlqD7m2drZxLnhEi45Tf3N56mF+iLEnAUO7KG7pJmOBGXTYZRGkeL4U fcTATSCwRHwfw1YGx+r9M0pvhbgbDFvNnUgZVlwrp6vUymsxY9DHRbE8Gt+LmKfKStxB JlCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=o6TD09K9sPiT29dxuMgRk4g48mTX2xoA7+RX0J7A7S4=; b=r+6GKRqwPyxF+E+Muo2DfcaXGEt1cs/ze6Jm/iiAoRePb0HgEocduK8L36vbOUezbC H1n/CLCYhsAwRSCdC8TiwNDeqRrDRU/6xGZ3kfAjN3HOVNpxCtU68NGW5NbK3nRnoARW QHuEiWjd7gT105F7PY7clD7Gs8wB7HsWzB0NyuOXThRHltKKdnw/YF/yN23yHQ/F9fp/ iRT29eXJnz8OzPFzOG0QslM8DwmpA3D+2imOX98lEVPR+5FHic7koM+4CscCzgJHkLcz t3HnI1iupEAVZ4jsuxkupvWvrpoGtjmM2GTCMLmgS2Nxx/RZzhtWD06WJQ+QGE4o7azP GWjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DYBHbmLJ; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds9-20020a170907724900b008778a5b6c10si2122783ejc.112.2023.01.19.21.04.02; Thu, 19 Jan 2023 21:04:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DYBHbmLJ; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230127AbjATElK (ORCPT + 47 others); Thu, 19 Jan 2023 23:41:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjATEkv (ORCPT ); Thu, 19 Jan 2023 23:40:51 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBEC3BC8B9; Thu, 19 Jan 2023 20:36:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674189398; x=1705725398; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=o6TD09K9sPiT29dxuMgRk4g48mTX2xoA7+RX0J7A7S4=; b=DYBHbmLJ76FpNWcR2A4Xi+GX/12DV08MZYDNVzxL+EkzwNlRx1mWJrDp eeSbV7Fph328x6lBrxx2TiaR3pDu/fKUgjYQv5G6buQ1jPGb9EVSnf1N/ lEZuRpz2zqDxwMkdfbC/dmw3xm4yR2L933L47W/YSRwSmzckuV3KuTWSX lcSIz23A63GeI3qbFYZxmpf/MR+MOrZ8ABfZv7vCnS7Fw0zICz9z4cdtH JHYhce+mMg0EnBzpHqyfa2/fR4BbFUZEEfg3rtnvhLHzl+EUK99J74RUb OxEXEHiBQXgyxSqoxj2UMj92hb44bmTsQy9iqQHNfz6BsL7Qbwz7LWi6Z Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="411720037" X-IronPort-AV: E=Sophos;i="5.97,230,1669104000"; d="scan'208";a="411720037" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2023 18:10:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="989255098" X-IronPort-AV: E=Sophos;i="5.97,230,1669104000"; d="scan'208";a="989255098" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga005.fm.intel.com with ESMTP; 19 Jan 2023 18:10:08 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 19 Jan 2023 18:10:07 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Thu, 19 Jan 2023 18:10:07 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Thu, 19 Jan 2023 18:10:06 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NuuSW+l4J5eBuZAEJqL5d8iTvhRuQR3TosArGZA4pbFgXRATg9TY0MBvxgebDI/91P7GdjQEkaxjZap30cxziLseVG1cJ0f1OOByFjlflNPKyFkrP8AIik/E1kUIB/FijbcuhSCofHXQeZ29dVEUCMg37g5uF/sg94e+qNaDqn8lcjukxq0a5QanNqBAysbE18++HMQDZulyqcgZgRQV5PwChyJQus6ANBv2wnCA6ICM04YPsYQjLxvFqBRrxn1LJnx65wvpcTLQEkuImOmb4tw6rU/EhXRqvsnUGwp5VCFLmzEP0z41OY4WHce6TFNZzu9BaTNfEfvRTdsXHRcSmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=o6TD09K9sPiT29dxuMgRk4g48mTX2xoA7+RX0J7A7S4=; b=MZef2hK5vBimPe7euuMEZtzmBP0PEk9twM32FQQ9Fe7WSpPUMbAuXyb3lFRkuIiBtzzTIus25OJb65CU/AgGl0Ll41WRwLwKf59ACW82B3NwVsdd445kEtFUAt36R6NOhc5Y+YInTezF0SHBmdno6K+2jHBdvd6Sy1nBIIQHxRNMzaFT/p8KaAnrlT3WbSpdoUBOdjiohyFgTaymj6K9WE6JJrdXv9v7T7QMqx6bjD0Zj1gD5sFMLfF9bdEfHQ5l6QIqk8ZThIKLe5gFsYr8hKTU5CL7W/Du0oWJUzYPYNiLVeuU0qnjnRv+/mgktflntqFEup1wMjuYqxMoA8Uz5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BYAPR11MB3062.namprd11.prod.outlook.com (2603:10b6:a03:92::18) by SA1PR11MB6824.namprd11.prod.outlook.com (2603:10b6:806:29e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.22; Fri, 20 Jan 2023 02:10:02 +0000 Received: from BYAPR11MB3062.namprd11.prod.outlook.com ([fe80::e478:cda7:b9c4:c457]) by BYAPR11MB3062.namprd11.prod.outlook.com ([fe80::e478:cda7:b9c4:c457%5]) with mapi id 15.20.6002.013; Fri, 20 Jan 2023 02:10:02 +0000 From: "Lu, Aaron" To: "boldin.pavel@gmail.com" CC: "Hansen, Dave" , "github@mlq.me" , "pboldin@cloudlinux.com" , "linux-kselftest@vger.kernel.org" , "michael.schwarz91@gmail.com" , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "Gruss, Daniel" , "raphaelsc@scylladb.com" , "i@cloudlinux.com" Subject: Re: [PATCH] selftest/x86/meltdown: Add a selftest for meltdown Thread-Topic: [PATCH] selftest/x86/meltdown: Add a selftest for meltdown Thread-Index: AQHZIQIql4irGLCJxkaX5rlFhWY8ta6mEVEAgACVQ4A= Date: Fri, 20 Jan 2023 02:10:01 +0000 Message-ID: <2e9d7a108513e7ac062ce9fec1c11945545f1569.camel@intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR11MB3062:EE_|SA1PR11MB6824:EE_ x-ms-office365-filtering-correlation-id: d6d3c8b1-28b3-46d9-e71e-08dafa8b7054 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LuyxA5hRhS6fXesyovup9ps6ZoT+XVl40azKPESPpSSI690PVangdle8rKzV5DJJqbJzJTRFynES3swUT8LKsD1N2qFbqQcd8Y4jXCqWQpYTTYd31yMFcvF2QBOsJ8RuzaPqtTiZHTvgkOVQ0lWQ9lpUdnUV1WcjH1l4zbZ9Z41cOaZj2jIpvtFq8jETASCPwbrd1/2PEpc1+S5XjvVAw9NJF4Z+4kAFTz5GG0x+PyHqaiJx0bh0ZgojZzu+dEYHZZy2QEPDIf0iowBfbTMvjX9H16Xcz2FaIER0gHMQ6sNgapl438NmfwHs6QT1CyXlaY9lfYp8QhHm+vE9yYrfV9eRGy7DpLba+kJvQNDMfN2XKJvyyeluUUm+b4BflwqeIo066B/DeGrPMtgiocQHopXaVTGTO8ChLd5dgWXM3/Q+Racurrh/SSIsmz2McgEmLlx7JIM7Ior+qE8fY8bpXUYeQHK1hMNxKmPUnmhQ3gG+nH5BRzFYvwMheFoNinXZhwEDvJGPtjCgJo3o31+xh1nHg8iScNOPoyBFTJ014+rwwOP3Oyaw9H+5QRWjelAcCWtQyq3r0rkTFtAk73D+1SnhhGLt57mtXsCrCz80hwJKUuxPz3aCSzzNOIErWjKKLc1tYhVPCpRq4mho4trzbj2sqplqPirx/QPfiE4vPG9qE6M1a1QzdjzoYX5h0q/IcAGyzw6p8JnW0ob9fr8PqhUzqgVBrHlmWVaBtrNd4K0= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3062.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39860400002)(346002)(366004)(396003)(376002)(136003)(451199015)(38070700005)(316002)(8676002)(82960400001)(91956017)(71200400001)(64756008)(6916009)(66446008)(54906003)(36756003)(41300700001)(86362001)(6512007)(6506007)(83380400001)(6486002)(26005)(66556008)(38100700002)(186003)(122000001)(76116006)(66476007)(2616005)(4326008)(478600001)(66946007)(966005)(30864003)(2906002)(7416002)(5660300002)(8936002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?WVc0ZENreXNWVzlSM1BkaDhFNGJnWkFvUkF5d3NVN29mNS9BMDlwNUtudWQ3?= =?utf-8?B?eEw1L1lHZFI1eVY1b21Wc3ViMzBxdW4rdTFJc1BURlIrMG9wSDJMZzk3TEhE?= =?utf-8?B?a0ZVQlNtSUVxRnBza3lTVmZGdWRNOEUvN2pENjFjbVpGVVp3ektuaDZzWGlM?= =?utf-8?B?TmR0MGJOZFRlRDZuUnJtRXhhN1pPU0FyeWZxdTA4aG9QZ1J0VDVrLy9JZnh6?= =?utf-8?B?QWVIKzVYMGNTeWQwK1dmVmZwQmxDdUh1a01LMDBkT2ZIVi9wam50eXBSYkpR?= =?utf-8?B?UjhzNjdKKzBWYkYzVjJVOWdiemlMNllUdTFsd0JlT1FoNDE1dUU5d2d3bDZF?= =?utf-8?B?L25QeDh4OVgxeWhOL1VQWVJuQk96TlQxb2l3Q2U3VXNkYnBDSmQ2Y3hKZVha?= =?utf-8?B?SEVmQjYzdWVYazRZbkgzWmRzbWtta1VHK3hmRVRiSm1UVCtIOUF3SVpXZDF0?= =?utf-8?B?OFphVERlWDRkdGJteHpIVnVmeDl3bTdBT2RkM1hGTE1KYmk5a0hRWVZFMUww?= =?utf-8?B?V05lQUtwall6M2NQNDUyREFhN3k5d0pBN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LQTcxNmJ2emhTRWU3WE9FblpLM3RuUG1HTU9sb1c0N1RmMEI4OGRuMEl1?= =?utf-8?B?UmZrVk1Ga2JzK3hHcDN4N0t4K1JRT3kwWUhOdk55K0J0NkN5Nk9SZXZPbUdo?= =?utf-8?B?eWdiRjFaaW04c1hIVERseDk2QytWR0hXYXhwczdFNVBoK3BCd1J2WU0zT2hs?= =?utf-8?B?ZFQ2NGVCVGZERzd1Y2ppZ09QYzVINDlKc1JYZ2ZiUEorYmZVMW1yb1dvajMr?= =?utf-8?B?emhJL0hKa3pYQUlDUC9ndUtXYy9FL3hSSU80Q3NCN29DMko3K1crRENMb2dv?= =?utf-8?B?bHJSRktOVFlpTTJGS2Z4RDRyeEkwTGVKaFZFSElHSG5DZmpuZHNPQ1dJYUxU?= =?utf-8?B?clR3UGFONm9PSWpDSi85eHJCZnRvZ0tUUktIRThybERoNjRrSzBJaU9jV3BY?= =?utf-8?B?OGpzUXgzMC9HbmcwdEpFTGRWSFBCOEZrTE5MVElBbHBMczZRM0k4QWFrSUhG?= =?utf-8?B?aU5SYmdybW1UVmVJSnN0TEQ0Tm5UT2xzYkNId0s5aGx2dzdSRjdKNDZLZWpy?= =?utf-8?B?bm9uNVp3MTJZSDRaUkU4TjEvOTVidklpQTl4a1ZKc1puUkZ5ejk1Q0g5SXh5?= =?utf-8?B?VDRLcUVDVTZKdTBJaWluN2ZhTHlsbndXcGtIM2lCZXFIUmQvRUVJdXNtN3hJ?= =?utf-8?Q?vlLt3Bc4iNYGJRxQS54z+6PC9?= Content-Type: text/plain; charset="utf-8" Content-ID: <9DB6B8C5F2278A48B0EE41A243185E2C@namprd11.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3062.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6d3c8b1-28b3-46d9-e71e-08dafa8b7054 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2023 02:10:01.8200 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2XddTtC1iqs591PHgOHBPs1j+onnBQ8cKU8inlN3mSTMzIFTe+H06tY2xklDSlyQigT50zRqdsx9eRi4LI9JWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6824 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVGh1LCAyMDIzLTAxLTE5IGF0IDE5OjE1ICswMjAwLCBQYXZlbCBCb2xkaW4gd3JvdGU6DQo+ ID4gU2lnbmVkLW9mZi1ieTogQWFyb24gTHUgPGFhcm9uLmx1QGludGVsLmNvbT4NCj4gUmV2aWV3 ZWQtYnk6IFBhdmVsIEJvbGRpbiA8Ym9sZGluLnBhdmVsQGdtYWlsLmNvbT4NCg0KVGhhbmtzIQ0K DQo+IA0KPiAtLQ0KPiBTaW5jZXJlbHksDQo+IFBhdmVsIEJvbGRpbg0KPiANCj4gUC5TLiBTb3Jy eSBmb3IgbGFnZ2luZywgZWxlY3RyaWNpdHkgJiBmcmVlIHRpbWUgYXJlIGhhcmQgdG8gZmluZA0K PiB0aGVzZSBkYXlzLg0KDQpOZXZlciBtaW5kLCBhcHByZWNpYXRlIHlvdXIgdGltZSB0byByZXZp ZXcgdGhpcyBwYXRjaC4NCg0KQmVzdCBSZWdhcmR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V07DQo+ID4gKw0KPiA+ICtzdGF0aWMgdm9p ZCBjbGZsdXNoX3RhcmdldCh2b2lkKQ0KPiA+ICt7DQo+ID4gKyAgICAgICBpbnQgaTsNCj4gPiAr DQo+ID4gKyAgICAgICBmb3IgKGkgPSAwOyBpIDwgQklUU19CWV9SRUFEOyBpKyspDQo+ID4gKyAg ICAgICAgICAgICAgIGNsZmx1c2goJnRhcmdldF9hcnJheVtpICogVEFSR0VUX1NJWkVdKTsNCj4g PiArfQ0KPiA+ICsNCj4gPiArZXh0ZXJuIGNoYXIgZmFpbHNoZXJlW107DQo+ID4gK2V4dGVybiBj aGFyIHN0b3BzcGVjdWxhdGVbXTsNCj4gPiArDQo+ID4gK3N0YXRpYyB2b2lkIF9fYXR0cmlidXRl X18oKG5vaW5saW5lKSkgc3BlY3VsYXRlKHVuc2lnbmVkIGxvbmcNCj4gPiBhZGRyLCBjaGFyIGJp dCkNCj4gPiArew0KPiA+ICsgICAgICAgcmVnaXN0ZXIgY2hhciBteWJpdCBhc20gKCJjbCIpID0g Yml0Ow0KPiA+ICsjaWZkZWYgX194ODZfNjRfXw0KPiA+ICsgICAgICAgYXNtIHZvbGF0aWxlICgN Cj4gPiArICAgICAgICAgICAgICAgIjE6XG5cdCINCj4gPiArDQo+ID4gKyAgICAgICAgICAgICAg ICIucmVwdCAzMDBcblx0Ig0KPiA+ICsgICAgICAgICAgICAgICAiYWRkICQweDE0MSwgJSVyYXhc blx0Ig0KPiA+ICsgICAgICAgICAgICAgICAiLmVuZHJcbiINCj4gPiArDQo+ID4gKyAgICAgICAg ICAgICAgICJmYWlsc2hlcmU6XG5cdCINCj4gPiArICAgICAgICAgICAgICAgIm1vdmIgKCVbYWRk cl0pLCAlJWFsXG5cdCINCj4gPiArICAgICAgICAgICAgICAgInJvciAlW2JpdF0sICUlcmF4XG5c dCINCj4gPiArICAgICAgICAgICAgICAgImFuZCAkMSwgJSVyYXhcblx0Ig0KPiA+ICsgICAgICAg ICAgICAgICAic2hsICQ5LCAlJXJheFxuXHQiDQo+ID4gKyAgICAgICAgICAgICAgICJqeiAxYlxu XHQiDQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgICAibW92cSAoJVt0YXJnZXRdLCAlJXJheCwg MSksICUlcmJ4XG4iDQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgICAic3RvcHNwZWN1bGF0ZTog XG5cdCINCj4gPiArICAgICAgICAgICAgICAgIm5vcFxuXHQiDQo+ID4gKyAgICAgICAgICAgICAg IDoNCj4gPiArICAgICAgICAgICAgICAgOiBbdGFyZ2V0XSAiciIgKHRhcmdldF9hcnJheSksDQo+ ID4gKyAgICAgICAgICAgICAgICAgW2FkZHJdICJyIiAoYWRkciksDQo+ID4gKyAgICAgICAgICAg ICAgICAgW2JpdF0gInIiIChteWJpdCkNCj4gPiArICAgICAgICAgICAgICAgOiAicmF4IiwgInJi eCINCj4gPiArICAgICAgICk7DQo+ID4gKyNlbHNlIC8qIGRlZmluZWQoX194ODZfNjRfXykgKi8N Cj4gPiArICAgICAgIGFzbSB2b2xhdGlsZSAoDQo+ID4gKyAgICAgICAgICAgICAgICIxOlxuXHQi DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgICAiLnJlcHQgMzAwXG5cdCINCj4gPiArICAgICAg ICAgICAgICAgImFkZCAkMHgxNDEsICUlZWF4XG5cdCINCj4gPiArICAgICAgICAgICAgICAgIi5l bmRyXG4iDQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgICAiZmFpbHNoZXJlOlxuXHQiDQo+ID4g KyAgICAgICAgICAgICAgICJtb3ZiICglW2FkZHJdKSwgJSVhbFxuXHQiDQo+ID4gKyAgICAgICAg ICAgICAgICJyb3IgJVtiaXRdLCAlJWVheFxuXHQiDQo+ID4gKyAgICAgICAgICAgICAgICJhbmQg JDEsICUlZWF4XG5cdCINCj4gPiArICAgICAgICAgICAgICAgInNobCAkOSwgJSVlYXhcblx0Ig0K PiA+ICsgICAgICAgICAgICAgICAianogMWJcblx0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oZWNrKHZvaWQpDQo+ID4gK3sNCj4gPiArICAgICAgIGlu dCBpLCB0aW1lOw0KPiA+ICsgICAgICAgdm9sYXRpbGUgY2hhciAqYWRkcjsNCj4gPiArDQo+ID4g KyAgICAgICBmb3IgKGkgPSAwOyBpIDwgQklUU19CWV9SRUFEOyBpKyspIHsNCj4gPiArICAgICAg ICAgICAgICAgYWRkciA9ICZ0YXJnZXRfYXJyYXlbaSAqIFRBUkdFVF9TSVpFXTsNCj4gPiArDQo+ ID4gKyAgICAgICAgICAgICAgIHRpbWUgPSBnZXRfYWNjZXNzX3RpbWUoYWRkcik7DQo+ID4gKw0K PiA+ICsgICAgICAgICAgICAgICBpZiAodGltZSA8PSBjYWNoZV9oaXRfdGhyZXNob2xkKQ0KPiA+ ICsgICAgICAgICAgICAgICAgICAgICAgIGhpc3RbaV0rKzsNCj4gPiArICAgICAgIH0NCj4gPiAr fQ0KPiA+ICsNCj4gPiArI2RlZmluZSBDWUNMRVMgMTAwMDANCj4gPiArc3RhdGljIGludCByZWFk Yml0KGludCBmZCwgdW5zaWduZWQgbG9uZyBhZGRyLCBjaGFyIGJpdCkNCj4gPiArew0KPiA+ICsg ICAgICAgaW50IGksIHJldDsNCj4gPiArICAgICAgIHN0YXRpYyBjaGFyIGJ1ZlsyNTZdOw0KPiA+ ICsNCj4gPiArICAgICAgIG1lbXNldChoaXN0LCAwLCBzaXplb2YoaGlzdCkpOw0KPiA+ICsNCj4g PiArICAgICAgIGZvciAoaSA9IDA7IGkgPCBDWUNMRVM7IGkrKykgew0KPiA+ICsgICAgICAgICAg ICAgICAvKg0KPiA+ICsgICAgICAgICAgICAgICAgKiBNYWtlIHRoZSB0by1iZS1zdG9sZW4gZGF0 YSBjYWNoZSBhbmQgdGxiIGhvdA0KPiA+ICsgICAgICAgICAgICAgICAgKiB0byBpbmNyZWFzZSBz dWNjZXNzIHJhdGUuDQo+ID4gKyAgICAgICAgICAgICAgICAqLw0KPiA+ICsgICAgICAgICAgICAg ICByZX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TsNCj4gPiArICAgICAg IG1lbXNldChyZWFkLCAwLCBzaXplb2YocmVhZCkpOw0KPiA+ICsgICAgICAgcHJpbnRmKCJbSU5G T11cdHNhdmVkX2NvbW1hbmRfbGluZTogMHglbHhcbiIsIGFkZHIpOw0KPiA+ICsgICAgICAgc2l6 ZSA9IGV4cGVjdGVkX2xlbjsNCj4gPiArDQo+ID4gKyAgICAgICBpZiAoIWFkZHIpDQo+ID4gKyAg ICAgICAgICAgICAgIGdvdG8gZG9uZTsNCj4gPiArDQo+ID4gKyAgICAgICBmb3IgKGkgPSAwOyBp IDwgc2l6ZTsgaSsrKSB7DQo+ID4gKyAgICAgICAgICAgICAgIHJldCA9IHJlYWRieXRlKHNwZWNf ZmQsIGFkZHIpOw0KPiA+ICsgICAgICAgICAgICAgICByZWFkW2ldID0gcmV0Ow0KPiA+ICsgICAg ICAgICAgICAgICBhZGRyKys7DQo+ID4gKyAgICAgICB9DQo+ID4gKw0KPiA+ICsgICAgICAgZm9y IChpID0gMDsgaSA8IHNpemU7IGkrKykNCj4gPiArICAgICAgICAgICAgICAgaWYgKGV4cGVjdGVk W2ldID09IHJlYWRbaV0pDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgc2NvcmUrKzsNCj4g PiArDQo+ID4gK2RvbmU6DQo+ID4gKyAgICAgICBpZiAoc2NvcmUgPiBzaXplIC8gMikgew0KPiA+ ICsgICAgICAgICAgICAgICBwcmludGYoIltGQUlMXVx0dGVzdF9yZWFkX3NhdmVkX2NvbW1hbmRf bGluZTogYm90aA0KPiA+IGhpZ2ggYW5kIGxvdyBrZXJuZWwgbWFwcGluZyBsZWFrIGZvdW5kLlxu Iik7DQo+ID4gKyAgICAgICAgICAgICAgIHJldCA9IC0xOw0KPiA+ICsgICAgICAgfSBlbHNlIHsN Cj4gPiArICAgICAgICAgICAgICAgcHJpbnRmKCJbT0tdXHR0ZXN0X3JlYWRfc2F2ZWRfY29tbWFu ZF9saW5lOiBubyBsZWFrDQo+ID4gZm91bmQuXG4iKTsNCj4gPiArICAgICAgICAgICAgICAgcmV0 ID0gMDsNCj4gPiArICAgICAgIH0NCj4gPiArDQo+ID4gKyAgICAgICBjbG9zZShzcGVjX2ZkKTsN Cj4gPiArDQo+ID4gKyAgICAgICByZXR1cm4gcmV0Ow0KPiA+ICt9DQo+ID4gKw0KPiA+ICtzdGF0 aWMgaW50IGdldF9kaXJlY3RtYXBfYmFzZSh2b2lkKQ0KPiA+ICt7DQo+ID4gKyAgICAgICBjaGFy ICpidWY7DQo+ID4gKyAgICAgICBGSUxFICpmcDsNCj4gPiArICAgICAgIHNpemVfdCBuOw0KPiA+ ICsgICAgICAgaW50IHJldDsNCj4gPiArDQo+ID4gKyAgICAgICBmcCA9IGZvcGVuKCIvc3lzL2tl cm5lbC9kZWJ1Zy9wYWdlX3RhYmxlcy9rZXJuZWwiLCAiciIpOw0KPiA+ICsgICAgICAgaWYgKCFm cCkNCj4gPiArICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KPiA+ICsNCj4gPiArICAgICAgIGJ1 ZiA9IE5VTEw7DQo+ID4gKyAgICAgICByZXQgPSAtMTsNCj4gPiArICAgICAgIHdoaWxlIChnZXRs aW5lKCZidWYsICZuLCBmcCkgIT0gLTEpIHsNCj4gPiArICAgICAgICAgICAgICAgaWYgKCFzdHJz dHIoYnVmLCAiS2VybmVsIE1hcHBpbmciKSkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICBj b250aW51ZTsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICAgIGlmIChnZXRsaW5lKCZidWYsICZu LCBmcCkgIT0gLTEgJiYNCj4gPiArICAgICAgICAgICAgICAgICAgIHNzY2FuZihidWYsICIweCVs eCIsICZkaXJlY3RtYXBfYmFzZSkgPT0gMSkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg DQo+ID4gcHJpbnRmKCJbSU5GT11cdGRpcmVjdG1hcF9iYXNlPTB4JWx4LzB4JWx4XG4iLCBkaXJl Y3RtYXBfYmFzZSwNCj4gPiBkaXJlY3RtYXBfYmFzZSAmIFBVRF9NQVNLKTsNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgICBkaXJlY3RtYXBfYmFzZSAmPSBQVURfTUFTSzsNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgICByZXQgPSAwOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIGJy ZWFrOw0KPiA+ICsgICAgICAgICAgICAgICB9DQo+ID4gKyAgICAgICB9DQo+ID4gKw0KPiA+ICsg ICAgICAgZmNsb3NlKGZwKTsNCj4gPiArICAgICAgIGZyZWUoYnVmKTsNCj4gPiArICAgICAgIHJl dHVybiByZXQ7DQo+ID4gK30NCj4gPiArDQo+ID4gK3N0YXRpYyBpbnQgdmlydF90b19waHlzKHVu c2lnbmVkIGxvbmcgdmlydCwgdW5zaWduZWQgbG9uZyAqcGh5cykNCj4gPiArew0KPiA+ICsgICAg ICAgdW5zaWduZWQgbG9uZyBwZm47DQo+ID4gKyAgICAgICB1aW50NjRfdCB2YWw7DQo+ID4gKyAg ICAgICBpbnQgZmQsIHJldDsNCj4gPiArDQo+ID4gKyAgICAgICBmZCA9IG9wZW4oIi9wcm9jL3Nl bGYvcGFnZW1hcCIsIE9fUkRPTkxZKTsNCj4gPiArICAgICAgIGlmIChmZCA9PSAtMSkgew0KPiA+ ICsgICAgICAgICAgICAgICBwcmludGYoIltJTkZPXVx0RmFpbGVkIHRvIG9wZW4gcGFnZW1hcFxu Iik7DQo+ID4gKyAgICAgICAgICAgICAgIHJldHVybiAtMTsNCj4gPiArICAgICAgIH0NCj4gPiAr DQo+ID4gKyAgICAgICByZXQgPSBwcmVhZChmZCwgJnZhbCwgc2l6ZW9mKHZhbCksICh2aXJ0ID4+ IFBBR0VfU0hJRlQpICoNCj4gPiBzaXplb2YodWludDY0X3QpKTsNCj4gPiArICAgICAgIGlmIChy ZXQgPT0gLTEpIHsNCj4gPiArICAgICAgICAgICAgICAgcHJpbnRmKCJbSU5GT11cdEZhaWxlZCB0 byByZWFkIHBhZ2VtYXBcbiIpOw0KPiA+ICsgICAgICAgICAgICAgICBnb3RvIG91dDsNCj4gPiAr ICAgICAgIH0NCj4gPiArDQo+ID4gKyAgICAgICBpZiAoISh2YWwgJiAoMVVMTCA8PCA2MykpKSB7 DQo+ID4gKyAgICAgICAgICAgICAgIHByaW50ZigiW0lORk9dXHRQYWdlIG5vdCBwcmVzZW50IGFj Y29yZGluZyB0bw0KPiA+IHBhZ2VtYXBcbiIpOw0KPiA+ICsgICAgICAgICAgICAgICByZXQgPSAt MTsNCj4gPiArICAgICAgICAgICAgICAgZ290byBvdXQ7DQo+ID4gKyAgICAgICB9DQo+ID4gKw0K PiA+ICsgICAgICAgcGZuID0gdmFsICYgKCgxVUxMIDw8IDU1KSAtIDEpOw0KPiA+ICsgICAgICAg aWYgKHBmbiA9PSAwKSB7DQo+ID4gKyAgICAgICAgICAgICAgIHByaW50ZigiW0lORk9dXHROZWVk IENBUF9TWVNfQURNSU4gdG8gc2hvdyBwZm5cbiIpOw0KPiA+ICsgICAgICAgICAgICAgICByZXQg PSAtMTsNCj4gPiArICAgICAgICAgICAgICAgZ290byBvdXQ7DQo+ID4gKyAgICAgICB9DQo+ID4g Kw0KPiA+ICsgICAgICAgcmV0ID0gMDsNCj4gPiArICAgICAgICpwaHlzID0gKHBmbiA8PCBQQUdF X1NISUZUKSB8ICh2aXJ0ICYgKFBBR0VfU0laRSAtIDEpKTsNCj4gPiArDQo+ID4gK291dDoNCj4g PiArICAgICAgIGNsb3NlKGZkKTsNCj4gPiArICAgICAgIHJldHVybiByZXQ7DQo+ID4gK30NCj4g PiArDQo+ID4gK3N0YXRpYyBpbnQgdGVzdF9yZWFkX2xvY2FsX3Zhcih2b2lkKQ0KPiA+ICt7DQo+ ID4gKyAgICAgICBjaGFyIHBhdGhbXSA9ICIvdG1wL21lbHRkb3duLlhYWFhYWCI7DQo+ID4gKyAg ICAgICBjaGFyIHN0cmluZ1tdID0gInRlc3Qgc3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