lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y0K+YbcwyLJg9Iwr@hirez.programming.kicks-ass.net>
Date:   Sun, 9 Oct 2022 14:28:17 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Miaohe Lin <linmiaohe@...wei.com>
Cc:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, hpa@...or.com, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/alternative: fix undefined reference to
 __ibt_endbr_seal[_end]

On Sun, Oct 09, 2022 at 11:45:32PM +0800, Miaohe Lin wrote:
> When I compile the kernel bzImage, there are several compile errors:
> 
> 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'
> 
> It's because __ibt_endbr_seal and __ibt_endbr_seal_end are not optimized
> away when CONFIG_X86_KERNEL_IBT isn't enabled. Remove noinline attribute
> to help gcc optimize them away.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
>  arch/x86/kernel/alternative.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
> index 5cadcea035e0..beaf9fc44e2f 100644
> --- a/arch/x86/kernel/alternative.c
> +++ b/arch/x86/kernel/alternative.c
> @@ -624,7 +624,7 @@ void __init_or_module noinline apply_ibt_endbr(s32 *start, s32 *end)
>  
>  #else
>  
> -void __init_or_module noinline apply_ibt_endbr(s32 *start, s32 *end) { }
> +void __init_or_module apply_ibt_endbr(s32 *start, s32 *end) { }
>  
>  #endif /* CONFIG_X86_KERNEL_IBT */
>  

None of this makes any sense...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ