Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1675609 > unrolled thread

[PATCH] x86/ftrace: Exclude functions in head64.c from function-tracing

Started by"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
First post2017-06-27 14:10 +0200
Last post2017-06-29 22:40 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] x86/ftrace: Exclude functions in head64.c from function-tracing "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2017-06-27 14:10 +0200
    Re: [PATCH] x86/ftrace: Exclude functions in head64.c from  function-tracing Steven Rostedt <rostedt@goodmis.org> - 2017-06-27 15:40 +0200
      Re: [PATCH] x86/ftrace: Exclude functions in head64.c from  function-tracing "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-06-27 16:50 +0200
        Re: [PATCH] x86/ftrace: Exclude functions in head64.c from  function-tracing Steven Rostedt <rostedt@goodmis.org> - 2017-06-27 17:00 +0200
    [tip:x86/mm] x86/ftrace: Exclude functions in head64.c from  function-tracing "tip-bot for Kirill A. Shutemov" <tipbot@zytor.com> - 2017-06-29 22:40 +0200

#1675609 — [PATCH] x86/ftrace: Exclude functions in head64.c from function-tracing

From"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Date2017-06-27 14:10 +0200
Subject[PATCH] x86/ftrace: Exclude functions in head64.c from function-tracing
Message-ID<tWXtE-hF-13@gated-at.bofh.it>
We've moved most logic of early boot up from startup_64() written in
assembly to __startup_64() written in C.

Fengguang reported breakage due to the change. It was tracked down to
CONFIG_FUNCTION_TRACER being enabled.

Looks like function-tracing of the new code is harmful.

Let's not comple the code with -pg compiler option.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
---
 arch/x86/kernel/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 4b994232cb57..0db512092f37 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -18,6 +18,7 @@ CFLAGS_REMOVE_pvclock.o = -pg
 CFLAGS_REMOVE_kvmclock.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_early_printk.o = -pg
+CFLAGS_REMOVE_head64.o = -pg
 endif
 
 KASAN_SANITIZE_head$(BITS).o				:= n
-- 
2.11.0

[toc] | [next] | [standalone]


#1675702 — Re: [PATCH] x86/ftrace: Exclude functions in head64.c from function-tracing

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-06-27 15:40 +0200
SubjectRe: [PATCH] x86/ftrace: Exclude functions in head64.c from function-tracing
Message-ID<tWYSK-18m-19@gated-at.bofh.it>
In reply to#1675609
On Tue, 27 Jun 2017 14:59:48 +0300
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> wrote:

> We've moved most logic of early boot up from startup_64() written in
> assembly to __startup_64() written in C.
> 
> Fengguang reported breakage due to the change. It was tracked down to
> CONFIG_FUNCTION_TRACER being enabled.

Is this due to code that is in linux-next or is this issue currently in
mainline?

If it is in linux-next, I'll give you:

 Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

and you can take it. If the issue happens in current mainline, then I'll
take it and push it out.

-- Steve

> 
> Looks like function-tracing of the new code is harmful.
> 
> Let's not comple the code with -pg compiler option.
> 
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> ---
>  arch/x86/kernel/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
> index 4b994232cb57..0db512092f37 100644
> --- a/arch/x86/kernel/Makefile
> +++ b/arch/x86/kernel/Makefile
> @@ -18,6 +18,7 @@ CFLAGS_REMOVE_pvclock.o = -pg
>  CFLAGS_REMOVE_kvmclock.o = -pg
>  CFLAGS_REMOVE_ftrace.o = -pg
>  CFLAGS_REMOVE_early_printk.o = -pg
> +CFLAGS_REMOVE_head64.o = -pg
>  endif
>  
>  KASAN_SANITIZE_head$(BITS).o				:= n

[toc] | [prev] | [next] | [standalone]


#1675855 — Re: [PATCH] x86/ftrace: Exclude functions in head64.c from function-tracing

From"Kirill A. Shutemov" <kirill@shutemov.name>
Date2017-06-27 16:50 +0200
SubjectRe: [PATCH] x86/ftrace: Exclude functions in head64.c from function-tracing
Message-ID<tWZYu-1RV-19@gated-at.bofh.it>
In reply to#1675702
On Tue, Jun 27, 2017 at 09:38:25AM -0400, Steven Rostedt wrote:
> On Tue, 27 Jun 2017 14:59:48 +0300
> "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> wrote:
> 
> > We've moved most logic of early boot up from startup_64() written in
> > assembly to __startup_64() written in C.
> > 
> > Fengguang reported breakage due to the change. It was tracked down to
> > CONFIG_FUNCTION_TRACER being enabled.
> 
> Is this due to code that is in linux-next or is this issue currently in
> mainline?
> 
> If it is in linux-next, I'll give you:
> 
>  Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> 
> and you can take it. If the issue happens in current mainline, then I'll
> take it and push it out.

It's in -next.

Fixes: c88d71508e36 ("x86/boot/64: Rewrite startup_64() in C")

Although, I'm not sure if commit-id is stable yet.

-- 
 Kirill A. Shutemov

[toc] | [prev] | [next] | [standalone]


#1675860 — Re: [PATCH] x86/ftrace: Exclude functions in head64.c from function-tracing

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-06-27 17:00 +0200
SubjectRe: [PATCH] x86/ftrace: Exclude functions in head64.c from function-tracing
Message-ID<tX089-1VG-9@gated-at.bofh.it>
In reply to#1675855
On Tue, 27 Jun 2017 17:44:03 +0300
"Kirill A. Shutemov" <kirill@shutemov.name> wrote:

> On Tue, Jun 27, 2017 at 09:38:25AM -0400, Steven Rostedt wrote:
> > On Tue, 27 Jun 2017 14:59:48 +0300
> > "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> wrote:
> >   
> > > We've moved most logic of early boot up from startup_64() written in
> > > assembly to __startup_64() written in C.
> > > 
> > > Fengguang reported breakage due to the change. It was tracked down to
> > > CONFIG_FUNCTION_TRACER being enabled.  
> > 
> > Is this due to code that is in linux-next or is this issue currently in
> > mainline?
> > 
> > If it is in linux-next, I'll give you:
> > 
> >  Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> > 
> > and you can take it. If the issue happens in current mainline, then I'll
> > take it and push it out.  
> 
> It's in -next.
> 
> Fixes: c88d71508e36 ("x86/boot/64: Rewrite startup_64() in C")
> 
> Although, I'm not sure if commit-id is stable yet.
> 

OK, great! Then you can take the patch along with that change, and just
add the above Acked-by from me.

-- Steve

[toc] | [prev] | [next] | [standalone]


#1678179 — [tip:x86/mm] x86/ftrace: Exclude functions in head64.c from function-tracing

From"tip-bot for Kirill A. Shutemov" <tipbot@zytor.com>
Date2017-06-29 22:40 +0200
Subject[tip:x86/mm] x86/ftrace: Exclude functions in head64.c from function-tracing
Message-ID<tXOoi-40D-13@gated-at.bofh.it>
In reply to#1675609
Commit-ID:  bb43dbc5e09d52c6085dfee65f4f923b3fbcd1d4
Gitweb:     http://git.kernel.org/tip/bb43dbc5e09d52c6085dfee65f4f923b3fbcd1d4
Author:     Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
AuthorDate: Tue, 27 Jun 2017 14:59:48 +0300
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 29 Jun 2017 22:33:27 +0200

x86/ftrace: Exclude functions in head64.c from function-tracing

A recent commit moved most logic of early boot up from startup_64() written
in assembly to __startup_64() written in C.

Fengguang reported breakage due to the change. It was tracked down to
CONFIG_FUNCTION_TRACER being enabled.

Tracing this function is not possible because it's invoked from the
earliest boot stage before the relocation fixups have been done. It is the
function doing the relocation.

Exclude it from being built with tracer stubs.

Fixes: c88d71508e36 ("x86/boot/64: Rewrite startup_64() in C")
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: lkp@01.org
Link: http://lkml.kernel.org/r/20170627115948.17938-1-kirill.shutemov@linux.intel.com

---
 arch/x86/kernel/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 4b99423..0db5120 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -18,6 +18,7 @@ CFLAGS_REMOVE_pvclock.o = -pg
 CFLAGS_REMOVE_kvmclock.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_early_printk.o = -pg
+CFLAGS_REMOVE_head64.o = -pg
 endif
 
 KASAN_SANITIZE_head$(BITS).o				:= n

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web