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-next>] [day] [month] [year] [list]
Message-ID: <4F6AFD92.4030603@linux.vnet.ibm.com>
Date:	Thu, 22 Mar 2012 15:53:14 +0530
From:	Prashanth Nageshappa <prashanth@...ux.vnet.ibm.com>
To:	masami.hiramatsu.pt@...achi.com, mingo@...e.hu,
	linux-kernel@...r.kernel.org, acme@...radead.org
CC:	ananth@...ibm.com, Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	rostedt@...dmis.org
Subject: [PATCH] perf - probe finder fails to resolve function name to address

probe finder fails to resolve valid function names into addresses for
functions which have more than one die entries in DWARF info.

It is valid for DWARF info to contain more than 1 entries for a given
function name, where one entry corresponds to definition which has code
address/range attributes and remaining entries (which are only
declarations) does not have code address/range attributes.
(example: do_fork, sys_write, sys_wait4, sys_sync etc)

If die entries corresponding to declarations appear before definition
entry, probe finder returns error instead of continuing to look further
for a definition entry.

This patch ensures we reach to the die entry corresponding to the
definition and get the function address. I have also removed the
warning as this is a valid thing to happen.

Signed-off-by: Prashanth Nageshappa <prashanth@...ux.vnet.ibm.com>
---

 tools/perf/util/probe-finder.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 5d73262..5e1e6f7 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -984,10 +984,7 @@ static int probe_point_search_cb(Dwarf_Die *sp_die, void *data)
 			param->retval = find_probe_point_lazy(sp_die, pf);
 		else {
 			if (dwarf_entrypc(sp_die, &pf->addr) != 0) {
-				pr_warning("Failed to get entry address of "
-					   "%s.\n", dwarf_diename(sp_die));
-				param->retval = -ENOENT;
-				return DWARF_CB_ABORT;
+				return DWARF_CB_OK;
 			}
 			pf->addr += pp->offset;
 			/* TODO: Check the address in this function */

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