public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Justin Forbes <jforbes@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	linux-hardening@vger.kernel.org,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Ondrej Mosnacek <omosnace@redhat.com>
Subject: Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules
Date: Tue, 26 Jan 2021 18:06:55 +0100	[thread overview]
Message-ID: <YBBML2eB/IXcTvcn@kroah.com> (raw)
In-Reply-To: <20210126161934.z6sng4irl5teonvj@treble>

On Tue, Jan 26, 2021 at 10:19:34AM -0600, Josh Poimboeuf wrote:
> On Tue, Jan 26, 2021 at 10:15:52AM -0600, Justin Forbes wrote:
> > On Tue, Jan 26, 2021 at 10:05 AM Peter Zijlstra <peterz@infradead.org> wrote:
> > >
> > > On Tue, Jan 26, 2021 at 09:46:51AM -0600, Josh Poimboeuf wrote:
> > > > On Tue, Jan 26, 2021 at 04:15:37PM +0100, Peter Zijlstra wrote:
> > > > > On Tue, Jan 26, 2021 at 08:51:55AM -0600, Josh Poimboeuf wrote:
> > > > > > User space mixes compiler versions all the time.  The C ABI is stable.
> > > > > >
> > > > > > What specifically is the harder issue you're referring to?
> > > > >
> > > > > I don't think the C ABI captures nearly enough. Imagine trying to mix a
> > > > > compiler with and without asm-goto support (ok, we fail to build without
> > > > > by now, but just imagine).
> > > > >
> > > > > No C ABI violated, but having that GCC extention vs not having it
> > > > > radically changes the kernel ABI.
> > > > >
> > > > > I think I'm with Greg here, just don't do it.
> > > >
> > > > Ok, thank you for an actual example.  asm goto is a good one.
> > > >
> > > > But it's not a cut-and-dry issue.  Otherwise how could modversions
> > > > possibly work?
> > > >
> > > > So yes, we should enforce GCC versions, but I still haven't seen a
> > > > reason it should be more than just "same compiler and *major* version".
> > >
> > > Why bother? rebuilding the kernel and all modules is a matter of 10
> > > minutes at most on a decently beefy build box.
> > >
> > > What actual problem are we trying to solve here?
> > 
> > This is true for those of us used to working with source and building
> > by hand. For users who want everything packaged, rebuilding a kernel
> > package for install is considerably longer, and for distros providing
> > builds for multiple arches, we are looking at a couple of hours at
> > best.  From a Fedora standpoint, I am perfectly fine with it failing
> > if someone tries to build a module on gcc10 when the kernel was built
> > with gcc11.  It's tedious when the kernel was built with gcc11
> > yesterday, and a new gcc11 build today means that kernel needs to be
> > rebuilt.
> 
> Right.  It's a problem for distro users.  The compiler and kernel are in
> separate packages, with separate release cadences.  The latest compiler
> version may not exactly match what was used to build the latest kernel.

Given that distros _should_ be updating their kernel faster than the
compiler updates, what's the real issue here?  You build a kernel, and
all external modules, at the same time.  If you want to build them at
different times, you make your build system ensure they were the same
compiler so that you are "bug compatible".

And yes, it might be a pain if gcc11 gets updated every other day, but
as someone living with a "rolling-distro" you get used to it, otherwise
you just "pin" the build tools and keep that from happening.

This isn't a new thing, we've been doing this for decades, why is this
surprising?

thanks,

greg k-h

  reply	other threads:[~2021-01-27  0:20 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 20:42 [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules Josh Poimboeuf
2021-01-25 21:16 ` Masahiro Yamada
2021-01-25 21:27   ` Josh Poimboeuf
2021-01-25 21:44     ` Masahiro Yamada
2021-01-25 22:07       ` Josh Poimboeuf
2021-01-26  8:13         ` Greg KH
2021-01-26 12:44           ` Justin Forbes
2021-01-26 13:51             ` Greg KH
2021-01-26 14:51               ` Josh Poimboeuf
2021-01-26 15:00                 ` Greg KH
2021-01-26 15:15                 ` Peter Zijlstra
2021-01-26 15:46                   ` Josh Poimboeuf
2021-01-26 16:05                     ` Peter Zijlstra
2021-01-26 16:15                       ` Justin Forbes
2021-01-26 16:19                         ` Josh Poimboeuf
2021-01-26 17:06                           ` Greg KH [this message]
2021-01-26 17:47                             ` Justin Forbes
2021-01-26 16:22                       ` David Laight
2021-01-27 18:03             ` Christoph Hellwig
2021-01-26  8:12     ` Greg KH
2021-01-25 22:03 ` Kees Cook
2021-01-25 22:19   ` Josh Poimboeuf
2021-01-26 17:56     ` Kees Cook
2021-01-26 18:43       ` Josh Poimboeuf
2021-01-26 22:59         ` Kees Cook
2021-01-26 23:32           ` Josh Poimboeuf
2021-01-26  1:53   ` Masahiro Yamada
2021-01-26 12:16     ` David Laight
2021-01-27 18:02 ` Christoph Hellwig
2021-01-27 18:38   ` Josh Poimboeuf
2021-01-27 18:43     ` Christoph Hellwig
2021-01-27 18:51       ` Josh Poimboeuf
2021-01-27 22:09         ` David Laight
2021-01-28 14:29         ` Christoph Hellwig
2021-01-28 15:45           ` Josh Poimboeuf
2021-03-02 23:26 ` Josh Poimboeuf
2021-03-03 18:49   ` Masahiro Yamada
2021-03-03 19:15     ` Josh Poimboeuf
2021-03-03 19:25       ` Linus Torvalds
2021-03-03 19:38         ` Josh Poimboeuf
2021-03-03 19:57           ` Linus Torvalds
2021-03-03 20:24             ` Josh Poimboeuf
2021-03-03 20:31               ` Josh Poimboeuf
2021-03-03 20:56               ` Linus Torvalds
2021-03-03 21:45                 ` Josh Poimboeuf
2021-03-04 12:27                   ` Masahiro Yamada
2021-03-04 15:08                     ` Josh Poimboeuf
2021-03-04 15:35                       ` Masahiro Yamada
2021-03-04 19:12                         ` Linus Torvalds
2021-03-05  2:41                           ` Josh Poimboeuf
2021-03-05  2:49                             ` Linus Torvalds
2021-03-05 16:03                             ` Masahiro Yamada
2021-03-05 19:18                               ` Josh Poimboeuf
2021-03-08  9:39                                 ` David Laight
2021-03-05 15:31                           ` Masahiro Yamada
2021-03-03 21:52             ` Kees Cook
2021-03-04 12:26       ` Masahiro Yamada

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=YBBML2eB/IXcTvcn@kroah.com \
    --to=greg@kroah.com \
    --cc=jforbes@redhat.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=omosnace@redhat.com \
    --cc=peterz@infradead.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