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: <20160516095833.08478147@gandalf.local.home>
Date:	Mon, 16 May 2016 09:58:33 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Masami Hiramatsu <mhiramat@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>, x86@...nel.org,
	Borislav Petkov <bp@...e.de>, "H.J. Lu" <hjl.tools@...il.com>
Subject: Re: [PATCH] ftrace/x86: Fix function graph tracer reset path


Nice work Masami!

On Mon, 16 May 2016 21:32:50 +0900
Namhyung Kim <namhyung@...nel.org> wrote:

    
> >     -/* This is global to keep gas from relaxing the jumps */
> >     -ENTRY(early_idt_handler)
> >     +/* This is weak to keep gas from relaxing the jumps */
> >     +WEAK(early_idt_handler)
> >      	cld

> So IIUC, this -mshared option disables the optimization on branch
> instructions and generates slightly bigger code.  Not sure how much
> affected by this though.
> 
> Steve, do you think it's better to use this option?

Can we solve this by doing the same thing it did for the kernel?

-- Steve

diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S
index ed48a9f465f8..e13a695c3084 100644
--- a/arch/x86/kernel/mcount_64.S
+++ b/arch/x86/kernel/mcount_64.S
@@ -182,7 +182,8 @@ GLOBAL(ftrace_graph_call)
 	jmp ftrace_stub
 #endif
 
-GLOBAL(ftrace_stub)
+/* This is weak to keep gas from relaxing the jumps */
+WEAK(ftrace_stub)
 	retq
 END(ftrace_caller)
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ