[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200520024736.GA854786@ubuntu-s3-xlarge-x86>
Date: Tue, 19 May 2020 19:47:36 -0700
From: Nathan Chancellor <natechancellor@...il.com>
To: Qian Cai <cai@....pw>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Marco Elver <elver@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
kasan-dev <kasan-dev@...glegroups.com>,
Will Deacon <will@...nel.org>,
"Paul E . McKenney" <paulmck@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
clang-built-linux@...glegroups.com
Subject: Re: [PATCH] READ_ONCE, WRITE_ONCE, kcsan: Perform checks in __*_ONCE
variants
On Tue, May 19, 2020 at 10:28:41PM -0400, Qian Cai wrote:
>
>
> > On May 19, 2020, at 6:05 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> >
> > Yes, it's unfortunate, but we have to stop making major concessions just
> > because tools are not up to the task.
> >
> > We've done that way too much in the past and this particular problem
> > clearly demonstrates that there are limits.
> >
> > Making brand new technology depend on sane tools is not asked too
> > much. And yes, it's inconvenient, but all of us have to build tools
> > every now and then to get our job done. It's not the end of the world.
> >
> > Building clang is trivial enough and pointing the make to the right
> > compiler is not rocket science either.
>
> Yes, it all make sense from that angle. On the other hand, I want to be focus on kernel rather than compilers by using a stable and rocket-solid version. Not mentioned the time lost by compiling and properly manage my own toolchain in an automated environment, using such new version of compilers means that I have to inevitably deal with compiler bugs occasionally. Anyway, it is just some other more bugs I have to deal with, and I don’t have a better solution to offer right now.
Hi Qian,
Shameless plug but I have made a Python script to efficiently configure
then build clang specifically for building the kernel (turn off a lot of
different things that the kernel does not need).
https://github.com/ClangBuiltLinux/tc-build
I added an option '--use-good-revision', which uses an older master
version (basically somewhere between clang-10 and current master) that
has been qualified against the kernel. I currently update it every
Linux release but I am probably going to start doing it every month as
I have written a pretty decent framework to ensure that nothing is
breaking on either the LLVM or kernel side.
$ ./build-llvm.py --use-good-revision
should be all you need to get off the ground and running if you wanted
to give it a shot. The script is completely self contained by default so
it won't mess with the rest of your system. Additionally, leaving off
'--use-good-revision' will just use the master branch, which can
definitely be broken but not as often as you would think (although I
totally understand wanting to focus on kernel regressions only).
Cheers,
Nathan
Powered by blists - more mailing lists