[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181127162326.GB13284@redhat.com>
Date: Tue, 27 Nov 2018 17:23:27 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Andrei Vagin <avagin@...il.com>
Cc: linux-kernel@...r.kernel.org,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] ptrace: take into account saved_sigmask in
PTRACE_{GET,SET}SIGMASK
On 11/26, Andrei Vagin wrote:
>
> > IOW, could you please explain how PTRACE_SETSIGMASK should be used, and why
> > it doesn't do something like
> >
>
> CRIU uses PTRACE_SETSIGMASK when it injects a parasite code into a
> target process. In this case, we have to be sure that when the process
> is resumed by PTRACE_CONT, it will not start handling signals and
> executing signal handlers.
So iiuc CRUI uses PTRACE_SETSIGMASK to block all signals, run the parasite
code, then restore the original sigmask.
Assuming that CRIU also turns ERESTARTNOHAND into syscall-restart (I think
it does ;) everything looks correct...
OK, I think the patch is fine.
Oleg.
Powered by blists - more mailing lists