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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <505AE3F3.1040305@hitachi.com>
Date:	Thu, 20 Sep 2012 18:37:55 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Hyeoncheol Lee <hyc.lee@...il.com>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	LKML <linux-kernel@...r.kernel.org>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	yrl.pp-manager.tt@...achi.com
Subject: Re: [PATCH] perf probe: Allow of casting an array of char to string

(2012/09/20 14:12), Hyeoncheol Lee wrote:
> Before casting a type of a variable to string,
> convert_variable_type() confirms that the type is a pointer or
> an array. if it is a pointer to char, it is casted to string.
> but in case of an array of char, it isn't

Oops, right! I missed the array case. This must be fixed.

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>

Thank you!

> 
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
> Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> Signed-off-by: Hyeoncheol Lee <hyc.lee@...il.com>
> ---
>  tools/perf/util/probe-finder.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> index 1daf5c1..be03293 100644
> --- a/tools/perf/util/probe-finder.c
> +++ b/tools/perf/util/probe-finder.c
> @@ -413,12 +413,12 @@ static int convert_variable_type(Dwarf_Die *vr_die,
>  				   dwarf_diename(vr_die), dwarf_diename(&type));
>  			return -EINVAL;
>  		}
> +		if (die_get_real_type(&type, &type) == NULL) {
> +			pr_warning("Failed to get a type"
> +				   " information.\n");
> +			return -ENOENT;
> +		}
>  		if (ret == DW_TAG_pointer_type) {
> -			if (die_get_real_type(&type, &type) == NULL) {
> -				pr_warning("Failed to get a type"
> -					   " information.\n");
> -				return -ENOENT;
> -			}
>  			while (*ref_ptr)
>  				ref_ptr = &(*ref_ptr)->next;
>  			/* Add new reference with offset +0 */
> 


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com


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