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: <87y1rqow2f.ffs@tglx>
Date:   Fri, 02 Dec 2022 12:59:36 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Miaohe Lin <linmiaohe@...wei.com>, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com
Cc:     hpa@...or.com, x86@...nel.org, linux-kernel@...r.kernel.org,
        linmiaohe@...wei.com
Subject: Re: [PATCH v2] x86/alternative: fix undefined reference to
 __ibt_endbr_seal[_end]

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.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ