[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87h7t6tpye.fsf@nanos.tec.linutronix.de>
Date: Thu, 13 Aug 2020 19:28:57 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Nick Desaulniers <ndesaulniers@...gle.com>,
Ingo Molnar <mingo@...hat.com>
Cc: 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>,
"Paul E. McKenney" <paulmck@...nel.org>,
Will Deacon <will@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] x86: work around clang IAS bug referencing __force_order
Nick Desaulniers <ndesaulniers@...gle.com> writes:
> On Thu, Aug 6, 2020 at 3:11 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>> > + *
>> > + * Clang sometimes fails to kill the reference to the dummy variable, so
>> > + * provide an actual copy.
>>
>> Can that compiler be fixed instead?
>
> I don't think so. The logic in the compiler whether to emit an
Forget that I asked. Heat induced brain damaged.
> I'd much rather remove all of __force_order.
Right.
> Not sure about the comment in arch/x86/include/asm/special_insns.h
> either; smells fishy like a bug with a compiler from a long time ago.
> It looks like it was introduced in:
> commit d3ca901f94b32 ("x86: unify paravirt parts of system.h")
> Lore has this thread:
> https://lore.kernel.org/lkml/4755A809.4050305@qumranet.com/
> Patch 4: https://lore.kernel.org/lkml/11967844071346-git-send-email-gcosta@redhat.com/
> It seems like there was a discussion about %cr8, but no one asked
> "what's going on here with __force_order, is that right?"
Correct and the changelog is uselss in this regard.
> Quick boot test of the below works for me, though I should probably
> test hosting a virtualized guest since d3ca901f94b32 refers to
> paravirt. Thoughts?
Let me ask (hopefully) useful questions this time:
Is a compiler allowed to reorder two 'asm volatile()'?
Are there compilers (gcc >= 4.9 or other supported ones) which do that?
Thanks,
tglx
Powered by blists - more mailing lists