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]
Message-ID: <20200902003931.GA3306@leoy-ThinkPad-X240s>
Date:   Wed, 2 Sep 2020 08:39:32 +0800
From:   Leo Yan <leo.yan@...aro.org>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Mathieu Poirier <mathieu.poirier@...aro.org>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Mike Leach <mike.leach@...aro.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Al Grant <al.grant@....com>
Subject: Re: [PATCH 1/2] perf cs-etm: Fix corrupt data after perf inject from

Hi Arnaldo,

On Tue, Sep 01, 2020 at 11:54:32AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Aug 31, 2020 at 08:04:32AM +0800, Leo Yan escreveu:
> > Hi Mathieu,
> > 
> > On Thu, Aug 27, 2020 at 02:53:54PM -0600, Mathieu Poirier wrote:
> > > Hi Leo and Al,
> > > 
> > > On Wed, Aug 19, 2020 at 04:47:50PM +0800, Leo Yan wrote:
> > > > From: Al Grant <al.grant@....com>
> > > > 
> > > > Commit 42bbabed09ce ("perf tools: Add hw_idx in struct branch_stack")
> > > > changed the format of branch stacks in perf samples. When samples use
> > > > this new format, a flag must be set in the corresponding event.
> > > > Synthesized branch stacks generated from CoreSight ETM trace were using
> > > > the new format, but not setting the event attribute, leading to
> > > > consumers seeing corrupt data. This patch fixes the issue by setting the
> > > > event attribute to indicate use of the new format.
> > > > 
> > > > Fixes: 42bbabed09ce ("perf tools: Add hw_idx in struct branch_stack")
> > > > Signed-off-by: Al Grant <al.grant@....com>
> > > > Reviewed-by: Andrea Brunato <andrea.brunato@....com>
> > > > Signed-off-by: Leo Yan <leo.yan@...aro.org>
> > > > ---
> > > >  tools/perf/util/cs-etm.c | 9 ++++++++-
> > > >  1 file changed, 8 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
> > > > index c283223fb31f..a2a369e2fbb6 100644
> > > > --- a/tools/perf/util/cs-etm.c
> > > > +++ b/tools/perf/util/cs-etm.c
> > > > @@ -1344,8 +1344,15 @@ static int cs_etm__synth_events(struct cs_etm_auxtrace *etm,
> > > >  		attr.sample_type &= ~(u64)PERF_SAMPLE_ADDR;
> > > >  	}
> > > >  
> > > > -	if (etm->synth_opts.last_branch)
> > > > +	if (etm->synth_opts.last_branch) {
> > > >  		attr.sample_type |= PERF_SAMPLE_BRANCH_STACK;
> > > > +		/*
> > > > +		 * We don't use the hardware index, but the sample generation
> > > > +		 * code uses the new format branch_stack with this field,
> > > > +		 * so the event attributes must indicate that it's present.
> > > > +		 */
> > > > +		attr.branch_sample_type |= PERF_SAMPLE_BRANCH_HW_INDEX;
> > > > +	}
> > > 
> > > I've see this patch before...  I thought it had been merged - what happened?
> > 
> > This patch before has been sent by Al to CoreSight mailing list but has
> > not sent to LKML, this is why I resent it to LKML in case it's missed.
> 
> So, was it Acked on the CoreSight mailing list? Are we missing any
> Acked-by or Reviewed-by for this 1/2 patch as we got for 2/2?

The CoreSight mailing list has some discussion for this patch set,
when respin this patch set, I confirmed we don't miss any 'Acked' or
'Reviewed' tags.

Thanks,
Leo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ