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: <YPXaGPfofvrUGBLa@kernel.org>
Date:   Mon, 19 Jul 2021 17:01:28 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jin Yao <yao.jin@...ux.intel.com>,
        John Garry <john.garry@...wei.com>
Cc:     Jiri Olsa <jolsa@...nel.org>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Jin Yao <yao.jin@...ux.intel.com>,
        linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
        Zhangshaokun <zhangshaokun@...ilicon.com>,
        "liuqi (BA)" <liuqi115@...wei.com>
Subject: Re: [bug report] Patch "perf tools: Fix pattern matching for same
 substring in different pmu type" broken

Em Mon, Jul 19, 2021 at 03:13:06PM +0100, John Garry escreveu:
> Hi guys,
> 
> The named patch has broken PMU alias matching on my arm64 system.

Hi Jin, can you please address this report? Otherwise I'll have to
revert the patch in my next pull req to Linus :-\

- Arnaldo
 
> Specifically it is broken for when multiple tokens are used in the alias.
> For example, alias "hisi_sccl,l3c" would previously match for PMU
> "hisi_sccl3_l3c7", but that no longer works.
> 
> In my example, in looking at the code, the callchain
> pmu_uncore_alias_match("hisi_sccl,l3c", "hisi_sccl3_l3c7") ->
> per_pmu__valid_suffix("hisi_sccl3_l3c7", "hisi_sccl") fails in the following
> check:
> 
> static bool perf_pmu__valid_suffix(char *pmu_name, char *tok)
> {
> 	char *p;
> 	...
> 	p = pmu_name + strlen(tok);
> 	...
> 	if (*p != '_') //here
> 		return false;
> }
> 
> This check assumes the first token must be followed by a '_', but it is
> possibly a numeric.
> 
> Please let me know how this should work. Previously it would match on the
> tokens, ignoring numerics and '_'.
> 
> As an aside, I'll look at why our testcases don't cover this scenario and
> look to add a test if necessary.
> 
> Thanks,
> john
> 
> Ps, please cc linux-perf-users@...r.kernel.org as in the MAINTAINERS file in
> future, as not all subscribe to the open kernel list (and so cannot easily
> reply directly).
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ