public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tor Vic <torvic9@mailbox.org>
To: Nathan Chancellor <nathan@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ndesaulniers@google.com" <ndesaulniers@google.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>,
	"clang-built-linux@googlegroups.com" 
	<clang-built-linux@googlegroups.com>,
	"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH] x86/Makefile: make -stack-alignment conditional on LLD < 13.0.0
Date: Thu, 10 Jun 2021 18:39:45 +0000	[thread overview]
Message-ID: <ba06e4f5-709a-08cc-0f62-e50c64fc301f@mailbox.org> (raw)
In-Reply-To: <ea01f4cb-3e65-0b79-ae93-ba0957e076fc@kernel.org>

Hi Nathan,

On 10.06.21 16:42, Nathan Chancellor wrote:
> Hi Tor,
> 
> On 6/10/2021 2:28 AM, torvic9@mailbox.org wrote:
>> Since LLVM commit 3787ee4, the '-stack-alignment' flag has been
>> dropped [1],
>> leading to the following error message when building a LTO kernel with
>> Clang-13 and LLD-13:
>>
>>      ld.lld: error: -plugin-opt=-: ld.lld: Unknown command line argument
>>      '-stack-alignment=8'.  Try 'ld.lld --help'
>>      ld.lld: Did you mean '--stackrealign=8'?
>>
>> It also appears that the '-code-model' flag is not necessary anymore
>> starting
>> with LLVM-9 [2].
>>
>> Drop '-code-model' and make '-stack-alignment' conditional on LLD <
>> 13.0.0.
>>
>> This is for linux-stable 5.12.
>> Another patch will be submitted for 5.13 shortly (unless there are
>> objections).
> 
> This patch needs to be accepted into mainline first before it can go to
> stable so this line needs to be removed. The rest of the description
> looks good to me, good job on being descriptive!
> 

Thank you for explaining this.
I wasn't exactly sure how the procedure for stable was.
Does this mean that the patch should be based on 5.13?
I usually use Linus' tree mirrored at GitHub.

>> Discussion: https://github.com/ClangBuiltLinux/linux/issues/1377
>> [1]: https://reviews.llvm.org/D103048
>> [2]: https://reviews.llvm.org/D52322
> 
> As Greg's auto-response points out, there needs to be an actual
> 
> Cc: stable@vger.kernel.org
> 
> here in the patch, rather than just cc'ing stable@vger.kernel.org
> through email.
> 

Yes I misinterpreted this in the sense of "put stable mail in CC".
So if I get this right, I should NOT put stable email in CC, but only
add the "Cc: stable@vger.kernel.org" tag above the "Signed-off-by"?

>> Signed-off-by: Tor Vic <torvic9@mailbox.org>
> 
> The actual patch itself looks good and I have verified that it fixes the
> build error. On the resend with the above fixed, please feel free to add:
> 
> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> Tested-by: Nathan Chancellor <nathan@kernel.org>
> 
>> ---
>>   arch/x86/Makefile | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
>> index 1f2e5bf..2855a1a 100644
>> --- a/arch/x86/Makefile
>> +++ b/arch/x86/Makefile
>> @@ -192,8 +192,9 @@ endif
>>   KBUILD_LDFLAGS += -m elf_$(UTS_MACHINE)
>>     ifdef CONFIG_LTO_CLANG
>> -KBUILD_LDFLAGS    += -plugin-opt=-code-model=kernel \
>> -           -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8)
>> +ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 130000; echo $$?),0)
>> +KBUILD_LDFLAGS    += -plugin-opt=-stack-alignment=$(if
>> $(CONFIG_X86_32),4,8)
>> +endif
>>   endif
>>     ifdef CONFIG_X86_NEED_RELOCS
>>
> 
> Cheers,
> Nathan

Thanks for your help!
Tor


  reply	other threads:[~2021-06-10 18:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10  9:28 [PATCH] x86/Makefile: make -stack-alignment conditional on LLD < 13.0.0 torvic9
2021-06-10 10:04 ` Greg KH
2021-06-10 16:42 ` Nathan Chancellor
2021-06-10 18:39   ` Tor Vic [this message]
2021-06-10 19:17     ` Nick Desaulniers
2021-06-10 19:20 ` Nick Desaulniers
2021-06-10 20:16   ` Tor Vic
2021-06-10 20:40     ` Nathan Chancellor
2021-06-11  8:07   ` David Laight

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=ba06e4f5-709a-08cc-0f62-e50c64fc301f@mailbox.org \
    --to=torvic9@mailbox.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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