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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 26 May 2022 12:25:35 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     zhengjun.xing@...ux.intel.com, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...el.com, jolsa@...hat.com,
        linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
        adrian.hunter@...el.com, ak@...ux.intel.com,
        kan.liang@...ux.intel.com
Subject: Re: [PATCH] perf jevents: Fix event syntax error caused by ExtSel

Em Wed, May 25, 2022 at 07:27:08AM -0700, Ian Rogers escreveu:
> On Wed, May 25, 2022 at 7:04 AM <zhengjun.xing@...ux.intel.com> wrote:
> >
> > From: Zhengjun Xing <zhengjun.xing@...ux.intel.com>
> >
> > In the origin code, when "ExtSel" is 1, the eventcode will change to
> > "eventcode |= 1 << 21”. For event “UNC_Q_RxL_CREDITS_CONSUMED_VN0.DRS",
> > its "ExtSel" is "1", its eventcode will change from 0x1E to 0x20001E,
> > but in fact the eventcode should <=0x1FF, so this will cause the parse
> > fail:
> >
> >   # perf stat -e "UNC_Q_RxL_CREDITS_CONSUMED_VN0.DRS" -a sleep 0.1
> > event syntax error: '.._RxL_CREDITS_CONSUMED_VN0.DRS'
> >                                   \___ value too big for format, maximum is 511
> >
> > On the perf kernel side, the kernel assumes the valid bits are continuous.
> > It will adjust the 0x100 (bit 8 for perf tool) to bit 21 in HW.
> >
> > DEFINE_UNCORE_FORMAT_ATTR(event_ext, event, "config:0-7,21");
> >
> > So the perf tool follows the kernel side and just set bit8 other than bit21.
> >
> > Fixes: fedb2b518239 ("perf jevents: Add support for parsing uncore json files")
> > Signed-off-by: Zhengjun Xing <zhengjun.xing@...ux.intel.com>
> > Reviewed-by: Kan Liang <kan.liang@...ux.intel.com>
> 
> Acked-by: Ian Rogers <irogers@...gle.com>

Thanks, applied.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ