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]
Message-Id: <1364874877-5618-16-git-send-email-dsahern@gmail.com>
Date:	Mon,  1 Apr 2013 21:54:29 -0600
From:	David Ahern <dsahern@...il.com>
To:	acme@...stprotocols.net, linux-kernel@...r.kernel.org
Cc:	David Ahern <dsahern@...il.com>, Borislav Petkov <bp@...en8.de>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Stephane Eranian <eranian@...gle.com>
Subject: [PATCH 15/23] perf: make libaudit support based on CONFIG_LIBAUDIT

Signed-off-by: David Ahern <dsahern@...il.com>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephane Eranian <eranian@...gle.com>
---
 tools/perf/Makefile                 |   16 +++++++---------
 tools/perf/Pconfig                  |    5 +++++
 tools/perf/config/feature-tests.mak |    2 +-
 tools/perf/perf.c                   |    3 ++-
 4 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 0baa19b..62c10b8 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -644,15 +644,13 @@ ifdef CONFIG_LIBUNWIND
 	LIB_OBJS += $(OUTPUT)util/unwind.o
 endif
 
-ifndef NO_LIBAUDIT
-	FLAGS_LIBAUDIT = $(ALL_CFLAGS) $(ALL_LDFLAGS) -laudit
-	ifneq ($(call try-cc,$(SOURCE_LIBAUDIT),$(FLAGS_LIBAUDIT),libaudit),y)
-		msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev);
-	else
-		BASIC_CFLAGS += -DLIBAUDIT_SUPPORT
-		BUILTIN_OBJS += $(OUTPUT)builtin-trace.o
-		EXTLIBS += -laudit
-	endif
+ifdef CONFIG_LIBAUDIT
+    FLAGS_LIBAUDIT = $(ALL_CFLAGS) $(ALL_LDFLAGS) -laudit
+    ifneq ($(call try-cc,$(SOURCE_LIBAUDIT),$(FLAGS_LIBAUDIT),libaudit),y)
+        $(error No libaudit.h found, please install audit-libs-devel or libaudit-dev or disable CONFIG_LIBAUDIT)
+    endif
+    BUILTIN_OBJS += $(OUTPUT)builtin-trace.o
+    EXTLIBS += -laudit
 endif
 
 ifdef CONFIG_NEWT
diff --git a/tools/perf/Pconfig b/tools/perf/Pconfig
index b03881c..4cfccf3 100644
--- a/tools/perf/Pconfig
+++ b/tools/perf/Pconfig
@@ -45,6 +45,11 @@ config LIBPERL
 config LIBPYTHON
     bool "Enable support for python scripting engine"
 
+config LIBAUDIT
+    bool "Enable support for libaudit"
+    help
+        Used for perf trace tool.
+
 config LIBNUMA
     bool "Enable support for libnuma"
     help
diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak
index 1d16481..6e3ba0f 100644
--- a/tools/perf/config/feature-tests.mak
+++ b/tools/perf/config/feature-tests.mak
@@ -206,7 +206,7 @@ int main(void)
 endef
 endif
 
-ifndef NO_LIBAUDIT
+ifdef CONFIG_LIBAUDIT
 define SOURCE_LIBAUDIT
 #include <libaudit.h>
 
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 095b882..f7fcf78 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -14,6 +14,7 @@
 #include "util/run-command.h"
 #include "util/parse-events.h"
 #include "util/debugfs.h"
+#include <linux/kconfig.h>
 #include <pthread.h>
 
 const char perf_usage_string[] =
@@ -56,7 +57,7 @@ static struct cmd_struct commands[] = {
 	{ "lock",	cmd_lock,	0 },
 	{ "kvm",	cmd_kvm,	0 },
 	{ "test",	cmd_test,	0 },
-#ifdef LIBAUDIT_SUPPORT
+#ifdef CONFIG_LIBAUDIT
 	{ "trace",	cmd_trace,	0 },
 #endif
 	{ "inject",	cmd_inject,	0 },
-- 
1.7.10.1

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