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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220407160715.GB2762@worktop.programming.kicks-ass.net>
Date:   Thu, 7 Apr 2022 18:07:15 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Poimboe, Josh" <jpoimboe@...hat.com>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: IBT related objtool warnings

On Thu, Apr 07, 2022 at 05:51:06PM +0200, Peter Zijlstra wrote:
> On Wed, Apr 06, 2022 at 10:43:33PM +0000, Edgecombe, Rick P wrote:
> > Hi,
> > 
> > After commit:
> > ed53a0d97192 x86/alternative: Use .ibt_endbr_seal to seal indirect calls
> > 
> > I am getting objtool "unreachable instruction" warnings.
> > 
> > On one system with gcc 8.4.0:
> > vmlinux.o: warning: objtool: start_secondary()+0x10e: unreachable
> > instruction
> > 
> > On another with gcc 11.2.1:
> > vmlinux.o: warning: objtool: pvh_start_xen()+0x0: unreachable
> > instruction
> > 
> > Let me know if any tests on my end would help.
> 
> This seems to make it go on gcc-11.2 tip/x86/urgent..
> 
> ---
> 
>  arch/x86/entry/entry_64.S    | 3 +++
>  arch/x86/platform/pvh/head.S | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
> index 4faac48ebec5..73d958522b6a 100644
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -337,6 +337,9 @@ SYM_CODE_END(ret_from_fork)
>  
>  	call	\cfunc
>  
> +	/* For some configurations \cfunc ends up being a noreturn. */
> +	REACHABLE
> +
>  	jmp	error_return
>  .endm
>  
> diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S
> index 72c1e42d121d..7fe564eaf228 100644
> --- a/arch/x86/platform/pvh/head.S
> +++ b/arch/x86/platform/pvh/head.S
> @@ -50,6 +50,7 @@
>  #define PVH_DS_SEL		(PVH_GDT_ENTRY_DS * 8)
>  
>  SYM_CODE_START_LOCAL(pvh_start_xen)
> +	UNWIND_HINT_EMPTY
>  	cld
>  
>  	lgdt (_pa(gdt))

And this for gcc-8.4

---
 include/linux/cpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 9cf51e41e697..54dc2f9a2d56 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -167,7 +167,7 @@ static inline int suspend_disable_secondary_cpus(void) { return 0; }
 static inline void suspend_enable_secondary_cpus(void) { }
 #endif /* !CONFIG_PM_SLEEP_SMP */
 
-void cpu_startup_entry(enum cpuhp_state state);
+void __noreturn cpu_startup_entry(enum cpuhp_state state);
 
 void cpu_idle_poll_ctrl(bool enable);
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ