summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/signal.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-10-25 15:39:37 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-10-25 15:39:37 +0000
commitab72b00734ae4d0b5ff273a0f6c7abeaa3713c76 (patch)
treeca002f2e4e6b78fd2d5747aa8d478faa5d84e9f6 /arch/arm/kernel/signal.h
parent0996391139f43d032335b5360db11da62a2cbb39 (diff)
ARM: Fix signal restart issues with NX and OABI compat
The signal restarting code was placed on the user stack when OABI compatibility is enabled. Unfortunately, with an EABI NX executable, this results in an attempt to run code from the non-executable stack, which segfaults the application. Fix this by placing the code in the vectors page, along side the signal return code, and directing the application to that code. Reported-by: saeed bishara <saeed.bishara@gmail.com> Tested-by: saeed bishara <saeed.bishara@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/signal.h')
-rw-r--r--arch/arm/kernel/signal.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/kernel/signal.h b/arch/arm/kernel/signal.h
index 27beece15502..6fcfe8398aa4 100644
--- a/arch/arm/kernel/signal.h
+++ b/arch/arm/kernel/signal.h
@@ -1,12 +1,14 @@
/*
* linux/arch/arm/kernel/signal.h
*
- * Copyright (C) 2005 Russell King.
+ * Copyright (C) 2005-2009 Russell King.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#define KERN_SIGRETURN_CODE (CONFIG_VECTORS_BASE + 0x00000500)
+#define KERN_RESTART_CODE (KERN_SIGRETURN_CODE + sizeof(sigreturn_codes))
extern const unsigned long sigreturn_codes[7];
+extern const unsigned long syscall_restart_code[2];