Messages in this thread Patch in this message | | | Date | Mon, 6 Jan 2003 15:46:01 +0100 | From | Luca Barbieri <> | Subject | [PATCH] Set TIF_IRET in more places |
| |
This patch adds code to set TIF_IRET in sigsuspend and rt_sigsuspend (since they change registers to invoke signal handlers) and ptrace setregs. This prevents clobbering of %ecx and %edx.
diff --exclude-from=/home/ldb/src/exclude -urNdp --exclude='speedtouch.*' --exclude='atmsar.*' linux-2.5.54/arch/i386/kernel/ptrace.c linux-2.5.54-ldb/arch/i386/kernel/ptrace.c --- linux-2.5.54/arch/i386/kernel/ptrace.c 2003-01-02 04:21:29.000000000 +0100 +++ linux-2.5.54-ldb/arch/i386/kernel/ptrace.c 2003-01-04 19:06:07.000000000 +0100 @@ -74,6 +74,8 @@ static inline int put_stack_long(struct static int putreg(struct task_struct *child, unsigned long regno, unsigned long value) { + set_tsk_thread_flag(child, TIF_IRET); + switch (regno >> 2) { case FS: if (value && (value & 3) != 3) diff --exclude-from=/home/ldb/src/exclude -urNdp --exclude='speedtouch.*' --exclude='atmsar.*' linux-2.5.54/arch/i386/kernel/signal.c linux-2.5.54-ldb/arch/i386/kernel/signal.c --- linux-2.5.54/arch/i386/kernel/signal.c 2003-01-02 04:21:53.000000000 +0100 +++ linux-2.5.54-ldb/arch/i386/kernel/signal.c 2003-01-04 19:06:07.000000000 +0100 @@ -44,6 +44,7 @@ sys_sigsuspend(int history0, int history spin_unlock_irq(¤t->sig->siglock); regs->eax = -EINTR; + set_thread_flag(TIF_IRET); while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); @@ -73,6 +74,7 @@ sys_rt_sigsuspend(sigset_t *unewset, siz spin_unlock_irq(¤t->sig->siglock); regs->eax = -EINTR; + set_thread_flag(TIF_IRET); while (1) { current->state = TASK_INTERRUPTIBLE; schedule();[unhandled content-type:application/pgp-signature] | |