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, 15 Feb 2016 23:55:59 -0800
From:	tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	tglx@...utronix.de, namhyung@...nel.org, vlee@...edesktop.org,
	brendan.d.gregg@...il.com, daniel@...earbox.net, ast@...nel.org,
	hekuang@...wei.com, acme@...hat.com, will.deacon@....com,
	wangnan0@...wei.com, peterz@...radead.org, lizefan@...wei.com,
	hpa@...or.com, mingo@...nel.org, masami.hiramatsu.pt@...achi.com,
	linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf tests: Fix build on older systems where '
 signal' is reserved

Commit-ID:  1ad826bad5bd0b6ccfb203f78c70302b764df0be
Gitweb:     http://git.kernel.org/tip/1ad826bad5bd0b6ccfb203f78c70302b764df0be
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Fri, 12 Feb 2016 18:30:01 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 15 Feb 2016 17:33:26 -0300

perf tests: Fix build on older systems where 'signal' is reserved

fixing the following problems, for instance, on RHEL6.7:

    CC       /tmp/build/perf/tests/bp_signal.o
  cc1: warnings being treated as errors
  tests/bp_signal.c: In function ‘__event’:
  tests/bp_signal.c:106: error: declaration of ‘signal’ shadows a global declaration
  /usr/include/signal.h:101: error: shadowed declaration is here
  tests/bp_signal.c: In function ‘bp_event’:
  tests/bp_signal.c:144: error: declaration of ‘signal’ shadows a global declaration
  /usr/include/signal.h:101: error: shadowed declaration is here
  tests/bp_signal.c: In function ‘wp_event’:
  tests/bp_signal.c:149: error: declaration of ‘signal’ shadows a global declaration
  /usr/include/signal.h:101: error: shadowed declaration is here
  mv: cannot stat `/tmp/build/perf/tests/.bp_signal.o.tmp': No such file or directory
  make[3]: *** [/tmp/build/perf/tests/bp_signal.o] Error 1
  make[2]: *** [tests] Error 2
  make[1]: *** [/tmp/build/perf/perf-in.o] Error 2
  make[1]: *** Waiting for unfinished jobs....

Reported-by: Vinson Lee <vlee@...edesktop.org>
Cc: Alexei Starovoitov <ast@...nel.org>
Cc: Brendan Gregg <brendan.d.gregg@...il.com>
Cc: Daniel Borkmann <daniel@...earbox.net>
Cc: He Kuang <hekuang@...wei.com>
Cc: Li Zefan <lizefan@...wei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Wang Nan <wangnan0@...wei.com>
Cc: Will Deacon <will.deacon@....com>
Cc: pi3orama@....com
Fixes: 8fd34e1cce18 ("perf test: Improve bp_signal")
Link: http://lkml.kernel.org/n/tip-wlpx6tik1b0jirlkw64bv400@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/tests/bp_signal.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c
index 1d1bb48..e7664fe 100644
--- a/tools/perf/tests/bp_signal.c
+++ b/tools/perf/tests/bp_signal.c
@@ -103,7 +103,7 @@ static void sig_handler(int signum __maybe_unused,
 	}
 }
 
-static int __event(bool is_x, void *addr, int signal)
+static int __event(bool is_x, void *addr, int sig)
 {
 	struct perf_event_attr pe;
 	int fd;
@@ -133,7 +133,7 @@ static int __event(bool is_x, void *addr, int signal)
 	}
 
 	fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC);
-	fcntl(fd, F_SETSIG, signal);
+	fcntl(fd, F_SETSIG, sig);
 	fcntl(fd, F_SETOWN, getpid());
 
 	ioctl(fd, PERF_EVENT_IOC_RESET, 0);
@@ -141,14 +141,14 @@ static int __event(bool is_x, void *addr, int signal)
 	return fd;
 }
 
-static int bp_event(void *addr, int signal)
+static int bp_event(void *addr, int sig)
 {
-	return __event(true, addr, signal);
+	return __event(true, addr, sig);
 }
 
-static int wp_event(void *addr, int signal)
+static int wp_event(void *addr, int sig)
 {
-	return __event(false, addr, signal);
+	return __event(false, addr, sig);
 }
 
 static long long bp_count(int fd)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ