lkml.org 
[lkml]   [2020]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH v4 03/27] x86/entry: Flip _TIF_SIGPENDING and _TIF_NOTIFY_RESUME handling
    Make sure we run task_work before we hit any kind of userspace -- very
    much including signals.

    Suggested-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    ---
    arch/x86/entry/common.c | 8
    usr/src/linux-2.6/arch/x86/entry/common.c | 440 ------------------------------
    2 files changed, 4 insertions(+), 444 deletions(-)

    --- a/arch/x86/entry/common.c
    +++ b/arch/x86/entry/common.c
    @@ -155,16 +155,16 @@ static void exit_to_usermode_loop(struct
    if (cached_flags & _TIF_PATCH_PENDING)
    klp_update_patch_state(current);

    - /* deal with pending signal delivery */
    - if (cached_flags & _TIF_SIGPENDING)
    - do_signal(regs);
    -
    if (cached_flags & _TIF_NOTIFY_RESUME) {
    clear_thread_flag(TIF_NOTIFY_RESUME);
    tracehook_notify_resume(regs);
    rseq_handle_notify_resume(NULL, regs);
    }

    + /* deal with pending signal delivery */
    + if (cached_flags & _TIF_SIGPENDING)
    + do_signal(regs);
    +
    if (cached_flags & _TIF_USER_RETURN_NOTIFY)
    fire_user_return_notifiers();


    \
     
     \ /
      Last update: 2020-02-21 14:51    [W:3.925 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site