* [PATCH] perf tools: arm-spe: Fix uninitialized record error variable
@ 2018-08-10 22:45 Kim Phillips
2018-08-13 18:55 ` Arnaldo Carvalho de Melo
2018-08-18 11:57 ` [tip:perf/urgent] perf arm spe: " tip-bot for Kim Phillips
0 siblings, 2 replies; 4+ messages in thread
From: Kim Phillips @ 2018-08-10 22:45 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Ingo Molnar, Alexander Shishkin, Jiri Olsa,
Namhyung Kim, Dongjiu Geng, Adrian Hunter, linux-kernel
The auxtrace init variable 'err' was not being initialized, leading
perf to abort early in an SPE record command when there was no explicit
error, rather only based whatever memory contents were on the stack.
Initialize it explicitly on getting an SPE successfully, the same way
cs-etm does.
Signed-off-by: Kim Phillips <kim.phillips@arm.com>
---
Hi Arnaldo, please apply to perf/urgent / stable series if at all
possible. Thank you.
tools/perf/arch/arm64/util/arm-spe.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index 1120e39c1b00..5ccfce87e693 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -194,6 +194,7 @@ struct auxtrace_record *arm_spe_recording_init(int *err,
sper->itr.read_finish = arm_spe_read_finish;
sper->itr.alignment = 0;
+ *err = 0;
return &sper->itr;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf tools: arm-spe: Fix uninitialized record error variable
2018-08-10 22:45 [PATCH] perf tools: arm-spe: Fix uninitialized record error variable Kim Phillips
@ 2018-08-13 18:55 ` Arnaldo Carvalho de Melo
2018-08-13 18:59 ` Arnaldo Carvalho de Melo
2018-08-18 11:57 ` [tip:perf/urgent] perf arm spe: " tip-bot for Kim Phillips
1 sibling, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-08-13 18:55 UTC (permalink / raw)
To: Kim Phillips
Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Ingo Molnar,
Alexander Shishkin, Jiri Olsa, Namhyung Kim, Dongjiu Geng,
Adrian Hunter, linux-kernel
Em Fri, Aug 10, 2018 at 05:45:12PM -0500, Kim Phillips escreveu:
> The auxtrace init variable 'err' was not being initialized, leading
> perf to abort early in an SPE record command when there was no explicit
> error, rather only based whatever memory contents were on the stack.
> Initialize it explicitly on getting an SPE successfully, the same way
> cs-etm does.
>
> Signed-off-by: Kim Phillips <kim.phillips@arm.com>
> ---
> Hi Arnaldo, please apply to perf/urgent / stable series if at all
> possible. Thank you.
In such cases the best thing is to have a "Fixes: ..." so that this gets
automatically picked by the stabe trees, I'll try to find out what was
the patch that introduced this problem.
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf tools: arm-spe: Fix uninitialized record error variable
2018-08-13 18:55 ` Arnaldo Carvalho de Melo
@ 2018-08-13 18:59 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-08-13 18:59 UTC (permalink / raw)
To: Kim Phillips
Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Ingo Molnar,
Alexander Shishkin, Jiri Olsa, Namhyung Kim, Dongjiu Geng,
Adrian Hunter, linux-kernel
Em Mon, Aug 13, 2018 at 03:55:11PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Aug 10, 2018 at 05:45:12PM -0500, Kim Phillips escreveu:
> > The auxtrace init variable 'err' was not being initialized, leading
> > perf to abort early in an SPE record command when there was no explicit
> > error, rather only based whatever memory contents were on the stack.
> > Initialize it explicitly on getting an SPE successfully, the same way
> > cs-etm does.
> >
> > Signed-off-by: Kim Phillips <kim.phillips@arm.com>
> > ---
> > Hi Arnaldo, please apply to perf/urgent / stable series if at all
> > possible. Thank you.
>
> In such cases the best thing is to have a "Fixes: ..." so that this gets
> automatically picked by the stabe trees, I'll try to find out what was
> the patch that introduced this problem.
This one was easy, there is just one cset for this file prior to this
fix, so:
Fixes: ffd3d18c20b8 ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support")
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/urgent] perf arm spe: Fix uninitialized record error variable
2018-08-10 22:45 [PATCH] perf tools: arm-spe: Fix uninitialized record error variable Kim Phillips
2018-08-13 18:55 ` Arnaldo Carvalho de Melo
@ 2018-08-18 11:57 ` tip-bot for Kim Phillips
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Kim Phillips @ 2018-08-18 11:57 UTC (permalink / raw)
To: linux-tip-commits
Cc: alexander.shishkin, gengdongjiu, namhyung, jolsa, linux-kernel,
adrian.hunter, tglx, acme, kim.phillips, mingo, hpa, peterz
Commit-ID: 344353366591acf659a0d0dea498611da78d67e2
Gitweb: https://git.kernel.org/tip/344353366591acf659a0d0dea498611da78d67e2
Author: Kim Phillips <kim.phillips@arm.com>
AuthorDate: Fri, 10 Aug 2018 17:45:12 -0500
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 14 Aug 2018 15:10:44 -0300
perf arm spe: Fix uninitialized record error variable
The auxtrace init variable 'err' was not being initialized, leading perf
to abort early in an SPE record command when there was no explicit
error, rather only based whatever memory contents were on the stack.
Initialize it explicitly on getting an SPE successfully, the same way
cs-etm does.
Signed-off-by: Kim Phillips <kim.phillips@arm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Dongjiu Geng <gengdongjiu@huawei.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: ffd3d18c20b8 ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support")
Link: http://lkml.kernel.org/r/20180810174512.52900813e57cbccf18ce99a2@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/arch/arm64/util/arm-spe.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index 1120e39c1b00..5ccfce87e693 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -194,6 +194,7 @@ struct auxtrace_record *arm_spe_recording_init(int *err,
sper->itr.read_finish = arm_spe_read_finish;
sper->itr.alignment = 0;
+ *err = 0;
return &sper->itr;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-18 11:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-10 22:45 [PATCH] perf tools: arm-spe: Fix uninitialized record error variable Kim Phillips
2018-08-13 18:55 ` Arnaldo Carvalho de Melo
2018-08-13 18:59 ` Arnaldo Carvalho de Melo
2018-08-18 11:57 ` [tip:perf/urgent] perf arm spe: " tip-bot for Kim Phillips
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).