[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190320132731.GC21673@redhat.com>
Date: Wed, 20 Mar 2019 14:27:32 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Andrei Vagin <avagin@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [RESEND PATCH] ptrace: take into account saved_sigmask in
PTRACE_{GET,SET}SIGMASK
On 03/19, Andrei Vagin wrote:
>
> There are a few system calls (pselect, ppoll, etc) which replace a task
> sigmask while they are running in a kernel-space
>
> When a task calls one of these syscalls, the kernel saves a current
> sigmask in task->saved_sigmask and sets a syscall sigmask.
>
> On syscall-exit-stop, ptrace traps a task before restoring the
> saved_sigmask, so PTRACE_GETSIGMASK returns the syscall sigmask and
> PTRACE_SETSIGMASK does nothing, because its sigmask is replaced by
> saved_sigmask, when the task returns to user-space.
>
> This patch fixes this problem. PTRACE_GET_SIGMASK returns saved_sigmask
> is it's set. PTRACE_SETSIGMASK drops the TIF_RESTORE_SIGMASK flag.
Acked-by: Oleg Nesterov <oleg@...hat.com>
Powered by blists - more mailing lists