[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200114213914.198223-1-ndesaulniers@google.com>
Date: Tue, 14 Jan 2020 13:39:14 -0800
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: arnd@...db.de
Cc: borntraeger@...ibm.com, kernel-team@...roid.com,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
luc.vanoostenryck@...il.com, mpe@...erman.id.au,
peterz@...radead.org, segher@...nel.crashing.org,
torvalds@...ux-foundation.org, will@...nel.org,
masahiroy@...nel.org
Subject: Re: [RFC PATCH 1/8] compiler/gcc: Emit build-time warning for GCC
prior to version 4.8
On Fri, Jan 10, 2020 at 06:35:02PM +0100, Arnd Bergmann wrote:
> On Fri, Jan 10, 2020 at 5:56 PM Will Deacon <will@...nel.org> wrote:
> >
> > Prior to version 4.8, GCC may miscompile READ_ONCE() by erroneously
> > discarding the 'volatile' qualifier:
> >
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145
> >
> > We've been working around this using some nasty hacks which make
> > READ_ONCE() both horribly complicated and also prevent us from enforcing
> > that it is only used on scalar types. Since GCC 4.8 is pretty old for
> > kernel builds now, emit a warning if we detect it during the build.
>
> No objection to recommending gcc-4.8, but I think this should either
> just warn once during the kernel build instead of for every file, or
> it should become a hard requirement.
Yeah, hard requirement sounds good to me. Arnd, do you have stats on which
distros have which versions of GCC (IIRC, you had some stats for the GCC 4.6
upgrade)? This allows us to clean up more cruft in the kernel (grep for
GCC_VERSION).
Will, Documentation/process/changes.rst should also be modified.
Android is still using GCC 4.9 (which is more like GCC 4.8 plus patches), but
I've been actively moving them (to Clang) over the past 2 years. I'll check
with our other internal distro's and give them a heads up.
Powered by blists - more mailing lists