From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753272AbdEFIQw (ORCPT ); Sat, 6 May 2017 04:16:52 -0400 Received: from merlin.infradead.org ([205.233.59.134]:47916 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751152AbdEFIQr (ORCPT ); Sat, 6 May 2017 04:16:47 -0400 Date: Sat, 6 May 2017 10:16:35 +0200 From: Peter Zijlstra To: Michael Davidson Cc: Linus Torvalds , Matthias Kaehlcke , Ingo Molnar , Thomas Gleixner , Peter Anvin , grundler@chromium.org, Linux Kernel Mailing List , Greg Hackmann , Kees Cook , "linux-tip-commits@vger.kernel.org" Subject: Re: [tip:x86/urgent] x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility Message-ID: <20170506081635.GE4626@worktop.programming.kicks-ass.net> References: <20170501224741.133938-1-mka@chromium.org> <20170505102555.ysjep3foplmhspux@hirez.programming.kicks-ass.net> <20170505175039.hf3jx4ljuyzzgxdn@gmail.com> <20170505184405.GB128305@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 05, 2017 at 01:36:34PM -0700, Michael Davidson wrote: > There are a few lingering places in the kernel which use variable > length arrays in structs (eg the raid10 driver) which don't build with > clang and that is about it. So the other point I raised is lack of asm goto (and asm flags output). Without that our static key infrastructure reverts to runtime branches and affects performance. > So, while I completely understand the resistance to adding arbitrary > hacks to the kernel just to support another compiler it is important > to also understand just how close things are to "just working". Reading up on the LLVM thread on asm goto they appear to want to provide an intrinsic to allow doing the patchable branch thing. That would be fairly limiting, and the proposal I've seen doesn't even cover the two (or rather 4) states of patchable branches we have in the kernel. Not to mention that such an intrinsic doesn't even begin to cover all the other (perhaps creative) uses we have got asm goto used. But my main point is that we'd have to rewrite and maintain _two_ versions of the static key infrastructure if we were to support LLVM's intrinsic and the GCC asm goto. That is a very undesirable place to be. So while they'll say they support the feature, I'll say its worthless since I'm not inclined to support their variant of it. As is, I'm not getting the feeling the LLVM team really cares about Linux.