Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: Nadav Amit <namit@vmware.com>
To: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>, "H . Peter Anvin" <hpa@zytor.com>,
	X86 ML <x86@kernel.org>, Richard Biener <rguenther@suse.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Logan Gunthorpe <logang@deltatee.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	Michal Marek <michal.lkml@markovi.net>,
	"linux-sparse@vger.kernel.org" <linux-sparse@vger.kernel.org>,
	Alok
Subject: Re: [PATCH] kbuild, x86: revert macros in extended asm workarounds
Date: Tue, 18 Dec 2018 19:33:07 +0000	[thread overview]
Message-ID: <A6321F73-0084-423B-8BEE-C23BF6BD1544@vmware.com> (raw)
In-Reply-To: <CA+icZUUnkGBp-3pJxE_s_Oc+pdNBrVc_ngYUwpv7zLEbtE_eVg@mail.gmail.com>

> On Dec 17, 2018, at 1:16 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> 
> On Thu, Dec 13, 2018 at 10:19 AM Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>> Revert the following commits:
>> 
>> - 5bdcd510c2ac9efaf55c4cbd8d46421d8e2320cd
>>  ("x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs")
>> 
>> - d5a581d84ae6b8a4a740464b80d8d9cf1e7947b2
>>  ("x86/cpufeature: Macrofy inline assembly code to work around GCC inlining bugs")
>> 
>> - 0474d5d9d2f7f3b11262f7bf87d0e7314ead9200.
>>  ("x86/extable: Macrofy inline assembly code to work around GCC inlining bugs")
>> 
>> - 494b5168f2de009eb80f198f668da374295098dd.
>>  ("x86/paravirt: Work around GCC inlining bugs when compiling paravirt ops")
>> 
>> - f81f8ad56fd1c7b99b2ed1c314527f7d9ac447c6.
>>  ("x86/bug: Macrofy the BUG table section handling, to work around GCC inlining bugs")
>> 
>> - 77f48ec28e4ccff94d2e5f4260a83ac27a7f3099.
>>  ("x86/alternatives: Macrofy lock prefixes to work around GCC inlining bugs")
>> 
>> - 9e1725b410594911cc5981b6c7b4cea4ec054ca8.
>>  ("x86/refcount: Work around GCC inlining bug")
>>  (Conflicts: arch/x86/include/asm/refcount.h)
>> 
>> - c06c4d8090513f2974dfdbed2ac98634357ac475.
>>  ("x86/objtool: Use asm macros to work around GCC inlining bugs")
>> 
>> - 77b0bf55bc675233d22cd5df97605d516d64525e.
>>  ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs")
>> 
>> A few days after those commits applied, discussion started to solve
>> the issue more elegantly on the compiler side:
>> 
>>  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2018%2F10%2F7%2F92&amp;data=02%7C01%7Cnamit%40vmware.com%7C40b5df8a38e54f310ab708d664005ee0%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C1%7C636806350113136223&amp;sdata=RlYXSyhzM6HLQuKC2NuyDqvke9qZ11tvMDNd32NiF2U%3D&amp;reserved=0
>> 
>> The "asm inline" was implemented by Segher Boessenkool, and now queued
>> up for GCC 9. (People were positive even for back-porting it to older
>> compilers).
>> 
>> Since the in-kernel workarounds merged, some issues have been reported:
>> breakage of building with distcc/icecc, breakage of distro packages for
>> module building. (More fundamentally, we cannot build external modules
>> after 'make clean')
>> 
>> Patching around the build system would make the code even uglier.
>> 
>> Given that this issue will be solved in a cleaner way sooner or later,
>> let's revert the in-kernel workarounds, and wait for GCC 9.
>> 
>> Reported-by: Logan Gunthorpe <logang@deltatee.com> # distcc
>> Reported-by: Sedat Dilek <sedat.dilek@gmail.com> # debian/rpm package
> 
> Hi,
> 
> I reported the issue with debian package breakage in [1].
> 
> I am not subscribed to any involved mailing-list and not following all
> the discussions.
> I see the situation is not easy as there is especially linux-kbuild
> and linux/x86 involved and maybe other interests.
> But I am interested in having a fix in v4.20 final and hope this all
> still works with LLVM/Clang.
> 
> I can offer my help in testing - against Linux v4.20-rc7.
> Not sure if all discussed material is in upstream or elsewhere.
> What is your suggestion for me as a tester?
> 
> Will we have a solution in Linux v4.20 final?

Thanks for the reference. I see solutions have already been developed. So
it’s Masahiro’s call.


WARNING: multiple messages have this Message-ID (diff)
From: Nadav Amit <namit@vmware.com>
To: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>, "H . Peter Anvin" <hpa@zytor.com>,
	X86 ML <x86@kernel.org>, Richard Biener <rguenther@suse.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Logan Gunthorpe <logang@deltatee.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	Michal Marek <michal.lkml@markovi.net>,
	"linux-sparse@vger.kernel.org" <linux-sparse@vger.kernel.org>,
	Alok Kataria <akataria@vmware.com>,
	Juergen Gross <jgross@suse.com>,
	Andy Lutomirski <luto@kernel.org>,
	"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH] kbuild, x86: revert macros in extended asm workarounds
Date: Tue, 18 Dec 2018 19:33:07 +0000	[thread overview]
Message-ID: <A6321F73-0084-423B-8BEE-C23BF6BD1544@vmware.com> (raw)
Message-ID: <20181218193307.D_ZjPw7fqwVR47QVljluAxktGxY6f9Zmcax0RK8N5BA@z> (raw)
In-Reply-To: <CA+icZUUnkGBp-3pJxE_s_Oc+pdNBrVc_ngYUwpv7zLEbtE_eVg@mail.gmail.com>

> On Dec 17, 2018, at 1:16 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> 
> On Thu, Dec 13, 2018 at 10:19 AM Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>> Revert the following commits:
>> 
>> - 5bdcd510c2ac9efaf55c4cbd8d46421d8e2320cd
>>  ("x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs")
>> 
>> - d5a581d84ae6b8a4a740464b80d8d9cf1e7947b2
>>  ("x86/cpufeature: Macrofy inline assembly code to work around GCC inlining bugs")
>> 
>> - 0474d5d9d2f7f3b11262f7bf87d0e7314ead9200.
>>  ("x86/extable: Macrofy inline assembly code to work around GCC inlining bugs")
>> 
>> - 494b5168f2de009eb80f198f668da374295098dd.
>>  ("x86/paravirt: Work around GCC inlining bugs when compiling paravirt ops")
>> 
>> - f81f8ad56fd1c7b99b2ed1c314527f7d9ac447c6.
>>  ("x86/bug: Macrofy the BUG table section handling, to work around GCC inlining bugs")
>> 
>> - 77f48ec28e4ccff94d2e5f4260a83ac27a7f3099.
>>  ("x86/alternatives: Macrofy lock prefixes to work around GCC inlining bugs")
>> 
>> - 9e1725b410594911cc5981b6c7b4cea4ec054ca8.
>>  ("x86/refcount: Work around GCC inlining bug")
>>  (Conflicts: arch/x86/include/asm/refcount.h)
>> 
>> - c06c4d8090513f2974dfdbed2ac98634357ac475.
>>  ("x86/objtool: Use asm macros to work around GCC inlining bugs")
>> 
>> - 77b0bf55bc675233d22cd5df97605d516d64525e.
>>  ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs")
>> 
>> A few days after those commits applied, discussion started to solve
>> the issue more elegantly on the compiler side:
>> 
>>  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2018%2F10%2F7%2F92&amp;data=02%7C01%7Cnamit%40vmware.com%7C40b5df8a38e54f310ab708d664005ee0%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C1%7C636806350113136223&amp;sdata=RlYXSyhzM6HLQuKC2NuyDqvke9qZ11tvMDNd32NiF2U%3D&amp;reserved=0
>> 
>> The "asm inline" was implemented by Segher Boessenkool, and now queued
>> up for GCC 9. (People were positive even for back-porting it to older
>> compilers).
>> 
>> Since the in-kernel workarounds merged, some issues have been reported:
>> breakage of building with distcc/icecc, breakage of distro packages for
>> module building. (More fundamentally, we cannot build external modules
>> after 'make clean')
>> 
>> Patching around the build system would make the code even uglier.
>> 
>> Given that this issue will be solved in a cleaner way sooner or later,
>> let's revert the in-kernel workarounds, and wait for GCC 9.
>> 
>> Reported-by: Logan Gunthorpe <logang@deltatee.com> # distcc
>> Reported-by: Sedat Dilek <sedat.dilek@gmail.com> # debian/rpm package
> 
> Hi,
> 
> I reported the issue with debian package breakage in [1].
> 
> I am not subscribed to any involved mailing-list and not following all
> the discussions.
> I see the situation is not easy as there is especially linux-kbuild
> and linux/x86 involved and maybe other interests.
> But I am interested in having a fix in v4.20 final and hope this all
> still works with LLVM/Clang.
> 
> I can offer my help in testing - against Linux v4.20-rc7.
> Not sure if all discussed material is in upstream or elsewhere.
> What is your suggestion for me as a tester?
> 
> Will we have a solution in Linux v4.20 final?

Thanks for the reference. I see solutions have already been developed. So
it’s Masahiro’s call.


  parent reply	other threads:[~2018-12-18 19:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13  9:17 [PATCH] kbuild, x86: revert macros in extended asm workarounds Masahiro Yamada
2018-12-13  9:17 ` Masahiro Yamada
2018-12-13 10:51 ` Peter Zijlstra
2018-12-13 10:51   ` Peter Zijlstra
2018-12-15  0:51   ` Masahiro Yamada
2018-12-15  0:51     ` Masahiro Yamada
2018-12-16  2:33     ` Nadav Amit
2018-12-16  2:33       ` Nadav Amit
2018-12-16 10:00       ` Borislav Petkov via Virtualization
2018-12-16 10:00         ` Borislav Petkov
2018-12-17  1:00         ` Nadav Amit
2018-12-17  1:00           ` Nadav Amit
2018-12-17  9:16 ` Sedat Dilek
2018-12-17  9:16   ` Sedat Dilek
2018-12-18 19:33   ` Nadav Amit [this message]
2018-12-18 19:33     ` Nadav Amit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A6321F73-0084-423B-8BEE-C23BF6BD1544@vmware.com \
    --to=namit@vmware.com \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=michal.lkml@markovi.net \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rguenther@suse.de \
    --cc=sedat.dilek@gmail.com \
    --cc=segher@kernel.crashing.org \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox