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]
Date: Sun, 12 May 2024 15:08:27 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Ian Rogers <irogers@...gle.com>, Kan Liang <kan.liang@...ux.intel.com>,
 Thomas Richter <tmricht@...ux.ibm.com>, Peter Zijlstra
 <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
 Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Jiri Olsa <jolsa@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
 Jonathan Corbet <corbet@....net>, Jing Zhang <renyu.zj@...ux.alibaba.com>,
 James Clark <james.clark@....com>, Ravi Bangoria <ravi.bangoria@....com>,
 linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH v5 2/6] perf Document: Sysfs event names must be lower or
 upper case

Hi,

On 5/2/24 2:35 PM, Ian Rogers wrote:
> To avoid directory scans in perf it is going to be assumed that sysfs
> event names are either lower or upper case.
> 
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> Reviewed-by: Kan Liang <kan.liang@...ux.intel.com>
> ---
>  .../ABI/testing/sysfs-bus-event_source-devices-events       | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
> index 77de58d03822..e7efeab2ee83 100644
> --- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
> +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
> @@ -37,6 +37,12 @@ Description:	Per-pmu performance monitoring events specific to the running syste
>  		performance monitoring event supported by the <pmu>. The name
>  		of the file is the name of the event.
>  
> +		As performance monitoring event names are case
> +		insensitive in the perf tool, the perf tool only looks
> +		for lower or upper case event names in sysfs to avoid
> +		scanning the directory. It is therefore required the
> +		name of the event here is either lower or upper case.
> +

This is ambiguous to me. Is it clear to everyone else?

"for lower or upper case event names":

Is that a logical OR or an exclusive OR?
"AbC" contains lower case or upper case characters. :)

I think the code [static bool permitted_event_name()]
implements an exclusive OR.
The code also allows event names to contain numbers AFAICT.
The documentation doesn't mention this.

HTH.

>  		File contents:
>  
>  			<term>[=<value>][,<term>[=<value>]]...

-- 
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ