lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 23 Apr 2013 15:11:51 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrew Vagin <avagin@...allels.com>
Cc:	Andrey Vagin <avagin@...nvz.org>, linux-kernel@...r.kernel.org,
	Roland McGrath <roland@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Michael Kerrisk <mtk.manpages@...il.com>,
	Pavel Emelyanov <xemul@...allels.com>,
	Cyrill Gorcunov <gorcunov@...nvz.org>
Subject: Re: [PATCH] ptrace: add ability to get/set signal-blocked mask

On 04/23, Andrew Vagin wrote:
>
> On Mon, Apr 22, 2013 at 05:07:10PM +0200, Oleg Nesterov wrote:
>
> > >
> > > I don't understand "This method is not suitable for stopped tasks"
>
> For example, a stopped process has a pending signal and this signal is
> not blocked. crtools should dump its state,

Ah, thanks, I thought that you meant restoring doesn't work...

> > > from the changelog, but if you really need PTRACE_SETSIGMASK just
> > > change ->blocked under siglock and do recalc_sigpending_tsk(child).
> >                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > actually this is not necessary, the tracee will do recalc_sigpending()
> > after resume. But perhaps a comment make sense.
>
> __set_task_blocked executes retarget_shared_pending. I think it must be
> called here too or am I wrong?

Yes sure, this is the main reason why set_current_blocked() exists.
We do not want to "delay" a group-wide signal.

But ptrace can delay it anyway? And, assuming that other threads are
stopped too this all doesn't matter at all, every thread does
recalc_sigpending() after resume. In short, if the debugger blocks a
signal, it should know what it does.

IOW, I hope this is not a problem, and I'd like to avoid the usage of
__set_task_blocked outside of signal.c or with tsk != current.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ