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]
Message-ID: <8b8a984b-6a10-825d-240a-48dc856ae2e7@linux.intel.com>
Date:   Tue, 28 Sep 2021 12:06:29 +0300
From:   Alexander Antonov <alexander.antonov@...ux.intel.com>
To:     Like Xu <like.xu.linux@...il.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Ian Rogers <irogers@...gle.com>
Cc:     Jiri Olsa <jolsa@...hat.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Stephane Eranian <eranian@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] perf iostat: Use system-wide mode if the target
 cpu_list is unspecified

On 9/27/2021 11:11 AM, Like Xu wrote:
> From: Like Xu <likexu@...cent.com>
>
> An iostate use case like "perf iostat 0000:16,0000:97 -- ls" should be
> implemented to work in system-wide mode to ensure that the output from
> print_header() is consistent with the user documentation perf-iostat.txt,
> rather than incorrectly assuming that the kernel does not support it:
>
>   Error:
>   The sys_perf_event_open() syscall returned with 22 (Invalid argument) \
>   for event (uncore_iio_0/event=0x83,umask=0x04,ch_mask=0xF,fc_mask=0x07/).
>   /bin/dmesg | grep -i perf may provide additional information.
>
> This error is easily fixed by assigning system-wide mode by default
> for IOSTAT_RUN only when the target cpu_list is unspecified.
Hello,
Thank you for your fixes.

Tested-by: Alexander Antonov <alexander.antonov@...ux.intel.com>
> Signed-off-by: Like Xu <likexu@...cent.com>
> ---
>   tools/perf/builtin-stat.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index f6e87b7be5fa..f0ecfda34ece 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -2408,6 +2408,8 @@ int cmd_stat(int argc, const char **argv)
>   			goto out;
>   		} else if (verbose)
>   			iostat_list(evsel_list, &stat_config);
> +		if (iostat_mode == IOSTAT_RUN && !target__has_cpu(&target))
> +			target.system_wide = true;
>   	}
>   
>   	if (add_default_attributes())

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ