[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200822211705.GA1382515@rani.riverdale.lan>
Date: Sat, 22 Aug 2020 17:17:05 -0400
From: Arvind Sankar <nivedita@...m.mit.edu>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Sedat Dilek <sedat.dilek@...il.com>,
Segher Boessenkool <segher@...nel.crashing.org>,
Arvind Sankar <nivedita@...m.mit.edu>,
Thomas Gleixner <tglx@...utronix.de>,
Nick Desaulniers <ndesaulniers@...gle.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Ingo Molnar <mingo@...hat.com>, Arnd Bergmann <arnd@...db.de>,
Borislav Petkov <bp@...en8.de>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Zhenzhong Duan <zhenzhong.duan@...cle.com>,
Kees Cook <keescook@...omium.org>,
Peter Zijlstra <peterz@...radead.org>,
Juergen Gross <jgross@...e.com>,
Andy Lutomirski <luto@...nel.org>,
Andrew Cooper <andrew.cooper3@...rix.com>,
LKML <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Will Deacon <will@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] x86: work around clang IAS bug referencing __force_order
On Sat, Aug 22, 2020 at 08:17:32PM +0200, Miguel Ojeda wrote:
> On Sat, Aug 22, 2020 at 11:52 AM Sedat Dilek <sedat.dilek@...il.com> wrote:
> >
> > I am asking myself who is using such ancient compilers?
>
> There are many users/companies using older versions of compilers,
> kernels and everything. GCC <= 4.9 will still be used/supported (by
> third parties) for a handful of years at least.
>
> However, the important question is whether those users/companies care
> about running the latest kernels. Many of those definitely do not want
> to touch their kernel either. For those that do, there are several
> longterms to pick from that still support 4.9, as well as other
> workarounds.
>
> Thus I am usually in favor of raising the minimum whenever new hacks
> are required to be added. On the other hand, we already raised the
> version twice this year and it is not clear to me what is the minimum
> version we would need to go for to ensure this does not bite us.
>
> > If this is a real problem with GCC version <= 5, so can this be moved
> > to a GCC specific include header-file?
> > Thinking of include/linux/compiler-gcc.h or
> > include/linux/compiler_types.h with a GCC-VERSION check?
>
> That would be better if it can be done, yes.
>
> Cheers,
> Miguel
The fix landed in gcc 6.5, 7.3 and 8.1. The bug is presumably quite
difficult to actually trigger. As a sample data point, I verified that
7.1 vs 7.1+fix have no differences on 32-bit and 64-bit x86 defconfigs,
on current mainline.
Assuming we don't want to risk removing force_order, I'd suggest
- make it an input/output operand, so it enforces ordering fully.
- either restrict it to gcc < 8, or just provide a proper definition in
some file (maybe arch/x86/kernel/cpu/common.c)?
Thanks.
Powered by blists - more mailing lists