Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1644883

Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks
Date 2017-05-18 22:00 +0200
Message-ID <tIzKy-7VB-17@gated-at.bofh.it> (permalink)
References <tIspI-2kb-17@gated-at.bofh.it> <tIspI-2kb-15@gated-at.bofh.it> <tIwMG-5iy-15@gated-at.bofh.it> <tIybM-6nh-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 05/18, Miroslav Benes wrote:
>
> On Thu, 18 May 2017, Oleg Nesterov wrote:
>
> >
> > exit_to_usermode_loop() calls do_signal(), then klp_update_patch_state().
> > So it won't be cleared here.
>
> Ok, so maybe I misunderstand the code. I see the loop in
> exit_to_usermode_loop() for processing ALLWORK_MASK. There we call
> do_signal(). We go to get_signal(). The infinite loop there is relevant
> for us. We call dequeue_signal(). There, if I am not mistaken
> __dequeue_signal() would return 0

Yes, sorry, I didn't bother to read the code when I looked at your patch
and my memory fooled me.

> If not, we get back to exit_to_usermode_loop() and TIF_PATCH_PENDING is 
> cleared. Yes, it is true that TIF_SIGPENDING is still set and we get to
> do_signal() once more. But for the last time.

Yes, slightly sub-optimal but not really wrong and you can swap
do_signal() and klp_update_patch_state().

> If the syscall is restarted, it may be different. I have to think about
> this one. But...

Afaics, there are no problems.


In short. Thanks for correcting me and sorry for noise!

Oleg.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] livepatch: send a fake signal to all blocking tasks Miroslav Benes <mbenes@suse.cz> - 2017-05-18 14:10 +0200
  Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks Libor Pechacek <lpechacek@suse.com> - 2017-05-18 15:20 +0200
    Re: [PATCH 2/3] livepatch: send a fake signal to all blocking  tasks Miroslav Benes <mbenes@suse.cz> - 2017-05-18 15:30 +0200
  Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks Oleg Nesterov <oleg@redhat.com> - 2017-05-18 18:50 +0200
    Re: [PATCH 2/3] livepatch: send a fake signal to all blocking  tasks Miroslav Benes <mbenes@suse.cz> - 2017-05-18 20:20 +0200
      Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks Oleg Nesterov <oleg@redhat.com> - 2017-05-18 22:00 +0200
        Re: [PATCH 2/3] livepatch: send a fake signal to all blocking  tasks Miroslav Benes <mbenes@suse.cz> - 2017-05-19 10:00 +0200
  Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-23 19:40 +0200
    Re: [PATCH 2/3] livepatch: send a fake signal to all blocking  tasks Miroslav Benes <mbenes@suse.cz> - 2017-05-24 10:40 +0200

csiph-web