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, 23 Mar 2016 18:17:38 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	linux-kernel@...r.kernel.org,
	Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
	Jan Stancek <jstancek@...hat.com>,
	Jiri Olsa <jolsa@...hat.com>, Kan Liang <kan.liang@...el.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: [PATCH 01/23] perf test: Remove 'core_id' check in topo test

From: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>

The topology test case of 'perf test' seems to be broken on my x86
system - due to the comparison of a "core-id" with # of CPUs online.

There are 8 online CPUs:

	$ cat /sys/devices/system/cpu/online
	0-7

but core-ids are not sequential and some core-ids exceed the number
of online CPUs.

	$ cat /sys/devices/system/cpu/cpu?/topology/core_id
	0
	1
	9
	10
	0
	1
	9
	10

Looks like we can safely remove the check.  Output before:

	$ perf --version
	perf version 4.4.rc1.g34258a

	$ perf test -v topo
	36: Test topology in session                                 :
	--- start ---
	test child forked, pid 5906
	templ file: /tmp/perf-test-vCwWG3
	core_id number is too big.You may need to upgrade the perf tool.
	test child interrupted
	---- end ----
	Test topology in session: FAILED!

and after:

	$ perf test -v topo
	36: Test topology in session                                 :
	--- start ---
	test child forked, pid 6532
	templ file: /tmp/perf-test-y10wFJ
	CPU 0, core 0, socket 0
	CPU 1, core 1, socket 0
	CPU 2, core 9, socket 0
	CPU 3, core 10, socket 0
	CPU 4, core 0, socket 1
	CPU 5, core 1, socket 1
	CPU 6, core 9, socket 1
	CPU 7, core 10, socket 1
	test child finished with 0
	---- end ----
	Test topology in session: Ok

Signed-off-by: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Cc: Jan Stancek <jstancek@...hat.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Kan Liang <kan.liang@...el.com>
Link: http://lkml.kernel.org/r/20151203233219.GA27696@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/header.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 73e38e472ecd..90680ec9f8b8 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1872,11 +1872,6 @@ static int process_cpu_topology(struct perf_file_section *section,
 		if (ph->needs_swap)
 			nr = bswap_32(nr);
 
-		if (nr > (u32)cpu_nr) {
-			pr_debug("core_id number is too big."
-				 "You may need to upgrade the perf tool.\n");
-			goto free_cpu;
-		}
 		ph->env.cpu[i].core_id = nr;
 
 		ret = readn(fd, &nr, sizeof(nr));
-- 
2.5.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ