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: <ZhKTrUPbUnBviQYK@codewreck.org>
Date: Sun, 7 Apr 2024 21:38:05 +0900
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
	Jiri Olsa <jolsa@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>
Cc: linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] perf parse: Allow names to start with digits

Dominique Martinet wrote on Sun, Apr 07, 2024 at 09:18:21PM +0900:
> diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
> index e86c45675e1d..41c30ff29783 100644
> --- a/tools/perf/util/parse-events.l
> +++ b/tools/perf/util/parse-events.l
> @@ -158,7 +158,7 @@ event		[^,{}/]+
>  num_dec		[0-9]+
>  num_hex		0x[a-fA-F0-9]{1,16}
>  num_raw_hex	[a-fA-F0-9]{1,16}
> -name		[a-zA-Z_*?\[\]][a-zA-Z0-9_*?.\[\]!\-]*
> +name		[a-zA-Z0-9_*?\[\]][a-zA-Z0-9_*?.\[\]!\-]*

grmbl sorry I guess I didn't actually test this two years ago (?!), or
used it differently (commit message is weird and also needs fixing,
perf probe -e 9p:* does not make sense) or something changed but
that's not enough:

----
$ sudo ./perf trace -e 9p:9p_fid_ref
event syntax error: '9p:9p_fid_ref'
                     \___ parser error
Run 'perf list' for a list of valid events
----

Adding 0-9 to name_tag as well makes perf trace works.

I'm not sure what name_minus is for but I did't need to add that one in
my test.

That also highlights that the test I added isn't sufficient, if someone
familiar with the code could hint at a better place to test please tell!
Otherwise I'll have a look next weekend, I need to get back to my 9p
bugs now I've got a working perf command..

>  name_tag	[\'][a-zA-Z_*?\[\]][a-zA-Z0-9_*?\-,\.\[\]:=]*[\']
>  name_minus	[a-zA-Z_*?][a-zA-Z0-9\-_*?.:]*
>  drv_cfg_term	[a-zA-Z0-9_\.]+(=[a-zA-Z0-9_*?\.:]+)?
> 

-- 
Dominique Martinet | Asmadeus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ