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: <20210115224658.GC375055@xps15>
Date:   Fri, 15 Jan 2021 15:46:58 -0700
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     Mike Leach <mike.leach@...aro.org>
Cc:     Suzuki K Poulose <suzuki.poulose@....com>,
        Leo Yan <leo.yan@...aro.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        John Garry <john.garry@...wei.com>,
        Will Deacon <will@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Daniel Kiss <Daniel.Kiss@....com>,
        Denis Nikitin <denik@...omium.org>,
        Coresight ML <coresight@...ts.linaro.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size

On Mon, Jan 11, 2021 at 12:09:12PM +0000, Mike Leach wrote:
> Hi Leo,
> 
> I think there is an issue here in that your modification assumes that
> all cpus in the system are of the same ETM type. The original routine
> allowed for differing ETM types, thus differing cpu ETM field lengths
> between ETMv4 / ETMv3, the field size was used after the relevant
> magic number for the cpu ETM was read.
> 
> You have replaced two different sizes - with a single calculated size.

I usually go through an entire patchset before looking at the comments people
have made.  In this case Mike and I are coming to the exact same conclusion.

I will look at Mike's patch on Monday.

> 
> Moving forwards we are seeing the newer FEAT_ETE protocol drivers
> appearing on the list, which will ultimately need a new metadata
> structure.
> 
> We have had discussions within ARM regarding the changing of the
> format to be more self describing - which should probably be opened
> out to the CS mailing list.
> 
> Regards
> 
> Mike
> 
> 
> On Mon, 11 Jan 2021 at 07:29, Suzuki K Poulose <suzuki.poulose@....com> wrote:
> >
> > On 1/9/21 7:44 AM, Leo Yan wrote:
> > > The metadata array can be extended over time and the tool, if using the
> > > predefined macro (like CS_ETMV4_PRIV_MAX for ETMv4) as metadata array
> > > size to copy data, it can cause compatible issue within different
> > > versions of perf tool.
> > >
> > > E.g. we recorded a data file with an old version tool, afterwards if
> > > use the new version perf tool to parse the file, since the metadata
> > > array has been extended and the macro CS_ETMV4_PRIV_MAX has been
> > > altered, if use it to parse the perf data with old format, this will
> > > lead to mismatch.
> > >
> > > To maintain backward compatibility, this patch calculates per CPU
> > > metadata array size on the runtime, the calculation is based on the
> > > info stored in the data file so that it's reliable.
> > >
> > > Signed-off-by: Leo Yan <leo.yan@...aro.org>
> >
> > Looks good to me.
> >
> > Acked-by: Suzuki K Poulose <suzuki.poulose@....com>
> >
> 
> 
> --
> Mike Leach
> Principal Engineer, ARM Ltd.
> Manchester Design Centre. UK

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ