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:	Wed, 30 Jul 2014 12:19:32 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Minchan Kim <minchan@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Jiri Olsa <jolsa@...hat.com>, David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 1/2] perf tools: Ensure --symfs ends with '/'

Em Wed, Jul 30, 2014 at 08:52:36AM +0900, Namhyung Kim escreveu:
> Hi Arnaldo,
> 
> On Tue, 29 Jul 2014 09:33:05 -0300, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Jul 29, 2014 at 02:02:46PM +0900, Minchan Kim escreveu:
> >> On Fri, Jul 25, 2014 at 10:31:47AM +0900, Namhyung Kim wrote:
> >> > Minchan reported that perf failed to load vmlinux if --symfs argument
> >> > doesn't end with '/' character.  So make sure that the symfs always
> >> > ends with the '/'.

> >> Both patches work and are handy to me.
> >> Thanks Namhyung.

> > I haven't said it is not :-) Just that it should be fixed in a different
> > way.
 
> I also thought about that way first but changed my mind to the current
> approach because I don't want to change current behavior.

> I worried about the common case which has empty symfs.  By your patch,
> it makes a pathname absolute even with an empty symfs - I can see most
> filenames are already absolute paths but I'm not 100% sure it's always
> the case.

Yeah, after doing some research on the tools/perf/ 'git log' I got your point,
we can't add the / after symfs usages when it is "", i.e. we need something
like:

	("%s%s%s, symfs, symfs[0] ? "/" : "", dso_name)

I.e. the equivalent of this:

[acme@zoo linux]$ python
Python 2.7.5 (default, Jun 25 2014, 10:19:55) 
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> symfs = ""
>>> os.path.join(symfs, "dso_path")
'dso_path'
>>> symfs = "/home/acme/embedded_device_dsos"
>>> os.path.join(symfs, "dso_path")
'/home/acme/embedded_device_dsos/dso_path'
>>> 

I'll try and get that in place.

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