[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAQaAgg+mVSw_U3_FuuqcqJNnonyhVD1M-ezv71Y+dyAww@mail.gmail.com>
Date: Thu, 4 Mar 2021 21:27:28 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Michal Marek <michal.lkml@...kovi.net>,
linux-hardening@...r.kernel.org,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Justin Forbes <jforbes@...hat.com>,
Ondrej Mosnacek <omosnace@...hat.com>,
Frank Eigler <fche@...hat.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules
On Thu, Mar 4, 2021 at 6:45 AM Josh Poimboeuf <jpoimboe@...hat.com> wrote:
>
> On Wed, Mar 03, 2021 at 12:56:52PM -0800, Linus Torvalds wrote:
> > On Wed, Mar 3, 2021 at 12:24 PM Josh Poimboeuf <jpoimboe@...hat.com> wrote:
> > >
> > > Your nack is for a different reason: GCC plugins are second-class
> > > citizens. Fair enough...
> >
> > MNo, I didn't NAK it. Quite the reverser.
> >
> > I am ABSOLUTELY against rebuilding normal object files just because
> > gcc versions change. A compiler version change makes zero difference
> > for any normal object file.
> >
> > But the gcc plugins are different. They very much _are_ tied to a
> > particular gcc version.
> >
> > Now, they are tied to a particular gcc version because they are
> > horribly badly done, and bad technology, and I went off on a bit of a
> > rant about just how bad they are, but the point is that gcc plugins
> > depend on the exact gcc version in ways that normal object files do
> > _not_.
>
> Thanks, reading comprehension is hard. I realized after re-reading that
> I interpreted your "plugins should depend on the kernel version"
> statement too broadly.
>
> Masahiro, any idea how I can make the GCC version a build dependency?
I agree with rebuilding GCC plugins when the compiler is upgraded
for *in-tree* building.
Linus had reported it a couple of months before,
and I just submitted a very easy fix.
Rebuilding plugins for external modules is not easy;
plugins are placed in the read-only directory,
/usr/src/linux-headers-$(uname -r)/scripts/gcc-plugins/.
The external modules must not (cannot) update in-tree
build artifacts. "Rebuild" means creating copies in a different
writable directory.
Doing that requires a lot of design changes.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists