public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	James Y Knight <jyknight@google.com>,
	Chandler Carruth <chandlerc@google.com>,
	Stephen Hines <srhines@google.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Kees Cook <keescook@google.com>,
	Guenter Roeck <groeck@chromium.org>,
	Greg Hackmann <ghackmann@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [GIT PULL] x86/build changes for v4.17
Date: Wed, 4 Apr 2018 12:17:24 -0700	[thread overview]
Message-ID: <20180404191724.GF87376@google.com> (raw)
In-Reply-To: <20180404093007.GI4082@hirez.programming.kicks-ass.net>

El Wed, Apr 04, 2018 at 11:30:07AM +0200 Peter Zijlstra ha dit:

> On Tue, Apr 03, 2018 at 11:06:58AM -0700, Matthias Kaehlcke wrote:
> 
> > Yes, Chrome OS R67 (currently dev, soon beta) will ship a kernel built
> > with Clang for multiple x86 Chromebooks.
> 
> But there are still _known_ miscompilations....

Our compiler team is looking into this (missing option
-fno-delete-null-pointer-checks)

So far we didn't encounter any actual issues clearly linked to this,
neither during internal testing nor from devices in the field (some
arm64 devices use a kernel built with clang since R63, some x86
devices shipped with a clang built kernel with R63 and R64). Obviously
there might be latent issues and we are working on fixing the
underlying problem.

> > Given that it takes time for distributions to roll out new compiler
> > versions I would like to ask for a longer period of 'exemption' from
> > asm-goto for Clang, at least if it isn't an actual burden for the
> > kernel, like preventing important features from being added. An ideal
> > time would be after the next-next LTS version, if this is considered
> > too far out, after the next LTS version would be the second best time
> > IMO. Let me be clear, this is *not* to delay the implementation of
> > asm-goto, but to facilitate the use of Clang-built kernels by other
> > projects and distributions, as well as automated builds of upstream
> > kernels with Clang, without requiring necessarily the very latest
> > version of Clang or extra patches.
> 
> I don't think that's sane or realistic, given that the very latest clang
> is _known_ to miscompile the kernel. How can you want to support older
> compilers that are therefore also known to not work correctly.
> 
> Next LTS is still a fair way out, if we take LTS release to be
> every ~5 releases, the next one would be ~.19, that's still 3 releases
> hence. That's a _long_ time.
> 
> I don't see the point in waiting that long for a compiler that doesn't
> work even without asm-goto.

Even with clang having known issues it would be preferable not to
break kernel builds with clang, if this doesn't place a signifcant
burden on the kernel. I'm not sure it is strictly necessary to 'wait'
for clang to enforce asm-goto for gcc (and thus the vast majority of
builds), which is the primary goal of your patch. Couldn't we just
exclude clang for now from raising the error when lack of asm-goto
support is detected?

  reply	other threads:[~2018-04-04 19:17 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-02  9:50 [GIT PULL] x86/build changes for v4.17 Ingo Molnar
2018-04-02 21:44 ` Linus Torvalds
2018-04-02 22:38   ` Matthias Kaehlcke
2018-04-03  1:26     ` Matthias Kaehlcke
2018-04-03  8:59   ` Peter Zijlstra
2018-04-03  9:51     ` Ingo Molnar
2018-04-03 12:09       ` Peter Zijlstra
2018-04-03 18:06       ` Matthias Kaehlcke
2018-04-03 21:58         ` Nick Desaulniers
2018-04-04  9:19           ` Peter Zijlstra
2018-04-04  9:38           ` Greg KH
2018-04-04 16:49             ` Nick Desaulniers
2018-04-04 17:13               ` Linus Torvalds
2018-04-04 17:46                 ` Nick Desaulniers
2018-04-04 23:10                 ` Nick Desaulniers
2018-04-04 16:53             ` Nick Desaulniers
2018-04-04 16:59               ` Greg KH
2018-04-04 19:26                 ` James Y Knight
2018-04-04 19:42                   ` Linus Torvalds
2018-04-04 22:21                     ` James Y Knight
2018-04-04 22:29                       ` Linus Torvalds
2018-04-05  7:08                       ` Peter Zijlstra
2018-04-05 16:21                         ` James Y Knight
2018-04-04 19:32               ` Josh Poimboeuf
2018-06-07 19:23                 ` Nick Desaulniers
2018-06-07 20:11                   ` Greg KH
2018-04-04  9:30         ` Peter Zijlstra
2018-04-04 19:17           ` Matthias Kaehlcke [this message]
2018-04-04 20:33             ` Arnd Bergmann
2018-04-04 20:58               ` Matthias Kaehlcke
2018-04-04 21:11                 ` Arnd Bergmann
2018-04-04 21:46                   ` Matthias Kaehlcke
2018-04-04 21:59                     ` Linus Torvalds
2018-04-04 22:17                       ` Matthias Kaehlcke
2018-04-04 22:39                         ` Linus Torvalds
2018-04-04 23:31                           ` Matthias Kaehlcke
2018-04-05  0:05                             ` Linus Torvalds
2018-04-05  0:20                               ` Kees Cook
2018-04-05  7:24                               ` Peter Zijlstra
2018-04-05  8:04                                 ` Ingo Molnar
2018-04-05  8:24                                   ` Peter Zijlstra
2018-04-05 16:43                                 ` Linus Torvalds
2018-04-05  7:20                             ` Peter Zijlstra
2018-04-05 17:46                               ` James Y Knight
2018-04-05 18:06                                 ` Linus Torvalds
2018-04-05 20:51                                   ` James Y Knight
2018-04-05 21:13                                     ` Linus Torvalds
2018-04-05 22:51                                       ` James Y Knight
2018-04-06  2:02                                         ` Linus Torvalds
2018-04-05 17:47                               ` James Y Knight
2018-04-04 23:04             ` Nick Desaulniers
2018-04-03 17:36     ` Linus Torvalds

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=20180404191724.GF87376@google.com \
    --to=mka@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=chandlerc@google.com \
    --cc=ghackmann@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=groeck@chromium.org \
    --cc=jyknight@google.com \
    --cc=keescook@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=srhines@google.com \
    --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