From: Catalin Marinas <catalin.marinas@arm.com>
To: Jerome Marchand <jmarchan@redhat.com>
Cc: linux-arm-kernel@lists.infradead.org,
Pratyush Anand <pratyush.anand@gmail.com>,
Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] arm64: fix unwind_frame() for filtered out fn for function graph tracing
Date: Tue, 16 Jan 2018 17:57:34 +0000 [thread overview]
Message-ID: <20180116175734.4rp4bewr7us4jypk@armageddon.cambridge.arm.com> (raw)
In-Reply-To: <20180112104832.9417-1-jmarchan@redhat.com>
On Fri, Jan 12, 2018 at 11:48:32AM +0100, Jerome Marchand wrote:
> diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c
> index 76809ccd309c..5a528c58ef68 100644
> --- a/arch/arm64/kernel/stacktrace.c
> +++ b/arch/arm64/kernel/stacktrace.c
> @@ -59,6 +59,10 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
> #ifdef CONFIG_FUNCTION_GRAPH_TRACER
> if (tsk->ret_stack &&
> (frame->pc == (unsigned long)return_to_handler)) {
> + WARN_ON(frame->graph == -1);
> + if (frame->graph < -1)
> + frame->graph += FTRACE_NOTRACE_DEPTH;
> +
> /*
> * This is a case where function graph tracer has
> * modified a return address (LR) in a stack frame
So do we still allow this to continue if graph == -1? The following line
doesn't seem safe:
frame->pc = tsk->ret_stack[frame->graph--].ret;
--
Catalin
next prev parent reply other threads:[~2018-01-16 17:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 10:48 Jerome Marchand
2018-01-16 17:57 ` Catalin Marinas [this message]
2018-01-17 15:03 ` Jerome Marchand
2018-02-05 13:28 ` [PATCH v4] " Jerome Marchand
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=20180116175734.4rp4bewr7us4jypk@armageddon.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=jmarchan@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pratyush.anand@gmail.com \
--cc=will.deacon@arm.com \
/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®