[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141119133856.411b0b34@gandalf.local.home>
Date: Wed, 19 Nov 2014 13:38:56 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"H. Peter Anvin" <hpa@...or.com>, williams@...hat.com,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Namhyung Kim <namhyung@...nel.org>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org
Subject: Re: [PATCH 1/2] ftrace/x86: Add frames pointers to trampoline as
necessary
On Wed, 19 Nov 2014 19:26:48 +0100 (CET)
Thomas Gleixner <tglx@...utronix.de> wrote:
> On Tue, 18 Nov 2014, Steven Rostedt wrote:
> > From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
> >
> > When CONFIG_FRAME_POINTERS are enabled, it is required that the
> > ftrace_caller and ftrace_regs_caller trampolines set up frame pointers
> > otherwise a stack trace from a function call wont print the functions
> > that called the trampoline. This is due to a check in
> > __save_stack_address():
> >
> > #ifdef CONFIG_FRAME_POINTER
> > if (!reliable)
> > return;
> > #endif
> >
> > The "reliable" variable is only set if the function address is equal to
> > contents of the address before the address the frame pointer register
> > points to. If the frame pointer is not set up for the ftrace caller
> > then this will fail the reliable test. It will miss the function that
> > called the trampoline. Worse yet, if fentry is used (gcc 4.6 and
> > beyond), it will also miss the parent, as the fentry is called before
> > the stack frame is set up. That means the bp frame pointer points
> > to the stack of just before the parent function was called.
> >
> > Cc: Thomas Gleixner <tglx@...utronix.de>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: "H. Peter Anvin" <hpa@...or.com>
> > Cc: x86@...nel.org
> > Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
>
> Shouldn't this be tagged stable?
>From the cover letter:
"I stated testing the other triggers and discovered two other bugs.
One was caused by my latest changes, but the other one has been in
mainline for some time. It's been there since 3.16, and I haven't
tested it further. It's not that big of a bug so I'm not labeling
it with stable."
I guess I can tag it. I have to see how far back it goes. My configs
for the kernels I use this with didn't have FRAME_POINTER enabled, so I
never noticed. I noticed it with my test configs.
>
> Acked-by: Thomas Gleixner <tglx@...utronix.de>
>
Thanks!
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists