patch-2.2.8 linux/include/asm-arm/proc-armo/ptrace.h

Next file: linux/include/asm-arm/proc-armo/semaphore.h
Previous file: linux/include/asm-arm/proc-armo/processor.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.7/linux/include/asm-arm/proc-armo/ptrace.h linux/include/asm-arm/proc-armo/ptrace.h
@@ -68,8 +68,13 @@
 /* Are the current registers suitable for user mode?
  * (used to maintain security in signal handlers)
  */
-#define valid_user_regs(regs) \
-	(user_mode(regs) && ((regs)->ARM_sp & 3) == 0)
+static inline int valid_user_regs(struct pt_regs *regs)
+{
+	if (!user_mode(regs) || regs->ARM_pc & (F_BIT | I_BIT))
+		return 1;
+
+	return 0;
+}
 
 #endif
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)