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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 18 May 2015 16:39:53 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Jiri Olsa <jolsa@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	David Ahern <dsahern@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Jan Stancek <jstancek@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH] perf tools: Fix "Command" sort_entry's cmp and collapse
 function

On Mon, May 18, 2015 at 10:38:50AM +0900, Namhyung Kim wrote:
> Hi Jiri,
> 
> CC-ing Frederic as he wrote the comm change.
> 
> On Fri, May 15, 2015 at 05:54:28PM +0200, Jiri Olsa wrote:
> > Currently the se_cmp and se_collapse use pointer comparison,
> > which is ok for for testing equality of strings. It's not ok
> > as comparing function for rbtree insertion, because it gives
> > different results based on current pointer values.
> > 
> > We saw test 32 (hists cumulation test) failing based on different
> > environment setup. Having all sort functions straightened fix the
> > test for us.
> 
> Can you elaborate it?
> 
> AFAIK comm string is shared among threads so pointer comparison and
> 'strcmp == 0' should have same result..

well pointers (A, B) substraction will get either negative (A < B) or
possitive number (A > B). Now if your environment happens to have those
pointers switched you'll get different result for same strings.

Following python script forced the 'perf test 32' to switch those pointers
and screwed the Command sorting.. it's not very reliable on upstream for
some reason.. but very reproducible on RHEL7

---
#!/bin/python

import os

env={}

env['PATH'] = "/tmp:"*500

os.execve("./perf", ["perf", "test", "32", "-v"], env)
---

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