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:	Fri, 21 Oct 2011 10:10:24 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	"Xu, Anhua" <anhua.xu@...el.com>
Cc:	"acme@...hat.com" <acme@...hat.com>,
	"a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"paulus@...ba.org" <paulus@...ba.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] perf tools: Exit recording if events have non matching
 sample type

On Fri, Oct 21, 2011 at 03:18:31PM +0800, Xu, Anhua wrote:
> I installed the latest kernel and found without such patch( not sure if other patches were added besides this one). That following command works fine.
> perf record -o perf.data -e ext3:ext3_request_inode -e LLC-loads -- date '+%F'
hi,
was there any ext3 event stored? The issue should be hit when
processing stored events.. either in the atexit code or during
report.

Following command freezes for me on 3.1.0-rc10-tip+:
./perf record -o perf.data -e ext4:ext4_request_inode -e LLC-loads -- date '+%F'


wbr,
jirka

> 
> -----Original Message-----
> From: linux-kernel-owner@...r.kernel.org [mailto:linux-kernel-owner@...r.kernel.org] On Behalf Of Jiri Olsa
> Sent: Friday, September 30, 2011 12:01 AM
> To: acme@...hat.com; a.p.zijlstra@...llo.nl; mingo@...e.hu; paulus@...ba.org
> Cc: linux-kernel@...r.kernel.org; Jiri Olsa
> Subject: [PATCH] perf tools: Exit recording if events have non matching sample type
> 
> The event processing relies on all events having the same sample_type.
> 
> This is being checked when the session is being opened read only.
> It also needs to be checked when we do record, since events could be
> read during processing build IDs at the end of the record command.
> 
> If we process events with different sample_type the processing might
> skip some events or hang.
> 
> Following command hangs on my setup:
>   ./perf record -o perf.data -e ext4:ext4_mb_new_group_pa \
>    -e LLC-loads -- date '+%F'
> 
> because hardware and tracepoint events have different sample type.
> 
> With the patch applied the record command displays
> "Non matching sample_type" message and exits.
> 
> Signed-off-by: Jiri Olsa <jolsa@...hat.com>
> ---
>  tools/perf/builtin-record.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index f4c3fbe..71e2c4e 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -832,6 +832,12 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
>  		goto out_symbol_exit;
>  	}
>  
> +	if (!perf_evlist__valid_sample_type(evsel_list)) {
> +		pr_err("Non matching sample_type\n");
> +		err = -EINVAL;
> +		goto out_symbol_exit;
> +	}
> +
>  	if (target_pid != -1)
>  		target_tid = target_pid;
>  
> -- 
> 1.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ