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: <20150119150838.GA3451@kernel.org>
Date:	Mon, 19 Jan 2015 12:08:38 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Rabin Vincent <rabin@....in>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Paul Mackerras <paulus@...ba.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] perf annotate: handle ins parsing failures

Em Sun, Jan 18, 2015 at 08:00:20PM +0100, Rabin Vincent escreveu:
> Don't use the ins's ->sncprintf() if the parsing failed.
> 
> For example, this fixes the display of "imul %edx".  Without this patch:
> 
>        |      imul   (null),(null)
> 
> After this patch:
> 
>        |      imul   %edx

Thanks, both applied!

- Arnaldo
 
> Signed-off-by: Rabin Vincent <rabin@....in>
> ---
>  tools/perf/util/annotate.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> index 79999ce..5ae428b 100644
> --- a/tools/perf/util/annotate.c
> +++ b/tools/perf/util/annotate.c
> @@ -183,8 +183,9 @@ static int lock__parse(struct ins_operands *ops)
>  	if (!ops->locked.ins->ops)
>  		return 0;
>  
> -	if (ops->locked.ins->ops->parse)
> -		ops->locked.ins->ops->parse(ops->locked.ops);
> +	if (ops->locked.ins->ops->parse
> +	    && ops->locked.ins->ops->parse(ops->locked.ops) < 0)
> +		goto out_free_ops;
>  
>  	return 0;
>  
> @@ -531,8 +532,8 @@ static void disasm_line__init_ins(struct disasm_line *dl)
>  	if (!dl->ins->ops)
>  		return;
>  
> -	if (dl->ins->ops->parse)
> -		dl->ins->ops->parse(&dl->ops);
> +	if (dl->ins->ops->parse && dl->ins->ops->parse(&dl->ops) < 0)
> +		dl->ins = NULL;
>  }
>  
>  static int disasm_line__parse(char *line, char **namep, char **rawp)
> -- 
> 2.1.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/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ