mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	x86@kernel.org, Borislav Petkov <bp@suse.de>,
	"H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] ftrace/x86: Fix function graph tracer reset path
Date: Tue, 17 May 2016 07:08:26 +0900	[thread overview]
Message-ID: <20160517070826.6b3464c53d69ba7af14d68f8@kernel.org> (raw)
In-Reply-To: <20160516095833.08478147@gandalf.local.home>

On Mon, 16 May 2016 09:58:33 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> Nice work Masami!
> 
> On Mon, 16 May 2016 21:32:50 +0900
> Namhyung Kim <namhyung@kernel.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?

Looks good to me :)

Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>

Thanks!

> 
> -- 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)
>  


-- 
Masami Hiramatsu <mhiramat@kernel.org>

      parent reply	other threads:[~2016-05-16 22:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 13:53 Namhyung Kim
2016-05-13 14:06 ` Steven Rostedt
2016-05-15 21:41   ` Matt Fleming
2016-05-15  0:41 ` Masami Hiramatsu
2016-05-15 13:06   ` Namhyung Kim
     [not found]     ` <20160516175614.53e0ceed3ec0880526fa1799@kernel.org>
2016-05-16 12:32       ` Namhyung Kim
2016-05-16 13:58         ` Steven Rostedt
2016-05-16 14:24           ` Namhyung Kim
2016-05-16 19:03             ` Borislav Petkov
2016-05-16 19:13               ` Steven Rostedt
2016-05-16 19:19                 ` Borislav Petkov
2016-05-16 19:23                   ` Steven Rostedt
2016-05-16 19:52           ` Matt Fleming
2016-05-16 22:08           ` Masami Hiramatsu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160517070826.6b3464c53d69ba7af14d68f8@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=bp@suse.de \
    --cc=hjl.tools@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®