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]
Date:   Thu, 2 Nov 2017 15:57:22 +0000
From:   "Liang, Kan" <kan.liang@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
CC:     "peterz@...radead.org" <peterz@...radead.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "acme@...nel.org" <acme@...nel.org>,
        "eranian@...gle.com" <eranian@...gle.com>,
        "ak@...ux.intel.com" <ak@...ux.intel.com>
Subject: RE: [PATCH V3 1/5] perf/x86/intel/uncore: customized pmu event read
 for client IMC uncore

> On Thu, 2 Nov 2017, Liang, Kan wrote:
> > > On Thu, 2 Nov 2017, Liang, Kan wrote:
> > > > > On Thu, 2 Nov 2017, Thomas Gleixner wrote:
> > > > > But then you have this in uncore_perf_event_update():
> > > > >
> > > > > -       if (event->hw.idx >= UNCORE_PMC_IDX_FIXED)
> > > > > +       if (event->hw.idx == UNCORE_PMC_IDX_FIXED)
> > > > >
> > > > > So how is that supposed to work?
> > > >
> > > > This is for generic code.
> > > >
> > > > In previous code, the event_read function for IMC use generic code.
> > > > So we have to deal with >= in generic code.
> > > >
> > > > Now, customized event_read function 'snb_uncore_imc_event_read'
> > > >  is introduced for IMC. So IMC does not touch the generic code.
> > > > The generic code is corrected here.
> > >
> > > The customized read function does not help at all.
> > >
> > > uncore_perf_event_update() is used from snb_uncore_imc_event_stop().
> So
> > > it's broken with this patch.
> >
> > Right, need to use the customized read function to replace it as well.
> > I will fix it in next version.
> >
> > >
> > > This is a complete and utter mess to review.
> >
> > Most of the customized functions will be clean up after the series is applied.
> 
> Correct, but please try to split 2/5 into parts as well. It's a hodgepodge
> of new things and modifications to the code. The logical split is to add
> the new data structures and struct members along with the inline helpers
> and then in the next patch make use of it.
>

Sure, I will do that.

Also, I just noticed that the '>=' is used in nhmex_uncore_msr_enable_event
as well, which does not make sense and unnecessary.
For Nehalem and Westmere, there is only one fixed counter for W-Box.
It's nhm specific issue, not related to generic code.
I will also clean it up in next version. 
 
Thanks,
Kan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ