From: Miaohe Lin <linmiaohe@huawei.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: <hpa@zytor.com>, <x86@kernel.org>, <linux-kernel@vger.kernel.org>,
<mingo@redhat.com>, <bp@alien8.de>, <dave.hansen@linux.intel.com>
Subject: Re: [PATCH v2] x86/alternative: fix undefined reference to __ibt_endbr_seal[_end]
Date: Sat, 3 Dec 2022 09:20:31 +0800 [thread overview]
Message-ID: <26329195-584e-afe3-d0c2-4715a48128a6@huawei.com> (raw)
In-Reply-To: <87y1rqow2f.ffs@tglx>
On 2022/12/2 19:59, Thomas Gleixner wrote:
> On Tue, Oct 11 2022 at 19:38, Miaohe Lin wrote:
>> Due to the explicit 'noinline' GCC-7.3 is not able to optimize away the
>> argument setup of:
>>
>> apply_ibt_endbr(__ibt_endbr_seal, __ibt_enbr_seal_end);
>>
>> even when X86_KERNEL_IBT=n and the function is an empty stub which leads
>> to link errors due to missing __ibt_endbr_seal* symbols like below:
>>
>> ld: arch/x86/kernel/alternative.o: in function
>> `alternative_instructions':
>> alternative.c:(.init.text+0x15d): undefined reference to
>> `__ibt_endbr_seal_end'
>> ld: alternative.c:(.init.text+0x164): undefined reference to
>> `__ibt_endbr_seal'
>
> This is incomplete because the noinline is only visible within
> alternative.c, but there is another caller in module.c
>
> This needs an inline stub in the header to be correct.
>
I see. I think I should update my gcc instead :) Thanks for your reply.
Thanks,
Miaohe Lin
next prev parent reply other threads:[~2022-12-03 1:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 11:38 Miaohe Lin
2022-10-11 3:46 ` Miaohe Lin
2022-12-02 8:46 ` Miaohe Lin
2022-12-02 11:59 ` Thomas Gleixner
2022-12-03 1:20 ` Miaohe Lin [this message]
2022-12-05 10:59 ` [tip: x86/urgent] x86/alternative: Remove noinline from __ibt_endbr_seal[_end]() stubs tip-bot2 for Miaohe Lin
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=26329195-584e-afe3-d0c2-4715a48128a6@huawei.com \
--to=linmiaohe@huawei.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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
all inboxes | Powered by JetHome®