Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2223003imm; Wed, 16 May 2018 09:37:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoNWBKD10tH1Afq0Gt29K2gV4qKQY4EZvbbO+enf+p7yGNXdTZJucDEAAksmSyJdxqTe+SJ X-Received: by 2002:a63:4143:: with SMTP id o64-v6mr1301774pga.280.1526488663593; Wed, 16 May 2018 09:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526488663; cv=none; d=google.com; s=arc-20160816; b=kU5sgeUqOSkd9BXqyGPTS1Y+S4zd+TZrBoXlnehoVtx3KuswBYDBWo70yLu9X372Td 62BNm5dniaibCui20U041GKISbN1fbSvBgZlvC/b0DnJNHoneQFvmGHb/TgvtsRtIZfI Y03xmJg6KoPWNu1nzr9LuhzBvKxexwTo9V/BEjz98pP80jJ+Pw5K5iJ7NauZ15ca5eCS X0GdA2YUYr7jFOPOXFxRQ1y3rNCWs77oKcwo1PnqJYzSaRzYe7trAYoygg6cPklbd/mL yHde6zuaEA5fgoABjp9Crylo7It7WKe8NpYymvF0WM1mm2tuEXluFx1H1qoE3AmQgudx TDcA== 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 :arc-authentication-results; bh=ldR9wyckwdTgz1avqokm+t4ejtd8uWvZw5GisnRsHvw=; b=pAt08DLAmef3NdrVu5Pz8Vuky32htuYKqFqFYQBRmJ7NXhYrnR+HvQiVCZTjdMCu6L Azbwi7yLxC0myRRUZBu6UAUKITudkeoKAME4Y0b1pseiyDwDpbTZoHyTTmVp5SDxfwtJ /z/y43IyF8YnGJZoinNeoZcJPYAOrctHS6ipMmOf5cD6Yg77/mKCDRDWJGfDnOlX2bME YZh+o2xuiYIU+YSToIRCns3tPbsMxwFSeHFn5N8PCepCtg0EO33+KO6oRdLauS9XhFeo 66KTyCl3OGN7jzhvskmLzo2M4vOo1EiDJAcxeGVwFU4JuBWM+/TzYMqm/AcpdVLRsHWf 3zcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@onevmw.onmicrosoft.com header.s=selector1-vmware-com header.b=gKHNqeYU; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3-v6si2901697pfh.101.2018.05.16.09.37.29; Wed, 16 May 2018 09:37:43 -0700 (PDT) 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=@onevmw.onmicrosoft.com header.s=selector1-vmware-com header.b=gKHNqeYU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752154AbeEPQhK (ORCPT + 99 others); Wed, 16 May 2018 12:37:10 -0400 Received: from mail-sn1nam01on0041.outbound.protection.outlook.com ([104.47.32.41]:27392 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751307AbeEPQhI (ORCPT ); Wed, 16 May 2018 12:37:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onevmw.onmicrosoft.com; s=selector1-vmware-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ldR9wyckwdTgz1avqokm+t4ejtd8uWvZw5GisnRsHvw=; b=gKHNqeYUazVGSApwFEaSgYdrsovL9sSpjvVsXLasUUtFPaY+jze64cRwUjGN6z8ab8gzIkARWOMfHclG4SEX7z8jufCOp0U+yDMbzWMQU7i8O2qqPpoYGdjHa3rdEnVJ4HTbE2lGhYPalQvI40NjTJdTGlkc1v/AJVzCmfuIRos= Received: from SN2PR05MB2654.namprd05.prod.outlook.com (10.166.212.137) by SN2PR05MB2784.namprd05.prod.outlook.com (10.167.19.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.776.4; Wed, 16 May 2018 16:37:06 +0000 Received: from SN2PR05MB2654.namprd05.prod.outlook.com ([fe80::4924:30ca:59af:89db]) by SN2PR05MB2654.namprd05.prod.outlook.com ([fe80::4924:30ca:59af:89db%4]) with mapi id 15.20.0776.010; Wed, 16 May 2018 16:37:06 +0000 From: Nadav Amit To: Kees Cook CC: LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , Jan Beulich , Josh Poimboeuf Subject: Re: [RFC 5/8] x86: refcount: prevent gcc distortions Thread-Topic: [RFC 5/8] x86: refcount: prevent gcc distortions Thread-Index: AQHT7JNal4XNWp7ceUuT4zArssv9H6QyYvAAgAAsKIA= Date: Wed, 16 May 2018 16:37:06 +0000 Message-ID: References: <20180515141124.84254-1-namit@vmware.com> <20180515141124.84254-6-namit@vmware.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [208.91.2.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;SN2PR05MB2784;7:bghgQORfxfsGCuVvWK+rRR1R4GZx+BqUUSaJpUWAZuMqABRjUvlyn/Ub+KGXVzjM1yvXN57R3Hx5YoeRTF5IKUoSRJFkG/UYDucsEef0lvFBrC+fLP2wLU4JOnnDNMo7H3A51QBXJyoa/WCrwWoiBdSsU6tSxv+yYdvRuFmsAcE/zhzpTl4yRhyFDUuX5SnV/xx2vHEASdIS6KFc90CtyONKHp8oof6vYmpyyICTezflelZdYdzTrvQ9+6JKSrXl;20:AxH4Haxra+E2RT/1v2ugtnt93Ze5pAP6gB/qT5ZEqs7ddch4ci10pe+zs7nuNpFF6g3PwLJ+agRDLaW2K9lFXI7wpVD3Ekh6h9Bz/Co9L7NEn+L8vCWv+0p2L1JkNAUyTSKHgSq7/NJzdjyPFcQ2W9MdeU5mKwVXDCbJgkXj3CA= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:SN2PR05MB2784; x-ms-traffictypediagnostic: SN2PR05MB2784: authentication-results: spf=none (sender IP is ) smtp.mailfrom=namit@vmware.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(61668805478150); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:SN2PR05MB2784;BCL:0;PCL:0;RULEID:;SRVR:SN2PR05MB2784; x-forefront-prvs: 0674DC6DD3 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(396003)(39860400002)(39380400002)(366004)(376002)(199004)(189003)(476003)(81156014)(82746002)(81166006)(486006)(33656002)(54906003)(6246003)(14454004)(26005)(8676002)(99286004)(86362001)(5250100002)(3660700001)(97736004)(25786009)(446003)(8936002)(2900100001)(105586002)(478600001)(11346002)(6916009)(2906002)(2616005)(186003)(106356001)(6512007)(3280700002)(5660300001)(53936002)(36756003)(7736002)(6436002)(4326008)(83716003)(305945005)(76176011)(68736007)(6506007)(102836004)(66066001)(3846002)(6486002)(53546011)(6116002)(316002)(229853002);DIR:OUT;SFP:1101;SCL:1;SRVR:SN2PR05MB2784;H:SN2PR05MB2654.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: /iVteLfF2wrOw9fHpapHySrW4vO5Qso1FoOcSLBFFUclB7iaH4FDGjQOjJmrwNg8C3GhjH8105MBdj/lq6osQMn51erM9AJ978vdwVjh80vdwpC2FqD34U6zu0gJTcDIRi+6YUKdjX84q573u4lRIl29TGjjalVZ0WRpyGlky629FYPSWs4B1mTSNv1s5Ca/ spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <5A7FBCAF9227B440B07B9140AA391CD5@namprd05.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 741c0f2c-b5bc-4d11-17eb-08d5bb4b4310 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 741c0f2c-b5bc-4d11-17eb-08d5bb4b4310 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 May 2018 16:37:06.3171 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR05MB2784 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org S2VlcyBDb29rIDxrZWVzY29va0BjaHJvbWl1bS5vcmc+IHdyb3RlOg0KDQo+IE9uIFR1ZSwgTWF5 IDE1LCAyMDE4IGF0IDc6MTEgQU0sIE5hZGF2IEFtaXQgPG5hbWl0QHZtd2FyZS5jb20+IHdyb3Rl Og0KPj4gR0NDIGNvbnNpZGVycyB0aGUgbnVtYmVyIG9mIHN0YXRlbWVudHMgaW4gaW5saW5l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mY291bnQuaA0KPj4gQEAgLTE0LDM0ICsx NCw0MyBAQA0KPj4gICogY2VudHJhbCByZWZjb3VudCBleGNlcHRpb24uIFRoZSBmaXh1cCBhZGRy ZXNzIGZvciB0aGUgZXhjZXB0aW9uIHBvaW50cw0KPj4gICogYmFjayB0byB0aGUgcmVndWxhciBl eGVjdXRpb24gZmxvdyBpbiAudGV4dC4NCj4+ICAqLw0KPj4gLSNkZWZpbmUgX1JFRkNPVU5UX0VY Q0VQVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcDQo+PiAtICAgICAgICIucHVzaHNl Y3Rpb24gLnRleHQuLnJlZmNvdW50XG4iICAgICAgICAgICAgICAgIFwNCj4+IC0gICAgICAgIjEx MTpcdGxlYSAlW2NvdW50ZXJdLCAlJSIgX0FTTV9DWCAiXG4iICAgICAgICAgXA0KPj4gLSAgICAg ICAiMTEyOlx0IiBBU01fVUQyICJcbiIgICAgICAgICAgICAgICAgICAgICAgICAgICBcDQo+PiAt ICAgICAgIEFTTV9VTlJFQUNIQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwN Cj4+IC0gICAgICAgIi5wb3BzZWN0aW9uXG4iICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgXA0KPj4gLSAgICAgICAiMTEzOlxuIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBcDQo+PiArDQo+PiArYXNtICgiXG4iDQo+PiArICAgICAgICIubWFjcm8gX19SRUZD T1VOVF9FWENFUFRJT04gY291bnRlcjp2YXJhcmdcblx0Ig0KPiANCj4gV2h5IGFyZSB0aGVzZSB2 YXJhcmc/DQoNCkkgZG9u4oCZdCB0aGluayBpdCBpcyBuZWVkZWQgaGVyZS4gSSB3aWxsIGZpeCBp dC4NCg0KPiANCj4gQWxzbywgSSB0aGluayBmb3IgdGhlIHdob2xlIHNlcmllcywgdGhlc2UgI2Rl ZmluZS1hLW1hY3JvIGNhc2VzIG5lZWQgYQ0KP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