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:   Tue, 11 Apr 2017 15:40:14 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     David Carrillo-Cisneros <davidcc@...gle.com>
Cc:     linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>, Simon Que <sque@...omium.org>,
        Wang Nan <wangnan0@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
        He Kuang <hekuang@...wei.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Stephane Eranian <eranian@...gle.com>,
        Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH 5/7] perf session: don't rely on evlist in pipe mode

Em Mon, Apr 10, 2017 at 01:14:30PM -0700, David Carrillo-Cisneros escreveu:
> Session sets a number parameters that rely on evlist. These parameters
> are not used in pipe-mode and should not be set, since evlist is
> unavailable. Fix that.

Ditching this one as well, until further investigation, well, file must
be null in this case...

[acme@...et linux]$ git bisect bad
5d71c27204d51492abe9fc69064fd36a0bda410b is the first bad commit
commit 5d71c27204d51492abe9fc69064fd36a0bda410b
Author: David Carrillo-Cisneros <davidcc@...gle.com>
Date:   Mon Apr 10 13:14:30 2017 -0700

    perf session: Don't rely on evlist in pipe mode
    
    Session sets a number parameters that rely on evlist. These parameters
    are not used in pipe-mode and should not be set, since evlist is
    unavailable. Fix that.
    
    Signed-off-by: David Carrillo-Cisneros <davidcc@...gle.com>
    Acked-by: Jiri Olsa <jolsa@...nel.org>
    Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
    Cc: Andi Kleen <ak@...ux.intel.com>
    Cc: He Kuang <hekuang@...wei.com>
    Cc: Masami Hiramatsu <mhiramat@...nel.org>
    Cc: Paul Turner <pjt@...gle.com>
    Cc: Peter Zijlstra <peterz@...radead.org>
    Cc: Simon Que <sque@...omium.org>
    Cc: Stephane Eranian <eranian@...gle.com>
    Cc: Wang Nan <wangnan0@...wei.com>
    Link: http://lkml.kernel.org/r/20170410201432.24807-6-davidcc@google.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>

:040000 040000 7df28fe9d7c9d962b78c0532f4961caea2737b59 34e4fed0042b1401c1a1a247d8ae40df17f9d272 M	tools
[acme@...et linux]$
 
> Signed-off-by: David Carrillo-Cisneros <davidcc@...gle.com>
> ---
>  tools/perf/util/session.c | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
> index a25302bc55a8..db554b7461b8 100644
> --- a/tools/perf/util/session.c
> +++ b/tools/perf/util/session.c
> @@ -140,8 +140,14 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
>  			if (perf_session__open(session) < 0)
>  				goto out_close;
>  
> -			perf_session__set_id_hdr_size(session);
> -			perf_session__set_comm_exec(session);
> +			/*
> +			 * set session attributes that are present in perf.data
> +			 * but not in pipe-mode.
> +			 */
> +			if (!file->is_pipe) {
> +				perf_session__set_id_hdr_size(session);
> +				perf_session__set_comm_exec(session);
> +			}
>  		}
>  	} else  {
>  		session->machines.host.env = &perf_env;
> @@ -156,7 +162,11 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
>  			pr_warning("Cannot read kernel map\n");
>  	}
>  
> -	if (tool && tool->ordering_requires_timestamps &&
> +	/*
> +	 * In pipe-mode, evlist is empty until PERF_RECORD_HEADER_ATTR is
> +	 * processed, so perf_evlist__sample_id_all is not meaningful here.
> +	 */
> +	if (!file->is_pipe && tool && tool->ordering_requires_timestamps &&
>  	    tool->ordered_events && !perf_evlist__sample_id_all(session->evlist)) {
>  		dump_printf("WARNING: No sample_id_all support, falling back to unordered processing\n");
>  		tool->ordered_events = false;
> -- 
> 2.12.2.715.g7642488e1d-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ