VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Richard Weinberger <richard@nod.at> 2013-09-23 17:38:02 +0200 committer: Richard Weinberger <richard@nod.at> 2013-11-17 11:27:30 +0100 commit: f72c22e45e8f8fe78c7f793d983bee5bed63497e parent: 9d1ee8ce92e16c6aa0a3fd91ee8ed9e403b3a2eb
Commit Summary:
um: Make stack trace reliable against kernel mode faults
Diffstat:
1 file changed, 6 insertions, 0 deletions
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c
index 905924b773d3..7b605e4dfffa 100644
--- a/arch/um/os-Linux/signal.c
+++ b/arch/um/os-Linux/signal.c
@@ -304,3 +304,11 @@ int set_signals(int enable)
 
 	return ret;
 }
+
+int os_is_signal_stack(void)
+{
+	stack_t ss;
+	sigaltstack(NULL, &ss);
+
+	return ss.ss_flags & SS_ONSTACK;
+}