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: <20100929070631.GE5169@cr0.nay.redhat.com>
Date:	Wed, 29 Sep 2010 15:06:31 +0800
From:	Américo Wang <xiyou.wangcong@...il.com>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	Américo Wang <xiyou.wangcong@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Michal Marek <mmarek@...e.cz>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] namespace.pl: fix source tree name mangling

On Wed, Sep 29, 2010 at 03:06:45PM +0900, Stephen Hemminger wrote:
>On Wed, 29 Sep 2010 14:04:27 +0800
>Américo Wang <xiyou.wangcong@...il.com> wrote:
>
>> On Wed, Sep 29, 2010 at 02:11:53PM +0900, Stephen Hemminger wrote:
>> >On Wed, 29 Sep 2010 12:31:12 +0800
>> >Américo Wang <xiyou.wangcong@...il.com> wrote:
>> >
>> >> On Tue, Sep 28, 2010 at 05:44:02PM +0900, Stephen Hemminger wrote:
>> >> >The current namespace.pl script does not find source files correctly.
>> >> >The problem is that the current directory is not the base of the kernel
>> >> >tree at the point where it calls objdump.
>> >> >
>> >> >Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
>> >> >
>> >> >--- a/scripts/namespace.pl	2010-09-27 17:53:29.919433444 +0900
>> >> >+++ b/scripts/namespace.pl	2010-09-28 09:24:36.891552993 +0900
>> >> >@@ -167,8 +167,10 @@ sub do_nm
>> >> > 		printf STDERR "$fullname is not an object file\n";
>> >> > 		return;
>> >> > 	}
>> >> >-	($source = $fullname) =~ s/\.o$//;
>> >> >-	if (-e "$objtree$source.c" || -e "$objtree$source.S") {
>> >> >+	$fullname =~ s/\.o$//;
>> >> >+	$source = $basename;
>> >> >+	$source =~ s/\.o$//;
>> >> 
>> >> With your patch applied, $source will be the basename of
>> >> an obj path with .o stripped.
>> >> 
>> >> >+	if (-e "$objtree$fullname.c" || -e "$objtree$fullname.S") {
>> >> > 		$source = "$objtree$source";
>> >> > 	} else {
>> >> > 		$source = "$srctree$source";
>> >> >
>> >> 
>> >> So here we will get a non-exist path stored in $source.
>> >> 
...
>> 
>> I see, the docs of Find module said it will do chdir. :)
>> But I think your patch is still not right, how about the
>> one below?
>
>Please be more precise about "not right"? It makes the code
>work.
>

Hmm? $srctree is the path of top source code, and $source
is the basename of an object, so dirname is missed, no?

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