[CRIU] [PATCH 3/3] signalfd: add ability to send any siginfo to itself

Andrew Vagin avagin at parallels.com
Thu Nov 29 14:03:45 EST 2012


On Thu, Nov 29, 2012 at 09:04:46PM +0400, Pavel Emelyanov wrote:
> On 11/29/2012 08:51 PM, Andrey Vagin wrote:
> > The operation writes takes siginfo from a buffer and send it
> > in a queue. If a signalfd is created with the flag SFD_GROUP,
> > siginfo will be sent in a group queue, otherwise in a local queue.
> > 
> > rt_siginfoqueue doesn't allow to send siginfo with positive si_code,
> > and it's correct, because a positive si_code is reserved for kernel
> > signals. But if process will send "incorrect" siginfo to itself,
> > this operation doesn't look danger.
> > 
> > This functionality will be used for restoring pending signals.
> 
> Let's discuss why regular syscalls are not enough.

Currently rt_sigqueueinfo doesn't allow to send siginfo with a positive
si_code. We can modify rt_sigqueueinfo for sending any siginfo to
current.

I choose this variant, because I like idea that the one thing
(signalfd) is used for dumping/restoring signals.

> 
> > Signed-off-by: Andrey Vagin <avagin at openvz.org>


More information about the CRIU mailing list