From: Peter Zijlstra <peterz@infradead.org>
To: Michael Davidson <md@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Matthias Kaehlcke <mka@chromium.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>, Peter Anvin <hpa@zytor.com>,
grundler@chromium.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Greg Hackmann <ghackmann@google.com>,
Kees Cook <keescook@chromium.org>,
"linux-tip-commits@vger.kernel.org"
<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
Date: Sat, 6 May 2017 10:16:35 +0200 [thread overview]
Message-ID: <20170506081635.GE4626@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <CA+=D-XWKCv9z+dsao0n2WAZCy-GGvMETa9nsW3XjJ3A0wU-MQQ@mail.gmail.com>
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.
next prev parent reply other threads:[~2017-05-06 8:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-01 22:47 [PATCH v2] x86/mm/kaslr: Use _ASM_MUL macro for multiplication Matthias Kaehlcke
2017-05-02 2:08 ` Kees Cook
2017-05-05 8:11 ` [tip:x86/urgent] x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility tip-bot for Matthias Kaehlcke
2017-05-05 10:25 ` Peter Zijlstra
2017-05-05 17:50 ` Ingo Molnar
2017-05-05 18:22 ` Peter Zijlstra
2017-05-05 18:44 ` Matthias Kaehlcke
2017-05-05 19:30 ` Linus Torvalds
2017-05-05 20:36 ` Michael Davidson
2017-05-06 8:16 ` Peter Zijlstra [this message]
2017-05-07 15:42 ` hpa
2017-05-05 20:52 ` Matthias Kaehlcke
2017-05-06 9:57 ` Ingo Molnar
2017-05-05 19:37 ` hpa
2017-05-05 21:24 ` Matthias Kaehlcke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170506081635.GE4626@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ghackmann@google.com \
--cc=grundler@chromium.org \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=md@google.com \
--cc=mingo@kernel.org \
--cc=mka@chromium.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox