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:   Thu, 23 Apr 2020 14:17:10 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Tommi Rantala <tommi.t.rantala@...ia.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Ravi Bangoria <ravi.bangoria@...ux.ibm.com>,
        Mamatha Inamdar <mamatha4@...ux.vnet.ibm.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf test session topology: Fix data path

On Thu, Apr 23, 2020 at 02:53:40PM +0300, Tommi Rantala wrote:
> Commit 2d4f27999b88 ("perf data: Add global path holder") missed path
> conversion in tests/topology.c, causing the "Session topology" testcase
> to "hang" (waits forever for input from stdin) when doing "ssh $VM perf
> test".
> 
> Can be reproduced by running "cat | perf test topo", and crashed by
> replacing cat with true:
> 
>   $ true | perf test -v topo
>   40: Session topology                                      :
>   --- start ---
>   test child forked, pid 3638
>   templ file: /tmp/perf-test-QPvAch
>   incompatible file format
>   incompatible file format (rerun with -v to learn more)
>   free(): invalid pointer
>   test child interrupted
>   ---- end ----
>   Session topology: FAILED!
> 
> Fixes: 2d4f27999b88 ("perf data: Add global path holder")
> Signed-off-by: Tommi Rantala <tommi.t.rantala@...ia.com>

Acked-by: Jiri Olsa <jolsa@...hat.com>

thanks,
jirka

> ---
>  tools/perf/tests/topology.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c
> index 4a800499d7c3..22daf2bdf5fa 100644
> --- a/tools/perf/tests/topology.c
> +++ b/tools/perf/tests/topology.c
> @@ -33,10 +33,8 @@ static int session_write_header(char *path)
>  {
>  	struct perf_session *session;
>  	struct perf_data data = {
> -		.file      = {
> -			.path = path,
> -		},
> -		.mode      = PERF_DATA_MODE_WRITE,
> +		.path = path,
> +		.mode = PERF_DATA_MODE_WRITE,
>  	};
>  
>  	session = perf_session__new(&data, false, NULL);
> @@ -63,10 +61,8 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
>  {
>  	struct perf_session *session;
>  	struct perf_data data = {
> -		.file      = {
> -			.path = path,
> -		},
> -		.mode      = PERF_DATA_MODE_READ,
> +		.path = path,
> +		.mode = PERF_DATA_MODE_READ,
>  	};
>  	int i;
>  
> -- 
> 2.25.3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ