Re: [PATCH] x86: Remove force_iret()

From: Oleg Nesterov
Date: Fri Dec 20 2019 - 14:36:10 EST


On 12/19, Brian Gerst wrote:
>
> force_iret() was originally intended to prevent the return to user mode with
> the SYSRET or SYSEXIT instructions, in cases where the register state could
> have been changed to be incompatible with those instructions. The entry code
> has been significantly reworked since then, and register state is validated
> before SYSRET or SYSEXIT are used. force_iret() no longer serves its original
> purpose and can be eliminated.

Plus iiuc today force_iret() == set_thread_flag(TIF_NOTIFY_RESUME) simply has
no effect on asm paths.

Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>