diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2007-11-19 19:14:33 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2007-11-19 19:14:33 -0500 |
commit | 3079aa262de8a5694d18c76bb6329b1aad2b989e (patch) | |
tree | 7e5e1f90c6ec89519aa7be525206a1b668efd9b5 /arch | |
parent | a87c7c12ae62abe3a3d4bc9ebd5cfc4011cf3afb (diff) |
ICS: implement rollback mechanics
rollback the EIP on return to user space if TIF_ROLLBACK_RCS is set
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/signal.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index 65d7620eaa..e4ab40862b 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <asm/i387.h> | 27 | #include <asm/i387.h> |
28 | #include "sigframe.h" | 28 | #include "sigframe.h" |
29 | 29 | ||
30 | #include <linux/ics.h> | ||
31 | |||
30 | #define DEBUG_SIG 0 | 32 | #define DEBUG_SIG 0 |
31 | 33 | ||
32 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 34 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
@@ -653,5 +655,12 @@ void do_notify_resume(struct pt_regs *regs, void *_unused, | |||
653 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 655 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) |
654 | do_signal(regs); | 656 | do_signal(regs); |
655 | 657 | ||
658 | if (thread_info_flags & _TIF_ROLLBACK_RCS) { | ||
659 | long addr = (long) get_rollback_addr(); | ||
660 | if (addr) | ||
661 | regs->eip = addr; | ||
662 | clear_thread_flag(TIF_ROLLBACK_RCS); | ||
663 | } | ||
664 | |||
656 | clear_thread_flag(TIF_IRET); | 665 | clear_thread_flag(TIF_IRET); |
657 | } | 666 | } |