doing a full register restore on return to user space, and thus require
the long system call exit path (ie "iret" instead of "sysexit").
* execve() - we need to set edx/ecx correctly at process startup.
* iopl() - needs iret to restore eflags with new IOPL levels.
#include <linux/smp_lock.h>
#include <linux/stddef.h>
#include <linux/slab.h>
+#include <linux/thread_info.h>
/* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
static void set_bitmap(unsigned long *bitmap, short base, short extent, int new_value)
return -EPERM;
}
regs->eflags = (regs->eflags & 0xffffcfff) | (level << 12);
+ /* Make sure we return the long way (not sysenter) */
+ set_thread_flag(TIF_SIGPENDING);
return 0;
}
if (IS_ERR(filename))
goto out;
error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, ®s);
- if (error == 0)
+ if (error == 0) {
current->ptrace &= ~PT_DTRACE;
+ /* Make sure we don't return using sysenter.. */
+ set_thread_flag(TIF_SIGPENDING);
+ }
putname(filename);
out:
return error;