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] [day] [month] [year] [list]
Message-ID: <878vat93bf.fsf@sejong.aot.lge.com>
Date:	Fri, 26 Oct 2012 15:04:36 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	David Howells <dhowells@...hat.com>
Cc:	Borislav Petkov <bp@...en8.de>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	mingo@...nel.org, tglx@...utronix.de, davem@...emloft.net,
	torvalds@...ux-foundation.org, paulus@...ba.org,
	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	x86@...nel.org
Subject: Re: [RFC][PATCH 0/5] tools, perf: Fix up for x86 UAPI disintegration

This time, I tried on tip/master since it seemed that it contains
related patches already.

At first I got a conflict with davem's change:

--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@@ -57,7 -53,6 +53,10 @@@ void get_term_dimensions(struct winsiz
  #endif
  
  #ifdef __sparc__
++<<<<<<< HEAD
 +#include "../../arch/sparc/include/uapi/asm/unistd.h"
++=======
++>>>>>>> perf: Make perf build for x86 with UAPI disintegration applied
  #define rmb()         asm volatile("":::"memory")
  #define cpu_relax()   asm volatile("":::"memory")
  #define CPUINFO_PROC  "cpu"


After resolving it, I got a tons of error mostly about redeclaration of
enum contants.  I managed to build perf with below patch:


------------ 8< ------------------- 8< -----------------
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index da040ff69b2b..7a73f37696b7 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -170,7 +170,11 @@ endif
 ### --- END CONFIGURATION SECTION ---
 
 ifeq ($(srctree),)
-srctree := $(shell pwd)
+srctree := $(shell cd ../../; pwd)
+endif
+
+ifeq ($(objtree),)
+objtree := $(shell cd ../../; pwd)
 endif
 
 BASIC_CFLAGS = \
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 618d41140abd..de882d5a4ab3 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -19,7 +19,6 @@
 #include "thread_map.h"
 #include "target.h"
 #include "../../../include/linux/hw_breakpoint.h"
-#include "../../../include/uapi/linux/perf_event.h"
 #include "perf_regs.h"
 
 #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y))
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 6f94d6dea00f..9ac02f655124 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -3,7 +3,7 @@
 
 #include <linux/list.h>
 #include <stdbool.h>
-#include "../../../include/uapi/linux/perf_event.h"
+#include <linux/perf_event.h>
 #include "types.h"
 #include "xyarray.h"
 #include "cgroup.h"
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index 879d215cdac9..3c24404c8523 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -1,7 +1,7 @@
 #ifndef __PERF_HEADER_H
 #define __PERF_HEADER_H
 
-#include "../../../include/uapi/linux/perf_event.h"
+#include <linux/perf_event.h>
 #include <sys/types.h>
 #include <stdbool.h>
 #include "types.h"
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index ac9a6aacf2f5..146684787adb 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -7,7 +7,7 @@
 #include <linux/list.h>
 #include <stdbool.h>
 #include "types.h"
-#include "../../../include/uapi/linux/perf_event.h"
+#include <linux/perf_event.h>
 #include "types.h"
 
 struct list_head;
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 39f3abac7744..8410897cc856 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -2,7 +2,7 @@
 #define __PMU_H
 
 #include <linux/bitops.h>
-#include "../../../include/uapi/linux/perf_event.h"
+#include <linux/perf_event.h>
 
 enum {
 	PERF_PMU_FORMAT_VALUE_CONFIG,
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index dd6426163ba6..1768581bb4a6 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -7,7 +7,7 @@
 #include "symbol.h"
 #include "thread.h"
 #include <linux/rbtree.h>
-#include "../../../include/uapi/linux/perf_event.h"
+#include <linux/perf_event.h>
 
 struct sample_queue;
 struct ip_callchain;
------------ 8< ------------------- 8< -----------------

But it also failed to build like this:

    CC builtin-kvm.o
builtin-kvm.c:146:2: error: ‘DB_VECTOR’ undeclared here (not in a function)
builtin-kvm.c:146:2: error: ‘BP_VECTOR’ undeclared here (not in a function)
builtin-kvm.c:146:2: error: ‘UD_VECTOR’ undeclared here (not in a function)
builtin-kvm.c:146:2: error: ‘PF_VECTOR’ undeclared here (not in a function)
builtin-kvm.c:146:2: error: ‘NM_VECTOR’ undeclared here (not in a function)
builtin-kvm.c:146:2: error: ‘MC_VECTOR’ undeclared here (not in a function)
make: *** [builtin-kvm.o] Error 1


I can see that those are defined in arch/x86/include/asm/kvm.h.


Thanks,
Namhyung
--
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