In the function included below, which appears at the
very end of arch/i386/kernel/signal.c, why is TIF_IRET
being cleared? Is it for the next entry into the kernel
(not the present one)? This could use a comment.
/*
* notification of userspace execution resumption
* - triggered by the TIF_WORK_MASK flags
*/
__attribute__((regparm(3)))
void do_notify_resume(struct pt_regs *regs, void *_unused,
__u32 thread_info_flags)
{
/* Pending single-step? */
if (thread_info_flags & _TIF_SINGLESTEP) {
regs->eflags |= TF_MASK;
clear_thread_flag(TIF_SINGLESTEP);
}
/* deal with pending signal delivery */
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
do_signal(regs);
clear_thread_flag(TIF_IRET);
}