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] [day] [month] [year] [list]
Message-ID: <20200820122830.GC2667554@kernel.org>
Date:   Thu, 20 Aug 2020 09:28:30 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Leo Yan <leo.yan@...aro.org>
Cc:     Wei Li <liwei391@...wei.com>, Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        James Clark <james.clark@....com>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, guohanjun@...wei.com
Subject: Re: [PATCH] perf: arm-spe: Fix check error when synthesizing events

Em Fri, Jul 24, 2020 at 04:32:18PM +0800, Leo Yan escreveu:
> Hi Wei,
> 
> On Fri, Jul 24, 2020 at 03:26:28PM +0800, Wei Li wrote:
> > In arm_spe_read_record(), when we are processing an events packet,
> > 'decoder->packet.index' is the length of payload, which has been
> > transformed in payloadlen(). So correct the check of 'idx'.
> >
> > Signed-off-by: Wei Li <liwei391@...wei.com>
> 
> Good catch.  I checked the ARMv8 ARM and the function payloadlen(),
> can confirm the fixing is correct.
> 
> Reviewed-by: Leo Yan <leo.yan@...aro.org>

Thanks, applied.

- Arnaldo

> > ---
> >  tools/perf/util/arm-spe-decoder/arm-spe-decoder.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > index 302a14d0aca9..93e063f22be5 100644
> > --- a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > +++ b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > @@ -182,15 +182,15 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder)
> >  			if (payload & BIT(EV_TLB_ACCESS))
> >  				decoder->record.type |= ARM_SPE_TLB_ACCESS;
> >  
> > -			if ((idx == 1 || idx == 2 || idx == 3) &&
> > +			if ((idx == 2 || idx == 4 || idx == 8) &&
> >  			    (payload & BIT(EV_LLC_MISS)))
> >  				decoder->record.type |= ARM_SPE_LLC_MISS;
> >  
> > -			if ((idx == 1 || idx == 2 || idx == 3) &&
> > +			if ((idx == 2 || idx == 4 || idx == 8) &&
> >  			    (payload & BIT(EV_LLC_ACCESS)))
> >  				decoder->record.type |= ARM_SPE_LLC_ACCESS;
> >  
> > -			if ((idx == 1 || idx == 2 || idx == 3) &&
> > +			if ((idx == 2 || idx == 4 || idx == 8) &&
> >  			    (payload & BIT(EV_REMOTE_ACCESS)))
> >  				decoder->record.type |= ARM_SPE_REMOTE_ACCESS;
> >  
> > -- 
> > 2.17.1
> > 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ