lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 24 Jan 2024 10:30:32 -0800
From: Ian Rogers <irogers@...gle.com>
To: James Clark <james.clark@....com>
Cc: linux-perf-users@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>, 
	Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>, 
	Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, Kajol Jain <kjain@...ux.ibm.com>, 
	Spoorthy S <spoorts2@...ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] perf test: Skip test_arm_callgraph_fp.sh if unwinding
 isn't built in

On Wed, Jan 24, 2024 at 1:24 AM James Clark <james.clark@....com> wrote:
>
>
>
> On 23/01/2024 17:41, Ian Rogers wrote:
> > On Tue, Jan 23, 2024 at 8:39 AM James Clark <james.clark@....com> wrote:
> >>
> >> Even though this is a frame pointer unwind test, it's testing that a
> >> frame pointer stack can be augmented correctly with a partial
> >> Dwarf unwind. So add a feature check so that this test skips instead of
> >> fails if Dwarf unwinding isn't present.
> >
> > Hi James,
> >
> > Is there value in testing without the partial Dwarf unwind? Presumably
>
> Yeah I think we could add a test for just --call-graph=fp, I don't think
> there is one. But that would be separate to this test, and would be
> redundant if the tests are run with a dwarf unwinder present because
> this test already requires the frame pointer unwinder to be correct.
>
> > that is covered by the existing dwarf unwind test?
>
> There is no overlap, this test test is for --call-graph=fp, and the
> dwarf test is for --call-graph=dwarf
>
> > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/tests/dwarf-unwind.c?h=perf-tools-next
> > If the issue is inlined functions I'm surprised addr2line isn't doing
> > the job properly. Is there an addr2line perf script issue here?
> >
>
> The issue isn't inlined functions, it's when the leaf frame doesn't
> insert a frame pointer. In that case we use the link register to see
> what the parent function of the leaf frame was and insert it into the
> frame pointer stack.
>
> Dwarf is only used in this case to confirm if the link register was
> valid at that instruction.
>
> See commit b9f6fbb for more info. Long story short this test was only
> added for that feature and it requires a dwarf unwinder to pass despite
> being called test_arm_callgraph_fp

Ok, not directly seeing b9f6fbb being dependent on
HAVE_DWARF_UNWIND_SUPPORT. I'll assume I'm ignorant and the fix here
is obviously a workaround.

For the series:
Reviewed-by: Ian Rogers <irogers@...gle.com>

Thanks,
Ian

> > Thanks,
> > Ian
> >
>
>
> >> Signed-off-by: James Clark <james.clark@....com>
> >> ---
> >>  tools/perf/tests/shell/test_arm_callgraph_fp.sh | 6 ++++++
> >>  1 file changed, 6 insertions(+)
> >>
> >> diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
> >> index e342e6c8aa50..83b53591b1ea 100755
> >> --- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh
> >> +++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
> >> @@ -8,6 +8,12 @@ shelldir=$(dirname "$0")
> >>
> >>  lscpu | grep -q "aarch64" || exit 2
> >>
> >> +if perf version --build-options | grep HAVE_DWARF_UNWIND_SUPPORT | grep -q OFF
> >> +then
> >> +  echo "Skipping, no dwarf unwind support"
> >> +  exit 2
> >> +fi
> >> +
> >>  skip_test_missing_symbol leafloop
> >>
> >>  PERF_DATA=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
> >> --
> >> 2.34.1
> >>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ