Received: by 10.223.185.116 with SMTP id b49csp473694wrg; Wed, 14 Feb 2018 01:55:05 -0800 (PST) X-Google-Smtp-Source: AH8x2264M3LSX072DLXRumN5E24RriEESqv/9dXu7tA7b1KpIZpc5R390bgPhnFV4V1Q7nN+6eNL X-Received: by 10.101.96.71 with SMTP id b7mr3474883pgv.339.1518602105520; Wed, 14 Feb 2018 01:55:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518602105; cv=none; d=google.com; s=arc-20160816; b=mVIwn38luo1G4U4rpoZvIMbvxv9GL1mDlki9FU4qhmO9hDzOC+xrGnjAhYKDZOm149 nMe+DoSZvC4FkZS/i+62lCcmK0szGEvFlsPY46vvi4iFFWE8+8nEWblxhZrVY9gxM+Cl LEZt4oSSL4BQu/4RU7g5ZEz1J9yA+i+Nh9wTSsQKdsFMOhJklnenGwBdUJURJZWTsb4H /wi8sum8SPL4JOjZdM26FaIBaDOStoDzkru/zdfN8W82wFAFr3Xkxg5r1zvFp9SB10dr veHmWeO2buLRgxNKvtSJEITSKpWuWHCiEU0cokP2EQ0orYtre5lhSDwkpOlQLzAmcOC0 wHxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=eRJUBxwrID6oKBrmQ/ZfkUdXbZeJYq3l9xRODYCqQHs=; b=FfP5W9GMKoNyRKKv/grXhb95/qG5MbD2megTmk2Jojcju9NKa0sTBuH82lfMrDc2o7 FTXJc1duWdnSQHmAXav9+ccECqriA39vW6x54mo8ZhGtDe+bjUVvePKQQ7HrWyr72Lhk YTt+Az8b0SP6oc2jaApcHDRC4YxVyc4IP3MsQD9GdF4E7Fxsu4YPObGLi5Nhy2eLDA1R Wbtzdfh2Rq3Wwdyk6dqqZYkv2w3QnSa91xEc60K19LuF2abphyrJMv30unQxnI6xLbR1 8zBe4q00Yx7zEr3wRVHHV45Yj2/+CjLUe7rDI13SPLgOkcz6pxw5CHX7nMQShk8WR8Mw YqUg== ARC-Authentication-Results: i=1; mx.google.com; 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 k71si1088142pgc.545.2018.02.14.01.54.50; Wed, 14 Feb 2018 01:55: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; 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 S966939AbeBNJxJ convert rfc822-to-8bit (ORCPT + 99 others); Wed, 14 Feb 2018 04:53:09 -0500 Received: from mga07.intel.com ([134.134.136.100]:12561 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966706AbeBNJxH (ORCPT ); Wed, 14 Feb 2018 04:53:07 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2018 01:53:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,511,1511856000"; d="scan'208";a="18011999" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 14 Feb 2018 01:53:05 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 14 Feb 2018 01:53:04 -0800 Received: from lcsmsx155.ger.corp.intel.com (10.186.165.233) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 14 Feb 2018 01:53:04 -0800 Received: from hasmsx107.ger.corp.intel.com ([169.254.2.32]) by LCSMSX155.ger.corp.intel.com ([169.254.12.50]) with mapi id 14.03.0319.002; Wed, 14 Feb 2018 11:53:01 +0200 From: "Yatsina, Marina" To: Peter Zijlstra CC: Kees Cook , David Woodhouse , Chandler Carruth , "Kreitzer, David L" , "Grischenko, Andrei L" , "rnk@google.com" , "LLVM Developers" , "ehsan@mozilla.com" , "Tayree, Coby" , Matthias Braun , Dean Michael Berris , "James Y Knight" , Guenter Roeck , X86 ML , LKML , Alan Cox , Rik van Riel , Andi Kleen , Josh Poimboeuf , Tom Lendacky , Linus Torvalds , Jiri Kosina , Andy Lutomirski , "Hansen, Dave" , Tim Chen , Greg Kroah-Hartman , Paul Turner , Stephen Hines , Nick Desaulniers Subject: RE: clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add clang support) Thread-Topic: clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add clang support) Thread-Index: AQHTpSrRc0Tf36QxBkW6ZxMIE0y/9aOjiI5w///ycYCAACPfIA== Date: Wed, 14 Feb 2018 09:52:59 +0000 Message-ID: References: <20180214090851.GU25181@hirez.programming.kicks-ass.net> In-Reply-To: <20180214090851.GU25181@hirez.programming.kicks-ass.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2Q5ZjUwNzItNzU2ZS00OTZlLThhNzMtMjhhZTNkMjcwNGZjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiIwZm1jT2RxR05RUU9YbHRxQ1NvTjVibnU0U1VTZmVnSWg2bVQwazhFeG5ZTDVcLzJQWklPYVFxS0E3YnNQNlFKVSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.185.126.126] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, When I started the original thread last year I was in favor of adding "asm goto" and didn't understand why it wasn't done by that time. The feedback I got is that this feature (optimizing tracepoints) is very useful and that we do want it in llvm, but perhaps there's a cleaner way of implementing than "asm goto". An alternative suggestion arose as well. I'm sure you can provide a lot of background for the decisions of why "asm goto" was chosen and which other alternatives were considered, as you were the one to implement this. This may shed a lot of light on the alternative suggestions that arose in my thread in the llvm community. I think that including GCC folks in the "small team" discussion Chandler suggested might be a very good idea, so if you have some contacts, please send them to Chandler. Anyway, I think we should consider the alternatives and not take "asm goto" as a given, even though this is the implementation of this feature for the past 7 years and it works well. I'm not saying linux kernel needs to rush and adopt an alternative solution ASAP, but we cannot ignore that it exists and may (or may not) be the direction of the future (for both gcc and llvm). Thanks, Marina -----Original Message----- From: Peter Zijlstra [mailto:peterz@infradead.org] Sent: Wednesday, February 14, 2018 11:09 To: Yatsina, Marina Cc: Kees Cook ; David Woodhouse ; Chandler Carruth ; Kreitzer, David L ; Grischenko, Andrei L ; rnk@google.com; LLVM Developers ; ehsan@mozilla.com; Tayree, Coby ; Matthias Braun ; Dean Michael Berris ; James Y Knight ; Guenter Roeck ; X86 ML ; LKML ; Alan Cox ; Rik van Riel ; Andi Kleen ; Josh Poimboeuf ; Tom Lendacky ; Linus Torvalds ; Jiri Kosina ; Andy Lutomirski ; Hansen, Dave ; Tim Chen ; Greg Kroah-Hartman ; Paul Turner ; Stephen Hines ; Nick Desaulniers Subject: Re: clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add clang support) On Wed, Feb 14, 2018 at 08:33:39AM +0000, Yatsina, Marina wrote: > I hope this will give this issue a push forward and we will find a > solution that will not prevent llvm from compiling linux kernel. That solution is asm-goto. We (linux kernel) are not going to support something like it. It's going to be asm-goto or bust. The feature is over 7 years old by now, deal with it. If you ever get to the point where it makes sense to build a kernel with LLVM, then you can bike-shed with the GCC team on new features, until then tough luck. --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.