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: <1235644389.13052.28.camel@localhost>
Date:	Thu, 26 Feb 2009 18:33:09 +0800
From:	Li Wei <W.Li@....COM>
To:	Peter Oberparleiter <oberpar@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <andi@...stfloor.org>,
	Huang Ying <ying.huang@...el.com>,
	Sam Ravnborg <sam@...nborg.org>
Subject: Re: [PATCH 3/4] gcov: add gcov profiling infrastructure

On Thu, 2009-02-26 at 11:00 +0100, Peter Oberparleiter wrote:
> Since a few RCs have been released since the last gcov-kernel patch 
> post, I'll do a full re-post with a fix similar to the one you suggested 
> included.

Thanks! It would be great if ".."s in object pathnames could also be
supported in the forth coming re-post.

I have some external modules which link with object files outside their
directories. For example, a source tree looks like

  module0/main.c
  lib0/lib.c

and the Kbuild file has to use

  main-y += ../lib0/lib.o

to link in lib.c. Current gcov-kernel does not support ".." in
pathnames. Could ".."s be handled in add_node?

---
 kernel/gcov/fs.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/kernel/gcov/fs.c b/kernel/gcov/fs.c
index aab3be7..2f92955 100644
--- a/kernel/gcov/fs.c
+++ b/kernel/gcov/fs.c
@@ -500,6 +500,15 @@ static void add_node(struct gcov_info *info)
 		if (curr == next)
 			continue;
 		*next = 0;
+		if (!strcmp(curr, "."))
+			continue;
+		if (!strcmp(curr, "..")) {
+			if (parent != &root_node) {
+				parent = parent->parent;
+				continue;
+			} else
+				goto out_err;
+		}
 		node = get_child_by_name(parent, curr);
 		if (!node) {
 			node = new_node(parent, NULL, curr);
-- 
1.5.6.3

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