[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <26329195-584e-afe3-d0c2-4715a48128a6@huawei.com>
Date: Sat, 3 Dec 2022 09:20:31 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: <hpa@...or.com>, <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<mingo@...hat.com>, <bp@...en8.de>, <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH v2] x86/alternative: fix undefined reference to
__ibt_endbr_seal[_end]
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
Powered by blists - more mailing lists