TIF_IRET(i386) is used to force return to userland via iret, even if
we'd entered the kernel via sysenter. This, to put it mildly, is a
fucking ugly hack. Essentially, it acts as a silent duplicate of
NOTIFY_RESUME. do_notify_resume() clears it (as it clears NOTIFY_RESUME
itself). And i386 has glue treat it as something indistinguishable from
NOTIFY_RESUME, never mentioning either explicitly. _Any_ path going
through do_notify_resume() there will leave via iret - sysret is for
fast path only. So setting TIF_IRET (or, for that matter, TIF_NOTIFY_RESUME)
has an effect of forcing exit via iret.
That had been obfuscated just enough to have it copied to hexagon, m32r,
microblaze and xtensa. Neither of those ever sets it. Or has an analog
of the x86 issues that make forcing exit via iret needed there. Pure and
simple cargo-cult programming...
Just kill the undocumented bugger...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/
-#define TIF_IRET 5 /* force IRET */
#define TIF_SYSCALL_EMU 6 /* syscall emulation active */
#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
#define TIF_SECCOMP 8 /* secure computing */
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
-#define _TIF_IRET (1 << TIF_IRET)
#define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU)
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
#ifdef CONFIG_X86_32
if (error == 0) {
/* Make sure we don't return using sysenter.. */
- set_thread_flag(TIF_IRET);
+ set_thread_flag(TIF_NOTIFY_RESUME);
}
#endif
}
if (thread_info_flags & _TIF_USER_RETURN_NOTIFY)
fire_user_return_notifiers();
-
-#ifdef CONFIG_X86_32
- clear_thread_flag(TIF_IRET);
-#endif /* CONFIG_X86_32 */
}
void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
/* setting this flag forces the code in entry_32.S to
call save_v86_state() and change the stack pointer
to KVM86->regs32 */
- set_thread_flag(TIF_IRET);
+ set_thread_flag(TIF_NOTIFY_RESUME);
return 0;
}
do_int(regs, trapno, (unsigned char __user *) (regs->pt.ss << 4), SP(regs));