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]
Message-ID: <tip-zlu81bbtccuzygh7m8nmgybc@git.kernel.org>
Date:   Sat, 13 Jul 2019 03:59:31 -0700
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     namhyung@...nel.org, jolsa@...nel.org, acme@...hat.com,
        adrian.hunter@...el.com, tglx@...utronix.de, mingo@...nel.org,
        linux-kernel@...r.kernel.org, hpa@...or.com
Subject: [tip:perf/urgent] perf namespaces: Move the conditional setns()
 prototype to namespaces.h

Commit-ID:  245aec7f7f4ca95b924f005d604bab9d838b5eb1
Gitweb:     https://git.kernel.org/tip/245aec7f7f4ca95b924f005d604bab9d838b5eb1
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Fri, 5 Jul 2019 13:59:06 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 9 Jul 2019 10:13:26 -0300

perf namespaces: Move the conditional setns() prototype to namespaces.h

Out of util.h, to reduce its scope, and since we have a namespaces.h
header, much better to have it there, where it is related to.

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Link: https://lkml.kernel.org/n/tip-zlu81bbtccuzygh7m8nmgybc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/namespaces.h | 4 ++++
 tools/perf/util/setns.c      | 4 +++-
 tools/perf/util/util.h       | 4 ----
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/tools/perf/util/namespaces.h b/tools/perf/util/namespaces.h
index 15a5a276c478..004430c0de93 100644
--- a/tools/perf/util/namespaces.h
+++ b/tools/perf/util/namespaces.h
@@ -13,6 +13,10 @@
 #include <linux/refcount.h>
 #include <linux/types.h>
 
+#ifndef HAVE_SETNS_SUPPORT
+int setns(int fd, int nstype);
+#endif
+
 struct namespaces_event;
 
 struct namespaces {
diff --git a/tools/perf/util/setns.c b/tools/perf/util/setns.c
index ce8fc290fce8..48f9c0af63b2 100644
--- a/tools/perf/util/setns.c
+++ b/tools/perf/util/setns.c
@@ -1,4 +1,6 @@
-#include "util.h"
+// SPDX-License-Identifier: LGPL-2.1
+
+#include "namespaces.h"
 #include <unistd.h>
 #include <sys/syscall.h>
 
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 125e215dd3d8..59fe33708090 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -67,10 +67,6 @@ char *get_current_dir_name(void);
 int sched_getcpu(void);
 #endif
 
-#ifndef HAVE_SETNS_SUPPORT
-int setns(int fd, int nstype);
-#endif
-
 extern bool perf_singlethreaded;
 
 void perf_set_singlethreaded(void);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ