Thread (29 messages) 29 messages, 7 authors, 2009-11-23

[PATCH] check put_user fail in do_signal when enable OABI_COMPACT

From: nico@fluxnic.net (Nicolas Pitre)
Date: 2009-10-27 18:08:07

On Tue, 27 Oct 2009, Jean Pihet wrote:
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index f330974..4366cc0 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -676,8 +676,14 @@ static int do_signal(sigset_t *oldset, struct pt_regs 
*regs, int syscall)
 				regs->ARM_sp -= 4;
 				usp = (u32 __user *)regs->ARM_sp;
 
-				put_user(regs->ARM_pc, usp);
-				regs->ARM_pc = KERN_RESTART_CODE;
+				if (put_user(regs->ARM_pc, usp) == 0) {
+					flush_icache_range((unsigned long)usp,
+						(unsigned long)(usp + 1));
Why are you flushing the icache?  There is no code on the stack anymore.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help