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-5x5r176wnoqxi5p6id05wv9w@git.kernel.org>
Date:	Fri, 18 Dec 2015 00:45:50 -0800
From:	tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	acme@...hat.com, mingo@...nel.org, dsahern@...il.com,
	wangnan0@...wei.com, jolsa@...hat.com, hpa@...or.com,
	adrian.hunter@...el.com, tglx@...utronix.de,
	linux-kernel@...r.kernel.org, namhyung@...nel.org
Subject: [tip:perf/core] perf tools: Use same signal handling strategy as 
 'record'

Commit-ID:  9daddf66a37708ec7182a7058f159166d12c9812
Gitweb:     http://git.kernel.org/tip/9daddf66a37708ec7182a7058f159166d12c9812
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Fri, 11 Dec 2015 16:43:57 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 14 Dec 2015 12:08:55 -0300

perf tools: Use same signal handling strategy as 'record'

I.e. don't exit with the signal number, instead set the signal handler
to the default one and then raise it again.

Noticed while trying to dump the stack at segfaults in the 'perf test'
forked process used to run each test, that inspects signal info at
each test.

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-5x5r176wnoqxi5p6id05wv9w@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/util.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 07da970..aff0cfd 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -352,7 +352,8 @@ void sighandler_dump_stack(int sig)
 {
 	psignal(sig, "perf");
 	dump_stack();
-	exit(sig);
+	signal(sig, SIG_DFL);
+	raise(sig);
 }
 
 int parse_nsec_time(const char *str, u64 *ptime)
--
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