aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/traps.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-22 15:26:05 -0400
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-22 15:26:05 -0400
commite00d349e7781a92cf35b242259c9e5341a9661bb (patch)
treecd7e9d10adb8bc3b18c20c3d925c64b4c6f3f3b0 /arch/arm/kernel/traps.c
parent052162198b89e64d37c20238412674152d614997 (diff)
[PATCH] ARM: Move signal return code into vector page
Move the signal return code into the vector page instead of placing it on the user mode stack, which will allow us to avoid flushing the instruction cache on signals, as well as eventually allowing non-exec stack. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/traps.c')
-rw-r--r--arch/arm/kernel/traps.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 45d2a032d890..2fb0a4cfb37a 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -30,6 +30,7 @@
30#include <asm/traps.h> 30#include <asm/traps.h>
31 31
32#include "ptrace.h" 32#include "ptrace.h"
33#include "signal.h"
33 34
34const char *processor_modes[]= 35const char *processor_modes[]=
35{ "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" , 36{ "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" ,
@@ -683,6 +684,14 @@ void __init trap_init(void)
683 memcpy((void *)0xffff0000, __vectors_start, __vectors_end - __vectors_start); 684 memcpy((void *)0xffff0000, __vectors_start, __vectors_end - __vectors_start);
684 memcpy((void *)0xffff0200, __stubs_start, __stubs_end - __stubs_start); 685 memcpy((void *)0xffff0200, __stubs_start, __stubs_end - __stubs_start);
685 memcpy((void *)0xffff1000 - kuser_sz, __kuser_helper_start, kuser_sz); 686 memcpy((void *)0xffff1000 - kuser_sz, __kuser_helper_start, kuser_sz);
687
688 /*
689 * Copy signal return handlers into the vector page, and
690 * set sigreturn to be a pointer to these.
691 */
692 memcpy((void *)KERN_SIGRETURN_CODE, sigreturn_codes,
693 sizeof(sigreturn_codes));
694
686 flush_icache_range(0xffff0000, 0xffff0000 + PAGE_SIZE); 695 flush_icache_range(0xffff0000, 0xffff0000 + PAGE_SIZE);
687 modify_domain(DOMAIN_USER, DOMAIN_CLIENT); 696 modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
688} 697}