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, 10 Jun 2016 19:36:06 +0530
From:	"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	Anton Blanchard <anton@...abs.org>,
	Michael Ellerman <mpe@...erman.id.au>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>
Subject: Re: [PATCH 1/2] perf annotate: generalize handling of ret
 instructions

On 2016/06/10 10:30AM, Arnaldo Carvalho de Melo wrote:
> Em Fri, Jun 10, 2016 at 06:32:50PM +0530, Naveen N. Rao escreveu:
> > Introduce helper to detect ret instructions and use the same in the tui.

Hi Arnaldo,
Thanks for the review.

> 
> Humm, I think this is simpler and equivalent, since so far we didn't had
> any need for special handling of "retq"/"ret" instructions:
> 
> diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
> index 4fc208e82c6f..29cef599a091 100644
> --- a/tools/perf/ui/browsers/annotate.c
> +++ b/tools/perf/ui/browsers/annotate.c
> @@ -226,11 +226,11 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int
>  				ui_browser__write_nstring(browser, " ", 2);
>  			}
>  		} else {
> -			if (strcmp(dl->name, "retq")) {
> -				ui_browser__write_nstring(browser, " ", 2);
> -			} else {
> +			if (strcmp(dl->name, "retq") == 0 || strcmp(dl->name, "ret") == 0) {

This won't work on powerpc since we don't have a "ret" instruction.  
Returning from a function is *usually* done through some variant of a 
branch to LR (Link Register) instruction. This logic is encoded in the 
powerpc-specific ins__find() in the next patch.

That was the motivation in introducing a helper for handling return 
instructions in the tui.

- Naveen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ