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]
Message-ID: <507E6A01.1000500@linux.vnet.ibm.com>
Date:	Wed, 17 Oct 2012 16:19:13 +0800
From:	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
To:	David Ahern <dsahern@...il.com>
CC:	acme@...stprotocols.net, linux-kernel@...r.kernel.org,
	mingo@...nel.org, peterz@...radead.org, fweisbec@...il.com,
	Dong Hao <haodong@...ux.vnet.ibm.com>
Subject: Re: [PATCH 09/12] perf kvm: split out tracepoints from record args

On 10/09/2012 01:17 AM, David Ahern wrote:

>  	unsigned int rec_argc, i, j;
>  	const char **rec_argv;
> +	const char * const record_args[] = {
> +		"record",
> +		"-R",
> +		"-f",
> +		"-m", "1024",
> +		"-c", "1",
> +	};
> 
> -	rec_argc = ARRAY_SIZE(record_args) + argc + 2;
> +	rec_argc = ARRAY_SIZE(record_args) + argc + 2 +
> +		   ARRAY_SIZE(kvm_events_tp);

Only calculate the size of tracepoints...

>  	rec_argv = calloc(rec_argc + 1, sizeof(char *));
> 
>  	if (rec_argv == NULL)
> @@ -818,6 +821,11 @@ static int kvm_events_record(struct perf_kvm *kvm, int argc, const char **argv)
>  	for (i = 0; i < ARRAY_SIZE(record_args); i++)
>  		rec_argv[i] = STRDUP_FAIL_EXIT(record_args[i]);
> 
> +	for (j = 0; j < ARRAY_SIZE(kvm_events_tp); j++) {
> +		rec_argv[i++] = "-e";

Then you add "-e" into the array, however, it is calculated into rec_argc?
Or I missed something.

Other patches look good to me, thanks for your work and look forward to
the new version. :)

--
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