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>] [day] [month] [year] [list]
Date:	Mon,  4 Feb 2013 01:27:32 +0100
From:	Ben Noordhuis <info@...ordhuis.nl>
To:	linux-kernel@...r.kernel.org
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Ben Noordhuis <info@...ordhuis.nl>
Subject: [PATCH] perf: fix undefined symbols in python binding

Add dummy test_attr__enabled and test_attr__open symbols to
util/python.c to fix the following dynamic linker error:

  $ python python/twatch.py
  Traceback (most recent call last):
    File "python/twatch.py", line 16, in <module>
      import perf
  ImportError: /path/to/perf.so: undefined symbol: test_attr__enabled

Signed-off-by: Ben Noordhuis <info@...ordhuis.nl>
---
 tools/perf/util/python.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index a2657fd..163abbb 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -8,6 +8,15 @@
 #include "cpumap.h"
 #include "thread_map.h"
 
+/* Dummy to satisfy linker. */
+bool test_attr__enabled;
+
+/* Dummy to satisfy linker. */
+void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu,
+	int fd, int group_fd, unsigned long flags)
+{
+}
+
 /* Define PyVarObject_HEAD_INIT for python 2.5 */
 #ifndef PyVarObject_HEAD_INIT
 # define PyVarObject_HEAD_INIT(type, size) PyObject_HEAD_INIT(type) size,
-- 
1.7.9.5

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