linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Matthias Kaehlcke <mka@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Michael Davidson <md@google.com>,
	Thomas Gleixner <tglx@linutronix.de>, Peter Anvin <hpa@zytor.com>,
	grundler@chromium.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	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 11:57:06 +0200	[thread overview]
Message-ID: <20170506095706.pzmeplmjrs2yoio3@gmail.com> (raw)
In-Reply-To: <20170505205249.GC128305@google.com>


* Matthias Kaehlcke <mka@chromium.org> wrote:

> El Fri, May 05, 2017 at 12:30:20PM -0700 Linus Torvalds ha dit:
> 
> > On Fri, May 5, 2017 at 11:44 AM, Matthias Kaehlcke <mka@chromium.org> wrote:
> > >
> > > Indeed, I expect 4.12 (with this patch ...) to build with Clang for a
> > > x86 defconfig (with tons of warnings). ARM64 is very close.
> > 
> > Does it actually *work*, rather than just build?
> 
> Unfortunately I can't make an universal affirmation here. The systems for which 
> I currently develop run a 4.4ish kernel with the clang patches on top. Both x86 
> and ARM64 boot, the peripherals work and I haven't encountered any specific 
> problems yet. Automated tests to assess or detect regressions are still pending.
> 
> Does it work on all possible hardware configurations and use cases? Almost 
> certainly not. However I think here is where having basic upstream support for 
> clang can help by allowing more people to evaluate it on their systems without 
> requiring a whole bunch of random out-of-tree patches, which also makes it 
> easier to contribute back.

So my impression too was that Clang was 'very close' to being usable by users to 
build a working Linux kernel in practice (on x86), and at this point the kernel 
can certainly accomodate a Clang quirk or two to bridge the chicken-and-egg 
problem of who supports whom first.

Note that I did NAK ugly Clang hacks in the recent past, so this tentative pledge 
of support (on the x86 arch side) is not unconditional. Peter is also right about 
proper asm goto compatibility probably being a preprequisite of any major distro 
going to Clang.

( I see Clang also as a way for the GCC folks to get their act together - the
  advantages of competition and all that. GCC has the better license after all,
  IMHO. )

Thanks,

	Ingo

  reply	other threads:[~2017-05-06  9:57 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
2017-05-07 15:42               ` hpa
2017-05-05 20:52           ` Matthias Kaehlcke
2017-05-06  9:57             ` Ingo Molnar [this message]
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=20170506095706.pzmeplmjrs2yoio3@gmail.com \
    --to=mingo@kernel.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=mka@chromium.org \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).